File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ Other minor additions
40
40
41
41
* Added ` Reflection.TypeChecking.Format.errorPartFmt ` .
42
42
43
+ * Added new properties to ` Data.List.Properties ` :
44
+ ``` agda
45
+ concat-++ : concat xss ++ concat yss ≡ concat (xss ++ yss)
46
+ concat-concat : concat ∘ map concat ≗ concat ∘ concat
47
+ concat-[-] : concat ∘ map [_] ≗ id
48
+ ```
49
+
43
50
* Added new records to ` Algebra.Bundles ` :
44
51
``` agda
45
52
RawNearSemiring c ℓ : Set (suc (c ⊔ ℓ))
Original file line number Diff line number Diff line change @@ -496,6 +496,22 @@ concat-map {f = f} xss = begin
496
496
foldr (λ ys → map f ys ++_) [] xss ≡⟨ sym (foldr-fusion (map f) [] (map-++-commute f) xss) ⟩
497
497
map f (concat xss) ∎
498
498
499
+ concat-++ : (xss yss : List (List A)) → concat xss ++ concat yss ≡ concat (xss ++ yss)
500
+ concat-++ [] yss = refl
501
+ concat-++ ([] ∷ xss) yss = concat-++ xss yss
502
+ concat-++ ((x ∷ xs) ∷ xss) yss = cong (x ∷_) (concat-++ (xs ∷ xss) yss)
503
+
504
+ concat-concat : concat {A = A} ∘ map concat ≗ concat ∘ concat
505
+ concat-concat [] = refl
506
+ concat-concat (xss ∷ xsss) = begin
507
+ concat (map concat (xss ∷ xsss)) ≡⟨ cong (concat xss ++_) (concat-concat xsss) ⟩
508
+ concat xss ++ concat (concat xsss) ≡⟨ concat-++ xss (concat xsss) ⟩
509
+ concat (concat (xss ∷ xsss)) ∎
510
+
511
+ concat-[-] : concat {A = A} ∘ map [_] ≗ id
512
+ concat-[-] [] = refl
513
+ concat-[-] (x ∷ xs) = cong (x ∷_) (concat-[-] xs)
514
+
499
515
------------------------------------------------------------------------
500
516
-- sum
501
517
You can’t perform that action at this time.
0 commit comments