import Mathlib namespace OAI section section open scoped symmDiff namespace SimpleAmenable open scoped commutatorElement open scoped commutatorElement section FreshEvenBank theorem even_move_embedding {α : Type*} [Fintype α] [DecidableEq α] {n : ℕ} (hn : n + 2 ≤ Nat.card α) (s t : Fin n ↪ α) : ∃ σ : alternatingGroup α, ∀ i, σ.val (s i) = t i := by let := alternatingGroup.isMultiplyPretransitive α let : MulAction.IsMultiplyPretransitive (alternatingGroup α) α n := MulAction.isMultiplyPretransitive_of_le (by omega : n ≤ Nat.card α - 2) (Nat.sub_le _ _) obtain ⟨σ,hσ⟩ := MulAction.exists_smul_eq (alternatingGroup α) s t exact ⟨σ,fun i => congrArg (fun e : Fin n ↪ α => e i) hσ⟩ theorem fresh_five_bank {α : Type*} [Fintype α] [DecidableEq α] (J : Finset α) (hJ : J.card + 5 ≤ Fintype.card α) : ∃ t : Fin 5 ↪ α, Disjoint (Finset.univ.map t) J := by classical have hc : 5 ≤ Jᶜ.card := by rw [Finset.card_compl]; omega have he : Nonempty (Fin 5 ↪ {x : α // x ∈ Jᶜ}) := by rw [Function.Embedding.nonempty_iff_card_le,Fintype.card_fin,Fintype.card_coe] exact hc obtain ⟨e⟩ := he refine ⟨e.trans (Function.Embedding.subtype _),?_⟩ apply Finset.disjoint_left.mpr intro x hx hj obtain ⟨i,_,rfl⟩ := Finset.mem_map.mp hx exact Finset.mem_compl.mp (e i).property hj theorem even_move_disjoint_banks {α : Type*} [Fintype α] [DecidableEq α] (s t : Fin 5 ↪ α) (hd : Disjoint (Finset.univ.map s) (Finset.univ.map t)) : ∃ σ : alternatingGroup α, (∀ i, σ.val (s i) = t i) ∧ σ.val.support ⊆ (Finset.univ.map s) ∪ (Finset.univ.map t) := by classical let S := (Finset.univ.map s) ∪ (Finset.univ.map t) let T := {x : α // x ∈ S} let s' : Fin 5 ↪ T := ⟨fun i => ⟨s i,Finset.mem_union_left _ (Finset.mem_map.mpr ⟨i,Finset.mem_univ _,rfl⟩)⟩,fun _ _ h => s.injective (congrArg Subtype.val h)⟩ let t' : Fin 5 ↪ T := ⟨fun i => ⟨t i,Finset.mem_union_right _ (Finset.mem_map.mpr ⟨i,Finset.mem_univ _,rfl⟩)⟩,fun _ _ h => t.injective (congrArg Subtype.val h)⟩ have hT : Nat.card T = 10 := by rw [Nat.card_eq_fintype_card,Fintype.card_coe] dsimp only [S] rw [Finset.card_union_of_disjoint hd,Finset.card_map,Finset.card_map] simp obtain ⟨ρ,hρ⟩ := even_move_embedding (by omega : 5+2 ≤ Nat.card T) s' t' let e : T ↪ α := Function.Embedding.subtype _ let σ := ρ.val.viaEmbedding e have hσ : σ ∈ alternatingGroup α := by change Equiv.Perm.sign (ρ.val.viaEmbedding e) = 1 rw [Equiv.Perm.viaEmbedding,Equiv.Perm.sign_extendDomain] exact ρ.property refine ⟨⟨σ,hσ⟩,?_,?_⟩ · intro i change ρ.val.viaEmbedding e (e (s' i)) = t i rw [Equiv.Perm.viaEmbedding_apply,hρ] rfl · intro x hx by_contra hn have he : x ∉ Set.range e := by rintro ⟨y,rfl⟩ exact hn y.property exact Equiv.Perm.mem_support.mp hx (Equiv.Perm.viaEmbedding_apply_of_notMem _ _ _ he) end FreshEvenBank end SimpleAmenable end end end OAI