If you take something that belongs to another person, but you believe you do own it, no crime has been committed. For example, if walk out of a store thinking you paid for a bag of groceries when in fact the card reader had errored and you need to swipe again. That isn't shoplifting, that is a mistake of fact.
This concept is called "mens rea" or "guilty mind". A statute for each crime should define what type of mens rea it requires. As an example, generally murder requires an intent to kill or seriously injure someone. Manslaughter only requires a reckless disregard for whether or not you've harmed someone. However, some crimes do not have a mens rea requirement. They are usually minor, like speeding.
This concept is called "mens rea" or "guilty mind". A statute for each crime should define what type of mens rea it requires. As an example, generally murder requires an intent to kill or seriously injure someone. Manslaughter only requires a reckless disregard for whether or not you've harmed someone. However, some crimes do not have a mens rea requirement. They are usually minor, like speeding.
For a better explanation of mens rea, see this part of the linked site: http://lawcomic.net/guide/?p=173
EDIT: For an interesting example of when the mens rea requirements for a crime are unclear, see Elonis v. US: a free speech case involving intimidating speech posted to Facebook. http://www.scotusblog.com/case-files/cases/elonis-v-united-s...