Skip to content

Commit a945338

Browse files
Merge pull request #200 from trishullab/john
Coq and Isabelle 1987-1990 fixes
2 parents c5221eb + 5b6fc67 commit a945338

34 files changed

+101
-93
lines changed

coq/src/putnam_1987_a3.v

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ Require Import Reals Coquelicot.Coquelicot.
22
Open Scope R.
33
Definition putnam_1987_a3_solution := (False, True).
44
Theorem putnam_1987_a3
5-
(f g: R -> R)
6-
(x: R)
7-
: (((Derive_n f 2) x - 2 * (Derive_n f 1) x + f x = 2 * exp x /\ forall (x: R), f x > 0 -> forall (x: R), Derive_n f 1 x > 0) <-> fst putnam_1987_a3_solution) /\
8-
((((Derive_n g 2) x - 2 * (Derive_n g 1) x + g x = 2 * exp x /\ forall (x: R), Derive_n g 1 x > 0) -> forall (x: R), g x > 0) <-> snd putnam_1987_a3_solution).
5+
: ((forall (f: R -> R), (forall (x: R), ex_derive_n f 1 x /\ ex_derive_n f 2 x /\ (Derive_n f 2) x - 2 * (Derive_n f 1) x + f x = 2 * exp x /\ f x > 0)
6+
-> forall (x: R), Derive_n f 1 x > 0)
7+
<-> fst putnam_1987_a3_solution) /\
8+
((forall (g: R -> R), (forall (x: R), ex_derive_n g 1 x /\ ex_derive_n g 2 x /\ (Derive_n g 2) x - 2 * (Derive_n g 1) x + g x = 2 * exp x /\ Derive_n g 1 x > 0)
9+
-> forall (x: R), g x > 0)
10+
<-> snd putnam_1987_a3_solution).
911
Proof. Admitted.

coq/src/putnam_1987_b4.v

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
Require Import Reals Coquelicot.Coquelicot.
22
Open Scope R.
3-
Definition putnam_1987_b4_solution := (-1, PI).
3+
Definition putnam_1987_b4_solution := (True, -1, True, 0).
44
Theorem putnam_1987_b4
5-
(A := fix a (i j: nat) : (R * R):=
6-
match (i, j) with
7-
| (O, O) => (0.8, 0.6)
8-
| (S i', S j') =>
9-
let xn := fst (a i' j') in
10-
let yn := snd (a i' j') in
11-
(xn * cos yn - yn * sin yn,xn * sin yn + yn * cos yn)
12-
| (_, _) => (0, 0)
5+
(A := fix a (n: nat) : (R * R) :=
6+
match n with
7+
| O => (0.8, 0.6)
8+
| (S n') =>
9+
let (xn, yn) := a n' in
10+
(xn * cos yn - yn * sin yn, xn * sin yn + yn * cos yn)
1311
end)
14-
: Lim_seq (fun n => fst (A n 0%nat)) = fst putnam_1987_b4_solution /\
15-
Lim_seq (fun n => snd (A 0%nat n)) = snd putnam_1987_b4_solution.
12+
: let '(existsx, limx, existsy, limy) := putnam_1987_b4_solution in
13+
(ex_lim_seq (fun n => fst (A n)) <-> existsx) /\
14+
(existsx -> Lim_seq (fun n => fst (A n)) = limx) /\
15+
(ex_lim_seq (fun n => snd (A n)) <-> existsy) /\
16+
(existsy -> Lim_seq (fun n => snd (A n)) = limy).
1617
Proof. Admitted.

coq/src/putnam_1988_a2.v

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Open Scope R.
44
Definition putnam_1988_a2_solution := True.
55
Theorem putnam_1988_a2
66
(f : R -> R := fun x => exp (pow x 2))
7-
: exists (a b: R) (g: R -> R),
8-
forall (x: R), a < x < b -> Derive (compose f g) = compose (Derive f) (Derive g)
7+
: (exists (a b: R) (g: R -> R), a < b /\
8+
(exists x: R, a < x < b /\ g x <> 0) /\
9+
forall (x: R), a < x < b -> ex_derive g x /\ Derive (fun y => f y * g y) x = (Derive f x) * (Derive g x))
910
<-> putnam_1988_a2_solution.
1011
Proof. Admitted.

coq/src/putnam_1988_a3.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Require Import Reals Coquelicot.Coquelicot.
22
Open Scope R.
33
Definition putnam_1988_a3_solution (a: R) := a > 1/2.
44
Theorem putnam_1988_a3
5-
: forall (a: R), ex_finite_lim_seq (fun m => sum_n (fun n => Rpower (1/INR n * (1 / sin (1/INR n) - 1)) a) m) <-> putnam_1988_a3_solution a.
5+
: forall (a: R), ex_finite_lim_seq (fun m => sum_n_m (fun n => Rpower (1/INR n * (1 / sin (1/INR n)) - 1) a) 1 m) <-> putnam_1988_a3_solution a.
66
Proof. Admitted.

coq/src/putnam_1988_a4.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Require Import Reals Coquelicot.Coquelicot. From mathcomp Require Import fintype.
22
Definition putnam_1988_a4_solution : Prop * Prop := (True, False).
33
Theorem putnam_1988_a4
4-
(p : nat -> Prop := fun n : nat => (forall color : (R * R) -> 'I_n, exists p q : R * R, color p = color q /\ norm (fst p - fst q, snd p - snd q) = 1))
4+
(p : nat -> Prop := fun n : nat => (forall color : (R * R) -> 'I_n, exists p q : R * R, color p = color q /\ norm (fst p - fst q, snd p - snd q) = 1))
55
: let (a, b) := putnam_1988_a4_solution in ((p 3%nat) <-> a) /\ ((p 9%nat) <-> b).
6-
Proof. Admitted.
6+
Proof. Admitted.

coq/src/putnam_1988_a5.v

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Require Import Basics Reals.
22
Open Scope R.
33
Theorem putnam_1988_a5
44
: exists! (f: R -> R),
5-
forall (x: R), (x > 0 -> f x > 0) ->
6-
(compose f f) x = 6 * x - f x.
5+
(forall (x: R), x <= 0 -> f x = 0) /\
6+
forall (x: R), x > 0 ->
7+
(f x > 0 /\ (compose f f) x = 6 * x - f x).
78
Proof. Admitted.

coq/src/putnam_1988_b2.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Require Import Reals Coquelicot.Coquelicot.
22
Open Scope R.
33
Definition putnam_1988_b2_solution := True.
44
Theorem putnam_1988_b2
5-
: forall (a: R), a >= 0 -> forall (x: R), pow (x + 1) 2 >= a * (a + 1) ->
6-
pow x 2 >= a * (a - 1) <-> putnam_1988_b2_solution.
5+
: (forall (a: R), a >= 0 -> forall (x: R), pow (x + 1) 2 >= a * (a + 1) ->
6+
pow x 2 >= a * (a - 1)) <-> putnam_1988_b2_solution.
77
Proof. Admitted.

coq/src/putnam_1988_b3.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Require Import Reals Coquelicot.Coquelicot.
22
Definition putnam_1988_b3_solution := (1 + sqrt 3) / 2.
33
Theorem putnam_1988_b3
44
(r : Z -> R)
5-
(hr : forall (n: Z), Z.ge n 1 -> (exists c d : Z, (Z.ge c 0 /\ Z.ge d 0) /\ Z.eq (Z.add c d) n /\ r n = Rabs (IZR c - IZR d * sqrt 3)) /\ (forall c d : Z, (Z.ge c 0 /\ Z.ge d 0 /\ (Z.add c d) = n) -> Rabs (IZR c - IZR d * sqrt 3) >= r n))
6-
: putnam_1988_b3_solution > 0 /\ (forall n : Z, Z.ge n 1 -> r n <= putnam_1988_b3_solution) /\ (forall (g: R), g > 0 -> (forall (n: Z), Z.ge n 1 /\ r n <= g) -> g >= putnam_1988_b3_solution).
5+
(hr : forall (n: Z), Z.ge n 1 -> (exists c d : Z, Z.ge c 0 /\ Z.ge d 0 /\ (Z.add c d) = n /\ r n = Rabs (IZR c - IZR d * sqrt 3)) /\ (forall c d : Z, (Z.ge c 0 /\ Z.ge d 0 /\ (Z.add c d) = n) -> Rabs (IZR c - IZR d * sqrt 3) >= r n))
6+
: putnam_1988_b3_solution > 0 /\ (forall n : Z, Z.ge n 1 -> r n <= putnam_1988_b3_solution) /\ (forall (g: R), g > 0 -> (forall (n: Z), Z.ge n 1 -> r n <= g) -> g >= putnam_1988_b3_solution).
77
Proof. Admitted.

coq/src/putnam_1988_b4.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
Require Import Reals Coquelicot.Coquelicot.
22
Open Scope R.
33
Theorem putnam_1988_b4
4-
(b : nat -> (nat -> R) -> R := fun n a => Rpower (a n) (INR n/(INR n + 1)))
5-
: forall (a: nat -> R), (forall (n: nat), a n > 0) ->
6-
ex_finite_lim_seq (fun n => sum_n a n) -> ex_finite_lim_seq (fun n => sum_n (fun m => (b m a)) n).
4+
(a : nat -> R)
5+
(appos : (nat -> R) -> Prop := fun a' : nat -> R => forall n : nat, ge n 1 -> a' n > 0)
6+
(apconv : (nat -> R) -> Prop := fun a' : nat -> R => ex_finite_lim_seq (fun N => sum_n_m a' 1 N))
7+
(apposconv : (nat -> R) -> Prop := fun a' => appos a' /\ apconv a')
8+
: apposconv a -> apposconv (fun n => Rpower (a n) (INR n/(INR n + 1))).
79
Proof. Admitted.

coq/src/putnam_1988_b6.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Require Import Ensembles Finite_sets.
1+
Require Import Ensembles Finite_sets ZArith.
2+
Open Scope Z.
23
Theorem putnam_1988_b6
3-
(triangular : nat -> Prop := fun n => exists (m: nat), n = Nat.div (m * (m + 1)) 2)
4-
(E: Ensemble (nat*nat) := fun '(a, b) => exists (m: nat), triangular m <-> triangular (Nat.mul a m + b))
5-
: ~ exists (n: nat), cardinal (nat*nat) E n.
4+
(triangular : Z -> Prop := fun n => exists (m: Z), m >= 0 /\ n = (m * (m + 1)) / 2)
5+
(E: Ensemble (Z*Z) := fun '(a, b) => forall (m: Z), m > 0 -> (triangular m <-> triangular (Z.mul a m + b)))
6+
: ~ exists (n: nat), cardinal (Z*Z) E n.
67
Proof. Admitted.

0 commit comments

Comments
 (0)