(* Title: HOL/Corec_Examples/Tests/Simple_Nesting.thy Author: Aymeric Bouzy, Ecole polytechnique Author: Jasmin Blanchette, Inria, LORIA, MPII Copyright 2015, 2016 Tests "corec"'s parsing of map functions. *) section ‹Tests "corec"'s Parsing of Map Functions› theory Simple_Nesting imports "HOL-Library.BNF_Corec" begin subsection ‹Corecursion via Map Functions› consts g :: 'a g' :: 'a g'' :: 'a h :: 'a h' :: 'a q :: 'a q' :: 'a codatatype tree = Node nat "tree list" (* a direct, intuitive way to define a function *)