Example: Number-field polyhedral complex
Profiles: OSCAR v1.2, OSCAR v1.3, OSCAR v1.4, OSCAR v1.5, OSCAR v1.6, OSCAR v1.7, OSCAR v1.8
Construct a polyhedral complex 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)
IM = incidence_matrix([[1,2,3],[1,3,4]])
vr_F = F.([0 0; 1 0; 1 1; 0 1])
obj = polyhedral_complex(IM, vr_F)
save("data.mrdi", obj)
Data outputs
Profiles: OSCAR v1.2, OSCAR v1.3
Data file: data.mrdi
{
"_ns": {"Oscar": ["https://github.com/oscar-system/Oscar.jl", "1.3.1"]},
"_type": {"name": "PolyhedralComplex", "params": "868e047f-e9bc-4392-a4d5-73ceeb4b7f0a"},
"data": {
"_type": {
"name": "Dict",
"params": {
"key_type": "String",
"_coeff": "EmbeddedNumField",
"POINTS": {"name": "MatElem", "params": "c9a4ea85-0967-4abc-9b1e-18855c7e7ac1"},
"INPUT_LINEALITY": {"name": "MatElem", "params": "98ee3a07-4581-4478-a3b9-116e93181e6a"},
"_type": "String",
"INPUT_POLYTOPES": "Polymake.IncidenceMatrixAllocated{Polymake.NonSymmetric}"
}
},
"data": {
"_coeff": {
"num_field": "56f36ea2-5718-4573-a6d6-a9b3dbacee10",
"embedding": "2cb7e8ba-4365-41bf-8504-a1895941d544"
},
"POINTS": [
[[["0", "1"]], [], []],
[[["0", "1"]], [["0", "1"]], []],
[[["0", "1"]], [["0", "1"]], [["0", "1"]]],
[[["0", "1"]], [], [["0", "1"]]]
],
"INPUT_LINEALITY": [],
"_type": "fan::PolyhedralComplex<OscarNumber>",
"INPUT_POLYTOPES": {
"_ns": {"polymake": ["https://polymake.org", "4.13"]},
"_type": "common::IncidenceMatrix<NonSymmetric>",
"data": [[0, 1, 2], [0, 2, 3], {"cols": 4}]
}
}
},
"_refs": {
"868e047f-e9bc-4392-a4d5-73ceeb4b7f0a": {
"_type": "EmbeddedNumField",
"data": {
"num_field": "56f36ea2-5718-4573-a6d6-a9b3dbacee10",
"embedding": "2cb7e8ba-4365-41bf-8504-a1895941d544"
}
},
"c9a4ea85-0967-4abc-9b1e-18855c7e7ac1": {
"_type": "MatSpace",
"data": {"base_ring": "868e047f-e9bc-4392-a4d5-73ceeb4b7f0a", "ncols": "3", "nrows": "4"}
},
"98ee3a07-4581-4478-a3b9-116e93181e6a": {
"_type": "MatSpace",
"data": {"base_ring": "868e047f-e9bc-4392-a4d5-73ceeb4b7f0a", "ncols": "3", "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": "PolyhedralComplex",
"params": {
"field": "6f902f3c-e34a-4c08-b174-70a336c1e8c8",
"pm_params": {
"name": "Dict",
"params": {
"key_params": "Symbol",
"INPUT_POLYTOPES": "Polymake.IncidenceMatrixAllocated{Polymake.NonSymmetric}",
"INPUT_LINEALITY": {"name": "MatElem", "params": "c7af8b8f-ffce-48ed-9a3a-9d4fc07ccd64"},
"_polymake_type": "String",
"POINTS": {"name": "MatElem", "params": "ff2a6398-0f75-403b-947f-d2d00a510cab"}
}
}
}
},
"data": {
"INPUT_POLYTOPES": {
"_ns": {"polymake": ["https://polymake.org", "4.15"]},
"data": [[0, 1, 2], [0, 2, 3], {"cols": 4}],
"_type": "common::IncidenceMatrix<NonSymmetric>"
},
"INPUT_LINEALITY": [],
"_polymake_type": "fan::PolyhedralComplex<OscarNumber>",
"POINTS": [
[[["0", "1"]], [], []],
[[["0", "1"]], [["0", "1"]], []],
[[["0", "1"]], [["0", "1"]], [["0", "1"]]],
[[["0", "1"]], [], [["0", "1"]]]
]
},
"_refs": {
"6f902f3c-e34a-4c08-b174-70a336c1e8c8": {
"_type": {"name": "EmbeddedNumField", "params": "df86748c-4085-4fac-a01d-8dae2d23c1d8"},
"data": []
},
"c7af8b8f-ffce-48ed-9a3a-9d4fc07ccd64": {
"_type": {"name": "MatSpace", "params": "6f902f3c-e34a-4c08-b174-70a336c1e8c8"},
"data": {"ncols": "3", "nrows": "0"}
},
"ff2a6398-0f75-403b-947f-d2d00a510cab": {
"_type": {"name": "MatSpace", "params": "6f902f3c-e34a-4c08-b174-70a336c1e8c8"},
"data": {"ncols": "3", "nrows": "4"}
},
"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.