-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
did isabelle and coq fixes for Putnam 1997
- Loading branch information
1 parent
d52bd4f
commit 4c2f0d6
Showing
16 changed files
with
77 additions
and
67 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
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,15 +1,16 @@ | ||
Require Import Binomial Nat Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1997_a6_solution (n k: nat) := Binomial.C (n - 1) (k - 1). | ||
Definition putnam_1997_a6_solution : nat -> nat -> R := (fun n k : nat => Binomial.C (n - 1) (k - 1)). | ||
Theorem putnam_1997_a6 | ||
(X := fix x (n: nat) (c: R) (k: nat) : R := | ||
(n : nat) | ||
(maxc : R) | ||
(X := fix x (c: R) (k: nat) : R := | ||
match k with | ||
| O => 0 | ||
| S O => 1 | ||
| S ((S k'') as k') => (c * x n c k' - INR (n - k) * x n c k'') / INR k' | ||
| S ((S k'') as k') => (c * x c k' - INR (n - k) * x c k'') / INR k' | ||
end) | ||
: forall (n: nat), exists (maxc: R), forall (c: R), | ||
X n c (S n) = 0 /\ X n maxc (S n) = 0 -> c <= maxc -> | ||
forall (k: nat), and (le 1 k) (le k n) -> | ||
X n c k = putnam_1997_a6_solution n k. | ||
(npos : gt n 0) | ||
(hmaxc : X maxc (add n 1) = 0 /\ (forall c : R, X c (add n 1) = 0 -> c <= maxc)) | ||
: forall (k: nat), (le 1 k /\ le k n) -> X maxc k = putnam_1997_a6_solution n 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1997_b1_solution (n: nat) := INR n. | ||
Definition putnam_1997_b1_solution : nat -> R := (fun n : nat => INR n). | ||
Theorem putnam_1997_b1 | ||
(rnd : R -> R := fun x => Rmin (Rabs (IZR (floor x) - x)) (Rabs (IZR (floor (x + 1)) - x))) | ||
: forall (n: nat), gt n 0 -> sum_n (fun m => Rmin (rnd ((INR m + 1) / (6 * INR n))) (rnd ((INR m + 1) / (3 * INR n)))) (6 * n - 1) = putnam_1997_b1_solution n. | ||
: forall (n: nat), gt n 0 -> sum_n_m (fun m => Rmin (rnd (INR m / (6 * INR n))) (rnd (INR m / (3 * INR n)))) 1 (6 * n - 1) = putnam_1997_b1_solution 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Theorem putnam_1997_b2 | ||
(f g: R -> R) | ||
(habsbdd : R -> Prop := fun m => forall x, -m <= abs (f x) <= m) | ||
: exists (M: R), forall (x: R), ex_derive_n f 2 x /\ g x >= 0 /\ f x + Derive_n f 2 x = -x * g x * Derive f x -> habsbdd M. | ||
(f g : R -> R) | ||
(hg : forall x : R, g x >= 0) | ||
(hfdiff : forall x : R, ex_derive f x /\ ex_derive_n f 2 x) | ||
(hfg : forall x : R, f x + Derive_n f 2 x = -x * g x * Derive f x) | ||
: exists M : R, (forall x : R, -M <= abs (f x) <= M). | ||
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,10 @@ | ||
Require Import Reals Coquelicot.Coquelicot. From mathcomp Require Import div. | ||
Open Scope R. | ||
Definition putnam_1997_b3_solution (n: nat) := and (le 1 n) (le n 4) \/ and (le 20 n) (le n 24) \/ and (le 100 n) (le n 104) \/ and (le 120 n) (le n 124). | ||
Definition putnam_1997_b3_solution : nat -> Prop := (fun n : nat => (le 1 n /\ le n 4) \/ (le 20 n /\ le n 24) \/ (le 100 n /\ le n 104) \/ (le 120 n /\ le n 124)). | ||
Theorem putnam_1997_b3 | ||
: forall (n: nat), gt n 0 -> exists (p q: nat), gt p 0 /\ gt q 0 /\ coprime p q = true /\ | ||
sum_n (fun m => 1 / INR (m + 1)) n = INR p / INR q -> neq (q mod 5) 0 -> putnam_1997_b3_solution n. | ||
(n : nat) | ||
(p q : nat) | ||
(hn : gt n 0) | ||
(hpq : gt p 0 /\ gt q 0 /\ coprime p q = true /\ sum_n_m (fun m => 1 / INR m) 1 n = INR p / INR q) | ||
: neq (q mod 5) 0 <-> putnam_1997_b3_solution n. | ||
Proof. Admitted. |
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,9 +1,11 @@ | ||
Require Import Nat. | ||
Theorem putnam_1997_b5 | ||
(pown := fix pow_n (b n: nat) : nat := | ||
match n with | ||
Theorem putnam_1997_b5 | ||
(powm := fix pow_m (b m: nat) : nat := | ||
match m with | ||
| O => 1 | ||
| S n' => b * pow_n b n' | ||
| S m' => b ^ (pow_m b m') | ||
end) | ||
: forall (n: nat), n >= 2 -> pown 2 n-1 mod n = pown 2 n-2. | ||
(n : nat) | ||
(hn : n >= 2) | ||
: (powm 2 n) mod n = (powm 2 (n-1)) mod 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
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