Compfiles/Usa1995P2.lean

GitHub source file

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ₙ).]

Imports (2)
Imported by 1 file
  1. inductive Usa1995P2.TrigMap The six trigonometric maps allowed by the problem line 29 source

    Source documentation

    The six trigonometric maps allowed by the problem.

    no axioms what this means

    inductive TrigMap where
    …
  2. def Usa1995P2.TrigMap.apply Evaluate a trigonometric map at a real number line 33 source

    Source documentation

    Evaluate a trigonometric map at a real number.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Usa1995P2.TrigMap, Real

    Proof uses: Usa1995P2.TrigMap.apply.match_1, Unit, Real.sin, Real.cos, Real.tan, Real.arcsin, Real.arccos, Real.arctan

    noncomputable 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

  3. def Usa1995P2.run Apply a finite sequence of trigonometric maps to a starting value line 42 source

    Source 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, Real

    Proof uses: List.foldl, Usa1995P2.TrigMap.apply

    noncomputable def run (l : List TrigMap) (x : ℝ) : ℝ := l.foldl (fun a f => f.apply a) x
    …

    Mentions: Usa1995P2.TrigMap, f

  4. lemma Usa1995P2.run_append line 46 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: List, Usa1995P2.TrigMap, Real, Eq, Usa1995P2.run, HAppend.hAppend

    Proof uses: of_eq_true, List.foldl, Usa1995P2.TrigMap.apply, Eq.trans, True, congrFun', congrArg, List.foldl_append, eq_self

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

  5. def Usa1995P2.chainInv The chain arctan, sin, arccos, tan of trigonometric maps line 52 source

    Source documentation

    The chain arctan, sin, arccos, tan of trigonometric maps. We show in run_chainInv that it sends any positive x to 1 / x.

    no axioms what this means

    Statement uses: List, Usa1995P2.TrigMap

    Proof uses: List.cons, Usa1995P2.TrigMap.arctan, Usa1995P2.TrigMap.sin, Usa1995P2.TrigMap.arccos, Usa1995P2.TrigMap.tan, List.nil

    def chainInv : List TrigMap := [.arctan, .sin, .arccos, .tan]

    Mentions: Usa1995P2.TrigMap

  6. def Usa1995P2.chainSqrt The chain arctan, cos, arctan, sin, arccos, tan of trigonometric maps line 56 source

    Source documentation

    The chain arctan, cos, arctan, sin, arccos, tan of trigonometric maps. We show in run_chainSqrt that it sends any real x to √(1 + x²).

    no axioms what this means

    Statement uses: List, Usa1995P2.TrigMap

    Proof uses: List.cons, Usa1995P2.TrigMap.arctan, Usa1995P2.TrigMap.cos, Usa1995P2.TrigMap.sin, Usa1995P2.TrigMap.arccos, Usa1995P2.TrigMap.tan, List.nil

    def chainSqrt : List TrigMap := [.arctan, .cos, .arctan, .sin, .arccos, .tan]

    Mentions: Usa1995P2.TrigMap

  7. lemma Usa1995P2.run_chainInv Documented declaration: run_chainInv line 61 source

    Source documentation

    The chain arctan, sin, arccos, tan sends x to 1 / x: with t = arctan x we have sin t = x / √(1 + x²), and if u = arccos (sin t) then tan 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.hDiv

    Proof 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.le and 138 more

    125 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

  8. lemma Usa1995P2.run_chainSqrt The chain arctan, cos, arctan, sin, arccos, tan sends x to √(1 + x²): it is the previous chain applied to cos (arctan x) = 1 / √(1 + x²) line 83 source

    Source documentation

    The chain arctan, cos, arctan, sin, arccos, tan sends x to √(1 + x²): it is the previous chain applied to cos (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, Nat

    Proof 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.refl

    31 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

  9. lemma Usa1995P2.reachable_sqrt_div Every number of the form √(m / n) with m, n positive naturals can be reached from 0 by a finite sequence of trigonometric maps line 94 source

    Source documentation

    Every number of the form √(m / n) with m, n positive naturals can be reached from 0 by a finite sequence of trigonometric maps. Proof by well-founded induction on m + n (Euclidean algorithm):

    • if m = n then √(m/n) = 1 = cos 0;
    • if m > n then √(m/n) = √(1 + (√((m-n)/n))²) and (m-n) + n < m + n;
    • if m < n then √(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.hDiv

    Proof uses: PSigma.mk, PSigma

    12 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

  10. problem Usa1995P2.usa1995_p2 line 135 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Rat, LT.lt, OfNat.ofNat, Exists, List, Usa1995P2.TrigMap, Eq, Real, Usa1995P2.run

    Proof 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_natCast and 13 more

    86 instances, coercions and auxiliary constants left out.

    Tactic trace: 17 steps

    Open to load the checked before-and-after goal states.