-
Notifications
You must be signed in to change notification settings - Fork 297
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
[Merged by Bors] - feat(field_theory): define the field of rational functions ratfunc
#9563
Conversation
/bikeshed: I would call this |
I've also only ever seen these as referred to as rational functions; Wikipedia agrees as well https://en.wikipedia.org/wiki/Rational_function |
ratpoly
ratfunc
I've searched-and-replaced everything from |
@Vierkantor I think this PR can also update the undergrad file: |
Good point, almost forgot! |
…ials (#9600) This PR provides a couple of lemmas involving the division and gcd operators of polynomials that I needed for #9563. The ones that generalized to `euclidean_domain` and/or `gcd_monoid` are provided in the respective files. Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
🎉 Great news! Looks like all the dependencies have been resolved:
💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
CI isn't happy |
Pretty sure it was one of the CI runners that failed/timed out - it worked on my machine. After restarting, it looks like it's building correctly again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
bors merge
…9563) This PR defines `ratfunc K` as the field of rational functions over a field `K`, in terms of `fraction_ring (polynomial K)`. I have been careful to use `structure`s and `@[irreducible] def`s. Not only does that make for a nicer API, it also helps quite a bit with unification since the check can stop at `ratfunc` and doesn't have to start unfolding along the lines of `fraction_field.field → localization.comm_ring → localization.comm_monoid → localization.has_mul` and/or `polynomial.integral_domain → polynomial.comm_ring → polynomial.ring → polynomial.semiring`. Most of the API is automatically derived from the (components of the) `is_fraction_ring` instance: the map `polynomial K → ratpoly K` is `algebra_map`, the isomorphism to `fraction_ring (polynomial K)` is `is_localization.alg_equiv`, ... As a first application to verify that the definitions work, I rewrote `function_field` in terms of `ratfunc`. Co-authored-by: Johan Commelin <johan@commelin.net>
bors merge (bors crashed) |
…9563) This PR defines `ratfunc K` as the field of rational functions over a field `K`, in terms of `fraction_ring (polynomial K)`. I have been careful to use `structure`s and `@[irreducible] def`s. Not only does that make for a nicer API, it also helps quite a bit with unification since the check can stop at `ratfunc` and doesn't have to start unfolding along the lines of `fraction_field.field → localization.comm_ring → localization.comm_monoid → localization.has_mul` and/or `polynomial.integral_domain → polynomial.comm_ring → polynomial.ring → polynomial.semiring`. Most of the API is automatically derived from the (components of the) `is_fraction_ring` instance: the map `polynomial K → ratpoly K` is `algebra_map`, the isomorphism to `fraction_ring (polynomial K)` is `is_localization.alg_equiv`, ... As a first application to verify that the definitions work, I rewrote `function_field` in terms of `ratfunc`. Co-authored-by: Johan Commelin <johan@commelin.net>
Pull request successfully merged into master. Build succeeded: |
ratfunc
ratfunc
This PR defines
ratfunc K
as the field of rational functions over a fieldK
, in terms offraction_ring (polynomial K)
. I have been careful to usestructure
s and@[irreducible] def
s. Not only does that make for a nicer API, it also helps quite a bit with unification since the check can stop atratfunc
and doesn't have to start unfolding along the lines offraction_field.field → localization.comm_ring → localization.comm_monoid → localization.has_mul
and/orpolynomial.integral_domain → polynomial.comm_ring → polynomial.ring → polynomial.semiring
.Most of the API is automatically derived from the (components of the)
is_fraction_ring
instance: the mappolynomial K → ratpoly K
isalgebra_map
, the isomorphism tofraction_ring (polynomial K)
isis_localization.alg_equiv
, ...As a first application to verify that the definitions work, I rewrote
function_field
in terms ofratfunc
.gcd
oncomm_group_with_zero
s #9602It turned into a big PR, so you might like to review the individual commits instead:
ratfunc
, show it is the fraction field ofpolynomial
function_field
num
,denom
,eval
,X
andC