-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(RingTheory/HopfAlgebra): Hopf algebra structure on polynomials (πΎβ) #39410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RaggedR
wants to merge
15
commits into
leanprover-community:master
Choose a base branch
from
RaggedR:feat/polynomial-hopf-algebra
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
92978fb
some api
themathqueen d7ba9e3
fix
themathqueen 9033d8a
tiny change
themathqueen d31c934
feat(RingTheory/HopfAlgebra): Hopf algebra structure on polynomials (β¦
RaggedR 76dc8a3
fix: add module declaration for Lean 4.30.0 compatibility
RaggedR 8f2bf58
fix: add public section and remove unused simp args
RaggedR 7498f72
refactor: inline comul/counit AlgHom defs, fix where style, add toLinβ¦
RaggedR 8796ae3
refactor: add CoalgebraStruct instance, comul/counit def/apply lemmas
RaggedR be9776d
fix: add explicit type variables to glue lemmas
RaggedR 2572d75
refactor: CoalgebraStruct with named AlgHom defs, fix all proofs
RaggedR 71af120
Merge remote-tracking branch 'upstream/master' into feat/polynomial-hβ¦
RaggedR d363bbc
refactor: inline comul/counit in CoalgebraStruct instance
RaggedR a0825d5
refactor: remove comulAlgHom/counitAlgHom, inline aeval expressions
RaggedR dfdb81a
Merge remote-tracking branch 'upstream/master' into feat/polynomial-hβ¦
RaggedR 02512ac
refactor: apply review suggestions β simp lemmas, proof cleanup
RaggedR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,204 @@ | ||
| /- | ||
| Copyright (c) 2025 Robin Langer. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Robin Langer | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.RingTheory.HopfAlgebra.Basic | ||
| public import Mathlib.Algebra.Polynomial.AlgebraMap | ||
| public import Mathlib.Algebra.Polynomial.Eval.SMul | ||
| public import Mathlib.RingTheory.TensorProduct.Maps | ||
|
|
||
| /-! | ||
| # The Hopf algebra structure on polynomials (additive group scheme πΎβ) | ||
|
|
||
| The polynomial ring `R[X]` carries a natural Hopf algebra structure encoding the | ||
| additive group scheme `πΎβ`: | ||
| * comultiplication: `Ξ(X) = X β 1 + 1 β X` (encoding `p(x) β¦ p(x + x')`) | ||
| * counit: `Ξ΅(p) = p(0)` (evaluation at zero) | ||
| * antipode: `S(X) = -X` (requires `CommRing R`) | ||
|
|
||
| This is dual to the multiplicative group scheme `πΎβ` formalized via Laurent polynomials | ||
| in `Mathlib.RingTheory.HopfAlgebra.MonoidAlgebra`. | ||
|
|
||
| ## Main definitions | ||
|
|
||
| * `Polynomial.instCoalgebraStruct`: the `R`-coalgebra structure data on `R[X]`. | ||
| * `Polynomial.instCoalgebra`: the `R`-coalgebra instance on `R[X]` with additive | ||
| comultiplication. | ||
| * `Polynomial.instBialgebra`: the `R`-bialgebra structure on `R[X]`. | ||
| * `Polynomial.instHopfAlgebra`: the `R`-Hopf algebra structure on `R[X]` when `R` is a | ||
| commutative ring. | ||
|
|
||
| ## Implementation notes | ||
|
|
||
| The coalgebra axioms are equalities of linear maps out of `R[X]`. Since comultiplication | ||
| and counit are defined via `Polynomial.aeval`, each axiom reduces to checking on the | ||
| generator `X`, exploiting the universal property of the polynomial ring. | ||
|
|
||
| ## References | ||
|
|
||
| * Langer, R., *Determinantal bases and the symmetric group*, arXiv:0907.3950, Β§1.2 | ||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| noncomputable section | ||
|
|
||
| open Polynomial TensorProduct | ||
|
|
||
| open scoped Polynomial TensorProduct | ||
|
|
||
| namespace Polynomial | ||
|
|
||
| variable (R : Type*) [CommSemiring R] | ||
|
|
||
| /-! ### Coalgebra structure and instance -/ | ||
|
|
||
| /-- The `πΎβ` coalgebra structure on `R[X]`. -/ | ||
| instance instCoalgebraStruct : CoalgebraStruct R R[X] where | ||
| comul := (Polynomial.aeval ((X : R[X]) ββ 1 + 1 ββ (X : R[X]))).toLinearMap | ||
| counit := (Polynomial.aeval (0 : R)).toLinearMap | ||
|
|
||
| theorem comul_def : | ||
| (Coalgebra.comul : R[X] ββ[R] R[X] β[R] R[X]) = | ||
| (Polynomial.aeval ((X : R[X]) ββ 1 + 1 ββ (X : R[X]))).toLinearMap := rfl | ||
|
|
||
| theorem counit_def : | ||
| (Coalgebra.counit : R[X] ββ[R] R) = (Polynomial.aeval (0 : R)).toLinearMap := rfl | ||
|
|
||
| @[simp] | ||
| theorem comul_apply (p : R[X]) : | ||
| Coalgebra.comul (R := R) p = | ||
| Polynomial.aeval ((X : R[X]) ββ 1 + 1 ββ (X : R[X])) p := rfl | ||
|
|
||
| @[simp] | ||
| theorem counit_apply (p : R[X]) : | ||
| Coalgebra.counit (R := R) p = Polynomial.aeval (0 : R) p := rfl | ||
|
|
||
| -- Glue lemmas connecting rTensor/lTensor of AlgHom.toLinearMap to Algebra.TensorProduct.map | ||
| private theorem rTensor_toLinearMap_eq {A : Type*} [CommSemiring A] [Algebra R A] | ||
| (f : R[X] ββ[R] A) : | ||
| f.toLinearMap.rTensor R[X] = | ||
| (Algebra.TensorProduct.map f (AlgHom.id R R[X])).toLinearMap := by | ||
| ext x y; simp [LinearMap.rTensor_tmul] | ||
|
|
||
| private theorem lTensor_toLinearMap_eq {A : Type*} [CommSemiring A] [Algebra R A] | ||
| (f : R[X] ββ[R] A) : | ||
| f.toLinearMap.lTensor R[X] = | ||
| (Algebra.TensorProduct.map (AlgHom.id R R[X]) f).toLinearMap := by | ||
| ext x y; simp [LinearMap.lTensor_tmul] | ||
|
|
||
| /-- The `πΎβ` coalgebra instance on `R[X]`. -/ | ||
| instance instCoalgebra : Coalgebra R R[X] where | ||
| rTensor_counit_comp_comul := by | ||
| rw [counit_def, comul_def, rTensor_toLinearMap_eq, β AlgHom.comp_toLinearMap, | ||
| β AlgebraTensorModule.mk_eq, β Algebra.TensorProduct.toLinearMap_includeRight] | ||
| congr 1; apply Polynomial.algHom_ext | ||
| simp | ||
| lTensor_counit_comp_comul := by | ||
| rw [counit_def, comul_def, lTensor_toLinearMap_eq, β AlgHom.comp_toLinearMap, | ||
| β AlgebraTensorModule.mk_eq, β Algebra.TensorProduct.toLinearMap_includeLeft] | ||
| congr 1; apply Polynomial.algHom_ext | ||
| simp | ||
| coassoc := by | ||
| rw [comul_def, rTensor_toLinearMap_eq, lTensor_toLinearMap_eq] | ||
| apply LinearMap.ext; intro p | ||
| simp only [LinearMap.comp_apply, AlgHom.toLinearMap_apply, LinearEquiv.coe_coe] | ||
| induction p using Polynomial.induction_on' with | ||
| | add p q hp hq => simp only [map_add] at hp hq β’; rw [hp, hq] | ||
| | monomial n r => | ||
| have hassoc : β x, (TensorProduct.assoc R R[X] R[X] R[X]) x = | ||
| (Algebra.TensorProduct.assoc R R R[X] R[X] R[X] R[X]) x := fun _ => rfl | ||
| simp [β C_mul_X_pow_eq_monomial, hassoc, Algebra.TensorProduct.one_def, | ||
| TensorProduct.add_tmul, TensorProduct.tmul_add, add_assoc] | ||
|
|
||
| /-! ### Bialgebra instance -/ | ||
|
|
||
| /-- The `πΎβ` bialgebra instance on `R[X]`. -/ | ||
| instance instBialgebra : Bialgebra R R[X] := | ||
| Bialgebra.mk' R R[X] | ||
| (by simp [counit_apply]) | ||
| (fun {a b} => by simp [counit_apply, map_mul]) | ||
| (by simp [comul_apply]) | ||
| (fun {a b} => by simp [comul_apply, map_mul]) | ||
|
|
||
| end Polynomial | ||
|
|
||
| end -- end CommSemiring section | ||
|
|
||
| /-! ### Hopf algebra instance -/ | ||
|
|
||
| noncomputable section | ||
|
|
||
| open Polynomial TensorProduct | ||
|
|
||
| open scoped Polynomial TensorProduct | ||
|
|
||
| namespace Polynomial | ||
|
|
||
| variable (R : Type*) [CommRing R] | ||
|
|
||
| /-- The antipode on `R[X]` for the additive group scheme `πΎβ`: | ||
| the unique `R`-algebra homomorphism sending `X β¦ -X`. -/ | ||
| def antipodeAlgHom : R[X] ββ[R] R[X] := | ||
| Polynomial.aeval (-X : R[X]) | ||
|
|
||
| @[simp] | ||
| theorem antipodeAlgHom_X : | ||
| antipodeAlgHom R (X : R[X]) = -X := by | ||
| simp [antipodeAlgHom] | ||
|
|
||
| @[simp] | ||
| theorem antipodeAlgHom_C (r : R) : | ||
| antipodeAlgHom R (C r) = C r := by | ||
| simp [antipodeAlgHom] | ||
|
|
||
| /-- The `πΎβ` Hopf algebra instance on `R[X]` (requires `CommRing R` for the antipode | ||
| `S(X) = -X`). The antipode axiom `m β (S β id) β Ξ = Ξ· β Ξ΅` holds because both sides | ||
| send `X` to `0`: `S(X) Β· 1 + 1 Β· X = -X + X = 0 = C(Ξ΅(X))`. -/ | ||
| instance instHopfAlgebra : HopfAlgebra R R[X] where | ||
| antipode := (antipodeAlgHom R).toLinearMap | ||
| mul_antipode_rTensor_comul := by | ||
| have rTensor_eq : (antipodeAlgHom R).toLinearMap.rTensor R[X] = | ||
| (Algebra.TensorProduct.map (antipodeAlgHom R) | ||
| (AlgHom.id R R[X])).toLinearMap := by | ||
| ext x y; simp [LinearMap.rTensor_tmul] | ||
| dsimp only [Coalgebra.comul, Coalgebra.counit, CoalgebraStruct.comul, | ||
| CoalgebraStruct.counit, Polynomial.instCoalgebraStruct] | ||
| rw [rTensor_eq, β Algebra.TensorProduct.lmul'_toLinearMap, | ||
| β AlgHom.comp_toLinearMap, β AlgHom.comp_toLinearMap] | ||
| have key : (Algebra.TensorProduct.lmul' R).comp | ||
| ((Algebra.TensorProduct.map (antipodeAlgHom R) (AlgHom.id R R[X])).comp | ||
| (Polynomial.aeval ((X : R[X]) ββ 1 + 1 ββ (X : R[X])))) = | ||
| (Algebra.ofId R R[X]).comp (Polynomial.aeval (0 : R)) := | ||
| Polynomial.algHom_ext (by | ||
| simp [antipodeAlgHom, | ||
| Algebra.TensorProduct.map_tmul, Algebra.TensorProduct.lmul'_apply_tmul, | ||
| Algebra.ofId_apply]) | ||
| rw [key, AlgHom.comp_toLinearMap] | ||
| ext p; simp [Algebra.linearMap_apply, Algebra.ofId_apply] | ||
| mul_antipode_lTensor_comul := by | ||
| have lTensor_eq : (antipodeAlgHom R).toLinearMap.lTensor R[X] = | ||
| (Algebra.TensorProduct.map (AlgHom.id R R[X]) | ||
| (antipodeAlgHom R)).toLinearMap := by | ||
| ext x y; simp [LinearMap.lTensor_tmul] | ||
| dsimp only [Coalgebra.comul, Coalgebra.counit, CoalgebraStruct.comul, | ||
| CoalgebraStruct.counit, Polynomial.instCoalgebraStruct] | ||
| rw [lTensor_eq, β Algebra.TensorProduct.lmul'_toLinearMap, | ||
| β AlgHom.comp_toLinearMap, β AlgHom.comp_toLinearMap] | ||
| have key : (Algebra.TensorProduct.lmul' R).comp | ||
| ((Algebra.TensorProduct.map (AlgHom.id R R[X]) (antipodeAlgHom R)).comp | ||
| (Polynomial.aeval ((X : R[X]) ββ 1 + 1 ββ (X : R[X])))) = | ||
| (Algebra.ofId R R[X]).comp (Polynomial.aeval (0 : R)) := | ||
| Polynomial.algHom_ext (by | ||
| simp [antipodeAlgHom, | ||
| Algebra.TensorProduct.map_tmul, Algebra.TensorProduct.lmul'_apply_tmul, | ||
| Algebra.ofId_apply]) | ||
| rw [key, AlgHom.comp_toLinearMap] | ||
| ext p; simp [Algebra.linearMap_apply, Algebra.ofId_apply] | ||
|
|
||
| end Polynomial | ||
|
|
||
| end | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you make both these
simplemmas, then you wouldn't needcomul_X,comul_C,counit_X,counit_C.