-
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 #189 from trishullab/jasper
Jasper
- Loading branch information
Showing
47 changed files
with
160 additions
and
148 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 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,10 +1,8 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1996_a1_solution := (1 + sqrt 2) / 2. | ||
Theorem putnam_1996_a1 | ||
(minA : R) | ||
(packable : R -> R -> R -> R -> Prop := fun n1 n2 a1 a2 => (n1 + n2) <= Rmax a1 a2 /\ Rmax n1 n2 <= Rmin a1 a2) | ||
(hminA : R -> R -> R -> R -> Prop := fun n1 n2 a1 a2 => a1 * a2 = minA /\ packable n1 n2 a1 a2) | ||
(hminAlb : R -> R -> R -> R -> Prop := fun n1 n2 a1 a2 => forall (A: R), a1 * a2 = A /\ (packable n1 n2 a1 a2 -> minA <= A)) | ||
: (forall (n1 n2: R), pow n1 2 + pow n2 2 = 1 -> exists a1 a2 : R, hminA n1 n2 a1 a2 /\ hminAlb n1 n2 a1 a2) <-> minA =putnam_1996_a1_solution. | ||
Theorem putnam_1996_a1 | ||
(packable : R -> R -> R -> R -> Prop := (fun n1 n2 a1 a2 : R => (n1 + n2) <= Rmax a1 a2 /\ Rmax n1 n2 <= Rmin a1 a2)) | ||
(Aprop : R -> Prop := (fun A : R => forall n1 n2 : R, (n1 > 0 /\ n2 > 0 /\ pow n1 2 + pow n2 2 = 1) -> exists a1 a2 : R, a1 > 0 /\ a2 > 0 /\ a1 * a2 = A /\ packable n1 n2 a1 a2)) | ||
: Aprop putnam_1996_a1_solution /\ (forall A : R, Aprop A -> A >= putnam_1996_a1_solution). | ||
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,10 +1,11 @@ | ||
Require Import Nat Ensembles Finite_sets. From mathcomp Require Import fintype. | ||
Definition putnam_1996_a3_solution : Prop := False. | ||
Theorem putnam_1996_a3 | ||
(student_choices : nat -> Ensemble nat) | ||
(hinrange : forall n : nat, Included _ (student_choices n) (fun i : nat => le 1 i /\ le i 6)) | ||
: putnam_1996_a3_solution <-> (exists S : Ensemble nat, Included _ S (fun i : nat => le 1 i /\ le i 20) /\ cardinal _ S 5 /\ | ||
(exists c1 c2 : nat, Included _ (fun i : nat => i = c1 \/ i = c2) (fun i : nat => le 1 i /\ le i 6) /\ | ||
(Included _ (fun i : nat => i = c1 \/ i = c2) (fun i : nat => (forall s : nat, In _ S s -> In _ (student_choices s) i) | ||
\/ Included _ (fun i : nat => i = c1 \/ i = c2) (fun i : nat => forall s : nat, In _ S s -> ~ (In _ (student_choices s) i)))))). | ||
(studentchoicesinrange : (nat -> Ensemble nat) -> Prop := (fun studentchoices : (nat -> Ensemble nat) => forall n : nat, Included _ (studentchoices n) (fun i : nat => le 1 i /\ le i 6))) | ||
(studentchoicesprop : (nat -> Ensemble nat) -> Prop := (fun studentchoices : (nat -> Ensemble nat) => | ||
exists S : Ensemble nat, Included _ S (fun i : nat => le 1 i /\ le i 20) /\ cardinal _ S 5 /\ | ||
(exists c1 c2 : nat, (le 1 c1 /\ le c1 6) /\ (le 1 c2 /\ le c2 6) /\ c1 <> c2 /\ | ||
((Included _ (fun i : nat => i = c1 \/ i = c2) (fun i : nat => forall s : nat, In _ S s -> In _ (studentchoices s) i)) | ||
\/ (Included _ (fun i : nat => i = c1 \/ i = c2) (fun i : nat => forall s : nat, In _ S s -> ~ (In _ (studentchoices s) i))))))) | ||
: (forall studentchoices : (nat -> Ensemble nat), studentchoicesinrange studentchoices -> studentchoicesprop studentchoices) <-> putnam_1996_a3_solution. | ||
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 Binomial Reals Znumtheory Coquelicot.Coquelicot. From mathcomp Require Import div. | ||
Open Scope R. | ||
Theorem putnam_1996_a5 | ||
(p: nat) | ||
(p : nat) | ||
(hp : prime (Z.of_nat p) /\ gt p 3) | ||
(k := floor (2 * INR p / 3)) | ||
: exists (m: nat), sum_n (fun i => Binomial.C p (i+1)) (Z.to_nat k) = INR m * pow (INR p) 2. | ||
(k : nat := Z.to_nat (floor (2 * INR p / 3))) | ||
: exists (m : nat), sum_n_m (fun i => Binomial.C p i) 1 k = INR m * pow (INR p) 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,8 +1,8 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1996_a6_solution (c: R) (f: R -> R) := if Rle_dec c (1/4) then exists (d: R), f = (fun _ => d) else forall (x: R), 0 <= x <= c -> continuity_pt f x /\ f 0 = f c /\ forall (x: R), x > 0 -> f x = f (pow x 2 + c) /\ (forall (x: R), x < 0 -> f x = f (-x)). | ||
Definition putnam_1996_a6_solution (c: R) (f: R -> R) := if Rle_dec c (1/4) then (exists (d: R), f = (fun _ => d)) else ((forall (x: R), 0 <= x <= c -> continuity_pt f x) /\ f 0 = f c /\ (forall (x: R), x > 0 -> f x = f (pow x 2 + c)) /\ (forall (x: R), x < 0 -> f x = f (-x))). | ||
Theorem putnam_1996_a6 | ||
(c: R) | ||
(hc : c > 0) | ||
: forall (f: R -> R), continuity f /\ forall (x: R), f x = pow x 2 + c <-> putnam_1996_a6_solution c f. | ||
: forall (f: R -> R), (continuity f /\ (forall (x: R), f x = pow x 2 + c)) <-> putnam_1996_a6_solution c f. | ||
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,10 +1,8 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Require Import Reals Coquelicot.Coquelicot. From mathcomp Require Import bigop. | ||
Open Scope R. | ||
Theorem putnam_1996_b2 | ||
(oddfact := fix odd_fact (n : nat) : R := | ||
match n with | ||
| O => 1 | ||
| S n' => (2 * INR n - 1) * odd_fact n' | ||
end) | ||
: forall (n: nat), gt n 0 -> pow ((2 * INR n - 1) / exp 1) ((2 * n - 1) / 2) < oddfact n < pow ((2 * INR n + 1) / exp 1) ((2 * n + 1) / 2). | ||
(n : nat) | ||
(prododd : R := INR (\prod_(1 <= i < (n + 1)) (2 * i - 1))) | ||
(npos : gt n 0) | ||
: Rpower ((2 * INR n - 1) / exp 1) ((2 * INR n - 1) / 2) < prododd < Rpower ((2 * INR n + 1) / exp 1) ((2 * INR n + 1) / 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,11 +1,9 @@ | ||
Require Import Nat List Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1996_b3_solution : nat -> R := fun n => (2 * INR n ^ 3 + 3 * INR n ^ 2 - 11 * INR n + 18) / 6. | ||
Require Import Reals Coquelicot.Hierarchy Nat. | ||
Definition putnam_1996_b3_solution : nat -> R := (fun n => (2 * INR n ^ 3 + 3 * INR n ^ 2 - 11 * INR n + 18) / 6). | ||
Theorem putnam_1996_b3 | ||
(m: nat -> R) | ||
(n: nat) | ||
(hn : ge n 2) | ||
(hmub : sum_n (fun i => INR ((nth i (seq 1 (S n)) 0%nat) * (nth ((i + 1) mod n) (seq 1 (S n)) 0%nat))) n <= m n) | ||
(hm : sum_n (fun i => INR ((nth i (seq 1 (S n)) 0%nat) * (nth ((i + 1) mod n) (seq 1 (S n))) 0%nat)) n = m n) | ||
: m = putnam_1996_b3_solution. | ||
(n : nat) | ||
(xset : (nat -> nat) -> Prop := (fun x : nat -> nat => forall y : nat, (le 1 y /\ le y n) -> exists! i, (le 0 i /\ le i (n - 1)) /\ x i = y)) | ||
(xsum : (nat -> nat) -> R := (fun x : nat -> nat => sum_n (fun i : nat => INR (x i) * INR (x ((i + 1) mod n))) (n - 1))) | ||
(nge2 : ge n 2) | ||
: (exists x : nat -> nat, xset x /\ xsum x = putnam_1996_b3_solution n) /\ (forall x : nat -> nat, xset x -> xsum x <= putnam_1996_b3_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
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 | ||
(tetration := fix tetration' (b m: nat) : nat := | ||
match m with | ||
| O => 1 | ||
| S n' => b * pow_n b n' | ||
| S m' => b ^ (tetration' b m') | ||
end) | ||
: forall (n: nat), n >= 2 -> pown 2 n-1 mod n = pown 2 n-2. | ||
(n : nat) | ||
(hn : n >= 2) | ||
: (tetration 2 n) mod n = (tetration 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Require Import Reals Coquelicot.Derive. | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Theorem putnam_1998_a3 | ||
(f: R -> R) | ||
: continuity (Derive_n f 3) -> exists (a: R), (Derive_n f 0) a * (Derive_n f 1) a * (Derive_n f 2) a * (Derive_n f 3) a >= 0. | ||
(f : R -> R) | ||
(hf : (forall x : R, ex_derive f x /\ ex_derive_n f 2 x /\ ex_derive_n f 3 x) /\ continuity (Derive_n f 3)) | ||
: exists (a: R), (Derive_n f 0) a * (Derive_n f 1) a * (Derive_n f 2) a * (Derive_n f 3) a >= 0. | ||
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,13 +1,13 @@ | ||
Require Import Nat ZArith Reals Coquelicot.Coquelicot. | ||
Open Scope nat_scope. | ||
Definition putnam_1998_a4_solution (n: nat) := exists (k: nat), n = 6 * k + 1. | ||
Definition putnam_1998_a4_solution : nat -> Prop := (fun n : nat => exists k : nat, n = 6 * k + 1). | ||
Theorem putnam_1998_a4 | ||
(concatenate : nat -> nat -> nat := fun x y => Nat.pow 10 (Z.to_nat (floor (Rdiv (ln (INR y)) (ln 10))) + 1) * x + y) | ||
(a := fix A (n: nat) := | ||
match n with | ||
| O => O | ||
| S O => 1 | ||
| S ((S n'') as n') => concatenate (A n') (A n'') | ||
| S ((S n'') as n') => if eqb n'' O then 10 else (concatenate (A n') (A n'')) | ||
end) | ||
: forall (n: nat), a (n+1) mod 11 = 0 <-> putnam_1998_a4_solution n. | ||
: forall (n: nat), n >= 1 -> ((a (n-1)) mod 11 = 0 <-> putnam_1998_a4_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,10 +1,10 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Open Scope R. | ||
Definition putnam_1998_b1_solution := 1. | ||
Definition putnam_1998_b1_solution : R := 6. | ||
Theorem putnam_1998_b1 | ||
(f : R -> R := fun x => ((x + 1 / x) ^ 6 - (x ^ 6 + 1 / (x ^ 6)) - 2) / (x + 1 / x) ^ 3 + (x ^ 3 + 1 / (x ^ 3))) | ||
(f : R -> R := fun x => ((x + 1 / x) ^ 6 - (x ^ 6 + 1 / (x ^ 6)) - 2) / ((x + 1 / x) ^ 3 + (x ^ 3 + 1 / (x ^ 3)))) | ||
(m : R) | ||
(hm : exists (x: R), x > 0 -> f x = m) | ||
(hm : exists (x: R), x > 0 /\ f x = m) | ||
(hmub : forall (x: R), x > 0 -> f x >= m) | ||
: m = putnam_1998_b1_solution. | ||
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,5 +1,6 @@ | ||
Require Import Nat ZArith Reals Coquelicot.Coquelicot. | ||
Definition putnam_1998_b4_solution (m n: nat) := exists (m2 n2: nat), m mod (2 ^ m2) = 0%nat /\ m mod (2 ^ (m2 + 1)) <> 0%nat /\ n mod (2 ^ n2) = 0%nat /\ n mod (2 ^ n2 + 1) <> 0%nat. | ||
Definition putnam_1998_b4_solution : nat -> nat -> Prop := (fun m n : nat => forall m2 n2 : nat, (m mod (2 ^ m2) = 0%nat /\ m mod (2 ^ (m2 + 1)) <> 0%nat /\ n mod (2 ^ n2) = 0%nat /\ n mod (2 ^ n2 + 1) <> 0%nat) -> m2 <> n2). | ||
Theorem putnam_1998_b4 | ||
: forall (m n: nat), sum_n (fun i => Rpower (-1) (IZR (floor (INR i / INR m)) + IZR (floor (INR i / INR n)))) (m * n - 1) = 0 <-> putnam_1998_b4_solution m n. | ||
(hsum : nat -> nat -> R := (fun m n : nat => sum_n (fun i => Rpower (-1) (IZR (floor (INR i / INR m)) + IZR (floor (INR i / INR n)))) (m * n - 1))) | ||
: forall (m n: nat), (gt m 0 /\ gt n 0) -> (hsum m n = 0 <-> putnam_1998_b4_solution m n). | ||
Proof. Admitted. |
Oops, something went wrong.