-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from trishullab/michael
Isabelle & Coq verifications: 2004-2005 & 1991-1995
- Loading branch information
Showing
78 changed files
with
285 additions
and
281 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1991_a3_solution (coeff: nat -> R) (n: nat) : Prop := exists (A r1 r2: R), coeff = (fun x => match x with | O => A * r1 * r2 | S O => -A * (r1 + r2) | S (S O) => A | _ => 0 end) /\ n = 2%nat. | ||
Definition poly (coeff : nat -> R) (deg : nat) : R -> R := fun x : R => sum_n (fun i => coeff i * x ^ i) deg. | ||
Definition putnam_1991_a3_solution (coeff: nat -> R) : Prop := (forall n : nat, gt n 2 -> coeff n = 0) /\ exists (r1 r2 : R), r1 <> r2 /\ poly coeff 2 r1 = 0 /\ poly coeff 2 r2 = 0. | ||
Theorem putnam_1991_a3 | ||
(p: (nat -> R) -> nat -> (R -> R) := fun coeff n => (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) | ||
: forall (coeff: nat -> R) (n: nat), ge n 2 -> | ||
(exists (r: nat -> R), | ||
(forall (i j: nat), lt i j -> r i < r j) /\ | ||
forall (i: nat), lt i n -> p coeff n (r i) = 0 /\ lt i (n - 1) -> (Derive (p coeff n)) ((r i + r (S i)) / 2) = 0) <-> | ||
putnam_1991_a3_solution coeff n. | ||
(coeff : nat -> R) | ||
(n : nat) | ||
(hn : coeff n <> 0 /\ forall m : nat, gt m n -> coeff m = 0) | ||
(hge : ge n 2) | ||
: (exists (r: nat -> R), (forall i : nat, lt i (n - 1) -> r i < r (S i)) /\ | ||
(forall i : nat, lt i n -> poly coeff n (r i) = 0) /\ | ||
(forall i : nat, lt i (n - 1) -> (Derive (poly coeff n)) ((r i + r (S i)) / 2) = 0)) <-> | ||
putnam_1991_a3_solution coeff. | ||
Proof. Admitted. |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Theorem putnam_1991_b2 | ||
(f g: R -> R) | ||
(hfg : ~ exists (c: R), f = (fun _ => c) \/ g = (fun _ => c) /\ forall x, ex_derive_n f 1 x /\ forall x, ex_derive_n g 1 x) | ||
: forall (x y: R), f (x + y) = f x * f y - g x * g y /\ g (x + y) = f x * g y - g x * f y -> | ||
Derive f 0 = 0 -> forall (x: R), pow (f x) 2 + pow (g x) 2 = 1. | ||
(f g : R -> R) | ||
(fgnconst : ~ exists (c : R), f = (fun _ => c) \/ g = (fun _ => c)) | ||
(fgdiff : forall x : R, ex_derive f x /\ ex_derive g x) | ||
(fadd : forall x y : R, f (x + y) = f x * f y - g x * g y) | ||
(gadd : forall x y : R, g (x + y) = f x * g y + g x * f y) | ||
: Derive f 0 = 0 -> forall x : R, pow (f x) 2 + pow (g x) 2 = 1. | ||
Proof. Admitted. |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Require Import Basics. | ||
Require Import Basics ZArith. | ||
Open Scope Z_scope. | ||
Theorem putnam_1992_a1 | ||
(f : nat -> nat) | ||
(hf : forall (n: nat), f (f n) = n /\ f (f (n + 2)) + 2 = n /\ f 0 = 1) | ||
: f = (fun n => 1 - n). | ||
(f : Z -> Z) | ||
: f = (fun n => 1 - n) <-> ((forall n : Z, f (f n) = n) /\ (forall n : Z, f (f (n + 2) + 2) = n) /\ f 0 = 1). | ||
Proof. Admitted. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Require Import Nat. From mathcomp Require Import div fintype perm ssrbool. | ||
Definition putnam_1992_a3_solution (x y n m: nat) := exists r, x = 2 ^ r /\ y = 2 ^ r /\ n = 2 * r /\ m = 2 * r + 1. | ||
Definition putnam_1992_a3_solution (x y n m: nat) := exists r, x = 2 ^ r /\ y = 2 ^ r /\ n = 2 * r + 1 /\ m = 2 * r. | ||
Theorem putnam_1992_a3 | ||
(m : nat) | ||
(hm : m > 0) | ||
(hnxy : nat -> nat -> nat -> Prop := fun n x y => n > 0 /\ x > 0 /\ y > 0 /\ coprime n m /\ pow (pow x 2 + pow y 2) m = pow (x * y) m) | ||
: forall n x y, putnam_1992_a3_solution x y n m. | ||
(hnxy : nat -> nat -> nat -> Prop := fun n x y => n > 0 /\ x > 0 /\ y > 0 /\ coprime n m /\ pow (pow x 2 + pow y 2) m = pow (x * y) n) | ||
: forall n x y, putnam_1992_a3_solution x y n m <-> hnxy n x y. | ||
Proof. Admitted. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
Require Import Nat Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1992_a4_solution (k: nat) := if odd k then 0 else pow (-1) (k/2). | ||
Definition putnam_1992_a4_solution (k : nat) := if odd k then 0 else pow (-1) (k/2) * INR (fact k). | ||
Theorem putnam_1992_a4 | ||
(f : R -> R := fun n => (pow (1 / n) 2) / ((pow (1 / n) 2) + 1)) | ||
(df_0 : nat -> R := fun k => (Derive_n f k) 0) | ||
: forall (k: nat), gt k 0 -> df_0 k = putnam_1992_a4_solution k. | ||
(f : R -> R) | ||
(hfdiff : forall k : nat, continuity (Derive_n f k) /\ forall x : R, ex_derive (Derive_n f k) x) | ||
(hf : forall n : nat, gt n 0 -> f (1 / INR n) = (INR n)^2 / ((INR n)^2 + 1)) | ||
: forall (k : nat), gt k 0 -> (Derive_n f k) 0 = putnam_1992_a4_solution k. | ||
Proof. Admitted. |
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
Require Import List Bool Reals Peano_dec Coquelicot.Coquelicot. | ||
Open Scope nat_scope. | ||
Fixpoint s_sum (a : nat -> nat) (k : nat) (s : nat -> bool) : nat := | ||
match k with | ||
| O => a 0 | ||
| S k' => (if s k then a k else 0) + s_sum a k' s | ||
end. | ||
Theorem putnam_1993_a4 | ||
(x y: list nat) | ||
(hx : length x = 19) | ||
(hy : length y = 93) | ||
(hx2 : forall n : nat, In n x -> 1 < n <= 93) | ||
(hy2 : forall n : nat, In n y -> 1 < n <= 19) | ||
: exists (presentx presenty : nat -> bool), | ||
sum_n (fun n => | ||
if ((existsb (fun i => if eq_nat_dec n i then true else false) x) && presentx n) | ||
then (INR n) else R0) 94 = | ||
sum_n (fun n => | ||
if ((existsb (fun i => if eq_nat_dec n i then true else false) y) && presenty n) | ||
then (INR n) else R0) 20. | ||
(x y : nat -> nat) | ||
(hx : forall i : nat, i < 19 -> 1 <= x i <= 93) | ||
(hy : forall j : nat, j < 93 -> 1 <= y j <= 19) | ||
: exists (is js : nat -> bool), (exists i : nat, i < 19 /\ is i = true) /\ s_sum x 18 is = s_sum y 92 js. | ||
Proof. Admitted. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Theorem putnam_1993_b4 | ||
(K: (R * R) -> R) | ||
(f g: R -> R) | ||
(hK : forall (xy : R * R), let (x, y) := xy in 0 <= x <= 1 /\ 0 <= y <= 1 /\ K xy > 0 /\ continuous K xy) | ||
(hfg : forall (x: R), 0 <= x <= 1 /\ f x > 0 /\ g x > 0 /\ continuity f /\ continuity g -> | ||
forall (x: R), 0 <= x <= 1 -> | ||
(RInt (fun y => f y * K (x, y)) 0 1) = g x /\ | ||
RInt (fun y => g y * K (x, y)) 0 1 = f x) | ||
: forall (x: R), 0 <= x <= 1 -> f x = g x. | ||
(K : (R * R) -> R) | ||
(f g : R -> R) | ||
(hK : forall x y : R, 0 <= x <= 1 /\ 0 <= y <= 1 -> K (x, y) > 0 /\ continuous K (x, y)) | ||
(hfg : forall x : R, 0 <= x <= 1 -> f x > 0 /\ g x > 0 /\ continuous f x /\ continuous g x /\ | ||
RInt (fun y => f y * K (x, y)) 0 1 = g x /\ RInt (fun y => g y * K (x, y)) 0 1 = f x) | ||
: forall x : R, 0 <= x <= 1 -> f x = g x. | ||
Proof. Admitted. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Require Import Nat Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Theorem putnam_1994_a1 | ||
: exists (a: nat -> R), forall (n: nat), gt n 0 -> 0 < a n <= a (mul 2 n) + a (add (mul 2 n) 1) -> | ||
~ ex_lim_seq (fun n => sum_n (fun m => a m) n). | ||
(a : nat -> R) | ||
(ha : forall n : nat, gt n 0 -> 0 < a n <= a (mul 2 n) + a (add (mul 2 n) 1)) | ||
: ~ ex_finite_lim_seq (fun n => sum_n (fun m => a m) n). | ||
Proof. Admitted. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
Require Import List Reals Coquelicot.Coquelicot. | ||
Require Import Ensembles Reals Finite_sets Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1994_b2_solution (c: R) := c < 243 / 8. | ||
Theorem putnam_1994_b2 | ||
(f : R -> R -> R := fun c x => pow x 4 + 9 * pow x 3 + c * pow x 2 + 9 * x + 4) | ||
(g : R -> R -> R -> R := fun m x b => m * x + b) | ||
(hintersect : R -> Prop := fun c => exists(m b: R), exists (l: list R), eq (length l) 4%nat /\ NoDup l /\ forall (r: R), In r l -> f c r = g m b r) | ||
(hintersect : R -> Prop := fun c => exists(m b: R), cardinal R (fun x => m * x + b = pow x 4 + 9 * pow x 3 + c * pow x 2 + 9 * x + 4) 4) | ||
: forall (c: R), hintersect c <-> putnam_1994_b2_solution c. | ||
Proof. Admitted. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1994_b3_solution (k: R) := k <= 1. | ||
Definition putnam_1994_b3_solution (k: R) := k < 1. | ||
Theorem putnam_1994_b3 | ||
: forall (k: R) (f: R -> R) (x: R), f x > 0 /\ ex_derive f x /\ (Derive f) x > f x -> | ||
exists (N: R), x > N -> f x > exp (k * x) <-> putnam_1994_b3_solution k. | ||
: forall k : R, (forall f : R -> R, (forall x : R, f x > 0 /\ ex_derive f x /\ (Derive f) x > f x) -> exists N : R, forall x : R, x > N -> f x > exp (k * x)) <-> putnam_1994_b3_solution k. | ||
Proof. Admitted. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Require Import Basics ZArith Zpower Reals Coquelicot.Coquelicot. | ||
Open Scope Z_scope. | ||
Theorem putnam_1994_b5 | ||
(composen := fix compose_n {A: Type} (f : A -> A) (n : nat) := | ||
match n with | ||
| O => fun x => x | ||
| S n' => compose f (compose_n f n') | ||
end) | ||
(fa : R -> R -> R := fun a x => IZR (floor (a * x))) | ||
: forall (n: Z), Z.gt n 0 -> | ||
exists (a: R), forall (k: Z), and (Z.ge 1 k) (Z.ge k n) -> (composen (fa a) (Z.to_nat k)) (IZR (Z.pow n 2)) = IZR (Z.pow n 2 - k) /\ IZR (Z.pow n 2 - k) = fa (Rpower a (IZR k)) (IZR (Z.pow n 2)). | ||
(fa : R -> Z -> Z := fun a x => floor (a * IZR x)) | ||
: forall (n: Z), n > 0 -> exists (a: R), forall (k: Z), 1 <= k <= n -> (composen (fa a) (Z.to_nat k)) n^2 = n^2 - k /\ n^2 - k = fa (Rpower a (IZR k)) n^2. | ||
Proof. Admitted. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Require Import Nat. | ||
Require Import ZArith. | ||
Open Scope Z_scope. | ||
Theorem putnam_1994_b6 | ||
(n : nat -> nat := fun a => 101 * a - 100 * pow 2 a) | ||
: forall a b c d : nat, 0 <= a <= 99 /\ 0 <= b <= 99 /\ 0 <= c <= 99 /\ 0 <= d <= 99 /\ n a + n b mod 10100 = n c + n d -> | ||
(a,b) = (c,d). | ||
(n : Z -> Z := fun a => 101 * a - 100 * 2^a) | ||
: forall a b c d : Z, 0 <= a <= 99 /\ 0 <= b <= 99 /\ 0 <= c <= 99 /\ 0 <= d <= 99 /\ | ||
(n a + n b) mod 10100 = (n c + n d) mod 10100 -> (a = c /\ b = d) \/ (a = d /\ b = c). | ||
Proof. Admitted. |
Oops, something went wrong.