gcd takes as arguments two polynomials with
coefficients in ℤ/pℤ (p must be prime).
gcd returns the GCD of these polynomials computed in ℤ/pℤ[x] (see also 2.25.7 for polynomials with non modular coefficients).
^2-1)) mod 5)
Note the difference with a gcd computation in ℤ[X] followed by a reduction modulo 5, input:
^2-1) mod 5