Fix error in membership test for rational functions
Fixes the inconsistency in #5993: For a function field F over a integral ring C, the membership test for F should check whether all coefficients lie in the fraction field of C (and not just in C). The reason is that F coincides with the function field over the fraction field of C.
Since it is not possible to obtain the fraction field from an integral ring in a direct way (I think), this uses a case distinction on C. If there are more integral rings C with the properties that
- The fraction field of
Cis implemented in GAP, - Elements of
Care also elements of the fraction field ofC,
then they should be added to this case distinction. The only examples I could think of are C = Integers and C a polynomial ring. (Probably also ring extensions of Integers, but I am not sure how to implement that.)
If there is a better way to implement this than by this case distinction, please let me know.
The case that C is a polynomial ring is theoretical: Currently polynomial rings over integral rings do not know that they are integral rings and hence function fields over such polynomial rings cannot be constructed. Once #5996 is merged, I will add tests for this case as well.
Text for release notes
none.
Once #5996 is merged, I will add tests for this case as well.
PR #5996 is now merged into master (so creating function fields over polynomial rings is now possible). Hence I wanted to rebase this PR's patch branch to the current master and then add the test cases for function fields over polynomial rings. This sort of worked, but now this PR contains a whole lot of other commits which happened in between. I'll look into it on Monday, sorry for the mess.
Maybe you did a git rebase master without first updating your local master to match the version of master on github
Maybe you did a
git rebase masterwithout first updating your local master to match the version of master on github
That was indeed the problem. It is fixed now, thanks for the help @fingolfin
The test file now contains tests for the case of polynomial rings as coefficient rings (and not only Integers) as well. This PR is good to go from my side now.