Documentation for SagbiGbDetection.

    SagbiGbDetection

    A julia package for finding the term order for which the given generators of an ideal form the Gröbner basis or the given generators of a finitely generated subalgebra of a polynomial ring are the SAGBI basis. If there is no such term order, then the given set of generators of an ideal or subalgebra is not a Gröbner basis or SAGBI basis respectively for any term order

    Gröbner Basis Detection

    Introduction

    SagbiGbDetection allows to compute the term order for which the given generators of an ideal form the Gröbner basis.

    Functionality

    The first main functionality of this package includes weightVectorsRealizingGB(G, R). A function for extracting the weight vectors for which the given set of polynomials is a Gröbner basis.

    Given a set of polynomials (G) and a polynomial ring (R) as input, the function produces an array of weight vectors for which the provided set of polynomials adheres to the Buchberger Criterion. It also yields a Boolean value, which is 'True' when the set of polynomials constitutes a Gröbner basis for all weight vectors, and 'False' when it does not.

    using SagbiGbDetection
    julia> R, (x, y) = Singular.polynomial_ring(Singular.QQ, ["x","y"])
    (Singular Polynomial Ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
    
    julia> G = [y^2-x, x^2-1]
    2-element Vector{spoly{n_Q}}:
     y^2 - x
     x^2 - 1
    
    julia> weightVectorsRealizingGB(G, R)
    (Vector{ZZRingElem}[[2, 2]], false)
    
    weightVectorsRealizingGB(G::Vector{spoly{n_Q}}, R::Singular Polynomial Ring (QQ))
    
    Provides a set of weight vectors, which may also be empty, for which the provided 
    vector of polynomials 'G' serves as a Groebner basis. Additionally, it returns a Boolean 
    value indicating whether this is a Groebner basis for all the weight vectors generated by the method or not.
    
    # Arguments
    - `G::Vector{spoly{n_Q}}`: input generators.
    - `R::Singular Polynomial Ring (QQ)`: polynomial ring over Q.

    Examples

    
    julia> using SagbiGbDetection
    
    julia> R, (x, y) = Singular.polynomial_ring(Singular.QQ, ["x","y"])
    (Singular Polynomial Ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])
    
    julia> G = [y^2-x, x^2-1]
    2-element Vector{spoly{n_Q}}:
     y^2 - x
     x^2 - 1
    
    julia> weightVectorsRealizingGB(G, R)
    (Vector{ZZRingElem}[[2, 2]], false)

    SAGBI Basis Detection

    Introduction

    SagbiGbDetection allows to compute the term order for which the given generators of a finitely generated subalgebra of a polynomial ring are the SAGBI basis.

    Functionality

    The second main functionality of this package includes weightVectorsRealizingSAGBI(G, R). A function that identifies weight vectors that meet the SAGBI criterion for a specified set of polynomials.

    Given a set of polynomials (G) and a polynomial ring (R) as input, the function provides an array of weight vectors that satisfy the SAGBI criterion, along with a Boolean value indicating whether the SAGBI criterion is met for all weight vectors, where 'True' signifies compliance and 'False' denotes non-compliance.

        weightVectorsRealizingSAGBI(G::Vector{spoly{n_Q}} and R <: Polynomial Ring over Q)
    
    Returns an array of weight vectors, which may also be empty, for which the provided vector of 
    polynomials 'G' constitutes a SAGBI basis. It also provides a true or false message indicating whether 
    this is a SAGBI basis for all of the weight vectors generated by the method or not.
    
    # Arguments
    - `G::Vector{spoly{n_Q}} and R <: Polynomial Ring over Q: input generators.

    Examples

    
    julia> using SagbiGbDetection
    
    julia> R, (l, x, y, z) = Singular.polynomial_ring(Singular.QQ, ["l","x","y","z"])
    (Singular Polynomial Ring (QQ),(l,x,y,z),(dp(4),C), spoly{n_Q}[l, x, y, z])
    
    julia> G = [z, z*x, z*y, z*x*(x^2+y^2),z*y*(x^2+y^2), l*z, l*z*x, l*z*y, l*z*x*(x^2+y^2), l*z*y*(x^2+y^2)]
    10-element Vector{spoly{n_Q}}:
     z
     x*z
     y*z
     x^3*z + x*y^2*z
     x^2*y*z + y^3*z
     l*z
     l*x*z
     l*y*z
     l*x^3*z + l*x*y^2*z
     l*x^2*y*z + l*y^3*z
    
    julia> weightVectorsRealizingSAGBI(G,R)
    (Vector{ZZRingElem}[[1, 2, 1, 1], [1, 1, 2, 1]], true) 
    

    Extract Weight Vectors

    To define different term orders, the function extractWeightVectors(G) computes the Newton polytope of the set of given generators G and for each vertex of the polytope, it decides if the normal cone to this vertex intersects the positive orthant. If this happens then it selects a weight w in the intersection which serves as a term order in the detection algorithms.

    julia> extractWeightVectors(G)
    2-element Vector{Vector{ZZRingElem}}:
     [-2, -2]
     [-3, -1]

    S-polynomial

    Given two polynomials f and g the function Spair(f, g) computes the S-polynomial.

    julia> Spair(G[1], G[2])
    -x^3 + y^2

    Buchberger Criterion and SAGBI criterion

    Given a set of polynomials GS in a ring R, the function BuchbergerCriterion(GS, R) is for checking the Buchberger criterion for the set of polynomials GS.

    julia> BuchbergerCriterion(G,R)
    true

    Similarly, SagbiCriterion(G, R, w::Vector{Int}) is a function for checking if a set of polynomials satisfies the SAGBI criterion.