Category of Lenses

Let 𝒞 𝒞 \mathcal{C} be a Cartesian Category. The category of lenses in 𝒞 𝒞 \mathcal{C} has the same objects as 𝒞 × 𝒞 𝒞 𝒞 \mathcal{C}\times\mathcal{C} , and morphisms ( S , T ) → ( A , B ) → 𝑆 𝑇 𝐴 𝐵 (S,T)\to(A,B) consist of a "getter" g : S → A : 𝑔 → 𝑆 𝐴 g:S\to A , and a "setter" s : S × B → T : 𝑠 → 𝑆 𝐵 𝑇 s:S\times B\to T .

This category can abstractly be constructed as the Total Category of the Fibrewise Opposite of the Simple Fibration of 𝒞 𝒞 \mathcal{C} .

Properties