Skip to content

Commit f30f4b1

Browse files
committed
feat(Algebra/QuadraticAlgebra): injectivity and surjectivity of lift (#42439)
Add API for the algebra map `QuadraticAlgebra.lift`: * `range_lift`: its range is the subalgebra generated by `u`; * `lift_surjective_iff`: surjective iff `u` generates the algebra; * `lift_injective_iff`: injective iff `1` and `u` are linearly independent. Also add the basis decomposition `re_smul_add_im_smul` (used to golf `algHom_ext`) and `adjoin_omega_eq_top`.
1 parent f9314f8 commit f30f4b1

1 file changed

Lines changed: 35 additions & 2 deletions

File tree

Mathlib/Algebra/QuadraticAlgebra/Basic.lean

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ Authors: Antoine Chambert-Loir
55
-/
66
module
77

8+
public import Mathlib.Algebra.Algebra.Subalgebra.Lattice
89
public import Mathlib.Algebra.QuadraticAlgebra.Defs
910
public import Mathlib.Algebra.Star.Unitary
11+
public import Mathlib.Tactic.FieldSimp.Lemmas
1012

1113
import Mathlib.Tactic.FieldSimp
1214

@@ -112,8 +114,9 @@ variable {A : Type*} [Ring A] [Algebra R A]
112114
@[ext]
113115
theorem algHom_ext {f g : QuadraticAlgebra R a b →ₐ[R] A}
114116
(h : f ω = g ω) : f = g := by
115-
ext ⟨x, y⟩
116-
simp [mk_eq_add_smul_omega, h]
117+
refine AlgHom.ext fun z ↦ ?_
118+
rw [← re_smul_add_im_smul z]
119+
simp [h]
117120

118121
/-- The unique `AlgHom` from `QuadraticAlgebra R a b` to an `R`-algebra `A`,
119122
constructed by replacing `ω` with the provided root.
@@ -164,8 +167,38 @@ def lift : { u : A // u * u = a • 1 + b • u } ≃ (QuadraticAlgebra R a b
164167
ext
165168
simp
166169

170+
/-- A quadratic algebra is generated by `ω`. -/
171+
theorem adjoin_omega_eq_top : Algebra.adjoin R {(ω : QuadraticAlgebra R a b)} = ⊤ :=
172+
Algebra.eq_top_iff.mpr fun z ↦
173+
re_smul_add_im_smul z ▸ add_mem (Subalgebra.smul_mem _ (one_mem _) _)
174+
(Subalgebra.smul_mem _ (Algebra.self_mem_adjoin_singleton R ω) _)
175+
176+
/-- The range of `lift ⟨u, h⟩` is the subalgebra of `A` generated by `u`. -/
177+
theorem range_lift {u : A} (h : u * u = a • 1 + b • u) :
178+
(lift ⟨u, h⟩).range = Algebra.adjoin R {u} := by
179+
rw [← Algebra.map_top, ← adjoin_omega_eq_top, AlgHom.map_adjoin_singleton]
180+
simp
181+
182+
/-- `lift ⟨u, h⟩` is surjective iff `u` generates `A` as an `R`-algebra. -/
183+
theorem lift_surjective_iff {u : A} (h : u * u = a • 1 + b • u) :
184+
Function.Surjective (lift ⟨u, h⟩) ↔ Algebra.adjoin R {u} = ⊤ := by
185+
rw [← AlgHom.range_eq_top, range_lift]
186+
167187
end omega
168188

189+
section lift
190+
191+
variable [CommRing R] {A : Type*} [Ring A] [Algebra R A]
192+
193+
/-- `lift ⟨u, h⟩` is injective iff `1` and `u` are `R`-linearly independent. -/
194+
theorem lift_injective_iff {u : A} (h : u * u = a • 1 + b • u) :
195+
Function.Injective (lift ⟨u, h⟩) ↔ LinearIndependent R ![1, u] := by
196+
rw [LinearIndependent.pair_iff, injective_iff_map_eq_zero]
197+
refine ⟨fun hlift s t hst ↦ ?_, fun hlift z hz ↦ by ext <;> simp [hlift z.re z.im hz]⟩
198+
simpa using QuadraticAlgebra.ext_iff.mp (hlift ⟨s, t⟩ (by rwa [lift_apply_apply]))
199+
200+
end lift
201+
169202
section star
170203

171204
variable [CommRing R]

0 commit comments

Comments
 (0)