There is a difference between prosecuting someone based on their thoughts or beliefs, on one hand, and taking intent into consideration when determining whether someone's acts constitute a crime. I think that distinction is getting lost in the discussion between you and aborgman. You are correct when you argue that thoughts and beliefs by themselves do not give rise to criminal liability, but intent or mental state generally is taken into consideration when determining whether actions constitute a crime. In fact, there are many crimes that are defined specifically with reference to a particular mental state.
Burglary, for example, is typically defined as the unauthorized entering a building or dwelling for the purpose of committing a crime. So, if I enter your house because I forgot my glasses, misread the house number, and thought I was entering my own home, that's not burglary. However, if I enter your house to steal your TV, it is.
Battery is another example. Suppose you and I are playing a game of baseball. You are the pitcher and I am the batter. As I swing at one of your nasty curve balls, my bat slips out of my hands and hits you. Is that a crime? No. I get the bat back, and the catcher whispers to me that you slept with my wife. In my anger, I throw my bat at you and it hits you again. Is that a crime? Yes. We have two similar actions, but in one instance, it is a crime, and in the other, it isn't. What's the difference? Intent.