如何在 CoqIDE 中证明这一点

问题描述 投票:0回答:1
Lemma x: forall P Q: Set -> Prop,
              forall f: Set -> Set, 
            forall x, (P x -> Q (f x)) -> 
               (exists x, P x) -> (exists x, Q x).

我尝试了很多不同的方法,但我不知道哪里出了问题。这是我最近的尝试:

Lemma x: forall P Q: Set -> Prop,
              forall f: Set -> Set, 
            forall x, (P x -> Q (f x)) -> 
               (exists x, P x) -> (exists x, Q x).
Proof.
  intros P Q f x H1 [x0 H2].
  exists (f x0).
  apply H1.
  assumption.
Qed.

但它会产生此错误:在环境中 P, Q : 设置 -> 道具 f : 设置 -> 设置 x:设置 H1:P x -> Q (f x) x0:设置 H2 : P x0 无法将“Q (f x)”与“Q (f x0)”统一。

coq coqide
1个回答
0
投票

好问题!这真的很有趣而且措辞很好。我很好奇看到大家的回复并了解有关该主题的更多信息。干得好,深入研究这样一个发人深省的问题!

© www.soinside.com 2019 - 2024. All rights reserved.