-
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
Reconciling Data.Nat.Divisibility.Core._∣_
and Algebra.Definitions.RawMagma._∣_
#2115
Comments
Picking this up again on the back of #2604. There seem to be two directions to go in (once again:
Personally, I think that the latter is the better course of action, but may cause problems for external clients of TL;DR: heuristic should read complicated/unknown = simpler/known However, I think it is the better choice, because of the following refinement of the
For divisibility, I'm imagining that we want |
Suggest also, for technical reasons, that we do not export Or else that if we do want to retain the existing convention, that we make it a |
Please, remain the general |
I don't have much to add except that, for different reasons, both seem bad... |
I recall the story. Initially it was
(transpositions possible). Then it was changed and put to the official version without asking people. |
'both' meaning each of the two suggestions as to how to solve the DRY problem? I'm not sure whether you're really saying that abstract and concrete divisibility should remain apart... which doesn't seem right/desirable (to me, at least) |
@mechvel i shouldn't relitigate the earlier breaking change, except to say:
For better or worse, we are now in a phase of library development which goes beyond v2.0: v2.3 involving non-breaking, 'conservative' changed, and v3.0 as the opportunity to clean up a lot of suboptimal legacy design decisions, many of which have emerged over the course of the sustained scrutiny to which the library has been subjected since v1.* I'm sorry to hear that the v2.0 changes are still causing you problems, especially given that the v2.0 change to divisibility retained the shared constructor name |
a) I thought that |
@mechvel , regarding: c) do you mean problems with abstract divisibility, or concrete? I have already indicated above that while I may regard changing the latter in favour of the definition of the former as potentially less desirable than the other way round, if it minimises the knock-on consequences of this change, then fine by me. If both are affected, then it would be helpful to get an estimate of who much is affected in each direction, since the purpose of any PR fixing this issue would be to have a single, unitary definition applicable across both situations, and for historical/legacy reasons, this has sadly not been the case. b) it would be useful to understand how, and the extent, of the changes you had to make after the v2.0 change, either in terms of lines of code, or in terms of typechecking time, or in terms of the abstractions used in your library. One reason the previous change retained the a) this issue seems intractable unless we can agree sensible measures against which to judge 'best'. At the moment there is simply an impasse between conflicting views. Currently, this is (only) an open issue, without any accompanying PR on which to discuss details of the design decisions involved. But I think that in the long term, the standard library should aim to resolve this issue positively rather than maintain what are in effect two distinct codebases for the same concept, with all that that entails in terms of code duplication, maintenance overhead, etc. |
About `best': \ because But I do not know about the implementation possibilities. So, let the team decide, as always, you know better..
Nothing particular. Just many places have become errors, and I needed to import the divisibility items somewhat in a different way. I do not recall now, why. Maybe importing from
May be, the necessity to write
Earlier I wrote I do not recall, no real problems, just many places to fix in a simple way, and - without understanding, why,
How it was in lib-1.7.1 it can be seen in This small library must be type-checked - under the system required in readme.txt. How it is currently in my general library for computer algebra under lib-2.2, see in the This is not self-contained.
I pay attention only to abstract divisibility --- for Magma in general. As to Nat, Integer, Binary, they have the instances of multiplicative Magma and additive Magma. So each of them has two instances of the divisibility, and they do not need any special divisibility as open. Personally I do not use special divisibility on Nat, Integer, Binary.
This is annoying to write and read such pieces of code. Now you are going to do further changes. This is a certain danger. |
I am trying to understand what promises your phrase
"legacy -- A gift of property by will, ...". suboptimal -- close to optimal or in-optimal? Finally I applied the program translator to Russian, and now translate its result myself to English. "and v3.0 as a possibility to fix many in-optimal out of date design decisions, many of which have emerged over the course of the durable study to which the library has been subjected since v1.*" |
I wrote
As you are going to look into this source, your comments are welcome in general. |
Re: hard to understand English... Apologies for this! Hopefully the following is better (but it's hard for me to judge)
|
Re: v2.0 changes
should still have typechecked correctly. If they did not, then I am sorry, not least for only learning about this now. |
Re: the proposed changes here -- This is a fix _∣_ for ℕ in standard lib-2.0
∣adHoc⇒∣ : _∣adHoc_ ⇒ _∣_
∣adHoc⇒∣ (dividesℕ q y≡qx) = q , (sym y≡qx)
∣⇒∣adHoc : _∣_ ⇒ _∣adHoc_
∣⇒∣adHoc (q , qx≡y) = dividesℕ q (sym qx≡y) The larger scale proposal at the top considered also:
So it is useful to have your feedback on each of those. As to the issues regarding ongoing changes to the library, I regard this as inevitable given the continued growth and evolution of the library. What is harder to achieve in a volunteer, distributed effort such as |
I do not believe that the above two possible changes have sense. And even if they do, they do not worth the dispenses they would cause for users. |
The substance of the issue (for the additive fragment of Nat) is already discussed in #1919, but that issue can (should!) be closed by merging #1948. So this is a placeholder to work on this specific problem in the multiplicative fragment of Nat.
Carrying over the summary from #2013:
TwoThree parts to this:Data.Nat.*
(merged in ReconcilingData.Nat.Divisibility.Core._∣_
andAlgebra.Definitions.RawMagma._∣_
#2013)_∣_
for theData.Nat.Base.*-rawMagma
instanceData.Integer.Divisibility.*
andData.Rational.*
only if the preceding step succeedscf. #679
The text was updated successfully, but these errors were encountered: