commit f89494419bb3bcb87ce8e21a010f9fbd968fb614 Author: depsterr Date: Thu Oct 6 00:05:15 2022 +0200 Began initial work diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e35d885 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +_build diff --git a/README.md b/README.md new file mode 100644 index 0000000..f9a221c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +A formalization of CwFs in cubical agda using the 1Lab as a library. \ No newline at end of file diff --git a/cwfs.agda-lib b/cwfs.agda-lib new file mode 100644 index 0000000..35b3e29 --- /dev/null +++ b/cwfs.agda-lib @@ -0,0 +1,15 @@ +name: cwfs +include: + src + +flags: + --cubical + --no-load-primitives + --postfix-projections + --rewriting + --guardedness + --two-level + -W noNoEquivWhenSplitting + +depend: + cubical-1lab \ No newline at end of file diff --git a/src/CwF.lagda.md b/src/CwF.lagda.md new file mode 100644 index 0000000..da18714 --- /dev/null +++ b/src/CwF.lagda.md @@ -0,0 +1,11 @@ +# Category with family + +``` +module CwF where + +open import Cat.Prelude +``` + +``` +open import Fams +``` \ No newline at end of file diff --git a/src/Fams.lagda.md b/src/Fams.lagda.md new file mode 100644 index 0000000..fb41a74 --- /dev/null +++ b/src/Fams.lagda.md @@ -0,0 +1,40 @@ +``` +module Fams where + +open import 1Lab.HLevel.Universe +open import 1Lab.HLevel.Retracts +open import 1Lab.Type.Sigma +open import Cat.Prelude +``` +Families of sets are sets +``` +Fam-is-set : {o : _} → is-set (Σ[ B ∈ Set o ] (∣ B ∣ → Set o)) +Fam-is-set = Σ-is-hlevel 2 (λ x y → {! !}) {! !} +``` + +Given a universe level there is a category $\mathcal Fam$ of the families of sets of that level. + +``` +module _ where + open Precategory + + Fams : (o : _) → Precategory (lsuc o) o +``` +Objects in $\mathcal Fam$ are pairs $B = (B^0,B^1)$ where $B^0$ is a set and $B^1$ is a family of sets indexed over $B^0$. +``` + Fams o .Ob = Σ[ B ∈ Set o ] (∣ B ∣ → Set o) +``` +A morphism between $B$ and $C$ in $\mathcal Fam$ is a pair of functions $(f^0,f^1)$ where $f^0$ is a function $f^0 : B^0 \to C^0$ and $f^1$ is a family of functions in $B^0$, $b : B^0 \mapsto f^1 : B^1(b) \to C^1(f^0(b))$. +``` + Fams o .Hom B C = Σ[ f ∈ (∣ B .fst ∣ → ∣ C .fst ∣) ] + ((b : ∣ B .fst ∣) → ∣ B .snd b ∣ → ∣ C .snd (f b) ∣) +``` +Remaning proofs are fairly trivial due to working with sets. +``` + Fams o .Hom-set B C f g p q i j = {! !} + Fams o .id = {! !} + Fams o ._∘_ = {! !} + Fams o .idr = {! !} + Fams o .idl = {! !} + Fams o .assoc = {! !} +``` \ No newline at end of file