With the previous definition, we build the required lemmas to prove that it forms a category, first we prove identity.
Lemma
The identity cartesian morphism is neutral when composed on the left.
0 identityLeft : (a, b : Container) -> (f : a =#> b) -> Cartesian.identity a |#> f ≡#>≡ fidentityLeft a b (MkCartDepLens fwd bwd) = MkCartDepLensEq (\_ => Refl) (\f => isoIdRight (bwd f))
Lemma
The identity cartesian morphism is neutral when composed on the right.
0 identityRight : (a, b : Container) -> (f : a =#> b) -> f |#> Cartesian.identity b ≡#>≡ fidentityRight a b (MkCartDepLens f1 bwd) = MkCartDepLensEq (\_ => Refl) (\f => isoIdLeft (bwd f))
Most of the heavy lifting is delegated to isoIdLeft \lemref{lem:iso-identities} which it itself part of the proofs that isomophisms form a category.
We do the same for composition which makes use of transIsoAssoc \lemref{lem:iso-transitivity}.
Lemma
Composition of cartesian morphisms is associative.