Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All P $ map f xs ←→ All (P ∘ f) xs #11

Closed
mechvel opened this issue Mar 2, 2014 · 2 comments
Closed

All P $ map f xs ←→ All (P ∘ f) xs #11

mechvel opened this issue Mar 2, 2014 · 2 comments

Comments

@mechvel
Copy link
Contributor

mechvel commented Mar 2, 2014

Does Standard library need to implement

        all∘ :  ... →  All P (map f xs)  ←→ All (P ∘ f) xs

?
(is it somehow by All.map ?)

@andreasabel
Copy link
Member

Isn't that already in Data.List.All.Properties ?

map-All : ∀ {a b p} {A : Set a} {B : Set b} {P : B → Set p}
{f : A → B} {xs} →
All P (List.map f xs) → All (P ∘ f) xs
map-All {xs = []} [] = []
map-All {xs = _ ∷ _} (p ∷ ps) = p ∷ map-All ps

@mechvel
Copy link
Contributor Author

mechvel commented Mar 2, 2014

On Sun, 2014-03-02 at 07:41 -0800, Andreas Abel wrote:

Isn't that already in Data.List.All.Properties ?

map-All : ∀ {a b p} {A : Set a} {B : Set b} {P : B → Set p}
{f : A → B} {xs} →
All P (List.map f xs) → All (P ∘ f) xs
map-All {xs = []} [] = []
map-All {xs = _ ∷ _} (p ∷ ps) = p ∷ map-All ps


Reply to this email directly or view it on GitHub.

Yes, map-All and All-map do this.

Thank you.


Sergei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants