You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`Data.List.Relation.Binary.Permutation.Algorithmic{.Properties}` for the Choudhury and Fiore definition of permutation, and its equivalence with `Declarative` below.
104
127
105
128
*`Data.List.Relation.Binary.Permutation.Declarative{.Properties}` for the least congruence on `List` making `_++_` commutative, and its equivalence with the `Setoid` definition.
@@ -236,46 +259,55 @@ Additions to existing modules
236
259
* In `Data.Vec.Properties`:
237
260
```agda
238
261
map-removeAt : ∀ (f : A → B) (xs : Vec A (suc n)) (i : Fin (suc n)) →
239
-
map f (removeAt xs i) ≡ removeAt (map f xs) i
262
+
map f (removeAt xs i) ≡ removeAt (map f xs) i
240
263
241
264
updateAt-take : (xs : Vec A (m + n)) (i : Fin m) (f : A → A) →
242
265
updateAt (take m xs) i f ≡ take m (updateAt xs (inject≤ i (m≤m+n m n)) f)
243
266
244
-
truncate-zipWith : (f : A → B → C) (m≤n : m ≤ n) (xs : Vec A n) (ys : Vec B n) →
245
-
truncate m≤n (zipWith f xs ys) ≡ zipWith f (truncate m≤n xs) (truncate m≤n ys)
267
+
truncate-zipWith : (f : A → B → C) .(m≤n : m ≤ n) (xs : Vec A n) (ys : Vec B n) →
268
+
truncate m≤n (zipWith f xs ys) ≡ zipWith f (truncate m≤n xs) (truncate m≤n ys)
246
269
247
-
truncate-zipWith-truncate : (f : A → B → C) (m≤n : m ≤ n) (n≤o : n ≤ o) (xs : Vec A o) (ys : Vec B n) →
270
+
truncate-zipWith-truncate : (f : A → B → C) .(m≤n : m ≤ n) .(n≤o : n ≤ o)
271
+
(xs : Vec A o) (ys : Vec B n) →
248
272
truncate m≤n (zipWith f (truncate n≤o xs) ys) ≡
249
273
zipWith f (truncate (≤-trans m≤n n≤o) xs) (truncate m≤n ys)
250
274
251
-
truncate-updateAt : (m≤n : m ≤ n) (xs : Vec A n) (i : Fin m) (f : A → A) →
275
+
truncate-updateAt : .(m≤n : m ≤ n) (xs : Vec A n) (i : Fin m) (f : A → A) →
252
276
updateAt (truncate m≤n xs) i f ≡
253
277
truncate m≤n (updateAt xs (inject≤ i m≤n) f)
254
278
255
279
updateAt-truncate : (xs : Vec A (m + n)) (i : Fin m) (f : A → A) →
256
280
updateAt (truncate (m≤m+n m n) xs) i f ≡
257
281
truncate (m≤m+n m n) (updateAt xs (inject≤ i (m≤m+n m n)) f)
258
282
259
-
map-truncate : (f : A → B) (m≤n : m ≤ n) (xs : Vec A n) →
260
-
map f (truncate m≤n xs) ≡ truncate m≤n (map f xs)
283
+
map-truncate : (f : A → B) .(m≤n : m ≤ n) (xs : Vec A n) →
284
+
map f (truncate m≤n xs) ≡ truncate m≤n (map f xs)
261
285
262
-
padRight-lookup : (m≤n : m ≤ n) (a : A) (xs : Vec A m) (i : Fin m) → lookup (padRight m≤n a xs) (inject≤ i m≤n) ≡ lookup xs i
286
+
padRight-lookup : .(m≤n : m ≤ n) (a : A) (xs : Vec A m) (i : Fin m) →
287
+
lookup (padRight m≤n a xs) (inject≤ i m≤n) ≡ lookup xs i
263
288
264
-
padRight-map : (f : A → B) (m≤n : m ≤ n) (a : A) (xs : Vec A m) → map f (padRight m≤n a xs) ≡ padRight m≤n (f a) (map f xs)
289
+
padRight-map : (f : A → B) .(m≤n : m ≤ n) (a : A) (xs : Vec A m) →
290
+
map f (padRight m≤n a xs) ≡ padRight m≤n (f a) (map f xs)
265
291
266
-
padRight-zipWith : (f : A → B → C) (m≤n : m ≤ n) (a : A) (b : B) (xs : Vec A m) (ys : Vec B m) →
267
-
zipWith f (padRight m≤n a xs) (padRight m≤n b ys) ≡ padRight m≤n (f a b) (zipWith f xs ys)
292
+
padRight-zipWith : (f : A → B → C) .(m≤n : m ≤ n) (a : A) (b : B)
293
+
(xs : Vec A m) (ys : Vec B m) →
294
+
zipWith f (padRight m≤n a xs) (padRight m≤n b ys) ≡
295
+
padRight m≤n (f a b) (zipWith f xs ys)
268
296
269
-
padRight-zipWith₁ : (f : A → B → C) (o≤m : o ≤ m) (m≤n : m ≤ n) (a : A) (b : B) (xs : Vec A m) (ys : Vec B o) →
270
-
zipWith f (padRight m≤n a xs) (padRight (≤-trans o≤m m≤n) b ys) ≡
271
-
padRight m≤n (f a b) (zipWith f xs (padRight o≤m b ys))
297
+
padRight-zipWith₁ : (f : A → B → C) .(o≤m : o ≤ m) .(m≤n : m ≤ n) (a : A) (b : B)
298
+
(xs : Vec A m) (ys : Vec B o) →
299
+
zipWith f (padRight m≤n a xs) (padRight (≤-trans o≤m m≤n) b ys) ≡
300
+
padRight m≤n (f a b) (zipWith f xs (padRight o≤m b ys))
272
301
273
-
padRight-take : (m≤n : m ≤ n) (a : A) (xs : Vec A m) .(n≡m+o : n ≡ m + o) → take m (cast n≡m+o (padRight m≤n a xs)) ≡ xs
302
+
padRight-take : .(m≤n : m ≤ n) (a : A) (xs : Vec A m) .(n≡m+o : n ≡ m + o) →
303
+
take m (cast n≡m+o (padRight m≤n a xs)) ≡ xs
274
304
275
-
padRight-drop : (m≤n : m ≤ n) (a : A) (xs : Vec A m) .(n≡m+o : n ≡ m + o) → drop m (cast n≡m+o (padRight m≤n a xs)) ≡ replicate o a
305
+
padRight-drop : .(m≤n : m ≤ n) (a : A) (xs : Vec A m) .(n≡m+o : n ≡ m + o) →
306
+
drop m (cast n≡m+o (padRight m≤n a xs)) ≡ replicate o a
276
307
277
-
padRight-updateAt : (m≤n : m ≤ n) (x : A) (xs : Vec A m) (f : A → A) (i : Fin m) →
278
-
updateAt (padRight m≤n x xs) (inject≤ i m≤n) f ≡ padRight m≤n x (updateAt xs i f)
308
+
padRight-updateAt : .(m≤n : m ≤ n) (x : A) (xs : Vec A m) (f : A → A) (i : Fin m) →
309
+
updateAt (padRight m≤n x xs) (inject≤ i m≤n) f ≡
310
+
padRight m≤n x (updateAt xs i f)
279
311
```
280
312
281
313
* In `Relation.Binary.Construct.Add.Extrema.NonStrict`:
0 commit comments