【发布时间】:2014-12-21 17:14:22
【问题描述】:
我想在 Coq 中证明或证伪forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.。这是我的方法。
Inductive True2 : Prop :=
| One : True2
| Two : True2.
Lemma True_has_one : forall (t0 t1 : True), t0 = t1.
Proof.
intros.
destruct t0. destruct t1.
reflexivity.
Qed.
Lemma not_True2_has_one : (forall (t0 t1 : True2), t0 = t1) -> False.
Proof.
intros.
specialize (H One Two).
inversion H.
但是,inversion H 什么也没做。我想可能是因为 coq 的证明独立性(我不是以英语为母语的人,我不知道确切的单词,请原谅我的无知),并且 coq 无法证明 One = Two -> False。但如果是这样,为什么必须 coq 消除证明的内容?
没有上面的命题,我就不能证明下面的或它们的否定。
Lemma True_neq_True2 : True = True2 -> False.
Theorem iff_eq : forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.
所以我的问题是:
- 如何或有可能在 Coq 中证明或伪造
forall (P Q : Prop), (P -> Q) -> (Q -> P) -> P = Q.? - 为什么
inversion H什么都不做;是不是因为 coq 的证明独立性,如果是这样,为什么 Coq 这样做会浪费精力。
【问题讨论】:
-
“为什么”不是编程问题。
标签: equality coq proof dependent-type curry-howard