Skip to content

Commit

Permalink
chore(data/equiv/basic): equiv/perm_congr simp lemmas (#5737)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
  • Loading branch information
pechersky and eric-wieser committed Jan 15, 2021
1 parent 64a1b19 commit 7151fb7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/data/equiv/basic.lean
Expand Up @@ -276,15 +276,30 @@ def equiv_congr {δ} (ab : α ≃ β) (cd : γ ≃ δ) : (α ≃ γ) ≃ (β ≃
(ab.equiv_congr de).trans (bc.equiv_congr ef) = (ab.trans bc).equiv_congr (de.trans ef) :=
by { ext, refl }

@[simp] lemma equiv_congr_refl_left {α β γ} (bg : β ≃ γ) (e : α ≃ β) :
(equiv.refl α).equiv_congr bg e = e.trans bg := rfl

@[simp] lemma equiv_congr_refl_right {α β} (ab e : α ≃ β) :
ab.equiv_congr (equiv.refl β) e = ab.symm.trans e := rfl

@[simp] lemma equiv_congr_apply_apply {δ} (ab : α ≃ β) (cd : γ ≃ δ) (e : α ≃ γ) (x) :
ab.equiv_congr cd e x = cd (e (ab.symm x)) := rfl

/-- If `α` is equivalent to `β`, then `perm α` is equivalent to `perm β`. -/
def perm_congr {α : Type*} {β : Type*} (e : α ≃ β) : perm α ≃ perm β :=
equiv_congr e e

lemma perm_congr_def {α β : Type*} (e : α ≃ β) (p : equiv.perm α) :
e.perm_congr p = (e.symm.trans p).trans e := rfl

@[simp] lemma perm_congr_symm {α β : Type*} (e : α ≃ β) :
e.perm_congr.symm = e.symm.perm_congr := rfl

@[simp] lemma perm_congr_apply {α β : Type*} (e : α ≃ β) (p : equiv.perm α) (x) :
e.perm_congr p x = e (p (e.symm x)) := rfl
e.perm_congr p x = e (p (e.symm x)) := rfl

lemma perm_congr_symm_apply {α β : Type*} (e : α ≃ β) (p : equiv.perm β) (x) :
e.perm_congr.symm p x = e.symm (p (e x)) := rfl

protected lemma image_eq_preimage {α β} (e : α ≃ β) (s : set α) : e '' s = e.symm ⁻¹' s :=
set.ext $ assume x, set.mem_image_iff_of_inverse e.left_inv e.right_inv
Expand Down

0 comments on commit 7151fb7

Please sign in to comment.