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 k, A, B
from proveit.core_expr_types import (
x_1_to_n, x_1_to_m, y_1_to_n, y_1_to_m, z_1_to_n,
P__x_1_to_n, P__y_1_to_n, P__x_1_to_m_y_1_to_n,
Q__x_1_to_n, Q__x_1_to_m, Q__y_1_to_n, Q__z_1_to_n, R__x_1_to_n,
R__y_1_to_m, R__z_1_to_n, R__x_1_to_m_y_1_to_n)
from proveit.logic import TRUE, Implies, Not, Forall, Exists, NotExists, NotEquals
from proveit.numbers import Natural, NaturalPos
%begin common
general_forall_Px = Forall(x_1_to_n, P__x_1_to_n)
general_forall_Py= Forall(y_1_to_n, P__y_1_to_n)
general_forall_Px_if_Qx = Forall(x_1_to_n, P__x_1_to_n, conditions=[Q__x_1_to_n])
general_forall_Py_if_Qy = Forall(y_1_to_n, P__y_1_to_n, conditions=[Q__y_1_to_n])
general_nested_forall_Pxy_if_Qx = Forall(x_1_to_m,
Forall(y_1_to_n, P__x_1_to_m_y_1_to_n,
conditions=R__x_1_to_m_y_1_to_n),
conditions=Q__x_1_to_m)
general_bundled_forall_Pxy_if_Qx = Forall((x_1_to_m, y_1_to_n),
P__x_1_to_m_y_1_to_n,
conditions=[Q__x_1_to_m, R__x_1_to_m_y_1_to_n])
general_forall__Py_not_T = Forall(y_1_to_n, NotEquals(P__y_1_to_n, TRUE))
general_forall__Py_not_T__st_Qy = Forall(y_1_to_n, NotEquals(P__y_1_to_n, TRUE),
conditions = [Q__y_1_to_n])
general_forall_st_Qx__Px_implies_Rx = Forall(x_1_to_n, Implies(P__x_1_to_n, R__x_1_to_n),
conditions=[Q__x_1_to_n])
general_exists_Px = Exists(x_1_to_n, P__x_1_to_n)
general_exists_Px_st_Qx = Exists(x_1_to_n, P__x_1_to_n,
conditions=[Q__x_1_to_n])
general_exists_in_A_Px_st_Qx = Exists(x_1_to_n, P__x_1_to_n, domain=A,
conditions=[Q__x_1_to_n])
general_exists_Py = Exists(y_1_to_n, P__y_1_to_n)
general_exists_Py_st_Qy = Exists(y_1_to_n, P__y_1_to_n, conditions=[Q__y_1_to_n])
general_exists_Rz_st_Qz = Exists(z_1_to_n, R__z_1_to_n, conditions=[Q__z_1_to_n])
general_exists_in_B_Py_st_Qy = Exists(y_1_to_n, P__y_1_to_n, domain=B,
conditions=[Q__y_1_to_n])
general_exists_notPx = Exists(x_1_to_n, Not(P__x_1_to_n))
general_exists_notPx_st_Qx = Exists(x_1_to_n, Not(P__x_1_to_n),
conditions=[Q__x_1_to_n])
general_notexists_Px = NotExists(x_1_to_n, P__x_1_to_n)
general_notexists_Px_st_Qx = NotExists(x_1_to_n, P__x_1_to_n, conditions=[Q__x_1_to_n])
general_notexists_Py = NotExists(y_1_to_n, P__y_1_to_n)
general_notexists_Py_st_Qy = NotExists(y_1_to_n, P__y_1_to_n,
conditions=[Q__y_1_to_n])
general_notexists_notPy = NotExists(y_1_to_n, Not(P__y_1_to_n))
general_notexists_notPy_st_Qy = NotExists(y_1_to_n, Not(P__y_1_to_n),
conditions=[Q__y_1_to_n])
%end common