Abs

class proveit.numbers.Abs(A, *, styles=None)[source]

Bases: proveit.numbers.NumberOperation

Methods Summary

abs_elimination(self, \*\*defaults_config)

For some |x| expression, deduce either |x| = x (the default) OR |x| = -x (for operand_type = ‘negative’).

deduce_greater_than_equals_zero(self, …)

Keyword arguments are accepted for temporarily changing any of the attributes of proveit.defaults.

deduce_in_number_set(self, number_set, …)

Given a number set number_set (such as Integer, Real, etc), attempt to prove that the given expression is in that number set using the appropriate closure theorem.

latex(self, \*\*kwargs)

Return a latex-formatted representation of the Expression.

string(self, \*\*kwargs)

Return a string representation of the Expression.

Methods Documentation

abs_elimination(self, \*\*defaults_config)[source]

For some |x| expression, deduce either |x| = x (the default) OR |x| = -x (for operand_type = ‘negative’). Assumptions may be needed to deduce x >= 0 or x <= 0, respectively.

Keyword arguments are accepted for temporarily changing any of the attributes of proveit.defaults.

‘abs_eliminated’ returns the right-hand side of ‘abs_elimination’. ‘abs_eliminate’, called on an InnerExpr of a Judgment, substitutes the right-hand side of ‘abs_elimination’ for the inner expression.

deduce_greater_than_equals_zero(self, \*\*defaults_config)[source]

Keyword arguments are accepted for temporarily changing any of the attributes of proveit.defaults.

deduce_in_number_set(self, number_set, \*\*defaults_config)[source]

Given a number set number_set (such as Integer, Real, etc), attempt to prove that the given expression is in that number set using the appropriate closure theorem.

Keyword arguments are accepted for temporarily changing any of the attributes of proveit.defaults.

latex(self, \*\*kwargs)[source]

Return a latex-formatted representation of the Expression. The kwargs can contain formatting directives (such as ‘fence’ used to indicate when a sub-expression should be wrapped in parentheses if there can be ambiguity in the order of operations).

string(self, \*\*kwargs)[source]

Return a string representation of the Expression. The kwargs can contain formatting directives (such as ‘fence’ used to indicate when a sub-expression should be wrapped in parentheses if there can be ambiguity in the order of operations).