Coq:强制定义错误

时间:2016-07-19 06:14:14

标签: definition coq coercion

你能解决这个错误:

Parameter Arg: Type.
Parameter F X XP: Arg.
Parameter Sen Phy Leg Inf: Arg -> Prop.
Parameter tree car: Phy X.
Parameter mary john: Phy XP /\ Leg XP /\ Sen XP.
Fail Coercion c (u:Arg) (x y z: Arg -> Prop) (t:x u /\ y u /\ z u): x u := fun t => @proj1 (x u) (y u /\ z u) t.
(*The type of this term is a product while it is expected to be "x u".*)

当我从

中取词时,我遇到了同样的错误
Coercion f (u:Arg) (x y z: Arg -> Prop) (t:x u /\ y u /\ z u): x u. tauto. Defined. Print f.

1 个答案:

答案 0 :(得分:1)

部分答案:您的fun t => @proj1 (x u) (y u /\ z u) t字词类型为x u /\ y u /\ z u -> x /\ u。您希望整个强制使用x u类型,因此您需要为函数提供x u /\ y u /\ z u类型的术语,以便获得x u

我认为你因为fun t => proj1 t而感到困惑。为避免混淆,您可以使用新名称重命名此变量,例如fun foobar => proj1 foobar,您将看到实际上从未使用t参数。

因此,整个字词为(fun t => @proj1 (x u) (y u /\ z u) t) t,适用于Definition。但是对于Coercion,我收到以下消息:

c is defined
Warning: c does not respect the uniform inheritance condition

Error: Cannot find the target class.
相关问题