Library HoTT.Algebra.Monoids.Centralizer
Require Import Basics.Overture Basics.Tactics.
Require Import Algebra.Monoids.Monoid.
Local Open Scope mc_mult_scope.
Require Import Algebra.Monoids.Monoid.
Local Open Scope mc_mult_scope.
Centralizers
A two-sided identity commutes with every element.
Definition centralizer_unit {A : Type} `{SgOp A} {Aunit : MonUnit A}
`{!LeftIdentity _ mon_unit, !RightIdentity _ mon_unit} (g : A)
: centralizer g mon_unit
:= right_identity g @ (left_identity g)^.
`{!LeftIdentity _ mon_unit, !RightIdentity _ mon_unit} (g : A)
: centralizer g mon_unit
:= right_identity g @ (left_identity g)^.
Associativity alone makes each centralizer closed under the operation.
Definition centralizer_sgop {A : Type} `{SgOp A, !Associative (.*.)}
(g h k : A) (p : centralizer g h) (q : centralizer g k)
: centralizer g (h × k).
Proof.
unfold centralizer.
lhs tapply associativity.
lhs napply (ap (.* k) p).
lhs_V tapply associativity.
lhs napply (ap (h *.) q).
tapply associativity.
Defined.
(g h k : A) (p : centralizer g h) (q : centralizer g k)
: centralizer g (h × k).
Proof.
unfold centralizer.
lhs tapply associativity.
lhs napply (ap (.* k) p).
lhs_V tapply associativity.
lhs napply (ap (h *.) q).
tapply associativity.
Defined.