
    [No. C004215.
    Third Dist.
    Feb. 6, 1989.]
    THE PEOPLE, Plaintiff and Respondent, v. RONALD HANEY, Defendant and Appellant.
    [Opinion certified for partial publication.]
    
      Counsel
    Michael M. Sims, under appointment by the Court of Appeal, for Defendant and Appellant.
    John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, Roger E. Venturi and Eddie T. Keller, Deputy Attorneys General, for Plaintiff and Respondent.
    
      
       Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of parts II through IV of the Discussion.
    
   Opinion

SIMS, J.

In this case involving a plea bargain, the prosecution promised not to charge defendant with enhancements based on his service of prior prison terms. In the published portion of this opinion we hold that the plea bargain did not contain an implied condition precluding the trial court from using defendant’s prior prison terms as an aggravating factor to impose the upper term of imprisonment in state prison.

Defendant pled guilty before a magistrate to one count of voluntary manslaughter and one count of robbery for crimes committed on or about September 1, 1987. (Pen. Code, §§ 192, subd. (a), 211; further statutory references are to the Penal Code.) The only express conditions of the plea were that the prosecution would not charge any prior prison terms as enhancements (see § 667.5, subd. (b)), and that concurrent sentences would be imposed on the two counts. The superior court sentenced defendant to the upper term of 11 years in state prison for manslaughter and to a concurrent upper term of 5 years for the robbery. The court also stayed execution of sentence on the robbery pursuant to section 654. Defendant timely appealed.

Discussion

I

Defendant contends the trial court erred in sentencing him to the upper term because the trial court relied on uncharged prior prison terms as the primary factor calling for an aggravated sentence. Defendant argues People v. Harvey (1979) 25 Cal.3d 754 [159 Cal.Rptr. 696, 602 P.2d 396] precludes the reliance. There, our Supreme Court held that the trial court erred in using a dismissed count in order to impose the upper term, because dismissal of the count had been agreed to in a plea bargain. {Id., at p. 758.) The court said, “Implicit in such a plea bargain, we think, is the understanding (in the absence of any contrary agreement) that defendant will suffer no adverse sentencing consequences by reason of the facts underlying, and solely pertaining to, the dismissed count.” {Ibid.)

Defendant also relies on In re Knight (1982) 130 Cal.App.3d 602 [181 Cal.Rptr. 853] which followed Harvey to hold that dismissed priors could not be used to aggravate a sentence in the absence of an express waiver. {Knight, supra, at p. 605.) As we shall explain, Harvey and Knight are distinguishable.

In People v. Alvarez (1982) 127 Cal.App.3d 629 [198 Cal.Rptr. 167], this court held that a plea bargain to strike a prior conviction did not preclude the use of the prior to aggravate a term. In Alvarez, we noted that, “The nature of a plea bargain, including an agreement between the parties, places the interpretation of the agreement generally within the purview of contract principles, . . .” {Id., at p. 633.) We concluded the term “strike” had a peculiar legal meaning which limited its use to the imposition of punishment for an enhancement so that Harvey did not control its use to aggravate a term. {Id., at p. 635.)

We think the plea bargain here is best analyzed by applying principles of contract law as we did in Alvarez. We start with the proposition that upon the entry of a plea of guilty, both the People and defendant have such rights and disabilities as are granted or imposed by the law, except as they are limited by the bargain. This proposition is in accord with the fundamental rule of contract law that ordinarily all applicable laws in existence when an agreement is made necessarily enter into the contract and form a part of it. (City of Torrance v. Workers’ Comp. Appeals Bd. (1982) 32 Cal.3d 371, 378 [185 Cal.Rptr. 645, 650 P.2d 1162].)

In the present context, the People’s “rights” included the right to ask for the punishment the law provides and defendant’s disabilities included the factors the law says may result in greater punishment. When the People agreed not to charge any prior prison terms, they gave up their “right” to seek additional punishment that would flow from enhancements premised on the prior terms. (See § 667.5.) The People kept their bargain.

The People also had an additional legal “right” (and defendant was subject to a legal disability) premised on rule 421(b)(3) of the California Rules of Court. That rule allows the trial court to consider as an aggravating factor that, “The defendant has served prior prison terms whether or not charged or chargeable as an enhancement under section 667.5.” (Italics added; further references to rules are to the California Rules of Court.) Absent a limiting agreement, the People had the “right” to seek aggravation of punishment based on this rule (see § 1170, subd. (b)) and defendant was subject to the disability of having his punishment aggravated. The express terms of the instant plea bargain, whereby the People agreed not to charge prior prison terms, did not limit the application of this rule because by its terms the rule operates even where a prior prison term is not charged.

This leaves the question whether the parties’ agreement contained an implied term precluding application of rule 421(b)(3).

The authority of courts to locate implied terms in contracts was discussed in Addiego v. Hill (1965) 238 Cal.App.2d 842 [48 Cal.Rptr. 240], at pages 846-847: “Section 1656 of the Civil Code provides: ‘All things that in law or usage are considered as incidental to a contract, or as necessary to carry it into effect, are implied therefrom, unless some of them are expressly mentioned therein, when all other things of the same class are deemed to be excluded.’ The modern trend of the law is to favor the enforcement of contracts and, if feasible, to carry out the intentions of the parties. Neither law nor equity requires that every term and condition be set forth in a contract. The usual and reasonable terms found in similar contracts may be considered, unexpressed provisions of the contract may be inferred from the writing, external facts may be relied upon, and custom and usage may be resorted to in an effort to supply a deficiency if it does not alter or vary the terms of the agreement [citation]. The court should accord an interpretation which is reasonable (Civ. Code, § 1643) and which gives effect to the intent of the parties as it may be interpreted from their entire agreement rather than one which renders the contract void (Civ. Code, §§ 1650, 1652, 1655, 1656).

“[However,] the courts cannot make better agreements for parties than they themselves have been satisfied to enter into or rewrite contracts because they operate harshly or inequitably. It is not enough to say that without the proposed implied covenant, the contract would be improvident or unwise or would operate unjustly. Parties have the right to make such agreements. The law refuses to read into contracts anything by way of implication except upon grounds of obvious necessity. ‘[I]mplied covenants are not favored in the law; and courts will declare the same to exist only when there is a satisfactory basis in the express contract of the parties which makes it necessary to imply certain duties and obligations in order to effect the purposes of the parties to the contract made’ [citation],

“The rules controlling the exercise of judicial authority to insert implied covenants require several concurrent conditions: (1) the implication must arise from the language used or it must be indispensable to effectuate the intention of the parties; (2) it must appear from the language used that it was so clearly within the contemplation of the parties that they deemed it unnecessary to express it; (3) implied covenants can only be justified on grounds of legal necessity; (4) a promise can be implied only where it may be rightfully assumed that it would have been made if attention had been called to it; and (5) there can be no implied covenant where the subject is completely covered by the contract [citation].”

Nothing before us suggests that the instant plea bargain impliedly contains a term precluding use of defendant’s prior prison terms for aggravation. Such a term is unnecessary to give the agreement reasonable meaning, since, as we have noted, the defendant already received a significant benefit from the lack of pleaded enhancements. Nor can we think of any public policy requiring such a construction of the agreement. Nor are we aware of any “custom” or “usage” that would require us to find the implied term urged by defendant. People v. Harvey, supra, 25 Cal.3d 754 and In re Knight, supra, 130 Cal.App.3d 602, which presumably relied on the custom and usage surrounding the use of dismissed charges, are therefore distinguishable.

Under the circumstances, we have no basis upon which to conclude that the plea bargain expressly or impliedly precluded the use of defendant’s prior prison terms for purposes of aggravation. If defendant wished to avoid the legal disabilities of rule 421(b)(3), it was incumbent on him to negotiate an express bargain to that effect.

Defendant also cites People v. Myers, supra, 157 Cal.App.3d 1162. In Myers, the defendant’s prior uncharged convictions were used by the trial court to deny probation under section 1203, subdivision (e)(4) which precludes probation except in unusual cases. The People conceded that defendant’s prior convictions could not be considered to deny probation unless the priors had been pleaded and proved. (Myers, supra, at p. 1167.) However, the People asserted the trial court could properly use the priors because defendant had given a “Harvey waiver” allowing use of the priors at sentencing. {Ibid.) The Court of Appeal rejected the contention, concluding “an informed Harvey waiver’ cannot be treated as tantamount to a guilty plea to the dismissed or uncharged crimes, nor may it be employed by design, or carelessly, to set aside the pleading and proving requirements necessary to make a defendant statutorily ineligible to receive probation or to impose an enhancement term.” {Id., at p. 1168.)

The need for a “Harvey waiver” was not discussed in Myers because defendant had in fact given such a waiver and its propriety (as distinguished from its legal effect) was uncontested. Moreover, the analysis in Myers is built upon the People’s concession that the prior convictions had to be pleaded and proved in order to disqualify a defendant from probation. (7) Even assuming for purposes of argument the People’s concession was correct, there is no correlative need here for the procedures mandated by Myers, because prior prison terms need not be pleaded and proved to serve as factors aggravating a prison term. (Cf. People v. Baumann (1985) 176 Cal.App.3d 67, 74-76 [222 Cal.Rptr. 32].) Myers is therefore inapposite.

The trial court did not err in using defendant’s prior prison terms to impose the upper term.

II-IV

Disposition

The judgment is affirmed.

Puglia, P. J., and Sparks, J., concurred.

Appellant’s petition for review by the Supreme Court was denied June 1, 1989. 
      
      In an unpublished portion we consider and reject defendant’s contentions that (1) he did not have a fair opportunity to challenge the veracity of the prior prison terms; (2) no substantial evidence shows he served the prison terms; and (3) rule 439(b) of the California Rules of Court is unconstitutional.
     
      
       “Although the terms of a plea bargain agreement may be ascertained with reference to principles of contract law [citing Alvarez], plea bargains are specifically enforced by the courts on due process grounds (see People v. Mancheno (1982) 32 Cal.3d 855, 860-861 [187 Cal.Rptr. 441, 654 P.2d 211]).” (Leo v. Superior Court (1986) 179 Cal.App.3d 274, 283 [225 Cal.Rptr. 15); see People v. Williams (1988) 45 Cal.3d 1268, 1308 [248 Cal.Rptr. 834, 756 P.2d 221].) Since our task here is to define the terms of the agreement, we focus on principles of contract law.
     
      
       In the context of civil law the parties are generally presumed to know these laws. (City of Torrance, supra, 32 Cal.3d at p. 378.) In the criminal law, a defendant must be advised of certain legal consequences of a plea of guilty. (See, e.g., Boykin v. Alabama (1969) 395 U.S. 238 [23 L.Ed.2d 274, 89 S.Ct. 1709]; In re Yurko (1974) 10 Cal.3d 857 [112 Cal.Rptr. 513, 519 P.2d 561]; In re Tahl (1969) 1 Cal.3d 122 [81 Cal.Rptr. 577, 460 P.2d 449].) However, to our knowledge, no authority requires a trial court to advise a defendant who pleads guilty that uncharged prior prison terms can be used to aggravate his prison sentence. (Compare People v. Myers (1984) 157 Cal.App.3d 1162 [204 Cal.Rptr. 91] [advice required where uncharged prior convictions are used to deny probation under § 1203, subd. (e)(4)], discussed post at p. 1040.)
     
      
      Defendant also contends he was prejudiced by the trial court’s assertedly unlawful use of his prior prison terms to aggravate his sentence because codefendants received lesser sentences. This argument is premised on the illegality of the use of the prior prison terms to aggravate his sentence. Since we perceive no illegality, we perceive no prejudice.
     
      
       See footnote, ante, page 1034.
     