src/Doc/Tutorial/Misc/fakenat.thy
author wenzelm
Fri, 06 Dec 2024 20:26:33 +0100
changeset 81545 6f8a56a6b391
parent 80983 2cc651d3ce8e
permissions -rw-r--r--
clarified renaming of bounds, using Syntax_Trans.variant_bounds: avoid structures and fixed variables with syntax;

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