module Cat.Displayed.Functor.Adjoint.Total
  {oa ℓa ob ℓb oe ℓe of ℓf}
  {A : Precategory oa ℓa} {B : Precategory ob ℓb}
  {ℰ : Displayed A oe ℓe} {ℱ : Displayed B of ℓf}
  {L : Functor A B} {R : Functor B A}
  {L' : Displayed-functor L ℰ ℱ} {R' : Displayed-functor R ℱ ℰ}
  {L⊣R : L ⊣ R} (L'⊣R' : L' ⊣[ L⊣R ] R')
  where

Total adjunction🔗

Suppose and are displayed categories, are adjoint functors. A displayed adjunction induces an ordinary adjunction of the corresponding total functors

In both the case of the unit and counit, we take the total natural transformation and compose with the natural isomorphisms ∫ᶠ∘ and ∫ᶠId'≅Id to adjust the domain and codomain.

∫⊣ : ∫ᶠ L' ⊣ ∫ᶠ R'
∫⊣ .unit = Iso.to ∫ᶠ∘ ∫ℰF.∘ ∫ⁿ (L'⊣R'.unit') ∫ℰF.∘ Iso.from ∫ᶠId'≅Id
∫⊣ .counit = Iso.to ∫ᶠId'≅Id ∫ℱF.∘ ∫ⁿ (L'⊣R'.counit') ∫ℱF.∘ Iso.from ∫ᶠ∘

The zig-zag identities follow from their displayed counterparts after taking care of the extra identity morphisms due to ∫ᶠ∘ and ∫ᶠId'≅Id.

∫⊣ .zig {x , x'} = ∫Hom-path[]
  ⌜ ℱ.id' ℱ.∘' L'⊣R'.counit'.ε' (₀' L' x') ℱ.∘' ℱ.id' ⌝
    ℱ.∘' ₁' L' (ℰ.id' ℰ.∘' L'⊣R'.unit'.η' x' ℰ.∘' ℰ.id')                              ℱ.≡[]⟨ apd! (ℱ.idlr' (L'⊣R'.counit'.ε' (₀' L' x'))) ⟩ℱ.≡[]
  L'⊣R'.counit'.ε' (₀' L' x') ℱ.∘' ₁' L' ⌜ ℰ.id' ℰ.∘' L'⊣R'.unit'.η' x' ℰ.∘' ℰ.id' ⌝  ℱ.≡[]⟨ apd! (ℰ.idlr' (L'⊣R'.unit'.η' x')) ⟩ℱ.≡[]
  L'⊣R'.counit'.ε' (₀' L' x') ℱ.∘' ₁' L' (L'⊣R'.unit'.η' x')                          ℱ.≡[]⟨ L'⊣R'.zig' ⟩ℱ.≡[]
  ℱ.id'                                                                               ℱ.∎[]
∫⊣ .zag {x , x'} = ∫Hom-path[]
  ₁' R' (ℱ.id' ℱ.∘' L'⊣R'.counit'.ε' x' ℱ.∘' ℱ.id')
    ℰ.∘' ⌜ ℰ.id' ℰ.∘' L'⊣R'.unit'.η' (₀' R' x') ℰ.∘' ℰ.id' ⌝                         ℰ.≡[]⟨ apd! (ℰ.idlr' (L'⊣R'.unit'.η' (₀' R' x'))) ⟩ℰ.≡[]
  ₁' R' ⌜ ℱ.id' ℱ.∘' L'⊣R'.counit'.ε' x' ℱ.∘' ℱ.id' ⌝ ℰ.∘' L'⊣R'.unit'.η' (₀' R' x') ℰ.≡[]⟨ apd! (ℱ.idlr' (L'⊣R'.counit'.ε' x')) ⟩ℰ.≡[]
  ₁' R' (L'⊣R'.counit'.ε' x') ℰ.∘' L'⊣R'.unit'.η' (₀' R' x')                         ℰ.≡[]⟨ L'⊣R'.zag' ⟩ℰ.≡[]
  ℰ.id'                                                                              ℰ.∎[]