[sage-devel] Re: Additive Groups

2008-08-29 Thread Nils Skoruppa

On 28 Aug., 15:20, "John Cremona" <[EMAIL PROTECTED]> wrote:
> Thanks for your comments, David.  I am having some success:
>
> The one thing I cannot get to work in the additive case is  (for
> example) 2*g where g is a group element.  I have tried all possible
> combinations of __lmul__, _lmul_, __rmul__, _rmul_, but although I
> have this ok:
>
> sage: a,b=A.gens()
> sage: b._lmul_(20)
> 2*b
> sage: 2*b
>
> inputting 20*b gives an error:
> TypeError Traceback (most recent call last)

> >> John

Hi John,

I have a class which derives from AdditiveGroupElement and whose
parent derives from AbelianGroup. Concerning multiplication I did not
implement more than __mul__()  with two underscores ( and no _lmul_,
_rmul_, mil_impl-c ... and the like). It seems to work OK:

sage: A. = FiniteQuadraticModule ('3^3')
sage: 5*a
2*a
sage: b*7
b
sage: -a +
2*c
2*a + 2*c

I cannot explain why this works, but if you want to have a look:
http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/finite_quadratic_module.sage
(and then  line  2132  class
FiniteQuadraticModuleElement(AdditiveGroupElement).

---Nils

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread John Cremona

Thanks Nils, I'll look at how you did that.

John

2008/8/29 Nils Skoruppa <[EMAIL PROTECTED]>:
>
> On 28 Aug., 15:20, "John Cremona" <[EMAIL PROTECTED]> wrote:
>> Thanks for your comments, David.  I am having some success:
>>
>> The one thing I cannot get to work in the additive case is  (for
>> example) 2*g where g is a group element.  I have tried all possible
>> combinations of __lmul__, _lmul_, __rmul__, _rmul_, but although I
>> have this ok:
>>
>> sage: a,b=A.gens()
>> sage: b._lmul_(20)
>> 2*b
>> sage: 2*b
>>
>> inputting 20*b gives an error:
>> TypeError Traceback (most recent call last)
>
>> >> John
>
> Hi John,
>
> I have a class which derives from AdditiveGroupElement and whose
> parent derives from AbelianGroup. Concerning multiplication I did not
> implement more than __mul__()  with two underscores ( and no _lmul_,
> _rmul_, mil_impl-c ... and the like). It seems to work OK:
>
> sage: A. = FiniteQuadraticModule ('3^3')
> sage: 5*a
> 2*a
> sage: b*7
> b
> sage: -a +
> 2*c
> 2*a + 2*c
>
> I cannot explain why this works, but if you want to have a look:
> http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/finite_quadratic_module.sage
> (and then  line  2132  class
> FiniteQuadraticModuleElement(AdditiveGroupElement).
>
> ---Nils
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread mabshoff



On Aug 29, 2:24 am, Nils Skoruppa <[EMAIL PROTECTED]> wrote:



Hi Nils,

> I cannot explain why this works, but if you want to have a 
> look:http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/finite_...
> (and then  line  2132  class
> FiniteQuadraticModuleElement(AdditiveGroupElement).
>
> ---Nils

Out of curiosity: Do you plan to submit the code to Sage eventually?

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread John Cremona

Nils, I hope you do -- I was certainly impressed by the presentation
of this which you gave at the Bristol meeting last week.

John

2008/8/29 mabshoff <[EMAIL PROTECTED]>:
>
>
>
> On Aug 29, 2:24 am, Nils Skoruppa <[EMAIL PROTECTED]> wrote:
>
> 
>
> Hi Nils,
>
>> I cannot explain why this works, but if you want to have a 
>> look:http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/finite_...
>> (and then  line  2132  class
>> FiniteQuadraticModuleElement(AdditiveGroupElement).
>>
>> ---Nils
>
> Out of curiosity: Do you plan to submit the code to Sage eventually?
>
> Cheers,
>
> Michael
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] colours in trac

2008-08-29 Thread chris wuthrich

I wonder if a user can change the colours on the trac pages for
patches. Being green-red colour-blind, I would prefer to swap, say,
green for blue.
Sorry if this question is not really a sage-devel question...

Chris.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: "page not found" for granville calculus

2008-08-29 Thread Martin Albrecht

On Friday 29 August 2008, Minh Nguyen wrote:
> Hi David,
>
> There appears to be a broken link at
>
> http://wiki.sagemath.org/Teaching_with_SAGE
>
> for "Calculus 1". The "broken" link is
>
> [1] http://sage.math.washington.edu/home/wdj/teaching/granville-calculus/
>
> However, at the URL
>
> http://sage.math.washington.edu/home/wdj/teaching/
>
> I notice that your link to Granville's calculus textbook is
>
> [2] http://sage.math.washington.edu/home/wdj/teaching/calc1-sage/
>
> So can we replace [1] with [2] on the said "Teaching with SAGE" page?

Hi there,

I'm sure that change is fine. I don't think you need to ask for permission to 
change a link on the Wiki. It is a Wiki after all :-)

Thanks for going through it!

Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Sage 3.1.2.alpha2 released

2008-08-29 Thread mabshoff

Hello folks,

here is alpha2. We fixed another boatload of small and not so small
issues. The performance regression with plotting is fixed, but there
are still doctesting issues with the ghmm code. We will tackle that in
alpha3 which hopefully will be done before Doc Day 3. Aside from that
we also updated jmol and a bunch of other spkgs. One goal is to
upgrade ATLAS to the 3.8.2 release in alpha3 and also finish up
merging a bunch of the 40 or so patches awaiting review. The goal of
Doc Day 3 is to get coverage up to 60% from currently 57.3%. To reach
that goal we need to add 564 doctests (unless we remove some dead
code), so this is certainly an ambitious goal.

Sources are at

http://sage.math.washington.edu/home/mabshoff/release-cycles-3.1.2/sage-3.1.2.alpha2.tar

and a sage.math only binary is at

http://sage.math.washington.edu/home/mabshoff/release-cycles-3.1.2/sage-3.1.2.alpha2-sage.math-only-x86_64-Linux.tar.gz

Thoughts? Comments?

Cheers,

Michael

#132: Simon King, Mike Hansen: maxima -- implement special arithmetic
for MaximaFunction class [Reviewed by Martin Albrecht]
#772: Carl Witty, Jason Grout: create experimental QEPCAD.spkg for
quantifier elimination and solving systems of inequalities [Reviewed
by Michael Abshoff, Jason Grout, Carl Witty]
#1952: Martin Albrecht, Mike Hansen: Follow up to #1940: Ideal
comparison improvements [Reviewed by Mike Hansen, Martin Albrecht]
#2209: Steve Linton: gap on itanium - incorporate steve linton's new
fixes so gap builds fine with optimizations [Reviewed by William
Stein]
#2366: Mike Hansen: add docstring to sloane_find and sloane_sequence
[Reviewed by Timothy Clemans]
#3253: Alex Ghitza: f.jacob() used to work to compute jacobian ideal.
Now it doesn't [Reviewed by Martin Albrecht]
#3431: Carl Witty: QEPCAD interface [Reviewed by Jason Grout]
#3440: Martin Albrecht: Our PolyBoRi's GB calculation in AES mode is
broken [Reviewed by Burcin Erocal]
#3630: Yi Qiang: upgrade twisted.spkg to 8.1.0 release [Reviewed by
Michael Abshoff]
#3635: Martin Albrecht: If m is a matrix, then m.plot() should call
matrix_plot [Reviewed by Jason Grout]
#3823: Igor Tolkov: Interact - get rid of default height [Reviewed by
Jason Grout]
#3883: John Cremona: Streamline elliptic curve division (torsion)
polynomials  [Reviewed by Chris Wuthrich]
#3892: Hamish Ivey-Law, Martin Albrecht: PowerSeries random element
over GF(q) (Givaro) fails [Reviewed by Alex Ghitza]
#3909: Josh Kantor: Updating jmol package to 11.6rc8 [Reviewed by
Jason Grout, Michael Abshoff]
#3915: Martin Albrecht: PolyBoRi interface improvements [Reviewed by
Michael Brickenstein]
#3935: Jason Merrill: ode_solver __init__ method ignores many
parameters [Reviewed by Jason Grout]
#3961: John Cremona: bug in ell_finite_field.abelian_group() [Reviewed
by Alex Ghitza]
#3965: Martin Albrecht: one line fix for PolyBoRi to Magma conversion
[Reviewed by Burcin Erocal]
#3966: Jason Grout: The ode cython example gives errors [Reviewed by
Jason Merrill]
#3968: Jason Grout: Magma interface sometimes fails on long inputs
[Reviewed by Willem Jan Palenstijn]
#3971: William Stein: hidden markov models -- implement nsteps and
log_likelihood_cutoff [Reviewed by Josh Kantor]
#3972: Michael Abshoff: 3.1.2.alpha1: numerical noise in plot.py
[Reviewed by Craig Citro]
#3973: Chris Wuthrich: short_weierstrass_model in characteristic 3
[Reviewed by John Cremona]
#3975: Arnaud Bergeron: Small mistake in the new plot() code [Reviewed
by Mike Hansen]
#3976: Mike Hansen: improve doctests to expect.py, maxima.py, and
lie.py [Reviewed by Robert Miller]
#3977: Mike Hansen: get interfaces/octave.py up to 100% coverage
[Reviewed by Robert Miller]
#3982: Robert Miller: Pipe stdout to /dev/null to help sage_timeit
with "print" statements [Reviewed by Mike Hansen]
#3983: Mike Hansen: get coverage for sage/interfaces/sage0.py up to
100% [Reviewed by Michael Abshoff]
#3989: Michael Abshoff: fix autotools issues with gd-2.0.35 [Reviewed
by Craig Citro]

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: colours in trac

2008-08-29 Thread John Cremona

2008/8/29 chris wuthrich <[EMAIL PROTECTED]>:
>
> I wonder if a user can change the colours on the trac pages for
> patches. Being green-red colour-blind, I would prefer to swap, say,
> green for blue.

+1 from another red-green challenged developer.

John

PS Chris, I have nearly finished my re-working of your elliptic curve
torsion over number fields enhancement.

> Sorry if this question is not really a sage-devel question...
>
> Chris.
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: colours in trac

2008-08-29 Thread mabshoff



On Aug 29, 3:58 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
> 2008/8/29 chris wuthrich <[EMAIL PROTECTED]>:

Hi,

> > I wonder if a user can change the colours on the trac pages for
> > patches. Being green-red colour-blind, I would prefer to swap, say,
> > green for blue.
>
> +1 from another red-green challenged developer.
>
> John

we can likely fix the CSS for the trac patch page, so I see little
problems there. Harald: Can you poke around? Otherwise I will do it
once I get up again.

> PS Chris, I have nearly finished my re-working of your elliptic curve
> torsion over number fields enhancement.

Nice.

> > Sorry if this question is not really a sage-devel question...
>
> > Chris.

No problem, issues like that are relevant for development, so feel
free to raise them.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Abelian groups are driving me crazy

2008-08-29 Thread John Cremona

The subject says it all really.   Can anyone justify the following behaviour?

sage: A=AbelianGroup([])
sage: A
Trivial Abelian Group
sage: A.list()
[]
sage: list(A)
[]
sage: A.gens()
()

sage: B=AbelianGroup([1])
sage: B
Multiplicative Abelian Group isomorphic to C1
sage: B.list()
[1]
sage: list(B)
[1]
sage: B.gens()
(f,)

When you create an abelian group by giving a list of generators with
their orders, the constructor kills any generators of order 1 UNLESS
you give precisely one generator which has order 1:
sage: AbelianGroup([1])
Multiplicative Abelian Group isomorphic to C1
sage: AbelianGroup([1,1])
Trivial Abelian Group
sage: AbelianGroup([1,1,1])
Trivial Abelian Group

Without going so far aw to completely rewrite AbelianGroups -- which
really does need doing -- I would propose to stop this quiet deletion
of (most) trivial generators.  It can only cause confusion:
sage: AbelianGroup([2,3,2],names='abc').gens()
(a, b, c)
sage: AbelianGroup([2,1,2],names='abc').gens()
(a, b)
In the user's program  -- where the orders of the generators will vary
at run-time this can only cause trouble.

But this is only temporary until someone does a complete rewrite...

John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Abelian groups are driving me crazy

2008-08-29 Thread David Joyner

I agree AbelianGroups needs rewriting and has odd behavior in
some cases.

Incidently, here is what GAP does:

gap> A := AbelianGroup([1,2,3]);

gap> GeneratorsOfGroup(A);
[  of ..., f1, f2 ]
gap> A := AbelianGroup([2,1,3]);

gap> GeneratorsOfGroup(A);
[ f1,  of ..., f2 ]

This is kind of mid-way between what Sage does now and what you
are proposing. Is implementing this behavior worth considering?


On Fri, Aug 29, 2008 at 7:14 AM, John Cremona <[EMAIL PROTECTED]> wrote:
>
> The subject says it all really.   Can anyone justify the following behaviour?
>
> sage: A=AbelianGroup([])
> sage: A
> Trivial Abelian Group
> sage: A.list()
> []
> sage: list(A)
> []
> sage: A.gens()
> ()
>
> sage: B=AbelianGroup([1])
> sage: B
> Multiplicative Abelian Group isomorphic to C1
> sage: B.list()
> [1]
> sage: list(B)
> [1]
> sage: B.gens()
> (f,)
>
> When you create an abelian group by giving a list of generators with
> their orders, the constructor kills any generators of order 1 UNLESS
> you give precisely one generator which has order 1:
> sage: AbelianGroup([1])
> Multiplicative Abelian Group isomorphic to C1
> sage: AbelianGroup([1,1])
> Trivial Abelian Group
> sage: AbelianGroup([1,1,1])
> Trivial Abelian Group
>
> Without going so far aw to completely rewrite AbelianGroups -- which
> really does need doing -- I would propose to stop this quiet deletion
> of (most) trivial generators.  It can only cause confusion:
> sage: AbelianGroup([2,3,2],names='abc').gens()
> (a, b, c)
> sage: AbelianGroup([2,1,2],names='abc').gens()
> (a, b)
> In the user's program  -- where the orders of the generators will vary
> at run-time this can only cause trouble.
>
> But this is only temporary until someone does a complete rewrite...
>
> John
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Abelian groups are driving me crazy

2008-08-29 Thread John Cremona

2008/8/29 David Joyner <[EMAIL PROTECTED]>:
>
> I agree AbelianGroups needs rewriting and has odd behavior in
> some cases.
>
> Incidently, here is what GAP does:
>
> gap> A := AbelianGroup([1,2,3]);
> 
> gap> GeneratorsOfGroup(A);
> [  of ..., f1, f2 ]
> gap> A := AbelianGroup([2,1,3]);
> 
> gap> GeneratorsOfGroup(A);
> [ f1,  of ..., f2 ]
>
> This is kind of mid-way between what Sage does now and what you
> are proposing. Is implementing this behavior worth considering?

In fact that is almost what my current rewrite (with almost complete
support for additive groups -- so far) does.  Any trivial gens display
as 0 (or 1 in multiplcative groups), but those names are still
reerved.  So in your last example the gens would display as [f1,1,f3].
 Although that looks a bit odd, it is consistent (The 2nd generator is
f2 and is 1; the 3rd is f3).

If I can finished getting additive groups to work with at least as
much functionality as we already have for multiplicative groups, I'll
put up a patch for discussion, as that will already be an enhancement.
 But it's only putting off the day when it is all redone from scratch
(everything done in terms of smith and hermite forms of integer
matrices, such as in Cohen's book).

John

PS I hope you (David J) don't mind constructive criticism -- without
what you did 2+ years ago we would have nothing at all!  But we do
need to be able to handle everything Magma does...

> E:=EllipticCurve([0,-1,1,0,0]); TorsionSubgroup(E);
Abelian Group isomorphic to Z/5
Defined on 1 generator
Relations:
5*$.1 = 0
> E:=EllipticCurve([0,-1,1,0,0]); T,f:=TorsionSubgroup(E);
> Set(T);
{
0,
T.1,
2*T.1,
3*T.1,
4*T.1
}
> {f(P): P in T};
{ (0 : 1 : 0), (0 : -1 : 1), (0 : 0 : 1), (1 : -1 : 1), (1 : 0 : 1) }

Here's a naturally multiplcative example where the abstract group is
still displayed in additive notation (which I don't mind).

> C;
Abelian Group isomorphic to Z/3
Defined on 1 generator
Relations:
3*C.1 = 0
> Set(C);
{
0,
C.1,
2*C.1
}
> {f(c): c in C};
{
Ideal
Two element generators:
2
$.2,
Principal Ideal
Generator:
1,
Ideal
Two element generators:
2
$.2 - 1
}


>
>
> On Fri, Aug 29, 2008 at 7:14 AM, John Cremona <[EMAIL PROTECTED]> wrote:
>>
>> The subject says it all really.   Can anyone justify the following behaviour?
>>
>> sage: A=AbelianGroup([])
>> sage: A
>> Trivial Abelian Group
>> sage: A.list()
>> []
>> sage: list(A)
>> []
>> sage: A.gens()
>> ()
>>
>> sage: B=AbelianGroup([1])
>> sage: B
>> Multiplicative Abelian Group isomorphic to C1
>> sage: B.list()
>> [1]
>> sage: list(B)
>> [1]
>> sage: B.gens()
>> (f,)
>>
>> When you create an abelian group by giving a list of generators with
>> their orders, the constructor kills any generators of order 1 UNLESS
>> you give precisely one generator which has order 1:
>> sage: AbelianGroup([1])
>> Multiplicative Abelian Group isomorphic to C1
>> sage: AbelianGroup([1,1])
>> Trivial Abelian Group
>> sage: AbelianGroup([1,1,1])
>> Trivial Abelian Group
>>
>> Without going so far aw to completely rewrite AbelianGroups -- which
>> really does need doing -- I would propose to stop this quiet deletion
>> of (most) trivial generators.  It can only cause confusion:
>> sage: AbelianGroup([2,3,2],names='abc').gens()
>> (a, b, c)
>> sage: AbelianGroup([2,1,2],names='abc').gens()
>> (a, b)
>> In the user's program  -- where the orders of the generators will vary
>> at run-time this can only cause trouble.
>>
>> But this is only temporary until someone does a complete rewrite...
>>
>> John
>>
>> >
>>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread Robert Bradshaw

On Aug 29, 2008, at 2:24 AM, Nils Skoruppa wrote:

> On 28 Aug., 15:20, "John Cremona" <[EMAIL PROTECTED]> wrote:
>> Thanks for your comments, David.  I am having some success:
>>
>> The one thing I cannot get to work in the additive case is  (for
>> example) 2*g where g is a group element.  I have tried all possible
>> combinations of __lmul__, _lmul_, __rmul__, _rmul_, but although I
>> have this ok:
>>
>> sage: a,b=A.gens()
>> sage: b._lmul_(20)
>> 2*b
>> sage: 2*b
>>
>> inputting 20*b gives an error:
>> TypeError Traceback (most recent  
>> call last)
>
 John
>
> Hi John,
>
> I have a class which derives from AdditiveGroupElement and whose
> parent derives from AbelianGroup. Concerning multiplication I did not
> implement more than __mul__()  with two underscores ( and no _lmul_,
> _rmul_, mil_impl-c ... and the like). It seems to work OK:
>
> sage: A. = FiniteQuadraticModule ('3^3')
> sage: 5*a
> 2*a
> sage: b*7
> b
> sage: -a +
> 2*c
> 2*a + 2*c
>
> I cannot explain why this works, but if you want to have a look:
> http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/ 
> finite_quadratic_module.sage
> (and then  line  2132  class
> FiniteQuadraticModuleElement(AdditiveGroupElement).

Here is what should be implemented (and I just tried it out and it  
does for me with the latest Sage). Most of the coercion model focus  
has been considered in the context of Rings, but groups are fine too.  
Let me know if this doesn't work for you.


from sage.groups.group import AbelianGroup
from sage.structure.element import AdditiveGroupElement

class MyAbelianGroup(AbelianGroup):
 def __call__(self, n):
 return MyAdditiveGroupElement(self, n)

class MyAdditiveGroupElement(AdditiveGroupElement):
 def __init__(self, parent, n):
 AdditiveGroupElement.__init__(self, parent)
 self.n = n
 def __repr__(self):
 return "My(%s)" % self.n
 def _add_(left, right):
 # Guaranteed left and right have the same parent.
 return MyAdditiveGroupElement(left.parent(), left.n + right.n)
 def _rmul_(self, a):
 # Guaranteed a is in the basering (probably ZZ)
 return MyAdditiveGroupElement(self.parent(), self.n * a)
 def _lmul_(self, a):
 # Guaranteed a is in the basering (probably ZZ)
 return self._rmul_(a) # should this be a default?


sage: G = MyAbelianGroup()
sage: G.base_ring()
Integer Ring
sage: G(3) + G(9)
My(12)
sage: 7*G(3)
My(21)
sage: G(2)*5
My(10)
sage: sum([G(2), G(3), G(7)])
My(12)
sage: G(55) * int(4)
My(220)


One thing that mystifies me is that I though repeated doubling was  
supposed to be provided by default if neither _rmul_ nor _lmul_ were  
provided. I'll have to look at this, but it's orthogonal to what you  
are trying to do.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread John Cremona

The trouble was that I wanted common code for both additive and
multiplicative groups, which I can -- almost-- implement.  Your way,
we have one type of element derived from some MultiplicativeElement
class and another from an Additive one, with a lot of duplicated code.

But I'll look at your code and see if it can help what I was trying to do.

John

2008/8/29 Robert Bradshaw <[EMAIL PROTECTED]>:
>
> On Aug 29, 2008, at 2:24 AM, Nils Skoruppa wrote:
>
>> On 28 Aug., 15:20, "John Cremona" <[EMAIL PROTECTED]> wrote:
>>> Thanks for your comments, David.  I am having some success:
>>>
>>> The one thing I cannot get to work in the additive case is  (for
>>> example) 2*g where g is a group element.  I have tried all possible
>>> combinations of __lmul__, _lmul_, __rmul__, _rmul_, but although I
>>> have this ok:
>>>
>>> sage: a,b=A.gens()
>>> sage: b._lmul_(20)
>>> 2*b
>>> sage: 2*b
>>>
>>> inputting 20*b gives an error:
>>> TypeError Traceback (most recent
>>> call last)
>>
> John
>>
>> Hi John,
>>
>> I have a class which derives from AdditiveGroupElement and whose
>> parent derives from AbelianGroup. Concerning multiplication I did not
>> implement more than __mul__()  with two underscores ( and no _lmul_,
>> _rmul_, mil_impl-c ... and the like). It seems to work OK:
>>
>> sage: A. = FiniteQuadraticModule ('3^3')
>> sage: 5*a
>> 2*a
>> sage: b*7
>> b
>> sage: -a +
>> 2*c
>> 2*a + 2*c
>>
>> I cannot explain why this works, but if you want to have a look:
>> http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/
>> finite_quadratic_module.sage
>> (and then  line  2132  class
>> FiniteQuadraticModuleElement(AdditiveGroupElement).
>
> Here is what should be implemented (and I just tried it out and it
> does for me with the latest Sage). Most of the coercion model focus
> has been considered in the context of Rings, but groups are fine too.
> Let me know if this doesn't work for you.
>
>
> from sage.groups.group import AbelianGroup
> from sage.structure.element import AdditiveGroupElement
>
> class MyAbelianGroup(AbelianGroup):
> def __call__(self, n):
> return MyAdditiveGroupElement(self, n)
>
> class MyAdditiveGroupElement(AdditiveGroupElement):
> def __init__(self, parent, n):
> AdditiveGroupElement.__init__(self, parent)
> self.n = n
> def __repr__(self):
> return "My(%s)" % self.n
> def _add_(left, right):
> # Guaranteed left and right have the same parent.
> return MyAdditiveGroupElement(left.parent(), left.n + right.n)
> def _rmul_(self, a):
> # Guaranteed a is in the basering (probably ZZ)
> return MyAdditiveGroupElement(self.parent(), self.n * a)
> def _lmul_(self, a):
> # Guaranteed a is in the basering (probably ZZ)
> return self._rmul_(a) # should this be a default?
>
>
> sage: G = MyAbelianGroup()
> sage: G.base_ring()
> Integer Ring
> sage: G(3) + G(9)
> My(12)
> sage: 7*G(3)
> My(21)
> sage: G(2)*5
> My(10)
> sage: sum([G(2), G(3), G(7)])
> My(12)
> sage: G(55) * int(4)
> My(220)
>
>
> One thing that mystifies me is that I though repeated doubling was
> supposed to be provided by default if neither _rmul_ nor _lmul_ were
> provided. I'll have to look at this, but it's orthogonal to what you
> are trying to do.
>
> - Robert
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread Robert Bradshaw

On Aug 29, 2008, at 5:01 AM, John Cremona wrote:

> The trouble was that I wanted common code for both additive and
> multiplicative groups, which I can -- almost-- implement.  Your way,
> we have one type of element derived from some MultiplicativeElement
> class and another from an Additive one, with a lot of duplicated code.

OK, I think I understand your question better then. In that case, I  
think the right approach is to define a wrapper class that provides a  
multiplicative interface to a additive group (and vice-versa). A  
tight wrapper in Cython would be very little overhead, and I think  
this would allow for a lot of code re-use.

>
> But I'll look at your code and see if it can help what I was trying  
> to do.
>
> John
>
> 2008/8/29 Robert Bradshaw <[EMAIL PROTECTED]>:
>>
>> On Aug 29, 2008, at 2:24 AM, Nils Skoruppa wrote:
>>
>>> On 28 Aug., 15:20, "John Cremona" <[EMAIL PROTECTED]> wrote:
 Thanks for your comments, David.  I am having some success:

 The one thing I cannot get to work in the additive case is  (for
 example) 2*g where g is a group element.  I have tried all possible
 combinations of __lmul__, _lmul_, __rmul__, _rmul_, but although I
 have this ok:

 sage: a,b=A.gens()
 sage: b._lmul_(20)
 2*b
 sage: 2*b

 inputting 20*b gives an error:
 TypeError Traceback (most recent
 call last)
>>>
>> John
>>>
>>> Hi John,
>>>
>>> I have a class which derives from AdditiveGroupElement and whose
>>> parent derives from AbelianGroup. Concerning multiplication I did  
>>> not
>>> implement more than __mul__()  with two underscores ( and no _lmul_,
>>> _rmul_, mil_impl-c ... and the like). It seems to work OK:
>>>
>>> sage: A. = FiniteQuadraticModule ('3^3')
>>> sage: 5*a
>>> 2*a
>>> sage: b*7
>>> b
>>> sage: -a +
>>> 2*c
>>> 2*a + 2*c
>>>
>>> I cannot explain why this works, but if you want to have a look:
>>> http://hg.countnumber.de/fqm-devel/file/98bb736f0c07/cn_group/
>>> finite_quadratic_module.sage
>>> (and then  line  2132  class
>>> FiniteQuadraticModuleElement(AdditiveGroupElement).
>>
>> Here is what should be implemented (and I just tried it out and it
>> does for me with the latest Sage). Most of the coercion model focus
>> has been considered in the context of Rings, but groups are fine too.
>> Let me know if this doesn't work for you.
>>
>>
>> from sage.groups.group import AbelianGroup
>> from sage.structure.element import AdditiveGroupElement
>>
>> class MyAbelianGroup(AbelianGroup):
>> def __call__(self, n):
>> return MyAdditiveGroupElement(self, n)
>>
>> class MyAdditiveGroupElement(AdditiveGroupElement):
>> def __init__(self, parent, n):
>> AdditiveGroupElement.__init__(self, parent)
>> self.n = n
>> def __repr__(self):
>> return "My(%s)" % self.n
>> def _add_(left, right):
>> # Guaranteed left and right have the same parent.
>> return MyAdditiveGroupElement(left.parent(), left.n +  
>> right.n)
>> def _rmul_(self, a):
>> # Guaranteed a is in the basering (probably ZZ)
>> return MyAdditiveGroupElement(self.parent(), self.n * a)
>> def _lmul_(self, a):
>> # Guaranteed a is in the basering (probably ZZ)
>> return self._rmul_(a) # should this be a default?
>>
>>
>> sage: G = MyAbelianGroup()
>> sage: G.base_ring()
>> Integer Ring
>> sage: G(3) + G(9)
>> My(12)
>> sage: 7*G(3)
>> My(21)
>> sage: G(2)*5
>> My(10)
>> sage: sum([G(2), G(3), G(7)])
>> My(12)
>> sage: G(55) * int(4)
>> My(220)
>>
>>
>> One thing that mystifies me is that I though repeated doubling was
>> supposed to be provided by default if neither _rmul_ nor _lmul_ were
>> provided. I'll have to look at this, but it's orthogonal to what you
>> are trying to do.
>>
>> - Robert
>>
>>
>>>
>>
>
> >


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 3.1.2.alpha2 released

2008-08-29 Thread John Cremona

Build reports for 3.1.2.alpha2

32-bit still running

64-bit on
Linux version 2.6.18.8-0.3-default ([EMAIL PROTECTED]) (gcc version
4.1.2 20061115 (prerelease) (SUSE Linux)) #1 SMP Tue Apr 17 08:42:35
UTC 2007

Build ok, one doctest failed:  sage -t  devel/sage/sage/interfaces/octave.py

Details: (it appears that this machine does not have octave, but
surely "-testall" should be able to detect that instead of failing?

sage -t  devel/sage/sage/interfaces/octave.py
**
File "/home/jec/sage-3.1.2.alpha2/tmp/octave.py", line 279:
sage: octave.set('x', '2') #optonal -- requires Octave
Exception raised:
Traceback (most recent call last):
  File "/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/doctest.py",
line 1228, in __run
compileflags, 1) in test.globs
  File "", line 1, in 
octave.set('x', '2') #optonal -- requires Octave###line 279:
sage: octave.set('x', '2') #optonal -- requires Octave
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/octave.py",
line 284, in set
out = self.eval(cmd)
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 935, in eval
return '\n'.join([self._eval_line(L, **kwds) for L in
code.split('\n') if L != ''])
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 631, in _eval_line
self._start()
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/octave.py",
line 270, in _start
Expect._start(self)
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 455, in _start
self.__name, cmd, self._install_hints())
RuntimeError: Unable to start octave because the command 'octave
--no-line-editing --silent' failed.

You must get the program "octave" in order to use Octave
from SAGE.   You can read all about Octave at
http://www.gnu.org/software/octave/

LINUX / WINDOWS (colinux):
   Do apt-get install octave as root on your machine
   (or, in Windows, in the colinux console).

OS X:
   * This website has links to binaries for OS X PowerPC
 and OS X Intel builds of the latest version of Octave:
 http://hpc.sourceforge.net/
 Once you get the tarball from there, go to the / directory
 and type
 tar zxvf octave-intel-bin.tar.gz
 to extract it to usr/local/...   Make sure /usr/local/bin
 is in your PATH.  Then type "octave" and verify that
 octave starts up.
   * Darwin ports and fink have Octave as well.

**
File "/home/jec/sage-3.1.2.alpha2/tmp/octave.py", line 293:
sage: octave.set('x', '2') #optonal -- requires Octave
Exception raised:
Traceback (most recent call last):
  File "/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/doctest.py",
line 1228, in __run
compileflags, 1) in test.globs
  File "", line 1, in 
octave.set('x', '2') #optonal -- requires Octave###line 293:
sage: octave.set('x', '2') #optonal -- requires Octave
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/octave.py",
line 284, in set
out = self.eval(cmd)
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 935, in eval
return '\n'.join([self._eval_line(L, **kwds) for L in
code.split('\n') if L != ''])
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 631, in _eval_line
self._start()
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/octave.py",
line 270, in _start
Expect._start(self)
  File 
"/home/jec/sage-3.1.2.alpha2/local/lib/python2.5/site-packages/sage/interfaces/expect.py",
line 455, in _start
self.__name, cmd, self._install_hints())
RuntimeError: Unable to start octave because the command 'octave
--no-line-editing --silent' failed.

You must get the program "octave" in order to use Octave
from SAGE.   You can read all about Octave at
http://www.gnu.org/software/octave/

LINUX / WINDOWS (colinux):
   Do apt-get install octave as root on your machine
   (or, in Windows, in the colinux console).

OS X:
   * This website has links to binaries for OS X PowerPC
 and OS X Intel builds of the latest version of Octave:
 http://hpc.sourceforge.net/
 Once you get the tarball from there, go to the 

[sage-devel] Re: python binding for nauty in optional spkg

2008-08-29 Thread Carl Witty

On Aug 28, 7:19 pm, "Stephen Hartke" <[EMAIL PROTECTED]> wrote:
> My understanding is that nauty is not intended to be built into a library,
> and hence this is why -fPIC is not used.  Is there any reason to not use
> -fPIC for a statically linked executable (as nauty is normally used)?

Code compiled with -fPIC has a performance penalty.  I don't remember
all the sources of the penalty, but part of it is that access to
global variables becomes more expensive, and one extra register is
used (this is quite painful on 32-bit x86, which has only 6 or 7
available general-purpose registers).

You could try compiling nauty with and without -fPIC on 32-bit x86 and
see how bad the performance loss is.  (If the bottlenecks in the code
use a small number of registers and don't use global variables, then
the performance loss could be negligible.)

Carl

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Additive Groups

2008-08-29 Thread Nils Skoruppa

On 29 Aug., 11:55, mabshoff <[EMAIL PROTECTED]> wrote:

>
> Out of curiosity: Do you plan to submit the code to Sage eventually?
>
> Cheers,
>
> Michael

Hi Michael,

yes, I shall definitely do so within the next weeks.

---Nils
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 3.1.2.alpha2 released

2008-08-29 Thread mabshoff



On Aug 29, 7:09 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
> Build reports for 3.1.2.alpha2

Hi John,

> 32-bit still running
>
> 64-bit on
> Linux version 2.6.18.8-0.3-default ([EMAIL PROTECTED]) (gcc version
> 4.1.2 20061115 (prerelease) (SUSE Linux)) #1 SMP Tue Apr 17 08:42:35
> UTC 2007
>
> Build ok, one doctest failed:  sage -t  devel/sage/sage/interfaces/octave.py
>
> Details: (it appears that this machine does not have octave, but
> surely "-testall" should be able to detect that instead of failing?
>
> sage -t  devel/sage/sage/interfaces/octave.py
> **
> File "/home/jec/sage-3.1.2.alpha2/tmp/octave.py", line 279:
>     sage: octave.set('x', '2') #optonal -- requires Octave

Notice "optonal" - this needs to be "optional". That is now #3992 and
I will likely post the trivial patch that fixes this in 3 minutes.

Thanks for testing - let's hope 32 bit goes well, too.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 3.1.2.alpha2 released

2008-08-29 Thread John Cremona

2008/8/29 mabshoff <[EMAIL PROTECTED]>:
>
>
>
> On Aug 29, 7:09 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
>> Build reports for 3.1.2.alpha2
>
> Hi John,
>
>> 32-bit still running
>>

> Thanks for testing - let's hope 32 bit goes well, too.
>

The following tests failed:


sage -t  devel/sage/sage/stats/hmm/chmm.pyx
sage -t  devel/sage/sage/stats/hmm/hmm.pyx
sage -t  devel/sage/sage/matrix/matrix_mod2_dense.pyx
sage -t  devel/sage/sage/interfaces/octave.py


The first three are the same as in alpha1, and the last you know about!

John

> Cheers,
>
> Michael
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 3.1.2.alpha2 released

2008-08-29 Thread mabshoff



On Aug 29, 10:16 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
> 2008/8/29 mabshoff <[EMAIL PROTECTED]>:

Hi John,

> > Thanks for testing - let's hope 32 bit goes well, too.
>
> The following tests failed:
>
>         sage -t  devel/sage/sage/stats/hmm/chmm.pyx
>         sage -t  devel/sage/sage/stats/hmm/hmm.pyx

Ok, those two will hopefully be resolved today.

>         sage -t  devel/sage/sage/matrix/matrix_mod2_dense.pyx

Malb has a patch coming for this, but Robert also seems to be working
on matrix hashing - so we will see how it goes.

>         sage -t  devel/sage/sage/interfaces/octave.py

Patch is up at #3992 and should be trivial to review.

> The first three are the same as in alpha1, and the last you know about!
>
> John

Cheers,

Michael

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 3.1.2.alpha2 released

2008-08-29 Thread John Cremona

The patch as #3992 has a positive review now.

John

2008/8/29 mabshoff <[EMAIL PROTECTED]>:
>
>
>
> On Aug 29, 10:16 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
>> 2008/8/29 mabshoff <[EMAIL PROTECTED]>:
>
> Hi John,
>
>> > Thanks for testing - let's hope 32 bit goes well, too.
>>
>> The following tests failed:
>>
>> sage -t  devel/sage/sage/stats/hmm/chmm.pyx
>> sage -t  devel/sage/sage/stats/hmm/hmm.pyx
>
> Ok, those two will hopefully be resolved today.
>
>> sage -t  devel/sage/sage/matrix/matrix_mod2_dense.pyx
>
> Malb has a patch coming for this, but Robert also seems to be working
> on matrix hashing - so we will see how it goes.
>
>> sage -t  devel/sage/sage/interfaces/octave.py
>
> Patch is up at #3992 and should be trivial to review.
>
>> The first three are the same as in alpha1, and the last you know about!
>>
>> John
>
> Cheers,
>
> Michael
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] real/complex roots and embeddings

2008-08-29 Thread John Cremona

If f is a real polynomial then f.roots(RR) gives the real roots, and
f.roots(CC) gives the complex (including real) roots.  Is there a
fool-proof way of getting at the non-real roots?  (You may assume that
the coefficients of f are exact, perhaps they are rationals, so the
questions is certainly well-defined.)

I needed this recently and came up with the bad solution:  compute
both f.roots(RR) and f.roots(CC), remove the former from the latter,
and keep on doubling the precision until I got the irght number (which
was not hard to determine in advance as deg(f) was 3).

But now I need it again in the context of K.embeddings(L) for  K a
number field.  With L=RR it gives the real embeddings, and with K=CC
it gives the real-and-complex embeddings, all of which have codomain
CC even if they are actually real.  But in my code I need to treat
real embeddings differently from complex ones!  I cannot be the first
person to need this.

By the way, Magma has RealEmbeddings(a) for an algebraic number a and
also Conjugates(a) which gives all the embeddings (as complex numbers
even if they are real), which is no better, and inconsistently named.

If anyone has any ideas I would be interested to hear.

John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: real/complex roots and embeddings

2008-08-29 Thread Nick Alexander


On 29-Aug-08, at 11:47 AM, John Cremona wrote:

>
> If f is a real polynomial then f.roots(RR) gives the real roots, and
> f.roots(CC) gives the complex (including real) roots.  Is there a
> fool-proof way of getting at the non-real roots?  (You may assume that
> the coefficients of f are exact, perhaps they are rationals, so the
> questions is certainly well-defined.)
>
> But now I need it again in the context of K.embeddings(L) for  K a
> number field.

With a little work, Carl Witty's marvelous QQbar implementation could  
help.  His code will do the "doubling precision" part for you, and you  
can ask if any particular root is real -- but I found some bugs doing  
this, shown below.

Also, you could probably be certain that roots(QQbar) - roots(AA)  
would work.

Nick

{{{
sage: t = (ZZ['x'].0^2 - 2).roots(QQbar)[0][0]
sage: t.real()
[-1.4142135623730952 .. -1.4142135623730949]
sage: t.real() == t
---
AttributeErrorTraceback (most recent call  
last)

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/ in ()

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/element.pyx in  
sage.structure.element.Element.__richcmp__ (sage/structure/element.c: 
4819)()

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/element.pyx in  
sage.structure.element.Element._richcmp (sage/structure/element.c:4404) 
()

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/element.pyx in  
sage.structure.element.Element._richcmp_ (sage/structure/element.c: 
4255)()

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/element.pyx in  
sage.structure.element.Element._richcmp (sage/structure/element.c:4714) 
()

/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/ 
rings/qqbar.py in __cmp__(self, other)
2444 """
2445 if self is other: return 0
-> 2446 rcmp = cmp(self.real(), other.real())
2447 if rcmp != 0:
2448 return rcmp

/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/ 
rings/qqbar.py in real(self)
2680
2681 def real(self):
-> 2682 return AlgebraicReal(self._descr.real(self))
2683
2684 def imag(self):

/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/ 
rings/qqbar.py in real(self, n)
1805
1806 def real(self, n):
-> 1807 if self.is_complex():
1808 return ANUnaryExpr(n, 'real')
1809 else:

AttributeError: 'ANUnaryExpr' object has no attribute 'is_complex'
sage: t.is_complex()
---
AttributeErrorTraceback (most recent call  
last)

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/ in ()

AttributeError: 'AlgebraicNumber' object has no attribute 'is_complex'
sage: t
[-1.4142135623730952 .. -1.4142135623730949]
sage: t.real()
[-1.4142135623730952 .. -1.4142135623730949]
sage: t.complex()
---
AttributeErrorTraceback (most recent call  
last)

/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/ in ()

AttributeError: 'AlgebraicNumber' object has no attribute 'complex'
sage: t.imag()
[0.0 .. 0.0]
sage: t.imag() == 0
True
}}}

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: real/complex roots and embeddings

2008-08-29 Thread Carl Witty

On Aug 29, 11:47 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
> If f is a real polynomial then f.roots(RR) gives the real roots, and
> f.roots(CC) gives the complex (including real) roots.  Is there a
> fool-proof way of getting at the non-real roots?  (You may assume that
> the coefficients of f are exact, perhaps they are rationals, so the
> questions is certainly well-defined.)

You can do f.roots(QQbar), and then go through the roots and check
r.imag()!=0 (this is an exact computation).

> But now I need it again in the context of K.embeddings(L) for  K a
> number field.  With L=RR it gives the real embeddings, and with K=CC
> it gives the real-and-complex embeddings, all of which have codomain
> CC even if they are actually real.  But in my code I need to treat
> real embeddings differently from complex ones!  I cannot be the first
> person to need this.

Again, you can do K.embeddings(QQbar) and then check the imaginary
part of the image of the generator.

Unfortunately, this may be much slower than the corresponding call to
f.roots(QQbar), because of technical details in the implementation
of .embeddings() (it sorts the roots of the polynomial; over QQbar,
this sorting involves a lot of exact computation to prove that the
real parts of conjugate pairs are actually equal).

Carl
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: real/complex roots and embeddings

2008-08-29 Thread Carl Witty

On Aug 29, 12:02 pm, Nick Alexander <[EMAIL PROTECTED]> wrote:
> With a little work, Carl Witty's marvelous QQbar implementation could  
> help.  His code will do the "doubling precision" part for you, and you  
> can ask if any particular root is real -- but I found some bugs doing  
> this, shown below.
...
> {{{
> sage: t = (ZZ['x'].0^2 - 2).roots(QQbar)[0][0]
> sage: t.real()
> [-1.4142135623730952 .. -1.4142135623730949]
> sage: t.real() == t
> ---
> AttributeError                            Traceback (most recent call  
> last)

This bug was fixed in Sage 3.1.

Carl

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: real/complex roots and embeddings

2008-08-29 Thread John Cremona

Thanks, Nick and Carl, that is very helpful!

Now I am not sure whether to use QQbar just to determine which
embeddings are (and are not) real, and then revert to
RealField(precision) and ComplexField(Precision);  or whether to try
to do everything using QQbar.  That sounds worth a try, despite Carl's
warning about comparing real parts.

John

2008/8/29 Carl Witty <[EMAIL PROTECTED]>:
>
> On Aug 29, 11:47 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
>> If f is a real polynomial then f.roots(RR) gives the real roots, and
>> f.roots(CC) gives the complex (including real) roots.  Is there a
>> fool-proof way of getting at the non-real roots?  (You may assume that
>> the coefficients of f are exact, perhaps they are rationals, so the
>> questions is certainly well-defined.)
>
> You can do f.roots(QQbar), and then go through the roots and check
> r.imag()!=0 (this is an exact computation).
>
>> But now I need it again in the context of K.embeddings(L) for  K a
>> number field.  With L=RR it gives the real embeddings, and with K=CC
>> it gives the real-and-complex embeddings, all of which have codomain
>> CC even if they are actually real.  But in my code I need to treat
>> real embeddings differently from complex ones!  I cannot be the first
>> person to need this.
>
> Again, you can do K.embeddings(QQbar) and then check the imaginary
> part of the image of the generator.
>
> Unfortunately, this may be much slower than the corresponding call to
> f.roots(QQbar), because of technical details in the implementation
> of .embeddings() (it sorts the roots of the polynomial; over QQbar,
> this sorting involves a lot of exact computation to prove that the
> real parts of conjugate pairs are actually equal).
>
> Carl
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: virtual box

2008-08-29 Thread bnewbold

I got pretty frustrated setting up vmware (workstation, have a license
through school) under Ubuntu linux for the purpose of building a
FreeBSD development image; lots of license issues, networking was a
pain to configure, and eventually I gave up after spending too many
weekend hours on it.

I'd be interested in trying VirtualBox OSE though, would that be an
acceptable alternative for development images? My tolerance for pain
is much higher for open source applications.

FWIW, i'd still be happy to configure a FreeBSD development
environment if somebody else gets it set up somewhere I can log in to.
I'd also be willing to give one or two trusted developers logins to my
snappy well connected freebsd 6.3 box for development. The MIT student
information processing board is also working on providing large
numbers of virtual machines to students for any purpose, once that
project stabilizes I can try setting up a hosted image there.

-bryan
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: real/complex roots and embeddings

2008-08-29 Thread Carl Witty

On Aug 29, 12:28 pm, "John Cremona" <[EMAIL PROTECTED]> wrote:
> Thanks, Nick and Carl, that is very helpful!
>
> Now I am not sure whether to use QQbar just to determine which
> embeddings are (and are not) real, and then revert to
> RealField(precision) and ComplexField(Precision);  or whether to try
> to do everything using QQbar.  That sounds worth a try, despite Carl's
> warning about comparing real parts.

Computing in QQ[alpha], where alpha is some algebraic number, should
be at most a (large) constant factor slower in QQbar than in the
corresponding number field; so if this is what you're doing, I'd
definitely give QQbar a try.

The problem is that the sorting involves computation in
QQ[alpha,beta], where alpha and beta are two different roots of the
polynomial; QQbar is not very fast at computing the compositum of
number fields.  (I would be happy for somebody to take a look at it;
I'm using Pari to do the computation, but perhaps there's a faster
method.)

Carl

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Sage on french TV

2008-08-29 Thread Philippe Saade

Hi dev team,

Some of you know that wednesday and thursday i made an official
presentation of Sage at the Maths' Teachers' Summer School (French
Educational System).

Notebook ended up on TV (well 3 seconds) i my respectable person too :-)

If you want to have a look at it :
http://jt.france3.fr/regions/popup.php?id=c63a_1920
(you can start playing the video at 05'06'' )
They don't mention Sage but it's funny to see the notebook !!

I'll tell you more in few hours.

Regards
Philippe

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread Jaap Spies

Philippe Saade wrote:
> Hi dev team,
> 
> Some of you know that wednesday and thursday i made an official
> presentation of Sage at the Maths' Teachers' Summer School (French
> Educational System).
> 
> Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
> 
> If you want to have a look at it :
> http://jt.france3.fr/regions/popup.php?id=c63a_1920
> (you can start playing the video at 05'06'' )

Windows only? :-( !?

Jaap


> They don't mention Sage but it's funny to see the notebook !!
> 
> I'll tell you more in few hours.
> 
> Regards
> Philippe
> 
> > 
> 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: virtual box

2008-08-29 Thread mabshoff

On Aug 29, 12:31 pm, bnewbold <[EMAIL PROTECTED]> wrote:

Hi,

> I got pretty frustrated setting up vmware (workstation, have a license
> through school) under Ubuntu linux for the purpose of building a
> FreeBSD development image; lots of license issues, networking was a
> pain to configure, and eventually I gave up after spending too many
> weekend hours on it.
>
> I'd be interested in trying VirtualBox OSE though, would that be an
> acceptable alternative for development images? My tolerance for pain
> is much higher for open source applications.
>
> FWIW, i'd still be happy to configure a FreeBSD development
> environment if somebody else gets it set up somewhere I can log in to.
> I'd also be willing to give one or two trusted developers logins to my
> snappy well connected freebsd 6.3 box for development. The MIT student
> information processing board is also working on providing large
> numbers of virtual machines to students for any purpose, once that
> project stabilizes I can try setting up a hosted image there.
>
> -bryan

There are FreeBSD VMWare images out there - for example
http://www.thoughtpolice.co.uk/vmware/. I have been playing with one
of them (6.2 based), but the port I have been doing will likely be
based on the latest release, i.e. 7. The fixes for 6.x are minor AFAIK
and patches are always welcome :)

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread mabshoff



On Aug 29, 2:34 pm, Jaap Spies <[EMAIL PROTECTED]> wrote:
> Philippe Saade wrote:
> > Hi dev team,
>
> > Some of you know that wednesday and thursday i made an official
> > presentation of Sage at the Maths' Teachers' Summer School (French
> > Educational System).
>
> > Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
>
> > If you want to have a look at it :
> >http://jt.france3.fr/regions/popup.php?id=c63a_1920
> > (you can start playing the video at 05'06'' )
>
> Windows only? :-( !?

It is Windows Media Player that is to blame here. Given enough spare
time one can use open source tools to get it to play, but it would be
easier if someone grabbed the stream and converted it to something
saner.

> Jaap
>
> > They don't mention Sage but it's funny to see the notebook !!
>
> > I'll tell you more in few hours.

Cool.

> > Regards
> > Philippe

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread Philippe Saade

On Sat, Aug 30, 2008 at 12:53 AM, mabshoff <[EMAIL PROTECTED]> wrote:
>
>
>
> On Aug 29, 2:34 pm, Jaap Spies <[EMAIL PROTECTED]> wrote:
>> Philippe Saade wrote:
>> > Hi dev team,
>>
>> > Some of you know that wednesday and thursday i made an official
>> > presentation of Sage at the Maths' Teachers' Summer School (French
>> > Educational System).
>>
>> > Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
>>
>> > If you want to have a look at it :
>> >http://jt.france3.fr/regions/popup.php?id=c63a_1920
>> > (you can start playing the video at 05'06'' )
>>
>> Windows only? :-( !?
>
Yep.

I'am sorry about that. I had to use my wife's computer to see the
video... French TV don't care a lot about non-windows plateform
I'll try to send a snapshot tomorrow

Philippe

> It is Windows Media Player that is to blame here. Given enough spare
> time one can use open source tools to get it to play, but it would be
> easier if someone grabbed the stream and converted it to something
> saner.
>
>> Jaap
>>
>> > They don't mention Sage but it's funny to see the notebook !!
>>
>> > I'll tell you more in few hours.
>
> Cool.
>
>> > Regards
>> > Philippe
>
> Cheers,
>
> Michael
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread David Joyner

On Fri, Aug 29, 2008 at 5:34 PM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> Philippe Saade wrote:
>> Hi dev team,
>>
>> Some of you know that wednesday and thursday i made an official
>> presentation of Sage at the Maths' Teachers' Summer School (French
>> Educational System).
>>
>> Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
>>
>> If you want to have a look at it :
>> http://jt.france3.fr/regions/popup.php?id=c63a_1920
>> (you can start playing the video at 05'06'' )
>
> Windows only? :-( !?

Seemed to display fine on my macbook.
Wish I understood French better but I could see what looked like
several laptops displaying a Sage notebook session.

Thanks for the link and congratulations Phillippe!

>
> Jaap
>
>
>> They don't mention Sage but it's funny to see the notebook !!
>>
>> I'll tell you more in few hours.
>>
>> Regards
>> Philippe
>>
>> >
>>
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] reopening Sage - Blender discussion

2008-08-29 Thread Philippe Saade

Hi,

after many discussion with Sage potential users (this week, around
me), i get convinced that it would be great to use Blender Python APi
to rendre 3D scenes and animations.

I have done some 3D animations few years ago with Blender (all of
science facts, so mostly computed mesh) and even if the learning of
the API sometimes was hard, the result was really satisfactory to me.


Has anybody an opinion on that ?

Philippe

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: reopening Sage - Blender discussion

2008-08-29 Thread Carl Witty

On Aug 29, 4:36 pm, "Philippe Saade" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> after many discussion with Sage potential users (this week, around
> me), i get convinced that it would be great to use Blender Python APi
> to rendre 3D scenes and animations.
>
> I have done some 3D animations few years ago with Blender (all of
> science facts, so mostly computed mesh) and even if the learning of
> the API sometimes was hard, the result was really satisfactory to me.
>
> Has anybody an opinion on that ?

I think it would be great to have an optional Blender spkg, and some
code in the Sage library to facilitate working with the API from
within Sage (for instance, a Blender backend for plot3d).

Once we got some experience with this, we could talk about making
Blender a standard part of Sage, but I doubt if we'd do that...
Blender is awfully big (the Debian package is more than 20 megabytes).

Unfortunately, I don't have any time to work on this project.

Carl

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: reopening Sage - Blender discussion

2008-08-29 Thread mabshoff



On Aug 29, 4:52 pm, Carl Witty <[EMAIL PROTECTED]> wrote:
> On Aug 29, 4:36 pm, "Philippe Saade" <[EMAIL PROTECTED]> wrote:
>
> > Hi,

Hi,

> > after many discussion with Sage potential users (this week, around
> > me), i get convinced that it would be great to use Blender Python APi
> > to rendre 3D scenes and animations.
>
> > I have done some 3D animations few years ago with Blender (all of
> > science facts, so mostly computed mesh) and even if the learning of
> > the API sometimes was hard, the result was really satisfactory to me.
>
> > Has anybody an opinion on that ?
>
> I think it would be great to have an optional Blender spkg, and some
> code in the Sage library to facilitate working with the API from
> within Sage (for instance, a Blender backend for plot3d).
>
> Once we got some experience with this, we could talk about making
> Blender a standard part of Sage, but I doubt if we'd do that...
> Blender is awfully big (the Debian package is more than 20 megabytes).

Hehe, jmol isn't exactly lightweight either, but I agree with Carl
here. In the future of Sage I see a core that people will start
building distribution like packages around, i.e. Sage for Physicists
for example.

> Unfortunately, I don't have any time to work on this project.

Fortunately there are Blender Python bindings - see

http://www.blender.org/documentation/245PythonDoc/API_intro-module.html

> Carl

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] About my presentation in France

2008-08-29 Thread Philippe Saade

Hi again,

to sum up the two days i spent at the Maths' Teachers' Summer School,
i must say that my presentation of Sage produced mainly two reactions
(understand : AND, not XOR) :
** real interest in the Software because of it's potentialities.
People were willing to use it.
** real need of tutorials and ready to use worksheet with well
documented "used case".

Here are some of the fonctionalities that are asked for :

** Help page in french, and of different/selectable level
** the possibility of restricting available commands (for use in
classroom) (some kind of 'profile')
** real CMS functionality (why doesn't Sage use Zope as a whole ? ZODB
are fine but Zope would nicely manage authentication, roles,
templating, etc)
** a 3D animation module
** some type issues are hard to understand for beginners (a command
giving back a float not considered as a Sage Real, etc...). It is hard
to get a complete view of the types used by Sage and "what goes where
and when"
** Definitely, a rich tutorials site in french, with step by step
explainations for on topic at a time.

For that last point, i believe it would be nice to have a script that
transforms a worksheet into an HTML document, not using any Table
layout but structured in such a way that it would be possible (with
CSS rules) to fix a two column presentation (as in the quicktour part
of sagemath.org) or a one column presentation.


Some people asked me if Sage would include GIAC. I'll read all the
thread about GIAC on this list before saying more.


Last but not least : most people were impressed by the quality of
conception and the vast amount of maths topics covered by Sage.
That's because of YOU.

I thank you in there name.

P.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: reopening Sage - Blender discussion

2008-08-29 Thread mhampton

I've been playing around with learning blender, with the idea of
animating some 4-D projection/rotations of polytopes into 3D.  But all
I really want is a nice compressed animation/movie format, and it
seems like there should be a lighter-weight way to do that.  If I come
up with anything worth sharing I will submit it.

Cheers,
Marshall Hampton

On Aug 29, 6:58 pm, mabshoff <[EMAIL PROTECTED]> wrote:
> On Aug 29, 4:52 pm, Carl Witty <[EMAIL PROTECTED]> wrote:
>
> > On Aug 29, 4:36 pm, "Philippe Saade" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> Hi,
>
>
>
> > > after many discussion with Sage potential users (this week, around
> > > me), i get convinced that it would be great to use Blender Python APi
> > > to rendre 3D scenes and animations.
>
> > > I have done some 3D animations few years ago with Blender (all of
> > > science facts, so mostly computed mesh) and even if the learning of
> > > the API sometimes was hard, the result was really satisfactory to me.
>
> > > Has anybody an opinion on that ?
>
> > I think it would be great to have an optional Blender spkg, and some
> > code in the Sage library to facilitate working with the API from
> > within Sage (for instance, a Blender backend for plot3d).
>
> > Once we got some experience with this, we could talk about making
> > Blender a standard part of Sage, but I doubt if we'd do that...
> > Blender is awfully big (the Debian package is more than 20 megabytes).
>
> Hehe, jmol isn't exactly lightweight either, but I agree with Carl
> here. In the future of Sage I see a core that people will start
> building distribution like packages around, i.e. Sage for Physicists
> for example.
>
> > Unfortunately, I don't have any time to work on this project.
>
> Fortunately there are Blender Python bindings - see
>
> http://www.blender.org/documentation/245PythonDoc/API_intro-module.html
>
> > Carl
>
> Cheers,
>
> Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread Philippe Saade

On Sat, Aug 30, 2008 at 1:31 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> On Fri, Aug 29, 2008 at 5:34 PM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>>
>> Philippe Saade wrote:
>>> Hi dev team,
>>>
>>> Some of you know that wednesday and thursday i made an official
>>> presentation of Sage at the Maths' Teachers' Summer School (French
>>> Educational System).
>>>
>>> Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
>>>
>>> If you want to have a look at it :
>>> http://jt.france3.fr/regions/popup.php?id=c63a_1920
>>> (you can start playing the video at 05'06'' )
>>
>> Windows only? :-( !?
>
> Seemed to display fine on my macbook.
> Wish I understood French better but I could see what looked like
> several laptops displaying a Sage notebook session.
>
> Thanks for the link and congratulations Phillippe!
>

Thanks.
I forgot to say that Thierry Dumont provided me a public Sage server
(he had to reinstall after a disk crash the day befor my talk) and
that without his help my workshop would have been less convincing !


>>
>> Jaap
>>
>>
>>> They don't mention Sage but it's funny to see the notebook !!
>>>
>>> I'll tell you more in few hours.
>>>
>>> Regards
>>> Philippe
>>>
>>> >

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: reopening Sage - Blender discussion

2008-08-29 Thread root

>I've been playing around with learning blender, with the idea of
>animating some 4-D projection/rotations of polytopes into 3D.  But all
>I really want is a nice compressed animation/movie format, and it
>seems like there should be a lighter-weight way to do that.  If I come
>up with anything worth sharing I will submit it.

There are 3 french professors who have done an amazing job at 
4D polytope projections. See:



Tim

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage on french TV

2008-08-29 Thread François Bissey

On Sat, 30 Aug 2008, Jaap Spies wrote:
> Philippe Saade wrote:
> > Hi dev team,
> >
> > Some of you know that wednesday and thursday i made an official
> > presentation of Sage at the Maths' Teachers' Summer School (French
> > Educational System).
> >
> > Notebook ended up on TV (well 3 seconds) i my respectable person too :-)
> >
> > If you want to have a look at it :
> > http://jt.france3.fr/regions/popup.php?id=c63a_1920
> > (you can start playing the video at 05'06'' )
>
> Windows only? :-( !?
>
Mplayer plug-in didn't like it but copying the url and feeding it to mplayer 
on the command line worked fine:
mms://a988.v101995.c10199.e.vm.akamaistream.net/7/988/10199/3f97c7e6/ftvigrp.download.akamai.com/10199/horsgv/regions/raa/HD_1900_clermont_jtregional_290808.wmv
Mind you we are talking about regional French TV as well here, not national.
Still cool.

Francois

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Reveiews, Reviews, Reviews for Sage 3.1.2.rc0

2008-08-29 Thread mabshoff

Hello folks,

rc0 will hopefully be release tomorrow after the Doc Day finished.
There will probably be a alpha3 late tonight, but we will see about
that.

Either way: there are around 40 tickets with patches awaiting review.
Reviews have been going well and the turnover of those tickets is
usually fast so that none of them lingers too long in the que.

What concerns me to some extend is the growing number of tickets at
report 12, i.e. "needs work":

   http://trac.sagemath.org/sage_trac/report/12

There are around 30 tickets there, some of them quite old. So if you
have some time please come on over and resolve some of those issues.

Thanks everybody for doing a stellar job in general.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Doc Day 3: Saturday August 30th, 2008

2008-08-29 Thread mabshoff



On Aug 28, 3:43 pm, mabshoff <[EMAIL PROTECTED]> wrote:
> Hello folks,
>
> September 1st is around the corner and we wanted to hit 60% coverage
> by the end of August. The current coverage in my alpha2 merge tree is
>
>   Overall weighted coverage score:  57.2%
>   Total number of functions:  20912
>
> and Mike Hansen is writing doctests for all the expect interfaces as I
> type this message. So we wanted to get together this Saturday and
> hopefully get close to the 60% goal. I would suggest getting together
> this Saturday around 10 am PST and knock out doctest patches and get
> them reviewed and merged.
>
> Thoughts?

Hi,

this is reminder about tomorrow's Doc Day. The current alpha3 merge
tree has the following coverage

  Overall weighted coverage score:  57.8%

This is in very large part thanks to the work by Mike Hansen who has
been adding doctests mainly to the interface directory. We will likely
put out alpha3 before Doc Day, so if you are adding doctests to
something related to plotting, MV polynomials or interfaces it is
highly recommended that you upgrade to alpha3 before writing code in
that area. Most areas aside from that should be fine with 3.1.2.alpha2
or even 3.1.1.

> Cheers,
>
> Michael

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Doc Day 3: Saturday August 30th, 2008

2008-08-29 Thread Martin Albrecht

Hi there,

I've got a couple of questions about Doc Day 3. Who is attending? There 
doesn't seem to be Wiki page for it. 

Also, the last bug day was underwhelming since as far as I can tell not that 
many people showed up. I suspect this is related to the short notice with 
which these "days" are announced or even the fact that they are announced 
rather than proposed (I mean mainly the date here).

I'd therefor suggest: At least announce these "days" 2 or 3 weeks before they 
happen such that one can make plans. Also, proposing two alternative dates + 
vote on a favorite might be beneficial. This way, hopefully more people show 
up and it is more fun.

Furthermore, it might be a good idea to stress in these 
announcements/proposals that everybody is welcome. I.e. if someone wants to 
get started with Sage development but doesn't know how/when/what, this is 
his/her chance to get any question about Sage answered in realtime. 


Thoughts?
Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Doc Day 3: Saturday August 30th, 2008

2008-08-29 Thread mabshoff



On Aug 29, 7:42 pm, Martin Albrecht <[EMAIL PROTECTED]>
wrote:
> Hi there,

Hi Martin,

> I've got a couple of questions about Doc Day 3. Who is attending? There
> doesn't seem to be Wiki page for it.

At least William, Mike Hansen, rlm and me will meet physically in
Seattle. We will probably do a wiki page in the next couple hours. The
Doc Day grew out of the motivation to achieve the 60% goal for
doctests that William set a while back.

> Also, the last bug day was underwhelming since as far as I can tell not that
> many people showed up. I suspect this is related to the short notice with
> which these "days" are announced or even the fact that they are announced
> rather than proposed (I mean mainly the date here).

Yes, I agree with 100% and you did raise the issue in IRC, too, so I
did not forget. It has been noticeable that the more short term *Days
have had fewer people attend, but these days the usual suspects get
together in IRC anyway before a release and/or on Saturdays.

> I'd therefor suggest: At least announce these "days" 2 or 3 weeks before they
> happen such that one can make plans. Also, proposing two alternative dates +
> vote on a favorite might be beneficial. This way, hopefully more people show
> up and it is more fun.

I agree. We should probably plan to do a Bug Day the Saturday in two
weeks then.

> Furthermore, it might be a good idea to stress in these
> announcements/proposals that everybody is welcome. I.e. if someone wants to
> get started with Sage development but doesn't know how/when/what, this is
> his/her chance to get any question about Sage answered in realtime.

Absolutely - we should probably come up with some boilerplate
announcement text that only needs the details added. Did you just
volunteer to write one? :)

> Thoughts?
> Martin

Cheers,

Michael

> --
> name: Martin Albrecht
> _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www:http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Error installing pynac

2008-08-29 Thread Jason Merrill

I tried to install pynac on OS X 10.5, but it died.  Here's an excerpt
of install.log

pynac-0.1
Machine:
Darwin jmerrill.local 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9
19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
Deleting directories from past builds of previous/current versions of
pynac-0.1
Extracting package /Applications/sage/spkg/optional/pynac-0.1.spkg ...
-rw-r--r--  1 jm843  admin  268 Aug 26 23:14 /Applications/sage/
spkg/optional/pynac-0.1.spkg
pynac-0.1/
pynac-0.1/.hg/

...

Configuration of GiNaC 1.4.3 done. Now type "make".
cd . && /bin/sh /Applications/sage/spkg/build/pynac-0.1/src/missing --
run autoheader
aclocal.m4:14: error: this file was generated for autoconf 2.61.
You have another version of autoconf.  If you want to use that,
you should regenerate the build system entirely.
aclocal.m4:14: the top level
autom4te: /opt/local/bin/gm4 failed with exit status: 63
autoheader: '/opt/local/bin/autom4te' failed with exit status: 63
make: *** [config.h.in] Error 1
Error building ginac.

I guess the important bit is "you have another version of autoconf,"
but I don't know what I should do about it.  My thanks for any advice.

JM
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] calling sage from mathematica

2008-08-29 Thread Amir

I talked briefly with William at Scipy2008 about being able to call
sage from mathematica. He said it would be useful. I don't have much
experience with python and none with sage and cython beside the nice
tutorials at the conference. I wanted to get your input on how I
should proceed. Most of my work is numerical so I wanted to take
advantage of the new cython numpy interface in Cython-0.9.8.1.1 to
call scipy functions.

To check how hard it would be to start, I implemented the mathlink toy
example addtwo with the slow socket interface:

EXAMPLES:
sage: args = ['','-linkcreate','-linkprotocol','TCPIP']
sage: import addtwo
sage: addtwo.ml_main(args)
Link created on: [EMAIL PROTECTED],[EMAIL PROTECTED]
(sage session hangs)

In Mathematica,
In[1]:= link =
LinkConnect["[EMAIL PROTECTED],[EMAIL PROTECTED]",
   LinkProtocol -> "TCPIP"];
In[2]:= Install[link]
In[3]:= AddTwo[1, 1]
Out[3]:= 2
In[4]:= Uninstall[link]
(sage session returns)

Here's some code: http://connes.berkeley.edu/~amir/sage/mlink.tar.gz

It requires makefile and setup.py to be changed depending on your
mathematica install, then make should work.  'For any of this to work
you must buy and install the optional mathematica program'.

Thanks,
Amir

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Error installing pynac

2008-08-29 Thread mabshoff



On Aug 29, 7:57 pm, Jason Merrill <[EMAIL PROTECTED]> wrote:

Hi Jason,

> I tried to install pynac on OS X 10.5, but it died.  Here's an excerpt
> of install.log
>
> pynac-0.1
> Machine:
> Darwin jmerrill.local 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9
> 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
> Deleting directories from past builds of previous/current versions of
> pynac-0.1
> Extracting package /Applications/sage/spkg/optional/pynac-0.1.spkg ...
> -rw-r--r--  1 jm843  admin  268 Aug 26 23:14 /Applications/sage/
> spkg/optional/pynac-0.1.spkg
> pynac-0.1/
> pynac-0.1/.hg/
>
> ...
>
> Configuration of GiNaC 1.4.3 done. Now type "make".
> cd . && /bin/sh /Applications/sage/spkg/build/pynac-0.1/src/missing --
> run autoheader

This probably needs to be done once in the spkg sources before
packaging them.

> aclocal.m4:14: error: this file was generated for autoconf 2.61.
> You have another version of autoconf.  If you want to use that,
> you should regenerate the build system entirely.
> aclocal.m4:14: the top level
> autom4te: /opt/local/bin/gm4 failed with exit status: 63
> autoheader: '/opt/local/bin/autom4te' failed with exit status: 63
> make: *** [config.h.in] Error 1
> Error building ginac.
>
> I guess the important bit is "you have another version of autoconf,"
> but I don't know what I should do about it.  My thanks for any advice.

We will fix it in the spkg. We had some similar issues just now in the
gd-2.0.35.spkg.

> JM

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Vote for new spkg: gp2c

2008-08-29 Thread mabshoff

Hi,

I guess due to lack of interest we will make gp2c an optinal.spkg. I
need to investigate how that works out, but since I want to upgrade
pari anyway to the latest release I can integrate those changes needed
for gp2c in its spkg-install.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---