-
Notifications
You must be signed in to change notification settings - Fork 245
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.Nat.Base._≤″_
and Algebra.Definitions.RawMagma._∣_
#1919
Comments
Data.Nat.Base._≤″_
and Algebra.Definitions.RawMagma._|_
Data.Nat.Base._≤″_
and Algebra.Definitions.RawMagma._∣_
Oh... and the underlying adjunction structure across the ordering to define monus, quotient, etc. |
So I'm quite pro having alternate representation of things, but I'm not fond of stuffing them all in So, for me:
|
Jacques, But the issue here is that, for this definition of Now these considerations are not inessential ... so the 'issue' at hand for me is about clarifying, simplifying, and improving the abstract interface given by their common semantics (instantiated at different magma structures, to be sure, but that's the only point of variation), and only specialising the pragmatic aspects in each deployment context. TL:DR Better reuse through better abstraction! |
I did not understand that the main point of this issue are those inessential differences. Your comment above laid them out somewhat more clearly, but could you do so even more explicitly? Github markdown allows you to link to source code spans, which go a very long way towards being precise about describing such issues in detail. |
Thanks for the edits: I now understand the issue much better. I've basically already written up my (shared) opinion in the paper Realms: A Structure for Consolidating Knowledge about Mathematical Theories. TL;DR: I think that this kind of duplication is good. We know that there are many settings where there are equivalent presentations of concepts, but the presentations have inequivalent usability profiles, i.e. in different contexts, one may wish to switch which presentation is smoother to work with. The road to getting a system where one can smoothly choose between equivalent presentation requires a lot of engineering still (don't listen to the HoTT folks who say that the Structure Identity Principle (SIP) says the problem's solved -- SIP merely says that in a nice enough meta-theory, a solution is theoretically well-founded and may be feasible and then stops dead. Realms encompass a broader view of 'equivalence' as well.) One of the interesting things about Lean is that there's 100:1 library developers to system developers. Another interesting thing is that the system developers pay really close attention to what is stopping the library developers from being even more productive and change the system to improve things. And it is done correctly: the system developers don't give the library developers what they say they need, but rather what they seem to actually need, distilled through the 'good taste' of highly experienced language developers. Coming back from that side-comment to the issue at hand: I do think kind of duplication is a good thing. And that we don't quite know how to make it all 'work'. And that it will require experimentation. Picking a single "blessed" representation is, as far as I'm concerned, a false choice. Picking a "principal" representation to go into In the far future, should we have all sorts of meta-programming-like features that let us navigate these waters smoothly? Absolutely! Are we close? Nope. We don't even really know what the spec is, we just have a whole lot of examples. |
Hmmm. I think we might still be at cross-purposes, inasmuch as I don't mind the lack of a 'single "blessed" representation' of ... well anything really. But as I say in my opening remarks on the 'issue' (perhaps it isn't one any more, from your point of view), I find it strange to encounter 'abstract divisibility orderings' in various guises in concrete instances (wherever they may happen to have been put), without being able to recognise them as such, along with their (cf. Lambek calculus) properties (which do live under
Perhaps this comes from a too-early exposure to Mathematics Made Difficult ... before I could see the joke. |
Ah yes, now I see where you're coming from, I think. Let me rephrase: Should we prove many things using as simple as possible proofs, without leaving any traces that the deeper reason it is true? It's a very tempting, very slippery slope, to obtain many (many!) results by instantiating various levels of abstract nonsense. It helps hugely with the size of the code base, and the overall maintenance effort (there's just fewer things to prove). It also hinders two things a lot:
You can't learn anything from reading Coq proofs, not unless you've invested a huge amount of time in it. There are extremely few printed-on-paper Coq proofs because of this. They are 'only' understandable when interactively replayed. (Oversimplification, I know.) Agda proofs, on the other hand, are frequently quite readable, at least if the author made some effort to make them so. Instantiating from the 'true' result in higher mathematics has a strong pull for me. I have resisted doing so. It would be a very interesting experiment indeed. My current feeling: it would be a neat |
Yes, perhaps, but even more so than you describe: it's not, for me, even about proofs, but about definitions... |
Ah, indeed - I'm on board for that as well. |
Can you link in to the exact clashing lines? I'm not immediately seeing the clash. |
Added line refs above. In My tentative proposal would be to reverse the direction in
Contra:
|
Certainly having to use Oddly, I would be tempted to flip the one in |
(More) Food for thought; if one were to keep the |
I like the idea - but I think this is really an Agda-level design discussion. Having easy access to "conservative extensions" is nice, especially if the system knows that it is definitional. I'd hate to open the door for people to store incoherent proofs because we intended these to be 'caches'. |
So...
... part of issue #1726 was a concern about the proliferation of (allegedly) useful variants on the usual ordering relation on
Nat
s. Yet another one of these,_≤″_
, is nothing more or less than the (abstract, algebraic) divisibility ordering induced by the (raw)_+_, _≡_
-monoid (magma) structure, while (usual) divisibility is... the same for the (raw)_*_, _≡_
-m... structure...... three distinct representations of the 'same' algebraic concept, differing even up to the direction of the underlying equality,
record
s vs.∃
for packaging up the data, different field names, ... etc.Now that
Data.X.Base
modules #1810 (for better or worse) expose their underlyingRaw
structure/bundle(s), ... Is it time to reconsider whether the above (non-)duplication is A Good Thing?UPDATED: Aaargh! I've just discovered that this would be a reversion (and then some) of #192 / #196 ... groan.
But I think the original reasons for that issue/PR no longer hold, not because the semantics of pattern-matching (and
let
in particular wrt records) has got so much more sophisticated since 2017... and the change proposed here, and embarked upon in #2013 is 'only' to replace a custom record with a Σ-type, so I don't think it should cause a problem?... still: 🤦 those who forget the (lessons/mistakes of the) past are condemned to repeat them...
[deleted: attached to the wrong issue]
The text was updated successfully, but these errors were encountered: