Macaulay2 » Documentation
Packages » Matroids :: Matroid _ List
next | previous | forward | backward | up | index | toc

# Matroid _ List -- elements of matroid

- Operator: _
- Usage:
    `M_S`
    `M_i`
    `M_*`
- Inputs:
  - M, a matroid,
  - S, a list, or set, of indices in M.groundSet
- Outputs:
  - a list, of elements of M

## Description

Converts a list or set of indices to the list of elements of the matroid with those indices. The inverse of this function is indicesOf.

    i1 : M = matroid({a,b,c,d},{{a,b},{a,c}})

    o1 = a "matroid" of rank 2 on 4 elements

    o1 : Matroid

    i2 : M_2

    o2 = c

    o2 : Symbol

    i3 : M_{0,2,3}

    o3 = {a, c, d}

    o3 : List

    i4 : B = (bases M)#0

    o4 = set {0, 1}

    o4 : Set

    i5 : M_B

    o5 = set {a, b}

    o5 : Set

If used with the operator _*, then the list of all elements in M is returned. This is useful in conjunction with apply, to iterate over all elements in a matroid.

    i6 : F7 = specificMatroid "fano"

    o6 = a "matroid" of rank 3 on 7 elements

    o6 : Matroid

    i7 : M4 = matroid completeGraph 4

    o7 = a "matroid" of rank 3 on 6 elements

    o7 : Matroid

    i8 : all(F7_*, x -> areIsomorphic(F7 \ {x}, M4))

    o8 = true

## Caveat

There are important differences between this method and groundSet: see that page for more details.

## See also

- groundSet -- (internal) ground set
- indicesOf -- indices of a sublist

## Ways to use this method:

- Matroid _ List -- elements of matroid
- `Matroid _ Set`
- `Matroid _ ZZ`

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Matroids/doc-Matroids.m2:553:0.