reverse implication for some \iff

This commit is contained in:
2026-07-30 18:16:59 +02:00
parent d95031e04c
commit 7f3be5c13f
+25 -6
View File
@@ -21,20 +21,32 @@ theorem p_implies_p_or_q
intro hp intro hp
exact Or.inl hp exact Or.inl hp
theorem and_commutative theorem and_commutative
: P Q Q P := by : P Q Q P := by
intro hpq constructor
· intro hpq
cases hpq with cases hpq with
| intro hp hq => | intro hp hq =>
exact hq,hp exact hq,hp
· intro hqp
cases hqp with
| intro hq hp =>
exact hp,hq
theorem or_commutative theorem or_commutative
: P Q Q P := by : P Q Q P := by
intro p_or_q constructor
· intro p_or_q
cases p_or_q with cases p_or_q with
| inl hp => | inl hp =>
exact Or.inr hp exact Or.inr hp
| inr hq => | inr hq =>
exact Or.inl hq exact Or.inl hq
· intro q_or_p
cases q_or_p with
| inl hq =>
exact Or.inr hq
| inr hp =>
exact Or.inl hp
theorem p_imples_q_and_q_implies_r_Implies_p_implies_r theorem p_imples_q_and_q_implies_r_Implies_p_implies_r
: (PQ) (QR) (PR) := by : (PQ) (QR) (PR) := by
@@ -51,13 +63,20 @@ theorem double_negation
exact hnotp hp exact hnotp hp
theorem and_associative theorem and_associative
: P (Q R) (P Q) R := by : P (Q R) (P Q) R := by
intro h constructor
· intro h
cases h with cases h with
| intro p q_and_r => | intro p q_and_r =>
cases q_and_r with cases q_and_r with
| intro q r => | intro q r =>
exact p,q,r exact p,q,r
· intro h
cases h with
| intro p_and_q r =>
cases p_and_q with
| intro p q =>
exact p, q,r
theorem contrapositive theorem contrapositive
: (P Q) (¬Q ¬P) := by : (P Q) (¬Q ¬P) := by