Package sagbi/SB.SAGBITimeout: Difference between revisions

From ApCoCoAWiki
No edit summary
examples and see
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Version|2}}
<command>
<command>
   <title>SB.SAGBITimeout</title>
   <title>SB.SAGBITimeout</title>
Line 4: Line 5:
    
    
<syntax>
<syntax>
SB.SAGBI(G:LIST of POLY,t:RAT):LIST of POLY
SB.SAGBITimeout(G:LIST of POLY,t:RAT):LIST of POLY
</syntax>
</syntax>
   <description>
   <description>
Line 15: Line 16:


<example>
<example>
Use QQ[x[1..3]];
Use QQ[x,y,z];
S := SB.SAGBITimeout([x[1]^2-x[3]^2,x[1]*x[2]+x[3]^2,x[2]^2-2*x[3]^2]);
S := SB.SAGBITimeout([x^2 -z^2, x*y +z^2, y^2 -2*z^2],3);
indent(S);
indent(S);
-----------------------------------------------------------------------------
-- [
[
--  y^2 -2*z^2,
   x[2]^2 -2*x[3]^2,
--   x*y +z^2,
   x[1]*x[2] +x[3]^2,
--   x^2 -z^2,
   x[1]^2 -x[3]^2,
--   x^2*z^2 +x*y*z^2 +(1/2)*y^2*z^2 +(-1/2)*z^4
   x[1]^2*x[3]^2 +x[1]*x[2]*x[3]^2 +(1/2)*x[2]^2*x[3]^2 +(-1/2)*x[3]^4
-- ]
]
</example>
</example>


<example>
<example>
Use QQ[x,y];
Use QQ[x,y];
SAGBITimeout([x+y,x*y,x*y^2],10); -- K[x+y,xy,xy^2] doesn't have a finite SAGBI basis
SB.SAGBITimeout([x+y,x*y,x*y^2],10); -- K[x+y,xy,xy^2] does not have a finite SAGBI basis
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--> ERROR: Timeout after 10.161 seconds.
--> ERROR: Timeout after 10.161 seconds.
Line 37: Line 37:
</example>
</example>
   </description>
   </description>
<!-- <see>SB.IsSagbi</see> -->
  <seealso>
<!-- <see>SB.IsSagbiOf</see> -->
    <see>Package sagbi/SB.SAGBI</see>
    <see>Package sagbi/SB.TruncSAGBI</see>
    <see>Package sagbi/SB.IsSAGBIOf</see>
    <see>Package sagbi/SB.GetSAGBI</see>
    <see>Package sagbi/SB.GetTruncSAGBI</see>
  </seealso>
   <types>
   <types>
     <type>sagbi</type>
     <type>sagbi</type>
Line 46: Line 51:
   <key>sb.sagbi</key>
   <key>sb.sagbi</key>
   <key>sagbi.sagbi</key>
   <key>sagbi.sagbi</key>
   <wiki-category>ApCoCoA-2.0/Package_sagbi</wiki-category>
   <wiki-category>Package_sagbi</wiki-category>
</command>
</command>

Latest revision as of 18:13, 27 October 2020

This article is about a function from ApCoCoA-2.

SB.SAGBITimeout

Same as SAGBI, but stops after a given time and throws an error if the computation isn't finished yet.

Syntax

SB.SAGBITimeout(G:LIST of POLY,t:RAT):LIST of POLY

Description

This function computes a SAGBI basis and throws an error if the computation isn't finished after t seconds. If the computation terminates within t seconds, a reduced SAGBI basis of the subalgebra generated by the set G is returned.

  • @param G A list of polynomials which generates a subalgebra.

  • @param t A rational number specifying the time limit.

  • @return A list of polynomials which form a finite SAGBI-basis of the subalgebra generated by G.

Example

Use QQ[x,y,z];
S := SB.SAGBITimeout([x^2 -z^2,  x*y +z^2,  y^2 -2*z^2],3);
indent(S);
-- [
--   y^2 -2*z^2,
--   x*y +z^2,
--   x^2 -z^2,
--   x^2*z^2 +x*y*z^2 +(1/2)*y^2*z^2 +(-1/2)*z^4
-- ]

Example

Use QQ[x,y];
SB.SAGBITimeout([x+y,x*y,x*y^2],10); -- K[x+y,xy,xy^2] does not have a finite SAGBI basis
-----------------------------------------------------------------------------
--> ERROR: Timeout after 10.161 seconds.
--> WHERE: at line 618 (column 2) of sagbi.cpkg5
-->  error("Timeout after " + DecimalStr(t1-t0) + " seconds.")
-->  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

See also

Package sagbi/SB.SAGBI

Package sagbi/SB.TruncSAGBI

Package sagbi/SB.IsSAGBIOf

Package sagbi/SB.GetSAGBI

Package sagbi/SB.GetTruncSAGBI