The multiset exponential on lenses #
The exponential bang P of a polynomial functor P has the positions of P and, at a position
a, the finite multisets of directions of P at a as directions. A lens bang P ⇆ Q is a
forward map on positions with a backward map sending a direction of Q to a finite multiset of
directions of P; this is the shape of a morphism of the Diller–Nahm variant of the Dialectica
category (de Paiva, The Dialectica categories, 1991).
On the category of lenses bang is a comonad, the of-course modality of linear logic (Girard,
Linear logic, Theoret. Comput. Sci. 50, 1987): the counit (dereliction) sends a direction to the
singleton multiset and the comultiplication (digging) sends a multiset of multisets to its sum.
For the parallel product ⊗, each bang P is a commutative comonoid by weakening (the empty
multiset) and contraction (the sum of two multisets), as in Lafont's model of the exponential
(Logiques, catégories et machines, thesis, Paris 7, 1988). The functor bang sends the
categorical product * to the parallel product and the terminal object 1 to the unit y; these
are the Seely isomorphisms (Seely, Linear logic, ∗-autonomous categories and cofree coalgebras,
Contemp. Math. 92, 1989).
Main definitions #
bang— the exponential;Lens.bangMap,Lens.bangCounit,Lens.bangComult— its action on lenses, counit and comultiplication;LensCat.bangFunctor,LensCat.bangComonad— the comonad onLensCat;Lens.bangWeak,Lens.bangContr— weakening and contraction;Lens.Equiv.seely,Lens.Equiv.seelyUnit— the Seely isomorphismsbang (P * Q) ≃ₗ bang P ⊗ bang Qandbang 1 ≃ₗ y.
Main results #
Lens.bangMap_id,Lens.bangMap_comp,Lens.bangCounit_natural,Lens.bangComult_natural,Lens.bangCounit_comult,Lens.bangMap_counit_comult,Lens.bangComult_coassoc— the comonad laws;Lens.bangContr_weak_left,Lens.bangContr_weak_right,Lens.bangContr_assoc,Lens.bangContr_command the instancesComonObj,IsCommComonObjonTensorCat.of (bang P)— the commutative comonoid;Lens.Equiv.seely_contr— contraction is the Seely image of the exponential of the diagonal.
A multiset over a sum is the sum of its left part and its right part.
The multiset exponential: the positions of P, and at a position the finite multisets of
directions of P at it.
Instances For
The comonad structure #
The action of the exponential on a lens: the backward map acts on each element of a multiset.
Equations
Instances For
The comultiplication (digging): a multiset of multisets demands their sum.
Equations
Instances For
The exponential preserves identities.
The exponential preserves composition.
The counit is natural.
The comultiplication is natural.
Left counit law: the counit at bang P after the comultiplication is the identity.
Right counit law: the exponential of the counit after the comultiplication is the identity.
Coassociativity of the comultiplication.
Weakening and contraction #
Weakening: no direction is demanded.
Equations
- PFunctor.Lens.bangWeak P = { toFunA := fun (x : P.bang.A) => PUnit.unit, toFunB := fun (x : P.bang.A) (x_1 : PFunctor.y.B PUnit.unit) => 0 }
Instances For
Contraction: a position is duplicated, and a pair of multisets demands their sum.
Equations
Instances For
Weakening on the left after contraction is the inverse of the left unitor.
Weakening on the right after contraction is the inverse of the right unitor.
Contraction is cocommutative.
The Seely isomorphisms #
The Seely isomorphism: the exponential of a categorical product is the parallel product of the exponentials (Seely 1989).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Seely isomorphism at the unit: the exponential of the terminal object is the unit of the parallel product.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The comonad on the category of lenses #
The exponential as an endofunctor of the category of lenses.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exponential as a comonad on the category of lenses.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The commutative comonoid structure #
bang P is a comonoid for the parallel product, by weakening and contraction.
Equations
- PFunctor.TensorCat.instComonObjBang P = { counit := PFunctor.Lens.bangWeak P, comul := PFunctor.Lens.bangContr P, counit_comul := ⋯, comul_counit := ⋯, comul_assoc := ⋯ }
The comonoid bang P is commutative.