[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-11-01 Thread Frédéric Chapoton
I consider that the vote is now closed. The result is 6 for AA, 3 for BB and 1 for ?A. Other people did not express a clear choice. Please now review https://trac.sagemath.org/ticket/18505, which implements the AA choice. Frédéric Le jeudi 27 octobre 2016 10:48:17 UTC+2, Frédéric Chapoton a éc

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-31 Thread Kwankyu Lee
I expect that (1) If M is not square, then there is no ".is_similar" method attached to M. (2) If M is square and N has different size, then raise an error. If False is returned in the case (2), then the user needs to make additional efforts to find the cause (either N has the same size but is

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-28 Thread Simon King
Hi John, On 2016-10-27, John H Palmieri wrote: >>The OOP way would be to have a mix-in class and subclasses for square >> matrices that implement these methods. The category's parent_class resp. element_class are such mix-in classes. >> This would mean setting the Element >> attribute in

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-28 Thread Simon King
On 2016-10-27, William Stein wrote: > On Thu, Oct 27, 2016 at 11:25 AM, kcrisman wrote: >> On Thursday, October 27, 2016 at 2:11:58 PM UTC-4, John H Palmieri wrote: >>> >>> (1) Why should a nonsquare matrix even have an "is_similar" method? Can we >>> get rid of that? (Same for "determinant" and

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-28 Thread Simon King
Hi John, On 2016-10-27, John H Palmieri wrote: > (1) Why should a nonsquare matrix even have an "is_similar" method? Can we > get rid of that? (Same for "determinant" and some other methods.) It would be possible using the category framework's "ElementMethods". x.is_similar(y) makes sense for

Re: [sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-27 Thread John H Palmieri
On Thursday, October 27, 2016 at 2:42:56 PM UTC-7, Travis Scrimshaw wrote: > > > > On Thursday, October 27, 2016 at 2:12:01 PM UTC-5, William wrote: >> >> On Thu, Oct 27, 2016 at 11:25 AM, kcrisman wrote: >> > >> > >> > On Thursday, October 27, 2016 at 2:11:58 PM UTC-4, John H Palmieri >> wr

Re: [sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-27 Thread Travis Scrimshaw
On Thursday, October 27, 2016 at 2:12:01 PM UTC-5, William wrote: > > On Thu, Oct 27, 2016 at 11:25 AM, kcrisman > wrote: > > > > > > On Thursday, October 27, 2016 at 2:11:58 PM UTC-4, John H Palmieri > wrote: > >> > >> (1) Why should a nonsquare matrix even have an "is_similar" method? Ca

Re: [sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-27 Thread William Stein
On Thu, Oct 27, 2016 at 11:25 AM, kcrisman wrote: > > > On Thursday, October 27, 2016 at 2:11:58 PM UTC-4, John H Palmieri wrote: >> >> (1) Why should a nonsquare matrix even have an "is_similar" method? Can we >> get rid of that? (Same for "determinant" and some other methods.) > > > Those are no

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-27 Thread kcrisman
On Thursday, October 27, 2016 at 2:11:58 PM UTC-4, John H Palmieri wrote: > > (1) Why should a nonsquare matrix even have an "is_similar" method? Can we > get rid of that? (Same for "determinant" and some other methods.) > Those are not even the most annoying methods like this throughout Sage t

[sage-devel] Re: vote on behaviour of is_similar for matrices

2016-10-27 Thread John H Palmieri
(1) Why should a nonsquare matrix even have an "is_similar" method? Can we get rid of that? (Same for "determinant" and some other methods.) (2) What is the definition of similar? (a) Two matrices M and N, both square of the same size, are similar iff there is an invertible matrix P so that M