Skip to content

Commit

Permalink
gh-38732: sage.rings.function_field: Update # needs
Browse files Browse the repository at this point in the history
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->

Split out from #36380.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
    
URL: #38732
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
  • Loading branch information
Release Manager committed Oct 11, 2024
2 parents 83e849e + e2940d3 commit 080f9f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sage/rings/function_field/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ cdef class FunctionFieldElement(FieldElement):
We also substitute the generators in any base fields::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x))
Expand All @@ -224,6 +225,8 @@ cdef class FunctionFieldElement(FieldElement):
Traceback (most recent call last):
...
TypeError: in_dict must be a dict
sage: # needs sage.rings.function_field
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x))
sage: f = x + y
Expand All @@ -234,6 +237,7 @@ cdef class FunctionFieldElement(FieldElement):
We can also substitute using dictionary syntax::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x))
Expand All @@ -249,6 +253,7 @@ cdef class FunctionFieldElement(FieldElement):
Check that we correctly handle extension fields::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x))
Expand All @@ -270,6 +275,7 @@ cdef class FunctionFieldElement(FieldElement):
Test that substitution works for rational functions::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^4 - 3)
Expand Down Expand Up @@ -298,6 +304,7 @@ cdef class FunctionFieldElement(FieldElement):
Same purpose as above but over an extension field over the rationals::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<y> = K[]
sage: L.<y> = K.extension(y^3 - (x^3 + 2*x*y + 1/x))
Expand All @@ -319,6 +326,7 @@ cdef class FunctionFieldElement(FieldElement):
Test proper handling of not making substitutions::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: f = x
sage: f.subs() is f
Expand Down Expand Up @@ -357,6 +365,7 @@ cdef class FunctionFieldElement(FieldElement):
Test error handling with ambiguously named generators::
sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(QQ)
sage: R.<x> = K[]
sage: L.<x> = K.extension(x^3 - x)
Expand Down

0 comments on commit 080f9f5

Please sign in to comment.