
299 N.W.2d 661 (1980)
STATE of Iowa, Appellee,
v.
William E. SANGSTER, Appellant.
No. 63904.
Supreme Court of Iowa.
December 17, 1980.
*662 Randy J. Hohenadel of Newport, Fortini & Hohenadel, Davenport, for appellant.
Thomas J. Miller, Atty. Gen., Richard L. Cleland, Asst. Atty. Gen., and Stephen L. Schalk, Asst. County Atty., for appellee.
Considered by REYNOLDSON, C. J., and HARRIS, McCORMICK, ALLBEE, and LARSON, JJ.
McCORMICK, Justice.
Defendant William E. Sangster appeals his conviction by jury and sentence for burglary in the second degree in violation of section 713.3, The Code. He challenges the sufficiency of the evidence and the refusal of the trial court to submit trespass as a lesser included offense. We reverse and remand on the lesser included offense issue.
I. Sufficiency of the evidence. Defendant moved for directed verdict at the close of the evidence. He alleged the evidence was insufficient to permit submission of the case to the jury. The trial court overruled the motion, and defendant assigns the ruling as error.
This assignment is reviewed under familiar principles which need not be repeated here. See State v. Holderness, 293 N.W.2d 226, 235 (Iowa 1980). In applying those principles, we draw no distinction between the probative value of direct and circumstantial evidence.
Defendant was charged with burglary of a private garage adjacent to a residence at 1935 Perry Street in Davenport. Substantial evidence supports the following findings. In the evening of March 1, 1979, two Davenport police officers had defendant and Eugene Watson under surveillance in a residential neighborhood. Defendant and Watson separated to walk on opposite sides of the street, each man looking into cars parked on his side. When they arrived at 1935 Perry Street, Watson went to the front door, knocked once, opened the screen door, and then bent over briefly at the front door. He left there when some young people crossed the street in the direction of the premises. Defendant remained on the sidewalk during this time, looking up and down the street. He and Watson left the scene for a few minutes but returned when the people who had crossed the street were gone. Defendant and Watson walked to the garage door. Defendant entered the garage while Watson remained outside. The officers saw the light of a flashlight while defendant was in the garage. They decided to arrest the two men. As they drove toward the site, defendant ran out of the garage. He and Watson were then arrested.
In a search following the arrest, a flashlight was found in defendant's possession. The pattern of his shoes matched wet shoe-prints discovered on the floor of the garage. Watson had a screwdriver which matched a pry mark on the front door jam of the home.
This court has not delineated the elements of burglary under the definition in section 713.1. They are, however, plainly spelled out in the statute. Three alternative offenses are defined. They have two elements in common. The common elements are the requisite intent and absence of authority. The requisite intent is "the intent to commit a felony, assault or theft [in the place involved]." Id. The requisite absence of authority is "no right, license or privilege" to do the act involved. Id. When those elements exist, a person is guilty of burglary who (1) "enters an occupied structure or area enclosed in such a manner as to provide a place for the keeping *663 of valuable property secure from theft or criminal mischief, such occupied structure or place not being open to the public," or (2) "who remains therein after it is closed to the public or after the person's right, license or privilege to be there has expired," or (3) "who breaks an occupied structure of other place where anything of value is kept.... Id.
Burglary in the first degree requires proof of an additional element specified in section 713.2. All other burglary is burglary in the second degree. § 713.3.
In the present case, defendant was charged with burglary in the second degree. The State sought to establish his guilt under the first alternative definition of the offense. It alleged he entered the garage with intent to commit theft. In asserting the trial court erred in overruling his motion for directed verdict, defendant contends the evidence was insufficient for the jury to find that he entered the garage, that the garage was the kind of structure or area specified in the statute, and that he possessed the required intent.
We find each element was supported by sufficient evidence. It is true the officers did not actually see defendant enter the garage. However, they observed him leave it. This sufficiently proved his entry. Moreover, substantial evidence tended to show the garage was an "occupied structure." As defined in section 702.12, an occupied structure includes a structure adapted "for the storage or safekeeping of anything of value." The evidence showed an automobile was stored in the garage. The structure was thus adapted for the storage of property having value. Finally, defendant's intent to commit theft could reasonably be inferred from the evidence of surreptitious entry and other circumstances. See State v. Clay, 213 N.W.2d 473, 480 (Iowa 1973).
We find no merit in defendant's challenge to the sufficiency of the evidence.
II. The lesser included offense issue. In State v. Furnald, 263 N.W.2d 751 (Iowa 1978), we held that criminal trespass as defined in sections 729.1 and 729.2, The Code 1975, was not a lesser included offense of breaking and entering as defined in section 708.8, The Code 1975 (now repealed). We have not decided, however, whether criminal trespass is a lesser included offense of burglary as the offenses are defined in the present Code. The issue was presented but not reached in State v. Rouse, 290 N.W.2d 911 (Iowa 1980). It is squarely before us in this case.
The standards for determining when an offense is included in another are the same now as when Furnald was decided. The principles applied there apply here. Two tests must be satisfied:
The first is the legal or element test. The lesser offense must be composed solely of some but not all elements of the greater crime. The second, "factual" test is an ad hoc determination whether there is a factual basis in the record for submitting the included offense to the jury.
Furnald, 263 N.W.2d at 752.
To satisfy the legal test, the minor offense must be an elementary part of the major offense. Id. The lesser offense is necessarily included in the greater offense if it is impossible to commit the greater without also committing the lesser. State v. Redmon, 244 N.W.2d 792, 801 (Iowa 1976). If the lesser offense contains an element not required for the greater offense, the lesser cannot be included in the greater. This is because it would be possible in that situation to commit the greater without also having committed the lesser. See C. Wright, Federal Practice and Procedure § 515 at 374-75 (1969).
The elements of an offense are determined by the statute defining it rather than by the charge or the evidence. Redmon, 244 N.W.2d at 801. When the statute defines an offense alternatively, the relevant definition is the one for the offense involved in the particular prosecution. State v. Young, 293 N.W.2d 5, 7 (Iowa 1980); Furnald, 263 N.W.2d at 754.
When the elements of the major offense are identified, the next inquiry is *664 whether the elements of the lesser offense are included in them. For that purpose, it is necessary to identify the elements of the lesser offense. If the minor offense is defined alternatively, the offense is included if any of the alternatives are included. Id. Because an offense is necessarily included in another if it is an elementary part of the greater, an offense is necessarily included if one of its statutory definitions makes it an elementary part of a greater offense. When so included, the major offense cannot be committed without also committing the minor offense.
We must apply the legal test to the burglary charge in the present case. The State selected only one of the burglary alternatives as the basis of the charge. We have identified the elements of that offense. Criminal trespass is defined in section 716.7(2). It has four alternative statutory definitions. Our inquiry is whether a person who commits burglary under the burglary alternative involved in this case must also have committed criminal trespass under one of the statutory definitions of that offense.
Under section 716.7(2)(a), criminal trespass is committed when a person (1) "[enters] upon or in property" (2) "without legal justification or without the implied or actual permission of the owner, lessee, or person in lawful possession," (3) "with the intent to commit a public offense. ..." "Property" is defined in section 716.7(1) as "any land, dwelling, building, conveyance, vehicle, or other temporary or permanent structure whether publicly or privately owned." Thus a person who enters "an occupied structure or area enclosed in such a manner as to provide a place for the keeping of valuable property secure from theft or criminal mischief, such occupied structure or place not being open to the public," as required for the relevant burglary offense, would necessarily enter upon or in property within the meaning of criminal trespass under section 716.7(2)(a). This is true, of course, even though the entry upon or in property necessary for trespass would not necessarily be an entry to the kind of property required for burglary. Moreover, absence of authority is a common element in the two offenses. Each also has an intent element. Although the intent elements differ, the intent for criminal trespass is a constituent of the intent element in burglary. The trespass offense merely requires an intent to commit a public offense whereas the burglary offense requires an intent to commit a particular kind of public offense, "a felony, assault or theft." § 713.1.
This analysis demonstrates that criminal trespass under section 716.7(2)(a) is an elementary part of the burglary definition involved in the present case. The criminal trespass elements are entirely included in the burglary elements. It would be impossible for a person to commit the relevant burglary offense without also committing criminal trespass as defined in section 716.7(2)(a). Therefore criminal trespass, as thus defined, passes the legal test as an included offense of the burglary offense.
The same conclusion has been reached under analogous statutes in other jurisdictions. See Block v. State, 604 P.2d 338 (Nev.1979); People v. India, 67 A.D.2d 488, 415 N.Y.S.2d 837 (1979); Day v. State, 532 S.W.2d 302 (Tex.Crim.App.1975).
Criminal trespass also passes the factual test. Under the evidence in this case, a rational jury could find the defendant guilty of criminal trespass. For example, the jury might find a failure of proof on the intent necessary for burglary but sufficient proof to establish the intent and other elements of criminal trespass.
Because criminal trespass satisfied both the legal and factual tests as an included offense, the trial court erred in overruling defendant's objection to the failure to submit it. The case must be reversed and remanded for new trial.
REVERSED AND REMANDED.
