Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: alglatindex
Section: algebras
C-Name: alglatindex
Prototype: GGG
Help: alglatindex(al,lat1,lat2): the generalized index (lat2:lat1).
Doc: Given an algebra~\var{al} and two lattices~\var{lat1} and~\var{lat2}
in~\var{al}, computes the generalized index of~\var{lat1} relative
to~\var{lat2}, i.e.~$|lat2/lat1\cap lat2|/|lat1/lat1\cap lat2|$.
\bprog
? al = alginit(nfinit(y^2+7), [-1,-1]);
? lat1 = alglathnf(al,[1,1,0,0,0,0,0,0]~);
? lat2 = alglathnf(al,[1,0,1,0,0,0,0,0]~);
? alglatindex(al,lat1,lat2)
%4 = 1
? lat1==lat2
%5 = 0
@eprog