(* Title: FOL/ex/Nat_Class.thy Author: Markus Wenzel, TU Muenchen
*)
section‹Theory of the natural numbers: Peano's axioms, primitive recursion\
theory Nat_Class imports FOL begin
text‹
This is an abstract version of 🍋‹Nat.thy›. Instead of axiomatizing a
single type ‹nat›, it defines the class of all these types (up to
isomorphism).
Note: The ‹rec› operator has been made 🚫‹monomorphic›, because class axioms cannot contain more than one type variable. ›
class nat = fixes Zero :: ‹'a\ (\0\) and Suc :: ‹'a \ 'a› and rec :: ‹'a \ 'a ==> ('a \ 'a ==>'a) \ 'a› assumes induct: ‹P(0) ==> (∧x. P(x) ==> P(Suc(x))) ==> P(n)› and Suc_inject: ‹Suc(m) = Suc(n) ==> m = n› and Suc_neq_Zero: ‹Suc(m) = 0 ==> R› and rec_Zero: ‹rec(0, a, f) = a› and rec_Suc: ‹rec(Suc(m), a, f) = f(m, rec(m, a, f))› begin
definition add :: ‹'a \ 'a ==>'a\ (infixl \+\ 60) where‹m + n = rec(m, n, λx y. Suc(y))›
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.