(*bug:If only one basis element appears in a relation and the coefficient is not 1, the count may be 2.*)
For[i=1,i≤Length[rels],i++,
bi=((rels[[i]]/.diag_Diag:>B[Position[basis,diag]])/.{B[{{p_Integer}}]->B[p],B[{}]->0});
If[!bi===0,
Print[i,"/",Length[rels[[i]]],"/",Length[bi/.{-1->1,-2->1}],"/",bi]
]
]