Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Added Z mod n as Fin #2073
Added Z mod n as Fin #2073
Changes from 15 commits
19566db
94d8aa9
c87e35a
af96faa
7e6a392
467b190
600035c
5cdbaf7
e64b543
d3d4770
1d28e8e
3773f2c
e853059
fccf44d
e7edaee
ab5493d
7ccd05e
644a8cb
417fa28
4d3a4ab
84cc27b
473ac6d
b539e70
aeb1c4a
bdf0651
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you give me an example of a use-case of this operation? Seems a little unnatural to me adding together two numbers of different mods and arbitrarily returning the result mod the right one?
And why does
_-_
return the result mod the left one?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.
This should be moved to a new file
Data.Fin.Mod.Induction
(i.e. along the lines of https://github.com/agda/agda-stdlib/blob/master/src/Data/Fin/Induction.agda).Also I think this proof should be strengthened. Surely this should hold for any
exists j . P j
, not justP zero
?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.
Anyone have any bright ideas for what this could be called? @jamesmckinna etc?
It should also live in
Data.Fin.Base
I think?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.
So, the abandoned #1847 , tackling #1686 , called this concept "homogeneous zero" (and its friend "homogeneous successor", on the model of
n : Nat, i : Fin n
being a 'homogeneous' telescope; of course, the{{NonZero n}}
precondition spoils things, but hey ;-)), and gave it the terrible namezero\'
in the PR.👍 to its being in
Data.Fin.Base
, as in that PR.Better name(s):
hzero
?zeroNZ
?zero⁺
?I ran out of mental strength/inspiration working on that PR, and I find it slightly hard to revisit the discussion/thought processes again now...