我不确定,但我认为有时如果我有一个前置函数,我的证明会更容易,例如,如果已知变量不为零。
我不知道一个很好的例子,但也许在这里:{ fix n have "(n::nat) > 0 ⟹ (∑i<n. f i) = Predecessor n" sorry }
可能是因为这不是一个好主意,所以库中没有前置函数。
有没有办法模拟前任功能或类似功能?
我想到了这个例子:
theorem dummy:
shows "1=1" (* dummy *)
proof-
(* Predecessor function *)
def pred == "λnum::nat. (∑i∈{ i . Suc i = num}. i)"
{fix n :: nat
from pred_def have "n>0 ⟹ Suc (pred n) = n"
apply(induct n)
by simp_all
}
show ?thesis sorry
qed