Created
November 17, 2011 14:23
-
-
Save kik/1373247 to your computer and use it in GitHub Desktop.
sqrt 2
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
| Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div fintype. | |
| Require Import finfun path prime. | |
| Theorem s2irr : forall n m, 2 * n ^ 2 = m ^ 2 -> n = 0 /\ m = 0. | |
| Proof. | |
| move=> n m H. | |
| have: ~~((n > 0) && (m > 0)). | |
| apply/negP; case/andP => H1 H2. | |
| move/(congr1 (fun x => odd (logn 2 x))): H. | |
| by rewrite !logn_mul //= ?addnn ?odd_double ?expn_gt0 ?H1. | |
| rewrite negb_and -!eqn0Ngt. | |
| case/orP; move/eqP=> H1; rewrite H1 /= in H *; split => //. | |
| by move/eqP: H; rewrite eq_sym expn_eq0 andbT; move/eqP. | |
| by move/eqP: H; rewrite muln_eq0 orFb expn_eq0 andbT; move/eqP. | |
| Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment