Skip to content

Commit 7984739

Browse files
committed
chore(GroupTheory/Coxeter/Length): deprecate redundant theorems (leanprover-community#37155)
We deprecate `exists_reduced_word` and `exists_reduced_word'` in favor of a common `exists_isReduced`, which we accomplish by moving the definition `IsReduced` earlier in the file.
1 parent 2a92f32 commit 7984739

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

Mathlib/GroupTheory/Coxeter/Length.lean

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ local prefix:100 "π " => cs.wordProd
6565

6666
/-! ### Length -/
6767

68-
private theorem exists_word_with_prod (w : W) : ∃ n ω, ω.length = n ∧ π ω = w := by
68+
private theorem exists_word_with_prod (w : W) : ∃ n ω, n = ω.length ∧ π ω = w := by
6969
rcases cs.wordProd_surjective w with ⟨ω, rfl⟩
7070
use ω.length, ω
7171

@@ -76,10 +76,19 @@ must be multiplied to form `w`. -/
7676

7777
local prefix:100 "ℓ " => cs.length
7878

79-
theorem exists_reduced_word (w : W) : ∃ ω, ω.length = ℓ w ∧ w = π ω := by
79+
/-- The proposition that `ω` is reduced; that is, it has minimal length among all words that
80+
represent the same element of `W`. -/
81+
def IsReduced (ω : List B) : Prop := ℓ (π ω) = ω.length
82+
83+
theorem IsReduced.eq {ω : List B} (hω : cs.IsReduced ω) : ℓ (π ω) = ω.length := hω
84+
85+
theorem exists_isReduced (w : W) : ∃ ω : List B, cs.IsReduced ω ∧ w = π ω := by
8086
classical
81-
have := Nat.find_spec (cs.exists_word_with_prod w)
82-
tauto
87+
obtain ⟨ω, hω, rfl⟩ := Nat.find_spec (cs.exists_word_with_prod w)
88+
exact ⟨ω, hω, rfl⟩
89+
90+
@[deprecated (since := "2026-03-25")] alias exists_reduced_word := exists_isReduced
91+
@[deprecated (since := "2026-03-25")] alias exists_reduced_word' := exists_isReduced
8392

8493
open scoped Classical in
8594
theorem length_wordProd_le (ω : List B) : ℓ (π ω) ≤ ω.length :=
@@ -91,27 +100,27 @@ theorem length_wordProd_le (ω : List B) : ℓ (π ω) ≤ ω.length :=
91100
theorem length_eq_zero_iff {w : W} : ℓ w = 0 ↔ w = 1 := by
92101
constructor
93102
· intro h
94-
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
95-
have : ω = [] := eq_nil_of_length_eq_zero (hω.trans h)
103+
rcases cs.exists_isReduced w with ⟨ω, hω, rfl⟩
104+
have : ω = [] := eq_nil_of_length_eq_zero (hω.symm.trans h)
96105
rw [this, wordProd_nil]
97106
· rintro rfl
98107
exact cs.length_one
99108

100109
@[simp]
101110
theorem length_inv (w : W) : ℓ (w⁻¹) = ℓ w := by
102111
apply Nat.le_antisymm
103-
· rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
104-
have := cs.length_wordProd_le (List.reverse ω)
105-
rwa [wordProd_reverse, length_reverse, hω] at this
106-
· rcases cs.exists_reduced_word w⁻¹ with ⟨ω, hω, h'ω⟩
107-
have := cs.length_wordProd_le (List.reverse ω)
108-
rwa [wordProd_reverse, length_reverse, ← h'ω, hω, inv_inv] at this
112+
· rcases cs.exists_isReduced w with ⟨ω, hω, rfl⟩
113+
have := cs.length_wordProd_le ω.reverse
114+
rwa [wordProd_reverse, length_reverse, hω] at this
115+
· rcases cs.exists_isReduced w⁻¹ with ⟨ω, hω, h'ω⟩
116+
have := cs.length_wordProd_le ω.reverse
117+
rwa [wordProd_reverse, length_reverse, ← h'ω, hω, inv_inv, ← h'ω] at this
109118

110119
theorem length_mul_le (w₁ w₂ : W) : ℓ (w₁ * w₂) ≤ ℓ w₁ + ℓ w₂ := by
111-
rcases cs.exists_reduced_word w₁ with ⟨ω₁, hω₁, rfl⟩
112-
rcases cs.exists_reduced_word w₂ with ⟨ω₂, hω₂, rfl⟩
120+
rcases cs.exists_isReduced w₁ with ⟨ω₁, hω₁, rfl⟩
121+
rcases cs.exists_isReduced w₂ with ⟨ω₂, hω₂, rfl⟩
113122
have := cs.length_wordProd_le (ω₁ ++ ω₂)
114-
simpa [hω₁, hω₂, wordProd_append] using this
123+
simpa [hω₁.eq, hω₂.eq, wordProd_append] using this
115124

116125
theorem length_le_length_mul_add_left (w₁ w₂ : W) : ℓ w₂ ≤ ℓ (w₁ * w₂) + ℓ w₁ := by
117126
simpa [add_comm] using cs.length_mul_le w₁⁻¹ (w₁ * w₂)
@@ -147,8 +156,8 @@ theorem lengthParity_comp_simple :
147156

148157
theorem lengthParity_eq_ofAdd_length (w : W) :
149158
cs.lengthParity w = Multiplicative.ofAdd (↑(ℓ w)) := by
150-
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
151-
rw [hω, wordProd, map_list_prod, List.map_map, lengthParity_comp_simple, map_const',
159+
rcases cs.exists_isReduced w with ⟨ω, hω, rfl⟩
160+
rw [hω, wordProd, map_list_prod, List.map_map, lengthParity_comp_simple, map_const',
152161
prod_replicate, ← ofAdd_nsmul, nsmul_one]
153162

154163
theorem length_mul_mod_two (w₁ w₂ : W) : ℓ (w₁ * w₂) % 2 = (ℓ w₁ + ℓ w₂) % 2 := by
@@ -169,8 +178,8 @@ theorem length_simple (i : B) : ℓ (s i) = 1 := by
169178
theorem length_eq_one_iff {w : W} : ℓ w = 1 ↔ ∃ i : B, w = s i := by
170179
constructor
171180
· intro h
172-
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
173-
rcases List.length_eq_one_iff.mp (hω.trans h) with ⟨i, rfl⟩
181+
rcases cs.exists_isReduced w with ⟨ω, hω, rfl⟩
182+
rcases List.length_eq_one_iff.mp (hω.symm.trans h) with ⟨i, rfl⟩
174183
exact ⟨i, cs.wordProd_singleton i⟩
175184
· rintro ⟨i, rfl⟩
176185
exact cs.length_simple i
@@ -198,10 +207,6 @@ theorem length_simple_mul (w : W) (i : B) : ℓ (s i * w) = ℓ w + 1 ∨ ℓ (s
198207

199208
/-! ### Reduced words -/
200209

201-
/-- The proposition that `ω` is reduced; that is, it has minimal length among all words that
202-
represent the same element of `W`. -/
203-
def IsReduced (ω : List B) : Prop := ℓ (π ω) = ω.length
204-
205210
@[simp]
206211
theorem isReduced_reverse_iff (ω : List B) : cs.IsReduced (ω.reverse) ↔ cs.IsReduced ω := by
207212
simp [IsReduced]
@@ -210,10 +215,6 @@ theorem IsReduced.reverse {cs : CoxeterSystem M W} {ω : List B}
210215
(hω : cs.IsReduced ω) : cs.IsReduced (ω.reverse) :=
211216
(cs.isReduced_reverse_iff ω).mpr hω
212217

213-
theorem exists_reduced_word' (w : W) : ∃ ω : List B, cs.IsReduced ω ∧ w = π ω := by
214-
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
215-
use ω
216-
tauto
217218

218219
private theorem isReduced_take_and_drop {ω : List B} (hω : cs.IsReduced ω) (j : ℕ) :
219220
cs.IsReduced (ω.take j) ∧ cs.IsReduced (ω.drop j) := by
@@ -283,11 +284,11 @@ theorem isRightDescent_inv_iff {w : W} {i : B} :
283284
simpa using (cs.isLeftDescent_inv_iff (w := w⁻¹)).symm
284285

285286
theorem exists_leftDescent_of_ne_one {w : W} (hw : w ≠ 1) : ∃ i : B, cs.IsLeftDescent w i := by
286-
rcases cs.exists_reduced_word w with ⟨ω, h, rfl⟩
287+
rcases cs.exists_isReduced w with ⟨ω, h, rfl⟩
287288
have h₁ : ω ≠ [] := by rintro rfl; simp at hw
288289
rcases List.exists_cons_of_ne_nil h₁ with ⟨i, ω', rfl⟩
289290
use i
290-
rw [IsLeftDescent, h, wordProd_cons, simple_mul_simple_cancel_left]
291+
rw [IsLeftDescent, h, wordProd_cons, simple_mul_simple_cancel_left]
291292
calc
292293
ℓ (π ω') ≤ ω'.length := cs.length_wordProd_le ω'
293294
_ < (i :: ω').length := by simp

0 commit comments

Comments
 (0)