1
4

2 回答 2

3

Lean 3 现在支持嵌套归纳声明:

inductive a : Type
| aFromAs : list a → a
于 2017-01-31T14:04:54.697 回答
2

看起来Lean 不支持嵌套数据类型,因此最好将它们编码为相互递归的定义:

inductive a := node : as -> a
with as :=
   | nil  : as
   | cons : a -> as -> as
于 2016-11-18T08:46:30.137 回答