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

Specifying parent for minpoly and charpoly #4520

Open
fingolfin opened this issue Jan 29, 2025 · 0 comments
Open

Specifying parent for minpoly and charpoly #4520

fingolfin opened this issue Jan 29, 2025 · 0 comments

Comments

@fingolfin
Copy link
Member

The parent ring for minimal and characteristic polynomial is in general specified by passing it as the first argument of these functions.

There is one exception where one can also pass it as a kwarg:

function characteristic_polynomial(M::Matroid;
           parent::ZZPolyRing = polynomial_ring(ZZ, :q; cached = false)[1])
  return (-1)^rank(M) * tutte_polynomial(M)(1 - gen(parent), 0)
end

We had a long discussion about this back in the day...

I still think there is merit to allowing this variant, but it is really confusing that we only allow it in this one instance. It'd be better if we allowed this in general.

To do so, we'd have to modify all single argument versions of those two to accept an optional additional kwarg.

If my proposal in #4518 is implemented, there'd be only a few (or even only one) 1-arg method each, so adding the optional parent kwarg in that case would be trivial.

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

No branches or pull requests

1 participant