
51 Cal.2d 263 (1958)
JAMES W. TUPPER, Petitioner,
v.
SUPERIOR COURT OF MARIN COUNTY, Respondent.
S. F. No. 19978. 
Supreme Court of California. In Bank.  
Nov. 21, 1958.
 Carl B. Shapiro for Petitioner.
 Edmund G. Brown, Attorney General, Clarence A. Linn, Assistant Attorney General, and Raymond M. Momboisse, Deputy Attorney General, for Respondent.
 McCOMB, J.
 This is a petition for a writ of prohibition to restrain the superior court from proceeding to trial on an information charging petitioner, hereinafter called "defendant," with being an accessory to a felony (Pen. Code,  32).
 At the preliminary examination, the following evidence was adduced: Michael Powers, age 16, stole three hub caps from a parked car. He sold them to Edward Roche, age 17, after telling him that they were stolen. Defendant was a clerk in an automobile supply store. Roche told him of the origin of the hub caps and asked him to make out a bill of sale purporting to cover them. Defendant gave Roche a receipt indicating that the latter had purchased the hub caps from the store. He placed the notation "for estimate only" on the store's copy.
 Cross-examination of the two juvenile witnesses revealed that they had given to a deputy sheriff written statements concerning their respective roles in the theft and in obtaining the receipt. At the preliminary examination, defendant moved that he be shown these statements, but his motion was denied, and he was held to answer. Thereafter, another information was filed charging defendant with contributing to the delinquency of a minor (Welf. & Inst. Code,  702). Before the superior court, defendant moved to set aside the information, but this motion, likewise, was denied.
 The sole question necessary for this court's determination is: Where a commitment is not based entirely on incompetent evidence, will a writ of prohibition lie to review the ruling of the committing magistrate upon the admission or exclusion of evidence at the preliminary examination?
 No. The following rules are pertinent:
 [1] 1. Prohibition does not lie to review rulings of the magistrate on the admissibility of evidence at the preliminary hearing unless the commitment is based entirely on incompetent evidence. (Mitchell v. Superior Court, 50 Cal.2d 827, *265 829 [3] [330 P.2d 48]; cf. Rogers v. Superior Court, 46 Cal.2d 3, 7 [2] et seq. [291 P.2d 929].)
 [2a] 2. It will not be presumed that the superior court will erroneously deny defendant the opportunity to see the witnesses' statements at the time of trial (Mitchell v. Superior Court, supra, at p. 830 [4]), or on proper motion before trial (Powell v. Superior Court, 48 Cal.2d 704, 707-709 [312 P.2d 698]).
 [3] Applying the foregoing rules to the facts in the present case, it is evident that the committing magistrate had jurisdiction over both the crime and the person of defendant. It is likewise apparent that there was substantial evidence to support the committing magistrate's finding that there was probable cause to believe defendant was guilty of the offense with which he was charged. Therefore, under rule 1, supra, since the commitment was not based entirely on incompetent evidence, the writ of prohibition does not lie to review the ruling of the magistrate on a procedural matter.
 [2b] The value to defendant of seeing the statements made by the witnesses is that to do so might enable him to impeach their testimony at the trial. However, under rule 2, supra, it will be presumed that the superior court will not erroneously deny defendant the opportunity to see the statements at the time of trial and that they will therefore be available to him for impeachment purposes at that time. Consequently, defendant has failed to show any reason for the issuance of a writ of prohibition.
 The alternative writ is discharged, and the peremptory writ is denied.
 Gibson, C.J., Shenk, J., Traynor, J., and Spence, J., concurred.
 Schauer, J., concurred in the judgment.
 CARTER, J.,
 Concurring and Dissenting.
 I agree with the majority that petitioner's commitment is not based on incompetent evidence and under the rule announced in Rogers v. Superior Court, 46 Cal.2d 3, 7 [291 P.2d 929], prohibition is not an available remedy. (See Mitchell v. Superior Court, 50 Cal.2d 827, 829 [330 P.2d 48].) However, I cannot assent to the implication contained in the majority opinion that petitioner is not now entitled to any relief. An examination of the uncontroverted facts convinces me that petitioner *266 is immediately entitled to the production of the written statements of the two witnesses now in the hands of public officials. Such relief may be granted by treating the present application as a petition for writ of mandate.
 Although petitioner has asked only for prohibition to stay further proceedings, where the facts developed upon a hearing show that petitioner is entitled to some other relief, but under a different form of writ, this court has authority to grant any appropriate relief within the issues presented by the pleadings. (Board of Trustees v. State Bd. of Equalization, 1 Cal.2d 784, 787 [37 P.2d 84, 96 A.L.R. 775]; Caminetti v. Superior Court, 16 Cal.2d 838, 848 [108 P.2d 911]; Verdier v. Superior Court, 88 Cal.App.2d 527, 531 [199 P.2d 325]; Simmons v. Superior Court, 96 Cal.App.2d 119, 133 [214 P.2d 844, 19 A.L.R.2d 288].) This authority clearly extends to issuing mandamus where warranted. (Powell v. Superior Court, 48 Cal.2d 704, 708 [312 P.2d 698].)
 A writ of mandate will issue where it is shown that the court has violated a clear and present beneficial right of the petitioner. (May v. Board of Directors, 34 Cal.2d 125, 138 [208 P.2d 661]; Williams v. Stockton, 195 Cal. 743 [235 P. 986]; McClatchy Newspapers v. Superior Court, 26 Cal.2d 386, 394 [159 P.2d 944]; Brown v. Superior Court, 34 Cal.2d 559, 561 [212 P.2d 878].) The existence of another equally adequate legal remedy does not require us to dismiss the present proceedings. Where, as here, the District Court of Appeal has issued alternative writs, determined the matter on the merits and granted a peremptory writ of prohibition, the principle of economy, both as to time and expense, justifies our accepting the District Court's decision that there was no other adequate remedy at law. (See Bowles v. Superior Court, 44 Cal.2d 574, 582 [283 P.2d 704]; Atkinson v. Superior Court, 49 Cal.2d 338, 342 [316 P.2d 960].) For this reason it is unnecessary to consider the effect of petitioner's failure to apply for relief in the superior court.
 At the trial stage in a criminal prosecution a defendant has a right to compel the production of documents in the prosecutor's possession. (People v. Riser, 47 Cal.2d 566, 587 [305 P.2d 1].) To establish this right there must be a request for specific documents, it must be shown that the demand is not for the purpose of a "fishing expedition" on the chance something impeaching might turn up, and there must be good reason to believe that the document when produced would be admissible in evidence for some purpose. (People v. Riser, *267 supra, 47 Cal.2d at 587.) However, it is not a prerequisite to establishing this right to show a conflict between the witnesses to be impeached and the written statements, because it would be impossible to determine whether there was good reason to believe the document was admissible without having seen it. The chance that it might eventually turn out to be inadmissible should not block production at the threshold. (People v. Riser, supra, 47 Cal.2d at 587.) In other words defendant's right to compel production of the document cannot be defeated by arguing that it would be inadmissible, since the question of admissibility is reserved until the document is inspected.
 Justification for affording defendant such a right is explained by the true purpose of a criminal trial, the ascertainment of facts. The state's interest and goal in 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 state alike. (People v. Riser, supra, 47 Cal.2d at 585; Powell v. Superior Court, supra, 48 Cal.2d at 707; see Jencks v. United States, 353 U.S. 657, 667- 668 [77 S.Ct. 1007, 1 L.Ed.2d 1103].)
 Where, however, pretrial production of documents is sought, the cases hold, although it is not entirely clear, that pretrial inspection and production is a question addressed to the sound discretion of the trial court. (Powell v. Superior Court, supra, 48 Cal.2d 704; see Walker v. Superior Court, 155 Cal.App.2d 134 [317 P.2d 130]; Cordry v. Superior Court, 161 Cal.App.2d 267 [326 P.2d 222]; Castiel v. Superior Court 162 Cal.App.2d 710, 711 [328 P.2d 476]. This diversity of treatment in compelling the production of documents between the trial and pretrial stages is erroneous. An examination of the reasons for treating a request for documents at the trial stage as a right and the same request at the pretrial stage as a matter of discretion, reveals that the problem in each instance is identical as is the rationale. Since there appears to be no reason for this difference, we may conclude that a defendant is entitled as a matter of right to compel the production of documents at the pretrial stages. To establish this right the defendant will be governed by the same principles as at the trial stages.
 A review of the cases ordering pretrial disclosure substantiates this conclusion. *268
 In Powell v. Superior Court, supra, this court stated that a motion for pretrial inspection of certain written statements made by the petitioner was addressed to the sound discretion of the court. In concluding there was an abuse of discretion the court reasoned that to deny the accused inspection of his statements, where he has forgotten what he said, coupled with allegations that the statements may be necessary to refresh his recollection would be to lose sight of the objective of ascertainment of the facts upon a public trial fair to defendant and state alike.
 The District Court of Appeal in Walker v. Superior Court, supra, issued a writ of mandate to compel pretrial inspection of a state crime laboratory report concerning the accused's shoes. It was conceded that the report itself was not evidence, but where petitioner alleged that the prosecution will contend the deceased's death resulted from being kicked by petitioner and that the only source of information from which the defense could discover what evidence the shoes provided is the report, the trial court, in the interest of justice should order that a copy be provided for the accused.
 On facts similar to the Powell case, mandamus was issued in Cordry v. Superior Court, supra, where defendant alleged that he could not recollect the content of his statements. In Castiel v. Superior Court, supra, mandamus was issued to vindicate petitioner's previously established judicial right to the name of the informer, which was information essential to the preparation of an adequate defense.
 In every case in which pretrial production was sought the request was made in order to better prepare a defense. This is the reason for the request at the trial level. Where the pretrial request is granted, it is on the theory that the purpose of a criminal prosecution is the ascertainment of the facts in the process of conducting an equally fair trial. As has already been noted this is the same rationale for compelling production at the trial stage. Where the same relief is sought for the same reasons there is no reason for diverse treatment.
 It has sometimes been hinted that the pretrial production of written statements should be in the discretion of the trial court because it might hamper law enforcement (Powell v. Superior Court, supra, 48 Cal.2d at 708) and it would create an imbalance between the advantages of prosecution and defense as well as enable the defendant to secure perjured *269 testimony and fabricated evidence to meet the state's case (People v. Riser, supra, 47 Cal.2d at 585).
 The argument that law enforcement might be hampered has no place here since there is no claim that such would be the effect. Moreover, no claim is made that these statements are confidential or privileged.
 California and federal cases reject the proposition that pretrial disclosure would create an imbalance by providing the defense with too great an advantage. This is done on the premise that the state's interest and goal in criminal prosecutions is not convictions but the establishment of truth in a trial fair to defendant and state alike. (Powell v. Superior Court, supra, 48 Cal.2d at 707; Jencks v. United States, supra, 353 U.S. at 667-668; see People v. Riser, supra, 47 Cal.2d at 585.)
 The concern expressed about possible fabrication of evidence and perjured testimony if pretrial production is permitted is unnecessary and unwarranted. If a defendant is indicted, he must be provided with a transcript of the evidence taken by the grand jury. (Pen. Code,  925.) If he is charged by information, he has a preliminary hearing at which prosecution witnesses testify. In either circumstance the accused has at his disposal sufficient information from which he can predicate an informed guess as to the prosecution's theory of guilt. If such comprehensive information is available to an accused prior to trial he has all he needs on which to base fabricated evidence or perjured testimony if he desires. To compel disclosure of other information, which would be admissible, can scarcely be said to constitute any appreciable increase in this danger.
 Petitioner herein was denied pretrial production of the written statements of two key prosecution witnesses. He has established his right to compel production by requesting specific statements, by showing he was not intent on a "fishing expedition" and by alleging with particularity that the statements are for impeachment purposes and hence production is necessary to determine admissibility.
 The need for the written statements to insure the ascertainment of the facts in a trial fair to defendant and state alike is obvious. In preparing any defense considerable attention is given to cross-examination. Since cross-examination has been described as the foremost legal engine ever invented for discovering the truth (5 Wigmore, Evidence,  1367), the *270 time consumed thereby is well spent and the state's interest in ascertaining truth is also vindicated. One aspect of cross-examination is to produce or extract facts which diminish the personal trustworthiness of the witness. (5 Wigmore, Evidence,  1368.) Included as a method of diminishing trustworthiness is impeachment, and therefore, it too is a necessary part of preparing a defense. Thus, as a matter pertaining to the defense, petitioner is entitled to compel production of the documents for his use in cross-examining the witnesses on the substance of their previous statements.
 For the foregoing reasons this court should issue a writ of mandate ordering the production of the written statements for defendant's inspection.
