@@ -137,6 +137,7 @@ Deprecated names
137
137
∈⇒∣product ↦ Data.Nat.ListAction.Properties.∈⇒∣product
138
138
product≢0 ↦ Data.Nat.ListAction.Properties.product≢0
139
139
∈⇒≤product ↦ Data.Nat.ListAction.Properties.∈⇒≤product
140
+ ∷-ʳ++-eqFree ↦ Data.List.Properties.ʳ++-ʳ++-eqFree
140
141
```
141
142
142
143
* In ` Data.List.Relation.Binary.Permutation.Propositional.Properties ` :
@@ -150,11 +151,18 @@ Deprecated names
150
151
left-inverse ↦ rightInverse
151
152
```
152
153
154
+ * In ` Data.Product.Nary.NonDependent ` :
155
+ ``` agda
156
+ Allₙ ↦ Pointwiseₙ
157
+ ```
158
+
153
159
New modules
154
160
-----------
155
161
156
162
* ` Algebra.Module.Properties.{Bimodule|LeftModule|RightModule} ` .
157
163
164
+ * ` Algebra.Morphism.Construct.DirectProduct ` .
165
+
158
166
* ` Data.List.Base.{and|or|any|all} ` have been lifted out into ` Data.Bool.ListAction ` .
159
167
160
168
* ` Data.List.Base.{sum|product} ` and their properties have been lifted out into ` Data.Nat.ListAction ` and ` Data.Nat.ListAction.Properties ` .
@@ -163,15 +171,42 @@ New modules
163
171
164
172
* ` Data.List.Relation.Binary.Suffix.Propositional.Properties ` showing the equivalence to right divisibility induced by the list monoid.
165
173
174
+ * ` Data.List.Sort.InsertionSort.{agda|Base|Properties} ` defines insertion sort and proves properties of insertion sort such as Sorted and Permutation properties.
175
+
176
+ * ` Data.List.Sort.MergenSort.{agda|Base|Properties} ` is a refactor of the previous ` Data.List.Sort.MergenSort ` .
177
+
166
178
* ` Data.Sign.Show ` to show a sign.
167
179
168
180
* ` Relation.Binary.Morphism.Construct.Product ` to plumb in the (categorical) product structure on ` RawSetoid ` .
169
181
170
182
* ` Relation.Binary.Properties.PartialSetoid ` to systematise properties of a PER
171
183
184
+ * ` Relation.Nullary.Recomputable.Core `
185
+
172
186
Additions to existing modules
173
187
-----------------------------
174
188
189
+ * In ` Algebra.Consequences.Base ` :
190
+ ``` agda
191
+ module Congruence (_≈_ : Rel A ℓ) (cong : Congruent₂ _≈_ _∙_) (refl : Reflexive _≈_)
192
+ where
193
+ ∙-congˡ : LeftCongruent _≈_ _∙_
194
+ ∙-congʳ : RightCongruent _≈_ _∙_
195
+ ```
196
+
197
+ * In ` Algebra.Consequences.Setoid ` :
198
+ ``` agda
199
+ module Congruence (cong : Congruent₂ _≈_ _∙_) where
200
+ ∙-congˡ : LeftCongruent _≈_ _∙_
201
+ ∙-congʳ : RightCongruent _≈_ _∙_
202
+ ```
203
+
204
+ * In ` Algebra.Construct.Initial ` :
205
+ ``` agda
206
+ assoc : Associative _≈_ _∙_
207
+ idem : Idempotent _≈_ _∙_
208
+ ```
209
+
175
210
* In ` Algebra.Construct.Pointwise ` :
176
211
``` agda
177
212
isNearSemiring : IsNearSemiring _≈_ _+_ _*_ 0# →
@@ -225,6 +260,29 @@ Additions to existing modules
225
260
∣ˡ-preorder : Preorder a ℓ _
226
261
```
227
262
263
+ * In ` Algebra.Properties.Semigroup ` adding consequences for associativity for semigroups
264
+
265
+ ```
266
+ uv≈w⇒xu∙v≈xw : ∀ x → (x ∙ u) ∙ v ≈ x ∙ w
267
+ uv≈w⇒u∙vx≈wx : ∀ x → u ∙ (v ∙ x) ≈ w ∙ x
268
+ uv≈w⇒u[vx∙y]≈w∙xy : ∀ x y → u ∙ ((v ∙ x) ∙ y) ≈ w ∙ (x ∙ y)
269
+ uv≈w⇒x[uv∙y]≈x∙wy : ∀ x y → x ∙ (u ∙ (v ∙ y)) ≈ x ∙ (w ∙ y)
270
+ uv≈w⇒[x∙yu]v≈x∙yw : ∀ x y → (x ∙ (y ∙ u)) ∙ v ≈ x ∙ (y ∙ w)
271
+ uv≈w⇒[xu∙v]y≈x∙wy : ∀ x y → ((x ∙ u) ∙ v) ∙ y ≈ x ∙ (w ∙ y)
272
+ uv≈w⇒[xy∙u]v≈x∙yw : ∀ x y → ((x ∙ y) ∙ u) ∙ v ≈ x ∙ (y ∙ w)
273
+ uv≈w⇒xu∙vy≈x∙wy : ∀ x y → (x ∙ u) ∙ (v ∙ y) ≈ x ∙ (w ∙ y)
274
+ uv≈w⇒xy≈z⇒u[vx∙y]≈wz : ∀ z → x ∙ y ≈ z → u ∙ ((v ∙ x) ∙ y) ≈ w ∙ z
275
+ uv≈w⇒x∙wy≈x∙[u∙vy] : x ∙ (w ∙ y) ≈ x ∙ (u ∙ (v ∙ y))
276
+ [uv∙w]x≈u[vw∙x] : ((u ∙ v) ∙ w) ∙ x ≈ u ∙ ((v ∙ w) ∙ x)
277
+ [uv∙w]x≈u[v∙wx] : ((u ∙ v) ∙ w) ∙ x ≈ u ∙ (v ∙ (w ∙ x))
278
+ [u∙vw]x≈uv∙wx : (u ∙ (v ∙ w)) ∙ x ≈ (u ∙ v) ∙ (w ∙ x)
279
+ [u∙vw]x≈u[v∙wx] : (u ∙ (v ∙ w)) ∙ x ≈ u ∙ (v ∙ (w ∙ x))
280
+ uv∙wx≈u[vw∙x] : (u ∙ v) ∙ (w ∙ x) ≈ u ∙ ((v ∙ w) ∙ x)
281
+ uv≈wx⇒yu∙v≈yw∙x : ∀ y → (y ∙ u) ∙ v ≈ (y ∙ w) ∙ x
282
+ uv≈wx⇒u∙vy≈w∙xy : ∀ y → u ∙ (v ∙ y) ≈ w ∙ (x ∙ y)
283
+ uv≈wx⇒yu∙vz≈yw∙xz : ∀ y z → (y ∙ u) ∙ (v ∙ z) ≈ (y ∙ w) ∙ (x ∙ z)
284
+ ```
285
+
228
286
* In ` Algebra.Properties.Semigroup.Divisibility ` :
229
287
``` agda
230
288
∣ˡ-trans : Transitive _∣ˡ_
@@ -239,21 +297,43 @@ Additions to existing modules
239
297
∙-cong-∣ : x ∣ y → a ∣ b → x ∙ a ∣ y ∙ b
240
298
```
241
299
300
+ * In ` Data.Bool.Properties ` :
301
+ ``` agda
302
+ if-eta : ∀ b → (if b then x else x) ≡ x
303
+ if-idem-then : ∀ b → (if b then (if b then x else y) else y) ≡ (if b then x else y)
304
+ if-idem-else : ∀ b → (if b then x else (if b then x else y)) ≡ (if b then x else y)
305
+ if-swap-then : ∀ b c → (if b then (if c then x else y) else y) ≡ (if c then (if b then x else y) else y)
306
+ if-swap-else : ∀ b c → (if b then x else (if c then x else y)) ≡ (if c then x else (if b then x else y))
307
+ if-not : ∀ b → (if not b then x else y) ≡ (if b then y else x)
308
+ if-∧ : ∀ b → (if b ∧ c then x else y) ≡ (if b then (if c then x else y) else y)
309
+ if-∨ : ∀ b → (if b ∨ c then x else y) ≡ (if b then x else (if c then x else y))
310
+ if-xor : ∀ b → (if b xor c then x else y) ≡ (if b then (if c then y else x) else (if c then x else y))
311
+ if-cong : b ≡ c → (if b then x else y) ≡ (if c then x else y)
312
+ if-cong-then : ∀ b → x ≡ z → (if b then x else y) ≡ (if b then z else y)
313
+ if-cong-else : ∀ b → y ≡ z → (if b then x else y) ≡ (if b then x else z)
314
+ if-cong₂ : ∀ b → x ≡ z → y ≡ w → (if b then x else y) ≡ (if b then z else w)
315
+ ```
316
+
242
317
* In ` Data.Fin.Base ` :
243
318
``` agda
244
319
_≰_ : Rel (Fin n) 0ℓ
245
320
_≮_ : Rel (Fin n) 0ℓ
321
+ lower : ∀ (i : Fin m) → .(toℕ i ℕ.< n) → Fin n
246
322
```
247
323
248
324
* In ` Data.Fin.Permutation ` :
249
325
``` agda
250
326
cast-id : .(m ≡ n) → Permutation m n
251
- swap : Permutation m n → Permutation (suc (suc m)) (suc (suc n) )
327
+ swap : Permutation m n → Permutation (2+ m) (2+ n )
252
328
```
253
329
254
330
* In ` Data.Fin.Properties ` :
255
331
``` agda
256
- cast-involutive : .(eq₁ : m ≡ n) .(eq₂ : n ≡ m) → ∀ k → cast eq₁ (cast eq₂ k) ≡ k
332
+ cast-involutive : .(eq₁ : m ≡ n) .(eq₂ : n ≡ m) → ∀ k → cast eq₁ (cast eq₂ k) ≡ k
333
+ inject!-injective : Injective _≡_ _≡_ inject!
334
+ inject!-< : (k : Fin′ i) → inject! k < i
335
+ lower-injective : lower i i<n ≡ lower j j<n → i ≡ j
336
+ injective⇒existsPivot : ∀ (f : Fin n → Fin m) → Injective _≡_ _≡_ f → ∀ (i : Fin n) → ∃ λ j → j ≤ i × i ≤ f j
257
337
```
258
338
259
339
* In ` Data.Fin.Subset ` :
@@ -355,6 +435,23 @@ Additions to existing modules
355
435
LeftInverse (I ×ₛ A) (J ×ₛ B)
356
436
```
357
437
438
+ * In ` Data.Vec.Properties ` :
439
+ ``` agda
440
+ toList-injective : ∀ {m n} → .(m=n : m ≡ n) → (xs : Vec A m) (ys : Vec A n) → toList xs ≡ toList ys → xs ≈[ m=n ] ys
441
+
442
+ toList-∷ʳ : ∀ x (xs : Vec A n) → toList (xs ∷ʳ x) ≡ toList xs List.++ List.[ x ]
443
+
444
+ fromList-reverse : (xs : List A) → (fromList (List.reverse xs)) ≈[ List.length-reverse xs ] reverse (fromList xs)
445
+
446
+ fromList∘toList : ∀ (xs : Vec A n) → fromList (toList xs) ≈[ length-toList xs ] xs
447
+ ```
448
+
449
+ * In ` Data.Product.Nary.NonDependent ` :
450
+ ``` agda
451
+ HomoProduct′ n f = Product n (stabulate n (const _) f)
452
+ HomoProduct n A = HomoProduct′ n (const A)
453
+ ```
454
+
358
455
* In ` Data.Vec.Relation.Binary.Pointwise.Inductive ` :
359
456
``` agda
360
457
zipWith-assoc : Associative _∼_ f → Associative (Pointwise _∼_) (zipWith {n = n} f)
@@ -364,17 +461,46 @@ Additions to existing modules
364
461
zipWith-cong : Congruent₂ _∼_ f → Pointwise _∼_ ws xs → Pointwise _∼_ ys zs → Pointwise _∼_ (zipWith f ws ys) (zipWith f xs zs)
365
462
```
366
463
464
+ * In ` Function.Nary.NonDependent.Base ` :
465
+ ``` agda
466
+ lconst l n = ⨆ l (lreplicate l n)
467
+ stabulate : ∀ n → (f : Fin n → Level) → (g : (i : Fin n) → Set (f i)) → Sets n (ltabulate n f)
468
+ sreplicate : ∀ n → Set a → Sets n (lreplicate n a)
469
+ ```
470
+
471
+ * In ` Relation.Binary.Consequences ` :
472
+ ``` agda
473
+ mono₂⇒monoˡ : Reflexive ≤₁ → Monotonic₂ ≤₁ ≤₂ ≤₃ f → LeftMonotonic ≤₂ ≤₃ f
474
+ mono₂⇒monoˡ : Reflexive ≤₂ → Monotonic₂ ≤₁ ≤₂ ≤₃ f → RightMonotonic ≤₁ ≤₃ f
475
+ monoˡ∧monoʳ⇒mono₂ : Transitive ≤₃ →
476
+ LeftMonotonic ≤₂ ≤₃ f → RightMonotonic ≤₁ ≤₃ f →
477
+ Monotonic₂ ≤₁ ≤₂ ≤₃ f
478
+ ```
479
+
367
480
* In ` Relation.Binary.Construct.Add.Infimum.Strict ` :
368
481
``` agda
369
482
<₋-accessible-⊥₋ : Acc _<₋_ ⊥₋
370
483
<₋-accessible[_] : Acc _<_ x → Acc _<₋_ [ x ]
371
484
<₋-wellFounded : WellFounded _<_ → WellFounded _<₋_
372
485
```
373
486
487
+ * In ` Relation.Binary.Definitions ` :
488
+ ``` agda
489
+ LeftMonotonic : Rel B ℓ₁ → Rel C ℓ₂ → (A → B → C) → Set _
490
+ RightMonotonic : Rel A ℓ₁ → Rel C ℓ₂ → (A → B → C) → Set _
491
+ ```
492
+
493
+ * In ` Relation.Nullary.Decidable ` :
494
+ ``` agda
495
+ dec-yes-recompute : (a? : Dec A) → .(a : A) → a? ≡ yes (recompute a? a)
496
+ ```
497
+
374
498
* In ` Relation.Nullary.Decidable.Core ` :
375
499
``` agda
376
500
⊤-dec : Dec {a} ⊤
377
501
⊥-dec : Dec {a} ⊥
502
+ recompute-irrelevant-id : (a? : Decidable A) → Irrelevant A →
503
+ (a : A) → recompute a? a ≡ a
378
504
```
379
505
380
506
* In ` Relation.Unary ` :
@@ -400,12 +526,18 @@ Additions to existing modules
400
526
``` agda
401
527
⊤-reflects : Reflects (⊤ {a}) true
402
528
⊥-reflects : Reflects (⊥ {a}) false
529
+ ```
403
530
404
531
* In ` Data.List.Relation.Unary.AllPairs.Properties ` :
405
532
``` agda
406
533
map⁻ : AllPairs R (map f xs) → AllPairs (R on f) xs
407
534
```
408
535
536
+ * In ` Data.List.Relation.Unary.Linked ` :
537
+ ``` agda
538
+ lookup : Transitive R → Linked R xs → Connected R (just x) (head xs) → ∀ i → R x (List.lookup xs i)
539
+ ```
540
+
409
541
* In ` Data.List.Relation.Unary.Unique.Setoid.Properties ` :
410
542
``` agda
411
543
map⁻ : Congruent _≈₁_ _≈₂_ f → Unique R (map f xs) → Unique S xs
@@ -415,3 +547,14 @@ Additions to existing modules
415
547
``` agda
416
548
map⁻ : Unique (map f xs) → Unique xs
417
549
```
550
+
551
+ * In ` Data.List.Relation.Unary.Sorted.TotalOrder.Properties ` :
552
+ ``` agda
553
+ lookup-mono-≤ : Sorted xs → i Fin.≤ j → lookup xs i ≤ lookup xs j
554
+ ↗↭↗⇒≋ : Sorted xs → Sorted ys → xs ↭ ys → xs ≋ ys
555
+ ```
556
+
557
+ * In ` Data.List.Sort.Base ` :
558
+ ``` agda
559
+ SortingAlgorithm.sort-↭ₛ : ∀ xs → sort xs Setoid.↭ xs
560
+ ```
0 commit comments