Correct signature

This commit is contained in:
Aaron Fenyes 2024-03-01 13:26:20 -05:00
parent 717e5a6200
commit ef33b8ee10

View File

@ -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)
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)