Skip to content

Commit cd7c595

Browse files
committed
did isabelle and coq fixes for 2000
1 parent 6333f39 commit cd7c595

10 files changed

+30
-25
lines changed

coq/src/putnam_2000_a1.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Require Import Reals Coquelicot.Coquelicot.
2-
Definition putnam_2000_a1_solution (x A: R) := 0 < x < A ^ 2.
2+
Definition putnam_2000_a1_solution : R -> (R -> Prop) := (fun A : R => (fun x : R => 0 < x < A ^ 2)).
33
Theorem putnam_2000_a1
44
(A: R)
55
(hA : A > 0)
6-
: forall (x: nat -> R), Series x = A -> putnam_2000_a1_solution (Series (fun j => x j ^ 2)) A.
6+
: 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).
77
Proof. Admitted.

coq/src/putnam_2000_a4.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Require Import Reals Coquelicot.Coquelicot.
22
Theorem putnam_2000_a4
3-
: ex_finite_lim_seq (fun n => sum_n (fun x => sin (INR x) * sin ((INR x) ^ 2)) n).
3+
: ex_finite_lim_seq (fun B : nat => RInt (fun x : R => sin x * sin (x ^ 2)) 0 (INR B)).
44
Proof. Admitted.

coq/src/putnam_2000_a6.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Theorem putnam_2000_a6
44
(coeff : nat -> Z)
55
(f : R -> R := fun x => sum_n (fun i => (IZR (coeff i)) * (x^i)) n)
66
(a : nat -> R)
7-
(ha : a O = 0 /\ forall i : nat, a (S n) = f (a n))
7+
(ha : a O = 0 /\ forall i : nat, a (S i) = f (a i))
88
: (exists m : nat, gt m 0 /\ a m = 0) -> (a (S O) = 0 \/ a (S (S O)) = 0).
99
Proof. Admitted.

coq/src/putnam_2000_b1.v

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
Require Import List Nat Reals ZArith.
1+
Require Import List Nat Reals ZArith Ensembles Finite_sets.
22
Open Scope Z.
3-
Theorem putnam_2000_b1
4-
(a b c: nat -> Z)
5-
(n: nat)
6-
(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)
7-
: exists (l: list nat), ge (length l) (4 * n / 7) /\ forall (j: nat), In j l -> and (le 1 j) (le j n)
8-
-> 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.
3+
Theorem putnam_2000_b1
4+
(n : nat)
5+
(a b c : nat -> Z)
6+
(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)))
7+
(SSsize : Z -> Z -> Z -> nat)
8+
(nge1 : ge n 1)
9+
(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))
10+
(hSSsize : forall r s t : Z, cardinal nat (SS r s t) (SSsize r s t))
11+
: exists r s t : Z, Rge (INR (SSsize r s t)) (Rdiv (Rmult 4 (INR n)) 7).
912
Proof. Admitted.

coq/src/putnam_2000_b2.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Require Import Nat Reals.
22
Open Scope R.
33
Theorem putnam_2000_b2
4-
: 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.
4+
: 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.
55
Proof. Admitted.

coq/src/putnam_2000_b4.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Open Scope R_scope.
2-
Require Import Reals.
1+
Require Import Reals Coquelicot.Coquelicot.
32
Theorem putnam_2000_b4
4-
(f: R -> R)
5-
: continuity f -> forall x, f (2*x*x-1) = 2*x*(f x) -> forall x, -1 <= x <= 1 -> f x = 0.
3+
(f : R -> R)
4+
(hf : forall x : R, f (2*x*x-1) = 2*x*(f x))
5+
(f_cont : continuity f)
6+
: forall x : R, -1 <= x <= 1 -> f x = 0.
67
Proof. Admitted.

coq/src/putnam_2000_b5.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Require Import ZArith Ensembles Finite_sets.
22
Theorem putnam_2000_b5
3-
(S : nat -> Ensemble Z)
4-
(hSfin : forall n : nat, exists m : nat, cardinal _ (S n) m)
5-
(hSpos : forall n : nat, forall s : Z, In _ (S n) s -> Z.gt s 0)
6-
(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)))))
7-
: 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))).
3+
(SS : nat -> Ensemble Z)
4+
(hSSfin : forall n : nat, exists m : nat, cardinal _ (SS n) m)
5+
(hSSpos : forall n : nat, forall s : Z, In _ (SS n) s -> Z.gt s 0)
6+
(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)))))
7+
: 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))).
88
Proof. Admitted.

isabelle/putnam_2000_a5.thy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
theory putnam_2000_a5 imports
22
Complex_Main
33
"HOL-Analysis.Finite_Cartesian_Product"
4+
"HOL-Analysis.Elementary_Metric_Spaces"
45
begin
56

67
theorem putnam_2000_a5:
@@ -9,7 +10,7 @@ theorem putnam_2000_a5:
910
and S :: "(real^2) set"
1011
assumes rpos: "r > 0"
1112
and Scard: "finite S \<and> card S = 3"
12-
and pint: "\<forall> p \<in> S. p$1 = round (p$1) \<and> p$2 = round (p$2)"
13+
and pint: "\<forall> p \<in> S. p$1 \<in> \<int> \<and> p$2 \<in> \<int>"
1314
and pcirc: "\<forall> p \<in> S. p \<in> sphere z r"
1415
shows "\<exists> p \<in> S. \<exists> q \<in> S. dist p q \<ge> r powr (1 / 3)"
1516
sorry

isabelle/putnam_2000_b1.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ begin
33

44
(* uses (nat \<Rightarrow> int) instead of (Fin N \<Rightarrow> int) *)
55
theorem putnam_2000_b1:
6-
fixes n :: nat
6+
fixes N :: nat
77
and a b c :: "nat \<Rightarrow> int"
88
assumes Nge1: "N \<ge> 1"
99
and hodd: "\<forall>j::nat\<in>{0..(N-1)}. odd (a j) \<or> odd (b j) \<or> odd (c j)"

isabelle/putnam_2000_b4.thy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ begin
33

44
theorem putnam_2000_b4:
55
fixes f :: "real \<Rightarrow> real"
6-
assumes hf : "\<forall>x. f (2 * x^2 - 1) = 2 * x * f x"
6+
assumes hf : "\<forall>x::real. f (2 * x^2 - 1) = 2 * x * f x"
77
and f_cont : "continuous_on UNIV f"
8-
shows "\<forall>x. x \<ge> -1 \<and> x \<le> 1 \<longrightarrow> f x = 0"
8+
shows "\<forall>x::real. x \<ge> -1 \<and> x \<le> 1 \<longrightarrow> f x = 0"
99
sorry
1010

1111
end

0 commit comments

Comments
 (0)