logo

Common expressions for the theory of proveit.logic.equality

In [1]:
import proveit
# Prepare this notebook for defining the common expressions of a theory:
%common_expressions_notebook # Keep this at the top following 'import proveit'.
from proveit import ExprRange, IndexedVar
from proveit import a, n, x, y
from proveit.logic import Equals
from proveit.numbers import one
%begin common
Defining common sub-expressions for theory 'proveit.logic.equality'
Subsequent end-of-cell assignments will define common sub-expressions
%end_common will finalize the definitions
In [2]:
elementwise_equality = ExprRange(a, Equals(IndexedVar(x, a), IndexedVar(y, a)),
                                 one, n)
elementwise_equality:
In [3]:
%end common
These common expressions may now be imported from the theory package: proveit.logic.equality