The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V05. Groups

Mathlib.GroupTheory.Perm.Sign

65 declarations. Mathlib docs · Source

Sign of a permutation

The main definition of this file is Equiv.Perm.sign, associating a ℤˣ sign with a permutation.

Other lemmas have been moved to Mathlib/GroupTheory/Perm/Finite.lean

theorem Equiv.Perm.signAux2.congr_simp E1 #

∀ {α : Type u} {inst : DecidableEq α} [inst_1 : DecidableEq α] (a a_1 : List α),
  a = a_1 → ∀ (a_2 a_3 : Equiv.Perm α), a_2 = a_3 → Equiv.Perm.signAux2 a a_2 = Equiv.Perm.signAux2 a_1 a_3

theorem Equiv.Perm.signAux2.match_1.congr_eq_2 E1 #

∀ {α : Type u_1} (motive : List α → Equiv.Perm α → Sort u_2) (x : List α) (x_1 : Equiv.Perm α)
  (h_1 : (x : Equiv.Perm α) → motive [] x) (h_2 : (x : α) → (l : List α) → (f : Equiv.Perm α) → motive (x :: l) f)
  (x_2 : α) (l : List α) (f : Equiv.Perm α),
  x = x_2 :: l →
    x_1 = f →
      (match x, x_1 with
        | [], x => h_1 x
        | x :: l, f => h_2 x l f) ≍
        h_2 x_2 l f

theorem Equiv.Perm.IsSwap.congr_simp E1 #

∀ {α : Type u_4} {inst : DecidableEq α} [inst_1 : DecidableEq α] (f f_1 : Equiv.Perm α), f = f_1 → f.IsSwap = f_1.IsSwap

theorem Equiv.Perm.signAux2.match_1.congr_eq_1 E1 #

∀ {α : Type u_1} (motive : List α → Equiv.Perm α → Sort u_2) (x : List α) (x_1 : Equiv.Perm α)
  (h_1 : (x : Equiv.Perm α) → motive [] x) (h_2 : (x : α) → (l : List α) → (f : Equiv.Perm α) → motive (x :: l) f)
  (x_2 : Equiv.Perm α),
  x = [] →
    x_1 = x_2 →
      (match x, x_1 with
        | [], x => h_1 x
        | x :: l, f => h_2 x l f) ≍
        h_1 x_2

def Equiv.Perm.modSwap E1 #

{α : Type u} → [DecidableEq α] → α → α → Setoid (Equiv.Perm α)

modSwap i j contains permutations up to swapping i and j.

We use this to partition permutations in Matrix.det_zero_of_row_eq, such that each partition sums up to 0.

instance Equiv.Perm.instDecidableRelROfFintype E0 #

{α : Type u_1} → [Fintype α] → [inst : DecidableEq α] → (i j : α) → DecidableRel ⇑(Equiv.Perm.modSwap i j)

def Equiv.Perm.swapFactorsAux E0 #

{α : Type u} →
  [inst : DecidableEq α] →
    (l : List α) → (f : Equiv.Perm α) → (∀ {x : α}, f x ≠ x → x ∈ l) → { l // l.prod = f ∧ ∀ g ∈ l, g.IsSwap }

Given a list l : List α and a permutation f : Perm α such that the nonfixed points of f are in l, recursively factors f as a product of transpositions.

def Equiv.Perm.swapFactors E1 #

{α : Type u} →
  [inst : DecidableEq α] → [Fintype α] → [LinearOrder α] → (f : Equiv.Perm α) → { l // l.prod = f ∧ ∀ g ∈ l, g.IsSwap }

swapFactors represents a permutation as a product of a list of transpositions. The representation is nonunique and depends on the linear order structure. For types without linear order truncSwapFactors can be used.

def Equiv.Perm.truncSwapFactors E3 #

{α : Type u} → [inst : DecidableEq α] → [Fintype α] → (f : Equiv.Perm α) → Trunc { l // l.prod = f ∧ ∀ g ∈ l, g.IsSwap }

This computably represents the fact that any permutation can be represented as the product of a list of transpositions.

theorem Equiv.Perm.swap_induction_on E1 #

∀ {α : Type u} [inst : DecidableEq α] [Finite α] {motive : Equiv.Perm α → Prop} (f : Equiv.Perm α),
  motive 1 → (∀ (f : Equiv.Perm α) (x y : α), x ≠ y → motive f → motive (Equiv.swap x y * f)) → motive f

An induction principle for permutations. If P holds for the identity permutation, and is preserved under composition with a non-trivial swap, then P holds for all permutations.

theorem Equiv.Perm.mclosure_isSwap E1 #

∀ {α : Type u} [inst : DecidableEq α] [Finite α], Submonoid.closure {σ | σ.IsSwap} = ⊤

theorem Equiv.Perm.closure_isSwap E1 #

∀ {α : Type u} [inst : DecidableEq α] [Finite α], Subgroup.closure {σ | σ.IsSwap} = ⊤

theorem Equiv.Perm.mclosure_swap_castSucc_succ E1 #

∀ (n : ℕ), Submonoid.closure (Set.range fun i ↦ Equiv.swap i.castSucc i.succ) = ⊤

Every finite symmetric group is generated by transpositions of adjacent elements.

theorem Equiv.Perm.swap_induction_on' E1 #

∀ {α : Type u} [inst : DecidableEq α] [Finite α] {motive : Equiv.Perm α → Prop} (f : Equiv.Perm α),
  motive 1 → (∀ (f : Equiv.Perm α) (x y : α), x ≠ y → motive f → motive (f * Equiv.swap x y)) → motive f

Like swap_induction_on, but with the composition on the right of f.

An induction principle for permutations. If motive holds for the identity permutation, and is preserved under composition with a non-trivial swap, then motive holds for all permutations.

theorem Equiv.Perm.isConj_swap E1 #

∀ {α : Type u} [inst : DecidableEq α] {w x y z : α}, w ≠ x → y ≠ z → IsConj (Equiv.swap w x) (Equiv.swap y z)

def Equiv.Perm.finPairsLT E1 #

(n : ℕ) → Finset ((_ : Fin n) × Fin n)

set of all pairs (⟨a, b⟩ : Σ a : fin n, fin n) such that b < a

theorem Equiv.Perm.mem_finPairsLT E0 #

∀ {n : ℕ} {a : (_ : Fin n) × Fin n}, a ∈ Equiv.Perm.finPairsLT n ↔ a.snd < a.fst

def Equiv.Perm.signAux E0 #

{n : ℕ} → Equiv.Perm (Fin n) → ℤˣ

signAux σ is the sign of a permutation on Fin n, defined as the parity of the number of pairs (x₁, x₂) such that x₂ < x₁ but σ x₁ ≤ σ x₂

theorem Equiv.Perm.signAux_one E0 #

∀ (n : ℕ), Equiv.Perm.signAux 1 = 1

def Equiv.Perm.signBijAux E0 #

{n : ℕ} → Equiv.Perm (Fin n) → (_ : Fin n) × Fin n → (_ : Fin n) × Fin n

signBijAux f ⟨a, b⟩ returns the pair consisting of f a and f b in decreasing order.

theorem Equiv.Perm.signBijAux_injOn E1 #

∀ {n : ℕ} {f : Equiv.Perm (Fin n)}, Set.InjOn f.signBijAux ↑(Equiv.Perm.finPairsLT n)

theorem Equiv.Perm.signBijAux_surj E1 #

∀ {n : ℕ} {f : Equiv.Perm (Fin n)}, ∀ a ∈ Equiv.Perm.finPairsLT n, ∃ b ∈ Equiv.Perm.finPairsLT n, f.signBijAux b = a

theorem Equiv.Perm.signBijAux_mem E1 #

∀ {n : ℕ} {f : Equiv.Perm (Fin n)}, ∀ a ∈ Equiv.Perm.finPairsLT n, f.signBijAux a ∈ Equiv.Perm.finPairsLT n

theorem Equiv.Perm.signAux_inv E0 #

∀ {n : ℕ} (f : Equiv.Perm (Fin n)), f⁻¹.signAux = f.signAux

theorem Equiv.Perm.signAux_mul E1 #

∀ {n : ℕ} (f g : Equiv.Perm (Fin n)), (f * g).signAux = f.signAux * g.signAux

theorem Equiv.Perm.signAux_swap E1 #

∀ {n : ℕ} {x y : Fin n}, x ≠ y → (Equiv.swap x y).signAux = -1

def Equiv.Perm.signAux2 E1 #

{α : Type u} → [DecidableEq α] → List α → Equiv.Perm α → ℤˣ

When the list l : List α contains all nonfixed points of the permutation f : Perm α, signAux2 l f recursively calculates the sign of f.

theorem Equiv.Perm.signAux_eq_signAux2 E1 #

∀ {α : Type u} [inst : DecidableEq α] {n : ℕ} (l : List α) (f : Equiv.Perm α) (e : α ≃ Fin n),
  (∀ (x : α), f x ≠ x → x ∈ l) → Equiv.Perm.signAux ((e.symm.trans f).trans e) = Equiv.Perm.signAux2 l f

def Equiv.Perm.signAux3 E1 #

{α : Type u} → [DecidableEq α] → [Finite α] → Equiv.Perm α → {s : Multiset α} → (∀ (x : α), x ∈ s) → ℤˣ

When the multiset s : Multiset α contains all nonfixed points of the permutation f : Perm α, signAux2 f _ recursively calculates the sign of f.

theorem Equiv.Perm.signAux3_mul_and_swap E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Finite α] (f g : Equiv.Perm α) (s : Multiset α) (hs : ∀ (x : α), x ∈ s),
  (f * g).signAux3 hs = f.signAux3 hs * g.signAux3 hs ∧ Pairwise fun x y ↦ (Equiv.swap x y).signAux3 hs = -1

theorem Equiv.Perm.signAux3_symm_trans_trans E1 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Finite α] [inst_2 : DecidableEq β] [inst_3 : Finite β]
  (f : Equiv.Perm α) (e : α ≃ β) {s : Multiset α} {t : Multiset β} (hs : ∀ (x : α), x ∈ s) (ht : ∀ (x : β), x ∈ t),
  Equiv.Perm.signAux3 ((e.symm.trans f).trans e) ht = f.signAux3 hs

def Equiv.Perm.sign E3 #

{α : Type u} → [DecidableEq α] → [Fintype α] → Equiv.Perm α →* ℤˣ

SignType.sign of a permutation returns the signature or parity of a permutation, 1 for even permutations, -1 for odd permutations. It is the unique surjective group homomorphism from Perm α to the group with two elements.

theorem Equiv.Perm.sign_mul E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (f g : Equiv.Perm α),
  Equiv.Perm.sign (f * g) = Equiv.Perm.sign f * Equiv.Perm.sign g

theorem Equiv.Perm.sign_trans E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (f g : Equiv.Perm α),
  Equiv.Perm.sign (Equiv.trans f g) = Equiv.Perm.sign g * Equiv.Perm.sign f

theorem Equiv.Perm.sign_one E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α], Equiv.Perm.sign 1 = 1

theorem Equiv.Perm.sign_refl E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α], Equiv.Perm.sign (Equiv.refl α) = 1

theorem Equiv.Perm.sign_inv E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (f : Equiv.Perm α), Equiv.Perm.sign f⁻¹ = Equiv.Perm.sign f

theorem Equiv.Perm.sign_symm E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (e : Equiv.Perm α),
  Equiv.Perm.sign (Equiv.symm e) = Equiv.Perm.sign e

theorem Equiv.Perm.sign_swap E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {x y : α}, x ≠ y → Equiv.Perm.sign (Equiv.swap x y) = -1

theorem Equiv.Perm.sign_swap' E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {x y : α},
  Equiv.Perm.sign (Equiv.swap x y) = if x = y then 1 else -1

theorem Equiv.Perm.IsSwap.sign_eq E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {f : Equiv.Perm α}, f.IsSwap → Equiv.Perm.sign f = -1

theorem Equiv.Perm.sign_symm_trans_trans E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (f : Equiv.Perm α) (e : α ≃ β), Equiv.Perm.sign ((e.symm.trans f).trans e) = Equiv.Perm.sign f

theorem Equiv.Perm.sign_trans_trans_symm E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (f : Equiv.Perm β) (e : α ≃ β), Equiv.Perm.sign ((e.trans f).trans e.symm) = Equiv.Perm.sign f

theorem Equiv.Perm.sign_prod_list_swap E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {l : List (Equiv.Perm α)},
  (∀ g ∈ l, g.IsSwap) → Equiv.Perm.sign l.prod = (-1) ^ l.length

theorem Equiv.Perm.sign_abs E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (f : Equiv.Perm α), |↑(Equiv.Perm.sign f)| = 1

theorem Equiv.Perm.sign_surjective E1 #

∀ (α : Type u) [inst : DecidableEq α] [inst_1 : Fintype α] [Nontrivial α], Function.Surjective ⇑Equiv.Perm.sign

theorem Equiv.Perm.sign_subtypePerm E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] (f : Equiv.Perm α) {p : α → Prop} [inst_2 : DecidablePred p]
  (h₁ : ∀ (x : α), p (f x) ↔ p x), (∀ (x : α), f x ≠ x → p x) → Equiv.Perm.sign (f.subtypePerm h₁) = Equiv.Perm.sign f

theorem Equiv.Perm.sign_eq_sign_of_equiv E1 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (f : Equiv.Perm α) (g : Equiv.Perm β) (e : α ≃ β),
  (∀ (x : α), e (f x) = g (e x)) → Equiv.Perm.sign f = Equiv.Perm.sign g

theorem Equiv.Perm.sign_bij E1 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  {f : Equiv.Perm α} {g : Equiv.Perm β} (i : (x : α) → f x ≠ x → β),
  (∀ (x : α) (hx : f x ≠ x) (hx' : f (f x) ≠ f x), i (f x) hx' = g (i x hx)) →
    (∀ (x₁ x₂ : α) (hx₁ : f x₁ ≠ x₁) (hx₂ : f x₂ ≠ x₂), i x₁ hx₁ = i x₂ hx₂ → x₁ = x₂) →
      (∀ (y : β), g y ≠ y → ∃ x, ∃ (hx : f x ≠ x), i x hx = y) → Equiv.Perm.sign f = Equiv.Perm.sign g

theorem Equiv.Perm.prod_prodExtendRight E1 #

∀ {β : Type v} {α : Type u_1} [inst : DecidableEq α] (σ : α → Equiv.Perm β) {l : List α},
  l.Nodup → (∀ (a : α), a ∈ l) → (List.map (fun a ↦ Equiv.Perm.prodExtendRight a (σ a)) l).prod = Equiv.prodCongrRight σ

If we apply prod_extendRight a (σ a) for all a : α in turn, we get prod_congrRight σ.

theorem Equiv.Perm.sign_prodExtendRight E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (a : α) (σ : Equiv.Perm β), Equiv.Perm.sign (Equiv.Perm.prodExtendRight a σ) = Equiv.Perm.sign σ

theorem Equiv.Perm.sign_prodCongrRight E1 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (σ : α → Equiv.Perm β), Equiv.Perm.sign (Equiv.prodCongrRight σ) = ∏ k, Equiv.Perm.sign (σ k)

theorem Equiv.Perm.sign_prodCongrLeft E1 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (σ : α → Equiv.Perm β), Equiv.Perm.sign (Equiv.prodCongrLeft σ) = ∏ k, Equiv.Perm.sign (σ k)

theorem Equiv.Perm.sign_permCongr E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (e : α ≃ β) (p : Equiv.Perm α), Equiv.Perm.sign (e.permCongr p) = Equiv.Perm.sign p

theorem Equiv.Perm.sign_trans_trans E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (f : β ≃ α) (p : Equiv.Perm α) (g : α ≃ β),
  Equiv.Perm.sign (f.trans (Equiv.trans p g)) = Equiv.Perm.sign p * Equiv.Perm.sign (f.trans g)

theorem Equiv.Perm.sign_equivCongr E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (f g : α ≃ β) (p : Equiv.Perm α),
  Equiv.Perm.sign ((f.equivCongr g) p) = Equiv.Perm.sign p * Equiv.Perm.sign (f.symm.trans g)

theorem Equiv.Perm.sign_sumCongr E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (σa : Equiv.Perm α) (σb : Equiv.Perm β), Equiv.Perm.sign (σa.sumCongr σb) = Equiv.Perm.sign σa * Equiv.Perm.sign σb

theorem Equiv.Perm.sign_subtypeCongr E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {p : α → Prop} [inst_2 : DecidablePred p]
  (ep : Equiv.Perm { a // p a }) (en : Equiv.Perm { a // ¬p a }),
  Equiv.Perm.sign (ep.subtypeCongr en) = Equiv.Perm.sign ep * Equiv.Perm.sign en

theorem Equiv.Perm.sign_extendDomain E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : DecidableEq β] [inst_3 : Fintype β]
  (e : Equiv.Perm α) {p : β → Prop} [inst_4 : DecidablePred p] (f : α ≃ Subtype p),
  Equiv.Perm.sign (e.extendDomain f) = Equiv.Perm.sign e

theorem Equiv.Perm.sign_ofSubtype E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {p : α → Prop} [inst_2 : DecidablePred p]
  [inst_3 : Fintype (Subtype p)] (f : Equiv.Perm (Subtype p)),
  Equiv.Perm.sign (Equiv.Perm.ofSubtype f) = Equiv.Perm.sign f

theorem Equiv.Perm.viaFintypeEmbedding_sign E0 #

∀ {α : Type u} [inst : DecidableEq α] {β : Type v} [inst_1 : Fintype α] [inst_2 : Fintype β] [inst_3 : DecidableEq β]
  (e : Equiv.Perm α) (f : α ↪ β), Equiv.Perm.sign (e.viaFintypeEmbedding f) = Equiv.Perm.sign e

def Equiv.Perm.ofSign E1 #

{α : Type u} → [DecidableEq α] → [Fintype α] → ℤˣ → Finset (Equiv.Perm α)

Permutations of a given sign.

theorem Equiv.Perm.mem_ofSign E0 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α] {s : ℤˣ} {σ : Equiv.Perm α},
  σ ∈ Equiv.Perm.ofSign s ↔ Equiv.Perm.sign σ = s

theorem Equiv.Perm.ofSign_disjoint E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α], Disjoint (Equiv.Perm.ofSign 1) (Equiv.Perm.ofSign (-1))

theorem Equiv.Perm.ofSign_disjUnion E1 #

∀ {α : Type u} [inst : DecidableEq α] [inst_1 : Fintype α],
  (Equiv.Perm.ofSign 1).disjUnion (Equiv.Perm.ofSign (-1)) ⋯ = Finset.univ