abbc[b_, h1_, h2_, h3_] := (h1^2+h2^2+h3^2-1)/b

W={{1/2, 1/2, 1/2, 1/2, 1+Sqrt[6]/2},
    {1, 1, 1, 1, 2-Sqrt[6]},
    {1, -1, 0, 0, 0},
    {0, 0, 1, -1, 0},
    {-Sqrt[2]/2, -Sqrt[2]/2, Sqrt[2]/2, Sqrt[2]/2, 0}}

P = ({{0, -1/2, 0, 0, 0}, {-1/2, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}})

MatrixForm[W]

G=Simplify[Transpose[W].P.W]
MatrixForm[G]

MatrixForm[Simplify[W.Inverse[G].Transpose[W]]]
Q=6 Simplify[Inverse[G]]

v = {b1, b2, b3, b4, b5}

Q2=Factor[Simplify[v.Q.v==0]]

{sol1,sol2}=#[[1]][[2]]&/@Solve[Q2, b5]

Simplify[sol1+sol2]

(Subscript[σ, 1])=({{-1, 1, 1, 1, 1}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}})
(Subscript[σ, 2])=({{1, 0, 0, 0, 0}, {1, -1, 1, 1, 1}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}})
(Subscript[σ, 3])=({{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {1, 1, -1, 1, 1}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}})
(Subscript[σ, 4])=({{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {1, 1, 1, -1, 1}, {0, 0, 0, 0, 1}})
(Subscript[σ, 5])=({{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {1, 1, 1, 1, -1}})

bt=2(2+Sqrt[3])
b=1/(2+Sqrt[3])

W = ({{2, 2, 2, 2, 2, 2, 2, 2, bt, bt, bt, bt, bt, bt, bt, bt}, {1, 1, 1, 1, 1, 1, 1, 1, b, b, b, b, b, b, b, b}, {1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1}, {1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1}, {1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1}})

G=Simplify[Transpose[W].P.W]; MatrixForm[G]

NullSpace[G]

b=.

relations=(#.((Subscript[b, #])&/@Range[16])==0)&/@NullSpace[G];relations // Column

vars=Last/@((#[[1]])&/@((#/.(Equal->List))&/@relations))

relations'=Solve[relations[[#]],vars[[#]]]&/@Range[11]//Reverse;Column[relations']

rewrite[stmt_]:=Fold[Flatten[#1/.#2]&,stmt,relations'][[1]]//Simplify

rewrite[(Subscript[b, 1])+(Subscript[b, 7])+(Subscript[b, 8])-5(Subscript[b, 4])]

Qform=6(Table[G[[i,j]], {i, {1,2,3,5,9}}, {j, {1,2,3,5,9}}] // Inverse);MatrixForm[Qform]

Qform2=Expand[{(Subscript[b, 1]),(Subscript[b, 2]),(Subscript[b, 3]),(Subscript[b, 5]),(Subscript[b, 9])}.Qform.{(Subscript[b, 1]),(Subscript[b, 2]),(Subscript[b, 3]),(Subscript[b, 5]),(Subscript[b, 9])}]==0

diff[var_]:=Total[Expand[#[[1]][[2]]]&/@Solve[Qform2,var]]

diff[(Subscript[b, 1])]
diff[(Subscript[b, 2])]
diff[(Subscript[b, 3])]
diff[(Subscript[b, 5])]
diff[(Subscript[b, 9])]

MatrixRank/@Table[G[[i;;i+4,i;;i+4]], {i,11}]

(Table[
Table[
Table[
Table[
Table[
{a,b,c,d,e, Table[G[[i, j]],{i,{a,b,c,d,e}},{j,{a,b,c,d,e}}]},
{e,d,15}],
{d,c,15}],
{c,b,15}],
{b,a,15}],
{a,1,15}]//Flatten[#,4]&//Select[#,MatrixRank[Last[#]]==5&]&)//Length