-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/trishullab/PutnamBench into…
… george
- Loading branch information
Showing
53 changed files
with
151 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
From mathcomp Require Import ssrnat ssrnum ssralg fintype poly. | ||
From mathcomp.analysis Require Import reals. From mathcomp Require Import ssrnat ssrnum ssralg fintype poly. | ||
Open Scope ring_scope. | ||
Theorem putnam_1999_a2 | ||
(R: numDomainType) | ||
(R : realType) | ||
(p : {poly R}) | ||
: forall x, p.[x] > 0 = true -> exists (k : nat) (f : nat -> {poly R}), p = \sum_(i < k) (f i)*(f i). | ||
(hpos : forall x, (p.[x] >= 0) = true) | ||
: exists (k : nat) (f : nat -> {poly R}), p = \sum_(i < k) ((f i)*(f i)). | ||
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,5 +1,5 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Definition putnam_1999_a4_solution := 9/32. | ||
Definition putnam_1999_a4_solution : R := 9/32. | ||
Theorem putnam_1999_a4: | ||
Series (fun m => Series (fun n => (INR m ^ 2 * INR n) / (3 ^ m *(INR n * 3 ^ m + INR m * 3 ^ n)))) = putnam_1999_a4_solution. | ||
Series (fun m => Series (fun n => (INR (m + 1) ^ 2 * INR (n + 1)) / (3 ^ (m + 1) * (INR (n + 1) * 3 ^ (m + 1) + INR (m + 1) * 3 ^ (n + 1))))) = putnam_1999_a4_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,5 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Theorem putnam_1999_a5 | ||
(p : (nat -> R) -> R -> R := fun a x => sum_n (fun i => a i * x ^ i) 2000) | ||
: forall (a: nat -> R), exists (c: R), Rabs (p a 0) <= c * RInt (fun x => Rabs (p a x)) (-1) 1. | ||
(p : (nat -> R) -> R -> R := fun a x => sum_n (fun i => a i * x ^ i) 1999) | ||
: exists (c: R), forall (a: nat -> R), Rabs (p a 0) <= c * RInt (fun x => Rabs (p a x)) (-1) 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Theorem putnam_1999_a6 | ||
(A := fix a (n: nat) := | ||
(A : nat -> R := fix a (n: nat) := | ||
match n with | ||
| O => 1 | ||
| S O => 2 | ||
| S (S O) => 24 | ||
| S (S ((S n'') as n') as n) => (6 * a n ^ 2 * a n'' - 8 * a n * a n' ^ 2) / (a n' * a n'') | ||
end) | ||
: forall (n: nat), exists (k: nat), A n = INR (n * k). | ||
| S (S ((S n'') as n') as n) => (6 * (a n) ^ 2 * a n'' - 8 * a n * (a n') ^ 2) / (a n' * a n'') | ||
end) | ||
: forall (n: nat), exists (k: Z), A n = INR (n + 1) * IZR 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 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,7 @@ | ||
Require Import Reals List Znumtheory. | ||
Theorem putnam_1999_b6 | ||
(A : list Z) | ||
: forall (x: Z), In x A -> x > 1 -> forall (n: Z), exists (s: Z), In s A -> Zis_gcd s n 1 \/ Zis_gcd s n s -> exists (s: Z) (t: Z) (p: Z), In s A /\ In t A /\ prime p -> Zis_gcd s t p. | ||
(Age1 : forall (x: Z), In x A -> x > 1) | ||
(hgcd : forall (n: Z), exists (s: Z), In s A /\ (Zis_gcd s n 1 \/ Zis_gcd s n s)) | ||
: exists (s: Z) (t: Z) (p: Z), In s A /\ In t A /\ Zis_gcd s t p /\ prime p. | ||
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. | ||
Definition putnam_2000_a1_solution (x A: R) := 0 < x < A ^ 2. | ||
Definition putnam_2000_a1_solution : R -> (R -> Prop) := (fun A : R => (fun x : R => 0 < x < A ^ 2)). | ||
Theorem putnam_2000_a1 | ||
(A: R) | ||
(hA : A > 0) | ||
: forall (x: nat -> R), Series x = A -> putnam_2000_a1_solution (Series (fun j => x j ^ 2)) A. | ||
: forall SS : R, ((exists x : nat -> R, (forall j : nat, x j > 0) /\ Series x = A /\ Series (fun j => (x j) ^ 2) = SS) <-> (putnam_2000_a1_solution A) SS). | ||
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,4 +1,4 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Theorem putnam_2000_a4 | ||
: ex_finite_lim_seq (fun n => sum_n (fun x => sin (INR x) * sin ((INR x) ^ 2)) n). | ||
: ex_finite_lim_seq (fun B : nat => RInt (fun x : R => sin x * sin (x ^ 2)) 0 (INR B)). | ||
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,12 @@ | ||
Require Import List Nat Reals ZArith. | ||
Require Import List Nat Reals ZArith Ensembles Finite_sets. | ||
Open Scope Z. | ||
Theorem putnam_2000_b1 | ||
(a b c: nat -> Z) | ||
(n: nat) | ||
(habc : forall (j: nat), and (le 1 j) (le j n) -> Z.odd (a j) = true \/ Z.odd (b j) = true \/ Z.odd (c j) = true) | ||
: exists (l: list nat), ge (length l) (4 * n / 7) /\ forall (j: nat), In j l -> and (le 1 j) (le j n) | ||
-> exists (r s t: Z), Z.odd (Z.add (Z.add (Z.mul r (a j)) (Z.mul s (b j))) (Z.mul t (c j))) = true. | ||
Theorem putnam_2000_b1 | ||
(n : nat) | ||
(a b c : nat -> Z) | ||
(SS : Z -> Z -> Z -> Ensemble nat := (fun r s t : Z => (fun j : nat => le 1 j /\ le j n /\ Z.odd (Z.add (Z.add (Z.mul r (a j)) (Z.mul s (b j))) (Z.mul t (c j))) = true))) | ||
(SSsize : Z -> Z -> Z -> nat) | ||
(nge1 : ge n 1) | ||
(habc : forall j : nat, ((le 1 j) /\ (le j n)) -> (Z.odd (a j) = true \/ Z.odd (b j) = true \/ Z.odd (c j) = true)) | ||
(hSSsize : forall r s t : Z, cardinal nat (SS r s t) (SSsize r s t)) | ||
: exists r s t : Z, Rge (INR (SSsize r s t)) (Rdiv (Rmult 4 (INR n)) 7). | ||
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,5 @@ | ||
Require Import Nat Reals. | ||
Open Scope R. | ||
Theorem putnam_2000_b2 | ||
: forall (n m: nat), and (ge n m) (ge m 1) -> exists (c: Z), INR (gcd m n) / INR n * Binomial.C n m = IZR c. | ||
: forall (n m: nat), and (ge n m) (ge m 1) -> exists (c: Z), (INR (gcd m n) / INR n) * Binomial.C n m = IZR 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,6 +1,7 @@ | ||
Open Scope R_scope. | ||
Require Import Reals. | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Theorem putnam_2000_b4 | ||
(f: R -> R) | ||
: continuity f -> forall x, f (2*x*x-1) = 2*x*(f x) -> forall x, -1 <= x <= 1 -> f x = 0. | ||
(f : R -> R) | ||
(hf : forall x : R, f (2*x*x-1) = 2*x*(f x)) | ||
(f_cont : continuity f) | ||
: forall x : R, -1 <= x <= 1 -> f x = 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,8 +1,8 @@ | ||
Require Import ZArith Ensembles Finite_sets. | ||
Theorem putnam_2000_b5 | ||
(S : nat -> Ensemble Z) | ||
(hSfin : forall n : nat, exists m : nat, cardinal _ (S n) m) | ||
(hSpos : forall n : nat, forall s : Z, In _ (S n) s -> Z.gt s 0) | ||
(hSdef : forall n : nat, forall a : Z, (In _ (S (n + 1)) a) <-> ((In _ (S n) (Z.sub a 1) /\ ~ (In _ (S n) a)) \/ (In _ (S n) a /\ ~ (In _ (S n) (Z.sub a 1))))) | ||
: forall n : nat, exists N : nat, N >= n /\ Same_set _ (S N) (Union _ (S 0) (fun i : Z => exists a : Z, In _ (S 0) a /\ i = Z.add a (Z.of_nat N))). | ||
(SS : nat -> Ensemble Z) | ||
(hSSfin : forall n : nat, exists m : nat, cardinal _ (SS n) m) | ||
(hSSpos : forall n : nat, forall s : Z, In _ (SS n) s -> Z.gt s 0) | ||
(hSSdef : forall n : nat, forall a : Z, (In _ (SS (n + 1)) a) <-> ((In _ (SS n) (Z.sub a 1) /\ ~ (In _ (SS n) a)) \/ (In _ (SS n) a /\ ~ (In _ (SS n) (Z.sub a 1))))) | ||
: forall n : nat, exists N : nat, N >= n /\ Same_set _ (SS N) (Union _ (SS 0) (fun i : Z => exists a : Z, In _ (SS 0) a /\ i = Z.add a (Z.of_nat 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 Ensembles RelationClasses. | ||
Theorem putnam_2001_a1 | ||
(A : Type) | ||
(op: A->A->A) | ||
: (forall (a b: A), op (op a b) a = b) -> (forall (a b: A), op a (op b a) = b). | ||
(op : A->A->A) | ||
(hop : forall (a b: A), op (op a b) a = b) | ||
: forall (a b: A), op a (op b a) = b. | ||
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,8 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Definition putnam_2001_a3_solution (m: Z) := exists (n: Z), m = Z.mul n n \/ m = Z.mul 2 (Z.mul n n). | ||
Require Import Reals Coquelicot.Coquelicot Ensembles. | ||
Definition putnam_2001_a3_solution : Ensemble Z := (fun m : Z => exists (n: Z), m = Z.mul n n \/ m = Z.mul 2 (Z.mul n n)). | ||
Theorem putnam_2001_a3 | ||
(P : Z -> R -> R := fun m x => x ^ 4 - (2 * IZR m + 4) * x ^ 2 + (IZR m - 2) ^ 2) | ||
(p : (nat -> Z) -> R -> nat -> R := fun a x n => sum_n (fun i => IZR (a i) * x ^ i) n) | ||
: forall (m: Z), exists (a1 a2: nat -> Z) (n1 n2: nat), forall (x: R), P m x = p a1 x n1 * p a2 x n2 <-> putnam_2001_a3_solution m. | ||
: forall (m: Z), (exists (a1 a2: nat -> Z) (n1 n2: nat), (exists i : nat, gt i 0 /\ le i n1 /\ a1 i <> 0%Z) /\ (exists i : nat, gt i 0 /\ le i n2 /\ a2 i <> 0%Z) /\ | ||
(forall (x: R), P m x = p a1 x n1 * p a2 x n2)) <-> putnam_2001_a3_solution 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,7 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Definition putnam_2001_b2_solution (x y: R) := x = (3 ^ (1 / 5) + 1) / 2 /\ y = (3 ^ (1 / 5) - 1) / 2. | ||
Definition putnam_2001_b2_solution : R -> R -> Prop := (fun x y : R => x = (3 ^ (1 / 5) + 1) / 2 /\ y = (3 ^ (1 / 5) - 1) / 2). | ||
Theorem putnam_2001_b2 | ||
: forall (x y: R), | ||
1 / x + 1 / (2 * y) = (x ^ 2 + 3 * y ^ 2) * (3 * x ^ 2 + y ^ 2) /\ | ||
1 / x - 1 / (2 * y) = 2 * (y ^ 4 - x ^ 4) <-> putnam_2001_b2_solution x y. | ||
(1 / x + 1 / (2 * y) = (x ^ 2 + 3 * y ^ 2) * (3 * x ^ 2 + y ^ 2) /\ | ||
1 / x - 1 / (2 * y) = 2 * (y ^ 4 - x ^ 4)) <-> putnam_2001_b2_solution 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,6 @@ | ||
Require Import Reals Coquelicot.Coquelicot. | ||
Definition putnam_2001_b3_solution := 3. | ||
Definition putnam_2001_b3_solution : R := 3. | ||
Theorem putnam_2001_b3 | ||
(n: nat) | ||
(hn : ge n 0) | ||
(closest : nat -> R := fun n => let n := INR n in Rmin ((n - sqrt n) - IZR (floor (n - sqrt n))) (IZR (floor (n + 1 - sqrt n)) - (n - sqrt n))) | ||
: Series (fun n => sum_n (fun n => (Rpower 2 (closest n) + Rpower 2 (- closest n)) / (2 ^ n)) n) = putnam_2001_b3_solution. | ||
(closest : nat -> R := (fun n : nat => IZR (floor (sqrt (INR n) + 0.5)))) | ||
: Series (fun n : nat => sum_n_m (fun n' : nat => (Rpower 2 (closest n') + Rpower 2 (-closest n')) / (2 ^ n')) 1 n) = putnam_2001_b3_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,13 +1,13 @@ | ||
Require Import Basics List QArith. From mathcomp Require Import bigop fintype seq ssrbool ssreflect ssrnat ssrnum ssralg finfun. | ||
Require Import Basics List QArith. From mathcomp Require Import bigop fintype seq ssrbool ssreflect ssrnat ssrnum ssralg finfun. | ||
Open Scope Q_scope. | ||
Definition putnam_2001_b4_solution := False. | ||
Definition image (f: Q -> Q) := fun y => exists(x: Q), f x = y. | ||
Definition putnam_2001_b4_solution : Prop := True. | ||
Definition image (f: Q -> Q) := fun y => exists (x: Q), (~ In x [:: -1; 0; 1]) /\ f x = y. | ||
Fixpoint 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. | ||
Theorem putnam_2001_b4 | ||
(f : Q -> Q := fun x => x - 1 / x) | ||
: exists (x: Q), ~ In x [:: -1; 0; 1] -> forall (n: nat), (image (compose_n f n)) x <-> putnam_2001_b4_solution. | ||
: (~exists (x: Q), (~ In x [:: -1; 0; 1]) /\ (forall (n: nat), ge n 1 -> (image (compose_n f n)) x)) <-> putnam_2001_b4_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,7 +1,7 @@ | ||
Require Import Nat Reals Coquelicot.Coquelicot. | ||
Definition putnam_2001_b6_solution := True. | ||
Definition putnam_2001_b6_solution : Prop := True. | ||
Theorem putnam_2001_b6 | ||
(a: nat -> R) | ||
(ha : forall (i j: nat), lt i j -> a i < a j) | ||
: Lim_seq (fun n => a n / INR n) = 0 -> forall (n: nat), exists (m: nat), gt m n /\ forall (i: nat), and (le 1 i) (le i (n - 1)) -> a (sub n i) + a (add n i) < 2 * a n /\ a (sub m i) + a (add m i) < 2 * a m. | ||
(aposinc : (nat -> R) -> Prop := (fun a : nat -> R => forall n : nat, ge n 1 -> (a n > 0 /\ a n < a (add n 1)))) | ||
(alim : (nat -> R) -> Prop := (fun a : nat -> R => Lim_seq (fun n : nat => a (add n 1) / INR (add n 1)) = 0)) | ||
: (forall a : nat -> R, (aposinc a /\ alim a) -> forall m : nat, exists n : nat, gt n m /\ (forall i : nat, (le 1 i /\ le i (n - 1)) -> a (sub n i) + a (add n i) < 2 * a n)) <-> putnam_2001_b6_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
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
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
Oops, something went wrong.