logo

Common expressions for the theory of proveit.numbers.summation

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 a, b, f, l, k, Q
from proveit.core_expr_types import b_1_to_j
from proveit.numbers import Sum
In [2]:
%begin common
Defining common sub-expressions for theory 'proveit.numbers.summation'
Subsequent end-of-cell assignments will define common sub-expressions
%end_common will finalize the definitions
In [3]:
ak = Function(a, k)
ak:
In [4]:
al = Function(a, l)
al:
In [5]:
bk = Function(b, k)
bk:
In [6]:
bl = Function(b, l)
bl:
In [7]:
summation_b1toj_fQ = Sum(b_1_to_j, 
                         Function(f, b_1_to_j), 
                         condition=Function(Q, b_1_to_j))
summation_b1toj_fQ:
In [8]:
%end common
These common expressions may now be imported from the theory package: proveit.numbers.summation