Welder中有强感应的概念吗?

Is there a notion of strong induction in Welder?

在使用 Welder 时,我遇到了必须证明的情况:

if content(l1) == content(l2) and f is an idempotent, associative and commutative operator then fold(f,z,l1) = fold(f,z,l2)

在我证明的一个阶段,我想证明对于形式为 x::xs:

的列表 l1

fold(f,z,without(x,xs)) == fold(f,z,without(x,l2))

where without(x,.) 从列表中删除出现的 x。因此很明显 without(x,xs) 的大小小于 x::xs 的大小,因此如果 Welder 中允许强感应,我应该得到相等(内容相等)。

目前系统只是告诉我without(x,xs)没有归纳假设。那么Welder强感应怎么做呢?

作为结构归纳基础的有根据的排序并不对应于树大小的排序,而是对应于子树关系。即,xs < Cons(x, xs),但如果 xs 不是 ys 的子元素(即使 xs.size <= ys.size),xsCons(x, ys) 不可比较.这就是为什么你不能假设 without(x,xs) 上的归纳假设,因为不能保证它是 x :: xs.

的子树

焊机实际上确实允许强感应。例如,归纳假设定义在 xs.tailxs.tail.tail 等上。如果您想要基于大小的归纳,则必须使用 naturalInduction(这也很强大)。