latte-integers.nat
The natural integers in ℕ as a subset of ℤ.
int-split
(int-split [n int])
(or (or (= n zero) (positive n)) (negative n))
Theorem: The tripartition property about integers.
int-split-alt
(int-split-alt [n int])
(or (elem n nat) (not (elem n nat)))
Theorem: An alternative split principle for integers (or a constructive excluded middle principle, so to speak).
int-split-elim
(int-split-elim [n int] [pz (==> (= n zero) A)] [ppos (==> (positive n) A)] [pneg (==> (negative n) A)])
A
Theorem: An elimination princile for integers, cf. int-split-elim-rule.
int-split-elim-rule
(int-split-elim-rule [A :type])
(forall
[n int]
(==> (==> (= n zero) A) (==> (positive n) A) (==> (negative n) A) A))
Theorem: An elimination principle for integers.
int-split-zero
(int-split-zero [n int])
(or (= n zero) (not (= n zero)))
Theorem: Yet another split principle for integers.
nat
(nat)
(lambda
[x int]
(forall
[P (==> int :type)]
(==> (and (P zero) (nat-succ-prop P)) (P x))))
Definition: The subset of natural integers.
nat-case
(nat-case [P (==> int :type)])
(==>
(P zero)
(forall-in [k nat] (P (succ k)))
(forall-in [n nat] (P n)))
Theorem: Case analysis for natural numbers.
nat-induct
(nat-induct [P (==> int :type)])
(==>
(P zero)
(forall [x int] (==> (elem x nat) (P x) (P (succ x))))
(forall [x int] (==> (elem x nat) (P x))))
Theorem: The induction principle for natural integers. This is the third Peano axiom but it can be derived from int-induct.
nat-split
(nat-split)
(forall-in [n nat] (or (= n zero) (positive n)))
Theorem: A natural number is either zero or it is positive
nat-succ
(nat-succ [x int])
(==> (elem x nat) (elem (succ x) nat))
Theorem: The successor of a natural integer is a natural integer.
nat-succ-injective
(nat-succ-injective)
(forall
[x y int]
(==> (elem x nat) (elem y nat) (= (succ x) (succ y)) (= x y)))
Theorem: Successor is injective, the second Peano ‘axiom’ here a simple consequence of succ-injective.
nat-succ-prop
(nat-succ-prop [P (==> int :type)])
(forall [y int] (==> (P y) (P (succ y))))
Definition: A property verified by all successors of natural integers.
nat-zero
(nat-zero)
(elem zero nat)
Theorem: Zero is a natural integer.
nat-zero-has-no-pred
(nat-zero-has-no-pred)
(not (elem (pred zero) nat))
Axiom: An important axiom of the natural integer subset wrt. pred.
nat-zero-is-not-succ
(nat-zero-is-not-succ)
(forall [x int] (==> (elem x nat) (not (= (succ x) zero))))
Theorem: Zero is not a successor of a natural integer.
This is the first Peano ‘axiom’ (here theorem, based on integers) for natural integers.
negative
(negative [n int])
(not (elem n nat))
Definition: The integer n
is strictly negative.
negative-nat
(negative-nat)
(forall-in [n nat] (not (negative n)))
Theorem:
negative-not-zero
(negative-not-zero)
(not (negative zero))
Theorem:
negative-pred
(negative-pred [n int])
(==> (negative n) (negative (pred n)))
Theorem: Negative predecessors.
negative-pred-split
(negative-pred-split [n int])
(==> (negative (pred n)) (or (= n zero) (negative n)))
Theorem: Splitting of a predecessor.
negative-pred-split-conv
(negative-pred-split-conv [n int])
(==> (or (= n zero) (negative n)) (negative (pred n)))
Theorem: An auxiliary theorem for the predecessor.
negative-pred-split-equiv
(negative-pred-split-equiv [n int])
(<=> (negative (pred n)) (or (= n zero) (negative n)))
Theorem: The conjunction of negative-pred-split and negative-pred-split-conv.
negative-pred-zero
(negative-pred-zero)
(negative (pred zero))
Theorem: The predecessor of zero is negative.
positive
(positive [n int])
(elem (pred n) nat)
Definition: The integer n
is strictly positive.
positive-conv
(positive-conv [n int])
(==> (positive n) (elem n nat))
Theorem: A positive natural number is (obiously) a natural number
positive-nat-split
(positive-nat-split)
(forall-in [x nat] (==> (not (= x zero)) (positive x)))
Theorem: Any non-zero natural number is positive.
positive-not-zero
(positive-not-zero)
(not (positive zero))
Theorem:
positive-succ
(positive-succ [n int])
(==> (elem n nat) (positive (succ n)))
Theorem: The successor of a natural number is positive.
positive-succ-conv
(positive-succ-conv [n int])
(==> (positive (succ n)) (elem n nat))
Theorem: A successor of a positive natural number is (obiously) a natural number
positive-succ-equiv
(positive-succ-equiv [n int])
(<=> (positive (succ n)) (elem n nat))
Theorem: A positive number is a natural number.
positive-succ-split
(positive-succ-split [n int])
(==> (positive (succ n)) (or (= n zero) (positive n)))
Theorem: A positive successor can split.
positive-succ-split-conv
(positive-succ-split-conv [n int])
(==> (or (= n zero) (positive n)) (positive (succ n)))
Theorem: The converse of positive-succ-split.
positive-succ-split-equiv
(positive-succ-split-equiv [n int])
(<=> (positive (succ n)) (or (= n zero) (positive n)))
Theorem: The conjunction of positive-succ-split and positive-succ-split-conv.
positive-succ-strong
(positive-succ-strong [n int])
(==> (positive n) (positive (succ n)))
Theorem: The successor of a positive is positive.
positive-zero-conv
(positive-zero-conv [n int])
(==> (or (= n zero) (positive n)) (elem n nat))
Theorem: A positive or null number is … natural
zero-is-not-one
(zero-is-not-one)
(not (= one zero))
Theorem: A direct consequence of nat-zero-is-not-succ.