Skip to content

Commit 555c501

Browse files
committed
suffix theorems with _of_wellFounded{LT/GT} and add deprecations
1 parent 19869e4 commit 555c501

4 files changed

Lines changed: 35 additions & 18 deletions

File tree

Mathlib/Data/Finset/Sort.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ theorem orderEmbOfFin_singleton (a : α) (i : Fin 1) :
263263
the increasing bijection `orderEmbOfFin s h`. -/
264264
theorem orderEmbOfFin_unique {s : Finset α} {k : ℕ} (h : s.card = k) {f : Fin k → α}
265265
(hfs : ∀ x, f x ∈ s) (hmono : StrictMono f) : f = s.orderEmbOfFin h := by
266-
rw [← hmono.range_inj (s.orderEmbOfFin h).strictMono, range_orderEmbOfFin, ← Set.image_univ,
267-
← coe_univ, ← coe_image, coe_inj]
266+
rw [← hmono.range_inj_of_wellFoundedLT (s.orderEmbOfFin h).strictMono, range_orderEmbOfFin,
267+
Set.image_univ, ← coe_univ, ← coe_image, coe_inj]
268268
refine eq_of_subset_of_card_le (fun x hx => ?_) ?_
269269
· rcases mem_image.1 hx with ⟨x, _, rfl⟩
270270
exact hfs x

Mathlib/Order/Hom/Set.lean

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,13 @@ theorem orderIsoOfSurjective_self_symm_apply (b : β) :
155155
end StrictMono
156156

157157
/-- Two order embeddings on a well-order are equal provided that their ranges are equal. -/
158-
lemma OrderEmbedding.range_inj [LinearOrder α] [WellFoundedLT α] [Preorder β] {f g : α ↪o β} :
159-
Set.range f = Set.range g ↔ f = g := by
160-
rw [f.strictMono.range_inj g.strictMono, DFunLike.coe_fn_eq]
158+
@[to_dual]
159+
lemma OrderEmbedding.range_inj_of_wellFoundedLT [LinearOrder α] [WellFoundedLT α] [Preorder β]
160+
{f g : α ↪o β} : Set.range f = Set.range g ↔ f = g := by
161+
rw [f.strictMono.range_inj_of_wellFoundedLT g.strictMono, DFunLike.coe_fn_eq]
162+
163+
@[deprecated (since := "2026-05-15")]
164+
alias OrderEmbedding.range_inj := OrderEmbedding.range_inj_of_wellFoundedLT
161165

162166
namespace OrderIso
163167

@@ -168,7 +172,8 @@ instance subsingleton_of_wellFoundedLT [LinearOrder α] [WellFoundedLT α] [Preo
168172
Subsingleton (α ≃o β) := by
169173
refine ⟨fun f g ↦ ?_⟩
170174
rw [OrderIso.ext_iff, ← coe_toOrderEmbedding, ← coe_toOrderEmbedding, DFunLike.coe_fn_eq,
171-
← OrderEmbedding.range_inj, coe_toOrderEmbedding, coe_toOrderEmbedding, range_eq, range_eq]
175+
← OrderEmbedding.range_inj_of_wellFoundedLT, coe_toOrderEmbedding, coe_toOrderEmbedding,
176+
range_eq, range_eq]
172177

173178
instance subsingleton_of_wellFoundedLT' [LinearOrder β] [WellFoundedLT β] [Preorder α] :
174179
Subsingleton (α ≃o β) := by

Mathlib/Order/WellFounded.lean

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ theorem WellFounded.min_le (h : WellFounded ((· < ·) : β → β → Prop))
189189
{x : β} {s : Set β} (hx : x ∈ s) : h.min s ⟨x, hx⟩ ≤ x :=
190190
not_lt.1 <| h.not_lt_min _ hx
191191

192-
@[to_dual range_injOn_strictMono_of_wellFoundedGT]
193-
theorem Set.range_injOn_strictMono [WellFoundedLT β] :
192+
@[to_dual]
193+
theorem Set.range_injOn_strictMono_of_wellFoundedLT [WellFoundedLT β] :
194194
Set.InjOn Set.range { f : β → γ | StrictMono f } := by
195195
intro f hf g hg hfg
196196
ext a
@@ -207,20 +207,32 @@ theorem Set.range_injOn_strictMono [WellFoundedLT β] :
207207
rw [IH c this] at hc
208208
cases (hg.injective hc).not_lt this
209209

210-
@[to_dual range_injOn_strictAnti_of_wellFoundedLT]
211-
theorem Set.range_injOn_strictAnti [WellFoundedGT β] :
210+
@[deprecated (since := "2026-05-15")]
211+
alias Set.range_injOn_strictMono := Set.range_injOn_strictMono_of_wellFoundedLT
212+
213+
@[to_dual]
214+
theorem Set.range_injOn_strictAnti_of_wellFoundedGT [WellFoundedGT β] :
212215
Set.InjOn Set.range { f : β → γ | StrictAnti f } :=
213-
fun _ hf _ hg ↦ Set.range_injOn_strictMono (β := βᵒᵈ) hf.dual hg.dual
216+
fun _ hf _ hg ↦ Set.range_injOn_strictMono_of_wellFoundedLT (β := βᵒᵈ) hf.dual hg.dual
217+
218+
@[deprecated (since := "2026-05-15")]
219+
alias Set.range_injOn_strictAnti := Set.range_injOn_strictAnti_of_wellFoundedGT
214220

215-
@[to_dual range_inj_of_wellFoundedGT]
216-
theorem StrictMono.range_inj [WellFoundedLT β] {f g : β → γ}
221+
@[to_dual]
222+
theorem StrictMono.range_inj_of_wellFoundedLT [WellFoundedLT β] {f g : β → γ}
217223
(hf : StrictMono f) (hg : StrictMono g) : Set.range f = Set.range g ↔ f = g :=
218-
Set.range_injOn_strictMono.eq_iff hf hg
224+
Set.range_injOn_strictMono_of_wellFoundedLT.eq_iff hf hg
225+
226+
@[deprecated (since := "2026-05-15")]
227+
alias StrictMono.range_inj := StrictMono.range_inj_of_wellFoundedLT
219228

220-
@[to_dual range_inj_of_wellFoundedLT]
221-
theorem StrictAnti.range_inj [WellFoundedGT β] {f g : β → γ}
229+
@[to_dual]
230+
theorem StrictAnti.range_inj_of_wellFoundedGT [WellFoundedGT β] {f g : β → γ}
222231
(hf : StrictAnti f) (hg : StrictAnti g) : Set.range f = Set.range g ↔ f = g :=
223-
Set.range_injOn_strictAnti.eq_iff hf hg
232+
Set.range_injOn_strictAnti_of_wellFoundedGT.eq_iff hf hg
233+
234+
@[deprecated (since := "2026-05-15")]
235+
alias StrictAnti.range_inj := StrictAnti.range_inj_of_wellFoundedGT
224236

225237
/-- A strictly monotone function `f` on a well-order satisfies `x ≤ f x` for all `x`. -/
226238
@[to_dual le_id

Mathlib/SetTheory/Ordinal/Enum.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ theorem eq_enumOrd (f : Ordinal → Ordinal) (hs : ¬ BddAbove s) :
123123
· rintro rfl
124124
exact ⟨enumOrd_strictMono hs, range_enumOrd hs⟩
125125
· rintro ⟨h₁, h₂⟩
126-
rwa [← (enumOrd_strictMono hs).range_inj h₁, range_enumOrd hs, eq_comm]
126+
rwa [← (enumOrd_strictMono hs).range_inj_of_wellFoundedLT h₁, range_enumOrd hs, eq_comm]
127127

128128
theorem enumOrd_range {f : Ordinal → Ordinal} (hf : StrictMono f) : enumOrd (range f) = f :=
129129
(eq_enumOrd _ hf.not_bddAbove_range_of_wellFoundedLT).2 ⟨hf, rfl⟩

0 commit comments

Comments
 (0)