Development/AutomorphicArithmetic/CharacterBoxes/DivinNOfHypV.lean
1import Formalism.SharpRestriction.GlobalTheoremInputs2import Development.AutomorphicArithmetic.CharacterBoxes.ExistsPageN34noncomputable section56namespace UpperTheory.Top78open Formalism.BasicNotions Formalism.MainNotions910def HypV {eps : ℝ} (Fm : FamCore eps) : Prop :=11∃ x0 : ℝ, ∀ x ≥ x0, ∀ i : Fm.Ix x, VVle (Fm.D x i).host.E (Fm.D x i).R.t (Real.sqrt (Fm.L x i).sc.b)1213def FamilyClassConnected (ℰ : FamClass) : Prop :=14∃ eD eL ε₁ : ℝ, 0 < ε₁ ∧ ∀ eps : ℝ, 0 < eps → eps < ε₁ →15∃ Fm : FamP eps, ℰ Fm ∧ ∃ K cHH eK CL x0 : ℝ, ∀ x ≥ x0, x ∈ Fm.Win → ChainTied Fm eD eL K cHH eK CL x1617theorem vvRecord (D : D7) (B : ℝ) (h : VVle D.host.E D.R.t B) :18ShaFinOdd D ∧ Summable (vvTerm D) ∧ ∑' l, vvTerm D l ≤ B := by19letI := D.nd.instOm20letI := D.nd.algOm21haveI := D.nd.acOm22obtain ⟨h1, h2⟩ := h D.nd.Om D.nd.ldat23have key : ∀ (p : ℕ) [Fact p.Prime], ((∑ e ∈ Finset.Ico 1 D.R.t, D.what₂.shaLen p e : ℚ) : ℝ) =24∑ e ∈ Finset.Ico 1 D.R.t, ((Formalism.GaloisCohomology.shaLen (D.nd.ldat p) (e : ℤ)).toNat : ℝ) := by25intro p _26push_cast27refine Finset.sum_congr rfl fun e he => ?_28obtain ⟨a, b⟩ := Finset.mem_Ico.1 he29rw [D.nd.sha_eq p e a b _ (ENat.coe_toNat (h1 p e a b)).symm]30norm_cast31have bd : ∀ l : ℕ, 0 ≤ vvTerm D l ∧ ∀ hl : l.Prime, vvTerm D l ≤ Real.log l *32∑ e ∈ Finset.Ico 1 D.R.t, ((@Formalism.GaloisCohomology.shaLen _ D.nd.Om _ _ _ _ _ l ⟨hl⟩ (@Formalism.BasicNotions.NData.ldat _ _ _ D.nd l ⟨hl⟩) (e : ℤ)).toNat : ℝ) := by33intro l34by_cases hl : l.Prime35· haveI : Fact l.Prime := ⟨hl⟩36have hk := key l37have hn : 0 ≤ Real.log l * ∑ e ∈ Finset.Ico 1 D.R.t, ((Formalism.GaloisCohomology.shaLen (D.nd.ldat l) (e : ℤ)).toNat : ℝ) :=38mul_nonneg (Real.log_natCast_nonneg _) (Finset.sum_nonneg fun _ _ => Nat.cast_nonneg _)39unfold vvTerm40split_ifs41all_goals first42| exact ⟨le_rfl, fun _ => hn⟩43| (rw [hk, mul_comm]; exact ⟨hn, fun _ => le_rfl⟩)44· have : vvTerm D l = 0 := by unfold vvTerm; simp [hl]45exact ⟨this.ge, fun h => absurd h hl⟩46have part : ∀ s : Finset ℕ, ∑ l ∈ s, vvTerm D l ≤ B := by47intro s48classical49refine le_trans ?_ (h2 (s.subtype Nat.Prime))50rw [← Finset.sum_filter_of_ne (p := Nat.Prime) (fun l _ hne => by