Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 6,686 Bytes
4365a98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
/-
Copyright (c) 2022 Justin Thomas. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Justin Thomas
-/
import data.set.basic
import field_theory.minpoly
import ring_theory.principal_ideal_domain
import ring_theory.polynomial_algebra
/-!
# Annihilating Ideal
Given a commutative ring `R` and an `R`-algebra `A`
Every element `a : A` defines
an ideal `polynomial.ann_ideal a β R[X]`.
Simply put, this is the set of polynomials `p` where
the polynomial evaluation `p(a)` is 0.
## Special case where the ground ring is a field
In the special case that `R` is a field, we use the notation `R = π`.
Here `π[X]` is a PID, so there is a polynomial `g β polynomial.ann_ideal a`
which generates the ideal. We show that if this generator is
chosen to be monic, then it is the minimal polynomial of `a`,
as defined in `field_theory.minpoly`.
## Special case: endomorphism algebra
Given an `R`-module `M` (`[add_comm_group M] [module R M]`)
there are some common specializations which may be more familiar.
* Example 1: `A = M ββ[R] M`, the endomorphism algebra of an `R`-module M.
* Example 2: `A = n Γ n` matrices with entries in `R`.
-/
open_locale polynomial
namespace polynomial
section semiring
variables {R A : Type*} [comm_semiring R] [semiring A] [algebra R A]
variables (R)
/-- `ann_ideal R a` is the *annihilating ideal* of all `p : R[X]` such that `p(a) = 0`.
The informal notation `p(a)` stand for `polynomial.aeval a p`.
Again informally, the annihilating ideal of `a` is
`{ p β R[X] | p(a) = 0 }`. This is an ideal in `R[X]`.
The formal definition uses the kernel of the aeval map. -/
noncomputable def ann_ideal (a : A) : ideal R[X] :=
((aeval a).to_ring_hom : R[X] β+* A).ker
variables {R}
/-- It is useful to refer to ideal membership sometimes
and the annihilation condition other times. -/
lemma mem_ann_ideal_iff_aeval_eq_zero {a : A} {p : R[X]} :
p β ann_ideal R a β aeval a p = 0 :=
iff.rfl
end semiring
section field
variables {π A : Type*} [field π] [ring A] [algebra π A]
variable (π)
open submodule
/-- `ann_ideal_generator π a` is the monic generator of `ann_ideal π a`
if one exists, otherwise `0`.
Since `π[X]` is a principal ideal domain there is a polynomial `g` such that
`span π {g} = ann_ideal a`. This picks some generator.
We prefer the monic generator of the ideal. -/
noncomputable def ann_ideal_generator (a : A) : π[X] :=
let g := is_principal.generator $ ann_ideal π a
in g * (C g.leading_coeffβ»ΒΉ)
section
variables {π}
@[simp] lemma ann_ideal_generator_eq_zero_iff {a : A} :
ann_ideal_generator π a = 0 β ann_ideal π a = β₯ :=
by simp only [ann_ideal_generator, mul_eq_zero, is_principal.eq_bot_iff_generator_eq_zero,
polynomial.C_eq_zero, inv_eq_zero, polynomial.leading_coeff_eq_zero, or_self]
end
/-- `ann_ideal_generator π a` is indeed a generator. -/
@[simp] lemma span_singleton_ann_ideal_generator (a : A) :
ideal.span {ann_ideal_generator π a} = ann_ideal π a :=
begin
by_cases h : ann_ideal_generator π a = 0,
{ rw [h, ann_ideal_generator_eq_zero_iff.mp h, set.singleton_zero, ideal.span_zero] },
{ rw [ann_ideal_generator, ideal.span_singleton_mul_right_unit, ideal.span_singleton_generator],
apply polynomial.is_unit_C.mpr,
apply is_unit.mk0,
apply inv_eq_zero.not.mpr,
apply polynomial.leading_coeff_eq_zero.not.mpr,
apply (mul_ne_zero_iff.mp h).1 }
end
/-- The annihilating ideal generator is a member of the annihilating ideal. -/
lemma ann_ideal_generator_mem (a : A) : ann_ideal_generator π a β ann_ideal π a :=
ideal.mul_mem_right _ _ (submodule.is_principal.generator_mem _)
lemma mem_iff_eq_smul_ann_ideal_generator {p : π[X]} (a : A) :
p β ann_ideal π a β β s : π[X], p = s β’ ann_ideal_generator π a :=
by simp_rw [@eq_comm _ p, β mem_span_singleton, β span_singleton_ann_ideal_generator π a,
ideal.span]
/-- The generator we chose for the annihilating ideal is monic when the ideal is non-zero. -/
lemma monic_ann_ideal_generator (a : A) (hg : ann_ideal_generator π a β 0) :
monic (ann_ideal_generator π a) :=
monic_mul_leading_coeff_inv (mul_ne_zero_iff.mp hg).1
/-! We are working toward showing the generator of the annihilating ideal
in the field case is the minimal polynomial. We are going to use a uniqueness
theorem of the minimal polynomial.
This is the first condition: it must annihilate the original element `a : A`. -/
lemma ann_ideal_generator_aeval_eq_zero (a : A) :
aeval a (ann_ideal_generator π a) = 0 :=
mem_ann_ideal_iff_aeval_eq_zero.mp (ann_ideal_generator_mem π a)
variables {π}
lemma mem_iff_ann_ideal_generator_dvd {p : π[X]} {a : A} :
p β ann_ideal π a β ann_ideal_generator π a β£ p :=
by rw [β ideal.mem_span_singleton, span_singleton_ann_ideal_generator]
/-- The generator of the annihilating ideal has minimal degree among
the non-zero members of the annihilating ideal -/
lemma degree_ann_ideal_generator_le_of_mem (a : A) (p : π[X])
(hp : p β ann_ideal π a) (hpn0 : p β 0) :
degree (ann_ideal_generator π a) β€ degree p :=
degree_le_of_dvd (mem_iff_ann_ideal_generator_dvd.1 hp) hpn0
variables (π)
/-- The generator of the annihilating ideal is the minimal polynomial. -/
lemma ann_ideal_generator_eq_minpoly (a : A) :
ann_ideal_generator π a = minpoly π a :=
begin
by_cases h : ann_ideal_generator π a = 0,
{ rw [h, minpoly.eq_zero],
rintro β¨p, p_monic, (hp : aeval a p = 0)β©,
refine p_monic.ne_zero (ideal.mem_bot.mp _),
simpa only [ann_ideal_generator_eq_zero_iff.mp h]
using mem_ann_ideal_iff_aeval_eq_zero.mpr hp },
{ exact minpoly.unique _ _
(monic_ann_ideal_generator _ _ h)
(ann_ideal_generator_aeval_eq_zero _ _)
(Ξ» q q_monic hq, (degree_ann_ideal_generator_le_of_mem a q
(mem_ann_ideal_iff_aeval_eq_zero.mpr hq)
q_monic.ne_zero)) }
end
/-- If a monic generates the annihilating ideal, it must match our choice
of the annihilating ideal generator. -/
lemma monic_generator_eq_minpoly (a : A) (p : π[X])
(p_monic : p.monic) (p_gen : ideal.span {p} = ann_ideal π a) :
ann_ideal_generator π a = p :=
begin
by_cases h : p = 0,
{ rwa [h, ann_ideal_generator_eq_zero_iff, β p_gen, ideal.span_singleton_eq_bot.mpr], },
{ rw [β span_singleton_ann_ideal_generator, ideal.span_singleton_eq_span_singleton] at p_gen,
rw eq_comm,
apply eq_of_monic_of_associated p_monic _ p_gen,
{ apply monic_ann_ideal_generator _ _ ((associated.ne_zero_iff p_gen).mp h), }, },
end
end field
end polynomial
|