carl  24.04
Computer ARithmetic Library
AlgebraicSubstitution.h File Reference

This file contains carl::algebraic_substitution which performs what we call an algebraic substitution. More...

Include dependency graph for AlgebraicSubstitution.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 carl
 carl is the main namespace for the library.
 
 carl::ran
 
 carl::ran::interval
 

Enumerations

enum class  carl::ran::interval::AlgebraicSubstitutionStrategy { carl::ran::interval::RESULTANT , carl::ran::interval::GROEBNER }
 Indicates which strategy to use: resultants or Gröbner bases. More...
 

Functions

template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution_groebner (const std::vector< MultivariatePolynomial< Number >> &polynomials, const std::vector< Variable > &variables)
 Implements algebraic substitution by Gröbner basis computation. More...
 
template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution_groebner (const UnivariatePolynomial< MultivariatePolynomial< Number >> &p, const std::vector< UnivariatePolynomial< MultivariatePolynomial< Number >>> &polynomials)
 Implements algebraic substitution by Gröbner basis computation. More...
 
template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution_resultant (const UnivariatePolynomial< MultivariatePolynomial< Number >> &p, const std::vector< UnivariatePolynomial< MultivariatePolynomial< Number >>> &polynomials)
 Implements algebraic substitution by resultant computation. More...
 
template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution_resultant (const std::vector< MultivariatePolynomial< Number >> &polynomials, const std::vector< Variable > &variables)
 Implements algebraic substitution by resultant computation. More...
 
template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution (const UnivariatePolynomial< MultivariatePolynomial< Number >> &p, const std::vector< UnivariatePolynomial< MultivariatePolynomial< Number >>> &polynomials, AlgebraicSubstitutionStrategy strategy=AlgebraicSubstitutionStrategy::RESULTANT)
 Computes the algebraic substitution of the given defining polynomials into a multivariate polynomial p. More...
 
template<typename Number >
std::optional< UnivariatePolynomial< Number > > carl::ran::interval::algebraic_substitution (const std::vector< MultivariatePolynomial< Number >> &polynomials, const std::vector< Variable > &variables, AlgebraicSubstitutionStrategy strategy=AlgebraicSubstitutionStrategy::RESULTANT)
 Computes the algebraic substitution of the given defining polynomials into a multivariate polynomial p. More...
 

Detailed Description

This file contains carl::algebraic_substitution which performs what we call an algebraic substitution.

We substitute the algebraic part of a variable assignment into a multivariate polynomial to obtain a univariate polynomial in the remaining variable. The algebraic part is a minimal polynomial, in practice the defining polynomial of a real algebraic number. We implement two strategies: GROEBNER and RESULTANT.

In both cases you need to make sure that the minimal polynomials are not only reducible over Q, but are actually minimal polynomials within a tower of field extensions characterized by the given polynomials. If one fails to do this, the resulting polynomial may vanish identically. In some cases one can exclude that this happens.

Such minimal polynomials can be computed using FieldExtensions. If the resultant strategy is used, it is important that the defining polynomials are used from top to bottom. Thus the first defining polynomials may contain all variables, the last must be univariate.

Definition in file AlgebraicSubstitution.h.