Example: Number-field cone
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
Construct a cone over an embedded number field.
Related Specification
Systems
Oscar.jl
Generate code (generate.jl) [ edit ]
using Oscar
Qx, x = QQ[:x]
F, a = embedded_number_field(x^2 - 2, -1.0)
obj = positive_hull(F, [F(1) F(0); F(0) F(1)])
save("data.mrdi", obj)
Data outputs
Profiles: OSCAR v1.0
Data file: data.mrdi
{
"_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.0.5"]},
"_type": {"name": "Cone", "params": "a611425c-fc05-4869-bbe6-a378d2a3ccfb"},
"data": {
"_type": {
"name": "Dict",
"params": {
"key_type": "String",
"_coeff": "EmbeddedNumField",
"INPUT_RAYS": {"name": "MatElem", "params": "2a7cd351-c28e-4b82-a9c4-8a68f4982947"},
"INPUT_LINEALITY": {"name": "MatElem", "params": "cba3e22e-b59b-4bee-aa4b-7439600e0a75"},
"_type": "String"
}
},
"data": {
"_coeff": {
"num_field": "d8a2a7ec-d231-44c6-9bd3-76ff274fda10",
"embedding": "432886f6-1b87-464e-887a-4d9479bccd66"
},
"INPUT_RAYS": [[[["0", "1"]], []], [[], [["0", "1"]]]],
"INPUT_LINEALITY": [],
"_type": "polytope::Cone<OscarNumber>"
}
},
"_refs": {
"a611425c-fc05-4869-bbe6-a378d2a3ccfb": {
"_type": "EmbeddedNumField",
"data": {
"num_field": "d8a2a7ec-d231-44c6-9bd3-76ff274fda10",
"embedding": "432886f6-1b87-464e-887a-4d9479bccd66"
}
},
"2a7cd351-c28e-4b82-a9c4-8a68f4982947": {
"_type": "MatSpace",
"data": {"base_ring": "a611425c-fc05-4869-bbe6-a378d2a3ccfb", "ncols": "2", "nrows": "2"}
},
"cba3e22e-b59b-4bee-aa4b-7439600e0a75": {
"_type": "MatSpace",
"data": {"base_ring": "a611425c-fc05-4869-bbe6-a378d2a3ccfb", "ncols": "2", "nrows": "0"}
},
"d8a2a7ec-d231-44c6-9bd3-76ff274fda10": {
"_type": "AbsSimpleNumField",
"data": {
"def_pol": {
"_type": {"name": "PolyRingElem", "params": "633f0c88-0b12-479a-a4c0-e41f1b7f53f0"},
"data": [["0", "-2"], ["2", "1"]]
},
"var": "a"
}
},
"432886f6-1b87-464e-887a-4d9479bccd66": {
"_type": "Hecke.AbsSimpleNumFieldEmbedding",
"data": {
"num_field": "d8a2a7ec-d231-44c6-9bd3-76ff274fda10",
"data": {
"_type": {"name": "AcbFieldElem", "params": {"_type": "AcbField", "data": "35"}},
"data": ["-5a827999f -22 10000001 -3e", "0 0 0 0"]
}
}
},
"633f0c88-0b12-479a-a4c0-e41f1b7f53f0": {"_type": "PolyRing", "data": {"base_ring": {"_type": "QQField"}, "symbols": ["x"]}}
}
}
Profiles: 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": "Cone", "params": "0c549ead-395c-4000-8978-663507050b63"},
"data": {
"_type": {
"name": "Dict",
"params": {
"key_type": "String",
"_coeff": "EmbeddedNumField",
"CONE_AMBIENT_DIM": "Base.Int",
"INPUT_RAYS": {"name": "MatElem", "params": "f34b8968-0117-4de0-821a-332484d8b431"},
"INPUT_LINEALITY": {"name": "MatElem", "params": "08146253-ce1e-416c-a80b-f6ed2875fef6"},
"_type": "String"
}
},
"data": {
"_coeff": {
"num_field": "56f36ea2-5718-4573-a6d6-a9b3dbacee10",
"embedding": "2cb7e8ba-4365-41bf-8504-a1895941d544"
},
"CONE_AMBIENT_DIM": "2",
"INPUT_RAYS": [[[["0", "1"]], []], [[], [["0", "1"]]]],
"INPUT_LINEALITY": [],
"_type": "polytope::Cone<OscarNumber>"
}
},
"_refs": {
"0c549ead-395c-4000-8978-663507050b63": {
"_type": "EmbeddedNumField",
"data": {
"num_field": "56f36ea2-5718-4573-a6d6-a9b3dbacee10",
"embedding": "2cb7e8ba-4365-41bf-8504-a1895941d544"
}
},
"f34b8968-0117-4de0-821a-332484d8b431": {
"_type": "MatSpace",
"data": {"base_ring": "0c549ead-395c-4000-8978-663507050b63", "ncols": "2", "nrows": "2"}
},
"08146253-ce1e-416c-a80b-f6ed2875fef6": {
"_type": "MatSpace",
"data": {"base_ring": "0c549ead-395c-4000-8978-663507050b63", "ncols": "2", "nrows": "0"}
},
"56f36ea2-5718-4573-a6d6-a9b3dbacee10": {
"_type": "AbsSimpleNumField",
"data": {
"def_pol": {
"_type": {"name": "PolyRingElem", "params": "b2b70a11-5c95-46d0-81aa-c61229942ecf"},
"data": [["0", "-2"], ["2", "1"]]
},
"var": "a"
}
},
"2cb7e8ba-4365-41bf-8504-a1895941d544": {
"_type": "Hecke.AbsSimpleNumFieldEmbedding",
"data": {
"num_field": "56f36ea2-5718-4573-a6d6-a9b3dbacee10",
"data": {
"_type": {"name": "AcbFieldElem", "params": {"_type": "AcbField", "data": "35"}},
"data": ["-5a827999f -22 10000001 -3e", "0 0 0 0"]
}
}
},
"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": "Cone",
"params": {
"field": "c8888706-e5e9-4d1b-b311-485b2c7e6e19",
"pm_params": {
"name": "Dict",
"params": {
"key_params": "Symbol",
"CONE_AMBIENT_DIM": "Base.Int",
"INPUT_LINEALITY": {"name": "MatElem", "params": "0f6e8495-ad29-40c6-b03c-294d048a00ac"},
"INPUT_RAYS": {"name": "MatElem", "params": "b4c8fcd5-6fab-4552-bf31-2f572a0c0f75"},
"_polymake_type": "String"
}
}
}
},
"data": {
"CONE_AMBIENT_DIM": "2",
"INPUT_LINEALITY": [],
"INPUT_RAYS": [[[["0", "1"]], []], [[], [["0", "1"]]]],
"_polymake_type": "polytope::Cone<OscarNumber>"
},
"_refs": {
"c8888706-e5e9-4d1b-b311-485b2c7e6e19": {
"_type": {"name": "EmbeddedNumField", "params": "df86748c-4085-4fac-a01d-8dae2d23c1d8"},
"data": []
},
"0f6e8495-ad29-40c6-b03c-294d048a00ac": {
"_type": {"name": "MatSpace", "params": "c8888706-e5e9-4d1b-b311-485b2c7e6e19"},
"data": {"ncols": "2", "nrows": "0"}
},
"b4c8fcd5-6fab-4552-bf31-2f572a0c0f75": {
"_type": {"name": "MatSpace", "params": "c8888706-e5e9-4d1b-b311-485b2c7e6e19"},
"data": {"ncols": "2", "nrows": "2"}
},
"df86748c-4085-4fac-a01d-8dae2d23c1d8": {
"_type": {"name": "Hecke.AbsSimpleNumFieldEmbedding", "params": "503279d5-fda8-4fbd-96d2-d6a5080024ba"},
"data": ["-5a827999f -22 10000001 -3e", "0 0 0 0"]
},
"503279d5-fda8-4fbd-96d2-d6a5080024ba": {
"_type": {"name": "AbsSimpleNumField", "params": "a78c482c-7f1a-4290-9be9-a4c6c8f3a0fa"},
"data": {"def_pol": [["0", "-2"], ["2", "1"]], "var": "a"}
},
"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.