Skip to content

Instantly share code, notes, and snippets.

@umedaikiti
Created June 5, 2017 11:15
Show Gist options
  • Save umedaikiti/5a0dbf3943f927508da2a12fa2444bd3 to your computer and use it in GitHub Desktop.
Save umedaikiti/5a0dbf3943f927508da2a12fa2444bd3 to your computer and use it in GitHub Desktop.
Require Import Omega.
Goal ~(exists f : nat -> nat, forall n : nat, f (f n) = n + 1).
Proof.
intro H.
destruct H as [f H].
assert (forall n : nat, f n = n + f 0).
intro n.
induction n.
reflexivity.
simpl.
rewrite <- IHn.
replace (S n) with (n + 1) by omega.
replace (S (f n)) with (f n + 1) by omega.
rewrite <- H.
rewrite <- H.
reflexivity.
specialize (H 0).
rewrite H0 in H.
apply (odd_even_lem 0 (f 0)).
omega.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment