Matroid correlation constants

API

POST /api/verify

Verifies a matroid on ground set {0, …, n−1} and computes its correlation constant α(M) exactly. The body is JSON with fields n (integer), type (one of "matrix", "bases", "circuits", "hyperplanes"), data, an optional provenance string (attribution: discoverers, date, AI disclosure), and, for matrices, field"Q", a prime "p" for GF(p), or a prime power ("4" or "2^2") up to order 1024 for GF(pd). For a matrix, data is a list of rows (columns are the elements). Over ℚ entries may be integers or fraction strings like "-3/5". Over GF(pd) with d > 1, an entry is an integer (a prime-subfield constant, reduced mod p) or a coefficient list [c0, c1, ...] meaning c0 + c1a + … where a is a root of the Conway polynomial Cp,d — the same convention as Sage, GAP, and Macaulay2, so matrices copy across unchanged. For the other types, data is the complete list of bases, circuits, or hyperplanes as lists of element labels. Limits: n ≤ 24, at most 5,000 listed sets or 5,000 matrix entries.

Requires an Authorization: Bearer <token> header — create a token on your profile page. Requests without a valid token receive 401. A submission whose constant strictly beats the record for its ground-set size is saved and attributed to your account.

curl -X POST https://matroid-correlation-constants.icarm.cloud/api/verify \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer matroid_...' \
  -d '{ "n": 4, "type": "matrix", "field": "3",
        "data": [[1,0,1,1],[0,1,1,2]],
        "provenance": "the uniform matroid U(2,4); classical" }'

Returns 200 with the verdict, 401 without a valid token, or 400 when the body is malformed, the description violates the matroid axioms (the error pinpoints a failing exchange or circuit elimination), or a limit is exceeded. On success, record.recorded reports whether the record book changed; on a tie, record.tiedExact reports whether the submission is the record matroid itself (true) or a different matroid with the same constant (false).

{
  "ok": true,
  "n": 4,
  "rank": 2,
  "numBases": 6,
  "loops": [],
  "coloops": [],
  "alphaNum": 1,                    // α(M) as a reduced fraction ...
  "alphaDen": 4,
  "alphaValue": 0.25,               // ... and as a decimal
  "maximizingPairs": [[0,1], [0,2], [0,3], [1,2], [1,3], [2,3]],
  "maxCounts": { "containBoth": 1, "avoidBoth": 1, "onlyI": 2, "onlyJ": 2 },
  "field": "3",
  "record": { "recorded": true, "recordAlphaNum": 1, "recordAlphaDen": 4, "matroidId": 7 }
}

The same matroid described by its bases instead:

{ "n": 4, "type": "bases",
  "data": [[0,1],[0,2],[0,3],[1,2],[1,3],[2,3]] }

GET /database.json

All record matroids as one JSON download: { count, matroids }, each with its n, rank, num_bases, exact alpha fraction, representation_type and full representation, field, canonical bases (omitted when very large), max_pairs, max_counts, provenance, submitter, created_at, and current (false for superseded records, which are kept as history). No auth required. Responses carry a strong ETag; conditional requests return 304 when nothing has changed.