let
min_elt s =
let
(n, _), _ = split_leftmost s
in
n