α : Type u_1
β : Type u_2
inst✝¹ : Preorder β
inst✝ : DecidableRel fun x x_1 => x < x_1
f✝ : α → β
l✝ : List α
o : Option α
a✝ m : α
f : α → β
a : α
l : List α
⊢ foldl (argAux fun b c => f c < f b) none (l ++ [a]) =
    Option.casesOn (foldl (argAux fun b c => f c < f b) none l) (some a) fun c => if f c < f a then some a else some c
α : Type u_1
β : Type u_2
inst✝¹ : Preorder β
inst✝ : DecidableRel fun x x_1 => x < x_1
f✝ : α → β
l✝ : List α
o : Option α
a✝ m : α
f : α → β
a : α
l : List α
⊢ argmax f (l ++ [a]) = Option.casesOn (argmax f l) (some a) fun c => if f c < f a then some a else some c
rw [argmax, argmax]
no goals
α : Type u_1
β : Type u_2
inst✝¹ : Preorder β
inst✝ : DecidableRel fun x x_1 => x < x_1
f✝ : α → β
l✝ : List α
o : Option α
a✝ m : α
f : α → β
a : α
l : List α
⊢ foldl (argAux fun b c => f c < f b) none (l ++ [a]) =
    Option.casesOn (foldl (argAux fun b c => f c < f b) none l) (some a) fun c => if f c < f a then some a else some c
simp [argAux]