Conditional

class proveit.Conditional(value, condition_or_conditions, *, styles=None)[source]

Bases: proveit.Expression

A Conditional expression is one that may reduce to its ‘value’ if and only if its ‘condition’ evaluates to TRUE. The value is only relevant when the condition is TRUE and therefore the value may be replaced with an equivalent expression under the assumption that the condition is TRUE. When the condition is not TRUE, there is no defined reduction of the Conditional. All such irreducible Conditionals are regarded to be equivalent. Thus, two Lambda expressions with the same number of parameters and having Conditional bodies with the same conditions are regarded to be equivalent if their respective Conditional values are equal in all instances for which the condition is satisfied. Also, for an OperationOverInstances having a lambda map with a Conditional body, only the instances in which the condition is TRUE are valid instances and the rest are disregarded.

Methods Summary

latex(self, \*\*kwargs)

Return a latex-formatted representation of the Expression.

remake_arguments(self)

Yield the argument values or (name, value) pairs that could be used to recreate the Indexed.

string(self, \*\*kwargs)

Return a string representation of the Expression.

style_options(self)

Return the StyleOptions for this Conditional.

with_comma_delimiter(self)

with_conjunction_delimiter(self)

Methods Documentation

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).

remake_arguments(self)[source]

Yield the argument values or (name, value) pairs that could be used to recreate the Indexed.

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).

style_options(self)[source]

Return the StyleOptions for this Conditional.

with_comma_delimiter(self)[source]
with_conjunction_delimiter(self)[source]