VerticalRootCounts.jl
Augmented vertically parametrized systems
VerticalRootCounts.AugmentedVerticalSystem — Type
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.
VerticalRootCounts.AugmentedVerticalSystem — Type
AugmentedVerticalSystemRepresentation of an augmented vertical system.
Fields
n::Int: Number of variables in the systemm::Int: Number of a-parameters (coefficients)r::Int: Number of monomials in the minimal presentations::Int: Rank of the coefficient matrixCd::Int: Number of augmenting linear formsC::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
VerticalRootCounts.is_purely_vertical — Method
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.
VerticalRootCounts.is_square — Method
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.
VerticalRootCounts.minimal_presentation — Method
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]
Generic root counts
VerticalRootCounts.generic_degree — Method
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.
VerticalRootCounts.generic_root_count — Method
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
VerticalRootCounts.GenericRootCountResult — Type
GenericRootCountResultRepresentation of the result of a generic root count computation.
Fields:
count::Int: The generic root counta_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}}: The choice of parameters a used in the computationb_spec::Union{Nothing,Vector{<:Integer},Vector{QQFieldElem}}: The choice of constant terms b used in the computationmethod::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)
Positive bounds
VerticalRootCounts.lower_bound_of_maximal_positive_root_count — Method
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.
VerticalRootCounts.lower_bound_of_maximal_positive_steady_state_count — Method
lower_bound_of_maximal_positive_steady_state_count(rn::ReactionSystem; kwargs...)Computes a lower bound on the maximal number of isolated positive steady states that a mass action network rn can have.
Parametrically toric systems
VerticalRootCounts.toric_lower_bound_of_maximal_positive_root_count — Method
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 termsbto try.num_h_attempts_per_b::Int=10: Number of different choices of the perturbationhto try for each choice ofb.target_bound::Union{Nothing,Int}=nothing: If provided, the function will stop as soon as a lower bound greater than or equal totarget_boundis found.max_entry_size::Int=1000: Maximum absolute value of the entries ofbandhwhen 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.
VerticalRootCounts.toric_root_bound — Method
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.
VerticalRootCounts.PositiveToricRootBoundResult — Type
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.
Reaction networks
VerticalRootCounts.multisite_phosphorylation_matrices — Method
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}}$
VerticalRootCounts.steady_state_system — Method
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]Helper functions
VerticalRootCounts.cotransversal_presentation — Method
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.
MixedSubdivisions.mixed_volume — Method
mixed_volume(F::Vector{<:MPolyRingElem})Computes a the mixed volume of a square polynomial system (encoded as a vector of polynomials).
VerticalRootCounts.check_genericity_of_specialization — Method
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])
trueVerticalRootCounts.perturb_and_intersect_if_transversal — Method
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
trueorfalsedepending on whetherTropB + perturbationandTropLintersect 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_multiplicitiesistrue(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.
VerticalRootCounts.StableIntersectionResult — Type
StableIntersectionResultA struct to hold the results of the perturb_and_intersect_if_transversal function.
Fields:
points::Vector{Vector{QQFieldElem}}: The intersection points if the intersectionmultiplicities::Vector{Int}: The multiplicities of the intersection pointsperturbation::Vector{<:Union{Integer,RingElem}}: The perturbation used for the intersectionis_transverse::Bool: Whether the intersection was transverse