
65 Cal.2d 224 (1966)
In re GEORGE ANTHONY PEREZ on Habeas Corpus.
Crim. No. 10031. 
Supreme Court of California. In Bank.  
Sept. 21, 1966.
 George Anthony Perez, in pro. per., and Robert Y. Bell, under appointment by the Supreme Court, for Petitioner.
 Thomas C. Lynch, Attorney General, Edward P. O'Brien and Robert R. Granucci, Deputy Attorneys General, for Respondent.
 TRAYNOR, C. J.
 Petitioner attacks the validity of a judgment of the Los Angeles County Superior Court imposing concurrent sentences for two counts of lewd acts against children (Pen. Code,  288), one count of oral copulation (Pen. Code,  288a), and one count of kidnaping (Pen. Code,  207). Judgment was pronounced on March 28, 1963, while petitioner was confined in San Quentin State Prison.
 In 1959 the Los Angeles court found petitioner guilty of the four crimes, suspended the criminal proceedings, held sexual psychopathy hearings, and committed petitioner to a state *227 hospital for treatment. In 1960 he was returned to the superior court, the criminal proceedings were resumed, imposition of sentence was suspended, and petitioner was placed on probation for five years.
 In August 1962 petitioner pleaded guilty in Orange County to statutory rape. The Orange County Superior Court suspended the criminal proceedings and, after sexual psychopathy hearings, committed petitioner to the Department of Mental Hygiene and ordered him delivered to the state prison for an indeterminate period. (Welf. & Inst. Code,  5512, 5518.) In February 1963 he was received at San Quentin State Prison under the Orange County commitment. He does not question the validity of that commitment.
 In June 1963, at the request of a correctional counselor, petitioner signed a document stating that the Los Angeles County Superior Court was authorized to impose sentence in his absence on the 1959 convictions. This document, quoted in the margin,  [fn. 1] does not mention petitioner's right to counsel at the time of pronouncement of judgment and sentencing. A few days after petitioner signed this document he received a notice that he had been sentenced by the Los Angeles court and that his term on the four concurrent sentences commenced April 23, 1963.
 In April 1966 petitioner in propria persona filed the instant petition for habeas corpus. We issued an order to show cause on the basis of his allegations that he had not understandingly waived his right to be present and represented by counsel when judgment was pronounced. *228
 [1] Respondent urges that petitioner is not entitled to relief because he did not apply for the writ of habeas corpus until almost three years after he received notice that the Los Angeles court had imposed the sentence now attacked.petitioner's delay in applying for the writ is sufficiently explained by his allegations that when he entered the state prison he had not completed the seventh grade in school and knew nothing of legal rights or procedures, and that he has diligently used the limited opportunities available to prisoners for legal research and the preparation of legal documents. (See In re James (1952) 38 Cal.2d 302, 309 [240 P.2d 596].)
 [2a] At the time the Los Angeles court imposed sentence, section 1203.2a of the Penal Code (Stats. 1943, ch. 321, p. 1316) provided, and as since amended (Stats. 1963, ch. 2079) now provides, that when a defendant who was released on probation without imposition of sentence "is committed to a prison in this State for another offense" the court that granted probation, upon being notified of defendant's commitment to prison, "shall" impose sentence or make some other order terminating its jurisdiction in defendant's case. [3] Petitioner's confinement in prison was not under a commitment based on a judgment of conviction of crime but was under the Orange County commitment as a sexual psychopath. That commitment, however, was "for another offense" within the meaning of Penal Code section 1203.2a since the proceedings leading to such commitments of mentally disordered sex offenders begin with and rest on the conviction of a "criminal offense" (Welf. & Inst. Code,  5501). [4] Moreover, the commitment to a state prison as a sexual psychopath brought petitioner within the purpose of section 1203.2a. That section precludes outstanding probationary orders against one confined in a state prison and the uncertainty that would prevail as to when and whether the court that granted probation will seek to impose sentence on the prisoner. [5] Fairness to one committed to a state prison and proper administration by the prison officials and the Adult Authority require that such outstanding convictions be reduced to judgment or be otherwise finally disposed of by termination of the trial court's jurisdiction. These considerations apply to one committed to a state prison as a sexual psychopath who would not benefit by hospital care as well as to one sentenced to prison as a convicted felon.
 [2b] When the Los Angeles County Superior Court pronounced judgment in 1963, section 1203.2a of the Penal Code purported to permit imposition of sentence in the absence of *229 and without notice to one who had been released on probation and was thereafter committed to a state prison for another offense.  [fn. 2] [6] Pronouncement of judgment, however, is a critical stage in the criminal prosecution when the constitutional rights "to appear and defend, in person and with counsel" (Cal. Const., art. I,  13) apply, and a judgment pronounced in violation of those rights can be attacked by habeas corpus. (In re Levi (1952) 39 Cal.2d 41, 46 [244 P.2d 403]; In re Roberts (1953) 40 Cal.2d 745, 748 [255 P.2d 782]; In re Boyce (1959) 51 Cal.2d 699 [336 P.2d 164]; In re Klein (1961) 197 Cal.App.2d 58, 63 [17 Cal.Rptr. 71].)
 [7] There are substantial reasons for the presence of accused and the aid of counsel at the pronouncement of judgment. There may be good cause why judgment should not be pronounced (Pen. Code,  1200), e.g., the accused may be insane or have cause to offer in arrest of judgment or for a new trial (Pen. Code,  1201); he may have evidence and *230 argument in mitigation of punishment when a choice of sentence is available; when probation has been revoked in his absence he may be able to show that it should be reinstated. Without the help of counsel most defendants would not know of and would be helpless to present these matters. Also they might allow the time for appeal to run in ignorance of the right to appeal and of grounds for reversal. (In re Levi (1952) supra, 39 Cal.2d at pp. 45-46; In re Turrieta (1960) 54 Cal.2d 816, 819 [8 Cal.Rptr. 737, 356 P.2d 681]; In re Klein (1961) supra, 197 Cal.App.2d at p. 65; In re Jordan (1966) 242 Cal.App.2d 254, 257-258 [51 Cal.Rptr. 221]; see also People v. De Waele (1964) 224 Cal.App.2d 512, 515 [36 Cal.Rptr. 825].)
 Thus, In re Klein, supra, 197 Cal.App.2d at pp. 62, 65, specifically held that pronouncement of judgment under the provision of section 1203.2a purporting to authorize sentencing in the absence of defendant violated the rights "to appear and defend, in person and with counsel" (Cal. Const., art. I,  13), and that acceptance of probation by the accused did not imply acquiescence in that provision of section 1203.2a and waiver of those constitutional rights.  [fn. 3]
 Here, as in Klein, the record shows no actual waiver of those rights by petitioner when he accepted probation. The waiver relied on by respondent was made when petitioner signed the document quoted supra, footnote 1, after judgment had been pronounced on March 28, 1963, in his absence. Respondent argues that by signing that document, with its express recital authorizing imposition of sentence in his absence, petitioner *231 impliedly waived his right to the aid of counsel at the time of sentence. [8] We have refused to imply a waiver of the right to counsel from the mere presence of the accused when judgment is pronounced (In re Levi, supra, 39 Cal.2d at pp. 46-47; In re Roberts, supra, 40 Cal.2d at p. 748; In re Boyce, supra, 51 Cal.2d at p. 700; In re Turrieta, supra, 54 Cal.2d at p. 820); similarly here, a waiver of the right to counsel will not be implied from petitioner's execution of a document that recites only a waiver of the right to personal presence and does not mention the right to counsel.
 [9] Since petitioner was not afforded the opportunity to have assistance of counsel when the Los Angeles court pronounced sentence, its judgment cannot stand, and we need not resolve the factual question presented by petitioner's allegations that his waiver of the right to be present in person was incompetent because he signed the document without understanding its effect.
 [10] Nothing in the present record shows any defect in the finding of the Los Angeles court that petitioner was guilty of the four crimes. In such a case the subsequent unconstitutional procedure at the time of sentence ordinarily would not lead to loss of power to impose a valid sentence. The prisoner would be returned to the trial court to be arraigned for judgment with the opportunity there to show cause why judgment should not be pronounced. (In re Levi, supra, 39 Cal.2d 41, 47.) [2c] Section 1203.2a as it read when petitioner was sentenced (Stats. 1943, ch. 321, p. 1316) provided, however, that unless the superior court imposed sentence within 30 days after it was notified of the defendant's confinement in a state prison the court was "deprived thereafter of any jurisdiction over the defendant" in the case in which the order of probation was made. If this last quoted provision of section 1203.2a as it formerly read remained in effect despite the invalidity of the provision permitting imposition of sentence in the defendant's absence and despite the section's omission of any provision securing the defendant's right to counsel, petitioner and others similarly situated could never be punished for crimes that led to imposition of sentences in a manner purportedly but unconstitutionally authorized by the Legislature.
 [11] "When part of a statute is declared unconstitutional, the remainder will stand if it is complete in itself and would have been adopted by the legislative body had the latter foreseen the partial invalidation of the statute." (In re Bell (1942) 19 Cal.2d 488, 498 [122 P.2d 22]; see Estate of Phillips *232 (1928) 203 Cal. 106, 113 [263 P. 1017].) [12] Deletion of the unconstitutional part of former section 1203.2a would leave a coherent statute complete in itself, but not one that the Legislature would have adopted had it foreseen the partial invalidation of the statute. We do not believe that the Legislature would have provided that court action under an unconstitutional procedure should nevertheless lead to loss of jurisdiction to proceed constitutionally. The statutory plan that the Legislature would have adopted had it foreseen that former section 1203.2a was in part unconstitutional is indicated by the 1963 amendment of the section. That amendment does not simply delete the unconstitutional provision for the imposition of sentence in the defendant's absence, but provides a different procedure that recognizes the defendant's right to be present and represented by counsel. (See People v. Fisherman (1965) 237 Cal.App.2d 356, 361-362 [47 Cal.Rptr. 33].)
 Before the enactment of section 1203.2a, a court that had suspended imposition of sentence and granted probation to one who later found himself in the situation of this petitioner or of Klein (197 Cal.App.2d 58) or Fisherman (237 Cal.App.2d 356) did not lose jurisdiction to impose sentence because of lapse of time. If probation was timely revoked, judgment could be imposed at any time thereafter. (See People v. Williams (1944) 24 Cal.2d 848, 853 [151 P.2d 244]; People v. Siegel (1965) 235 Cal.App.2d 522, 524 [45 Cal.Rptr. 530].) [2d] We conclude that a prisoner unconstitutionally sentenced under section 1203.2a as it read before the 1963 amendment is in the same position he would have been in had there been no such statute; that is, unless he competently waives his rights to be present and represented by counsel at the time of pronouncement of judgment, he is entitled to be properly arraigned for judgment. The court that originally granted probation is not deprived of jurisdiction to impose sentence by the 30-day provision of section 1203.2a. (People v. Fisherman, supra, 237 Cal.App.2d at pp. 361-362.)
 The petitioner is discharged from the custody of the authorities at San Quentin State Prison and is committed to the custody of the sheriff of Los Angeles County with directions that petitioner be arraigned for pronouncement of judgment in accordance with this opinion. In all other respects the petition is denied.
 McComb, J., Peters, J., Tobriner, J., Peek, J., Mosk, J., and Burke, J., concurred.
 "Gentlemen:"
 "I, George A. Perez, have heretofore been convicted in the above court of the offenses of Violation of Penal Code Sections 288, 288a, and 207, under Superior Court Case No. 212953. On December 16, 1960, the Judge of said court ordered that proceedings in the said matter be suspended without imposition of sentence and granted probation to me."
 "That thereafter, on or about August 13, 1962, the order of probation was revoked. Thereafter, on January 3, 1963, I was ordered committed to the Department of Mental Hygiene from the County of Orange, as a sexual psychopath, and am now incarcerated in the California State Prison at San Quentin under identification number A-76012-S."
 "It is to my advantage that all offenses of which I have been convicted be dealt with by the Department of Corrections and the Adult Authority at one time, and I therefore respectfully request the above Superior Court to impose its sentence, heretofore withheld."
 "I know that I am entitled to be present in court at the time sentence is pronounced against me, and I do specifically authorize such sentence to be imposed against me for the offenses hereinabove stated, Violation of Penal Code Sections 288, 288a, and 207, in my absence."
 "The probation officer may, upon learning of such defendant's imprisonment, and must within 30 days after being notified in writing by the defendant or his counsel, or the warden or superintendent or clerk of the prison in which the defendant is confined, report such commitment to the court which released the defendant on probation."
 "Upon being informed by the probation officer of the defendant's confinement, or upon receipt from the warden, superintendent or clerk ... of a certificate showing that the defendant is confined in prison, the court shall issue its commitment if sentence has previously been imposed, or shall impose sentence and issue its commitment if sentence has not previously been imposed, or shall make other final order terminating its jurisdiction over the defendant in the case in which the order of probation was made, and if no such order is made within 30 days after the court has been notified as herein provided of the defendant's confinement, then the court shall be deprived thereafter of any jurisdiction over the defendant in the case on which he was granted probation."
 "Upon imposition of sentence hereunder the commitment shall be dated as of the date upon which probation was granted and if the defendant is then in a State prison for an offense committed subsequent to the one upon which he has been on probation, the term of imprisonment of such defendant under a commitment issued hereunder shall commence upon the date upon which defendant was delivered to prison under commitment for his subsequent offense, unless the court shall order that the sentence for the prior offense shall commence upon termination of the sentence for said subsequent offense. The sentence of the court may be imposed in the absence of the defendant in such cases. In the event the probation officer fails to report such commitment to the court or the court fails to impose sentence as herein provided, the court shall be deprived thereafter of all jurisdiction it may have retained in the granting of probation in said case."
 "* * *"
 "... If the case is one in which sentence has not previously been imposed, the court is deprived of jurisdiction over defendant if it does not impose sentence and issue its commitment or make other final order terminating its jurisdiction over defendant in the case within 30 days after defendant has, in the manner prescribed by this section, requested imposition of sentence."
NOTES
[fn. 1]  1. "To the Superior Court of the State of California, County of Los Angeles
[fn. 2]  2. Section 1203.2a (Stats. 1943, ch. 321, p. 1316) then provided that "If any defendant who has been released on probation is committed to a prison in this State for another offense, the court which released him on probation shall have jurisdiction to impose sentence, if no sentence has previously been imposed for the offense for which he was granted probation, in the absence of the defendant.
[fn. 3]  3. The Legislature recognized the holdings of such cases as Klein and Levi by amendment of section 1203.2a (Stats. 1963, ch. 2079, effective September 20, 1963, after this petitioner's sentence and asserted waiver) to provide that a defendant committed for another crime could be sentenced in his absence by the court that had withheld imposition of sentence only "on the request of the defendant made through his counsel, or by himself in writing, if such writing is signed in the presence of the warden or superintendent of the prison in which he is confined or the duly authorized representative of the warden or superintendent, and such warden or superintendent or his representative attests both that the defendant has made and signed such request and that he states that he wishes the court to impose sentence in the case in which he was released on probation, in his absence and without his being represented by counsel.
