-
Notifications
You must be signed in to change notification settings - Fork 247
Modernise Data.Vec(.Properties)
#1673
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
Conversation
Data.Vec.Properties
Data.Vec(.Properties)
What is the corresponding situation ('modernised', or otherwise) for |
src/Data/Vec/Properties.agda
Outdated
zipWith-comm : ∀ (comm : ∀ x y → f x y ≡ f y x) (xs ys : Vec A n) → | ||
zipWith f xs ys ≡ zipWith f ys xs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kind of strange to be insisting on f
being commutative as opposed to
the more general constraint ∀ x y → f x y ≡ g y x
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generalised. At the time I was trying to lift algebraic structures over vectors, so I wasn't thinking in more general terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I guess now that we're not insisting on commutativity, we can also relax the type and have:
f : A → B → C
g : B → A → C
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generalised further!
Better, as they do get more attention. You could definitely go through |
While working on #1668 with @jamesmckinna I noticed that some of the code in
Data.Vec(.Properties)
is pretty ancient by the library standards. I've tried to modernise the code by:Relation.Binary.PropositionalEquality
unqualifiedBase
Should be a very nearly a no-op, modulo the movement of a couple of implicit arguments due to variables, a breakage which is acceptable in v2.0 I think.