Ticket #13179 (new defect)
Compare matrices consistently for different base rings
| Reported by: | SimonKing | Owned by: | jason, was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.10 |
| Component: | linear algebra | Keywords: | matrix comparison |
| Cc: | malb | Work issues: | |
| Report Upstream: | N/A | Reviewers: | |
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Apparently we use three essentially different ways of comparing matrices.
sage: def test(K): ....: M1 = Matrix(K,[[1,0,0]]) ....: M2 = Matrix(K,[[0,1,0]]) ....: M3 = Matrix(K,[[0,1,1]]) ....: M4 = Matrix(K,[[0,0,1]]) ....: L = [M1,M2,M3,M4] ....: L.sort() ....: return L ....:
First group
Matrices over not too big fields of characteristic 2
sage: K = GF(2) sage: test(K) [[1 0 0], [0 1 0], [0 0 1], [0 1 1]] sage: K = GF(4,'z') sage: test(K) [[1 0 0], [0 1 0], [0 0 1], [0 1 1]] sage: K = GF(2^10,'q') sage: test(K) [[1 0 0], [0 1 0], [0 0 1], [0 1 1]]
Second group
Matrices over big finite fields of characteristic 2
sage: K = GF(2^100,'q') sage: test(K) [[1 0 0], [0 1 0], [0 1 1], [0 0 1]]
Third group
Matrices over all other rings
sage: K = GF(3) sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K = GF(9,'z') sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K = GF(3^100,'q') sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K = QQ sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K = ZZ sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K.<x> = GF(2)[] sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K.<x> = GF(3)[] sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K.<x> = GF(4,'z')[] sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]] sage: K.<x> = GF(2^100,'z')[] sage: test(K) [[0 0 1], [0 1 0], [0 1 1], [1 0 0]]
I guess the inconsistent behaviour is "big fun" for all who want to implement the F4 algorithm in Sage. It ought to be fixed.
Note: See
TracTickets for help on using
tickets.

With #13180 fixed this boils down to two groups: M4RI(E) vs the rest.