Theorem: NumberField.hermiteTheorem.finite_of_discr_bdd_of_isReal
File: Mathlib/NumberTheory/NumberField/Discriminant.lean

Proof steps:
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
tactic: let D := rankOfDiscrBdd N
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
tactic: let B := boundOfDiscBdd N
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
state_after: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
tactic: let C := Nat.ceil ((max B 1) ^ D *  Nat.choose D (D / 2))
state_before: K : Type u_1
inst✝³ : Field K
inst✝² : NumberField K
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
⊢ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}.Finite
state_after: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
⊢ ∃
    x ∈
      ⋃ f,
        ⋃ (_ : f.natDegree ≤ D ∧ ∀ (i : ℕ), f.coeff i ∈ Set.Icc (-↑C) ↑C),
          ↑(Polynomial.map (algebraMap ℤ A) f).roots.toFinset,
    ↑⟨K, hK₀⟩ = ℚ⟮x⟯
tactic: refine finite_of_finite_generating_set A _ (bUnion_roots_finite (algebraMap ℤ A) D
      (Set.finite_Icc (-C : ℤ) C)) (fun ⟨K, hK₀⟩ ⟨hK₁, hK₂⟩ ↦ ?_)
state_before: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
⊢ ∃
    x ∈
      ⋃ f,
        ⋃ (_ : f.natDegree ≤ D ∧ ∀ (i : ℕ), f.coeff i ∈ Set.Icc (-↑C) ↑C),
          ↑(Polynomial.map (algebraMap ℤ A) f).roots.toFinset,
    ↑⟨K, hK₀⟩ = ℚ⟮x⟯
state_after: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
⊢ ∃ x,
    (∃ i,
        ∃ (_ : i.natDegree ≤ D ∧ ∀ (i_1 : ℕ), i.coeff i_1 ∈ Set.Icc (-↑C) ↑C),
          x ∈ ↑(Polynomial.map (algebraMap ℤ A) i).roots.toFinset) ∧
      K = ℚ⟮x⟯
tactic: simp_rw [Set.mem_iUnion]
state_before: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
⊢ ∃ x,
    (∃ i,
        ∃ (_ : i.natDegree ≤ D ∧ ∀ (i_1 : ℕ), i.coeff i_1 ∈ Set.Icc (-↑C) ↑C),
          x ∈ ↑(Polynomial.map (algebraMap ℤ A) i).roots.toFinset) ∧
      K = ℚ⟮x⟯
state_after: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this : NumberField ↥K
⊢ ∃ x,
    (∃ i,
        ∃ (_ : i.natDegree ≤ D ∧ ∀ (i_1 : ℕ), i.coeff i_1 ∈ Set.Icc (-↑C) ↑C),
          x ∈ ↑(Polynomial.map (algebraMap ℤ A) i).roots.toFinset) ∧
      K = ℚ⟮x⟯
tactic: haveI : NumberField K := @NumberField.mk _ _ inferInstance hK₀
state_before: K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₁ : {w | w.IsReal}.Nonempty
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this : NumberField ↥K
⊢ ∃ x,
    (∃ i,
        ∃ (_ : i.natDegree ≤ D ∧ ∀ (i_1 : ℕ), i.coeff i_1 ∈ Set.Icc (-↑C) ↑C),
          x ∈ ↑(Polynomial.map (algebraMap ℤ A) i).roots.toFinset) ∧
      K = ℚ⟮x⟯
state_after: case intro
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
⊢ ∃ x,
    (∃ i,
        ∃ (_ : i.natDegree ≤ D ∧ ∀ (i_1 : ℕ), i.coeff i_1 ∈ Set.Icc (-↑C) ↑C),
          x ∈ ↑(Polynomial.map (algebraMap ℤ A) i).roots.toFinset) ∧
      K = ℚ⟮x⟯
tactic: obtain ⟨w₀, hw₀⟩ := hK₁
state_before: case intro
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
⊢ minkowskiBound (↥K) 1 < ↑(convexBodyLTFactor ↥K) * ↑B
state_after: case intro
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this✝ : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
this : 1 ≤ convexBodyLTFactor ↥K
⊢ minkowskiBound (↥K) 1 < ↑(convexBodyLTFactor ↥K) * ↑B
tactic: have := one_le_convexBodyLTFactor K
state_before: case intro
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this✝ : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
this : 1 ≤ convexBodyLTFactor ↥K
⊢ minkowskiBound (↥K) 1 < ↑(convexBodyLTFactor ↥K) * ↑B
state_after: case h.e'_3
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this✝ : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
this : 1 ≤ convexBodyLTFactor ↥K
⊢ minkowskiBound (↥K) 1 = (fun x => x * minkowskiBound (↥↑⟨K, hK₀⟩) 1) ↑1
tactic: convert lt_of_le_of_lt (mul_right_mono (coe_le_coe.mpr this))
    (ENNReal.mul_lt_mul_left' (by positivity) coe_ne_top (minkowskiBound_lt_boundOfDiscBdd hK₂))
state_before: case h.e'_3
K✝ : Type u_1
inst✝³ : Field K✝
inst✝² : NumberField K✝
A : Type u_2
inst✝¹ : Field A
inst✝ : CharZero A
N : ℕ
hK : |discr K✝| ≤ ↑N
D : ℕ := rankOfDiscrBdd N
B : ℝ≥0 := boundOfDiscBdd N
C : ℕ := ⌈max B 1 ^ D * ↑(D.choose (D / 2))⌉₊
x✝¹ : { F // FiniteDimensional ℚ ↥F }
K : IntermediateField ℚ A
hK₀ : FiniteDimensional ℚ ↥K
x✝ : ⟨K, hK₀⟩ ∈ {K | {w | w.IsReal}.Nonempty ∧ |discr ↥↑K| ≤ ↑N}
hK₂ : |discr ↥↑⟨K, hK₀⟩| ≤ ↑N
this✝ : NumberField ↥K
w₀ : InfinitePlace ↥↑⟨K, hK₀⟩
hw₀ : w₀ ∈ {w | w.IsReal}
this : 1 ≤ convexBodyLTFactor ↥K
⊢ minkowskiBound (↥K) 1 = (fun x => x * minkowskiBound (↥↑⟨K, hK₀⟩) 1) ↑1
state_after: no goals
tactic: simp_rw [ENNReal.coe_one, one_mul]