@@ -343,47 +343,54 @@ Additions to existing modules
343343
344344* In ` Data.List.Properties ` :
345345 ``` agda
346- length-catMaybes : length (catMaybes xs) ≤ length xs
347- applyUpTo-∷ʳ : applyUpTo f n ∷ʳ f n ≡ applyUpTo f (suc n)
348- applyDownFrom-∷ʳ : applyDownFrom (f ∘ suc) n ∷ʳ f 0 ≡ applyDownFrom f (suc n)
349- upTo-∷ʳ : upTo n ∷ʳ n ≡ upTo (suc n)
350- downFrom-∷ʳ : applyDownFrom suc n ∷ʳ 0 ≡ downFrom (suc n)
351- reverse-selfInverse : SelfInverse {A = List A} _≡_ reverse
352- reverse-applyUpTo : reverse (applyUpTo f n) ≡ applyDownFrom f n
353- reverse-upTo : reverse (upTo n) ≡ downFrom n
354- reverse-applyDownFrom : reverse (applyDownFrom f n) ≡ applyUpTo f n
355- reverse-downFrom : reverse (downFrom n) ≡ upTo n
356- mapMaybe-map : mapMaybe f ∘ map g ≗ mapMaybe (f ∘ g)
357- map-mapMaybe : map g ∘ mapMaybe f ≗ mapMaybe (Maybe.map g ∘ f)
358- align-map : align (map f xs) (map g ys) ≡ map (map f g) (align xs ys)
359- zip-map : zip (map f xs) (map g ys) ≡ map (map f g) (zip xs ys)
360- unzipWith-map : unzipWith f ∘ map g ≗ unzipWith (f ∘ g)
361- map-unzipWith : map (map g) (map h) ∘ unzipWith f ≗ unzipWith (map g h ∘ f)
362- unzip-map : unzip ∘ map (map f g) ≗ map (map f) (map g) ∘ unzip
363- splitAt-map : splitAt n ∘ map f ≗ map (map f) (map f) ∘ splitAt n
364- uncons-map : uncons ∘ map f ≗ map (map f (map f)) ∘ uncons
365- last-map : last ∘ map f ≗ map f ∘ last
366- tail-map : tail ∘ map f ≗ map (map f) ∘ tail
367- mapMaybe-cong : f ≗ g → mapMaybe f ≗ mapMaybe g
368- zipWith-cong : (∀ a b → f a b ≡ g a b) → ∀ as → zipWith f as ≗ zipWith g as
369- unzipWith-cong : f ≗ g → unzipWith f ≗ unzipWith g
370- foldl-cong : (∀ x y → f x y ≡ g x y) → ∀ x → foldl f x ≗ foldl g x
371- alignWith-flip : alignWith f xs ys ≡ alignWith (f ∘ swap) ys xs
372- alignWith-comm : f ∘ swap ≗ f → alignWith f xs ys ≡ alignWith f ys xs
373- align-flip : align xs ys ≡ map swap (align ys xs)
374- zip-flip : zip xs ys ≡ map swap (zip ys xs)
375- unzipWith-swap : unzipWith (swap ∘ f) ≗ swap ∘ unzipWith f
376- unzip-swap : unzip ∘ map swap ≗ swap ∘ unzip
377- take-take : take n (take m xs) ≡ take (n ⊓ m) xs
378- take-drop : take n (drop m xs) ≡ drop m (take (m + n) xs)
379- zip-unzip : uncurry′ zip ∘ unzip ≗ id
380- unzipWith-zipWith : f ∘ uncurry′ g ≗ id → length xs ≡ length ys → unzipWith f (zipWith g xs ys) ≡ (xs , ys)
381- unzip-zip : length xs ≡ length ys → unzip (zip xs ys) ≡ (xs , ys)
382- mapMaybe-++ : mapMaybe f (xs ++ ys) ≡ mapMaybe f xs ++ mapMaybe f ys
383- unzipWith-++ : unzipWith f (xs ++ ys) ≡ zip _++_ _++_ (unzipWith f xs) (unzipWith f ys)
384- catMaybes-concatMap : catMaybes ≗ concatMap fromMaybe
385- catMaybes-++ : catMaybes (xs ++ ys) ≡ catMaybes xs ++ catMaybes ys
386- map-catMaybes : map f ∘ catMaybes ≗ catMaybes ∘ map (Maybe.map f)
346+ length-catMaybes : length (catMaybes xs) ≤ length xs
347+ applyUpTo-∷ʳ : applyUpTo f n ∷ʳ f n ≡ applyUpTo f (suc n)
348+ applyDownFrom-∷ʳ : applyDownFrom (f ∘ suc) n ∷ʳ f 0 ≡ applyDownFrom f (suc n)
349+ upTo-∷ʳ : upTo n ∷ʳ n ≡ upTo (suc n)
350+ downFrom-∷ʳ : applyDownFrom suc n ∷ʳ 0 ≡ downFrom (suc n)
351+ reverse-selfInverse : SelfInverse {A = List A} _≡_ reverse
352+ reverse-applyUpTo : reverse (applyUpTo f n) ≡ applyDownFrom f n
353+ reverse-upTo : reverse (upTo n) ≡ downFrom n
354+ reverse-applyDownFrom : reverse (applyDownFrom f n) ≡ applyUpTo f n
355+ reverse-downFrom : reverse (downFrom n) ≡ upTo n
356+ mapMaybe-map : mapMaybe f ∘ map g ≗ mapMaybe (f ∘ g)
357+ map-mapMaybe : map g ∘ mapMaybe f ≗ mapMaybe (Maybe.map g ∘ f)
358+ align-map : align (map f xs) (map g ys) ≡ map (map f g) (align xs ys)
359+ zip-map : zip (map f xs) (map g ys) ≡ map (map f g) (zip xs ys)
360+ unzipWith-map : unzipWith f ∘ map g ≗ unzipWith (f ∘ g)
361+ map-unzipWith : map (map g) (map h) ∘ unzipWith f ≗ unzipWith (map g h ∘ f)
362+ unzip-map : unzip ∘ map (map f g) ≗ map (map f) (map g) ∘ unzip
363+ splitAt-map : splitAt n ∘ map f ≗ map (map f) (map f) ∘ splitAt n
364+ uncons-map : uncons ∘ map f ≗ map (map f (map f)) ∘ uncons
365+ last-map : last ∘ map f ≗ map f ∘ last
366+ tail-map : tail ∘ map f ≗ map (map f) ∘ tail
367+ mapMaybe-cong : f ≗ g → mapMaybe f ≗ mapMaybe g
368+ zipWith-cong : (∀ a b → f a b ≡ g a b) → ∀ as → zipWith f as ≗ zipWith g as
369+ unzipWith-cong : f ≗ g → unzipWith f ≗ unzipWith g
370+ foldl-cong : (∀ x y → f x y ≡ g x y) → ∀ x → foldl f x ≗ foldl g x
371+ alignWith-flip : alignWith f xs ys ≡ alignWith (f ∘ swap) ys xs
372+ alignWith-comm : f ∘ swap ≗ f → alignWith f xs ys ≡ alignWith f ys xs
373+ align-flip : align xs ys ≡ map swap (align ys xs)
374+ zip-flip : zip xs ys ≡ map swap (zip ys xs)
375+ unzipWith-swap : unzipWith (swap ∘ f) ≗ swap ∘ unzipWith f
376+ unzip-swap : unzip ∘ map swap ≗ swap ∘ unzip
377+ take-take : take n (take m xs) ≡ take (n ⊓ m) xs
378+ take-drop : take n (drop m xs) ≡ drop m (take (m + n) xs)
379+ zip-unzip : uncurry′ zip ∘ unzip ≗ id
380+ unzipWith-zipWith : f ∘ uncurry′ g ≗ id → length xs ≡
381+ length ys → unzipWith f (zipWith g xs ys) ≡ (xs , ys)
382+ unzip-zip : length xs ≡ length ys → unzip (zip xs ys) ≡ (xs , ys)
383+ mapMaybe-++ : mapMaybe f (xs ++ ys) ≡ mapMaybe f xs ++ mapMaybe f ys
384+ unzipWith-++ : unzipWith f (xs ++ ys) ≡
385+ zip _++_ _++_ (unzipWith f xs) (unzipWith f ys)
386+ catMaybes-concatMap : catMaybes ≗ concatMap fromMaybe
387+ catMaybes-++ : catMaybes (xs ++ ys) ≡ catMaybes xs ++ catMaybes ys
388+ map-catMaybes : map f ∘ catMaybes ≗ catMaybes ∘ map (Maybe.map f)
389+ Any-catMaybes⁺ : Any (M.Any P) xs → Any P (catMaybes xs)
390+ mapMaybeIsInj₁∘mapInj₁ : mapMaybe isInj₁ (map inj₁ xs) ≡ xs
391+ mapMaybeIsInj₁∘mapInj₂ : mapMaybe isInj₁ (map inj₂ xs) ≡ []
392+ mapMaybeIsInj₂∘mapInj₂ : mapMaybe isInj₂ (map inj₂ xs) ≡ xs
393+ mapMaybeIsInj₂∘mapInj₁ : mapMaybe isInj₂ (map inj₁ xs) ≡ []
387394 ```
388395
389396* In ` Data.List.Relation.Binary.Sublist.Setoid.Properties ` :
@@ -496,7 +503,15 @@ Additions to existing modules
496503
497504* Added new proofs to ` Data.List.Relation.Binary.Permutation.Propositional.Properties ` :
498505 ``` agda
499- product-↭ : product Preserves _↭_ ⟶ _≡_
506+ product-↭ : product Preserves _↭_ ⟶ _≡_
507+ catMaybes-↭ : xs ↭ ys → catMaybes xs ↭ catMaybes ys
508+ mapMaybe-↭ : xs ↭ ys → mapMaybe f xs ↭ mapMaybe f ys
509+ ```
510+
511+ * Added new proofs to ` Data.List.Relation.Binary.Permutation.Setoid.Properties.Maybe ` :
512+ ``` agda
513+ catMaybes-↭ : xs ↭ ys → catMaybes xs ↭ catMaybes ys
514+ mapMaybe-↭ : xs ↭ ys → mapMaybe f xs ↭ mapMaybe f ys
500515 ```
501516
502517* Added new functions in ` Data.String.Base ` :
0 commit comments