Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 55baab3

Browse files
Sebastian-Monnetkbuzzardriccardobrasca
committed
feat(field_theory/krull_topology): added fintype_alg_hom (#12777)
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: Sebastian-Monnet <54352341+Sebastian-Monnet@users.noreply.github.com> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
1 parent 36fceb9 commit 55baab3

File tree

2 files changed

+60
-8
lines changed

2 files changed

+60
-8
lines changed

src/field_theory/minpoly.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ calc degree (minpoly A x) ≤ degree (p * C (leading_coeff p)⁻¹) :
270270
min A x (monic_mul_leading_coeff_inv pnz) (by simp [hp])
271271
... = degree p : degree_mul_leading_coeff_inv p pnz
272272

273+
lemma ne_zero_of_finite_field_extension (e : B) [finite_dimensional A B] : minpoly A e ≠ 0 :=
274+
minpoly.ne_zero $ is_integral_of_noetherian (is_noetherian.iff_fg.2 infer_instance) _
275+
273276
/-- The minimal polynomial of an element `x` is uniquely characterized by its defining property:
274277
if there is another monic polynomial of minimal degree that has `x` as a root,
275278
then this polynomial is equal to the minimal polynomial of `x`. -/

src/field_theory/primitive_element.lean

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ end
165165
end primitive_element_inf
166166

167167
variables (F E : Type*) [field F] [field E]
168-
variables [algebra F E] [finite_dimensional F E] [is_separable F E]
168+
variables [algebra F E] [finite_dimensional F E]
169+
170+
section separable_assumption
171+
172+
variable [is_separable F E]
169173

170174
/-- Primitive element theorem: a finite separable field extension `E` of `F` has a
171175
primitive element, i.e. there is an `α ∈ E` such that `F⟮α⟯ = (⊤ : subalgebra F E)`.-/
@@ -195,17 +199,62 @@ let α := (exists_primitive_element F E).some,
195199
have e : F⟮α⟯ = ⊤ := (exists_primitive_element F E).some_spec,
196200
pb.map ((intermediate_field.equiv_of_eq e).trans intermediate_field.top_equiv)
197201

198-
/-- If `E / F` is a finite separable extension, then there are finitely many
199-
embeddings from `E` into `K` that fix `F`, corresponding to the number of
200-
conjugate roots of the primitive element generating `F`. -/
201-
instance {K : Type*} [field K] [algebra F K] : fintype (E →ₐ[F] K) :=
202-
power_basis.alg_hom.fintype (power_basis_of_finite_of_separable F E)
202+
end separable_assumption
203+
204+
/-- A technical finiteness result. -/
205+
noncomputable def fintype.subtype_prod {E : Type*} {X : set E} (hX : X.finite) {L : Type*}
206+
(F : E → multiset L) : fintype (Π x : X, {l : L // l ∈ F x}) :=
207+
by { classical, letI : fintype X := set.finite.fintype hX, exact pi.fintype}
208+
209+
variables (K : Type*) [field K] [algebra F K]
210+
211+
variables (E F)
212+
213+
/-- Function from Hom_K(E,L) to pi type Π (x : basis), roots of min poly of x -/
214+
def roots_of_min_poly_pi_type (φ : E →ₐ[F] K)
215+
(x : set.range (finite_dimensional.fin_basis F E : _ → E)) :
216+
{l : K // l ∈ (((minpoly F x.1).map (algebra_map F K)).roots : multiset K)} :=
217+
⟨φ x, begin
218+
rw [polynomial.mem_roots_map (minpoly.ne_zero_of_finite_field_extension F x.val),
219+
← polynomial.alg_hom_eval₂_algebra_map, ← φ.map_zero],
220+
exact congr_arg φ (minpoly.aeval F (x : E)),
221+
end
222+
223+
lemma aux_inj_roots_of_min_poly : function.injective (roots_of_min_poly_pi_type F E K) :=
224+
begin
225+
intros f g h,
226+
suffices : (f : E →ₗ[F] K) = g,
227+
{ rw linear_map.ext_iff at this,
228+
ext x, exact this x },
229+
rw function.funext_iff at h,
230+
apply linear_map.ext_on (finite_dimensional.fin_basis F E).span_eq,
231+
rintro e he,
232+
have := (h ⟨e, he⟩),
233+
apply_fun subtype.val at this,
234+
exact this,
235+
end
236+
237+
/-- Given field extensions `E/F` and `K/F`, with `E/F` finite, there are finitely many `F`-algebra
238+
homomorphisms `E →ₐ[K] K`. -/
239+
noncomputable instance : fintype (E →ₐ[F] K) :=
240+
let n := finite_dimensional.finrank F E in
241+
begin
242+
let B : basis (fin n) F E := finite_dimensional.fin_basis F E,
243+
let X := set.range (B : fin n → E),
244+
have hX : X.finite := set.finite_range ⇑B,
245+
refine @fintype.of_injective _ _
246+
(fintype.subtype_prod hX (λ e, ((minpoly F e).map (algebra_map F K)).roots)) _
247+
(aux_inj_roots_of_min_poly F E K),
248+
end
203249

204250
end field
205251

206252
@[simp] lemma alg_hom.card (F E K : Type*) [field F] [field E] [field K] [is_alg_closed K]
207253
[algebra F E] [finite_dimensional F E] [is_separable F E] [algebra F K] :
208254
fintype.card (E →ₐ[F] K) = finrank F E :=
209-
(alg_hom.card_of_power_basis (field.power_basis_of_finite_of_separable F E)
255+
begin
256+
convert (alg_hom.card_of_power_basis (field.power_basis_of_finite_of_separable F E)
210257
(is_separable.separable _ _) (is_alg_closed.splits_codomain _)).trans
211-
(power_basis.finrank _).symm
258+
(power_basis.finrank _).symm,
259+
apply_instance,
260+
end

0 commit comments

Comments
 (0)