The closure of a subset S of a matroid (E, B) is the set cl(S) := {x $\in$ E : rank(S) = rank(S $\cup \{x\}$) }. The closure operator 2^E -> 2^E, S $\mapsto$ cl(S), completely determines the matroid (indeed, the maximal proper closed sets - i.e. hyperplanes - already determine the matroid).
i1 : M = matroid({a,b,c,d},{{a,b},{a,c}}) o1 = a matroid of rank 2 on 4 elements o1 : Matroid |
i2 : for s in subsets M_* do print(toString s | " has closure " | toString closure_M s) {} has closure {3} {a} has closure {0, 3} {b} has closure {1, 2, 3} {a, b} has closure {0, 1, 2, 3} {c} has closure {1, 2, 3} {a, c} has closure {0, 1, 2, 3} {b, c} has closure {1, 2, 3} {a, b, c} has closure {0, 1, 2, 3} {d} has closure {3} {a, d} has closure {0, 3} {b, d} has closure {1, 2, 3} {a, b, d} has closure {0, 1, 2, 3} {c, d} has closure {1, 2, 3} {a, c, d} has closure {0, 1, 2, 3} {b, c, d} has closure {1, 2, 3} {a, b, c, d} has closure {0, 1, 2, 3} |
i3 : F = flats M o3 = {set {3}, set {0, 3}, set {1, 2, 3}, set {0, 1, 2, 3}} o3 : List |
i4 : all(F, f -> closure_M f === f) o4 = true |
The object closure is a method function.