Logic 我怎么写∀;Coq中的x(P(x)和Q(x))?

Logic 我怎么写∀;Coq中的x(P(x)和Q(x))?,logic,predicate,proof,coq,Logic,Predicate,Proof,Coq,我正在尝试Coq,但我不完全确定我在做什么。是: Theorem new_theorem : forall x, P:Prop /\ Q:Prop 相当于: ∀x ( P(x) and Q(x) ) 编辑:我想是的。你的语法有问题吗 $ coqtop Welcome to Coq 8.1pl3 (Dec. 2007) Coq < Section Test. Coq < Variable X:Set. X is assumed Coq < Variables P Q:X

我正在尝试Coq,但我不完全确定我在做什么。是:

Theorem new_theorem : forall x, P:Prop /\ Q:Prop
相当于:

∀x ( P(x) and Q(x) )

编辑:我想是的。

你的语法有问题吗

$ coqtop
Welcome to Coq 8.1pl3 (Dec. 2007)

Coq < Section Test.

Coq < Variable X:Set.
X is assumed

Coq < Variables P Q:X -> Prop.
P is assumed
Q is assumed

Coq < Theorem forall_test: forall x:X, P(x) /\ Q(x).
1 subgoal

  X : Set
  P : X -> Prop
  Q : X -> Prop
  ============================
   forall x : X, P x /\ Q x

forall_test < 
$coqtop
欢迎来到Coq 8.1pl3(2007年12月)
CoqProp。
P是假定的
Q是假定的
CoqProp
Q:X->Prop
============================
对于所有x:x,px/\qx
全日制考试

好吧,回答你的问题:

Section test.

  Variable A : Type.           (* assume some universe A *)
  Variable P Q : A -> Prop.    (* and two predicates over A, P and Q *)

  Goal forall x, P x /\ Q x.   (* Ax, ( P(x) and Q(x) ) *)

End test.

我看这里没有问题?你是在问它们是否相同吗?嗯,我试图在Coq中使用逻辑语句,但我不太理解语法。我想问题真的是“我如何用Coq写Ax(P(x)和Q(x))?”。