
16 Cal.2d 701 (1940)
In the Matter of the Application of FRANK S. CONNOR for a Writ of Habeas Corpus.
Crim. No. 4257. 
Supreme Court of California. In Bank.  
December 17, 1940.
 Frank S. Connor, in pro. per., H. Thomas Austern and Wayne M. Collins for Petitioner.
 Earl Warren, Attorney-General, Everett W. Mattoon, Assistant Attorney- General, and J. Q. Brown and Frank Richards, Deputies Attorney-General, for Respondent.
 SHENK, J.
 On September 11, 1939, this court, without written opinion, denied an application of the petitioner for a writ of habeas corpus to secure his release from the state penitentiary. On December 18, 1939, a writ of certiorari was granted by the United States Supreme Court. As the record on which this court acted, other than petitioner's application, *704 had not been formally presented, a motion for diminution was entertained for the purpose of securing an authentic transcript which could be certified for use in the certiorari proceeding. (In re Connor, 15 Cal.2d 161 [99 PaCal.2d 248].) The granting of the motion for diminution, however, did not result in settling the record and, on May 9, 1940, the United States Supreme Court remanded the cause to this court for further consideration of the application in habeas corpus. A return to the writ was thereafter filed, together with a traverse to the return, and exceptions to and motion to strike certain parts thereof. The matter has also been heard, argued orally, and fully briefed by both parties.
 In 1926, petitioner was sentenced to serve a thirteen and a half year penitentiary term for the crime of robbery. In July, 1931, he was released on parole. While on parole, and on January 18, 1932, he was arrested for further crimes alleged to have been committed on that day. Following preliminary arraignment and examination in the municipal court, and on February 16, 1932, an information was filed in the superior court charging him with four counts of robbery and one of grand theft, each count alleging a prior conviction of a felony, and with a sixth count charging possession of a revolver after a prior conviction. On February 18th petitioner was arraigned in the superior court on these charges, pleas of not guilty were entered, and trial of the cause was set for March 17, 1932. The trial resulted in a judgment of conviction, with consecutive sentences to state prison on counts 1, 2, 3 and 4, and concurrent sentences on counts 5 and 6. No appeal was taken by petitioner from the judgment, but on October 31, 1933, and again on May 31, 1934, he moved in the superior court that the judgment be vacated. Both motions were denied. No appeal was taken from the order denying the first motion. On appeal from the order denying the second motion, it was affirmed. (People v. Connor, 3 Cal.App.2d 642 [40 PaCal.2d 316], petition for hearing in this court denied, February 14, 1935.)
 [1] On August 10, 1939, petitioner's term of imprisonment under the thirteen and a half year sentence imposed by the conviction of 1926, expired. On August 21, 1939, he filed in this court the present application for a writ of habeas corpus, alleging as the sole ground for his release that throughout the period of his arraignment, trial and conviction, the court failed to inform him of his right to counsel, or to appoint *705 counsel to defend him, or to allow him a sufficient opportunity to procure legal assistance, all in alleged violation of fundamental rights guaranteed to him by the federal and state Constitutions, and in violation of section 987 of the Penal Code.
 Under the general rule well established in this state, but which admits of some modification under exceptional circumstances, this contention cannot at this late date be made the basis of a successful collateral attack by habeas corpus upon the validity of the judgment. The point could have been urged by petitioner on an appeal from the judgment, but none was taken. It could also have been urged in the proceedings to vacate the judgment instituted in 1933 and 1934, but it was not, either in the trial court or on appeal. (In re Connor, supra.) It is not a good ground for discharge in this proceeding. In this state a defendant is not permitted to try out his contentions piecemeal by successive proceedings attacking the validity of the judgment against him. (In re Drew, 188 Cal. 717 [207 P. 249]; In re Connor, supra.) Neither may the writ of habeas corpus be employed to serve the purposes of an appeal. (In re Leonardino, 9 Cal.App. 690 [100 P. 708].) [2] The function of the writ, as described in the case last cited, "is to determine the legality of one's detention by an inquiry into the question of jurisdiction and the validity of the process upon its face, and whether anything has transpired since it was issued to render it invalid. It is not designed to retry issues of fact or to answer the purpose of an appeal."
 Again, in In re Murphy, 79 Cal.App. 64 [248 P. 1044], it is said: "The law appears to be well settled that upon a petition for a writ of habeas corpus the scope of the inquiry is limited to questions affecting the jurisdiction of the court, the sufficiency in point of law of the proceedings and the validity of the judgment or commitment under which the prisoner is restrained. This inquiry is limited to the face of the proceedings. In other words, the alleged invalidity must appear upon the face of the judgment attacked by this method. (12 R. C. L. 1185, sec. 8, p. 1240, sec. 59; 13 Cal.Jur. 217, sec. 4, and cases there cited.) In Ex parte Long, 114 Cal. 159 [45 P. 1057], it is stated: 'The inquiry to be had thereunder (on habeas corpus proceedings) does not extend beyond the question of jurisdiction and the validity of the process on its *706 face.' (People ex rel. Doyle v. Atwell, 232 N.Y. 96 [133 N.E. 364, 25 A.L.R. 107, 111].)"
 In In re Maldonado, 97 Cal.App. 288 [275 P. 495], a habeas corpus proceeding, the petitioner claimed that he had not been informed of his legal rights at the time of his arraignment. Denying him relief, the court stated: "The writ of habeas corpus is not a substitute for an appeal. (13 Cal.Jur. 217, sec. 4.) Errors in the trial and denial of statutory rights which could be waived are grounds of appeal, but are not grounds for discharge on habeas corpus. (13 Cal.Jur. 236, sec. 17.)"
 A like conclusion was announced in In re Gutierrez, 1 Cal.App.2d 281 [36 PaCal.2d 712]. Petitioner there applied for a writ of habeas corpus upon the ground, among others, that "he was denied counsel and was not represented by counsel." Refusing to grant relief, the court said: "The proper method of presenting this objection is by appeal from the judgment. (Ex parte Ah Sam, 83 Cal. 620 [24 P. 276]; In re Maldonado, 97 Cal.App. 288 [275 P. 495]. ... Each of the foregoing rights is one that he could have waived and the alleged denial of any one or all of them might properly have been raised by appeal but it is not a ground for discharge in this proceeding." (See, also, Ex parte Max, 44 Cal. 579; Ex parte Ah Sam, 83 Cal. 620 [24 P. 276]; Ex parte Long, 114 Cal. 159 [45 P. 1057]; Matter of Application of Smith, 161 Cal. 208 [118 P. 710]; In re Northcott, 71 Cal.App. 281 [235 P. 458]; In re Culver, 84 Cal.App. 295 [257 P. 876]; In re Ryley, 108 Cal.App. 544 [291 P. 847]; In re West, 9 Cal.App.2d 125 [48 PaCal.2d 983]; People v. Bagasol, 22 Cal.App.2d 327, 332 [70 PaCal.2d 970].) [3] In other words, while the right of an accused to counsel will be protected, it is a right which may be waived. [4] Therefore, where the alleged denial of the right was not asserted on an appeal from a judgment of conviction, or, as here, on an appeal from an order denying a motion to set aside the conviction, it will be presumed--under the presumption of validity and regularity which attends every final judgment--that the requirements as to counsel were met.
 In the federal courts the rule may be said to permit a more extended inquiry in habeas corpus. (Johnson v. Zerbst, 304 U.S. 458 [58 S.Ct. 1019, 82 L.Ed. 1461], and cases cited.) But even under that inquiry, which may embrace a complete *707 review of the proceedings in the lower courts, full recognition is given to the presumption of validity and regularity of the judgment and to the burden of proof placed upon the petitioner. As stated in Johnson v. Zerbst, supra, "It must be remembered, however, that a judgment can not be lightly set aside by collateral attack, even on habeas corpus. When collaterally attacked, the judgment of a court carries with it a presumption of regularity. Where a defendant, without counsel, acquiesces in a trial resulting in his conviction and later seeks release by the extraordinary remedy of habeas corpus, the burden of proof rests upon him to establish that he did not competently and intelligently waive his constitutional right to assistance of counsel." (See, also, United States v. Hill, 29 Fed. Supp. 890; Buckner v. Hudspeth, 105 Fed.2d 396; Sedorko v. Hudspeth, 109 Fed.2d 475; Walker v. Johnston, 109 Fed.2d 436; Harpin v. Johnston, 109 Fed.2d 434; Kelly v. Johnston, 111 Fed.2d 613; Avery v. State of Alabama, 308 U.S. 444 [60 S.Ct. 321, 84 L.Ed. 377].)
 In the present case the application of the federal rule would not avail petitioner. Indeed an extended consideration of his contention on the merits, including an examination of the record, shows that he was both informed of his right to counsel, and afforded ample opportunity to secure counsel, but that he did not choose to avail himself of the privilege at any time when he might properly have done so.
 The docket entry recording the proceedings in the municipal court at the time of petitioner's preliminary arraignment of January 27, 1932, and preliminary examination of February 1, 1932, states: "Court informs defendant of the charge against defendant and of defendant's right to the aid of counsel in every stage of the proceedings." This statement is part of the printing in a printed form of docket sheet, which was used to record the proceedings had on January 27th and February 1st. At that time, according to an affidavit of the clerk of the court, it was customary to prepare the docket from the clerk's rough minutes, and after comparison of the two to insure accuracy, to then destroy the rough minutes. The clerk's affidavit also contained the averment that the rough minutes pertaining to petitioner's arraignment of January 27th had been destroyed. There is nothing in these facts, or in the method shown to have been employed in preparing the record, or in any other matter brought out by petitioner, which would cast a doubt upon the verity and *708 authenticity of the docket entry stating that petitioner was duly informed of his right to counsel. [5] The presumption is that in preparing the record, official duty was regularly performed. (Code Civ. Proc., sec. 1963, subd. 15.) [6, 7] The record imports absolute verity, and in this collateral proceeding must be accepted as speaking the truth (Halpern v. Superior Court, 190 Cal. 384 [212 P. 916]; People v. Figueroa, 134 Cal. 159 [66 P. 202]; Govea v. Superior Court, 26 Cal.App.2d 27 [78 PaCal.2d 433]). It is therefore of itself sufficient to refute petitioner's claim that he was then denied his constitutional right with respect to the aid of counsel.
 The record further shows that at the time of petitioner's arraignment in the superior court on February 18, 1932, before the Honorable Elliot Craig, he was asked: "Have you an attorney?", and he replied: "I don't need any." He was then asked: "You want to represent yourself; is that the idea?", and replied: "The only thing I like--It don't make any difference to me. Go ahead." Following this pronouncement, petitioner stood mute. He refused to plead to the charges against him, and the court was therefore forced, in each instance, to direct the clerk to enter a plea of not guilty. When the cause was called for trial before Honorable William C. Doran, on March 17, 1932, he asked: "Who represents the defendant?" One of the attorneys for the prosecution answered, "He has no counsel." The court then addressed petitioner directly, saying, "Who is your attorney?" As petitioner failed to answer, the bailiff said, "The judge is talking to you.", and the court repeated, "Have you an attorney?" Petitioner still stood mute and the court therefore directed that the trial proceed. It was not until the conclusion of the direct examination of the first witness, when petitioner was invited to cross-examine, that he suddenly found his tongue, stating that he wanted a lawyer and understood that Judge Craig had appointed one for him. The court immediately ordered a recess and, in the absence of the jury, questioned petitioner and examined the record of the arraignment proceedings in order to determine whether petitioner had been denied any right with respect to securing the aid of counsel. After satisfying himself that petitioner had been given sufficient opportunity to procure legal assistance, but had refused to have an attorney, the court recalled the jury and ordered the trial to proceed. Thereafter throughout the *709 duration of the hearing the petitioner harassed the court with repeated demands for counsel, so that the proceedings were punctuated with prolonged colloquies on the subject. The court, however, maintained its position that petitioner had had ample opportunity to secure counsel and, having failed to do so, should not be permitted to take advantage of that fact during the course of the trial to interrupt the proceedings and secure a continuance to which he would not otherwise be entitled.
 [8] These rulings of the court, refusing to accede to belated demands of petitioner obviously interposed to delay proceedings and sway the jury, were not erroneous. The right to the assistance of counsel guaranteed by the constitutional and statutory provisions, like any other legal right, may be invoked only in the course of orderly procedure. A defendant who, with an intelligent conception of the consequences of his act, declines the aid of counsel prior to or at the commencement of his trial, is not entitled thereafter to interrupt and delay the hearing at any stage he deems advantageous merely to interpose a demand for legal assistance. (People v. Goldenson, 76 Cal. 328, 341 [19 P. 161]; State v. Fulco, 138 La. 995 [71 So. 134]; Watkins v. Commonwealth, 174 Va. 518 [6 S.E. (2d) 670]; People v. Bimbo, 369 Ill. 618 [17 N.E. (2d) 573]; Marovich v. State, 202 Ind. 274 [173 N.E. 326].) When petitioner stated at the time of his arraignment that he did not need an attorney, the court was justified in taking him at his word (Dietz v. State, 149 Wis. 462 [136 N.W. 166, Ann. Cas. 1913B, 732]; In re Connor, supra). His attitude, both at that time and at the commencement of the trial, was equivalent to a final declination of counsel (People v. Cowan, 38 Cal.App.2d 144 [100 PaCal.2d 1079]), and precluded him from again raising the question when the trial was well under way.
 [9] Not only is it a settled rule in this state, as in other jurisdictions, that the right to counsel may be waived (People v. Rocco, 209 Cal. 68 [285 P. 704]; People v. Rose, 42 Cal.App. 540 [183 P. 874]; People v. Cowan, supra; In re Gutierrez, supra; In re Connor, supra; 16 C.J., sec. 2077, p. 821, and cases cited in note), but the burden rests upon a petitioner seeking release by the extraordinary remedy of habeas corpus, to establish that he did not in fact competently and intelligently waive it (Johnson v. Zerbst, and *710 other federal cases, supra.) Whether the waiver has been intelligently and competently made "depends upon the particular facts and circumstances in each case, including the background, experience, and conduct of the accused" (Johnson v. Zerbst, supra; Buckner v. Hudspeth, supra). [10] Here petitioner failed to sustain the burden of establishing that he did not waive his right. Indeed the facts and circumstances, including a consideration of his background, experience, and conduct, show beyond doubt that there was a waiver, and that it was both intelligently and competently made. While petitioner professes to have been unfamiliar with court procedure, and charges that the court took advantage of his ignorance, the evidence is to the contrary. Petitioner had formerly been a bank clerk. He was neither a dullard nor an uneducated man. The proceedings which resulted in his prior conviction of robbery and his penitentiary confinement had given him at least some knowledge of criminal court procedure. As stated in United States v. Hill, supra, his "prior encounters with the law, and the consequent knowledge gained thereby, place a greater burden upon him when he asserts that he was not conversant with his constitutional right to counsel." (See, also, Harpin v. Johnston, supra.)
 On preliminary examination in the municipal court, where petitioner appeared without an attorney on February 1, 1932, he intelligently declined to cross-examine witnesses or interpose a defense. His conduct on that occasion was so strikingly different from his conduct at the time of trial as to suggest that the latter was a pose assumed for the purpose of embarrassing the court in the presence of the jury. Shortly prior to his last conviction he wrote a letter from the county jail, where he was confined, to the district attorney, setting forth in detail how it would be to his benefit to return to San Quentin as a parole violator, and requesting the transfer. This letter stated that the charges left him with no defense and showed that he was fully and completely aware of every phase of his situation and knew what course of action he wished to pursue.
 Subsequent to conviction, he was represented by counsel in the preparation and presentation of the motion of 1934 to vacate the judgment, with a supporting brief. Thereafter, desiring to appeal from the order denying the motion, he filed *711 an application to substitute himself as counsel in place of his attorneys of record on the ground that they had withdrawn from the further handling of his case, and that he had "no alternative but to prosecute his appeal in propria persona" and that he was "competent to defend himself in the pending appeal." After the substitution he competently, albeit unsuccessfully, prosecuted the appeal to final determination (People v. Connor, supra). In 1937 he corresponded with the county clerk relative to securing a transcript of prior proceedings, and in 1939 he initiated the present proceeding by filing, in propria persona, a well prepared application for habeas corpus, with points and authorities in support thereof. This document, as well as the correspondence, exhibits a considerable knowledge of the law and of court procedure.
 The record contains an abundance of data attesting petitioner's learning and ability and leads to the inescapable conclusion that he intelligently and competently waived his right to the assistance of counsel with full understanding of the consequences of his act, and therefore he is not entitled to release on the ground that such right was denied him.
 [11] The briefs filed subsequent to oral argument by petitioner's present counsel raise several new points. The closing brief in particular attacks the validity of an amendment to the commitments under which petitioner is confined, and questions the propriety of the action of the prison board in deferring the running of the sentences under his present convictions until expiration of the sentence on his prior conviction. Petitioner did not mention these questions in his application. In a habeas corpus proceeding the court considers only those grounds of illegality alleged in the petition for the issuance of the writ. The case is heard and determined on the issues framed by the pleadings. (Pen. Code, sec. 1474; Ex parte Walpole, 84 Cal. 584 [24 P. 308]; Ex parte Rosenheim, 83 Cal. 388 [23 P. 372]; 25 Am. Jur., p. 236, sec. 126, citing Ex parte Daniels, 183 Cal. 636 [192 P. 442, 21 A.L.R. 1172]; 13 Cal.Jur., sec. 39, p. 263, sec. 52, p. 274; 29 C.J., sec. 187, p. 163.) But, notwithstanding this rule, our review of the record discloses that the contentions are without merit.
 On oral argument exceptions interposed by petitioner's counsel to matters contained in the return to the writ, his motion to strike portions thereof, and his objections to evidence, were taken under submission. *712
 The return to the writ contains a complete record of prior proceedings, that is, a copy of the docket record of the preliminary arraignment in the municipal court, a copy of transcript of proceedings on preliminary examination in that court, a copy of the transcript of proceedings on arraignment, trial, and sentence in the superior court, copies of amended commitments, certificates of clerks of the superior court and District Court of Appeal showing disposition of the motions to vacate the judgments, and copies of correspondence with petitioner relative thereto. In addition certain documents, including a photostatic copy of petitioner's letter to the district attorney, already referred to herein, were offered in evidence.
 Petitioner objects to and seeks to strike all portions of the record which relate to matters occurring prior or subsequent to his arraignment and trial in the superior court on the ground that they are irrelevant and immaterial. Other portions of the record, he contends, are repetitious and have no bearing on the issues. Exception is taken to numerous remarks of the trial judge on the ground that they merely represent his personal opinions and conclusions. The phrase "in propria persona", inserted after petitioner's name in transcript headings, is declared to be a mere conclusion of the court reporter.
 These numerous exceptions and objections merit no detailed discussion. Counsel have stipulated that except for the municipal court docket sheet, the exhibits printed in the return to the writ are true and correct copies of original documents. The printed copy of the docket sheet has been supplemented by introduction in evidence of a photostatic copy, showing what entries are a part of the printed form and what are written in by hand. Petitioner's attack upon this docket record has already been held to be groundless.
 [12] The scope of inquiry on habeas corpus in this state may, as above stated, under exceptional circumstances, extend over the entire course of proceedings in the lower courts (In re Lake, 65 Cal.App. 420 [224 P. 126]; In re Friday, 138 Cal.App. 660 [32 PaCal.2d 1117]; In re Connolly, 16 Cal.App.2d 709 [61 PaCal.2d 490], and cases cited), and may embrace additional evidence received by this court either directly or under an order of reference. (In re Mooney, 10 Cal.2d 1 [73 PaCal.2d 554].) In considering the purport of the record of prior proceedings, erroneous opinions *713 and conclusions and irrelevant and immaterial matters are disregarded. In defining the scope of inquiry in the federal courts it is stated in Frank v. Mangum, 237 U.S. 309, 331 [35 S.Ct. 582, 59 L.Ed. 969], that upon an application for a writ of habeas corpus the court has the right "to look beyond forms and inquire into the very substance of the matter, to the extent of deciding whether the prisoner has been deprived of his liberty without due process of law, and for this purpose to inquire into jurisdictional facts, whether they appear upon the record or not; that an investigation into the case of a prisoner held in custody by a State on conviction of a criminal offense must take into consideration the entire course of proceedings in the courts of the State, and not merely a single step in those proceedings. ..." Thus where a petitioner contends that the trial court imposed upon him and took advantage of his ignorance, any evidence touching upon his intelligence, education, ability to comprehend his situation, and familiarity with court procedure is relevant and material. (Johnson v. Zerbst, and other federal cases, supra; Logan v. Johnston, 28 Fed. Supp. 98.)
 [13] In the present case the full record of proceedings had up to the time petitioner filed his original application herein bears directly upon the issue of whether his waiver of counsel was intelligently and competently made, or whether he was imposed upon by the trial court. The same is true of correspondence conducted by him with public officials, including particularly his letter to the district attorney, hereinbefore referred to, which is plainly indicative of his experience, education, and familiarity with court procedure at or about the time of the proceedings wherein he apparently feigned ignorance or stupidity by standing mute. [14] A photostatic copy of this letter was offered in evidence by respondents on the hearing before this court. In addition to objecting to its introduction upon grounds already discussed, petitioner contended that no opportunity was afforded for its identification and that it constituted secondary evidence of an unsubstantial character. As the original letter was in the custody of the district attorney, a public officer, the proffer of a photostatic copy was not improper. (Code Civ. Proc., sec. 1855, subd. 3). The authenticity of the writing, which petitioner did not deny, was attested by an affidavit of a deputy district attorney. A comparison of that writing *714 and of petitioner's characteristic and individual signature, with the signature placed by him on his application for a writ of habeas corpus herein affords further and satisfactory evidence of identification. (Code Civ. Proc., sec. 1944.)
 Petitioner's exceptions and objections to the evidence are overruled. His motion to strike is denied. The petitioner is remanded to custody and the proceeding is dismissed.
 Curtis, J., Carter, J., Edmonds, J., Moore, J., pro tem., Marks, J., pro tem., and Gibson, C.J., concurred.
