Used canned versions of examples that have been known to
authorDoug Torrance <dtorrance@piedmont.edu>
Sun, 24 Jan 2021 13:57:47 +0000 (13:57 +0000)
committerDoug Torrance <dtorrance@piedmont.edu>
Sun, 24 Jan 2021 13:57:47 +0000 (13:57 +0000)
Bug: https://github.com/Macaulay2/M2/issues/1429
Bug: https://github.com/Macaulay2/M2/issues/1463
Bug: https://github.com/Macaulay2/M2/issues/1539
Bug: https://github.com/Macaulay2/M2/issues/1557
Bug: https://github.com/Macaulay2/M2/issues/1676
Bug: https://github.com/Macaulay2/M2/issues/1707
Last-Update: 2020-12-27

fail on various architectures.

Gbp-Pq: Name use-canned-examples.patch

M2/Macaulay2/packages/AlgebraicSplines.m2
M2/Macaulay2/packages/MultiplicitySequence.m2
M2/Macaulay2/packages/NoetherianOperators.m2
M2/Macaulay2/packages/SpecialFanoFourfolds.m2
M2/Macaulay2/packages/TateOnProducts.m2
M2/Macaulay2/packages/TestIdeals/compatiblySplitDoc.m2
M2/Macaulay2/packages/ThreadedGB.m2
M2/Macaulay2/packages/Topcom.m2

index 0947e6001ff2f2588c6ab2e640ff1b979788e52d..88351694e56d1d64046067722e16bb7d890d8d03 100644 (file)
@@ -2506,11 +2506,40 @@ doc ///
        Text
            The above example shows that the Billera-Schenck-Stillman spline complex is the cokernel of the natural map between the complex
            of ideals (given by idealsComplex) and the cellular chain complex of $\Delta$ relative to its boundary.
-       Example
-           V = {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}, {-2, -2, -2}, {-2, 2, -2}, {2, 2, -2}, {2, -2, -2}, {-2, -2, 2}, {-2, 2, 2}, {2, 2, 2}, {2, -2, 2}};
-           F = {{0, 1, 2, 3, 4, 5}, {0, 8, 9, 12, 13}, {1, 6, 7, 10, 11}, {2, 7, 8, 11, 12}, {3, 6, 9, 10, 13}, {4, 10, 11, 12, 13}, {5, 6, 7, 8, 9}, {0, 2, 8, 12}, {0, 3, 9, 13}, {0, 4, 12, 13}, {0, 5, 8, 9}, {1, 2, 7, 11}, {1, 3, 6, 10}, {1, 4, 10, 11}, {1, 5, 6, 7}, {2, 4, 11, 12}, {3, 4, 10, 13}, {3, 5, 6, 9}, {2, 5, 7, 8}, {0, 2, 4, 12}, {0, 2, 5, 8}, {0, 3, 4, 13}, {0, 3, 5, 9}, {1, 2, 4, 11}, {1, 2, 5, 7}, {1, 3, 4, 10}, {1, 3, 5, 6}};
-           C = splineComplex(V,F,1);
-           associatedPrimes annihilator HH_2 C
+       CannedExample
+           i25 : V = {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}, {-2, -2, -2}, {-2, 2, -2}, {2, 2, -2}, {2, -2, -2}, {-2, -2, 2}, {-2, 2, 2}, {2, 2, 2}, {2, -2, 2}};
+
+           i26 : F = {{0, 1, 2, 3, 4, 5}, {0, 8, 9, 12, 13}, {1, 6, 7, 10, 11}, {2, 7, 8, 11, 12}, {3, 6, 9, 10, 13}, {4, 10, 11, 12, 13}, {5, 6, 7, 8, 9}, {0, 2, 8, 12}, {0, 3, 9, 13}, {0, 4, 12, 13}, {0, 5, 8, 9}, {1, 2, 7, 11}, {1, 3, 6, 10}, {1, 4, 10, 11}, {1, 5, 6, 7}, {2, 4, 11, 12}, {3, 4, 10, 13}, {3, 5, 6, 9}, {2, 5, 7, 8}, {0, 2, 4, 12}, {0, 2, 5, 8}, {0, 3, 4, 13}, {0, 3, 5, 9}, {1, 2, 4, 11}, {1, 2, 5, 7}, {1, 3, 4, 10}, {1, 3, 5, 6}};
+
+           i27 : C = splineComplex(V,F,1);
+
+           i28 : associatedPrimes annihilator HH_2 C
+
+           o28 = {ideal (t , t , t ), ideal (t , t , t ), ideal (t , t , t ), ideal (t ,
+                          3   2   0           3   2   1           3   1   0           2
+                 -----------------------------------------------------------------------
+                 t , t  - t ), ideal (t , t , t  + t ), ideal (t , t  - t , t ), ideal
+                  1   0    3           2   1   0    3           2   1    3   0
+                 -----------------------------------------------------------------------
+                 (t , t  + t , t ), ideal (t  - t , t , t ), ideal (t  + t , t , t ),
+                   2   1    3   0           2    3   1   0           2    3   1   0
+                 -----------------------------------------------------------------------
+                 ideal (t  - 2t , t  - 2t , t  - 2t ), ideal (t  - 2t , t  - 2t , t  +
+                         2     3   1     3   0     3           2     3   1     3   0
+                 -----------------------------------------------------------------------
+                 2t ), ideal (t  - 2t , t  + 2t , t  - 2t ), ideal (t  - 2t , t  + 2t ,
+                   3           2     3   1     3   0     3           2     3   1     3
+                 -----------------------------------------------------------------------
+                 t  + 2t ), ideal (t  + 2t , t  + 2t , t  - 2t ), ideal (t  + 2t , t  +
+                  0     3           2     3   1     3   0     3           2     3   1
+                 -----------------------------------------------------------------------
+                 2t , t  + 2t ), ideal (t  + 2t , t  - 2t , t  - 2t ), ideal (t  + 2t ,
+                   3   0     3           2     3   1     3   0     3           2     3
+                 -----------------------------------------------------------------------
+                 t  - 2t , t  + 2t ), ideal (t , t , t , t )}
+                  1     3   0     3           3   2   1   0
+
+           o28 : List
        Text
            The above example showcases a fairly complex three dimensional polyhedral complex.
            It is a three-dimensional analog of the Morgan-Scot partition in the sense that
index 6e4ecaa3c78c4e16904eefa93bed1053ac15e555..aeca191b039177644f01fa7560c5333c58430375 100644 (file)
@@ -493,11 +493,27 @@ doc ///
         Text
             Given a monomial ideal I, this function computes the j-multiplicity of I
            following the method of Jeffries-MontaƱo.
-        Example
-            R = QQ[x,y]
-           I = (ideal"xy5,x2y3,x3y2")^4
-            elapsedTime monjMult I
-            elapsedTime jMult I
+        CannedExample
+            i1 : R = QQ[x,y]
+
+            o1 = R
+
+            o1 : PolynomialRing
+
+            i2 : I = (ideal"xy5,x2y3,x3y2")^4
+
+                         4 20   5 18   6 17   6 16   7 15   8 14   7 14   8 13   9 12   10 11   8 12   9 11   10 10   11 9   12 8
+            o2 = ideal (x y  , x y  , x y  , x y  , x y  , x y  , x y  , x y  , x y  , x  y  , x y  , x y  , x  y  , x  y , x  y )
+
+            o2 : Ideal of R
+
+            i3 : elapsedTime monjMult I
+             -- 0.0945551 seconds elapsed
+
+            o3 = 192
+
+            i4 : elapsedTime jMult I
+             -- 1.15819 seconds elapsed
     SeeAlso
         multiplicitySequence
        jMult
index c6330c3c93510cef0047c0281ffc5fb071545cb3..e829ffb920753e18fffde4c813c45077fcd9a216 100644 (file)
@@ -3158,25 +3158,114 @@ Description
         Next, we provide several examples to show the interplay between computing a set of Noetherian operators and then getting the back the original ideal.
 
         The first example shows an ideal that can be described with two different sets of Noetherian operators (this example appeared in Example 7.8 of @ HREF("https://arxiv.org/abs/2001.04700", "Primary ideals and their differential equations")@).
-    Example
-        R = QQ[x_1,x_2,x_3,x_4]
-        MM = matrix {{x_3,x_1,x_2},{x_1,x_2,x_4}}
-        P = minors(2,MM)
-        M = ideal{x_1^2,x_2^2,x_3^2,x_4^2} 
-        Q = joinIdeals(P,M);
-        L1 = noetherianOperators(Q) -- A set of Noetherian operators
-        Q1 = getIdealFromNoetherianOperators(L1, P);
-        Q == Q1
-        L2 = noetherianOperators(M) -- Another set of Noetherian operators
-        Q2 = getIdealFromNoetherianOperators(L2, P);
-        Q == Q2
+    CannedExample
+        i1 : R = QQ[x_1,x_2,x_3,x_4]
+
+        o1 = R
+
+        o1 : PolynomialRing
+
+        i2 : MM = matrix {{x_3,x_1,x_2},{x_1,x_2,x_4}}
+
+        o2 = | x_3 x_1 x_2 |
+             | x_1 x_2 x_4 |
+
+                     2       3
+        o2 : Matrix R  <--- R
+
+        i3 : P = minors(2,MM)
+
+                       2                           2
+        o3 = ideal (- x  + x x , - x x  + x x , - x  + x x )
+                       1    2 3     1 2    3 4     2    1 4
+
+        o3 : Ideal of R
+
+        i4 : M = ideal{x_1^2,x_2^2,x_3^2,x_4^2}
+
+                     2   2   2   2
+        o4 = ideal (x , x , x , x )
+                     1   2   3   4
+
+        o4 : Ideal of R
+
+        i5 : Q = joinIdeals(P,M);
+
+        o5 : Ideal of R
+
+        i6 : L1 = noetherianOperators(Q) -- A set of Noetherian operators
+
+                                 2                 2      3           2      2          3            3                  2    2  
+        o6 = {1, dx_2, dx_1, dx_2 , dx_1*dx_2, dx_1 , dx_2 , dx_1*dx_2 , dx_1 dx_2, dx_1 , 72x x dx_1 dx_2 + 180x x dx_1 dx_2  +
+                                                                                              1 3                2 3            
+             ----------------------------------------------------------------------------------------------------------------------------
+                            3
+             72x x dx_1*dx_2 }
+                3 4
+
+        o6 : List
+
+        i7 : Q1 = getIdealFromNoetherianOperators(L1, P);
+
+        o7 : Ideal of R
+
+        i8 : Q == Q1
+
+        o8 = true
+
+        i9 : L2 = noetherianOperators(M) -- Another set of Noetherian operators
+
+        o9 = {1, dx_4, dx_3, dx_2, dx_1, dx_3*dx_4, dx_2*dx_4, dx_1*dx_4, dx_2*dx_3, dx_1*dx_3, dx_1*dx_2, dx_2*dx_3*dx_4,
+             ----------------------------------------------------------------------------------------------------------------------------
+             dx_1*dx_3*dx_4, dx_1*dx_2*dx_4, dx_1*dx_2*dx_3, dx_1*dx_2*dx_3*dx_4}
+
+        o9 : List
+
+        i10 : Q2 = getIdealFromNoetherianOperators(L2, P);
+
+        o10 : Ideal of R
+
+        i11 : Q == Q2
+
+        o11 = true
     Text
         The following example was given as the running example in the Introduction of @ HREF("https://arxiv.org/abs/2001.04700", "Primary ideals and their differential equations")@.
-    Example
-        Q = ideal(3*x_1^2*x_2^2-x_2^3*x_3-x_1^3*x_4-3*x_1*x_2*x_3*x_4+2*x_3^2*x_4^2,3*x_1^3*x_2*x_4-3*x_1*x_2^2*x_3*x_4-3*x_1^2*x_3*x_4^2+3*x_2*x_3^2*x_4^2+2*x_2^3-2*x_3*x_4^2,3*x_2^4*x_3-6*x_1*x_2^2*x_3*x_4+3*x_1^2*x_3*x_4^2+x_2^3-x_3*x_4^2,4*x_1*x_2^3*x_3+x_1^4*x_4-6*x_1^2*x_2*x_3*x_4-3*x_2^2*x_3^2*x_4+4*x_1*x_3^2*x_4^2,x_2^5-x_1*x_2^3*x_4-x_2^2*x_3*x_4^2+x_1*x_3*x_4^3,x_1*x_2^4-x_2^3*x_3*x_4-x_1*x_2*x_3*x_4^2+x_3^2*x_4^3,x_1^4*x_2-x_2^3*x_3^2-2*x_1^3*x_3*x_4+2*x_1*x_2*x_3^2*x_4,x_1^5-4*x_1^3*x_2*x_3+3*x_1*x_2^2*x_3^2+2*x_1^2*x_3^2*x_4-2*x_2*x_3^3*x_4,3*x_1^4*x_3*x_4-6*x_1^2*x_2*x_3^2*x_4+3*x_2^2*x_3^3*x_4+2*x_1^3*x_2+6*x_1*x_2^2*x_3-6*x_1^2*x_3*x_4-2*x_2*x_3^2*x_4,4*x_2^3*x_3^3+4*x_1^3*x_3^2*x_4-12*x_1*x_2*x_3^3*x_4+4*x_3^4*x_4^2-x_1^4+6*x_1^2*x_2*x_3+3*x_2^2*x_3^2-8*x_1*x_3^2*x_4)
-        L = noetherianOperators(Q)
-        Q' = getIdealFromNoetherianOperators(L, P);
-        Q == Q'  
+    CannedExample
+        i12 : Q = ideal(3*x_1^2*x_2^2-x_2^3*x_3-x_1^3*x_4-3*x_1*x_2*x_3*x_4+2*x_3^2*x_4^2,3*x_1^3*x_2*x_4-3*x_1*x_2^2*x_3*x_4-3*x_1^2*x_3*x_4^2+3*x_2*x_3^2*x_4^2+2*x_2^3-2*x_3*x_4^2,3*x_2^4*x_3-6*x_1*x_2^2*x_3*x_4+3*x_1^2*x_3*x_4^2+x_2^3-x_3*x_4^2,4*x_1*x_2^3*x_3+x_1^4*x_4-6*x_1^2*x_2*x_3*x_4-3*x_2^2*x_3^2*x_4+4*x_1*x_3^2*x_4^2,x_2^5-x_1*x_2^3*x_4-x_2^2*x_3*x_4^2+x_1*x_3*x_4^3,x_1*x_2^4-x_2^3*x_3*x_4-x_1*x_2*x_3*x_4^2+x_3^2*x_4^3,x_1^4*x_2-x_2^3*x_3^2-2*x_1^3*x_3*x_4+2*x_1*x_2*x_3^2*x_4,x_1^5-4*x_1^3*x_2*x_3+3*x_1*x_2^2*x_3^2+2*x_1^2*x_3^2*x_4-2*x_2*x_3^3*x_4,3*x_1^4*x_3*x_4-6*x_1^2*x_2*x_3^2*x_4+3*x_2^2*x_3^3*x_4+2*x_1^3*x_2+6*x_1*x_2^2*x_3-6*x_1^2*x_3*x_4-2*x_2*x_3^2*x_4,4*x_2^3*x_3^3+4*x_1^3*x_3^2*x_4-12*x_1*x_2*x_3^3*x_4+4*x_3^4*x_4^2-x_1^4+6*x_1^2*x_2*x_3+3*x_2^2*x_3^2-8*x_1*x_3^2*x_4)
+
+                       2 2    3      3                   2 2    3           2         2   2       2 2     3       2    4         2      
+        o12 = ideal (3x x  - x x  - x x  - 3x x x x  + 2x x , 3x x x  - 3x x x x  - 3x x x  + 3x x x  + 2x  - 2x x , 3x x  - 6x x x x  +
+                       1 2    2 3    1 4     1 2 3 4     3 4    1 2 4     1 2 3 4     1 3 4     2 3 4     2     3 4    2 3     1 2 3 4  
+              ---------------------------------------------------------------------------------------------------------------------------
+                2   2    3      2      3      4       2           2 2         2 2   5      3      2   2        3     4    3      
+              3x x x  + x  - x x , 4x x x  + x x  - 6x x x x  - 3x x x  + 4x x x , x  - x x x  - x x x  + x x x , x x  - x x x  -
+                1 3 4    2    3 4    1 2 3    1 4     1 2 3 4     2 3 4     1 3 4   2    1 2 4    2 3 4    1 3 4   1 2    2 3 4  
+              ---------------------------------------------------------------------------------------------------------------------------
+                     2    2 3   4      3 2     3             2     5     3           2 2     2 2         3      4         2   2    
+              x x x x  + x x , x x  - x x  - 2x x x  + 2x x x x , x  - 4x x x  + 3x x x  + 2x x x  - 2x x x , 3x x x  - 6x x x x  +
+               1 2 3 4    3 4   1 2    2 3     1 3 4     1 2 3 4   1     1 2 3     1 2 3     1 3 4     2 3 4    1 3 4     1 2 3 4  
+              ---------------------------------------------------------------------------------------------------------------------------
+                2 3       3         2       2           2      3 3     3 2            3       4 2    4     2         2 2       2
+              3x x x  + 2x x  + 6x x x  - 6x x x  - 2x x x , 4x x  + 4x x x  - 12x x x x  + 4x x  - x  + 6x x x  + 3x x  - 8x x x )
+                2 3 4     1 2     1 2 3     1 3 4     2 3 4    2 3     1 3 4      1 2 3 4     3 4    1     1 2 3     2 3     1 3 4
+
+        o12 : Ideal of R
+
+        i13 : L = noetherianOperators(Q)
+
+                            2
+        o13 = {1, dx_1, dx_1  - 2x dx_2}
+                                  2
+
+        o13 : List
+
+        i14 : Q' = getIdealFromNoetherianOperators(L, P);
+
+        o14 : Ideal of R
+
+        i15 : Q == Q'
+
+        o15 = true
     Text
         The next example was given by Palamodov to show that there exists primary ideals that cannot be described by using differential operators with constant coefficients.       
     Example
index f43160bf336df4d4496cc16cc0816ad642e60da9..1e5a746f85311cdb612892606bf5233a42328591 100644 (file)
@@ -2591,7 +2591,61 @@ Inputs => {"X" => SpecialCubicFourfold => {"containing a surface ", TEX///$S\sub
 Outputs => {FunctionClosure => {"which takes the ideal of a (general) point ", TEX///$p\in\mathbb{P}^5$///, " and returns the unique rational curve of degree ", TEX///$e$///, ", ", TEX///$(3e-1)$///, "-secant to ", TEX///$S$///, ", and passing through ", TEX///$p$///, " (an error is thrown if such a curve does not exist or is not unique)"}}, 
 EXAMPLE {"-- A general cubic fourfold of discriminant 26"|newline|"X = specialCubicFourfold(\"Farkas-Verra C26\",ZZ/33331);", "describe X", "time f = detectCongruence X;", "p = point ring X -- random point on P^5", "time C = f p -- 5-secant conic to the surface", "assert(codim C == 4 and degree C == 2 and codim(C+(first ideals X)) == 5 and degree(C+(first ideals X)) == 5 and isSubset(C, p))"}, 
 PARA{"The same method can be also applied to ", ofClass SpecialGushelMukaiFourfold, ". In this case it will detect and return a congruence of (2e-1)-secant curves of degree e inside the unique del Pezzo fivefold containing the GM fourfold."}, 
-EXAMPLE{"-- A general GM fourfold of discriminant 20"|newline|"X = specialGushelMukaiFourfold(\"surface of degree 9 and genus 2\",ZZ/33331);", "describe X", "time f = detectCongruence X;", "Y = source map X; -- del Pezzo fivefold containing X", "p = point Y -- random point on Y", "time C = f p -- 3-secant conic to the surface", "S = sub(first ideals X,Y);", "assert(dim C -1 == 1 and degree C == 2 and dim(C+S)-1 == 0 and degree(C+S) == 3 and isSubset(C, p))"}, 
+EXAMPLE{PRE(///i7 : -- A general GM fourfold of discriminant 20
+     X = specialGushelMukaiFourfold("surface of degree 9 and genus 2",ZZ/33331);
+/// | ///
+o7 : SpecialGushelMukaiFourfold (Gushel-Mukai fourfold containing a surface of degree 9 and sectional genus 2)
+/// | ///
+i8 : describe X
+/// | ///
+o8 = Special Gushel-Mukai fourfold of discriminant 20
+     containing a surface in PP^8 of degree 9 and sectional genus 2
+     cut out by 19 hypersurfaces of degree 2
+     and with class in G(1,4) given by 6*s_(3,1)+3*s_(2,2)
+     Type: ordinary
+     (case 17 of Table 1 in arXiv:2002.07026)
+/// | ///
+i9 : time f = detectCongruence X;
+S: surface of degree 9 and sectional genus 2 in PP^8 cut out by 19 hypersurfaces of degree 2
+phi: quadratic rational map from 5-dimensional subvariety of PP^8 to PP^13
+Z=phi(del Pezzo fivefold)
+number lines containing in Z and passing through the point phi(p): 7
+number 1-secant lines to S passing through p: 6
+number 3-secant conics to S passing through p: 1
+     -- used 19.3376 seconds
+/// | ///
+i10 : Y = source map X; -- del Pezzo fivefold containing X
+/// | ///
+i11 : p = point Y -- random point on Y
+/// | ///
+o11 = ideal (t  + 14118t , t  + 3234t , t  - 16296t , t  - 5674t , t  -
+              7         8   6        8   5         8   4        8   3
+      -----------------------------------------------------------------------
+      12127t , t  - 1329t , t  + 3304t , t  + 779t )
+            8   2        8   1        8   0       8
+/// | ///
+o11 : Ideal of Y
+/// | ///
+i12 : time C = f p -- 3-secant conic to the surface
+     -- used 0.347885 seconds
+/// | ///
+o12 = ideal (t  - 1000t  + 8254t  - 12393t , t  + 10116t  + 7449t  - 15895t ,
+              5        6        7         8   4         6        7         8
+      -----------------------------------------------------------------------
+      t  + 10858t  + 13401t  + 13664t , t  - 11215t  + 13587t  - 5150t , t  -
+       3         6         7         8   2         6         7        8   1
+      -----------------------------------------------------------------------
+      1898t  + 4900t  + 14451t , t  - 7830t  + 1802t  - 14129t )
+           6        7         8   0        6        7         8
+/// | ///
+o12 : Ideal of Y
+/// | ///
+i13 : S = sub(first ideals X,Y);
+/// | ///
+o13 : Ideal of Y
+/// | ///
+i14 : assert(dim C -1 == 1 and degree C == 2 and dim(C+S)-1 == 0 and degree(C+S) == 3 and isSubset(C, p))
+///)},
 SeeAlso => {coneOfLines}} 
 
 document {Key => {SpecialCubicFourfold}, 
index ad0e375c37c8ee2faa770bb0cab21bae4c10401e..eafb499edebec0d8309d190acc3ab31a85e2c84d 100644 (file)
@@ -5947,22 +5947,44 @@ doc ///
       huge rank and presentation matrices. In particular, the method directImageComplex becomes slow down.
       
       The following is an example of direct images of the structure sheaf on a twisted cubic.
-  Example
-      kk=ZZ/101; d=6;
-      needsPackage "Resultants";
-      vd=veronese(1,d,kk);
-      R=target vd; S=source vd;
-      
-      M=R^{1:-1}; I=ann M; J=ker vd;
-      
-      RM=time directImageComplex(I,M,matrix vd);
-      
-      for i from min RM to max RM list (rank RM_i)
+  CannedExample
+      i1 : kk=ZZ/101; d=6;
+
+      i3 : needsPackage "Resultants";
+
+      i4 : vd=veronese(1,d,kk);
+
+      o4 : RingMap kk[t ..t ] <--- kk[x ..x ]
+                       0   1           0   6
+
+      i5 : R=target vd; S=source vd;
+
+      i7 : M=R^{1:-1}; I=ann M; J=ker vd;
+
+      o8 : Ideal of R
+
+      o9 : Ideal of S
+
+      i10 : RM=time directImageComplex(I,M,matrix vd);
+           -- used 46.0364 seconds
+
+      i11 : for i from min RM to max RM list (rank RM_i)
+
+      o11 = {36, 180, 360, 360, 180, 36}
+
+      o11 : List
   Text
       RM looks complicated since it is consisted of universal bundles on P^6, which are of high rank.
-  Example
-      retTable=time actionOnDirectImage(I,M,matrix vd);
-      keys retTable
+  CannedExample
+      i12 : retTable=time actionOnDirectImage(I,M,matrix vd);
+      We take a finite projection from P^n to P^d as {x   , x   }     -- used 47.1632 seconds
+                                                       0,0   0,6
+
+      i13 : keys retTable
+
+      o13 = {0}
+
+      o13 : List
   Text
       We see that 0 is the only key, in other words, there is no other R^i vd_{*} except i=0.
       To see whether it gives an action on S/J, we can use the test function isAction.
@@ -5970,95 +5992,292 @@ doc ///
       Note that list retTable#i is consisted of maps of chain complexes R^i(\pi \cdot phi)_{*}(y_j) : C\to C(1) where 
       C represents the direct image R^i(\pi \cdot phi)_{*}F. In general, it does not give a right action on C itself. 
       The induced maps on cohomology groups provide a right action.
-  Example
-      isAction(J, apply(dim S, i->prune HH^0 retTable#0#i))
+  CannedExample
+      i14 : isAction(J, apply(dim S, i->prune HH^0 retTable#0#i))
+
+      o14 = true
   Text
       The following is a little more complicated example with nontrivial higher direct images. 
       Let X be the product of two quartic curves C, and f : X \to C be the second projection. 
       Let P, Q be two distinct points of C, and let L = O(P\times C + Q\times C + D) be a line bundle 
       on X where D is the diagonal. We want to compute the higher direct images R^i f_{*}L. 
       We choose C as the Fermat quartic, and choose P, Q as points on the intersection of C and the line V(x_2).
-  Example
-      kk=ZZ/1009;
-      (S,E)=productOfProjectiveSpaces({2,2},CoefficientField=>kk);
-      f1=S_0^4+S_1^4+S_2^4; f2=S_3^4+S_4^4+S_5^4;
-      IX=ideal (f1,f2);
-      -- 2 points on C. Note that the line passing through P and Q is V(x_2).
-      P=matrix{{1,192,0}}; Q=matrix{{192,1,0}};
-      varX=matrix{{S_0,S_1,S_2}}; varY=matrix{{S_3,S_4,S_5}};
-      PX=P||varX; QX=Q||varX;
-      
-      I1=ideal(f2, minors(2,PX)); -- ideal for P*C
-      I2=ideal(f2, minors(2,QX)); -- ideal for Q*C
-      I3=ideal(f1,f2, minors(2, varX||varY)); -- ideal for the diagonal D
-      I=intersect(I1,I2,I3); -- ideal for P*C+Q*C+D
-      SX=S/IX; Ldual=I/IX;
-      
-      betti (LX=Hom(Ldual, SX^1))
+  CannedExample
+      i15 : kk=ZZ/1009;
+
+      i16 : (S,E)=productOfProjectiveSpaces({2,2},CoefficientField=>kk);
+
+      i17 : f1=S_0^4+S_1^4+S_2^4; f2=S_3^4+S_4^4+S_5^4;
+
+      i19 : IX=ideal (f1,f2);
+
+      o19 : Ideal of S
+
+      i20 : P=matrix{{1,192,0}}; Q=matrix{{192,1,0}};
+
+                     1        3
+      o20 : Matrix ZZ  <--- ZZ
+
+                     1        3
+      o21 : Matrix ZZ  <--- ZZ
+
+      i22 : varX=matrix{{S_0,S_1,S_2}}; varY=matrix{{S_3,S_4,S_5}};
+
+                    1       3
+      o22 : Matrix S  <--- S
+
+                    1       3
+      o23 : Matrix S  <--- S
+
+      i24 : PX=P||varX; QX=Q||varX;
+
+                    2       3
+      o24 : Matrix S  <--- S
+
+                    2       3
+      o25 : Matrix S  <--- S
+
+      i26 : I1=ideal(f2, minors(2,PX)); -- ideal for P*C
+
+      o26 : Ideal of S
+
+      i27 : I2=ideal(f2, minors(2,QX)); -- ideal for Q*C
+
+      o27 : Ideal of S
+
+      i28 : I3=ideal(f1,f2, minors(2, varX||varY)); -- ideal for the diagonal D
+
+      o28 : Ideal of S
+
+      i29 : I=intersect(I1,I2,I3); -- ideal for P*C+Q*C+D
+
+      o29 : Ideal of S
+
+      i30 : SX=S/IX; Ldual=I/IX;
+
+      i32 : betti (LX=Hom(Ldual, SX^1))
+
+                    0  1
+      o32 = total: 10 26
+                0:  1  .
+                1:  1  1
+                2:  .  1
+                3:  8 24
+
+      o32 : BettiTally
   Text
       To compute its Tate resolution on the ambient space P^2 \times P^2, we first consider it as a sheaf on P^2 \times P^2,
       and then take a linear presentation matrix via a truncation.
-  Example
-      phi = map(SX,S,vars SX);
-      betti (L=prune pushForward(phi,LX))
-      Ltr = (truncate ({2,2},L))**S^{{2,2}};
-      betti res Ltr
+  CannedExample
+      i33 : phi = map(SX,S,vars SX);
+
+      o33 : RingMap SX <--- S
+
+      i34 : betti (L=prune pushForward(phi,LX))
+
+                    0  1
+      o34 = total: 10 27
+                0:  1  .
+                1:  1  1
+                2:  .  1
+                3:  8 25
+
+      o34 : BettiTally
+
+      i35 : Ltr = (truncate ({2,2},L))**S^{{2,2}};
+
+      i36 : betti res Ltr
+
+                    0   1   2  3  4
+      o36 = total: 60 176 184 80 12
+                0: 60 176 184 80 12
+
+      o36 : BettiTally
   Text
       We read off (a finite subquotient of) the Tate resolution of Rf_{*}L as follows.
-  Example
-      Q=symExt(presentation Ltr, E);
-      T=(res (coker Q,LengthLimit=>12))**E^{{2,2}}[4];
-      cohomologyMatrix (T, -{5,5},{3,3})
-      sT=strand(T,{0,0},{0});
-
-      sTFull=new ChainComplex;
-      sTFull.ring = ring sT;
-      ma=6;
-      sTFull=(dual res (coker transpose (sT[ma]).dd_0, LengthLimit=>2*ma))[-ma];
-      (S',E')=productOfProjectiveSpaces({2},CoefficientField=>kk);
-      projOnE=map(E', E, toList(3:0)|(gens E'));
-      mi=min sTFull; ma=max sTFull;
-      W=new ChainComplex; W.ring = E';
-      apply(toList(mi..ma),i-> W_i = E'^(-apply(degrees sTFull_i,d->d_{1})));
-      apply(toList(mi+1..ma),i->W.dd_i = map(W_(i-1),W_i,projOnE sTFull.dd_i));
-      betti W
+  CannedExample
+      i37 : Q=symExt(presentation Ltr, E);
+
+                    184       60
+      o37 : Matrix E    <--- E
+
+      i38 : T=(res (coker Q,LengthLimit=>12))**E^{{2,2}}[4];
+
+      i39 : cohomologyMatrix (T, -{5,5},{3,3})
+
+      o39 = | 0        0        0        0       0      0    0     96k 0   |
+            | 0        0        0        0       0      0    0     60k 88k |
+            | 60h      48h      36h      24h     12h    3h+3 12    0   0   |
+            | 36h2+20h 28h2+16h 20h2+12h 12h2+8h 4h2+4h 5h+1 12h+4 0   0   |
+            | 92h2     72h2     52h2     32h2    12h2   8h   28h   0   0   |
+            | 168h2    132h2    96h2     60h2    24h2   12h  48h   0   0   |
+            | 244h2    192h2    140h2    88h2    36h2   16h  68h   0   0   |
+            | 320h2    252h2    184h2    116h2   48h2   20h  88h   0   0   |
+            | 396h2    312h2    228h2    144h2   60h2   24h  108h  0   0   |
+
+                             9                9
+      o39 : Matrix (ZZ[h, k])  <--- (ZZ[h, k])
+
+      i40 : sT=strand(T,{0,0},{0});
+
+      i41 : sTFull=new ChainComplex;
+
+      i42 : sTFull.ring = ring sT;
+
+      i43 : ma=6;
+
+      i44 : sTFull=(dual res (coker transpose (sT[ma]).dd_0, LengthLimit=>2*ma))[-ma];
+
+      i45 : (S',E')=productOfProjectiveSpaces({2},CoefficientField=>kk);
+
+      i46 : projOnE=map(E', E, toList(3:0)|(gens E'));
+
+      o46 : RingMap E' <--- E
+
+      i47 : mi=min sTFull; ma=max sTFull;
+
+      i49 : W=new ChainComplex; W.ring = E';
+
+      i51 : apply(toList(mi..ma),i-> W_i = E'^(-apply(degrees sTFull_i,d->d_{1})));
+
+      i52 : apply(toList(mi+1..ma),i->W.dd_i = map(W_(i-1),W_i,projOnE sTFull.dd_i));
+
+      i53 : betti W
+
+                   -6 -5 -4 -3 -2 -1 0  1  2  3  4  5  6
+      o53 = total: 24 20 16 12  9  8 9 12 16 20 24 28 32
+                0: 22 18 14 10  6  3 1  .  .  .  .  .  .
+                1:  2  2  2  2  3  5 8 12 16 20 24 28 32
+
+      o53 : BettiTally
   Text
       One can check that W has two strands (corresponding to R^0f_{*}L and R^1f_{*}L, respectively).
       By taking the Beilinson functor, one can check that R^0f_{*}L is the structure sheaf on C,
       and R^1f_{*}L is a torsion sheaf supported on two points lying on the intersection of C and
       the line V(x_2) other than P, Q.
-  Example
-    R0fL = prune HH^0 beilinson W
-    R1fL = prune HH^1 beilinson W
-    
-    degree R0fL
-    primaryDecomposition ann R0fL
-    
-    degree R1fL
-    primaryDecomposition ann R1fL
+  CannedExample
+      i54 : R0fL = prune HH^0 beilinson W
+
+      o54 = cokernel | x_(0,0)^4+x_(0,1)^4+x_(0,2)^4 |
+
+                                     1
+      o54 : S'-module, quotient of S'
+
+      i55 : R1fL = prune HH^1 beilinson W
+
+      o55 = cokernel | -131x_(0,2) 0       0       0       x_(0,0)  x_(0,1)            0       0       -131x_(0,2) 0       -131x_(0,2) 0       |
+                     | x_(0,2)     x_(0,1) x_(0,0) 0       0        0                  0       0       0           0       0           0       |
+                     | 0           0       0       x_(0,2) -x_(0,1) x_(0,0)+439x_(0,1) 0       0       0           0       0           0       |
+                     | 0           0       0       0       0        0                  x_(0,2) x_(0,1) x_(0,0)     0       0           0       |
+                     | 0           0       0       0       0        0                  0       0       0           x_(0,2) x_(0,1)     x_(0,0) |
+
+                                     5
+      o55 : S'-module, quotient of S'
+
+      i56 : degree R0fL
+
+      o56 = 4
+
+      i57 : primaryDecomposition ann R0fL
+
+                    4      4      4
+      o57 = {ideal(x    + x    + x   )}
+                    0,0    0,1    0,2
+
+      o57 : List
+
+      i58 : degree R1fL
+
+      o58 = 2
+
+      i59 : primaryDecomposition ann R1fL
+
+                                                                                             2
+      o59 = {ideal (x   , x    + 247x   ), ideal (x   , x    + 192x   ), ideal (x   , x   , x   )}
+                     0,2   0,0       0,1           0,2   0,0       0,1           0,1   0,0   0,2
+
+      o59 : List
   Text
       These module also can be seen as in the following way via a finite linear projection. 
       We take a further projection \pi:C\to  P^1, and check whether these modules induce an action
       on the direct image under \pi, in other words, provide {O_C}-module structures. As results,
       these actions make (the sheafification of) M0 and M1 into {O_C}-modules which are identical to 
       R^0f_{*}L and R^1f_{*}L. 
-  Example
-      J=ideal (S'_0^4+S'_1^4+S'_2^4);
-      retTable=actionOnDirectImage(J,W);
-      keys retTable
+  CannedExample
+      i60 : J=ideal (S'_0^4+S'_1^4+S'_2^4);
+
+      o60 : Ideal of S'
+
+      i61 : retTable=actionOnDirectImage(J,W);
+      We take a finite projection from P^n to P^d as {x   , x   }
+                                                       0,1   0,2
+      i62 : keys retTable
+
+      o62 = {0, 1}
+
+      o62 : List
   Text
       We see that 0, 1 appear as keys, in other words, both R^0f_{*}L and R^1f_{*}L survives.
-  Example
-      prunedActionList = i->apply(dim S',j->prune HH^i retTable#i#j);
-      apply(keys retTable, i->isAction(J,prunedActionList(i)))
-               
-      M0=source (prunedActionList(0))_0
-      (rank M0, degree M0, betti res M0)
-      isIsomorphic(truncate(regularity M0, M0), truncate(regularity M0, dual dual M0))
-      dual dual M0
-
-      M1=source (prunedActionList(1))_0
-      (rank M1, degree M1, betti res M1)
+  CannedExample
+      i63 : prunedActionList = i->apply(dim S',j->prune HH^i retTable#i#j);
+
+      i64 : apply(keys retTable, i->isAction(J,prunedActionList(i)))
+
+      o64 = {true, true}
+
+      o64 : List
+
+      i65 : M0=source (prunedActionList(0))_0
+
+      o65 = cokernel {2} | 0        -x_(0,1) 0        |
+                     {2} | x_(0,0)  0        0        |
+                     {2} | -x_(0,1) x_(0,0)  0        |
+                     {2} | 0        0        0        |
+                     {2} | 0        0        x_(0,0)  |
+                     {2} | 0        0        -x_(0,1) |
+                     {3} | 0        0        0        |
+                                                               7
+      o65 : kk[x   ..x   ]-module, quotient of (kk[x   ..x   ])
+                0,0   0,1                           0,0   0,1
+
+      i66 : (rank M0, degree M0, betti res M0)
+
+                          0 1
+      o66 = (4, 4, total: 7 3)
+                       2: 6 3
+                       3: 1 .
+
+      o66 : Sequence
+
+      i67 : isIsomorphic(truncate(regularity M0, M0), truncate(regularity M0, dual dual M0))
+
+      o67 = true
+
+      i68 : dual dual M0
+
+                            4
+      o68 = (kk[x   ..x   ])
+                 0,0   0,1
+
+      o68 : kk[x   ..x   ]-module, free, degrees {3, 2, 1, 0}
+                0,0   0,1
+
+      i69 : M1=source (prunedActionList(1))_0
+
+      o69 = cokernel {2} | x_(0,1) 0       |
+                     {2} | 0       x_(0,1) |
+
+                                                               2
+      o69 : kk[x   ..x   ]-module, quotient of (kk[x   ..x   ])
+                0,0   0,1                           0,0   0,1
+
+      i70 : (rank M1, degree M1, betti res M1)
+
+                          0 1
+      o70 = (0, 2, total: 2 2)
+                       2: 2 2
+
+      o70 : Sequence
   Text
       Note that the sheafification of M0 (=R^0(\pi \cdot f)_{*}L) is a rank 4 vector bundle O \oplus O(-1) \oplus O(-2) \oplus O(-3) on P^1,
       and the sheafification of M1 (= R^1(\pi \cdot f)_{*} L) is a torsion sheaf on P^1 supported on the double point at [1:0].
index a3e69d565878eebbdd9625faf7adc6271593c442..5604e6cd72c6c5ae20559652d9ed0c11f413498c 100644 (file)
@@ -42,16 +42,47 @@ doc ///
            Then $uT$ is a Frobenius map on $E$, and the primes $P$ computed by this function are precisely those for which $uT$ restricts to a nonzero Frobenius map of the annihilator of $P$ on $E$.
 
             The following is a simple example, which is split with the coordinate axes in $\mathbb{A}^2$.
-        Example
-            R = ZZ/3[s,t];
-            u = s^2*t^2;
-            compatibleIdeals u
+        CannedExample
+            i1 : R = ZZ/3[s,t];
+
+            i2 : u = s^2*t^2;
+
+            i3 : compatibleIdeals u
+
+            o3 = {ideal s, ideal (t, s), ideal t}
+
+            o3 : List
         Text
             Here is a more substantial example.
-        Example
-            R = ZZ/2[a,b,c,d,e,f];
-            u = d*(b*e - d*c)*(d - a*e - b*f + a*c*f);
-            print \ compatibleIdeals u;
+        CannedExample
+            i4 : R = ZZ/2[a,b,c,d,e,f];
+
+            i5 : u = d*(b*e - d*c)*(d - a*e - b*f + a*c*f);
+
+            i6 : print \ compatibleIdeals u;
+            ideal d
+            ideal (e, d)
+            ideal (f, e, d)
+            ideal (f, e, d, b)
+            ideal (f, e, d, b, a)
+            ideal (f, e, d, c, b, a)
+            ideal (f, e, d, c, b)
+            ideal (f, e, d, a*c + b)
+            ideal (d, b, a)
+            ideal (e, d, b, a)
+            ideal (e, d, c, b, a)
+            ideal (d, b, a, c*f + e)
+            ideal (e, d, b)
+            ideal (e, d, c, b)
+            ideal (e, d, a*c + b)
+            ideal (d, b)
+            ideal (d, b, c*f + e)
+            ideal (d, a*c*f + a*e + b*f)
+            ideal (a*e + d, c*d + b*e, a*c + b)
+            ideal (c*f + e, b*f + d, a*e + d, c*d + b*e, a*c + b)
+            ideal(c*d + b*e)
+            ideal (c*f + e, b*f + d, c*d + b*e)
+            ideal(a*c*f + a*e + b*f + d)
         Text
             The option {\tt FrobeniusRootStrategy} is passed to internal @TO frobeniusRoot@ calls.
 ///
index 2b7ac317f51b1f8ed5ead08d208a81933315e3aa..abe94e337cbf005dd5a5a5c2c18a3472c3fd1947 100644 (file)
@@ -349,10 +349,46 @@ doc ///
       The interesting part of the output may be the actual  lineages of the basis polynomials,
       in addition to the Groebner basis itself.
       Here is a verbose example when the Groebner basis is trivial.
-    Example
-      QQ[a..d]
-      I=ideal( -c^3+a^2+b*d, a*b*c-1,a*b*c)
-      T = tgb(I,2,Verbose=>true)
+    CannedExample
+      i10 : QQ[a..d]
+
+      o10 = QQ[a, b, c, d]
+
+      o10 : PolynomialRing
+
+      i11 : I=ideal( -c^3+a^2+b*d, a*b*c-1,a*b*c)
+
+                      3    2
+      o11 = ideal (- c  + a  + b*d, a*b*c - 1, a*b*c)
+
+      o11 : Ideal of QQ[a, b, c, d]
+
+      i12 : T = tgb(I,2,Verbose=>true)
+      You turned on Verbose! You will be notified of each new S-polynomial task created and each new GB element added to the HashTable as we go.
+      Scheduling a task for lineage (0-1)
+      Scheduling a task for lineage (0-2)
+      Scheduling a task for lineage (1-2)
+      Scheduling task for lineage ((0-1)-0)
+      Scheduling task for lineage ((0-1)-1)
+      Scheduling task for lineage ((0-1)-2)
+      Adding the following remainder to GB: -1 from lineage (1-2)
+      Adding the following remainder to GB: -a^3*b-a*b^2*d+c^2 from lineage (0-1)
+      Scheduling task for lineage ((0-2)-0)
+      Scheduling task for lineage ((0-2)-1)
+      Scheduling task for lineage ((0-2)-2)
+      Scheduling task for lineage ((0-2)-(1-2))
+      Scheduling task for lineage ((0-2)-(0-1))
+      Adding the following remainder to GB: -a^3*b-a*b^2*d from lineage (0-2)
+      Found 1 or -1 in the Groebner basis; reducing now.
+
+      o12 = HashTable{(0-1) => null}
+                      (0-2) => null
+                      (1-2) => 1
+                      0 => null
+                      1 => null
+                      2 => null
+
+      o12 : HashTable
     Text
       In particular, the lineages of null values tell us what S-polynomials didn't reduce to zero until $1$ was found as
       a remainder.
index d4c1bf7d7cd1789e6d8145ae0a865ee074d36ab6..ea4f3b7fe04e0dfed71c4ae32d820d3586d18c4d 100644 (file)
@@ -350,11 +350,27 @@ Description
     triangulation.  Notice that {\tt tri} is a triangulation of the 
     polytope which is the convex hull of the columns of $A$, which are 
     the only points allowed in the triangulation.
-  Example
-    A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}
-    tri = {{0,1,2}, {1,3,5}, {2,3,4}, {0,1,5}, 
-        {0,2,4}, {3,4,5}, {1,2,3}}
-    isRegularTriangulation(A,tri)
+  CannedExample
+    i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}
+
+    o1 = | 0 0 -1 1  -4 4  |
+         | 3 1 -1 -1 -2 -2 |
+
+                  2        6
+    o1 : Matrix ZZ  <--- ZZ
+
+    i2 : tri = {{0,1,2}, {1,3,5}, {2,3,4}, {0,1,5},
+             {0,2,4}, {3,4,5}, {1,2,3}}
+
+    o2 = {{0, 1, 2}, {1, 3, 5}, {2, 3, 4}, {0, 1, 5}, {0, 2, 4}, {3, 4, 5}, {1,
+         ------------------------------------------------------------------------
+         2, 3}}
+
+    o2 : List
+
+    i3 : isRegularTriangulation(A,tri)
+
+    o3 = false
   Text
     Setting debugLevel to either 1,2, or 5 will give more detail about
     what files are written to Topcom, and what the executable is.