BinaryCrossoverBracket.lean
1module2public import SubentropyCertificates.BinaryCrossoverOrder3public import SubentropyCertificates.CrossoverEndpoints45/-! The certified numerical bracket selects the unique interior crossover. -/6@[expose] public section7noncomputable section8open Set9namespace SubentropyCertificates.BinaryCrossover10open SubentropyCertificates.SmallOverlap SubentropyCertificates.ClassicalCurve1112/-- The unique interior root in the overlap has the stated rational enclosure. -/13theorem crossover_bracket :14 ∃! s : ℝ, s ∈ Ioo 0 1 ∧ gap (s^2) = 0 ∧15 767875711400/1000000000000 < s ∧ s < 767875711401/1000000000000 ∧16 ∀ t ∈ Ioo (0:ℝ) 1, gap (t^2) = 0 ↔ t = s := by17 obtain ⟨u,hu,hu0,uniq,low,high⟩ := crossing_exists18 let a : ℝ := 767875711400/100000000000019 let b : ℝ := 767875711401/100000000000020 have ha : a ∈ Ioo (0:ℝ) 1 := by norm_num [a]21 have hb : b ∈ Ioo (0:ℝ) 1 := by norm_num [b]22 have hf := BinaryIntervals.crossover_endpoint_signs23 change conditionalCurve a - phi 0 (a^2/4) < 0 ∧ 0 < conditionalCurve b - phi 0 (b^2/4) at hf24 have hfa : gap (a^2) < 0 := by simpa [gap,Real.sqrt_sq ha.1.le] using hf.125 have hfb : 0 < gap (b^2) := by simpa [gap,Real.sqrt_sq hb.1.le] using hf.226 have huA : a^2 < u := by27 rcases lt_trichotomy (a^2) u with h|h|h28 · exact h29 · rw [h,hu0] at hfa; exact False.elim (lt_irrefl _ hfa)30 · have hle : a^2 ≤ 1 := by norm_num [a]31 exact False.elim ((not_lt.mpr (high _ ⟨h,hle⟩).le) hfa)32 have huB : u < b^2 := by33 rcases lt_trichotomy u (b^2) with h|h|h34 · exact h35 · rw [← h,hu0] at hfb; exact False.elim (lt_irrefl _ hfb)36 · exact False.elim (not_lt.mpr (low _ ⟨sq_pos_of_pos hb.1,h⟩).le hfb)37 have hroot := Real.sq_sqrt hu.1.le38 have rootpos := Real.sqrt_pos.2 hu.139 have hRa : a < Real.sqrt u := (Real.lt_sqrt ha.1.le).2 huA40 have hRb : Real.sqrt u < b := (Real.sqrt_lt' hb.1).2 huB41 have hR1 := lt_trans hRb hb.242 have idroot (s : ℝ) (hs : s ∈ Ioo 0 1) : gap (s^2) = 0 ↔ s = Real.sqrt u := by43 rw [uniq _ ⟨sq_pos_of_pos hs.1,by nlinarith [mul_pos hs.1 (sub_pos.mpr hs.2),hs.2]⟩]44 exact ⟨fun h ↦ (Real.sqrt_sq hs.1.le).symm.trans (congrArg Real.sqrt h), fun h ↦ h ▸ hroot⟩45 refine ⟨Real.sqrt u, ⟨⟨rootpos,hR1⟩, by rwa [hroot], hRa,hRb,idroot⟩, ?_⟩46 intro s hs47 exact (idroot s hs.1).mp hs.2.14849end SubentropyCertificates.BinaryCrossover
Axioms used
Choose a statement to see which axioms its proof uses.