Mechanized Reasoning About "how" Using Functional Programs And Embeddings