|
| 1 | +/- |
| 2 | +Copyright (c) 2024 Andrew Yang. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Andrew Yang |
| 5 | +-/ |
| 6 | +import Mathlib.RingTheory.Etale.Basic |
| 7 | +import Mathlib.RingTheory.Unramified.Field |
| 8 | + |
| 9 | +/-! |
| 10 | +# Etale algebras over fields |
| 11 | +
|
| 12 | +## Main results |
| 13 | +
|
| 14 | +Let `K` be a field, `A` be a `K`-algebra and `L` be a field extension of `K`. |
| 15 | +
|
| 16 | +- `Algebra.FormallyEtale.of_isSeparable`: |
| 17 | + If `L` is separable over `K`, then `L` is formally etale over `K`. |
| 18 | +- `Algebra.FormallyEtale.iff_isSeparable`: |
| 19 | + If `L` is (essentially) of finite type over `K`, then `L/K` is etale iff `L/K` is separable. |
| 20 | +
|
| 21 | +## References |
| 22 | +
|
| 23 | +- [B. Iversen, *Generic Local Structure of the Morphisms in Commutative Algebra*][iversen] |
| 24 | +
|
| 25 | +-/ |
| 26 | + |
| 27 | + |
| 28 | +universe u |
| 29 | + |
| 30 | +variable (K A L : Type u) [Field K] [Field L] [CommRing A] [Algebra K A] [Algebra K L] |
| 31 | + |
| 32 | +open Algebra Polynomial |
| 33 | + |
| 34 | +open scoped TensorProduct |
| 35 | + |
| 36 | +namespace Algebra.FormallyEtale |
| 37 | + |
| 38 | +/-- |
| 39 | +This is a weaker version of `of_isSeparable` that additionally assumes `EssFiniteType K L`. |
| 40 | +Use that instead. |
| 41 | +
|
| 42 | +This is Iversen Corollary II.5.3. |
| 43 | +-/ |
| 44 | +theorem of_isSeparable_aux [Algebra.IsSeparable K L] [EssFiniteType K L] : |
| 45 | + FormallyEtale K L := by |
| 46 | + -- We already know that for field extensions |
| 47 | + -- IsSeparable + EssFiniteType => FormallyUnramified + Finite |
| 48 | + have := FormallyUnramified.of_isSeparable K L |
| 49 | + have := FormallyUnramified.finite_of_free (R := K) (S := L) |
| 50 | + constructor |
| 51 | + -- We shall show that any `f : L → B/I` can be lifted to `L → B` if `I^2 = ⊥` |
| 52 | + intros B _ _ I h |
| 53 | + refine ⟨(FormallyUnramified.of_isSeparable K L).1 I h, ?_⟩ |
| 54 | + intro f |
| 55 | + -- By separability and finiteness, we may assume `L = K(α)` with `p` the minpoly of `α`. |
| 56 | + let pb := Field.powerBasisOfFiniteOfSeparable K L |
| 57 | + -- Let `x : B` such that `f(α) = x` in `B / I`. |
| 58 | + obtain ⟨x, hx⟩ := Ideal.Quotient.mk_surjective (f pb.gen) |
| 59 | + have helper : ∀ x, IsScalarTower.toAlgHom K B (B ⧸ I) x = Ideal.Quotient.mk I x := fun _ ↦ rfl |
| 60 | + -- Then `p(x) = 0 mod I`, and the goal is to find some `ε ∈ I` such that |
| 61 | + -- `p(x + ε) = p(x) + ε p'(x) = 0`, and we will get our lift into `B`. |
| 62 | + have hx' : Ideal.Quotient.mk I (aeval x (minpoly K pb.gen)) = 0 := by |
| 63 | + rw [← helper, ← aeval_algHom_apply, helper, hx, aeval_algHom_apply, minpoly.aeval, map_zero] |
| 64 | + -- Since `p` is separable, `-p'(x)` is invertible in `B ⧸ I`, |
| 65 | + obtain ⟨u, hu⟩ : ∃ u, (aeval x) (derivative (minpoly K pb.gen)) * u + 1 ∈ I := by |
| 66 | + have := (isUnit_iff_ne_zero.mpr ((Algebra.IsSeparable.isSeparable K |
| 67 | + pb.gen).aeval_derivative_ne_zero (minpoly.aeval K _))).map f |
| 68 | + rw [← aeval_algHom_apply, ← hx, ← helper, aeval_algHom_apply, helper] at this |
| 69 | + obtain ⟨u, hu⟩ := Ideal.Quotient.mk_surjective (-this.unit⁻¹ : B ⧸ I) |
| 70 | + use u |
| 71 | + rw [← Ideal.Quotient.eq_zero_iff_mem, map_add, map_mul, map_one, hu, mul_neg, |
| 72 | + IsUnit.mul_val_inv, neg_add_cancel] |
| 73 | + -- And `ε = p(x)/(-p'(x))` works. |
| 74 | + use pb.liftEquiv.symm ⟨x + u * aeval x (minpoly K pb.gen), ?_⟩ |
| 75 | + · apply pb.algHom_ext |
| 76 | + simp [hx, hx'] |
| 77 | + · rw [← eval_map_algebraMap, Polynomial.eval_add_of_sq_eq_zero, derivative_map, |
| 78 | + ← one_mul (eval x _), eval_map_algebraMap, eval_map_algebraMap, ← mul_assoc, ← add_mul, |
| 79 | + ← Ideal.mem_bot, ← h, pow_two, add_comm] |
| 80 | + · exact Ideal.mul_mem_mul hu (Ideal.Quotient.eq_zero_iff_mem.mp hx') |
| 81 | + rw [← Ideal.mem_bot, ← h] |
| 82 | + apply Ideal.pow_mem_pow |
| 83 | + rw [← Ideal.Quotient.eq_zero_iff_mem, map_mul, hx', mul_zero] |
| 84 | + |
| 85 | +open scoped IntermediateField in |
| 86 | +lemma of_isSeparable [Algebra.IsSeparable K L] : FormallyEtale K L := by |
| 87 | + constructor |
| 88 | + intros B _ _ I h |
| 89 | + -- We shall show that any `f : L → B/I` can be lifted to `L → B` if `I^2 = ⊥`. |
| 90 | + -- But we already know that there exists a unique lift for every finite subfield of `L` |
| 91 | + -- by `of_isSeparable_aux`, so we can glue them all together. |
| 92 | + refine ⟨(FormallyUnramified.of_isSeparable K L).1 I h, ?_⟩ |
| 93 | + intro f |
| 94 | + have : ∀ k : L, ∃! g : K⟮k⟯ →ₐ[K] B, |
| 95 | + (Ideal.Quotient.mkₐ K I).comp g = f.comp (IsScalarTower.toAlgHom K _ L) := by |
| 96 | + intro k |
| 97 | + have := IsSeparable.of_algHom _ _ (IsScalarTower.toAlgHom K (K⟮k⟯) L) |
| 98 | + have := IntermediateField.adjoin.finiteDimensional |
| 99 | + (Algebra.IsSeparable.isSeparable K k).isIntegral |
| 100 | + have := FormallyEtale.of_isSeparable_aux K (K⟮k⟯) |
| 101 | + have := FormallyEtale.comp_bijective (R := K) (A := K⟮k⟯) I h |
| 102 | + exact this.existsUnique _ |
| 103 | + choose g hg₁ hg₂ using this |
| 104 | + have hg₃ : ∀ x y (h : x ∈ K⟮y⟯), g y ⟨x, h⟩ = g x (IntermediateField.AdjoinSimple.gen K x) := by |
| 105 | + intro x y h |
| 106 | + have e : K⟮x⟯ ≤ K⟮y⟯ := by |
| 107 | + rw [IntermediateField.adjoin_le_iff] |
| 108 | + rintro _ rfl |
| 109 | + exact h |
| 110 | + rw [← hg₂ _ ((g _).comp (IntermediateField.inclusion e))] |
| 111 | + · rfl |
| 112 | + apply AlgHom.ext |
| 113 | + intro ⟨a, _⟩ |
| 114 | + rw [← AlgHom.comp_assoc, hg₁, AlgHom.comp_assoc] |
| 115 | + simp |
| 116 | + have H : ∀ x y : L, ∃ α : L, x ∈ K⟮α⟯ ∧ y ∈ K⟮α⟯ := by |
| 117 | + intro x y |
| 118 | + have : FiniteDimensional K K⟮x, y⟯ := by |
| 119 | + apply IntermediateField.finiteDimensional_adjoin |
| 120 | + intro x _; exact (Algebra.IsSeparable.isSeparable K x).isIntegral |
| 121 | + have := IsSeparable.of_algHom _ _ (IsScalarTower.toAlgHom K (K⟮x, y⟯) L) |
| 122 | + obtain ⟨⟨α, hα⟩, e⟩ := Field.exists_primitive_element K K⟮x,y⟯ |
| 123 | + apply_fun (IntermediateField.map (IntermediateField.val _)) at e |
| 124 | + rw [IntermediateField.adjoin_map, ← AlgHom.fieldRange_eq_map] at e |
| 125 | + simp only [IntermediateField.coe_val, Set.image_singleton, |
| 126 | + IntermediateField.fieldRange_val] at e |
| 127 | + have hx : x ∈ K⟮α⟯ := e ▸ IntermediateField.subset_adjoin K {x, y} (by simp) |
| 128 | + have hy : y ∈ K⟮α⟯ := e ▸ IntermediateField.subset_adjoin K {x, y} (by simp) |
| 129 | + exact ⟨α, hx, hy⟩ |
| 130 | + refine ⟨⟨⟨⟨⟨fun x ↦ g x (IntermediateField.AdjoinSimple.gen K x), ?_⟩, ?_⟩, ?_, ?_⟩, ?_⟩, ?_⟩ |
| 131 | + · show g 1 1 = 1; rw [map_one] |
| 132 | + · intros x y |
| 133 | + obtain ⟨α, hx, hy⟩ := H x y |
| 134 | + simp only [← hg₃ _ _ hx, ← hg₃ _ _ hy, ← map_mul, ← hg₃ _ _ (mul_mem hx hy)] |
| 135 | + rfl |
| 136 | + · show g 0 0 = 0; rw [map_zero] |
| 137 | + · intros x y |
| 138 | + obtain ⟨α, hx, hy⟩ := H x y |
| 139 | + simp only [← hg₃ _ _ hx, ← hg₃ _ _ hy, ← map_add, ← hg₃ _ _ (add_mem hx hy)] |
| 140 | + rfl |
| 141 | + · intro r |
| 142 | + show g _ (algebraMap K _ r) = _ |
| 143 | + rw [AlgHom.commutes] |
| 144 | + · ext x |
| 145 | + simpa using AlgHom.congr_fun (hg₁ x) (IntermediateField.AdjoinSimple.gen K x) |
| 146 | + |
| 147 | +theorem iff_isSeparable [EssFiniteType K L] : |
| 148 | + FormallyEtale K L ↔ Algebra.IsSeparable K L := |
| 149 | + ⟨fun _ ↦ FormallyUnramified.isSeparable K L, fun _ ↦ of_isSeparable K L⟩ |
| 150 | + |
| 151 | +end Algebra.FormallyEtale |
0 commit comments