logo

Common expressions for the theory of proveit.logic.sets.cartesian_products

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, k, m, A
from proveit.logic import InSet
from proveit.numbers import one
In [2]:
%begin common
Defining common sub-expressions for theory 'proveit.logic.sets.cartesian_products'
Subsequent end-of-cell assignments will define common sub-expressions
%end_common will finalize the definitions
In [3]:
a_in_A__1_to_m = ExprRange(k, InSet(IndexedVar(a, k), IndexedVar(A, k)),
                           one, m)
Out[3]:
a_in_A__1_to_m:
In [4]:
%end common
These common expressions may now be imported from the theory package: proveit.logic.sets.cartesian_products