{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://omega-naught.grok.me/geometry/exact-interface/coefficient_record.schema.json",
  "title": "Exact coefficient record for K = Q(sqrt(2), sqrt(3), sqrt(5))",
  "description": "A record is a root object whose schema identifier is omega-exact-coefficient/1 and whose coefficients array has length 8. Each coefficient is an object with integer-string n and positive-integer-string d. Reduced fractions and the canonical zero 0/1 are enforced by verify_exact_interface.py. Trace and norm are not part of this record.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "coefficients"],
  "basis_order": ["1", "sqrt(2)", "sqrt(3)", "sqrt(5)", "sqrt(6)", "sqrt(10)", "sqrt(15)", "sqrt(30)"],
  "properties": {
    "schema": {
      "const": "omega-exact-coefficient/1"
    },
    "coefficients": {
      "type": "array",
      "minItems": 8,
      "maxItems": 8,
      "items": {
        "$ref": "#/$defs/coefficient"
      }
    }
  },
  "$defs": {
    "coefficient": {
      "type": "object",
      "additionalProperties": false,
      "required": ["n", "d"],
      "properties": {
        "n": {
          "type": "string",
          "pattern": "^(0|-?[1-9][0-9]*)$",
          "description": "Integer numerator. Zero is 0, with no sign and no leading zeros."
        },
        "d": {
          "type": "string",
          "pattern": "^[1-9][0-9]*$",
          "description": "Positive integer denominator. Zero, a sign, and leading zeros are rejected."
        }
      }
    }
  }
}
