14 mVariable( _variable ),
17 mpTermVariables( nullptr ),
18 mOriginalConditions( std::move( _oConditions ) ),
19 mSideCondition( std::move(_sideCondition) )
29 mVariable( _variable ),
32 mpTermVariables( nullptr ),
33 mOriginalConditions( std::move( _oConditions ) ),
34 mSideCondition( std::move( _sideCondition ) )
44 mVariable( _sub.variable() ),
47 mpTermVariables( _sub.mpTermVariables == nullptr ? nullptr : new
carl::Variables( *_sub.mpTermVariables ) ),
48 mOriginalConditions( _sub.originalConditions() ),
49 mSideCondition( _sub.sideCondition() )
71 if(
term().has_sqrt() )
88 if(
term().has_sqrt() )
110 if(
term().has_sqrt() )
127 if(
term().has_sqrt() )
145 if(
type() == _substitution.
type() )
147 if(
term() == _substitution.
term() )
165 os <<
"[" << s.
variable() <<
" -> ";
168 os << s.
term() <<
"]";
break;
170 os << s.
term() <<
" + epsilon]";
break;
172 os <<
"-infinity]";
break;
174 os <<
"+infinity]";
break;
176 os <<
"invalid]";
break;
179 os <<
"unknown]";
break;
184 void Substitution::print(
bool _withOrigins,
bool _withSideConditions, std::ostream& _out,
const std::string& _init )
const
186 _out << _init << *
this;
194 _out << (**oCond).constraint();
Type
The type of a substitution.
void print(bool _withOrigins=false, bool _withSideConditions=false, std::ostream &_out=std::cout, const std::string &_init="") const
Prints this substitution on the given stream, with some additional information.
~Substitution()
The destructor.
carl::Variable mVariable
The variable to substitute.
carl::Variables * mpTermVariables
The variables occurring in the term to substitute for.
bool operator==(const Substitution &) const
const smtrat::SqrtEx & term() const
const smtrat::ConstraintsT & sideCondition() const
const carl::Variable & variable() const
smtrat::SqrtEx * mpTerm
The pointer (if != NULL) to the square root term to substitute the variable for.
const carl::PointerSet< Condition > & originalConditions() const
Substitution(const carl::Variable &_variable, const Type &_type, carl::PointerSet< Condition > &&_oConditions, smtrat::ConstraintsT &&_sideCondition=smtrat::ConstraintsT())
Constructs a substitution with no square root term to map to.
unsigned valuate(bool _preferMinusInf=true) const
const Type & type() const
bool is_constant(const T &t)
Checks whether the constraint is constant, i.e.
QuantifierType type(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
std::ostream & operator<<(std::ostream &_out, const Condition &_condition)
Class to create the formulas for axioms.
carl::Constraints< Poly > ConstraintsT
carl::SqrtEx< Poly > SqrtEx
carl::MultivariatePolynomial< Rational > Poly