[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread Greg Laun
On Wednesday, September 26, 2012 5:03:15 PM UTC-4, Simon King wrote: > > Hi Greg, > > On 2012-09-26, Greg Laun > wrote: > > > > sage: matrix(GL(2),2,[1,0,0,1]) in GL(2,CC) > > True > > Do you mean "GF(2)" on the left hand side? > Ahh, yes I did mean that. > > > > > so 'in' ignores base

[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread John H Palmieri
On Wednesday, September 26, 2012 1:19:31 PM UTC-7, Greg Laun wrote: > > Whoops, gmail sent the email before I was finished. > > I think a more appropriate way to do the comparison would be to check > if self(x) == x. This is how contains is implemented in parent.pyx. > In theory this looks

[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread Simon King
On 2012-09-26, Greg Laun wrote: > --=_Part_757_16956430.1348690771123 > Content-Type: text/plain; charset=ISO-8859-1 > > Whoops, gmail sent the email before I was finished. > > I think a more appropriate way to do the comparison would be to check > if self(x) == x. This is how contains i

[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread Simon King
Hi Greg, On 2012-09-26, Greg Laun wrote: > > sage: matrix(GL(2),2,[1,0,0,1]) in GL(2,CC) > True Do you mean "GF(2)" on the left hand side? > > so 'in' ignores base ring. The problem is that __contains__ for > general_linear.pyx and special_linear.pyx only check whether a matrix can > be coer

[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread John H Palmieri
On Wednesday, September 26, 2012 1:07:31 PM UTC-7, Greg Laun wrote: > > Hi Everyone, > > I'm sorry if this has been discussed, but I can't find a discussion. I > noticed the following behavior: > > sage: matrix(GL(2),2,[1,0,0,1]) in GL(2,CC) > True > > so 'in' ignores base ring. The problem is t

[sage-devel] Re: Containment and general/special linear

2012-09-26 Thread Greg Laun
Whoops, gmail sent the email before I was finished. I think a more appropriate way to do the comparison would be to check if self(x) == x. This is how contains is implemented in parent.pyx. Any thoughts? Thanks, Greg On Wednesday, September 26, 2012 4:07:31 PM UTC-4, Greg Laun wrote: >