
K,a = Hecke.quadratic_field(2)
sqrt_2_lattices = [
    (
        "diag_-ϕ,1,1,1,1",
        VA.diagm(K,[a-1,1,1,1,1]),
        [[0, -1, 1, 0, 0], [0, 0, -1, 1, 0], [0, 0, 0, -1, 1], [0, 0, 0, 0, -1], [1, -a + 1, 0, 0, 0], [-a + 1, -a + 1, -a + 1, -a + 1, 0], [-a + 2, -a + 2, -a + 1, -a + 1, -a + 1]]
    ),
    (
        "diag_-ϕ,1,1,1,1,1",
        VA.diagm(K,[a-1,1,1,1,1,1]),
        [[0, -1, 1, 0, 0, 0], [0, 0, -1, 1, 0, 0], [0, 0, 0, -1, 1, 0], [0, 0, 0, 0, -1, 1], [0, 0, 0, 0, 0, -1], [1, -a + 1, 0, 0, 0, 0], [-a + 1, -a + 1, -a + 1, -a + 1, 0, 0], [-a + 2, -a + 2, -a + 1, -a + 1, -a + 1, 1], [-2*a + 3, -2*a + 3, -2*a + 3, -a + 1, -a + 1, -a + 1], [-3*a + 4, -2*a + 3, -2*a + 3, -2*a + 3, -2*a + 3, -2*a + 3]]
    ),
    
]

very_long_sqrt_2_lattices = [

     (
        "diag_-ϕ,1,1,1,1,1,1",
        VA.diagm(K,[a-1,1,1,1,1,1,1]),
        [[0, -1, 1, 0, 0, 0, 0],[0, 0, -1, 1, 0, 0, 0],[0, 0, 0, -1, 1, 0, 0],[0, 0, 0, 0, -1, 1, 0],[0, 0, 0, 0, 0, -1, 1],[0, 0, 0, 0, 0, 0, -1],[1, -a + 1, 0, 0, 0, 0, 0],[-a + 1, -a + 1, -a + 1, -a + 1, 0, 0, 0],[-a + 2, -a + 1, -a + 1, -a + 1, -a + 1, -a + 1, 1],[-a + 2, -a + 2, -a + 1, -a + 1, -a + 1, 1, 0],[-2*a + 3, -2*a + 3, -2*a + 3, -a + 1, -a + 1, -a + 1, 0],[-2*a + 2, -2*a + 2, -a + 2, -a + 1, -a + 1, -a + 1, -a + 1],[-2*a + 4, -2*a + 3, -2*a + 3, -2*a + 2, -a + 2, -a + 1, -a + 1],[-5*a + 7, -5*a + 7, -4*a + 6, -3*a + 4, -2*a + 3, -2*a + 3, -a + 2],[-7*a + 10, -7*a + 10, -5*a + 7, -5*a + 7, -3*a + 4, -3*a + 4, -2*a + 3],[-7*a + 10, -7*a + 10, -7*a + 10, -3*a + 4, -2*a + 3, -2*a + 3, -2*a + 3],[-4*a + 6, -4*a + 5, -4*a + 5, -2*a + 3, -2*a + 3, -2*a + 2, -a + 2],[-4*a + 6, -4*a + 6, -4*a + 5, -2*a + 3, -2*a + 2, -a + 2, -a + 2],[-5*a + 8, -5*a + 7, -5*a + 7, -3*a + 3, -2*a + 3, -2*a + 3, -2*a + 3],[-5*a + 8, -5*a + 8, -5*a + 7, -2*a + 3, -2*a + 3, -2*a + 3, -2*a + 2],[-10*a + 14, -10*a + 14, -8*a + 11, -5*a + 7, -5*a + 7, -5*a + 7, -2*a + 3],[-10*a + 14, -10*a + 14, -9*a + 13, -5*a + 7, -5*a + 7, -2*a + 3, -2*a + 3],[-6*a + 8, -5*a + 8, -5*a + 7, -3*a + 5, -3*a + 4, -3*a + 4, -a + 2],[-11*a + 16, -10*a + 14, -10*a + 14, -7*a + 10, -5*a + 7, -5*a + 7, -2*a + 3],[-7*a + 10, -7*a + 9, -6*a + 9, -4*a + 5, -4*a + 5, -2*a + 3, -2*a + 3],[-8*a + 10, -7*a + 10, -7*a + 10, -4*a + 6, -4*a + 5, -2*a + 3, -2*a + 2],[-14*a + 20, -14*a + 20, -12*a + 17, -8*a + 11, -5*a + 7, -5*a + 7, -5*a + 7],[-9*a + 12, -8*a + 12, -8*a + 11, -5*a + 7, -3*a + 5, -3*a + 5, -3*a + 4],[-17*a + 24, -17*a + 24, -14*a + 20, -10*a + 14, -8*a + 11, -5*a + 7, -5*a + 7],[-17*a + 24, -17*a + 24, -15*a + 21, -8*a + 11, -7*a + 10, -7*a + 10, -5*a + 7],[-10*a + 14, -10*a + 14, -8*a + 12, -5*a + 8, -5*a + 7, -3*a + 5, -3*a + 4],[-18*a + 26, -17*a + 24, -17*a + 24, -10*a + 14, -7*a + 10, -7*a + 10, -5*a + 7],[-20*a + 28, -20*a + 28, -17*a + 24, -10*a + 14, -10*a + 14, -7*a + 10, -5*a + 7],[-21*a + 30, -20*a + 28, -19*a + 27, -12*a + 17, -10*a + 14, -7*a + 10, -5*a + 7]]
    ),   
]

@testset "Some reflective lattices over ℚ(√2)" begin
    
    for (name,matrix,known_roots) in sqrt_2_lattices
        @testset "$name" begin
            compare_vinberg_outputs(K,matrix,known_roots)
        end
    end

end

if "very long" ∈ ARGS
    for (name,matrix,known_roots) in very_long_sqrt_2_lattices
        @testset "$name" begin
            compare_vinberg_outputs(K,matrix,known_roots)
        end
    end


end
