Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left and right lifts along a displayed cat. #343

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 67 additions & 1 deletion src/Cat/Displayed/Instances/Lifting.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
open import Cat.Displayed.Cartesian
open import Cat.Functor.Equivalence
open import Cat.Instances.Functor
open import Cat.Instances.Product
open import Cat.Displayed.Total
open import Cat.Functor.Compose
open import Cat.Displayed.Base
open import Cat.Prelude

import Cat.Displayed.Reasoning
import Cat.Functor.Bifunctor as Bi
import Cat.Reasoning
```
-->

```agda
module Cat.Displayed.Instances.Lifting where
```
Expand All @@ -22,6 +23,7 @@ module Cat.Displayed.Instances.Lifting where
open Functor
open _=>_
open Total-hom

```
-->

Expand Down Expand Up @@ -142,6 +144,70 @@ higher level of strictness than usual.
ni .natural _ _ _ = id-comm
```

The distinguished projection `πᶠ` has a canonical choice of lifting.
Later, we will prove that for any functor $F$ valued in
$\cE$, $\pi^f$ has a canonical choice of lifting; however, this later
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$\cE$, $\pi^f$ has a canonical choice of lifting; however, this later
$\cE$, $\pi^f \circ F$ has a canonical choice of lifting; however, this later

theorem cannot be applied here, as $\pi^f \circ \operatorname{id}_{\cE}$
is not definitionally equal to $\pi^f$.

```agda
module _ {o ℓ o' ℓ'}
{B : Precategory o ℓ}
(E : Displayed B o' ℓ')
where
open Cat.Reasoning B
open Displayed E
open Cat.Displayed.Reasoning E
Comment on lines +154 to +160
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be hidden


πᶠ-lifting : Lifting E (πᶠ E)
πᶠ-lifting .Lifting.F₀' (_ , a) = a
πᶠ-lifting .Lifting.F₁' f = preserves f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
πᶠ-lifting .Lifting.F₁' f = preserves f
πᶠ-lifting .Lifting.F₁' f = f .preserves

πᶠ-lifting .Lifting.F-id' = refl
πᶠ-lifting .Lifting.F-∘' f g = refl
```

Let $F: \cC\times \cD\to \cB$ be a functor and $\cE\liesover\cB$ a displayed category. Let $F' : \cC\times \cD\to \cE$ be a lift of $F$ along $F'$. We show that $F'(c-,)$ is a lift of $F(c,-)$ for any $c$, similarly $F'(-,d)$ is a lift of $F(-,d)$ for any $d$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Let $F: \cC\times \cD\to \cB$ be a functor and $\cE\liesover\cB$ a displayed category. Let $F' : \cC\times \cD\to \cE$ be a lift of $F$ along $F'$. We show that $F'(c-,)$ is a lift of $F(c,-)$ for any $c$, similarly $F'(-,d)$ is a lift of $F(-,d)$ for any $d$.
Let $F: \cC\times \cD\to \cB$ be a functor and $\cE\liesover\cB$ a displayed category. Let $F' : \cC\times \cD\to \cE$ be a lift of $F$. We show that $F'(c-,)$ is a lift of $F(c,-)$ for any $c$, similarly $F'(-,d)$ is a lift of $F(-,d)$ for any $d$.

Also this should be reflowed to fit in the 72-character width limit.


```agda
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
module Bifunctor {o₁ ℓ₁ o₂ ℓ₂ o₃ ℓ₃ o₄ ℓ₄}
{B : Precategory o₁ ℓ₁}
(E : Displayed B o₂ ℓ₂)
(C : Precategory o₃ ℓ₃)
(D : Precategory o₄ ℓ₄)
(F : Functor (C ×ᶜ D) B)
(F' : Lifting E F)
where
private
module C = Precategory C
module D = Precategory D
module E = Displayed E
module F' = Lifting F'
Comment on lines +172 to +184
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be hidden.


Left' : ∀ (d : D.Ob) → Lifting E (Bi.Left F d)
Left' d .Lifting.F₀' c = Lifting.F₀' F' (c , d)
Left' d .Lifting.F₁' f = Lifting.F₁' F' ( f , D.id )
Left' d .Lifting.F-id' = Lifting.F-id' F'
Comment on lines +187 to +189
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Left' d .Lifting.F₀' c = Lifting.F₀' F' (c , d)
Left' d .Lifting.F₁' f = Lifting.F₁' F' ( f , D.id )
Left' d .Lifting.F-id' = Lifting.F-id' F'
Left' d .Lifting.F₀' c = F' .Lifting.F₀' (c , d)
Left' d .Lifting.F₁' f = F' .Lifting.F₁' (f , D.id)
Left' d .Lifting.F-id' = F' .Lifting.F-id'

I guess this isn't in the style guide but please use postfix projections everywhere.


Left' d .Lifting.F-∘' f g = symP
((F'.F₁' (f , D.id) E.∘'
F'.F₁' (g , D.id))
E.≡[]˘⟨ F'.F-∘' (f , D.id) (g , D.id) ⟩
(ap (F' .Lifting.F₁')
(λ i → C._∘_ f g , D.idl (D.id) i)
E.∙[] refl))
Comment on lines +192 to +197
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment is a bit awkward here, could you make this a proper reasoning chain ending with ?

Also it looks like the proofs of first∘first and second∘second could be simplified by omitting the outer sym and reversing the chain, which would also simplify these displayed proofs (but you don't have to do this).


Right' : ∀ (c : C.Ob) → Lifting E (Bi.Right F c)
Right' c .Lifting.F₀' d = Lifting.F₀' F' (c , d)
Right' c .Lifting.F₁' f = Lifting.F₁' F' (C.id , f)
Right' c .Lifting.F-id' = Lifting.F-id' F'
Right' c .Lifting.F-∘' f g = symP
((F'.F₁' (C.id , f) E.∘' F'.F₁' (C.id , g))
E.≡[]˘⟨ F'.F-∘' (C.id , f) (C.id , g) ⟩
(ap (F' .Lifting.F₁')
(λ i → (C.idl (C.id) i , D._∘_ f g ))
E.∙[] refl))
```

## Natural transformations between liftings

As liftings are a reorganization of functors, it is reasonable to expect
Expand Down
Loading