lean4-htt/tests/lean/run/847.lean
Leonardo de Moura 52403fca83 feat: add support for guessing (very) simple WF relations
There are a lot of TODOs, but it is already useful for simple cases.

closes #847
2022-03-02 11:52:00 -08:00

10 lines
296 B
Text

inductive MyProduct (A: Type) (B: Type): Type
| mk: A -> B -> MyProduct A B
inductive MyTree: Type
| leaf: MyTree
| node: MyProduct MyTree MyTree -> MyTree
def my_length: MyTree -> Nat
| MyTree.leaf => 0
| MyTree.node (MyProduct.mk left right) => 1 + my_length left + my_length right