Suppose a transaction T changes the state from S to an invalid state S'. For example, say, it ran an long loop of no operations (no_op), and attempted a double spend. Since this T transforms the state to an invalid state S', the transaction should not make it into the blockchain. How does a miner claim gas for the computation power they invested in running the transaction, if they cannot show everyone else the transaction they wasted time on ?
I'm assuming gas economics in Ethereum are similar to transaction fees in Bitcoin. Is my understanding right ?