| remove-refsize0(istore1) = istore1, remove-refsize0(gstore2) = gstore2, elems nx0 ∩ ginval3 = ∅, dom gstore2 ∪ elems nx0 = dom gstore3 ∪ ginval3, btree-inv(rp, adr, istore2, istore1, zh, fi, fi0), inv(istore1), inv(istore2), inv(gstore2), inv(gstore3 \ ginval3), ri-inj(fi0), ri-inj(fi), istore1 ⊑ istore2, pstate.index? → pstate.lnum ∈ istore2, pstate.journal? → nx0 ≠ [] ∧ pstate.lnum = nx0.last ∧ pstate.lnum ∈ gstore3 ⊦ [choose err0 with ⌊err0⌋ ∨ err0 = ESUCCESS in err := err0; nx := nx0; gstore := gstore3; ginval := ginval3; if err = ESUCCESS then choose n with ¬ n ∈ gstore in gstore[n] := groupblock([], [], 0), nx := nx + n, ginval := ginval -- n, pstate := journal(n)] ( inv(gstore \ ginval) ∧ elems nx ∩ ginval = ∅ ∧ ¬ dups(nx) ∧ dom gstore2 ∪ elems nx = dom gstore ∪ ginval ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore2) → ⟨index_allocate_gnd#(fi, fi0, gstore2, maxino0, ginval2, true; ginval3, gstore3, nx0; err0)⟩ (ginval3 = ginval ∧ gstore3 = gstore ∧ nx0 = nx ∧ err = err0)), pstate = readonly, dups(nx0) |
remove-refsize0(gstore2) = gstore2, remove-refsize0(istore1) = istore1, elems nx0 ∩ ginval3 = ∅, dom gstore2 ∪ elems nx0 = dom gstore3 ∪ ginval3, btree-inv(rp, adr, istore2, istore1, zh, fi, fi0), inv(gstore3 \ ginval3), inv(gstore2), inv(istore2), inv(istore1), ri-inj(fi), ri-inj(fi0), istore1 ⊑ istore2, pstate.journal? → nx0 ≠ [] ∧ pstate.lnum = nx0.last ∧ pstate.lnum ∈ gstore3, pstate.index? → pstate.lnum ∈ istore2, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ [err := err0; nx := nx0; gstore := gstore3; ginval := ginval3; if err = ESUCCESS then choose n with ¬ n ∈ gstore in gstore[n] := groupblock([], [], 0), nx := nx + n, ginval := ginval -- n, pstate := journal(n)] ( inv(gstore \ ginval) ∧ elems nx ∩ ginval = ∅ ∧ ¬ dups(nx) ∧ dom gstore2 ∪ elems nx = dom gstore ∪ ginval ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore2) → ⟨index_allocate_gnd#(fi, fi0, gstore2, maxino0, ginval2, true; ginval3, gstore3, nx0; err1)⟩ (ginval3 = ginval ∧ gstore3 = gstore ∧ nx0 = nx ∧ err = err1)), pstate = readonly, dups(nx0)