Theorem: spectrum.map_polynomial_aeval_of_degree_pos
File: Mathlib/FieldTheory/IsAlgClosed/Spectrum.lean

tactic: refine' Set.eq_of_subset_of_subset (fun k hk => _) (subset_polynomial_aeval a p)
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
⊢ σ (↑(aeval a) p) = (fun x => eval x p) '' σ a

tactic: have hprod := eq_prod_roots_of_splits_id (IsAlgClosed.splits (C k - p))
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: have h_ne : C k - p ≠ 0 := ne_zero_of_degree_gt <| by
  rwa [degree_sub_eq_right_of_degree_lt (lt_of_le_of_lt degree_C_le hdeg)]
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: have lead_ne := leadingCoeff_ne_zero.mpr h_ne
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: have lead_unit := (Units.map ↑ₐ.toMonoidHom (Units.mk0 _ lead_ne)).isUnit
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: have p_a_eq : aeval a (C k - p) = ↑ₐ k - aeval a p := by
  simp only [aeval_C, AlgHom.map_sub, sub_left_inj]
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: rw [mem_iff, ← p_a_eq, hprod, aeval_mul,
  ((Commute.all _ _).map (aeval a : 𝕜[X] →ₐ[𝕜] A)).isUnit_mul_iff, aeval_C] at hk
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
p_a_eq : ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: replace hk := exists_mem_of_not_isUnit_aeval_prod (not_and.mp hk lead_unit)
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk :
  ¬(IsUnit (↑↑ₐ (leadingCoeff (↑C k - p))) ∧
      IsUnit (↑(aeval a) (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p))))))
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
p_a_eq : ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: rcases hk with ⟨r, r_mem, r_ev⟩
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
p_a_eq : ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p
hk : ∃ k_1, k_1 ∈ σ a ∧ eval k_1 (↑C k - p) = 0
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: exact ⟨r, r_mem, symm (by simpa [eval_sub, eval_C, sub_eq_zero] using r_ev)⟩
state_before: case intro.intro
𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
p_a_eq : ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p
r : 𝕜
r_mem : r ∈ σ a
r_ev : eval r (↑C k - p) = 0
⊢ k ∈ (fun x => eval x p) '' σ a

tactic: rwa [degree_sub_eq_right_of_degree_lt (lt_of_le_of_lt degree_C_le hdeg)]
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
⊢ ?m.271688 < degree (↑C k - p)

tactic: simp only [aeval_C, AlgHom.map_sub, sub_left_inj]
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hk : k ∈ σ (↑(aeval a) p)
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
⊢ ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p

tactic: simpa [eval_sub, eval_C, sub_eq_zero] using r_ev
state_before: 𝕜 : Type u
A : Type v
inst✝³ : Field 𝕜
inst✝² : Ring A
inst✝¹ : Algebra 𝕜 A
inst✝ : IsAlgClosed 𝕜
a : A
p : 𝕜[X]
hdeg : 0 < degree p
k : 𝕜
hprod : ↑C k - p = ↑C (leadingCoeff (↑C k - p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots (↑C k - p)))
h_ne : ↑C k - p ≠ 0
lead_ne : leadingCoeff (↑C k - p) ≠ 0
lead_unit : IsUnit ↑(↑(Units.map ↑↑ₐ) (Units.mk0 (leadingCoeff (↑C k - p)) lead_ne))
p_a_eq : ↑(aeval a) (↑C k - p) = ↑↑ₐ k - ↑(aeval a) p
r : 𝕜
r_mem : r ∈ σ a
r_ev : eval r (↑C k - p) = 0
⊢ k = (fun x => eval x p) r