| ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , lf(2 + n1) = (σ[m0] ' + x0).last ' + x1, (σ[m0] ' + x0).last ∈ lf(2 + n1), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).rest) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)) ⊦ σ[m0 + # x0] = (σ[m0] ' + x0).last, # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ |
⊦ y ≠ [] → (x + y).last = y.last
x0 ≠ [], ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , lf(2 + n1) = x0.last ' + x1, x0.last ∈ lf(2 + n1), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).rest) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)) ⊦ σ[m0 + # x0] = x0.last, # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝
Used simplifier rules: size-01: ⊦ # [] = 0; from specification list-data%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%c: ⊦ m + n = n + m; from specification nat-basic2%to-zero: ⊦ σ to 0 = []; from specification stream%empty: ⊦ ⌜[]⌝ = []; from specification stream%app: ⊦ x + [] = x; from specification list%a: ⊦ (x + y) + z = x + y + z; from specification list%l: ⊦ a '.last = a; from specification list-last%add-base: ⊦ n + 0 = n; from specification nat-basic2 Used terms: x0, σ[m0] '