 # Axioms for the theory of proveit.core_expr_types.conditionals¶

In :
import proveit
# Prepare this notebook for defining the axioms of a theory:
%axioms_notebook # Keep this at the top following 'import proveit'.
from proveit import Conditional, ConditionalSet, ExprRange, IndexedVar
from proveit import a, b, c, i, m, n, Q
from proveit.logic import Implies, Forall, Equals, TRUE, FALSE, Or
from proveit.numbers import one, Natural

In :
%begin axioms

Defining axioms for theory 'proveit.core_expr_types.conditionals'
Subsequent end-of-cell assignments will define axioms
%end_axioms will finalize the definitions


A Conditional is defined to evaluate to its value when the condition is TRUE:

The condition is either true or not true but otherwise it doesn't matter if it is a Boolean. Therefore, a condition of $Q$ is the same as a condition of $Q=\top$

If two values are equal when the condition is satisfied, one may replace the other within the Conditional.

If one and only one Conditional in a ConditionalSet is True, equate the ConditionalSet to the Conditional.

In :
# singular_truth_reduction = \
#     Forall((m, n),
#            Forall((a, b, c),
#                   Equals(ConditionalSet(var_range(a, one, m), b, var_range(c, one, n)), b),
#                   conditions=[Equals(Or(var_range(a, one, m)), FALSE), Equals(Or(var_range(c, one, n)), FALSE)]),
# domain=Natural)

In :
%end axioms

These axioms may now be imported from the theory package: proveit.core_expr_types.conditionals