Commit 2024-04-05 00:53 8b50609c
View on Github →feat: MulActionHom in the semilinear style (#6057)
Generalize MulActionHom so that it allows two different monoids acting, related by a morphism. This is inspired by the treatment of (semi)linear maps in mathlib, and allows to refactor them.
Let M, N, X, Y be types, with SMul M X and SMul N Y, and let φ : M → N be a map.
MulActionHom φ X Y, the type of equivariant functions fromXtoY, consists of functionsf : X → Ysuch thatf (m • x) = (φ m) • (f x)for allm : Mandx : X. Assume that we haveMonoid M,Monoid Nand thatφ : M →* N. ForA,Bby types withAddMonoid AandAddMonoid B, endowed withDistribMulAction M AandDistribMulAction M B:DistribMulActionHom φ A Bis the type of equivariant additive monoid homomorphisms fromAtoB. Similarly, whenRandSare types withSemiring R,Semiring S,MulSemiringAction M RandMulSemiringAction N SSMulSemiringHom φ R Sis the type of equivariant ring homomorphisms fromRtoS. The above types have corresponding classes:MulActionHomClass F φ X Ystates thatFis a type of bundledX → Yhoms which areφ-equivariantDistribMulActionHomClass F φ A Bstates thatFis a type of bundledA → Bhoms preserving the additive monoid structure andφ-equivariantSMulSemiringHomClass F φ R Sstates thatFis a type of bundledR → Shoms preserving the ring structure andφ-equivariant
Notation
We introduce the following notation to code equivariant maps
(the subscript index ₑ is for equivariant) :
X →ₑ[φ] YisMulActionHom φ X Y.A →ₑ+[φ] BisDistribMulActionHom φ A B.R →ₑ+*[φ] SisMulSemiringActionHom φ R S. WhenM = Nandφ = MonoidHom.id M, we provide the backward compatible notation :X →[M] YisMulActionHom (@id M) X YA →+[M] BisDistribMulActionHom (MonoidHom.id M) A BR →+*[M] SisMulSemiringActionHom (MonoidHom.id M) R SThis more general definition is propagated all over mathlib, in particular toLinearMap. The treatment of composition of equivariant maps is inspired by that of semilinear maps. We provide classesCompTripleandMonoidHom.CompTripleof “composable triples`, and various instances for them.