Two matroids are considered equal if they have the same set of (indexed) bases and same size grounds sets (in particular, the ground sets need not be identical). This happens iff the identity permutation is an isomorphism.
The strong comparison operator === should not be used, as bases (and ground sets) are internally stored as lists rather than sets, so the same matroid with a different ordering on the list of bases (or ground set) will be treated as different under ===. (One might try to sort the list of bases, but this is potentially time-consuming, as the list of bases can grow rapidly with the size of the ground set.)
i1 : M = matroid completeGraph 3
o1 = a "matroid" of rank 2 on 3 elements
o1 : Matroid
|
i2 : peek M
o2 = Matroid{bases => {set {1, 2}, set {0, 2}, set {0, 1}}}
cache => CacheTable{...6...}
groundSet => set {0, 1, 2}
rank => 2
|
i3 : N = uniformMatroid(2, 3)
o3 = a "matroid" of rank 2 on 3 elements
o3 : Matroid
|
i4 : peek N
o4 = Matroid{bases => {set {0, 1}, set {0, 2}, set {1, 2}}}
cache => CacheTable{...1...}
groundSet => set {0, 1, 2}
rank => 2
|
i5 : M == N
o5 = true
|
i6 : M === N
o6 = false
|
i7 : AG32 = specificMatroid "AG32" -- identically self-dual
o7 = a "matroid" of rank 4 on 8 elements
o7 : Matroid
|
i8 : AG32 == dual AG32
o8 = true
|
i9 : AG32 === dual AG32
o9 = false
|
i10 : V = specificMatroid "vamos" -- self-dual, but not identically so
o10 = a "matroid" of rank 4 on 8 elements
o10 : Matroid
|
i11 : V == dual V
o11 = false
|
i12 : areIsomorphic(V, dual V)
o12 = true
|