name
stringlengths
14
14
lean4_statement
stringlengths
75
1.48k
βŒ€
informal_statement
stringlengths
47
898
βŒ€
informal_solution
stringlengths
16
303
βŒ€
tags
stringclasses
36 values
coq_statement
stringlengths
91
1.51k
βŒ€
isabelle_statement
stringlengths
160
2.65k
βŒ€
lean4_proof
float64
putnam_1999_b3
abbrev putnam_1999_b3_solution : ℝ := sorry -- 3 theorem putnam_1999_b3 (A : Set (ℝ Γ— ℝ) := {xy : ℝ Γ— ℝ | 0 ≀ xy.1 ∧ xy.1 < 1 ∧ 0 ≀ xy.2 ∧ xy.2 < 1}) (S : ℝ β†’ ℝ β†’ ℝ := fun x y => βˆ‘' m : β„•, βˆ‘' n : β„•, if (m > 0 ∧ n > 0 ∧ 1/2 ≀ m/n ∧ m/n ≀ 2) then x^m * y^n else 0) : Tendsto (fun xy : (ℝ Γ— ℝ) => (1 - xy.1 * xy.2^2) * (1 - xy.1^2 * xy.2) * (S xy.1 xy.2)) (𝓝[A] ⟨1,1⟩) (𝓝 putnam_1999_b3_solution) := sorry
Let $A=\{(x,y):0\leq x,y<1\}$. For $(x,y)\in A$, let \[S(x,y) = \sum_{\frac{1}{2}\leq \frac{m}{n}\leq 2} x^m y^n,\] where the sum ranges over all pairs $(m,n)$ of positive integers satisfying the indicated inequalities. Evaluate \[\lim_{(x,y)\rightarrow (1,1), (x,y)\in A} (1-xy^2)(1-x^2y)S(x,y).\]
Show that the answer is 3.
['algebra']
null
theory putnam_1999_b3 imports Complex_Main begin definition putnam_1999_b3_solution :: real where "putnam_1999_b3_solution \<equiv> undefined" (* 3 *) theorem putnam_1999_b3: fixes A :: "(real \<times> real) set" and S :: "real \<Rightarrow> real \<Rightarrow> real" defines "A \<equiv> {xy :: real \<times> real. 0 \<le> (fst xy) \<and> (fst xy) < 1 \<and> 0 \<le> (snd xy) \<and> (snd xy) < 1}" and "S \<equiv> \<lambda> x y. \<Sum> m :: nat. \<Sum> n :: nat. (if (m > 0 \<and> n > 0 \<and> 1 / 2 \<le> m / n \<and> m / n \<le> 2) then x ^ m * y ^ n else 0)" shows "filterlim (\<lambda> xy :: real \<times> real. (1 - (fst xy) * (snd xy) ^ 2) * (1 - (fst xy) ^ 2 * (snd xy)) * (S (fst xy) (snd xy))) (nhds putnam_1999_b3_solution) (at (1, 1) within A)" sorry end
null
putnam_1999_b4
theorem putnam_1999_b4 (f : ℝ β†’ ℝ) (hf : ContDiff ℝ 3 f) (hpos: βˆ€ n ≀ 3, βˆ€ x : ℝ, iteratedDeriv n f x > 0) (hle : βˆ€ x : ℝ, iteratedDeriv 3 f x ≀ f x) : βˆ€ x : ℝ, deriv f x < 2 * (f x) := sorry
Let $f$ be a real function with a continuous third derivative such that $f(x), f'(x), f''(x), f'''(x)$ are positive for all $x$. Suppose that $f'''(x)\leq f(x)$ for all $x$. Show that $f'(x)<2f(x)$ for all $x$.
null
['analysis']
null
theory putnam_1999_b4 imports Complex_Main "HOL-Analysis.Derivative" begin theorem putnam_1999_b4: fixes f :: "real\<Rightarrow>real" assumes f_cont : "continuous_on UNIV ((deriv^^3) f)" and f_pos : "\<forall>x. f x > 0" and f'_pos : "\<forall>x. deriv f x > 0" and f''_pos : "\<forall>x. (deriv^^2) f x > 0" and f'''_pos : "\<forall>x. (deriv^^3) f x > 0" and hf : "\<forall>x. (deriv^^3) f x \<le> f x" shows "\<forall>x. deriv f x < 2 * f x" sorry end
null
putnam_1999_b5
abbrev putnam_1999_b5_solution : β„• β†’ ℝ := sorry -- fun n => 1 - n^2/4 theorem putnam_1999_b5 (n : β„•) (hn : n β‰₯ 3) (theta : ℝ := 2 * Real.pi / n) (A : Matrix (Fin n) (Fin n) ℝ := fun j k => Real.cos ((j.1 + 1) * theta + (k.1 + 1) * theta)) : ((1 : Matrix (Fin n) (Fin n) ℝ) + A).det = putnam_1999_b5_solution n := sorry
For an integer $n\geq 3$, let $\theta=2\pi/n$. Evaluate the determinant of the $n\times n$ matrix $I+A$, where $I$ is the $n\times n$ identity matrix and $A=(a_{jk})$ has entries $a_{jk}=\cos(j\theta+k\theta)$ for all $j,k$.
Show that the answer is $(1 - n^2)/4$.
['linear_algebra']
null
theory putnam_1999_b5 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" "HOL-Analysis.Determinants" begin definition putnam_1999_b5_solution :: "nat \<Rightarrow> real" where "putnam_1999_b5_solution \<equiv> undefined" (* \<lambda> n. 1 - n ^ 2 / 4 *) theorem putnam_1999_b5: fixes n :: nat and theta :: real and A :: "real^'n^'n" and idx :: "'n \<Rightarrow> nat" defines "theta \<equiv> 2 * pi / n" and "A \<equiv> \<chi> j k. cos (idx j * theta + idx k * theta)" assumes hn: "n \<ge> 3" and hncard: "CARD('n) = n" and idxbij: "\<forall> i \<in> {1..n}. \<exists>! m :: 'n. idx m = i" shows "det (mat 1 + A) = putnam_1999_b5_solution n" sorry end
null
putnam_1999_b6
theorem putnam_1999_b6 (S : Finset β„€) (hSgt : βˆ€ s : β„€, s ∈ S β†’ s > 1) (hSgcd : βˆ€ n : β„€, βˆƒ s : S, Int.gcd s n = 1 ∨ Int.gcd s n = (s : β„€)) : βˆƒ s t : S, Prime (Int.gcd s t) := sorry
Let $S$ be a finite set of integers, each greater than 1. Suppose that for each integer $n$ there is some $s\in S$ such that $\gcd(s,n)=1$ or $\gcd(s,n)=s$. Show that there exist $s,t\in S$ such that $\gcd(s,t)$ is prime.
null
['number_theory']
null
theory putnam_1999_b6 imports Complex_Main "HOL-Computational_Algebra.Primes" begin theorem putnam_1999_b6: fixes S::"int set" assumes S_fin: "finite S" and Sge1: "\<forall>s \<in> S. s > 1" and hgcd: "\<forall>n::int. \<exists>s \<in> S. (gcd s n) = 1 \<or> (gcd s n) = s" shows "\<exists> s \<in> S. \<exists> t \<in> S. prime(gcd s t)" sorry end
null
putnam_1974_a1
abbrev putnam_1974_a1_solution : β„• := sorry -- 11 theorem putnam_1974_a1 (conspiratorial : Set β„€ β†’ Prop := fun S => βˆ€ a ∈ S, βˆ€ b ∈ S, βˆ€ c ∈ S, (a > 0 ∧ b > 0 ∧ c > 0) ∧ ((a β‰  b ∧ b β‰  c ∧ a β‰  c) β†’ (Int.gcd a b > 1 ∨ Int.gcd b c > 1 ∨ Int.gcd a c > 1))) : (βˆ€ S : Set β„€, S βŠ† Icc 1 16 β†’ conspiratorial S β†’ S.encard ≀ putnam_1974_a1_solution) ∧ (βˆƒ S : Set β„€, S βŠ† Icc 1 16 ∧ conspiratorial S ∧ S.encard = putnam_1974_a1_solution) := sorry
Call a set of positive integers 'conspiratorial' if no three of them are pairwise relatively prime. What is the largest number of elements in any conspiratorial subset of the integers 1 through 16?
Show that the answer is 11.
['number_theory']
Section putnam_1974_a1. Require Import Nat List Ensembles Finite_sets. From mathcomp Require Import div fintype perm ssrbool. Definition putnam_1974_a1_solution := 11. Theorem putnam_1974_a1 (s : list nat := seq 1 17) : exists (m: nat), ((forall (p : nat -> Prop), let E: Ensemble nat := fun x : nat => List.In x s /\ p x in ~ exists (p q r : nat), p <> q /\ q <> r /\ coprime p q /\ coprime q r /\ coprime p r /\ exists (n: nat), cardinal nat E n /\ n <= m) /\ (exists (p : nat -> Prop), let E: Ensemble nat := fun x => List.In x s /\ p x in ~ exists (p q r : nat), p <> q /\ q <> r /\ coprime p q /\ coprime q r /\ coprime p r /\ exists (n: nat), cardinal nat E m)) <-> m = putnam_1974_a1_solution. Proof. Admitted. End putnam_1974_a1.
theory putnam_1974_a1 imports Complex_Main begin definition putnam_1974_a1_solution :: nat where "putnam_1974_a1_solution \<equiv> undefined" (* 11 *) theorem putnam_1974_a1: fixes conspiratorial :: "nat set \<Rightarrow> bool" defines "conspiratorial \<equiv> (\<lambda>S::nat set. (\<forall>a\<in>S. \<forall>b\<in>S. \<forall>c\<in>S. a \<noteq> 0 \<and> ((a \<noteq> b \<and> b \<noteq> c \<and> a \<noteq> c) \<longrightarrow> (gcd a b > 1 \<or> gcd b c > 1 \<or> gcd a c > 1))))" shows "(GREATEST Scard::nat. (\<exists>S::nat set. S \<subseteq> {1..16} \<and> conspiratorial S \<and> Scard = card S)) = putnam_1974_a1_solution" sorry end
null
putnam_1974_a3
abbrev putnam_1974_a3_solution : (Set β„•) Γ— (Set β„•) := sorry -- ({p : β„• | p.Prime ∧ p ≑ 1 [MOD 8]}, {p : β„• | p.Prime ∧ p ≑ 5 [MOD 8]}) theorem putnam_1974_a3 (assmption : βˆ€ p : β„•, p.Prime ∧ p > 2 β†’ ((βˆƒ m n : β„€, p = m^2 + n^2) ↔ p ≑ 1 [MOD 4])) : βˆ€ p : β„•, ((p.Prime ∧ p > 2 ∧ (βˆƒ x y : β„€, p = x^2 + 16*y^2)) ↔ p ∈ putnam_1974_a3_solution.1) ∧ ((p.Prime ∧ p > 2 ∧ (βˆƒ x y : β„€, p = 4*x^2 + 4*x*y + 5*y^2)) ↔ p ∈ putnam_1974_a3_solution.2) := sorry
A well-known theorem asserts that a prime $p > 2$ can be written as the sum of two perfect squres if and only if $p \equiv 1 \bmod 4$. Find which primes $p > 2$ can be written in each of the following forms, using (not necessarily positive) integers $x$ and $y$: (a) $x^2 + 16y^2$, (b) $4x^2 + 4xy + 5y^2$.
Show that that the answer to (a) is the set of primes which are $1 \bmod 8$, and the solution to (b) is the set of primes which are $5 \bmod 8$.
['number_theory']
Section putnam_1974_a3. Require Import Nat ZArith Znumtheory. Definition putnam_1974_a3_solution1 := fun x => x mod 8 = 1. Definition putnam_1974_a3_solution2 := fun x => x mod 8 = 5. Theorem putnam_1974_a3: forall (p: nat), prime (Z.of_nat p) /\ odd p = true -> (exists (m n: Z), (Z.of_nat p) = m*m + 16*n*n <-> putnam_1974_a3_solution1 (Z.of_nat p)) /\ (exists (m n: Z), (Z.of_nat p) = 4*m*m + 4*m*n + 5*n*n <-> putnam_1974_a3_solution2 (Z.of_nat p)). Proof. Admitted. End putnam_1974_a3.
theory putnam_1974_a3 imports Complex_Main "HOL-Number_Theory.Cong" begin definition putnam_1974_a3_solution :: "(nat set) \<times> (nat set)" where "putnam_1974_a3_solution \<equiv> undefined" (* ({p::nat. prime p \<and> [p = 1] (mod 8)}, {p::nat. prime p \<and> [p = 5] (mod 8)}) *) theorem putnam_1974_a3: assumes assmption: "\<forall>p::nat. (prime p \<and> p > 2) \<longrightarrow> ((\<exists>m n::nat. p = m^2 + n^2) \<longleftrightarrow> [p = 1] (mod 4))" shows "\<forall>p::nat. ((prime p \<and> p > 2 \<and> (\<exists>x y::int. p = x^2 + 16*y^2)) \<longleftrightarrow> p \<in> fst putnam_1974_a3_solution) \<and> ((prime p \<and> p > 2 \<and> (\<exists>x y::int. p = 4*x^2 + 4*x*y + 5*y^2)) \<longleftrightarrow> p \<in> snd putnam_1974_a3_solution)" sorry end
null
putnam_1974_a4
abbrev putnam_1974_a4_solution : β„• β†’ ℝ := sorry -- (fun n => (n / 2^(n-1)) * (n-1).choose (floor ((n-1)/2))) theorem putnam_1974_a4 (n : β„•) (hn : n > 0) : (1 : ℝ)/(2^(n-1)) * βˆ‘ k in Finset.Icc 0 ((ceil (n/2)) - 1), (n - 2*k)*(n.choose k) = putnam_1974_a4_solution n := sorry
Evaluate in closed form: $\frac{1}{2^{n-1}} \sum_{k < n/2} (n-2k)*{n \choose k}$.
Show that the solution is $\frac{n}{2^{n-1}} * {(n-1) \choose \left[ (n-1)/2 \right]}$.
['algebra']
Section putnam_1974_a4. Require Import Nat Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1974_a4_solution (n: nat) := INR n * (Binomial.C (n - 1) (n / 2) - 1) / (2 ^ (n - 1)). Theorem putnam_1974_a4 : forall (n: nat), 1 / (2 ^ (pred n)) * sum_n (fun i => (INR n - 2 * INR (S i)) * Binomial.C n (i + 1)) (n / 2) = putnam_1974_a4_solution n. Proof. Admitted. End putnam_1974_a4.
theory putnam_1974_a4 imports Complex_Main begin definition putnam_1974_a4_solution :: "nat \<Rightarrow> real" where "putnam_1974_a4_solution \<equiv> undefined" (* (\<lambda>n::nat. (n / 2^(n-1)) * ((n-1) choose (nat \<lfloor>(n-1)/2\<rfloor>))) *) theorem putnam_1974_a4: fixes n :: nat assumes hn: "n > 0" shows "1/(2^(n-1)) * (\<Sum>k::nat=0..((nat \<lceil>n/2\<rceil>)-1). (n - 2*k) * (n choose k)) = putnam_1974_a4_solution n" sorry end
null
putnam_1974_a6
abbrev putnam_1974_a6_solution : β„• := sorry -- 25 theorem putnam_1974_a6 (n : β„€ := 10^6) (hdivnallx : Polynomial β„€ β†’ Prop := fun f => Monic f ∧ (βˆ€ x : β„€, (n : β„€) ∣ f.eval x)) : sInf {d : β„• | βˆƒ f : Polynomial β„€, hdivnallx f ∧ d = f.natDegree} = putnam_1974_a6_solution := sorry
Given $n$, let $k(n)$ be the minimal degree of any monic integral polynomial $f$ such that the value of $f(x)$ is divisible by $n$ for every integer $x$. Find the value of $k(1000000)$.
Show that the answer is 25.
['algebra']
Section putnam_1974_a6. Require Import Factorial Reals Coquelicot.Coquelicot. Definition putnam_1974_a6_solution1 (n N : nat) := fact N mod n = 0%nat /\ forall (N': nat), fact N' mod n = 0%nat -> ge N' N. Definition putnam_1974_a6_solution2 : nat := 25. Theorem putnam_1974_a6 (f : nat -> nat) (cond : nat -> (nat -> Z) -> Prop := fun n coeff => coeff n = Z.of_nat 1 /\ let p : nat -> R := fun x => sum_n (fun i => IZR (coeff i) * INR x ^ i) (n + 1) in (forall (m: Z), Z.to_nat (floor (p (Z.to_nat m))) mod n = 0%nat)) (hf : forall (n: nat), exists (coeff: nat -> Z), cond (f n) coeff) (hflb : forall (n: nat) (coeff: nat -> Z), cond n coeff -> ge n (f n)) : forall (n: nat), exists N, f n = N /\ putnam_1974_a6_solution1 n N /\ f 1000000%nat = putnam_1974_a6_solution2. Proof. Admitted. End putnam_1974_a6.
theory putnam_1974_a6 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1974_a6_solution :: nat where "putnam_1974_a6_solution \<equiv> undefined" (* 25 *) theorem putnam_1974_a6: fixes n :: nat and hdivnallx :: "(int poly) \<Rightarrow> bool" defines "n \<equiv> 10^6" and "hdivnallx \<equiv> (\<lambda>f::int poly. lead_coeff f = 1 \<and> (\<forall>x::int. n dvd (poly f x)))" shows "(LEAST d::nat. (\<exists>f::int poly. hdivnallx f \<and> d = degree f)) = putnam_1974_a6_solution" sorry end
null
putnam_1974_b3
theorem putnam_1974_b3 (Ξ± : ℝ) (ha : Real.cos (Real.pi * Ξ±) = (1 : ℝ)/3) : Irrational Ξ± := sorry
Prove that if $\alpha$ is a real number such that $\cos (\pi \alpha) = 1/3$, the $\alpha$ is irrational.
null
['number_theory']
Section putnam_1974_b3. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1974_b3_solution := 1. Theorem putnam_1974_b3 : ~ exists (p q: Z), acos (1 / 3) / PI = IZR p / IZR q. Proof. Admitted. End putnam_1974_b3.
theory putnam_1974_b3 imports Complex_Main begin theorem putnam_1974_b3: fixes \<alpha> :: real assumes ha: "cos (pi*\<alpha>) = 1/3" shows "\<alpha> \<notin> \<rat>" sorry end
null
putnam_1974_b4
theorem putnam_1974_b4 (f : ℝ Γ— ℝ β†’ ℝ) (hfcontx : βˆ€ y : ℝ, Continuous (fun x => f ⟨x, y⟩)) (hfconty : βˆ€ x : ℝ, Continuous (fun y => f ⟨x, y⟩)) : βˆƒ g : β„• β†’ (ℝ Γ— ℝ β†’ ℝ), (βˆ€ n : β„•, Continuous (g n)) ∧ (βˆ€ x y : ℝ, Tendsto (fun n => g n ⟨x, y⟩) atTop (𝓝 (f ⟨x, y⟩))) := sorry
Let $f : \mathbb{R} \to \mathbb{R}$ be continuous in each variable seperately. Show that there exists a sequence of continuous functions $g_n : \mathbb{R}^2 \to \mathbb{R}$ such that $f(x,y) = \lim_{n \to \infty} g_n(x,y)$ for all $(x,y) \in \mathbb{R}^2$.
null
['analysis']
null
theory putnam_1974_b4 imports Complex_Main begin theorem putnam_1974_b4: fixes f :: "(real \<times> real) \<Rightarrow> real" assumes hfcontx: "\<forall>y::real. continuous_on UNIV (\<lambda>x::real. f (x,y))" assumes hfconty: "\<forall>x::real. continuous_on UNIV (\<lambda>y::real. f (x,y))" shows "\<exists>g::nat\<Rightarrow>((real\<times>real)\<Rightarrow>real). (\<forall>n::nat. continuous_on UNIV (g n)) \<and> (\<forall>x y::real. filterlim (\<lambda>n::nat. g n (x,y)) (nhds (f (x,y))) at_top)" sorry end
null
putnam_1974_b5
theorem putnam_1974_b5 : βˆ€ n β‰₯ 0, βˆ‘ i in Finset.Icc (0 : β„•) n, (n^i : ℝ)/(Nat.factorial i) > (Real.exp n)/2 := sorry
Show that $1 + (n/1!) + (n^2/2!) + \dots + (n^n/n!) > e^n/2$ for every integer $n \geq 0$.
null
['analysis']
Section putnam_1974_b5. Require Import Factorial Reals Coquelicot.Coquelicot. Definition putnam_1974_b5_solution := 1. Theorem putnam_1974_b5 (f : nat -> R -> R := fun n x => sum_n (fun i => x ^ i / INR (fact i)) (n + 1)) : forall (n : nat), f n (INR n) > exp PI / 2. Proof. Admitted. End putnam_1974_b5.
theory putnam_1974_b5 imports Complex_Main begin theorem putnam_1974_b5: shows "\<forall>n::nat\<ge>0. (\<Sum>i::nat=0..n. (n^i)/(fact i)) > (exp n)/2" sorry end
null
putnam_1974_b6
abbrev putnam_1974_b6_solution : (β„• Γ— β„• Γ— β„•) := sorry -- ((2^1000 - 1)/3, (2^1000 - 1)/3, 1 + (2^1000 - 1)/3) theorem putnam_1974_b6 (n : β„€ := 1000) (count0 : β„• := {S | S βŠ† Finset.Icc 1 n ∧ S.card ≑ 0 [MOD 3]}.ncard) (count1 : β„• := {S | S βŠ† Finset.Icc 1 n ∧ S.card ≑ 1 [MOD 3]}.ncard) (count2 : β„• := {S | S βŠ† Finset.Icc 1 n ∧ S.card ≑ 2 [MOD 3]}.ncard) : (count0, count1, count2) = putnam_1974_b6_solution := sorry
For a set with $1000$ elements, how many subsets are there whose candinality is respectively $\equiv 0 \bmod 3, \equiv 1 \bmod 3, \equiv 2 \bmod 3$?
Show that there answer is that there are $(2^1000-1)/3$ subsets of cardinality $\equiv 0 \bmod 3$ and $\equiv 1 \bmod 3$, and $1 + (2^1000-1)/3$ subsets of cardinality $\equiv 2 \bmod 3$.
['set_theory']
Section putnam_1974_b6. Require Import Ensembles Finite_sets Reals Coquelicot.Coquelicot. Definition putnam_1974_b6_solution1 : nat := 21000/3. Definition putnam_1974_b6_solution2 : nat := 21000/3. Definition putnam_1974_b6_solution3 : nat := 21000/3 + 1. Definition putnam_1974_b6_solution4 : nat := 21001/3 + 1. Definition putnam_1974_b6_solution5 : nat := 21001/3. Definition putnam_1974_b6_solution6 : nat := 21001/3 + 1. Theorem putnam_1974_b6 (E : Ensemble R) (E' : Ensemble R) (pres : R -> Prop) (hE : cardinal R E 1000) (hE' : cardinal R E 1001) (habc : nat -> Ensemble (Ensemble R) := fun val => fun (subE : Ensemble R) => exists (subEsz: nat), (forall x: R, subE x -> E x /\ pres x) /\ cardinal R subE subEsz /\ subEsz mod 3 = val) (habc' : nat -> Ensemble (Ensemble R) := fun val => fun (subE' : Ensemble R) => exists (subEsz': nat), (forall x: R, subE' x -> E' x /\ pres x) /\ cardinal R subE' subEsz' /\ subEsz' mod 3 = val) : cardinal (Ensemble R) (habc 0%nat) putnam_1974_b6_solution1 /\ cardinal (Ensemble R) (habc 1%nat) putnam_1974_b6_solution2 /\ cardinal (Ensemble R) (habc 2%nat) putnam_1974_b6_solution3 /\ cardinal (Ensemble R) (habc' 0%nat) putnam_1974_b6_solution4 /\ cardinal (Ensemble R) (habc' 1%nat) putnam_1974_b6_solution5 /\ cardinal (Ensemble R) (habc' 2%nat) putnam_1974_b6_solution6. Proof. Admitted. End putnam_1974_b6.
theory putnam_1974_b6 imports Complex_Main "HOL-Number_Theory.Cong" begin definition putnam_1974_b6_solution :: "nat \<times> nat \<times> nat" where "putnam_1974_b6_solution \<equiv> undefined" (* (nat (round ((2^1000 - 1)/3)), nat (round ((2^1000 - 1)/3)), 1 + nat (round ((2^1000 - 1)/3))) *) theorem putnam_1974_b6: fixes n :: nat and count0 :: nat and count1 :: nat and count2 :: nat defines "n \<equiv> 1000" and "count0 \<equiv> card {S::nat set. S \<subseteq> {1..n} \<and> [card S = 0] (mod 3)}" and "count1 \<equiv> card {S::nat set. S \<subseteq> {1..n} \<and> [card S = 1] (mod 3)}" and "count2 \<equiv> card {S::nat set. S \<subseteq> {1..n} \<and> [card S = 2] (mod 3)}" shows "(count0, count1, count2) = putnam_1974_b6_solution" sorry end
null
putnam_1998_a3
theorem putnam_1998_a3 (f : ℝ β†’ ℝ) (hf : ContDiff ℝ 3 f) : βˆƒ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) β‰₯ 0 := sorry
Let $f$ be a real function on the real line with continuous third derivative. Prove that there exists a point $a$ such that \[f(a)\cdot f'(a) \cdot f''(a) \cdot f'''(a)\geq 0 .\]
null
['analysis']
null
theory putnam_1998_a3 imports Complex_Main "HOL-Analysis.Derivative" begin theorem putnam_1998_a3: fixes f :: "real \<Rightarrow> real" assumes hf : "continuous_on UNIV ((deriv^^3) f)" shows "\<exists> a :: real. f a * deriv f a * (deriv^^2) f a * (deriv^^3) f a \<ge> 0" sorry end
null
putnam_1998_a4
abbrev putnam_1998_a4_solution : Set β„• := sorry -- {n | n ≑ 1 [MOD 6]} theorem putnam_1998_a4 (A : β„• β†’ β„•) (hA1 : A 1 = 0) (hA2 : A 2 = 1) (hA : βˆ€ n : β„•, n > 2 β†’ A n = Nat.ofDigits 10 (Nat.digits 10 (A (n - 2)) ++ Nat.digits 10 (A (n - 1)))) : putnam_1998_a4_solution = {n | 11 ∣ A n} := sorry
Let $A_1=0$ and $A_2=1$. For $n>2$, the number $A_n$ is defined by concatenating the decimal expansions of $A_{n-1}$ and $A_{n-2}$ from left to right. For example $A_3=A_2 A_1=10$, $A_4=A_3 A_2 = 101$, $A_5=A_4 A_3 = 10110$, and so forth. Determine all $n$ such that $11$ divides $A_n$.
Show that the solution is those n for which n can be written as 6k+1 for some integer k.
['algebra']
Section putnam_1998_a4. 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. Theorem putnam_1998_a4: let concatenate (x y : nat) : nat := Nat.pow 10 (Z.to_nat (floor (Rdiv (ln (INR y)) (ln 10))) + 1) * x + y in let fix A (n: nat) := match n with | O => O | S O => 1 | S ((S n'') as n') => concatenate (A n') (A n'') end in forall (n: nat), A (n+1) mod 11 = 0 <-> putnam_1998_a4_solution n. Proof. Admitted. End putnam_1998_a4.
theory putnam_1998_a4 imports Complex_Main "HOL-Number_Theory.Cong" begin definition putnam_1998_a4_solution::"nat set" where "putnam_1998_a4_solution \<equiv> undefined" (* {n::nat. [n = 1] (mod 6)} *) fun digits::"nat \<Rightarrow> nat list" where "digits n = (if n < 10 then [n] else ([n mod 10::nat] @ digits (n div 10::nat)))" fun from_digits::"nat list \<Rightarrow> nat" where "from_digits L = foldr (\<lambda>a. \<lambda>b. a + 10 * b) L 0" theorem putnam_1998_a4: fixes A::"nat\<Rightarrow>nat" assumes hA1 : "A 1 = 0" and hA2 : "A 2 = 1" and hA : "\<forall>n::nat > 2. A n = from_digits (digits (A (n-2)) @ digits (A (n-1)))" shows "putnam_1998_a4_solution = {n::nat. 11 dvd (A n)}" sorry end
null
putnam_1998_a5
theorem putnam_1998_a5 (k : β„•) (c : Fin k β†’ (ℝ Γ— ℝ)) (r : Fin k β†’ ℝ) (hr : βˆ€ i : Fin k, r i > 0) (E : Set (ℝ Γ— ℝ)) (hE : E βŠ† ⋃ i : Fin k, ball (c i) (r i)) : βˆƒ (n : β„•) (t : Fin n β†’ Fin k), (βˆ€ i j : Fin n, i β‰  j β†’ (ball (c (t i)) (r (t i)) ∩ ball (c (t j)) (r (t j)) = βˆ…)) ∧ E βŠ† ⋃ i : Fin n, ball (c (t i)) (3 * (r (t i))) := sorry
Let $\mathcal F$ be a finite collection of open discs in $\mathbb R^2$ whose union contains a set $E\subseteq \mathbb R^2$. Show that there is a pairwise disjoint subcollection $D_1,\ldots, D_n$ in $\mathcal F$ such that \[E\subseteq \cup_{j=1}^n 3D_j.\] Here, if $D$ is the disc of radius $r$ and center $P$, then $3D$ is the disc of radius $3r$ and center $P$.
null
['analysis']
null
theory putnam_1998_a5 imports Complex_Main "HOL-Analysis.Elementary_Metric_Spaces" begin (* Note: Boosted domain to infinite set *) theorem putnam_1998_a5: fixes k::nat and c::"nat \<Rightarrow> (real \<times> real)" and r::"nat \<Rightarrow> real" and E::"(real \<times> real) set" assumes hr : "\<forall>i \<in> {0..<k}. r i > 0" and hE : "E \<subseteq> (\<Union> i \<in> {0..<k}. ball (c i) (r i))" shows "\<exists>n::nat. \<exists>t::nat\<Rightarrow>nat. (\<forall>i \<in> {0..<n}. \<forall>j \<in> {0..<n}. i \<noteq> j \<longrightarrow> ((ball (c (t i)) (r (t i)) \<inter> (ball (c (t j)) (r (t j))) = {}))) \<and> E \<subseteq> (\<Union> i \<in> {0..<n}. ball (c (t i)) (3 * (r (t i))))" sorry end
null
putnam_1998_b1
abbrev putnam_1998_b1_solution : ℝ := sorry -- 6 theorem putnam_1998_b1 : sInf {((x + 1/x)^6 - (x^6 + 1/x^6) - 2)/((x + 1/x)^3 + (x^3 + 1/x^3)) | x > (0 : ℝ)} = putnam_1998_b1_solution := sorry
Find the minimum value of \[\frac{(x+1/x)^6-(x^6+1/x^6)-2}{(x+1/x)^3+(x^3+1/x^3)}\] for $x>0$.
Show that the minimum value is 6.
['algebra']
Section putnam_1998_b1. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1998_b1_solution := 1. Theorem putnam_1998_b1: let f (x: R) := ((x + 1 / x) ^ 6 - (x ^ 6 + 1 / (x ^ 6)) - 2) / (x + 1 / x) ^ 3 + (x ^ 3 + 1 / (x ^ 3)) in exists (minval: R), (forall (x: R), x > 0 -> f x >= minval) /\ (exists (x: R), x > 0 -> f x = minval) -> minval = putnam_1998_b1_solution. Proof. Admitted. End putnam_1998_b1.
theory putnam_1998_b1 imports Complex_Main begin definition putnam_1998_b1_solution::real where "putnam_1998_b1_solution \<equiv> undefined" (* 6 *) theorem putnam_1998_b1: shows "putnam_1998_b1_solution = (LEAST y. (\<exists>x::real > 0. y = ((x+1/x)^6 - (x^6 + 1/x^6) - 2) / ((x+1/x)^3 + (x^3 +1/x^3))))" sorry end
null
putnam_1998_b2
abbrev putnam_1998_b2_solution : ℝ β†’ ℝ β†’ ℝ := sorry -- fun a b => if a > b then Real.sqrt (2*a^2 + 2*b^2) else 0 theorem putnam_1998_b2 (a b : ℝ) (hab : 0 < b ∧ b < a) : sInf {d : ℝ | βˆƒ (c : ℝ) (x : ℝ), d = Euclidean.dist (a, b) (c, 0) + Euclidean.dist (c, 0) (x, x) + Euclidean.dist (a, b) (x, x) ∧ Euclidean.dist (a, b) (c, 0) + Euclidean.dist (c, 0) (x, x) > Euclidean.dist (a, b) (x, x) ∧ Euclidean.dist (a, b) (c, 0) + Euclidean.dist (a, b) (x, x) > Euclidean.dist (c, 0) (x, x) ∧ Euclidean.dist (c, 0) (x, x) + Euclidean.dist (a, b) (x, x) > Euclidean.dist (a, b) (c, 0)} = putnam_1998_b2_solution a b := sorry
Given a point $(a,b)$ with $0<b<a$, determine the minimum perimeter of a triangle with one vertex at $(a,b)$, one on the $x$-axis, and one on the line $y=x$. You may assume that a triangle of minimum perimeter exists.
Show that the solution is $\sqrt{2a^2 + 2b^2}.
['geometry', 'algebra']
null
theory putnam_1998_b2 imports Complex_Main "HOL-Analysis.Topology_Euclidean_Space" begin definition putnam_1998_b2_solution::"real\<Rightarrow>real\<Rightarrow>real" where "putnam_1998_b2_solution \<equiv> undefined" (* \<lambda>a. \<lambda>b. sqrt (2*a^2 + 2*b^2) *) theorem putnam_1998_b2: fixes a b::real assumes hab : "0 < b \<and> b < a" shows "putnam_1998_b2_solution a b = (LEAST p. \<exists>c x::real. p = dist (a, b) (c, 0) + dist (c, 0) (x, x) + dist (a, b) (x, x) \<and> dist (a, b) (c, 0) + dist (c, 0) (x, x) > dist (a, b) (x, x) \<and> dist (a, b) (c, 0) + dist (a, b) (x, x) > dist (c, 0) (x, x) \<and> dist (c, 0) (x, x) + dist (a, b) (x, x) > dist (a, b) (c, 0))" sorry end
null
putnam_1998_b4
abbrev putnam_1998_b4_solution : Set (β„• Γ— β„•) := sorry -- {nm | let ⟨n,m⟩ := nm; multiplicity 2 n β‰  multiplicity 2 m} theorem putnam_1998_b4 (hsum : β„• β†’ β„• β†’ β„€ := fun n m => βˆ‘ i in Finset.range (m * n), (-1)^(i/m + i/n)) : βˆ€ n m : β„•, n > 0 ∧ m > 0 β†’ ((hsum n m) = 0 ↔ ⟨n, m⟩ ∈ putnam_1998_b4_solution) := sorry
Find necessary and sufficient conditions on positive integers $m$ and $n$ so that \[\sum_{i=0}^{mn-1} (-1)^{\lfloor i/m \rfloor +\lfloor i/n\rfloor}=0.\]
Show that the sum is 0 if and only if the largest powers of $2$ dividing $m$ and $n$ are different.
['number_theory']
Section putnam_1998_b4. 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. 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. Proof. Admitted. End putnam_1998_b4.
theory putnam_1998_b4 imports Complex_Main "HOL-Computational_Algebra.Factorial_Ring" begin definition putnam_1998_b4_solution::"nat\<Rightarrow>nat\<Rightarrow>bool" where "putnam_1998_b4_solution \<equiv> undefined" (* \<lambda>n. \<lambda>m. multiplicity 2 n \<noteq> multiplicity 2 m *) theorem putnam_1998_b4: fixes hsum::"nat\<Rightarrow>nat\<Rightarrow>int" defines "hsum \<equiv> \<lambda>n. \<lambda>m. (\<Sum>i=0..<m*n. (-1)^(i div m + i div n))" shows "\<forall>n m::nat. n > 0 \<and> m > 0 \<longrightarrow> (hsum n m = 0 \<longleftrightarrow> putnam_1998_b4_solution n m)" sorry end
null
putnam_1998_b5
abbrev putnam_1998_b5_solution : β„• := sorry -- 1 theorem putnam_1998_b5 (N : β„• := βˆ‘ i in Finset.range 1998, 10^i) : putnam_1998_b5_solution = (Nat.floor (10^1000 * Real.sqrt N)) % 10 := sorry
Let $N$ be the positive integer with 1998 decimal digits, all of them 1; that is, \[N=1111\cdots 11.\] Find the thousandth digit after the decimal point of $\sqrt N$.
Show that the thousandth digit is 1.
['number_theory']
Section putnam_1998_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1998_b5_solution : nat := 1. Theorem putnam_1998_b5: let N := sum_n (fun i => 10^i) 1998 in Z.to_nat (floor (10^1000 * sqrt N)) mod 10 = putnam_1998_b5_solution. Proof. Admitted. End putnam_1998_b5.
theory putnam_1998_b5 imports Complex_Main begin definition putnam_1998_b5_solution::nat where "putnam_1998_b5_solution \<equiv> undefined" (* 1 *) theorem putnam_1998_b5: fixes N::nat defines "N \<equiv> (\<Sum>i=0..<1998. 10^i)" shows "putnam_1998_b5_solution = (\<lfloor>10^1000 * sqrt N\<rfloor> mod 10)" sorry end
null
putnam_1998_b6
theorem putnam_1998_b6 : βˆ€ a b c : β„€, βˆƒ n : β„€, n > 0 ∧ Β¬(βˆƒ k : β„€, k = Real.sqrt (n^3 + a * n^2 + b * n + c)) := sorry
Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\sqrt{n^3+an^2+bn+c}$ is not an integer.
null
['number_theory']
null
theory putnam_1998_b6 imports Complex_Main begin theorem putnam_1998_b6: fixes a b c :: int shows "\<exists> n:: int > 0 . sqrt (n^3 + a * n^2 + b * n + c) \<notin> \<int>" sorry end
null
putnam_2006_a3
theorem putnam_2006_a3 (x : β„€ β†’ β„€) (hxlo : βˆ€ k : β„€, 0 ≀ k ∧ k ≀ 2006 β†’ x k = k) (hxhi : βˆ€ k : β„€, k β‰₯ 2006 β†’ x (k + 1) = x k + x (k - 2005)) : (βˆƒ i : β„•, i > 0 ∧ βˆ€ j : Finset.range 2005, 2006 ∣ x (i + j)) := sorry
Let $1, 2, 3, \dots, 2005, 2006, 2007, 2009, 2012, 2016, \dots$ be a sequence defined by $x_k = k$ for $k=1, 2, \dots, 2006$ and $x_{k+1} = x_k + x_{k-2005}$ for $k \geq 2006$. Show that the sequence has $2005$ consecutive terms each divisible by $2006$.
null
['algebra']
null
theory putnam_2006_a3 imports Complex_Main begin theorem putnam_2006_a3: fixes x :: "nat \<Rightarrow> nat" assumes hxlo: "\<forall> k \<in> {1 .. 2006}. x k = k" and hxhi: "\<forall> k \<ge> 2006. x (k + 1) = x k + x (k - 2005)" shows "\<exists> i :: nat. i > 0 \<and> (\<forall> j \<in> {0 ..< 2005}. 2006 dvd x (i + j))" sorry end
null
putnam_2006_a4
abbrev putnam_2006_a4_solution : β„• β†’ ℝ := sorry -- (fun n : β„• => (n + 1) / 3) theorem putnam_2006_a4 (n : β„•) (pnat : Equiv.Perm (Fin n) β†’ (β„• β†’ β„•)) (pcount : Equiv.Perm (Fin n) β†’ β„•) (ngt1 : n > 1) (hpnat : βˆ€ p : Equiv.Perm (Fin n), βˆ€ k : Fin n, (pnat p) k = p k) (hpcount : βˆ€ p : Equiv.Perm (Fin n), pcount p = {k : Fin n | (k.1 = 0 ∨ (pnat p) (k - 1) < (pnat p) k) ∧ (k = n - 1 ∨ (pnat p) k > (pnat p) (k + 1))}.encard) : (βˆ‘ p : Equiv.Perm (Fin n), pcount p) / {p : Equiv.Perm (Fin n) | true}.ncard = putnam_2006_a4_solution n := sorry
Let $S=\{1,2,\dots,n\}$ for some integer $n>1$. Say a permutation $\pi$ of $S$ has a \emph{local maximum} at $k \in S$ if \begin{enumerate} \item[(i)] $\pi(k)>\pi(k+1)$ for $k=1$; \item[(ii)] $\pi(k-1)<\pi(k)$ and $\pi(k)>\pi(k+1)$ for $1<k<n$; \item[(iii)] $\pi(k-1)<\pi(k)$ for $k=n$. \end{enumerate} (For example, if $n=5$ and $\pi$ takes values at $1,2,3,4,5$ of $2,1,4,5,3$, then $\pi$ has a local maximum of 2 at $k=1$, and a local maximum of 5 at $k=4$.) What is the average number of local maxima of a permutation of $S$, averaging over all permutations of $S$?
Show that the average number of local maxima is $\frac{n+1}{3}$.
['algebra']
null
theory putnam_2006_a4 imports Complex_Main "HOL-Combinatorics.Permutations" begin (* uses (nat \<Rightarrow> nat) instead of (Equiv.Perm (Fin n)) *) definition putnam_2006_a4_solution :: "nat \<Rightarrow> real" where "putnam_2006_a4_solution \<equiv> undefined" (* (\<lambda>n::nat. (n+1) / 3) *) theorem putnam_2006_a4: fixes n :: nat and nperms :: "(nat \<Rightarrow> nat) set" and pcount :: "(nat \<Rightarrow> nat) \<Rightarrow> nat" assumes ngt1: "n > 1" and hnperms: "nperms \<equiv> {p::nat\<Rightarrow>nat. p permutes {0..(n-1)} \<and> (\<forall>i::nat\<ge>n. p i = i)}" and hpcount: "\<forall>p::nat\<Rightarrow>nat. pcount p = card {k::nat\<in>{0..(n-1)}. (k = 0 \<or> p (k-1) < p k) \<and> (k = n-1 \<or> p k > p (k+1))}" shows "(\<Sum>p\<in>nperms. pcount p) / card nperms = putnam_2006_a4_solution n" sorry end
null
putnam_2006_a5
abbrev putnam_2006_a5_solution : β„• β†’ β„€ := sorry -- (fun n : β„• => if (n ≑ 1 [MOD 4]) then n else -n) theorem putnam_2006_a5 (n : β„•) (theta : ℝ) (a : Set.Icc 1 n β†’ ℝ) (nodd : Odd n) (thetairr : Irrational (theta / Real.pi)) (ha : βˆ€ k : Set.Icc 1 n, a k = Real.tan (theta + (k * Real.pi) / n)) : (βˆ‘ k : Set.Icc 1 n, a k) / (∏ k : Set.Icc 1 n, a k) = putnam_2006_a5_solution n := sorry
Let $n$ be a positive odd integer and let $\theta$ be a real number such that $\theta/\pi$ is irrational. Set $a_k=\tan(\theta+k\pi/n)$, $k=1,2,\dots,n$. Prove that $\frac{a_1+a_2+\cdots+a_n}{a_1a_2 \cdots a_n}$ is an integer, and determine its value.
Show that $\frac{a_1+\cdots+a_n}{a_1 \cdots a_n}=\begin{cases} n & n \equiv 1 \pmod{4} \\ -n & n \equiv 3 \pmod{4}. \end{cases}$
['algebra']
Section putnam_2006_a5. Require Import Nat Reals Coquelicot.Coquelicot. Definition putnam_2006_a5_solution (n: nat) := if eqb (n mod 4) (1%nat) then (INR n) else (-1 * INR n). Theorem putnam_2006_a5: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in forall (n: nat) (th: R), odd n = true /\ ~ exists (p q: Z), th / PI = IZR (p / q) /\ let a (k: nat) := tan (th + INR k * PI / INR n) in sum_n a n / prod_n a n = putnam_2006_a5_solution n. Proof. Admitted. End putnam_2006_a5.
theory putnam_2006_a5 imports Complex_Main begin (* uses (nat \<Rightarrow> real) instead of ({1..n} \<Rightarrow> real) *) definition putnam_2006_a5_solution :: "nat \<Rightarrow> int" where "putnam_2006_a5_solution \<equiv> undefined" (* (\<lambda>n::nat. if ([n = 1] (mod 4)) then n else -n) *) theorem putnam_2006_a5: fixes n :: nat and theta :: real and a :: "nat \<Rightarrow> real" assumes nodd: "odd n" and thetairr: "theta/pi \<notin> \<rat>" and ha: "\<forall>k::nat\<in>{1..n}. a k = tan (theta + (k*pi)/n)" shows "(\<Sum>k::nat=1..n. a k) / (\<Prod>k::nat=1..n. a k) = putnam_2006_a5_solution n" sorry end
null
putnam_2006_b2
theorem putnam_2006_b2 (n : β„•) (npos : n > 0) (X : Finset ℝ) (hXcard : X.card = n) : (βˆƒ S βŠ† X, S β‰  βˆ… ∧ βˆƒ m : β„€, |m + βˆ‘ s in S, s| ≀ 1 / (n + 1)) := sorry
Prove that, for every set $X = \{x_1, x_2, \dots, x_n\}$ of $n$ real numbers, there exists a non-empty subset $S$ of $X$ and an integer $m$ such that \[ \left| m + \sum_{s \in S} s \right| \leq \frac{1}{n+1}. \]
null
['analysis']
Section putnam_2006_b2. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_2006_b2 (n : nat) (npos : gt n 0) (X : list R) (hXcard : length X = n) : exists (presS: R -> Prop) (m: Z) (S: list R), (neq (length S) 0) /\ (forall (x: R), In x S <-> (In x X /\ presS x)) /\ (Rabs (IZR m + (fold_left Rplus S 0)) <= 1 / INR (n + 1)). Proof. Admitted. End putnam_2006_b2.
theory putnam_2006_b2 imports Complex_Main begin theorem putnam_2006_b2: fixes n :: nat and X :: "real set" assumes npos: "n > 0" and hXcard: "finite X \<and> card X = n" shows "\<exists> S \<subseteq> X. (S \<noteq> {}) \<and> (\<exists> m :: int. \<bar>m + (\<Sum> s \<in> S. s)\<bar> \<le> 1 / (n + 1))" sorry end
null
putnam_2006_b3
abbrev putnam_2006_b3_solution : β„• β†’ β„• := sorry -- (fun n : β„• => (Nat.choose n 2) + 1) theorem putnam_2006_b3 (SABpart : Finset (Fin 2 β†’ ℝ) β†’ Finset (Finset (Fin 2 β†’ ℝ)) β†’ Prop) (LS : Finset (Fin 2 β†’ ℝ) β†’ β„•) (n : β„•) (hSABpart : βˆ€ (S : Finset (Fin 2 β†’ ℝ)) (AB : Finset (Finset (Fin 2 β†’ ℝ))), SABpart S AB = (AB.card = 2 ∧ βˆƒ A ∈ AB, βˆƒ B ∈ AB, (A βˆͺ B = S) ∧ (A ∩ B = βˆ…) ∧ (βˆƒ m b : ℝ, (βˆ€ p ∈ A, p 1 > m * p 0 + b) ∧ (βˆ€ p ∈ B, p 1 < m * p 0 + b)))) (hLS : βˆ€ S : Finset (Fin 2 β†’ ℝ), LS S = {AB : Finset (Finset (Fin 2 β†’ ℝ)) | SABpart S AB}.encard) (npos : n > 0) : (βˆƒ S : Finset (Fin 2 β†’ ℝ), S.card = n ∧ LS S = putnam_2006_b3_solution n) ∧ (βˆ€ S : Finset (Fin 2 β†’ ℝ), S.card = n β†’ LS S ≀ putnam_2006_b3_solution n) := sorry
Let $S$ be a finite set of points in the plane. A linear partition of $S$ is an unordered pair $\{A,B\}$ of subsets of $S$ such that $A \cup B=S$, $A \cap B=\emptyset$, and $A$ and $B$ lie on opposite sides of some straight line disjoint from $S$ ($A$ or $B$ may be empty). Let $L_S$ be the number of linear partitions of $S$. For each positive integer $n$, find the maximum of $L_S$ over all sets $S$ of $n$ points.
Show that the maximum is $\binom{n}{2}+1$.
['geometry']
null
theory putnam_2006_b3 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin definition putnam_2006_b3_solution :: "nat \<Rightarrow> nat" where "putnam_2006_b3_solution \<equiv> undefined" (* (\<lambda>n::nat. n choose 2 + 1) *) theorem putnam_2006_b3: fixes SABpart :: "((real^2) set) \<Rightarrow> (((real^2) set) set) \<Rightarrow> bool" and LS :: "((real^2) set) \<Rightarrow> nat" and n :: nat assumes hSABpart: "\<forall>(S::(real^2) set)(AB::((real^2) set) set). SABpart S AB = (card AB = 2 \<and> (\<exists>A\<in>AB. \<exists>B\<in>AB. A \<union> B = S \<and> A \<inter> B = {} \<and> (\<exists>m b::real. (\<forall>p\<in>A. p$2 > m*p$1 + b) \<and> (\<forall>p\<in>B. p$2 < m*p$1 + b))))" and hLS: "\<forall>S::(real^2) set. LS S = card {AB::((real^2) set) set. SABpart S AB}" and npos: "n > 0" shows "(GREATEST LSS::nat. (\<exists>S::(real^2) set. card S = n \<and> LS S = LSS)) = putnam_2006_b3_solution n" sorry end
null
putnam_2006_b4
abbrev putnam_2006_b4_solution : β„• β†’ β„• := sorry -- fun k ↦ 2 ^ k theorem putnam_2006_b4 (n : β„•) (npos : n > 0) (k : β„•) (hk : k ≀ n) (Z : Set (Fin n β†’ ℝ) := {P : Fin n β†’ ℝ | βˆ€ j : Fin n, P j = 0 ∨ P j = 1}) (max : β„•) (hmaxeq : βˆƒ V : Subspace ℝ (Fin n β†’ ℝ), Module.rank V = k ∧ (Z ∩ V).ncard = max) (hmaxub : βˆ€ V : Subspace ℝ (Fin n β†’ ℝ), Module.rank V = k β†’ (Z ∩ V).ncard ≀ max) : (max = putnam_2006_b4_solution k) := sorry
Let $Z$ denote the set of points in $\mathbb{R}^n$ whose coordinates are $0$ or $1$. (Thus $Z$ has $2^n$ elements, which are the vertices of a unit hypercube in $\mathbb{R}^n$.) Given a vector subspace $V$ of $\mathbb{R}^n$, let $Z(V)$ denote the number of members of $Z$ that lie in $V$. Let $k$ be given, $0 \leq k \leq n$. Find the maximum, over all vector subspaces $V \subseteq \mathbb{R}^n$ of dimension $k$, of the number of points in $V \cap Z$.
Prove that the maximum is $2^k$.
['linear_algebra']
null
theory putnam_2006_b4 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin definition putnam_2006_b4_solution :: "nat \<Rightarrow> nat" where "putnam_2006_b4_solution \<equiv> undefined" (* (\<lambda>k::nat. 2^k) *) theorem putnam_2006_b4: fixes n :: nat and k :: nat and Z :: "(real^'n) set" and max :: nat assumes npos: "n > 0" and pncard: "CARD('n) = n" and hk: "k \<le> n" defines "Z \<equiv> {P::real^'n. (\<forall>j::'n. P$j = 0 \<or> P$j = 1)}" and "max \<equiv> GREATEST ZVcard::nat. (\<exists>V::(real^'n) set. subspace V \<and> dim V = k \<and> ZVcard = card (Z \<inter> V))" shows "max = putnam_2006_b4_solution k" sorry end
null
putnam_2006_b5
abbrev putnam_2006_b5_solution : ℝ := sorry -- 1 / 16 theorem putnam_2006_b5 (I : (ℝ β†’ ℝ) β†’ ℝ := fun f ↦ ∫ x in (0)..1, x ^ 2 * (f x)) (J : (ℝ β†’ ℝ) β†’ ℝ := fun f ↦ ∫ x in (0)..1, x * (f x) ^ 2) (max : ℝ) (heqmax : βˆƒ f : ℝ β†’ ℝ, ContinuousOn f (Icc 0 1) ∧ I f - J f = max) (hmaxub : βˆ€ f : ℝ β†’ ℝ, ContinuousOn f (Icc 0 1) β†’ I f - J f ≀ max) : (max = putnam_2006_b5_solution) := sorry
For each continuous function $f: [0,1] \to \mathbb{R}$, let $I(f) = \int_0^1 x^2 f(x)\,dx$ and $J(x) = \int_0^1 x \left(f(x)\right)^2\,dx$. Find the maximum value of $I(f) - J(f)$ over all such functions $f$.
Show that the answer is \frac{1}{16}.
['analysis', 'algebra']
Section putnam_2006_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_2006_b5_solution := 1 / 16. Theorem putnam_2006_b5: let I (f: R -> R) := RInt (fun x => x ^ 2 * f x) 0 1 in let J (f: R -> R) := RInt (fun x => x * (f x) ^ 2) 0 1 in exists (maxval: R), (forall (f: R -> R) (x: R), 0 <= x <= 1 /\ continuity_pt f x /\ maxval >= I f - J f) /\ (exists (f: R -> R) (x: R), 0 <= x <= 1 /\ continuity_pt f x /\ maxval = I f - J f) -> maxval = putnam_2006_b5_solution. Proof. Admitted. End putnam_2006_b5.
theory putnam_2006_b5 imports Complex_Main "HOL-Analysis.Set_Integral" "HOL-Analysis.Lebesgue_Measure" begin definition putnam_2006_b5_solution :: real where "putnam_2006_b5_solution \<equiv> undefined" (* 1 / 16 *) theorem putnam_2006_b5: fixes I :: "(real \<Rightarrow> real) \<Rightarrow> real" and J :: "(real \<Rightarrow> real) \<Rightarrow> real" defines "I \<equiv> \<lambda> f. set_lebesgue_integral lebesgue {0..1} (\<lambda> x. x ^ 2 * (f x))" and "J \<equiv> \<lambda> f. set_lebesgue_integral lebesgue {0..1} (\<lambda> x. x * (f x) ^ 2)" shows "(GREATEST y. \<exists> f. continuous_on {0..1} f \<and> I f - J f = y) = putnam_2006_b5_solution" sorry end
null
putnam_2006_b6
abbrev putnam_2006_b6_solution : β„• β†’ ℝ := sorry -- fun k => ((k+1)/k)^k theorem putnam_2006_b6 (k : β„•) (hk : k > 1) (a : β„• β†’ ℝ) (ha0 : a 0 > 0) (ha : βˆ€ n : β„•, a (n + 1) = a n + 1/((a n)^((1 : ℝ)/k))) : Tendsto (fun n => (a n)^(k+1)/(n ^ k)) atTop (𝓝 (putnam_2006_b6_solution k)) := sorry
Let $k$ be an integer greater than 1. Suppose $a_0 > 0$, and define \[ a_{n+1} = a_n + \frac{1}{\sqrt[k]{a_n}} \] for $n > 0$. Evaluate \[\lim_{n \to \infty} \frac{a_n^{k+1}}{n^k}.\]
Show that the solution is $(\frac{k+1}{k})^k$.
['analysis']
Section putnam_2006_b6. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2006_b6_solution (k: nat) := ((INR k + 1) / INR k) ^ k. Theorem putnam_2006_b6: forall (a0: R) (k: nat), a0 > 0 /\ ge k 1 /\ let fix a (n: nat) : R := match n with | O => a0 | S n' => a n' + 1 / (a n') ^ (1 / k) end in Lim_seq (fun n => (a n) ^ (k + 1) / INR n ^ k) = putnam_2006_b6_solution k. Proof. Admitted. End putnam_2006_b6.
theory putnam_2006_b6 imports Complex_Main begin definition putnam_2006_b6_solution :: "nat \<Rightarrow> real" where "putnam_2006_b6_solution \<equiv> undefined" (* (\<lambda>k::nat. ((k+1)/k) ^ k) *) theorem putnam_2006_b6: fixes k :: nat and a :: "nat \<Rightarrow> real" assumes hk: "k > 1" and ha0: "a 0 > 0" and ha: "\<forall>n::nat. a (n+1) = a n + 1 / ((a n) powr (1/k))" shows "filterlim (\<lambda>n::nat. (a n)^(k+1) / (n^k)) (nhds (putnam_2006_b6_solution k)) at_top" sorry end
null
putnam_1991_a2
abbrev putnam_1991_a2_solution : Prop := sorry -- False theorem putnam_1991_a2 (n : β„•) (npos : n β‰₯ 1) : (βˆƒ A B : Matrix (Fin n) (Fin n) ℝ, A β‰  B ∧ A ^ 3 = B ^ 3 ∧ A ^ 2 * B = B ^ 2 * A ∧ Nonempty (Invertible (A ^ 2 + B ^ 2))) ↔ putnam_1991_a2_solution := sorry
Let $\mathbf{A}$ and $\mathbf{B}$ be different $n \times n$ matrices with real entries. If $\mathbf{A}^3=\mathbf{B}^3$ and $\mathbf{A}^2\mathbf{B}=\mathbf{B}^2\mathbf{A}$, can $\mathbf{A}^2+\mathbf{B}^2$ be invertible?
Show that the answer is no.
['linear_algebra']
Section putnam_1991_a2. From mathcomp Require Import matrix ssralg ssrbool. Open Scope ring_scope. Definition putnam_1991_a2_solution := False. Theorem putnam_1991_a2: forall (R: comUnitRingType) (n: nat) (A B: 'M[R]_n), A <> B -> mulmx (mulmx A A) A = mulmx (mulmx B B) B /\ mulmx (mulmx A A) B = mulmx (mulmx B B) A -> (mulmx A A + mulmx B B) \in unitmx <-> putnam_1991_a2_solution. Proof. Admitted. End putnam_1991_a2.
theory putnam_1991_a2 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin definition putnam_1991_a2_solution :: bool where "putnam_1991_a2_solution \<equiv> undefined" (* False *) theorem putnam_1991_a2: fixes n :: nat assumes npos: "n > 0" and cardn: "CARD('n) = n" shows "(\<exists> A B :: real^'n^'n. A \<noteq> B \<and> A ** A ** A = B ** B ** B \<and> A ** A ** B = B ** B ** A \<and> invertible (A ** A + B ** B)) \<longleftrightarrow> putnam_1991_a2_solution" sorry end
null
putnam_1991_a3
abbrev putnam_1991_a3_solution : Set (Polynomial ℝ) := sorry -- {p : Polynomial ℝ | p.degree = 2 ∧ (βˆƒ r1 r2 : ℝ, r1 β‰  r2 ∧ p.eval r1 = 0 ∧ p.eval r2 = 0)} theorem putnam_1991_a3 (p : Polynomial ℝ) (n : β„•) (pr : Prop) (hn : n = p.degree) (hpr : pr = βˆƒ r : β„• β†’ ℝ, (βˆ€ i : Fin (n - 1), r i < r (i + 1)) ∧ (βˆ€ i : Fin n, p.eval (r i) = 0) ∧ (βˆ€ i : Fin (n - 1), (Polynomial.derivative p).eval ((r i + r (i + 1)) / 2) = 0)) : (n β‰₯ 2 ∧ pr) ↔ p ∈ putnam_1991_a3_solution := sorry
Find all real polynomials $p(x)$ of degree $n \geq 2$ for which there exist real numbers $r_1<r_2<\cdots<r_n$ such that \begin{enumerate} \item $p(r_i)=0, \qquad i=1,2,\dots,n$, and \item $p'(\frac{r_i+r_{i+1}}{2})=0 \qquad i=1,2,\dots,n-1$, \end{enumerate} where $p'(x)$ denotes the derivative of $p(x)$.
Show that the real polynomials with the required property are exactly those that are of degree $2$ with $2$ distinct real zeros.
['algebra', 'analysis']
Section putnam_1991_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1991_a3_solution (coeff: nat -> R) (n: nat) : Prop := exists (A r1 r2: R), coeff = (fun x => match x with | O => A * r1 * r2 | S O => -A * (r1 + r2) | S (S O) => A | _ => 0 end) /\ n = 2%nat. Theorem putnam_1991_a3 (p: (nat -> R) -> nat -> (R -> R) := fun coeff n => (fun x => sum_n (fun i => coeff i * x ^ i) (n + 1))) : forall (coeff: nat -> R) (n: nat), ge n 2 -> (exists (r: nat -> R), (forall (i j: nat), lt i j -> r i < r j) /\ forall (i: nat), lt i n -> p coeff n (r i) = 0 /\ lt i (n - 1) -> (Derive (p coeff n)) ((r i + r (S i)) / 2) = 0) <-> putnam_1991_a3_solution coeff n. Proof. Admitted. End putnam_1991_a3.
theory putnam_1991_a3 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1991_a3_solution :: "real poly set" where "putnam_1991_a3_solution \<equiv> undefined" (* {p :: real poly. degree p = 2 \<and> (\<exists> r1 r2 :: real. r1 \<noteq> r2 \<and> poly p r1 = 0 \<and> poly p r2 = 0)} *) theorem putnam_1991_a3: fixes p :: "real poly" and n :: nat and pr :: bool defines "n \<equiv> degree p" and "pr \<equiv> \<exists> r :: nat \<Rightarrow> real. (\<forall> i \<in> {1 .. n - 1}. r i < r (i + 1)) \<and> (\<forall> i \<in> {1 .. n}. poly p (r i) = 0) \<and> (\<forall> i \<in> {1 .. n - 1}. poly (pderiv p) ((r i + r (i + 1)) / 2) = 0)" shows "(n \<ge> 2 \<and> pr) \<longleftrightarrow> p \<in> putnam_1991_a3_solution" sorry end
null
putnam_1991_a4
abbrev putnam_1991_a4_solution : Prop := sorry -- True theorem putnam_1991_a4 (climit : (β„• β†’ (Fin 2 β†’ ℝ)) β†’ Prop) (rareas : (β„• β†’ ℝ) β†’ Prop) (crline : (β„• β†’ (Fin 2 β†’ ℝ)) β†’ (β„• β†’ ℝ) β†’ Prop) (hclimit : βˆ€ c : β„• β†’ (Fin 2 β†’ ℝ), climit c = Β¬βˆƒ (p : Fin 2 β†’ ℝ), βˆ€ Ξ΅ : ℝ, Ξ΅ > 0 β†’ βˆƒ i : β„•, c i ∈ Metric.ball p Ξ΅) (hrareas : βˆ€ r : β„• β†’ ℝ, rareas r = βˆƒ A : ℝ, Tendsto (fun n : β„• => βˆ‘ i : Fin n, Real.pi * (r i) ^ 2) atTop (𝓝 A)) (hcrline : βˆ€ (c : β„• β†’ (Fin 2 β†’ ℝ)) (r : β„• β†’ ℝ), crline c r = (βˆ€ v w : Fin 2 β†’ ℝ, w β‰  0 β†’ βˆƒ i : β„•, {p : Fin 2 β†’ ℝ | βˆƒ t : ℝ, p = v + t β€’ w} ∩ Metric.closedBall (c i) (r i) β‰  βˆ…)) : (βˆƒ (c : β„• β†’ (Fin 2 β†’ ℝ)) (r : β„• β†’ ℝ), (βˆ€ i : β„•, r i β‰₯ 0) ∧ climit c ∧ rareas r ∧ crline c r) ↔ putnam_1991_a4_solution := sorry
Does there exist an infinite sequence of closed discs $D_1,D_2,D_3,\dots$ in the plane, with centers $c_1,c_2,c_3,\dots$, respectively, such that \begin{enumerate} \item the $c_i$ have no limit point in the finite plane, \item the sum of the areas of the $D_i$ is finite, and \item every line in the plane intersects at least one of the $D_i$? \end{enumerate}
Show that the answer is yes, such a sequence of closed discs exists.
['geometry', 'analysis']
null
theory putnam_1991_a4 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" "HOL-Analysis.Elementary_Metric_Spaces" begin definition putnam_1991_a4_solution :: bool where "putnam_1991_a4_solution \<equiv> undefined" (* True *) theorem putnam_1991_a4: fixes climit :: "(nat \<Rightarrow> real^2) \<Rightarrow> bool" and rareas :: "(nat \<Rightarrow> real) \<Rightarrow> bool" and crline :: "(nat \<Rightarrow> real^2) \<Rightarrow> (nat \<Rightarrow> real) \<Rightarrow> bool" defines "climit \<equiv> \<lambda> c. \<not>(\<exists> p :: real^2. \<forall> \<epsilon> :: real. \<epsilon> > 0 \<longrightarrow> (\<exists> i :: nat. c i \<in> ball p \<epsilon>))" and "rareas \<equiv> \<lambda> r. convergent (\<lambda> N. \<Sum> i = 0 .. N. pi * (r i) ^ 2)" and "crline \<equiv> \<lambda> c r. \<forall> v w :: real^2. w \<noteq> 0 \<longrightarrow> (\<exists> i :: nat. {p :: real^2. \<exists> t :: real. p = v + t *s w} \<inter> cball (c i) (r i) \<noteq> {})" shows "(\<exists> c :: nat \<Rightarrow> real^2. \<exists> r :: nat \<Rightarrow> real. (\<forall> i :: nat. r i \<ge> 0) \<and> climit c \<and> rareas r \<and> crline c r) \<longleftrightarrow> putnam_1991_a4_solution" sorry end
null
putnam_1991_a5
abbrev putnam_1991_a5_solution : ℝ := sorry -- 1 / 3 theorem putnam_1991_a5 (f : Set.Icc (0 : ℝ) 1 β†’ ℝ) (hf : βˆ€ y : Set.Icc 0 1, f y = ∫ x in Set.Ioo 0 y, Real.sqrt (x ^ 4 + (y - y ^ 2) ^ 2)) : (βˆƒ y : Set.Icc 0 1, f y = putnam_1991_a5_solution) ∧ (βˆ€ y : Set.Icc 0 1, f y ≀ putnam_1991_a5_solution) := sorry
Find the maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2}\,dx$ for $0 \leq y \leq 1$.
Show that the maximum value of the integral is $1/3$.
['analysis']
Section putnam_1991_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1991_a5_solution := 1/3. Theorem putnam_1991_a5: exists (m: R), (forall (y: R), 0 <= y <= 1 -> m >= RInt (fun x => sqrt (pow x 4 + pow (y - pow y 2) 2)) 0 y) /\ (exists (y: R), 0 <= y <= 1 -> m >= RInt (fun x => sqrt (pow x 4 + pow (y - pow y 2) 2)) 0 y) -> m = putnam_1991_a5_solution. Proof. Admitted. End putnam_1991_a5.
theory putnam_1991_a5 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1991_a5_solution :: real where "putnam_1991_a5_solution \<equiv> undefined" (* 1 / 3 *) theorem putnam_1991_a5: fixes f :: "real \<Rightarrow> real" defines "f \<equiv> \<lambda> y. interval_lebesgue_integral lebesgue 0 y (\<lambda> x. sqrt (x ^ 4 + (y - y ^ 2) ^ 2))" shows "(GREATEST I. \<exists> y \<in> {0..1}. f y = I) = putnam_1991_a5_solution" sorry end
null
putnam_1991_a6
theorem putnam_1991_a6 (nabsum : β„• β†’ β„• Γ— (β„• β†’ β„•) β†’ Prop) (agt : β„• Γ— (β„• β†’ β„•) β†’ Prop) (A : β„• β†’ β„•) (bge : β„• Γ— (β„• β†’ β„•) β†’ Prop) (g : β„• β†’ β„•) (bg1 : β„• Γ— (β„• β†’ β„•) β†’ Prop) (bg2 : β„• Γ— (β„• β†’ β„•) β†’ Prop) (B : β„• β†’ β„•) (hnabsum : βˆ€ n β‰₯ 1, βˆ€ ab : β„• Γ— (β„• β†’ β„•), nabsum n ab = (ab.1 β‰₯ 1 ∧ (βˆ€ i < ab.1, ab.2 i > 0) ∧ (βˆ€ i β‰₯ ab.1, ab.2 i = 0) ∧ (βˆ‘ i : Fin ab.1, ab.2 i) = n)) (hagt : βˆ€ a : β„• Γ— (β„• β†’ β„•), agt a = βˆ€ i : Fin (a.1 - 1), a.2 i > a.2 (i + 1) + a.2 (i + 2)) (hA : βˆ€ n β‰₯ 1, A n = {a : β„• Γ— (β„• β†’ β„•) | nabsum n a ∧ agt a}.encard) (hbge : βˆ€ b : β„• Γ— (β„• β†’ β„•), bge b = βˆ€ i : Fin (b.1 - 1), b.2 i β‰₯ b.2 (i + 1)) (hg : g 0 = 1 ∧ g 1 = 2 ∧ (βˆ€ j β‰₯ 2, g j = g (j - 1) + g (j - 2) + 1)) (hbg1 : βˆ€ b : β„• Γ— (β„• β†’ β„•), bg1 b = βˆ€ i : Fin b.1, βˆƒ j : β„•, b.2 i = g j) (hbg2 : βˆ€ b : β„• Γ— (β„• β†’ β„•), bg2 b = βˆƒ k : β„•, b.2 0 = g k ∧ (βˆ€ j ≀ k, βˆƒ i : Fin b.1, b.2 i = g j)) (hB : βˆ€ n β‰₯ 1, B n = {b : β„• Γ— (β„• β†’ β„•) | nabsum n b ∧ bge b ∧ bg1 b ∧ bg2 b}.encard) : βˆ€ n β‰₯ 1, A n = B n := sorry
Let $A(n)$ denote the number of sums of positive integers $a_1+a_2+\cdots+a_r$ which add up to $n$ with $a_1>a_2+a_3,a_2>a_3+a_4,\dots,a_{r-2}>a_{r-1}+a_r,a_{r-1}>a_r$. Let $B(n)$ denote the number of $b_1+b_2+\cdots+b_s$ which add up to $n$, with \begin{enumerate} \item $b_1 \geq b_2 \geq \dots \geq b_s$, \item each $b_i$ is in the sequence $1,2,4,\dots,g_j,\dots$ defined by $g_1=1$, $g_2=2$, and $g_j=g_{j-1}+g_{j-2}+1$, and \item if $b_1=g_k$ then every element in $\{1,2,4,\dots,g_k\}$ appears at least once as a $b_i$. \end{enumerate} Prove that $A(n)=B(n)$ for each $n \geq 1$. (For example, $A(7)=5$ because the relevant sums are $7,6+1,5+2,4+3,4+2+1$, and $B(7)=5$ because the relevant sums are $4+2+1,2+2+2+1,2+2+1+1+1,2+1+1+1+1+1,1+1+1+1+1+1+1$.)
null
['algebra']
null
theory putnam_1991_a6 imports Complex_Main begin (* uses (nat \<rightarrow> nat) instead of (Fin r \<rightarrow> nat) and (Fin s \<rightarrow> nat) *) theorem putnam_1991_a6: fixes nabsum :: "nat \<Rightarrow> nat \<times> (nat \<Rightarrow> nat) \<Rightarrow> bool" and agt :: "nat \<times> (nat \<Rightarrow> nat) \<Rightarrow> bool" and A :: "nat \<Rightarrow> nat" and bge :: "nat \<times> (nat \<Rightarrow> nat) \<Rightarrow> bool" and g :: "nat \<Rightarrow> nat" and bg1 :: "nat \<times> (nat \<Rightarrow> nat) \<Rightarrow> bool" and bg2 :: "nat \<times> (nat \<Rightarrow> nat) \<Rightarrow> bool" and B :: "nat \<Rightarrow> nat" defines "nabsum \<equiv> \<lambda> (n :: nat) (ab :: nat \<times> (nat \<Rightarrow> nat)). (fst ab) \<ge> 1 \<and> (\<forall> i < fst ab. (snd ab) i > 0) \<and> (\<forall> i \<ge> fst ab. (snd ab) i = 0) \<and> (\<Sum> i = 0 .. fst ab - 1. (snd ab) i) = n" and "agt \<equiv> \<lambda> a :: nat \<times> (nat \<Rightarrow> nat). \<forall> i \<in> {0 .. fst a - 2}. (snd a) i > (snd a) (i + 1) + (snd a) (i + 2)" and "A \<equiv> \<lambda> n :: nat. card {a :: nat \<times> (nat \<Rightarrow> nat). nabsum n a \<and> agt a}" and "bge \<equiv> \<lambda> b :: nat \<times> (nat \<Rightarrow> nat). \<forall> i \<in> {0 .. fst b - 2}. (snd b) i \<ge> (snd b) (i + 1)" and "bg1 \<equiv> \<lambda> b :: nat \<times> (nat \<Rightarrow> nat). \<forall> i \<in> {0 .. fst b - 1}. \<exists> j :: nat. (snd b) i = g j" and "bg2 \<equiv> \<lambda> b :: nat \<times> (nat \<Rightarrow> nat). \<exists> k :: nat. (snd b) 0 = g k \<and> (\<forall> j \<le> k. \<exists> i \<in> {0 .. fst b - 1}. (snd b) i = g j)" and "B \<equiv> \<lambda> n :: nat. card {b :: nat \<times> (nat \<Rightarrow> nat). nabsum n b \<and> bge b \<and> bg1 b \<and> bg2 b}" assumes hg: "g 0 = 1 \<and> g 1 = 2 \<and> (\<forall> j \<ge> 2. g j = g (j - 1) + g (j - 2) + 1)" shows "\<forall> n \<ge> 1. A n = B n" sorry end
null
putnam_1991_b1
abbrev putnam_1991_b1_solution : Set β„€ := sorry -- {A : β„€ | βˆƒ x > 0, A = x ^ 2} theorem putnam_1991_b1 (m : β„€ β†’ β„€) (S : β„€ β†’ β„€) (A : β„€) (a : β„• β†’ β„€) (hm : βˆ€ n : β„€, n β‰₯ 0 β†’ (m n) ^ 2 ≀ n ∧ (βˆ€ m' : β„€, m' ^ 2 ≀ n β†’ m' ≀ m n)) (hS : βˆ€ n : β„€, n β‰₯ 0 β†’ S n = n - (m n) ^ 2) (ha : a 0 = A ∧ (βˆ€ k : β„•, a (k + 1) = a k + S (a k))) : (A > 0 ∧ (βˆƒ (K : β„•) (c : β„•), βˆ€ k β‰₯ K, a k = c)) ↔ A ∈ putnam_1991_b1_solution := sorry
For each integer $n \geq 0$, let $S(n)=n-m^2$, where $m$ is the greatest integer with $m^2 \leq n$. Define a sequence $(a_k)_{k=0}^\infty$ by $a_0=A$ and $a_{k+1}=a_k+S(a_k)$ for $k \geq 0$. For what positive integers $A$ is this sequence eventually constant?
Show that this sequence is eventually constant if and only if $A$ is a perfect square.
['algebra']
Section putnam_1991_b1. Require Import Nat Coquelicot.Coquelicot. Open Scope nat_scope. Definition putnam_1991_b1_solution (A: nat) := exists (m: nat), A = pow m 2. Theorem putnam_1991_b1: let eS (n: nat) := sub n (pow (sqrt n) 2) in let a_seq := fix a (A k: nat) := match k with | O => A | S k' => a A k' + eS (a A k') end in forall (A: nat), A > 0 -> Lim_seq (fun k => Raxioms.INR (a_seq A k)) = Rdefinitions.R0 <-> putnam_1991_b1_solution A. Proof. Admitted. End putnam_1991_b1.
theory putnam_1991_b1 imports Complex_Main begin definition putnam_1991_b1_solution :: "nat set" where "putnam_1991_b1_solution \<equiv> undefined" (* {A :: nat. \<exists> x > 0. A = x ^ 2} *) theorem putnam_1991_b1: fixes m :: "nat \<Rightarrow> nat" and S :: "nat \<Rightarrow> nat" and A :: nat and a :: "nat \<Rightarrow> nat" defines "m \<equiv> \<lambda> n. GREATEST M :: nat. M ^ 2 \<le> n" and "S \<equiv> \<lambda> n. n - (m n) ^ 2" assumes ha: "a 0 = A \<and> (\<forall> k :: nat. a (k + 1) = a k + S (a k))" shows "(A > 0 \<and> (\<exists> K c :: nat. \<forall> k \<ge> K. a k = c)) \<longleftrightarrow> A \<in> putnam_1991_b1_solution" sorry end
null
putnam_1991_b2
theorem putnam_1991_b2 (f g : ℝ β†’ ℝ) (fgnconst : Β¬βˆƒ c : ℝ, f = Function.const ℝ c ∨ g = Function.const ℝ c) (fgdiff : Differentiable ℝ f ∧ Differentiable ℝ g) (fadd : βˆ€ x y : ℝ, f (x + y) = f x * f y - g x * g y) (gadd : βˆ€ x y : ℝ, g (x + y) = f x * g y + g x * f y) : (deriv f 0 = 0) β†’ (βˆ€ x : ℝ, (f x) ^ 2 + (g x) ^ 2 = 1) := sorry
Suppose $f$ and $g$ are non-constant, differentiable, real-valued functions defined on $(-\infty,\infty)$. Furthermore, suppose that for each pair of real numbers $x$ and $y$, \begin{align*} f(x+y)&=f(x)f(y)-g(x)g(y), \\ g(x+y)&=f(x)g(y)+g(x)f(y). \end{align*} If $f'(0)=0$, prove that $(f(x))^2+(g(x))^2=1$ for all $x$.
null
['analysis']
Section putnam_1991_b2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1991_b2: forall (f g: R -> R), (~ exists (c: R), f = (fun _ => c) \/ g = (fun _ => c)) /\ forall x, ex_derive_n f 1 x /\ forall x, ex_derive_n g 1 x -> forall (x y: R), f (x + y) = f x * f y - g x * g y /\ g (x + y) = f x * g y - g x * f y -> Derive f 0 = 0 -> forall (x: R), pow (f x) 2 + pow (g x) 2 = 1. Proof. Admitted. End putnam_1991_b2.
theory putnam_1991_b2 imports Complex_Main "HOL-Analysis.Derivative" begin theorem putnam_1991_b2: fixes f g :: "real \<Rightarrow> real" assumes fgnconst: "\<not>(\<exists> c :: real. f = (\<lambda> x. c) \<or> g = (\<lambda> x. c))" and fgdiff: "f differentiable_on UNIV \<and> g differentiable_on UNIV" and fadd: "\<forall> x y :: real. f (x + y) = f x * f y - g x * g y" and gadd: "\<forall> x y :: real. g (x + y) = f x * g y + g x * f y" shows "(deriv f 0 = 0) \<longrightarrow> (\<forall> x :: real. (f x) ^ 2 + (g x) ^ 2 = 1)" sorry end
null
putnam_1991_b4
theorem putnam_1991_b4 (p : β„•) (podd : Odd p) (pprime : Prime p) : (βˆ‘ j : Fin (p + 1), (p.choose j) * ((p + j).choose j)) ≑ (2 ^ p + 1) [MOD (p ^ 2)] := sorry
Suppose $p$ is an odd prime. Prove that $\sum_{j=0}^p \binom{p}{j}\binom{p+j}{j} \equiv 2^p+1 \pmod{p^2}$.
null
['number_theory', 'algebra']
Section putnam_1991_b4. Require Import Nat Reals ZArith Znumtheory Binomial Coquelicot.Coquelicot. Theorem putnam_1991_b4: forall (p: nat), odd p = true /\ prime (Z.of_nat p) -> let expr : R := sum_n (fun j => Binomial.C p j * Binomial.C (p + j) j) p in (floor expr) mod (Z.pow (Z.of_nat p) 2) = Z.add (Z.pow 2 (Z.of_nat p)) 1. Proof. Admitted. End putnam_1991_b4.
theory putnam_1991_b4 imports Complex_Main "HOL-Computational_Algebra.Primes" "HOL-Number_Theory.Cong" begin theorem putnam_1991_b4: fixes p :: nat assumes podd: "odd p" and pprime: "prime p" shows "[(\<Sum> j = 0 .. p. (p choose j) * ((p + j) choose j)) = 2 ^ p + 1] (mod p ^ 2)" sorry end
null
putnam_1991_b5
abbrev putnam_1991_b5_solution : β„• β†’ β„• := sorry -- (fun p : β„• => Nat.ceil ((p : ℝ) / 4)) theorem putnam_1991_b5 (p : β„•) (podd : Odd p) (pprime : Prime p) : ({z : ZMod p | βˆƒ x : ZMod p, z = x ^ 2} ∩ {z : ZMod p | βˆƒ y : ZMod p, z = y ^ 2 + 1}).encard = putnam_1991_b5_solution p := sorry
Let $p$ be an odd prime and let $\mathbb{Z}_p$ denote (the field of) integers modulo $p$. How many elements are in the set $\{x^2:x \in \mathbb{Z}_p\} \cap \{y^2+1:y \in \mathbb{Z}_p\}$?
Show that the number of elements in the intersection is $\lceil p/4 \rceil$.
['number_theory']
Section putnam_1991_b5. Require Import Reals Nat ZArith Znumtheory Ensembles Finite_sets Coquelicot.Coquelicot. From mathcomp Require Import fintype seq ssrbool. Open Scope R. Definition putnam_1991_b5_solution (p: nat) : nat := p / 4 + 1. Variable A: Ensemble Z. Theorem putnam_1991_b5: forall (p: nat), odd p = true /\ prime (Z.of_nat p) -> exists (A B: Ensemble Z), forall (z: Z), (A z <-> exists (m: 'I_p), z = Z.of_nat (pow (nat_of_ord m) 2)) /\ (B z <-> exists (m: 'I_p), z = Z.of_nat (pow (nat_of_ord m) 2 + 1)) -> let C : Ensemble Z := Intersection Z A B in cardinal Z C (putnam_1991_b5_solution p). Proof. Admitted. End putnam_1991_b5.
theory putnam_1991_b5 imports Complex_Main "HOL-Computational_Algebra.Primes" "HOL-Number_Theory.Cong" begin (* Note: Uses modular congruence instead of the field Zmod p as in Lean *) definition putnam_1991_b5_solution :: "nat \<Rightarrow> nat" where "putnam_1991_b5_solution \<equiv> undefined" (* \<lambda> p :: nat. nat (ceiling (p / 4)) *) theorem putnam_1991_b5: fixes p :: nat assumes podd: "odd p" and pprime: "prime p" shows "card ({z \<in> {0 .. p - 1}. \<exists> x \<in> {0 .. p - 1}. [z = x ^ 2] (mod p)} \<inter> {z \<in> {0 .. p - 1}. \<exists> y \<in> {0 .. p - 1}. [z = y ^ 2 + 1] (mod p)}) = putnam_1991_b5_solution p" sorry end
null
putnam_1991_b6
abbrev putnam_1991_b6_solution : ℝ β†’ ℝ β†’ ℝ := sorry -- (fun a b : ℝ => |Real.log (a / b)|) theorem putnam_1991_b6 (a b : ℝ) (cle : ℝ β†’ Prop) (abpos : a > 0 ∧ b > 0) (hcle : βˆ€ c : ℝ, cle c = βˆ€ u : ℝ, (0 < |u| ∧ |u| ≀ c) β†’ (βˆ€ x ∈ Set.Ioo 0 1, a ^ x * b ^ (1 - x) ≀ a * (Real.sinh (u * x) / Real.sinh u) + b * (Real.sinh (u * (1 - x)) / Real.sinh u))) : cle (putnam_1991_b6_solution a b) ∧ (βˆ€ c : ℝ, cle c β†’ c ≀ putnam_1991_b6_solution a b) := sorry
Let $a$ and $b$ be positive numbers. Find the largest number $c$, in terms of $a$ and $b$, such that $a^xb^{1-x} \leq a\frac{\sinh ux}{\sinh u}+b\frac{\sinh u(1-x)}{\sinh u}$ for all $u$ with $0<|u| \leq c$ and for all $x$, $0<x<1$. (Note: $\sinh u=(e^u-e^{-u})/2$.)
Show that the largest $c$ for which the inequality holds for $0<|u| \leq c$ is $c=|\ln(a/b)|$.
['analysis']
Section putnam_1991_b6. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1991_b6: forall (a b: R), let ineq_holds (c: R) := forall (u x: R), 0 < Rabs u <= c /\ 0 < x < 1 -> Rpower a x * Rpower b (1 - x) <= a * sinh (u * x) / sinh u + b * sinh (1 - x) / sinh u in exists (mc: R), ineq_holds mc /\ forall (c: R), ineq_holds c -> c <= mc. Proof. Admitted. End putnam_1991_b6.
theory putnam_1991_b6 imports Complex_Main begin definition putnam_1991_b6_solution :: "real \<Rightarrow> real \<Rightarrow> real" where "putnam_1991_b6_solution \<equiv> undefined" (* \<lambda> a b :: real. \<bar>ln (a / b)\<bar> *) theorem putnam_1991_b6: fixes a b :: real and cle :: "real \<Rightarrow> bool" defines "cle \<equiv> \<lambda> c :: real. \<forall> u :: real. (0 < \<bar>u\<bar> \<and> \<bar>u\<bar> \<le> c) \<longrightarrow> (\<forall> x \<in> {0 <..< 1}. a powr x * b powr (1 - x) \<le> a * (sinh (u * x) / sinh u) + b * (sinh (u * (1 - x)) / sinh u))" assumes abpos: "a > 0 \<and> b > 0" shows "(GREATEST c. cle c) = putnam_1991_b6_solution a b" sorry end
null
putnam_1985_a1
abbrev putnam_1985_a1_solution : β„• Γ— β„• Γ— β„• Γ— β„• := sorry -- (10, 10, 0, 0) theorem putnam_1985_a1 : (let (a, b, c, d) := putnam_1985_a1_solution; {(A1, A2, A3) : Set β„€ Γ— Set β„€ Γ— Set β„€ | A1 βˆͺ A2 βˆͺ A3 = Icc 1 10 ∧ A1 ∩ A2 ∩ A3 = βˆ…}.ncard = 2 ^ a * 3 ^ b * 5 ^ c * 7 ^ d) := sorry
Determine, with proof, the number of ordered triples $(A_1, A_2, A_3)$ of sets which have the property that \begin{enumerate} \item[(i)] $A_1 \cup A_2 \cup A_3 = \{1,2,3,4,5,6,7,8,9,10\}$, and \item[(ii)] $A_1 \cap A_2 \cap A_3 = \emptyset$. \end{enumerate} Express your answer in the form $2^a 3^b 5^c 7^d$, where $a,b,c,d$ are nonnegative integers.
Prove that the number of such triples is $2^{10}3^{10}$.
['algebra']
Section putnam_1985_a1. Require Import Ensembles List Finite_sets Nat Coquelicot.Coquelicot. Import ListNotations. Definition putnam_1985_a1_solution := (10, 10, 0, 0). Theorem putnam_1985_a1 : let E: Ensemble (list (Ensemble nat)) := fun A => match A with | A1 :: A2 :: A3 :: _ => Union nat (Union nat A1 A2) A3 = fun x => 1 <= x <= 11 /\ Intersection nat (Intersection nat A1 A2) A3 = Empty_set nat | _ => True end in exists (a b c d : nat), cardinal (list (Ensemble nat)) E (2 ^ a * 3 ^ b * 5 ^ c * 7 ^ d) <-> (a, b, c, d) = putnam_1985_a1_solution. Proof. Admitted. End putnam_1985_a1.
theory putnam_1985_a1 imports Complex_Main begin definition putnam_1985_a1_solution::"nat \<times> nat \<times> nat \<times> nat" where "putnam_1985_a1_solution \<equiv> undefined" (* 10, 10, 0, 0 *) theorem putnam_1985_a1: shows "let (a, b, c, d) = putnam_1985_a1_solution in (2^a * 3^b * 5^c * 7^d = card {(A1::nat set, A2::nat set, A3::nat set). (A1\<union>A2\<union>A3 = {1..10::nat} \<and> A1\<inter>A2\<inter>A3 = {}) })" sorry end
null
putnam_1985_a3
abbrev putnam_1985_a3_solution : ℝ β†’ ℝ := sorry -- fun d ↦ exp d - 1 theorem putnam_1985_a3 (d : ℝ) (a : β„• β†’ β„• β†’ ℝ) (ha0 : βˆ€ m : β„•, a m 0 = d / 2 ^ m) (ha : βˆ€ m : β„•, βˆ€ j : β„•, a m (j + 1) = (a m j) ^ 2 + 2 * a m j) : (Tendsto (fun n ↦ a n n) ⊀ (𝓝 (putnam_1985_a3_solution d))) := sorry
Let $d$ be a real number. For each integer $m \geq 0$, define a sequence $\{a_m(j)\}$, $j=0,1,2,\dots$ by the condition \begin{align*} a_m(0) &= d/2^m, \\ a_m(j+1) &= (a_m(j))^2 + 2a_m(j), \qquad j \geq 0. \end{align*} Evaluate $\lim_{n \to \infty} a_n(n)$.
Show that the limit equals $e^d - 1$.
['analysis']
Section putnam_1985_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_a3_solution (x: R) := exp x - 1. Theorem putnam_1985_a3: forall (x: R), let A := fix a (i j: nat) := match (i,j) with | (i, 0) => x/pow 2 i | (i, S j') => pow (a i j') 2 + 2 * a i j' end in Lim_seq (fun n => A n n) = putnam_1985_a3_solution x. Proof. Admitted. End putnam_1985_a3.
theory putnam_1985_a3 imports Complex_Main begin definition putnam_1985_a3_solution::"real\<Rightarrow>real" where "putnam_1985_a3_solution \<equiv> undefined" (* \<lambda>x. exp x - 1 *) theorem putnam_1985_a3: fixes d::real and a::"nat\<Rightarrow>nat\<Rightarrow>real" assumes ha0 : "\<forall>m::nat. a m 0 = d / 2^m" and ha : "\<forall>m::nat. \<forall>j::nat. a m (j+1) = (a m j)^2 + 2 * a m j" shows "(\<lambda>n. a n n) \<longlonglongrightarrow> (putnam_1985_a3_solution d)" sorry end
null
putnam_1985_a4
abbrev putnam_1985_a4_solution : Set (Fin 100) := sorry -- {87} theorem putnam_1985_a4 (a : β„• β†’ β„•) (ha1 : a 1 = 3) (ha : βˆ€ i β‰₯ 1, a (i + 1) = 3 ^ a i) : ({k : Fin 100 | βˆ€ N : β„•, βˆƒ i β‰₯ N, a i % 100 = k} = putnam_1985_a4_solution) := sorry
Define a sequence $\{a_i\}$ by $a_1=3$ and $a_{i+1}=3^{a_i}$ for $i \geq 1$. Which integers between $00$ and $99$ inclusive occur as the last two digits in the decimal expansion of infinitely many $a_i$?
Prove that the only number that occurs infinitely often is $87$.
['number_theory']
Section putnam_1985_a4. Require Import Ensembles Nat Coquelicot.Coquelicot. Definition putnam_1985_a4_solution := fun k => k = 87. Theorem putnam_1985_a4 (a : nat -> nat := fix a (n: nat) := match n with | O => 3 | S n' => 3 ^ (a n') end) : let E: Ensemble nat := fun k => k < 100 /\ forall (n: nat), n < 100 -> exists (i: nat), ge i n /\ a i mod 100 = k in E = putnam_1985_a4_solution. Proof. Admitted. End putnam_1985_a4.
theory putnam_1985_a4 imports Complex_Main begin definition putnam_1985_a4_solution::"nat set" where "putnam_1985_a4_solution \<equiv> undefined" (* {87} *) theorem putnam_1985_a4: fixes a::"nat\<Rightarrow>nat" assumes ha1 : "a 1 = 3" and ha : "\<forall>i \<ge> 1. a (i+1) = 3^ (a i)" shows "putnam_1985_a4_solution = {k::nat. k < 100 \<and> k \<ge> 0 \<and> (\<forall>N::nat. \<exists>i::nat \<ge> N. (a i) mod 100 = k)}" sorry end
null
putnam_1985_a5
abbrev putnam_1985_a5_solution : Set β„• := sorry -- {3, 4, 7, 8} theorem putnam_1985_a5 (I : β„• β†’ ℝ := fun m ↦ ∫ x in (0)..(2 * Real.pi), ∏ k in Finset.Icc 1 m, cos (k * x)) : ({m ∈ Finset.Icc 1 10 | I m β‰  0} = putnam_1985_a5_solution) := sorry
Let $I_m = \int_0^{2\pi} \cos(x)\cos(2x)\cdots \cos(mx)\,dx$. For which integers $m$, $1 \leq m \leq 10$ is $I_m \neq 0$?
Prove that the integers $m$ with $1 \leq m \leq 10$ and $I_m \neq 0$ are $m = 3, 4, 7, 8$.
['analysis']
Section putnam_1985_a5. Require Import Nat Reals List Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_a5_solution (n: nat) := Nat.eq n 3 \/ Nat.eq n 4 \/ Nat.eq n 7 \/ Nat.eq n 8. Theorem putnam_1985_a5: let F (n: nat) := fun x => let f (i: nat):= cos (INR i * x) in let coeffs := map f (seq 1 n) in fold_right Rmult 1 coeffs in forall (n: nat), and (le 1 n) (le n 10) -> RInt (F n) 0 2*PI <> 0 <-> putnam_1985_a5_solution n. Proof. Admitted. End putnam_1985_a5.
theory putnam_1985_a5 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1985_a5_solution::"nat set" where "putnam_1985_a5_solution \<equiv> undefined" (* 3, 4, 7, 8 *) theorem putnam_1985_a5: fixes I::"nat\<Rightarrow>real" defines "I \<equiv> \<lambda>m. interval_lebesgue_integral lebesgue 0 (2 * pi) (\<lambda>x. (\<Prod>k=1..m. cos (k * x)))" shows "putnam_1985_a5_solution = {m. m \<in> {1..10} \<and> I m \<noteq> 0}" sorry end
null
putnam_1985_a6
abbrev putnam_1985_a6_solution : Polynomial ℝ := sorry -- 6 * X ^ 2 + 5 * X + 1 theorem putnam_1985_a6 (Ξ“ : Polynomial ℝ β†’ ℝ := fun p ↦ βˆ‘ k in Finset.range (p.natDegree + 1), coeff p k ^ 2) (f : Polynomial ℝ := 3 * X ^ 2 + 7 * X + 2) : (let g := putnam_1985_a6_solution; g.eval 0 = 1 ∧ βˆ€ n : β„•, n β‰₯ 1 β†’ Ξ“ (f ^ n) = Ξ“ (g ^ n)) := sorry
If $p(x)= a_0 + a_1 x + \cdots + a_m x^m$ is a polynomial with real coefficients $a_i$, then set \[ \Gamma(p(x)) = a_0^2 + a_1^2 + \cdots + a_m^2. \] Let $F(x) = 3x^2+7x+2$. Find, with proof, a polynomial $g(x)$ with real coefficients such that \begin{enumerate} \item[(i)] $g(0)=1$, and \item[(ii)] $\Gamma(f(x)^n) = \Gamma(g(x)^n)$ \end{enumerate} for every integer $n \geq 1$.
Show that $g(x) = 6x^2 + 5x + 1$ satisfies the conditions.
['algebra']
Section putnam_1985_a6. From mathcomp Require Import ssralg ssrnum fintype seq poly. Local Open Scope ring_scope. Variable (R: numDomainType). Definition putnam_1985_a6_solution : {poly R} := 6%:R *: 'X^2 + 5%:R *: 'X + 1%:R. Theorem putnam_1985_a6: let g : {poly R} := 3%:R *: 'X^2 + 7%:R *: 'X + 2%:R in let Comp_poly_n := fix comp_poly_n (p : {poly R}) (n : nat) : {poly R} := match n with | O => 1 | S n' => comp_poly (comp_poly_n p n') p end in forall (f: {poly R}), f`_0 = 0 -> forall (n: nat), let F : {poly R} := Comp_poly_n f n in let G : {poly R} := Comp_poly_n g n in (\sum_(i < size F) F`_i) = (\sum_(i < size G) G`_i) <-> f = putnam_1985_a6_solution. Proof. Admitted. End putnam_1985_a6.
theory putnam_1985_a6 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1985_a6_solution::"real poly" where "putnam_1985_a6_solution \<equiv> undefined" (* Poly [1, 5, 6] *) theorem putnam_1985_a6: fixes \<Gamma>::"(real poly) \<Rightarrow> real" and f::"real poly" defines "\<Gamma> \<equiv> \<lambda>P. (\<Sum>i=0..(degree P). (coeff P i)^2)" and "f \<equiv> Poly [2, 7, 3]" shows "poly putnam_1985_a6_solution 0 = 1 \<and> (\<forall>n::nat \<ge> 1. \<Gamma> (f^n) = \<Gamma> (putnam_1985_a6_solution^n))" sorry end
null
putnam_1985_b1
abbrev putnam_1985_b1_solution : Fin 5 β†’ β„€ := sorry -- fun i ↦ i - 2 theorem putnam_1985_b1 (p : (Fin 5 β†’ β„€) β†’ (Polynomial ℝ) := fun m ↦ ∏ i : Fin 5, ((X : Polynomial ℝ) - m i)) (numnzcoeff : Polynomial ℝ β†’ β„• := fun p ↦ {j ∈ Finset.range (p.natDegree + 1) | coeff p j β‰  0}.ncard) : (Injective putnam_1985_b1_solution ∧ βˆ€ m : Fin 5 β†’ β„€, Injective m β†’ numnzcoeff (p putnam_1985_b1_solution) ≀ numnzcoeff (p m)) := sorry
Let $k$ be the smallest positive integer for which there exist distinct integers $m_1, m_2, m_3, m_4, m_5$ such that the polynomial \[ p(x) = (x-m_1)(x-m_2)(x-m_3)(x-m_4)(x-m_5) \] has exactly $k$ nonzero coefficients. Find, with proof, a set of integers $m_1, m_2, m_3, m_4, m_5$ for which this minimum $k$ is achieved.
Show that the minimum $k = 3$ is obtained for $\{m_1, m_2, m_3, m_4, m_5\} = \{-2, -1, 0, 1, 2\}$.
['algebra']
null
theory putnam_1985_b1 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1985_b1_solution::"int \<times> int \<times> int \<times> int \<times> int" where "putnam_1985_b1_solution \<equiv> undefined" (* (-2, -1, 0, 1, 2) *) theorem putnam_1985_b1: fixes p::"int\<Rightarrow>int\<Rightarrow>int\<Rightarrow>int\<Rightarrow>int\<Rightarrow>(real poly)" and numnzcoeff::"(real poly) \<Rightarrow> nat" defines "p \<equiv> \<lambda>m1. \<lambda>m2. \<lambda>m3. \<lambda>m4. \<lambda>m5. [: -m1, 1 :] * [: -m2, 1 :] * [: -m3, 1 :] * [: -m4, 1 :] * [: -m5, 1 :]" and "numnzcoeff \<equiv> \<lambda>P. card {j::nat. j \<ge> 0 \<and> j \<le> degree P \<and> coeff P j \<noteq> 0}" shows "let (m1, m2, m3, m4, m5) = putnam_1985_b1_solution in ((card {m1, m2, m3, m4, m5} = 5) \<and> (\<forall>m. let (a, b, c, d, e) = m in (card {a, b, c, d, e} = 5 \<longrightarrow> numnzcoeff (p m1 m2 m3 m4 m5) \<le> numnzcoeff (p a b c d e))))" sorry end
null
putnam_1985_b2
abbrev putnam_1985_b2_solution : β„• β†’ β„• := sorry -- fun n ↦ ite (n = 101) 99 0 theorem putnam_1985_b2 (f : β„• β†’ ℝ β†’ ℝ) (hf0x : βˆ€ x : ℝ, f 0 x = 1) (hfn0 : βˆ€ n β‰₯ 1, f n 0 = 0) (hfderiv : βˆ€ x : ℝ, βˆ€ n, deriv (f (n + 1)) x = (n + 1) * f n (x + 1)) : (βˆƒ a : β„•, a = f 100 1 ∧ Nat.factorization a = putnam_1985_b2_solution) := sorry
Define polynomials $f_n(x)$ for $n \geq 0$ by $f_0(x)=1$, $f_n(0)=0$ for $n \geq 1$, and \[ \frac{d}{dx} f_{n+1}(x) = (n+1)f_n(x+1) \] for $n \geq 0$. Find, with proof, the explicit factorization of $f_{100}(1)$ into powers of distinct primes.
Show that $f_{100}(1) = 101^{99}$.
['algebra']
Section putnam_1985_b2. Require Import Nat List ZArith Znumtheory. Open Scope nat_scope. Definition putnam_1985_b2_solution := repeat 101 99. Theorem putnam_1985_b2: let P := fix p (n x: nat) : nat := match (n,x) with | (O, x) => 1 | (S n', x) => (n' + 1) * p n' (x + 1) end in let val := P 100 1 in exists (l: list nat), forall (x: nat), (In x l -> prime (Z.of_nat x)) -> fold_left mul l 1 = val <-> l = putnam_1985_b2_solution. Proof. Admitted. End putnam_1985_b2.
theory putnam_1985_b2 imports Complex_Main "HOL-Computational_Algebra.Polynomial" "HOL-Computational_Algebra.Primes" "HOL-Analysis.Derivative" begin definition putnam_1985_b2_solution::"nat multiset" where "putnam_1985_b2_solution \<equiv> undefined" (* (replicate_mset 99 101) *) theorem putnam_1985_b2: fixes f::"nat\<Rightarrow>real\<Rightarrow>real" assumes hf0x : "\<forall>x::real. f 0 x = 1" and hfn0 : "\<forall>n::nat \<ge> 1. f n 0 = 0" and hfderiv : "\<forall>x::real. \<forall>n::nat. (deriv (f (n+1)) x) = (n+1) * f n (x+1)" shows "\<exists>a::nat. a = f 100 1 \<and> prime_factorization a = putnam_1985_b2_solution" sorry end
null
putnam_1985_b3
theorem putnam_1985_b3 (a : β„• β†’ β„• β†’ β„•) (apos : βˆ€ m n : β„•, a m n > 0) (ha : βˆ€ k : β„•, k > 0 β†’ {(m, n) : β„• Γ— β„• | m > 0 ∧ n > 0 ∧ a m n = k}.encard = 8) : (βˆƒ m n, m > 0 ∧ n > 0 ∧ a m n > m * n) := sorry
Let \[ \begin{array}{cccc} a_{1,1} & a_{1,2} & a_{1,3} & \dots \\ a_{2,1} & a_{2,2} & a_{2,3} & \dots \\ a_{3,1} & a_{3,2} & a_{3,3} & \dots \\ \vdots & \vdots & \vdots & \ddots \end{array} \] be a doubly infinite array of positive integers, and suppose each positive integer appears exactly eight times in the array. Prove that $a_{m,n} > mn$ for some pair of positive integers $(m,n)$.
null
['algebra']
Section putnam_1985_b3. Require Import Nat List. Theorem putnam_1985_b3: let exactly_equal (a: (nat*nat) -> nat) (ij: (nat*nat)) := (exists (l8: list (nat*nat)), length l8 = 8 /\ NoDup l8 /\ (forall (n: (nat*nat)), In n l8 -> a n = a ij)) /\ (~exists (l9: list (nat*nat)), length l9 = 9 /\ NoDup l9 /\ (forall (n: (nat*nat)), In n l9 -> a n = a ij)) in forall (a: (nat*nat) -> nat), (forall (ij: (nat*nat)), exactly_equal a ij) /\ (exists (ij: (nat*nat)), a ij > fst ij*snd ij). Proof. Admitted. End putnam_1985_b3.
theory putnam_1985_b3 imports Complex_Main begin theorem putnam_1985_b3: fixes a::"nat\<Rightarrow>nat\<Rightarrow>nat" assumes apos : "\<forall>m n::nat. a m n > 0" and ha : "\<forall>k::nat. k > 0 \<longrightarrow> card {(m::nat, n::nat). m > 0 \<and> n > 0 \<and> a m n = k} = 8" shows "\<exists>m n::nat. m > 0 \<and> n > 0 \<and> a m n > m * n" sorry end
null
putnam_1985_b5
abbrev putnam_1985_b5_solution : ℝ := sorry -- sqrt (Real.pi / 1985) * exp (-3970) theorem putnam_1985_b5 (fact : ∫ x in univ, exp (- x ^ 2) = sqrt (Real.pi)) : (∫ t in Set.Ioi 0, t ^ (- (1 : ℝ) / 2) * exp (-1985 * (t + t ^ (-(1 : ℝ)))) = putnam_1985_b5_solution) := sorry
Evaluate $\int_0^\infty t^{-1/2}e^{-1985(t+t^{-1})}\,dt$. You may assume that $\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}$.
Show that the integral evaluates to $\sqrt{\frac{\pi}{1985}}e^{-3970}$.
['analysis']
Section putnam_1985_b5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1985_b5_solution := sqrt (PI / 1985) * exp (-3970). Theorem putnam_1985_b5: Lim_seq (fun n => RInt (fun x => Rpower x (-1/2) * exp (-1985 * (x + 1/x))) 0 (INR n)) = putnam_1985_b5_solution. Proof. Admitted. End putnam_1985_b5.
theory putnam_1985_b5 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1985_b5_solution::real where "putnam_1985_b5_solution \<equiv> undefined" (* sqrt (pi / 1985) * exp (-3970) *) theorem putnam_1985_b5: assumes "interval_lebesgue_integral lebesgue MInfty PInfty (\<lambda>x. exp (- (x^2))) = sqrt (pi)" shows "interval_lebesgue_integral lebesgue 0 PInfty (\<lambda>t. t powr (-1/2) * exp (-1985 * (t + t powi (-1)))) = putnam_1985_b5_solution" sorry end
null
putnam_1985_b6
theorem putnam_1985_b6 (n : β„•) (npos : n > 0) (G : Finset (Matrix (Fin n) (Fin n) ℝ)) (groupG : (βˆ€ g ∈ G, βˆ€ h ∈ G, g * h ∈ G) ∧ 1 ∈ G ∧ (βˆ€ g ∈ G, βˆƒ h ∈ G, g * h = 1)) (hG : βˆ‘ M in G, Matrix.trace M = 0) : (βˆ‘ M in G, M = 0) := sorry
Let $G$ be a finite set of real $n\times n$ matrices $\{M_i\}$, $1 \leq i \leq r$, which form a group under matrix multiplication. Suppose that $\sum_{i=1}^r \mathrm{tr}(M_i)=0$, where $\mathrm{tr}(A)$ denotes the trace of the matrix $A$. Prove that $\sum_{i=1}^r M_i$ is the $n \times n$ zero matrix.
null
['abstract_algebra', 'linear_algebra']
null
theory putnam_1985_b6 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" "HOL-Analysis.Determinants" begin theorem putnam_1985_b6: fixes n::nat and G::"(real^'a^'a) set" assumes npos : "n > 0" and acard : "CARD('a) = n" and Gfin : "finite G" and groupG : "(\<forall>g \<in> G. \<forall>h \<in> G. g ** h \<in> G) \<and> (1 \<in> G) \<and> (\<forall>g \<in> G. \<exists>h \<in> G. g ** h = 1)" and hG : "(\<Sum>M \<in> G. trace M) = 0" shows "(\<Sum>M \<in> G. M) = 0" sorry end
null
putnam_1994_a1
theorem putnam_1994_a1 (a : β„• β†’ ℝ) (ha : βˆ€ n β‰₯ 1, 0 < a n ∧ a n ≀ a (2 * n) + a (2 * n + 1)) : Β¬(βˆƒ s : ℝ, Tendsto (fun N : β„• => βˆ‘ n : Set.Icc 1 N, a n) atTop (𝓝 s)) := sorry
Suppose that a sequence $a_1,a_2,a_3,\dots$ satisfies $0<a_n \leq a_{2n}+a_{2n+1}$ for all $n \geq 1$. Prove that the series $\sum_{n=1}^\infty a_n$ diverges.
null
['analysis']
Section putnam_1994_a1. Require Import Nat Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1994_a1: exists (a: nat -> R), forall (n: nat), gt n 0 -> 0 < a n <= a (mul 2 n) + a (add (mul 2 n) 1) -> ~ ex_lim_seq (fun n => sum_n (fun m => a m) n). Proof. Admitted. End putnam_1994_a1.
theory putnam_1994_a1 imports Complex_Main begin theorem putnam_1994_a1: fixes a :: "nat \<Rightarrow> real" assumes ha: "\<forall>n::nat\<ge>1. 0 < a n \<and> a n \<le> a (2*n) + a (2*n+1)" shows "\<not>(\<exists>s::real. filterlim (\<lambda>N::nat. (\<Sum>n::nat=1..N. a n)) (nhds s) at_top)" sorry end
null
putnam_1994_a4
theorem putnam_1994_a4 (A B : Matrix (Fin 2) (Fin 2) β„€) (ABinv : Nonempty (Invertible A) ∧ Nonempty (Invertible (A + B)) ∧ Nonempty (Invertible (A + 2 * B)) ∧ Nonempty (Invertible (A + 3 * B)) ∧ Nonempty (Invertible (A + 4 * B))) : Invertible (A + 5 * B) := sorry
Let $A$ and $B$ be $2 \times 2$ matrices with integer entries such that $A$, $A+B$, $A+2B$, $A+3B$, and $A+4B$ are all invertible matrices whose inverses have integer entries. Show that $A+5B$ is invertible and that its inverse has integer entries.
null
['linear_algebra']
null
theory putnam_1994_a4 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin theorem putnam_1994_a4: fixes A B :: "int^2^2" assumes ABinv: "invertible A \<and> invertible (A + B) \<and> invertible (A + 2*B) \<and> invertible (A + 3*B) \<and> invertible (A + 4*B)" shows "invertible (A + 5*B)" sorry end
null
putnam_1994_a5
theorem putnam_1994_a5 (r : β„• β†’ ℝ) (S : Set ℝ) (rpos : r > 0) (rlim : Tendsto r atTop (𝓝 0)) (hS : S = {x : ℝ | βˆƒ i : Fin 1994 β†’ β„•, (βˆ€ j k : Fin 1994, j < k β†’ i j < i k) ∧ (x = βˆ‘ j : Fin 1994, r (i j))}) : βˆ€ a b : ℝ, a < b β†’ (βˆƒ c d : ℝ, a ≀ c ∧ c < d ∧ d ≀ b ∧ (Set.Ioo c d) ∩ S = βˆ…) := sorry
Let $(r_n)_{n \geq 0}$ be a sequence of positive real numbers such that $\lim_{n \to \infty} r_n=0$. Let $S$ be the set of numbers representable as a sum $r_{i_1}+r_{i_2}+\cdots+r_{i_{1994}}$, with $i_1<i_2<\cdots<i_{1994}$. Show that every nonempty interval $(a,b)$ contains a nonempty subinterval $(c,d)$ that does not intersect $S$.
null
['analysis']
null
theory putnam_1994_a5 imports Complex_Main begin (* uses (nat \<Rightarrow> nat) instead of (Fin 1994 \<Rightarrow> nat) *) theorem putnam_1994_a5: fixes r :: "nat \<Rightarrow> real" and S :: "real set" assumes rpos: "\<forall>i::nat. r i > 0" and rlim: "filterlim r (nhds 0) at_top" and hS: "S \<equiv> {x::real. (\<exists>i::nat\<Rightarrow>nat. (\<forall>j::nat\<in>{0..1993}. \<forall>k::nat\<in>{0..1993}. (j < k \<longrightarrow> i j < i k)) \<and> (x = (\<Sum>j::nat=0..1993. r (i j))))}" shows "\<forall>a b::real. a < b \<longrightarrow> (\<exists>c d::real. a \<le> c \<and> c < d \<and> d \<le> b \<and> {c<..<d} \<inter> S = {})" sorry end
null
putnam_1994_a6
theorem putnam_1994_a6 (f : Fin 10 β†’ Equiv.Perm β„€) (mijcomp : β„• β†’ (β„• β†’ Fin 10) β†’ β„• β†’ (β„€ β†’ β„€)) (F : Finset (β„€ β†’ β„€)) (hf: βˆ€ n : β„€, βˆƒ m : β„•, βˆƒ i : β„• β†’ Fin 10, m β‰₯ 1 ∧ (mijcomp m i 0) 0 = n) (hmijcomp : βˆ€ m β‰₯ 1, βˆ€ (i : β„• β†’ Fin 10) (j : Fin m), mijcomp m i j = if (j = m - 1) then (f (i j) : β„€ β†’ β„€) else (f (i j) ∘ mijcomp m i (j + 1))) (hF : F = {g : β„€ β†’ β„€ | βˆƒ e : Fin 10 β†’ Fin 2, g = (f 0)^[e 0] ∘ (f 1)^[e 1] ∘ (f 2)^[e 2] ∘ (f 3)^[e 3] ∘ (f 4)^[e 4] ∘ (f 5)^[e 5] ∘ (f 6)^[e 6] ∘ (f 7)^[e 7] ∘ (f 8)^[e 8] ∘ (f 9)^[e 9]}) : βˆ€ A : Finset β„€, A.Nonempty β†’ {g ∈ F | g '' A = A}.encard ≀ 512 := sorry
Let $f_1,\dots,f_{10}$ be bijections of the set of integers such that for each integer $n$, there is some composition $f_{i_1} \circ f_{i_2} \circ \cdots \circ f_{i_m}$ of these functions (allowing repetitions) which maps 0 to $n$. Consider the set of $1024$ functions $\mathcal{F}=\{f_1^{e_1} \circ f_2^{e_2} \circ \cdots \circ f_{10}^{e_{10}}\}$, $e_i=0$ or $1$ for $1 \leq i \leq 10$. ($f_i^0$ is the identity function and $f_i^1=f_i$.) Show that if $A$ is any nonempty finite set of integers, then at most $512$ of the functions in $\mathcal{F}$ map $A$ to itself.
null
['algebra']
null
theory putnam_1994_a6 imports Complex_Main "HOL-Combinatorics.Permutations" begin (* uses (nat \<Rightarrow> (int \<Rightarrow> int)) instead of (Fin 10 \<Rightarrow> (int \<Rightarrow> int)) and (nat \<Rightarrow> nat) instead of (Fin m \<Rightarrow> Fin 10) and (Fin 10 \<Rightarrow> Fin 2) *) theorem putnam_1994_a6: fixes f :: "nat \<Rightarrow> (int \<Rightarrow> int)" and mijcomp :: "nat \<Rightarrow> (nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> (int \<Rightarrow> int)" and F :: "(int \<Rightarrow> int) set" assumes hfperm: "\<forall>i::nat\<in>{0..9}. (f i) permutes UNIV" and hfcomp: "\<forall>n::int. \<exists>m::nat\<ge>1. \<exists>i::nat\<Rightarrow>nat. (\<forall>j::nat\<in>{0..(m-1)}. i j \<in> {0..9}) \<and> (mijcomp m i 0) 0 = n" and hmijcomp: "\<forall>m::nat\<ge>1. \<forall>(i::nat\<Rightarrow>nat). \<forall>j::nat\<in>{0..(m-1)}. mijcomp m i j = (if (j = m-1) then (f (i j)) else (f (i j) \<circ> mijcomp m i (j+1)))" and hF: "F \<equiv> {g::int\<Rightarrow>int. (\<exists>e::nat\<Rightarrow>nat. (\<forall>i::nat\<in>{0..9}. e i = 0 \<or> e i = 1) \<and> (g = (f 0)^^(e 0) \<circ> (f 1)^^(e 1) \<circ> (f 2)^^(e 2) \<circ> (f 3)^^(e 3) \<circ> (f 4)^^(e 4) \<circ> (f 5)^^(e 5) \<circ> (f 6)^^(e 6) \<circ> (f 7)^^(e 7) \<circ> (f 8)^^(e 8) \<circ> (f 9)^^(e 9)))}" shows "\<forall>A::int set. (finite A \<and> A \<noteq> {}) \<longrightarrow> (card {g\<in>F. g ` A = A} \<le> 512)" sorry end
null
putnam_1994_b1
abbrev putnam_1994_b1_solution : Set β„€ := sorry -- {n : β„€ | (315 ≀ n ∧ n ≀ 325) ∨ (332 ≀ n ∧ n ≀ 350)} theorem putnam_1994_b1 (n : β„€) (nwithin : Prop) (hnwithin : nwithin = ({m : β„• | |n - m ^ 2| ≀ 250}.encard = 15)) : (n > 0 ∧ nwithin) ↔ n ∈ putnam_1994_b1_solution := sorry
Find all positive integers $n$ that are within $250$ of exactly $15$ perfect squares.
Show that an integer $n$ is within $250$ of exactly $15$ perfect squares if and only if either $315 \leq n \leq 325$ or $332 \leq n \leq 350$.
['algebra']
Section putnam_1994_b1. Require Import Ensembles Finite_sets ZArith. Open Scope Z. Definition putnam_1994_b1_solution (n: Z) := 315 <= n <= 325 \/ 332 <= n <= 350. Theorem putnam_1994_b1: forall (n: Z), exists (E: Ensemble Z), cardinal Z E 15 -> forall (m: Z), E m -> Z.abs (m * m - n) <= 250 -> putnam_1994_b1_solution n. Proof. Admitted. End putnam_1994_b1.
theory putnam_1994_b1 imports Complex_Main begin definition putnam_1994_b1_solution :: "nat set" where "putnam_1994_b1_solution \<equiv> undefined" (* {n::nat. (315 \<le> n \<and> n \<le> 325) \<or> (332 \<le> n \<and> n \<le> 350)} *) theorem putnam_1994_b1: fixes n :: nat and nwithin :: bool assumes hnwithin: "nwithin \<equiv> (card {m::nat. \<bar>n - m^2\<bar> \<le> 250} = 15)" shows "(n > 0 \<and> nwithin) \<longleftrightarrow> n \<in> putnam_1994_b1_solution" sorry end
null
putnam_1994_b2
abbrev putnam_1994_b2_solution : Set ℝ := sorry -- {c : ℝ | c < 243 / 8} theorem putnam_1994_b2 (c : ℝ) (inter : Prop) (hinter : inter = βˆƒ m b : ℝ, {x : ℝ | m * x + b = x ^ 4 + 9 * x ^ 3 + c * x ^ 2 + 9 * x + 4}.encard = 4) : inter ↔ c ∈ putnam_1994_b2_solution := sorry
For which real numbers $c$ is there a straight line that intersects the curve $x^4+9x^3+cx^2+9x+4$ in four distinct points?
Show that there exists such a line if and only if $c<243/8$.
['geometry', 'algebra']
Section putnam_1994_b2. Require Import List Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1994_b2_solution (c: R) := c < 243 / 8. Theorem putnam_1994_b2: forall (c: R), exists(m b: R), let f (x: R) := pow x 4 + 9 * pow x 3 + c * pow x 2 + 9 * x + 4 in let g (x: R) := m * x + b in exists (l: list R), eq (length l) 4%nat /\ NoDup l /\ forall (r: R), In r l -> f r = g r <-> putnam_1994_b2_solution c. Proof. Admitted. End putnam_1994_b2.
theory putnam_1994_b2 imports Complex_Main begin definition putnam_1994_b2_solution :: "real set" where "putnam_1994_b2_solution \<equiv> undefined" (* {c::real. c < 243/8} *) theorem putnam_1994_b2: fixes c :: real and inter :: bool assumes hinter: "inter \<equiv> (\<exists>m b::real. card {x::real. m*x + b = x^4 + 9*x^3 + c*x^2 + 9*x + 4} = 4)" shows "inter \<longleftrightarrow> c \<in> putnam_1994_b2_solution" sorry end
null
putnam_1994_b3
abbrev putnam_1994_b3_solution : Set ℝ := sorry -- Set.Iio 1 theorem putnam_1994_b3 (k : ℝ) (allfexN : Prop) (hallfexN : allfexN = βˆ€ f : ℝ β†’ ℝ, (f > 0 ∧ Differentiable ℝ f ∧ βˆ€ x : ℝ, deriv f x > f x) β†’ (βˆƒ N : ℝ, βˆ€ x > N, f x > Real.exp (k * x))) : allfexN ↔ k ∈ putnam_1994_b3_solution := sorry
Find the set of all real numbers $k$ with the following property: For any positive, differentiable function $f$ that satisfies $f'(x)>f(x)$ for all $x$, there is some number $N$ such that $f(x)>e^{kx}$ for all $x>N$.
Show that the desired set is $(-\infty,1)$.
['analysis']
Section putnam_1994_b3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1994_b3_solution (k: R) := k <= 1. Theorem putnam_1994_b3: forall (k: R) (f: R -> R) (x: R), f x > 0 /\ ex_derive f x /\ (Derive f) x > f x -> exists (N: R), x > N -> f x > exp (k * x) <-> putnam_1994_b3_solution k. Proof. Admitted. End putnam_1994_b3.
theory putnam_1994_b3 imports Complex_Main "HOL-Analysis.Derivative" begin definition putnam_1994_b3_solution :: "real set" where "putnam_1994_b3_solution \<equiv> undefined" (* {..<1} *) theorem putnam_1994_b3: fixes k :: real and allfexN :: bool assumes hallfexN: "allfexN \<equiv> (\<forall>f::real\<Rightarrow>real. (((\<forall>x::real. f x > 0) \<and> f differentiable_on UNIV \<and> (\<forall>x::real. deriv f x > f x)) \<longrightarrow> (\<exists>N::real. \<forall>x::real>N. f x > exp (k*x))))" shows "allfexN \<longleftrightarrow> k \<in> putnam_1994_b3_solution" sorry end
null
putnam_1994_b4
theorem putnam_1994_b4 (matgcd : Matrix (Fin 2) (Fin 2) β„€ β†’ β„€) (A : Matrix (Fin 2) (Fin 2) β„€) (d : β„• β†’ β„€) (hmatgcd : βˆ€ M : Matrix (Fin 2) (Fin 2) β„€, matgcd M = Int.gcd (Int.gcd (Int.gcd (M 0 0) (M 0 1)) (M 1 0)) (M 1 1)) (hA : A 0 0 = 3 ∧ A 0 1 = 2 ∧ A 1 0 = 4 ∧ A 1 1 = 3) (hd : βˆ€ n β‰₯ 1, d n = matgcd (A ^ n - 1)) : Tendsto d atTop atTop := sorry
For $n \geq 1$, let $d_n$ be the greatest common divisor of the entries of $A^n-I$, where $A=\begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix}$ and $I=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$. Show that $\lim_{n \to \infty} d_n=\infty$.
null
['linear_algebra', 'number_theory', 'analysis']
Section putnam_1994_b4. Require Import Nat List Reals Coquelicot.Coquelicot. Import ListNotations. Open Scope R. Theorem putnam_1994_b4: let fix gcd_n (args : list nat) : nat := match args with | nil => 0%nat | h :: args' => gcd h (gcd_n args') end in let fix Mmult_n {T : Ring} {n : nat} (A : matrix n n) (p : nat) := match p with | O => A | S p' => @Mmult T n n n A (Mmult_n A p') end in let A := mk_matrix 2 2 (fun i j => match i, j with | 0, 0 => 3 | 0, 1 => 2 | 1, 0 => 4 | 1, 1 => 3 | _, _ => 0 end) in let I := mk_matrix 2 2 (fun i j => match i, j with | 0, 0 => 1 | 0, 1 => 0 | 1, 0 => 0 | 1, 1 => 1 | _, _ => 0 end) in let dn_mat (n: nat) := Mplus (Mmult_n A n) (opp I) in let dn (n: nat) := gcd_n [Z.to_nat (floor (coeff_mat 0 (dn_mat n) 0 0)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 0 1)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 1 0)); Z.to_nat (floor (coeff_mat 0 (dn_mat n) 1 1))] in ~ ex_lim_seq (fun n => INR (dn n)). Proof. Admitted. End putnam_1994_b4.
theory putnam_1994_b4 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin theorem putnam_1994_b4: fixes matgcd :: "(int^2^2) \<Rightarrow> nat" and A :: "int^2^2" and matpow :: "int^2^2 \<Rightarrow> nat \<Rightarrow> int^2^2" and d :: "nat \<Rightarrow> nat" assumes hmatgcd: "\<forall>M::int^2^2. matgcd M = Gcd {M$1$1, M$1$2, M$2$1, M$2$2}" and hA: "A$1$1 = 3 \<and> A$1$2 = 2 \<and> A$2$1 = 4 \<and> A$2$2 = 3" and hmatpow: "\<forall>M::int^2^2. matpow M 0 = mat 1 \<and> (\<forall>k::nat>0. matpow M k = matpow M (k-1) ** M)" and hd: "\<forall>n::nat\<ge>1. d n = matgcd (matpow A n - mat 1)" shows "filterlim d at_top at_top" sorry end
null
putnam_1994_b5
theorem putnam_1994_b5 (f : ℝ β†’ β„• β†’ β„€) (n : β„•) (hf : βˆ€ (Ξ± : ℝ) (x : β„•), f Ξ± x = Int.floor (Ξ± * x)) (npos : n > 0) : βˆƒ Ξ± : ℝ, βˆ€ k ∈ Set.Icc 1 n, (((f Ξ±) ^ k) (n ^ 2) = n ^ 2 - k) ∧ (f (Ξ± ^ k) (n ^ 2) = n ^ 2 - k) := sorry
For any real number $\alpha$, define the function $f_\alpha(x)=\lfloor \alpha x \rfloor$. Let $n$ be a positive integer. Show that there exists an $\alpha$ such that for $1 \leq k \leq n$, $f_\alpha^k(n^2)=n^2-k=f_{\alpha^k}(n^2)$.
null
['algebra']
Section putnam_1994_b5. Require Import Basics ZArith Zpower Reals Coquelicot.Coquelicot. Theorem putnam_1994_b5: let fix 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 in let fa (a x: R) := IZR (floor (a * x)) in forall (n: Z), Z.gt n 0 -> exists (a: R), forall (k: Z), and (Z.ge 1 k) (Z.ge k n) -> (compose_n (fa a) (Z.to_nat k)) (IZR (Z.pow n 2)) = IZR (Z.pow n 2 - k) /\ IZR (Z.pow n 2 - k) = fa (Rpower a (IZR k)) (IZR (Z.pow n 2)). Proof. Admitted. End putnam_1994_b5.
theory putnam_1994_b5 imports Complex_Main begin theorem putnam_1994_b5: fixes f :: "real \<Rightarrow> nat \<Rightarrow> int" and n :: nat assumes hf: "\<forall>(\<alpha>::real)(x::nat). f \<alpha> x = \<lfloor>\<alpha>*x\<rfloor>" and npos: "n > 0" shows "\<exists>\<alpha>::real. \<forall>k::nat\<in>{1..n}. ((f \<alpha> (n^2))^k = n^2 - k) \<and> (f (\<alpha>^k) (n^2) = n^2 - k)" sorry end
null
putnam_1994_b6
theorem putnam_1994_b6 (n : β„• β†’ β„€) (hn : βˆ€ a : β„•, n a = 101 * a - 100 * 2 ^ a) : βˆ€ a b c d : Set.Icc 0 99, (n a + n b ≑ n c + n d [ZMOD 10100]) β†’ (({a, b} : Set (Set.Icc 0 99)) = {c, d}) := sorry
For any integer $a$, set $n_a=101a-100 \cdot 2^a$. Show that for $0 \leq a,b,c,d \leq 99$, $n_a+n_b \equiv n_c+n_d \pmod{10100}$ implies $\{a,b\}=\{c,d\}$.
null
['number_theory']
Section putnam_1994_b6. Require Import Nat. Theorem putnam_1994_b6: let n (a: nat) := 101 * a - 100 * pow 2 a in forall (a b c d: nat), 0 <= a <= 99 /\ 0 <= b <= 99 /\ 0 <= c <= 99 /\ 0 <= d <= 99 /\ n a + n b mod 10100 = n c + n d -> (a,b) = (c,d). Proof. Admitted. End putnam_1994_b6.
theory putnam_1994_b6 imports Complex_Main "HOL-Number_Theory.Cong" begin theorem putnam_1994_b6: fixes n :: "nat \<Rightarrow> int" assumes hn: "\<forall>a::nat. n a = 101*a - 100 * 2^a" shows "\<forall>a::nat\<in>{0..99}. \<forall>b::nat\<in>{0..99}. \<forall>c::nat\<in>{0..99}. \<forall>d::nat\<in>{0..99}. (([n a + n b = n c + n d] (mod 10100)) \<longrightarrow> {a, b} = {c, d})" sorry end
null
putnam_1979_a1
abbrev putnam_1979_a1_solution : Multiset β„• := sorry -- Multiset.replicate 659 3 + {2} theorem putnam_1979_a1 (P : Multiset β„• β†’ Prop := fun a => Multiset.card a > 0 ∧ (βˆ€ i ∈ a, i > 0) ∧ a.sum = 1979) : P putnam_1979_a1_solution ∧ βˆ€ a : Multiset β„•, P a β†’ putnam_1979_a1_solution.prod β‰₯ a.prod := sorry
For which positive integers $n$ and $a_1, a_2, \dots, a_n$ with $\sum_{i = 1}^{n} a_i = 1979$ does $\prod_{i = 1}^{n} a_i$ attain the greatest value?
$n$ equals $660$; all but one of the $a_i$ equal $3$ and the remaining $a_i$ equals $2$.
['algebra']
Section putnam_1979_a1. Require Import Nat List. Definition putnam_1979_a1_solution := 2 :: repeat 3 659. Theorem putnam_1979_a1: forall (l m: list nat), fold_left add l 0 = 1979 /\ fold_left add m 0 = 1979 /\ fold_left mul l 1 >= fold_left mul m 1 <-> l = putnam_1979_a1_solution. Proof. Admitted. End putnam_1979_a1.
theory putnam_1979_a1 imports Complex_Main "HOL-Library.Multiset" begin definition putnam_1979_a1_solution :: "nat multiset" where "putnam_1979_a1_solution \<equiv> undefined" (* add_mset 2 (replicate_mset 659 3) *) theorem putnam_1979_a1: fixes P :: "nat multiset \<Rightarrow> bool" defines "P \<equiv> \<lambda> a :: nat multiset. size a > 0 \<and> (\<forall> i \<in># a. i > 0) \<and> sum_mset a = 1979" shows "P putnam_1979_a1_solution \<and> (\<forall> a :: nat multiset. P a \<longrightarrow> prod_mset putnam_1979_a1_solution \<ge> prod_mset a)" sorry end
null
putnam_1979_a2
abbrev putnam_1979_a2_solution : ℝ β†’ Prop := sorry -- fun k : ℝ => k β‰₯ 0 theorem putnam_1979_a2 : βˆ€ k : ℝ, (βˆƒ f : ℝ β†’ ℝ, Continuous f ∧ βˆ€ x : ℝ, f (f x) = k*x^9) ↔ putnam_1979_a2_solution k := sorry
For which real numbers $k$ does there exist a continuous function $f : \mathbb{R} \to \mathbb{R}$ such that $f(f(x)) = kx^9$ for all real $x$?
Such a function exists if and only if $k \ge 0$.
['analysis', 'algebra']
Section putnam_1979_a2. Require Import Basics Reals Coquelicot.Coquelicot. Theorem putnam_1979_a2: forall (k: R), exists (f: R -> R), continuity f -> forall x, (compose f f) x = k * pow x 9. Proof. Admitted. End putnam_1979_a2.
theory putnam_1979_a2 imports Complex_Main begin definition putnam_1979_a2_solution :: "real \<Rightarrow> bool" where "putnam_1979_a2_solution \<equiv> undefined" (* \<lambda> k :: real. k \<ge> 0 *) theorem putnam_1979_a2: shows "\<forall> k :: real. (\<exists> f :: real \<Rightarrow> real. continuous_on UNIV f \<and> (\<forall> x :: real. f (f x) = k * x ^ 9)) \<longleftrightarrow> putnam_1979_a2_solution k" sorry end
null
putnam_1979_a3
abbrev putnam_1979_a3_solution : (ℝ Γ— ℝ) β†’ Prop := sorry -- fun (a, b) => βˆƒ m : β„€, a = m ∧ b = m theorem putnam_1979_a3 (x : β„• β†’ ℝ) (hx : βˆ€ n : β„•, x n β‰  0 ∧ (n β‰₯ 3 β†’ x n = (x (n - 2))*(x (n - 1))/(2*(x (n - 2)) - (x (n - 1))))) : (βˆ€ m : β„•, βˆƒ n : β„•, n > m ∧ βˆƒ a : β„€, a = x n) ↔ putnam_1979_a3_solution (x 1, x 2) := sorry
Let $x_1, x_2, x_3, \dots$ be a sequence of nonzero real numbers such that $$x_n = \frac{x_{n-2}x_{n-1}}{2x_{n-2}-x_{n-1}}$$ for all $n \ge 3$. For which real values of $x_1$ and $x_2$ does $x_n$ attain integer values for infinitely many $n$?
We must have $x_1 = x_2 = m$ for some integer $m$.
['algebra']
Section putnam_1979_a3. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1979_a3_solution (x y: R) := x = IZR (floor x) /\ y = IZR (floor y). Theorem putnam_1979_a3: let A := fix a (x y: R) (n: nat) := match n with | O => x | S O => y | S ((S n'') as n') => (a x y n'' * a x y n') / (2 * a x y n'' - a x y n') end in forall (n: nat), exists (x y: R), (A x y n+1 <> 2 * A x y n) /\ (~ exists (r: R), A x y n = IZR (floor (A x y n)) /\ INR n < r) <-> putnam_1979_a3_solution x y. Proof. Admitted. End putnam_1979_a3.
theory putnam_1979_a3 imports Complex_Main begin definition putnam_1979_a3_solution :: "(real \<times> real) \<Rightarrow> bool" where "putnam_1979_a3_solution \<equiv> undefined" (* \<lambda> (a :: real, b :: real). \<exists> m :: int. a = m \<and> b = m *) theorem putnam_1979_a3: fixes x :: "nat \<Rightarrow> real" assumes hx: "\<forall> n :: nat. x n \<noteq> 0 \<and> (n \<ge> 3 \<longrightarrow> x n = x (n - 2) * x (n - 1) / (2 * x (n - 2) - x (n - 1)))" shows "(\<forall> m :: nat. \<exists> n :: nat. n > m \<and> (\<exists> a :: int. a = x n)) \<longleftrightarrow> putnam_1979_a3_solution (x 1, x 2)" sorry end
null
putnam_1979_a4
abbrev putnam_1979_a4_solution : Prop := sorry -- True theorem putnam_1979_a4 (A : Finset (Fin 2 β†’ ℝ) Γ— Finset (Fin 2 β†’ ℝ) β†’ Prop := fun (R, B) => R.card = B.card ∧ R ∩ B = βˆ… ∧ βˆ€ u : Finset (Fin 2 β†’ ℝ), u βŠ† R βˆͺ B ∧ u.card = 3 β†’ Β¬Collinear ℝ (u : Set (Fin 2 β†’ ℝ))) (w : (Fin 2 β†’ ℝ) Γ— (Fin 2 β†’ ℝ) β†’ ℝ β†’ (Fin 2 β†’ ℝ) := fun (P, Q) => fun x : ℝ => fun i : Fin 2 => x * P i + (1 - x) * Q i) : (βˆ€ R : Finset (Fin 2 β†’ ℝ), βˆ€ B : Finset (Fin 2 β†’ ℝ), A (R, B) β†’ βˆƒ v : Finset ((Fin 2 β†’ ℝ) Γ— (Fin 2 β†’ ℝ)), (βˆ€ L ∈ v, βˆ€ M ∈ v, L β‰  M β†’ βˆ€ x ∈ Icc 0 1, βˆ€ y ∈ Icc 0 1, Euclidean.dist (w (L.1, L.2) x) (w (M.1, M.2) y) β‰  0) ∧ v.card = R.card ∧ βˆ€ L ∈ v, L.1 ∈ R ∧ L.2 ∈ B) ↔ putnam_1979_a4_solution := sorry
Let $A$ be a set of $2n$ points in the plane, $n$ colored red and $n$ colored blue, such that no three points in $A$ are collinear. Must there exist $n$ closed straight line segments, each connecting one red and one blue point in $A$, such that no two of the $n$ line segments intersect?
Such line segments must exist.
['geometry', 'combinatorics']
null
theory putnam_1979_a4 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin definition putnam_1979_a4_solution :: bool where "putnam_1979_a4_solution \<equiv> undefined" (* True *) theorem putnam_1979_a4: fixes A :: "(real^2) set \<times> (real^2) set \<Rightarrow> bool" and w :: "(real^2) \<times> (real^2) \<Rightarrow> real \<Rightarrow> real^2" defines "A \<equiv> \<lambda> (R, B). finite R \<and> finite B \<and> card R = card B \<and> R \<inter> B = {} \<and> \<not>(\<exists> P \<in> R \<union> B. \<exists> Q \<in> R \<union> B. \<exists> N \<in> R \<union> B. Q \<noteq> P \<and> N \<noteq> P \<and> N \<noteq> Q \<and> (\<exists> c :: real. Q - P = c *s (N - P)))" and "w \<equiv> \<lambda> (P, Q) x. x *s P + (1 - x) *s Q" shows "(\<forall> R B :: (real^2) set. A (R, B) \<longrightarrow> (\<exists> v :: ((real^2) \<times> (real^2)) set. (card v = card R) \<and> (\<forall> L \<in> v. fst L \<in> R \<and> snd L \<in> B \<and> (\<forall> M \<in> v. L \<noteq> M \<longrightarrow> ((fst L \<noteq> fst M) \<and> (snd L \<noteq> snd M) \<and> (\<forall> x \<in> {0..1}. \<forall> y \<in> {0..1}. w L x \<noteq> w M y)))))) \<longleftrightarrow> putnam_1979_a4_solution" sorry end
null
putnam_1979_a5
theorem putnam_1979_a5 (S : ℝ β†’ β„• β†’ β„€ := fun x : ℝ => fun n : β„• => Int.floor (n*x)) (P : ℝ β†’ Prop := fun x : ℝ => x^3 - 10*x^2 + 29*x - 25 = 0) : βˆƒ Ξ± Ξ² : ℝ, Ξ± β‰  Ξ² ∧ P Ξ± ∧ P Ξ² ∧ βˆ€ n : β„•, βˆƒ m : β„€, m > n ∧ βˆƒ c d : β„•, S Ξ± c = m ∧ S Ξ² d = m := sorry
Let $S(x)$ denote the sequence $\lfloor 0 \rfloor, \lfloor x \rfloor, \lfloor 2x \rfloor, \lfloor 3x \rfloor, \dots$, where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$. Prove that there exist distinct real roots $\alpha$ and $\beta$ of $x^3 - 10x^2 + 29x - 25$ such that infinitely many positive integers appear in both $S(\alpha)$ and $S(\beta)$.
null
['algebra']
Section putnam_1979_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_a5: let f (x: R) := Rpower x 3 - 10 * pow x 2 + 29 * x - 25 in exists (r1 r2: R), r1 <> r2 /\ f r1 = 0 /\ f r2 = 0 /\ ~ exists (r: R), forall (n: nat), exists (p q: Z), n = Z.to_nat (floor (IZR p * r1)) /\ n = Z.to_nat (floor (IZR q * r2)) /\ INR n < r. Proof. Admitted. End putnam_1979_a5.
theory putnam_1979_a5 imports Complex_Main begin theorem putnam_1979_a5: fixes S :: "real \<Rightarrow> nat \<Rightarrow> int" and P :: "real \<Rightarrow> bool" defines "S \<equiv> \<lambda> (x :: real) (n :: nat). floor (n * x)" and "P \<equiv> \<lambda> x :: real. x ^ 3 - 10 * x ^ 2 + 29 * x - 25 = 0" shows "\<exists> \<alpha> \<beta> :: real. \<alpha> \<noteq> \<beta> \<and> P \<alpha> \<and> P \<beta> \<and> (\<forall> n :: nat. \<exists> m :: int. m > n \<and> (\<exists> c d :: nat. S \<alpha> c = m \<and> S \<beta> d = m))" sorry end
null
putnam_1979_a6
theorem putnam_1979_a6 (n : β„•) (p : β„• β†’ ℝ) (hp : βˆ€ i ∈ Finset.range n, p i ∈ Icc 0 1) : βˆƒ x ∈ Icc 0 1, (βˆ€ i ∈ Finset.range n, x β‰  p i) ∧ βˆ‘ i in Finset.range n, 1/|x - p i| ≀ 8*n*βˆ‘ i in Finset.range n, (1 : ℝ)/(2*i + 1) := sorry
For all $i \in \{0, 1, \dots, n - 1\}$, let $p_i \in [0, 1]$. Prove that there exists some $x \in [0, 1]$ such that $$\sum_{i = 0}^{n - 1} \frac{1}{|x - p_i|} \le 8n\left(\sum_{i = 0}^{n-1} \frac{1}{2i + 1}\right).$$
null
['algebra']
Section putnam_1979_a6. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_a6: forall (a: nat -> R) (n: nat), 0 <= a n <= 1 -> exists (b: R), 0 <= b <= 1 -> sum_n (fun n => 1/(b - a n)) n <= 8 * INR n * sum_n (fun i => 1/(2*(INR i+1) - 1)) n. Proof. Admitted. End putnam_1979_a6.
theory putnam_1979_a6 imports Complex_Main begin theorem putnam_1979_a6: fixes n :: nat and p :: "nat \<Rightarrow> real" assumes hp: "\<forall> i \<in> {1..n}. p i \<in> {0..1}" shows "\<exists> x \<in> {0..1}. (\<forall> i \<in> {1..n}. x \<noteq> p i) \<and> (\<Sum> i = 1..n. 1 / \<bar>x - p i\<bar>) \<le> 8 * n * (\<Sum> i = 1..n. 1 / (2 * i - 1))" sorry end
null
putnam_1979_b2
abbrev putnam_1979_b2_solution : ℝ Γ— ℝ β†’ ℝ := sorry -- fun (a, b) => (Real.exp (-1))*(b^b/a^a)^(1/(b-a)) theorem putnam_1979_b2 : βˆ€ a b : ℝ, 0 < a ∧ a < b β†’ Tendsto (fun t : ℝ => (∫ x in Icc 0 1, (b*x + a*(1 - x))^t)^(1/t)) (𝓝[β‰ ] 0) (𝓝 (putnam_1979_b2_solution (a, b))) := sorry
If $0 < a < b$, find $$\lim_{t \to 0} \left( \int_{0}^{1}(bx + a(1-x))^t dx \right)^{\frac{1}{t}}$$ in terms of $a$ and $b$.
The limit equals $$e^{-1}\left(\frac{b^b}{a^a}\right)^{\frac{1}{b-a}}.$$
['analysis']
Section putnam_1979_b2. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1979_b2_solution (a b: R):= (Rpower b (b/(b-a))) / ((exp 1) * Rpower a (a/(b-a))). Theorem putnam_1979_b2: forall (a b: R), 0 < a < b -> Lim_seq (fun lam => Rpower (RInt (fun x => Rpower (b*x + a*(1-x)) (INR lam)) 0 1) 1/INR lam) = putnam_1979_b2_solution a b. Proof. Admitted. End putnam_1979_b2.
theory putnam_1979_b2 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1979_b2_solution :: "real \<Rightarrow> real \<Rightarrow> real" where "putnam_1979_b2_solution \<equiv> undefined" (* \<lambda> a b. exp (-1) * (b powr b / a powr a) powr (1 / (b - a)) *) theorem putnam_1979_b2: shows "\<forall> a b :: real. 0 < a \<and> a < b \<longrightarrow> ((\<lambda> t :: real. (interval_lebesgue_integral lebesgue 0 1 (\<lambda> x. (b * x + a * (1 - x)) powr t)) powr (1 / t)) \<longlongrightarrow> putnam_1979_b2_solution a b) (at 0)" sorry end
null
putnam_1979_b3
abbrev putnam_1979_b3_solution : β„• β†’ β„€ := sorry -- fun n ↦ (n - 1) / 2 theorem putnam_1979_b3 (F : Type*) [Field F] [Fintype F] (n : β„• := Fintype.card F) (nodd : Odd n) (b c : F) (p : Polynomial F := X ^ 2 + (C b) * X + (C c)) (hp : Irreducible p) : ({d : F | Irreducible (p + (C d))}.ncard = putnam_1979_b3_solution n) := sorry
Let $F$ be a finite field with $n$ elements, and assume $n$ is odd. Suppose $x^2 + bx + c$ is an irreducible polynomial over $F$. For how many elements $d \in F$ is $x^2 + bx + c + d$ irreducible?
Show that there are $\frac{n - 1}{2}$ such elements $d$.
['abstract_algebra']
null
theory putnam_1979_b3 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1979_b3_solution :: "nat \<Rightarrow> nat" where "putnam_1979_b3_solution \<equiv> undefined" (* \<lambda> n :: nat. nat \<lfloor>(n - 1) / 2\<rfloor> *) theorem putnam_1979_b3: fixes F (structure) and n :: "nat" and b c :: "'a :: field" and p :: "'a poly" defines "p \<equiv> [:c, b, 1:]" assumes hFfin : "finite (carrier F) \<and> card (carrier F) = n" and Ffield : "field F" and nodd : "odd n" and hp : "irreducible p" shows "card {d :: ('a :: field). irreducible (p + monom d 0)} = putnam_1979_b3_solution n" sorry end
null
putnam_1979_b6
theorem putnam_1979_b6 (n : β„•) (z : Fin n β†’ β„‚) : (|((βˆ‘ i : Fin n, (z i) ^ 2) ^ ((1 : β„‚) / 2)).re| ≀ βˆ‘ i : Fin n, |(z i).re|) := sorry
Let $z_i$ be complex numbers for $i = 1, 2, \dots, n$. Show that \[ \left \lvert \mathrm{Re} \, [(z_1^2 + z_2^2 + \dots + z_n^2)^{1/2} ] \right \rvert \leq \lvert \mathrm{Re} \, z_1 \rvert + \lvert \mathrm{Re} \, z_2 \rvert + \dots + \lvert \mathrm{Re} \, z_n \rvert. \]
null
['analysis']
Section putnam_1979_b6. Require Import Reals List Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1979_b6: forall (n: nat) (l: list C), length l = n -> let sum1 := fold_left (fun acc x => Cplus acc (Cmult x x)) l 0 in let sum2 := fold_left (fun acc x => Re x) l 0 in sqrt (Re sum1) <= sum2. Proof. Admitted. End putnam_1979_b6.
theory putnam_1979_b6 imports Complex_Main begin (* Note: Problem dimension boosted from Fin n *) theorem putnam_1979_b6: fixes n :: "nat" and z :: "nat \<Rightarrow> complex" shows "\<bar>Re (csqrt (\<Sum> i \<in> {1::nat..n}. (z i)^2))\<bar> \<le> (\<Sum> i \<in> {1..n}. \<bar>Re (z i)\<bar>)" sorry end
null
putnam_1987_a1
theorem putnam_1987_a1 (A B C D : Set (ℝ Γ— ℝ)) (hA : A = {(x, y) : ℝ Γ— ℝ | x ^ 2 - y ^ 2 = x / (x ^ 2 + y ^ 2)}) (hB : B = {(x, y) : ℝ Γ— ℝ | 2 * x * y + y / (x ^ 2 + y ^ 2) = 3}) (hC : C = {(x, y) : ℝ Γ— ℝ | x ^ 3 - 3 * x * y ^ 2 + 3 * y = 1}) (hD : D = {(x, y) : ℝ Γ— ℝ | 3 * x ^ 2 * y - 3 * x - y ^ 3 = 0}) : A ∩ B = C ∩ D := sorry
Curves $A$, $B$, $C$, and $D$ are defined in the plane as follows: \begin{align*} A&=\left\{ (x,y):x^2-y^2=\frac{x}{x^2+y^2} \right\}, \\ B&=\left\{ (x,y):2xy+\frac{y}{x^2+y^2}=3 \right\}, \\ C&=\left\{ (x,y):x^3-3xy^2+3y=1 \right\}, \\ D&=\left\{ (x,y):3x^2y-3x-y^3=0 \right\}. \end{align*} Prove that $A \cap B=C \cap D$.
null
['algebra']
null
theory putnam_1987_a1 imports Complex_Main begin theorem putnam_1987_a1: fixes A B C D :: "(real \<times> real) set" defines "A \<equiv> {(x, y). x ^ 2 - y ^ 2 = x / (x ^ 2 + y ^ 2)}" defines "B \<equiv> {(x, y). 2 * x * y + y / (x ^ 2 + y ^ 2) = 3}" defines "C \<equiv> {(x, y). x ^ 3 - 3 * x * y ^ 2 + 3 * y = 1}" defines "D \<equiv> {(x, y). 3 * x ^ 2 * y - 3 * x - y ^ 3 = 0}" shows "A \<inter> B = C \<inter> D" sorry end
null
putnam_1987_a2
abbrev putnam_1987_a2_solution : β„• := sorry -- 1984 theorem putnam_1987_a2 (seqind : β„• β†’ β„•) (seqsize : β„• β†’ β„•) (f : β„• β†’ β„•) (hseqind : seqind 1 = 1 ∧ βˆ€ i β‰₯ 2, seqind i = seqind (i - 1) + (Nat.digits 10 (i - 1)).length) (hseqsize : βˆ€ i β‰₯ 1, βˆ€ j : Fin ((Nat.digits 10 i).length), seqsize (seqind i + j) = (Nat.digits 10 i).length) (hf : βˆ€ n : β„•, f n = seqsize (10 ^ n)) : f 1987 = putnam_1987_a2_solution := sorry
The sequence of digits $123456789101112131415161718192021 \dots$ is obtained by writing the positive integers in order. If the $10^n$-th digit in this sequence occurs in the part of the sequence in which the $m$-digit numbers are placed, define $f(n)$ to be $m$. For example, $f(2)=2$ because the $100$th digit enters the sequence in the placement of the two-digit integer $55$. Find, with proof, $f(1987)$.
Show that the value of $f(1987)$ is $1984$.
['algebra']
null
theory putnam_1987_a2 imports Complex_Main begin definition putnam_1987_a2_solution :: nat where "putnam_1987_a2_solution \<equiv> undefined" (* 1984 *) theorem putnam_1987_a2: fixes seqind :: "nat \<Rightarrow> nat" and seqsize :: "nat \<Rightarrow> nat" and f :: "nat \<Rightarrow> nat" and numdigits :: "nat \<Rightarrow> nat" assumes hseqind: "seqind 1 = 1 \<and> (\<forall> i \<ge> 2. seqind i = seqind (i - 1) + numdigits (i - 1))" and hseqsize: "\<forall> i \<ge> 1. \<forall> j \<in> {0 .. numdigits i - 1}. seqsize (seqind i + j) = numdigits i" and hf: "\<forall> n :: nat. f n = seqsize (10 ^ n)" and hnumdigits: "\<forall> n \<ge> 1. numdigits n = (GREATEST k :: nat. 10 ^ k \<le> n) + 1" shows "f 1987 = putnam_1987_a2_solution" sorry end
null
putnam_1987_a4
abbrev putnam_1987_a4_solution : β„‚ := sorry -- (5 / 3) * sqrt 30 theorem putnam_1987_a4 (P : MvPolynomial (Fin 3) β„‚) (hPreal : βˆ€ i : Fin 3 β†’β‚€ β„•, (coeff i P).im = 0) (F : ℝ β†’ ℝ β†’ ℝ) (vars : β„‚ β†’ β„‚ β†’ β„‚ β†’ (Fin 3 β†’ β„‚) := fun a b c ↦ fun i ↦ ite (i = 0) a (ite (i = 1) b c)) (h : βˆ€ x y z u : ℝ, eval (vars (u * x) (u * y) (u * z)) P = u ^ 2 * F (y - x) (z - x)) (hPval : eval (vars 1 0 0) P = 4 ∧ eval (vars 0 1 0) P = 5 ∧ eval (vars 0 0 1) P = 6) (A B C : β„‚) (hPABC : eval (vars A B C) P = 0) (habs : β€–B - Aβ€– = 10) : (β€–C - Aβ€– = putnam_1987_a4_solution) := sorry
Let $P$ be a polynomial, with real coefficients, in three variables and $F$ be a function of two variables such that \[ P(ux, uy, uz) = u^2 F(y-x,z-x) \quad \mbox{for all real $x,y,z,u$}, \] and such that $P(1,0,0)=4$, $P(0,1,0)=5$, and $P(0,0,1)=6$. Also let $A,B,C$ be complex numbers with $P(A,B,C)=0$ and $|B-A|=10$. Find $|C-A|$.
Prove that $|C - A| = \frac{5}{3}\sqrt{30}$.
['algebra']
null
theory putnam_1987_a4 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin definition putnam_1987_a4_solution::real where "putnam_1987_a4_solution \<equiv> undefined" (* (5/3) * sqrt 30 *) theorem putnam_1987_a4: fixes P::"complex poly poly poly" and F::"real\<Rightarrow>real\<Rightarrow>real" and a b c::complex assumes hPreal : "\<forall>i j k::nat. Im (coeff (coeff (coeff P k) j) i) = 0" and h : "\<forall>x y z u::real. (poly (poly (poly P [:[: u * z :]:]) [: u * y :]) (u * x)) = u^2 * F (y-x) (z-x)" and hPval1 : "(poly (poly (poly P [:[: 0 :] :]) [: 0 :]) 1) = 4" and hPval2 : "(poly (poly (poly P [:[: 0 :] :]) [: 1 :]) 0) = 5" and hPval3 : "(poly (poly (poly P [:[: 1 :] :]) [: 0 :]) 0) = 6" and hPabc : "(poly (poly (poly P [:[: c :] :]) [: b :]) a) = 0" and habs : "norm (b - a) = 10" shows "norm (c - a) = putnam_1987_a4_solution" sorry end
null
putnam_1987_a6
abbrev putnam_1987_a6_solution : Set ℝ := sorry -- {x : ℝ | x > 0 ∧ x < 25} theorem putnam_1987_a6 (a : β„• β†’ β„• := fun n ↦ {i | (digits 3 n).get i = 0}.ncard) : ({x : ℝ | x > 0 ∧ Summable (fun n ↦ x ^ (a n) / (n ^ 3))} = putnam_1987_a6_solution) := sorry
For each positive integer $n$, let $a(n)$ be the number of zeroes in the base $3$ representation of $n$. For which positive real numbers $x$ does the series \[ \sum_{n=1}^\infty \frac{x^{a(n)}}{n^3} \] converge?
Show that for positive $x$, the series converges if and only if $x < 25$.
['algebra', 'analysis']
null
theory putnam_1987_a6 imports Complex_Main begin definition putnam_1987_a6_solution::"real set" where "putnam_1987_a6_solution \<equiv> undefined" (* { x. x > 0 \<and> x < 25 } *) fun digits_b3::"nat \<Rightarrow> nat list" where "digits_b3 n = (if n < 3 then [n] else ([n mod 3::nat] @ digits_b3 (n div 3::nat)))" theorem putnam_1987_a6: fixes a::"nat\<Rightarrow>nat" defines "a \<equiv> \<lambda>n. card {i::nat. i < length (digits_b3 n) \<and> (digits_b3 n)!i = 0}" shows "putnam_1987_a6_solution = {x::real. x > 0 \<and> summable (\<lambda>n. x^(a n) / n^3)}" sorry end
null
putnam_1987_b1
abbrev putnam_1987_b1_solution : ℝ := sorry -- 1 theorem putnam_1987_b1 : (∫ x in (2)..4, sqrt (log (9 - x)) / (sqrt (log (9 - x)) + sqrt (log (x + 3))) = putnam_1987_b1_solution) := sorry
Evaluate \[ \int_2^4 \frac{\sqrt{\ln(9-x)}\,dx}{\sqrt{\ln(9-x)}+\sqrt{\ln(x+3)}}. \]
Prove that the integral evaluates to $1$.
['analysis']
Section putnam_1987_b1. Require Import Reals Coquelicot.Coquelicot. Definition putnam_1987_b1_solution := 1. Theorem putnam_1987_b1: RInt (fun x => ln (9 - x) ^ (1/2) / ( ln (9 - x) ^ (1/2) + ln (x + 3) ^ (1/2))) 2 4 = putnam_1987_b1_solution. Proof. Admitted. End putnam_1987_b1.
theory putnam_1987_b1 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1987_b1_solution::real where "putnam_1987_b1_solution \<equiv> undefined" (* 1 *) theorem putnam_1987_b1: shows "putnam_1987_b1_solution = interval_lebesgue_integral lebesgue 2 4 (\<lambda>x. sqrt (ln (9-x)) / (sqrt (ln (9-x)) + sqrt (ln (x+3))))" sorry end
null
putnam_1987_b2
theorem putnam_1987_b2 (r s t : β„•) (hsum : r + s ≀ t) : (βˆ‘ i : Finset.range (s + 1), (choose s i : β„š) / (choose t (r + i)) = ((t + 1) : β„š) / ((t + 1 - s) * choose (t - s) r)) := sorry
Let $r, s$ and $t$ be integers with $0 \leq r$, $0 \leq s$ and $r+s \leq t$. Prove that \[ \frac{\binom s0}{\binom tr} + \frac{\binom s1}{\binom{t}{r+1}} + \cdots + \frac{\binom ss}{\binom{t}{r+s}} = \frac{t+1}{(t+1-s)\binom{t-s}{r}}. \]
null
['algebra']
Section putnam_1987_b2. Require Import Binomial Reals Coquelicot.Coquelicot. Theorem putnam_1987_b2: forall (n r s: nat), ge n (r + s) -> sum_n (fun i => Binomial.C s i / Binomial.C n (r + i)) s = (INR n + 1)/((INR n + 1 - INR s) * Binomial.C (n - s) r). Proof. Admitted. End putnam_1987_b2.
theory putnam_1987_b2 imports Complex_Main begin theorem putnam_1987_b2: fixes r s t::nat assumes hsum : "r + s \<le> t" shows "(\<Sum>i=0..s. (s choose i) / (t choose (r+i))) = (t+1) / ((t+1-s) * ((t-s) choose r))" sorry end
null
putnam_1987_b4
abbrev putnam_1987_b4_solution : Prop Γ— ℝ Γ— Prop Γ— ℝ := sorry -- (True, -1, True, 0) theorem putnam_1987_b4 (x y : β„• β†’ ℝ) (hxy1 : (x 1, y 1) = (0.8, 0.6)) (hx : βˆ€ n β‰₯ 1, x (n + 1) = (x n) * cos (y n) - (y n) * sin (y n)) (hy : βˆ€ n β‰₯ 1, y (n + 1) = (x n) * sin (y n) + (y n) * cos (y n)) : let (existsx, limx, existsy, limy) := putnam_1987_b4_solution (((βˆƒ c : ℝ, Tendsto x ⊀ (𝓝 c)) β†’ existsx) ∧ (existsx β†’ Tendsto x ⊀ (𝓝 limx)) ∧ ((βˆƒ c : ℝ, Tendsto y ⊀ (𝓝 c)) β†’ existsy) ∧ (existsy β†’ Tendsto y ⊀ (𝓝 limy))) := sorry
Let $(x_1,y_1) = (0.8, 0.6)$ and let $x_{n+1} = x_n \cos y_n - y_n \sin y_n$ and $y_{n+1}= x_n \sin y_n + y_n \cos y_n$ for $n=1,2,3,\dots$. For each of $\lim_{n\to \infty} x_n$ and $\lim_{n \to \infty} y_n$, prove that the limit exists and find it or prove that the limit does not exist.
Show that $\lim_{n \to \infty} x_n = -1$ and $\lim_{n \to \infty} y_n = 0$.
['analysis']
Section putnam_1987_b4. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Definition putnam_1987_b4_solution1 := -1. Definition putnam_1987_b4_solution2 := PI. Theorem putnam_1987_b4: let A := fix a (i j: nat) : (R * R):= match (i, j) with | (O, O) => (0.8, 0.6) | (S i', S j') => let xn := fst (a i' j') in let yn := snd (a i' j') in (xn * cos yn - yn * sin yn,xn * sin yn + yn * cos yn) | (_, _) => (0, 0) end in Lim_seq (fun n => fst (A n 0%nat)) = putnam_1987_b4_solution1 /\ Lim_seq (fun n => snd (A 0%nat n)) = putnam_1987_b4_solution2. Proof. Admitted. End putnam_1987_b4.
theory putnam_1987_b4 imports Complex_Main begin definition putnam_1987_b4_solution::"(bool \<times> real \<times> bool \<times> real)" where "putnam_1987_b4_solution \<equiv> undefined" (* (True, -1, True, 0) *) theorem putnam_1987_b4: fixes x y::"nat\<Rightarrow>real" assumes hxy1 : "(x 1, y 1) = (0.8, 0.6)" and hx : "\<forall>n \<ge> 1. x (n+1) = (x n) * cos (y n) - (y n) * sin (y n)" and hy : "\<forall>n \<ge> 1. y (n+1) = (x n) * sin (y n) + (y n) * cos (y n)" shows "let (existsx, limx, existsy, limy) = putnam_1987_b4_solution in (((\<exists>c::real. (x \<longlonglongrightarrow> c)) \<longrightarrow> existsx) \<and> (existsx \<longrightarrow> (x \<longlonglongrightarrow> limx)) \<and> ((\<exists>c::real. (y \<longlonglongrightarrow> c)) \<longrightarrow> existsy) \<and> (existsy \<longrightarrow> (y \<longlonglongrightarrow> limy)))" sorry end
null
putnam_1987_b5
theorem putnam_1987_b5 (n : β„•) (npos : n > 0) (O : Matrix (Fin 1) (Fin n) β„‚ := 0) (M : Matrix (Fin (2 * n)) (Fin n) β„‚) (hM : βˆ€ z : Matrix (Fin 1) (Fin (2 * n)) β„‚, z * M = O β†’ (Β¬βˆ€ i : Fin (2 * n), z 0 i = 0) β†’ βˆƒ i : Fin (2 * n), (z 0 i).im β‰  0) : (βˆ€ r : Matrix (Fin (2 * n)) (Fin 1) ℝ, βˆƒ w : Matrix (Fin n) (Fin 1) β„‚, βˆ€ i : (Fin (2 * n)), ((M * w) i 0).re = r i 0) := sorry
Let $O_n$ be the $n$-dimensional vector $(0,0,\cdots, 0)$. Let $M$ be a $2n \times n$ matrix of complex numbers such that whenever $(z_1, z_2, \dots, z_{2n})M = O_n$, with complex $z_i$, not all zero, then at least one of the $z_i$ is not real. Prove that for arbitrary real numbers $r_1, r_2, \dots, r_{2n}$, there are complex numbers $w_1, w_2, \dots, w_n$ such that \[ \mathrm{re}\left[ M \left( \begin{array}{c} w_1 \\ \vdots \\ w_n \end{array} \right) \right] = \left( \begin{array}{c} r_1 \\ \vdots \\ r_{2n} \end{array} \right). \] (Note: if $C$ is a matrix of complex numbers, $\mathrm{re}(C)$ is the matrix whose entries are the real parts of the entries of $C$.)
null
['linear_algebra']
null
theory putnam_1987_b5 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" begin theorem putnam_1987_b5: fixes n::nat and M::"complex^'a^'b" assumes matsize : "CARD('a) = n \<and> CARD('b) = 2 * n" and npos : "n > 0" and hM : "\<forall>z::(complex^'b^1). (let prod = z ** M in (\<forall>i. prod$i = 0)) \<longrightarrow> (\<not>(\<forall>i. z$1$i = 0)) \<longrightarrow> (\<exists>i. Im (z$1$i) \<noteq> 0)" shows "\<forall>r::(real^1^'b). \<exists>w::(complex^1^'a). \<forall>i. Re ((M**w)$i$1) = r$i$1" sorry end
null
putnam_1987_b6
theorem putnam_1987_b6 (p : β„•) (podd : Odd p ∧ Nat.Prime p) (F : Type*) [Field F] [Fintype F] (Fcard : Fintype.card F = p ^ 2) (S : Set F) (Snz : βˆ€ x ∈ S, x β‰  0) (Scard : S.ncard = ((p : β„€) ^ 2 - 1) / 2) (hS : βˆ€ a : F, a β‰  0 β†’ Xor' (a ∈ S) (-a ∈ S)) (N : β„• := (S ∩ {x | βˆƒ a ∈ S, x = 2 * a}).ncard) : (Even N) := sorry
Let $F$ be the field of $p^2$ elements, where $p$ is an odd prime. Suppose $S$ is a set of $(p^2-1)/2$ distinct nonzero elements of $F$ with the property that for each $a\neq 0$ in $F$, exactly one of $a$ and $-a$ is in $S$. Let $N$ be the number of elements in the intersection $S \cap \{2a: a \in S\}$. Prove that $N$ is even.
null
['abstract_algebra']
null
theory putnam_1987_b6 imports Complex_Main "HOL-Computational_Algebra.Primes" "HOL-Algebra.Ring" begin theorem putnam_1987_b6: fixes p::nat and F (structure) and S::"'a set" assumes podd : "odd p \<and> prime p" and Ffield : "field F" and Fcard : "finite (carrier F) \<and> card (carrier F) = p^2" and Snz : "\<forall>x \<in> S. x \<noteq> \<zero>\<^bsub>F\<^esub>" and Scard : "real_of_nat (card S) = (p^2 - 1::real) / 2" and hS : "\<forall>a::'a. a \<in> carrier F \<longrightarrow> a \<noteq> \<zero>\<^bsub>F\<^esub> \<longrightarrow> \<not>((a \<in> S) \<longleftrightarrow> ((\<ominus>\<^bsub>F\<^esub> a) \<in> S))" shows "even (card (S \<inter> {x. (\<exists>a \<in> S. x = a \<oplus>\<^bsub>F\<^esub> a)}))" sorry end
null
putnam_2004_a1
abbrev putnam_2004_a1_solution : Prop := sorry -- True theorem putnam_2004_a1 (S : (β„• β†’ Fin 2) β†’ β„• β†’ ℝ) (hS : βˆ€ attempts : β„• β†’ Fin 2, βˆ€ N β‰₯ 1, S attempts N = (βˆ‘ i : Fin N, (attempts i).1) / N) : (βˆ€ (attempts : β„• β†’ Fin 2) (a b : β„•), (1 ≀ a ∧ a < b ∧ S attempts a < 0.8 ∧ S attempts b > 0.8) β†’ (βˆƒ c : β„•, a < c ∧ c < b ∧ S attempts c = 0.8)) ↔ putnam_2004_a1_solution := sorry
Basketball star Shanille O'Keal's team statistician keeps track of the number, $S(N)$, of successful free throws she has made in her first $N$ attempts of the season. Early in the season, $S(N)$ was less than $80\%$ of $N$, but by the end of the season, $S(N)$ was more than $80\%$ of $N$. Was there necessarily a moment in between when $S(N)$ was exactly $80\%$ of $N$?
Show that the answer is yes.
['probability']
null
theory putnam_2004_a1 imports Complex_Main begin definition putnam_2004_a1_solution :: bool where "putnam_2004_a1_solution \<equiv> undefined" (* True *) theorem putnam_2004_a1: fixes S :: "(nat \<Rightarrow> bool) \<Rightarrow> nat \<Rightarrow> real" assumes hS: "\<forall>attempts::nat\<Rightarrow>bool. \<forall>N::nat\<ge>1. S attempts N = (\<Sum>i::nat=0..(N-1). of_bool (attempts i)) / N" shows "(\<forall>(attempts::nat\<Rightarrow>bool)(a::nat)(b::nat). (1 \<le> a \<and> a < b \<and> S attempts a < 0.8 \<and> S attempts b > 0.8) \<longrightarrow> (\<exists>c::nat. a < c \<and> c < b \<and> S attempts c = 0.8)) \<longleftrightarrow> putnam_2004_a1_solution" sorry end
null
putnam_2004_a3
theorem putnam_2004_a3 (u : β„• β†’ ℝ) (hubase : u 0 = 1 ∧ u 1 = 1 ∧ u 2 = 1) (hudet : βˆ€ n : β„•, Matrix.det (fun i j : Finset.range 2 => u (n + i * 2 + j)) = (n)!) : βˆ€ n : β„•, u n = round (u n) := sorry
Define a sequence $\{u_n\}_{n=0}^\infty$ by $u_0=u_1=u_2=1$, and thereafter by the condition that $\det \begin{pmatrix} u_n & u_{n+1} \\ u_{n+2} & u_{n+3} \end{pmatrix} = n!$ for all $n \geq 0$. Show that $u_n$ is an integer for all $n$. (By convention, $0!=1$.)
null
['linear_algebra']
Section putnam_2004_a3. Require Import Reals Coquelicot.Coquelicot. Theorem putnam_2004_a3: let fix u (n: nat) : R:= match n with | O => 1 | S O => 1 | S (S O) => 1 | S ((S (S n''') as n'') as n') => (INR (fact n) + u n'' * u n') / u n''' end in forall (n: nat), u n = IZR (floor (u n)). Proof. Admitted. End putnam_2004_a3.
theory putnam_2004_a3 imports Complex_Main "HOL-Analysis.Determinants" begin theorem putnam_2004_a3: fixes u::"nat\<Rightarrow>real" assumes hubase : "u 0 = 1 \<and> u 1 = 1 \<and> u 2 = 1" and hudet : "\<forall>n::nat. det (vector[vector[u n, u (n+1)], vector[u (n+2), u (n+3)]]) = fact n" shows "\<forall>n::nat. u n \<in> \<int>" sorry end
null
putnam_2004_a4
theorem putnam_2004_a4 (n : β„•) (x : Fin n β†’ ℝ) (avals : β„• β†’ (β„• β†’ Fin n β†’ ℝ) β†’ Prop) (npos : n > 0) (havals : βˆ€ (N : β„•) (a : (β„• β†’ Fin n β†’ ℝ)), avals N a = βˆ€ (i : Fin N) (j : Fin n), (a i j = -1 ∨ a i j = 0 ∨ a i j = 1)) : βˆƒ (N : β„•) (c : Fin N β†’ β„š) (a : β„• β†’ Fin n β†’ ℝ), avals N a ∧ ((∏ i : Fin n, x i) = βˆ‘ i : Fin N, c i * (βˆ‘ j : Fin n, a i j * x j) ^ n) := sorry
Show that for any positive integer $n$ there is an integer $N$ such that the product $x_1x_2 \cdots x_n$ can be expressed identically in the form $x_1x_2 \cdots x_n=\sum_{i=1}^Nc_i(a_{i1}x_1+a_{i2}x_2+\cdots+a_{in}x_n)^n$ where the $c_i$ are rational numbers and each $a_{ij}$ is one of the numbers $-1,0,1$.
null
['algebra']
Section putnam_2004_a4. Require Import List Reals Coquelicot.Coquelicot. Theorem putnam_2004_a4: forall (n: nat), exists (N: nat) (a: nat -> nat -> R) (c: R), (exists (p q: Z), c = IZR (p / q)) /\ (forall (i j: nat), a i j = -1 \/ a i j = 0 \/ a i j = 1) -> forall (x: list R), length x = n -> fold_left Rmult x 1 = sum_n (fun i => c * (sum_n (fun j => a i j * nth j x 0) n) ^ (1 / n)) N. Proof. Admitted. End putnam_2004_a4.
theory putnam_2004_a4 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_2004_a4: fixes n::nat and x::"nat\<Rightarrow>real" and avals::"nat \<Rightarrow> (nat \<Rightarrow> nat \<Rightarrow> real) \<Rightarrow> bool" defines "avals \<equiv> \<lambda>N. \<lambda>a. \<forall>i \<in> {0..<N}. \<forall>j \<in> {0..<n}. (a i j = -1 \<or> a i j = 0 \<or> a i j = 1)" assumes npos : "n > 0" shows "\<exists>N::nat. \<exists>c::nat\<Rightarrow>rat. \<exists>a. avals N a \<and> ((\<Prod>i=0..<n. x i) = (\<Sum>i=0..<N. (c i * (\<Sum>j=0..<n. a i j * x j)^n)))" sorry end
null
putnam_2004_a6
theorem putnam_2004_a6 (f : Set.Icc (0 : ℝ) 1 β†’ Set.Icc (0 : ℝ) 1 β†’ ℝ) (fcont : Continuous f) : (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, f x y) ^ 2) + (∫ x : Set.Icc (0 : ℝ) 1, (∫ y : Set.Icc (0 : ℝ) 1, f x y) ^ 2) ≀ (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, f x y)) ^ 2 + (∫ y : Set.Icc (0 : ℝ) 1, (∫ x : Set.Icc (0 : ℝ) 1, (f x y) ^ 2)) := sorry
Suppose that $f(x,y)$ is a continuous real-valued function on the unit square $0 \leq x \leq 1,0 \leq y \leq 1$. Show that $\int_0^1 \left(\int_0^1 f(x,y)dx\right)^2dy+\int_0^1 \left(\int_0^1 f(x,y)dy\right)^2dx \leq \left(\int_0^1 \int_0^1 f(x,y)dx\,dy\right)^2+\int_0^1 \int_0^1 [f(x,y)]^2dx\,dy$.
null
['analysis']
Section putnam_2004_a6. Require Import Basics Reals Coquelicot.Coquelicot. Theorem putnam_2004_a6: forall (f: R -> R -> R) (x y: R), 0 <= x <= 1 /\ 0 <= y <= 1 /\ continuity_2d_pt f x y -> RInt (compose (fun y => RInt (fun x => f x y) 0 1) (fun x => RInt (fun y => f x y) 0 1)) 0 1 + RInt (compose (fun x => RInt (fun y => f x y) 0 1) (fun x => RInt (fun y => f x y) 0 1)) 0 1 <= (RInt (fun x => RInt (fun y => f x y) 0 1) 0 1) ^ 2 + RInt (fun x => RInt (fun y => (f x y) ^ 2) 0 1) 0 1. Proof. Admitted. End putnam_2004_a6.
theory putnam_2004_a6 imports Complex_Main "HOL-Analysis.Interval_Integral" begin theorem putnam_2004_a6: fixes f::"(real\<times>real)\<Rightarrow>real" and usquare::"(real\<times>real) set" and Fx Fy::"real\<Rightarrow>real\<Rightarrow>real" defines "usquare \<equiv> {(x, y). x \<ge> 0 \<and> y \<ge> 0 \<and> x \<le> 1 \<and> y \<le> 1}" assumes fcont : "continuous_on usquare f" and fxderiv : "\<forall>y::real \<in> {0<..<1}. \<forall>x::real \<in> {0<..<1}. ((Fx y) has_derivative (\<lambda>x. f (x, y))) (nhds x)" and fyderiv : "\<forall>x::real \<in> {0<..<1}. \<forall>y::real \<in> {0<..<1}. ((Fy x) has_derivative (\<lambda>y. f (x, y))) (nhds y)" shows "interval_lebesgue_integral lebesgue 0 1 (\<lambda>y. (Fx y 1 - Fx y 0)^2) + interval_lebesgue_integral lebesgue 0 1 (\<lambda>x. (Fy x 1 - Fy x 0)^2) \<le> (set_lebesgue_integral lebesgue usquare f)^2 + set_lebesgue_integral lebesgue usquare (\<lambda>(x, y). f (x, y)^2)" sorry end
null
putnam_2004_b1
theorem putnam_2004_b1 (n : β„•) (P : Polynomial ℝ) (isint : ℝ β†’ Prop) (r : β„š) (Pdeg : P.degree = n) (hisint : βˆ€ x : ℝ, isint x = (x = round x)) (Pcoeff : βˆ€ i : Fin (n + 1), isint (P.coeff i)) (Preq0 : P.eval (r : ℝ) = 0) : βˆ€ i : Fin n, isint (βˆ‘ j : Fin (i + 1), (P.coeff (n - j) * r ^ ((i.1 + 1) - j))) := sorry
Let $P(x)=c_nx^n+c_{n-1}x^{n-1}+\cdots+c_0$ be a polynomial with integer coefficients. Suppose that $r$ is a rational number such that $P(r)=0$. Show that the $n$ numbers $c_nr,\,c_nr^2+c_{n-1}r,\,c_nr^3+c_{n-1}r^2+c_{n-2}r,\dots,\,c_nr^n+c_{n-1}r^{n-1}+\cdots+c_1r$ are integers.
null
['algebra']
Section putnam_2004_b1. Require Import Nat Reals Coquelicot.Coquelicot. Theorem putnam_2004_b1: forall (c: nat -> Z) (n: nat), let P (x: R) := sum_n (fun i => IZR (c i) * x ^ i) (n + 1) in forall (p q: Z), P (IZR (p / q)) = 0 -> let r := IZR (p / q) in forall (i: nat), and (le 1 i) (le i n) -> sum_n (fun j => IZR (c (sub n j)) * r ^ (i - j)) i = IZR (floor (sum_n (fun j => IZR (c (sub n j)) * r ^ (i - j)) i)). Proof. Admitted. End putnam_2004_b1.
theory putnam_2004_b1 imports Complex_Main "HOL-Computational_Algebra.Polynomial" begin (* Note: Boosted domain to infinite set *) theorem putnam_2004_b1: fixes n::nat and P::"real poly" and r::rat assumes Pdeg : "degree p = n" and Pcoeff : "\<forall>i \<in> {0..n}. (coeff p i) \<in> \<int>" and Preq0 : "poly p r = 0" shows "\<forall>i \<in> {0..<n}. (\<Sum>j=0..i. (coeff p (n-j) * r^(i+1-j))) \<in> \<int>" sorry end
null
putnam_2004_b2
theorem putnam_2004_b2 (m n : β„•) (mnpos : m > 0 ∧ n > 0) : ((m + n)! / ((m + n) ^ (m + n) : β„š)) < (((m)! / (m ^ m : β„š)) * ((n)! / (n ^ n : β„š))) := sorry
Let $m$ and $n$ be positive integers. Show that $\frac{(m+n)!}{(m+n)^{m+n}}<\frac{m!}{m^m}\frac{n!}{n^n}$.
null
['algebra']
Section putnam_2004_b2. Require Import Factorial Reals Coquelicot.Coquelicot. Theorem putnam_2004_b2: forall (m n: nat), ge m 0 /\ ge n 0 -> INR (fact (m + n)) / INR (m + n) ^ (m + n) < INR (fact m) / INR m ^ m * INR (fact n) / INR n ^ n. Proof. Admitted. End putnam_2004_b2.
theory putnam_2004_b2 imports Complex_Main begin theorem putnam_2004_b2: fixes m n::nat assumes mnpos : "m > 0 \<and> n > 0" shows "fact (m+n) / (m+n)^(m+n) < (fact m / m^m) * (fact n / n^n)" sorry end
null
putnam_2004_b5
abbrev putnam_2004_b5_solution : ℝ := sorry -- 2 / Real.exp 1 theorem putnam_2004_b5 (xprod : ℝ β†’ ℝ) (hxprod : βˆ€ x β‰₯ 0, Tendsto (fun N : β„• => ∏ n : Fin N, ((1 + x ^ (n.1 + 1)) / (1 + x ^ n.1)) ^ (x ^ n.1)) atTop (𝓝 (xprod x))) : Tendsto xprod (𝓝[<] 1) (𝓝 putnam_2004_b5_solution) := sorry
Evaluate $\lim_{x \to 1^-} \prod_{n=0}^\infty \left(\frac{1+x^{n+1}}{1+x^n}\right)^{x^n}$.
Show that the desired limit is $2/e$.
['analysis']
Section putnam_2004_b5. Require Import Reals Coquelicot.Coquelicot. Definition putnam_2004_b5_solution := 2 / exp 1. Theorem putnam_2004_b5: let fix prod_n (m: nat -> R) (n : nat) : R := match n with | O => m 0%nat | S n' => m n' * prod_n m n' end in filterlim (fun x => (Lim_seq (fun nInc => prod_n (fun n => Rpower ((1 + x ^ (n + 1)) / (1 + x ^ n)) (x ^ n) ) nInc))) (at_left 1) (locally 0). Proof. Admitted. End putnam_2004_b5.
theory putnam_2004_b5 imports Complex_Main begin definition putnam_2004_b5_solution where "putnam_2004_b5_solution \<equiv> undefined" (* 2 / exp 1 *) theorem putnam_2004_b5: fixes xprod::"real\<Rightarrow>real" defines "xprod \<equiv> \<lambda>x. lim (\<lambda>N::nat. (\<Prod>n=0..N. ((1+x^(n+1)) / (1 + x^n)) powr (x^n)))" shows "(xprod \<longlongrightarrow> putnam_2004_b5_solution) (at_left 1)" sorry end
null
putnam_2004_b6
theorem putnam_2004_b6 (A : Set β„•) (N : ℝ β†’ β„•) (B : Set β„•) (b : β„• β†’ β„•) (Anempty : A.Nonempty) (Apos : βˆ€ a ∈ A, a > 0) (hN : βˆ€ x : ℝ, N x = Set.encard {a : A | a ≀ x}) (hB : B = {b' > 0 | βˆƒ a ∈ A, βˆƒ a' ∈ A, b' = a - a'}) (hbB : Set.range b = B ∧ βˆ€ i : β„•, b i < b (i + 1)) : (βˆ€ r : β„•, βˆƒ i : β„•, (b (i + 1) - b i) β‰₯ r) β†’ Tendsto (fun x => N x / x) atTop (𝓝 0) := sorry
Let $\mathcal{A}$ be a non-empty set of positive integers, and let $N(x)$ denote the number of elements of $\mathcal{A}$ not exceeding $x$. Let $\mathcal{B}$ denote the set of positive integers $b$ that can be written in the form $b=a-a'$ with $a \in \mathcal{A}$ and $a' \in \mathcal{A}$. Let $b_1<b_2<\cdots$ be the members of $\mathcal{B}$, listed in increasing order. Show that if the sequence $b_{i+1}-b_i$ is unbounded, then $\lim_{x \to\infty} N(x)/x=0$.
null
['analysis']
null
theory putnam_2004_b6 imports Complex_Main begin theorem putnam_2004_b6: fixes A B::"nat set" and N::"real\<Rightarrow>nat" and b::"nat\<Rightarrow>nat" defines "N \<equiv> \<lambda>x::real. card {a\<in>A. a \<le> x}" and "B \<equiv> {b'. b' > 0 \<and> (\<exists>a \<in> A. \<exists>a' \<in> A. b' = a - a')}" assumes Anempty : "card A > 0" and Apos : "\<forall>a \<in> A. a > 0" and hbB : "B = image b {1..(card B)}" and hbasc : "\<forall>i::nat. b i < b (i+1)" shows "(\<forall>r::nat. \<exists>i::nat. (b (i+1) - b i) \<ge> r) \<longrightarrow> ((\<lambda>x::real. N x / x) \<longlongrightarrow> 0) at_top" sorry end
null
putnam_2018_a1
abbrev putnam_2018_a1_solution : Set (β„€ Γ— β„€) := sorry -- {⟨673, 1358114⟩, ⟨674, 340033⟩, ⟨1009, 2018⟩, ⟨2018, 1009⟩, ⟨340033, 674⟩, ⟨1358114, 673⟩} theorem putnam_2018_a1 : βˆ€ a b : β„€, (a > 0 ∧ b > 0 ∧ ((1: β„š) / a + (1: β„š) / b = (3: β„š) / 2018)) ↔ (⟨a, b⟩ ∈ putnam_2018_a1_solution) := sorry
Find all ordered pairs $(a,b)$ of positive integers for which $\frac{1}{a} + \frac{1}{b} = \frac{3}{2018}$.
Show that all solutions are in the set of ${(673,1358114), (674,340033), (1009,2018), (2018,1009), (340033,674), (1358114,673)}$.
['number_theory']
Section putnam_2018_a1. Require Import Nat Factorial QArith. Open Scope Q_scope. Definition putnam_2018_a1_solution (a b: nat): Prop := (a = 673%nat /\ b = 1358114%nat) \/ (a = 674%nat /\ b = 340033%nat) \/ (a = 1009%nat /\ b = 2018%nat) \/ (a =2018%nat /\ b = 1009%nat) \/ (a = 340033%nat /\ b = 674%nat) \/ (a = 1358114%nat /\ b = 673%nat). Theorem putnam_2018_a1: forall (a b: nat), gt a 0 /\ gt b 0 -> 1/inject_Z (Z.of_nat a) + 1/inject_Z (Z.of_nat b) = 3/2018 <-> putnam_2018_a1_solution a b. Proof. Admitted. End putnam_2018_a1.
theory putnam_2018_a1 imports Complex_Main begin definition putnam_2018_a1_solution::"(nat \<times> nat) set" where "putnam_2018_a1_solution \<equiv> undefined" (* {(673, 1358114), (674, 340033), (1009, 2018), (2018, 1009), (340033, 674), (1358114, 673)} *) theorem putnam_2018_a1: shows "\<forall>a b::nat. (a > 0 \<and> b > 0 \<and> (1 / a + 1 / b = 3 / 2018)) \<longleftrightarrow> (a, b) \<in> putnam_2018_a1_solution" sorry end
null
putnam_2018_a2
abbrev putnam_2018_a2_solution : β„• β†’ ℝ := sorry -- (fun n : β„• => if n = 1 then 1 else -1) theorem putnam_2018_a2 (n : β„•) (S : Fin (2 ^ n - 1) β†’ Set β„•) (M : Matrix (Fin (2 ^ n - 1)) (Fin (2 ^ n - 1)) ℝ) (npos : n β‰₯ 1) (hS : Set.range S = (Set.Icc 1 n).powerset \ {βˆ…}) (hM : βˆ€ i j : Fin (2 ^ n - 1), M i j = if (S i ∩ S j = βˆ…) = True then 0 else 1) : M.det = putnam_2018_a2_solution n := sorry
Let \( S_1, S_2, \ldots, S_{2^n-1} \) be the nonempty subsets of \( \{1, 2, \ldots, n\} \) in some order, and let \( M \) be the \( (2^n - 1) \times (2^n - 1) \) matrix whose \((i, j)\) entry is $m_{ij} = \begin{cases} 0 & \text{if } S_i \\cap S_j = \\emptyset; \\ 1 & \text{otherwise}. \\end{cases} $ Calculate the determinant of \( M \).
Show that the solution is 1 if n = 1, and otherwise -1.
['linear_algebra', 'number_theory']
null
theory putnam_2018_a2 imports Complex_Main "HOL-Analysis.Determinants" begin definition putnam_2018_a2_solution :: "nat \<Rightarrow> real" where "putnam_2018_a2_solution \<equiv> undefined" (* (\<lambda>n::nat. if n = 1 then 1 else -1) *) theorem putnam_2018_a2: fixes n :: nat and S :: "'n::finite \<Rightarrow> (nat set)" and M :: "real^'n^'n" assumes npos: "n \<ge> 1" and pncard: "CARD('n) = 2^n - 1" and hS: "range S = (Pow {1..n}) - {{}}" and hM: "\<forall>i j::'n. M$i$j = (if (S i \<inter> S j = {}) then 0 else 1)" shows "det M = putnam_2018_a2_solution n" sorry end
null
putnam_2018_a3
abbrev putnam_2018_a3_solution : ℝ := sorry -- 480/49 theorem putnam_2018_a3 (P : Set (Fin 10 β†’ ℝ)) (f : (Fin 10 β†’ ℝ) β†’ ℝ β†’ ℝ := fun x => fun k => βˆ‘ i : Fin 10, Real.cos (k * (x i))) (hP : βˆ€ x ∈ P, f x 1 = 0) : βˆ€ y ∈ P, f y 3 ≀ putnam_2018_a3_solution ∧ βˆƒ x ∈ P, f x 3 = putnam_2018_a3_solution := sorry
Determine the greatest possible value of $\sum_{i=1}^{10} \cos(3x_i)$ for real numbers $x_1, x_2, \ldots, x_{10}$ satisfying $\sum_{i=1}^{10} \cos(x_i) = 0$.
Show that the solution is $\frac{480}{49}$
['number_theory']
Section putnam_2018_a3. Require Import Reals List Rtrigo_def Coquelicot.Derive. Open Scope R. Definition putnam_2018_a3_solution : R := 480/49. Theorem putnam_2018_a3 : forall (X: list R), length X = 10%nat -> let f x := cos (INR 3 * x) in let coeffs := map f X in let val := fold_right Rmult 1 coeffs in putnam_2018_a3_solution >= val /\ exists (X: list R), length X = 10%nat -> let f x := cos (INR 3 * x) in let coeffs := map f X in let val := fold_right Rmult 1 coeffs in putnam_2018_a3_solution = val. Proof. Admitted. End putnam_2018_a3.
theory putnam_2018_a3 imports Complex_Main begin (* Note: Boosted domain to infinite set *) definition putnam_2018_a3_solution::real where "putnam_2018_a3_solution \<equiv> undefined" (* 480/49 *) theorem putnam_2018_a3: fixes f :: "(nat\<Rightarrow>real) \<Rightarrow> nat \<Rightarrow> real" defines "f \<equiv> \<lambda>x. \<lambda>k. \<Sum>i=0..<10. cos (k * (x i))" shows "putnam_2018_a3_solution = (GREATEST r. \<exists>x. f x 1 = 0 \<and> r = f x 3)" sorry end
null
putnam_2018_a4
theorem putnam_2018_a4 (m n : β„•) (a : β„• β†’ β„€) (G : Type*) [Group G] (g h : G) (mnpos : m > 0 ∧ n > 0) (mngcd : Nat.gcd m n = 1) (ha : βˆ€ k : Set.Icc 1 n, a k = Int.floor (m * k / (n : ℝ)) - Int.floor (m * ((k : β„€) - 1) / (n : ℝ))) (ghprod : ((List.Ico 1 (n + 1)).map (fun k : β„• => g * h ^ (a k))).prod = 1) : g * h = h * g := sorry
Let $m$ and $n$ be positive integers with $\gcd(m,n)=1$, and let $a_k=\left\lfloor \frac{mk}{n} \right\rfloor - \left\lfloor \frac{m(k-1)}{n} \right\rfloor$ for $k=1,2,\dots,n$. Suppose that $g$ and $h$ are elements in a group $G$ and that $gh^{a_1}gh^{a_2} \cdots gh^{a_n}=e$, where $e$ is the identity element. Show that $gh=hg$. (As usual, $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$.)
null
['abstract_algebra', 'number_theory']
Section putnam_2018_a4. Theorem putnam_2018_a4: True. Proof. Admitted. End putnam_2018_a4.
theory putnam_2018_a4 imports Complex_Main begin (* uses (nat \<Rightarrow> nat) instead of ({1..n} \<Rightarrow> nat) *) theorem putnam_2018_a4: fixes m n :: nat and a :: "nat \<Rightarrow> nat" and Gmul :: "'G \<Rightarrow> 'G \<Rightarrow> 'G" (infixl "\<^bold>*" 70) and Gunit :: 'G ("\<^bold>1") and Ginv :: "'G \<Rightarrow> 'G" and g h :: 'G and Gpow :: "'G \<Rightarrow> nat \<Rightarrow> 'G" and ghprodrec :: "nat \<Rightarrow> 'G" assumes mnpos: "m > 0 \<and> n > 0" and mngcd: "gcd m n = 1" and ha: "\<forall>k::nat\<in>{1..n}. (int (a k)) = \<lfloor>(real (m*k)) / n\<rfloor> - \<lfloor>(real (m*(k-1))) / n\<rfloor>" and Ggroup: "group Gmul Gunit Ginv" and hGpow: "\<forall>x::'G. Gpow x 0 = \<^bold>1 \<and> (\<forall>k::nat>0. Gpow x k = (Gpow x (k-1) \<^bold>* x))" and hghprodrec: "ghprodrec 0 = \<^bold>1 \<and> (\<forall>k::nat\<in>{1..n}. ghprodrec k = ghprodrec (k-1) \<^bold>* g \<^bold>* Gpow h (a k))" and ghprod: "ghprodrec n = \<^bold>1" shows "g \<^bold>* h = h \<^bold>* g" sorry end
null
putnam_2018_a5
theorem putnam_2018_a5 (f : ℝ β†’ ℝ) (h0 : f 0 = 0) (h1 : f 1 = 1) (hpos : βˆ€ x : ℝ, f x β‰₯ 0) (hf : ContDiff ℝ ⊀ f) : βˆƒ n > 0, βˆƒ x : ℝ, iteratedDeriv n f x < 0 := sorry
Let $f: \mathbb{R} \to \mathbb{R}$ be an infinitely differentiable function satisfying $f(0) = 0$, $f(1)= 1$, and $f(x) \geq 0$ for all $x \in \mathbb{R}$. Show that there exist a positive integer $n$ and a real number $x$ such that $f^{(n)}(x) < 0$.
null
['analysis']
null
theory putnam_2018_a5 imports Complex_Main "HOL-Analysis.Derivative" begin theorem putnam_2018_a5: fixes f :: "real\<Rightarrow>real" assumes f_diff : "\<forall>n. (deriv^^n) f differentiable_on UNIV" and f0 : "f 0 = 0" and f1 : "f 1 = 1" and fpos : "\<forall>x. f x \<ge> 0" shows "\<exists>n > 0. \<exists>x::real. (deriv^^n) f x < 0" sorry end
null
putnam_2018_b1
abbrev putnam_2018_b1_solution : Set (Vector β„€ 2) := sorry -- {v : Vector β„€ 2 | βˆƒ b : β„€, 0 ≀ b ∧ b ≀ 100 ∧ Even b ∧ v.toList = [1, b]} theorem putnam_2018_b1 (P : Finset (Vector β„€ 2)) (v : Vector β„€ 2) (vinP : Prop) (Pvdiff : Finset (Vector β„€ 2)) (Pvpart : Prop) (hP : P = {v' : Vector β„€ 2 | 0 ≀ v'[0] ∧ v'[0] ≀ 2 ∧ 0 ≀ v'[1] ∧ v'[1] ≀ 100}) (hvinP : vinP = (v ∈ P)) (hPvdiff : Pvdiff = P \ ({v} : Finset (Vector β„€ 2))) (hPvpart : Pvpart = (βˆƒ Q R : Finset (Vector β„€ 2), (Q βˆͺ R = Pvdiff) ∧ (Q ∩ R = βˆ…) ∧ (Q.card = R.card) ∧ (βˆ‘ q in Q, q[0] = βˆ‘ r in R, r[0]) ∧ (βˆ‘ q in Q, q[1] = βˆ‘ r in R, r[1]))) : (vinP ∧ Pvpart) ↔ v ∈ putnam_2018_b1_solution := sorry
Let $\mathcal{P}$ be the set of vectors defined by $\mathcal{P}=\left\{\left.\begin{pmatrix} a \\ b \end{pmatrix}\right| 0 \leq a \leq 2, 0 \leq b \leq 100,\text{ and }a,b \in \mathbb{Z}\right\}$. Find all $\mathbf{v} \in \mathcal{P}$ such that the set $\mathcal{P} \setminus \{\mathbf{v}\}$ obtained by omitting vector $\mathbf{v}$ from $\mathcal{P}$ can be partitioned into two sets of equal size and equal sum.
Show that the answer is the collection of vectors $\begin{pmatrix} 1 \\ b \end{pmatrix}$ where $0 \leq b \leq 100$ and $b$ is even.
['algebra']
Section putnam_2018_b1. Require Import Logic Ensembles Finite_sets Nat List. Open Scope nat_scope. Definition putnam_2018_b1_solution : Ensemble (nat * nat) := fun v : nat * nat => exists (b : nat), 0 <= b <= 100 /\ even b = true /\ fst v = 1 /\ snd v = b. Definition is_in_ensemble_fst (E : Ensemble (nat * nat)) (x : nat) : bool := match E (x, _) with | True => true end. Definition is_in_ensemble_snd (E : Ensemble (nat * nat)) (y : nat) : bool := match E (_, y) with | True => true end. Theorem putnam_2018_b1 (P : Ensemble (nat * nat)) (v : nat * nat) (vinP : Prop) (Pvdiff : Ensemble (nat * nat)) (Pvpart : Prop) (hP : P = fun v': nat * nat => 0 <= fst v' <= 2 /\ 0 <= snd v' <= 100) (hvinP : vinP = P v) (hPvdiff : Pvdiff = fun v' => P v' /\ v' <> v) (hPvpart : Pvpart = (exists Q R : Ensemble (nat * nat), (Union (nat * nat) Q R = Pvdiff) /\ (Intersection (nat * nat) Q R = Empty_set (nat * nat)) /\ (exists (n: nat), cardinal (nat * nat) Q n = cardinal (nat * nat) R n /\ (fold_right plus 0%nat (filter (fun x: nat => is_in_ensemble_fst Q x) (seq 0 3)) = fold_right plus 0%nat (filter (fun x: nat => is_in_ensemble_fst R x) (seq 0 3))) /\ (fold_right plus 0%nat (filter (fun y: nat => is_in_ensemble_snd Q y) (seq 0 101)) = fold_right plus 0%nat (filter (fun y: nat => is_in_ensemble_snd R y) (seq 0 101)))))) : (vinP /\ Pvpart) <-> putnam_2018_b1_solution v. Proof. Admitted. End putnam_2018_b1.
theory putnam_2018_b1 imports Complex_Main "HOL-Analysis.Finite_Cartesian_Product" "HOL-Library.Disjoint_Sets" begin definition putnam_2018_b1_solution :: "(int^2) set" where "putnam_2018_b1_solution \<equiv> undefined" (* {v::int^2. (\<exists>b::int. b \<in> {0..100} \<and> even b \<and> v = vector [1, b])} *) theorem putnam_2018_b1: fixes P :: "(int^2) set" and v :: "int^2" and vinP :: bool and Pvpart :: bool assumes hP: "P \<equiv> {v'::int^2. v'$1 \<in> {0..2} \<and> v'$2 \<in> {0..100}}" and hvinP: "vinP \<equiv> (v \<in> P)" and hPvpart: "Pvpart = (\<exists>Q R::(int^2) set. (partition_on (P - {v}) {Q, R}) \<and> card Q = card R \<and> (\<Sum>q\<in>Q. q) = (\<Sum>r\<in>R. r))" shows "(vinP \<and> Pvpart) \<longleftrightarrow> v \<in> putnam_2018_b1_solution" sorry end
null
putnam_2018_b2
theorem putnam_2018_b2 (n : β„•) (hn : n > 0) (f : β„• β†’ β„‚ β†’ β„‚) (hf : βˆ€ z : β„‚, f n z = βˆ‘ i in Finset.range n, (n - i) * z^i) : βˆ€ z : β„‚, β€–zβ€– ≀ 1 β†’ f n z β‰  0 := sorry
Let $n$ be a positive integer, and let $f_n(z) = n + (n-1)z + (n-2)z^2 + \cdots + z^{n-1}$. Prove that $f_n$ has no roots in the closed unit disk $\{z \in \mathbb{C}: |z| \leq 1\}$.
null
['analysis']
null
theory putnam_2018_b2 imports Complex_Main begin theorem putnam_2018_b2: fixes n :: nat and f_n :: "complex \<Rightarrow> complex" and z :: complex defines "f_n \<equiv> \<lambda>x::complex. \<Sum>i=0..(n-1). (n - i) * x^i" assumes npos: "n > 0" and zunit: "norm(z) \<le> 1" shows "f_n(z) \<noteq> 0" sorry end
null
putnam_2018_b3
abbrev putnam_2018_b3_solution : Set β„• := sorry -- {2^2, 2^4, 2^8, 2^16} theorem putnam_2018_b3 (n : β„•) (hn : n > 0) : ((n < 10^100 ∧ ((n : β„€) ∣ (2^n : β„€) ∧ (n - 1 : β„€) ∣ (2^n - 1 : β„€) ∧ (n - 2 : β„€) ∣ (2^n - 2 : β„€))) ↔ n ∈ putnam_2018_b3_solution) := sorry
Find all positive integers $n < 10^{100}$ for which simultaneously $n$ divides $2^n$, $n-1$ divides $2^n-1$, and $n-2$ divides $2^n - 2$.
Show that the solution is the set $\{2^2, 2^4, 2^8, 2^16\}$.
['number_theory']
null
theory putnam_2018_b3 imports Complex_Main begin definition putnam_2018_b3_solution::"nat set" where "putnam_2018_b3_solution \<equiv> undefined" (* {2^2, 2^4, 2^8, 2^16} *) theorem putnam_2018_b3: shows "putnam_2018_b3_solution \<equiv> {n::nat. n > 3 \<and> n < 10^100 \<and> n dvd 2^n \<and> (n-1) dvd (2^n - 1) \<and> (n-2) dvd (2^n - 2)}" sorry end
null
putnam_2018_b4
theorem putnam_2018_b4 (a : ℝ) (x : β„• β†’ ℝ) (hx0 : x 0 = 1) (hx12 : x 1 = a ∧ x 2 = a) (hxn : βˆ€ n β‰₯ 2, x (n + 1) = 2 * (x n) * (x (n - 1)) - x (n - 2)) : (βˆƒ n, x n = 0) β†’ (βˆƒ c, c > 0 ∧ Function.Periodic x c) := sorry
Given a real number $a$, we define a sequence by $x_0 = 1$, $x_1 = x_2 = a$, and $x_{n+1} = 2x_n x_{n-1} - x_{n-2}$ for $n \geq 2$. Prove that if $x_n = 0$ for some $n$, then the sequence is periodic.
null
['algebra']
null
theory putnam_2018_b4 imports Complex_Main begin theorem putnam_2018_b4: fixes a::real and f::"nat \<Rightarrow> real" assumes f0 : "f 0 = 1" and f1 : "f 1 = a" and f2 : "f 2 = a" and fn : "\<forall>n \<ge> 2. f (n+1) = 2 * f n * f (n-1) - f (n-2)" and fex0 : "\<exists>n. f n = 0" shows "\<exists>T>0. \<forall>n. f (n + T) = f n" sorry end
null
putnam_2018_b6
theorem putnam_2018_b6 (S : Finset (Fin 2018 β†’ β„€)) (hS : S = {s : Fin 2018 β†’ β„€ | (βˆ€ i : Fin 2018, s i ∈ ({1, 2, 3, 4, 5, 6, 10} : Set β„€)) ∧ (βˆ‘ i : Fin 2018, s i) = 3860}) : S.card ≀ 2 ^ 3860 * ((2018 : ℝ) / 2048) ^ 2018 := sorry
Let $S$ be the set of sequences of length $2018$ whose terms are in the set $\{1,2,3,4,5,6,10\}$ and sum to $3860$. Prove that the cardinality of $S$ is at most $2^{3860} \cdot \left(\frac{2018}{2048}\right)^{2018}$.
null
['algebra']
Section putnam_2018_b6. Require Import Nat List Ensembles Finite_sets Reals. Theorem putnam_2018_b6: forall (E: Ensemble (list nat)), forall (l: list nat), ( E l -> length l = 2018 /\ forall (n: nat), (List.In n l) -> (n = 1 \/ n = 2 \/ n = 3 \/ n = 4 \/ n = 5 \/ n = 6 \/ n = 10) /\ fold_left Nat.add l 0 = 3860 ) -> exists (n: nat), cardinal (list nat) E n /\ Rle (INR n) (Rmult (Rpower 2 3860) (Rpower (Rdiv (INR 2018) (INR 2048)) 2018)). Proof. Admitted. End putnam_2018_b6.
theory putnam_2018_b6 imports Complex_Main begin (* uses (nat \<Rightarrow> nat) instead of (Fin 2018 \<Rightarrow> nat) *) theorem putnam_2018_b6: fixes S :: "(nat \<Rightarrow> nat) set" assumes hS: "S \<equiv> {s::nat\<Rightarrow>nat. (\<forall>i::nat\<in>{0..2017}. s i \<in> {1,2,3,4,5,6,10}) \<and> (\<Sum>i::nat=0..2017. s i) = 3860}" shows "card S \<le> 2^3860 * (2018/2048)^2018" sorry end
null
putnam_1993_a1
abbrev putnam_1993_a1_solution : ℝ := sorry -- 4 / 9 theorem putnam_1993_a1 : 0 < putnam_1993_a1_solution ∧ putnam_1993_a1_solution < (4 * Real.sqrt 2) / 9 ∧ (∫ x in Set.Ioo 0 ((Real.sqrt 2) / 3), max (putnam_1993_a1_solution - (2 * x - 3 * x ^ 3)) 0) = (∫ x in Set.Ioo 0 ((Real.sqrt 6) / 3), max ((2 * x - 3 * x ^ 3) - putnam_1993_a1_solution) 0) := sorry
The horizontal line $y=c$ intersects the curve $y=2x-3x^3$ in the first quadrant as in the figure. Find $c$ so that the areas of the two shaded regions are equal. [Figure not included. The first region is bounded by the $y$-axis, the line $y=c$ and the curve; the other lies under the curve and above the line $y=c$ between their two points of intersection.]
Show that the area of the two regions are equal when $c=4/9$.
['analysis', 'algebra']
null
theory putnam_1993_a1 imports Complex_Main "HOL-Analysis.Interval_Integral" begin definition putnam_1993_a1_solution::real where "putnam_1993_a1_solution \<equiv> undefined" (* 4/9 *) theorem putnam_1993_a1: shows "putnam_1993_a1_solution > 0 \<and> putnam_1993_a1_solution < (4 * (sqrt 2) / 9) \<and> interval_lebesgue_integral lebesgue 0 ((sqrt 2) / 3) (\<lambda>x. max 0 (putnam_1993_a1_solution - (2 * x - 3 * x^3))) = interval_lebesgue_integral lebesgue 0 ((sqrt 6) / 3) (\<lambda>x. max 0 ((2 * x - 3 * x^3) - putnam_1993_a1_solution))" sorry end
null
putnam_1993_a2
theorem putnam_1993_a2 (x : β„• β†’ ℝ) (xnonzero : βˆ€ n : β„•, x n β‰  0) (hx : βˆ€ n β‰₯ 1, (x n) ^ 2 - x (n - 1) * x (n + 1) = 1) : βˆƒ a : ℝ, βˆ€ n β‰₯ 1, x (n + 1) = a * x n - x (n - 1) := sorry
Let $(x_n)_{n \geq 0}$ be a sequence of nonzero real numbers such that $x_n^2-x_{n-1}x_{n+1}=1$ for $n=1,2,3,\dots$. Prove there exists a real number $a$ such that $x_{n+1}=ax_n-x_{n-1}$ for all $n \geq 1$.
null
['algebra']
Section putnam_1993_a2. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1993_a2: forall (x: nat -> R) (n: nat), gt n 0 -> pow (x n) 2 - x (pred n) * x (S n) = 1 -> exists (a: R), ge n 1 -> x (S n) = a * x n - x (pred n). Proof. Admitted. End putnam_1993_a2.
theory putnam_1993_a2 imports Complex_Main begin theorem putnam_1993_a2: fixes x::"nat\<Rightarrow>real" assumes xn0 : "\<forall>n::nat. x n \<noteq> 0" and hx : "\<forall>n \<ge> 1. (x n)^2 - x (n-1) * x (n+1) = 1" shows "\<exists>a::real. \<forall>n \<ge> 1. x (n+1) = a * x n - x (n-1)" sorry end
null
putnam_1993_a3
theorem putnam_1993_a3 (c : β„• β†’ β„• β†’ β„•) (hc : βˆ€ n β‰₯ 1, βˆ€ m β‰₯ 1, c n m = {f : Finset (Fin n) β†’ Fin m | βˆ€ A B : Finset (Fin n), f (A ∩ B) = min (f A) (f B)}.encard) : βˆ€ n β‰₯ 1, βˆ€ m β‰₯ 1, c n m = βˆ‘' j : Set.Icc 1 m, (j : β„€) ^ n := sorry
Let $\mathcal{P}_n$ be the set of subsets of $\{1,2,\dots,n\}$. Let $c(n,m)$ be the number of functions $f:\mathcal{P}_n \to \{1,2,\dots,m\}$ such that $f(A \cap B)=\min\{f(A),f(B)\}$. Prove that $c(n,m)=\sum_{j=1}^m j^n$.
null
['algebra']
null
theory putnam_1993_a3 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_1993_a3: fixes pown::"nat \<Rightarrow> ((nat set) set)" and c::"nat\<Rightarrow>nat\<Rightarrow>nat" defines "pown \<equiv> \<lambda>n. Pow {1..n}" and "c \<equiv> \<lambda>n. \<lambda>m. card {f::(nat set) \<Rightarrow> nat. (\<forall>s \<in> pown n. f s \<in> {1..m}) \<and> (\<forall>s \<in> - pown n. f s = 0) \<and> (\<forall>A B. (A \<in> pown n \<and> B \<in> pown n) \<longrightarrow> f (A \<inter> B) = min (f A) (f B))}" shows "\<forall>n \<ge> 1. \<forall>m \<ge> 1. c n m = (\<Sum>j=1..m. j^n)" sorry end
null
putnam_1993_a4
theorem putnam_1993_a4 (x : Fin 19 β†’ β„€) (y : Fin 93 β†’ β„€) (hx : βˆ€ i : Fin 19, x i > 0 ∧ x i ≀ 93) (hy : βˆ€ j : Fin 93, y j > 0 ∧ y j ≀ 19) : βˆƒ (is : Finset (Fin 19)) (js : Finset (Fin 93)), is β‰  βˆ… ∧ (βˆ‘ i : is, x i) = (βˆ‘ j : js, y j) := sorry
Let $x_1,x_2,\dots,x_{19}$ be positive integers each of which is less than or equal to $93$. Let $y_1,y_2,\dots,y_{93}$ be positive integers each of which is less than or equal to $19$. Prove that there exists a (nonempty) sum of some $x_i$'s equal to a sum of some $y_j$'s.
null
['algebra']
Section putnam_1993_a4. Require Import List Bool Reals Peano_dec Coquelicot.Coquelicot. Open Scope nat_scope. Theorem putnam_1993_a4: forall (x y: list nat), length x = 19 /\ length y = 93 /\ forall (n: nat), In n x -> 1 < n <= 93 /\ In n y -> 1 < n <= 19 -> exists (presentx presenty : nat -> bool), sum_n (fun n => if ((existsb (fun i => if eq_nat_dec n i then true else false) x) && presentx n) then (INR n) else R0) 94 = sum_n (fun n => if ((existsb (fun i => if eq_nat_dec n i then true else false) y) && presenty n) then (INR n) else R0) 20. Proof. Admitted. End putnam_1993_a4.
theory putnam_1993_a4 imports Complex_Main begin (* Note: Boosted domain to infinite set *) theorem putnam_1993_a4: fixes x y::"nat\<Rightarrow>nat" assumes hx : "\<forall>i \<in> {0..<19}. x i > 0 \<and> x i \<le> 93" and hy : "\<forall>j \<in> {0..<93}. y j > 0 \<and> y j \<le> 19" shows "\<exists>is js. is \<in> (Pow {0..<19}) \<and> js \<in> (Pow {0..<93}) \<and> is \<noteq> {} \<and> (\<Sum>i \<in> is. x i) = (\<Sum>j \<in> js. y j)" sorry end
null
putnam_1993_a5
theorem putnam_1993_a5 : ¬Irrational ((∫ x in Set.Ioo (-100) (-10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (1 / 101) (1 / 11), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2)) + (∫ x in Set.Ioo (101 / 100) (11 / 10), (((x ^ 2 - x) / (x ^ 3 - 3 * x + 1)) ^ 2))) := sorry
Show that $\int_{-100}^{-10} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{1}{101}}^{\frac{1}{11}} (\frac{x^2-x}{x^3-3x+1})^2\,dx+\int_{\frac{101}{100}}^{\frac{11}{10}} (\frac{x^2-x}{x^3-3x+1})^2\,dx$ is a rational number.
null
['analysis']
Section putnam_1993_a5. Require Import Reals Coquelicot.Coquelicot. Open Scope R. Theorem putnam_1993_a5: let f (x: R) := (pow x 2 - x) / (pow x 3 - 3 * x + 1) in exists (p q: Z), RInt (fun x => pow (f x) 2) (-100) (-10) + RInt (fun x => pow (f x) 2) (1/101) (1/11) + RInt (fun x => pow (f x) 2) (101/100) (11/10) = IZR p /IZR q. Proof. Admitted. End putnam_1993_a5.
theory putnam_1993_a5 imports Complex_Main "HOL-Analysis.Interval_Integral" begin theorem putnam_1993_a5: fixes f::"real\<Rightarrow>real" defines "f \<equiv> \<lambda>x. ((x^2 - x) / (x^3 - 3 * x + 1))^2" shows "(interval_lebesgue_integral lebesgue (-100) (-10) f + interval_lebesgue_integral lebesgue (1/101) (1/11) f + interval_lebesgue_integral lebesgue (101/100) (11/10) f ) \<in> \<rat>" sorry end
null
putnam_1993_a6
theorem putnam_1993_a6 (seq : β„• β†’ β„€) (hseq23 : βˆ€ n : β„•, seq n = 2 ∨ seq n = 3) (hseq2inds : βˆ€ n : β„•, seq n = 2 ↔ (βˆƒ N : β„•, n = βˆ‘ i : Fin N, (seq i + 1))) : βˆƒ r : ℝ, βˆ€ n : β„•, seq n = 2 ↔ (βˆƒ m : β„€, n + 1 = 1 + Int.floor (r * m)) := sorry
The infinite sequence of $2$'s and $3$'s $2,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,3,3,2,\dots$ has the property that, if one forms a second sequence that records the number of $3$'s between successive $2$'s, the result is identical to the given sequence. Show that there exists a real number $r$ such that, for any $n$, the $n$th term of the sequence is $2$ if and only if $n=1+\lfloor rm \rfloor$ for some nonnegative integer $m$. (Note: $\lfloor x \rfloor$ denotes the largest integer less than or equal to $x$.)
null
['algebra']
null
theory putnam_1993_a6 imports Complex_Main begin theorem putnam_1993_a6: fixes seq::"nat\<Rightarrow>nat" assumes hseq23 : "\<forall>n::nat. seq n = 2 \<or> seq n = 3" and hseq2inds : "\<forall>n::nat. (seq n = 2 \<longleftrightarrow> (\<exists>N::nat. n = (\<Sum>i=0..<N. (seq i + 1))))" shows "\<exists>r::real. \<forall>n::nat. (seq n = 2 \<longleftrightarrow> (\<exists>m::nat. n+1 = 1+\<lfloor>r * m\<rfloor>))" sorry end
null