Created
September 29, 2016 05:21
-
-
Save LeifW/7c31c8904f3b3f8477c3dd8504335931 to your computer and use it in GitHub Desktop.
Natural number associativity proof in tactics and editor commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
natAssoc1 : (x, y, z : Nat) -> x + (y + z) = (x + y) + z | |
natAssoc1 = ?natAssocProof | |
natAssocProof = proof | |
intros | |
induction x | |
trivial | |
intros | |
compute | |
rewrite ihn__0 | |
trivial | |
natAssoc2 : (x, y, z : Nat) -> x + (y + z) = (x + y) + z | |
natAssoc2 Z y z = Refl | |
natAssoc2 (S k) y z = cong {f = S} $ natAssoc2 k y z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment