Skip to content

Commit c7e4eaa

Browse files
Merge pull request #1837 from jdchristensen/induced
WildCat/Induced: various minor simplifications
2 parents bd9b89c + d3598b7 commit c7e4eaa

File tree

1 file changed

+37
-53
lines changed

1 file changed

+37
-53
lines changed

theories/WildCat/Induced.v

+37-53
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Require Import WildCat.Equiv.
66

77
(** * Induced wild categories *)
88

9-
(** A map A -> B of types where B is some type of category induces the same level of structure on A, via taking everything to be defined on the image.
9+
(** A map [A -> B] of types, where [B] is some type of wild category, induces the same level of structure on [A], via taking everything to be defined on the image.
1010
1111
This needs to be separate from Core because of HasEquivs usage. We don't make these definitions Global Instances because we only want to apply them manually, but we make them Local Instances so that subsequent ones can pick up the previous ones automatically. *)
1212

@@ -15,98 +15,82 @@ Section Induced_category.
1515

1616
Local Instance isgraph_induced `{IsGraph B} : IsGraph A.
1717
Proof.
18-
srapply Build_IsGraph.
18+
nrapply Build_IsGraph.
1919
intros a1 a2.
2020
exact (f a1 $-> f a2).
2121
Defined.
2222

2323
Local Instance is01cat_induced `{Is01Cat B} : Is01Cat A.
2424
Proof.
25-
srapply Build_Is01Cat.
26-
+ intro a. cbn in *.
25+
nrapply Build_Is01Cat.
26+
+ intro a; cbn.
2727
exact (Id (f a)).
28-
+ intros a b c; cbn in *; intros g1 g2.
29-
exact ( g1 $o g2).
28+
+ intros a b c; cbn. apply cat_comp.
3029
Defined.
3130

3231
Local Instance is0gpd_induced `{Is0Gpd B} : Is0Gpd A.
3332
Proof.
34-
rapply Build_Is0Gpd.
35-
intros a b g; cbn in *; exact (g^$).
33+
nrapply Build_Is0Gpd.
34+
intros a b; cbn. apply gpd_rev.
3635
Defined.
3736

38-
(** The structure map along which we induce the category structure becomes a functor with respect to the induced structure *)
37+
(** The structure map along which we induce the category structure becomes a functor with respect to the induced structure. *)
3938
Local Instance is0functor_induced `{IsGraph B} : Is0Functor f.
4039
Proof.
41-
srapply Build_Is0Functor.
42-
intros a b. cbn in *. exact idmap.
40+
nrapply Build_Is0Functor.
41+
intros a b; cbn. exact idmap.
4342
Defined.
4443

4544
Local Instance is2graph_induced `{Is2Graph B} : Is2Graph A.
4645
Proof.
47-
intros a b.
48-
srapply Build_IsGraph.
49-
intros a1 a2.
50-
exact (fmap f a1 $-> fmap f a2).
46+
intros a b; cbn. apply isgraph_hom.
5147
Defined.
5248

5349
Local Instance is1cat_induced `{Is1Cat B} : Is1Cat A.
5450
Proof.
55-
snrapply Build_Is1Cat;
56-
unfold isgraph_induced, is2graph_induced,
57-
is01cat_induced, is0functor_induced in *;
58-
cbn in *.
51+
snrapply Build_Is1Cat; cbn.
5952
+ intros a b.
6053
rapply is01cat_hom.
6154
+ intros a b.
62-
rapply is0gpd_hom.
55+
nrapply is0gpd_hom.
6356
+ intros a b c.
6457
rapply is0functor_postcomp.
65-
+ intros a b c h.
58+
+ intros a b c.
6659
rapply is0functor_precomp.
67-
+ intros a b c d u v w.
68-
rapply cat_assoc.
69-
+ intros a b u.
70-
rapply cat_idl.
71-
+ intros a b u.
72-
apply cat_idr.
60+
+ intros a b c d.
61+
nrapply cat_assoc.
62+
+ intros a b.
63+
nrapply cat_idl.
64+
+ intros a b.
65+
nrapply cat_idr.
7366
Defined.
7467

7568
Local Instance is1functor_induced `{Is1Cat B} : Is1Functor f.
7669
Proof.
77-
srapply Build_Is1Functor.
78-
+ intros a b g h. cbn in *. exact idmap.
79-
+ intros a. cbn in *. exact (Id _).
80-
+ intros a b c g h. cbn in *. exact (Id _).
70+
srapply Build_Is1Functor; cbn.
71+
+ intros a b g h. exact idmap.
72+
+ intros a. exact (Id _).
73+
+ intros a b c g h. exact (Id _).
8174
Defined.
8275

83-
Instance hasmorext_induced `{X : HasMorExt B} : HasMorExt A.
76+
Instance hasmorext_induced `{HasMorExt B} : HasMorExt A.
8477
Proof.
85-
constructor. intros. apply X.
78+
constructor. intros a b; cbn. rapply isequiv_Htpy_path.
8679
Defined.
8780

8881
Definition hasequivs_induced `{HasEquivs B} : HasEquivs A.
8982
Proof.
90-
srapply Build_HasEquivs.
91-
+ intros a b. exact (f a $<~> f b).
92-
+ intros a b h. apply (CatIsEquiv' (f a) (f b)).
93-
exact (fmap f h).
94-
+ intros a b; cbn in *.
95-
intros g. exact( cate_fun g).
96-
+ intros a b h; cbn in *.
97-
exact (cate_isequiv' _ _ h ).
98-
+ intros a b h; cbn in *.
99-
exact ( cate_buildequiv' _ _ h).
100-
+ intros a b h fe; cbn in *.
101-
exact ( cate_buildequiv_fun' (f a) (f b) h fe) .
102-
+ intros a b h; cbn in *.
103-
exact(cate_inv' _ _ h ).
104-
+ intros a b h; cbn in *.
105-
exact (cate_issect' _ _ h ).
106-
+ intros a b h; cbn in *.
107-
exact (cate_isretr' _ _ _ ).
108-
+ intros a b h g m n; cbn in *.
109-
exact ( catie_adjointify' _ _ h g m n ).
83+
srapply Build_HasEquivs; intros a b; cbn.
84+
+ exact (f a $<~> f b).
85+
+ apply CatIsEquiv'.
86+
+ apply cate_fun.
87+
+ apply cate_isequiv'.
88+
+ apply cate_buildequiv'.
89+
+ nrapply cate_buildequiv_fun'.
90+
+ apply cate_inv'.
91+
+ nrapply cate_issect'.
92+
+ nrapply cate_isretr'.
93+
+ nrapply catie_adjointify'.
11094
Defined.
11195

11296
End Induced_category.

0 commit comments

Comments
 (0)