src/Doc/Tutorial/Misc/fakenat.thy
author paulson <lp15@cam.ac.uk>
Fri, 22 Nov 2024 16:05:42 +0000
changeset 81473 53e61087bc6f
parent 80983 2cc651d3ce8e
permissions -rw-r--r--
Introduced the function some_elem for grabbing an element from a non-empty set, and simplified the theorem the_elem_image_unique

(*<*)
theory fakenat imports Main begin
(*>*)

text\<open>\noindent
The type \tydx{nat} of natural
numbers is predefined to have the constructors \cdx{0} and~\cdx{Suc}.
It behaves approximately as if it were declared like this:
\<close>

datatype nat = zero ("0") | Suc nat
(*<*)
end
(*>*)