/
structure-equivalences-set-magmoids.lagda.md
178 lines (147 loc) · 5.62 KB
/
structure-equivalences-set-magmoids.lagda.md
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# Structure equivalences between set-magmoids
```agda
module category-theory.structure-equivalences-set-magmoids where
```
<details><summary>Imports</summary>
```agda
open import category-theory.functors-set-magmoids
open import category-theory.set-magmoids
open import foundation.cartesian-product-types
open import foundation.dependent-pair-types
open import foundation.equivalences
open import foundation.functoriality-dependent-function-types
open import foundation.functoriality-dependent-pair-types
open import foundation.identity-types
open import foundation.iterated-dependent-product-types
open import foundation.propositions
open import foundation.type-arithmetic-dependent-pair-types
open import foundation.type-theoretic-principle-of-choice
open import foundation.universe-levels
```
</details>
## Idea
A **structure equivalence between
[set-magmoids](category-theory.set-magmoids.md)** is a
[functor](category-theory.functors-set-magmoids.md) that is
1. an [equivalence](foundation-core.equivalences.md) on objects, and
2. an equivalence on hom-[sets](foundation-core.sets.md), i.e. is fully
faithful.
## Definitions
### The predicate on functors of set-magmoids of being structure equivalences
```agda
module _
{l1 l2 l3 l4 : Level}
(A : Set-Magmoid l1 l2) (B : Set-Magmoid l3 l4)
(F : functor-Set-Magmoid A B)
where
is-structure-equiv-functor-Set-Magmoid : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
is-structure-equiv-functor-Set-Magmoid =
( is-equiv (obj-functor-Set-Magmoid A B F)) ×
( {x y : obj-Set-Magmoid A} →
is-equiv (hom-functor-Set-Magmoid A B F {x} {y}))
is-prop-is-structure-equiv-functor-Set-Magmoid :
is-prop is-structure-equiv-functor-Set-Magmoid
is-prop-is-structure-equiv-functor-Set-Magmoid =
is-prop-prod
( is-property-is-equiv (obj-functor-Set-Magmoid A B F))
( is-prop-iterated-implicit-Π 2
( λ x y → is-property-is-equiv (hom-functor-Set-Magmoid A B F {x} {y})))
is-equiv-prop-functor-Set-Magmoid :
Prop (l1 ⊔ l2 ⊔ l3 ⊔ l4)
pr1 is-equiv-prop-functor-Set-Magmoid =
is-structure-equiv-functor-Set-Magmoid
pr2 is-equiv-prop-functor-Set-Magmoid =
is-prop-is-structure-equiv-functor-Set-Magmoid
```
### The type of structure equivalences between set-magmoids
```agda
module _
{l1 l2 l3 l4 : Level}
(A : Set-Magmoid l1 l2) (B : Set-Magmoid l3 l4)
where
structure-equiv-Set-Magmoid : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
structure-equiv-Set-Magmoid =
Σ ( functor-Set-Magmoid A B)
( is-structure-equiv-functor-Set-Magmoid A B)
```
### The identity structure equivalence on a set-magmoid
```agda
module _
{l1 l2 : Level} (A : Set-Magmoid l1 l2)
where
is-equiv-id-Set-Magmoid :
is-structure-equiv-functor-Set-Magmoid A A (id-functor-Set-Magmoid A)
pr1 is-equiv-id-Set-Magmoid = is-equiv-id
pr2 is-equiv-id-Set-Magmoid = is-equiv-id
id-structure-equiv-Set-Magmoid : structure-equiv-Set-Magmoid A A
pr1 id-structure-equiv-Set-Magmoid = id-functor-Set-Magmoid A
pr2 id-structure-equiv-Set-Magmoid = is-equiv-id-Set-Magmoid
```
## Properties
### Computing the type of structure equivalences
```agda
module _
{l1 l2 l3 l4 : Level} (A : Set-Magmoid l1 l2) (B : Set-Magmoid l3 l4)
where
componentwise-structure-equiv-Set-Magmoid : UU (l1 ⊔ l2 ⊔ l3 ⊔ l4)
componentwise-structure-equiv-Set-Magmoid =
Σ ( obj-Set-Magmoid A ≃ obj-Set-Magmoid B)
( λ E₀ →
Σ ( {x y : obj-Set-Magmoid A} →
hom-Set-Magmoid A x y ≃
hom-Set-Magmoid B (map-equiv E₀ x) (map-equiv E₀ y))
( λ E₁ →
preserves-comp-hom-Set-Magmoid A B
( map-equiv E₀) (map-equiv E₁)))
compute-structure-equiv-Set-Magmoid :
componentwise-structure-equiv-Set-Magmoid ≃ structure-equiv-Set-Magmoid A B
compute-structure-equiv-Set-Magmoid =
( inv-associative-Σ _ _ _) ∘e
( equiv-tot
( λ F₀ →
( inv-associative-Σ _ _ _) ∘e
equiv-tot (λ _ → equiv-left-swap-Σ) ∘e
( equiv-left-swap-Σ) ∘e
( equiv-tot
( λ is-equiv-F₀ →
( associative-Σ _ _ _) ∘e
( equiv-right-swap-Σ) ∘e
( equiv-Σ-equiv-base
( λ E₁' →
preserves-comp-hom-Set-Magmoid A B F₀ (λ f → pr1 E₁' f))
( ( distributive-implicit-Π-Σ) ∘e
( equiv-implicit-Π-equiv-family
( λ _ → distributive-implicit-Π-Σ)))))))) ∘e
( associative-Σ _ _ _)
```
### Structure equivalences of set-magmoids characterize their equality
```agda
module _
{l1 l2 : Level}
where
structure-equiv-eq-Set-Magmoid :
(A B : Set-Magmoid l1 l2) →
A = B → structure-equiv-Set-Magmoid A B
structure-equiv-eq-Set-Magmoid A .A refl =
id-structure-equiv-Set-Magmoid A
```
The rest remains to be figured out. We need the fact that binary families of
equivalences of sets are torsorial.
```text
is-torsorial-structure-equiv-Set-Magmoid :
(A : Set-Magmoid l1 l2) → is-torsorial (structure-equiv-Set-Magmoid A)
is-torsorial-structure-equiv-Set-Magmoid A =
is-contr-equiv'
( Σ (Set-Magmoid l1 l2) (componentwise-structure-equiv-Set-Magmoid A))
(equiv-tot (compute-structure-equiv-Set-Magmoid A))
( is-torsorial-Eq-structure _
( is-torsorial-equiv (obj-Set-Magmoid A))
( obj-Set-Magmoid A , id-equiv)
( is-torsorial-Eq-structure _
( {! !})
( hom-set-Set-Magmoid A , λ {x} {y} → id-equiv)
( is-torsorial-Eq-implicit-Π _
λ x → is-torsorial-Eq-implicit-Π _
λ y → is-torsorial-Eq-implicit-Π _
λ z → {! z !})))
```