Engine prototype #13

Merged
glen merged 133 commits from engine-proto into main 2024-10-21 03:18:48 +00:00
Showing only changes of commit f97090c997 - Show all commits

View File

@ -262,8 +262,8 @@ println("Two points on a sphere: ", Engine.dimension(ideal_ab_s), " degrees of f
cut = [
sum(vcat(a.coords, (s.coords - [0, 0, 0, 0, 1])))
sum(vcat([2, 1, 1] .* a.coords, [1, 2, 1, 1, 1] .* s.coords - [0, 0, 0, 0, 1]))
sum(vcat([1, 2, 0] .* a.coords, [1, 1, 0, 1, 2] .* s.coords - [0, 0, 0, 0, 1]))
sum(vcat([2, 1, 1] .* a.coords, [1, 2, 1, 1, 1] .* (s.coords - [0, 0, 0, 0, 1])))
sum(vcat([1, 2, 0] .* a.coords, [1, 1, 0, 1, 2] .* (s.coords - [0, 0, 0, 0, 1])))
]
cut_ideal_ab_s = Generic.Ideal(base_ring(ideal_ab_s), [gens(ideal_ab_s); cut])
cut_dim = Engine.dimension(cut_ideal_ab_s)
@ -283,7 +283,7 @@ if cut_dim == 0
# test corresponding witness set
cut_matrix = [1 1 1 1 0 1 1 0 1 1 0; 1 2 1 2 0 1 1 0 1 1 0; 1 1 0 1 0 1 2 0 2 0 0]
cut_subspace = LinearSubspace(cut_matrix, [1, 1, 1])
cut_subspace = LinearSubspace(cut_matrix, [1, 1, 2])
witness = witness_set(System(eqns_ab_s, variables = vbls), cut_subspace)
println("witness solutions:")
for wtns in solutions(witness)