reverse implication for some \iff

This commit is contained in:
tomasr committed 2026-07-30 18:16:59 +02:00
1 parent d95031e04c
commit 7f3be5c13f
1 file changed
+25 -6
+25 -6
View File
@@ -21,20 +21,32 @@ theorem p_implies_p_or_q
intro hp
exact Or.inl hp
theorem and_commutative
: P ∧ Q → Q ∧ P := by
intro hpq
: P ∧ Q ↔ Q ∧ P := by
constructor
· intro hpq
cases hpq with
| intro hp hq =>
exact ⟨hq,hp⟩
· intro hqp
cases hqp with
| intro hq hp =>
exact ⟨hp,hq⟩
theorem or_commutative
: P ∨ Q → Q ∨ P := by
intro p_or_q
: P ∨ Q ↔ Q ∨ P := by
constructor
· intro p_or_q
cases p_or_q with
| inl hp =>
exact Or.inr hp
| inr 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
: (P→Q) ∧ (Q→R) → (P→R) := by
@@ -51,13 +63,20 @@ theorem double_negation
exact hnotp hp
theorem and_associative
: P ∧ (Q ∧ R) → (P ∧ Q) ∧ R := by
intro h
: P ∧ (Q ∧ R) ↔ (P ∧ Q) ∧ R := by
constructor
· intro h
cases h with
| intro p q_and_r =>
cases q_and_r with
| intro 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
: (P → Q) → (¬Q → ¬P) := by