-
-
Save totem3/c797ee3013bb2a221aed to your computer and use it in GitHub Desktop.
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
Goal forall (A : Prop), A -> A. | |
intros. | |
exact H. | |
Qed. | |
Require Import Arith. | |
Theorem plus_comm: forall (n m : nat), (n + m) = m + n. | |
intros. | |
induction m. | |
simpl. | |
induction n. | |
simpl. | |
reflexivity. | |
simpl. | |
rewrite IHn. | |
reflexivity. | |
simpl. | |
rewrite <- plus_n_Sm. | |
f_equal. | |
exact IHm. | |
Qed. | |
Goal forall (n m: nat), (n*m) = (m*n). | |
intros. | |
induction n. | |
simpl. | |
rewrite <- mult_n_O. | |
reflexivity. | |
rewrite <- mult_n_Sm. | |
simpl. | |
rewrite plus_comm. | |
f_equal. | |
exact IHn. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment