[英]Coq - (a \/ b \/ c) = ((a \/ b) \/ c)
I'm working with semirings, and in order to prove that some structures are actual semirings, I have to prove that they respect some properties, such as associativity. 我正在使用半环,并且为了证明某些结构是实际的半环,我必须证明它们尊重某些属性,例如关联性。
For the semiring (Bool, \\/, /\\, False, True)
, can I prove the following statement ? 对于半环(Bool, \\/, /\\, False, True)
,我可以证明以下陈述吗?
forall abc : Prop, (a \\/ b \\/ c) = ((a \\/ b) \\/ c)
My problem is in the equality between the two members of the expression. 我的问题是表达式的两个成员之间是否相等。 I would have prefered a <->
instead of the =
, but my definition of semirings only uses =
. 我本来希望用<->
而不是=
,但是我对半环的定义仅使用=
。
Is it still provable ? 还可以证明吗? Or do I have to adapt the definition of my semiring for the particular cases of "propositional-logic-based" semirings ? 还是我必须针对“基于命题逻辑的”半环的特殊情况调整半环的定义?
It is definitely provable, for example, by case analysis. 例如,通过案例分析绝对可以证明这一点。 I think, you have a problem doing this because you formulated theorem incorrectly. 我认为您这样做有问题,因为您不正确地制定了定理。 ab and c should be Bool not Prop. ab和c应该是Bool而不是Prop。
In case of Prop it's provable via reflexivity tactics (if / is left associative). 在Prop的情况下,可以通过反省策略证明(如果/保持关联)。
我不知道Coq,但这显然可以凭直觉证明,因此必须有一种方法来完成它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.