2
我正在嘗試Coq,但我不完全確定我在做什麼。方法是:如何在Coq中寫入∀x(P(x)和Q(x))?
Theorem new_theorem : forall x, P:Prop /\ Q:Prop
等同於:
∀x (P(x) and Q(x))
編輯:我認爲他們是。
我正在嘗試Coq,但我不完全確定我在做什麼。方法是:如何在Coq中寫入∀x(P(x)和Q(x))?
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 <
好了,回答你的問題:
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.
我沒有看到一個問題嗎?你問他們是否一樣? – tvanfosson 2009-04-15 18:14:50