Skip to content

Commit

Permalink
feat(logic/function/basic): function.involutive.eq_iff (#7332)
Browse files Browse the repository at this point in the history
The lemma name matches the brevity of `function.injective.eq_iff`.
The fact the definitions differ isn't important, as both are accessible from `hf : involutive f` as `hf.eq_iff` and `hf.injective.eq_iff`.
  • Loading branch information
pechersky committed Apr 23, 2021
1 parent 15b4fe6 commit 3a8f9db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/logic/function/basic.lean
Expand Up @@ -571,6 +571,10 @@ protected lemma ite_not (P : Prop) [decidable P] (x : α) :
f (ite P x (f x)) = ite (¬ P) x (f x) :=
by rw [apply_ite f, h, ite_not]

/-- An involution commutes across an equality. Compare to `function.injective.eq_iff`. -/
protected lemma eq_iff {x y : α} : f x = y ↔ x = f y :=
h.injective.eq_iff' (h y)

end involutive

/-- The property of a binary function `f : α → β → γ` being injective.
Expand Down

0 comments on commit 3a8f9db

Please sign in to comment.