import Mathlib
import Development.AbelianVarietyTheory.Proofs.DivisorProofs.BoundedOfIsIntegral
import Mathlib
open NumberField IsDedekindDomain
set_option maxHeartbeats 1000000 in
theorem _root_.GlobalTheory.T.exists_valuation_bound_of_isIntegral_mem_adjoin : ∀ (E : Type) [Field E] [NumberField E] (w : HeightOneSpectrum (𝓞 E)) (n : ℕ) (N : Matrix (Fin n) (Fin n) (w.adicCompletion E)), N.charpoly.Separable → ∃ c : WithZero (Multiplicative ℤ), ∀ g ∈ Algebra.adjoin (w.adicCompletion E) {N}, IsIntegral (w.adicCompletionIntegers E) g → ∀ i j, Valued.v (g i j) ≤ c := by
  first | exact @GlobalTheory.LocBounded.bounded_of_isIntegral | exact GlobalTheory.LocBounded.bounded_of_isIntegral | (intros; apply GlobalTheory.LocBounded.bounded_of_isIntegral <;> assumption)
