// This script removes duplicate lattices // from 1321out.txt. These are lattices // that also appear in e4.txt or 1115red.txt. load "e4.txt"; load "1115red.txt"; load "1321out.txt"; checking := e4 cat switch1red; PrintFile("1321red.txt","switch2red := ["); newforms := 0; for m in [1..#switch2] do found := false; for n in [1..#checking] do if Determinant(2*switch2[m]) eq Determinant(2*checking[n]) then L1 := LatticeWithGram(2*switch2[m]); L2 := LatticeWithGram(2*checking[n]); if IsIsometric(L1,L2) then found := true; end if; end if; end for; if found eq false then newforms := newforms + 1; if newforms gt 1 then PrintFile("1321red.txt",","); end if; printf "Lattice %o is new.\n",m; PrintFile("1321red.txt","Matrix(4,4,"); PrintFile("1321red.txt",ElementToSequence(switch2[m])); PrintFile("1321red.txt",")"); end if; if found eq true then printf "Lattice %o is old.\n",m; end if; end for; PrintFile("1321red.txt","];"); printf "There were %o new forms found.\n",newforms;