| ⊦ # cleanup-lpt(lpt, # lpt) = # lpt.map(λ lp. (lp.ref-size = 0 ∧ lp.flags ≠ LP_FREE ⊃ mklp(0, 0, LP_FREE, lp.gcheapidx);lp)) ∧ (∀ n. n < # cleanup-lpt(lpt, # lpt) → cleanup-lpt(lpt, # lpt)[n] = lpt.map(λ lp. (lp.ref-size = 0 ∧ lp.flags ≠ LP_FREE ⊃ mklp(0, 0, LP_FREE, lp.gcheapidx);lp))[n]) |
n < # lpt ⊦ (lpt[n].ref-size = 0 ∧ lpt[n].flags ≠ LP_FREE ⊃ mklp(0, 0, LP_FREE, lpt[n].gcheapidx);lpt[n]) = lpt.map(λ lp. (lp.ref-size = 0 ∧ lp.flags ≠ LP_FREE ⊃ mklp(0, 0, LP_FREE, lp.gcheapidx);lp))[n]
Used simplifier rules: cleanup-lpt-n-size: n ≤ # lpt ⊦ # cleanup-lpt(lpt, n) = # lpt;%cleanup-lpt-n-at: m < n, n ≤ # lpt ⊦ cleanup-lpt(lpt, n)[m] = (lpt[m].ref-size = 0 ∧ lpt[m].flags ≠ LP_FREE ⊃ mklp(0, 0, LP_FREE, lpt[m].gcheapidx) ;lpt[m] );% ⊦ m < n → n ≠ 0; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ m ≤ m; (s)% ⊦ # lpt.map(lptfun) = # lpt; (s)% ⊦ ¬ n < n; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)