证明精益中两个字符串不同

Proving that two strings are different in Lean

当我进行精益定理证明的正常过程时,我意识到我当前的文件 编译花了很长时间。然后我将问题缩小到 我试图证明两个字符串不同的部分:

lemma L0 : "x" ≠ "y" :=
begin
  intros H, cases H
end

仅这个小引理就需要 15 秒才能在我的(虽然)速度较慢的机器上编译。 出事了。

我不是精益用户,所以我猜我不应该为 string 使用 cases 策略。我还能做什么?

Coq 中相应的引理工作正常,没有任何时序问题:

Require Import String.

Open Scope string_scope.

Lemma L0 : "x" <> "y".
Proof.
    intros H. inversion H.
Qed.

dec_trivial 对我来说很快。

lemma L0 : "x" ≠ "y" := dec_trivial