logo

Common expressions for the theory of proveit.numbers

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 Function
from proveit import P, k, m, n
from proveit.logic import Set, Difference
from proveit.numbers import Add, Complex, zero, one
%begin common
Defining common sub-expressions for theory 'proveit.numbers'
Subsequent end-of-cell assignments will define common sub-expressions
%end_common will finalize the definitions
In [2]:
Pzero = Function(P, zero)
Pzero:
In [3]:
Pone = Function(P, one)
Pone:
In [4]:
Pn = Function(P, n)
Pn:
In [5]:
P_nAddOne = Function(P, Add(n, one))
P_nAddOne:
In [6]:
Pm = Function(P, m)
Pm:
In [7]:
P_mAddOne = Function(P, Add(m, one))
P_mAddOne:
In [8]:
Pk = Function(P, k)
Pk:
In [9]:
%end common
These common expressions may now be imported from the theory package: proveit.numbers