feat(LinearAlgebra/TensorAlgebra): implement HopfAlgebra for TensorAlgebra#31898
feat(LinearAlgebra/TensorAlgebra): implement HopfAlgebra for TensorAlgebra#31898ntapiam wants to merge 25 commits into
Conversation
|
-awaiting-author |
PR summary 0a01e3ed11Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
kckennylau
left a comment
There was a problem hiding this comment.
The review is not finished (there's still a very long proof that I haven't gone over), but I think I've pointed out enough things to fix for the moment. Please ping me (@kenny Lau) on Zulip when you're done.
| /-- Antipode in `TensorAlgebra R M` as an algebra map. -/ | ||
| def antipode : T[M] →ₗ[R] T[M] := (MulOpposite.opLinearEquiv R).symm.comp | ||
| (lift R ((MulOpposite.opLinearEquiv R).comp (-(ι R)))).toLinearMap |
There was a problem hiding this comment.
(MulOpposite.opLinearEquiv R): but R is commutative?
There was a problem hiding this comment.
MulOpposite.opLinearEquiv R has implicit parameter {N} [AddCommMonoid N] [Module R N] so it is actually of type T[M] →ₗ[R] T[M]
There was a problem hiding this comment.
I don't think you understood my point. What I meant is that R is commutative so MulOpposite.opLinearEquiv R is just the identity map.
There was a problem hiding this comment.
I think I'm wrong here, it seems like you wanted to do MulOpposite for T[M].
| simp | ||
|
|
||
| @[simp] | ||
| lemma antipode_ι_apply (x : M) : antipode R ((ι R) x) = -(ι R) x := by |
There was a problem hiding this comment.
If this is true, doesn't it mean that the antipode is just negation? In this case, it would just be LinearEquiv.neg.
There was a problem hiding this comment.
This holds only on the image of ι R. For example
antipode R (ι R x * ι R y) = ι R y * ι R xIn general, for x in T[M]
antipode R ((tprod R M n) x) = (-1)^n • (tprod R M n) (fun i => x (n - i))
so there's an alternating minus sings and a reversal. I'm not sure if this is the best way to write it.
|
Also, welcome to Mathlib! I hope that this PR will teach you a lot about how to write better Lean/Mathlib code. |
YaelDillies
left a comment
There was a problem hiding this comment.
I'm confused: Aren't you duplicating the content of Mathlib.RingTheory.HopfAlgebra.TensorProduct? Also, just so you know, there's more Hopf algebra material in Toric that's currently being upstreamed.
|
Thanks you both for your comments!
@YaelDillies I think this is different as, as far as I understand, the file you mention proves that the tensor product of two Hopf algebras is again a Hopf algebra, while here I'm showing that the tensor algebra itself is a Hopf algebra where the coproduct is naturally induced by its freeness as an algebra (lift of (x : M) → ι R x ⊗ₜ[R] 1 + 1 ⊗ₜ[R] ι R x). I'm not sure that this can be deduced from It may be interesting to add those results to The reason I'm interested in this particular structure is that it–and its dual, the shuffle algebra–appears very frequently in my field (rough paths). |
|
Ah yes, thank you for the clarification. I would put this in |
|
I could move it to a new file after the review is done. In this file, at some point I tried defining it as |
|
-awaiting-author |
| open Algebra Bialgebra Coalgebra in | ||
| instance instHopfAlgebra : HopfAlgebra R T[M] where | ||
| antipode := antipode R | ||
| mul_antipode_rTensor_comul := by |
There was a problem hiding this comment.
Why is the proof of this so long? Can you explain why this proof is difficult?
There was a problem hiding this comment.
This may be due in part to my own incompetence with Lean/Mathlib, apologies.
The more straightforward proof uses that if A is generated as an algebra by its primitive elements, then then antipode is the unique anti alg hom such that antipode R x = -x for all primitive elements.
This is exactly the case here, but I don't know if such a result is available in Mathlib or how to use them.
Short of that, the pen-and-paper proof I know, which I tried to reproduce here (see image below), makes heavy use of Sweedler's notation, and the inductive nature of the Tensor Algebra. It then involves some juggling around with products such as the little assoc4 lemma in the proof.
Maybe this could be simplified, I tried my best.
There was a problem hiding this comment.
Could you try doing the proof involving primitive elements, to compare?
There was a problem hiding this comment.
The argument is more abstract. If you know there is an antipode (in this case there is by graded connectedness), it must satisfy antipode R x = -x for all primitives. The tensor algebra is generated as an algebra by the image of ι R which is a submodule of the module of primitive elements. Therefore, any linear map f : M →ₗ[R] T[M] satisfying f ∘ₗ ι R = -ι R must be the antipode.
This argument bypasses showing the required identity altogether, so I'm not sure how difficult it would be to implement it in Mathlib.
There was a problem hiding this comment.
Try it, and come back to us if/when you get stuck 😉
|
-awaiting-author |
kckennylau
left a comment
There was a problem hiding this comment.
Again I have not touched your long proof yet, because we haven't cleared up the definitions before.
| /-- Antipode in `TensorAlgebra R M` as an algebra map. -/ | ||
| def antipode : T[M] →ₗ[R] T[M] := (MulOpposite.opLinearEquiv R).symm.comp | ||
| (lift R ((MulOpposite.opLinearEquiv R).comp (-(ι R)))).toLinearMap |
There was a problem hiding this comment.
I don't think you understood my point. What I meant is that R is commutative so MulOpposite.opLinearEquiv R is just the identity map.
| instance instBialgebra : Bialgebra R T[M] := Bialgebra.ofAlgHom (comul R) algebraMapInv | ||
| (by ext; simpa [comul, Algebra.TensorProduct.one_def, add_tmul, tmul_add] using by abel) | ||
| (by ext; simp [comul, algebraMapInv]) | ||
| (by ext; simp [comul, algebraMapInv]) |
There was a problem hiding this comment.
| instance instBialgebra : Bialgebra R T[M] := Bialgebra.ofAlgHom (comul R) algebraMapInv | |
| (by ext; simpa [comul, Algebra.TensorProduct.one_def, add_tmul, tmul_add] using by abel) | |
| (by ext; simp [comul, algebraMapInv]) | |
| (by ext; simp [comul, algebraMapInv]) | |
| instance instBialgebra : Bialgebra R T[M] := Bialgebra.ofAlgHom (comul R) algebraMapInv | |
| (by ext; simpa [Algebra.TensorProduct.one_def, add_tmul, tmul_add] using by abel) | |
| (by ext; simp) | |
| (by ext; simp) |
Since you have the simp lemmas above, you don't need to unfold them here anymore.
There was a problem hiding this comment.
for some reason I can't get it to accept just simp but I have to do simp [comul] for it to unfold the definition.
| The comultiplication is the unique algebra map satisfying `comul (ι R x) = ι R x ⊗ 1 + 1 ⊗ ι R | ||
| x` for all `x : M`, and `algebraMapInv` acts as the counit. |
There was a problem hiding this comment.
Can you add lemmas stating these?
There was a problem hiding this comment.
I added a lemma for comul. The ones for algebraMapInv should be Bialgebra.counit_*
|
This pull request has conflicts, please merge |
@ntapiam @YaelDillies @kckennylau: I opened #39785 and #39841 which lift this Sweedler proof to a general |
Generalize `ofAlgHom` to take `A →ₐ[R] Aᵐᵒᵖ` (non-commutative case via the opposite ring), and add `rTensor/lTensorAntipodeEqualizer` subalgebras + `mul_*_comul_eq_of_mem_adjoin` corollaries that let consumers verify the antipode axiom on a generating set (Takeuchi 1971, Lemma 1). Motivates leanprover-community#31898: the TensorAlgebra Hopf instance reduces from a ~100-line Sweedler proof to a ~16-line application of the new API.
…via the quotient `SymmetricAlgebra R M` is `RingQuot SymRel`, so its bialgebra and Hopf algebra instances are inherited from `TensorAlgebra R M` through the quotient construction: `SymRel` satisfies `IsBialgebraRel`/`IsHopfRel`, with the relation conditions following from commutativity of the quotient. Replaces the direct `ofAlgHom` constructions. (Branch carries its dependencies leanprover-community#39790 and leanprover-community#31898 -- the latter built via `HopfAlgebra.ofPrimitives` and generalized to `[AddCommMonoid M]` -- until they land on master, at which point this rebases to the two `SymmetricAlgebra` files.)
The antipode of a Hopf algebra is [generally](https://arxiv.org/pdf/1409.8356) the two-sided inverse of the identity in the convolution algebra `End(A)`. When `A` is commutative, algebra homs are closed under convolution and this lifts to AlgHom equality. See [this comment](#31898 (comment)) on #31898.
…over-community#39785) The antipode of a Hopf algebra is [generally](https://arxiv.org/pdf/1409.8356) the two-sided inverse of the identity in the convolution algebra `End(A)`. When `A` is commutative, algebra homs are closed under convolution and this lifts to AlgHom equality. See [this comment](leanprover-community#31898 (comment)) on leanprover-community#31898.
…over-community#39785) The antipode of a Hopf algebra is [generally](https://arxiv.org/pdf/1409.8356) the two-sided inverse of the identity in the convolution algebra `End(A)`. When `A` is commutative, algebra homs are closed under convolution and this lifts to AlgHom equality. See [this comment](leanprover-community#31898 (comment)) on leanprover-community#31898.
implementation of the natural Hopf algebra structure on the TensorAlgebra