且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

结合两个Coq假设

更新时间:2023-11-29 20:13:34

pose proof (h h2) as h3.

引入 h3:B 作为新的假设,

specialize (h h2).

修改 h:A-> B 转换为 h:B -如果您不需要 h ,此功能将非常有用>之后,对称地,

modifies h : A -> B into h : B -- this can be useful if you won't need h later, and symmetrically,

apply h in h2.

h2:A 转换为 h2:B

另一种(不是很方便)的方法是

Another (not very convenient) way would be to

assert B as h3 by exact (h h2).

这就是姿势证明的等效形式

此外,在如下所示的简单情况下,您也可以在不引入新假设的情况下解决目标:

Also, in a simple case like the following, you can solve your goal without introducing a new hypothesis:

Goal forall (A B : Prop), (A -> B) -> A -> B.
  intros A B h h2.
  apply (h h2).
Qed.