Coherence of the parallel and composition products #
The parallel product ⊗ with unit y is a symmetric monoidal structure on lenses (Niu–Spivak
§3.10, p. 65), and the composition product ◃ with unit y is a monoidal structure
(Niu–Spivak §6.1–§6.3, pp. 177–213). This file states the coherence laws for the structural
lenses of Lens/Basic.lean at independent universes:
- for
⊗:tensorAssoc_pentagon,tensor_triangle,tensorComm_natural,tensorComm_comp_tensorComm,tensorComm_hexagon_forward, andtensorComm_hexagon_reverse; - for
◃:compAssoc_natural,compY_natural,yComp_natural,compAssoc_pentagon, andcomp_triangle.
The naturality of the ⊗ associator and unitors is in Lens/Basic.lean. Every law holds
definitionally. Unitor naturality across universes compares the two copies of y along
unitComparison.
The composition product of polynomials is the composite of their actions:
Obj.compEquiv : (P ◃ Q).Obj X ≃ P.Obj (Q.Obj X) (Prop 6.2, p. 178), and ◃ₗ acts as the
horizontal composite of natural transformations (Obj.compEquiv_mapObj_compMap).
Lens.Equiv.compCongr composes lens equivalences, and Lens.Equiv.compNthAdd splits a
composition power, P ◃^ (m + l) ≃ₗ P ◃^ l ◃ P ◃^ m.
The parallel product #
Mac Lane's pentagon for the ⊗ associator.
The triangle law relating the ⊗ associator and unitors.
Naturality of the braiding P ⊗ Q ⇆ Q ⊗ P.
The braiding is its own inverse: ⊗ is symmetric.
The hexagon law for the braiding of ⊗.
The second hexagon law, stated with the inverse associators.
The composition product #
Naturality of the ◃ associator across lenses whose source and target polynomials occupy
six independent universe pairs.
Naturality of the right ◃ unitor. The unit component is the canonical comparison between
the independently instantiated copies of y.
Naturality of the left ◃ unitor.
Mac Lane's pentagon for the ◃ associator.
The triangle law relating the ◃ associator and unitors.
Composing lens equivalences #
The composition product of two lens equivalences.
Equations
Instances For
A composition power splits along a sum of exponents:
P ◃^ (m + l) ≃ₗ P ◃^ l ◃ P ◃^ m.
Equations
Instances For
The composition product as a composite of actions #
The action of P ◃ Q is the composite of the actions (Niu–Spivak Prop 6.2).
Equations
- PFunctor.Obj.compEquiv P Q X = { toFun := PFunctor.comp.get P Q, invFun := PFunctor.comp.mk P Q, left_inv := ⋯, right_inv := ⋯ }
Instances For
The composition product of lenses acts as the horizontal composite of their natural
transformations: first g inside, then f outside.