-- MATH 531 -- Aug 30 -- Basics -- every comment starts with "--" QQ -- rational numbers 3/4 111.345 12124 + 121*ii ZZ -- integers ZZ/102 isPrime 101 ZZ/101 -- finite fields (use a prime only) a = 4/5 ring a -- the ring of a --- Polynomial rings --- R = QQ[x,y,z] -- a basic definition of a polynomial ring R describe R -- gives a better idea of what R is than just "R" coefficientRing R 0_R -- this is a zero in the ring 0 -- this is an integer 1_R 8_R R_0 -- 0th var R_2 -- 2nd var index y numgens R gens R -- variables in a list vars R -- variables in a matrix -- Polynomials -- f = random(3,R) -- a random polynomial of degree 3 degree f y^2 > x*z y^2 ? x*z restart -- restarts M2 R = QQ[x,y,z,MonomialOrder=>Lex] -- a ring with lex order f = y^2-x*z listForm f -- a list of exponent vectors -- and corresponding coefficients leadMonomial f size f -- the number of monomials