学习coq,不确定错误的含义NNPP
所以我刚刚开始学习coq(到目前为止,这已经超出了我的理解范围),我正在尝试做一个基本的证明,我很迷茫,找到了一些帮助,但我认为我应该做的coq是一个错误。因此,在我的编辑部分,我有:学习coq,不确定错误的含义NNPP,coq,proof,coqide,Coq,Proof,Coqide,所以我刚刚开始学习coq(到目前为止,这已经超出了我的理解范围),我正在尝试做一个基本的证明,我很迷茫,找到了一些帮助,但我认为我应该做的coq是一个错误。因此,在我的编辑部分,我有: Section wut. Variables p q: Prop. Theorem T1 : (~q->~p)->(p->q). Proof. intros. apply NNPP. intro. apply H in H1. contradiction. Qed. 在校对框中,我有: 1 s
Section wut.
Variables p q: Prop.
Theorem T1 : (~q->~p)->(p->q).
Proof.
intros.
apply NNPP.
intro.
apply H in H1.
contradiction.
Qed.
在校对框中,我有:
1 subgoal
p, q : Prop
H : ~ q -> ~ p
H0 : p
______________________________________(1/1)
q
在错误框中,我有:
The reference NNPP was not found in the current environment.
在当前环境中找不到它意味着什么?引理是双重否定消去原理:它说
~p
意味着p
。要修复错误消息,必须导入定义了NNPP
的Coq库:
Require Import Coq.Logic.Classical.
Section wut.
Variables p q: Prop.
Theorem T1 : (~q->~p)->(p->q).
Proof.
intros.
apply NNPP.
intro.
apply H in H1.
contradiction.
Qed.