
908 P.2d 856 (1995)
STATE of Utah, Plaintiff and Respondent,
v.
Corey Lynn BROOKS, Defendant and Petitioner.
No. 940146.
Supreme Court of Utah.
November 27, 1995.
*857 Jan Graham, Atty. Gen., J. Kevin Murphy, Asst. Atty. Gen., Salt Lake City, for plaintiff.
Joan C. Watt, Salt Lake City, for defendant.

ON CERTIORARI TO THE UTAH COURT OF APPEALS
ZIMMERMAN, Chief Justice:
After a jury trial, Corey Lynn Brooks was convicted of aggravated robbery, a first degree felony, in violation of section 76-6-302 of the Utah Code, and aggravated burglary, a first degree felony, in violation of section 76-6-203 of the Utah Code. Brooks appealed his convictions, and we poured the appeal to the court of appeals. There, Brooks asserted that the trial court erred in not removing *858 certain jurors for cause and that his trial counsel was constitutionally ineffective. Brooks also argued that because the convictions for robbery and burglary arose out of the same operative facts, one was the lesser included crime of the other and to convict and sentence him for both amounted to punishing him twice for the same crime. He asked that his "illegal sentence" be set aside.
The court of appeals affirmed the convictions on the merits, addressing Brooks' first two arguments but refusing to address his argument that he was being punished twice for the same crime. State v. Brooks, 868 P.2d 818 (Utah Ct.App.1994). We granted Brooks' petition for a writ of certiorari to address the court of appeals' refusal to consider the lesser-included-offense issue. 883 P.2d 1359 (Utah 1994). We affirm.
Responding to an advertisement offering a diamond ring for sale, Brooks went to the home of Stephanie and Martha Vert. Brooks said he wanted to purchase the ring and would come back the next morning. When Brooks arrived, Stephanie, who was home alone, let him in. Brooks came in, picked up the diamond ring, pointed a pistol at Stephanie, and forced her into the bathroom, where he ordered her to handcuff herself to the pipes under the sink. Brooks then rummaged through the house, took several thousand dollars worth of jewelry, including the diamond ring, and fled the scene. He was eventually apprehended when friends to whom he had boasted about the robbery turned him in.
Brooks' first trial resulted in a hung jury. After a second trial, a jury convicted him of aggravated robbery and aggravated burglary. The trial court sentenced Brooks on both convictions but ordered that the sentences be served concurrently and also ordered him to pay fines and restitution.[1]
Brooks appealed the convictions on the three grounds mentioned above, all of which were raised for the first time on appeal. The court of appeals addressed only Brooks' first two arguments, both of which it found meritless. Brooks, 868 P.2d at 823-26.
Brooks' third contention before the court of appeals was that "his convictions for robbery and burglary illegally punish[ed] him twice for the same crime." Id. at 821. He argued that burglary and robbery were in a lesser included relationship because on the facts, he could not have committed one without necessarily committing the other. Under our statutes and case law, one cannot be convicted of both a stated crime and a lesser crime that is necessarily included in the proof of the greater. Utah Code Ann. § 76-1-402(3); see, e.g., State v. Bradley, 752 P.2d 874, 877 (Utah 1985) (per curiam); State v. Hill, 674 P.2d 96, 97 (Utah 1983). Therefore, Brooks argued, his conviction and sentence for both burglary and robbery were illegal. Brooks, 868 P.2d at 826. He asserted that under Utah Rule of Criminal Procedure 22(e), which provides that "[t]he court may correct an illegal sentence, or a sentence imposed in an illegal manner, at any time," the court of appeals could correct his illegal sentence even though the issue was raised for the first time on appeal.
The court of appeals refused to address this issue because it concluded that rule 22(e) does not allow an appellate court to address an illegal sentence for the first time on appeal. Brooks, 868 P.2d at 826. The court relied on State v. Gallegos, 849 P.2d 586, 591-92 (Utah Ct.App.1993), for the proposition that despite rule 22(e)'s apparently open language, it grants continuing jurisdiction only to trial courts to correct an illegal sentence "at any time." Because it concluded that Brooks still had a remedy in the trial court, the court of appeals also declined to address the legality of Brooks' conviction and sentence under either a plain error analysis or an ineffective assistance of counsel analysis. Brooks, 868 P.2d at 826 n. 11. Brooks sought a writ of certiorari, and we granted the petition to consider the court of appeals' refusal to address the legality of Brooks' sentence.
We first state the applicable standard of review. The standard of review for a *859 simple legal interpretation of a rule or statute is correctness. "Legal determinations... are defined as those which are not of fact but are essentially of rules or principles uniformly applied to persons of similar qualities and status in similar circumstances." State v. Pena, 869 P.2d 932, 935 (Utah 1994). When reviewing legal determinations, an "appellate court decides the matter for itself and does not defer in any degree to the trial judge's determination of law." Id. at 936. The same standard applies when we review a court of appeals decision on such a question. See Landes v. Capital City Bank, 795 P.2d 1127, 1129 (Utah 1990) ("We accord no particular deference to conclusions of law, whether made by the trial court or the court of appeals, but review such conclusions for correctness.").
We conclude that the court of appeals erred in holding that it lacked the authority under rule 22(e) to address a claim of an illegal sentence for the first time on appeal. However, we also conclude that an appellate court may not review the legality of a sentence under rule 22(e) when the substance of the appeal is, as it is here, a challenge, not to the sentence itself, but to the underlying conviction. Accordingly, we conclude that the court of appeals did not err in refusing to decide whether Brooks was illegally sentenced.
In holding that it lacked the authority to address for the first time on appeal the claim of an illegal sentence, the court of appeals relied on its earlier decision in Gallegos, which, in turn, interpreted our decision in State v. Babbel, 813 P.2d 86 (Utah 1991) ("Babbel II"). Understanding why the court of appeals panel's reliance on Gallegos was misplaced in the instant case requires some explanation. Gallegos was convicted of four counts of distributing or arranging to distribute a controlled substance. Because of prior convictions for the same crime, his sentences were enhanced by reason of section 58-37-8(1)(b) of the Utah Code. Gallegos, 849 P.2d at 588, 591. Gallegos appealed the enhanced penalties. He stated that his prior convictions, upon which the enhancements were based, were still under appeal. On this factual ground, he argued that he should not have had his second set of sentences enhanced before the first set of appeals was concluded because if the first set of convictions were overturned, he would have no way to challenge the enhancements later on. The court of appeals rejected this argument, holding that Gallegos could petition the trial court for resentencing under rule 22(e) if the prior convictions were overturned. Id. at 591-92. To support its holding, the Gallegos court cited this court's decision in Babbel II for the proposition that rule 22(e) gives the trial court continuing jurisdiction to correct illegal sentences at any time. Id.
We conclude that in Gallegos, the court of appeals correctly applied Babbel II. We did state there that a trial court can always correct an illegal sentence. The confusion arose when the court of appeals panel in the instant case read Gallegos to have interpreted Babbel II as implicitly denying that an appellate court could also address an illegal sentence claim raised for the first time on appeal. See Brooks, 868 P.2d at 826. This was a misreading of Gallegos and of Babbel II.
The court of appeals' misinterpretation of Gallegos and Babbel II rested on our statement in Babbel II that "[rule 22(e)] specifically provides that because an illegal sentence is void, a trial court may correct an illegal sentence at any time." 813 P.2d at 88 (emphasis added); see Gallegos, 849 P.2d at 591-92 (citing Babbel II). However, Babbel II must be read in context. Babbel appealed his convictions for aggravated sexual assault and aggravated kidnaping. Although the state had not raised the issue before the trial court or in its brief before this court, at oral argument it asserted that the sentences imposed for Babbel's convictions were improper because the trial court had relied on sentencing guidelines that treated Babbel's convictions as routine felonies rather than on then newly established and more severe minimum mandatory sentencing guidelines applicable in kidnaping and sexual abuse cases. We addressed the issue raised for the first time on appeal, and although affirming Babbel's convictions, we vacated the sentences because they were plainly unlawful. State v. Babbell, 770 P.2d 987, 993-94 (Utah 1989) *860 ("Babbell I"). We remanded the case for resentencing.
Babbel appealed again after his resentencing, claiming that the more severe sentences imposed under the new guidelines violated statutory law and the double jeopardy clauses of the state and federal constitutions. Babbel II, 813 P.2d at 87-88. We upheld the new sentences, stating that double jeopardy does not prohibit the correction of an illegal sentence even if the new sentence is more severe than the previously imposed illegal sentence. Id. at 88-89. We also stated in the course of our discussion that trial courts have the power to correct an illegal sentence "at any time, whether before or after an appeal, and even if there is no appeal." Id. at 88. In so stating, however, we did not indicate that the fact that a trial court has this continuing jurisdiction in any way suggested that an appellate court lacked such power.
Contrary to the apparent assumption of the court of appeals in this case, Babbel II does not stand for the proposition that under rule 22(e), an appellate court is precluded from reviewing a claim that a sentence is illegal if the issue is raised for the first time on appeal. In fact, taken together, Babbel I and Babbel II, like the sweeping language of rule 22(e), suggest just the opposite. When a sentence is patently illegal, an appellate court can vacate the illegal sentence without first remanding the case to the trial court, even if the matter was never raised before. This makes theoretical sense because an illegal sentence is void and, like issues of jurisdiction, should be raisable at any time. This view of the matter is also supported by considerations of judicial economy. When the pertinent facts are undisputed and a purely legal question with respect to which the trial court has no discretion remains to be decided, nothing is to be gained by remanding the case to the trial court. See Pena, 869 P.2d at 936 ("[A]ppellate courts have ... the power and duty to say what the law is...."). Accordingly, we hold that rule 22(e) permits the court of appeals to consider the legality of a sentence even if the issue is raised for the first time on appeal.
Nonetheless, we conclude that the court of appeals did not err in refusing to consider Brooks' request to correct his sentence under rule 22(e) because rule 22(e) does not allow an appellate court to review the legality of a sentence when the substance of the appeal is not a challenge to the sentence itself, but to the underlying conviction. A request to correct an illegal sentence under rule 22(e) presupposes a valid conviction. See United States v. Morgan, 346 U.S. 502, 506, 74 S.Ct. 247, 250, 98 L.Ed. 248 (1954); (interpreting analogous federal rule); United States v. Pavlico, 961 F.2d 440, 443 (4th Cir.1992) (same); State v. Meier, 440 N.W.2d 700, 703 (N.D.1989) (interpreting analogous state rule); In re Brockmueller, 374 N.W.2d 135, 138 (S.D.1985) (same). Therefore, issues concerning the validity of a conviction are not cognizable under rule 22(e). See Pavlico, 961 F.2d at 443; Meier, 440 N.W.2d at 703.
To elaborate, Brooks' argument before the court of appeals was that under the facts of this case, burglary and robbery occupied a lesser included relationship to each other and, therefore, that "his convictions for robbery and burglary illegally punish[ed] him twice for the same crime." Brooks, 868 P.2d at 821. In substance, then, Brooks' appeal is no different from the run-of-the-mill case in which an appellate court sets aside a defendant's conviction for a lesser included offense and, as a result, his or her sentence is necessarily voided. See, e.g., Bradley, 752 P.2d at 877; Hill, 674 P.2d at 98. Such a challenge is not to the legality of the sentence but to the conviction of the lesser included offense. Because rule 22(e) did not empower the court of appeals to review Brooks' lesser included conviction, that court did not err in refusing to address it.
Brooks also asked the court of appeals to review his claim of an illegal sentence under either a plain error analysis or an ineffective assistance of counsel analysis. The court of appeals refused to do so because it concluded that Brooks still had a remedy in the trial court under rule 22(e). Brooks, 868 P.2d at 826 n. 11. However, as we stated above, rule 22(e) does not allow a court to review a claim of an illegal sentence when the substance of *861 the claim is, as it is here, a challenge to the underlying conviction. Because the court of appeals based its decision not to address Brooks' plain error and ineffective assistance of counsel arguments on its incorrect belief that rule 22(e) provided a remedy at the trial court level, we could remand the matter to the court of appeals to address these two arguments. However, considerations of judicial economy suggest that we dispose of these issues ourselves. We therefore turn to the merits of Brooks' claims of plain error and ineffective assistance of counsel.
We first address Brooks' contention that his conviction for both aggravated burglary and aggravated robbery is reviewable as plain error. A finding of plain error requires that (i) an error occurred; (ii) the error was obvious; and (iii) the error was harmful. State v. Menzies, 889 P.2d 393, 403 (Utah 1994) (citing State v. Dunn, 850 P.2d 1201, 1208 (Utah 1993)). "If any one of these elements is missing, there can be no finding of plain error." Id.
Here, we can dispose of Brooks' challenge under the first element. Brooks argues that when the State proved facts sufficient to convict him of aggravated burglary, it necessarily also proved all of the elements of aggravated robbery. Since proof of the greater crime necessarily proved the lesser, Brooks claims, to sentence him for both crimes violated section 76-1-402(3) of the Utah Code, as well as the double jeopardy prohibitions in both article I, section 12 of the Utah Constitution and the Fifth Amendment of the United States Constitution. We conclude that Brooks was validly convicted of both offenses.
As suggested earlier, section 76-1-402(3) bars the conviction of a defendant for two offenses arising out of a single criminal episode when one is a lesser included offense of the other.[2] Such an offense is lesser included when proof of one crime necessarily proves all of the elements of the second crime. State v. McCovey, 803 P.2d 1234, 1235-36 (Utah 1990) (citing Blockburger v. United States, 284 U.S. 299, 304, 52 S.Ct. 180, 182, 76 L.Ed. 306 (1932)).
Determining when one crime is a lesser included offense of another can occasionally be difficult. We have adopted a two-step analysis for resolving this issue. As we explained in Hill, 674 P.2d at 97, the first step is a purely theoretical comparison of the statutory elements of each offense. In most situations, this is sufficient to determine whether a lesser included relationship exists between two crimes. For example, simple theft, which requires "obtain[ing] or exercis[ing] unauthorized control over the property of another," Utah Code Ann. § 76-6-404, is a lesser included offense of simple robbery, which requires the "unlawful and intentional taking of personal property ... by means of force or fear." Id. § 76-6-301. Proof of robbery will always satisfy the elements of theft. On the other hand, simple theft is never a lesser included offense of simple assault, which requires "an attempt ... [,] a threat ... [,] or an act ... that causes or creates a substantial risk of bodily injury to another." Id. § 76-5-102.
However, some criminal statutes describe the elements of a crime by a listing of variations in the elements. Under some of these variations, two crimes would be separate under one set of circumstances but lesser included offenses under another. Hill, 674 P.2d at 97. Where such variations exist and there is a theoretical possibility of a lesser included relationship, a second analytical step must be taken. The court must look at the evidence actually presented at trial to determine which of the statutory variations were proved and whether those variations created a lesser included relationship between the two charged crimes. Id.
With this background, we address Brooks' claim. The first step of the Hill analysis asks whether we can categorically say that aggravated burglary and aggravated *862 robbery will never have a lesser included relationship. Only if this test does not resolve the question need we proceed to the second analytical step. We first address aggravated burglary. A person commits burglary if the actor "enters or remains unlawfully in a building ... with intent to commit a felony." Utah Code Ann. § 76-6-202. A person commits aggravated burglary if "in attempting, committing, or fleeing from a burglary the actor ... causes bodily injury to any person who is not a participant in the crime; uses or threatens the immediate use of a dangerous weapon ...; or possesses or attempts to use any explosive or dangerous weapon." Id. § 76-6-203. We next address the second charge, aggravated robbery. "Robbery is the unlawful and intentional taking of personal property in the possession of another from [their] person, or immediate presence, against [their] will, accomplished by means of force or fear." Id. § 76-6-301. "A person commits aggravated robbery if in the course of committing robbery, [the actor] uses or threatens to use a dangerous weapon...; causes serious bodily injury upon another; or takes an operable motor vehicle." Id. § 76-6-302.
Having described the elements of these two offenses, we ask whether proof of the elements of aggravated burglary ever prove all the elements of aggravated robbery. The answer is no. While there are elements common to both crimes, such as use of a deadly weapon, each has a unique element. Aggravated burglary always requires proof that the defendant entered or remained in a building; aggravated robbery always requires proof that the defendant took another's property. Because the unique element of each crime will always require proof beyond that needed for proof of the bare elements of the other crime, Hill's first test is sufficient to demonstrate that no lesser included relationship can exist between these crimes.
Brooks argues that Bradley supports his contention that aggravated robbery is a lesser included offense of aggravated burglary. Bradley is clearly distinguishable because it involved charges of aggravated burglary, on the one hand, and aggravated assault (not aggravated robbery), on the other. Bradley, 752 P.2d at 877-78. Because aggravated assault has completely different elements from aggravated robbery, the fact that Bradley concluded that in some factual situations, aggravated burglary and aggravated assault might entail a lesser included relationship does not further our analysis here.
Because we find no error in Brooks' conviction of both aggravated burglary and aggravated robbery, we need not address whether Brooks' lesser included argument is reviewable under an ineffective assistance of counsel analysis.
Affirmed.
DURHAM, J., and GLASMANN, Judge, concur in Chief Justice ZIMMERMAN'S opinion.
STEWART, Associate C.J., and HOWE, J., concur in the result.
Having disqualified himself, RUSSON, J., does not participate herein; MICHAEL J. GLASMANN, District Judge, sat.
NOTES
[1]  For a more complete recitation of the facts, see State v. Brooks, 868 P.2d 818, 819-21 (Ct.App.), cert. granted, 883 P.2d 1359 (Utah 1994).
[2]  Utah Code Ann. § 76-1-402(3) states in pertinent part:

A defendant may be convicted of an offense included in the offense charged but may not be convicted of both the offense charged and the included offense. An offense is so included 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....
