Skip to content

Commit 62d838a

Browse files
committed
feat(RingTheory/HopfAlgebra): primitive-generated construction toolkit
1 parent 3ed173e commit 62d838a

5 files changed

Lines changed: 339 additions & 3 deletions

File tree

Mathlib.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6346,6 +6346,7 @@ public import Mathlib.RingTheory.Bialgebra.Equiv
63466346
public import Mathlib.RingTheory.Bialgebra.GroupLike
63476347
public import Mathlib.RingTheory.Bialgebra.Hom
63486348
public import Mathlib.RingTheory.Bialgebra.MonoidAlgebra
6349+
public import Mathlib.RingTheory.Bialgebra.Primitive
63496350
public import Mathlib.RingTheory.Bialgebra.TensorProduct
63506351
public import Mathlib.RingTheory.Binomial
63516352
public import Mathlib.RingTheory.ChainOfDivisors
@@ -6354,6 +6355,7 @@ public import Mathlib.RingTheory.Coalgebra.Basic
63546355
public import Mathlib.RingTheory.Coalgebra.CoassocSimps
63556356
public import Mathlib.RingTheory.Coalgebra.Convolution
63566357
public import Mathlib.RingTheory.Coalgebra.Equiv
6358+
public import Mathlib.RingTheory.Coalgebra.Graded
63576359
public import Mathlib.RingTheory.Coalgebra.GroupLike
63586360
public import Mathlib.RingTheory.Coalgebra.Hom
63596361
public import Mathlib.RingTheory.Coalgebra.MonoidAlgebra
@@ -6498,6 +6500,7 @@ public import Mathlib.RingTheory.Henselian
64986500
public import Mathlib.RingTheory.HopfAlgebra.Basic
64996501
public import Mathlib.RingTheory.HopfAlgebra.GroupLike
65006502
public import Mathlib.RingTheory.HopfAlgebra.MonoidAlgebra
6503+
public import Mathlib.RingTheory.HopfAlgebra.Primitive
65016504
public import Mathlib.RingTheory.HopfAlgebra.TensorProduct
65026505
public import Mathlib.RingTheory.HopkinsLevitzki
65036506
public import Mathlib.RingTheory.Ideal.AssociatedPrime.Basic
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/-
2+
Copyright (c) 2026 Robert Hawkins. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Robert Hawkins
5+
-/
6+
module
7+
8+
public import Mathlib.RingTheory.Bialgebra.Basic
9+
10+
/-!
11+
# Primitive elements in a bialgebra
12+
13+
This file defines primitive elements in a bialgebra, i.e. elements `a` such that
14+
`Δ a = a ⊗ 1 + 1 ⊗ a` and `ε a = 0`.
15+
16+
## Main declarations
17+
18+
* `IsPrimitiveElem`: Predicate for an element in a bialgebra to be primitive.
19+
* `primitiveSubmodule`: The submodule of primitive elements.
20+
-/
21+
22+
@[expose] public section
23+
24+
open Coalgebra Bialgebra TensorProduct
25+
26+
variable {R A : Type*}
27+
28+
section Semiring
29+
variable [CommSemiring R] [Semiring A] [Bialgebra R A] {a b : A}
30+
31+
variable (R) in
32+
/-- An element `a` of a bialgebra is *primitive* if `Δ a = a ⊗ 1 + 1 ⊗ a` and `ε a = 0`. -/
33+
@[mk_iff]
34+
structure IsPrimitiveElem (a : A) : Prop where
35+
/-- A primitive element `a` satisfies `Δ a = a ⊗ 1 + 1 ⊗ a`. -/
36+
comul_eq_tmul_one_add_one_tmul : comul a = a ⊗ₜ[R] 1 + 1 ⊗ₜ[R] a
37+
/-- A primitive element `a` satisfies `ε a = 0`. -/
38+
counit_eq_zero : counit (R := R) a = 0
39+
40+
attribute [simp] IsPrimitiveElem.counit_eq_zero
41+
42+
@[simp] lemma IsPrimitiveElem.zero : IsPrimitiveElem R (0 : A) where
43+
comul_eq_tmul_one_add_one_tmul := by
44+
simp only [map_zero, zero_tmul, tmul_zero, add_zero]
45+
counit_eq_zero := map_zero _
46+
47+
lemma IsPrimitiveElem.add (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
48+
IsPrimitiveElem R (a + b) where
49+
comul_eq_tmul_one_add_one_tmul := by
50+
rw [map_add, ha.comul_eq_tmul_one_add_one_tmul, hb.comul_eq_tmul_one_add_one_tmul,
51+
add_tmul, tmul_add]; abel
52+
counit_eq_zero := by rw [map_add, ha.counit_eq_zero, hb.counit_eq_zero, add_zero]
53+
54+
lemma IsPrimitiveElem.smul (ha : IsPrimitiveElem R a) (r : R) :
55+
IsPrimitiveElem R (r • a) where
56+
comul_eq_tmul_one_add_one_tmul := by
57+
have h1 : r • (a ⊗ₜ[R] (1 : A)) = (r • a) ⊗ₜ[R] (1 : A) := smul_tmul' r a 1
58+
have h2 : r • ((1 : A) ⊗ₜ[R] a) = (1 : A) ⊗ₜ[R] (r • a) := (tmul_smul r 1 a).symm
59+
rw [LinearMap.map_smul, ha.comul_eq_tmul_one_add_one_tmul, smul_add, h1, h2]
60+
counit_eq_zero := by rw [LinearMap.map_smul, ha.counit_eq_zero, smul_zero]
61+
62+
variable (R A) in
63+
/-- The primitive elements form a submodule. -/
64+
def primitiveSubmodule : Submodule R A where
65+
carrier := {a | IsPrimitiveElem R a}
66+
add_mem' := IsPrimitiveElem.add
67+
zero_mem' := .zero
68+
smul_mem' r _ ha := ha.smul r
69+
70+
@[simp] lemma mem_primitiveSubmodule {a : A} :
71+
a ∈ primitiveSubmodule R A ↔ IsPrimitiveElem R a := Iff.rfl
72+
73+
end Semiring
74+
75+
section Ring
76+
variable [CommRing R] [Ring A] [Bialgebra R A] {a : A}
77+
78+
lemma IsPrimitiveElem.neg (ha : IsPrimitiveElem R a) : IsPrimitiveElem R (-a) where
79+
comul_eq_tmul_one_add_one_tmul := by
80+
rw [map_neg, ha.comul_eq_tmul_one_add_one_tmul, neg_add, neg_tmul, tmul_neg]
81+
counit_eq_zero := by rw [map_neg, ha.counit_eq_zero, neg_zero]
82+
83+
lemma IsPrimitiveElem.sub (ha : IsPrimitiveElem R a) {b : A} (hb : IsPrimitiveElem R b) :
84+
IsPrimitiveElem R (a - b) := by
85+
rw [sub_eq_add_neg]; exact ha.add hb.neg
86+
87+
end Ring
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/-
2+
Copyright (c) 2026 Robert Hawkins. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Robert Hawkins
5+
-/
6+
module
7+
8+
public import Mathlib.RingTheory.Coalgebra.Basic
9+
public import Mathlib.RingTheory.GradedAlgebra.Basic
10+
11+
/-!
12+
# Graded coalgebras
13+
14+
A coalgebra `A` over `R` is *graded* by a family of submodules `𝒜 : ι → Submodule R A`,
15+
forming a direct-sum decomposition, if the comultiplication respects the grading:
16+
`Δ(𝒜 n) ⊆ ⨆_{p+q=n} 𝒜 p ⊗ 𝒜 q`.
17+
18+
## Main declarations
19+
20+
* `GradedCoalgebra`: Predicate for a coalgebra to be graded.
21+
22+
## Implementation notes
23+
24+
The condition is stated as membership in an `iSup` of submodules rather than via a direct-sum
25+
decomposition of `A ⊗ A`, because the latter would require constructing an `ι × ι`-graded
26+
decomposition of `A ⊗[R] A` (or factoring through the diagonal `p + q = n`-graded version).
27+
The `iSup` form is what consumers typically unpack via `Submodule.mem_iSup_iff_exists_dfinsupp`.
28+
29+
This file introduces the typeclass ahead of its main downstream consumer, a graded-connected
30+
antipode existence theorem `HopfAlgebra.ofGradedConnected`. The standard examples
31+
(`TensorAlgebra`, `FreeAlgebra`, `SymmetricAlgebra`, `ExteriorAlgebra`) are all graded coalgebras
32+
by `ℕ`.
33+
34+
## TODO
35+
36+
* Provide instances on `TensorAlgebra` and other free constructions.
37+
* `HopfAlgebra.ofGradedConnected` — given `[GradedCoalgebra 𝒜]` together with a connectedness
38+
condition `𝒜 0 = R · 1`, construct the antipode recursively on degree.
39+
-/
40+
41+
@[expose] public section
42+
43+
open Coalgebra TensorProduct DirectSum
44+
45+
variable {R A ι : Type*} [CommSemiring R]
46+
[AddCommMonoid A] [Module R A] [Coalgebra R A]
47+
[DecidableEq ι] [AddMonoid ι]
48+
49+
/-- A coalgebra is *graded* by `𝒜 : ι → Submodule R A` if the comultiplication respects
50+
the grading: `Δ(𝒜 n) ⊆ ⨆_{p+q=n} 𝒜 p ⊗ 𝒜 q`. -/
51+
class GradedCoalgebra (𝒜 : ι → Submodule R A) [DirectSum.Decomposition 𝒜] : Prop where
52+
/-- The comultiplication takes degree-`n` elements to the sum of `𝒜 p ⊗ 𝒜 q` over `p + q = n`. -/
53+
comul_mem : ∀ {n : ι} {x : A}, x ∈ 𝒜 n →
54+
Coalgebra.comul (R := R) x ∈
55+
⨆ p : ι, ⨆ q : ι, ⨆ (_ : p + q = n),
56+
LinearMap.range (TensorProduct.map (𝒜 p).subtype (𝒜 q).subtype)

Mathlib/RingTheory/HopfAlgebra/Basic.lean

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ In this file we define `HopfAlgebra`, and provide instances for:
1919
2020
* `HopfAlgebra R A` : the Hopf algebra structure on an `R`-bialgebra `A`.
2121
* `HopfAlgebra.antipode` : the `R`-linear map `A →ₗ[R] A`.
22+
* `HopfAlgebra.ofAlgHom` : construct a Hopf algebra structure from an algebra hom
23+
`A →ₐ[R] Aᵐᵒᵖ` satisfying the antipode identities.
2224
2325
## Main results
2426
2527
* `HopfAlgebra.antipode_one` : the antipode of the unit is the unit.
2628
* `HopfAlgebra.antipode_mul` : the antipode is an antihomomorphism: `S(ab) = S(b)S(a)`.
29+
* `HopfAlgebra.antipode_unique` : the antipode is uniquely determined by the underlying bialgebra
30+
structure.
2731
2832
## TODO
2933
30-
* Uniqueness of Hopf algebra structure on a bialgebra (i.e. if the algebra and coalgebra structures
31-
agree then the antipodes must also agree).
32-
3334
* If `A` is commutative then `antipode` is an algebra homomorphism.
3435
3536
* If `A` is commutative then `antipode` is necessarily a bijection and its square is
@@ -38,6 +39,8 @@ In this file we define `HopfAlgebra`, and provide instances for:
3839
(Note that all three facts have been proved for Hopf bimonoids in an arbitrary braided category,
3940
so we could deduce the facts here from an equivalence `HopfAlgCat R ≌ Hopf (ModuleCat R)`.)
4041
42+
* A graded connected bialgebra admits a unique antipode.
43+
4144
## References
4245
4346
* <https://en.wikipedia.org/wiki/Hopf_algebra>
@@ -75,6 +78,26 @@ namespace HopfAlgebra
7578

7679
export HopfAlgebraStruct (antipode)
7780

81+
section Bialgebra
82+
variable {R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Bialgebra R A]
83+
84+
open Coalgebra WithConv
85+
86+
/-! ### Uniqueness of the antipode -/
87+
88+
/-- If `S₁` and `S₂` are left and right convolution inverses of the identity, then `S₁ = S₂`. -/
89+
theorem antipode_unique {S₁ S₂ : A →ₗ[R] A}
90+
(h₁ : LinearMap.mul' R A ∘ₗ S₁.rTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit)
91+
(h₂ : LinearMap.mul' R A ∘ₗ S₂.lTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit) :
92+
S₁ = S₂ := by
93+
refine toConv_injective <| left_inv_eq_right_inv
94+
(a := toConv LinearMap.id) (b := toConv S₁) (c := toConv S₂) ?_ ?_
95+
· exact WithConv.ext h₁
96+
· exact WithConv.ext h₂
97+
98+
end Bialgebra
99+
100+
section Semiring
78101
variable {R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [HopfAlgebra R A] {a : A}
79102

80103
@[simp]
@@ -211,6 +234,44 @@ theorem antipode_mul (a b : A) :
211234
_ = (counit (R := R) y • counit x) • (1 : A) := by
212235
simp only [smul_eq_mul, mul_comm (counit y)]
213236

237+
/-! ### Antipode as unique convolution inverse -/
238+
239+
/-- The antipode is the unique left convolution inverse of the identity. -/
240+
theorem eq_antipode_of_mul_rTensor_comul {S : A →ₗ[R] A}
241+
(h : LinearMap.mul' R A ∘ₗ S.rTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit) :
242+
S = antipode R :=
243+
antipode_unique h mul_antipode_lTensor_comul
244+
245+
/-- The antipode is the unique right convolution inverse of the identity. -/
246+
theorem eq_antipode_of_mul_lTensor_comul {S : A →ₗ[R] A}
247+
(h : LinearMap.mul' R A ∘ₗ S.lTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit) :
248+
S = antipode R :=
249+
(antipode_unique mul_antipode_rTensor_comul h).symm
250+
251+
end Semiring
252+
253+
end HopfAlgebra
254+
255+
namespace HopfAlgebra
256+
257+
variable {R A : Type*} [CommSemiring R] [Semiring A] [Bialgebra R A]
258+
259+
open Coalgebra MulOpposite
260+
261+
/-- Upgrade a bialgebra to a Hopf algebra by specifying the antipode as an algebra map
262+
`A →ₐ[R] Aᵐᵒᵖ` with appropriate conditions. -/
263+
noncomputable abbrev ofAlgHom (antipode : A →ₐ[R] Aᵐᵒᵖ)
264+
(mul_antipode_rTensor_comul :
265+
LinearMap.mul' R A ∘ₗ ((opLinearEquiv R).symm.toLinearMap ∘ₗ
266+
antipode.toLinearMap).rTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit)
267+
(mul_antipode_lTensor_comul :
268+
LinearMap.mul' R A ∘ₗ ((opLinearEquiv R).symm.toLinearMap ∘ₗ
269+
antipode.toLinearMap).lTensor A ∘ₗ comul = Algebra.linearMap R A ∘ₗ counit) :
270+
HopfAlgebra R A where
271+
antipode := (opLinearEquiv R).symm.toLinearMap ∘ₗ antipode.toLinearMap
272+
mul_antipode_rTensor_comul := mul_antipode_rTensor_comul
273+
mul_antipode_lTensor_comul := mul_antipode_lTensor_comul
274+
214275
end HopfAlgebra
215276

216277
namespace CommSemiring

0 commit comments

Comments
 (0)