Example: Univariate polynomial

Profiles: OSCAR v1.0, OSCAR v1.1, OSCAR v1.2, OSCAR v1.3, OSCAR v1.4, OSCAR v1.5, OSCAR v1.6, OSCAR v1.7, OSCAR v1.8

The univariate polynomial $$ 7x^2 - x + 10 $$ in $\mathbb{Q}[x]$.

Systems

Oscar.jl

Generate code (generate.jl) [ edit ]

using Oscar

Qx, x = QQ[:x]
save("data.mrdi", 7*x^2 - x + 10)

Data outputs

Profiles: OSCAR v1.0, OSCAR v1.1, OSCAR v1.2, OSCAR v1.3

Data file: data.mrdi

{
  "_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.3.1"]},
  "_type": {"name": "PolyRingElem", "params": "b2b70a11-5c95-46d0-81aa-c61229942ecf"},
  "data": [["0", "10"], ["1", "-1"], ["2", "7"]],
  "_refs": {
    "b2b70a11-5c95-46d0-81aa-c61229942ecf": {"_type": "PolyRing", "data": {"base_ring": {"_type": "QQField"}, "symbols": ["x"]}}
  }
}

This serialized output is equivalent for these profiles up to UUID renaming and recorded namespace version strings.

Profiles: OSCAR v1.4, OSCAR v1.5, OSCAR v1.6, OSCAR v1.7

Data file: data.mrdi

{
  "_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.7.0"]},
  "_type": {"name": "PolyRingElem", "params": "a78c482c-7f1a-4290-9be9-a4c6c8f3a0fa"},
  "data": [["0", "10"], ["1", "-1"], ["2", "7"]],
  "_refs": {
    "a78c482c-7f1a-4290-9be9-a4c6c8f3a0fa": {"_type": {"name": "PolyRing", "params": {"_type": "QQField"}}, "data": {"symbols": ["x"]}}
  }
}

This serialized output is equivalent for these profiles up to UUID renaming and recorded namespace version strings.