File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ ``` agda
2+ open import Cat.Prelude
3+ open import Cat.Diagram.Initial
4+ open import Cat.Displayed.Total
5+ open import Cat.Displayed.Base
6+ open Total-hom
7+
8+ import Cat.Reasoning
9+
10+ module Cat.Instances.FAlg where
11+ ```
12+ ``` agda
13+
14+ module _ {o ℓ} {C : Precategory o ℓ} (F : Functor C C) where
15+
16+ open Cat.Reasoning C
17+ open Functor F
18+ open Displayed
19+
20+ FAlg : Displayed C _ _
21+ Ob[ FAlg ] A = Hom (F₀ A) A
22+ Hom[ FAlg ] h α β = h ∘ α ≡ β ∘ F₁ h
23+ Hom[ FAlg ]-set _ _ _ = hlevel!
24+ FAlg .id′ = idl _ ∙ intror F-id
25+ FAlg ._∘′_ p q = pullr q ∙ extendl p ∙ ap (_ ∘_) (sym (F-∘ _ _))
26+ FAlg .idr′ _ = prop!
27+ FAlg .idl′ _ = prop!
28+ FAlg .assoc′ _ _ _ = prop!
29+
30+ ```
31+
32+ ``` agda
33+
34+ FAlgebras : Precategory _ _
35+ FAlgebras = ∫ FAlg
36+
37+ module FAlgebras = Cat.Reasoning FAlgebras
38+
39+ lambek : ∀ (i : FAlgebras.Ob) → is-initial FAlgebras i → is-invertible (i .snd)
40+ lambek (I , i) init = make-invertible (j .hom) p q
41+ where
42+ j : FAlgebras.Hom (I , i) (F₀ I , F₁ i)
43+ j = init (F₀ I , F₁ i) .centre
44+
45+ i' : FAlgebras.Hom (F₀ I , F₁ i) (I , i)
46+ i' .hom = i
47+ i' .preserves = refl
48+
49+ p = ap hom (is-contr→is-prop (init (I , i)) (i' FAlgebras.∘ j) FAlgebras.id)
50+ q = (j .hom ∘ i) ≡⟨ j .preserves ⟩
51+ F₁ i ∘ F₁ (j .hom) ≡˘⟨ F-∘ _ _ ⟩
52+ F₁ (i ∘ j .hom) ≡⟨ ap F₁ p ⟩
53+ F₁ id ≡⟨ F-id ⟩
54+ id ∎
55+ ```
You can’t perform that action at this time.
0 commit comments