展开后出现“fix”是什么原因?

发布于 2025-01-11 01:06:23 字数 668 浏览 1 评论 0原文

在展开我所能做的一切,试图摆脱归纳假设中我不想要的符号后,我留下了:

X: Type
test: X -> bool
x: X
l: list X
IHl: (fix existsb
         (X : Type) (test : X -> bool) 
         (l : list X) {struct l} : bool :=
         fold orb (map test l) false) X test l =
      negb
        ((fix forallb
            (X : Type) (test : X -> bool)
            (l : list X) {struct l} : bool :=
            fold andb (map test l) true) X
           (fun x : X => negb (test x)) l)

最终嵌入的两个固定点应该尽可能地进行评估,因为我已经>介绍'他们的参数;如果只是用它们的参数来评估它们,我的 IHl 将是完美的。

我不清楚为什么在这种情况下这些不会进行评估。由于这个例子来自逻辑基础,我没有提供更多的解决方案,希望这足以询问我可以将什么策略应用于 IHl 以使 coq 实际上使用我的参数进行重写我正在寻找。

After unfolding everything I can in an attempt to get rid of symbols I don't want in my induction hypothesis, I am left with:

X: Type
test: X -> bool
x: X
l: list X
IHl: (fix existsb
         (X : Type) (test : X -> bool) 
         (l : list X) {struct l} : bool :=
         fold orb (map test l) false) X test l =
      negb
        ((fix forallb
            (X : Type) (test : X -> bool)
            (l : list X) {struct l} : bool :=
            fold andb (map test l) true) X
           (fun x : X => negb (test x)) l)

The two fixpoints which wind up embedded should be evaluated as far as I can see since I have already intros'ed their parameters; and if they simply were evaluated with their parameters, my IHl would be perfect.

I am not clear on why these won't evaluate in this case. As the example is from logical foundations, I haven't provided more of my solution hoping that it's enough to ask what tactic can I apply to IHl to cause coq to actually do the rewrite with the arguments that I am looking for.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迟到的我 2025-01-18 01:06:23

我想我不太明白,但看来我的情况基本上与这个问题相似:

为什么不能在 Coq 中使用抽象值计算固定定义的表达式?

似乎解决方法是在中destruct l为了确保所有情况都以构造函数开始,然后消除两个冗余情况中的固定点,使证明或多或少直接从那里开始。

如果有一篇文章能更好地启发我,让我了解为什么这里无法获得一级替代,那就太好了,因为我看不出有任何理由不采用适用于这种情况的策略。

I guess I don't really understand but it seems my case is fundamentally similar to this question:

Why cannot evaluate a fix-defined expression with an abstract value in Coq?

It seems that the workaround is to destruct l in order to ensure that the cases all start with a constructor, which then eliminates the fixpoints in two redundant cases that make the proof more or less immediate from there.

A post to enlighten me better about why there is no way to get one level of substitution here would be great, as I can't see any reason not to have a tactic that will apply in this circumstance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文