Skip to content

Instantly share code, notes, and snippets.

@satos---jp
Created May 18, 2014 13:03
Show Gist options
  • Save satos---jp/653d7fe4aba16494137d to your computer and use it in GitHub Desktop.
Save satos---jp/653d7fe4aba16494137d to your computer and use it in GitHub Desktop.
Require Import ZArith.
Lemma hoge : forall z : Z, (z ^ 4 - 4 * z ^ 2 + 4 > 0)%Z.
Proof.
intros.
assert (((z ^ 2 - 2)<>0)%Z -> (((z ^ 2 - 2)^2) > 0) % Z).
intro.
assert (forall p : Z, ((p<>0)%Z -> (p ^ 2 > 0) % Z)).
intro.
case p.
intros.
contradict H0.
reflexivity.
intros.
simpl.
reflexivity.
intros.
simpl.
reflexivity.
apply (H0 (z ^ 2 - 2)%Z).
apply H.
assert ((z * z <> 2)%Z).
assert (forall p,Z.pos (p * p) <> 2%Z).
simpl.
destruct p.
discriminate.
destruct p.
discriminate.
discriminate.
simpl.
discriminate.
simpl.
discriminate.
destruct z.
simpl.
discriminate.
simpl.
apply H0.
simpl.
apply H0.
assert ((z ^ 4 - 4 * z ^ 2 + 4 = (z^2 - 2) ^ 2)%Z).
ring.
rewrite H1.
apply H.
intro.
apply H0.
rewrite Zplus_0_r_reverse.
rewrite <- H2.
ring.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment