
788 P.2d 1038 (1990)
Leo B. DURAN, Petitioner and Appellant,
v.
Gerald COOK, Warden, Utah State Prison, Respondent.
No. 890203-CA.
Court of Appeals of Utah.
February 23, 1990.
Leo B. Duran, Draper, pro se.
R. Paul Van Dam and Dan R. Larsen, Salt Lake City, for respondent.
Before BENCH, GARFF and LARSON, JJ.[1]
BENCH, Judge:
This appeal is from a dismissal by the district court of a petition for writ of habeas corpus. We affirm.
On June 8, 1987, appellant Leo B. Duran appeared with court-appointed counsel in Third District Court and pleaded guilty to charges of burglary, a second degree felony, and theft, a third degree felony. He was subsequently sentenced on both convictions; no appeal was taken.
Shortly thereafter, appellant filed a petition for writ of habeas corpus with the district court, seeking to have his theft conviction dismissed. Appellant alleged that he had entered his pleas upon the erroneous advice of counsel. As the basis for his ineffective assistance of counsel claim, appellant contended that the convictions arose from a single criminal episode, and that his counsel failed to advise him that because theft is a lesser included offense of burglary, he could not constitutionally be convicted of both crimes.
After a hearing on his petition, during which appellant appeared with court-appointed counsel, the court granted the State's motion to dismiss, without explaining the basis for its ruling. Appellant appealed *1039 the summary dismissal of his petition to this court. In a memorandum decision, we noted that the challenge to a guilty plea made by petition for habeas corpus may be dismissed without a hearing if upon the face of the petition the issue has already been adjudicated. See Lancaster v. Cook, 753 P.2d 505 (Utah 1987); Summers v. Cook, 759 P.2d 341 (Utah Ct. App. 1988). Since the issue raised by appellant had not been previously adjudicated, we reversed the dismissal and remanded the case for consideration on the merits.
Another hearing on the petition was held in the district court on March 28, 1989, and appellant appeared without counsel. After both parties argued, the court dismissed the petition as a matter of law. The district court concluded that an inquiry into appellant's crimes was unnecessary, finding that theft is not a lesser included offense of burglary under any given set of facts. We now review the appeal from that dismissal.
We begin with the precept that no person may be placed in jeopardy for the same criminal offense more than once. U.S. Const. amend. V; Utah Const. art. I, § 12. The federal and state double jeopardy guarantees are viewed as having the same content, McNair v. Hayward, 666 P.2d 321, 323 (Utah 1983), affording defendants three separate protections: no second prosecution for the same offense after acquittal, no second prosecution for the same offense after conviction, and no multiple punishments for the same offense. North Carolina v. Pearce, 395 U.S. 711, 717, 89 S.Ct. 2072, 2076, 23 L.Ed.2d 656 (1969), overruled on other grounds, Alabama v. Smith, ___ U.S. ___, ___, 109 S.Ct. 2201, 2205, 104 L.Ed.2d 865 (1989); State v. Miller, 747 P.2d 440, 444 (Utah Ct.App. 1987). In this case, appellant contends that he is being punished twice for the same offense.
By entering into a plea agreement, a defendant may waive a double jeopardy claim. See United States v. Broce, ___ U.S. ___, 109 S.Ct. 757, 102 L.Ed.2d 927 (1989); Ricketts v. Adamson, 483 U.S. 1, 107 S.Ct. 2680, 97 L.Ed.2d 1 (1987); State v. Holland, 777 P.2d 1019, 1023 (Utah 1989). That is because
[a] plea of guilty and the ensuing conviction comprehend all of the factual and legal elements necessary to sustain a binding, final judgment of guilt and a lawful sentence. Accordingly, when the judgment of conviction upon a guilty plea has become final and the offender seeks to reopen the proceeding, the inquiry is ordinarily confined to whether the underlying plea was both counseled and voluntary. If the answer is in the affirmative then the conviction and the plea, as a general rule, foreclose the collateral attack.
Broce, 109 S.Ct. at 762. "A failure by counsel to provide advice may form the basis of a claim of ineffective assistance of counsel, but absent such a claim it cannot serve as the predicate for setting aside a valid plea." Id. at 765. However, a plea "cannot be truly voluntary unless the defendant possesses an understanding of the law in relation to the facts." Id. at 762 (quoting McCarthy v. United States, 394 U.S. 459, 466, 89 S.Ct. 1166, 1170, 22 L.Ed.2d 418 (1969)).
Appellant seeks to set aside his guilty plea for theft based on the failure of court-appointed counsel to inform him that double jeopardy concerns were involved. In view of the doctrine that a valid plea may be collaterally attacked under an ineffective assistance of counsel claim, see Tollett v. Henderson, 411 U.S. 258, 266-67, 93 S.Ct. 1602, 1607-08, 36 L.Ed.2d 235 (1973), we reach the merits of appellant's petition.
In prosecuting acts occurring in a single criminal episode, a defendant may be convicted of either the offense charged or an offense included in the offense charged, but not both offenses. Utah Code Ann. § 76-1-402(1) & (3) (1978). An offense is included in the offense charged when:
(a) It is established by proof of the same or less than all the facts required to establish the commission of the offense charged; or (b) It constitutes an attempt, solicitation, conspiracy, or form of preparation to commit the offense charged or an offense otherwise included therein; or *1040 (c) It is specifically designated by a statute as a lesser included offense.
Utah Code Ann. § 76-1-402(3) (1978).
Appellant argues that theft is a lesser included offense of burglary. It is clear that theft neither constitutes an "attempt, solicitation," etc., to commit burglary, nor is it specifically designated by statute as a lesser included offense of burglary. The question must then be resolved under subsection (3)(a) of section 76-1-402, to wit, whether theft is established "by proof of the same or less than all the facts" necessary to establish the commission of burglary.
The "principal test" in this analysis "involves a comparison of the statutory elements of each crime." State v. Hill, 674 P.2d 96, 97 (Utah 1983). "[W]here the two crimes are `such that the greater cannot be committed without necessarily having committed the lesser,' ... then as a matter of law they stand in the relationship of greater and lesser offenses, and the defendant cannot be convicted or punished for both." Id. (quoting State v. Baker, 671 P.2d 152, 156 (Utah 1983)); see also State v. Franklin, 735 P.2d 34, 35-36 (Utah 1987) (no double jeopardy where each offense requires proof of a fact that the other does not) (citing Blockburger v. United States, 284 U.S. 299, 52 S.Ct. 180, 76 L.Ed. 306 (1932)); People v. Hancock, 186 Colo. 30, 525 P.2d 435, 438 (1974) (en banc) (an offense is lesser included when it is impossible to commit the greater offense without also having satisfied every essential element of the lesser offense). This theoretical comparison is insufficient where two crimes have multiple variations, since a greater-lesser relationship may exist between some variations of the crimes and not others. E.g., Hill, 674 P.2d at 97 (theoretical comparison insufficient for theft and multiple variation crime of aggravated robbery); State v. Bradley, 752 P.2d 874, 877 (Utah 1985) (theoretical comparison insufficient for aggravated burglary and multiple variation crime of aggravated assault). Theft and burglary are not crimes with such variations. See Bradley, 752 P.2d at 877; Hill, 674 P.2d at 97.
Burglary is committed when a person "enters or remains unlawfully in a building or any portion of a building with intent to commit a felony or theft or commit an assault on any person." Utah Code Ann. § 76-6-202(1) (1978). It may be classified as either a third degree felony, or, if committed in a dwelling, a second degree felony. Utah Code Ann. § 76-6-202(2) (1978). Theft, on the other hand, is committed when a person "obtains or exercises unauthorized control over the property of another with a purpose to deprive him thereof." Utah Code Ann. § 76-6-404 (1978). Theft is a crime which may be given a classification ranging from a second degree felony to a class B misdemeanor, depending largely upon the value and nature of the property or services taken. Utah Code Ann. § 76-6-412 (Supp. 1989).
In this case, appellant indicates that a single criminal episode was involved, which the State does not dispute. Appellant pleaded guilty to burglary as a second degree felony and theft as a third degree felony. Since burglary was pleaded as the greater crime, theft is not a lesser included offense unless burglary cannot be committed without necessarily having committed theft. While it is true that there is some overlap in the two offenses (for example, the State concedes that each requires the intent of depriving another of property), burglary does not involve unauthorized control over that property. Therefore, burglary may be committed without having committed the theft. See State v. Arnold, 115 Ariz. 421, 565 P.2d 1282, 1283 (1977) (en banc); Matthews v. State, 113 Idaho 83, 741 P.2d 370, 372-73 (Ct.App. 1987); State v. Alford, 25 Wash. App. 661, 611 P.2d 1268, 1273 (1980), aff'd, 95 Wash.2d 629, 628 P.2d 467 (1981); see also State v. Jones, 13 Utah 2d 35, 368 P.2d 262, 263 (1962) (burglary and larceny under prior statutes not greater-lesser offenses).
A theoretical comparison of the two crimes is sufficient here  appellant's case may be decided as a matter of law without *1041 resort to the evidence.[2] Appellant was charged with both crimes. Since a conviction for burglary does not exclude a conviction for theft, appellant could constitutionally be convicted of both offenses. We therefore reject his claim of an involuntary plea resulting from ineffective assistance of counsel.
The order dismissing appellant's petition is affirmed.
GARFF and LARSON, JJ., concur.
NOTES
[1]  John Farr Larson, Senior Juvenile Court Judge, sitting by special appointment pursuant to Utah Code Ann. § 78-3-24(10) (Supp. 1989).
[2]  We distinguish the cases of State v. Baker, 671 P.2d 152 (Utah 1983) and State v. Pitts, 728 P.2d 113 (Utah 1986), which appellant relies on. Although those cases discussed the necessity of examining the evidence in greater-lesser offense determinations, it was in the context of giving jury instructions on uncharged lesser included offenses. In such cases, the supreme court held that the elements of the "greater and lesser offenses must be related and there must be some overlap of the evidence required to establish the commission of each offense." Pitts, 728 P.2d at 115.

In Pitts, burglary and theft were found to be greater-lesser offenses because the intent to commit theft is required for each. Id. at 116. No double jeopardy issues are raised under the instructional standard, however, because the jury may only convict a defendant of the greater or lesser crime.
