d = 399 # is squarefree and 3 mod 4 print('factorisation(d)=', pari.factor(d)) # prime factorisation D = 4*d # discriminant of the field extension w = pari.quadgen(D) # create omega print('isfundamental(D)=', pari.isfundamental(D)==1) print('trace(w) = ', pari.trace(w), '\t', 'norm(w) =', pari.norm(w), '\t',\ 'charpoly(w)=', pari.charpoly(w))
pari.trace(A) P = pari.numerator(F) trace = P.eval(1) pari.poldegree(P) pari.polroots(P) pari.poldisc(P) qId = pari("[t,0;0,1/t]") qDisc = pari.matdet(mat.subst('q','p^2')-qId) alext = alex.subst('q^2','-t')
def sign_disc(rep0,rep1): mat0=matrix_of_address(rep0) mat1=mT.matrix_of_address(rep1) mat01 = np.matmul(mat0, mat1) mat10 = np.matmul(mat1, mat0) commutator = np.matmul(mat01, mT.matrix_sl_inverse(mat10)) #commutator = np.matmul(np.matmul(mat0,mat1), mT.matrix_sl_inverse(np.matmul(mat1,mat0))) #assert commutator.trace()!=2 #assert mT.discriminant(commutator)!=0 sign_disc = commutator.trace()>2 # vaut True = 1 ou False = 0 dans opérations arithmétiques return sign_disc def link_disc_word(w0, w1): linking = 0 for rep0 in list_of_circular_shifts(w0): for rep1 in mT.list_of_circular_shifts(w1): if rep0[0]!=rep1[0]: linking += (1-sign_disc(rep0,rep1)) return linking//2
# https://snappy.math.uic.edu/manifold.html # https://snappy.math.uic.edu/spherogram.html # https://www.math.uic.edu/t3m/SnapPy/manifold.html # https://www.math.uic.edu/t3m/SnapPy/additional_classes.html#fundamentalgroup # http://www.geom.uiuc.edu/software/snappea/