
228 Cal.App.2d 355 (1964)
THE PEOPLE, Plaintiff and Respondent,
v.
GARY RICHARD FRANCISCO, Defendant and Appellant.
Crim. No. 3496. 
California Court of Appeals. Third Dist.  
July 7, 1964.
 Harry A. Ackley, under appointment by the District Court of Appeal, for Defendant and Appellant.
 Stanley Mosk, Attorney General, Doris H. Maier, Assistant Attorney General, and Daniel J. Kremer, Deputy Attorney General, for Plaintiff and Respondent.
 PIERCE, P. J.
 Defendant appeals from judgment (with sentence to a state prison term) following a court conviction of the crime of escape under Penal Code section 4532, a felony. His contentions on appeal are (1) that there was no evidence proving a necessary element of the offense charged; (2) that he had no trial on the issue of his guilt; and (3) that he was inadequately represented by appointed counsel. We sustain the first contention, disallow the other two.
 Defendant was arraigned under an information stating in part: "The said Gary Richard Francisco is accused by the District Attorney of Butte County, by information, found this 11th day of June, 1963, of the crime of violation of the provisions of section 4532 of the Penal Code of the State of California, committed as follows: The said Gary Richard Francisco did on or about the 23d day of May, at Butte County and State of California, and before the filing of this information, wrongfully, wilfully, and unlawfully, while being confined in the Butte County Jail, after having been convicted of violation of sections 484-488 of the Penal Code, escape from the Butte County Hospital, while awaiting treatment; all of which is contrary. ..." (Italics supplied.)
 Defendant was arraigned, asked for and was assigned counsel to represent him, and pleaded not guilty.  [fn. 1] When the case was called for trial a jury was waived and the defendant *357 and prosecuting attorney stipulated that the matter be tried upon the transcript of the evidence taken at the preliminary hearing before the committing magistrate. It was solely upon this evidence that the superior court made its determination of guilt.
 The transcript showed (through the testimony of Deputy Sheriff Horrell) that defendant and another "prisoner" had been taken by Horrell from the Butte County Jail to the county hospital for treatment. Left unattended briefly defendant departed from the building and ran out onto the grounds. Horrell gave chase, called to defendant to stop and fired two warning shots. Defendant stopped and was apprehended.
 There was no proof that defendant had been convicted of petty theft as charged in the information; nor was there proof that he had been convicted of any other misdemeanor; nor was there proof that he had been arrested, booked or charged with any other misdemeanor. Section 4532 of the Penal Code then provided (and now provides) in part: "Every prisoner arrested and booked for, charged with, or convicted of a misdemeanor who is confined in any county ... jail ... or who is in the lawful custody of any officer or person ... and who thereafter escapes or attempts to escape ... is guilty of a felony. ..."
 The absence of proof of imprisonment was noted by the committing magistrate. The district attorney made no effort to supply the deficiency by submission of the record of the charged petty theft conviction or otherwise. He stated he considered sufficient the testimony of the officer that he had had charge of the prisoners and was taking them from the jail to the hospital, plus the disputable presumption that an official duty was being lawfully performed. When this was stated, the magistrate, addressing defendant's counsel (who also represented him at the trial), asked, "Is that agreeable with you?" to which the attorney replied, "I am certainly not going to stipulate to it, Your Honor." Nevertheless, the omission was neither remedied then nor was the evidence supplied when the proceedings were had in the superior court. (There is in the transcript of the preliminary hearing a conversation between the magistrate and defense attorney in which the former, speculating upon the matter of possible release on bail, asked whether defendant was still serving *358 sentence. The attorney replied he "understood" that he was.)
 As shown above, the elements of the crime of escape under Penal Code section 4532 are:
 (1) That the accused had been either arrested and booked for, or charged with, or convicted of, a misdemeanor;
 (2) That he had been either confined in jail, or placed in the lawful custody of an officer;
 (3) That under conditions (1) and (2) he escaped, or attempted escape, from said jail or custody.
 [1] It is elementary that "[i]n every prosecution for crime, it is necessary to establish the corpus delicti, i.e., the body or elements of the crime." (1 Witkin, Cal. Crimes,  88, p. 84.) [2] The burden is upon the prosecution to prove beyond reasonable doubt every essential element of the crime of which the defendant is charged. (People v. Borchers, 50 Cal.2d 321 [325 P.2d 97].)
 It has also been held that a person cannot be convicted of an offense (other than a necessarily included offense) not charged against him by indictment or information. (People v. Feldman, 171 Cal.App.2d 15, 23 [339 P.2d 888].)
 In the early case of People v. Ah Teung, 92 Cal. 421 [28 P. 577, 15 L.R.A. 190], it was held that a departure from an unlawful imprisonment or custody is not an escape. The rule of Ah Teung was followed in People v. Clark, 69 Cal.App. 520, 522 [231 P. 590]. In People v. Hinze, 97 Cal.App.2d 1, however, the majority of this court (with Justice Peek dissenting) said, on page 5 [217 P.2d 35], that "it does not follow that a person who has been wrongfully imprisoned may always free himself therefrom with impunity." And the court distinguished between an imprisonment without any process and wholly without authority of law and imprisonment under a process which is simply irregular in form. (See also People v. Armstrong, 188 Cal.App.2d 745, 749 [10 Cal.Rptr. 618].)
 There was here, of course, evidence that while defendant was in custody he departed. There was, however, no direct proof whatever that such custody was under any color or process.
 The Attorney General cites People v. Quisenberry, 151 Cal.App.2d 157 [311 P.2d 99], a prosecution for the taking of an automobile without the owner's consent. The taking was during the course of an attempt by defendant to escape from juvenile hall. Objection was made to the admission of evidence *359 of the escape as constituting a totally different offense. Answering the contention the court stated on page 164: "Appellant is presumed to have been held lawfully by the prison in which he was confined." And the court cited in support of that statement section 1963 of the Code of Civil Procedure, subdivision 15, creating a disputable presumption "That official duty has been regularly performed," and subdivision 33, "That the law has been obeyed." Also cited was People v. Citrino, 46 Cal.2d 284, 287 [294 P.2d 32].
 The Attorney General relies upon that case and also upon People v. Armstrong, supra, 188 Cal.App.2d 745, as supporting his proposition that the presumption that custody is lawful extends also to a presumption that imprisonment was by color of process. These cases do not furnish that support.
 Lawful custody is one element of the statutory crime of "escape"; imprisonment as the result of a misdemeanor "arrest and booking," "charge," or "conviction" is another. The assumption that because a man is in lawful custody it is for one of these three causes is a non sequitur. (He may, for example, be in lawful custody as a material witness (Pen. Code,  881), or under a contempt order, or for alleged insanity, or for narcotic addiction.)
 The two cases cited by the Attorney General will illustrate this distinction. In Quisenberry, supra, the defendant had not been charged with an escape and proof of the escape was not an element of the crime. Moreover, there had been proof of imprisonment under process. In Armstrong, supra, the facts were similar to the facts here in all save one significant respect. There the defendant had escaped while being taken to a hospital by an officer. But there (unlike the case at bench) proof had been made that a misdemeanor sentence was being served by the defendant at the time of the escape. Indeed, the court's opinion starts with the statement (on p. 747): "Defendant was convicted of a misdemeanor and was sentenced to one year in the Ventura County Jail."
 The only case to which we have been referred where there is a relaxation of strict compliance with the rule requiring proof of every element of the crime charged is People v. Peters, 96 Cal.App.2d 671 [216 P.2d 145]. There it was contended that the prosecution in a manslaughter case had not sufficiently proved that death had been caused by a knife wound inflicted by defendant. (On cross-examination of defendant in which he had demonstrated how the stabbing took place, the district attorney had made the unchallenged statement: *360 "And you stuck this rather dull knife into him, sufficiently deep to kill him." (P. 676.) Elsewhere there was general assumption throughout the trial that death was so caused.) It was stated on page 676: "In a criminal case a defendant is not called upon to make explanation, to deny issues expressly (his plea of not guilty does that for him), nor is he required to point out to the prosecution its failure to make a case against him or to prove any link in the required chain of guilt. On the other hand, he cannot mislead the court and jury by seeming to take a position as to the issues in the case and then on appeal attempt to repudiate that position." The court held that defendant had conceded the cause of death.
 No such concession was made here. As shown above, the defendant expressly refused to stipulate as to his imprisonment. The prosecuting attorney, having been thus put on notice, still did not put in evidence of the necessary element of the offense. [3] Under the circumstances, we do not consider that the fact that a "sentence" (the nature of which was not disclosed) was mentioned by the court in discussing the matter of bail with counsel constituted a waiver by defendant of the necessity of proof.
 [4] We hold that the presumption that an official duty has been regularly performed while sufficient to establish that a defendant was in legal custody is insufficient to prove that he was either arrested and booked, charged with, or convicted of, a misdemeanor, a necessary element of the crime of escape under Penal Code section 4532, a felony. There are two reasons why this rule is salutary:
 First, the contrary rule urged by respondent would be the piling of presumption upon presumption to the end of abrogating the most cherished presumption in our system of jurisprudence, namely, that a man is innocent of a charged crime until proved guilty beyond reasonable doubt.
 Secondly, it would place a premium upon the district attorney's indolence.  [fn. 2] Any relaxation of a rule requiring proof of the corpus delicti would be dangerous precedent.
 Since the holding above requires reversal, no extended discussion *361 of defendant's other contentions is necessary. The contention that defendant had no trial (made by him in pro. per.) cannot be sustained. [5] A trial by jury may be waived. (In re Baird, 150 Cal.App.2d 561 [310 P.2d 454, 68 A.L.R.2d 628].) [6] Also the right of confrontation may be waived and the case tried by stipulation upon evidence taken at the preliminary hearing. (People v. Sola, 200 Cal.App.2d 593 [19 Cal.Rptr. 327].) [7] Defendant's other contention, that he was inadequately represented (this contention also having been made in pro. per.), is also without merit. Our examination of the record shows his attorney properly and adequately cross-examined the prosecution witnesses, and there is no showing that any evidence in defendant's favor was not brought before the magistrate or before the court. The attorney's protection of defendant's right to require the prosecution to prove all essential elements of the crime charged has been a material factor in the success of this appeal. A defendant who is indigent is entitled to effective aid by competent counsel; but, as stated in People v. Ibarra, 60 Cal.2d 460, at page 464 [34 Cal.Rptr. 863, 386 P.2d 487]: "To justify relief on this ground 'an extreme case must be disclosed.' [Citations.] It must appear that counsel's lack of diligence or competence reduced the trial to a 'farce or a sham.' [Citations.]" Here we find neither "extreme" nor any inadequacy of representation.
 The other error found, however, was material.
 The judgment is reversed.
 Schottky, J., and Friedman, J., concurred.
NOTES
[fn. 1]  1. Defendant also pleaded not guilty by reason of insanity. He was examined by psychiatrists appointed by the court; a jury trial was waived; it was stipulated that the reports of the psychiatrists could be considered; the taking of other evidence was waived; and the court found the defendant legally sane.
[fn. 2]  2. If, as has been asserted here, it was a fact that defendant had been convicted of petty theft, the effort to prove it could have caused the prosecuting attorney but minimal expenditure of time and energy. Contrast this with the man-hours of labor during this appeal demanded of appellant's appointed counsel, of the personnel of the office of the Attorney General, of the members and staff of this court, all with the attending dollar loss to the taxpayer!
