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