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
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/Cat/Displayed/Base.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ For convenience, we also introduce displayed analogues for equational chain reas
→ g' ≡[ q ] h' → f' ≡[ p ] g' → f' ≡[ p ∙ q ] h'
≡[-]⟨⟩-syntax f' p q' p' = p' ∙[] q'

≡[]˘_ : ∀ {x} {y} {f} {g}
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
{p : f ≡ g} { x' : Ob[ x ] } { y' : Ob[ y ] }
{f' : Hom[ f ] x' y' } {g' : Hom[ g ] x' y' }
( q : ( f' ≡[ p ] g' )) → (g' ≡[ (sym p) ] f')

≡[]˘ q = symP q

_≡[]˘⟨_⟩_ : ∀ {a b x y} {f g h : Hom a b} {p : g ≡ f} {q : g ≡ h}
→ (f' : Hom[ f ] x y) {g' : Hom[ g ] x y} {h' : Hom[ h ] x y}
→ g' ≡[ p ] f' → g' ≡[ q ] h' → f' ≡[ sym p ∙ q ] h'
Expand Down
73 changes: 72 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,19 @@
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 1Lab.Path
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved

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

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

```
-->

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

The distinguished projection `πᶠ` has a canonical choice of lifting.
```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
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
πᶠ-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
```

```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.


sym_lemma_dep : ∀ {x} {y} {f} {g}
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
{p : f ≡ g} { x' : E.Ob[ x ] } { y' : E.Ob[ y ] }
{f' : E.Hom[ f ] x' y' } {g' : E.Hom[ g ] x' y' }
( q : ( f' E.≡[ p ] g' )) → (g' E.≡[ (sym p) ] f')

sym_lemma_dep q = symP q


Left : ∀ (d : D.Ob) → Lifting E (Bi.Left F d)
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
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-∘' f g = E.≡[]˘
((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)
TOTBWF marked this conversation as resolved.
Show resolved Hide resolved
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 = E.≡[]˘
((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