bug fixes to min-max, and experiments with hsmax

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>