#807: construction of function fields
------------------------------------+---------------------------------------
Reporter: nbruin | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: sage-5.8
Component: basic arithmetic | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by tscrim):
Replying to [comment:8 nbruin]:
> The preparser is just a preprocessor, so no python errors are involved.
The string is modified before the python parser ever sees it. Anyway:
> {{{
> sage: preparse("P1.<t> = QQ['x'].fraction_field()")
> "P1 = QQ['x'].fraction_field(names=('t',)); (t,) = P1._first_ngens(1)"
> }}}
> and supporting it seems straightforward,
That's not as scary as I expected it to be.
> but this is where things get questionable: `names` supplied on
construction are part of the construction data, so
> {{{
> sage: R=QQ['x']
> sage: F1=R.fraction_field(names=('u',))
> sage: F2=R.fraction_field(names=('v',))
> }}}
> should produce two fields F1,F2. Both would have coercions from R
installed, since they are constructed as field-of-fractions of R. There
would not be a coercion from F1 to F2. Furthermore, for
> {{{
> sage: K=QQ['x,u,v'].fraction_field()
> }}}
> all of R,F1,F2 would coerce into K, but coercion from R to K would not
be compatible with the coercions from F1 and F2 into K, which is bad.
So you're considering adding a `names` argument in a meaningful way to
`fraction_field()`? However this does not quite make sense to me and would
conflict with the behavior of `FractionField` (which takes `names` as
input and just ignores them; although it just redirects the call to the
respective `fraction_field()` with no arguments). It seems like the
correct fix would be to have the following:
{{{
sage: preparse("R.<x,y> = QQ[].fraction_field()")
"R = QQ['x, y'].fraction_field(names=('x', 'y',)); (x, y,) =
R._first_ngens(2)"
}}}
and have `fraction_field()` take `names` as an optional argument and
ignore the input.
Just to note, this is the current behavior in Sage when there is no other
function:
{{{
sage: preparse("R.<x,y> = QQ[]")
"R = QQ['x, y']; (x, y,) = R._first_ngens(2)"
}}}
In some ways, I'd almost like the following to throw an error:
{{{
sage: R.<x> = QQ['t']
sage: x
t
}}}
since the variable names don't match. But that might just be me...
> For better of for worse, it was decided that the names of polynomial
variables have meaning in sage. A consequence of that is that you don't
get to choose the name upon applying the function_field functor.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/807#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.