Compfiles/Usa1995P2.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned compfiles documentation, Pinned compfiles corpus index
10 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1995, Problem 2
A trigonometric map is any one of sin, cos, tan, arcsin, arccos and arctan. Show that given any positive rational number x, one can find a finite sequence of trigonometric maps which take 0 to x. [So we need to show that we can always find a sequence of trigonometric maps tᵢ so that: x₁ = t₀(0), x₂ = t₁(x₁), ..., xₙ = tₙ₋₁(xₙ₋₁), x = tₙ(xₙ).]
Imported by 1 file
- inductive
Usa1995P2.TrigMapThe six trigonometric maps allowed by the problem line 29 sourceSource documentation
The six trigonometric maps allowed by the problem.
no axioms what this means
inductive TrigMap where …
- def
Usa1995P2.TrigMap.applyEvaluate a trigonometric map at a real number line 33 sourceSource documentation
Evaluate a trigonometric map at a real number.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Usa1995P2.TrigMap,
RealProof uses:
Usa1995P2.TrigMap.apply.match_1,Unit,Real.sin,Real.cos,Real.tan,Real.arcsin,Real.arccos,Real.arctannoncomputable def TrigMap.apply : TrigMap → ℝ → ℝ | .sin => Real.sin | .cos => Real.cos | .tan => Real.tan | .arcsin => Real.arcsin | .arccos => Real.arccos | .arctan => Real.arctan /-- Apply a finite sequence of trigonometric maps to a starting value. -/
Mentions: Usa1995P2.TrigMap
- def
Usa1995P2.runApply a finite sequence of trigonometric maps to a starting value line 42 sourceSource documentation
Apply a finite sequence of trigonometric maps to a starting value.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
List, Usa1995P2.TrigMap,RealProof uses:
List.foldl, Usa1995P2.TrigMap.applynoncomputable def run (l : List TrigMap) (x : ℝ) : ℝ := l.foldl (fun a f => f.apply a) x …
Mentions: Usa1995P2.TrigMap, f
- lemma
Usa1995P2.run_appendline 46 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
List, Usa1995P2.TrigMap,Real,Eq, Usa1995P2.run,HAppend.hAppendProof uses:
of_eq_true,List.foldl, Usa1995P2.TrigMap.apply,Eq.trans,True,congrFun',congrArg,List.foldl_append,eq_self4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- def
Usa1995P2.chainInvThe chainarctan, sin, arccos, tanof trigonometric maps line 52 sourceSource documentation
The chain
arctan, sin, arccos, tanof trigonometric maps. We show inrun_chainInvthat it sends any positivexto1 / x.no axioms what this means
Statement uses:
List, Usa1995P2.TrigMapProof uses:
List.cons,Usa1995P2.TrigMap.arctan,Usa1995P2.TrigMap.sin,Usa1995P2.TrigMap.arccos,Usa1995P2.TrigMap.tan,List.nildef chainInv : List TrigMap := [.arctan, .sin, .arccos, .tan]
Mentions: Usa1995P2.TrigMap
- def
Usa1995P2.chainSqrtThe chainarctan, cos, arctan, sin, arccos, tanof trigonometric maps line 56 sourceSource documentation
The chain
arctan, cos, arctan, sin, arccos, tanof trigonometric maps. We show inrun_chainSqrtthat it sends any realxto√(1 + x²).no axioms what this means
Statement uses:
List, Usa1995P2.TrigMapProof uses:
List.cons,Usa1995P2.TrigMap.arctan,Usa1995P2.TrigMap.cos,Usa1995P2.TrigMap.sin,Usa1995P2.TrigMap.arccos,Usa1995P2.TrigMap.tan,List.nildef chainSqrt : List TrigMap := [.arctan, .cos, .arctan, .sin, .arccos, .tan]
Mentions: Usa1995P2.TrigMap
- lemma
Usa1995P2.run_chainInvDocumented declaration: run_chainInv line 61 sourceSource documentation
The chain
arctan, sin, arccos, tansendsxto1 / x: witht = arctan xwe havesin t = x / √(1 + x²), and ifu = arccos (sin t)thentan u = sin u / cos u = √(1 - x²/(1+x²)) / (x/√(1+x²)) = 1 / x.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,LT.lt,OfNat.ofNat,Eq, Usa1995P2.run, Usa1995P2.chainInv,HDiv.hDivProof uses:
Real.sqrt,HAdd.hAdd,HPow.hPow,Nat,Iff.mpr,Real.sqrt_pos,add_pos',Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Nat.cast_one,Eq.refl,Bool,Nat.ble,pow_pos,Eq.mpr,id,congrArg,propext,Real.lt_sqrt,LT.lt.leand 138 more125 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
lemma run_chainInv (x : ℝ) (hx : 0 < x) : run chainInv x = 1 / x := by …
Mentions: Usa1995P2.run, Usa1995P2.chainInv
- lemma
Usa1995P2.run_chainSqrtThe chainarctan, cos, arctan, sin, arccos, tansendsxto√(1 + x²): it is the previous chain applied tocos (arctan x) = 1 / √(1 + x²)line 83 sourceSource documentation
The chain
arctan, cos, arctan, sin, arccos, tansendsxto√(1 + x²): it is the previous chain applied tocos (arctan x) = 1 / √(1 + x²).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Eq, Usa1995P2.run, Usa1995P2.chainSqrt,Real.sqrt,HAdd.hAdd,OfNat.ofNat,HPow.hPow,NatProof uses: Usa1995P2.chainInv,
Real.cos,Real.arctan,rfl,Eq.mpr,id,congrArg,HDiv.hDiv, Usa1995P2.run_chainInv,Real.cos_arctan_pos,Real.cos_arctan,one_div_one_div,Eq.refl31 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma run_chainSqrt (x : ℝ) : run chainSqrt x = √(1 + x ^ 2) := by …
Mentions: Usa1995P2.run, Usa1995P2.chainSqrt
- lemma
Usa1995P2.reachable_sqrt_divEvery number of the form√(m / n)withm, npositive naturals can be reached from0by a finite sequence of trigonometric maps line 94 sourceSource documentation
Every number of the form
√(m / n)withm, npositive naturals can be reached from0by a finite sequence of trigonometric maps. Proof by well-founded induction onm + n(Euclidean algorithm):- if
m = nthen√(m/n) = 1 = cos 0; - if
m > nthen√(m/n) = √(1 + (√((m-n)/n))²)and(m-n) + n < m + n; - if
m < nthen√(m/n) = 1 / √(n/m)and√(n/m) = √(1 + (√((n-m)/m))²)with(n-m) + m < m + n.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Exists,List, Usa1995P2.TrigMap,Eq,Real, Usa1995P2.run,Real.sqrt,HDiv.hDivProof uses:
PSigma.mk,PSigma12 instances, coercions and auxiliary constants left out.
Tactic trace: 38 steps
Open to load the checked before-and-after goal states.
lemma reachable_sqrt_div (m n : ℕ) (hm : 0 < m) (hn : 0 < n) : ∃ l : List TrigMap, run l 0 = √((m : ℝ) / n) := by …Mentions: Usa1995P2.TrigMap, Usa1995P2.run
- if
- problem
Usa1995P2.usa1995_p2line 135 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,LT.lt,OfNat.ofNat,Exists,List, Usa1995P2.TrigMap,Eq,Real, Usa1995P2.runProof uses:
Int,Rat.num,Iff.mpr,Rat.num_pos,Nat,HPow.hPow,Int.toNat,pow_pos,Real.sqrt,HDiv.hDiv,Rat.den, Usa1995P2.reachable_sqrt_div,Rat.den_pos,Exists.intro,Eq.mpr,id,congrArg,Eq.trans,Eq.symm,Int.cast_natCastand 13 more86 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.