l3lab/ntp-mathlib huggingface dataset:
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a) = ↑m

Next tactic:
ext b
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      ext b; 

Proof state:
case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => a ≠ x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

Next tactic:
dsimp
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      ext b; dsimp
      

Proof state:
case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => ¬a = x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

Next tactic:
rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      ext b; dsimp
      rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
      

Proof state:
case a
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m

Next tactic:
obtain rfl | h := eq_or_ne a b
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      ext b; dsimp
      rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
      obtain rfl | h := eq_or_ne a b
      · 

Proof state:
case a.inl
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ((if ¬a = a then count a ↑m else 0) + if a = a then count a ↑m else 0) = count a ↑m

Next tactic:
rw [if_pos rfl, if_neg (not_not.2 rfl), zero_add]
theorem fill_filterNe [DecidableEq α] (a : α) (m : Sym α n) :
    (m.filterNe a).2.fill a (m.filterNe a).1 = m :=
  Sym.ext
    (by
      rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
      ext b; dsimp
      rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
      obtain rfl | h := eq_or_ne a b
      · rw [if_pos rfl, if_neg (not_not.2 rfl), zero_add]
      · 

Proof state:
case a.inr
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
h : a ≠ b
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m

Next tactic:
rw [if_pos h, if_neg h.symm, add_zero]
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
⊢ ↑(filterNe a (fill a m.fst m.snd)).snd = ↑m.snd

Next tactic:
rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
      

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
⊢ filter (fun x => a ≠ x) (↑m.snd + ↑(replicate (↑m.fst) a)) = ↑m.snd

Next tactic:
rw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
      rw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]
      · 

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
⊢ ∀ (a_1 : α), a_1 ∉ filter (fun x => a ≠ x) ↑(replicate (↑m.fst) a)

Next tactic:
intro b hb
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
      rw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]
      · intro b hb
        

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
b : α
hb : b ∈ filter (fun x => a ≠ x) ↑(replicate (↑m.fst) a)
⊢ False

Next tactic:
rw [mem_filter, Sym.mem_coe, mem_replicate] at hb
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
      rw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]
      · intro b hb
        rw [mem_filter, Sym.mem_coe, mem_replicate] at hb
        

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
b : α
hb : (↑m.fst ≠ 0 ∧ b = a) ∧ a ≠ b
⊢ False

Next tactic:
exact hb.2 hb.1.2.symm
theorem filter_ne_fill [DecidableEq α] (a : α) (m : Σi : Fin (n + 1), Sym α (n - i)) (h : a ∉ m.2) :
    (m.2.fill a m.1).filterNe a = m :=
  sigma_sub_ext
    (by
      rw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]
      rw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]
      · intro b hb
        rw [mem_filter, Sym.mem_coe, mem_replicate] at hb
        exact hb.2 hb.1.2.symm
      · 

Proof state:
α : Type u_1
β : Type u_2
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : (i : Fin (n + 1)) × Sym α (n - ↑i)
h : a ∉ m.snd
⊢ ∀ a_1 ∈ ↑m.snd, a ≠ a_1

Next tactic:
exact fun a ha ha' => h <| ha'.symm ▸ ha
@[simp]
theorem decode_encode [DecidableEq α] (s : Sym (Option α) n.succ) : decode (encode s) = s := by
  

Proof state:
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) (Nat.succ n)
⊢ decode (encode s) = s

Next tactic:
by_cases h : none ∈ s
@[simp]
theorem decode_encode [DecidableEq α] (s : Sym (Option α) n.succ) : decode (encode s) = s := by
  by_cases h : none ∈ s
  · 

Proof state:
case pos
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) (Nat.succ n)
h : none ∈ s
⊢ decode (encode s) = s

Next tactic:
simp [h]
@[simp]
theorem decode_encode [DecidableEq α] (s : Sym (Option α) n.succ) : decode (encode s) = s := by
  by_cases h : none ∈ s
  · simp [h]
  · 

Proof state:
case neg
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) (Nat.succ n)
h : none ∉ s
⊢ decode (encode s) = s

Next tactic:
simp only [decode, h, not_false_iff, encode_of_not_none_mem, Embedding.some_apply, map_map,
      comp_apply, Option.some_get]
@[simp]
theorem decode_encode [DecidableEq α] (s : Sym (Option α) n.succ) : decode (encode s) = s := by
  by_cases h : none ∈ s
  · simp [h]
  · simp only [decode, h, not_false_iff, encode_of_not_none_mem, Embedding.some_apply, map_map,
      comp_apply, Option.some_get]
    

Proof state:
case neg
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) (Nat.succ n)
h : none ∉ s
⊢ map (fun x => ↑x) (attach s) = s

Next tactic:
convert s.attach_map_coe
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  

Proof state:
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) n ⊕ Sym α (Nat.succ n)
⊢ encode (decode s) = s

Next tactic:
obtain s | s := s
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · 

Proof state:
case inl
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym (Option α) n
⊢ encode (decode (Sum.inl s)) = Sum.inl s

Next tactic:
simp
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · 

Proof state:
case inr
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
⊢ encode (decode (Sum.inr s)) = Sum.inr s

Next tactic:
unfold SymOptionSuccEquiv.encode
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    

Proof state:
case inr
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
⊢ (if h : none ∈ decode (Sum.inr s) then Sum.inl (erase (decode (Sum.inr s)) none h)
    else Sum.inr (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s))))) =
    Sum.inr s

Next tactic:
split_ifs with h
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · 

Proof state:
case pos
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∈ decode (Sum.inr s)
⊢ False

Next tactic:
obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      

Proof state:
case pos.intro.intro
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∈ decode (Sum.inr s)
a : α
left✝ : a ∈ ↑s
ha : Embedding.some a = none
⊢ False

Next tactic:
exact Option.some_ne_none _ ha
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      exact Option.some_ne_none _ ha
    · 

Proof state:
case neg
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ Sum.inr (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) = Sum.inr s

Next tactic:
refine' congr_arg Sum.inr _
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      exact Option.some_ne_none _ ha
    · refine' congr_arg Sum.inr _
      

Proof state:
case neg
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s))) = s

Next tactic:
refine' map_injective (Option.some_injective _) _ _
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      exact Option.some_ne_none _ ha
    · refine' congr_arg Sum.inr _
      refine' map_injective (Option.some_injective _) _ _
      

Proof state:
case neg
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ map some (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) = map some s

Next tactic:
refine' Eq.trans _ (Eq.trans (SymOptionSuccEquiv.decode (Sum.inr s)).attach_map_coe _)
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      exact Option.some_ne_none _ ha
    · refine' congr_arg Sum.inr _
      refine' map_injective (Option.some_injective _) _ _
      refine' Eq.trans _ (Eq.trans (SymOptionSuccEquiv.decode (Sum.inr s)).attach_map_coe _)
      

Proof state:
case neg.refine'_1
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ map some (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) =
    map Subtype.val (attach (decode (Sum.inr s)))
case neg.refine'_2
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ decode (Sum.inr s) = map some s

Next tactic:
simp
@[simp]
theorem encode_decode [DecidableEq α] (s : Sum (Sym (Option α) n) (Sym α n.succ)) :
    encode (decode s) = s := by
  obtain s | s := s
  · simp
  · unfold SymOptionSuccEquiv.encode
    split_ifs with h
    · obtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h
      exact Option.some_ne_none _ ha
    · refine' congr_arg Sum.inr _
      refine' map_injective (Option.some_injective _) _ _
      refine' Eq.trans _ (Eq.trans (SymOptionSuccEquiv.decode (Sum.inr s)).attach_map_coe _)
      simp; 

Proof state:
case neg.refine'_2
α : Type u_1
n : ℕ
inst✝ : DecidableEq α
s : Sym α (Nat.succ n)
h : none ∉ decode (Sum.inr s)
⊢ decode (Sum.inr s) = map some s

Next tactic:
simp
theorem prod_list_swap_mem_alternatingGroup_iff_even_length {l : List (Perm α)}
    (hl : ∀ g ∈ l, IsSwap g) : l.prod ∈ alternatingGroup α ↔ Even l.length := by
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
l : List (Perm α)
hl : ∀ g ∈ l, IsSwap g
⊢ List.prod l ∈ alternatingGroup α ↔ Even (List.length l)

Next tactic:
rw [mem_alternatingGroup, sign_prod_list_swap hl, ← Units.val_eq_one, Units.val_pow_eq_pow_val,
    Units.coe_neg_one, neg_one_pow_eq_one_iff_even]
theorem prod_list_swap_mem_alternatingGroup_iff_even_length {l : List (Perm α)}
    (hl : ∀ g ∈ l, IsSwap g) : l.prod ∈ alternatingGroup α ↔ Even l.length := by
  rw [mem_alternatingGroup, sign_prod_list_swap hl, ← Units.val_eq_one, Units.val_pow_eq_pow_val,
    Units.coe_neg_one, neg_one_pow_eq_one_iff_even]
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
l : List (Perm α)
hl : ∀ g ∈ l, IsSwap g
⊢ -1 ≠ 1

Next tactic:
decide
set_option linter.deprecated false in
theorem finRotate_bit1_mem_alternatingGroup {n : ℕ} :
    finRotate (bit1 n) ∈ alternatingGroup (Fin (bit1 n)) := by
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
⊢ finRotate (bit1 n) ∈ alternatingGroup (Fin (bit1 n))

Next tactic:
rw [mem_alternatingGroup, bit1, sign_finRotate, pow_bit0', Int.units_mul_self, one_pow]
theorem two_mul_card_alternatingGroup [Nontrivial α] :
    2 * card (alternatingGroup α) = card (Perm α) := by
  

Proof state:
α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
⊢ 2 * card ↥(alternatingGroup α) = card (Perm α)

Next tactic:
let this := (QuotientGroup.quotientKerEquivOfSurjective _ (sign_surjective α)).toEquiv
theorem two_mul_card_alternatingGroup [Nontrivial α] :
    2 * card (alternatingGroup α) = card (Perm α) := by
  let this := (QuotientGroup.quotientKerEquivOfSurjective _ (sign_surjective α)).toEquiv
  

Proof state:
α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
this : Perm α ⧸ MonoidHom.ker sign ≃ ℤˣ :=
  (QuotientGroup.quotientKerEquivOfSurjective sign (_ : Function.Surjective ⇑sign)).toEquiv
⊢ 2 * card ↥(alternatingGroup α) = card (Perm α)

Next tactic:
rw [← Fintype.card_units_int, ← Fintype.card_congr this]
theorem two_mul_card_alternatingGroup [Nontrivial α] :
    2 * card (alternatingGroup α) = card (Perm α) := by
  let this := (QuotientGroup.quotientKerEquivOfSurjective _ (sign_surjective α)).toEquiv
  rw [← Fintype.card_units_int, ← Fintype.card_congr this]
  

Proof state:
α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
this : Perm α ⧸ MonoidHom.ker sign ≃ ℤˣ :=
  (QuotientGroup.quotientKerEquivOfSurjective sign (_ : Function.Surjective ⇑sign)).toEquiv
⊢ card (Perm α ⧸ MonoidHom.ker sign) * card ↥(alternatingGroup α) = card (Perm α)

Next tactic:
apply (Subgroup.card_eq_card_quotient_mul_card_subgroup _).symm
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  

Proof state:
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ τ : ↥(alternatingGroup α)
hc : IsConj ↑σ ↑τ
hσ : Finset.card (support ↑σ) + 2 ≤ card α
⊢ IsConj σ τ

Next tactic:
obtain ⟨σ, hσ⟩ := σ
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  

Proof state:
case mk
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
τ : ↥(alternatingGroup α)
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑τ
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
⊢ IsConj { val := σ, property := hσ✝ } τ

Next tactic:
obtain ⟨τ, hτ⟩ := τ
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  

Proof state:
case mk.mk
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
⊢ IsConj { val := σ, property := hσ✝ } { val := τ, property := hτ }

Next tactic:
obtain ⟨π, hπ⟩ := isConj_iff.1 hc
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  

Proof state:
case mk.mk.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * ↑{ val := σ, property := hσ✝ } * π⁻¹ = ↑{ val := τ, property := hτ }
⊢ IsConj { val := σ, property := hσ✝ } { val := τ, property := hτ }

Next tactic:
rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
  

Proof state:
case mk.mk.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * σ * π⁻¹ = τ
⊢ IsConj { val := σ, property := hσ✝ } { val := τ, property := hτ }

Next tactic:
cases' Int.units_eq_one_or (Perm.sign π) with h h
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
  cases' Int.units_eq_one_or (Perm.sign π) with h h
  · 

Proof state:
case mk.mk.intro.inl
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * σ * π⁻¹ = τ
h : sign π = 1
⊢ IsConj { val := σ, property := hσ✝ } { val := τ, property := hτ }

Next tactic:
rw [isConj_iff]
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
  cases' Int.units_eq_one_or (Perm.sign π) with h h
  · rw [isConj_iff]
    

Proof state:
case mk.mk.intro.inl
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * σ * π⁻¹ = τ
h : sign π = 1
⊢ ∃ c, c * { val := σ, property := hσ✝ } * c⁻¹ = { val := τ, property := hτ }

Next tactic:
refine' ⟨⟨π, mem_alternatingGroup.mp h⟩, Subtype.val_injective _⟩
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
  cases' Int.units_eq_one_or (Perm.sign π) with h h
  · rw [isConj_iff]
    refine' ⟨⟨π, mem_alternatingGroup.mp h⟩, Subtype.val_injective _⟩
    

Proof state:
case mk.mk.intro.inl
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * σ * π⁻¹ = τ
h : sign π = 1
⊢ ↑({ val := π, property := (_ : sign π = 1) } * { val := σ, property := hσ✝ } *
        { val := π, property := (_ : sign π = 1) }⁻¹) =
    ↑{ val := τ, property := hτ }

Next tactic:
simpa only [Subtype.val, Subgroup.coe_mul, coe_inv, coe_mk] using hπ
theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ := by
  obtain ⟨σ, hσ⟩ := σ
  obtain ⟨τ, hτ⟩ := τ
  obtain ⟨π, hπ⟩ := isConj_iff.1 hc
  rw [Subtype.coe_mk, Subtype.coe_mk] at hπ
  cases' Int.units_eq_one_or (Perm.sign π) with h h
  · rw [isConj_iff]
    refine' ⟨⟨π, mem_alternatingGroup.mp h⟩, Subtype.val_injective _⟩
    simpa only [Subtype.val, Subgroup.coe_mul, coe_inv, coe_mk] using hπ
  · 

Proof state:
case mk.mk.intro.inr
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
hσ✝ : σ ∈ alternatingGroup α
hσ : Finset.card (support ↑{ val := σ, property := hσ✝ }) + 2 ≤ card α
τ : Perm α
hτ : τ ∈ alternatingGroup α
hc : IsConj ↑{ val := σ, property := hσ✝ } ↑{ val := τ, property := hτ }
π : Perm α
hπ : π * σ * π⁻¹ = τ
h : sign π = -1
⊢ IsConj { val := σ, property := hσ✝ } { val := τ, property := hτ }

Next tactic:
have h2 : 2 ≤ σ.supportᶜ.card := by
      rw [Finset.card_compl, le_tsub_iff_left σ.support.card_le_univ]
      exact hσ