Your first input prompt will be `i1 : `. In response to the prompt, type `2+2` and press return. The expression you entered will be evaluated - no punctuation is required at the end of the line.

i1 : 2+2 o1 = 4 |

Here is some arithmetic with fractions.

i2 : 3/5 + 7/11 68 o2 = -- 55 o2 : QQ |

Notice the additional line of output labeled with `o2 :`. Output lines labeled with colons provide information about the type of output. In this case, the symbol QQ is our notation for the class of all rational numbers, and indicates that the answer on the previous line is a rational number.

Multiplication is indicated with *.

i3 : 1*2*3*4 o3 = 24 |

i4 : 2^200 o4 = 1606938044258990275541962092341162602522202993782792835301376 |

i5 : 40! o5 = 815915283247897734345611269596115894272000000000 |

i6 : 100! o6 = 933262154439441526816992388562667004907159682643816214685929638952175999 932299156089414639761565182862536979208272237582511852109168640000000000 00000000000000 |

i7 : 1;2;3*4 o9 = 12 |

i10 : 4*5; |

i11 : oo o11 = 20 |

i12 : o5 + 1 o12 = 815915283247897734345611269596115894272000000001 |

i13 : "hi there" o13 = hi there |

i14 : s = "hi there" o14 = hi there |

i15 : s | " - " | s o15 = hi there - hi there |

i16 : s || " - " || s o16 = hi there - hi there |

i17 : {1, 2, s} o17 = {1, 2, hi there} o17 : List |

i18 : 10*{1,2,3} + {1,1,1} o18 = {11, 21, 31} o18 : List |

i19 : f = i -> i^3 o19 = f o19 : FunctionClosure |

i20 : f 5 o20 = 125 |

i21 : g = (x,y) -> x * y o21 = g o21 : FunctionClosure |

i22 : g(6,9) o22 = 54 |

i23 : apply({1,2,3,4}, i -> i^2) o23 = {1, 4, 9, 16} o23 : List |

i24 : apply({1,2,3,4}, f) o24 = {1, 8, 27, 64} o24 : List |

i25 : apply(1 .. 4, f) o25 = (1, 8, 27, 64) o25 : Sequence |

i26 : apply(5, f) o26 = {0, 1, 8, 27, 64} o26 : List |

i27 : scan(5, i -> print (i, i^3)) (0, 0) (1, 1) (2, 8) (3, 27) (4, 64) |

i28 : j=1; scan(10, i -> j = 2*j); j o30 = 1024 |

i31 : R = ZZ/5[x,y,z]; |

i32 : (x+y)^5 5 5 o32 = x + y o32 : R |

i33 : R o33 = R o33 : PolynomialRing |

i34 : describe R ZZ o34 = --[x..z, Degrees => {3:1}, Heft => {1}, MonomialOrder => {MonomialSize => 32}, DegreeRank => 1] 5 {GRevLex => {3:1} } {Position => Up } |

i35 : F = R^3 3 o35 = R o35 : R-module, free |

i36 : F_1 o36 = | 0 | | 1 | | 0 | 3 o36 : R |

i37 : F_{1,2} o37 = | 0 0 | | 1 0 | | 0 1 | 3 2 o37 : Matrix R <--- R |

i38 : F_{2,1,1} o38 = | 0 0 0 | | 0 1 1 | | 1 0 0 | 3 3 o38 : Matrix R <--- R |

i39 : f = matrix {{x,y,z}} o39 = | x y z | 1 3 o39 : Matrix R <--- R |

i40 : image f o40 = image | x y z | 1 o40 : R-module, submodule of R |

i41 : ideal (x,y,z) o41 = ideal (x, y, z) o41 : Ideal of R |

i42 : kernel f o42 = image {1} | -y 0 -z | {1} | x -z 0 | {1} | 0 y x | 3 o42 : R-module, submodule of R |

i43 : generators oo o43 = {1} | -y 0 -z | {1} | x -z 0 | {1} | 0 y x | 3 3 o43 : Matrix R <--- R |

i44 : poincare kernel f 2 3 o44 = 3T - T o44 : ZZ[T] |

i45 : rank kernel f o45 = 2 |

i46 : presentation kernel f o46 = {2} | z | {2} | x | {2} | -y | 3 1 o46 : Matrix R <--- R |

i47 : cokernel f o47 = cokernel | x y z | 1 o47 : R-module, quotient of R |

i48 : N = kernel f ++ cokernel f o48 = subquotient ({1} | -y 0 -z 0 |, {1} | 0 0 0 |) {1} | x -z 0 0 | {1} | 0 0 0 | {1} | 0 y x 0 | {1} | 0 0 0 | {0} | 0 0 0 1 | {0} | x y z | 4 o48 : R-module, subquotient of R |

i49 : generators N o49 = {1} | -y 0 -z 0 | {1} | x -z 0 0 | {1} | 0 y x 0 | {0} | 0 0 0 1 | 4 4 o49 : Matrix R <--- R |

i50 : relations N o50 = {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {0} | x y z | 4 3 o50 : Matrix R <--- R |

i51 : prune N o51 = cokernel {2} | 0 0 0 z | {2} | 0 0 0 x | {2} | 0 0 0 -y | {0} | z y x 0 | 4 o51 : R-module, quotient of R |

i52 : C = resolution cokernel f 1 3 3 1 o52 = R <-- R <-- R <-- R <-- 0 0 1 2 3 4 o52 : ChainComplex |

i53 : C.dd 1 3 o53 = 0 : R <------------- R : 1 | x y z | 3 3 1 : R <-------------------- R : 2 {1} | -y -z 0 | {1} | x 0 -z | {1} | 0 x y | 3 1 2 : R <-------------- R : 3 {2} | z | {2} | -y | {2} | x | 1 3 : R <----- 0 : 4 0 o53 : ChainComplexMap |

i54 : C.dd^2 == 0 o54 = true |

i55 : betti C 0 1 2 3 o55 = total: 1 3 3 1 0: 1 3 3 1 o55 : BettiTally |

i56 : R = ZZ/101[a .. r]; |

i57 : g = genericMatrix(R,a,3,6) o57 = | a d g j m p | | b e h k n q | | c f i l o r | 3 6 o57 : Matrix R <--- R |

i58 : M = cokernel g o58 = cokernel | a d g j m p | | b e h k n q | | c f i l o r | 3 o58 : R-module, quotient of R |

i59 : time C = resolution M -- used 0.00107407 seconds 3 6 15 18 6 o59 = R <-- R <-- R <-- R <-- R <-- 0 0 1 2 3 4 5 o59 : ChainComplex |

i60 : betti C 0 1 2 3 4 o60 = total: 3 6 15 18 6 0: 3 6 . . . 1: . . . . . 2: . . 15 18 6 o60 : BettiTally |

i61 : S = ZZ/101[t_1 .. t_9, u_1 .. u_9]; |

i62 : m = genericMatrix(S, t_1, 3, 3) o62 = | t_1 t_4 t_7 | | t_2 t_5 t_8 | | t_3 t_6 t_9 | 3 3 o62 : Matrix S <--- S |

i63 : n = genericMatrix(S, u_1, 3, 3) o63 = | u_1 u_4 u_7 | | u_2 u_5 u_8 | | u_3 u_6 u_9 | 3 3 o63 : Matrix S <--- S |

i64 : m*n o64 = | t_1u_1+t_4u_2+t_7u_3 t_1u_4+t_4u_5+t_7u_6 t_1u_7+t_4u_8+t_7u_9 | | t_2u_1+t_5u_2+t_8u_3 t_2u_4+t_5u_5+t_8u_6 t_2u_7+t_5u_8+t_8u_9 | | t_3u_1+t_6u_2+t_9u_3 t_3u_4+t_6u_5+t_9u_6 t_3u_7+t_6u_8+t_9u_9 | 3 3 o64 : Matrix S <--- S |

i65 : j = flatten(m*n - n*m) o65 = | t_4u_2+t_7u_3-t_2u_4-t_3u_7 t_2u_1-t_1u_2+t_5u_2+t_8u_3-t_2u_5-t_3u_8 ----------------------------------------------------------------------- t_3u_1+t_6u_2-t_1u_3+t_9u_3-t_2u_6-t_3u_9 ----------------------------------------------------------------------- -t_4u_1+t_1u_4-t_5u_4+t_4u_5+t_7u_6-t_6u_7 -t_4u_2+t_2u_4+t_8u_6-t_6u_8 ----------------------------------------------------------------------- -t_4u_3+t_3u_4+t_6u_5-t_5u_6+t_9u_6-t_6u_9 ----------------------------------------------------------------------- -t_7u_1-t_8u_4+t_1u_7-t_9u_7+t_4u_8+t_7u_9 ----------------------------------------------------------------------- -t_7u_2-t_8u_5+t_2u_7+t_5u_8-t_9u_8+t_8u_9 -t_7u_3-t_8u_6+t_3u_7+t_6u_8 ----------------------------------------------------------------------- | 1 9 o65 : Matrix S <--- S |

i66 : gb j o66 = GroebnerBasis[status: done; S-pairs encountered up to degree 5] o66 : GroebnerBasis |

i67 : generators gb j; 1 26 o67 : Matrix S <--- S |

We can use betti to see the degrees involved in the Gröbner basis.

i68 : betti gb j 0 1 o68 = total: 1 26 0: 1 . 1: . 8 2: . 12 3: . 5 4: . 1 o68 : BettiTally |