Dear all,

In order to get algebraic polyhedra using the normaliz backend [1], we 
modify the function

number_field_elements_from_algebraics of qqbar.py to give embedded number 
fields and also accept a larger class of algebraic numbers, say coming from 
cyclotomic fields [2].

For example, this is now possible:

sage: UCF = UniversalCyclotomicField()
sage: E = UCF.gen(5)
sage: L.<b> = NumberField(x^2-189*x+16, embedding=200)
sage: my_nums = [-52*E - 136*E^2 - 136*E^3 - 52*E^4, 
L.gen()._algebraic_(AA),sqrt(2)]
sage: aa_my_nums = [AA(_) for _ in my_nums]
sage: res = number_field_elements_from_algebraics(aa_my_nums,embedded=True)
sage: res
(Number Field in a with defining polynomial y^8 - 35670*y^6 + 476899047*y^4 - 
2832410271650*y^2 + 6305298701739921,
 [2310/26212773509*a^7 - 185432947/78638320527*a^5 + 
1652517502195/78638320527*a^3 - 4904676315215467/78638320527*a + 94,
  -1238/2803377488467023*a^7 + 185460719/11213509953868092*a^5 - 
2754936849443/11213509953868092*a^3 + 8180694680816975/3737836651289364*a + 
189/2,
  -1979/1887160880826*a^7 + 26472586/943580440413*a^5 - 
235822245043/943580440413*a^3 + 466325019915415/629053626942*a],
 Ring morphism:
   From: Number Field in a with defining polynomial y^8 - 35670*y^6 + 
476899047*y^4 - 2832410271650*y^2 + 6305298701739921
   To:   Algebraic Real Field
   Defn: a |--> 96.9475535136628?)
sage: res[0].gen_embedding()
96.9475535136628?


The ticket 2018 needs review and it would be nice to have the opinion of 
experts on number fields in Sage... 

For example, there is currently one failing doctest where it seems that the 
newer version is smarter, so that the test is not necessary anymore.

[1] https://trac.sagemath.org/ticket/25097
[2] https://trac.sagemath.org/ticket/20181

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

Reply via email to