Theorem: AlgebraicClosure.AdjoinMonic.isIntegral
File: Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean

tactic: let ⟨p, hp⟩ := Ideal.Quotient.mk_surjective z
state_before: k : Type u
inst✝ : Field k
z : AdjoinMonic k
⊢ IsIntegral k z
state_after: k : Type u
inst✝ : Field k
z : AdjoinMonic k
p : MvPolynomial (MonicIrreducible k) k
hp : (Ideal.Quotient.mk (maxIdeal k)) p = z
⊢ IsIntegral k z

tactic: rw [← hp]
state_before: k : Type u
inst✝ : Field k
z : AdjoinMonic k
p : MvPolynomial (MonicIrreducible k) k
hp : (Ideal.Quotient.mk (maxIdeal k)) p = z
⊢ IsIntegral k z
state_after: k : Type u
inst✝ : Field k
z : AdjoinMonic k
p : MvPolynomial (MonicIrreducible k) k
hp : (Ideal.Quotient.mk (maxIdeal k)) p = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)

tactic: induction p using MvPolynomial.induction_on generalizing z with
  | h_C => exact isIntegral_algebraMap
  | h_add _ _ ha hb => exact (ha _ rfl).add (hb _ rfl)
  | h_X p f ih =>
    refine @IsIntegral.mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_
    refine ⟨f, f.2.1, ?_⟩
    erw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]
    exact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)
state_before: k : Type u
inst✝ : Field k
z : AdjoinMonic k
p : MvPolynomial (MonicIrreducible k) k
hp : (Ideal.Quotient.mk (maxIdeal k)) p = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
state_after: no goals

tactic: exact isIntegral_algebraMap
state_before: case h_C
k : Type u
inst✝ : Field k
a✝ : k
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.C a✝) = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.C a✝))
state_after: no goals

tactic: exact (ha _ rfl).add (hb _ rfl)
state_before: case h_add
k : Type u
inst✝ : Field k
p✝ q✝ : MvPolynomial (MonicIrreducible k) k
ha : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p✝ = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p✝)
hb : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) q✝ = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) q✝)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝) = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝))
state_after: no goals

tactic: refine @IsIntegral.mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_
state_before: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f))
state_after: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f))

tactic: refine ⟨f, f.2.1, ?_⟩
state_before: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f))
state_after: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ Polynomial.eval₂ (_root_.algebraMap k (MvPolynomial (MonicIrreducible k) k ⧸ maxIdeal k))
      ((Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f)) ↑f =
    0

tactic: erw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]
state_before: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ Polynomial.eval₂ (_root_.algebraMap k (MvPolynomial (MonicIrreducible k) k ⧸ maxIdeal k))
      ((Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f)) ↑f =
    0
state_after: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ Polynomial.eval₂ MvPolynomial.C (MvPolynomial.X f) ↑f ∈ maxIdeal k

tactic: exact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)
state_before: case h_X
k : Type u
inst✝ : Field k
p : MvPolynomial (MonicIrreducible k) k
f : MonicIrreducible k
ih : ∀ (z : AdjoinMonic k), (Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k ((Ideal.Quotient.mk (maxIdeal k)) p)
z : AdjoinMonic k
hp : (Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z
⊢ Polynomial.eval₂ MvPolynomial.C (MvPolynomial.X f) ↑f ∈ maxIdeal k
state_after: no goals