Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Init/Control/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance (priority := 500) instForInOfForIn' [ForIn' m ρ α d] : ForIn m ρ α
(f : (a : α) → a ∈ x → β → m (ForInStep β)) (g : (a : α) → β → m (ForInStep β))
(h : ∀ a m b, f a m b = g a b) :
forIn' x b f = forIn x b g := by
simp [instForInOfForIn']
simp [forIn]
congr
apply funext
intro a
Expand Down
2 changes: 1 addition & 1 deletion src/Init/Control/Lawful/Instances.lean
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ instance [Monad m] [LawfulMonad m] : LawfulMonad (ExceptT ε m) where

@[simp] theorem map_throw [Monad m] [LawfulMonad m] {α β : Type _} (f : α → β) (e : ε) :
f <$> (throw e : ExceptT ε m α) = (throw e : ExceptT ε m β) := by
simp only [ExceptT.instMonad, ExceptT.map, ExceptT.mk, throw, throwThe, MonadExceptOf.throw,
simp only [Functor.map, ExceptT.map, ExceptT.mk, throw, throwThe, MonadExceptOf.throw,
pure_bind]

/-! Note that the `MonadControl` instance for `ExceptT` is not monad-generic. -/
Expand Down
7 changes: 3 additions & 4 deletions src/Init/Control/Lawful/MonadLift/Instances.lean
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ variable [Monad m] [LawfulMonad m]
@[simp]
theorem lift_bind {α β : Type u} (ma : m α) (f : α → m β) :
OptionT.lift (ma >>= f) = OptionT.lift ma >>= (fun a => OptionT.lift (f a)) := by
simp only [instMonad, OptionT.bind, OptionT.mk, OptionT.lift, bind_pure_comp, bind_map_left,
simp only [bind, OptionT.bind, OptionT.mk, OptionT.lift, bind_pure_comp, bind_map_left,
map_bind]

instance : LawfulMonadLift m (OptionT m) where
Expand All @@ -79,7 +79,7 @@ variable [Monad m] [LawfulMonad m]
@[simp]
theorem lift_bind {α β ε : Type u} (ma : m α) (f : α → m β) :
ExceptT.lift (ε := ε) (ma >>= f) = ExceptT.lift ma >>= (fun a => ExceptT.lift (f a)) := by
simp only [instMonad, ExceptT.bind, mk, ExceptT.lift, bind_map_left, ExceptT.bindCont, map_bind]
simp only [bind, ExceptT.bind, mk, ExceptT.lift, bind_map_left, ExceptT.bindCont, map_bind]

instance : LawfulMonadLift m (ExceptT ε m) where
monadLift_pure := lift_pure
Expand All @@ -89,8 +89,7 @@ instance : LawfulMonadLift (Except ε) (ExceptT ε m) where
monadLift_pure _ := by
simp only [MonadLift.monadLift, mk, pure, Except.pure, ExceptT.pure]
monadLift_bind ma _ := by
simp only [instMonad, ExceptT.bind, mk, MonadLift.monadLift, pure_bind, ExceptT.bindCont,
Except.instMonad, Except.bind]
simp only [bind, ExceptT.bind, mk, MonadLift.monadLift, pure_bind, ExceptT.bindCont, Except.bind]
rcases ma with _ | _ <;> simp

end ExceptT
Expand Down
2 changes: 1 addition & 1 deletion src/Init/Data/Iterators/Consumers/Loop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A `ForIn'` instance for iterators. Its generic membership relation is not easy t
so this is not marked as `instance`. This way, more convenient instances can be built on top of it
or future library improvements will make it more comfortable.
-/
@[always_inline, inline]
@[always_inline, inline, instance_reducible, expose]
def Iter.instForIn' {α : Type w} {β : Type w} {n : Type x → Type x'} [Monad n]
[Iterator α Id β] [IteratorLoop α Id n] :
ForIn' n (Iter (α := α) β) β ⟨fun it out => it.IsPlausibleIndirectOutput out⟩ where
Expand Down
6 changes: 3 additions & 3 deletions src/Init/Data/Iterators/Consumers/Monadic/Loop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ This is the default implementation of the `IteratorLoop` class.
It simply iterates through the iterator using `IterM.step`. For certain iterators, more efficient
implementations are possible and should be used instead.
-/
@[always_inline, inline, expose]
@[always_inline, inline, instance_reducible, expose]
def IteratorLoop.defaultImplementation {α : Type w} {m : Type w → Type w'} {n : Type x → Type x'}
[Monad n] [Iterator α m β] :
IteratorLoop α m n where
Expand Down Expand Up @@ -210,7 +210,7 @@ theorem IteratorLoop.wellFounded_of_productive {α β : Type w} {m : Type w →
/--
This `ForIn'`-style loop construct traverses a finite iterator using an `IteratorLoop` instance.
-/
@[always_inline, inline]
@[always_inline, inline, instance_reducible, expose]
def IteratorLoop.finiteForIn' {m : Type w → Type w'} {n : Type x → Type x'}
{α : Type w} {β : Type w} [Iterator α m β] [IteratorLoop α m n] [Monad n]
(lift : ∀ γ δ, (γ → n δ) → m γ → n δ) :
Expand All @@ -223,7 +223,7 @@ A `ForIn'` instance for iterators. Its generic membership relation is not easy t
so this is not marked as `instance`. This way, more convenient instances can be built on top of it
or future library improvements will make it more comfortable.
-/
@[always_inline, inline]
@[always_inline, inline, instance_reducible, expose]
def IterM.instForIn' {m : Type w → Type w'} {n : Type w → Type w''}
{α : Type w} {β : Type w} [Iterator α m β] [IteratorLoop α m n] [Monad n]
[MonadLiftT m n] :
Expand Down
44 changes: 24 additions & 20 deletions src/Init/Data/Iterators/Lemmas/Combinators/FilterMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,10 @@ theorem Iter.forIn_filterMapWithPostcondition
match ← (f out).run with
| some c => g c acc
| none => return .yield acc) := by
simp [Iter.forIn_eq_forIn_toIterM, filterMapWithPostcondition, IterM.forIn_filterMapWithPostcondition,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]; rfl
simp only [filterMapWithPostcondition, IterM.forIn_filterMapWithPostcondition,
forIn_eq_forIn_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
rfl -- syntactically equal up to matchers that are definitionally equal

theorem Iter.forIn_filterMapM
[Monad n] [LawfulMonad n] [Monad o] [LawfulMonad o]
Expand All @@ -441,8 +443,9 @@ theorem Iter.forIn_filterMapM
match ← f out with
| some c => g c acc
| none => return .yield acc) := by
simp [filterMapM, forIn_eq_forIn_toIterM, IterM.forIn_filterMapM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]; rfl
simp only [filterMapM, IterM.forIn_filterMapM, forIn_eq_forIn_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
rfl -- syntactically equal up to matchers that are definitionally equal

theorem Iter.forIn_filterMap
[Monad n] [LawfulMonad n] [Finite α Id]
Expand All @@ -462,8 +465,8 @@ theorem Iter.forIn_mapWithPostcondition
{g : β₂ → γ → o (ForInStep γ)} :
forIn (it.mapWithPostcondition f) init g =
forIn it init (fun out acc => do g (← (f out).run) acc) := by
simp [mapWithPostcondition, forIn_eq_forIn_toIterM, IterM.forIn_mapWithPostcondition,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [mapWithPostcondition, IterM.forIn_mapWithPostcondition, forIn_eq_forIn_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.forIn_mapM
[Monad n] [LawfulMonad n] [Monad o] [LawfulMonad o]
Expand Down Expand Up @@ -491,8 +494,8 @@ theorem Iter.forIn_filterWithPostcondition
haveI : MonadLift n o := ⟨monadLift⟩
forIn (it.filterWithPostcondition f) init g =
forIn it init (fun out acc => do if (← (f out).run).down then g out acc else return .yield acc) := by
simp [filterWithPostcondition, forIn_eq_forIn_toIterM, IterM.forIn_filterWithPostcondition,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [filterWithPostcondition, IterM.forIn_filterWithPostcondition, forIn_eq_forIn_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.forIn_filterM
[Monad n] [LawfulMonad n] [Monad o] [LawfulMonad o]
Expand All @@ -501,8 +504,8 @@ theorem Iter.forIn_filterM
[IteratorLoop α Id o] [LawfulIteratorLoop α Id o]
{it : Iter (α := α) β} {f : β → n (ULift Bool)} {init : γ} {g : β → γ → o (ForInStep γ)} :
forIn (it.filterM f) init g = forIn it init (fun out acc => do if (← f out).down then g out acc else return .yield acc) := by
simp [filterM, forIn_eq_forIn_toIterM, IterM.forIn_filterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [filterM, IterM.forIn_filterM, forIn_eq_forIn_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.forIn_filter
[Monad n] [LawfulMonad n]
Expand Down Expand Up @@ -543,8 +546,9 @@ theorem Iter.foldM_filterMapM {α β γ δ : Type w}
it.foldM (init := init) (fun d b => do
let some c ← f b | pure d
g d c) := by
simp [filterMapM, IterM.foldM_filterMapM, foldM_eq_foldM_toIterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]; rfl
simp only [filterMapM, IterM.foldM_filterMapM, foldM_eq_foldM_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
rfl -- syntactically equal up to matchers that are definitionally equal

theorem Iter.foldM_mapWithPostcondition {α β γ δ : Type w}
{n : Type w → Type w''} {o : Type w → Type w'''}
Expand All @@ -556,8 +560,8 @@ theorem Iter.foldM_mapWithPostcondition {α β γ δ : Type w}
{f : β → PostconditionT n γ} {g : δ → γ → o δ} {init : δ} {it : Iter (α := α) β} :
(it.mapWithPostcondition f).foldM (init := init) g =
it.foldM (init := init) (fun d b => do let c ← (f b).run; g d c) := by
simp [mapWithPostcondition, IterM.foldM_mapWithPostcondition, foldM_eq_foldM_toIterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [mapWithPostcondition, IterM.foldM_mapWithPostcondition, foldM_eq_foldM_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.foldM_mapM {α β γ δ : Type w}
{n : Type w → Type w''} {o : Type w → Type w'''}
Expand All @@ -571,8 +575,8 @@ theorem Iter.foldM_mapM {α β γ δ : Type w}
haveI : MonadLift n o := ⟨MonadLiftT.monadLift⟩
(it.mapM f).foldM (init := init) g =
it.foldM (init := init) (fun d b => do let c ← f b; g d c) := by
simp [mapM, IterM.foldM_mapM, foldM_eq_foldM_toIterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [mapM, IterM.foldM_mapM, foldM_eq_foldM_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.foldM_filterWithPostcondition {α β δ : Type w}
{n : Type w → Type w''} {o : Type w → Type w'''}
Expand All @@ -584,8 +588,8 @@ theorem Iter.foldM_filterWithPostcondition {α β δ : Type w}
{f : β → PostconditionT n (ULift Bool)} {g : δ → β → o δ} {init : δ} {it : Iter (α := α) β} :
(it.filterWithPostcondition f).foldM (init := init) g =
it.foldM (init := init) (fun d b => do if (← (f b).run).down then g d b else pure d) := by
simp [filterWithPostcondition, IterM.foldM_filterWithPostcondition, foldM_eq_foldM_toIterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [filterWithPostcondition, IterM.foldM_filterWithPostcondition, foldM_eq_foldM_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.foldM_filterM {α β δ : Type w}
{n : Type w → Type w''} {o : Type w → Type w'''}
Expand All @@ -598,8 +602,8 @@ theorem Iter.foldM_filterM {α β δ : Type w}
{f : β → n (ULift Bool)} {g : δ → β → o δ} {init : δ} {it : Iter (α := α) β} :
(it.filterM f).foldM (init := init) g =
it.foldM (init := init) (fun d b => do if (← f b).down then g d b else pure d) := by
simp [filterM, IterM.foldM_filterM, foldM_eq_foldM_toIterM,
instMonadLiftTOfMonadLift_instMonadLiftTOfPure]
simp only [filterM, IterM.foldM_filterM, foldM_eq_foldM_toIterM]
rw [instMonadLiftTOfMonadLift_instMonadLiftTOfPure]

theorem Iter.foldM_filterMap {α β γ δ : Type w} {n : Type w → Type w''}
[Iterator α Id β] [Finite α Id] [Monad n] [LawfulMonad n]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ private theorem IterM.toList_filterMapWithPostcondition_filterMapWithPostconditi
(it.filterMapWithPostcondition (n := o) fg).toList := by
induction it using IterM.inductSteps with | step it ihy ihs
letI : MonadLift n o := ⟨monadLift⟩
haveI : LawfulMonadLift n o := ⟨by simp [this], by simp [this]
haveI : LawfulMonadLift n o := ⟨LawfulMonadLiftT.monadLift_pure, LawfulMonadLiftT.monadLift_bind
rw [toList_eq_match_step, toList_eq_match_step, step_filterMapWithPostcondition,
bind_assoc, step_filterMapWithPostcondition, step_filterMapWithPostcondition]
simp only [bind_assoc, liftM_bind]
Expand Down
7 changes: 3 additions & 4 deletions src/Init/Data/Iterators/Lemmas/Consumers/Loop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public import Init.Data.Iterators.Lemmas.Consumers.Collect
public import Init.Data.Iterators.Lemmas.Consumers.Monadic.Loop
import all Init.Data.Iterators.Lemmas.Consumers.Monadic.Loop
import all Init.Data.Iterators.Consumers.Loop
import all Init.Data.Iterators.Consumers.Monadic.Collect
import Init.Data.Array.Monadic

public section
Expand All @@ -27,11 +26,11 @@ theorem Iter.forIn'_eq {α β : Type w} [Iterator α Id β] [Finite α Id]
IterM.DefaultConsumers.forIn' (n := m) (fun _ _ f x => f x.run) γ (fun _ _ _ => True)
it.toIterM init _ (fun _ => id)
(fun out h acc => return ⟨← f out (Iter.isPlausibleIndirectOutput_iff_isPlausibleIndirectOutput_toIterM.mpr h) acc, trivial⟩) := by
simp only [instForIn', ForIn'.forIn', IteratorLoop.finiteForIn']
have : ∀ a b c, f a b c = (Subtype.val <$> (⟨·, trivial⟩) <$> f a b c) := by simp
simp +singlePass only [this]
simp only [ForIn'.forIn']
rw [hl.lawful (fun _ _ f x => f x.run) (wf := IteratorLoop.wellFounded_of_finite)]
simp [IteratorLoop.defaultImplementation]
simp [IteratorLoop.forIn]

theorem Iter.forIn_eq {α β : Type w} [Iterator α Id β] [Finite α Id]
{m : Type x → Type x'} [Monad m] [LawfulMonad m] [IteratorLoop α Id m]
Expand Down Expand Up @@ -77,7 +76,7 @@ theorem Iter.forIn'_eq_forIn'_toIterM {α β : Type w} [Iterator α Id β]
letI : ForIn' m (IterM (α := α) Id β) β _ := IterM.instForIn'
ForIn'.forIn' it.toIterM init
(fun out h acc => f out (isPlausibleIndirectOutput_iff_isPlausibleIndirectOutput_toIterM.mpr h) acc) := by
simp [ForIn'.forIn', Iter.instForIn', IterM.instForIn', monadLift]
simp [ForIn'.forIn', monadLift]

theorem Iter.forIn_eq_forIn_toIterM {α β : Type w} [Iterator α Id β]
[Finite α Id] {m : Type w → Type w''} [Monad m] [LawfulMonad m]
Expand Down
4 changes: 2 additions & 2 deletions src/Init/Data/Iterators/Lemmas/Consumers/Monadic/Loop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ theorem IterM.forIn'_eq {α β : Type w} {m : Type w → Type w'} [Iterator α m
letI : ForIn' n (IterM (α := α) m β) β _ := IterM.instForIn'
ForIn'.forIn' (α := β) (m := n) it init f = IterM.DefaultConsumers.forIn' (n := n)
(fun _ _ f x => monadLift x >>= f) γ (fun _ _ _ => True) it init _ (fun _ => id) (return ⟨← f · · ·, trivial⟩) := by
simp only [instForIn', ForIn'.forIn', IteratorLoop.finiteForIn']
simp only [ForIn'.forIn']
have : f = (Subtype.val <$> (⟨·, trivial⟩) <$> f · · ·) := by simp
rw [this, hl.lawful (fun _ _ f x => monadLift x >>= f) (wf := IteratorLoop.wellFounded_of_finite)]
simp [IteratorLoop.defaultImplementation]
simp [IteratorLoop.forIn]

theorem IterM.forIn_eq {α β : Type w} {m : Type w → Type w'} [Iterator α m β] [Finite α m]
{n : Type w → Type w''} [Monad m] [Monad n] [LawfulMonad n] [IteratorLoop α m n]
Expand Down
4 changes: 2 additions & 2 deletions src/Init/Data/List/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ theorem length_eq_of_beq [BEq α] {l₁ l₂ : List α} (h : l₁ == l₂) : l
constructor
intro a
suffices ([a] == [a]) = true by
simpa only [List.instBEq, List.beq, Bool.and_true]
simpa only [BEq.beq, List.beq, Bool.and_true]
simp
· intro h
infer_instance
Expand All @@ -776,7 +776,7 @@ theorem length_eq_of_beq [BEq α] {l₁ l₂ : List α} (h : l₁ == l₂) : l
intro a b h
apply singleton_inj.1
apply eq_of_beq
simp only [List.instBEq, List.beq]
simp only [BEq.beq, List.beq]
simpa
· intro h
infer_instance
Expand Down
2 changes: 1 addition & 1 deletion src/Init/Data/List/Lex.lean
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ theorem lex_trans {r : α → α → Prop}
protected theorem lt_trans [LT α]
[i₁ : Trans (· < · : α → α → Prop) (· < ·) (· < ·)]
{l₁ l₂ l₃ : List α} (h₁ : l₁ < l₂) (h₂ : l₂ < l₃) : l₁ < l₃ := by
simp only [instLT, List.lt] at h₁ h₂ ⊢
simp only [LT.lt, List.lt] at h₁ h₂ ⊢
exact lex_trans (fun h₁ h₂ => i₁.trans h₁ h₂) h₁ h₂

instance [LT α] [Trans (· < · : α → α → Prop) (· < ·) (· < ·)] :
Expand Down
8 changes: 4 additions & 4 deletions src/Init/Data/Order/Factories.lean
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Creates a *total* `LE α` instance from an `LT α` instance.

This only makes sense for asymmetric `LT α` instances (see `Std.Asymm`).
-/
@[inline]
@[inline, instance_reducible, expose]
public def _root_.LE.ofLT (α : Type u) [LT α] : LE α where
le a b := ¬ b < a

Expand All @@ -208,7 +208,7 @@ public instance LawfulOrderLT.of_lt {α : Type u} [LT α] [i : Asymm (α := α)
haveI := LE.ofLT α
LawfulOrderLT α :=
letI := LE.ofLT α
{ lt_iff a b := by simpa [LE.ofLT, Classical.not_not] using i.asymm a b }
{ lt_iff a b := by simpa +instances [LE.ofLT, Classical.not_not] using i.asymm a b }

/--
If an `LT α` instance is asymmetric and its negation is transitive, then `LE.ofLT α` represents a
Expand Down Expand Up @@ -253,7 +253,7 @@ public theorem LawfulOrderInf.of_lt {α : Type u} [Min α] [LT α]
letI := LE.ofLT α
{ le_min_iff a b c := by
open Classical in
simp only [LE.ofLT, ← Decidable.not_iff_not (a := ¬ min b c < a)]
simp only [LE.le, ← Decidable.not_iff_not (a := ¬ min b c < a)]
simpa [Decidable.imp_iff_not_or] using min_lt_iff a b c }

/--
Expand Down Expand Up @@ -282,7 +282,7 @@ public def LawfulOrderSup.of_lt {α : Type u} [Max α] [LT α]
letI := LE.ofLT α
{ max_le_iff a b c := by
open Classical in
simp only [LE.ofLT, ← Decidable.not_iff_not ( a := ¬ c < max a b)]
simp only [LE.le, ← Decidable.not_iff_not ( a := ¬ c < max a b)]
simpa [Decidable.imp_iff_not_or] using lt_max_iff a b c }

/--
Expand Down
4 changes: 2 additions & 2 deletions src/Init/Data/Order/FactoriesExtra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public instance instLawfulOrderOrd_ofOrd (α : Type u) [Ord α] [OrientedOrd α]
haveI := LE.ofOrd α
LawfulOrderOrd α :=
letI := LE.ofOrd α
{ isLE_compare := by simp [LE.ofOrd]
isGE_compare := by simp [LE.ofOrd, OrientedCmp.isGE_eq_isLE] }
{ isLE_compare := by simp [LE.le]
isGE_compare := by simp [LE.le, OrientedCmp.isGE_eq_isLE] }

attribute [local instance] LT.ofOrd in
/--
Expand Down
4 changes: 2 additions & 2 deletions src/Init/Data/Order/MinMaxOn.lean
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public theorem maxOn_self [LE β] [DecidableLE β] {f : α → β} {x : α} :
public theorem maxOn_eq_left [le : LE β] [DecidableLE β] {f : α → β} {x y : α} (h : f y ≤ f x) :
maxOn f x y = x := by
simp only [maxOn_eq_minOn]
exact @minOn_eq_left (h := by simpa [LE.opposite_def]) ..
exact @minOn_eq_left (h := by simpa +instances [LE.opposite_def]) ..

public theorem maxOn_eq_right [LE β] [DecidableLE β] {f : α → β} {x y : α} (h : ¬ f y ≤ f x) :
maxOn f x y = y := by
simp only [maxOn_eq_minOn]
exact @minOn_eq_right (h := by simpa [LE.opposite_def]) ..
exact @minOn_eq_right (h := by simpa +instances [LE.opposite_def]) ..

public theorem maxOn_eq_right_of_lt
[LE β] [DecidableLE β] [LT β] [Total (α := β) (· ≤ ·)] [LawfulOrderLT β]
Expand Down
Loading
Loading