
132 Cal.App.3d 542 (1982)
183 Cal. Rptr. 206
In re MICHAEL D. CARMICHAEL on Habeas Corpus.
Docket No. 23191.
Court of Appeals of California, First District, Division Four.
June 3, 1982.
*543 COUNSEL
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, William D. Stein, Assistant Attorney General, Ronald E. Niver and John H. Sugiyama, Deputy Attorneys General, for Appellant.
Rowan K. Klein and Klein & Nelson for Respondent.
OPINION
POCHE, J.
The People appeal from an order of the Solano County Superior Court granting a writ of habeas corpus directing the Board of *544 Prison Terms to recompute Michael D. Carmichael's term of imprisonment for violating Penal Code section 4500.[1] We reverse.

Facts
In 1971, Michael D. Carmichael was convicted in the San Bernardino County Superior Court of escape from lawful custody (§ 4532, subd. (b)), burglary (§ 459), and first degree robbery (§ 211, former § 211a). He was sentenced to state prison.
On July 14, 1972, Carmichael was convicted in the San Luis Obispo County Superior Court of a violation of section 4500: assault by an inmate serving a life term.[2] Carmichael was sentenced to state prison for the term prescribed by law.
In 1981, Carmichael filed a petition for writ of habeas corpus in the Solano County Superior Court. He requested the court to order the Board of Prison Terms to recompute his term of imprisonment for the violation of section 4500 and to give him the benefit of the lesser punishment provided by section 4501[3] which proscribes in-prison assaults by nonlifers. His theory was twofold: (1) retroactive application of section 4501 was mandated by People v. Community Release Bd. (Phoenix) (1979) 96 Cal. App.3d 792 [158 Cal. Rptr. 238]; and (2) retroactive application of the lesser punishment was mandated by the equal protection clauses of the United States and California Constitutions.
*545 The trial court found in Carmichael's favor on the equal protection claim and issued a writ of habeas corpus directing the Board of Prison Terms to compute Carmichael's term of imprisonment "with application of the punishment for assault specified by Penal Code Section 4501, ..."[4] (Italics in original.)
This appeal follows.

Discussion
(1) We begin with basics. Simply stated, the concept of equal protection is "`that persons similarly situated with respect to the legitimate purpose of the law receive like treatment.' [Citation.]" (People ex rel. Younger v. County of El Dorado (1971) 5 Cal.3d 480, 502 [96 Cal. Rptr. 553, 487 P.2d 1193].) Mr. Carmichael received treatment not merely "like" but identical to that afforded those with whom he was and is similarly situated: prisoners who are convicted of having committed assault while serving a life term. At the time of Mr. Carmichael's aggravated assault, the penal law of this state took a very dim view of such intramural crime: punishment was a life term without possibility of parole for nine years. (Stats. 1965, ch. 1904, § 1, p. 4412.) It continues to hold the same view and to impose the same punishment. (Stats. 1977, ch. 316, § 21, pp. 1264-1265.)
The elements of the offense proscribed by section 4500 are the same today as they were when the offense was committed by Mr. Carmichael: (1) an aggravated assault; (2) by a state prisoner; (3) serving a life term; (4) with malice aforethought. (People v. Noah (1971) 5 Cal.3d 469, 477 [96 Cal. Rptr. 441, 487 P.2d 1009]; People v. Superior Court (Gaulden) (1977) 66 Cal. App.3d 773, 778 [136 Cal. Rptr. 229].) Identity is also found in the reasons for discouraging such conduct. Simply stated, section 4500 was enacted to promote prison security by discouraging assaults by prison inmates (People v. Noah, supra, at p. 475; People v. Superior Court (Gaulden), supra, at p. 778) and to deter the commission of such assaults by lifers who might otherwise believe they had nothing to lose. (People v. Wells (1949) 33 Cal.2d 330, 335 [202 P.2d 53], cert. den., 338 U.S. 836 [94 L.Ed. 510, 70 S.Ct. 43]; Graham v. Superior Court (1979) 98 Cal. App.3d 880, 890 [160 Cal. Rptr. 10].)
*546 The only part of the picture that has been modified is the punishment for robbery. When Mr. Carmichael was sentenced to prison in 1971, the punishment for robbery was  under the Indeterminate Sentence Law (ISL)  a term of five years to life. (Former § 213, subd. 1; Stats. 1967, ch. 149, § 1, p. 1216.) The maximum potentiality of that punishment  life  made him a "life prisoner" within the meaning of section 4500 even though the Adult Authority had the power to later fix a lesser term. (People v. Harmon (1960) 54 Cal.2d 9, 16-17 [4 Cal. Rptr. 161, 351 P.2d 329], disapproved on other grounds in In re Estrada (1965) 63 Cal.2d 740 [48 Cal. Rptr. 172, 408 P.2d 948]; People v. Jefferson (1956) 47 Cal.2d 438, 442-443 [303 P.2d 1024]; see also, Graham v. Superior Court, supra, 98 Cal. App.3d at p. 890.) With the advent of the UDSA, robbery became punishable by a state prison term of two, three, or four years. (§ 213; Stats. 1976, ch. 1139, § 138, p. 5100.)
Mr. Carmichael compares his situation to that of a person who commits a robbery after the effective date of the DSL and later commits an aggravated assault in prison. Such a person, not a "life prisoner" within the meaning of section 4500 at the time of the assault, is obviously not subject to prosecution under that section as Mr. Carmichael was. Instead, the DSL robber is subject to prosecution under section 4501 (in-prison assault by a nonlifer). Thus, Mr. Carmichael's argument is close to being a play on words  the wrong words. It is premised on an inaccurate characterization of his 1972 offense: Mr. Carmichael was not convicted of a crime of aggravated assault by an inmate serving a robbery term but of aggravated assault by an inmate serving a life term. Status as a lifer then defined and continues to define the assault offense under section 4500. That status of lifer at the time of the assault is what the Legislature was focusing on in attaching the severe penalties which flow from a section 4500 conviction. As we have noted, the Legislature was attempting to deter severely violent crime by those who might otherwise think themselves immune from punishment because they were already lifetime guests of the state penal system. For this reason it is the prisoner's status on the day of the offense that is crucial. Thus, a life prisoner may be validly convicted of violating section 4500 even though the conviction under which he became a life prisoner is later declared invalid. (People v. Superior Court (Gaulden), supra, 66 Cal. App.3d at p. 778; Wells v. People of State of California (9th Cir.1965) 352 F.2d 439, 442, cert. den., 384 U.S. 1009 [16 L.Ed.2d 1021, 86 S.Ct. 1968].)
*547 In its equal protection analysis, the trial court identified two classes: (1) inmates serving a robbery conviction with an ISL sentence; and (2) inmates serving a robbery conviction with a DSL sentence. This is where its analysis went astray. The correct class comparison is: (1) inmates serving a life term under the ISL who commit an assault in prison; and (2) inmates serving a life term under the DSL who commit an assault in prison. For each class the punishment for the prison assault is the same: a life term without possibility of parole for nine years. Identical punishment for identical crimes does not violate equal protection.[5]
The order granting the writ of habeas corpus is reversed.
Rattigan, Acting P.J., and Christian, J., concurred.
A petition for a rehearing was denied June 23, 1982, and respondent's petition for a hearing by the Supreme Court was denied July 28, 1982.
NOTES
[1]  Unless otherwise indicated, all further statutory references are to the Penal Code.
[2]  At that time, section 4500 provided in relevant part: "Every person undergoing a life sentence in a state prison of this state, who, with malice aforethought, commits an assault upon the person of another, other than another inmate, with a deadly weapon or instrument, or by any means of force likely to produce great bodily injury is punishable with death; however, in cases in which ... the person ... assaulted is another inmate, the punishment shall be death or imprisonment in the state prison for life without possibility of parole for nine years, at the discretion of the court or jury trying the same, ..." (Stats. 1965, ch. 1904, § 1, p. 4412.)
[3]  In 1972, section 4501 provided in relevant part: "Every person confined in a state prison of this state except one undergoing a life sentence who commits an assault upon the person of another with a deadly weapon or instrument, or by any means of force likely to produce great bodily injury, shall be guilty of a felony and shall be imprisoned in the state prison not less than three years." (Stats. 1965, ch. 330, § 1, p. 1438.)

Under the Uniform Determinate Sentencing Act (UDSA), the punishment for violating section 4501 became a consecutive term of two, three or four years. (Stats. 1976, ch. 1139, § 284, p. 5154.) Section 4501 was amended in 1978, to provide for a punishment of a consecutive state prison term of two, four or six years. (Stats. 1978, ch. 579, § 33, p. 1993.)
[4]  The trial court did not reach the Phoenix issue.
[5]  The trial court did not reach Carmichael's alternative theory that retroactive application of section 4501 was mandated by People v. Community Release Bd. (Phoenix), supra, 96 Cal. App.3d 792. Phoenix, which addressed retroactive application of a reduction in punishment, is simply inapplicable here because the punishment for violating section 4500 has not changed.
