Created
March 7, 2018 04:01
-
-
Save dcci/8084a3f3ac6068d64febf0f062bb029f to your computer and use it in GitHub Desktop.
Inductively defined propositions in coq
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
Inductive ev : nat -> Prop := | |
| ev_0 : ev 0 | |
| ev_SS : forall n : nat, ev n -> ev (S (S n)). | |
Theorem ev_4 : ev 4. | |
Proof. | |
apply ev_SS. | |
apply ev_SS. | |
apply ev_0. | |
Qed. | |
Theorem ev_4' : ev 4. | |
Proof. | |
apply (ev_SS 2 (ev_SS 0 ev_0)). | |
Qed. | |
Theorem ev_plus4 : forall n, ev n -> ev (4 + n). | |
Proof. | |
intros n H. | |
apply ev_SS. | |
apply ev_SS. | |
apply H. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment