[sage-devel] Re: absolute value in a p-adic quotient field

2013-07-15 Thread David Loeffler
I would argue that P.root_field() should return a p-adic field here, not a 
polynomial quotient ring. This would be consistent with the behaviour of 
root_field for polynomials over QQ and number fields; generally, when we 
have a choice of several different Sage representations of the same 
mathematical object, it probably makes sense to return the one with the 
most functionality, doesn't it? I've opened a ticket for this change to 
root_field (#14893).

David

On Wednesday, July 10, 2013 10:49:54 PM UTC+1, Paul Mercat wrote:

 If I define 'a' like this:

 R.x=PolynomialRing(Qp(2));
 P=2*x^2+1;
 K.a=P.root_field();


 why 'a' has no attribute abs ?
 It's not a big problem, because it's easy to compute the absolute value 
 from the norm, but it don't work :

 a.norm()

 gives

 TypeError: cannot construct an element of Full MatrixSpace of 2 by 2 dense 
 matrices over 2-adic

 Field with capped relative precision 20 from [0, 1 + O(2^20), 2^-1 + 1 + 2 + 
 2^2 + 2^3 + 2^4 + 2^5 +

 2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 
 + 2^18 + O(2^19), 0,

 O(2^20)]!


 Somebody knows why this don't work ?



-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: absolute value in a p-adic quotient field

2013-07-11 Thread Frédéric Chapoton
Well, the problem comes from 

a.matrix()

which does not work. This is because it receives an incorrect number of 
terms, so it cannot build the matrix. In turn, this is because
the length of (a**i).list() depends on i, which is maybe unexpected.

I have not tried to look further.

Frederic

Le mercredi 10 juillet 2013 23:49:54 UTC+2, Paul Mercat a écrit :

 If I define 'a' like this:

 R.x=PolynomialRing(Qp(2));
 P=2*x^2+1;
 K.a=P.root_field();


 why 'a' has no attribute abs ?
 It's not a big problem, because it's easy to compute the absolute value 
 from the norm, but it don't work :

 a.norm()

 gives

 TypeError: cannot construct an element of Full MatrixSpace of 2 by 2 dense 
 matrices over 2-adic

 Field with capped relative precision 20 from [0, 1 + O(2^20), 2^-1 + 1 + 2 + 
 2^2 + 2^3 + 2^4 + 2^5 +

 2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 
 + 2^18 + O(2^19), 0,

 O(2^20)]!


 Somebody knows why this don't work ?



-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Re: absolute value in a p-adic quotient field

2013-07-11 Thread Julian Rüth
This is http://trac.sagemath.org/sage_trac/ticket/13662

julian

* Frédéric Chapoton fchapot...@gmail.com [2013-07-11 02:11:24 -0700]:

 Well, the problem comes from 
 
 a.matrix()
 
 which does not work. This is because it receives an incorrect number of 
 terms, so it cannot build the matrix. In turn, this is because
 the length of (a**i).list() depends on i, which is maybe unexpected.
 
 I have not tried to look further.
 
 Frederic
 
 Le mercredi 10 juillet 2013 23:49:54 UTC+2, Paul Mercat a écrit :
 
  If I define 'a' like this:
 
  R.x=PolynomialRing(Qp(2));
  P=2*x^2+1;
  K.a=P.root_field();
 
 
  why 'a' has no attribute abs ?
  It's not a big problem, because it's easy to compute the absolute value 
  from the norm, but it don't work :
 
  a.norm()
 
  gives
 
  TypeError: cannot construct an element of Full MatrixSpace of 2 by 2 dense 
  matrices over 2-adic
 
  Field with capped relative precision 20 from [0, 1 + O(2^20), 2^-1 + 1 + 2 
  + 2^2 + 2^3 + 2^4 + 2^5 +
 
  2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + 2^15 + 2^16 + 
  2^17 + 2^18 + O(2^19), 0,
 
  O(2^20)]!
 
 
  Somebody knows why this don't work ?
 
 
 
 -- 
 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 http://groups.google.com/group/sage-devel.
 For more options, visit https://groups.google.com/groups/opt_out.
 
 


pgpYzHCAXSDn2.pgp
Description: PGP signature