I want to take an number field element embedded in the symbolic ring
like the imaginary I and add it to an algebraic number:
  sage: I.pyobject() + QQbar(sqrt(2))
This results in
  TypeError: unsupported operand parent(s) for '+': 'Number Field in I
  with defining polynomial x^2 + 1' and 'Algebraic Field'
as there is no *canonical* coercion as no embedding of the number field
is specified.

How can I specify this embedding such that it is used e.g. for the
symbolic I?

I've tried
  sage: F = NumberField(x^2 + 1, 'i', embedding=QQbar(I))
which makes
  sage: F.0 + QQbar(sqrt(2))
  1.414213562373095? + 1*I
work. However,
  sage: SR(F.0)
  I
so it is converted to the existing I and the example at the top
  sage: SR(F.0).pyobject() + QQbar(sqrt(2))
fails again.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to