Development/AutomorphicArithmetic/CharacterBoxes/DivinNOfHypV.lean
101rw [hB]102have h1 : 1 ≤ (D.R.f : ℝ) * D.R.m * y := one_le_mul_of_one_le_of_one_le hfm hy103nlinarith104have hB0 : 0 ≤ L.B0 := le_trans hbpos.le hbB105have hP1 : (D.R.f : ℝ) * D.R.m * L.sc.b * y ^ 2 = y * L.B0 := by rw [hB]; ring106have hP2 : Real.log L.sc.x ^ 2 * L.Nc ≤ y * L.Nc := mul_le_mul_of_nonneg_right hlog hNc107have hP0 : 0 ≤ y * L.B0 + Real.log L.sc.x ^ 2 * L.Nc := by positivity108rw [hP1]109have h1 : C * (y * L.B0 + Real.log L.sc.x ^ 2 * L.Nc) ≤ |C| * (y * (L.B0 + L.Nc)) :=110le_trans (mul_le_mul_of_nonneg_right (le_abs_self C) hP0)111(mul_le_mul_of_nonneg_left (by linarith) (abs_nonneg C))112have h2 : L.B0 ≤ y * (L.B0 + L.Nc) := by nlinarith113have h3 : (|C| + 1) * y * (L.B0 + L.Nc) = |C| * (y * (L.B0 + L.Nc)) + y * (L.B0 + L.Nc) := by ring114rw [h3]115linarith116117theorem divinN_of_hypV {eps : ℝ} (Fm : FamP eps) (heps : 0 < eps) (hV : HypV Fm.toFamCore) (hN : LinkN Fm) (hR : SmallLevelRankEq Fm) :118DIVinN Fm := by119obtain ⟨x1, h1⟩ := hV120obtain ⟨C, x3, h3⟩ := hN121obtain ⟨x4, h4⟩ := hR122obtain ⟨x6, h6⟩ := log_sq_le_rpow heps123refine ⟨|C| + 1, max (max x1 (max x3 x4)) (max x6 (Fm.x1 + 1)), fun x hx i j hj => ?_⟩124simp only [ge_iff_le, max_le_iff] at hx125obtain ⟨⟨g1, g3, g4⟩, g6, g7⟩ := hx126obtain ⟨hf, hs, hle⟩ := vvRecord _ _ (h1 x g1 i)127have hb : 1 ≤ (Fm.L x i).sc.b := Real.one_le_exp (Real.rpow_nonneg (by linarith [(Fm.L x i).sc.one_lt_alt]) _)128refine divinN_at _ j C hj (h3 x g3 i hf j hj) hs (hle.trans (Real.sqrt_le_self_iff.2 (Or.inr hb))) (h4 x g4 i j hj) ?_129rw [Fm.L_x x i (by linarith), Fm.L_eps x i]130exact h6 x g6131132end UpperTheory.Top133134end