如何“翻转”Coq中的平等命题?(How to “flip” an equality proposition in Coq?)

编程入门 行业动态 更新时间:2024-10-28 18:30:51
如何“翻转”Coq中的平等命题?(How to “flip” an equality proposition in Coq?)

如果我在Coq,并且发现自己处于这样的目标状态:

================== x = y -> y = x

有没有一种策略可以一举处理? 事实上,我正在写作

intros H. rewrite -> H. reflexivity.

但它有点笨重。

If I'm in Coq and I find myself in a situation with a goal like so:

================== x = y -> y = x

Is there a tactic that can can take care of this in one swoop? As it is, I'm writing

intros H. rewrite -> H. reflexivity.

But it's a bit clunky.

最满意答案

为了“翻转”平等H: x = y ,可以symmetry in H使用symmetry in H 。 如果你想翻转目标,只需使用symmetry 。

To "flip" an equality H: x = y you can use symmetry in H. If you want to flip the goal, simply use symmetry.

更多推荐

本文发布于:2023-07-05 10:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1036119.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命题   平等   Coq   proposition   equality

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!