We also define key theorems that will be used to generate the automatically generated a well-founded subterm relation for inductive datatypes. We also prove decidability and wf theorems asap.
TODO: support foldl/foldr and binders