Skip to content

Commit 6cc5bd3

Browse files
Fix build issues
1 parent 95a8032 commit 6cc5bd3

File tree

8 files changed

+41
-41
lines changed

8 files changed

+41
-41
lines changed

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.Antisymm (¬ · < · : α → α → Prop)]
143+
[i₂ : Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
157+
[i₂ : Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
194+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)] {xs ys : Array α} :
283+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
302+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
325+
[Std.Tricho (· < · : α → α → Prop)]
326326
[Std.Asymm (· < · : β → β → Prop)]
327-
[Std.Antisymm (¬ · < · : β → β → Prop)]
327+
[Std.Tricho (· < · : β → β → 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ 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 notLTAntisymm : Std.Antisymm (¬ · < · : Char → Char → Prop) where
55-
antisymm _ _ h₁ h₂ := Char.le_antisymm (by simpa using h₂) (by simpa using h₁)
54+
def ltTricho : Std.Tricho (· < · : Char → Char → Prop) where
55+
tricho _ _ h₁ h₂ := Char.le_antisymm (by simpa using h₂) (by simpa using h₁)
5656

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

src/Init/Data/List/BasicAux.lean

Lines changed: 7 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 not_lex_antisymm [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
276-
(antisymm : ∀ x y : α, ¬ r x y → ¬ r y x → x = y)
275+
theorem lex_tricho [DecidableEq α] {r : α → α → Prop} [DecidableRel r]
276+
(tricho : ∀ 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,20 @@ theorem not_lex_antisymm [DecidableEq α] {r : α → α → Prop} [DecidableRel
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 [not_lex_antisymm antisymm h₁ h₂]
289+
simp [lex_tricho tricho h₁ h₂]
290290
· exfalso
291291
by_cases hba : r b a
292292
· exact h₁ (Lex.rel hba)
293-
· exact eq (antisymm _ _ hab hba)
293+
· exact eq (tricho _ _ hab hba)
294294

295295
protected theorem le_antisymm [LT α]
296-
[i : Std.Antisymm (¬ · < · : α → α → Prop)]
296+
[i : Std.Tricho (· < · : α → α → Prop)]
297297
{as bs : List α} (h₁ : as ≤ bs) (h₂ : bs ≤ as) : as = bs :=
298298
open Classical in
299-
not_lex_antisymm i.antisymm h₁ h₂
299+
lex_tricho i.tricho h₁ h₂
300300

301301
instance [LT α]
302-
[s : Std.Antisymm (¬ · < · : α → α → Prop)] :
302+
[s : Std.Tricho (· < · : α → α → Prop)] :
303303
Std.Antisymm (· ≤ · : List α → List α → Prop) where
304304
antisymm _ _ h₁ h₂ := List.le_antisymm h₁ h₂
305305

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.Antisymm (¬ · < · : α → α → Prop)]
90+
[i₂ : Std.Tricho (· < · : α → α → 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₂.antisymm _ _ h₁ h₃
102+
exact i₂.tricho _ _ h₁ h₃
103103
· if h₃ : a < b then
104104
exact .inl h₃
105105
else
106106
right
107-
exact ⟨i₂.antisymm _ _ h₃ h₁, h₂⟩
107+
exact ⟨i₂.tricho _ _ 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.Antisymm (¬ · < · : α → α → Prop)]
116+
[i₂ : Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
130+
[i₂ : Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
204+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
218+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
296+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)] {l₁ l₂ : List α} :
482+
[Std.Tricho (· < · : α → α → 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.Antisymm.antisymm
495+
· simpa using Std.Tricho.tricho
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.Antisymm (¬ · < · : α → α → Prop)]
505+
[Std.Tricho (· < · : α → α → 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.Antisymm (¬ · < · : α → α → Prop)]
538+
[Std.Tricho (· < · : α → α → Prop)]
539539
[Std.Asymm (· < · : β → β → Prop)]
540-
[Std.Antisymm (¬ · < · : β → β → Prop)]
540+
[Std.Tricho (· < · : β → β → 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ 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.Antisymm (¬ . < . : Nat → Nat → Prop) where
472-
antisymm _ _ h₁ h₂ := Nat.le_antisymm (Nat.ge_of_not_lt h₂) (Nat.ge_of_not_lt h₁)
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₁)
473473

474474
protected theorem add_le_add_left {n m : Nat} (h : n ≤ m) (k : Nat) : k + n ≤ k + m :=
475475
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-
(not_lt_antisymm : Antisymm (α := α) (¬ · < ·) := by exact inferInstance) :
237+
(lt_tricho : Tricho (α := α) (· < ·) := 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 => not_lt_antisymm.antisymm a b hba hab }
243+
simpa [LE.ofLT] using fun a b hab hba => lt_tricho.tricho a b hba hab }
244244

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

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.notLTAntisymm Char.notLTTotal
31+
attribute [local instance] Char.notLTTrans Char.ltTricho 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

src/Init/Data/Vector/Lex.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected theorem lt_of_le_of_lt [LT α] [LE α] [LawfulOrderLT α] [IsLinearOrd
104104
@[deprecated Vector.lt_of_le_of_lt (since := "2025-08-01")]
105105
protected theorem lt_of_le_of_lt' [LT α]
106106
[Std.Asymm (· < · : α → α → Prop)]
107-
[Std.Antisymm (¬ · < · : α → α → Prop)]
107+
[Std.Tricho (· < · : α → α → Prop)]
108108
[Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
109109
{xs ys zs : Vector α n} (h₁ : xs ≤ ys) (h₂ : ys < zs) : xs < zs :=
110110
letI := LE.ofLT α
@@ -118,7 +118,7 @@ protected theorem le_trans [LT α] [LE α] [LawfulOrderLT α] [IsLinearOrder α]
118118
@[deprecated Vector.le_trans (since := "2025-08-01")]
119119
protected theorem le_trans' [LT α]
120120
[Std.Asymm (· < · : α → α → Prop)]
121-
[Std.Antisymm (¬ · < · : α → α → Prop)]
121+
[Std.Tricho (· < · : α → α → Prop)]
122122
[Trans (¬ · < · : α → α → Prop) (¬ · < ·) (¬ · < ·)]
123123
{xs ys zs : Vector α n} (h₁ : xs ≤ ys) (h₂ : ys ≤ zs) : xs ≤ zs :=
124124
letI := LE.ofLT α
@@ -175,7 +175,7 @@ protected theorem le_of_lt [LT α]
175175

176176
protected theorem le_iff_lt_or_eq [LT α]
177177
[Std.Asymm (· < · : α → α → Prop)]
178-
[Std.Antisymm (¬ · < · : α → α → Prop)]
178+
[Std.Tricho (· < · : α → α → Prop)]
179179
{xs ys : Vector α n} : xs ≤ ys ↔ xs < ys ∨ xs = ys := by
180180
simpa using Array.le_iff_lt_or_eq (xs := xs.toArray) (ys := ys.toArray)
181181

@@ -246,7 +246,7 @@ protected theorem lt_iff_exists [LT α] {xs ys : Vector α n} :
246246

247247
protected theorem le_iff_exists [LT α]
248248
[Std.Asymm (· < · : α → α → Prop)]
249-
[Std.Antisymm (¬ · < · : α → α → Prop)] {xs ys : Vector α n} :
249+
[Std.Tricho (· < · : α → α → Prop)] {xs ys : Vector α n} :
250250
xs ≤ ys ↔
251251
(xs = ys) ∨
252252
(∃ (i : Nat) (h : i < n), (∀ j, (hj : j < i) → xs[j] = ys[j]) ∧ xs[i] < ys[i]) := by
@@ -260,7 +260,7 @@ theorem append_left_lt [LT α] {xs : Vector α n} {ys ys' : Vector α m} (h : ys
260260

261261
theorem append_left_le [LT α]
262262
[Std.Asymm (· < · : α → α → Prop)]
263-
[Std.Antisymm (¬ · < · : α → α → Prop)]
263+
[Std.Tricho (· < · : α → α → Prop)]
264264
{xs : Vector α n} {ys ys' : Vector α m} (h : ys ≤ ys') :
265265
xs ++ ys ≤ xs ++ ys' := by
266266
simpa using Array.append_left_le h
@@ -272,9 +272,9 @@ protected theorem map_lt [LT α] [LT β]
272272

273273
protected theorem map_le [LT α] [LT β]
274274
[Std.Asymm (· < · : α → α → Prop)]
275-
[Std.Antisymm (¬ · < · : α → α → Prop)]
275+
[Std.Tricho (· < · : α → α → Prop)]
276276
[Std.Asymm (· < · : β → β → Prop)]
277-
[Std.Antisymm (¬ · < · : β → β → Prop)]
277+
[Std.Tricho (· < · : β → β → Prop)]
278278
{xs ys : Vector α n} {f : α → β} (w : ∀ x y, x < y → f x < f y) (h : xs ≤ ys) :
279279
map f xs ≤ map f ys := by
280280
simpa using Array.map_le w h

0 commit comments

Comments
 (0)