Skip to content

Commit 02e8b79

Browse files
committed
perf(LinearAlgebra/RootSystem/GeckConstruction/Relations): get rid of some aesop (leanprover-community#35587)
Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
1 parent 7862cbd commit 02e8b79

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

Mathlib/LinearAlgebra/RootSystem/GeckConstruction/Relations.lean

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ private lemma lie_e_f_same_aux (k : ι) (hki : k ≠ i) (hki' : k ≠ P.reflecti
9595
⁅e i, f i⁆ (Sum.inr k) (Sum.inr k) = h i (Sum.inr k) (Sum.inr k) := by
9696
classical
9797
have h_lin_ind : LinearIndependent R ![P.root i, P.root k] := by
98-
rw [LinearIndependent.pair_symm_iff, IsReduced.linearIndependent_iff]; aesop
98+
rw [LinearIndependent.pair_symm_iff, IsReduced.linearIndependent_iff]
99+
refine ⟨hki, ?_⟩
100+
rwa [ne_eq, root_eq_neg_iff]
99101
suffices (∑ x, if P.root k = P.root i + P.root x then
100102
(P.chainBotCoeff i x + 1 : R) * (P.chainTopCoeff i k + 1) else 0) -
101103
(∑ x, if P.root k = P.root x - P.root i then
@@ -220,14 +222,15 @@ include hij
220222
/-- An auxiliary lemma en route to `RootPairing.Base.lie_e_f_ne`. -/
221223
private lemma lie_e_f_ne_aux₁ :
222224
⁅e i, f j⁆ᵀ (Sum.inr j) = 0 := by
225+
have hij' : (i : ι) ≠ (j : ι) := hij ∘ SetLike.coe_eq_coe.mp
223226
letI := P.indexNeg
224227
classical
225228
ext (k | k)
226229
· rw [Matrix.transpose_apply, lie_e_f_ne_aux₀, Pi.zero_apply]
227230
· suffices ((if k = i then ↑|b.cartanMatrix i j| else (0 : R)) -
228231
∑ x, if P.root x = P.root i + P.root j ∧ P.root k = P.root x - P.root j then
229232
(P.chainTopCoeff j x : R) + 1 else 0) = 0 by
230-
have hij : (j : ι) ≠ -i := by simpa using b.root_ne_neg_of_ne j.property i.property (by aesop)
233+
have hij : (j : ι) ≠ -i := by simpa using b.root_ne_neg_of_ne j.property i.property hij'.symm
231234
have aux : ∀ x ∈ Finset.univ,
232235
x ≠ j → (if x = j ∧ k = i then ↑|b.cartanMatrix i x| else 0) = (0 : R) := by aesop
233236
simpa [e, f, P.ne_zero, hij, -indexNeg_neg, -Finset.univ_eq_attach, ← ite_and,
@@ -265,10 +268,12 @@ set_option backward.isDefEq.respectTransparency false in
265268
/-- Lemma 3.5 from [Geck](Geck2017). -/
266269
lemma lie_e_f_ne [P.IsReduced] [P.IsIrreducible] :
267270
⁅e i, f j⁆ = 0 := by
271+
have hij' : (i : ι) ≠ (j : ι) := hij ∘ SetLike.coe_eq_coe.mp
268272
letI := P.indexNeg
269273
classical
270274
ext (k | k) (l | l)
271-
· aesop (erase simp indexNeg_neg) (add simp [e, f, Matrix.mul_apply, mul_ite, ite_mul])
275+
· rw [ne_comm] at hij
276+
simp_all [-indexNeg_neg, e, f]
272277
· exact lie_e_f_ne_aux₀ k l
273278
· have aux₁ : P.root k ≠ P.root i - P.root j :=
274279
fun contra ↦ b.sub_notMem_range_root i.property j.property ⟨k, contra⟩
@@ -303,8 +308,8 @@ lemma lie_e_f_ne [P.IsReduced] [P.IsIrreducible] :
303308
simp [Finset.sum_ite_of_false aux₃, Finset.sum_ite_of_false aux₄]
304309
by_cases h₆ : P.root l + P.root i ∈ range P.root; swap
305310
· have h₇ : P.root l - P.root j ∉ range P.root := by
306-
rwa [b.root_sub_mem_iff_root_add_mem i j l (by aesop) i.property j.property
307-
(by aesop) (by aesop) h₅]
311+
rwa [b.root_sub_mem_iff_root_add_mem i j l hij' i.property j.property h₃ _ h₅]
312+
simpa
308313
have aux₃ : ∀ x ∈ Finset.univ,
309314
¬ (P.root x = P.root i + P.root l ∧ P.root k = P.root x - P.root j) := by
310315
rintro x - ⟨hx, -⟩; exact h₆ ⟨x, by rw [hx]; abel⟩
@@ -313,7 +318,7 @@ lemma lie_e_f_ne [P.IsReduced] [P.IsIrreducible] :
313318
rintro x - ⟨hx, hx'⟩; exact h₇ ⟨x, hx⟩
314319
simp [Finset.sum_ite_of_false aux₃, Finset.sum_ite_of_false aux₄]
315320
obtain ⟨m, hm : P.root m = P.root l - P.root j⟩ :=
316-
b.root_sub_root_mem_of_mem_of_mem i j l (by aesop) i.property j.property h₅ h₃ h₆
321+
b.root_sub_root_mem_of_mem_of_mem i j l hij' i.property j.property h₅ h₃ h₆
317322
obtain ⟨l', hl'⟩ := h₆
318323
by_cases hk : P.root k = P.root l + P.root i - P.root j; swap
319324
· grind
@@ -326,7 +331,7 @@ lemma lie_e_f_ne [P.IsReduced] [P.IsIrreducible] :
326331
rw [Finset.sum_eq_single_of_mem m (Finset.mem_univ _) (by rintro x - h; rw [if_neg (aux₃ _ h)]),
327332
Finset.sum_eq_single_of_mem l' (Finset.mem_univ _) (by rintro x - h; rw [if_neg (aux₄ _ h)]),
328333
if_pos (⟨hm, by rw [hm, hk]; abel⟩), if_pos ⟨by rw [hl', add_comm], by rw [hl', hk]⟩]
329-
have := chainBotCoeff_mul_chainTopCoeff i.property j.property (by aesop) hl'.symm hm.symm h₅
334+
have := chainBotCoeff_mul_chainTopCoeff i.property j.property hij' hl'.symm hm.symm h₅
330335
norm_cast
331336

332337
end lie_e_f_ne

0 commit comments

Comments
 (0)