Add Number literals for any SuccessorSet#2406
Add Number literals for any SuccessorSet#2406jamesmckinna wants to merge 11 commits intoagda:masterfrom
Number literals for any SuccessorSet#2406Conversation
JacquesCarette
left a comment
There was a problem hiding this comment.
Tiny tweak and a question.
|
A potential problem (but not, perhaps, in practice?): the
will be distinct: the second, in particular, will be (needlessly) more strict in its implementation of Is this a genuine problem? If so, what's the 'best' way to finesse this, except via separate, 'hand-cut' implementations of |
|
I do wonder if this is a genuine problem, at least in the context of Agda. [It might be!] It feels like a conundrum that is more philosophical: is stdlib trying to support prove-first-program-second Agda, or something else? There's a different library for program-first-prove-sometimes for Agda. Of course, the most interesting would be prove-AND-program, with a purposefully symmetric operator in there. Agda sure doesn't feel ready for that. |
Returning to this comment, I wondered a lot about the first part: The second part, I don't really understand at all: how would we get a symmetric operator out of |
You are quite right that, structurally, stdlib feels program-first. But it is proof-first in its actual details, for the most part, i.e. the definitions in
My bad, what I wrote was not clear: I mean that 'AND' to be at the meta-level, to be a symmetric operation on 'prove' and 'program' as concepts! |
|
Back to the philosophical question: of course it makes no difference for Accordingly, I suggest either merging this now, or else putting to draft while I add all the |
|
Merging this now probably makes sense, but I'd want a concurring opinion - perhaps @gallais who has already looked at it? |
|
@gallais this is one we missed in our meeting on Friday. Are you willing to approve/merge? |
MatthewDaggitt
left a comment
There was a problem hiding this comment.
As this is something that can't be reasoned about internally in Agda, I'd be willing to approve if we added some test cases somewhere? Either in a private block, or more ideally in a very short README file?
|
I'll try to come back to this soon, after I've cleared a lot of other cruft out of my head, and can page this one back in. But it's not a deal-breaker for v2.2., so happy to push back (to v2.3 or v3.0) if that's helpful? |
|
I'm going to shelve this, as I'm not even sure now about the design, and not quite sure how best to fulfil @MatthewDaggitt 's request for 'test' data... |
For the future if this is revisited, I would take a |
|
Thanks @MatthewDaggitt for the steer. |
|
I mean if we don't have a compelling use case, then I'm not sure if we should be adding them. So in that sense, yes happy to leave this as draft and revisit later. |
Fixes #1363
NB:
Algebra.Literalsrather thanAlgebra.Structures.LiteralsAlgebra.Bundles.SuccessorSetfromℕ, rather than defining that as the unique morphism fromAlgebra.Construct.Initial.SuccessorSetUPDATED: made the definition local, to future-proof the APISuccessorSetand associated boilerplate #2277 adds no new{Is}SuccessorSetstructures/bundles to existingAlgebra.*norData.*in order to be able to createNumberinstances; cf. discussion on the issue as to where/how to create the 'right' ones so that they are consistently implemented across the whole*Ring*hierarchy in such a way as to have the 'right' properties...Issue:
moduleparameter be supplied as aninstance? as aRawSuccessorSet?Could be v2.1 or v2.2?