Theory of Natural Number Arithmetic
Pre: Predicate Logic, Statements and Quantifiers
Computer scientists consider 0 to be part of the natural numbers:
The set of natural numbers is countably infinite.
The theory contains:
- Constants:
(no other numerical constants) - Functions:
(successor, plus 1) (addition) (multiplication)
- Predicates:
(less than)
we have finite representation of an infinite set.
Peano's Axioms
Distinction Axioms
Two axioms to state that all natural numbers are distinct:
Technically this should be iff, but we don't have to write it because of the theory of equality.
Addition Axioms
Find
solution
3 is
Note: we don't have to do proofs like this.
Multiplication Axioms
Find
solution
Induction
Induction vs Deduction
- Deduction: is showing a conclusion follows from the stated premises using rules of inference
- Philosophical induction: deriving general principles from particular observations. The number of observations is always limited, so there can always be exceptions to the principles derived.
- Mathematical induction: does deal with generalizations, but because we are dealing with an ordered domain, there can't be exceptions to the properties. As such, mathematical induction is actually mathematical deduction.
Induction with Natural Deduction
Show these steps:
Prove:
proof
Practical approach for SE212:
- Use numbers as constants (
) - Use
instead of - Use mathematical functions (
, etc) - Use predicates with well-known meanings (
, etc)
Non-Zero Base Case
We can use a vacuously true implication for our base case starting at 0, which will render all values below our non-zero base case true.
Prove:
proof
Other Axioms
Peano had additional axioms for the
Recursive Definitions
We often need to define mathematical functions.
To write a definition of a function on an ordered domain like nat, we can use a recursive function definition. A recursive function definition is one that is defined in terms of itself and certain terminating clauses.
For natural numbers, we can define a function by giving:
- Its value for
- Its value for
in terms of (or its value for in terms of )
Prove:
proof
Prove that every third fib is even: