关于:ctorResultingTypeMismatch
在归纳声明中,每个构造函数的结果类型必须与正在的类型匹配 宣布;如果不存在,则会引发此错误。也就是说,归纳类型的每个构造函数都必须 返回该类型的值。请参阅 归纳类型 手册部分了解 额外的细节。请注意,如果以下情况,可以省略构造函数的结果类型: inductive type being defined has no indices.
示例
Typo in Resulting Type
inductive Tree (α : Type) where
| leaf : Tree α
| node : α → Tree α → Treee α
inductive Tree (α : Type) where
| leaf : Tree α
| node : α → Tree α → Tree α