VerticalRootCounts.jl

Augmented vertically parametrized systems

VerticalRootCounts.AugmentedVerticalSystemType
AugmentedVerticalSystem(C::QQMatrix, M::ZZMatrix, L::QQMatrix=zero_matrix(QQ, 0, nrows(M)))

Constructs the augmented vertical system given by a parameter-separating presentation, consisting of

  • a coefficient matrix C (size s×m) of full row rank,
  • an exponent matrix M, (size n×m), and
  • an augmentation matrix L (size d×n) of full row rank.
source
VerticalRootCounts.AugmentedVerticalSystemType
AugmentedVerticalSystem

Representation of an augmented vertical system.

Fields

  • n::Int: Number of variables in the system
  • m::Int: Number of a-parameters (coefficients)
  • r::Int: Number of monomials in the minimal presentation
  • s::Int: Rank of the coefficient matrix C
  • d::Int: Number of augmenting linear forms
  • C::QQMatrix: Original coefficient matrix (size s×m)
  • M::ZZMatrix: Original exponent matrix (size n×m)
  • L::QQMatrix: Augmentation matrix (size d×n)
  • C_min: Coefficient matrix of the minimal presentation (with rational function entries)
  • M_min::ZZMatrix: Exponent matrix of the minimal presentation (size n×r)
  • Lb: Symbolic augmented augmentation matrix (with rational function entries)
  • system::Vector: The polynomials of the system a vector of OSCAR polynomials
source
VerticalRootCounts.is_purely_verticalMethod
is_purely_vertical(F::AugmentedVerticalSystem)

Check if the augmented vertical system F is purely vertical, i.e. if the number of augmenting linear forms is zero.

source
VerticalRootCounts.is_squareMethod
is_square(F::AugmentedVerticalSystem)

Check if the augmented vertical system F is square, i.e. if the number of polynomials equals the number of variables.

source
VerticalRootCounts.minimal_presentationMethod
minimal_presentation(C, M)

Given a vertical system given byC and exponent matrix M, compute the defining matrices for the monomial re-embedding.

Example

julia> C = matrix(QQ, [0 0 1 -1 1 0; 1 -1 -1 0 0 0; 0 0 0 1 -1 -1])
[0    0    1   -1    1    0]
[1   -1   -1    0    0    0]
[0    0    0    1   -1   -1]

julia> M = matrix(ZZ, [1 0 0 0 0 0; 0 0 0 1 0 0; 1 0 0 0 0 0; 0 0 0 1 0 0; 0 1 1 0 0 0; 0 0 0 0 1 1])
[1   0   0   0   0   0]
[0   0   0   1   0   0]
[1   0   0   0   0   0]
[0   0   0   1   0   0]
[0   1   1   0   0   0]
[0   0   0   0   1   1]

julia> C_min, M_min = minimal_presentation(C, M);

julia> C_min
[   0           a[3]   -a[4]           a[5]]
[a[1]   -a[2] - a[3]       0              0]
[   0              0    a[4]   -a[5] - a[6]]

julia> M_min
[1   0   0   0]
[0   0   1   0]
[1   0   0   0]
[0   0   1   0]
[0   1   0   0]
[0   0   0   1]
source

Generic root counts

VerticalRootCounts.generic_degreeMethod
generic_degree(C::QQMatrix, M::ZZMatrix)

Compute the generic degree of the ideal of a purely vertical system F.

In accordance with Bézout's theorem, we compute this by intersecting with a generic affine space of complementary dimension.

source
VerticalRootCounts.generic_root_countMethod
generic_root_count(C::QQMatrix, M::ZZMatrix, L::QQMatrix; 
    a_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}} = nothing,
    b_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}} = nothing, 
    check_cotransversality::Bool=true, 
    verbose::Bool=false)

Compute the generic root count of an augmented vertical system F.

Example

julia> C = matrix(QQ, [1 -1 -1]);

julia> M = matrix(ZZ, [1 0 2; 0 1 1]);

julia> L = matrix(QQ, [1 1]);

julia> F = AugmentedVerticalSystem(C, M, L);

julia> grc_result = generic_root_count(F);

julia> grc_result.count
3
source
VerticalRootCounts.GenericRootCountResultType
GenericRootCountResult

Representation of the result of a generic root count computation.

Fields:

  • count::Int: The generic root count
  • a_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}}: The choice of parameters a used in the computation
  • b_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}}: The choice of constant terms b used in the computation
  • method::Symbol: The method used for the computation (:degeneracy, :cotransversality, or :stable_intersection)
  • TropB::Union{TropicalVariety,Nothing}: The tropical variety of the binomial part (only for :stable_intersection)
  • TropL::Union{TropicalLinearSpace,Nothing}: The tropical linear space of the linear part (only for :stable_intersection)
  • h::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}}: The perturbation used for the stable intersection (only for :stable_intersection)
  • stable_intersection::Union{StableIntersectionResult,Nothing}: The result of the stable intersection computation (only for :stable_intersection)
  • cotranversal_presentation_C::Union{Nothing,Vector{Vector{Int}}}: The row supports of the cotransversal presentation for the nonlinear part (only for :cotransversality)
  • cotranversal_presentation_Lb::Union{Nothing,Vector{Vector{Int}}}: The row supports of the cotransversal presentation for the linear part (only for :cotransversality)
source

Positive bounds

VerticalRootCounts.lower_bound_of_maximal_positive_root_countMethod
lower_bound_of_maximal_positive_root_count(C::QQMatrix, M::ZZMatrix, L::QQMatrix; 
num_a_b_attempts::Int=5, num_h_attempts_per_a_b::Int=10, verbose::Bool=false)

Computes a lower bound on the maximal positive root count of the augmented vertically parametrized system given by the coefficient matrix C, the exponent matrix M, and the affine form matrix L.

The function randomly samples num_a_b_attempts choices of the b and k parameters, and for each such choice num_h_attempts_per_a_b shifts of the tropicalized binomial variety in the space of auxiliary variables in the modification.

source

Parametrically toric systems

VerticalRootCounts.toric_lower_bound_of_maximal_positive_root_countMethod
toric_lower_bound_of_maximal_positive_root_count(
    A::ZZMatrix, 
    F::AugmentedVerticalSystem; 
    num_b_attempts::Int=5, 
    num_h_attempts_per_b::Int=10,
    target_bound::Union{Nothing,Int}=nothing, 
    max_entry_size::Int=1000,
    show_progress::Bool=true,
    verbose::Bool=false
)

Given an augmented vertical system F that is parametrically toric with respect to an exponent matrix A, compute a lower bound on the maximal number of positive roots. This is done by trying different choices of the constant terms b and perturbations h.

Input:

  • A::ZZMatrix: Exponent matrix of the toric part of the system (size d×n)
  • F::AugmentedVerticalSystem: An augmented vertical system with n variables and d augmenting linear forms.

Optional inputs:

  • num_b_attempts::Int=5: Number of different choices of the constant terms b to try.
  • num_h_attempts_per_b::Int=10: Number of different choices of the perturbation h to try for each choice of b.
  • target_bound::Union{Nothing,Int}=nothing: If provided, the function will stop as soon as a lower bound greater than or equal to target_bound is found.
  • max_entry_size::Int=1000: Maximum absolute value of the entries of b and h when they are randomly generated.
  • show_progress::Bool=true: Whether to show a progress bar during the computation.
  • verbose::Bool=false: Whether to print detailed information about the computation process.
source
VerticalRootCounts.toric_root_boundMethod
toric_root_bound(A::ZZMatrix, F::AugmentedVerticalSystem;
b_spec::Union{Nothing,Vector{Int},Vector{QQFieldElem}}=nothing,
check_cotransversality::Bool=true,
verbose::Bool=false)

Given an augmented vertical system F that is parametrically toric with respect to an exponent matrix A, compute an upper bound on the number of roots in the complex torus.

Input:

  • A::ZZMatrix: Exponent matrix of the toric part of the system (size d×n)
  • F::AugmentedVerticalSystem: An augmented vertical system with n variables and d augmenting linear forms.

Optional inputs:

  • b_spec::Union{Nothing,Vector{Int},Vector{QQFieldElem}}=nothing: Optional choice of constant terms for the augmenting linear forms. If not provided, a random generic choice will be made.
  • check_cotransversality::Bool=true: Whether to check for cotransversality.
  • verbose::Bool=false: Whether to print detailed information about the computation process.
source
VerticalRootCounts.PositiveToricRootBoundResultType

PositiveToricRootBoundResult

Result type of the toric lower bound of maximal positive root count.

Fields:

  • bound::Int: The computed lower bound on the maximal number of positive roots.
  • b_spec::Union{Vector{QQFieldElem}, Nothing}: The choice of constant terms b that achieved the bound (if method is :stable_intersection)
  • h::Union{Vector{QQFieldElem}, Nothing}: The choice of perturbation h that achieved the bound (if method is :stable_intersection)
  • method::Symbol: The method used to compute the bound.
  • TropB::Union{TropicalVariety, Nothing}: The tropical variety.
  • TropL::Union{TropicalLinearSpace, Nothing}: The tropical linear space.
  • stable_intersection::Union{StableIntersectionResult,Nothing}: The result of the stable intersection computation.
source

Reaction networks

VerticalRootCounts.multisite_phosphorylation_matricesMethod
multisite_phosphorylation_matrices(k::Int)

Compute the coefficient, exponent, and linear part matrices for the k-site phosphorylation network.

Ordering of species (rows of $M$ and columns of $L$): $E, F, S_0, ..., S_k, ES_0, ..., ES_{k-1}, FS_1, ..., F S_k$.

Ordering of the conservation (rows of $L$): $s_{\mathrm{tot}}, e_{\mathrm{tot}}, f_{\mathrm{tot}}$

source
VerticalRootCounts.steady_state_systemMethod
steady_state_system(rn)

For a reaction network rn, compute the coefficient, exponent, and linear part matrices of the augmented vertically parametrized steady state system.

Example

julia> using Catalyst

julia> using VerticalRootCounts

julia> rn = @reaction_network begin
           k1, X1 --> X2
           k2, X2 --> X1
           k3, 2*X1 + X2 --> 3*X1
       end;

julia> F = steady_state_system(rn);

julia> F.C
[1   -1   -1]

julia> F.M
[1   0   2]
[0   1   1]

julia> F.L
[1   1]
source

Helper functions

VerticalRootCounts.cotransversal_presentationMethod
cotransversal_presentation(A::QQMatrix)

Checks if the rowspan matroid of a rational matrix A is cotransversal. If it is, a cotransversal presentation of the matroid is returned; if it is not, false is returned.

source
MixedSubdivisions.mixed_volumeMethod
mixed_volume(F::Vector{<:MPolyRingElem})

Computes a the mixed volume of a square polynomial system (encoded as a vector of polynomials).

source
VerticalRootCounts.check_genericity_of_specializationMethod
check_genericity_of_specialization(A::AbstractAlgebra.Generic.MatSpaceElem{<:RingElem}, a_spec::Vector{<:Union{Int, RingElem}})

Check if a symbolic matrix is generic at a given specialization, in the sense that the column matroid of the specialized matrix is the same as the column matroid of the generic matrix.

Examples

julia> using Oscar;

julia> K, a = rational_function_field(QQ, "a"=>1:3);

julia> A = matrix(K, [[a[1], a[2], a[3]],[a[1], a[1]+a[2], a[2]+a[3]]]);

julia> check_genericity_of_specialization(A, [1, 1, 1])
false

julia> check_genericity_of_specialization(A, [1, 1, 2])
true
source
VerticalRootCounts.perturb_and_intersect_if_transversalMethod
perturb_and_intersect_if_transversal(TropL::TropicalLinearSpace, TropB::TropicalVariety; perturbation::Vector{<:Union{Integer,RingElem}}=rand(Int16,ambient_dim(TropL)), with_multiplicities::Bool = true)

Perturb TropB by perturbation and intersect with TropL if the intersection is transversal. Return four things:

  • the vector perturbation
  • a Boolean true or false depending on whether TropB + perturbation and TropL intersect transversally
  • a vector that contains the intersection points if the intersection is transversal (otherwise empty)
  • a vector that contains the multiplicities of the intersection points if the intersection is transversal and with_multiplicities is true (otherwise empty)

Assumes that TropL is a simplicial fan and that TropB is the tropicalization of a binomial variety, i.e., a regular linear space.

source
VerticalRootCounts.StableIntersectionResultType
StableIntersectionResult

A struct to hold the results of the perturb_and_intersect_if_transversal function.

Fields:

  • points::Vector{Vector{QQFieldElem}}: The intersection points if the intersection
  • multiplicities::Vector{Int}: The multiplicities of the intersection points
  • perturbation::Vector{<:Union{Integer,RingElem}}: The perturbation used for the intersection
  • is_transverse::Bool: Whether the intersection was transverse
source