Last active
June 7, 2018 10:58
-
-
Save technion/eac1b44104597446ea2713983249cc24 to your computer and use it in GitHub Desktop.
Mod Even
This file contains 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
Require Import Coq.Arith.Arith. | |
Require Import Coq.Arith.EqNat. | |
(* Definition from : https://coq.inria.fr/library/Coq.Arith.Even.html *) | |
Inductive even : nat -> Prop := | |
| even_O : even 0 | |
| even_S : forall n, odd n -> even (S n) | |
with odd : nat -> Prop := | |
odd_S : forall n, even n -> odd (S n). | |
Theorem FastEven: forall n: nat, n mod 2 = 0 <-> even n. | |
Proof. | |
split. | |
- intros. induction n. | |
+ apply even_O. | |
+ apply even_S. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment