-
Notifications
You must be signed in to change notification settings - Fork 246
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
Data.Parity
as per issue #1851
#1852
Conversation
Looks good to me. Left some comments. To be honest, this looks like a good size PR. If we resolve my comments above, then I'm happy to merge this in and then leave the morphisms to a second PR.
Having |
OK, @MatthewDaggitt thanks for the comments, and the suggestion to slice the PR up. |
Feel free to open an issue dedicated especially to discussing this issue, with your proposal and we can have a discussion 👍 I agree, it's definitely something worth thinking about! |
Removed duplicate bundles, and renamed according to the scheme in |
I didn't know how to manage all the equation/inequational reasoning in |
@jamesmckinna I thought we had (twice!) agreed that we weren't going to add anything more to this PR? Please could remove the last commit from branch, so that I can merge it in without having to go put the whole thing through any more review cycles. As discussed, we can then open a new PR with the second set of additions. |
Ooops. How to I reverse out of this? |
I think, as well, that the subtlety of how 'agreement' is arrived at as to the size of a PR is clearer to you than to me. And of course, enthusiasm to finish a task carried me away somewhat... |
IGNORE (SEE BELOW): I tend to use
So a PR should be opened as a request for comment/approval on a "completed" unit of work. Obviously some changes may be made in response to the comments, but the ideally the core contribution of the PR should not change. The problem with continuously adding to an open PR is that it becomes very difficult to the reviewers to re-review things efficiently, as they don't know how it interacts with what was already in the PR, so they often end up having to look through the previously reviewed stuff again. Yes, it's possible to view the subsequent commits individually, but it is still difficult to then mentally map those on to the final code that is going to be committed. |
Sorry, this was bad advice! That only works when you're working on a private local branch. If the branch is shared, then it is problematic as it changes the history. You're right, |
This reverts commit d2a404e.
Hope that worked, and apologies for (once again) blundering around/treading on toes. No need on your part to apologise for the |
No worries, all looks good now! Thanks for making the requested changes 👍 |
UPDATED:
Parity
admits a commutative semiring structure (with0
=0ℙ
;1
=1ℙ
etc.)parity
fromNat
toParity
inData.Nat.Base
toSign
fromParity
toSign
fromSign
fromSign
toParity
(toSign, fromSign)
form an abelian group iso from(Parity, 0, _+_)
to(Sign, +, _*_)
Data.Sign
etc. to reflect new names for algebraic structures/bundles, cf. issueData.Integer.Properties.+-isAbelianGroup
should be called+-0-isAbelianGroup
#1844 and in line with review comments on current PRCHANGELOG
Not TODO (for subsequent PR):
parity
is a commutative semiring homomorphism fromNat
toParity
[fixes #1894] parity is a semiring homomorphism #19040, 1, 2+ n
pattern analysis of aNat
argument takes place (esp. wrtN{-}ary
operations andReflection
, as well as the obviousBinary
andNat
examples); but see this branch and PR rationalise use ofsuc (suc n)
andsuc n@(suc _)
patterns throughout; remove2+ _
pattern #1870