Skip to content

Commit bc4aae5

Browse files
chore: replace top by univ in closure_cycle_adjacent_swap (#17235)
1 parent 0668f23 commit bc4aae5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Mathlib/GroupTheory/Perm/Closure.lean

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ theorem closure_isCycle : closure { σ : Perm β | IsCycle σ } = ⊤ := by
4040

4141
variable [DecidableEq α] [Fintype α]
4242

43-
theorem closure_cycle_adjacent_swap {σ : Perm α} (h1 : IsCycle σ) (h2 : σ.support = ) (x : α) :
43+
theorem closure_cycle_adjacent_swap {σ : Perm α} (h1 : IsCycle σ) (h2 : σ.support = univ) (x : α) :
4444
closure ({σ, swap x (σ x)} : Set (Perm α)) = ⊤ := by
4545
let H := closure ({σ, swap x (σ x)} : Set (Perm α))
4646
have h3 : σ ∈ H := subset_closure (Set.mem_insert σ _)
@@ -51,8 +51,7 @@ theorem closure_cycle_adjacent_swap {σ : Perm α} (h1 : IsCycle σ) (h2 : σ.su
5151
| zero => exact subset_closure (Set.mem_insert_of_mem _ (Set.mem_singleton _))
5252
| succ n ih =>
5353
convert H.mul_mem (H.mul_mem h3 ih) (H.inv_mem h3)
54-
simp_rw [mul_swap_eq_swap_mul, mul_inv_cancel_right, pow_succ']
55-
rfl
54+
simp_rw [mul_swap_eq_swap_mul, mul_inv_cancel_right, pow_succ', coe_mul, comp_apply]
5655
have step2 : ∀ n : ℕ, swap x ((σ ^ n) x) ∈ H := by
5756
intro n
5857
induction n with
@@ -70,9 +69,9 @@ theorem closure_cycle_adjacent_swap {σ : Perm α} (h1 : IsCycle σ) (h2 : σ.su
7069
exact H.mul_mem (H.mul_mem (step1 n) ih) (step1 n)
7170
have step3 : ∀ y : α, swap x y ∈ H := by
7271
intro y
73-
have hx : x ∈ (⊤ : Finset α) := Finset.mem_univ x
72+
have hx : x ∈ univ := Finset.mem_univ x
7473
rw [← h2, mem_support] at hx
75-
have hy : y ∈ (⊤ : Finset α) := Finset.mem_univ y
74+
have hy : y ∈ univ := Finset.mem_univ y
7675
rw [← h2, mem_support] at hy
7776
cases' IsCycle.exists_pow_eq h1 hx hy with n hn
7877
rw [← hn]
@@ -97,7 +96,7 @@ theorem closure_cycle_coprime_swap {n : ℕ} {σ : Perm α} (h0 : Nat.Coprime n
9796
closure ({σ, swap x ((σ ^ n) x)} : Set (Perm α)) = ⊤ := by
9897
rw [← Finset.card_univ, ← h2, ← h1.orderOf] at h0
9998
cases' exists_pow_eq_self_of_coprime h0 with m hm
100-
have h2' : (σ ^ n).support = := Eq.trans (support_pow_coprime h0) h2
99+
have h2' : (σ ^ n).support = univ := Eq.trans (support_pow_coprime h0) h2
101100
have h1' : IsCycle ((σ ^ n) ^ (m : ℤ)) := by rwa [← hm] at h1
102101
replace h1' : IsCycle (σ ^ n) :=
103102
h1'.of_pow (le_trans (support_pow_le σ n) (ge_of_eq (congr_arg support hm)))

0 commit comments

Comments
 (0)