#6046: [with patch, needs review] Implement local and global heights for number
field elements
---------------------------+------------------------------------------------
 Reporter:  cremona        |       Owner:  was                
     Type:  enhancement    |      Status:  new                
 Priority:  major          |   Milestone:  sage-4.0.1         
Component:  number theory  |    Keywords:  number field height
---------------------------+------------------------------------------------

Comment(by fwclarke):

 Replying to [comment:2 cremona]:

 > We must sort out this mess with the embeddings.  Your first doctest
 failure (with different behaviour in different runs) must mean that the
 ordering of the embeddings is not deterministic.  That must be fixed, say
 by ordering the roots when the embeddings are found.  Secondly we must
 have a fool-proof way of determining which embeddings are real when you do
 K.complex_embeddings().  What I would prefer is to have a function called
 (perhaps) K.archimedean_completions() which returns a list of r+s
 embeddings, the first r into a RealField and the last s into a
 ComplexField  (or even a list of two lists of embeddings, of lengths r and
 s respectively).  That way the codomain of a real embedding would be a
 RealField which could easily be tested for.  While we are at it the
 complex list would only contain one of each pair.
 >
 > So, how to implement this?  Not problem with the list of real
 embeddings, though they should be sorted by the natural real ordering on
 the image og K.gen();  for the non-real ones we could first find all
 embeddings into CC, then sort them  by their imaginary parts and then take
 the last s of these (where s could be defined to be (n-r)/2 where n is the
 degree and r the number of real embeddings).
 >
 > Does that sound workable?

 Yes; no time to experiment more with this, but I note that `places` in
 `number_field.py` seems to do what's needed:
 {{{
     def places(self, all_complex=False, prec=None):
         """
         Return the collection of all places of self. By default, this
         returns the set of real places as homomorphisms into RIF first,
         followed by a choice of one of each pair of complex conjugate
         homomorphisms into CIF.

         On the other hand, if prec is not None, we simply return places
         into RealField(prec) and ComplexField(prec) (or RDF, CDF if
         prec=53).

         ...
 }}}
 so that
 {{{
 sage: K.<a> = NumberField(x^4+3*x^2-17)
 sage: K.places()

 [Ring morphism:
   From: Number Field in a with defining polynomial x^4 + 3*x^2 - 17
   To:   Real Field with 106 bits of precision
   Defn: a |--> -1.699259307373674805202512065354,
  Ring morphism:
   From: Number Field in a with defining polynomial x^4 + 3*x^2 - 17
   To:   Real Field with 106 bits of precision
   Defn: a |--> 1.699259307373674805202512065354,
  Ring morphism:
   From: Number Field in a with defining polynomial x^4 + 3*x^2 - 17
   To:   Complex Field with 53 bits of precision
   Defn: a |--> 2.42641344244876*I]
 }}}

 Not defined (yet!) for relative number fields.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6046#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to