Re: [sage-support] Re: What's easiest way to get Sage running on Windows for non-techie students?

2010-10-10 Thread Dr. David Kirkby

On 10/10/10 04:19 AM, kcrisman wrote:


Yeah, it's still really annoying to get the VMWare itself, though, and
requires giving out semi-personal information, which is perhaps not
what one would want to get students interested in mathematical
software...

I expect students have to do the same to run their copies of Mathematica.

I doubt I'm the only person who types random collections of letters/numbers for 
name, address, phone numbers etc.


Dave

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] initial ideal

2010-10-10 Thread andrew ewart
how do i generate the initial ideal of a reduced grobner basis?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] initial ideal

2010-10-10 Thread Martin Albrecht
On Sunday 10 October 2010, andrew ewart wrote:
> how do i generate the initial ideal of a reduced grobner basis?



sage: P. = PolynomialRing(QQ)
sage: I = sage.rings.ideal.Katsura(P)
sage: gb = I.groebner_basis()
sage: J = Ideal(f.lm() for f in gb)
sage: J
Ideal (z^3, y^2, y*z, x) of Multivariate Polynomial Ring in x, y, z over 
Rational Field

Is that what you want?
Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinralbre...@jabber.ccc.de

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Array

2010-10-10 Thread Santanu Sarkar
How one can define an array of length 1?
For example an array of length 4 is X = [1, 2, 1, 3].

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: initial ideal

2010-10-10 Thread andrew ewart
hmm sage doesnt seem to recognise the Im() command

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: What's easiest way to get Sage running on Windows for non-techie students?

2010-10-10 Thread Chris Seberino
On Oct 9, 7:24 pm, Jason Grout  wrote:
> [1]http://sagemath.org/download-windows.html

That link has a WinZip'd VMWare blob that works fine.  I didn't even
read the directions...I just double clicked on binaries in the
extracted directory until a VMWare Linux virtual session appeared with
a Sage icon.

That is more than I was expecting and more than adequate.

We are all high powered computer junkies but I'm afraid my students
may get stuck on how to use WinZip and other minor details.  If no one
has made a little YouTube video I may make one on how to perform these
few minimal steps.

Great work!

Chris

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: What's easiest way to get Sage running on Windows for non-techie students?

2010-10-10 Thread Chris Seberino

> On Oct 9, 7:24 pm, Jason Grout  wrote:

Oh wait.  I see your point now.  *I* didn't have to install VMWare
because I probably installed it a long time ago.  I assumed that meant
you didn't need to install VMWare anymore.  Yeaa video would be
nice for that extra step too.

cs

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: initial ideal

2010-10-10 Thread Simon King
Hi Andrew!

On 10 Okt., 16:58, andrew ewart  wrote:
> hmm sage doesnt seem to recognise the Im() command

How do you define your polynomials? Are you sure that you *do* define
polynomials?

Examples:

1. This is a polynomial:

sage: R. = QQ[]
sage: p = x^2+3*x*y+y^3
sage: p.lm()
y^3
sage: type(p)



2. This is not a polynomial (but a symbolic expression):

sage: var('x y')
(x, y)
sage: p = x^2+3*x*y+y^3
sage: p.lm()
---
AttributeErrorTraceback (most recent call
last)
...
AttributeError: 'sage.symbolic.expression.Expression' object has no
attribute 'lm'
sage: type(p)



3. I just noticed that unfortunately there exists at least one sort of
polynomials in Sage that does not have "lm":
sage: R. = ZZ[]
sage: x.lm()
---
AttributeErrorTraceback (most recent call
last)
...
AttributeError:
'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'
object has no attribute 'lm'

%%

The latter is rather unfortunate. I consider it a bug that the
different polynomial classes in Sage do not have the same method names
for the same functionality. But if you had worked with symbolic
expressions then you should better switch to polynomials: Symbolic
expressions are not made for Gröbner theory stuff.

Regards,
Simon

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: initial ideal

2010-10-10 Thread andrew ewart
i tried to take this into consideration
giving the following code

P. = PolynomialRing(QQ,order='neglex')
I = Ideal(x^5 + y^4 +z^3, x^3 + y^2 + z^2 -1)
print I
gb=I.groebner_basis()
rgb=Ideal(gb).interreduced_basis()
bgr=Ideal(rgb)
ir=Ideal(f.Im() for f in bgr)
print 'with revlex order'
print rgb
print ir
R. = PolynomialRing(QQ,order='lex')
J = Ideal(x^5 + y^4 +z^3, x^3 + y^2 + z^2 -1)
gc=J.groebner_basis()
rgc=Ideal(gc).interreduced_basis()
cri=Ideal(rgc)
irc=Ideal(f.Im() for f in cri)
print 'with lexographic order'
print rgc
print irc

this gives output
Ideal (z^3 + y^4 + x^5, -1 + z^2 + y^2 + x^3) of Multivariate
Polynomial Ring in x, y, z over Rational Field
Traceback (most recent call last):
  File "A1Q3.py", line 10, in 
ir=Ideal(f.Im() for f in bgr)
TypeError: 'MPolynomialIdeal' object is not iterable

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Array

2010-10-10 Thread Mike Hansen
On Sun, Oct 10, 2010 at 7:26 AM, Santanu Sarkar
 wrote:
> How one can define an array of length 1?
> For example an array of length 4 is X = [1, 2, 1, 3].

In that example, you are actually defining a Python *list* rather than
an array.  If you want to create a list of length 1, one way to do
it would be to do:

X = [None]*1

Every entry in that list will be the Python object None.

--Mike

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: initial ideal

2010-10-10 Thread Simon King
Hi Andrew!

On 10 Okt., 19:25, andrew ewart  wrote:
> i tried to take this into consideration
> giving the following code
>
> P. = PolynomialRing(QQ,order='neglex')
> I = Ideal(x^5 + y^4 +z^3, x^3 + y^2 + z^2 -1)
> print I
> gb=I.groebner_basis()
> rgb=Ideal(gb).interreduced_basis()
> bgr=Ideal(rgb)
> ir=Ideal(f.Im() for f in bgr)

The first problem is ``f in bgr``:

> TypeError: 'MPolynomialIdeal' object is not iterable

... and if something is not iterable, ``f in ...`` won't work.

sage: type(bgr)


Asking ``f in bgr`` means to ask for a list of *all* elements of the
ideal (infinitely many). But in fact, you seem to be interested only
in the given list of generators of the ideal.

By construction, the list of generators of bgr is rgb, and that's a
list:
sage: type(rgb)


The second problem is that you also have a typo.

You wrote ``f.Im()``, which is ``capital i lowercase em``. You should
write ``f.lm()``, which is ``lowercase ell lowercase em``, and is an
abbreviation for ``Leading Monomial``.

Both of the following would work:
sage: ir1=Ideal(f.lm() for f in rgb)
sage: ir2=Ideal(f.lm() for f in bgr.gens())
sage: ir1
Ideal (1) of Multivariate Polynomial Ring in x, y, z over Rational
Field
sage: ir2
Ideal (1) of Multivariate Polynomial Ring in x, y, z over Rational
Field

Cheers,
Simon

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: What's easiest way to get Sage running on Windows for non-techie students?

2010-10-10 Thread fitzsnaggle
You guys can suggest Pythonxy for windows. It doesn't have all the
same modules I've heard, but it is based on scipy and numpy, and
installs as an exe. It does require a little more knowledge of python
to get started, but not much.

On Oct 10, 8:28 am, Chris Seberino  wrote:
> > On Oct 9, 7:24 pm, Jason Grout  wrote:
>
> Oh wait.  I see your point now.  *I* didn't have to install VMWare
> because I probably installed it a long time ago.  I assumed that meant
> you didn't need to install VMWare anymore.  Yeaa video would be
> nice for that extra step too.
>
> cs

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] What's easiest way to get Sage running on Windows for non-techie students?

2010-10-10 Thread Robert Bradshaw
On Sat, Oct 9, 2010 at 7:53 AM, Chris Seberino  wrote:
> What's easiest way to get Sage running on Windows for non-techie
> students?
>
> They'll be lost if the instructions are complicated.
>
> Possible to wrap a VMWare + Ubuntu + Sage blob into one big Windows
> exe file that requires no set up?

Depending on how technical you are, the easiest way by far is to set
up a Sage server for them yourself, and then all they need on their
windows boxes is a web browser and a password.

- Robert

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org