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 Lambda, ExprRange, IndexedVar
from proveit.logic import And, Or, InSet, NotInSet, Intersect
from proveit import A, x, i, n
from proveit.numbers import one
%begin common
intersected_as = Intersect(ExprRange(i, IndexedVar(A, i), one, n))
x_in_each_A = ExprRange(i, InSet(x, IndexedVar(A, i)), one, n)
x_in_each_A_conjunction = And(ExprRange(i, InSet(x, IndexedVar(A, i)), one, n))
x_not_in_any_A = Or(ExprRange(i, NotInSet(x, IndexedVar(A, i)), one, n))
%end common