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

sage.rings.function_field: Update # needs #38732

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading