
137 Cal.App.3d 419 (1982)
187 Cal. Rptr. 107
THE PEOPLE, Plaintiff and Respondent,
v.
RAYMOND LEE WILLIAMSON, Defendant and Appellant.
Docket No. 11883.
Court of Appeals of California, Third District.
November 17, 1982.
*420 COUNSEL
Lynn Hubbard III for Defendant and Appellant.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Willard F. Jones and Edmund D. McMurray, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
BLEASE, Acting P.J.
Defendant pled guilty to cultivation of marijuana (Health & Saf. Code, § 11358) following a denial of his request for diversion. The denial was based upon the district attorney's determination that the amount cultivated was not for "personal use," a condition of eligibility for diversion (Pen. Code, § 1000). Defendant appeals upon a certificate of probable cause (People v. Padfield (1982) 136 Cal. App.3d 218 [185 Cal. Rptr. 903]) claiming the district attorney has ventured into forbidden judicial territory. We agree and reverse the judgment.

Facts
Defendant was apprehended in a pickup truck containing 110 marijuana plants 1 foot to 3 feet tall growing in containers. At the preliminary examination he admitted cultivating the marijuana but contended it was for personal use. He sought to rebut the inference of commercial intent with the explanation that anticipated crop losses would leave him with a yield of only five pounds of useable marijuana for his efforts. The district attorney declined to initiate diversion proceedings on the ground the amount of marijuana exceeded the amount for personal use. He contended Penal Code section 1000 endows the prosecutor with the authority to determine if the cultivation of marijuana offense charged in an accusatory pleading is for personal use.


*421 Discussion

Penal Code section 1000 provides eligibility criteria for diversion of drug offenders from prosecution for purposes of education and treatment. Section 1000 sets forth two general criteria of eligibility for judicial consideration of diversion. First, the offense, as charged, must come within an enumerated list of controlled substance offenses. Second, the district attorney must determine the defendant meets the conditions set forth in subdivisions (a)(1)-(a)(6).[1] If these criteria are met and the defendant waives a speedy trial (Pen. Code, § 1000.1) the court must determine, following a hearing, whether to divert the defendant (Pen. Code, § 1000.2).
This statutory scheme was reviewed in Sledge v. Superior Court (1974) 11 Cal.3d 70 [113 Cal. Rptr. 28, 520 P.2d 412]. (See also the companion case of People v. Superior Court (On Tai Ho) (1974) 11 Cal.3d 59 [113 Cal. Rptr. 21, 520 P.2d 405].[2]) In Sledge defendant challenged section 1000, particularly subdivision (a)(3), as improperly vesting judicial authority in the district attorney. The subdivision empowers the district attorney to determine that "[t]here is no evidence of a violation relating to narcotics or restricted dangerous drugs other than a violation of the sections listed in this subdivision." The court held that exercise of this authority does not constitute a judicial act because "the district attorney need not decide what facts are material and relevant to eligibility.... Credibility is not an issue when the information is obtained from official records and reports, and the statute leaves no room for weighing the effect *422 of the facts...."[3] (Id., at pp. 74, 76.) However, as On Tai Ho said: "the court may take evidence, hear argument, and find the operative facts. These are judicial acts." (Id., at p. 66.) Subdivision (a)(3) authorizes the district attorney to perform a limited function, namely to determine whether there is "evidence" permitting the inference that the defendant has committed a narcotic offense other than one listed in section 1000. This function does not involve the resolution of conflicting inferences or the determination of credibility, the hallmarks of factfinding.
In 1975 the class of offenses subject to diversion was expanded to include cultivation of marijuana, provided "the marijuana planted, cultivated, harvested, dried, or processed is for personal use." (Stats. 1975, ch. 1267, § 1, p. 3328; italics added.) An anomaly was thereby introduced into the criteria of diversion. The cultivation statute (Health & Saf. Code, § 11358) does not make the intended use of the cultivated marijuana an element of the offense; hence the qualifying condition must be determined independent of the pleadings. The grammar of the condition ("is for personal use") implies that what is to be determined is an operative fact. We so conclude. But the determination of an operative fact is a judicial function. (On Tai Ho, supra, 11 Cal.3d at p. 66; Sledge, supra, 11 Cal.3d at p. 74.) Accordingly, we look to the statute to find a place for the exercise of this function. (1) We conclude that the determination of the intended use of the cultivated marijuana is consigned to the trial court as a part of the diversion hearing conducted pursuant to Penal Code section 1000.2.[4]
The People impliedly argue that the district attorney by virtue of subdivision (a)(3) may draw the inference that defendant possessed the marijuana plants for the purpose of sale in violation of Health and Safety Code section 11359 (see Weber v. Superior Court (1973) 30 Cal. App.3d 810, 817 [106 Cal. Rptr. 593]), an offense which does not qualify for diversion. We disagree. Assuming that possession of immature marijuana plants may constitute possession of marijuana for sale (cf. People v. Leal (1966) 64 Cal.2d 504 [50 Cal. Rptr. 777, 413 P.2d 665]) this argument must fail. It assigns the district attorney authority to *423 select a singular inference of intended use. But determining the operative fact of "personal use" predicates the resolution of conflicting inferences of intended use, a judicial function. The claimed authority to determine a commercial use under subdivision (a)(3) of section 1000 thus conflicts with the judicial authority to resolve conflicting inferences of intended use under section 1000.2 since it precedes and therefore preempts, the judicial function. The judicial function must be preserved and, a fortiori, prevail.
This conclusion is supported by On Tai Ho, supra, 11 Cal.3d 59. The prosecutor there sought to veto diversion on the ground the amount of marijuana in the defendant's possession gave rise to an inference of possession for sale. The court held he had no power to preclude diversion. The People's logic would invite the prosecutor in the front door in this case when the Supreme Court has ushered him out the back door in On Tai Ho, a result which is destructive of the remedial ends sought by the diversion statute. Sledge validates the authority granted to the district attorney only on the ground that he does not resolve conflicting facts and inferences. (Sledge, supra, 11 Cal.3d at p. 74.) Under the construction urged by the People, if an inference could be drawn from the number of marijuana plants that they are cultivated for sale, diversion must be denied notwithstanding that the available inferences can be resolved against such a conclusion. Under this rigid scheme persons whom the Legislature intended should receive the benefits of diversion, i.e., those who in fact cultivated marijuana for personal use, would be denied diversion.
Here, issues of credibility and the resolution of conflicting inferences of intended use, which predicate a judicial act, are at the heart of the defendant's claim of personal use. The trial court, by action of the district attorney, was deprived of the opportunity to exercise its authority to determine the defendant's intended use of the cultivated marijuana. Since the plea of guilty followed upon the erroneous denial of diversion, it must be set aside. (See Padfield, supra, 136 Cal. App.3d 218.)
The judgment is reversed and the case remanded to the trial court for further proceedings consistent with this opinion.
Carr, J., and Sparks, J., concurred.
A petition for a rehearing was denied December 10, 1982.
NOTES
[1]  The statute provides: "(a) This chapter shall apply whenever a case is before any court upon an accusatory pleading for violation of Section 11350, 11357, 11364, 11365, 11377, or 11550 of the Health and Safety Code, or Section 11358 of the Health and Safety Code if the marijuana planted, cultivated, harvested, dried, or processed is for personal use, or Section 381 or subdivision (f) of Section 647 of the Penal Code, if for being under the influence of a controlled substance, or Section 4230 of the Business and Professions Code, and it appears to the district attorney that, except as provided in subdivision (b) of Section 11357 of the Health and Safety Code, all of the following apply to the defendant:

"(1) The defendant has no conviction for any offense involving controlled substances prior to the alleged commission of the charged divertible offense.
"(2) The offense charged did not involve a crime of violence or threatened violence.
"(3) There is no evidence of a violation relating to narcotics or restricted dangerous drugs other than a violation of the sections listed in this subdivision.
"(4) The defendant's record does not indicate that probation or parole has ever been revoked without thereafter being completed.
"(5) The defendant's record does not indicate that he has been diverted pursuant to this chapter within five years prior to the alleged commission of the charged divertible offense.
"(6) The defendant has no prior felony conviction within five years prior to the alleged commission of the charged divertible offense.
"(b) The district attorney shall review his file to determine whether or not paragraphs (1) to (6), inclusive, of subdivision (a) are applicable to the defendant. If the defendant is found ineligible, the district attorney shall file with the court a declaration in writing or state for the record the grounds upon which the determination is based, and shall make this information available to the defendant and his attorney." (Pen. Code, § 1000.) (Italics added.)
[2]  In On Tai Ho, the provision in the diversion statute which granted the district attorney authority to veto a judicial decision to divert was held unconstitutional.
[3]  In order to provide meaningful appellate review the Sledge court directed that "at the time the district attorney determines the defendant is ineligible for diversion he should serve on the defendant and file with the court a declaration stating the ground upon which that determination is based and the evidence in support thereof." (11 Cal.3d at p. 76, fn. 6.) The evidence in support of the prosecutor's determination of ineligibility in this case was adduced from the preliminary examination.
[4]  Any contrary conclusion in People v. Superior Court (Hayle) (1977) 74 Cal. App.3d 604 [141 Cal. Rptr. 496] is disapproved. In Hayle we considered the question in a writ proceeding seeking prohibition to prevent the trial court from hearing the diversion question. We focused upon Sledge's direction not to permit interlocutory review of failure to institute diversion proceedings. (Hayle, supra, 74 Cal. App.3d at pp. 605-606.) On full posttrial consideration, we are constrained to reject our cursory determination in Hayle that the trial court is without jurisdiction to determine whether cultivation of marijuana is for personal use.
