|
|
|
|
|
by tom_mellior
2950 days ago
|
|
That is also true, but its proof is different. Proofs have types; the "and.intro hq hp" part has type "q /\ p". If you change it to "and.intro hp hp", you can prove "p /\ p". That is, the following works: theorem and_commutative (p q : Prop) : p ∧ q → p ∧ p :=
assume hpq : p ∧ q,
have hp : p, from and.left hpq,
have hq : q, from and.right hpq,
show p ∧ p, from and.intro hp hp
(and then you should rename it from "and_commutative" to something else, and you can remove the "hq" line) |
|
It could also be written:
...as the proof tactic "tauto" is capable of proving this (simple) theorem immediately.