@@ -9,21 +9,30 @@ module foundation.iterated-cartesian-product-types where
9
9
``` agda
10
10
open import elementary-number-theory.natural-numbers
11
11
12
+ open import finite-group-theory.permutations-standard-finite-types
13
+
12
14
open import foundation.cartesian-product-types
13
15
open import foundation.contractible-types
14
16
open import foundation.coproduct-types
15
17
open import foundation.dependent-pair-types
18
+ open import foundation.equality-dependent-pair-types
16
19
open import foundation.equivalences
17
20
open import foundation.functions
18
21
open import foundation.functoriality-cartesian-product-types
22
+ open import foundation.functoriality-dependent-function-types
23
+ open import foundation.identity-types
24
+ open import foundation.propositions
19
25
open import foundation.type-arithmetic-cartesian-product-types
20
26
open import foundation.type-arithmetic-dependent-function-types
21
27
open import foundation.unit-type
28
+ open import foundation.univalence
22
29
open import foundation.universal-property-coproduct-types
23
30
open import foundation.universal-property-empty-type
24
31
open import foundation.universe-levels
25
32
33
+ open import lists.arrays
26
34
open import lists.lists
35
+ open import lists.permutation-lists
27
36
28
37
open import univalent-combinatorics.standard-finite-types
29
38
```
@@ -35,8 +44,12 @@ open import univalent-combinatorics.standard-finite-types
35
44
In this file, we give three definitions of the iterated cartesian product
36
45
` A₁ × ... × Aₙ ` of ` n ` types ` A₁ , ... , Aₙ ` . Two use a family of types over
37
46
` Fin n ` : the first uses recursion over ` Fin n ` and the second is just
38
- ` Π (Fin n) A ` . The last one uses lists. We also show that the first two
39
- definitions are equivalent.
47
+ ` Π (Fin n) A ` . The last one uses lists.
48
+
49
+ We show that :
50
+
51
+ - all these definitions are equivalent
52
+ - iterated cartesian product of types is closed under permutations
40
53
41
54
## Definitions
42
55
@@ -53,7 +66,7 @@ iterated-product-Fin-recursive (succ-ℕ n) A =
53
66
A (inr star) × iterated-product-Fin-recursive n (A ∘ inl)
54
67
```
55
68
56
- #### Using ` Π ` type
69
+ #### Using ` Π ` -types
57
70
58
71
``` agda
59
72
iterated-product-Fin-Π :
@@ -71,9 +84,9 @@ iterated-product-lists {l} nil = raise-unit l
71
84
iterated-product-lists (cons A p) = A × iterated-product-lists p
72
85
```
73
86
74
- ## Property
87
+ ## Properties
75
88
76
- ### Equivalence between the first two definitions
89
+ ### The definitions using recursion and ` Π ` -types are equivalent
77
90
78
91
``` agda
79
92
equiv-iterated-product-Fin-recursive-Π :
@@ -92,3 +105,102 @@ equiv-iterated-product-Fin-recursive-Π (succ-ℕ n) A =
92
105
( id-equiv)
93
106
( equiv-iterated-product-Fin-recursive-Π n (A ∘ inl)))))))
94
107
```
108
+
109
+ ### The definitions using recursion and lists are equivalent
110
+
111
+ ``` agda
112
+ equiv-iterated-product-Fin-recursive-lists :
113
+ {l : Level} (l : list (UU l)) →
114
+ iterated-product-Fin-recursive
115
+ ( length-array (array-list l))
116
+ ( functional-vec-array (array-list l)) ≃
117
+ iterated-product-lists l
118
+ equiv-iterated-product-Fin-recursive-lists nil = id-equiv
119
+ equiv-iterated-product-Fin-recursive-lists (cons x l) =
120
+ equiv-prod id-equiv (equiv-iterated-product-Fin-recursive-lists l)
121
+ ```
122
+
123
+ ### Iterated cartesian product is closed under permutations
124
+
125
+ ``` agda
126
+ permutation-iterated-product-Fin-Π :
127
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) → UU l
128
+ permutation-iterated-product-Fin-Π n A t =
129
+ iterated-product-Fin-Π n (A ∘ map-equiv t)
130
+
131
+ equiv-permutation-iterated-product-Fin-Π :
132
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) →
133
+ permutation-iterated-product-Fin-Π n A t ≃ iterated-product-Fin-Π n A
134
+ equiv-permutation-iterated-product-Fin-Π n A t =
135
+ equiv-Π (λ z → A z) t (λ a → id-equiv)
136
+
137
+ eq-permutation-iterated-product-Fin-Π :
138
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) →
139
+ permutation-iterated-product-Fin-Π n A t = iterated-product-Fin-Π n A
140
+ eq-permutation-iterated-product-Fin-Π n A t =
141
+ eq-equiv
142
+ ( permutation-iterated-product-Fin-Π n A t)
143
+ ( iterated-product-Fin-Π n A)
144
+ ( equiv-permutation-iterated-product-Fin-Π n A t)
145
+
146
+ permutation-iterated-product-Fin-recursive :
147
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) → UU l
148
+ permutation-iterated-product-Fin-recursive n A t =
149
+ iterated-product-Fin-recursive n (A ∘ map-equiv t)
150
+
151
+ equiv-permutation-iterated-product-Fin-recursive :
152
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) →
153
+ permutation-iterated-product-Fin-recursive n A t ≃
154
+ iterated-product-Fin-recursive n A
155
+ equiv-permutation-iterated-product-Fin-recursive n A t =
156
+ ( inv-equiv (equiv-iterated-product-Fin-recursive-Π n A) ∘e
157
+ ( equiv-permutation-iterated-product-Fin-Π n A t ∘e
158
+ equiv-iterated-product-Fin-recursive-Π n (A ∘ map-equiv t)))
159
+
160
+ eq-permutation-iterated-product-Fin-recursive :
161
+ {l : Level} (n : ℕ) (A : (Fin n → UU l)) (t : Permutation n) →
162
+ permutation-iterated-product-Fin-recursive n A t =
163
+ iterated-product-Fin-recursive n A
164
+ eq-permutation-iterated-product-Fin-recursive n A t =
165
+ eq-equiv
166
+ ( permutation-iterated-product-Fin-recursive n A t)
167
+ ( iterated-product-Fin-recursive n A)
168
+ ( equiv-permutation-iterated-product-Fin-recursive n A t)
169
+
170
+ permutation-iterated-product-lists :
171
+ {l : Level} (L : list (UU l)) (t : Permutation (length-list L)) → UU l
172
+ permutation-iterated-product-lists L t =
173
+ iterated-product-lists (permute-list L t)
174
+
175
+ equiv-permutation-iterated-product-lists :
176
+ {l : Level} (L : list (UU l)) (t : Permutation (length-list L)) →
177
+ permutation-iterated-product-lists L t ≃
178
+ iterated-product-lists L
179
+ equiv-permutation-iterated-product-lists L t =
180
+ ( equiv-iterated-product-Fin-recursive-lists L ∘e
181
+ ( ( equiv-permutation-iterated-product-Fin-recursive
182
+ ( length-list L)
183
+ ( functional-vec-array (array-list L))
184
+ ( t)) ∘e
185
+ ( equiv-eq
186
+ ( ap
187
+ ( λ p →
188
+ iterated-product-Fin-recursive
189
+ ( length-array p)
190
+ ( functional-vec-array p))
191
+ ( isretr-array-list
192
+ ( length-list L ,
193
+ ( functional-vec-array (array-list L) ∘ map-equiv t)))) ∘e
194
+ ( inv-equiv
195
+ ( equiv-iterated-product-Fin-recursive-lists (permute-list L t))))))
196
+
197
+ eq-permutation-iterated-product-lists :
198
+ {l : Level} (L : list (UU l)) (t : Permutation (length-list L)) →
199
+ permutation-iterated-product-lists L t =
200
+ iterated-product-lists L
201
+ eq-permutation-iterated-product-lists L t =
202
+ eq-equiv
203
+ ( permutation-iterated-product-lists L t)
204
+ ( iterated-product-lists L)
205
+ ( equiv-permutation-iterated-product-lists L t)
206
+ ```
0 commit comments