简体   繁体   中英

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 ?

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.

In case of Prop it's provable via reflexivity tactics (if / is left associative).

我不知道Coq,但这显然可以凭直觉证明,因此必须有一种方法来完成它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM