Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 1302

Macaulay2-1.3.1-8.fc15.i686.rpm

-- -*- M2-comint -*- {* hash: -1501724747 *}

i1 : 2+2

o1 = 4

i2 : 107*431

o2 = 46117

i3 : 25!

o3 = 15511210043330985984000000

i4 : binomial(5,4)

o4 = 5

i5 : factor 32004

      2 2
o5 = 2 3 7*127

o5 : Expression of class Product

i6 : ZZ/101

      ZZ
o6 = ---
     101

o6 : QuotientRing

i7 : QQ

o7 = QQ

o7 : Ring

i8 : GF 2^5

o8 = GF 32

o8 : GaloisField

i9 : k = toField (QQ[i]/(i^2+1))

o9 = k

o9 : PolynomialRing

i10 : 1/i

o10 = -i

o10 : k

i11 : kk=ZZ/101

o11 = kk

o11 : QuotientRing

i12 : S=kk[x_1..x_5]

o12 = S

o12 : PolynomialRing

i13 : S=kk[a,b,c,d,e]

o13 = S

o13 : PolynomialRing

i14 : (3*a^2+1)^5

         10    8      6      4      2
o14 = 41a   + a  - 33a  - 11a  + 15a  + 1

o14 : S

i15 : I=ideal(a^3-b^3, a+b+c+d+e)

              3    3
o15 = ideal (a  - b , a + b + c + d + e)

o15 : Ideal of S

i16 : R=S/I

o16 = R

o16 : QuotientRing

i17 : use S

o17 = S

o17 : PolynomialRing

i18 : I=ideal"3(a+b)3, 4c5"

               3     2        2     3    5
o18 = ideal (3a  + 9a b + 9a*b  + 3b , 4c )

o18 : Ideal of S

i19 : I^2

               6      5       4 2      3 3      2 4        5     6     3 5  
o19 = ideal (9a  - 47a b + 34a b  - 22a b  + 34a b  - 47a*b  + 9b , 12a c  +
      -----------------------------------------------------------------------
         2   5        2 5      3 5     10
      36a b*c  + 36a*b c  + 12b c , 16c  )

o19 : Ideal of S

i20 : I*I

               6      5       4 2      3 3      2 4        5     6     3 5  
o20 = ideal (9a  - 47a b + 34a b  - 22a b  + 34a b  - 47a*b  + 9b , 12a c  +
      -----------------------------------------------------------------------
         2   5        2 5      3 5     3 5      2   5        2 5      3 5 
      36a b*c  + 36a*b c  + 12b c , 12a c  + 36a b*c  + 36a*b c  + 12b c ,
      -----------------------------------------------------------------------
         10
      16c  )

o20 : Ideal of S

i21 : I+ideal"a2"

               3     2        2     3    5   2
o21 = ideal (3a  + 9a b + 9a*b  + 3b , 4c , a )

o21 : Ideal of S

i22 : M= matrix{{a,b,c},{b,c,d},{c,d,e}}

o22 = | a b c |
      | b c d |
      | c d e |

              3       3
o22 : Matrix S  <--- S

i23 : M^2

o23 = | a2+b2+c2 ab+bc+cd ac+bd+ce |
      | ab+bc+cd b2+c2+d2 bc+cd+de |
      | ac+bd+ce bc+cd+de c2+d2+e2 |

              3       3
o23 : Matrix S  <--- S

i24 : determinant M

         3               2    2
o24 = - c  + 2b*c*d - a*d  - b e + a*c*e

o24 : S

i25 : trace M

o25 = a + c + e

o25 : S

i26 : M-transpose M

o26 = 0

              3       3
o26 : Matrix S  <--- S

i27 : entries M

o27 = {{a, b, c}, {b, c, d}, {c, d, e}}

o27 : List

i28 : flatten entries M

o28 = {a, b, c, b, c, d, c, d, e}

o28 : List

i29 : M_(0,0)

o29 = a

o29 : S

i30 : I_0

        3     2        2     3
o30 = 3a  + 9a b + 9a*b  + 3b

o30 : S

i31 : I_*

         3     2        2     3    5
o31 = {3a  + 9a b + 9a*b  + 3b , 4c }

o31 : List

i32 : coker M

o32 = cokernel | a b c |
               | b c d |
               | c d e |

                             3
o32 : S-module, quotient of S

i33 : image M

o33 = image | a b c |
            | b c d |
            | c d e |

                              3
o33 : S-module, submodule of S

i34 : kernel matrix"a,b,0;0,a,b"

o34 = image {1} | b2  |
            {1} | -ab |
            {1} | a2  |

                              3
o34 : S-module, submodule of S

i35 : N = matrix{{a,b},{b,c},{c,d}}

o35 = | a b |
      | b c |
      | c d |

              3       2
o35 : Matrix S  <--- S

i36 : (image M)/(image N)

o36 = subquotient (| a b c |, | a b |)
                   | b c d |  | b c |
                   | c d e |  | c d |

                                3
o36 : S-module, subquotient of S

i37 : subquotient(M,N)

o37 = subquotient (| a b c |, | a b |)
                   | b c d |  | b c |
                   | c d e |  | c d |

                                3
o37 : S-module, subquotient of S

i38 : kk = ZZ/32003

o38 = kk

o38 : QuotientRing

i39 : R = kk[x,y,z,w]

o39 = R

o39 : PolynomialRing

i40 : I = ideal(x^2*y,x*y^2+x^3)

              2    3      2
o40 = ideal (x y, x  + x*y )

o40 : Ideal of R

i41 : J = groebnerBasis I

o41 = | x2y x3+xy2 xy3 |

              1       3
o41 : Matrix R  <--- R

i42 : I= intersect (ideal"x2,y3", ideal"y2,z3", (ideal"x,y,z")^4)

              3    4     3   2 2   2 3
o42 = ideal (y z, y , x*y , x y , x z )

o42 : Ideal of R

i43 : primaryDecomposition I

               2   3           2   3              4
o43 = {ideal (x , y ), ideal (y , z ), ideal (x, y , z)}

o43 : List

i44 : decompose I

o44 = {ideal (y, x), ideal (y, z)}

o44 : List

i45 : R = kk[a..d]

o45 = R

o45 : PolynomialRing

i46 : phi = map(kk[s,t],R,{s^4, s^3*t, s*t^3, t^4})

                       4   3      3   4
o46 = map(kk[s, t],R,{s , s t, s*t , t })

o46 : RingMap kk[s, t] <--- R

i47 : I = ker phi

                         3      2     2    2    3    2
o47 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)

o47 : Ideal of R

i48 : I = monomialCurveIdeal(R,{1,3,4})

                         3      2     2    2    3    2
o48 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)

o48 : Ideal of R

i49 : dim I

o49 = 2

i50 : codim I

o50 = 2

i51 : degree I

o51 = 4

i52 : hilbertPolynomial(R/I)

o52 = - 3*P  + 4*P
           0      1

o52 : ProjectiveHilbertPolynomial

i53 : hilbertPolynomial(R/I, Projective => false)

o53 = 4i + 1

o53 : QQ[i]

i54 : hilbertPolynomial(R/I, Projective => true)

o54 = - 3*P  + 4*P
           0      1

o54 : ProjectiveHilbertPolynomial

i55 : hilbertSeries (R/I)

           2     3     4    5
      1 - T  - 3T  + 4T  - T
o55 = -----------------------
                     4
              (1 - T)

o55 : Expression of class Divide

i56 : reduceHilbert hilbertSeries (R/I)

                 2    3
      1 + 2T + 2T  - T
o56 = -----------------
                  2
           (1 - T)

o56 : Expression of class Divide

i57 : M=R^1/I

o57 = cokernel | bc-ad c3-bd2 ac2-b2d b3-a2c |

                             1
o57 : R-module, quotient of R

i58 : Mres = res M

       1      4      4      1
o58 = R  <-- R  <-- R  <-- R  <-- 0
                                   
      0      1      2      3      4

o58 : ChainComplex

i59 : betti Mres

             0 1 2 3
o59 = total: 1 4 4 1
          0: 1 . . .
          1: . 1 . .
          2: . 3 4 1

o59 : BettiTally

i60 : pdim M

o60 = 3

i61 : regularity M

o61 = 2

i62 : R = kk[a..i]

o62 = R

o62 : PolynomialRing

i63 : M = genericMatrix(R,a,3,3)

o63 = | a d g |
      | b e h |
      | c f i |

              3       3
o63 : Matrix R  <--- R

i64 : I = ideal M^3

              3                                                     2     2 
o64 = ideal (a  + 2a*b*d + b*d*e + 2a*c*g + b*f*g + c*d*h + c*g*i, a b + b d
      -----------------------------------------------------------------------
                   2                                           2           
      + a*b*e + b*e  + b*c*g + a*c*h + c*e*h + b*f*h + c*h*i, a c + b*c*d +
      -----------------------------------------------------------------------
                       2                               2   2       2        
      a*b*f + b*e*f + c g + c*f*h + a*c*i + b*f*i + c*i , a d + b*d  + a*d*e
      -----------------------------------------------------------------------
           2                                                            3  
      + d*e  + c*d*g + a*f*g + e*f*g + d*f*h + f*g*i, a*b*d + 2b*d*e + e  +
      -----------------------------------------------------------------------
                                                               2           
      b*f*g + c*d*h + 2e*f*h + f*h*i, a*c*d + c*d*e + b*d*f + e f + c*f*g +
      -----------------------------------------------------------------------
       2                       2   2               2                        
      f h + c*d*i + e*f*i + f*i , a g + b*d*g + c*g  + a*d*h + d*e*h + f*g*h
      -----------------------------------------------------------------------
                           2                           2               2  
      + a*g*i + d*h*i + g*i , a*b*g + b*e*g + b*d*h + e h + c*g*h + f*h  +
      -----------------------------------------------------------------------
                         2                                                   
      b*g*i + e*h*i + h*i , a*c*g + b*f*g + c*d*h + e*f*h + 2c*g*i + 2f*h*i +
      -----------------------------------------------------------------------
       3
      i )

o64 : Ideal of R

i65 : Tr = trace M

o65 = a + e + i

o65 : R

i66 : for p from 1 to 10 do print (Tr^p % I)
a + e + i
 2           2                  2
a  + 2a*e + e  + 2a*i + 2e*i + i
  2                 2     3                                2               2                          2       2     3
3a e + 3b*d*e + 3a*e  + 3e  + 3b*f*g + 3c*d*h + 6e*f*h + 3a i + 6a*e*i + 3e i + 3c*g*i + 6f*h*i + 3a*i  + 3e*i  + 3i
  2 2         2       3     4                                                  2                   2 2      2                       2       3                                                               2 2          2     2 2         2          2       3        3     4
6a e  + 6b*d*e  + 6a*e  + 6e  + 6b*e*f*g + 6c*d*e*h - 6b*d*f*h + 6a*e*f*h + 12e f*h - 6c*f*g*h - 6f h  + 12a e*i + 12b*d*e*i + 12a*e i + 12e i + 12c*e*g*i + 6b*f*g*i + 6c*d*h*i + 6a*f*h*i + 36e*f*h*i + 6a i  + 12a*e*i  + 6e i  + 6c*g*i  + 12f*h*i  + 6a*i  + 12e*i  + 6i
   2 2           2         3       4         2         2                                       2                         2 2       2   2            2        2 2      3 2            2            2             2      2 3          3          3      2 3          3          3        4        4      5
30a e i + 30b*d*e i + 30a*e i + 30e i + 30c*e g*i + 30a f*h*i + 30b*d*f*h*i + 60a*e*f*h*i + 90e f*h*i + 30c*f*g*h*i + 30f h i + 30a e*i  + 30b*d*e*i  + 30a*e i  + 30e i  + 30c*e*g*i  + 60a*f*h*i  + 120e*f*h*i  + 30a i  + 30b*d*i  + 30a*e*i  + 30e i  + 30c*g*i  + 90f*h*i  + 30a*i  + 30e*i  + 30i
   2 2 2          2 2        3 2      4 2        2   2      2     2              2               2       2     2              2      2 2 2      2   3            3        2 3      3 3            3             3             3      2 4          4          4      2 4          4           4        5        5      6
90a e i  + 90b*d*e i  + 90a*e i  + 90e i  + 90c*e g*i  + 90a f*h*i  + 90b*d*f*h*i  + 180a*e*f*h*i  + 270e f*h*i  + 90c*f*g*h*i  + 90f h i  + 90a e*i  + 90b*d*e*i  + 90a*e i  + 90e i  + 90c*e*g*i  + 180a*f*h*i  + 360e*f*h*i  + 90a i  + 90b*d*i  + 90a*e*i  + 90e i  + 90c*g*i  + 270f*h*i  + 90a*i  + 90e*i  + 90i
0
0
0
0

i67 : Tr^7//(gens I)

o67 = {3} | a4+7a3e+3abde+21a2e2+21bde2+37ae3+49e4+6aefh+36e2fh-6f2h2+7a3i+42
      {3} | 0                                                                
      {3} | 0                                                                
      {3} | -63abe2-81be3-288bcdh-297ce2h+636befh-264cfh2-189abei-315be2i-276
      {3} | -2a4-14a3e-6abde+21a2e2+30bde2+7ae3+e4+288abfg+939befg+45cdeh-6a2
      {3} | -288b2dg+324abeg+81be2g-288bcg2+3a3h+288abdh+18a2eh+288bdeh+279ae
      {3} | 288bcde-252ace2+282abef-378be2f+288bcfg-264acfh-378cefh+24bf2h-28
      {3} | 3a3f-288abdf-264a2ef-1212bdef+453ae2f-891e3f+333cefg-258cdfh-276a
      {3} | -2a4+288b2d2-14a3e-618abde+210a2e2-132bde2-74ae3-98e4+288bcdg+252
      -----------------------------------------------------------------------
      a2ei+21bdei+105ae2i+154e3i+6afhi+75efhi+21a2i2+105aei2+210e2i2+30fhi2+3
                                                                             
                                                                             
      cehi+1323bfhi-252abi2-504bei2+105chi2-288bi3                           
      fh-672aefh+687e2fh+258cfgh-12f2h2-14a3i+105a2ei+147bdei+42ae2i+7e3i+147
      2h+300e3h+45cegh-546bfgh+276afh2+684efh2+612abgi+834begi+15a2hi+171bdhi
      8bcdi-168acei-504ce2i+540abfi+18befi-1347cfhi-48aci2-336cei2+1482bfi2-9
      f2h-1200ef2h-147cdei-525a2fi-2070bdfi+426aefi-1122e2fi+666cfgi-2169f2hi
      ce2g-288abfg-939befg-45cdeh+258a2fh+810bdfh+612aefh-255e2fh+264cfgh+540
      -----------------------------------------------------------------------
      7ai3+154ei3+46i4                                                       
                                                                             
                                                                             
                                                                             
      cegi+1530bfgi+153cdhi-1365afhi+1581efhi+210a2i2+252bdi2+105aei2+21e2i2+
      +159aehi+510e2hi+153cghi+1101fh2i+624bgi2-324ahi2+360ehi2+210hi3       
      6ci3                                                                   
      -240cdi2-1497afi2+528efi2-567fi3                                       
      f2h2-11a3i-324abdi+105a2ei-510bdei+105ae2i-197e3i+168cegi-1530bfgi-153c
      -----------------------------------------------------------------------
                                                                            
                                                                            
                                                                            
                                                                            
      240cgi2+639fhi2+214ai3+133ei3+232i4                                   
                                                                            
                                                                            
                                                                            
      dhi+1593afhi-1143efhi+21a2i2+42aei2+21e2i2+48cgi2+123fhi2+7ai3+7ei3+i4
      -----------------------------------------------------------------------
      |
      |
      |
      |
      |
      |
      |
      |
      |

              9       1
o67 : Matrix R  <--- R

i68 : x = symbol x

o68 = x

o68 : Symbol

i69 : R = kk[x_0..x_3]

o69 = R

o69 : PolynomialRing

i70 : M = map(R^2, 3, (i,j)->x_(i+j))

o70 = | x_0 x_1 x_2 |
      | x_1 x_2 x_3 |

              2       3
o70 : Matrix R  <--- R

i71 : I = minors(2,M)

                2                           2
o71 = ideal (- x  + x x , - x x  + x x , - x  + x x )
                1    0 2     1 2    0 3     2    1 3

o71 : Ideal of R

i72 : pideal = ideal(x_0+x_3, x_1, x_2)

o72 = ideal (x  + x , x , x )
              0    3   1   2

o72 : Ideal of R

i73 : Rbar = R/I

o73 = Rbar

o73 : QuotientRing

i74 : pideal = substitute(pideal, Rbar)

o74 = ideal (x  + x , x , x )
              0    3   1   2

o74 : Ideal of Rbar

i75 : S = kk[u,v,w]

o75 = S

o75 : PolynomialRing

i76 : J=kernel map (Rbar, S, gens pideal)

             3            3
o76 = ideal(v  - u*v*w + w )

o76 : Ideal of S

i77 : K = ideal singularLocus(J)

              3            3          2                  2
o77 = ideal (v  - u*v*w + w , -v*w, 3v  - u*w, - u*v + 3w )

o77 : Ideal of S

i78 : saturate K

o78 = ideal (w, v)

o78 : Ideal of S

i79 : saturate (ideal"u3w,uv", ideal"u")

o79 = ideal (w, v)

o79 : Ideal of S

i80 : ideal"u3w,uv":ideal"u"

                 2
o80 = ideal (v, u w)

o80 : Ideal of S

i81 : Collatz = n ->
          while n != 1 list if n%2 == 0 then n=n//2 else n=3*n+1

o81 = Collatz

o81 : FunctionClosure

i82 : Collatz 27

o82 = {82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242,
      -----------------------------------------------------------------------
      121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700,
      -----------------------------------------------------------------------
      350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668,
      -----------------------------------------------------------------------
      334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319,
      -----------------------------------------------------------------------
      958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644,
      -----------------------------------------------------------------------
      1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154,
      -----------------------------------------------------------------------
      577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92,
      -----------------------------------------------------------------------
      46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1}

o82 : List

i83 : tally for n from 1 to 30 list length Collatz n

o83 = Tally{0 => 1  }
            1 => 1
            2 => 1
            3 => 1
            4 => 1
            5 => 1
            6 => 1
            7 => 3
            8 => 1
            9 => 2
            10 => 2
            12 => 1
            14 => 1
            15 => 2
            16 => 1
            17 => 2
            18 => 3
            19 => 1
            20 => 2
            23 => 1
            111 => 1

o83 : Tally

i84 : record = length Collatz 1

o84 = 0

i85 : L = for n from 2 to 1000 list (
              l = length Collatz n;
              if l > record
                then (record = l; (n,l))
                else continue)

o85 = {(2, 1), (3, 7), (6, 8), (7, 16), (9, 19), (18, 20), (25, 23), (27,
      -----------------------------------------------------------------------
      111), (54, 112), (73, 115), (97, 118), (129, 121), (171, 124), (231,
      -----------------------------------------------------------------------
      127), (313, 130), (327, 143), (649, 144), (703, 170), (871, 178)}

o85 : List

i86 : L/last

o86 = {1, 7, 8, 16, 19, 20, 23, 111, 112, 115, 118, 121, 124, 127, 130, 143,
      -----------------------------------------------------------------------
      144, 170, 178}

o86 : List

i87 : loadPackage "EdgeIdeals"

o87 = EdgeIdeals

o87 : Package

i88 : R = kk[vars(0..10)]

o88 = R

o88 : PolynomialRing

i89 : G=randomGraph (R,20)

o89 = Graph{edges => {{a, c}, {c, d}, {d, g}, {d, i}, {g, j}, {g, k}, {c, e}, {d, j}, {f, g}, {f, i}, {c, k}, {g, i}, {i, j}, {c, h}, {e, g}, {a, g}, {e, i}, {e, h}, {b, f}, {d, h}}}
            ring => R
            vertices => {a, b, c, d, e, f, g, h, i, j, k}

o89 : Graph

i90 : K=edgeIdeal G

o90 = monomialIdeal (a*c, c*d, c*e, b*f, a*g, d*g, e*g, f*g, c*h, d*h, e*h,
      -----------------------------------------------------------------------
      d*i, e*i, f*i, g*i, d*j, g*j, i*j, c*k, g*k)

o90 : MonomialIdeal of R

i91 : hilbertSeries K

             2      3      4      5       6       7      8      9     10
      1 - 20T  + 60T  - 63T  - 14T  + 105T  - 120T  + 70T  - 22T  + 3T
o91 = ------------------------------------------------------------------
                                          11
                                   (1 - T)

o91 : Expression of class Divide

i92 : betti res K

             0  1  2   3   4   5  6  7 8
o92 = total: 1 20 77 153 190 153 78 23 3
          0: 1  .  .   .   .   .  .  . .
          1: . 20 60  80  59  26  7  1 .
          2: .  . 17  73 131 127 71 22 3

o92 : BettiTally

i93 : R = ZZ/2[vars(0..10)]

o93 = R

o93 : PolynomialRing

i94 : L=for j from 1 to 100 list(
          I = edgeIdeal randomGraph (R,5);
          (codim I, degree I, betti res I));

i95 : tally L

                           0 1 2 3 4
o95 = Tally{(4, 12, total: 1 5 9 7 2) => 16  }
                        0: 1 . . . .
                        1: . 5 2 . .
                        2: . . 7 4 .
                        3: . . . 3 2
                          0 1  2  3 4 5
            (2, 1, total: 1 5 10 10 5 1) => 6
                       0: 1 .  .  . . .
                       1: . 5  4  1 . .
                       2: . .  6  9 5 1
                          0 1  2  3 4 5
            (2, 2, total: 1 5 10 10 5 1) => 1
                       0: 1 .  .  . . .
                       1: . 5  6  4 1 .
                       2: . .  4  6 4 1
                          0 1  2  3 4 5
            (3, 2, total: 1 5 10 10 5 1) => 9
                       0: 1 .  .  . . .
                       1: . 5  2  . . .
                       2: . .  8  6 1 .
                       3: . .  .  4 4 1
                          0 1  2  3 4 5
            (3, 4, total: 1 5 10 10 5 1) => 5
                       0: 1 .  .  . . .
                       1: . 5  3  1 . .
                       2: . .  7  6 2 .
                       3: . .  .  3 3 1
                          0 1  2  3 4 5
            (4, 8, total: 1 5 10 10 5 1) => 7
                       0: 1 .  .  . . .
                       1: . 5  1  . . .
                       2: . .  9  3 . .
                       3: . .  .  7 3 .
                       4: . .  .  . 2 1
                          0 1 2 3
            (2, 1, total: 1 5 6 2) => 3
                       0: 1 . . .
                       1: . 5 6 2
                          0 1 2 3
            (3, 5, total: 1 5 6 2) => 4
                       0: 1 . . .
                       1: . 5 5 1
                       2: . . 1 1
                          0 1 2 3 4
            (2, 1, total: 1 5 7 4 1) => 2
                       0: 1 . . . .
                       1: . 5 5 1 .
                       2: . . 2 3 1
                          0 1 2 3 4
            (2, 2, total: 1 5 7 4 1) => 1
                       0: 1 . . . .
                       1: . 5 7 4 1
                          0 1 2 3 4
            (3, 2, total: 1 5 8 5 1) => 13
                       0: 1 . . . .
                       1: . 5 3 . .
                       2: . . 5 4 .
                       3: . . . 1 1
                          0 1 2 3 4
            (3, 3, total: 1 5 9 7 2) => 21
                       0: 1 . . . .
                       1: . 5 3 . .
                       2: . . 6 7 2
                          0 1 2 3 4
            (3, 4, total: 1 5 7 4 1) => 2
                       0: 1 . . . .
                       1: . 5 4 . .
                       2: . . 3 4 1
                          0 1 2 3 4
            (3, 4, total: 1 5 8 5 1) => 10
                       0: 1 . . . .
                       1: . 5 4 1 .
                       2: . . 4 4 1

o95 : Tally

i96 : #tally L

o96 = 14

i97 : S^{-2,-3}

       2
o97 = S

o97 : S-module, free, degrees {2, 3}

i98 : S = kk[x,y]

o98 = S

o98 : PolynomialRing

i99 : phi1 = map(S^1, S^{-2,-3}, matrix"x2,xy2")

o99 = | x2 xy2 |

              1       2
o99 : Matrix S  <--- S

i100 : phi2 = map(S^{-2,-3}, S^{-5}, matrix"xy2;-x2")

o100 = {2} | xy2 |
       {3} | -x2 |

               2       1
o100 : Matrix S  <--- S

i101 : phi1*phi2

o101 = 0

               1       1
o101 : Matrix S  <--- S

i102 : (ker phi1)/(image phi2)

o102 = subquotient ({2} | y2 |, {2} | xy2 |)
                    {3} | -x |  {3} | -x2 |

                                 2
o102 : S-module, subquotient of S

i103 : FF = chainComplex(phi1,phi2)

        1      2      1
o103 = S  <-- S  <-- S
                      
       0      1      2

o103 : ChainComplex

i104 : FF.dd

            1                  2
o104 = 0 : S  <-------------- S  : 1
                 | x2 xy2 |

            2                   1
       1 : S  <--------------- S  : 2
                 {2} | xy2 |
                 {3} | -x2 |

o104 : ChainComplexMap

i105 : homology FF

o105 = 0 : cokernel | x2 xy2 |                  

       1 : subquotient ({2} | y2 |, {2} | xy2 |)
                        {3} | -x |  {3} | -x2 |

       2 : image 0                              

o105 : GradedModule

i106 : presentation (homology FF)_1

o106 = {4} | x |

               1       1
o106 : Matrix S  <--- S

i107 : FF = chainComplex matrix {{x^2}} ** chainComplex matrix {{x*y^2}}

        1      2      1
o107 = S  <-- S  <-- S
                      
       0      1      2

o107 : ChainComplex

i108 : FF.dd

            1                  2
o108 = 0 : S  <-------------- S  : 1
                 | xy2 x2 |

            2                    1
       1 : S  <---------------- S  : 2
                 {3} | x2   |
                 {2} | -xy2 |

o108 : ChainComplexMap

i109 : FF = koszul matrix {{x^2, x*y^2}}

        1      2      1
o109 = S  <-- S  <-- S
                      
       0      1      2

o109 : ChainComplex

i110 : FF.dd

            1                  2
o110 = 0 : S  <-------------- S  : 1
                 | x2 xy2 |

            2                    1
       1 : S  <---------------- S  : 2
                 {2} | -xy2 |
                 {3} | x2   |

o110 : ChainComplexMap

i111 : S=kk[a,b,c,d]

o111 = S

o111 : PolynomialRing

i112 : IX = intersect(ideal(a,b), ideal(c,d))

o112 = ideal (b*d, a*d, b*c, a*c)

o112 : Ideal of S

i113 : IY = ideal(a-c, b-d)

o113 = ideal (a - c, b - d)

o113 : Ideal of S

i114 : degree ((S^1/IX) ** (S^1/IY))

o114 = 3

i115 : for j from 0 to 4 list degree Tor_j(S^1/IX, S^1/IY)

o115 = {3, 1, 0, 0, 0}

o115 : List

i116 : sum(0..4, j-> (-1)^j * degree Tor_j(S^1/IX, S^1/IY))

o116 = 2

i117 : Hom(IX, S^1/IX)

o117 = subquotient ({-2} | b d 0 0 |, {-2} | bd ad bc ac 0  0  0  0  0  0  0  0  0  0  0  0  |)
                    {-2} | a 0 d 0 |  {-2} | 0  0  0  0  bd ad bc ac 0  0  0  0  0  0  0  0  |
                    {-2} | 0 c 0 b |  {-2} | 0  0  0  0  0  0  0  0  bd ad bc ac 0  0  0  0  |
                    {-2} | 0 0 c a |  {-2} | 0  0  0  0  0  0  0  0  0  0  0  0  bd ad bc ac |

                                 4
o117 : S-module, subquotient of S

i118 : Ext^1(IX, S^1/IX)

o118 = cokernel {-2} | b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 |
                {-2} | 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 |
                {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 |
                {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c |

                              6
o118 : S-module, quotient of S

i119 : HH^1 (sheaf (S^{-2}**(S^1/IX)))

         2
o119 = kk

o119 : kk-module, free

i120 :