Skip to content
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

lc for multivariates but lead for univariates #508

Closed
wbhart opened this issue Oct 16, 2019 · 8 comments
Closed

lc for multivariates but lead for univariates #508

wbhart opened this issue Oct 16, 2019 · 8 comments
Labels

Comments

@wbhart
Copy link
Contributor

wbhart commented Oct 16, 2019

We should unify these names, as it is not helpful for users.

See e.g. issue Nemocas/Nemo.jl#662

@fieker
Copy link
Contributor

fieker commented Oct 17, 2019 via email

@wbhart
Copy link
Contributor Author

wbhart commented Oct 17, 2019

You'll have to argue the toss with the Singular people. It's called lc because that's what they wanted. There's a whole series of these, lc, lm, lt, etc.

@fieker
Copy link
Contributor

fieker commented Oct 17, 2019 via email

@rfourquet
Copy link
Contributor

Not that I believe that my opinion matters, but I find that names like lc and lt is a no-go here in a quite general system. And it's not in line with many other names which limit abbrevations and are rather self descriptive, lead_coeff or leading_coefficient or leading_coeff (coeff is already a function) would fit better. If I'm not mistaken, even in Singular there is leadcoef instead of lc etc.

@wbhart
Copy link
Contributor Author

wbhart commented Oct 28, 2020

Ok, I agree with the changes here, but what was the response from the Singular people? Do we have permission to make this change? It removes what was essentially a feature request from Singular.jl (they explicitly wanted these names because they are used so often).

We need a final decision on this and I'll handle the PR's.

@wbhart
Copy link
Contributor Author

wbhart commented Oct 28, 2020

Note that in Nemo we currently have lead and trail:

julia> R, x = PolynomialRing(ZZ, "x")
(Univariate Polynomial Ring in x over Integer Ring, x)

julia> lead(2x^2 + 3x + 1)
2

julia> trail(2x^2 + 3x + 1)
1

so the changes will be more invasive if we go for lead_coeff and trail_coeff.

@wbhart
Copy link
Contributor Author

wbhart commented Jan 15, 2021

By the way, when there is an iterator, one can always do first(coeffs(f)) instead of lead_coeffs(f).

But note that univariates have terms in the reverse order to multivariates in a single variable (for lex ordering).

@fieker
Copy link
Contributor

fieker commented Jan 15, 2021

The Singular people (ie, THE BOSS) decided that leading_coefficient is fine and lc can become history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants