@@ -490,24 +490,16 @@ theorem coe_max [LinearOrder α] (x y : α) : ((max x y : α) : WithBot α) = ma
490
490
rfl
491
491
#align with_bot.coe_max WithBot.coe_max
492
492
493
- theorem wellFounded_lt [Preorder α] (h : @WellFounded α (· < ·)) :
493
+ theorem wellFounded_lt [LT α] (h : @WellFounded α (· < ·)) :
494
494
@WellFounded (WithBot α) (· < ·) :=
495
- have acc_bot : Acc ((· < ·) : WithBot α → WithBot α → Prop ) ⊥ :=
496
- Acc.intro _ fun _ ha => (not_le_of_gt ha bot_le).elim
497
- ⟨fun a =>
498
- Option.recOn a acc_bot fun a =>
499
- Acc.intro _ fun b =>
500
- Option.recOn b (fun _ => acc_bot) fun b =>
501
- WellFounded.induction h b
502
- (show
503
- ∀ b : α,
504
- (∀ c, c < b → (c : WithBot α) < a → Acc
505
- ((· < ·) : WithBot α → WithBot α → Prop ) c) →
506
- (b : WithBot α) < a → Acc ((· < ·) : WithBot α → WithBot α → Prop ) b
507
- from fun _ ih hba =>
508
- Acc.intro _ fun c =>
509
- Option.recOn c (fun _ => acc_bot) fun _ hc => ih _
510
- (some_lt_some.1 hc) (lt_trans hc hba))⟩
495
+ have not_lt_bot : ∀ a : WithBot α, ¬ a < ⊥ := (fun.)
496
+ have acc_bot := ⟨_, by simp [not_lt_bot]⟩
497
+ .intro fun
498
+ | ⊥ => acc_bot
499
+ | (a : α) => (h.1 a).rec fun a _ ih =>
500
+ .intro _ fun
501
+ | ⊥, _ => acc_bot
502
+ | (b : α), hlt => ih _ (some_lt_some.1 hlt)
511
503
#align with_bot.well_founded_lt WithBot.wellFounded_lt
512
504
513
505
instance denselyOrdered [LT α] [DenselyOrdered α] [NoMinOrder α] : DenselyOrdered (WithBot α) :=
@@ -1246,25 +1238,24 @@ theorem coe_max [LinearOrder α] (x y : α) : (↑(max x y) : WithTop α) = max
1246
1238
rfl
1247
1239
#align with_top.coe_max WithTop.coe_max
1248
1240
1249
- theorem wellFounded_lt [Preorder α] (h : @WellFounded α (· < ·)) :
1241
+ theorem wellFounded_lt [LT α] (h : @WellFounded α (· < ·)) :
1250
1242
@WellFounded (WithTop α) (· < ·) :=
1251
- have acc_some : ∀ a : α, Acc ((· < ·) : WithTop α → WithTop α → Prop ) (some a) := fun a =>
1252
- Acc.intro _
1253
- (WellFounded.induction h a
1254
- (show
1255
- ∀ b, (∀ c, c < b → ∀ d : WithTop α, d < some c → Acc (· < ·) d) →
1256
- ∀ y : WithTop α, y < some b → Acc (· < ·) y
1257
- from fun _ ih c =>
1258
- Option.recOn c (fun hc => (not_lt_of_ge le_top hc).elim) fun _ hc =>
1259
- Acc.intro _ (ih _ (some_lt_some.1 hc))))
1260
- ⟨fun a =>
1261
- Option.recOn a (Acc.intro _ fun y => Option.recOn y
1262
- (fun h => (lt_irrefl _ h).elim) fun _ _ => acc_some _) acc_some⟩
1243
+ have not_top_lt : ∀ a : WithTop α, ¬ ⊤ < a := (fun.)
1244
+ have acc_some (a : α) : Acc ((· < ·) : WithTop α → WithTop α → Prop ) a :=
1245
+ (h.1 a).rec fun _ _ ih =>
1246
+ .intro _ fun
1247
+ | (b : α), hlt => ih _ (some_lt_some.1 hlt)
1248
+ | ⊤, hlt => nomatch not_top_lt _ hlt
1249
+ .intro fun
1250
+ | (a : α) => acc_some a
1251
+ | ⊤ => .intro _ fun
1252
+ | (b : α), _ => acc_some b
1253
+ | ⊤, hlt => nomatch not_top_lt _ hlt
1263
1254
#align with_top.well_founded_lt WithTop.wellFounded_lt
1264
1255
1265
1256
open OrderDual
1266
1257
1267
- theorem wellFounded_gt [Preorder α] (h : @WellFounded α (· > ·)) :
1258
+ theorem wellFounded_gt [LT α] (h : @WellFounded α (· > ·)) :
1268
1259
@WellFounded (WithTop α) (· > ·) :=
1269
1260
⟨fun a => by
1270
1261
-- ideally, use rel_hom_class.acc, but that is defined later
@@ -1279,7 +1270,7 @@ theorem wellFounded_gt [Preorder α] (h : @WellFounded α (· > ·)) :
1279
1270
exact ⟨_, fun a' h => IH (WithTop.toDual a') (toDual_lt_toDual.mpr h) _ rfl⟩⟩
1280
1271
#align with_top.well_founded_gt WithTop.wellFounded_gt
1281
1272
1282
- theorem _root_.WithBot.wellFounded_gt [Preorder α] (h : @WellFounded α (· > ·)) :
1273
+ theorem _root_.WithBot.wellFounded_gt [LT α] (h : @WellFounded α (· > ·)) :
1283
1274
@WellFounded (WithBot α) (· > ·) :=
1284
1275
⟨fun a => by
1285
1276
-- ideally, use rel_hom_class.acc, but that is defined later
0 commit comments