Skip to content

Commit

Permalink
feat(logic/basic): is_trans Prop iff instance (#6836)
Browse files Browse the repository at this point in the history
If you've ever wondered why `trans h1 h2` works for `≤` but not for `↔`, this is the reason.
  • Loading branch information
gebner committed Mar 24, 2021
1 parent a008609 commit 94a4a95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/logic/basic.lean
Expand Up @@ -191,6 +191,9 @@ variables {a b c d : Prop}

/-! ### Declarations about `implies` -/

instance : is_refl Prop iff := ⟨iff.refl⟩
instance : is_trans Prop iff := ⟨λ _ _ _, iff.trans⟩

theorem iff_of_eq (e : a = b) : a ↔ b := e ▸ iff.rfl

theorem iff_iff_eq : (a ↔ b) ↔ a = b := ⟨propext, iff_of_eq⟩
Expand Down

0 comments on commit 94a4a95

Please sign in to comment.