Macaulay2 » Documentation
Packages » Macaulay2Doc > getting started > reading the documentation > examples
next | previous | forward | backward | up | index | toc

examples -- list the examples in documentation

Synopsis

Description

The output is returned as a Net of height 0, so the examples will be displayed indented by just white space, allowing immediate entry.

i1 : ex := examples(resolution, Ideal)

o1 = 
     R = ZZ[a..d]
     I = ideal(a,b,c,d)
     C = res I
     C_2
     C.dd_2
i2 : last capture ex 

o2 = 
     i1 : R = ZZ[a..d]

     o1 = R

     o1 : PolynomialRing

     i2 : I = ideal(a,b,c,d)

     o2 = ideal (a, b, c, d)

     o2 : Ideal of R

     i3 : C = res I

           1      4      6      4      1
     o3 = R  <-- R  <-- R  <-- R  <-- R  <-- 0
                                              
          0      1      2      3      4      5

     o3 : ChainComplex

     i4 : C_2

           6
     o4 = R

     o4 : R-module, free, degrees {6:2}

     i5 : C.dd_2

     o5 = {1} | -b 0  -c 0  0  -d |
          {1} | a  -c 0  0  -d 0  |
          {1} | 0  b  a  -d 0  0  |
          {1} | 0  0  0  c  b  a  |

                  4      6
     o5 : Matrix R  <-- R

     i6 : 

Alternatively, one could use print to display them with no indentation.

i3 : print ex
R = ZZ[a..d]
I = ideal(a,b,c,d)
C = res I
C_2
C.dd_2

See also

Ways to use examples :

For the programmer

The object examples is a method function with a single argument.