Skip to content

Commit

Permalink
feat(data/equiv/basic): perm_congr group lemmas (#6982)
Browse files Browse the repository at this point in the history
Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com>
  • Loading branch information
pechersky and pechersky committed Apr 1, 2021
1 parent 3365c44 commit 21cc806
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/data/equiv/basic.lean
Expand Up @@ -317,22 +317,36 @@ by { ext, refl }
@[simp] lemma equiv_congr_apply_apply {δ} (ab : α ≃ β) (cd : γ ≃ δ) (e : α ≃ γ) (x) :
ab.equiv_congr cd e x = cd (e (ab.symm x)) := rfl

section perm_congr

variables {α' β' : Type*} (e : α' ≃ β')

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

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

@[simp] lemma perm_congr_symm {α β : Type*} (e : α ≃ β) :
@[simp] lemma perm_congr_refl :
e.perm_congr (equiv.refl _) = equiv.refl _ :=
by simp [perm_congr_def]

@[simp] lemma perm_congr_symm :
e.perm_congr.symm = e.symm.perm_congr := rfl

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

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

lemma perm_congr_trans (p p' : equiv.perm α') :
(e.perm_congr p).trans (e.perm_congr p') = e.perm_congr (p.trans p') :=
by { ext, simp }

end perm_congr

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
5 changes: 5 additions & 0 deletions src/group_theory/perm/basic.lean
Expand Up @@ -176,6 +176,11 @@ begin
simpa using equiv.congr_fun h i
end

/-- If `e` is also a permutation, we can write `perm_congr`
completely in terms of the group structure. -/
@[simp] lemma perm_congr_eq_mul (e p : perm α) :
e.perm_congr p = e * p * e⁻¹ := rfl

/-- If the permutation `f` fixes the subtype `{x // p x}`, then this returns the permutation
on `{x // p x}` induced by `f`. -/
def subtype_perm (f : perm α) {p : α → Prop} (h : ∀ x, p x ↔ p (f x)) : perm {x // p x} :=
Expand Down

0 comments on commit 21cc806

Please sign in to comment.