[sage-support] Cubic root in a finite field

2014-04-19 Thread Irene
Hi!
 I have the following:
p=371
Fp2=GF(p^2, 'b')

and I want to compute the cubic root of 344694*b + 1653339.
How can I do it? Because when I write (344694*b + 1653339)^(1/3) it gives 
me as result 1, and the same for every element that I consider in Fp2, or 
for every exponent 1/n.

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


Re: [sage-support] legend

2014-04-19 Thread HG

Hi,
Sorry I mistaken : Your suggestion does work but apparently some 
commands don't work.

I am trying further...
Thanks
Henri
Le 17/04/2014 14:48, Michael Orlitzky a écrit :

On 04/17/2014 06:32 AM, HG wrote:

Hi,
I do a plot with **params which is quiete usefull to have it as a
compact style.
After googling a lot I was trying to see if one can do the same with
**legend ? or other keyword ?
I didn't find any answer, is it possible ?
   it would be easier to put all in a command ?

The same syntax should work:

   legend_opts = { 'back_color': 'white', 'shadow': True }

   p.set_legend_options(**legend_opts)




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


Re: [sage-support] Cubic root in a finite field

2014-04-19 Thread John Cremona
On 19 April 2014 08:40, Irene irene.alv...@gmail.com wrote:
 Hi!
  I have the following:
 p=371
 Fp2=GF(p^2, 'b')

 and I want to compute the cubic root of 344694*b + 1653339.
 How can I do it? Because when I write (344694*b + 1653339)^(1/3) it gives me
 as result 1, and the same for every element that I consider in Fp2, or for
 every exponent 1/n.

Here is one way:

sage: p=371
sage: Fp2.b=GF(p^2)
sage: a = 344694*b + 1653339

Now either

sage: x = polygen(Fp2)
sage: (x^3-a).roots(multiplicities=False)
[401927*b + 661235, 259308*b + 3298074, 3038766*b + 3440693]

or just


sage: a.nth_root(3)
259308*b + 3298074
sage: a.nth_root(3,all=True)
[259308*b + 3298074, 3038766*b + 3440693, 401927*b + 661235]

Since the field contains the 3rd roots of unity there are three cube
roots (if any).  I don't exactly know what the ^(1/3) promises, since
Sage calls pari and I have not looked up the pari documentation.

Since your output was 1 it looks suspiciously as if the 1/3 was
rounded before exponentiation.  And since 1 is certainly not one of
the cube roots of a, I think you have found a bug!

John


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

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


[sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread xunitc xc
Hi,

My os is ubuntu 14.04, I use the ppa like :
apt-add-repository -y ppa:aims/sagemath
apt-get update
apt-get install sagemath-upstream-binary

Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not 
installable.
And in this url:
http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
I see the name ffmpeg is called libav-tools now.

How can I install sage by ppa please?

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Jan Groenewald
Hi

Thanks for reporting this. Many of the Depends: fields in sagemath need to
be updated. I will do so over the coming month or two.

In the meantime, simply to satisfy the dependency, add the ffmpeg from
saucy.-updates, which seems to be the last one.
http://packages.ubuntu.com/search?keywords=ffmpeg

So I suggest this (easily disabled later).

sudo -i
cat  /etc/apt/sources.list.d/saucy-updates.list  EOF
# Only for ffmpeg, to satisfy lingering sagemath-upstream-binary dependency
deb http://archive.ubuntu.com/ubuntu/ saucy-updates main
EOF
apt-get update
apt-get install sagemath-upstream-binary

To remove later, after sagemath-upstream-binary is updated, (by me, and by
you from the PPA) do

sudo apt-get purge ffmpeg
sudo rm /etc/apt/sources.list.d/saucy-updates.list
sudo apt-get update
sudo apt-get autoremove # check output and say yes if acceptable.

Regards,
Jan




On 19 April 2014 14:33, xunitc xc xun...@gmail.com wrote:

 Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not
 installable.
 And in this url:

 http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

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




-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Emmanuel Charpentier
Dear Jan,

A slight precision below :

Le samedi 19 avril 2014 15:07:18 UTC+2, Jan Groenewald a écrit :

 Hi 

 Thanks for reporting this. Many of the Depends: fields in sagemath need to 
 be updated. I will do so over the coming month or two.

 In the meantime, simply to satisfy the dependency, add the ffmpeg from 
 saucy.-updates, which seems to be the last one.
 http://packages.ubuntu.com/search?keywords=ffmpeg

 So I suggest this (easily disabled later).

 sudo -i
 cat  /etc/apt/sources.list.d/saucy-updates.list  EOF
 # Only for ffmpeg, to satisfy lingering sagemath-upstream-binary dependency
 deb http://archive.ubuntu.com/ubuntu/ saucy-updates main
 EOF
 apt-get update
 apt-get install sagemath-upstream-binary


This won't work directly, at least if you have (like me) added the ffmpeg 
ppa (which won't install, since it neeeds libav54 libraries newer than 
those available in trusty. Ouch ! ). You have to explicitely install the 
saucy version :

apt-get install -t saucy -f ffmpeg

This is working for me.

To remove later, after sagemath-upstream-binary is updated, (by me, and by 
 you from the PPA) do

 sudo apt-get purge ffmpeg
 sudo rm /etc/apt/sources.list.d/saucy-updates.list
 sudo apt-get update
 sudo apt-get autoremove # check output and say yes if acceptable.


This should work when the time comes. BTW : could you drop a note to that 
effect somewhere on sage-support (or sage-release), in order to let us know 
that it is time to clean up our systems ?

HTH,

--
Emmanuel Charpentier 

 Regards,
 Jan




 On 19 April 2014 14:33, xunitc xc xun...@gmail.com javascript: wrote:

 Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not 
 installable.
 And in this url:

 http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

 -- 
 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...@googlegroups.com javascript:.
 To post to this group, send email to sage-s...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/sage-support.
 For more options, visit https://groups.google.com/d/optout.




 -- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 
  

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Jan Groenewald
Hi Emmanuel,

Thanks for that. So I understand that without the ffmpeg PPA my solution
might work?

I have mailed sage-devel to sort out the dependencies, and I can perhaps
release an intermediate new version which is the same version of sagemath
but with new dependencies.

Regards,
Jan



On 19 April 2014 16:13, Emmanuel Charpentier
emanuel.charpent...@gmail.comwrote:

 Dear Jan,

 A slight precision below :

 Le samedi 19 avril 2014 15:07:18 UTC+2, Jan Groenewald a écrit :

 Hi

 Thanks for reporting this. Many of the Depends: fields in sagemath need
 to be updated. I will do so over the coming month or two.

 In the meantime, simply to satisfy the dependency, add the ffmpeg from
 saucy.-updates, which seems to be the last one.
 http://packages.ubuntu.com/search?keywords=ffmpeg

 So I suggest this (easily disabled later).

 sudo -i
 cat  /etc/apt/sources.list.d/saucy-updates.list  EOF
 # Only for ffmpeg, to satisfy lingering sagemath-upstream-binary
 dependency
 deb http://archive.ubuntu.com/ubuntu/ saucy-updates main
  EOF
 apt-get update
 apt-get install sagemath-upstream-binary


 This won't work directly, at least if you have (like me) added the
 ffmpeg ppa (which won't install, since it neeeds libav54 libraries newer
 than those available in trusty. Ouch ! ). You have to explicitely install
 the saucy version :

 apt-get install -t saucy -f ffmpeg

 This is working for me.

 To remove later, after sagemath-upstream-binary is updated, (by me, and by
 you from the PPA) do

 sudo apt-get purge ffmpeg
 sudo rm /etc/apt/sources.list.d/saucy-updates.list
 sudo apt-get update
 sudo apt-get autoremove # check output and say yes if acceptable.


 This should work when the time comes. BTW : could you drop a note to that
 effect somewhere on sage-support (or sage-release), in order to let us know
 that it is time to clean up our systems ?

 HTH,

 --
 Emmanuel Charpentier

 Regards,
 Jan




 On 19 April 2014 14:33, xunitc xc xun...@gmail.com wrote:

  Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not
 installable.
 And in this url:
 http://askubuntu.com/questions/432542/is-ffmpeg-
 missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

 --
 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...@googlegroups.com.
 To post to this group, send email to sage-s...@googlegroups.com.

 Visit this group at http://groups.google.com/group/sage-support.
 For more options, visit https://groups.google.com/d/optout.




 --
   .~.
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^

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




-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Emmanuel Charpentier


Le samedi 19 avril 2014 16:25:41 UTC+2, Jan Groenewald a écrit :

 Hi Emmanuel,

 Thanks for that. So I understand that without the ffmpeg PPA my solution 
 might work?


Probably (I didn't test it yet). 


 I have mailed sage-devel to sort out the dependencies, and I can perhaps 
 release an intermediate new version which is the same version of sagemath 
 but with new dependencies.


Thank you for that. One of the points of using ubuntu is not to have to 
worry about building binaries. It still will be 6.1.1, right ?

--
Emmanuel Charpentier 


 Regards,
 Jan



 On 19 April 2014 16:13, Emmanuel Charpentier 
 emanuel.c...@gmail.comjavascript:
  wrote:

 Dear Jan,

 A slight precision below :

 Le samedi 19 avril 2014 15:07:18 UTC+2, Jan Groenewald a écrit :

 Hi 

 Thanks for reporting this. Many of the Depends: fields in sagemath need 
 to be updated. I will do so over the coming month or two.

 In the meantime, simply to satisfy the dependency, add the ffmpeg from 
 saucy.-updates, which seems to be the last one.
 http://packages.ubuntu.com/search?keywords=ffmpeg

 So I suggest this (easily disabled later).

 sudo -i
 cat  /etc/apt/sources.list.d/saucy-updates.list  EOF
 # Only for ffmpeg, to satisfy lingering sagemath-upstream-binary 
 dependency
 deb http://archive.ubuntu.com/ubuntu/ saucy-updates main
  EOF
 apt-get update
 apt-get install sagemath-upstream-binary


 This won't work directly, at least if you have (like me) added the 
 ffmpeg ppa (which won't install, since it neeeds libav54 libraries newer 
 than those available in trusty. Ouch ! ). You have to explicitely install 
 the saucy version :

 apt-get install -t saucy -f ffmpeg

 This is working for me.

 To remove later, after sagemath-upstream-binary is updated, (by me, and 
 by you from the PPA) do

 sudo apt-get purge ffmpeg
 sudo rm /etc/apt/sources.list.d/saucy-updates.list
 sudo apt-get update
 sudo apt-get autoremove # check output and say yes if acceptable.


 This should work when the time comes. BTW : could you drop a note to that 
 effect somewhere on sage-support (or sage-release), in order to let us know 
 that it is time to clean up our systems ?

 HTH,

 --
 Emmanuel Charpentier 

 Regards,
 Jan




 On 19 April 2014 14:33, xunitc xc xun...@gmail.com wrote:

  Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not 
 installable.
 And in this url:
 http://askubuntu.com/questions/432542/is-ffmpeg-
 missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

 -- 
 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...@googlegroups.com.
 To post to this group, send email to sage-s...@googlegroups.com.

 Visit this group at http://groups.google.com/group/sage-support.
 For more options, visit https://groups.google.com/d/optout.




 -- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 
  
  -- 
 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...@googlegroups.com javascript:.
 To post to this group, send email to sage-s...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/sage-support.
 For more options, visit https://groups.google.com/d/optout.




 -- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 
  

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Jorge Garcia
Didn't ubuntu replace ffmpeg with avconv?
On Apr 19, 2014 8:38 AM, xunitc xc xun...@gmail.com wrote:

 Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not
 installable.
 And in this url:

 http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

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


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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Jan Groenewald
Hi




On 19 April 2014 16:31, Emmanuel Charpentier
emanuel.charpent...@gmail.comwrote:



 Le samedi 19 avril 2014 16:25:41 UTC+2, Jan Groenewald a écrit :

 Hi Emmanuel,

 Thanks for that. So I understand that without the ffmpeg PPA my solution
 might work?


 Probably (I didn't test it yet).


 I have mailed sage-devel to sort out the dependencies, and I can perhaps
 release an intermediate new version which is the same version of sagemath
 but with new dependencies.


 Thank you for that. One of the points of using ubuntu is not to have to
 worry about building binaries. It still will be 6.1.1, right ?



Yes (unless a new sage is released in the meantime).

I'm less strict about absolute dependencies since the purpose of the PPA is
to make it easy for people, easier than any manual installation, and some
Recommends: might become Depends: in this situation. However NONE of the
dependencies seem to be real dependencies to run sage, but for some
functionality, e.g.

openssl: run secure mode
imagemagick, some commands in sage
not my dependency, but a browser to run the notebook.

I want to have people not worry about these things. All functionality
should just work. But we should also keep the Debian Way in mind, of
course.

Regards,
Jan
-- 


-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread Jan Groenewald
Looks like it, yes:
http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04

I'm suprised at the lack of an ffmpeg-compat package though... and a
virtual package ffmpeg... anyway, I will look at updating the PPA soon.

PS. I've also updated my sagemath buildslave from precise to trusty. Soon
trusty binaries will appear, and that will be what I will repackage with
appropriate dependencies and recommendations.

Regards,
Jan




On 19 April 2014 16:44, Jorge Garcia calcp...@gmail.com wrote:

 Didn't ubuntu replace ffmpeg with avconv?
 On Apr 19, 2014 8:38 AM, xunitc xc xun...@gmail.com wrote:

 Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not
 installable.
 And in this url:

 http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

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

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




-- 
  .~.
  /V\ Jan Groenewald
 /( )\www.aims.ac.za
 ^^-^^

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


[sage-support] Norm of real value vector

2014-04-19 Thread Hadi Lq
Hi everyone
Here I try to define a real value vector and find out its norm:

sage: R.r,p=RR[]
sage: rvec=vector([r*cos(p),r*sin(p)])
sage: rr=rvec.norm()
sage: rr.simplify_full()
sqrt((abs(cos(p))^2 + abs(sin(p))^2)*abs(r)^2)

which must be: r
How can I define a vector that its norm hasn't abs() function?


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


[sage-support] Norm of real valued vector

2014-04-19 Thread Hadi Lq
Hi everyone

sage: R.r,p=RR[]
sage: rvec=vector([r*cos(p),r*sin(p)])
sage: rr=rvec.norm()
sage: rr.simplify_full()
sqrt((abs(cos(p))^2 + abs(sin(p))^2)*abs(r)^2)

which must gives me: r
How can I define real valued vector?
or How can I withdraw abs() function from norm?

Ubuntu 13.10
Sage Version 6.1.1, Release Date: 2014-02-04

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


[sage-support] posible bug in Tachyon.show() at aleph/sagecell?

2014-04-19 Thread share the sage
Hi sage-support community!

Recently I've tried the following code at sagecell (permalink 
herehttp://sagecell.sagemath.org/?z=eJylkMsOgyAQRfdN-g-zE5MJGR9ddMFfdN9QOlYTLQYx1b8vpDX2sTRsmDlwLowHBSdt6tnexeR4UCURzssGjO7Y6bPhu2enRI6ElKb7nZdtc6u9ECUWmKcIJHMEkWFYL-558qNjkfg8QdDdpQkORTJDuDZVNQ4ciiPC0LMZW-1CdUCwvTaNn1UmY7htbQjN1tBVWmyUUnjpn7TcLKXl-0Nfc3DGVjhNy4TiNL55pJ-8SH7vR8PKyzev7UOkT6E7fF4=lang=sage
):

t = Tachyon(xres=400,yres=400, camera_center=(2,0,0))
t.light((4,3,2), 0.2, (1,1,1))
t.texture('t2', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
1,0,0))
t.texture('t3', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
0,1,0))
t.texture('t4', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
0,0,1))
t.sphere((0,0.5,0), 0.2, 't2')
t.sphere((0.5,0,0), 0.2, 't3')
t.sphere((0,0,0.5), 0.2, 't4')
t.show()

And this was the result:

---
AttributeErrorTraceback (most recent call last)
ipython-input-1-d6c906df5871 in module()
  7 t.sphere((RealNumber('0.5'),Integer(0),Integer(0)), RealNumber('0.2'), 
't3')
  8 t.sphere((Integer(0),Integer(0),RealNumber('0.5')), RealNumber('0.2'), 
't4')
 9 t.show()

/home/sageserver/sage/local/lib/python2.7/site-packages/sage/plot/plot3d/tachyon.pyc
 in show(self, verbose, extra_opts)
320 filename = graphics_filename()
321 self.save(filename, verbose=verbose, extra_opts=extra_opts)
-- 322 sage.misc.misc.display_image(filename)
323 return
324 filename = tmp_filename(ext='.png')

AttributeError: 'module' object has no attribute 'display_image'


Same code works fine at www.sagenb.org: it shows the three spheres

I've searched sage-support, ask sage and trac sage, but couldn't find any 
similar issue.

Checking the source code I coded the following workaround within the cell (
permalinkhttp://aleph.sagemath.org/?z=eJylkcluxCAMhu-V-g7cQiQLkaWHHniL3iOXcRKkLAhINXn7Go1QuhxHHMD-7c_YTsKID7TzuW_yHiiaXms4y0NYXCngYGlLFIxsQYOu69eXpBY3zUnKHjpoaxBatSBkA3weeqJ7OgLJKrUVCFw_HTOMVg2ImxvHIxIb7yCiJ3ssGNh6A7F7tC6dplG5-L7sXLS5il7Q7kmo5p_-g_ZPQ3VpP_qZmJldHK3LhPI0futZ_al31d_8TLj0PuujW2jj1fDyIk6kVhct97H6PWA4hyyrKaCfnY1DCZYPMH6RLC72XPk3F_2CZ7kHt7J0hX4DouKkKQ==lang=sage
):

# t is as above
# t.show() replaced by:
filename = sage.misc.temporary_file.graphics_filename()
t.save(filename)
sage.misc.display.display_image(filename)

Is this a bug in the method show() from the Tachyon class?

Thanks in advance,

Share_The_Sage!


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


[sage-support] Random Primitive

2014-04-19 Thread Jan Medina
Hi everybody.

There is a procedure or library in SAGE that allows finding a random 
primitive element on a finite field?

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


[sage-support] Re: Random Primitive

2014-04-19 Thread leif

Jan Medina wrote:

Hi everybody.

There is a procedure or library in SAGE that allows finding a random
primitive element on a finite field?


http://sagemath.org/doc/reference/finite_rings/sage/rings/finite_rings/finite_field_base.html?highlight=primitive_element#sage.rings.finite_rings.finite_field_base.FiniteField.multiplicative_generator


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

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


Re: [sage-support] The ubuntu ppa need ffmpeg but it is not the name in ubuntu 14.04

2014-04-19 Thread xunitc xc
Thank you for your reply and hard work, I love sage.

Thanks again.

在 2014年4月19日星期六UTC+8下午9时07分18秒,Jan Groenewald写道:

 Hi 

 Thanks for reporting this. Many of the Depends: fields in sagemath need to 
 be updated. I will do so over the coming month or two.

 In the meantime, simply to satisfy the dependency, add the ffmpeg from 
 saucy.-updates, which seems to be the last one.
 http://packages.ubuntu.com/search?keywords=ffmpeg

 So I suggest this (easily disabled later).

 sudo -i
 cat  /etc/apt/sources.list.d/saucy-updates.list  EOF
 # Only for ffmpeg, to satisfy lingering sagemath-upstream-binary dependency
 deb http://archive.ubuntu.com/ubuntu/ saucy-updates main
 EOF
 apt-get update
 apt-get install sagemath-upstream-binary

 To remove later, after sagemath-upstream-binary is updated, (by me, and by 
 you from the PPA) do

 sudo apt-get purge ffmpeg
 sudo rm /etc/apt/sources.list.d/saucy-updates.list
 sudo apt-get update
 sudo apt-get autoremove # check output and say yes if acceptable.

 Regards,
 Jan




 On 19 April 2014 14:33, xunitc xc xun...@gmail.com javascript: wrote:

 Hi,

 My os is ubuntu 14.04, I use the ppa like :
 apt-add-repository -y ppa:aims/sagemath
 apt-get update
 apt-get install sagemath-upstream-binary

 Then, I see sagemath-upstream-binary : Depends: ffmpeg but it is not 
 installable.
 And in this url:

 http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04
 I see the name ffmpeg is called libav-tools now.

 How can I install sage by ppa please?

 -- 
 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...@googlegroups.com javascript:.
 To post to this group, send email to sage-s...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/sage-support.
 For more options, visit https://groups.google.com/d/optout.




 -- 
   .~. 
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^ 
  

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


[sage-support] Re: Random Primitive

2014-04-19 Thread Jan Medina
i know that but this function only give you one generator, always the same 
but i want a random generator of a multiplicate group of a finite field.

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


[sage-support] Re: posible bug in Tachyon.show() at aleph/sagecell?

2014-04-19 Thread kcrisman



 ---
 AttributeErrorTraceback (most recent call last)
 ipython-input-1-d6c906df5871 in module()
   7 t.sphere((RealNumber('0.5'),Integer(0),Integer(0)), 
 RealNumber('0.2'), 't3')
   8 t.sphere((Integer(0),Integer(0),RealNumber('0.5')), 
 RealNumber('0.2'), 't4')
  9 t.show()

 /home/sageserver/sage/local/lib/python2.7/site-packages/sage/plot/plot3d/tachyon.pyc
  in show(self, verbose, extra_opts)
 320 filename = graphics_filename()
 321 self.save(filename, verbose=verbose, 
 extra_opts=extra_opts)
 -- 322 sage.misc.misc.display_image(filename)
 323 return
 324 filename = tmp_filename(ext='.png')

 AttributeError: 'module' object has no attribute 'display_image'


 Same code works fine at www.sagenb.org: it shows the three spheres

 I've searched sage-support, ask sage and trac sage, but couldn't find any 
 similar issue.

 Checking the source code I coded the following workaround within the cell (
 permalinkhttp://aleph.sagemath.org/?z=eJylkcluxCAMhu-V-g7cQiQLkaWHHniL3iOXcRKkLAhINXn7Go1QuhxHHMD-7c_YTsKID7TzuW_yHiiaXms4y0NYXCngYGlLFIxsQYOu69eXpBY3zUnKHjpoaxBatSBkA3weeqJ7OgLJKrUVCFw_HTOMVg2ImxvHIxIb7yCiJ3ssGNh6A7F7tC6dplG5-L7sXLS5il7Q7kmo5p_-g_ZPQ3VpP_qZmJldHK3LhPI0futZ_al31d_8TLj0PuujW2jj1fDyIk6kVhct97H6PWA4hyyrKaCfnY1DCZYPMH6RLC72XPk3F_2CZ7kHt7J0hX4DouKkKQ==lang=sage
 ):

 # t is as above
 # t.show() replaced by:
 filename = sage.misc.temporary_file.graphics_filename()
 t.save(filename)
 sage.misc.display.display_image(filename)

 Is this a bug in the method show() from the Tachyon class?


I like your screen name.  Share that Sage!

I can't find this display_image thing anywhere in the Sage source, and 
perhaps this is a Sage cell specific thing so that Tachyon things work in 
that context (it's neither the command line nor the notebook server, so 
some custom code may be necessary).  I'm not sure where you found the 
display_image, though; even in the Sage cell patches to Sage [1] ... but 
presumably this is a Sage cell specific thing, given their custom code, and 
I encourage you to report it there [2].  Thanks for the report!

- kcrisman

[1] 
e.g. 
https://github.com/sagemath/sagecell/blob/master/sage-patches/02-sage-show.patch
 
[2] https://github.com/sagemath/sagecell/issues

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