logo

Theorems (or conjectures) for the theory of proveit.numbers.number_sets.natural_numbers

In [1]:
import proveit
# Prepare this notebook for defining the theorems of a theory:
%theorems_notebook # Keep this at the top following 'import proveit'.
from proveit import Operation
from proveit import a, b, m, n, x, P
from proveit.logic import And, Equals, NotEquals, Forall, Implies, in_bool, InSet, ProperSubset
from proveit.numbers import zero, one, num, frac
from proveit.numbers import Natural, NaturalPos, Integer, Interval, Rational, Real, RealPos, Complex
from proveit.numbers import Add, subtract, greater_eq, Less, LessEq
from proveit.numbers import Pzero, Pone, Pm, P_mAddOne, Pn
In [2]:
%begin theorems
Defining theorems for theory 'proveit.numbers.number_sets.natural_numbers'
Subsequent end-of-cell assignments will define theorems
'%end theorems' will finalize the definitions
In [3]:
interval_is_nat = Forall((a, b), Forall(n, InSet(n, Natural), 
                                       domain=Interval(a, b)), domain=Natural)
Out[3]:
interval_is_nat (conjecture without proof):

In [4]:
natural_lower_bound = Forall(n, greater_eq(n, zero), domain=Natural)
Out[4]:
natural_lower_bound (conjecture without proof):

In [5]:
natural_pos_lower_bound = Forall(n, greater_eq(n, one), domain=NaturalPos)
Out[5]:
natural_pos_lower_bound (conjecture without proof):

In [6]:
# proven
non_zero_if_is_nat_pos = Forall(
        n,
        NotEquals(n, zero),
        domain=NaturalPos)
Out[6]:
non_zero_if_is_nat_pos (conjecture with conjecture-based proof):

In [7]:
nat_pos_within_nat = ProperSubset(NaturalPos, Natural)
Out[7]:
nat_pos_within_nat (conjecture without proof):

In [8]:
# In progress
# For Natural numbers
nat_membership_is_bool = Forall(x, in_bool(InSet(x, Natural)))
Out[8]:
nat_membership_is_bool (conjecture without proof):

In [9]:
# For Positive Natural numbers (NaturalPos)
nat_pos_membership_is_bool = Forall(x, in_bool(InSet(x, NaturalPos)))
Out[9]:
nat_pos_membership_is_bool (conjecture without proof):

In [10]:
fold_forall_natural = Forall(P, Implies(And(Pzero, 
                                             Forall(m, P_mAddOne, 
                                                 domain=Natural, condition=Pm)), 
                                         Forall(n, Pn, domain=Natural)))
Out[10]:
fold_forall_natural (conjecture without proof):

In [11]:
fold_forall_natural_pos = Forall(P, Implies(And(Pone, 
                                                 Forall(m, P_mAddOne, domain=NaturalPos, 
                                                        condition=Pm)), 
                                             Forall(n, Pn, domain=NaturalPos)))
Out[11]:
fold_forall_natural_pos (conjecture without proof):

In [12]:
%end theorems
These theorems may now be imported from the theory package: proveit.numbers.number_sets.natural_numbers