[sage-support] Re: Grobner bases of ideals

2016-12-21 Thread David Joyner
On Wed, Dec 21, 2016 at 7:28 AM, David Joyner  wrote:
> On Wed, Dec 21, 2016 at 7:14 AM, NITIN DARKUNDE  
> wrote:
>> Respected Sir,
>> I am trying to find Groebner basis of an ideal in
>> polynomial ring in 35 variables over GF(2)(As per suggestions earlier, I am
>> working over GF(2) instead of GF(3))  but I am not able to see the output
>> using sage. Even it do not shows any error in it. So,how to get the
>> output?(Even I tried singular, but can't succeed.)
>>
>
> Please copy and paste your input and output into an email, or save it
> to a file and attach the file.
>


I copy+pasted this from a word doc the OP emailed me privately.


P.=PolynomialRing(FiniteField(2),order='lex');
I=Ideal([x1*x21*x22*x23*x24*x25*x26*x27*x28*x29*x30*x31*x32*x33*x34*x35-1,x2*x14*x15*x16*x17*x18*x19*x20*x21*x22*x23*x24*x25*x26*x27*x28-1,x3*x11*x12*x13*x15*x17*x19*x20*x21*x22*x23*x24*x29*x30*x31*x35-1,x4*x8*x9*x10*x14*x18*x19*x20*x23*x24*x25*x27*
 
x29*x30*x32*x34-1,x5*x7*x8*x10*x12*x13*x19*x20*x22*x24*x25*x26*x29*x31*x32*x33-1,x6*x7*x9*x10*x11*x13*x16*x17*x18*x20*x22*x23*x25*x26*x29*x30-1,x1^2-1,x2^2-1,x3^2-1,x4^2-1,x5^2-1,x6^2-1,x7^2-1,x8^2-1,x9^2-1,x10^2-1,x11^2-1,x12^2-1,x13^2-1,x14^2-1,
 
x15^2-1,x16^2-1,x17^2-1,x18^2-1,x19^2-1,x20^2-1,x21^2-1,x22^2-1,x23^2-1,x24^2-1,x25^2-1,x26^2-1,x27^2-1,x28^2-1,x29^2-1,x30^2-1,x31^2-1,x32^2-1,x33^2-1,x34^2-1,x35^2-1]);
I.groebner_basis();



>> --
>> --
>> Yours faithfully,
>> ---
>> Mr. Nitin Shridhar Darkunde.
>> Assistant Professor,
>> Department of Mathematics,
>> School of Mathematical Sciences,
>> Swami Ramanand Teerth Marathwada University,
>> Vishnupuri, Nanded-431 606 (M.S.), India.
>> Mob. No:08275268895Or09273500312
>> 
>>
>>

-- 
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.


[sage-support] Re: Grobner bases of ideals

2016-12-21 Thread David Joyner
On Wed, Dec 21, 2016 at 7:14 AM, NITIN DARKUNDE  wrote:
> Respected Sir,
> I am trying to find Groebner basis of an ideal in
> polynomial ring in 35 variables over GF(2)(As per suggestions earlier, I am
> working over GF(2) instead of GF(3))  but I am not able to see the output
> using sage. Even it do not shows any error in it. So,how to get the
> output?(Even I tried singular, but can't succeed.)
>

Please copy and paste your input and output into an email, or save it
to a file and attach the file.

> --
> --
> Yours faithfully,
> ---
> Mr. Nitin Shridhar Darkunde.
> Assistant Professor,
> Department of Mathematics,
> School of Mathematical Sciences,
> Swami Ramanand Teerth Marathwada University,
> Vishnupuri, Nanded-431 606 (M.S.), India.
> Mob. No:08275268895Or09273500312
> 
>
>

-- 
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.


Re: [sage-support] Grobner bases in sage

2016-12-16 Thread David Joyner
On Fri, Dec 16, 2016 at 5:55 AM, NITIN DARKUNDE  wrote:
>
> Dear Group members,
>Suppose we have been given an ideal say 'I' in
> multivariate polynomial over a finite field. Then I know , the procedure to
> find a Groebner basis say 'G' of that ideal. Suppose we have one polynomial
> say f which is outside I as well as G, then can we find reduced form(i.e
> remainder of f) of f modulo G, using Sage, if so what is the procedure?
>   Thanks.
>


Are you talking about reduce?

http://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/multi_polynomial_ideal.html



> --
> --
> Yours faithfully,
> ---
> Mr. Nitin Shridhar Darkunde.
> Assistant Professor,
> Department of Mathematics,
> School of Mathematical Sciences,
> Swami Ramanand Teerth Marathwada University,
> Vishnupuri, Nanded-431 606 (M.S.), India.
> Mob. No:08275268895Or09273500312
> 
>
>
> --
> 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.

-- 
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.


Re: [sage-support] Grobner basis for linear codes

2016-12-06 Thread David Joyner
On Tue, Dec 6, 2016 at 12:21 PM, NITIN DARKUNDE  wrote:
> Respected Sir,
> Yes sir, I am supposed to calculate Grobner basis for an
> ideal in a polynomial ring in 35 variables with coefficients from GF(2).
>

Why don't you try it first using a code of length <10?

>
> On Dec 6, 2016 10:45 PM, "David Joyner"  wrote:
>>
>> On Mon, Dec 5, 2016 at 4:56 AM, NITIN DARKUNDE 
>> wrote:
>> > Dear group members,
>> > I am doing my research in algebraic coding theory. I
>> > have
>> > started using sage for computations of Grobner bases, but while doing it
>> > I
>> > have some difficulties.The paper I am reading has been attached
>> > herewith.
>> >  Attachment number 1 of this mail:On page number 486,
>> > authors have defined an ideal  in equation number 9 and 10 and by using
>> > this
>> > information and theorem 3.1, authors computed reduced Groebner basis of
>> > ternary Golay code(on page 487 of this paper). I constructed this ideal
>> > in
>> > equation 9 and 10 by using sage and also succeed to get its Grobner
>> > basis.
>> >  Attachment number 2 of this mail:Now I had taken
>> > another
>> > 6x35 generator matrix of some linear code over GF(2). I computed
>> > its(linear
>>
>>
>> Just to clarify, are you asking to compute the GB of an ideal in 35
>> variables?
>>
>> > code's) length, but while finding parity check matrix of this linear
>> > code(using command H=C.check_mat()), I am not getting the output or
>> > sometimes I get the output as string index out of range... Does it mean
>> > that
>> > size of matrix which is 29x35 is too large for sage to show its output.
>> > But
>> > still I want to see and get the output, Please help me in this
>> > context.Next
>> > question is related to finding Groebner basis of this ideal, as soon as
>> > I
>> > use the command I.groebner_basis(), I am not getting any output, whereas
>> > in
>> > second paragraph example(of this mail), I was getting the output,Please
>> > help
>> > me in this context.
>> >
>> > --
>> > 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.
>>
>> --
>> 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.
>
> --
> 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.

-- 
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.


Re: [sage-support] Grobner basis for linear codes

2016-12-06 Thread David Joyner
On Mon, Dec 5, 2016 at 4:56 AM, NITIN DARKUNDE  wrote:
> Dear group members,
> I am doing my research in algebraic coding theory. I have
> started using sage for computations of Grobner bases, but while doing it I
> have some difficulties.The paper I am reading has been attached herewith.
>  Attachment number 1 of this mail:On page number 486,
> authors have defined an ideal  in equation number 9 and 10 and by using this
> information and theorem 3.1, authors computed reduced Groebner basis of
> ternary Golay code(on page 487 of this paper). I constructed this ideal in
> equation 9 and 10 by using sage and also succeed to get its Grobner basis.
>  Attachment number 2 of this mail:Now I had taken another
> 6x35 generator matrix of some linear code over GF(2). I computed its(linear


Just to clarify, are you asking to compute the GB of an ideal in 35 variables?

> code's) length, but while finding parity check matrix of this linear
> code(using command H=C.check_mat()), I am not getting the output or
> sometimes I get the output as string index out of range... Does it mean that
> size of matrix which is 29x35 is too large for sage to show its output. But
> still I want to see and get the output, Please help me in this context.Next
> question is related to finding Groebner basis of this ideal, as soon as I
> use the command I.groebner_basis(), I am not getting any output, whereas in
> second paragraph example(of this mail), I was getting the output,Please help
> me in this context.
>
> --
> 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.

-- 
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.


Re: [sage-support] How Do I Format this DEQ So Sage Can Solve It

2016-12-04 Thread David Joyner
On Sun, Dec 4, 2016 at 5:03 PM, tomdean1939  wrote:
> ## declare variables
> var('x')
> y = function('y')(x)
> ## third order deq
> deq = derivative(y,x,3) + y == 0


Sage's interface to maxima doesn't solve 3rd order constant coefficient ODEs.
You can use the interface to sympy, which does, but that involves using
the Sympy syntax (sympy.org).

> ## y(y)==0, y'(0)==0, y''(2)==1
> ics = [0,0, 0,0, 2,1]
> ## solution
> soln = desolve(deq,y)
>
> returns:
> NotImplementedError: Maxima was unable to solve this ODE. Consider to set
> option contrib_ode to True.
>
> However, maxima can solve this ODE.
> sage: maxima('desolve(deq,y(x))')
> y(x)=%e^(x/2)*(sin(sqrt(3)*x/2)*(2*(2*('at('diff(y(x),x,2),x=0))+'at('diff(y(x),x,1),x=0)-y(0))/3-('at('diff(y(x),x,2),x=0)-'at('diff(y(x),x,1),x=0)-2*y(0))/3)/sqrt(3)-cos(sqrt(3)*x/2)*('at('diff(y(x),x,2),x=0)-'at('diff(y(x),x,1),x=0)-2*y(0))/3)+%e^-x*('at('diff(y(x),x,2),x=0)-'at('diff(y(x),x,1),x=0)+y(0))/3
>
> How do I solve this equation with ics?
>
>
> --
> 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.

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-25 Thread David Joyner
On Tue, Oct 25, 2016 at 7:37 AM, Paul Leopardi  wrote:
> On Tuesday, 25 October 2016 06:02:06 UTC+11, Dima Pasechnik wrote:
>>
>> I would do a check using GAP's Grape package, which allows for checking
>> isomorphisms
>> (it uses nauty as the backend)
>> While there is no ready function to call Grape from Sage, this should be
>> easy to write using e.g.
>> libgap.function_factory()
>>
>
> Is there a simple guide on how to copy Sage graphs and matrices into and out
> of Gap? What I have seen so far is not encouraging. In fact I have not yet
> seen any documentation on how to copy a GF(2) matrix from Sage to Gap.


sage: A = matrix(GF(2), [[1,1,0],[1,0,1]])
sage: gap(A)
[ [ Z(2)^0, Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), Z(2)^0 ] ]
sage: A
[1 1 0]
[1 0 1]


> Similarly for graphs. Presumably someone has done it by now. Is there a FAQ
> for this?
>
>
> --
> 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.

-- 
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.


Re: [sage-support] How can I double check a non-isomorphism between graphs?

2016-10-23 Thread David Joyner
On Sun, Oct 23, 2016 at 9:05 AM, Paul Leopardi  wrote:
> Since asking the question "How should I determine if two strongly regular
> graphs are isomorphic?" I have made great progress in classifying Bent
> functions by their Cayley graphs.
> That is, up until now. I have found two graphs which I was (emprically)
> expecting to be isomorphic have different canonical labels.
>
> To reproduce:
> 1. Clone the python-refactor branch of penguian/Boolean-Cayley-graphs
> 2. Copy the attached Sage file test_isomorphism.sage to your cloned
> Boolean-Cayley-graphs directory.
> 3. In your cloned Boolean-Cayley-graphs directory, run sage and enter
> load("test_isomorphism.sage")
>
> You should see:
>
> sage: load("test_isomorphism.sage")
> Defining bent function f...
> f.algebraic_normal_form() == x0*x1*x6 + x0*x3 + x1*x4 + x2*x3*x6 + x2*x5 +
> x3*x4 + x4*x5*x6 + x6*x7
> Determining strongly regular graphs SG1 and SG2...
> Finding canonical labels CG1 and GG2...
> CG1 == CG2: False
> G1.is_isomorphic(G2): False
> SageCG1 == SageCG2: False
> SG1.stored_clique_polynomial == SG2.stored_clique_polynomial: True
> SG1.stored_clique_polynomial == 45056*t^9 + 780288*t^8 + 2998272*t^7 +
> 5505024*t^6 + 4816896*t^5 + 1892352*t^4 + 286720*t^3 + 15360*t^2 + 256*t + 1
> SG1.rank == SG2.rank: True
> SG1.rank == 16
> SG1.group_order == SG2.group_order: True
> SG1.group_order == 229376
> G1.automorphism_group().is_isomorphic(G2.automorphism_group()): True
> sage:
>
> This is saying that G1, the Cayley graph of f, and G2, the strongly regular
> graph obtained from the two-weight code derived from f, are not isomorphic,
> *but*
> G1 and G2 have the same clique polynomial, *and*
> G1 and G2 have isomorphic automorphism groups.
>
> Do you have any hints on how I can further diagnose what is really going on
> here? I suspect a bug in my own code rather than a bug in Sage or a true
> non-isomorphism, but at this stage I can't be sure.
> For example, I have not yet found nor devised a proof that G1 and G2 should
> be isomorphic, beyond observing that it is true for all the other cases I
> have examined so far.
>
> The code for cayley_graph() and for strongly_regular_graph() is in
> bent_function.py.
> The method strongly_regular_graph() depends on linear_code(), which is
> defined in boolean_function_improved.py, and is based on a simplified
> version of Ding III a) https://arxiv.org/abs/1503.06511

I haven't looked at your code but are you comparing the SRG associated
to the Boolean bent function and the graph associated to the incidence
matrix of that graph?


> Sorry I haven't yet fully documented my code. It is a work in progress.
>
> --
> 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.

-- 
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.


Re: [sage-support] plot3d

2016-10-09 Thread David Joyner
On Sun, Oct 9, 2016 at 4:22 PM, raman kurdi  wrote:
> I checked it without any result.
>


Can you be much much more specific? What exactly did you type in? What
exactly did you get as output?

> On Sun, Oct 9, 2016 at 3:45 PM, raman kurdi 
> wrote:
>> Hi Sage,
>> I want to draw the function $y^2+z^2=x^3+ax+b$ by sage. Could you  please
>> help me.
>>
>
> Does this help?
> http://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/implicit_plot3d.html
>
>> Raman
>>
>> --
>> 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.
>
> --
> 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.
>
> --
> 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.

-- 
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.


Re: [sage-support] plot3d

2016-10-09 Thread David Joyner
On Sun, Oct 9, 2016 at 3:45 PM, raman kurdi  wrote:
> Hi Sage,
> I want to draw the function $y^2+z^2=x^3+ax+b$ by sage. Could you  please
> help me.
>

Does this help?
http://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/implicit_plot3d.html

> Raman
>
> --
> 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.

-- 
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.


Re: [sage-support] BCH Efficient Decoder

2016-10-08 Thread David Joyner
On Saturday, October 8, 2016, Phedon Prasinos 
wrote:

>
>
>> According to
>> http://www.gap-system.org/Manuals/pkg/guava3.11/doc/
>> chap5.html#X7C6BB07C87853C00
>> the Sugiyama decoding algorithm has been implemented in guava, which
>> you can access from sage.
>>
>>>
>>>
> Thank you, is what i am looking for, but theres a problem.
> Although I can run the commands i want to the GAP console I cant add them
> on a python script (not able to find a solution to the documentation)
> P.S. The Data types of linear codes matrices etc, are understandable by
> guava?
>


It depends on exactly what you want to do, how well you know python and
gap, and how much work you are willing to invest.
A first place to look might be the gap interface module .


> --
> 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.
>

-- 
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.


Re: [sage-support] BCH Efficient Decoder

2016-10-08 Thread David Joyner
On Sat, Oct 8, 2016 at 1:29 PM, Phedon Prasinos  wrote:
> Hello,
>
> I am trying to implement an efficient decoder for an narrow-sense BCH code
> (511,193).
> Does anyone knows a way for fast decoding in sage?
>

According to
http://www.gap-system.org/Manuals/pkg/guava3.11/doc/chap5.html#X7C6BB07C87853C00
the Sugiyama decoding algorithm has been implemented in guava, which
you can access from sage.


> Thanks in advance!
>
> --
> 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.

-- 
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.


Re: [sage-support] Re: Create Linear code from vector space

2016-10-06 Thread David Joyner
On Thu, Oct 6, 2016 at 11:03 AM, Giorgos Marios  wrote:
> I am sorry, i want a large linear code capable of correcting t errors so i
> can experiment with a simple McEliece implementation without using goppa
> codes.
> I am searching many hours for the right code family and the code
> constructors of sage without any luck.
>

Does a BCH code give you what you want?

>
> On Thursday, October 6, 2016 at 5:29:09 PM UTC+3, Giorgos Marios wrote:
>>
>> Hello,
>>
>> Let's say I have a -Vector space of dimension n over Finite Field of size
>> 2- I would like to know, how to create a large Linear code with specific
>> weight and number of errors it can handle.
>> Also i would like to know, if after that is possible to construct a fast
>> decoder.
>>
>> Thank you very much!
>
> --
> 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.

-- 
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.


Re: [sage-support] Create Linear code from vector space

2016-10-06 Thread David Joyner
On Thu, Oct 6, 2016 at 10:15 AM, Giorgos Marios  wrote:
> Hello,
>
> Let's say I have a -Vector space of dimension n over Finite Field of size 2-
> I would like to know, how to create a large Linear code with specific weight
> and number of errors it can handle.

Can you please explain more precisely what you want?
Is it a linear code of length n with a given weight enumerator
polynomial that you want?

> Also i would like to know, if after that is possible to construct a fast
> decoder.
>
> Thank you very much!
>
> --
> 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.

-- 
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.


Re: [sage-support] How do I count the number of simple cycles in a graph?

2016-10-04 Thread David Joyner
On Tue, Oct 4, 2016 at 12:18 AM, Kristaps Balodis
 wrote:
> Specifically I would like to figure out what to type in order to compute the
> number of simple cycles in the Hoffman-Singleton graph.
>

Does this help?
http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/digraph.html#sage.graphs.digraph.DiGraph.all_simple_cycles

> --
> 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.

-- 
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.


Re: [sage-support] How do I load all pages into the preview of my document?

2016-09-27 Thread David Joyner
On Tue, Sep 27, 2016 at 1:15 PM, Bharath Krishnan  wrote:
> I am unable to load all the pages in my document. I have 6 pages and only
> one shows up in the preview. Here is the link to my file.
>
> https://cloud.sagemath.com/projects/180e8f3c-9dc5-424f-abcc-5267257c0d31/files/2016-08-31-191845.tex
>
> I need this fixed as quickly as possible. Can you please help?
>

FYI, I get a "Opening '2016-08-31-191845.tex' publicly not yet
supported." error when i click on your link.

> --
> 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.

-- 
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.


Re: [sage-support] How to solve ODE y'' - 4y' + y - x = 0 using rk4?

2016-09-06 Thread David Joyner
On Mon, Sep 5, 2016 at 9:33 PM,   wrote:
> How to solve ODE y'' - 4y' + y - x = 0 using rk4? :(
>

http://doc.sagemath.org/html/en/reference/calculus/sage/calculus/desolvers.html
lists dsolve_rk4.
Was there a specific problem you encountered?

> --
> 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.

-- 
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.


[sage-support] Re: [sage-edu] how to plot the implicit solution of an ode by 'implicit_plot'?

2016-08-27 Thread David Joyner
On Fri, Aug 26, 2016 at 11:39 PM, Wei, Huayi  wrote:
> Hi, Guys,
>
> I solve an ode and get an  implicit solution as following, and my question
> is how to plot `f` by `implicit_plot` command.
>
> ```
>
> var('t')
>
> y = function('y')(t)
>
> de = diff(y, t)/((2-y)*y) == 1
>
> f = desolve(de, y, [0, 10]) #  the solution is -1/2*log(y(t) - 2) +
> 1/2*log(y(t)) == t + 1/2*log(10) - 1/2*log(8)
> ```
>

sage: var("t,y")
(t, y)
sage: implicit_plot(-1/2*log(y - 2) + 1/2*log(y) == t + 1/2*log(10) -
1/2*log(8), (t, 0, 2), (y, 2.1,10), figsize=4, axes="true" )

worked for me.

For more info on the syntax, see here

http://doc.sagemath.org/html/en/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.implicit_plot

and also here

http://sagemath.wikispaces.com/implicit_plot

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


Re: [sage-support] Re: (William Stein) "my top priority right now is to **make a lot of money**"

2016-08-26 Thread David Joyner
On Fri, Aug 26, 2016 at 6:51 AM, Nathann Cohen  wrote:
>> Nathan does give the link to the original post, but he is quoting out of
>> context. Here is the full post:
>
>
> Still, it would be incomplete to claim, as in the original post, that the
> only aim of SageMath Inc. is to fund Sage development and associated
> activities. Take it as a proof that William announced that the development
> of SageMath Inc. was now his only professional activity, and you can safely
> guess that he will pay himself for that.
>
> Consequently, by making "a lot of money" through SageMath Inc. it is clear
> that William also aims at making money for himself (food, rent, whatever).
> Missing that, his presentation was certainly not exhaustive.
>
> Nathann
>
> Note to the moderator: this email only contains facts, and is of general
> interest to the community of developers of Sage, whose name is represented
> by the company SageMath Inc (owner of the trademark).
>

Nathann:

I've put you on the moderated list for both sage-devel and sage-support.

>From the sage-support page:

"Before posting, please check the FAQ page, try searching Sage
resources or goto ask.sagemath.org.
Guidelines: 1. only one question per post | 2. descriptive subject
title | 3. also describe the desired result and the context of the
problem.
Include: Platform (CPU) and Operating System | Exact version of Sage
(command: "version()") | Provide copy-paste-ready reproducible
commands causing the error."

Please send followups to sage-flame.

Thank you.




> --
> 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.

-- 
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.


[sage-support] Re: [sage-edu] Compiling Sage Code to run faster

2016-04-08 Thread David Joyner
On Fri, Apr 8, 2016 at 8:21 PM,   wrote:
> Hello,
>
> I have a Sage program that runs very slowly on both the Sage Math Cloud and
> on the SageMath implementation on my computer.  I am curious about the
> possibility of compiling my Sage program so that I can execute it much more
> quickly.  Can this be done easily?  I believe that this can be done with
> Python programs.
>

Using cython? The cython docs are here: http://cython.org/#documentation

This doesn't sound like a sage-edu (teaching using Sage) question but
maybe I'm not understanding what you want.

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


[sage-support] Re: [sage-edu] Writing 'n' variables in Sagemath linux ubuntu

2016-01-26 Thread David Joyner
This is the wrong email list for this sort of question. I'm cc'ing
sage-support. If you have a topic or question about teaching with
Sagemath, please post that here.

BTW, I googled your question and came up with this:
http://ask.sagemath.org/question/7925/a-list-of-symbolic-variables/
I'm not sure if that is what you want.


On Tue, Jan 26, 2016 at 3:01 AM, Usman Afzal  wrote:
> If I want to write one variable, the command is
> x=var('x')
>
> But I want to write "n" variables namely x1, x2, . . . , x(n). How can I
> write this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-edu.
> 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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Fwd: [sage-release] Bug in limit?

2015-11-22 Thread David Joyner
Forwarded to the correct list

-- Forwarded message --
From: G. M.-S. 
Date: Sun, Nov 22, 2015 at 4:34 PM
Subject: [sage-release] Bug in limit?
To: sage-rele...@googlegroups.com



Hello.

This is my first post, please be indulgent.

Is the following a bug?

Thanks in advance.

Guillermo Moreno-Socías

┌┐
│ SageMath Version 6.9, Release Date: 2015-10-10 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: var('m a0')
(m, a0)
sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
sage: limit(x,m=oo)

;;;
;;; Detected access to protected memory, also kwown as 'bus or
segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;

(Note that if x is expanded then the limit is correctly calculated.)

--
You received this message because you are subscribed to the Google
Groups "sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-release+unsubscr...@googlegroups.com.
To post to this group, send email to sage-rele...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-release.
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] Re: [GAP Support] Bug in MinimumWeight ?

2015-10-20 Thread David Joyner
Simon:

Thank you for your report. Joe Fields is the maintainer and probably
has better recommendations than I can offer. My only comment is that
the MinimumWeight function outputs the result of a C program written
by someone who is no longer in academia.

- David

On Tue, Oct 20, 2015 at 3:54 PM, Simon Tinius  wrote:
> Hello,
>
> I was using the MinimumWeight function which is part of the guava package,
> to compute the minimumweight of
> a linear code, given by a generator matrix. Strangely the functions yield
> different results.
>
> In a linear Code they should yield the same return value, but in my special
> case they repeatedly don't.
>
> Here is the Code I have been using:
>
> G:=
> [ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0,
>   Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
> Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0,
>   Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], [ 0*Z(2),
> Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0,
> Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
>   Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0,
> Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ],
>   [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0,
>   Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0,
> Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0,
>   0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2),
> 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0,
> Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
>   Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0,
> 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ],
>   [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2),
>   0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0,
> Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0,
>   Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2),
> 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0,
>   Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0,
> Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2) ],
>   [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0,
>   Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
> 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
>   0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0, Z(2)^0 ], [ 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0,
> Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2),
>   Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0, Z(2)^0,
> 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0, 0*Z(2), Z(2)^0 ],
>   [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0,
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
>   0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2),
> 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2),
>   

Re: [sage-support] Re: girth of the Foster graph?

2015-10-02 Thread David Joyner
On Fri, Oct 2, 2015 at 6:08 PM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> Everything is fine
>
> sage: graphs.GrayGraph().diameter()
> 6
> sage: graphs.FosterGraph().diameter()
> 8
>
> If you define a graph with a variable called Gamma and then call a method of
> *another* variable G then do not expect to get the answer to a property of
> Gamma...
>

How embarrassing!
Thanks Vincent and sorry for wasting bandwidth.

> Vincent
>
>
> On 02/10/15 19:01, David Joyner wrote:
>>
>> Simllar problem with the Gray graph:
>>
>> sage: Gamma = graphs.GrayGraph()
>> sage: G.diameter()
>> 8
>> (it should be 6)
>>
>> G = graphs.LCFGraph(54, [-25,7,-7,13,-13,25], 9)
>> sage: G.diameter()
>> 6
>> seems to be the Gray graph
>>
>> On Fri, Oct 2, 2015 at 5:47 PM, David Joyner  wrote:
>>>
>>> On Fri, Oct 2, 2015 at 5:44 PM, David Joyner  wrote:
>>>>
>>>> Hi all:
>>>>
>>>> Several online sources (including a page on Royle's website) give the
>>>> girth of the Foster graph to be 10, but Sage gives 6:
>>>>
>>>> sage: Gamma = graphs.FosterGraph()
>>>> sage: G.girth()
>>>> 6
>>>>
>>>> Is there a bug in girth?
>>>>
>>>> - David
>>>
>>>
>>> I might have found an answer to my own question:
>>>
>>> sage: G = graphs.LCFGraph(90, [17,-9,37,-37,9,-17], 15)
>>> sage: G.is_vertex_transitive()
>>> True
>>> sage: G.is_hamiltonian()
>>> True
>>> sage: G.chromatic_number()
>>> 2
>>> sage: G.is_bipartite()
>>> True
>>> sage: len(G.vertices())
>>> 90
>>> sage: len(G.edges())
>>> 135
>>> sage: G.girth()
>>> 10
>>>
>>> These suggest that G is the true Foster graph
>>
>>
>
> --
> 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] Re: girth of the Foster graph?

2015-10-02 Thread David Joyner
Simllar problem with the Gray graph:

sage: Gamma = graphs.GrayGraph()
sage: G.diameter()
8
(it should be 6)

G = graphs.LCFGraph(54, [-25,7,-7,13,-13,25], 9)
sage: G.diameter()
6
seems to be the Gray graph

On Fri, Oct 2, 2015 at 5:47 PM, David Joyner  wrote:
> On Fri, Oct 2, 2015 at 5:44 PM, David Joyner  wrote:
>> Hi all:
>>
>> Several online sources (including a page on Royle's website) give the
>> girth of the Foster graph to be 10, but Sage gives 6:
>>
>> sage: Gamma = graphs.FosterGraph()
>> sage: G.girth()
>> 6
>>
>> Is there a bug in girth?
>>
>> - David
>
> I might have found an answer to my own question:
>
> sage: G = graphs.LCFGraph(90, [17,-9,37,-37,9,-17], 15)
> sage: G.is_vertex_transitive()
> True
> sage: G.is_hamiltonian()
> True
> sage: G.chromatic_number()
> 2
> sage: G.is_bipartite()
> True
> sage: len(G.vertices())
> 90
> sage: len(G.edges())
> 135
> sage: G.girth()
> 10
>
> These suggest that G is the true Foster graph

-- 
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: girth of the Foster graph?

2015-10-02 Thread David Joyner
On Fri, Oct 2, 2015 at 5:44 PM, David Joyner  wrote:
> Hi all:
>
> Several online sources (including a page on Royle's website) give the
> girth of the Foster graph to be 10, but Sage gives 6:
>
> sage: Gamma = graphs.FosterGraph()
> sage: G.girth()
> 6
>
> Is there a bug in girth?
>
> - David

I might have found an answer to my own question:

sage: G = graphs.LCFGraph(90, [17,-9,37,-37,9,-17], 15)
sage: G.is_vertex_transitive()
True
sage: G.is_hamiltonian()
True
sage: G.chromatic_number()
2
sage: G.is_bipartite()
True
sage: len(G.vertices())
90
sage: len(G.edges())
135
sage: G.girth()
10

These suggest that G is the true Foster graph

-- 
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] girth of the Foster graph?

2015-10-02 Thread David Joyner
Hi all:

Several online sources (including a page on Royle's website) give the
girth of the Foster graph to be 10, but Sage gives 6:

sage: Gamma = graphs.FosterGraph()
sage: G.girth()
6

Is there a bug in girth?

- David

-- 
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] How to compute the inverse tangent of an angle in degrees?

2015-09-27 Thread David Joyner
On Sun, Sep 27, 2015 at 12:47 PM, avi kaur  wrote:
> Hi
>
> There is function in octave to calculate the inverse tangent of an
> angle in degrees i.e. atand(). I did not find any function related to
> this in sage. I have to compute it. I tried following in octave:
>
> octave:1> phiPrime = atand(0.67)
> phiPrime =  33.822
>
> and in sage it tried
>
> sage: phiPrime = atanh(0.67)
> sage: phiPrime
> 0.810743125475137
>
> I want to ask that is there any function in sage similar to octave.
> The function I used is not that which gives me right answer. I did not
> find any similar function.
>
>


sage: atan_deg = lambda x: RR(atan(x)*180/pi)
sage: atan_deg(1)
45.0




>
> --
> Avi kaur
> Blog: https://avikashyap620.wordpress.com
> "There is no lacking of opportunity, The thing is you do not want to see It"
>
> --
> 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] List the codewords of minimum weight

2015-09-10 Thread David Joyner
Hi Nathann:

GAP's guava has
http://www.gap-system.org/Manuals/pkg/guava3.11/doc/chap4.html#X84EDF67B86B4154C
it is an interface to a program written in C for codes over GF(2) or
GF(3). It was written by CJ Tjhal, who I think is no longer in
academia.

A related GAP library function is
AClosestVectorCombinationsMatFFEVecFFE
and
AClosestVectorCombinationsMatFFEVecFFECoords
See http://www.gap-system.org/Manuals/doc/ref/chap23.html#X82E5987E81487D18

Hope this helps.

- David

On Thu, Sep 10, 2015 at 3:47 AM, Nathann Cohen  wrote:
> Hell everybody,
>
> I am trying to build an interesting 2-design from the following code:
>
> sage: c=codes.ExtendedQuadraticResidueCode(47,GF(2))
> sage: c
> Linear code of length 48, dimension 24 over Finite Field of size 2
>
> This is to be done by listing all codewords of minimum weight (here
> the weight is 12), but the *total* number of codewords is big. Is
> there a faster way to obtain  only the list of light codewords?
>
> THanks!
>
> Nathann
>
> --
> 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] Incorrect Integral Result?

2015-08-31 Thread David Joyner
On Mon, Aug 31, 2015 at 6:58 PM, Jim Huff  wrote:
> The integral of -1/(1-x) should be ln(1-x)
>
> SageMathCloud computes ln(x-1)
>


assume(x>1)
integrate(-1/(1-x),x)

returns ln(x-1), which is correct.

For 0 integrate(-1/(1-x),x)
> RUN
> Result:  log(x-1)
>



>
> --
> 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] Plotting a q analogue function as a challenge?

2015-08-13 Thread David Joyner
On Fri, Aug 14, 2015 at 12:16 AM, saad khalid  wrote:
>
>> While qgamma isn't a "native" function, there's a qgamma implementation in
>> mpmath, one of the libraries included in Sage, so:
>>
>> from mpmath import qgamma
>> plot(lambda x: qgamma(4,x), (x, 2, 10))
>>
>> should give you a plot of gamma_(q=4).
>
>
> Thank you! Though, looking at the documentation, I think you meant that it's
> q-gamma at x=4?  Also, I was wondering, what does the "lambda x: " part of
> your code do? Or rather, how do I go about calling x later?
>
> Also, what is the best way for me to find functions like this, whose
> implementation I don't know in Sage? When I tried searching q-gamma Sage
> Math" on google, nothing came up, so I tried "q-gamma Maxima,"  but still
> nothing. I hadn't even thought of looking at Sympy. Is there a good way for
> me to know where to look?

I googled sympy q-gamma and got this:
http://docs.sympy.org/dev/modules/mpmath/functions/qfunctions.html

>
> --
> 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] Plotting a q analogue function as a challenge?

2015-08-13 Thread David Joyner
This is implemented in sympy, which is included with sage, according to google. 
I haven't tried it.

Sent from TypeMail



On Aug 13, 2015, 15:38, at 15:38, saad khalid  wrote:
>Hello everyone:
>
>I'm currently trying to get support from my professors in order for our
>
>school to move from Mathematica to Sage Math. One of them challenged me
>to 
>simply plot the q-gamma function on sage math, which he does on
>Mathematica 
>simply by calling on the QGamma function. Here is some information
>about it:
>
>http://mathworld.wolfram.com/q-GammaFunction.html
>
>My problem is, I don't actually know that much about the q-gamma
>function, 
>or really much about the gamma function. But, I don't want to let him
>down, 
>though he seemed very doubtful that Sage would be able to do it. I was 
>looking for the q-gamma function on Sage/maxima but I couldn't find 
>anything that fit what I was looking for. I'm hoping that maybe I just 
>don't know the name or the format for how it's done outside of
>Mathematica? 
>
>To be honest, I'm fairly new to Sage as well. I'm sorry if I'm asking
>in 
>the wrong place, it's because I simply don't know where to ask. If
>there's 
>a better place for me to ask this, I would be happy to ask there! 
>
>Thanks for your help. I'm really hoping that I can get our college to 
>support 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.

-- 
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: [sage-edu] integration involving differential

2015-07-26 Thread David Joyner
On Mon, Jul 27, 2015 at 1:09 AM, sairam  wrote:

> Thank you very much for the reply.  In the integration specified, f is a
> function of y
>
> When I use the following as suggested by you,
>
> x, y, a= var('x,y,a')
> f = function("f", y)
> integrate(integrate((diff(f,y))*(exp(-a*x^2)*cos(y)^2*sin(x)^3), x, 0,
> pi), y, -pi, pi)
>
> Sagemath is dumping  an error. I would appreciate if you can helping me
> sorting out the problem in evaluating the integral.
>
>
A simpler way to get this error (since your double integral is obviously a
product of 2 integrals) is below. I don't understand this error either.

sage: f = function("f", x)
sage: integrate(diff(f,x)*cos(x)^2, x, -pi, pi)
#0:
signum_int(q=cos(2*_SAGE_VAR_x)*'diff('realpart(f(_SAGE_VAR_x)),_SAGE_VAR_x,1)+sin(2*_SAGE_VAR_x)*'diff('imagpart...,x=_SAGE_VAR_x)
#1:
extra_integrate(q=cos(2*_SAGE_VAR_x)*'diff('realpart(f(_SAGE_VAR_x)),_SAGE_VAR_x,1)+sin(2*_SAGE_VAR_x)*'diff('imagpart...,x=_SAGE_VAR_x)
---
RuntimeError  Traceback (most recent call last)
 in ()
> 1 integrate(diff(f,x)*cos(x)**Integer(2), x, -pi, pi)

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/misc/functional.pyc
in integral(x, *args, **kwds)
800 """
801 if hasattr(x, 'integral'):
--> 802 return x.integral(*args, **kwds)
803 else:
804 from sage.symbolic.ring import SR

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/expression.so
in sage.symbolic.expression.Expression.integral
(build/cythonized/sage/symbolic/expression.cpp:50961)()

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.pyc
in integrate(expression, v, a, b, algorithm, hold)
710 return indefinite_integral(expression, v, hold=hold)
711 else:
--> 712 return definite_integral(expression, v, a, b, hold=hold)
713
714 integral = integrate

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/function.so
in sage.symbolic.function.BuiltinFunction.__call__
(build/cythonized/sage/symbolic/function.cpp:9269)()

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/function.so
in sage.symbolic.function.Function.__call__
(build/cythonized/sage/symbolic/function.cpp:5911)()

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.pyc
in _eval_(self, f, x, a, b)
173 for integrator in self.integrators:
174 try:
--> 175 return integrator(*args)
176 except NotImplementedError:
177 pass

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/symbolic/integration/external.pyc
in maxima_integrator(expression, v, a, b)
 19 result = maxima.sr_integral(expression,v)
 20 else:
---> 21 result = maxima.sr_integral(expression, v, a, b)
 22 return result._sage_()
 23

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.pyc
in sr_integral(self, *args)
774 """
775 try:
--> 776 return
max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in args])))
777 except RuntimeError as error:
778 s = str(error)

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/libs/ecl.so
in sage.libs.ecl.EclObject.__call__
(build/cythonized/sage/libs/ecl.c:6877)()

/Volumes/Bay3/sagefiles2/sage-6.4.1/local/lib/python2.7/site-packages/sage/libs/ecl.so
in sage.libs.ecl.ecl_safe_apply (build/cythonized/sage/libs/ecl.c:4734)()

RuntimeError: ECL says: Error executing code in Maxima:

Thank you once again,
>
> Regards,
> sairam
>
> On Sunday, July 26, 2015 at 4:38:59 PM UTC+5:30, David Joyner wrote:
>>
>> In the integrand below, is f simply a function of y or does it also
>> depend on x?
>>
>>
>> On Jul 26, 2015, at 04:25, sairam  wrote:
>>>
>>>
>>> <https://lh3.googleusercontent.com/-HGLRuiudDNI/VbRfkfqbiNI/AFk/gVw9Ejc6pyo/s1600/CodeCogsEqn.gif>
>>>
>>> Hi
>>>
>>> I am new bie to sagemath and trying to find the analytical integration
>>> for the above.
>>>
>>> I have used the following expressions in sagemath
>>>
>>> x, y, a, f = var('x,y,a,f')
>>>
>>>
>>
>> f = function("f", x)
>> or
>> f = function("f",x,y)
>>
>> integrate(integrate((diff(f))*(exp(-a*x^2)*cos(y)^2*sin(x)^3), x

[sage-support] Re: [sage-edu] integration involving differential

2015-07-26 Thread David Joyner
In the integrand below, is f simply a function of y or does it also depend
on x?


On Jul 26, 2015, at 04:25, sairam  wrote:
>
>
> 
>
> Hi
>
> I am new bie to sagemath and trying to find the analytical integration for
> the above.
>
> I have used the following expressions in sagemath
>
> x, y, a, f = var('x,y,a,f')
>
>

f = function("f", x)
or
f = function("f",x,y)

integrate(integrate((diff(f))*(exp(-a*x^2)*cos(y)^2*sin(x)^3), x, 0, pi),
> y, -pi, pi)
>
>
In the first case, you want


x, y, a= var('x,y,a')
f = function("f", x)
integrate(integrate((diff(f,x))*(exp(-a*x^2)*cos(y)^2*sin(x)^3), x, 0, pi),
y, -pi, pi)

which will give you the partially evaluated integral.

The sagemath tutorials have more examples.
http://doc.sagemath.org/html/en/tutorial/index.html




> Though it gives output for the above expression, it does not consider the
> term differential of f,  can you please let me know how to include the
> differential in the integration.
>
> If I use the following, which includes differential with respect to y, it
> does not run but dumps an error
>
> integrate(integrate((diff(f), y)*(exp(-a*x^2)*cos(y)^2*sin(x)^3), x, 0,
> pi), y, -pi, pi)
>
> Any help for  solving the above integration will be highly appreciated.
>
> Thanks in advance,
>
> Regards,
> sairam
>
>
>

-- 
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] How to change colors in plot3d_cube ?

2015-07-24 Thread David Joyner
On Fri, Jul 24, 2015 at 8:45 PM, Yoshihiro Sato  wrote:
> Hello,
>
> I am reading Adventure in group theory, written by David Joyner.
>
> I am interested in changing colors of faclet.
> There is an option in plot_cube, however there is no option in plot3d_cube.
>
> Would you give me a suggestion how to change colors in plot3d_cube ?
>

If you type
rubik.plot3d_cube??
you can see the source code.
Can you go to the source code and change the colors there, then recompile?


> Thanks,
> Yoshihiro Sato
>
> References:
> ---
> plot3d_cube(mv, title=True)
>
> plot_cube(mv, title=True, colors=[(1, 0.63, 1), (1, 1, 0), (1, 0, 0), (0, 1,
> 0), (1, 0.6, 0.3), (0, 0, 1)])
>
> rubik = CubeGroup()
> P = rubik.plot_cube("R^2*U^2*R^2*U^2*R^2*U^2", \
>  colors=[orange, (0, 0, 1), (0, 1, 0), (0.9, 0.9, 0.9), (1, 0.9, 0), (1, 0,
> 0)]);
> show(P)
> ---
>
> --
> 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] Re: Query about SageMath

2015-07-24 Thread David Joyner
On Fri, Jul 24, 2015 at 12:36 PM, Amritpal Singh  wrote:
> On Friday, July 24, 2015 at 7:46:45 PM UTC+5:30, Nils Bruin wrote:
>
>> The functionality of desolve is, as documented, all provided by maxima. I
>> am not aware of any verbosity options in maxima. There is a "show_method"
>> option documented, which helps a little bit:
>>
>> sage: desolve(de,dvar=x,ivar=t,show_method=true)
>> [_K2*cos(sqrt(k)*t/sqrt(m)) + _K1*sin(sqrt(k)*t/sqrt(m)), 'constcoeff']
>>
>> which suggests that maxima recognized the equation as a linear ODE with
>> constant coefficients. So it probably did the usual calculus thing that
>> you're taught in a calculus course or a first ODE course.
>
>
>
> Thanks for reply.
>
> I know that function show_method gives a result that by which method that
> Sage solved a differential equation.
>
> This is not my exact answer of my question. I need to print all the steps
> that Sage can internally do to solving my differential equation.
>

Did you look at sympygamma? Sympy is included in Sage:
http://www.sympygamma.com/input/?i=integrate%28x%5E2%2Blog%28x%29%29

> --
> Amritpal Singh
> Blog address: https://amrit3701.wordpress.com/
>
> --
> 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] Sage switching denominators

2015-06-27 Thread David Joyner
Look more carefully at your var statement. There's a typo.

Sent from TypeMail



On Jun 27, 2015, 08:12, at 08:12, Matt Lykins  wrote:
>Hello All,
>I am somewhat new to sage and I have come across a potential problem. I
>am 
>trying to use an equation like (A/B)+C. When I have sage read it back
>to me 
>it shows up as (A/C)+B. Am I doing something wrong or is this a bug?
>Here 
>is a screenshot.
>
>
>
>
>-- 
>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] Re: Induction method

2015-06-13 Thread David Joyner
On Fri, Jun 12, 2015 at 5:06 PM, avi kaur  wrote:
> On Sat, Jun 13, 2015 at 2:08 AM, Dominique Laurain
>  wrote:
>> Precisely I cannot explain it...because using software is not same coding
>> software ..people , not me, are coding SAGE (and other modules included into
>  .
>  .
>  .
>  maybe you will see the light in your dark quest.
>
> Sir, Actually my industrial training have started and from the very
> first day I assignment on SageMath. My teacher asked me to use
> sagemath and give presentation on "Why people should use sagemath as
> there are many other mathematical softwares". They asked me what did
> you do in math and PMI( Principle of Induction Method) one of the
> mentioned topic.
> Then they said to try out PMI in sage.

In that case, I would suggest you look at the solution to recursive equations,
such as the Fibonacci sequence.

See for example

https://groups.google.com/forum/#!topic/sage-support/pYvjN7da9LY
and
http://ask.sagemath.org/question/8806/how-to-define-a-recursive-sequence-on-sage/


>
> This is the only reason, nothing else. Thats why I am using and try
> different problems daily.
>
>
> --
> Avi kaur
> Blog: https://avikashyap620.wordpress.com
> "There is no lacking of opportunity, The thing is you do not want to see 
> It"
>
>
>> You received this message because you are subscribed to a topic in the
>> Google Groups "sage-support" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/sage-support/ij-zbpbK83I/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.

-- 
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] Email synchronization from outlook programatticaly in C#

2015-06-11 Thread David Joyner
On Thu, Jun 11, 2015 at 4:12 AM,   wrote:
> Hi,
>
> I want to copy mail from outlook to SAGE using C#. Can anyone suggest
> something.
>

Seems like you have the wrong email list. The instructions for
unsubscribe are below.
This list is for those using the program available at www.sagemath.org

> --
> 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] Induction method

2015-06-08 Thread David Joyner
On Mon, Jun 8, 2015 at 3:37 PM, avi kaur  wrote:
> Hello Everyone
>
>
> Is it possible to solve Induction problems in sage. If yes then how?
>

Can you give an example of what you want?
For example, do you mean solve a recursive equation?

>
> --
> Avi kaur
>
> --
> 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] ordering of edges in incidence_matrix vs edges methods are difference

2015-05-18 Thread David Joyner
On Mon, May 18, 2015 at 8:30 AM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> On 18/05/15 14:06, David Joyner wrote:
>> On Mon, May 18, 2015 at 7:51 AM, Vincent Delecroix
>> <20100.delecr...@gmail.com> wrote:
>>> Moreover, for non oriented graph the Sage definition does not fit with
>>> wikipedia... I opened the trac ticket
>>>
>>> http://trac.sagemath.org/ticket/18440
>>>
>>
>> Thank you.
>>
>> In case it's of any interest, the code I've been using privately
>> allows for an arbitrary edge orientation (following Biggs). See below:
>
> Your code does not follow wikipedia definition where the entries belong
> to {0, 1, 2} when the graph is not oriented.
>

I always use edge-oriented graphs for the calculations I need (which I
view as slightly different from directed graphs). What wikipedia
refers to as an oriented incidence matrix is what I use. It needs to
be fixed to follow the more general wikipedia definition.

Also, to be clear, I think what you are calling a graph in your
sagetrac ticket, some people call a multi-graph. And what you are
calling an oriented graph in your sagetrac ticket, includes
edge-oriented graphs, signed graphs, and directed graphs. If that is
incorrect, please let me know.

> Vincent
>
> --
> 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] ordering of edges in incidence_matrix vs edges methods are difference

2015-05-18 Thread David Joyner
On Mon, May 18, 2015 at 7:51 AM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> Moreover, for non oriented graph the Sage definition does not fit with
> wikipedia... I opened the trac ticket
>
> http://trac.sagemath.org/ticket/18440
>

Thank you.

In case it's of any interest, the code I've been using privately
allows for an arbitrary edge orientation (following Biggs). See below:

def incidence_value(Gamma, v, e, eo):
"""
This computes the incidence value of a vertex and edge of
a graph Gamma with edge-orientation vector eo.

INPUT:
Gamma - graph
v  - vertex of Gamma
e  - edge of Gamma
eo - a vector of 1's and -1's whose length is the number of
edges in Gamma

EXAMPLES:
sage: Gamma = graphs.PaleyGraph(9)
sage: E = Gamma.edges()
sage: V = Gamma.vertices()
sage: eo = [1]*len(E)
sage: incidence_value(Gamma, V[2], E[3], eo)
0
sage: incidence_value(Gamma, V[8], E[3], eo)
-1

"""
E = Gamma.edges()
if v in e:
if v == e[0]:
k = E.index(e)
return eo[k]
elif v == e[1]:
k = E.index(e)
return -eo[k]
else:
return 0
return 0


def incidence_matrix(Gamma, eo):
"""
This computes the incidence matrix (whose rows are indexed by edges
and whose columns are indexed by vertices) of a graph Gamma with
edge-orientation vector eo. The ordering of the edges and of the
vertices is the same
as Sage's vertices and edges methods.

INPUT:
Gamma - graph
eo - a vector of 1's and -1's whose length is the number of
edges in Gamma
 (ie, the size of Gamma, M)

EXAMPLES:
sage: Gamma = graphs.PaleyGraph(9)
sage: E = Gamma.edges()
sage: V = Gamma.vertices()
sage: eo = [1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1,
1, 1, -1, -1]
sage: B = incidence_matrix(Gamma, eo); B
[ 1 -1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0]
[-1  0  0  0 -1 -1  1  0  0  0  0  0  0  0  0  0  0  0]
[ 0  1  0  0  1  0  0 -1  1  0  0  0  0  0  0  0  0  0]
[ 0  0  0  0  0  0  0  1  0  1 -1 -1  0  0  0  0  0  0]
[ 0  0 -1  0  0  0  0  0  0 -1  0  0  1 -1  0  0  0  0]
[ 0  0  0  0  0  1  0  0  0  0  1  0 -1  0  1  0  0  0]
[ 0  0  0  0  0  0 -1  0  0  0  0  0  0  0 -1  1 -1  0]
[ 0  0  0  0  0  0  0  0 -1  0  0  1  0  0  0 -1  0 -1]
[ 0  0  0 -1  0  0  0  0  0  0  0  0  0  1  0  0  1  1]
sage: B.transpose()*B == Gamma.laplacian_matrix()
True

"""
E = Gamma.edges()
V = Gamma.vertices()
IG = [[incidence_value(Gamma, v, e, eo) for v in V] for e in E]
return matrix(QQ, IG).transpose()



> Vincent
>
> --
> 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] ordering of edges in incidence_matrix vs edges methods are difference

2015-05-18 Thread David Joyner
Hi all:

This issue is undocumented and seems odd to me. I could not find it
mentioned in sage-support before.

sage: Gamma1 = graphs.CompleteGraph(4); Gamma1
Complete graph: Graph on 4 vertices
sage: V1 = Gamma1.vertices(); V1
[0, 1, 2, 3]
sage: E1 = Gamma1.edges(); E1
[(0, 1, None),
 (0, 2, None),
 (0, 3, None),
 (1, 2, None),
 (1, 3, None),
 (2, 3, None)]
sage: Gamma1.incidence_matrix()
[-1 -1 -1  0  0  0]
[ 0  0  1 -1 -1  0]
[ 0  1  0  0  1 -1]
[ 1  0  0  1  0  1]

In other words, if you look at the ordering of the edges of Gamma1
determined by the incidence matrix that Sage returns, the first edge
(indicated by the first column) is (0,3). However, if you look at the
ordering of the edges of Gamma1 determined by the edges method, the
first edge is (0,1).

Maybe not a bug but an unusual feature?

- David Joyner

-- 
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] Re: Is there anywhere I can download the entire Sage documentation in HTML (ZIP) or PDF format?

2015-05-14 Thread David Joyner
On Thu, May 14, 2015 at 6:02 PM, Brenton  wrote:
> That just creates a heap of smaller PDFs: I wanted a single large PDF
> containing the content from all these smaller ones with bookmarks.
>

I don't know why you would want such a file but if you really think it
is useful, there are lots of programs that merge pdfs. For example, on
a mac, preview does that (and can add bookmarks) but google I'm sure
will tell you others.

>
> On Friday, 15 May 2015 05:28:20 UTC+10, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, 14 May 2015 20:21:28 UTC+1, Brenton wrote:
>>>
>>> Sounds good, I have both ready & waiting on my 32-bit Ubuntu 15.04
>>> (mentioning in case it's relevant) installation if you could tell me how to
>>> do this, please.
>>
>>
>> run
>>
>> sage --docbuild all pdf
>>
>>
>>>
>>> On Friday, 15 May 2015 05:16:34 UTC+10, Dima Pasechnik wrote:



 On Thursday, 14 May 2015 19:53:38 UTC+1, Brenton wrote:
>
> Hi,
>
> I do love Sage but it would be excellent if I could have the full Sage
> documentation (including all tutorials, thematic tutorials, reference
> manual, FAQ, developer's guide, installation guide, constructions, etc.) 
> in
> HTML (zipped) and/or PDF format (if it is in a PDF I'd like a single PDF,
> not a set of >10 of them), without having to download smaller component of
> Sage in PDF format and combine them in Adobe Acrobat Professional. I was
> wondering if this may be available somewhere on the web for a recent 
> release
> (i.e., Sage >6.5) for free. I realize any such PDF or zip directory of 
> HTMLs
> will likely be >50 MB & >10,000 pages in size but I would still like it, 
> if
> possible, for offline use. I already have a (partial, containing just the
> reference manual with 13,540 pages to it) solution, which I spent hours
> constructing from these smaller PDFs (which I'd lament doing for each new
> documentation release :( ), it's here in my Google Drive, if you're
> interested (http://goo.gl/E1PZ9p ).


 most natural would be to build the pdf docs yourself; you'd need a Sage
 and TeX installation for this.


>
> Thanks for your time,
> Brenton
>
> --
> 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] Can someone help understand this error ? (that is generated for large inputs)

2015-05-14 Thread David Joyner
On Thu, May 14, 2015 at 4:43 PM, Phoenix  wrote:
> The time trouble starts at the point in the code where it doesn't matter
> where the permutation matrices comes from.
>
> What the main part does is basically this.
>
> Given any set of matrices of dimensional k it produces by the "product" and
> "zip" command all possible ways of distributing those matrices over the set
> of edges of the graph of size n .
> One fixes some arbitrary orientation for each of the edges. It doesn't
> matter what.
> Now it creates a matrix M of size kn as a n x n array of size k matrices as
> follows : for the (a,b) edge is in the oriented edge list it (1) places into
> the (a,b) array position the matrix that was assigned to that edge and (2)
> it places into the (b,a) position the inverse of that matrix.  Now it
> calculates the characteristic polynomial of this M and keeps adding it up
> over all possible ways of distributing the matrices over the edges.
>
>

I ran the block below and it ran without error until I killed it (note
the additional print statement at the end) To me this suggests there
is no problem with your code. There might be a problem managing a
large list. If that is the case, you'll need to think more about other
ways to do the computation.


To the OP: if you had simply supplied the block below initially, as
William Stein suggested, you would have saved both your time and ours.



q=2; n=4

g = graphs.CompleteBipartiteGraph(n, n)

Edge = []
for (a,b,c) in g.edges ():
Edge.append ( (a,b) )

#This is how "rep" is created,

Fq2 = []
for i in range (q):
for j in range (q):
  Fq2.append (matrix([[i],[j]]))

SL2Fq = []
for i1 in range (q):
for i2 in range (q):
   for i3 in range(q):
 for i4 in range (q):
if (i4*i1-i2*i3)% q == 1 :
SL2Fq.append ( matrix( [ [i1, i2],[i3,i4] ] ) )

rep = []
for Y in SL2Fq:
M = []
for A in Fq2:
B = (Y*A)%q
row = []
for C in Fq2:
if B == C:
row.append ([1])
else:
row.append ([0])
M.append(flatten(row))
rep.append (matrix(M).transpose())

P = 0
from itertools import product
from itertools import izip

for X in product(rep,repeat = len (Edge)):
k = izip(Edge,X)
M = [[matrix(q^2, q^2, 0)]*(2*n) for ell in range(2*n)]
for ((a,b),Y) in k:
  M [a][b] = Y
  M [b][a] = Y.inverse()
Z = block_matrix(M)
P = P + Z.charpoly(x)
print P


> --
> 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] Can someone help understand this error ? (that is generated for large inputs)

2015-05-14 Thread David Joyner
On Thu, May 14, 2015 at 1:45 PM, Phoenix  wrote:
>
> Try q=2 n=4 or q=3 n=3 to see the "error" :)
>

Perhaps you can post rep and Edge in that case (in a format that can
be copy+pasted), or put them into a file and attach it or upload it
somewhere.

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Thursday, May 14, 2015 at 6:10:19 AM UTC-5, David Joyner wrote:
>>
>> On Thu, May 14, 2015 at 6:59 AM, Dima Pasechnik  wrote:
>> > The poster has not provided an example producing the error.
>> > One needs to increase q and/or n, as it is mentioned in the post.
>> >
>>
>> I missed that. Is it possible that the error is entirely due to the
>> way sagecell writes it to a file for execution in Python, and not the
>> code itself?
>>
>> > On Thursday, 14 May 2015 11:32:30 UTC+1, David Joyner wrote:
>> >>
>> >> On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>> >> >
>> >> >
>> >> > So I have this SAGE code which takes in two integers q and n and it
>> >> > generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their
>> >> > characteristic
>> >> > polynomials.
>> >> >
>> >> > I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>> >> >
>> >> > For any higher number the code runs for ~1hr and then it says,
>> >> >
>> >> > "
>> >> >
>> >> > Traceback (most recent call last):
>> >> >   File "", line 1, in 
>> >> >   File "_sage_input_2.py", line 10, in 
>> >> > exec compile(u'open("___code___.py","w").write("# -*- coding:
>> >> > utf-8
>> >> > -*-\\n" +
>> >> >
>> >> >
>> >> > _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
>> >> > execfile(os.path.abspath("___code___.py"))
>> >> >   File "", line 1, in 
>> >> >
>> >> >   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
>> >> > exec compile(u'P
>> >> >   File "", line 1, in 
>> >> >
>> >> > "
>> >> >
>> >> >
>> >> > Can someone help understand what is going on?
>> >> >
>> >> > Like any suggestion about how to go about it?
>> >> >
>> >>
>> >> I cannot reproduce this error:
>> >>
>> >>
>> >> q=2; n =2
>> >> rep = [ matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1,
>> >> 0]] ), matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0,
>> >> 0]] ) ,  matrix ([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1,
>> >> 0]] ) , matrix ( [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0,
>> >> 1]] ) ,  matrix ( [[1, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], [0, 1, 0,
>> >> 0]]) , matrix ([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0,
>> >> 1]] )  ]
>> >>
>> >> Edge = [(0, 2), (0, 3), (1, 2), (1, 3)]
>> >>
>> >> P = 0
>> >> from itertools import product
>> >> from itertools import izip
>> >>
>> >> for X in product(rep,repeat = len (Edge)):
>> >> k = izip(Edge,X)
>> >> M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
>> >> for ((a,b),Y) in k:
>> >>   M[a][b] = Y
>> >>   M[b][a] = Y.inverse()
>> >> Z = block_matrix(M)
>> >> P = P + Z.charpoly(x)
>> >> print P
>> >>
>> >>
>> >> gives
>> >>
>> >> 1296*x^16 - 20736*x^14 + 129600*x^12 - 393984*x^10 + 584496*x^8 -
>> >> 362880*x^6 + 62208*x^4
>> >>
>> >>
>> >> >
>> >> >
>> >> > EDIT:
>> >> >
>> >> > This is basically the main time-consuming step.
>> >> >
>> >> > At this point "rep" comes in as a ~q^3 size list of q^2 dimensional
>> >> > 0/1
>> >> > permutation matrices.
>> >> > And "Edge" is a list of integer tuples where each tuple is of the
>> >> > form
>> >> > (a,b)
>> >> > with a,b being from the set {0,1,2,3...

Re: [sage-support] Can someone help understand this error ? (that is generated for large inputs)

2015-05-14 Thread David Joyner
On Thu, May 14, 2015 at 6:59 AM, Dima Pasechnik  wrote:
> The poster has not provided an example producing the error.
> One needs to increase q and/or n, as it is mentioned in the post.
>

I missed that. Is it possible that the error is entirely due to the
way sagecell writes it to a file for execution in Python, and not the
code itself?

> On Thursday, 14 May 2015 11:32:30 UTC+1, David Joyner wrote:
>>
>> On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>> >
>> >
>> > So I have this SAGE code which takes in two integers q and n and it
>> > generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their
>> > characteristic
>> > polynomials.
>> >
>> > I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>> >
>> > For any higher number the code runs for ~1hr and then it says,
>> >
>> > "
>> >
>> > Traceback (most recent call last):
>> >   File "", line 1, in 
>> >   File "_sage_input_2.py", line 10, in 
>> > exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
>> > -*-\\n" +
>> >
>> > _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
>> > execfile(os.path.abspath("___code___.py"))
>> >   File "", line 1, in 
>> >
>> >   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
>> > exec compile(u'P
>> >   File "", line 1, in 
>> >
>> > "
>> >
>> >
>> > Can someone help understand what is going on?
>> >
>> > Like any suggestion about how to go about it?
>> >
>>
>> I cannot reproduce this error:
>>
>>
>> q=2; n =2
>> rep = [ matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1,
>> 0]] ), matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0,
>> 0]] ) ,  matrix ([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1,
>> 0]] ) , matrix ( [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0,
>> 1]] ) ,  matrix ( [[1, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], [0, 1, 0,
>> 0]]) , matrix ([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0,
>> 1]] )  ]
>>
>> Edge = [(0, 2), (0, 3), (1, 2), (1, 3)]
>>
>> P = 0
>> from itertools import product
>> from itertools import izip
>>
>> for X in product(rep,repeat = len (Edge)):
>> k = izip(Edge,X)
>> M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
>> for ((a,b),Y) in k:
>>   M[a][b] = Y
>>   M[b][a] = Y.inverse()
>> Z = block_matrix(M)
>> P = P + Z.charpoly(x)
>> print P
>>
>>
>> gives
>>
>> 1296*x^16 - 20736*x^14 + 129600*x^12 - 393984*x^10 + 584496*x^8 -
>> 362880*x^6 + 62208*x^4
>>
>>
>> >
>> >
>> > EDIT:
>> >
>> > This is basically the main time-consuming step.
>> >
>> > At this point "rep" comes in as a ~q^3 size list of q^2 dimensional 0/1
>> > permutation matrices.
>> > And "Edge" is a list of integer tuples where each tuple is of the form
>> > (a,b)
>> > with a,b being from the set {0,1,2,3...,(2n-1)}
>> >
>> > P = 0
>> > from itertools import product
>> > from itertools import izip
>> >
>> > for X in product(rep,repeat = len (Edge)):
>> > k = izip(Edge,X)
>> > M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
>> > for ((a,b),Y) in k:
>> >   M [a][b] = Y
>> >   M [b][a] = Y.inverse()
>> > Z = block_matrix(M)
>> > P = P + Z.charpoly(x)
>> >
>> > The polynomial P is the final expected answer.
>> >
>> > (and for any larger value of q and n than the 3 cases mentioned the
>> > program
>> > basically stops with no output for P and with the above pasted message)
>> >
>> > --
>> > 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.
>
> --
> 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] Can someone help understand this error ? (that is generated for large inputs)

2015-05-14 Thread David Joyner
On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>
>
> So I have this SAGE code which takes in two integers q and n and it
> generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their characteristic
> polynomials.
>
> I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>
> For any higher number the code runs for ~1hr and then it says,
>
> "
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_2.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
> -*-\\n" +
> _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
> execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
>
>   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
> exec compile(u'P
>   File "", line 1, in 
>
> "
>
>
> Can someone help understand what is going on?
>
> Like any suggestion about how to go about it?
>

I cannot reproduce this error:


q=2; n =2
rep = [ matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1,
0]] ), matrix ([[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0,
0]] ) ,  matrix ([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1,
0]] ) , matrix ( [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0,
1]] ) ,  matrix ( [[1, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], [0, 1, 0,
0]]) , matrix ([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0,
1]] )  ]

Edge = [(0, 2), (0, 3), (1, 2), (1, 3)]

P = 0
from itertools import product
from itertools import izip

for X in product(rep,repeat = len (Edge)):
k = izip(Edge,X)
M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
for ((a,b),Y) in k:
  M[a][b] = Y
  M[b][a] = Y.inverse()
Z = block_matrix(M)
P = P + Z.charpoly(x)
print P


gives

1296*x^16 - 20736*x^14 + 129600*x^12 - 393984*x^10 + 584496*x^8 -
362880*x^6 + 62208*x^4


>
>
> EDIT:
>
> This is basically the main time-consuming step.
>
> At this point "rep" comes in as a ~q^3 size list of q^2 dimensional 0/1
> permutation matrices.
> And "Edge" is a list of integer tuples where each tuple is of the form (a,b)
> with a,b being from the set {0,1,2,3...,(2n-1)}
>
> P = 0
> from itertools import product
> from itertools import izip
>
> for X in product(rep,repeat = len (Edge)):
> k = izip(Edge,X)
> M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
> for ((a,b),Y) in k:
>   M [a][b] = Y
>   M [b][a] = Y.inverse()
> Z = block_matrix(M)
> P = P + Z.charpoly(x)
>
> The polynomial P is the final expected answer.
>
> (and for any larger value of q and n than the 3 cases mentioned the program
> basically stops with no output for P and with the above pasted message)
>
> --
> 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] Can someone help understand this error ? (that is generated for large inputs)

2015-05-13 Thread David Joyner
On Wed, May 13, 2015 at 9:54 PM, Phoenix  wrote:
>
>
> For the q=2 , n =2 (the smallest test case) we have,
>
> Edge = [(0, 2), (0, 3), (1, 2), (1, 3)]
>
> rep =
>
> [
> [1 0 0 0]  [1 0 0 0]  [1 0 0 0]  [1 0 0 0]  [1 0 0 0]  [1 0 0 0]
> [0 0 1 0]  [0 0 1 0]  [0 1 0 0]  [0 1 0 0]  [0 0 0 1]  [0 0 0 1]
> [0 1 0 0]  [0 0 0 1]  [0 0 1 0]  [0 0 0 1]  [0 0 1 0]  [0 1 0 0]
> [0 0 0 1], [0 1 0 0], [0 0 0 1], [0 0 1 0], [0 1 0 0], [0 0 1 0]
> ]
>
>

This cannot be copy+pasted into Sage.
Please type it in so that someone who wants to help you can copy+paste.

>
>
>
>
>
>
>
>
>
>
>
>
> On Wednesday, May 13, 2015 at 8:51:08 PM UTC-5, David Joyner wrote:
>>
>> On Wed, May 13, 2015 at 9:43 PM, Phoenix  wrote:
>> >
>> > I am not sure how to include "rep".
>>
>> Can you type in a short example of what it could be?
>>
>> > Its a list generated by a set of operations somewhere else.
>> > I am generating "Edge" by extracting the edges of the graph K_{n,n}
>> >
>>
>> Can you type in a short example of what it could be?
>>
>> >
>> >
>> >
>> > On Wednesday, May 13, 2015 at 8:28:57 PM UTC-5, David Joyner wrote:
>> >>
>> >> On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>> >> >
>> >> >
>> >> > So I have this SAGE code which takes in two integers q and n and it
>> >> > generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their
>> >> > characteristic
>> >> > polynomials.
>> >> >
>> >> > I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>> >> >
>> >> > For any higher number the code runs for ~1hr and then it says,
>> >> >
>> >> > "
>> >> >
>> >> > Traceback (most recent call last):
>> >> >   File "", line 1, in 
>> >> >   File "_sage_input_2.py", line 10, in 
>> >> > exec compile(u'open("___code___.py","w").write("# -*- coding:
>> >> > utf-8
>> >> > -*-\\n" +
>> >> >
>> >> >
>> >> > _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
>> >> > execfile(os.path.abspath("___code___.py"))
>> >> >   File "", line 1, in 
>> >> >
>> >> >   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
>> >> > exec compile(u'P
>> >> >   File "", line 1, in 
>> >> >
>> >> > "
>> >> >
>> >> >
>> >> > Can someone help understand what is going on?
>> >> >
>> >> > Like any suggestion about how to go about it?
>> >> >
>> >> >
>> >> >
>> >> > EDIT:
>> >> >
>> >> > This is basically the main time-consuming step.
>> >> >
>> >> > At this point "rep" comes in as a ~q^3 size list of q^2 dimensional
>> >> > 0/1
>> >> > permutation matrices.
>> >> > And "Edge" is a list of integer tuples where each tuple is of the
>> >> > form
>> >> > (a,b)
>> >> > with a,b being from the set {0,1,2,3...,(2n-1)}
>> >> >
>> >> > P = 0
>> >> > from itertools import product
>> >> > from itertools import izip
>> >> >
>> >> > for X in product(rep,repeat = len (Edge)):
>> >> > k = izip(Edge,X)
>> >> > M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
>> >> > for ((a,b),Y) in k:
>> >> >   M [a][b] = Y
>> >> >   M [b][a] = Y.inverse()
>> >> > Z = block_matrix(M)
>> >> > P = P + Z.charpoly(x)
>> >> >
>> >>
>> >> Please include rep and Edge, if if it's in a simple case.
>> >>
>> >>
>> >> > The polynomial P is the final expected answer.
>> >> >
>> >> > (and for any larger value of q and n than the 3 cases mentioned the
>> >> > program
>> >> > basically stops with no output for P and with the above pasted
>> >> > message)
>> >> >
>> >> > --
>> >> > You received this message because yo

Re: [sage-support] Can someone help understand this error ? (that is generated for large inputs)

2015-05-13 Thread David Joyner
On Wed, May 13, 2015 at 9:43 PM, Phoenix  wrote:
>
> I am not sure how to include "rep".

Can you type in a short example of what it could be?

> Its a list generated by a set of operations somewhere else.
> I am generating "Edge" by extracting the edges of the graph K_{n,n}
>

Can you type in a short example of what it could be?

>
>
>
> On Wednesday, May 13, 2015 at 8:28:57 PM UTC-5, David Joyner wrote:
>>
>> On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>> >
>> >
>> > So I have this SAGE code which takes in two integers q and n and it
>> > generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their
>> > characteristic
>> > polynomials.
>> >
>> > I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>> >
>> > For any higher number the code runs for ~1hr and then it says,
>> >
>> > "
>> >
>> > Traceback (most recent call last):
>> >   File "", line 1, in 
>> >   File "_sage_input_2.py", line 10, in 
>> > exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
>> > -*-\\n" +
>> >
>> > _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
>> > execfile(os.path.abspath("___code___.py"))
>> >   File "", line 1, in 
>> >
>> >   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
>> > exec compile(u'P
>> >   File "", line 1, in 
>> >
>> > "
>> >
>> >
>> > Can someone help understand what is going on?
>> >
>> > Like any suggestion about how to go about it?
>> >
>> >
>> >
>> > EDIT:
>> >
>> > This is basically the main time-consuming step.
>> >
>> > At this point "rep" comes in as a ~q^3 size list of q^2 dimensional 0/1
>> > permutation matrices.
>> > And "Edge" is a list of integer tuples where each tuple is of the form
>> > (a,b)
>> > with a,b being from the set {0,1,2,3...,(2n-1)}
>> >
>> > P = 0
>> > from itertools import product
>> > from itertools import izip
>> >
>> > for X in product(rep,repeat = len (Edge)):
>> > k = izip(Edge,X)
>> > M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
>> > for ((a,b),Y) in k:
>> >   M [a][b] = Y
>> >   M [b][a] = Y.inverse()
>> > Z = block_matrix(M)
>> > P = P + Z.charpoly(x)
>> >
>>
>> Please include rep and Edge, if if it's in a simple case.
>>
>>
>> > The polynomial P is the final expected answer.
>> >
>> > (and for any larger value of q and n than the 3 cases mentioned the
>> > program
>> > basically stops with no output for P and with the above pasted message)
>> >
>> > --
>> > 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.
>
> --
> 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] Can someone help understand this error ? (that is generated for large inputs)

2015-05-13 Thread David Joyner
On Wed, May 13, 2015 at 9:13 PM, Phoenix  wrote:
>
>
> So I have this SAGE code which takes in two integers q and n and it
> generates ~ (q^3)^(n^2) 0/1 matrices and does a sum of their characteristic
> polynomials.
>
> I got answers for (q = 3, n = 2), (q =2 , n = 3) and (q=2, n=2)
>
> For any higher number the code runs for ~1hr and then it says,
>
> "
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_2.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
> -*-\\n" +
> _support_.preparse_worksheet_cell(base64.b64decode("UA=="),globals())+"\\n");
> execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
>
>   File "/tmp/tmpPiPIoq/___code___.py", line 2, in 
> exec compile(u'P
>   File "", line 1, in 
>
> "
>
>
> Can someone help understand what is going on?
>
> Like any suggestion about how to go about it?
>
>
>
> EDIT:
>
> This is basically the main time-consuming step.
>
> At this point "rep" comes in as a ~q^3 size list of q^2 dimensional 0/1
> permutation matrices.
> And "Edge" is a list of integer tuples where each tuple is of the form (a,b)
> with a,b being from the set {0,1,2,3...,(2n-1)}
>
> P = 0
> from itertools import product
> from itertools import izip
>
> for X in product(rep,repeat = len (Edge)):
> k = izip(Edge,X)
> M = [[matrix(q^2, q^2, 0)]*(2*n) for _ in range(2*n)]
> for ((a,b),Y) in k:
>   M [a][b] = Y
>   M [b][a] = Y.inverse()
> Z = block_matrix(M)
> P = P + Z.charpoly(x)
>

Please include rep and Edge, if if it's in a simple case.


> The polynomial P is the final expected answer.
>
> (and for any larger value of q and n than the 3 cases mentioned the program
> basically stops with no output for P and with the above pasted message)
>
> --
> 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] Decimal Answers

2015-05-11 Thread David Joyner
On Mon, May 11, 2015 at 3:15 PM, Selah Bryce  wrote:
> How do you find the decimal that is equal to 7950734897590/87
>

You don't say how many places you want. There are lots of ways if that
doesn't matter, for example 7950734897590/87.0

> --
> 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] Explicit solution (not implicit) for a separable ODE

2015-05-05 Thread David Joyner
On Tue, May 5, 2015 at 12:58 PM, Jotace  wrote:
> Hello,
>
> I am trying to obtain the explicit expression for the solution od an ODE, my
> code is
> var('k')
> y= function('y',x)
> h=desolve(diff(y,x) - k*y*(1-y),y, ivar=x)
> h
>
> I would like to isolate y(x) = ... (with the computer, of course)
>
> I played around with h.lhs() and h.rhs(), but did not get the result.
>
> Any ideas?


You might try sympy (included in sage):
http://docs.sympy.org/dev/modules/solvers/ode.html

>
> JC
>
> --
> 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] Sym Py vs Maxima for symbolic computation

2015-04-28 Thread David Joyner
On Tue, Apr 28, 2015 at 7:32 PM, William Stein  wrote:
> On Tue, Apr 28, 2015 at 2:34 PM, Alexander Lindsay  wrote:
>> My understanding is that sage offers interfaces to both sympy and Maxima. My 
>> interest is in symbolic solution of equations, often including ODEs and 
>> PDEs. Between sympy and Maxima, which is the richer package for symbolic 
>> computation?
>
> I think probably Maxima.
>

In my experience, SymPy is vastly superior to Maxima in solving ODEs.

>>  Which is undergoing more active development?
>
> Definitely Sympy by far.  No question at all.
>
>>  I don't mean to offend developers of either package with my question. I 
>> really appreciate both groups contributions to the open source community. 
>> But I also want to know where I can best spend my time both in terms of use 
>> and potential development. I would like to get behind one package and stick 
>> with it for the long haul
>
>
> Note that Sage also uses Ginac a lot.   http://en.wikipedia.org/wiki/GiNaC
>
>
>>
>> --
>> 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.
>
>
>
> --
> William (http://wstein.org)
>
> --
> 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] Working with polynomials (or at least trying to)

2015-04-05 Thread David Joyner
On Sat, Apr 4, 2015 at 8:29 PM, absinthe  wrote:
> Dear all,
>
> I'm trying to work with polynomials modulo x^N-1 whose coefficients belong
> to Z_p (If it helps p is a power of a prime). I know that I'm doing
> something wrong, but I cannot figure out what so any help is welcome.
> p=32
> N=100
> ZZp. = PolynomialRing(Integers(p))
> #find an element that can be inverted
> pp=ZZp.random_element()
> while True:
> try:
> ppInv=pp.inverse_mod(x^N-1)
> break
> except:
> pp=ZZp.random_element()
> #multiply the inverses
> print (pp*ppInv).mod(x^N-1)
>
> The result is not always 1 (sometimes it is though). So the question is why?
> From their definition, the two polynomials are inverse but their product is
> not 1? Am I interprenting wrong?
>

Maybe you want a polynomial f(x) in GF(p)[x] with the property that
f(x) has an inverse in GF(p)[x]/(x^N - 1)? An f(x) in GF(p)[x] has this property
if an only if gcd(f(x), x^N - 1) = 1. Moreover, you can find the
inverse of f(x) in this
ring using xgcd. All this is implemented in Sage.


> Thanks in advance.
>
> --
> 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] solving equation involving absolute values

2015-03-24 Thread David Joyner
On Tue, Mar 24, 2015 at 1:04 AM, sundar  wrote:
> Hello
>
> I am newbie to sagemath. I have windows 8 and sage version is 6.4.1. I am
> running it inside virtualbox.
> I was reading some thing about solving equations on sage website at
> http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html
>
> At one point author is trying to demonstrate the use of optional keywords
> for the "solve"
> He is solving equation
>
> solve(abs(1-abs(1-x)) == 10, x)
>
> When evaluated this gives
>
> [abs(abs(x - 1) - 1) == 10]
>
> But when the input is modified a little as
>
> solve(abs(1-abs(1-x)) == 10, x, to_poly_solve=True)
>
> sage gives correct result as
> [x == -10, x == 12]
>
>
> So why does it not work in the first case ? I didn't understand this use of
> keyword to_poly_solve.
>

Some documentation of maxima's to_poly_solve command is on
http://maxima.sourceforge.net/docs/manual/de/maxima_75.html,
about 3/4th down the page.

> Please help
> sundar
>
> --
> 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] bug report with Rubik's cube functions

2015-03-19 Thread David Joyner
On Thu, Mar 19, 2015 at 10:43 AM, Pierre  wrote:
> I agree. Surely in the code one has started with a right action (say) and
> has then decided to sometimes convert it to a left action using inverses.
>
> However, some consistency would be good :-) After all, various pieces of
> code seem to disagree on what U is...
>

Yes, this is not documented well enough. Thanks very much for pointing this out!

BTW, in case someone finds this sage-support thread via a google
search, here is a page on switching between the left and right action
conventions which might help:
http://groupprops.subwiki.org/wiki/Switching_between_the_left_and_right_action_conventions

> On Thursday, March 19, 2015 at 3:32:18 PM UTC+1, David Joyner wrote:
>>
>> On Thu, Mar 19, 2015 at 8:07 AM, Pierre  wrote:
>> > Hi,
>> >
>> > I have just realized this, and thought it would be helpful to know for
>> > anyone playing with Sage's Rubik's cube abilitites. Here it is:
>> >
>> > While the following 3 commands:
>> >
>> > sage: CubeGroup().move("U")
>> >
>> > and
>> >
>> > sage: CubeGroup().plot3d_cube("U")
>> >
>> > and
>> >
>> > sage: RubiksCube().move("U").show3d()
>> >
>> > all take the convention that U means "move the face U clockwise",
>> > unfortunately the command
>> >
>> > sage:  RubiksCube().move("U")
>> >
>> > assumes that U means "move the face U counter-clockwise".
>> >
>> > So yes, doing foo= RubiksCube().move("U") and printing foo displays
>> > something that is not consistent with what you get when calling
>> > foo.show3d().
>> >
>> > I thought it was something to do with 3d plotting being left-handed in
>> > Sage
>> > or whatever, but no, foo.show() also gives the "right" answer. And the
>> > convention for what the permutation U is, taken by CubeGroup and given
>> > in
>> > Joyner's book, is just not the one appearing when you print foo.
>> >
>> > It seems that inverses are taken, since RubiksCube().move("R*U")
>> > displays
>> > something that corresponds to U^-1 * R^-1 (by which I mean U^-1 first,
>> > then
>> > R^-1).
>> >
>> > In a nutshell: the __str__ method in RubiksCube seems to be broken,
>> > somehow.
>> >
>> > This is all quite confusing !
>> >
>>
>> I'm not sure, but I wonder if one describes a left action on a set and
>> the other describes the right action. Left actions vs right actions
>> are indeed confusing. However, some people insist on being lefties and
>> others insist on being righties, so Sage is merely being agnostic in
>> presenting both:-)
>>
>> That's my guess but I could easily be wrong.
>>
>>
>> > best
>> > Pierre
>> >
>> >
>> >
>> >
>> >
>> > --
>> > 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.
>
> --
> 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] bug report with Rubik's cube functions

2015-03-19 Thread David Joyner
On Thu, Mar 19, 2015 at 8:07 AM, Pierre  wrote:
> Hi,
>
> I have just realized this, and thought it would be helpful to know for
> anyone playing with Sage's Rubik's cube abilitites. Here it is:
>
> While the following 3 commands:
>
> sage: CubeGroup().move("U")
>
> and
>
> sage: CubeGroup().plot3d_cube("U")
>
> and
>
> sage: RubiksCube().move("U").show3d()
>
> all take the convention that U means "move the face U clockwise",
> unfortunately the command
>
> sage:  RubiksCube().move("U")
>
> assumes that U means "move the face U counter-clockwise".
>
> So yes, doing foo= RubiksCube().move("U") and printing foo displays
> something that is not consistent with what you get when calling
> foo.show3d().
>
> I thought it was something to do with 3d plotting being left-handed in Sage
> or whatever, but no, foo.show() also gives the "right" answer. And the
> convention for what the permutation U is, taken by CubeGroup and given in
> Joyner's book, is just not the one appearing when you print foo.
>
> It seems that inverses are taken, since RubiksCube().move("R*U") displays
> something that corresponds to U^-1 * R^-1 (by which I mean U^-1 first, then
> R^-1).
>
> In a nutshell: the __str__ method in RubiksCube seems to be broken, somehow.
>
> This is all quite confusing !
>

I'm not sure, but I wonder if one describes a left action on a set and
the other describes the right action. Left actions vs right actions
are indeed confusing. However, some people insist on being lefties and
others insist on being righties, so Sage is merely being agnostic in
presenting both:-)

That's my guess but I could easily be wrong.


> best
> Pierre
>
>
>
>
>
> --
> 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] number of rational points of Fermat curves over a finite field

2015-03-03 Thread David Joyner
Hi Sage-support: At his request, the question below is posted for Norm
Hurt, who is not on this list. - David


 I was reading a recent paper of Arakelian and Borges on Frobenius
nonclassicality of Fermat curves with respect to cubics, in which at
some point they state that the curve C: X^8 + Y^8 + Z^8 = 0 over F_q =
F_{13^2} has N_q(C)  F_q-rational points equal to   512. I thought
this is something someone must have worked out in SAGE.  However, I
could not find anything on a quick search of SAGE literature. There is
the work on hyper-elliptic curves but has anyone treated just the case
of Fermat curves over a finite field?

Sincerely,
Norm Hurt

-- 
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] doing an example in the Laplace section and it's giving me an error

2015-03-03 Thread David Joyner
On Mon, Mar 2, 2015 at 10:47 PM, Scott Richardson  wrote:
> Hello, I was doing the spring mass example, by copy and paste, in this
> location http://www.sagemath.org/doc/tutorial/tour_algebra.html.
>
> Got an error pointing to the following: "-%at".
>
> Image attached with the issue circled in red.
>
> Does anyone have an idea why I can't run this?


You are only supposed to copy the *input* into sage, not the output.

Also, be careful, some characters are not correctly copied using copy+paste.
For example, sometimes quotes are mis-copied.

>
> Thank you,
> Scott
>
>
> --
> 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] Re: Permutation actions on vectors

2015-01-13 Thread David Joyner
On Tue, Jan 13, 2015 at 2:18 PM, Sihuang Hu  wrote:
> Yes, it is related, but not what I want.

Are you sure?

sage: L = [sorted(sorted(I.orbit(list(x for x in GF(2)^3]
sage: set(map(tuple, L))
{([0, 0, 0],),
 ([0, 0, 1], [0, 1, 0], [1, 0, 0]),
 ([0, 1, 1], [1, 0, 1], [1, 1, 0]),
 ([1, 1, 1],)}

Is that what you want?

> Thanks.
>
> 在 2015年1月13日星期二 UTC+1下午4:45:23,Nathann Cohen写道:
>>>
>>> It would be more natural ro convert it to a matrix group, and then use
>>> the natural action of this group.
>>
>>
>> This is related:
>>
>>
>> http://www.sagemath.org/doc/reference/combinat/sage/combinat/integer_vectors_mod_permgroup.html
>>
>> Nathann
>
> --
> 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] Finite, connected digraphs returning infinite diameter

2015-01-11 Thread David Joyner
On Sun, Jan 11, 2015 at 5:49 PM, Andrew Russell
 wrote:
> I'm running Sage 6.4.1 on OS X (Yosemite).  Creating a finite, connected DAG
> with n vertices (for any n that I tried) returned +Infinity.  EG:
>
> sage: digraphs.Path(10).diameter()
> +Infinity
>
> or even
>
> sage: digraphs.ButterflyGraph(5).diameter()
> +Infinity
>
> However, both of these Path and Butterfly graphs are finite, connected,
> directed acyclic graphs so their diameter should always be finite.  I need
> to be able to compute the largest diameter of the connected components of
> any finite DAG, yet the diameter method fails even on these simple cases.
>

Seems to me to work as documented (using Gamma.diameter? or Gamma.diameter??):

sage: Gamma = digraphs.Path(3)
sage: Gamma.diameter()
+Infinity
sage: Gamma.eccentricity(0)
2
sage: Gamma.eccentricity(1)
+Infinity
sage: Gamma = digraphs.Circuit(3)
sage: Gamma.diameter()
2
sage: Gamma.eccentricity(0)
2
sage: Gamma.eccentricity(1)
2
sage: Gamma.eccentricity(2)
2


> --
> 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] Find real root

2015-01-09 Thread David Joyner
On Fri, Jan 9, 2015 at 5:34 AM, Santanu Sarkar
 wrote:
> Dear all,
>
> I have one polynomial
> f_x(y) =y^3 +f_1(x) y^2 +f_2(x) y + f_3(x).
>
> Since it is a cubic polynomial, it has atleast
> one real root.
> I want to find that real root  as a function of x.
> I know that x \in [a,b].
>


There is a formula you can try to use:
http://en.wikipedia.org/wiki/Cubic_function#General_formula_for_roots


> --
> 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] How to implement a group action in Sage? two

2015-01-02 Thread David Joyner
On Fri, Jan 2, 2015 at 9:14 AM, Nilo de Roock  wrote:
> ( cross-posted in Mathematics SE )
>  implement a group action in Sage ( for educational purposes )?
>
> Let S= {"A","B","C","D"} and S4= SymmetricGroup(4). I want to create a table 
> of the action S4 x S -> S which standardly permutes the letters in the set. 
> The table should look like:
>
> Permutation.   A.  B.  C.  D
> () A.  B.  C.  D
> (1 2 ) B.  A.  C.  D.
> etc.
>
> How can this be done with Sage? ( The Set and Group in the question are just 
> examples, I want to be able to create a table for any action.| i
>

There is this answer:
https://groups.google.com/forum/#!topic/sage-support/HX0QfXgwO5s
and chapter 14 in http://abstract.ups.edu/download/aata-20111223-sage-4.8.pdf
However, if S is a G-set of cardinality n, I think the simplest is
simply to create
a list indexed by 1, ..., n. Then have G act on {1, ..., n} and
attached to those
orbits the corresponding elements form S.


> --
> 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] Fwd: error in Sage

2014-12-30 Thread David Joyner
On Tue, Dec 30, 2014 at 2:18 AM, William Stein  wrote:
> -- Forwarded message --
> From: Aneta Buraczyńska 
> Date: Mon, Dec 29, 2014 at 11:03 PM
> Subject: error in Sage
> To: William Stein 
>
>
> Dear Mr William Stein,
>
> I am writing with request for contact to Sage creators or reading my
> problem. In module sage.crypto.boolean_function there is a function:
> walsh_hadamard_transform(). I think this function gives wrong results.
> For instance for function f defined by truth table (1, 0, 0, 0, 0, 1,
> 1, 1) sage gives vector (0, 0, 0, 0, -4, 4, 4, 4) as a result, but the
> correct value is (0, 0, 0, 0, 4, -4, -4, -4). All functions that I
> verified have in sage error result due to incorrect signs. On appendix

I agree that the signs are incorrect, based on the definition I usually use.
Possibly there is a definition out there somewhere with that sign
change? There are different normalizing conventions for Fourier transforms,
so it seems reasonable to me that there are different ones for
the Walsh-Hadamard transform as well.

> I send a document with the calculations showing my statement.
>
> I will be grateful for help in this problem.
>
> Yours Sincerely,
>
> Aneta Buraczyńska
>
>
>
>
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
>
> --
> 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] differentiating large function problem

2014-12-22 Thread David Joyner
On Mon, Dec 22, 2014 at 2:38 PM, Brian Sherson  wrote:
> Dustin, I don’t think you can use LaTeX syntax to define f.
>

Agreed. However, there is this:
http://www2.ph.ed.ac.uk/snuggletex/documentation/generating-maxima-input.html
which might help. You would need to use Maxima directly.

> ~Brian
>
>
> On 12/22/2014 11:27 AM, Dustin Tingley wrote:
>
> Hi,
> I'm trying to differentiate a pretty nasty function. However, I keep running
> into invalid syntax problems.
>
> a, c, g, k, t, g1, e2, t = var('a,c,g,k,t,g1,e2,t')
> f=\frac{(\frac{g k}{(g -1)(1-\frac{1}{2}t (a
> -1)(\frac{e2}{1+e2}))-\frac{1}{2}t (a +1)}-\frac{\frac{g }{2}t (a
> +1)c}{(g-1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a
> +1))})(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2}))-k+\frac{1}{2}t (a
> +1)c(\frac{(g -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2}))-\frac{1}{2}t (a
> +1)}{(g -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a
> +1))})}{(\frac{g k}{(g -1)(1-\frac{1}{2}t(a
> -1)(\frac{e2}{1+e2}))-\frac{1}{2}t(a +1)}-\frac{\frac{g }{2}t (a +1)c}{(g
> -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a
> +1))})^{g1}}+\frac{(\frac{g k}{(g-1)(1-\frac{1}{2}t (a
> -1)(\frac{e2}{1+e2}))-\frac{1}{2}t (a +1)}+\frac{\frac{g }{2}t (a +1)c}{(g
> -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a
> +1))})(1-\frac{1}{2}t(a -1)(\frac{e2}{1+e2}))-k-\frac{1}{2}t (a
> +1)c(\frac{(g -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2}))-\frac{1}{2}t (a
> +1)}{(g -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a
> +1))})}{(\frac{g k}{(g -1)(1-\frac{1}{2}t (a
> -1)(\frac{e2}{1+e2}))-\frac{1}{2}t (a +1)}+\frac{\frac{g }{2}t (a +1)c}{(g
> -1)(1-\frac{1}{2}t (a -1)(\frac{e2}{1+e2})+\frac{1}{2}t (a +1))})^{g1}}
> diff(f,c,1)
>
>
> Everything after the f just came out of what I have coded in latex.
>
> I get this error. Any suggestions? Do I have to spell out all the
> multiplications with a *?
> Error in lines 2-2 Traceback (most recent call last): File
> "/projects/20a62372-5900-4b47-b7d2-692b6b9064f9/.sagemathcloud/sage_server.py",
> line 865, in execute exec compile(block+'\n', '', 'single') in namespace,
> locals File "", line 1 f= * BackslashOperator() * frac{( *
> BackslashOperator() * frac{g k}{(g -Integer(1))(Integer(1)- *
> BackslashOperator() * frac{Integer(1)}{Integer(2)}t (a -Integer(1))( *
> BackslashOperator() * frac{e2}{Integer(1)+e2}))- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1))}- * BackslashOperator() *
> frac{ * BackslashOperator() * frac{g }{Integer(2)}t (a
> +Integer(1))c}{(g-Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2})+ * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1)))})(Integer(1)- *
> BackslashOperator() * frac{Integer(1)}{Integer(2)}t (a -Integer(1))( *
> BackslashOperator() * frac{e2}{Integer(1)+e2}))-k+ * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1))c( * BackslashOperator() *
> frac{(g -Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2}))- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1))}{(g -Integer(1))(Integer(1)- *
> BackslashOperator() * frac{Integer(1)}{Integer(2)}t (a -Integer(1))( *
> BackslashOperator() * frac{e2}{Integer(1)+e2})+ * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1)))})}{( * BackslashOperator() *
> frac{g k}{(g -Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t(a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2}))- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t(a +Integer(1))}- * BackslashOperator() * frac{
> * BackslashOperator() * frac{g }{Integer(2)}t (a +Integer(1))c}{(g
> -Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2})+ * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1)))})**{g1}}+ *
> BackslashOperator() * frac{( * BackslashOperator() * frac{g
> k}{(g-Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2}))- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1))}+ * BackslashOperator() *
> frac{ * BackslashOperator() * frac{g }{Integer(2)}t (a +Integer(1))c}{(g
> -Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a -Integer(1))( * BackslashOperator() *
> frac{e2}{Integer(1)+e2})+ * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1)))})(Integer(1)- *
> BackslashOperator() * frac{Integer(1)}{Integer(2)}t(a -Integer(1))( *
> BackslashOperator() * frac{e2}{Integer(1)+e2}))-k- * BackslashOperator() *
> frac{Integer(1)}{Integer(2)}t (a +Integer(1))c( * BackslashOperator() *
> frac{(g -Integer(1))(Integer(1)- * BackslashOperator() *
> frac{Integer(1)}{Int

Re: [sage-support] Sage and latest debian problem

2014-12-17 Thread David Joyner
On Wed, Dec 17, 2014 at 11:17 PM,   wrote:
> It's 7, 32bits.
>

I know this is some work, but can you create a partition with a 64 bit debian?
AFAIK, the need for 32 bit, for most people, expired some time ago.

> On Thursday, December 18, 2014 1:58:11 AM UTC-2, David Joyner wrote:
>>
>> On Wed, Dec 17, 2014 at 10:22 PM,   wrote:
>> > Hi,
>> > so I was thinking about moving from Mathematica to Sage so I downloaded
>> > the
>> > binary version for Linux 32-bits. Afaik I should just be able to run
>> > sage
>> > with ./sage after extracting it but it doesn't work I get the following
>> > message:
>> >
>> > ImportError: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version
>> > `GLIBC_2.18'
>> > not found (required by
>> > /home/everton/sage-6.4.1-i686-Linux/local/lib/libstdc++.so.6)
>> >
>> > I have everything upgraded from the stable release, should I install
>> > glibc_2.18 from the experimental branch? That would be kinda bad.
>> >
>> > So I tried just building from the source but I get a very weird error:
>> >
>> > checking for gcc option to accept ISO C99... unsupported
>> > checking for sqrt in -lm... no
>> >
>> > I tried doing the -lm thing outside on a test.c file and it worked so I
>> > wonder what's wrong. Again getting nowhere I thought I should do a
>> > ./configure first and see what happens, and I get another weird message
>> > about gcc not supporting C99.
>> >
>> > This is a fresh installation from the latest debian release on a 32bit
>> > laptop using gnome, as if that mattered. I have dpkg-dev installed as
>> > the
>>
>> IMHO, it matters. What version of debian are you using? Is it really 32
>> bit??
>>
>> > README.txt tells me to. I searched but I couldn't find the problem.  Gcc
>> > is
>> > version 4.7.2-5.
>> >
>> > Any help would be greatly appreciated!
>> >
>> > Kind regards,
>> > E.
>> >
>> > --
>> > 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.
>
> --
> 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] Sage and latest debian problem

2014-12-17 Thread David Joyner
On Wed, Dec 17, 2014 at 10:22 PM,   wrote:
> Hi,
> so I was thinking about moving from Mathematica to Sage so I downloaded the
> binary version for Linux 32-bits. Afaik I should just be able to run sage
> with ./sage after extracting it but it doesn't work I get the following
> message:
>
> ImportError: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version `GLIBC_2.18'
> not found (required by
> /home/everton/sage-6.4.1-i686-Linux/local/lib/libstdc++.so.6)
>
> I have everything upgraded from the stable release, should I install
> glibc_2.18 from the experimental branch? That would be kinda bad.
>
> So I tried just building from the source but I get a very weird error:
>
> checking for gcc option to accept ISO C99... unsupported
> checking for sqrt in -lm... no
>
> I tried doing the -lm thing outside on a test.c file and it worked so I
> wonder what's wrong. Again getting nowhere I thought I should do a
> ./configure first and see what happens, and I get another weird message
> about gcc not supporting C99.
>
> This is a fresh installation from the latest debian release on a 32bit
> laptop using gnome, as if that mattered. I have dpkg-dev installed as the

IMHO, it matters. What version of debian are you using? Is it really 32 bit??

> README.txt tells me to. I searched but I couldn't find the problem.  Gcc is
> version 4.7.2-5.
>
> Any help would be greatly appreciated!
>
> Kind regards,
> E.
>
> --
> 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] Fourier Transforms in sage

2014-08-15 Thread David Joyner
On Fri, Aug 15, 2014 at 4:59 PM, Oscar  wrote:
> I wanted to calculate some Fourier transforms, and it seems like sage
> doesn't have them. I was expecting something on the likes of mathematica's
> command
>
> sage: fourier_transform(exp(-I*omega0*t) , t, omega )
> sqrt(2*pi)*dirac_delta(omega-omega0)
>
> Am I completely missing how this is done in sage, or is it really missing?
>

They are in sympy, which is in Sage:
http://docs.sympy.org/dev/modules/integrals/integrals.html

> Thank you,
>
> Oscar Lazo.
>
> --
> 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] Clifford Algebras, grrrrrr

2014-07-26 Thread David Joyner
Have you looked at what sympy already has for Clifford algebras?

On Saturday, July 26, 2014, Stephen Kauffman  wrote:

> I attempted to create a Clifford Algebra for space-time with the gamma
> matrices using the FreeAlgebraQuotient in analogy to the example for
> constructing a quarternion algebra from the documentation with the code:
>
> PRGA=FreeAlgebra(QQ,4,'g')
> F = PRGA.monoid()
> g0,g1,g2,g3 = F.gens()
> mons = [ F(1), g0, g1, g2, g3, g0*g1, g0*g2, g0*g3, g1*g2, g2*g3, g3*g1,
> g0*g1*g2*g3*g0, g0*g1*g2*g3*g1, g0*g1*g2*g3*g2, g0*g1*g2*g3*g3, g0*g1*g2*g3]
> G0=diagonal_matrix([1,1,1,1,-1,-1,-1,-1]) #8x8 gamma matrices
> ZR=matrix(2,2,0)
> EE=diagonal_matrix([1,1])
> II=matrix([[0,1],[-1,0]])
>
> G1=block_matrix([[ZR,ZR,ZR,EE],[ZR,ZR,EE,ZR],[ZR,-EE,ZR,ZR],[-EE,ZR,ZR,ZR]],subdivide=False)
>
> G2=block_matrix([[ZR,ZR,ZR,-II],[ZR,ZR,II,ZR],[ZR,II,ZR,ZR],[-II,ZR,ZR,ZR]],subdivide=False)
>
> G3=block_matrix([[ZR,ZR,EE,ZR],[ZR,ZR,ZR,-EE],[-EE,ZR,ZR,ZR],[ZR,EE,ZR,ZR]],subdivide=False)
> mats = [G0,-G1,-G2,-G3]
> ST. = FreeAlgebraQuotient(PRGA, mons, mats)
> ST
>
>  Free algebra quotient on 4 generators ('g0', 'g1', 'g2', 'g3') and
> dimension 16 over Rational Field
>
> everything looked promising here but when I type
>
> g0*g1
>
> Traceback (click to the left of this block for traceback)
> ...
> TypeError: unsupported operand parent(s) for '*': 'Vector space of
> dimension 16 over Rational Field' and 'Full MatrixSpace of 8 by 8 dense
> matrices over Integer
> Ring'
>
> I expected sage to parrot back
>
> g0*g1
>
> Seems like we ought to be able to use a Free Algebra and the code:
>
> PRGA=FreeAlgebra(QQ,4,'g')
> MG=matrix(PRGA.gens())
> MGG=MG.transpose()*MG
> Metric = diagonal_matrix([1,-1,-1,-1])
> MGGM=MGG+MGG.transpose()-2*Metric
> [MGGM[i,j] for i in range(4) for j in range(4)]
>
>  [-2 + 2*g0^2, g0*g1 + g1*g0, g0*g2 + g2*g0, g0*g3 + g3*g0, g0*g1 + g1*g0,
> 2 + 2*g1^2, g1*g2 + g2*g1, g1*g3 + g3*g1, g0*g2 + g2*g0, g1*g2 + g2*g1, 2 +
> 2*g2^2,
>  g2*g3 + g3*g2, g0*g3 + g3*g0, g1*g3 + g3*g1, g2*g3 + g3*g2, 2 + 2*g3^2]
>
> and use this like an ideal. Sage is Clifford averse.
>
> --
> 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] Fwd: Sage ModularForms() error?

2014-06-19 Thread David Joyner
On Thu, Jun 19, 2014 at 4:05 AM, John Cremona  wrote:
> The actual error message is very clear:
>
> NotImplementedError: Computation of dimensions of weight 1 cusp forms
> spaces not implemented in general
>
> This -clearly - means that no formula or algorithm has been
> implemented in Sage for dimensions of weight 1 modular form spaces.
> How much clearer could it be?!
>

I think that "by improve this", M. is asking if there is a plan to implement
one (soon?). I guess not, but I don't know if someone is currently working
on this or not.

> John
>
> On 19 June 2014 02:45, David Joyner  wrote:
>> Does anyone know the answer to this?
>>
>>
>> -- Forwarded message --
>> From: M. <...>
>> Date: Wed, Jun 18, 2014 at 8:43 PM
>> Subject: Sage ModularForms() error?
>> To: wdjoy...@gmail.com
>>
>>
>> David Joyner,
>>
>> When using the sagecell.sagemath.org server,
>> when I evaluate the command:
>>
>>   ModularForms(Gamma1(29),1).basis()
>>
>> the error message is not very informative.
>> The problem comes from the fact that
>> "ModularForms(Gamma1(29),1)" has an
>> "(unknown)" dimension currently. However,
>> Magma returns [] for the basis using the
>> Magma Calculator online. Is it possible to
>> improve this situation? Shalom, M.
>>
>> --
>> 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.

-- 
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] Fwd: Sage ModularForms() error?

2014-06-18 Thread David Joyner
Does anyone know the answer to this?


-- Forwarded message --
From: M. <...>
Date: Wed, Jun 18, 2014 at 8:43 PM
Subject: Sage ModularForms() error?
To: wdjoy...@gmail.com


David Joyner,

When using the sagecell.sagemath.org server,
when I evaluate the command:

  ModularForms(Gamma1(29),1).basis()

the error message is not very informative.
The problem comes from the fact that
"ModularForms(Gamma1(29),1)" has an
"(unknown)" dimension currently. However,
Magma returns [] for the basis using the
Magma Calculator online. Is it possible to
improve this situation? Shalom, M.

-- 
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] Re: Sage Tutorial questions

2014-06-04 Thread David Joyner
On Wed, May 21, 2014 at 4:17 PM, Dima Pasechnik  wrote:
> On 2014-05-21, David Joyner  wrote:
>> Hi:
>>
>> I am trying to upload a new version of the Sage Tutorial to
>> createspace.com for those that want to buy a bound version.
>> (The royalties go directly to the Sage Foundation.) The last time
>> I did this was version 4.x when I think Sage used latex for
>> the tutorial, and even then I needed help from John Palmieri to
>> fix some of the formatting requirements that createspace has.
>>
>>  The problem now is that createspace is complaining about
>> formatting issues (see below) but the tutorial is now in rst
>> and I have no idea if these issues can be tweeked.
>
> My understanding is that sphinx can convert rst into LaTeX:
> http://sphinx-doc.org/config.html#options-for-latex-output
>
> This reduces the problem to the already solved one :)
>

Good point. I forgot about that.

The Sage Tutorial version 6.1.1 should be available on amazon outlets
soon or possibly even right now. For version 6.1.1, the author listed
on the cover is
"Sage Developers". The recent version is

ISBN-10: 1438214197
http://www.amazon.com/Sage-Tutorial-Www-Sagemath-Org-David-Joyner/dp/1438214197/

If you buy a new copy you will get 6.1.1. If you buy a used copy you
might get 4.5 or older.


Webmaster: Please change the link for

William Stein and others. Sage Tutorial. CreateSpace, 2009.

on the page http://www.sagemath.org/library-publications.html#books

from

http://www.amazon.com/Sage-tutorial-version-3-4-Group/dp/1442141948/ref=sr_1_2?ie=UTF8&s=books&qid=1261010025&sr=1-2

to

http://www.amazon.com/Sage-Tutorial-Www-Sagemath-Org-David-Joyner/dp/1438214197/

Thanks.

And thanks to Dima (and John Palmieri) for the latex help.




> Just in case,
> Dima
>>
>> These are the complaints:
>>
>> * Trim Size is incorrect.
>>
>> * This text is outside the margins.
>>
>> * This line art is outside the margins.
>>
>> * This PDF file was submitted at a size different from the expected
>> trim size. We have attempted to place the content on the page in a
>> reasonable location. Please check each page to make sure everything
>> appears as expected. If the content is not aligned properly please
>> resize your PDF to match the trim size and upload again.
>> (I checked. It doesn't.)
>>
>> Any ideas?
>>
>> - David Joyner
>>
>
> --
> 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] Does Sage support content mathML?

2014-05-29 Thread David Joyner
On Tue, May 27, 2014 at 1:48 PM, TAM  wrote:
> I was wondering if Sage supports saving an equation in content and
> presentation mathML?
>

You can save in latex then use this package:
http://dlmf.nist.gov/LaTeXML/manual/

> Thank you for your help.
>
> TAM
>
> --
> 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] How to convert Vector space of dimension 1 to field

2014-05-27 Thread David Joyner
On Mon, May 26, 2014 at 8:04 PM, msantopr  wrote:
> Hi all,
>
> I am new to sage, so please forgive me if this is a trivial question.
>
> I tried to find a minimal example for my problem.
> I can define two real interval fields:
>
> t0=RIF(2.9, 3.1)
> t1=RIF(2.9, 3.1)
>
> and then define a matrix
>
> t=matrix([[t0],[t1]])
>
> Clearly
>
> parent(t0)
>
> Real Interval Field with 53 bits of precision
>
>
> However,
>
>
>  parent(t[0])
>
>
> Vector space of dimension 1 over Real Interval Field with 53 bits of
> precision
>
>
> I would like to do some computations with t[0] and t[1] in which they should
> be regarded as elements of a real interval fields. Is there any way to
> convert from Vector space of dimension 1 over the real interval field to
> real interval field? In my actual code I don't have t0 and t1 explicitly
> since the matrix is obtained form a computation.
>


Does this help?

sage: t0=RIF(2.9, 3.1)
sage: t1=RIF(2.9, 3.1)
sage: t=matrix([[t0],[t1]])
sage: parent(t[0])
Vector space of dimension 1 over Real Interval Field with 53 bits of precision
sage: parent(t[0][0])
Real Interval Field with 53 bits of precision

>
> Any help would be much appreciated!
>
>
> Manuele
>
>
> --
> 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] Sage Tutorial questions

2014-05-21 Thread David Joyner
Hi:

I am trying to upload a new version of the Sage Tutorial to
createspace.com for those that want to buy a bound version.
(The royalties go directly to the Sage Foundation.) The last time
I did this was version 4.x when I think Sage used latex for
the tutorial, and even then I needed help from John Palmieri to
fix some of the formatting requirements that createspace has.

 The problem now is that createspace is complaining about
formatting issues (see below) but the tutorial is now in rst
and I have no idea if these issues can be tweeked.

These are the complaints:

* Trim Size is incorrect.

* This text is outside the margins.

* This line art is outside the margins.

* This PDF file was submitted at a size different from the expected
trim size. We have attempted to place the content on the page in a
reasonable location. Please check each page to make sure everything
appears as expected. If the content is not aligned properly please
resize your PDF to match the trim size and upload again.
(I checked. It doesn't.)

Any ideas?

- David Joyner

-- 
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] Re: [sage-edu] intersection of subspase

2014-05-14 Thread David Joyner
On Wed, May 14, 2014 at 1:52 AM,   wrote:
> Dear   John
> I recently became acquainted with the software and its capabilities. I like
> to every value p, the two subspace subscribe to my account. Grateful for
> your guidance.
>
>

This is a problem in matrix theory which can be solved using row-reduction.

In an example, the following codes works:


sage: p = 13
sage: F = K = GF(p)
sage: y1 = 3
sage: V = F^9
sage: v1 = vector(F, [0,0,0,-y1-1,1,0,0,0,0])
sage: v2 = vector(F, [y1,-y1,-1,1,0,y1,1,0,0])
sage: v3 = vector(F, [0,y1,-y1,0,0,0,0,0,1])
sage: v4 = vector(F, [y1,0,0,0,0,0,0,1,0])
sage: W = V.span([v1, v2, v3, v4])
sage: W
sage: U = F^9
sage: u1 = vector(F, [0,0,1,0,0,0,1,0,0])
sage: u2 = vector(F, [0,0,0,1,0,1,0,0,0])
sage: u3 = vector(F, [1,0,0,0,0,0,0,0,0])
sage: u4 = vector(F, [0,0,0,0,0,0,0,0,1])
sage: u5 = vector(F, [0,0,0,0,1,0,0,0,0])
sage: u6 = vector(F, [0,1,0,0,0,0,0,1,0])
sage: E = U.span([u1, u2, u3, u4, u5, u6])
sage: E


Basically, you are finding the kernel of a matrix. Since the
kernel possibly depends on p, it may be that there is no
"symbolic" solution.

Is this a homework problem for a class?


> --
> 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] Re: intersection

2014-05-14 Thread David Joyner
On Wed, May 14, 2014 at 1:25 AM, nas mer  wrote:
> Hi
> Thank you
> I attach the program of intersection  in sage.
> please, look at the attach file.

See attached.


> Best regard


This is an elementary problem in matrix theory. Is this homework for a class?

-- 
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: p = 13
sage: F = K = GF(p)
sage: y1 = 3
sage: V = F^9
sage: v1 = vector(F, [0,0,0,-y1-1,1,0,0,0,0])
sage: v2 = vector(F, [y1,-y1,-1,1,0,y1,1,0,0])
sage: v3 = vector(F, [0,y1,-y1,0,0,0,0,0,1])
sage: v4 = vector(F, [y1,0,0,0,0,0,0,1,0])
sage: W = V.span([v1, v2, v3, v4])
sage: W
sage: U = F^9
sage: u1 = vector(F, [0,0,1,0,0,0,1,0,0])
sage: u2 = vector(F, [0,0,0,1,0,1,0,0,0])
sage: u3 = vector(F, [1,0,0,0,0,0,0,0,0])
sage: u4 = vector(F, [0,0,0,0,0,0,0,0,1])
sage: u5 = vector(F, [0,0,0,0,1,0,0,0,0])
sage: u6 = vector(F, [0,1,0,0,0,0,0,1,0])
sage: E = U.span([u1, u2, u3, u4, u5, u6])
sage: E


Re: [sage-support] Re: [sage-edu] intersection of subspase

2014-05-13 Thread David Joyner
On Tue, May 13, 2014 at 5:03 PM,   wrote:
> Thank you very much.
> I test your hint, but it was wrong.

Can you please copy and paste into your email what you did and what
error you got?


> Please indicate where i
>  require to  correct the following example.
>
>
>
> sage: y1=CC(-0.5000,0.8660)
>> sage: print(y1)
>> sage: V = CC^9
>> sage: v1 = vector(CC, [0,0,0,-y1-1,1,0,0,0,0])
>> sage: v2 = vector(CC, [y1,-y1,-1,1,0,y1,1,0,0])
>> sage: v3 = vector(CC, [0,y1,-y1,0,0,0,0,0,1])
>> sage: v4 = vector(CC, [y1,0,0,0,0,0,0,1,0])
>> sage: W = V.span([v1, v2, v3, v4])
>> sage: W
>> sage: U = CC^9
>> sage: u1 = vector(CC, [0,0,1,0,0,0,1,0,0])
>> sage: u2 = vector(CC, [0,0,0,1,0,1,0,0,0])
>> sage: u3 = vector(CC, [1,0,0,0,0,0,0,0,0])
>> sage: u4 = vector(CC, [0,0,0,0,0,0,0,0,1])
>> sage: u5 = vector(CC, [0,0,0,0,1,0,0,0,0])
>> sage: u6 = vector(CC, [0,1,0,0,0,0,0,1,0])
>> sage: E = U.span([u1, u2, u3, u4, u5, u6])
>> sage: E
>> sage: H = W.intersection(E)
>> sage: H
>
>> oogle.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.

-- 
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] Re: [sage-edu] intersection of subspase

2014-05-13 Thread David Joyner
On Tue, May 13, 2014 at 2:19 PM,   wrote:
> It is known that a polynomial x^2 +x +1= 0 has a solution in Zp if and only
> if -3 is a square root
> in Zp, which is if and only if p=1.mod 6. the splitting field Zp(y1) where
> y1 is a solution of the polynomial x^2 +x +1= 0 .
>

So,

* Zp(y1) is not a complex field and
* you mistakenly put CC when you meant a finite field and
* you mistakenly wrote y1=-0.5000 + 0.8660*i when you meant y1 is a
  3rd root of unity in a field GF(p), where p is 1 (mod 6)?

Is that correct?

If so,

* figure out what p you want to use,
* compute what y1 is in that case,
* replace CC by GF(p) i your Sage code.

>
> --
> 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] Re: [sage-edu] intersection of subspase

2014-05-13 Thread David Joyner
On Tue, May 13, 2014 at 1:50 PM,   wrote:
> Thank you
> Zp(y1) is splitting field.
> I should replace CC^9  with Zp(y1) field.
> Yes. I should calculate the intersection E and W subspases, but in Zp(y1)
> field.where  y1=-0.5000 + 0.8660*i.
>

By Zp(y1), do you mean the cyclotomic field generated by the cube roots
of unity? (Note y1^3 is approximately 1, but not exactly 1, since you rounded
it off at the 3rd decimal place for some reason.)


>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-edu.
> 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] Re: [sage-edu] intersection of subspase

2014-05-13 Thread David Joyner
I don't know what "the field  Zp(y1)" means. It looks like you want to
intersect
two subspaces of CC^9. Is that correct?

Cross-posting to sage-support, where more people might be able to help.


On Tue, May 13, 2014 at 11:24 AM,   wrote:
>   Hi
>
>
> I should calculate the intersection E and W subspases by sage software. The
> field is Zp(y1), where  y1=-0.5000 + 0.8660*i. I do not know  how  enter the
> field  Zp(y1).  I would appreciate it if you have helped me.
>
>
> sage: y1=CC(-0.5000,0.8660)
> sage: print(y1)
> sage: V = CC^9
> sage: v1 = vector(CC, [0,0,0,-y1-1,1,0,0,0,0])
> sage: v2 = vector(CC, [y1,-y1,-1,1,0,y1,1,0,0])
> sage: v3 = vector(CC, [0,y1,-y1,0,0,0,0,0,1])
> sage: v4 = vector(CC, [y1,0,0,0,0,0,0,1,0])
> sage: W = V.span([v1, v2, v3, v4])
> sage: W
> sage: U = CC^9
> sage: u1 = vector(CC, [0,0,1,0,0,0,1,0,0])
> sage: u2 = vector(CC, [0,0,0,1,0,1,0,0,0])
> sage: u3 = vector(CC, [1,0,0,0,0,0,0,0,0])
> sage: u4 = vector(CC, [0,0,0,0,0,0,0,0,1])
> sage: u5 = vector(CC, [0,0,0,0,1,0,0,0,0])
> sage: u6 = vector(CC, [0,1,0,0,0,0,0,1,0])
> sage: E = U.span([u1, u2, u3, u4, u5, u6])
> sage: E
> sage: H = W.intersection(E)
> sage: H
>
> The field  is  Zp(y1).
>
> Best Regard
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-edu.
> 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] Peer Review: probability distribution for the sample variance

2014-04-22 Thread David Joyner
On Wed, Jan 1, 2014 at 1:58 PM, Buck Golemon  wrote:
> Below is a link to a worksheet I've been working on. It's provided as a
> public pdf on google drive, as I'm still looking for a better way to share
> worksheets. You can easily download the pdf if you prefer.
>
> Please let me know if I've done anything the hard way, or if you see a
> cleaner way to get the same result.
>
> There are a couple issues I ran into while doing this (noted in the
> worksheet).
>
> The integrator failed to give a result for odd k, and continued to ask "Is
> k/2 an integer?" after assuming odd k, or even k==3. The results for even k
> seems to be valid for odd k as well.

Maxima (which Sage uses) is very good at making assumptions.
Is it possible to reformulate your problem without assumptions? If you could
simplify your question to a statement without requiring g-drive, it could
greatly help others in a similar situation.


> Warnings from plot.py about "failed to evaluate function at 200 points."
>
>
> https://drive.google.com/file/d/1gTLKxrNCi-g8JmE1_QXyjfYECoEoDvf39x3prXXYpulTC5mQ9pquqWCT_KNG5AwAdAugnH7Q0NXd8nbe/edit?usp=sharing
>
> Thank you for your time,
> Buck
>
> --
> 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/groups/opt_out.

-- 
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] finding special function antiderivatives

2014-04-11 Thread David Joyner
On Fri, Apr 11, 2014 at 1:41 PM, Greg Marks  wrote:
> A problem that arose in a recent calculus class involved practical methods
> for finding a numerical estimate of the arc length of the curve  y = x^3
> from  (0,0)  to  (2,8).  So, one might ask, could one use SAGE to perform
> this computation, say, to 1 decimal places?  (By the way, I don't think
> this is such an unreasonable request.  On a computer with 8 GB of RAM, one
> can easily compute the arc length of a circle to one billion decimal places,
> for example, using Hanhong Xue's implementation of the Chudnovsky algorithm
> in GMP.)
>
> Here is how not to do it:
>
>> sage: %time n(1/sqrt(3)*integrate(sqrt(1+x^4), x, 0, 2*sqrt(3)),
>> digits=1)

Why not

integrate(sqrt(1+9*x^4), x, 0, 2)

?

If you look up "arc length" in wikipedia (my preference over a
calculus textbook:-)
you get

integral(sqrt(1+(diff(y,x)^2),x,a,b)

for the arc length of the curve (x,y) from x=a to x=b.


>> CPU times: user 1.53 s, sys: 0.07 s, total: 1.60 s
>> Wall time: 1.60 s
>> 8.63032927694
>
>
> Well, at least it didn't take very long.  Pretend you didn't know how to
> antidifferentiate the integrand using special functions.  We could proceed
> as follows:
>
>> sage: from sympy import integrate, sqrt, var
>> sage: x=var('x')
>> sage: f=sqrt(1+x**4)
>> sage: f.integrate(x)
>> x*gamma(1/4)*hyper((-1/2, 1/4), (5/4,),
>> x**4*exp_polar(I*pi))/(4*gamma(5/4))
>
>
> Performing the obvious simplifications in our heads, we now use this
> antiderivative to evaluate our definite integral:
>
>> sage: from mpmath import mp, hyp2f1
>> sage: mp.dps = 10001
>> sage: %time arclength=2*hyp2f1(-1/2,1/4,5/4,-144)
>> CPU times: user 144.20 s, sys: 0.20 s, total: 144.40 s
>> Wall time: 144.55 s
>> sage: place = file('/tmp/arclength.txt','w')
>> sage: place.write(str(arclength))
>> sage: place.close()
>
>
> The file /tmp/arclength.txt now contains the value of the definite integral
> to 1 decimal places.  (I haven't tested it, but I'm pretty sure the
> alternatives
>
>> sage: mpmath.quadts(lambda x: 1/sqrt(3)*sqrt(1+x^4), (0, 2*sqrt(3)))
>
>
> and
>
>> sage: new_prec=gp.set_precision(1)
>>
>> sage: gp('intnum(x = 0, 2*sqrt(3), 1/sqrt(3)*sqrt(1+x^4))')
>
>
> would take much too long.)
>
> The good news is that this problem can be solved in SAGE.  There was a time
> when one of the few areas in which Maple and Mathematica could claim
> superiority to SAGE was in this sort of integration problem.  The procedure
> given above at least provides evidence, if not proof, that this is no longer
> the case.
>
> The bad news is that the commands I used were highly unintuitive!  I had to
> know to use sympy.  I had to know which of its routines to import.  I had to
> know the syntax sympy would accept in defining the function (e.g. for
> exponentiation).  Then I had to know to call mpmath.  I had to know the name
> mpmath uses for the hypergeometric function, which is different from the
> name sympy uses.
>
> It would be great if all of this were seamlessly integrated together in
> SAGE, so that if a newcomer simply types in the obvious thing (such as "how
> not to do it" above), he or she gets the desired result.  Short of that, is
> there anything simpler than the somewhat tortuous path that I followed?
>
> --
> 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] Cayley graph of PGL(2,q)

2014-04-07 Thread David Joyner
On Mon, Apr 7, 2014 at 11:36 AM, Oren Becker  wrote:
> I would like to compute the spectrum of a certain Cayley graph on PGL(2,q), 
> for a certain prime power q.
>
> I created the generators of the graph as elements of GL(2,q).
>

Why don't you redo your steps but change this step to use PGL instead of GL?

> Now, how do I get the spectrum of the Cayley graph on PGL(2,q)? I thought to 
> first create the Cayley graph using PGL.cayley_graph(), and then take the 
> spectrum. But, taking a quotient is not implemented on GL(2,q), so I can't 
> even move from GL to PGL.
>
> Of course, I can work hard to create the adjacency matrix, then take the 
> spectrum, but I'm hoping for an easier solution.
>
> (I am new to Sage).
>
> Thanks,
> Oren.
>
> --
> 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] Given a set of generators for a group G, how do I find a presentation for it using those generators?

2014-04-04 Thread David Joyner
On Fri, Apr 4, 2014 at 12:43 AM, Will  wrote:
> Suppose I have a group G, which I know is finitely presentable and infinite.
>
> Suppose I have a small list of generators for G (in this case, 5). How can I 
> find a presentation for G using those generators?
>

How do you define the group if you don't know what the presentation is?

> thanks,
>
> - will
>
> --
> 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] question

2014-03-24 Thread David Joyner
On Mon, Mar 24, 2014 at 10:05 AM, Wilcox, Walter
 wrote:
>
> Is anyone there?
>
> I am trying to get sage to understand latex input. I get an error saying
> that pdflatex is not installed. How do I do this on a Mac? I have texlive
> and texshop installed.

I'm not sure what you mean.

Can you give an example of the input and expected output?


>
> -Walter Wilcox
>
> --
> 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] Correctness of Extended Quadratic Residue Code over GF(4)

2014-03-24 Thread David Joyner
On Mon, Mar 24, 2014 at 6:28 AM, Gerli Viikmaa  wrote:
> Hi,
>
> I'm working on vectors of varying sizes on GF(4) and I'm currently trying to 
> implement the code given in 
> http://www.iks.kit.edu/home/grassl/codetables/BKLC/BKLC.php?q=4&n=8&k=2
>
> The first step (Extend the QRCode over GF(4) of length 11) should give me a 
> [12, 6, 6] linear code - vectors of length 12, dimension 6, minimum (Hamming) 
> distance 6.
>
> But the execution
> sage: codes.ExtendedQuadraticResidueCode(11, GF(4,'a'))
> Linear code of length 12, dimension 11 over Finite Field in a of size 2^2
>
> gives me a linear code of dimension 11. If my field size is prime, then I do 
> get a code with dimension 6. According to that source, the dimension should 
> be 6 with field size 4 as well. Why isn't it?
>

Quadratic residue codes are defined over prime fields:
http://en.wikipedia.org/wiki/Quadratic_residue_code
If there is a generalization of QR codes to the extension field case,
it is not implemented in Sage. Sorry.
Feel free to implement it and submit a patch:-)  (Alternatively, share
your code on sage-devel.)

> I'm running Sage Version 6.1.1, Release Date: 2014-02-04 on Ubuntu 12.04.
>
> Thank you in advance,
> Gerli
>
> --
> 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] BinaryReedMullerCode does not work

2014-03-06 Thread David Joyner
On Thu, Mar 6, 2014 at 5:27 PM, Barbara Sánta  wrote:
> Hi, HammingCode is working, but I tried:
>
> C = BinaryReedMullerCode(4,2)
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "_sage_input_2.py", line 10, in 
> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 
> -*-\\n" + 
> _support_.preparse_worksheet_cell(base64.b64decode("QyA9IEJpbmFyeVJlZWRNdWxsZXJDb2RlKDQsMik="),globals())+"\\n");
>  execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in 
>
>   File "/tmp/tmplaVR0H/___code___.py", line 3, in 
> exec compile(u'C = BinaryReedMullerCode(_sage_const_4 ,_sage_const_2 )
>   File "", line 1, in 
>
>   File 
> "/usr/local/sage/sage-5.3-linux-64bit-ubuntu_10.04.4_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/coding/guava.py",
>  line 73, in BinaryReedMullerCode


It is in guava.py, which means it needs the GAP package Guava to be
installed. Hope this helps.


> gap.eval("C:=ReedMullerCode("+str(r)+", "+str(k)+")")
>   File 
> "/usr/local/sage/sage-5.3-linux-64bit-ubuntu_10.04.4_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/interfaces/gap.py",
>  line 376, in eval
> result = Expect.eval(self, input_line, **kwds)
>   File 
> "/usr/local/sage/sage-5.3-linux-64bit-ubuntu_10.04.4_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/interfaces/expect.py",
>  line 1242, in eval
> for L in code.split('\n') if L != ''])
>   File 
> "/usr/local/sage/sage-5.3-linux-64bit-ubuntu_10.04.4_lts-x86_64-Linux/local/lib/python2.7/site-packages/sage/interfaces/gap.py",
>  line 577, in _eval_line
> raise RuntimeError, message
> RuntimeError: Gap produced error output
> Variable: 'ReedMullerCode' must have a value
>
>
>executing C:=ReedMullerCode(4, 2);
>
>
> What could I do?
>
> Thanks,
> Barbara
>
> --
> 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/groups/opt_out.

-- 
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] sage->nauty->directed graphs isomorphism vs. magma -- smth is very wrong

2014-02-28 Thread David Joyner
On Fri, Feb 28, 2014 at 4:18 PM, Aleksandr Kodess  wrote:
> As far as I know both sage and magma utilize Brendan McKay's program nauty in 
> order to check

That is completely false. Robert Miller implemented from scratch a
number of graph-theory
algorithms independently of the code in nauty.

I don't know the answer to your question below but want to correct you on this
one statement.

> whether two given graphs (directed or undirected) are isomorphic. As is 
> demonstrated
> by the following example, sage and magma greatly differ in the efficiency in 
> which this
> program is utilized.
>
> # sage code
> q = 19
> n1 = 7
> n2 = 13
> F = FiniteField(q, 'xi')
> V = [(x,y) for x in F for y in F]
> G1 = DiGraph([V, lambda x,y: x[1] + y[1] == x[0]*(y[0]**n1)])
> G2 = DiGraph([V, lambda x,y: x[1] + y[1] == x[0]*(y[0]**n2)])
> G1.is_isomorphic(G2)
>
> // magma code for the same operation
> q := 19;
> n1 := 7;
> n2 := 13;
> F := FiniteField(q);
> V := {[x,y] : x,y in F};
> G1 := Digraph< V|{ [x,y] : x,y in V | x[2] + y[2] eq ((x[1])^1)*((y[1])^n1)}>;
> G2 := Digraph< V|{ [x,y] : x,y in V | x[2] + y[2] eq ((x[1])^1)*((y[1])^n2)}>;
> IsIsomorphic(G1,G2);
>
>
> It takes sage forever to test whether these two directed graphs of order 19^2 
> are
> isomorphic (they are in fact not), while it takes magma only a second. The 
> same
> problem occurs for other values of q, n1 and n2. The version of sage I'm 
> running
> is 5.12, and the version of magma I'm running is 2.19.10.
>
> Is this a known issue? Is this going to be fixed any time soon?
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


Re: [sage-support] checking if two matrices are permutation similar

2014-02-27 Thread David Joyner
On Thu, Feb 27, 2014 at 2:25 PM, Keivan Monfared  wrote:
> In a problem that I am solving I generate matrices and put them in a list. 
> The list gets long as if a matrix is a solution to my problem, all of its 
> permutations are, so I want to check to see if a matrix that I find is 
> permutation of another matrix which is already in the list. Are there any 
> fast ways to do this? Anything faster than checking all permutations of that 
> matrix?

I don't know how fast it is but GAP (included with Sage) has a command
TransformingPermutations which might help:
http://www.gap-system.org/Manuals/doc/ref/chap71.html#X7D721E3D7AA319F5

>
> If it helps, all my matrices are 0-1 matrices.
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


[sage-support] Re: [sage-edu] viewing student worksheets

2014-01-21 Thread David Joyner
On Tuesday, January 21, 2014, Maeve McCarthy 
wrote:

> I ran a SageNB lab last Thursday (1/16) in class. My students all created
> accounts and shared their worksheets with me at the end of class. I did a
> cursory check, saw that they were all there, and decided to grade them
> later. When I came back to grade them, all the student worksheets had
> vanished. Any thoughts on how to recover them?
>
>
> Maeve
>

Which server did you use?


>  --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com  'sage-edu%2bunsubscr...@googlegroups.com');>.
> To post to this group, send email to 
> sage-...@googlegroups.com 'sage-...@googlegroups.com');>
> .
> Visit this group at http://groups.google.com/group/sage-edu.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [sage-support] integrating an expression with a dirac_delta function.

2013-11-28 Thread David Joyner
On Thu, Nov 28, 2013 at 4:37 AM, Jose Guzman  wrote:
> Hi everybody,
>
> I want to solve the following ODE:
>
> dp/dt = (1-p)/tau - u*p*delta(t-tOn)
>
> In principle, desolve_odeint should be able to do it. However, in sage
>
> sage: import numpy as np
> sage: from sage.calculus.desolvers import desolve_odeint
>
> sage: p = var('p')
> sage: t = var('t')
> sage: tau = 2
> sage: u = 0.8
>
> sage: myode(t) = (1-p)/tau - u*p*dirac_delta(t)
>
> sage: tlist = np.arange(0,10,0.01)
>
> sage: desolve_odeint(des = myode, ics = [0,1], times = tlist, dvars =[p])

desolve_odeint is a numerical routine and delta is not a function, so
I don't see how you can solve it this way.

Does this entry in the ref manual help?
http://sage.math.washington.edu/tmp/sage-2.8.12.alpha0/doc/ref/node125.html


>
> The error is that expression does not support indexing. Then,  how can I
> define the array of vectors that contain the independent variable in sage?
>
> Thanks in advance
>
> Jose
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


Re: [sage-support] Error in elias_upper_bound

2013-11-19 Thread David Joyner
On Tue, Nov 19, 2013 at 9:46 AM, Peter Mueller  wrote:
> Dear Sage Developers,
>
> the Elias bound of coding theory is wrongly implemented. Compare
>

Thanks for this report.

Would you mind creating a trac ticket for this?
I'd be very grateful.

> sage: elias_upper_bound(10,2,8,algorithm="gap"), elias_upper_bound(10,2,8)
> (4, 120)
>
> Looking at the relevant piece of code
>
> else:
> def ff(n,d,w,q):
> return r*n*d*q**n/((w**2-2*r*n*w+r*n*d)*volume_hamming(n,q,w));
> def get_list(n,d,q):
> I = []
> for i in range(1,int(r*n)+1):
> if i**2-2*r*n*i+r*n*d>0:
> I.append(i)
> return I
> I = get_list(n,d,q)
> bnd = min([ff(n,d,w,q) for w in I])
> return int(bnd)
>
> reveals the mistake: The `return I' is one tab too deep, it has to get
> executed after the for loop is finished.
>
> One other note, which also refers to the otherwise correct algorithm="gap"
> version: Something like elias_upper_bound(10,2,1) yields an error because
> for these parameters the Elias bound is not defined. Wouldn't it be better
> to return some trivial but true result in this case, like q^n?
>
> Yet another question: Does the above example, where two functions get
> defined but each of them gets used only at one place, follow certain coding
> conventions? As a work around, I implemented the Elias bound as
>
> t = n*(1-1/q)
> lr = [(r,r^2-2*t*r+t*d) for r in [1..floor(t)]]
> lv = [t*d*q^n/z/volume_hamming(n,q,r) for (r,z) in lr if z > 0]
> return q^n if len(lv) == 0 else floor(min(lv))
>
> which looks cleaner to me.
>
> Best wishes,
> Peter M.
>
>
>
>
>
>
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


[sage-support] Re: [sage-edu] Sage and Automatic Control

2013-09-11 Thread David Joyner
Cross posting

On Wednesday, September 11, 2013, wrote:

> Sage can be used to automatic control arguments? Ie root locus, diagrams
> bode, controllability observability matrices etc.. etc..
>
>
> Ale
>


I don't know what you mean but sage-support is a better place to post this
question I think.


>  --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-edu+unsubscr...@googlegroups.com  'sage-edu%2bunsubscr...@googlegroups.com');>.
> To post to this group, send email to 
> sage-...@googlegroups.com 'sage-...@googlegroups.com');>
> .
> Visit this group at http://groups.google.com/group/sage-edu.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [sage-support] [newbie] lambda operator

2013-08-15 Thread David Joyner
On Thu, Aug 15, 2013 at 6:24 AM, Jean Dubois  wrote:
> Hello,
> I recently bought a book "adventures in group theory" which uses Sage. On 
> page 14

If you bought the 2nd edition then half the proceeds go to Sage, so thanks!
(The other half go to an environmental group, and they probably thank you too:-)

> it tells Sage allows functions to be defined using a 'lamba operator' and the 
> following example is shown:
> pi = lambda x: pari(x).primepi()
>
> can someone here explain this in "newbie-language"

Others can explain it better than I, but I think the basic idea is that it uses
pari/gp (which is a separate program installed with Sage) to compute pi(x).
See http://pari.math.u-bordeaux.fr/ for more details on pari.

>
> I understand what pi(x) (number of primes =< x) is but not how it is 
> accomplished
> with the syntax above
>
> thanks for being patient with a newbie
> jean
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


Re: [sage-support] Re: Completely confused about simple Sage matrix operation error

2013-07-01 Thread David Joyner
On Mon, Jul 1, 2013 at 5:27 AM, David Ingerman  wrote:
> On Monday, July 1, 2013 2:06:54 AM UTC-7, Harald Schilly wrote:
>> On Monday, July 1, 2013 10:45:36 AM UTC+2, David Ingerman wrote: The 
>> following matrix operation produces wrong answer in online Sage:
>> M=matrix(RR,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM)
>>
>> RR stands for the "real numbers" with the usual 53bits of precision, e.g. 
>> 5.123957322….
>> QQ are rational numbers where two large integers build up each number,
>> e.g. 4141/333000333000333000333000333000333000333
>> Therefore, QQ has a much higher precision … but is much slower and uses more 
>> memory.
>>
>> In your case, the lack of precision in RR causes you troubles and you have 
>> to find a way to pose the problem you want to solve differently. You cannot 
>> rely on QQ, because in bad cases, the expressions blow up and eat all your 
>> memory. More generally, this is not a Sage related problem, but related to 
>> all calculations your are doing "natively" with your CPU.
>>
>> To see in advance when this happens, you have to calculate the
>> conditional number of the matrix. I think that's only in numpy (or I
>> haven't found it).
>>
>> sage: M=matrix(RR,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]])
>> sage: import numpy as np
>> sage: np.linalg.cond(M)
>> 104.85355762315329
>>
>> http://en.wikipedia.org/wiki/Condition_number
>>
>> Here are some decomposition methods that might help:
>>
>> http://en.wikipedia.org/wiki/Matrix_decomposition
>>
>> H
>
>  But this is a very small matrix and conditional number is not large...

Using RDF is better:

sage: 
M=matrix(RDF,[[7,3,10,13],[1,1,2,2],[1,2,3,4],[1,3,5,7]]);det(M);invM=M^(-1);invM*M;det(invM)
-7.0
[   1.00.00.0   -8.881784197e-16]
[   0.01.00.0   -8.881784197e-16]
[  4.4408920985e-160.01.08.881784197e-16]
[-5.55111512313e-17 -2.77555756156e-16 -1.66533453694e-161.0]
-0.142857142857

>
> --
> 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/groups/opt_out.
>
>

-- 
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/groups/opt_out.




Re: [sage-support] Question about FastFourierTransform

2013-05-28 Thread David Joyner
On Tue, May 28, 2013 at 10:46 AM, Thierry Dumont
 wrote:
> Hi,
> I am experimenting with fast Fourier Transform in Sage.
> It seems there are different possibilities.
>
> 1) There is: FastFourierTransform
> FastFourierTransform(size, base_ring=None)
>
> 2) One can simply do:
> v = vector(CDF,[1..10]);
> v.fft()
>
> 3) One can directly use scipy/numpy which seems to use the gsl code.
>
> My experiments show very different performances at least with large
> sequences (10^6).
> My questions:
>
> a) Do all these methods call the same routine (gsl/)?
>   In that case, different performances are certainly a consequence of the
> data management, input data types...
>
> b) Where is FastFourierTransform defined? I could not find any script with
> this name.

In sage/gsl/dft.py there are some docstrings which give a hint as to a
description of the fft.


>
> Yours
> t.d.
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Coefficient of Boolean Polynomial

2013-05-27 Thread David Joyner
On Mon, May 27, 2013 at 9:00 PM, Santanu Sarkar
 wrote:
> Dear all,
>   In the following code, although the
> coefficient of x0 is 1+x1*x2, it returns
> 1.
>
> from sage.crypto.boolean_function import BooleanFunction
> R.=BooleanPolynomialRing(6)
>
> f=(1+x1*x2)*x0+x4*x5
> print f.monomial_coefficient(x0)
>

I'm not sure if this helps but you could try

sage: R.=PolynomialRing(GF(2),6)
sage: f=(1+x1*x2)*x0+x4*x5
sage: print f.coefficient(x0)
x1*x2 + 1

or

sage: R1.=BooleanPolynomialRing(5)
sage: R2.=PolynomialRing(R1, 1, "x0")
sage: f=(1+x1*x2)*x0+x4*x5
sage: print f.monomial_coefficient(x0)
x1*x2 + 1

> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] right_kernel()

2013-04-18 Thread David Joyner
On Thu, Apr 18, 2013 at 5:42 PM, Juan Grados  wrote:

> I ask this because I am study McEliece Cryptosystem. And to get
> the generator matrix of Goppa code I am using the right_kernel()
> instruction
>
> Krnl = H.right_kernel();
>
> but I get always these form. The parity check matrix is building using the
> matrix
> T, V and D. How I will be able to get generator matrix in other form?
>


I might be misunderstanding you but does standard_form in linear_code help?
https://github.com/sagemath/sagelib/blob/master/sage/coding/linear_code.py


>
>
>
> H: is a parity check matrix.
> T: Toepliz
> V: Vandermonde
> D: Diagonal
>
>
> 2013/4/18 William Stein 
>
>> On Thu, Apr 18, 2013 at 1:50 PM, Juan Grados  wrote:
>> > Dears members,
>> >
>> > I executed right_kernel() for any matrix H. Why always I get a basis
>> matrix
>> > in this form [I|A] (I:identity)?
>>
>> That's not true for  the 1x2 matrix [1,0]:
>>
>> sage: matrix(1,2,[1,0]).right_kernel()
>> Free module of degree 2 and rank 1 over Integer Ring
>> Echelon basis matrix:
>> [0 1]
>>
>> The basis matrix is not of the form [I|A], for I the identity matrix.
>>
>> For a *random* matrix you'll get [I|A] though.
>>
>> William
>>
>> William
>>
>>
>>
>> >
>> > --
>> > -
>> > MSc. Juan del Carmen Grados Vásquez
>> > Laboratório Nacional de Computação Científica
>> > Tel: +55 24 2233-6260
>> > (http://www.lncc.br/)
>> > http://juaninf.blogspot.com
>> > -
>> >
>> > --
>> > 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?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>>
>>
>> --
>> William Stein
>> Professor of Mathematics
>> University of Washington
>> http://wstein.org
>>
>> --
>> 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?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> -
> MSc. Juan del Carmen Grados Vásquez
> Laboratório Nacional de Computação Científica
> Tel: +55 24 2233-6260
> (http://www.lncc.br/)
> http://juaninf.blogspot.com
> -
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




<    1   2   3   4   5   6   7   8   9   10   >