src/Doc/Tutorial/Misc/fakenat.thy
author paulson <lp15@cam.ac.uk>
Tue, 30 May 2023 14:24:09 +0100
changeset 78128 3d2db8057b9f
parent 67406 23307fd33906
child 80914 d97fdabd9e2b
permissions -rw-r--r--
Hiding the constructor names, particularly to avoid conflicts involving "ext"

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