[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 4:04 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > > On May 15, 2008, at 8:21 AM, Bjake Hammersholt Roune wrote: > >>> [...] people are confused that when >>> they create a matrix with matrix(3, range(9)), for example, that the >>> echelon_form is not the rref output tha

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Robert Bradshaw
On May 15, 2008, at 8:21 AM, Bjake Hammersholt Roune wrote: >> [...] people are confused that when >> they create a matrix with matrix(3, range(9)), for example, that the >> echelon_form is not the rref output that they get from most any other >> program they have ever used [...] >> What do peopl

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Bjake Hammersholt Roune
> >> What do people think about making the default ring for matrices QQ? > > > I have no objections to making QQ the defailt ring for matrices. > > I do. That's definitely *not* the proposal. The proposal is to make the > base ring the fraction field of the canonical ring in which the list of >

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
Nils Bruin wrote: > -1. While I agree that defaulting to matrices over QQ rather than over > ZZ would lead to more expected behaviour for most users, I don't see > how the rule for changing the base ring can be made both consistent > and cheap. > > Imagine R1 = QQ[x,y]/(x^2+y^2-1). Then FieldOfFr

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread David Roe
I agree with Nick here. If we want to change the default behavior of some functions so that they work the same as over the fraction field, that's fine. But don't add a call to fraction field to the constructor. ZZ is the initial object in the category of rings. That's a good reason for it to be

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Nils Bruin
-1. While I agree that defaulting to matrices over QQ rather than over ZZ would lead to more expected behaviour for most users, I don't see how the rule for changing the base ring can be made both consistent and cheap. Imagine R1 = QQ[x,y]/(x^2+y^2-1). Then FieldOfFractions(R1) is well- defined,

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread kcrisman
> I'm not sure I understand the problem.  Here is an example session in > Sage 3.0.1.  Can you change this to illustrate what you mean? > Sorry, Jason, the example was sort of buried in my post. Here is a concise version. sage: A=matrix(QQ,3,range(9)) sage: A [0 1 2] [3 4 5] [6 7 8] sage: A.r

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
William Stein wrote: > On Thu, May 15, 2008 at 8:21 AM, Bjake Hammersholt Roune > <[EMAIL PROTECTED]> wrote: >>> [...] people are confused that when >>> they create a matrix with matrix(3, range(9)), for example, that the >>> echelon_form is not the rref output that they get from most any other >>

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
Bjake Hammersholt Roune wrote: >> [...] people are confused that when >> they create a matrix with matrix(3, range(9)), for example, that the >> echelon_form is not the rref output that they get from most any other >> program they have ever used [...] >> What do people think about making the defau

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 9:04 AM, Nick Alexander <[EMAIL PROTECTED]> wrote: > >> What do people think about making the default ring for matrices QQ? > > I'm not certain why I dislike this so much, but I vote -1. I think > it's because I understand the Sage coercion model well and since I > know wh

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Nick Alexander
> What do people think about making the default ring for matrices QQ? I'm not certain why I dislike this so much, but I vote -1. I think it's because I understand the Sage coercion model well and since I know what to expect, I appreciate my data starting at the "lowest level of the model".

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
kcrisman wrote: > > > On May 15, 10:55 am, "William Stein" <[EMAIL PROTECTED]> wrote: >> On Thu, May 15, 2008 at 7:48 AM, Jason Grout >> >> >> >> <[EMAIL PROTECTED]> wrote: >> >>> Jason Grout wrote: Based on some conversations with linear algebra people and classroom demonstrations in

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 8:21 AM, Bjake Hammersholt Roune <[EMAIL PROTECTED]> wrote: > >> [...] people are confused that when >> they create a matrix with matrix(3, range(9)), for example, that the >> echelon_form is not the rref output that they get from most any other >> program they have ever us

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 8:16 AM, kcrisman <[EMAIL PROTECTED]> wrote: > > > > On May 15, 10:55 am, "William Stein" <[EMAIL PROTECTED]> wrote: >> On Thu, May 15, 2008 at 7:48 AM, Jason Grout >> >> >> >> <[EMAIL PROTECTED]> wrote: >> >> > Jason Grout wrote: >> >> Based on some conversations with line

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 8:15 AM, didier deshommes <[EMAIL PROTECTED]> wrote: > > On Thu, May 15, 2008 at 10:48 AM, Jason Grout > <[EMAIL PROTECTED]> wrote: >> More concisely, this proposal could be worded: >> >> What do people think of making matrix() return a matrix over a field by >> default,

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
didier deshommes wrote: > On Thu, May 15, 2008 at 10:48 AM, Jason Grout > <[EMAIL PROTECTED]> wrote: >> More concisely, this proposal could be worded: >> >> What do people think of making matrix() return a matrix over a field by >> default, unless a ring is explicitly specified. The default fi

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Bjake Hammersholt Roune
> [...] people are confused that when > they create a matrix with matrix(3, range(9)), for example, that the > echelon_form is not the rref output that they get from most any other > program they have ever used [...] > What do people think about making the default ring for matrices QQ? > I have no

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread kcrisman
On May 15, 10:55 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On Thu, May 15, 2008 at 7:48 AM, Jason Grout > > > > <[EMAIL PROTECTED]> wrote: > > > Jason Grout wrote: > >> Based on some conversations with linear algebra people and classroom > >> demonstrations in a linear algebra class, peop

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread didier deshommes
On Thu, May 15, 2008 at 10:48 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > More concisely, this proposal could be worded: > > What do people think of making matrix() return a matrix over a field by > default, unless a ring is explicitly specified. The default field would > either be the fract

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Harald Schilly
On May 15, 4:20 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > matrix(3, range(9)) would yield a matrix over QQ +1 many just use integers as cheap examples but in fact use them over QQ h --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegr

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread William Stein
On Thu, May 15, 2008 at 7:48 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > Jason Grout wrote: >> Based on some conversations with linear algebra people and classroom >> demonstrations in a linear algebra class, people are confused that when >> they create a matrix with matrix(3, range(9)), for ex

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread Jason Grout
Jason Grout wrote: > Based on some conversations with linear algebra people and classroom > demonstrations in a linear algebra class, people are confused that when > they create a matrix with matrix(3, range(9)), for example, that the > echelon_form is not the rref output that they get from mos

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread mhampton
I think this is a good idea. -M. Hampton On May 15, 8:20 am, Jason Grout <[EMAIL PROTECTED]> wrote: > Based on some conversations with linear algebra people and classroom > demonstrations in a linear algebra class, people are confused that when > they create a matrix with matrix(3, range(9)), fo