-
Notifications
You must be signed in to change notification settings - Fork 0
/
PropFAlgebras.agda
70 lines (57 loc) · 2.09 KB
/
PropFAlgebras.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
open import Categories
open import Categories.Initial
import Functors.Algebra
open import Functors
module PropFAlgebras {a}{b}{C : Cat {a}{b}}
{F : Fun C C}
where
open import Library hiding (_×_)
open import Naturals
open import Functors.Algebra F
open Cat C
open Fun F
open F-algebra
open F-homomorphism
--------------------------------------------------
-- Propiedades
--------------------------------------------------
iden-α : fold α ≅ iden {μF}
iden-α = {!!}
-- Fusion
fusion : ∀{A B}{f : Hom (OMap A) A}{g : Hom (OMap B) B}{h : Hom A B}
→ h ∙ f ≅ g ∙ HMap h → h ∙ fold f ≅ fold g
fusion = {!!}
--
isfold : ∀{A}{f : Hom μF A}{g : Hom A μF}
→ g ∙ f ≅ iden {μF} → Σ[ h ∈ Hom (OMap A) A ] (f ≅ fold h)
isfold = {!!}
--
.roll : ∀{A B}{f : Hom B A}{g : Hom (OMap A) B}
→ fold (f ∙ g) ≅ f ∙ fold (g ∙ HMap f)
roll = {!!}
--------------------------------------------------
-- Propiedades de álgebras iniciales en categorías
-- con oroductos
--------------------------------------------------
open import Categories.Products
module ProductProperties (prod : Products C) where
--
-- Banana split
-- Nos permite transformar dos folds en uno solo
-- Ayuda : usar fusion de productos (fusionP)
open Products prod
open import Categories.Products.Properties prod renaming (fusion to fusionP)
banana-split : ∀{A B}{f : Hom (OMap A) A}{g : Hom (OMap B) B}
→ ⟨ fold f , fold g ⟩ ≅ fold ⟨ f ∙ HMap π₁ , g ∙ HMap π₂ ⟩
banana-split = {!!}
--
-- Recursion mutua
mutua1 : ∀{A B}{f : Hom μF A}{g : Hom μF B}{h : Hom (OMap (A × B)) A}{k : Hom (OMap (A × B)) B}
→ f ∙ α ≅ h ∙ HMap ⟨ f , g ⟩
→ g ∙ α ≅ k ∙ HMap ⟨ f , g ⟩
→ ⟨ f , g ⟩ ≅ fold ⟨ h , k ⟩
mutua1 = {!!}
mutua2 : ∀{A B}{f : Hom μF A}{g : Hom μF B}{h : Hom (OMap (A × B)) A}{k : Hom (OMap (A × B)) B}
→ ⟨ f , g ⟩ ≅ fold ⟨ h , k ⟩
→ Library._×_ (f ∙ α ≅ h ∙ HMap ⟨ f , g ⟩) (g ∙ α ≅ k ∙ HMap ⟨ f , g ⟩)
mutua2 = ?