
162 Cal.App.2d 755 (1958)
EARL REED McCARTHY, Petitioner,
v.
SUPERIOR COURT OF CONTRA COSTA COUNTY, Respondent.
Civ. No. 18322. 
California Court of Appeals. First Dist., Div. Two.  
Aug. 13, 1958.
 David N. Bortin for Petitioner.
 Edmund G. Brown, Attorney General, Clarence A. Linn, Assistant Attorney General, and Raymond M. Momboisse, Deputy Attorney General, for Respondent.
 KAUFMAN, P. J.
 Petitioner seeks both a writ of prohibition to restrain the respondent court from proceeding to trial after preliminary examination, and a writ of mandate to compel the respondent court to order the production and inspection of a certain statement made by the petitioner to police officers immediately after his arrest.
 I. The Writ of Prohibition.
 Petitioner was charged with a violation of Penal Code, section 447a (arson) and at the preliminary hearing was held to answer. Defendant was not represented by counsel at the preliminary examination. Petitioner moved the respondent court for an order setting aside the information pursuant to Penal Code, section 995, on the ground that he had not been legally committed by a magistrate. The respondent court denied the motion and will proceed with the trial unless restrained.
 The relevant portion of the preliminary examination is as follows:
 "Mr. Sellar: And Mr. McCarthy has indicated a willingness to tell his story in this matter. It is my understanding he was arraigned yesterday. Is that correct?"
 "The Court: This is true."
 "Mr. Sellar: May he tell his story under the proper admonition?"
 "The Court: Do you wish to admonish him?"
 "Mr. Sellar: If the Court so directs me, I will."
 "The Court: All right."
 "Mr. Sellar: Mr. McCarthy, if you are willing to tell your *757 story to the Court, the Court has asked me to tell you that if you do it, you must do it freely and voluntarily without any promises of immunity or reward. In other words, nobody can make a deal with you or do this or do that if you tell your story. Do you understand that?"
 "The Defendant: Yes, I understand."
 "Mr. Sellar: And everything you say will be taken down by the court reporter here and it would result in your being convicted of the crime of which you are charged. Now, you understand everything I have said?"
 "The Defendant: Yes, I do."
 "Mr. Sellar: Now, understanding that, are you still willing to tell your story to the court?"
 "The Defendant: Yes."
 "Mr. Sellar: All right. Would you stand and be sworn?"
 "The Court: Are you willing to testify without the advice of Counsel?"
 "The Defendant: Sure."
 Petitioner contends that because the court did not inform the accused of the right of counsel, ask him if he desired counsel, and allow him reasonable time to send for counsel, the preliminary examination deviated from the constitutional and statutory requirements so as to infect with illegality any order of commitment based upon the examination, citing In re James, 38 Cal.2d 302 [240 P.2d 596]; Tupper v. Superior Court,   [fn. *](Cal.App.) 324 P.2d 356; People v. Williams, 124 Cal.App.2d 32 [268 P.2d 156], and Penal Code, section 866.5. The prosecution contends that because petitioner was advised of his right to counsel at the arraignment on the preceding day, he knowingly and voluntarily waived his right to counsel at the preliminary examination, and the presumption of regularity of previous proceedings, citing People v. Greene, 108 Cal.App.2d 136 [238 P.2d 616]; People v. Rebolledo, 93 Cal.App.2d 261 [209 P.2d 16].
 Our state Constitution, article I, sections 8 and 13, guarantees the right of every person charged with crime in any court whatever "to appear and defend in person with counsel." In obedience to this constitutional mandate, the Legislature enacted Penal Code, sections 858, 859, and more recently in 1953, section 866.5. [1] This section reads as follows:
 "The defendant may not be examined at the examination, *758 unless he is represented by counsel, or unless he waives his right to counsel after being advised at such examination of his right to aid of counsel." [Emphasis supplied.]
 The language of the statute is clear and apparently based on theory that a valid, intelligent waiver of a fundamental right cannot be made until after a defendant has been advised of his right to counsel. This view is supported by the only interpretation of this section, to date, in People v. Williams, 124 Cal.App.2d 32 [268 P.2d 156]. In that case, the defendant was informed of his right to counsel under Penal Code, section 858 at the arraignment which occurred the day before the preliminary hearing. At the preliminary hearing he was not again informed of his right to counsel in accordance with section 866.5 of the Penal Code, but only asked by the court: "You didn't want to hire an attorney to represent you, is that right." The defendant answered that, "He had no money to hire one." The court, in substance, held that the defendant was able-bodied and could work so that there was no justification for appointing an attorney at the taxpayer's expense. The appellate court upheld an order setting aside the information on the ground that the defendant had not been legally committed.
 In the instant case, there is nothing in the record to show what took place during the petitioner's arraignment. The prosecution argues that in the absence of an affirmative showing to the contrary, it must be presumed that official duty was performed. However, the cases relied upon by the prosecution on this point, predate Penal Code, section 866.5, and its interpretation in the Williams case. As pointed out above, in that case the record clearly indicated that the defendant had been advised of his rights under Penal Code, section 858, at the arraignment. We think section 866.5 is clearly applicable in this case as pointed out recently by this court in Tupper v. Superior Court,   [fn. *](Cal.App.) 324 P.2d 356, a statutory right is a part of the due process of law to which a defendant is entitled. The defendant was not advised of his right to counsel at the preliminary and therefore did not waive his right.
 The prosecution also makes much of the petitioner's familiarity with legal procedures and his mental ability to protect his rights. In People v. Napthaly, 105 Cal. 641 [39 P. 29], the defendant was a lawyer and the record indicated that he *759 knew of his right to counsel and asked for a continuance to procure counsel. It was argued that these facts obviated the necessity of informing the defendant of his rights. The court set aside the information, pointing out that the rights of individuals under the Constitution are not to be gauged by their profession or occupation. Nor, may we add, can they be gauged by an individual's presumed knowledge thereof. [2] We think that here, as in the Tupper and Williams cases, supra, there was a plain and palpable violation of a fundamental right which rendered the commitment illegal.
 It follows that a peremptory writ of prohibition should issue herein.
 II. The Writ of Mandate.
 [3] The issuance of the peremptory writ of prohibition in this case does not make moot the petitioner's request for the writ of mandate, as the prosecution has indicated its intention of recharging the petitioner. Petitioner seeks a writ of mandate to compel the respondent court to order the production and inspection of a statement made by the petitioner after his arrest. His affidavit alleges that he was "physically and mentally ill and in great distress of body and mind, and ... unable to recall what he said in said statement ... but has advised his attorney to the best of his recollection truthfully, fully and fairly as to the contents of the statement ..." Counteraffidavits of a detective, a deputy sheriff and the district attorney allege that the petitioner made his statement voluntarily and gave no indication of physical or mental illness or distress to the arresting officer or to the officer taking the statement. Both sides have stipulated to the report of the examining psychiatrists, which set forth, among other details, that the petitioner has an I.Q. of approximately 75.
 [4] This case is governed by Powell v. Superior Court, 48 Cal.2d 704 [312 P.2d 698], recently followed in Cordry v. Superior Court, 161 Cal.App.2d 267 [326 P.2d 222], and Schindler v. Superior Court, 161 Cal.App.2d 513 [327 P.2d 68. The prosecution seeks to distinguish these cases on several grounds. First, it is argued that in the Powell and Schindler cases, no counteraffidavits were filed and therefore the matters averred in the petition were admitted. Second, it is argued that there is no showing that the statements were reduced to writing or signed by the petitioner, and that the petitioner is not entitled to the "raw notes" of the interrogator. Third, it is argued that the petitioner has not laid a proper *760 foundation for the issuance of the writ as he has not averred that the statement is essential to his defense. Fourth, it is argued that on the basis of the conflicting evidence in the affidavit and counteraffidavits, the trial court properly exercised its discretion in denying petitioner's motion for inspection. We see no merit in any of these contentions. The petitioner's allegation that he was unable to recall what he said in the statement is not controverted by the counteraffidavits. Here, as in the Cordy case (supra), there was no finding by the trial court on the determinative issues. As pointed out in Powell v. Superior Court, 48 Cal.2d 704 at 707 [312 P.2d 698]:
 " 'Absent some governmental requirement that information be kept confidential for the purposes of effective law enforcement, the state has no interest in denying the accused access to all evidence that can throw light on issues in the case ... To deny flatly any right of production on the ground that an imbalance would be created between the advantages of prosecution and defense would be to lose sight of the true purpose of a criminal trial, the ascertainment of the facts. (Citations.)' It is, of course, statutory law in California that a defendant be provided with a transcript of the evidence taken by a grand jury. (Pen. Code,  925.)"
 "In the circumstances of the present case, to deny inspection of defendant's statements would likewise be to lose sight of the objective of ascertainment of the facts, and would be out of harmony with the policy of this state that the goal of criminal prosecutions is not to secure a conviction in every case by any expedient means, however odious, but rather, only through establishing the truth upon a public trial fair to defendant and the state alike. In the recent case of Dowell v. Superior Court (1956), 47 Cal.2d 483 [304 P.2d 1009], this court granted mandamus to compel inspection prior to trial of a personal injury action, of a statement taken from plaintiff in the hospital by defendant company's claims investigator the day after plaintiff had been injured. There, as here, plaintiff averred that he had forgotten what he had said in the statement. In holding that he was entitled to inspect and take a copy of the statement this court noted that the ' "trend of judicial decisions is to relax the rules which relate to the taking of evidence by ancillary proceedings of which the inspection of documents is one method ..." [Citations.]', and commented further 'that the principles of equity enter into the determination of an application for discovery and also *761 in a mandamus proceeding to compel appropriate action.' (P. 486 of 47 Cal.2d.)"
 It follows that a peremptory writ of mandate should issue herein.
 Ordered that writ of Prohibition and writ of Mandate issue as prayed for by petitioner.
 Dooling, J., and Draper, J., concurred.
NOTES
[fn. *]  *. A hearing was granted by the Supreme Court on June 11, 1958. The final opinion of that court is reported in 51 Cal.2d ___ [331 P.2d 977].
[fn. *]  *. A hearing was granted by the Supreme Court on June 11, 1958. The final opinion of that court is reported in 51 Cal.2d ___ [331 P.2d 977].
