@@ -414,47 +414,55 @@ Additions to existing modules
414414
415415* In ` Data.List.Properties ` :
416416 ``` agda
417- length-catMaybes : length (catMaybes xs) ≤ length xs
418- applyUpTo-∷ʳ : applyUpTo f n ∷ʳ f n ≡ applyUpTo f (suc n)
419- applyDownFrom-∷ʳ : applyDownFrom (f ∘ suc) n ∷ʳ f 0 ≡ applyDownFrom f (suc n)
420- upTo-∷ʳ : upTo n ∷ʳ n ≡ upTo (suc n)
421- downFrom-∷ʳ : applyDownFrom suc n ∷ʳ 0 ≡ downFrom (suc n)
422- reverse-selfInverse : SelfInverse {A = List A} _≡_ reverse
423- reverse-applyUpTo : reverse (applyUpTo f n) ≡ applyDownFrom f n
424- reverse-upTo : reverse (upTo n) ≡ downFrom n
425- reverse-applyDownFrom : reverse (applyDownFrom f n) ≡ applyUpTo f n
426- reverse-downFrom : reverse (downFrom n) ≡ upTo n
427- mapMaybe-map : mapMaybe f ∘ map g ≗ mapMaybe (f ∘ g)
428- map-mapMaybe : map g ∘ mapMaybe f ≗ mapMaybe (Maybe.map g ∘ f)
429- align-map : align (map f xs) (map g ys) ≡ map (map f g) (align xs ys)
430- zip-map : zip (map f xs) (map g ys) ≡ map (map f g) (zip xs ys)
431- unzipWith-map : unzipWith f ∘ map g ≗ unzipWith (f ∘ g)
432- map-unzipWith : map (map g) (map h) ∘ unzipWith f ≗ unzipWith (map g h ∘ f)
433- unzip-map : unzip ∘ map (map f g) ≗ map (map f) (map g) ∘ unzip
434- splitAt-map : splitAt n ∘ map f ≗ map (map f) (map f) ∘ splitAt n
435- uncons-map : uncons ∘ map f ≗ map (map f (map f)) ∘ uncons
436- last-map : last ∘ map f ≗ map f ∘ last
437- tail-map : tail ∘ map f ≗ map (map f) ∘ tail
438- mapMaybe-cong : f ≗ g → mapMaybe f ≗ mapMaybe g
439- zipWith-cong : (∀ a b → f a b ≡ g a b) → ∀ as → zipWith f as ≗ zipWith g as
440- unzipWith-cong : f ≗ g → unzipWith f ≗ unzipWith g
441- foldl-cong : (∀ x y → f x y ≡ g x y) → ∀ x → foldl f x ≗ foldl g x
442- alignWith-flip : alignWith f xs ys ≡ alignWith (f ∘ swap) ys xs
443- alignWith-comm : f ∘ swap ≗ f → alignWith f xs ys ≡ alignWith f ys xs
444- align-flip : align xs ys ≡ map swap (align ys xs)
445- zip-flip : zip xs ys ≡ map swap (zip ys xs)
446- unzipWith-swap : unzipWith (swap ∘ f) ≗ swap ∘ unzipWith f
447- unzip-swap : unzip ∘ map swap ≗ swap ∘ unzip
448- take-take : take n (take m xs) ≡ take (n ⊓ m) xs
449- take-drop : take n (drop m xs) ≡ drop m (take (m + n) xs)
450- zip-unzip : uncurry′ zip ∘ unzip ≗ id
451- unzipWith-zipWith : f ∘ uncurry′ g ≗ id → length xs ≡ length ys → unzipWith f (zipWith g xs ys) ≡ (xs , ys)
452- unzip-zip : length xs ≡ length ys → unzip (zip xs ys) ≡ (xs , ys)
453- mapMaybe-++ : mapMaybe f (xs ++ ys) ≡ mapMaybe f xs ++ mapMaybe f ys
454- unzipWith-++ : unzipWith f (xs ++ ys) ≡ zip _++_ _++_ (unzipWith f xs) (unzipWith f ys)
455- catMaybes-concatMap : catMaybes ≗ concatMap fromMaybe
456- catMaybes-++ : catMaybes (xs ++ ys) ≡ catMaybes xs ++ catMaybes ys
457- map-catMaybes : map f ∘ catMaybes ≗ catMaybes ∘ map (Maybe.map f)
417+ length-catMaybes : length (catMaybes xs) ≤ length xs
418+ applyUpTo-∷ʳ : applyUpTo f n ∷ʳ f n ≡ applyUpTo f (suc n)
419+ applyDownFrom-∷ʳ : applyDownFrom (f ∘ suc) n ∷ʳ f 0 ≡ applyDownFrom f (suc n)
420+ upTo-∷ʳ : upTo n ∷ʳ n ≡ upTo (suc n)
421+ downFrom-∷ʳ : applyDownFrom suc n ∷ʳ 0 ≡ downFrom (suc n)
422+ reverse-selfInverse : SelfInverse {A = List A} _≡_ reverse
423+ reverse-applyUpTo : reverse (applyUpTo f n) ≡ applyDownFrom f n
424+ reverse-upTo : reverse (upTo n) ≡ downFrom n
425+ reverse-applyDownFrom : reverse (applyDownFrom f n) ≡ applyUpTo f n
426+ reverse-downFrom : reverse (downFrom n) ≡ upTo n
427+ mapMaybe-map : mapMaybe f ∘ map g ≗ mapMaybe (f ∘ g)
428+ map-mapMaybe : map g ∘ mapMaybe f ≗ mapMaybe (Maybe.map g ∘ f)
429+ align-map : align (map f xs) (map g ys) ≡ map (map f g) (align xs ys)
430+ zip-map : zip (map f xs) (map g ys) ≡ map (map f g) (zip xs ys)
431+ unzipWith-map : unzipWith f ∘ map g ≗ unzipWith (f ∘ g)
432+ map-unzipWith : map (map g) (map h) ∘ unzipWith f ≗ unzipWith (map g h ∘ f)
433+ unzip-map : unzip ∘ map (map f g) ≗ map (map f) (map g) ∘ unzip
434+ splitAt-map : splitAt n ∘ map f ≗ map (map f) (map f) ∘ splitAt n
435+ uncons-map : uncons ∘ map f ≗ map (map f (map f)) ∘ uncons
436+ last-map : last ∘ map f ≗ map f ∘ last
437+ tail-map : tail ∘ map f ≗ map (map f) ∘ tail
438+ mapMaybe-cong : f ≗ g → mapMaybe f ≗ mapMaybe g
439+ zipWith-cong : (∀ a b → f a b ≡ g a b) → ∀ as → zipWith f as ≗ zipWith g as
440+ unzipWith-cong : f ≗ g → unzipWith f ≗ unzipWith g
441+ foldl-cong : (∀ x y → f x y ≡ g x y) → ∀ x → foldl f x ≗ foldl g x
442+ alignWith-flip : alignWith f xs ys ≡ alignWith (f ∘ swap) ys xs
443+ alignWith-comm : f ∘ swap ≗ f → alignWith f xs ys ≡ alignWith f ys xs
444+ align-flip : align xs ys ≡ map swap (align ys xs)
445+ zip-flip : zip xs ys ≡ map swap (zip ys xs)
446+ unzipWith-swap : unzipWith (swap ∘ f) ≗ swap ∘ unzipWith f
447+ unzip-swap : unzip ∘ map swap ≗ swap ∘ unzip
448+ take-take : take n (take m xs) ≡ take (n ⊓ m) xs
449+ take-drop : take n (drop m xs) ≡ drop m (take (m + n) xs)
450+ zip-unzip : uncurry′ zip ∘ unzip ≗ id
451+ unzipWith-zipWith : f ∘ uncurry′ g ≗ id →
452+ length xs ≡ length ys →
453+ unzipWith f (zipWith g xs ys) ≡ (xs , ys)
454+ unzip-zip : length xs ≡ length ys → unzip (zip xs ys) ≡ (xs , ys)
455+ mapMaybe-++ : mapMaybe f (xs ++ ys) ≡ mapMaybe f xs ++ mapMaybe f ys
456+ unzipWith-++ : unzipWith f (xs ++ ys) ≡
457+ zip _++_ _++_ (unzipWith f xs) (unzipWith f ys)
458+ catMaybes-concatMap : catMaybes ≗ concatMap fromMaybe
459+ catMaybes-++ : catMaybes (xs ++ ys) ≡ catMaybes xs ++ catMaybes ys
460+ map-catMaybes : map f ∘ catMaybes ≗ catMaybes ∘ map (Maybe.map f)
461+ Any-catMaybes⁺ : Any (M.Any P) xs → Any P (catMaybes xs)
462+ mapMaybeIsInj₁∘mapInj₁ : mapMaybe isInj₁ (map inj₁ xs) ≡ xs
463+ mapMaybeIsInj₁∘mapInj₂ : mapMaybe isInj₁ (map inj₂ xs) ≡ []
464+ mapMaybeIsInj₂∘mapInj₂ : mapMaybe isInj₂ (map inj₂ xs) ≡ xs
465+ mapMaybeIsInj₂∘mapInj₁ : mapMaybe isInj₂ (map inj₁ xs) ≡ []
458466 ```
459467
460468* In ` Data.List.Relation.Binary.Sublist.Setoid.Properties ` :
@@ -567,7 +575,15 @@ Additions to existing modules
567575
568576* Added new proofs to ` Data.List.Relation.Binary.Permutation.Propositional.Properties ` :
569577 ``` agda
570- product-↭ : product Preserves _↭_ ⟶ _≡_
578+ product-↭ : product Preserves _↭_ ⟶ _≡_
579+ catMaybes-↭ : xs ↭ ys → catMaybes xs ↭ catMaybes ys
580+ mapMaybe-↭ : xs ↭ ys → mapMaybe f xs ↭ mapMaybe f ys
581+ ```
582+
583+ * Added new proofs to ` Data.List.Relation.Binary.Permutation.Setoid.Properties.Maybe ` :
584+ ``` agda
585+ catMaybes-↭ : xs ↭ ys → catMaybes xs ↭ catMaybes ys
586+ mapMaybe-↭ : xs ↭ ys → mapMaybe f xs ↭ mapMaybe f ys
571587 ```
572588
573589* In ` Data.Rational.Properties ` :
0 commit comments