Unified dataset schemas
The versioned dataset API uses Nominal(Name, T), RowRef(DatasetId), Set(T), List(T), Option(T), Product(T, U), Record(field: T) and tagged Union(A: T | B: U). These are structural declarations, not mathematical equivalence proofs.
Rationals encode as {"numerator":"2","denominator":"3"}; exact decimals as {"decimal":"1.200"}. References carry dataset and key fields. Sets and lists use arrays. Unknown legacy payloads are explicitly json; symbolic source stays text.
Each dataset publishes its schema, supported operations and separate verification status. The notation below retains YakDB’s original mathematical documentation.
Base types
| Type | Description |
|---|---|
unit | A type with one value, written (). |
bool | One of the two values true or false. |
int | An exact signed integer of arbitrary size. |
rational | An exact fraction of integers with a nonzero denominator, reduced to lowest terms. |
decimal | An exact finite base-10 number; trailing decimal zeros do not change its value. |
float64 | A finite IEEE-754 binary64 floating-point number, explicitly approximate; NaN and infinities are excluded. |
string | A sequence of Unicode scalar values, rendered as plain text without implicit normalization. |
Type constructors
| Constructor | Notation | Description |
|---|---|---|
List | T list | A finite ordered sequence of values of type T; repetitions are allowed. |
Option | T option | A value of type T or None. None is distinct from false, zero, and an empty collection. |
Set | Set<T> | An unordered set of values of type T. Mathematical objects may retain possible duplicate representatives when equality is unresolved. |
RowRef | RowRef<T> | A reference to a row of type T, displayed as its primary key linked to its standalone page. |
Derived types
| Type | Representation | Description |
|---|---|---|
KnotId | string | A distinct catalogue identifier for an oriented knot; not the knot diagram itself. |
PDCode | int list list | A planar diagram represented by integer quadruples, preserving crossing order and strand labels. |
| UnorientedKnot | Set<OrientedKnot> | An oriented knot and its reverse, identified under reversal. |
| UnorientedMirrorClass | Set<UnorientedKnot> | An unoriented knot and its mirror, identified under mirroring. |
Table row types
| Type | Dataset | Description |
|---|---|---|
| OrientedKnotRow | Oriented Knots | A record of 14 fields. Its declared primary key is name; id is a generated row reference. |
| UnorientedKnotRow | Unoriented Knots | A record of 3 fields. Its declared primary key is name; id is a generated row reference. |
| UnorientedMirrorClassRow | Unoriented Mirror Classes | A record of 7 fields. Its declared primary key is name; id is a generated row reference. |
| Regina12Row | Regina12 | A record of 7 fields. Its declared primary key is name; id is a generated row reference. |