From ef33b8ee101b533894e7c04d8484e2531e96fd1a Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Fri, 1 Mar 2024 13:26:20 -0500 Subject: [PATCH] Correct signature --- engine-proto/gram-test/gram-test.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engine-proto/gram-test/gram-test.jl b/engine-proto/gram-test/gram-test.jl index c962967..4b2f859 100644 --- a/engine-proto/gram-test/gram-test.jl +++ b/engine-proto/gram-test/gram-test.jl @@ -31,7 +31,7 @@ if n_pos + n_neg == size(gram, 1) else printbad("Degenerate subspace") end -sig_rem = Int64[ones(2-n_pos); -ones(3-n_neg)] +sig_rem = Int64[ones(1-n_pos); -ones(4-n_neg)] unk = hcat(a, b, c) M = matrix_space(F, 5, 5) big_gram = M(F.([ @@ -74,4 +74,12 @@ if valid else printbad("Didn't recover Gram matrix. Instead, got:") end -display(big_gram_recovered) \ No newline at end of file +display(big_gram_recovered) + +# this should be a solution +hand_solution = [0 0 1 0 0; 0 0 -1 2 2; 0 0 0 1 -1; 1 0 0 0 0; 0 1 0 0 0] +unmix = Rational{Int64}[[1//2 1//2; 1//2 -1//2] zeros(Int64, 2, 3); zeros(Int64, 3, 2) Matrix{Int64}(I, 3, 3)] +hand_solution_diag = unmix * hand_solution +big_gram_hand_recovered = transpose(hand_solution_diag) * diagm([1; -ones(Int64, 4)]) * hand_solution_diag +println("Gram matrix from hand-written solution:") +display(big_gram_hand_recovered) \ No newline at end of file