Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Types.Equiv.Require Import WildCat.Core WildCat.Equiv WildCat.NatTrans WildCat.TwoOneCat.(** ** The (1-)category of types *)Instanceisgraph_type@{u v} : IsGraph@{v u} Type@{u}
:= Build_IsGraph Type@{u} (funab => a -> b).
Is01Cat Type
Is01Cat Type
foralla : Type, a $-> a
forallabc : Type, (b $-> c) -> (a $-> b) -> a $-> c
foralla : Type, a $-> a
intro; exact idmap.
forallabc : Type, (b $-> c) -> (a $-> b) -> a $-> c
exact (funabcgf => g o f).Defined.Instanceis2graph_type : Is2Graph Type
:= funxy => Build_IsGraph _ (funfg => f == g).
A, B: Type
Is01Cat (A $-> B)
A, B: Type
Is01Cat (A $-> B)
A, B: Type
foralla : A $-> B, a $-> a
A, B: Type
forallabc : A $-> B,
(b $-> c) -> (a $-> b) -> a $-> c
A, B: Type
foralla : A $-> B, a $-> a
exact (funfa => idpath).
A, B: Type
forallabc : A $-> B,
(b $-> c) -> (a $-> b) -> a $-> c
exact (funfghpqa => q a @ p a).Defined.
A, B: Type
Is0Gpd (A $-> B)
A, B: Type
Is0Gpd (A $-> B)
A, B: Type
forallab : A $-> B, (a $-> b) -> b $-> a
intros f g p a ; exact (p a)^.Defined.
A, B, C: Type h: B $-> C
Is0Functor (cat_postcomp A h)
A, B, C: Type h: B $-> C
Is0Functor (cat_postcomp A h)
A, B, C: Type h: B $-> C
forallab : A $-> B,
(a $-> b) -> cat_postcomp A h a $-> cat_postcomp A h b
intros f g p a; exact (ap h (p a)).Defined.
A, B, C: Type h: A $-> B
Is0Functor (cat_precomp C h)
A, B, C: Type h: A $-> B
Is0Functor (cat_precomp C h)
A, B, C: Type h: A $-> B
forallab : B $-> C,
(a $-> b) -> cat_precomp C h a $-> cat_precomp C h b
forallf : A <~> B,
IsEquiv ((funAB : Type => ?Goal) A B f)
A, B: Type
forallf : A $-> B, IsEquiv f -> A <~> B
A, B: Type
forall (f : A $-> B) (fe : IsEquiv f),
(funAB : Type => ?Goal) A B
((funAB : Type => ?Goal1) A B f fe) $== f
A, B: Type
A <~> B -> B $-> A
A, B: Type
forallf : A <~> B,
(funAB : Type => ?Goal3) A B f $o
(funAB : Type => ?Goal) A B f $== Id A
A, B: Type
forallf : A <~> B,
(funAB : Type => ?Goal) A B f $o
(funAB : Type => ?Goal3) A B f $== Id B
A, B: Type
forall (f : A $-> B) (g : B $-> A),
f $o g $== Id B -> g $o f $== Id A -> IsEquiv f
A, B: Type f: A <~> B
A $-> B
A, B: Type f: A <~> B
IsEquiv
((fun (AB : Type) (f : A <~> B) => ?Goal) A B f)
A, B: Type f: A $-> B
IsEquiv f -> A <~> B
A, B: Type f: A $-> B
forallfe : IsEquiv f,
(fun (AB : Type) (f : A <~> B) => ?Goal) A B
((fun (AB : Type) (f : A $-> B) => ?Goal1) A B f fe) $==
f
A, B: Type f: A <~> B
B $-> A
A, B: Type f: A <~> B
(fun (AB : Type) (f : A <~> B) => ?Goal3) A B f $o
(fun (AB : Type) (f : A <~> B) => ?Goal) A B f $==
Id A
A, B: Type f: A <~> B
(fun (AB : Type) (f : A <~> B) => ?Goal) A B f $o
(fun (AB : Type) (f : A <~> B) => ?Goal3) A B f $==
Id B
A, B: Type f: A $-> B
forallg : B $-> A,
f $o g $== Id B -> g $o f $== Id A -> IsEquiv f
A, B: Type f: A <~> B
A $-> B
exact f.
A, B: Type f: A <~> B
IsEquiv
((fun (AB : Type) (f : A <~> B) => equiv_fun f) A B
f)
exact _.
A, B: Type f: A $-> B
IsEquiv f -> A <~> B
apply Build_Equiv.
A, B: Type f: A $-> B
forallfe : IsEquiv f,
(fun (AB : Type) (f : A <~> B) => equiv_fun f) A B
((fun (AB : Type) (f : A $-> B) =>
Build_Equiv A B f) A B f fe) $== f
intros; reflexivity.
A, B: Type f: A <~> B
B $-> A
intros; exact (f^-1).
A, B: Type f: A <~> B
(fun (AB : Type) (f : A <~> B) => f^-1) A B f $o
(fun (AB : Type) (f : A <~> B) => equiv_fun f) A B f $==
Id A
A, B: Type f: A <~> B
(funx : A => f^-1 (f x)) == idmap
intros ?; apply eissect.
A, B: Type f: A <~> B
(fun (AB : Type) (f : A <~> B) => equiv_fun f) A B f $o
(fun (AB : Type) (f : A <~> B) => f^-1) A B f $==
Id B
A, B: Type f: A <~> B
(funx : B => f (f^-1 x)) == idmap
intros ?; apply eisretr.
A, B: Type f: A $-> B
forallg : B $-> A,
f $o g $== Id B -> g $o f $== Id A -> IsEquiv f
intros g r s; exact (isequiv_adjointify f g r s).Defined.Instancehasmorext_core_type `{Funext} : HasMorExt (core Type) := _.
A, B: Type f: A $-> B H: IsEquiv f
CatIsEquiv f
A, B: Type f: A $-> B H: IsEquiv f
CatIsEquiv f
assumption.Defined.#[export]
Hint Immediate catie_isequiv : typeclass_instances.
IsInitial Empty
IsInitial Empty
A: Type
{f : Empty $-> A & forallg : Empty $-> A, f $== g}
A: Type
forallg : Empty $-> A, Empty_rec A $== g
A: Type g: Empty $-> A
Empty_rec A $== g
rapply Empty_ind.Defined.
IsTerminal Unit
IsTerminal Unit
A: Type
{f : A $-> Unit & forallg : A $-> Unit, f $== g}
A: Type
forallg : A $-> Unit, (fun_ : A => tt) $== g
A: Type f: A $-> Unit x: A
tt = f x
bydestruct (f x).Defined.(** ** The 2-category of types *)
Is3Graph Type
Is3Graph Type
A, B: Type f, g: A $-> B
IsGraph (f $-> g)
A, B: Type f, g: A $-> B
(f $-> g) -> (f $-> g) -> Type
A, B: Type f, g: A $-> B p, q: f $-> g
Type
exact (p == q).Defined.
A, B: Type
Is1Cat (A $-> B)
A, B: Type
Is1Cat (A $-> B)
A, B: Type a, b: A $-> B
foralla0b0c : a $-> b,
(b0 $-> c) -> (a0 $-> b0) -> a0 $-> c
A, B: Type a, b: A $-> B
foralla0b0 : a $-> b, (a0 $-> b0) -> b0 $-> a0
A, B: Type a, b, c: A $-> B g: b $-> c
foralla0b0 : a $-> b,
(a0 $-> b0) ->
cat_postcomp a g a0 $-> cat_postcomp a g b0
A, B: Type a, b, c: A $-> B f: a $-> b
foralla0b0 : b $-> c,
(a0 $-> b0) ->
cat_precomp c f a0 $-> cat_precomp c f b0
A, B: Type
forall (abcd : A $-> B) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o g $o f $== h $o (g $o f)
A, B: Type
forall (abcd : A $-> B) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o (g $o f) $== h $o g $o f
A, B: Type
forall (ab : A $-> B) (f : a $-> b), Id b $o f $== f
A, B: Type
forall (ab : A $-> B) (f : a $-> b), f $o Id a $== f
A, B: Type a, b: A $-> B
foralla0b0c : a $-> b,
(b0 $-> c) -> (a0 $-> b0) -> a0 $-> c
A, B: Type a, b: A $-> B f, g, h: a $-> b p: g $-> h q: f $-> g x: A
f x = h x
exact (q x @ p x).
A, B: Type a, b: A $-> B
foralla0b0 : a $-> b, (a0 $-> b0) -> b0 $-> a0
intros; bysymmetry.
A, B: Type a, b, c: A $-> B g: b $-> c
foralla0b0 : a $-> b,
(a0 $-> b0) ->
cat_postcomp a g a0 $-> cat_postcomp a g b0
A, B: Type a, b, c: A $-> B g: b $-> c f, h: a $-> b p: f $-> h x: A
cat_postcomp a g f x = cat_postcomp a g h x
exact (p x @@ 1).
A, B: Type a, b, c: A $-> B f: a $-> b
foralla0b0 : b $-> c,
(a0 $-> b0) ->
cat_precomp c f a0 $-> cat_precomp c f b0
A, B: Type a, b, c: A $-> B f: a $-> b g, h: b $-> c p: g $-> h x: A
cat_precomp c f g x = cat_precomp c f h x
exact (1 @@ p x).
A, B: Type
forall (abcd : A $-> B) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o g $o f $== h $o (g $o f)
intros ? ? ? ? ? ? ? ?; apply concat_p_pp.
A, B: Type
forall (abcd : A $-> B) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o (g $o f) $== h $o g $o f
intros ? ? ? ? ? ? ? ?; apply concat_pp_p.
A, B: Type
forall (ab : A $-> B) (f : a $-> b), Id b $o f $== f
A, B: Type a, b: A $-> B f: a $-> b x: A
(Id b $o f) x = f x
apply concat_p1.
A, B: Type
forall (ab : A $-> B) (f : a $-> b), f $o Id a $== f
A, B: Type a, b: A $-> B f: a $-> b x: A
(f $o Id a) x = f x
apply concat_1p.Defined.
A, B: Type
Is1Gpd (A $-> B)
A, B: Type
Is1Gpd (A $-> B)
A, B: Type
forall (ab : A $-> B) (f : a $-> b),
f^$ $o f $== Id a
A, B: Type
forall (ab : A $-> B) (f : a $-> b),
f $o f^$ $== Id b
A, B: Type
forall (ab : A $-> B) (f : a $-> b),
f^$ $o f $== Id a
intros ? ? ? ?; apply concat_pV.
A, B: Type
forall (ab : A $-> B) (f : a $-> b),
f $o f^$ $== Id b
intros ? ? ? ?; apply concat_Vp.Defined.
A, B, C: Type g: B $-> C
Is1Functor (cat_postcomp A g)
A, B, C: Type g: B $-> C
Is1Functor (cat_postcomp A g)
A, B, C: Type g: B $-> C
forall (ab : A $-> B) (fg0 : a $-> b),
f $== g0 ->
fmap (cat_postcomp A g) f $==
fmap (cat_postcomp A g) g0
A, B, C: Type g: B $-> C
forall (abc : A $-> B) (f : a $-> b) (g0 : b $-> c),
fmap (cat_postcomp A g) (g0 $o f) $==
fmap (cat_postcomp A g) g0 $o
fmap (cat_postcomp A g) f
A, B, C: Type g: B $-> C
forall (ab : A $-> B) (fg0 : a $-> b),
f $== g0 ->
fmap (cat_postcomp A g) f $==
fmap (cat_postcomp A g) g0
intros ? ? ? ? p ?; exact (ap _ (p _)).
A, B, C: Type g: B $-> C
forall (abc : A $-> B) (f : a $-> b) (g0 : b $-> c),
fmap (cat_postcomp A g) (g0 $o f) $==
fmap (cat_postcomp A g) g0 $o
fmap (cat_postcomp A g) f
intros ? ? ? ? ? ?; cbn; apply ap_pp.Defined.
A, B, C: Type f: A $-> B
Is1Functor (cat_precomp C f)
A, B, C: Type f: A $-> B
Is1Functor (cat_precomp C f)
A, B, C: Type f: A $-> B
forall (ab : B $-> C) (f0g : a $-> b),
f0 $== g ->
fmap (cat_precomp C f) f0 $== fmap (cat_precomp C f) g
intros ? ? ? ? p ?; exact (p _).Defined.
Is21Cat Type
Is21Cat Type
forallab : Type, Is1Cat (a $-> b)
forallab : Type, Is1Gpd (a $-> b)
forall (abc : Type) (g : b $-> c),
Is1Functor (cat_postcomp a g)
forall (abc : Type) (f : a $-> b),
Is1Functor (cat_precomp c f)
forall (abc : Type) (ff' : a $-> b)
(gg' : b $-> c) (p : f $== f') (p' : g $== g'),
(p' $@R f) $@ (g' $@L p) $== (g $@L p) $@ (p' $@R f')
forall (abcd : Type) (f : a $-> b) (g : b $-> c),
Is1Natural (cat_precomp d f o cat_precomp d g)
(cat_precomp d (g $o f)) (cat_assoc f g)
forall (abcd : Type) (f : a $-> b) (h : c $-> d),
Is1Natural (cat_precomp d f o cat_postcomp b h)
(cat_postcomp a h o cat_precomp c f)
(fung : b $-> c => cat_assoc f g h)
forall (abcd : Type) (g : b $-> c) (h : c $-> d),
Is1Natural (cat_postcomp a (h $o g))
(cat_postcomp a h o cat_postcomp a g)
(funf : a $-> b => cat_assoc f g h)
forallab : Type,
Is1Natural (cat_postcomp a (Id b)) idmap cat_idl
forallab : Type,
Is1Natural (cat_precomp b (Id a)) idmap cat_idr
forall (abcde : Type) (f : a $-> b) (g : b $-> c)
(h : c $-> d) (k : d $-> e),
k $@L cat_assoc f g h $o cat_assoc f (h $o g) k $o
cat_assoc g h k $@R f $==
cat_assoc (g $o f) h k $o cat_assoc f g (k $o h)
forall (abc : Type) (f : a $-> b) (g : b $-> c),
g $@L cat_idl f $o cat_assoc f (Id b) g $==
cat_idr g $@R f
forall (abc : Type) (ff' : a $-> b)
(gg' : b $-> c) (p : f $== f') (p' : g $== g'),
(p' $@R f) $@ (g' $@L p) $== (g $@L p) $@ (p' $@R f')
forall (abcd : Type) (g : b $-> c) (h : c $-> d),
Is1Natural (cat_postcomp a (h $o g))
(cat_postcomp a h o cat_postcomp a g)
(funf : a $-> b => cat_assoc f g h)
forallab : Type,
Is1Natural (cat_postcomp a (Id b)) idmap cat_idl
forallab : Type,
Is1Natural (cat_precomp b (Id a)) idmap cat_idr
forall (abcde : Type) (f : a $-> b) (g : b $-> c)
(h : c $-> d) (k : d $-> e),
k $@L cat_assoc f g h $o cat_assoc f (h $o g) k $o
cat_assoc g h k $@R f $==
cat_assoc (g $o f) h k $o cat_assoc f g (k $o h)
forall (abc : Type) (f : a $-> b) (g : b $-> c),
g $@L cat_idl f $o cat_assoc f (Id b) g $==
cat_idr g $@R f
forall (abc : Type) (ff' : a $-> b)
(gg' : b $-> c) (p : f $== f') (p' : g $== g'),
(p' $@R f) $@ (g' $@L p) $== (g $@L p) $@ (p' $@R f')
a, b, c: Type f, g: a $-> b h, k: b $-> c p: f $== g q: h $== k x: a
q (f x) @ ap k (p x) = ap h (p x) @ q (g x)
a, b, c: Type f, g: a $-> b h, k: b $-> c p: f $== g q: h $== k x: a
ap h (p x) @ q (g x) = q (f x) @ ap k (p x)
apply concat_Ap.
forall (abcd : Type) (g : b $-> c) (h : c $-> d),
Is1Natural (cat_postcomp a (h $o g))
(cat_postcomp a h o cat_postcomp a g)
(funf : a $-> b => cat_assoc f g h)
a, b, c, d: Type f: b $-> c g: c $-> d
Is1Natural (cat_postcomp a (g $o f))
(cat_postcomp a g o cat_postcomp a f)
(funf0 : a $-> b => cat_assoc f0 f g)
a, b, c, d: Type f: b $-> c g: c $-> d
forall (a0a' : a $-> b) (f0 : a0 $-> a'),
(funf1 : a $-> b => cat_assoc f1 f g) a' $o
fmap (cat_postcomp a (g $o f)) f0 $==
fmap (cat_postcomp a g o cat_postcomp a f) f0 $o
(funf1 : a $-> b => cat_assoc f1 f g) a0
a, b, c, d: Type f: b $-> c g: c $-> d h, i: a $-> b p: h $-> i x: a
ap (funx : b => g (f x)) (p x) @ 1 =
1 @ ap g (ap f (p x))
forallab : Type,
Is1Natural (cat_precomp b (Id a)) idmap cat_idr
a, b: Type
Is1Natural (cat_precomp b (Id a)) idmap cat_idr
a, b: Type
forall (a0a' : a $-> b) (f : a0 $-> a'),
cat_idr a' $o fmap (cat_precomp b (Id a)) f $==
fmap idmap f $o cat_idr a0
a, b: Type f, g: a $-> b p: f $-> g x: a
p x @ 1 = 1 @ p x
exact (concat_p1 _ @ (concat_1p _)^).
forall (abcde : Type) (f : a $-> b) (g : b $-> c)
(h : c $-> d) (k : d $-> e),
k $@L cat_assoc f g h $o cat_assoc f (h $o g) k $o
cat_assoc g h k $@R f $==
cat_assoc (g $o f) h k $o cat_assoc f g (k $o h)
reflexivity.
forall (abc : Type) (f : a $-> b) (g : b $-> c),
g $@L cat_idl f $o cat_assoc f (Id b) g $==
cat_idr g $@R f