In this habeas corpus proceeding the ultimate question is whether the District Court of Appeal, after modifying consecutive sentence judgments in two consolidated criminal cases by striking out findings of two prior convictions, has power to itself implicitly determine upon the changed record whether probation shall be granted or denied and whether the sentences shall run cumulatively or concurrently, or must remand the cause to the trial court for such determinations and appropriate proceedings. We conclude that petitioner is entitled to the writ, not to be discharged from custody of the sheriff but to be produced in the superior court for proceedings appropriate to the state of the record as hereinafter explained.
Petitioner was convicted of one count of grand theft and one count of forgery and it was found that he had suffered three prior convictions of felony. Probation was denied; the judgments which were thereupon entered recited the three prior convictions and ordered that the sentences run consecutively. Defendant appealed and the District Court of Appeal affirmed the judgments in People v. Bartges (1954), 126 Cal.App.2d 763, 776 [273 P.2d 49], holding in substance, inter alia, that “Since appellant was shown to have been convicted of at least three prior felonies” it could not be said that the trial court abused its discretion in denying probation and in ordering that the sentences run consecutively. There was no petition for rehearing or for a hearing in this court, and the judgment of the District Court of Appeal became final.
After petitioner had filed the petition for habeas corpus which is now before this court, the District Court of Appeal recalled its remittitur and modified the trial court’s judgments to recite only one prior conviction. However, it did not remand the cause for determination by the trial court as to whether upon the changed record probation should be granted or denied, and whether, if reimposed, the sentences should run concurrently or consecutively, and for resentencing, if and as appropriate. Instead, the District Court of Appeal affirmed the judgments as modified by it. (People v. Bartges (1954), 128 Cal.App.2d 496 [275 P.2d 518].)
*244Petitioner (subject to bail as fixed by the superior court) is in the custody of the sheriff of Los Angeles County and stay of execution has been granted by the superior court “to the time when the application to the State Supreme Court has been determined and to the time within which an appeal to the United States Supreme Court may be perfected.”
Petitioner complains that the trial court’s determination that his sentences should run consecutively rather than concurrently was based on its mistaken belief as to the number of prior convictions which he has suffered. The record supports this contention to the extent and for the reasons hereinafter stated. Petitioner further contends that the trial court violated due process by upholding the refusal of a witness, called by petitioner, to testify on the ground that he might incriminate himself (U.S. Const., Amendment V; Cal. Const., art. I, §13; Code Civ. Proc., § 2065). This contention was correctly disposed of on petitioner’s appeal from the judgments of conviction (People v. Bartges (1954), supra, 126 Cal.App.2d 763).
The judgments of conviction recited that “the Court . . . found allegations of prior convictions . . . true, to-wit: Arson, a felony [in Oregon in 1932] . . .; Larceny and Larceny by Bailee, felonies [in Oregon in 1941], . . . Grand Theft, a felony [in Arizona in 1949],” with service of terms in the respective state prisons. Before the District Court of Appeal petitioner contended, among other things, that two of the prior convictions were not proved. As petitioner points out, although exemplified copies of the Oregon conviction of larceny and larceny by bailee and of the Arizona conviction of grand theft were produced by the prosecuting attorney and numbered for identification, such copies were not offered or received in evidence; instead, the prosecuting attorney moved “to dismiss the second and third prior convictions as alleged in the information” and the trial court granted the motion. The District Court of Appeal, perhaps misled by the fact that the index to the reporter’s transcript mistakenly shows that such exemplified copies were in evidence, and not having had its attention directed to the fact of dismissal, and presuming the judgments to be correct, rejected the contention of petitioner that the prior convictions had not been established (pp. 774-776 of 126 Cal.App.2d).
The reason for the prosecuting attorney’s not offering evidence of the two prior convictions, and for moving to *245dismiss the charges, was stated by him at the trial. He seems to have been of the opinion that the prior convictions should not be charged and proved because they were adjudications that the defendant had committed acts which, had they been committed in California, would not have amounted to grand theft as defined by the law of this state (theft of money or property of a value exceeding $200 [Pen. Code, § 487]). This appears from the statement of the prosecuting attorney that “I understand now that the dividing line between petty theft and grand theft in Arizona is $50.00 and in Oregon the dividing line is $35.00, so although those would stand as felony convictions in the other States, they would not be felony convictions in California.” Although this court, as required by statute since 1927 (Stats. 1927, p. 110; Code Civ. Proc., § 1875, subd. 3), takes judicial notice of the statutory definition of a crime in a sister state (see In re McVickers (1946), 29 Cal.2d 264, 278 [176 P.2d 40]), the District Court of Appeal did not judicially notice the Oregon and Arizona statutory delineations between grand and petty theft referred to in the quoted statement of the prosecuting attorney; it mistakenly said (p. 775 of 126 Cal. App.2d), “There being no evidence to the contrary, it will be assumed that the law with respect to the crimes charged as prior convictions in the sister states is the same as it is in California.”
After the decision of the District Court of Appeal became . final petitioner filed the petition for habeas corpus which is now before us. He contends, in effect, that the superior court exceeded its jurisdiction in finding him guilty of two prior convictions the charges of which had been dismissed and which were not supported by proof, and that the District Court of Appeal likewise exceeded its jurisdiction in affirming those judgments. He points to the District Court’s holdings that ‘1 Since appellant was shown to have been convicted of at least three prior felonies it cannot be said that in imposing consecutive sentences herein the court was improperly influenced to the prejudice of appellant by the prior conviction of larceny by bailee in the State of Oregon,” and that “we cannot say that the denial of probation under such circumstances, amounted to an abuse of discretion” (p. 776 of 126 Cal.App.2d). This court issued an order to show cause, and the sheriff filed his return.
Thereafter the attorney general advised the District Court *246of Appeal of an entry in the clerk’s transcript on appeal which apparently had not been previously directed to the attention of that court by either party to the appeal. Such entry shows that during the trial “Motion of the District Attorney to dismiss the second and third prior convictions as alleged in the information is granted.” The District Court of Appeal (People v. Bartges (1954), supra, 128 Cal.App.2d 496, 498) determined that “A mistake of fact on the part of an appellate tribunal which results in prejudicial error or a miscarriage of justice affords a proper ground for recall and correction of the remittitur [citations] . . . Since the motion to dismiss the last two prior convictions was granted by the trial court and was not brought to the attention of this court prior to rendition of its decision affirming the judgments containing a finding that all three priors charged were true, we are persuaded that such decision being inadvertently rendered under a mistake of fact entitles us to take such steps as are necessary to bring into agreement the facts and the law.”
The District Court of Appeal recalled its remittitur. It noted the fact that petitioner urged “that the improper finding of three prior convictions resulted in improper imposition of consecutive sentences” and modified its original order of full affirmance to provide that “The judgments are modified by striking therefrom the finding of the truth of the second and third prior conviction [sic],” but, as hereinabove indicated, instead of thereupon reversing the judgments and remanding the cause to the trial court for determination of the questions as to whether, with the findings as ■to the two prior convictions stricken out, probation should be granted or denied and whether the sentences, if to be reimposed, should run cumulatively or concurrently, it impliedly and implicitly undertook to itself make those determinations by ordering that “as so modified the judgment and order are affirmed.” (People v. Bartges (1954), supra, 128 Cal.App.2d 496, 497-498.)
The sheriff then filed a supplemental return which shows that petitioner is held under a modified abstract of judgments which show only one prior conviction (of arson). Therefore, petitioner’s contention that the judgments were incorrect and beyond the power of the superior court to make (and the District Court of Appeal to affirm) in determining that the two prior convictions last recited therein (the charges of which had been dismissed) are true, has *247become moot in that he has secured the relief in that respect to which he was entitled.
Petitioner still complains, however, that the trial court must be understood to have been influenced to some extent in ordering that the sentences run consecutively by its mistaken belief that he had suffered three prior convictions of crimes which, if committed in California, would have amounted to felonies, and that the issue on this matter is not moot. The record and the law support petitioner in this contention. As this court has previously held, it cannot be said that the trial court’s unwarranted determination as to the number of prior convictions of felony did not influence it in sentencing petitioner to consecutive rather than concurrent terms. (People v. Morton (1953), 41 Cal.2d 536, 545 [261 P.2d 523].) Furthermore, as hereinabove shown, the District Court of Appeal in disposing of certain of petitioner’s contentions adversely to him specifically relied upon the mistaken assumption that petitioner “was shown to have been convicted of at least three prior felonies” (p. 776 of 126 Cal.App.2d). The right of petitioner to have the trial court determine upon the corrected record whether probation shall be granted or denied and whether the sentences, if reimposed, shall run cumulatively or concurrently is a substantial one. Inasmuch as the statutes (Pen. Code, §§ 1203; 669; see also id., §§ 1213; 1213.5; 3021; 3024; 3024.5; 3043) vest the power to make such determinations in the trial court and as the District Court of Appeal was acting only as a reviewing court, we conclude that the latter court exceeded its power and that the writ should issue for the purposes hereinafter specified.
As indicated above, the petition for habeas corpus raises the further contention that petitioner was denied a fair trial in that the trial court refused to compel one Forrest Jameson to testify when called as a witness for petitioner. Jameson was jointly charged with petitioner with grand theft. His trial had been severed. He refused to testify on the ground that any evidence which he gave might tend to incriminate him. Petitioner presents no argument in this connection which would entitle him to relief on habeas corpus or which was not disposed of by the District Court of Appeal in People v. Bartges (1954), supra, 126 Cal.App.2d 763, 771-774.
A question remains as to the form and substance of the order to be made in this case. In construing the meaning of the word “discharging” as used in section 1506 of *248the Penal Code1 this court has recently noted that “The function of the writ of habeas corpus is solely to effect ‘discharge’ from unlawful restraint, though the illegality in respect to which the discharge from restraint is sought may not go to the fact of continued detention but may be simply as to the circumstances under which the prisoner is held” and that he “may be discharged from illegal conditions of restraint although not from all restraint.” (In re Chessman (1955), ante, pp. 1, 5, 6 [279 P.2d 24]; see also Pen. Code, § 1484 [“The court . . . must . . . dispose of such party [petitioner] as the justice of the case may require”]; id., § 1493 [“In cases where any party is held under illegal restraint or custody . . . the . . . court may order such party to be committed to the restraint or custody of such person as is by law entitled thereto”]; In re McCoy (1945), 32 Cal.2d 73, 77 [194 P.2d 531, 11 A.L.R.2d 934]; In re James (1952), 38 Cal.2d 302, 313-314 [240 P.2d 596].) Upon initial consideration of the petition for the writ of habeas corpus we issued not the writ but an order to show cause why the relief prayed for should not be granted. The sheriff made his return to such order and the parties have stipulated that the petition for the writ shall be treated as a traverse to the return of the respondent sheriff. We also treat the return of the sheriff to the order to show cause as a return to the writ which is to be granted. We have concluded that the writ should be granted, not to discharge the petitioner from custody of the sheriff but to discharge him from only the illegal circumstances of his restraint which have been depicted above and to order his production before the superior court so that he may be dealt with according to law as a person properly convicted of, but not yet properly sentenced for, the substantive crimes charged in the informations in Los Angeles Superior Court criminal cases Number 155767 and Number 155768 and the first, and only the first, prior conviction alleged in each of the above numbered informations.
For the reasons hereinabove stated, the petition for the writ of habeas corpus is granted and the petitioner is remanded to the custody of the sheriff of the county of Los Angeles to be brought before the superior court in that county to *249be dealt with according to law as a person validly and finally convicted of, but not since the modifications of the record as to prior convictions sentenced for, the substantive crimes charged in the informations in Los Angeles Superior Court criminal cases Number 155767 and Number 155768, and found to have been previously convicted of, and to have served a term in a state prison for, one, and only one, prior conviction of felony, to wit, arson, a felony (in Oregon), as alleged in the information in each of the above numbered cases.
Upon production of the petitioner in the superior court as above ordered that court shall proceed to arraign him for judgment upon the record as amended by the order of the District Court of Appeal in People v. Bartges (1954), 128 Cal.App.2d 496, 497-498 [275 P.2d 518], Upon such arraignment the superior court will have power to consider, and in its discretion to grant or deny, an application for probation, if petitioner so requests, and will have power, and the duty if it determines that judgments shall again be pronounced, to direct whether the sentences shall run cumulatively or concurrently.
Gibson, C. J., Shenk, J., and Carter, J., concurred.
Section 1506 provides that: “An appeal may be taken ... by the people from a final order of a superior court made upon the return of a writ of habeas corpus discharging a defendant after Ms conviction in all criminal eases ...”