> I think it is a bad thing in this case for == to be equality as sets. 
> Imagine if these are two really big, equal, but differently constructed 
> subgroups. This would be a really long and expensive check, whereas in most 
> cases, checking the defining objects are sufficient. I believe we have 
> other places in Sage where == is not strict mathematical equality for 
> similar reasons. -1 on changing the == semantics here.
>
>
I am strongly in favour of changing all the other instances of wrong ==; 
or, at least, that they are well documented aberations. Or that we rename 
things (like subgroups_with_generator) to make it mathematically correct 
again.
If ever a user wants to check that the two subgroups were given by the same 
generators then he will check if .gens() are equal. Otherwise he will know 
that it may take time to test equality, just like with any other function.

I am happy with John's example of quadratic fields. The QQ-algebras 
QuadraticField(2) and QuadraticField(8) are not equal in any canonical 
thing they are contained in as there are two isomorphisms between them. 
 

> Now I would say the equality as sets (which really comes down to equality 
> of elements) is a bug. Two matrix group elements should compare by their 
> matrices and not have the coercion system involved otherwise. My guess is 
> the coercion system tries to convert the elements of H into H3 and vice 
> versa, which is cannot do, and hence, results in a False for equality. This 
> probably requires a reimplementation of the comparison method of matrix 
> group elements.
>

Yes, fully agree. In fact elements should not have a "matrix" at all, since 
they are matrices by definition to the user. The element class, like many 
other group things, may want to be worked over completely. I am also often 
unhappy about PGL, which returns a permutation group, by the way.

 Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to