Used simplifier rules: max-rec: ⊦ (bag ++ n).max = (bag = ∅ ⊃ n;(bag.max > n ⊃ bag.max;n));% ⊦ m < n → ¬ n < m; (s)% ⊦ m > n ↔ n < m; (s)