src/Doc/Tutorial/Misc/fakenat.thy
author Fabian Huch <huch@in.tum.de>
Tue, 22 Oct 2024 17:31:54 +0200
changeset 81362 f586fdabe670
parent 80983 2cc651d3ce8e
permissions -rw-r--r--
clarified: proper return type;

(*<*)
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
(*>*)