Skip to content

Commit 39fb3be

Browse files
Act on reviews
1 parent 6cc5bd3 commit 39fb3be

File tree

10 files changed

+89
-68
lines changed

10 files changed

+89
-68
lines changed

src/Init/Core.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,9 +2543,9 @@ class Irrefl (r : α → α → Prop) : Prop where
25432543
/-- An irreflexive relation satisfies `¬ r a a`. -/
25442544
irrefl : ∀ a, ¬r a a
25452545

2546-
/-- `Tricho r` says that `r` is trichotomous, that is, `¬ r a b → ¬ r b a → a = b`. -/
2547-
class Tricho (r : α → α → Prop) : Prop where
2546+
/-- `Trichotomous r` says that `r` is trichotomous, that is, `¬ r a b → ¬ r b a → a = b`. -/
2547+
class Trichotomous (r : α → α → Prop) : Prop where
25482548
/-- An trichotomous relation `r` satisfies `¬ r a b → ¬ r b a → a = b`. -/
2549-
tricho (a b : α) : ¬ r a b → ¬ r b a → a = b
2549+
trichotomous (a b : α) : ¬ r a b → ¬ r b a → a = b
25502550

25512551
end Std

src/Init/Data/Array/Lex/Lemmas.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ protected theorem lt_of_le_of_lt [LE α] [LT α] [LawfulOrderLT α] [IsLinearOrd
140140
@[deprecated Array.lt_of_le_of_lt (since := "2025-08-01")]
141141
protected theorem lt_of_le_of_lt' [LT α]
142142
[i₁ : Std.Asymm (· < · : α → α → Prop)]
143-
[i₂ : Std.Tricho (· < · : α → α → Prop)]
143+
[i₂ : Std.Trichotomous (· < · : α → α → Prop)]
144144
[i₃ : Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
145145
{xs ys zs : Array α} (h₁ : xs ≤ ys) (h₂ : ys < zs) : xs < zs :=
146146
letI := LE.ofLT α
@@ -154,7 +154,7 @@ protected theorem le_trans [LE α] [LT α] [LawfulOrderLT α] [IsLinearOrder α]
154154
@[deprecated Array.le_trans (since := "2025-08-01")]
155155
protected theorem le_trans' [LT α]
156156
[i₁ : Std.Asymm (· < · : α → α → Prop)]
157-
[i₂ : Std.Tricho (· < · : α → α → Prop)]
157+
[i₂ : Std.Trichotomous (· < · : α → α → Prop)]
158158
[i₃ : Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
159159
{xs ys zs : Array α} (h₁ : xs ≤ ys) (h₂ : ys ≤ zs) : xs ≤ zs :=
160160
letI := LE.ofLT α
@@ -191,7 +191,7 @@ protected theorem le_of_lt [LT α]
191191

192192
protected theorem le_iff_lt_or_eq [LT α]
193193
[Std.Irrefl (· < · : α → α → Prop)]
194-
[Std.Tricho (· < · : α → α → Prop)]
194+
[Std.Trichotomous (· < · : α → α → Prop)]
195195
[Std.Asymm (· < · : α → α → Prop)]
196196
{xs ys : Array α} : xs ≤ ys ↔ xs < ys ∨ xs = ys := by
197197
simpa using List.le_iff_lt_or_eq (l₁ := xs.toList) (l₂ := ys.toList)
@@ -280,7 +280,7 @@ protected theorem lt_iff_exists [LT α] {xs ys : Array α} :
280280

281281
protected theorem le_iff_exists [LT α]
282282
[Std.Asymm (· < · : α → α → Prop)]
283-
[Std.Tricho (· < · : α → α → Prop)] {xs ys : Array α} :
283+
[Std.Trichotomous (· < · : α → α → Prop)] {xs ys : Array α} :
284284
xs ≤ ys ↔
285285
(xs = ys.take xs.size) ∨
286286
(∃ (i : Nat) (h₁ : i < xs.size) (h₂ : i < ys.size),
@@ -299,7 +299,7 @@ theorem append_left_lt [LT α] {xs ys zs : Array α} (h : ys < zs) :
299299

300300
theorem append_left_le [LT α]
301301
[Std.Asymm (· < · : α → α → Prop)]
302-
[Std.Tricho (· < · : α → α → Prop)]
302+
[Std.Trichotomous (· < · : α → α → Prop)]
303303
{xs ys zs : Array α} (h : ys ≤ zs) :
304304
xs ++ ys ≤ xs ++ zs := by
305305
cases xs
@@ -322,9 +322,9 @@ protected theorem map_lt [LT α] [LT β]
322322

323323
protected theorem map_le [LT α] [LT β]
324324
[Std.Asymm (· < · : α → α → Prop)]
325-
[Std.Tricho (· < · : α → α → Prop)]
325+
[Std.Trichotomous (· < · : α → α → Prop)]
326326
[Std.Asymm (· < · : β → β → Prop)]
327-
[Std.Tricho (· < · : β → β → Prop)]
327+
[Std.Trichotomous (· < · : β → β → Prop)]
328328
{xs ys : Array α} {f : α → β} (w : ∀ x y, x < y → f x < f y) (h : xs ≤ ys) :
329329
map f xs ≤ map f ys := by
330330
cases xs

src/Init/Data/Char/Lemmas.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ instance leAntisymm : Std.Antisymm (· ≤ · : Char → Char → Prop) where
5151
antisymm _ _ := Char.le_antisymm
5252

5353
-- This instance is useful while setting up instances for `String`.
54-
def ltTricho : Std.Tricho (· < · : Char → Char → Prop) where
55-
tricho _ _ h₁ h₂ := Char.le_antisymm (by simpa using h₂) (by simpa using h₁)
54+
instance ltTrichotomous : Std.Trichotomous (· < · : Char → Char → Prop) where
55+
trichotomous _ _ h₁ h₂ := Char.le_antisymm (by simpa using h₂) (by simpa using h₁)
56+
57+
@[deprecated ltTrichotomous (since := "2025-10-27")]
58+
def notLtAntisymm : Std.Antisymm (¬ · < · : Char → Char → Prop) where
59+
antisymm := Char.ltTrichotomous.trichotomous
5660

5761
instance ltAsymm : Std.Asymm (· < · : Char → Char → Prop) where
5862
asymm _ _ := Char.lt_asymm

src/Init/Data/List/BasicAux.lean

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ theorem sizeOf_get [SizeOf α] (as : List α) (i : Fin as.length) : sizeOf (as.g
272272
apply Nat.lt_trans ih
273273
simp +arith
274274

275-
theorem lex_tricho [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
276-
(tricho : ∀ x y : α, ¬ r x y → ¬ r y x → x = y)
275+
theorem lex_trichotomous [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
276+
(trichotomous : ∀ x y : α, ¬ r x y → ¬ r y x → x = y)
277277
{as bs : List α} (h₁ : ¬ Lex r bs as) (h₂ : ¬ Lex r as bs) : as = bs :=
278278
match as, bs with
279279
| [], [] => rfl
@@ -286,20 +286,26 @@ theorem lex_tricho [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
286286
· subst eq
287287
have h₁ : ¬ Lex r bs as := fun h => h₁ (List.Lex.cons h)
288288
have h₂ : ¬ Lex r as bs := fun h => h₂ (List.Lex.cons h)
289-
simp [lex_tricho tricho h₁ h₂]
289+
simp [lex_trichotomous trichotomous h₁ h₂]
290290
· exfalso
291291
by_cases hba : r b a
292292
· exact h₁ (Lex.rel hba)
293-
· exact eq (tricho _ _ hab hba)
293+
· exact eq (trichotomous _ _ hab hba)
294+
295+
@[deprecated lex_trichotomous (since := "2025-10-27")]
296+
theorem lex_antisymm [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
297+
(antisymm : ∀ x y : α, ¬ r x y → ¬ r y x → x = y)
298+
{as bs : List α} (h₁ : ¬ Lex r bs as) (h₂ : ¬ Lex r as bs) : as = bs :=
299+
lex_trichotomous antisymm h₁ h₂
294300

295301
protected theorem le_antisymm [LT α]
296-
[i : Std.Tricho (· < · : α → α → Prop)]
302+
[i : Std.Trichotomous (· < · : α → α → Prop)]
297303
{as bs : List α} (h₁ : as ≤ bs) (h₂ : bs ≤ as) : as = bs :=
298304
open Classical in
299-
lex_tricho i.tricho h₁ h₂
305+
lex_trichotomous i.trichotomous h₁ h₂
300306

301307
instance [LT α]
302-
[s : Std.Tricho (· < · : α → α → Prop)] :
308+
[s : Std.Trichotomous (· < · : α → α → Prop)] :
303309
Std.Antisymm (· ≤ · : List α → List α → Prop) where
304310
antisymm _ _ h₁ h₂ := List.le_antisymm h₁ h₂
305311

src/Init/Data/List/Lex.lean

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ theorem not_cons_lex_cons_iff [DecidableEq α] [DecidableRel r] {a b} {l₁ l₂
8787

8888
theorem cons_le_cons_iff [LT α]
8989
[i₁ : Std.Asymm (· < · : α → α → Prop)]
90-
[i₂ : Std.Tricho (· < · : α → α → Prop)]
90+
[i₂ : Std.Trichotomous (· < · : α → α → Prop)]
9191
{a b} {l₁ l₂ : List α} :
9292
(a :: l₁) ≤ (b :: l₂) ↔ a < b ∨ a = b ∧ l₁ ≤ l₂ := by
9393
dsimp only [instLE, instLT, List.le, List.lt]
@@ -99,12 +99,12 @@ theorem cons_le_cons_iff [LT α]
9999
apply Decidable.byContradiction
100100
intro h₃
101101
apply h₂
102-
exact i₂.tricho _ _ h₁ h₃
102+
exact i₂.trichotomous _ _ h₁ h₃
103103
· if h₃ : a < b then
104104
exact .inl h₃
105105
else
106106
right
107-
exact ⟨i₂.tricho _ _ h₃ h₁, h₂⟩
107+
exact ⟨i₂.trichotomous _ _ h₃ h₁, h₂⟩
108108
· rintro (h | ⟨h₁, h₂⟩)
109109
· left
110110
exact ⟨i₁.asymm _ _ h, fun w => Irrefl.irrefl _ (w ▸ h)⟩
@@ -113,7 +113,7 @@ theorem cons_le_cons_iff [LT α]
113113

114114
theorem not_lt_of_cons_le_cons [LT α]
115115
[i₁ : Std.Asymm (· < · : α → α → Prop)]
116-
[i₂ : Std.Tricho (· < · : α → α → Prop)]
116+
[i₂ : Std.Trichotomous (· < · : α → α → Prop)]
117117
{a b : α} {l₁ l₂ : List α} (h : a :: l₁ ≤ b :: l₂) : ¬ b < a := by
118118
rw [cons_le_cons_iff] at h
119119
rcases h with h | ⟨rfl, h⟩
@@ -127,7 +127,7 @@ theorem left_le_left_of_cons_le_cons [LT α] [LE α] [IsLinearOrder α]
127127
theorem le_of_cons_le_cons [LT α]
128128
[i₀ : Std.Irrefl (· < · : α → α → Prop)]
129129
[i₁ : Std.Asymm (· < · : α → α → Prop)]
130-
[i₂ : Std.Tricho (· < · : α → α → Prop)]
130+
[i₂ : Std.Trichotomous (· < · : α → α → Prop)]
131131
{a} {l₁ l₂ : List α} (h : a :: l₁ ≤ a :: l₂) : l₁ ≤ l₂ := by
132132
rw [cons_le_cons_iff] at h
133133
rcases h with h | ⟨_, h⟩
@@ -201,7 +201,7 @@ protected theorem lt_of_le_of_lt [LT α] [LE α] [IsLinearOrder α] [LawfulOrder
201201
@[deprecated List.lt_of_le_of_lt (since := "2025-08-01")]
202202
protected theorem lt_of_le_of_lt' [LT α]
203203
[Std.Asymm (· < · : α → α → Prop)]
204-
[Std.Tricho (· < · : α → α → Prop)]
204+
[Std.Trichotomous (· < · : α → α → Prop)]
205205
[Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
206206
{l₁ l₂ l₃ : List α} (h₁ : l₁ ≤ l₂) (h₂ : l₂ < l₃) : l₁ < l₃ :=
207207
letI : LE α := .ofLT α
@@ -215,7 +215,7 @@ protected theorem le_trans [LT α] [LE α] [IsLinearOrder α] [LawfulOrderLT α]
215215
@[deprecated List.le_trans (since := "2025-08-01")]
216216
protected theorem le_trans' [LT α]
217217
[Std.Asymm (· < · : α → α → Prop)]
218-
[Std.Tricho (· < · : α → α → Prop)]
218+
[Std.Trichotomous (· < · : α → α → Prop)]
219219
[Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
220220
{l₁ l₂ l₃ : List α} (h₁ : l₁ ≤ l₂) (h₂ : l₂ ≤ l₃) : l₁ ≤ l₃ :=
221221
letI := LE.ofLT α
@@ -293,7 +293,7 @@ protected theorem le_of_lt [LT α]
293293

294294
protected theorem le_iff_lt_or_eq [LT α]
295295
[Std.Irrefl (· < · : α → α → Prop)]
296-
[Std.Tricho (· < · : α → α → Prop)]
296+
[Std.Trichotomous (· < · : α → α → Prop)]
297297
[Std.Asymm (· < · : α → α → Prop)]
298298
{l₁ l₂ : List α} : l₁ ≤ l₂ ↔ l₁ < l₂ ∨ l₁ = l₂ := by
299299
constructor
@@ -479,7 +479,7 @@ protected theorem lt_iff_exists [LT α] {l₁ l₂ : List α} :
479479

480480
protected theorem le_iff_exists [LT α]
481481
[Std.Asymm (· < · : α → α → Prop)]
482-
[Std.Tricho (· < · : α → α → Prop)] {l₁ l₂ : List α} :
482+
[Std.Trichotomous (· < · : α → α → Prop)] {l₁ l₂ : List α} :
483483
l₁ ≤ l₂ ↔
484484
(l₁ = l₂.take l₁.length) ∨
485485
(∃ (i : Nat) (h₁ : i < l₁.length) (h₂ : i < l₂.length),
@@ -492,7 +492,7 @@ protected theorem le_iff_exists [LT α]
492492
conv => lhs; simp +singlePass [exists_comm]
493493
· simpa using Std.Irrefl.irrefl
494494
· simpa using Std.Asymm.asymm
495-
· simpa using Std.Tricho.tricho
495+
· simpa using Std.Trichotomous.trichotomous
496496

497497
theorem append_left_lt [LT α] {l₁ l₂ l₃ : List α} (h : l₂ < l₃) :
498498
l₁ ++ l₂ < l₁ ++ l₃ := by
@@ -502,7 +502,7 @@ theorem append_left_lt [LT α] {l₁ l₂ l₃ : List α} (h : l₂ < l₃) :
502502

503503
theorem append_left_le [LT α]
504504
[Std.Asymm (· < · : α → α → Prop)]
505-
[Std.Tricho (· < · : α → α → Prop)]
505+
[Std.Trichotomous (· < · : α → α → Prop)]
506506
{l₁ l₂ l₃ : List α} (h : l₂ ≤ l₃) :
507507
l₁ ++ l₂ ≤ l₁ ++ l₃ := by
508508
induction l₁ with
@@ -535,9 +535,9 @@ protected theorem map_lt [LT α] [LT β]
535535

536536
protected theorem map_le [LT α] [LT β]
537537
[Std.Asymm (· < · : α → α → Prop)]
538-
[Std.Tricho (· < · : α → α → Prop)]
538+
[Std.Trichotomous (· < · : α → α → Prop)]
539539
[Std.Asymm (· < · : β → β → Prop)]
540-
[Std.Tricho (· < · : β → β → Prop)]
540+
[Std.Trichotomous (· < · : β → β → Prop)]
541541
{l₁ l₂ : List α} {f : α → β} (w : ∀ x y, x < y → f x < f y) (h : l₁ ≤ l₂) :
542542
map f l₁ ≤ map f l₂ := by
543543
rw [List.le_iff_exists] at h ⊢

src/Init/Data/Nat/Basic.lean

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,13 @@ protected theorem eq_iff_le_and_ge : ∀{a b : Nat}, a = b ↔ a ≤ b ∧ b ≤
468468
instance : Std.Antisymm ( . ≤ . : Nat → Nat → Prop) where
469469
antisymm _ _ h₁ h₂ := Nat.le_antisymm h₁ h₂
470470

471-
instance : Std.Tricho (. < . : Nat → Nat → Prop) where
472-
tricho _ _ h₁ h₂ := Nat.le_antisymm (Nat.ge_of_not_lt h₂) (Nat.ge_of_not_lt h₁)
471+
instance : Std.Trichotomous (. < . : Nat → Nat → Prop) where
472+
trichotomous _ _ h₁ h₂ := Nat.le_antisymm (Nat.ge_of_not_lt h₂) (Nat.ge_of_not_lt h₁)
473+
474+
set_option linter.missingDocs false in
475+
@[deprecated Nat.instTrichotomousLt (since := "2025-10-27")]
476+
def Nat.instAntisymmNotLt : Std.Antisymm (¬ . < . : Nat → Nat → Prop) where
477+
antisymm := Nat.instTrichotomousLt.trichotomous
473478

474479
protected theorem add_le_add_left {n m : Nat} (h : n ≤ m) (k : Nat) : k + n ≤ k + m :=
475480
match le.dest h with

src/Init/Data/Order/Factories.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ If an `LT α` instance is asymmetric and its negation is transitive and antisymm
234234
public theorem IsLinearOrder.of_lt {α : Type u} [LT α]
235235
(lt_asymm : Asymm (α := α) (· < ·) := by exact inferInstance)
236236
(not_lt_trans : Trans (α := α) (¬ · < ·) (¬ · < ·) (¬ · < ·) := by exact inferInstance)
237-
(lt_tricho : Tricho (α := α) (· < ·) := by exact inferInstance) :
237+
(lt_trichotomous : Trichotomous (α := α) (· < ·) := by exact inferInstance) :
238238
haveI := LE.ofLT α
239239
IsLinearOrder α :=
240240
letI := LE.ofLT α
241241
haveI : IsLinearPreorder α := .of_lt
242242
{ le_antisymm := by
243-
simpa [LE.ofLT] using fun a b hab hba => lt_tricho.tricho a b hba hab }
243+
simpa [LE.ofLT] using fun a b hab hba => lt_trichotomous.trichotomous a b hba hab }
244244

245245
/--
246246
This lemma characterizes in terms of `LT α` when a `Min α` instance

src/Init/Data/Order/Lemmas.lean

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,41 @@ public instance (r : α → α → Prop) [Total r] : Refl r where
2828
public instance (r : α → α → Prop) [Asymm r] : Antisymm r where
2929
antisymm a b h h' := (Asymm.asymm a b h h').elim
3030

31-
public instance (r : α → α → Prop) [Total r] : Tricho r where
32-
tricho a b h h' := by simpa [h, h'] using Total.total (r := r) a b
31+
public instance (r : α → α → Prop) [Total r] : Trichotomous r where
32+
trichotomous a b h h' := by simpa [h, h'] using Total.total (r := r) a b
3333

34-
public theorem Tricho.rel_or_eq_or_swap {r : α → α → Prop} [Tricho r] {a b} :
35-
r a b ∨ a = b ∨ r b a := by
36-
cases Classical.em (r a b) with | inl hab | inr hab
37-
· exact Or.inl hab
38-
· cases Classical.em (r b a) with | inl hba | inr hba
39-
· exact Or.inr (Or.inr hba)
40-
· exact Or.inr (Or.inl (Tricho.tricho _ _ hab hba))
34+
public theorem Trichotomous.rel_or_eq_or_rel_swap {r : α → α → Prop} [Trichotomous r] {a b} :
35+
r a b ∨ a = b ∨ r b a := match Classical.em (r a b) with
36+
| .inl hab => .inl hab | .inr hab => match Classical.em (r b a) with
37+
| .inl hba => .inr <| .inr hba
38+
| .inr hba => .inr <| .inl <| Trichotomous.trichotomous _ _ hab hba
4139

42-
public theorem tricho_of_rel_or_eq_or_swap {r : α → α → Prop}
43-
(h : ∀ {a b}, r a b ∨ a = b ∨ r b a) : Tricho r where
44-
tricho _ _ hab hba := (h.resolve_left hab).resolve_right hba
40+
public theorem trichotomous_of_rel_or_eq_or_rel_swap {r : α → α → Prop}
41+
(h : ∀ {a b}, r a b ∨ a = b ∨ r b a) : Trichotomous r where
42+
trichotomous _ _ hab hba := (h.resolve_left hab).resolve_right hba
43+
44+
public theorem Antisymm.trichotomous_of_antisymm_not {r : α → α → Prop} [i : Antisymm (¬ r · ·)] :
45+
Trichotomous r where trichotomous := i.antisymm
46+
47+
public theorem Trichotomous.antisymm_not {r : α → α → Prop} [i : Trichotomous r] :
48+
Antisymm (¬ r · ·) where antisymm := i.trichotomous
4549

4650
public theorem Total.of_not_swap {r : α → α → Prop} [Total r] {a b} (h : ¬ r a b) : r b a :=
4751
(Total.total a b).elim (fun h' => (h h').elim) (·)
4852

49-
public def total_of_of_not_swap {r : α → α → Prop} (h : ∀ {a b}, ¬ r a b → r b a) : Total r where
53+
public theorem total_of_not_rel_swap_imp_rel {r : α → α → Prop} (h : ∀ {a b}, ¬ r a b → r b a) :
54+
Total r where
5055
total a b := Classical.byCases (p := r a b) Or.inl (fun hab => Or.inr (h hab))
5156

52-
public def total_of_refl_of_tricho (r : α → α → Prop) [Refl r] [Tricho r] : Total r where
53-
total a b := (Tricho.rel_or_eq_or_swap (a := a) (b := b) (r := r)).elim Or.inl <|
57+
public theorem total_of_refl_of_trichotomous (r : α → α → Prop) [Refl r] [Trichotomous r] :
58+
Total r where
59+
total a b := (Trichotomous.rel_or_eq_or_rel_swap (a := a) (b := b) (r := r)).elim Or.inl <|
5460
fun h => h.elim (fun h => h ▸ Or.inl (Refl.refl _)) Or.inr
5561

56-
public def asymm_of_irrefl_of_antisymm (r : α → α → Prop) [Irrefl r] [Antisymm r] : Asymm r where
62+
public theorem asymm_of_irrefl_of_antisymm (r : α → α → Prop) [Irrefl r] [Antisymm r] : Asymm r where
5763
asymm a b h h' := Irrefl.irrefl _ (Antisymm.antisymm a b h h' ▸ h)
5864

59-
public def Total.asymm_of_total_not {r : α → α → Prop} [i : Total (¬ r · ·)] : Asymm r where
65+
public theorem Total.asymm_of_total_not {r : α → α → Prop} [i : Total (¬ r · ·)] : Asymm r where
6066
asymm a b h := by cases i.total a b <;> trivial
6167

6268
public theorem Asymm.total_not {r : α → α → Prop} [i : Asymm r] : Total (¬ r · ·) where
@@ -130,8 +136,8 @@ public theorem not_lt_of_ge {α : Type u} [LT α] [LE α] [LawfulOrderLT α] {a
130136
(h : a ≤ b) : ¬ b < a := imp_not_comm.1 not_le_of_gt h
131137

132138
public instance {α : Type u} {_ : LE α} [LT α] [LawfulOrderLT α]
133-
[Tricho (α := α) (· < ·)] : Antisymm (α := α) (· ≤ ·) where
134-
antisymm _ _ hab hba := Tricho.tricho _ _ (not_lt_of_ge hba) (not_lt_of_ge hab)
139+
[Trichotomous (α := α) (· < ·)] : Antisymm (α := α) (· ≤ ·) where
140+
antisymm _ _ hab hba := Trichotomous.trichotomous _ _ (not_lt_of_ge hba) (not_lt_of_ge hab)
135141

136142
public theorem not_gt_of_lt {α : Type u} [LT α] [i : Std.Asymm (α := α) (· < ·)] {a b : α}
137143
(h : a < b) : ¬ b < a :=
@@ -151,8 +157,8 @@ public instance {α : Type u} [LT α] [LE α] [LawfulOrderLT α] :
151157
intro h h'
152158
exact h.2.elim h'.1
153159

154-
@[deprecated Asymm.total_not (since := "2025-10-24")]
155-
public def instIrreflLtOfIsPreorderOfLawfulOrderLT {α : Type u} [LT α] [LE α] [IsPreorder α]
160+
@[deprecated instIrreflOfAsymm (since := "2025-10-24")]
161+
public theorem instIrreflLtOfIsPreorderOfLawfulOrderLT {α : Type u} [LT α] [LE α]
156162
[LawfulOrderLT α] : Std.Irrefl (α := α) (· < ·) := inferInstance
157163

158164
public instance {α : Type u} [LT α] [LE α] [Trans (α := α) (· ≤ ·) (· ≤ ·) (· ≤ ·) ]
@@ -175,8 +181,8 @@ public theorem not_le {α : Type u} [LT α] [LE α] [Std.Total (α := α) (·
175181
exact le_of_not_ge
176182

177183
public instance {α : Type u} {_ : LT α} [LE α] [LawfulOrderLT α]
178-
[Total (α := α) (· ≤ ·)] [Antisymm (α := α) (· ≤ ·)] : Tricho (α := α) (· < ·) where
179-
tricho a b hab hba := by
184+
[Total (α := α) (· ≤ ·)] [Antisymm (α := α) (· ≤ ·)] : Trichotomous (α := α) (· < ·) where
185+
trichotomous a b hab hba := by
180186
simp only [not_lt] at hab hba
181187
exact Antisymm.antisymm (r := (· ≤ ·)) a b hba hab
182188

@@ -188,7 +194,7 @@ public instance {α : Type u} {_ : LT α} [LE α] [LawfulOrderLT α]
188194
exact le_trans hbc hab
189195

190196
@[deprecated Asymm.total_not (since := "2025-10-24")]
191-
public def instTotalNotLtOfLawfulOrderLTOfLe {α : Type u} {_ : LT α} [LE α] [LawfulOrderLT α]
197+
public theorem instTotalNotLtOfLawfulOrderLTOfLe {α : Type u} {_ : LT α} [LE α] [LawfulOrderLT α]
192198
: Total (α := α) (¬ · < ·) := Asymm.total_not
193199

194200
public theorem lt_of_le_of_lt {α : Type u} [LE α] [LT α]

src/Init/Data/String/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected theorem ne_of_data_ne {a b : String} (h : a.data ≠ b.data) : a ≠ b
2828
@[simp] protected theorem le_refl (a : String) : a ≤ a := List.le_refl _
2929
@[simp] protected theorem lt_irrefl (a : String) : ¬ a < a := List.lt_irrefl _
3030

31-
attribute [local instance] Char.notLTTrans Char.ltTricho Char.ltAsymm
31+
attribute [local instance] Char.notLTTrans Char.ltTrichotomous Char.ltAsymm
3232

3333
protected theorem le_trans {a b c : String} : a ≤ b → b ≤ c → a ≤ c := List.le_trans
3434
protected theorem lt_trans {a b c : String} : a < b → b < c → a < c := List.lt_trans

0 commit comments

Comments
 (0)