[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 1 from proof infinite-append-butlast (conclusion) (back to tree)

∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n) + 1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s)

Proof step 2 from proof infinite-append-butlast (previous step) (back to tree)

∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule apply lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:infinite-append, seq:⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → lf(m) = [] ∧ ii(m) = ii(n)) ;∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1) ), subst:[lf] → [λ n. (n = 0 ⊃ lf(0);lf(n).tail)]

Additional information

Used terms: λ n. (n = 0 ⊃ lf(0);lf(n).tail)

Proof step 3 from proof infinite-append-butlast (previous step) (back to tree)

⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → lf(m) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Lemma infinite-append

Proof step 4 from proof infinite-append-butlast (previous step) (back to tree)

∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)) ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 5 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule cut formula

And obtained the following new goals

Rule argument

fma: ∀ n. n ≠ 0 → ii(n) ≠ 0

Additional information

Used formulas: ∀ n. n ≠ 0 → ii(n) ≠ 0

Proof step 6 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule cut formula

And obtained the following new goals

Rule argument

fma: ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head

Additional information

Used formulas: ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head

Proof step 7 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule exists right

And obtained the following new goals

Rule argument

pos: right 1 terms: σ, λ n. (n = 0 ⊃ 0;ii(n) - 1) abort: F discard: T computed: F

Additional information

Used terms: σ, λ n. (n = 0 ⊃ 0;ii(n) - 1)

Proof step 8 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ (0 = 0 ⊃ 0;ii(0) - 1) = 0 ∧ (∀ n. (n + 1 = 0 ⊃ 0;ii(n + 1) - 1) = (n = 0 ⊃ 0;ii(n) - 1) + # lf(n) - 1 ∧ ⌜(n + 1 = 0 ⊃ 0;ii(n + 1) - 1)⌝ < # σ ∧ (σ from (n = 0 ⊃ 0;ii(n) - 1)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n = 0 ⊃ 0;ii(n) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∀ n. ∃ m. (m = 0 ⊃ 0;ii(m) - 1) ≤ n ∧ n < (m + 1 = 0 ⊃ 0;ii(m + 1) - 1) )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 9 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ ii(n0 + 1) - 1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜ii(n0 + 1) - 1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n0 + 1), m1]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n0 + 1), m1

Proof step 10 from proof infinite-append-butlast (previous step) (back to tree)

ii(n0 + 1) = 0, ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ ii(n0 + 1) - 1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜ii(n0 + 1) - 1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 11 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(n0 + 1) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ 0 - 1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜0 - 1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 4 terms: n0 + 1

Additional information

Used simplifier rules: ⊦ m + 1 ≠ 0; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic Used terms: n0 + 1

Proof step 12 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(n0 + 1) = m1 + 1, ii(n0 + 1) ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜m1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 13 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(n0 + 1) = m1 + 1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 7 terms: n0 abort: F discard: F computed: F

Additional information

Used terms: n0

Proof step 14 from proof infinite-append-butlast (previous step) (back to tree)

ii(n0 + 1) = m1 + 1, ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ¬ # σ < ⌜ii(n0 + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf ⊦ # σ < ⌜n⌝ + ⌜1⌝ ↔ ¬ ⌜n⌝ < # σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s)

Proof step 15 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(n0 + 1) = m1 + 1, ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

User applied rule cut formula

And obtained the following new goals

Rule argument

fma: m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1

Additional information

Used formulas: m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1

Proof step 16 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, ii(n0 + 1) = m1 + 1, m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 17 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Proof step 18 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 5

Additional information

Used simplifier rules: ⊦ n + 0 = n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ σ from 0 = σ; (s)

Proof step 19 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , n0 ≠ 0, (σ from (ii(n0) - 1)) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 20 from proof infinite-append-butlast (previous step) (back to tree)

((ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # lf(n0).tail, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , n0 ≠ 0, (σ from (ii(n0) - 1)) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜(ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n0), m0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n0), m0

Proof step 21 from proof infinite-append-butlast (previous step) (back to tree)

((ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0) = 0, ii(n0 + 1) = ii(n0) + # lf(n0).tail, ii(0) = 0, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , n0 ≠ 0, (σ from (ii(n0) - 1)) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜(ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ σ from 0 = σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ n + 0 = n; (s)

Proof step 22 from proof infinite-append-butlast (previous step) (back to tree)

((0 - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0) = 0, ii(n0 + 1) = # lf(n0).tail, ii(0) = 0, σ to ii(n0 + 1) = ⌜lf(n0).tail⌝ , n0 ≠ 0, (σ from (0 - 1)) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜(0 - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 10 terms: n0

Additional information

Used terms: n0

Proof step 23 from proof infinite-append-butlast (previous step) (back to tree)

(m0 + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # lf(n0).tail, ii(0) = 0, ii(n0) = m0 + 1, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , ii(n0) ≠ 0, n0 ≠ 0, (σ from m0) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜m0 + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) eqs: ⊦ m = n + n0 ∧ m = n + n1 → n0 = n1; (forward) from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 24 from proof infinite-append-butlast (previous step) (back to tree)

(# lf(n0).tail + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # lf(n0).tail + m0, ii(0) = 0, ii(n0) = m0 + 1, (σ from m0 + 1) to # lf(n0).tail = ⌜lf(n0).tail⌝ , n0 ≠ 0, (σ from m0) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜# lf(n0).tail⌝ + ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:from-succ, seq: ⊦ ⌜n⌝ < # σ → σ from n = σ[n] + (σ from n + 1), subst:[n, σ] → [m0, σ], <all paths>

Additional information

Used simplifier rules: lsle-trans: ⊦ n∞ < n∞1 ∧ ¬ n∞2 < n∞1 → n∞ < n∞2; (forward) from specification nat-inf ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n + m < n0; (s) ⊦ ¬ m + n < m; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf Used terms: m0, σ

Proof step 25 from proof infinite-append-butlast (previous step) (back to tree)

⊦ ⌜n⌝ < # σ → σ from n = σ[n] + (σ from n + 1)

A spec-lemma

Proof step 26 from proof infinite-append-butlast (previous step) (back to tree)

(# lf(n0).tail + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # lf(n0).tail + m0, ii(n0) = m0 + 1, ii(0) = 0, (σ from m0 + 1) to # lf(n0).tail = ⌜lf(n0).tail⌝ , n0 ≠ 0, σ[m0] + (σ from m0 + 1) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜# lf(n0).tail⌝ + ⌜m0⌝ < # σ, ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ a + σ = ⌜a '⌝ + σ; (s)

Proof step 27 from proof infinite-append-butlast (previous step) (back to tree)

(# lf(n0).tail + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # lf(n0).tail + m0, ii(0) = 0, ii(n0) = m0 + 1, (σ from m0 + 1) to # lf(n0).tail = ⌜lf(n0).tail⌝ , n0 ≠ 0, ⌜σ[m0] '⌝ + (σ from m0 + 1) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜m0⌝ < # σ, ⌜# lf(n0).tail⌝ + ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-add, seq: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail), subst:[x, head, tail] → [lf(n0), a, x0]

Additional information

Used simplifier rules: ⊦ n + 0 = n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ # [] = 0; (s) ⊦ σ to 0 = []; (s) ⊦ ⌜[]⌝ = []; (s) ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail); (elim) Used terms: lf(n0), head, tail

Proof step 28 from proof infinite-append-butlast (previous step) (back to tree)

(# x0 + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # x0 + m0, ii(n0) = m0 + 1, ii(0) = 0, lf(n0) = a + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , lf(n0) ≠ [], n0 ≠ 0, ⌜σ[m0] '⌝ + (σ from m0 + 1) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜# x0⌝ + ⌜m0⌝ < # σ, ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 29 from proof infinite-append-butlast (previous step) (back to tree)

(# x0 + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # x0 + m0, ii(0) = 0, ii(n0) = m0 + 1, lf(n0) = a ' + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , lf(n0) ≠ [], n0 ≠ 0, ⌜σ[m0] '⌝ + (σ from m0 + 1) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜m0⌝ < # σ, ⌜# x0⌝ + ⌜m0⌝ < # σ, a ∈ lf(n0), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 18 terms: n0 - 1 abort: F discard: F computed: F

Additional information

Used terms: n0 - 1

Proof step 30 from proof infinite-append-butlast (previous step) (back to tree)

(# x0 + m0) + 1 = ii(n0 + 1), m0 + # lf(n0) - 1 = # x0 + m0, σ[ii((n0 - 1) + 1) - 1] = lf((n0 - 1) + 1).head, ii(n0) = m0 + 1, ii(0) = 0, lf(n0) = a ' + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , lf(n0) ≠ [], n0 ≠ 0, ⌜σ[m0] '⌝ + (σ from m0 + 1) to # lf(n0) ≠ ⌜lf(n0)⌝ , ⌜# x0⌝ + ⌜m0⌝ < # σ, ⌜m0⌝ < # σ, a ∈ lf(n0), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic elimination applied rule apply elim lemma

And closed the goal!

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [n0, m1]

Additional information

Used simplifier rules: ⊦ m + 1 ≠ 0; (s) in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ m + n = m + n0 ↔ n = n0; (s) ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s) ⊦ n + 0 = n; (s) ⊦ (a ' + x).head = a; (s) ⊦ #(a ' + x) = (# x)+1; (s) ⊦ m +1 = m + 1; (s) ⊦ ⌜a '⌝ + σ to n + 1 = a + (σ to n); (s) ⊦ a + σ = ⌜a '⌝ + σ; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ ⌜x + y⌝ = ⌜x⌝ + ⌜y⌝ ; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ ⌜a '⌝ + σ = ⌜a0 '⌝ + σ0 ↔ a = a0 ∧ σ = σ0; (ws) append-assoc: ⊦ (σ + σ1) + σ2 = σ + σ1 + σ2; from specification stream-old n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: n0, m1

Proof step 31 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, m ≤ n1, ¬ (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ m ≤ n ↔ ¬ n < m; (ss)

Proof step 32 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , (n1 = 0 ⊃ 0;ii(n1) - 1) < (m = 0 ⊃ 0;ii(m) - 1), ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 5

Additional information

Used simplifier rules: ⊦ m ≤ 0 ↔ m = 0; (s)

Proof step 33 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , n1 ≠ 0, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ii(n1) - 1 < (m = 0 ⊃ 0;ii(m) - 1), m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 34 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , n1 ≠ 0, ii(n1) - 1 < (m = 0 ⊃ 0;ii(m) - 1), ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 6

Additional information

Used simplifier rules: ⊦ 0 ≤ m; (s) ⊦ ¬ n < 0; (s)

Proof step 35 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m ≠ 0, n1 ≠ 0, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ii(n1) - 1 < ii(m) - 1, m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic

Proof step 36 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m ≠ 0, n1 ≠ 0, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ii(n1) - 1 < ii(m) - 1, m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 13 terms: m, n1 abort: F discard: T computed: T

Additional information

Used terms: m, n1

Proof step 37 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m ≠ 0, n1 ≠ 0, ii(n1) - 1 < ii(m) - 1, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, m ≤ n1, m ≤ n1 → ii(m) ≤ ii(n1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 38 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m ≠ 0, n1 ≠ 0, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ii(n1) - 1 < ii(m) - 1, m ≤ n1, ii(m) ≤ ii(n1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n1), m0]

Additional information

Used simplifier rules: ⊦ m ≤ 0 ↔ m = 0; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ m < n → n ≠ 0; (s) ⊦ ¬ n < n; (s) n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n1), m0

Proof step 39 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(n1) = m0 + 1, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ii(n1) ≠ 0, m ≠ 0, n1 ≠ 0, m0 < ii(m) - 1, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ii(m) ≤ ii(n1), m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≤ n ↔ m < n; (s) ⊦ 0 ≤ m; (s) ⊦ m < n → n ≠ 0; (s) le-one: ⊦ m ≤ n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat leprf: ⊦ m ≤ m - 1 → m = 0; (forward) from specification nat f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic eqle-one: ⊦ m = n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat ⊦ m + 1 ≠ 0; (s)

Proof step 40 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(m) = 0, ii(n1) = m0 + 1, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m ≠ 0, n1 ≠ 0, ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, m0 < 0 - 1, m ≤ n1, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 13 terms: m

Additional information

Used terms: m

Proof step 41 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Proof step 42 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, finp(σ), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic eqle-one: ⊦ m = n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf ⊦ ⌜n⌝ + ⌜m⌝ = ⌜n0⌝ ↔ n + m = n0; (s) ⊦ # ⌜x⌝ = ⌜# x⌝ ; (s) ⊦ ⌜x⌝ [n] = x[n]; (s) ⊦ ⌜x⌝ = ⌜x0⌝ ↔ x = x0; (s) ⊦ ⌜x⌝ to n = ⌜x to n⌝ ; (s) ⊦ ⌜x⌝ from n = ⌜x from n⌝ ; (s) ⊦ ⌜m⌝ < ⌜n⌝ ↔ m < n; (s) ⊦ ⌜n⌝ = ⌜n0⌝ ↔ n = n0; (s) ⊦ finp(⌜x⌝ ); (s) ⊦ finp(σ) ↔ (∃ x. ⌜x⌝ = σ); (as)

Proof step 43 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ ∃ n1. (n1 = 0 ⊃ 0;ii(n1) - 1) + 1 = ii(n) ∧ (∀ m. n1 ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n1 = 0 ⊃ 0;ii(n1) - 1))

User applied rule exists right

And obtained the following new goals

Rule argument

pos: right 1 terms: n abort: F discard: T computed: F

Additional information

Used terms: n

Proof step 44 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ (n = 0 ⊃ 0;ii(n) - 1) + 1 = ii(n) ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 45 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ (n = 0 ⊃ 0;ii(n) - 1) + 1 = ii(n) ∧ (n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1))

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Proof step 46 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n = 0 ⊃ 0;ii(n) - 1) + 1 ≠ ii(n), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦

User applied rule case distinction

And closed the goal!

Rule argument

pos: left 6

Additional information

Used simplifier rules: ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m < 1 ↔ m = 0; (s) ⊦ m < n → n ≠ 0; (s) n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic

Proof step 47 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), n ≤ m, ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 48 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), n ≤ m, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 12 terms: m abort: F discard: T computed: F

Additional information

Used terms: m

Proof step 49 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), n ≤ m, ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 50 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), ii(n0 + 1) ≤ ii(n), n ≤ m, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-list-c, seq:x ≠ [] ⊦ a = x.head ∧ y = x.tail ↔ x = a + y, subst:[x, a, y] → [lf(m), a, x0]

Additional information

Used simplifier rules: x ≠ [] ⊦ a = x.head ∧ y = x.tail ↔ x = a + y; (elim) Used terms: lf(m), a, y

Proof step 51 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), n ≤ m, ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 52 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), ii(n0 + 1) ≤ ii(n), n ≤ m, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ x0 = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 15 terms: m abort: F discard: T computed: T

Additional information

Used terms: m

Proof step 53 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), n ≤ m, ii(n0 + 1) ≤ ii(n), n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic

Proof step 54 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, (m = 0 ⊃ lf(0);lf(m).tail) = [], ii(m) = ii(n), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), n ≤ m, ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ (m = 0 ⊃ 0;ii(n) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 4

Additional information

Proof step 55 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).last = lf(m + 1).head, lf(m).tail = [], ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) = ii(n), lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], m ≠ 0, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), ii(n0 + 1) ≤ ii(n), n ≤ m, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ x0 = [] ∧ (m = 0 ⊃ 0;ii(n) - 1) = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ x ≠ [] ∧ x.tail = [] → x.last = x.head; (s)

Proof step 56 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).head = lf(m + 1).head, lf(m).tail = [], ii(m) = ii(n), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], m ≠ 0, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), n ≤ m, ii(n0 + 1) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ ii(n) - 1 = (n = 0 ⊃ 0;ii(n) - 1)

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n), m0]

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n), m0

Proof step 57 from proof infinite-append-butlast (previous step) (back to tree)

# x = ii(n), ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).head = lf(m + 1).head, lf(m).tail = [], ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) = ii(n), ii(n) = m0 + 1, lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(n) ≠ 0, lf(m) ≠ [], m ≠ 0, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 < ii(n), a ∈ lf(m), ii(n0 + 1) ≤ ii(n), n ≤ m, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ ii(n) < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ x0 = [] ∧ m0 = (n = 0 ⊃ 0;m0)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m ≤ n → (n < m ↔ false); (s) ⊦ m < n + 1 ↔ ¬ n < m; (s) ⊦ m < n ↔ ¬ n ≤ m; (ss) ⊦ m + 1 ≠ 0; (s) lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic eqle-one: ⊦ m = n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat ⊦ m < n → n ≠ 0; (s)

Proof step 58 from proof infinite-append-butlast (previous step) (back to tree)

# x = m0 + 1, ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), lf(m).head = lf(m + 1).head, lf(m).tail = [], ii(n) = m0 + 1, ii(m) = m0 + 1, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a ' + x0, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], m ≠ 0, a ∈ lf(m), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ≤ m0, ii(n0 + 1) ≤ m0 + 1, n ≤ m, ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ m0 + 1 < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ m0 = (n = 0 ⊃ 0;m0)

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-list-c, seq:x ≠ [] ⊦ a = x.head ∧ y = x.tail ↔ x = a + y, subst:[x, a, y] → [lf(m), a0, x1]

Additional information

Used simplifier rules: x ≠ [] ⊦ a = x.head ∧ y = x.tail ↔ x = a + y; (elim) Used terms: lf(m), a0, y

Proof step 59 from proof infinite-append-butlast (previous step) (back to tree)

# x = m0 + 1, ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), a0 = lf(m + 1).head, ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) = m0 + 1, ii(n) = m0 + 1, lf(m) = a ' + x0, lf(m) = a0 + x1, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), x1 = [], lf(m) ≠ [], m ≠ 0, a ∈ lf(m), n ≤ m, ii(n0 + 1) ≤ m0 + 1, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ≤ m0, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ m0 + 1 < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ x0 = [] ∧ m0 = (n = 0 ⊃ 0;m0)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ x + [] = x; (s) ⊦ a + x = a ' + x; (s)

Proof step 60 from proof infinite-append-butlast (previous step) (back to tree)

# x = m0 + 1, ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n) = m0 + 1, ii(m) = m0 + 1, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, lf(m) = a ' + x0, lf(m) = lf(m + 1).head ', (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), lf(m) ≠ [], m ≠ 0, a ∈ lf(m), (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ≤ m0, ii(n0 + 1) ≤ m0 + 1, n ≤ m, ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ m0 + 1 < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head ⊦ x0 = [] ∧ m0 = (n = 0 ⊃ 0;m0)

User applied rule subst equation

And obtained the following new goals

Rule argument

pos: left 7, flags: discard

Additional information

Proof step 61 from proof infinite-append-butlast (previous step) (back to tree)

# x = m0 + 1, a ' + x0 = lf(m + 1).head ', ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) = m0 + 1, ii(n) = m0 + 1, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), a ' + x0 ≠ [], m ≠ 0, a ∈ a ' + x0, n ≤ m, ii(n0 + 1) ≤ m0 + 1, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ≤ m0, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ m0 + 1 < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ x0 = [] ∧ m0 = (n = 0 ⊃ 0;m0)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ a ∈ a0 ' + x ↔ a = a0 ∨ a ∈ x; (s) ⊦ a ' + x ≠ []; (s) ⊦ a ' = a0 ' + x ↔ a = a0 ∧ x = []; (ws)

Proof step 62 from proof infinite-append-butlast (previous step) (back to tree)

# x = m0 + 1, ((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) = m0 + 1, ii(n) = m0 + 1, (x from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), m ≠ 0, m0 ≠ (n = 0 ⊃ 0;m0), n ≤ m, ii(n0 + 1) ≤ m0 + 1, (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ≤ m0, ∀ n1. x[ii(n1 + 1) - 1] = lf(n1 + 1).head, ∀ n1. ii(n1 + 1) = ii(n1) + # (n1 = 0 ⊃ lf(0);lf(n1).tail) ∧ ¬ m0 + 1 < ii(n1 + 1) ∧ (x from ii(n1)) to # (n1 = 0 ⊃ lf(0);lf(n1).tail) = (n1 = 0 ⊃ lf(0);lf(n1).tail), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule case distinction

And closed the goal!

Rule argument

pos: left 9

Additional information

Used simplifier rules: ⊦ 0 ≤ m; (s) ⊦ # x = 0 ↔ x = []; (s) ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; (ws) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic

Proof step 63 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , ⌜(n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1⌝ < # σ, ¬ finp(σ), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦ ∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ ⌜nf⌝ [n] = nf(n); (s) ⊦ ⌜x⌝ = ⌜x0⌝ ↔ x = x0; (s) ⊦ ⌜nf⌝ to n = ⌜nf to n⌝ ; (s) ⊦ ⌜nf⌝ from n = ⌜nf from n⌝ ; (s) ⊦ ¬ ∞ < n∞; (s) ⊦ # ⌜nf⌝ = ∞; (s) ⊦ ¬ finp(⌜nf⌝ ); (s) ⊦ finp(σ) ↔ ¬(∃ nf. ⌜nf⌝ = σ); (ss) ⊦ ⌜m⌝ < ∞; (s) ⊦ ¬ finp(σ) → # σ = ∞; (s)

Proof step 64 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (nf from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ (nf from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = (n = 0 ⊃ lf(0);lf(n).tail), ∀ n. nf(ii(n + 1) - 1) = lf(n + 1).head ⊦ ∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 8 terms: n2 + 1 abort: F discard: T computed: F

Additional information

Used terms: n2 + 1

Proof step 65 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (nf from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), ∀ n. nf(ii(n + 1) - 1) = lf(n + 1).head, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ (nf from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = (n = 0 ⊃ lf(0);lf(n).tail), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∃ m. ii(m) ≤ n2 + 1 ∧ n2 + 1 < ii(m + 1) ⊦ ∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic

Proof step 66 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(0) = 0, ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), (nf from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(m) < ii(m + 1), n2 + 1 < ii(m + 1), ii(m) ≤ n2 + 1, ∀ n. nf(ii(n + 1) - 1) = lf(n + 1).head, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ (nf from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = (n = 0 ⊃ lf(0);lf(n).tail), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ ∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1

User applied rule exists right

And obtained the following new goals

Rule argument

pos: right 1 terms: m abort: F discard: T computed: F

Additional information

Used terms: m

Proof step 67 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (nf from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), n2 + 1 < ii(m + 1), ii(m) < ii(m + 1), ii(m) ≤ n2 + 1, ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ (nf from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = (n = 0 ⊃ lf(0);lf(n).tail), ∀ n. nf(ii(n + 1) - 1) = lf(n + 1).head ⊦ (m = 0 ⊃ 0;ii(m) - 1) ≤ n2 ∧ n2 < ii(m + 1) - 1

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic le-one: ⊦ m ≤ n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ m ≤ n ↔ ¬ n < m; (ss) n0 ≤ n ⊦ m < n - n0 ↔ m + n0 < n; (s) ⊦ m < 1 ↔ m = 0; (s)

Proof step 68 from proof infinite-append-butlast (previous step) (back to tree)

((n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1) + 1 = ii(n0 + 1), ii(n0 + 1) = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, (nf from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = (n0 = 0 ⊃ lf(0);lf(n0).tail), n2 < (m = 0 ⊃ 0;ii(m) - 1), n2 + 1 < ii(m + 1), ii(m) < ii(m + 1), ii(m) ≤ (m = 0 ⊃ 0;ii(m) - 1), ii(m) ≤ n2 + 1, ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ (nf from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = (n = 0 ⊃ lf(0);lf(n).tail), ∀ n. nf(ii(n + 1) - 1) = lf(n + 1).head ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 10 terms: m

Additional information

Used simplifier rules: ⊦ m ≤ 0 ↔ m = 0; (s) ⊦ ¬ n < 0; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m < 1 ↔ m = 0; (s) n0 ≤ n ⊦ m < n - n0 ↔ m + n0 < n; (s) ⊦ m ≤ n → (n < m ↔ false); (s) Used terms: m

Proof step 69 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, ii(n0 + 1) = m1 + 1, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m1 ≠ (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ m1 = (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1 ∧ (σ from (n0 = 0 ⊃ 0;ii(n0) - 1)) to # lf(n0) = ⌜lf(n0)⌝ ∧ (m ≤ n1 → (m = 0 ⊃ 0;ii(m) - 1) ≤ (n1 = 0 ⊃ 0;ii(n1) - 1)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜(n = 0 ⊃ 0;ii(n) - 1)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ (m = 0 ⊃ 0;ii(m) - 1) = (n = 0 ⊃ 0;ii(n) - 1)) ;∃ m0. (m0 = 0 ⊃ 0;ii(m0) - 1) ≤ n2 ∧ n2 < ii(m0 + 1) - 1 )

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 70 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(n0 + 1) = m1 + 1, ii(0) = 0, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m1 ≠ (n0 = 0 ⊃ 0;ii(n0) - 1) + # lf(n0) - 1, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 5

Additional information

Used simplifier rules: ⊦ σ from 0 = σ; (s) ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s) ⊦ n + 0 = n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic

Proof step 71 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # (n0 = 0 ⊃ lf(0);lf(n0).tail), ii(0) = 0, ii(n0 + 1) = m1 + 1, (σ from ii(n0)) to # (n0 = 0 ⊃ lf(0);lf(n0).tail) = ⌜(n0 = 0 ⊃ lf(0);lf(n0).tail)⌝ , m1 ≠ (ii(n0) - 1) + # lf(n0) - 1, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 72 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # lf(n0).tail, ii(n0 + 1) = m1 + 1, ii(0) = 0, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m1 ≠ (ii(n0) - 1) + # lf(n0) - 1, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [(ii(n0) - 1) + # lf(n0), m0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: (ii(n0) - 1) + # lf(n0), m0

Proof step 73 from proof infinite-append-butlast (previous step) (back to tree)

(ii(n0) - 1) + # lf(n0) = 0, m1 + 1 = ii(n0) + # lf(n0).tail, ii(0) = 0, ii(n0 + 1) = m1 + 1, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m1 ≠ (ii(n0) - 1) + # lf(n0) - 1, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ # [] = 0; (s) ⊦ # x = 0 ↔ x = []; (s) ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; (ws)

Proof step 74 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # [].tail, ii(n0) - 1 = 0, ii(0) = 0, ii(n0 + 1) = m1 + 1, lf(n0) = [], (σ from ii(n0)) to # [].tail = ⌜[].tail⌝ , m1 ≠ 0 - 1, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 12 terms: n0

Additional information

Used terms: n0

Proof step 75 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # lf(n0).tail, (ii(n0) - 1) + # lf(n0) = m0 + 1, ii(0) = 0, ii(n0 + 1) = m1 + 1, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , (ii(n0) - 1) + # lf(n0) ≠ 0, m1 ≠ m0, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 76 from proof infinite-append-butlast (previous step) (back to tree)

m1 + 1 = ii(n0) + # lf(n0).tail, (ii(n0) - 1) + # lf(n0) = m0 + 1, ii(0) = 0, ii(n0 + 1) = m1 + 1, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m1 ≠ m0, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n0), m2]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n0), m2

Proof step 77 from proof infinite-append-butlast (previous step) (back to tree)

(ii(n0) - 1) + # lf(n0) = m0 + 1, m1 + 1 = ii(n0) + # lf(n0).tail, ii(n0) = 0, ii(n0 + 1) = m1 + 1, ii(0) = 0, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m1 ≠ m0, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ σ from 0 = σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ n + 0 = n; (s)

Proof step 78 from proof infinite-append-butlast (previous step) (back to tree)

(0 - 1) + # lf(n0) = m0 + 1, m1 + 1 = # lf(n0).tail, ii(n0) = 0, ii(n0 + 1) = m1 + 1, ii(0) = 0, σ to m1 + 1 = ⌜lf(n0).tail⌝ , m1 ≠ m0, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 11 terms: n0

Additional information

Used terms: n0

Proof step 79 from proof infinite-append-butlast (previous step) (back to tree)

m2 + # lf(n0) = m0 + 1, m1 + 1 = ii(n0) + # lf(n0).tail, ii(n0 + 1) = m1 + 1, ii(0) = 0, ii(n0) = m2 + 1, (σ from ii(n0)) to # lf(n0).tail = ⌜lf(n0).tail⌝ , ii(n0) ≠ 0, m1 ≠ m0, n0 ≠ 0, ⌜m1⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⊦ m + 1 ≠ 0; (s) ⊦ m + n = m + n0 ↔ n = n0; (s)

Proof step 80 from proof infinite-append-butlast (previous step) (back to tree)

m2 + # lf(n0) = m0 + 1, ii(n0) = m2 + 1, ii(0) = 0, ii(n0 + 1) = (m2 + # lf(n0).tail) + 1, (σ from m2 + 1) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m2 + # lf(n0).tail ≠ m0, n0 ≠ 0, ⌜m2⌝ + ⌜# lf(n0).tail⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-add, seq: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail), subst:[x, head, tail] → [lf(n0), a, x0]

Additional information

Used simplifier rules: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail); (elim) Used terms: lf(n0), head, tail

Proof step 81 from proof infinite-append-butlast (previous step) (back to tree)

m2 + # lf(n0) = m0 + 1, ii(n0 + 1) = (m2 + # lf(n0).tail) + 1, ii(0) = 0, ii(n0) = m2 + 1, lf(n0) = [], (σ from m2 + 1) to # lf(n0).tail = ⌜lf(n0).tail⌝ , m2 + # lf(n0).tail ≠ m0, n0 ≠ 0, ⌜m2⌝ + ⌜# lf(n0).tail⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⊦ m + 1 ≠ 0; (s) ⊦ m = m + n ↔ n = 0; (s) ⊦ n + 0 = n; (s) ⊦ # [] = 0; (s)

Proof step 82 from proof infinite-append-butlast (previous step) (back to tree)

ii(n0) = 2 + m0, ii(0) = 0, ii(n0 + 1) = 2 + m0 + # [].tail, lf(n0) = [], (σ from 2 + m0) to # [].tail = ⌜[].tail⌝ , n0 ≠ 0, (⌜m0⌝ + ⌜1⌝ ) + ⌜# [].tail⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 10 terms: n0

Additional information

Used terms: n0

Proof step 83 from proof infinite-append-butlast (previous step) (back to tree)

m2 + # lf(n0) = m0 + 1, ii(n0 + 1) = (m2 + # x0) + 1, ii(0) = 0, ii(n0) = m2 + 1, lf(n0) = a + x0, (σ from m2 + 1) to # x0 = ⌜x0⌝ , m2 + # x0 ≠ m0, lf(n0) ≠ [], n0 ≠ 0, ⌜m2⌝ + ⌜# x0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 84 from proof infinite-append-butlast (previous step) (back to tree)

m2 + # lf(n0) = m0 + 1, ii(n0) = m2 + 1, ii(0) = 0, ii(n0 + 1) = (m2 + # x0) + 1, lf(n0) = a ' + x0, (σ from m2 + 1) to # x0 = ⌜x0⌝ , m2 + # x0 ≠ m0, lf(n0) ≠ [], n0 ≠ 0, ⌜m2⌝ + ⌜# x0⌝ < # σ, a ∈ lf(n0), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule subst equation

And closed the goal!

Rule argument

pos: left 5, flags: discard

Additional information

Used simplifier rules: ⊦ #(a ' + x) = (# x)+1; (s) ⊦ m +1 = m + 1; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ m + n = m + n0 ↔ n = n0; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic

Proof step 85 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∀ n. σ[ii(n + 1) - 1] = lf(n + 1).head, ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 86 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(n0 + 1) - 1] ≠ lf(n0 + 1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule weakening

And obtained the following new goals

Rule argument

poslist: right 1

Additional information

Proof step 87 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(n0 + 1) - 1] ≠ lf(n0 + 1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule structural induction

And obtained the following new goals

Rule argument

indvar: n0

Additional information

Used simplifier rules: nat freely generated by 0, +1;;

Proof step 88 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(0 + 1) - 1] ≠ lf(0 + 1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic

Proof step 89 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(1) - 1] ≠ lf(1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 5 terms: 0 abort: F discard: F computed: F

Additional information

Used terms: 0

Proof step 90 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(0 + 1) = ii(0) + # (0 = 0 ⊃ lf(0);lf(0).tail), (σ from ii(0)) to # (0 = 0 ⊃ lf(0);lf(0).tail) = ⌜(0 = 0 ⊃ lf(0);lf(0).tail)⌝ , σ[ii(1) - 1] ≠ lf(1).head, ¬ # σ < ⌜ii(0 + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ σ from 0 = σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ n + 0 = n; (s)

Proof step 91 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(1) = # lf(0), σ to ii(1) = ⌜lf(0)⌝ , σ[ii(1) - 1] ≠ lf(1).head, ¬ # σ < ⌜ii(1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 7 terms: 0 abort: F discard: F computed: T

Additional information

Used terms: 0

Proof step 92 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(0 + 1).head, ii(1) = # lf(0), ii(0) = 0, σ to ii(1) = ⌜lf(0)⌝ , σ[ii(1) - 1] ≠ lf(1).head, lf(0) ≠ [], ¬ # σ < ⌜ii(1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic

Proof step 93 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, ii(0) = 0, ii(1) = # lf(0), σ to ii(1) = ⌜lf(0)⌝ , σ[ii(1) - 1] ≠ lf(1).head, lf(0) ≠ [], ¬ # σ < ⌜ii(1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(1), m0]

Additional information

Used simplifier rules: ⊦ # x = 0 ↔ x = []; (s) n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(1), m0

Proof step 94 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, ii(1) = # lf(0), ii(0) = 0, ii(1) = m0 + 1, σ to ii(1) = ⌜lf(0)⌝ , σ[m0] ≠ lf(1).head, ii(1) ≠ 0, lf(0) ≠ [], ¬ # σ < ⌜ii(1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf ⊦ # σ < ⌜n⌝ + ⌜1⌝ ↔ ¬ ⌜n⌝ < # σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⊦ m + 1 ≠ 0; (s)

Proof step 95 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), lf(0).last = lf(1).head, ii(0) = 0, ii(1) = m0 + 1, σ to m0 + 1 = ⌜lf(0)⌝ , σ[m0] ≠ lf(1).head, lf(0) ≠ [], ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-add, seq: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail), subst:[x, head, tail] → [lf(1), a, x0]

Additional information

Used simplifier rules: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail); (elim) Used terms: lf(1), head, tail

Proof step 96 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), lf(0).last = lf(1).head, ii(1) = m0 + 1, ii(0) = 0, lf(1) = [], σ to m0 + 1 = ⌜lf(0)⌝ , σ[m0] ≠ lf(1).head, lf(0) ≠ [], ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 97 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), lf(0).last = [].head, ii(0) = 0, ii(1) = m0 + 1, lf(1) = [], σ to m0 + 1 = ⌜lf(0)⌝ , σ[m0] ≠ [].head, lf(0) ≠ [], ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 14 terms: 1

Additional information

Used terms: 1

Proof step 98 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), lf(0).last = a, ii(1) = m0 + 1, ii(0) = 0, lf(1) = a + x0, σ to m0 + 1 = ⌜lf(0)⌝ , σ[m0] ≠ a, lf(1) ≠ [], lf(0) ≠ [], ⌜m0⌝ < # σ, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 99 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), ii(0) = 0, ii(1) = m0 + 1, lf(1) = lf(0).last ' + x0, σ to m0 + 1 = ⌜lf(0)⌝ , σ[m0] ≠ lf(0).last, lf(1) ≠ [], lf(0) ≠ [], ⌜m0⌝ < # σ, lf(0).last ∈ lf(1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:to-unwind-end, seq:⌜n⌝ < # σ ⊦ σ to n + 1 = (σ to n) + ⌜σ[n] '⌝ , subst:[n, σ] → [m0, σ], <all paths>

Additional information

Used terms: m0, σ

Proof step 100 from proof infinite-append-butlast (previous step) (back to tree)

⌜n⌝ < # σ ⊦ σ to n + 1 = (σ to n) + ⌜σ[n] '⌝

A spec-lemma

Proof step 101 from proof infinite-append-butlast (previous step) (back to tree)

(σ to m0) + ⌜σ[m0] '⌝ = ⌜lf(0)⌝ , m0 + 1 = # lf(0), ii(1) = m0 + 1, ii(0) = 0, lf(1) = lf(0).last ' + x0, σ[m0] ≠ lf(0).last, lf(1) ≠ [], lf(0) ≠ [], ⌜m0⌝ < # σ, lf(0).last ∈ lf(1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-last, name:last-elim, seq:x ≠ [] ⊦ a = x.last ∧ y = x.butlast ↔ x = y + a ', subst:[x, a, y] → [lf(0), a, x1]

Additional information

Used simplifier rules: x ≠ [] ⊦ a = x.last ∧ y = x.butlast ↔ x = y + a '; (elim) Used terms: lf(0), a, y

Proof step 102 from proof infinite-append-butlast (previous step) (back to tree)

m0 + 1 = # lf(0), (σ to m0) + ⌜σ[m0] '⌝ = ⌜lf(0)⌝ , ii(0) = 0, ii(1) = m0 + 1, lf(1) = a ' + x0, lf(0) = x1 + a ', σ[m0] ≠ a, lf(1) ≠ [], lf(0) ≠ [], ⌜m0⌝ < # σ, a ∈ lf(1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule subst equation

And obtained the following new goals

Rule argument

pos: left 6, flags: discard

Additional information

Proof step 103 from proof infinite-append-butlast (previous step) (back to tree)

(σ to m0) + ⌜σ[m0] '⌝ = ⌜x1 + a '⌝ , m0 + 1 = #(x1 + a '), ii(1) = m0 + 1, ii(0) = 0, lf(1) = a ' + x0, x1 + a ' ≠ [], σ[m0] ≠ a, lf(1) ≠ [], ⌜m0⌝ < # σ, a ∈ lf(1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ x1 + a ';lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ x1 + a ';lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ x1 + a ';lf(n).tail) = ⌜(n = 0 ⊃ x1 + a ';lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ x + a ' ≠ []; (s) ⊦ ⌜x + y⌝ = ⌜x⌝ + ⌜y⌝ ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + n = m + n0 ↔ n = n0; (s) ⊦ # a ' = 0 +1; (s) ⊦ #(x + y) = # x + # y; (s)

Proof step 104 from proof infinite-append-butlast (previous step) (back to tree)

(σ to # x1) + ⌜σ[# x1] '⌝ = ⌜x1⌝ + ⌜a '⌝ , ii(1) = # x1 + 1, ii(0) = 0, lf(1) = a ' + x0, σ[# x1] ≠ a, lf(1) ≠ [], ⌜# x1⌝ < # σ, a ∈ lf(1), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ x1 + a ';lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ x1 + a ';lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ x1 + a ';lf(n).tail) = ⌜(n = 0 ⊃ x1 + a ';lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:append-split, seq: ⊦ finp(σ) ∧ # σ = # σ1 → (σ + σ0 = σ1 + σ2 ↔ σ = σ1 ∧ σ0 = σ2), subst:[σ2, σ1, σ0, σ] → [⌜a '⌝ , ⌜x1⌝ , ⌜σ[# x1] '⌝ , σ to # x1], <all paths>

Additional information

Used simplifier rules: ⊦ ⌜x⌝ = ⌜x0⌝ ↔ x = x0; (s) ⊦ a ' = a0 ' ↔ a = a0; (s) ⊦ finp(σ to m); (s) ⊦ n∞ < n∞0 → ¬ n∞0 < n∞; (s) ¬ # σ < ⌜n⌝ ⊦ #(σ to n) = ⌜n⌝ ; (s) ⊦ # ⌜x⌝ = ⌜# x⌝ ; (s) ⊦ ⌜n⌝ = ⌜n0⌝ ↔ n = n0; (s) Used terms: ⌜a '⌝ , ⌜x1⌝ , ⌜σ[# x1] '⌝ , σ to # x1

Proof step 105 from proof infinite-append-butlast (previous step) (back to tree)

⊦ finp(σ) ∧ # σ = # σ1 → (σ + σ0 = σ1 + σ2 ↔ σ = σ1 ∧ σ0 = σ2)

A spec-lemma

Proof step 106 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(n1 +1 + 1) - 1] ≠ lf(n1 +1 + 1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ ii, σ, lf, n. ¬ ( ii(0) = 0 ∧ σ[ii(n1 + 1) - 1] ≠ lf(n1 + 1).head ∧ (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)) ∧ (∀ n. n ≠ 0 → ii(n) ≠ 0) ∧ (∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [])) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ m +1 = m + 1; (s)

Proof step 107 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ ii0, σ0, lf0, n0. ii0(0) ≠ 0 ∨ σ0[ii0(n1 + 1) - 1] = lf0(n1 + 1).head ∨ ¬ (finp(σ0) ⊃ # σ0 = ⌜ii0(n0)⌝ ∧ (∀ m. n0 ≤ m → (m = 0 ⊃ lf0(0);lf0(m).tail) = [] ∧ ii0(m) = ii0(n0));∀ n. ∃ m. ii0(m) ≤ n ∧ n < ii0(m + 1)) ∨ ¬(∀ n. n ≠ 0 → ii0(n) ≠ 0) ∨ ¬ (∀ n. ii0(n + 1) = ii0(n) + # (n = 0 ⊃ lf0(0);lf0(n).tail) ∧ ¬ # σ0 < ⌜ii0(n + 1)⌝ ∧ (σ0 from ii0(n)) to # (n = 0 ⊃ lf0(0);lf0(n).tail) = ⌜(n = 0 ⊃ lf0(0);lf0(n).tail)⌝ ) ∨ ¬(∀ m, n. m ≤ n → ii0(m) ≤ ii0(n)) ∨ ¬(∀ n. lf0(n).last = lf0(n + 1).head ∧ lf0(n) ≠ []) ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 8 terms: ii, σ, lf, n abort: F discard: T computed: T

Additional information

Used terms: ii, σ, lf, n

Proof step 108 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ n. n ≠ 0 → ii(n) ≠ 0, ii(0) ≠ 0 ∨ σ[ii(n1 + 1) - 1] = lf(n1 + 1).head ∨ ¬ (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)) ∨ ¬(∀ n. n ≠ 0 → ii(n) ≠ 0) ∨ ¬ (∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ) ∨ ¬(∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∨ ¬(∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ []) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 109 from proof infinite-append-butlast (previous step) (back to tree)

σ[ii(n1 + 1) - 1] = lf(n1 + 1).head, ii(0) = 0, σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 6 terms: n1 + 1 abort: F discard: T computed: F

Additional information

Used terms: n1 + 1

Proof step 110 from proof infinite-append-butlast (previous step) (back to tree)

σ[ii(n1 + 1) - 1] = lf(n1 + 1).head, ii(0) = 0, ii((n1 + 1) + 1) = ii(n1 + 1) + # (n1 + 1 = 0 ⊃ lf(0);lf(n1 + 1).tail), (σ from ii(n1 + 1)) to # (n1 + 1 = 0 ⊃ lf(0);lf(n1 + 1).tail) = ⌜(n1 + 1 = 0 ⊃ lf(0);lf(n1 + 1).tail)⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii((n1 + 1) + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 111 from proof infinite-append-butlast (previous step) (back to tree)

σ[ii(n1 + 1) - 1] = lf(n1 + 1).head, ii(0) = 0, ii(2 + n1) = ii(n1 + 1) + # lf(n1 + 1).tail, (σ from ii(n1 + 1)) to # lf(n1 + 1).tail = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [ii(n1 + 1), m0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: ii(n1 + 1), m0

Proof step 112 from proof infinite-append-butlast (previous step) (back to tree)

σ[ii(n1 + 1) - 1] = lf(n1 + 1).head, ii(n1 + 1) = 0, ii(2 + n1) = ii(n1 + 1) + # lf(n1 + 1).tail, ii(0) = 0, (σ from ii(n1 + 1)) to # lf(n1 + 1).tail = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ σ from 0 = σ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ n + 0 = n; (s)

Proof step 113 from proof infinite-append-butlast (previous step) (back to tree)

σ[0 - 1] = lf(n1 + 1).head, ii(n1 + 1) = 0, ii(2 + n1) = # lf(n1 + 1).tail, ii(0) = 0, σ to ii(2 + n1) = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 11 terms: n1 + 1

Additional information

Used simplifier rules: ⊦ m + 1 ≠ 0; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic Used terms: n1 + 1

Proof step 114 from proof infinite-append-butlast (previous step) (back to tree)

σ[m0] = lf(n1 + 1).head, ii(2 + n1) = ii(n1 + 1) + # lf(n1 + 1).tail, ii(0) = 0, ii(n1 + 1) = m0 + 1, (σ from ii(n1 + 1)) to # lf(n1 + 1).tail = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ii(n1 + 1) ≠ 0, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≠ 0; (s)

Proof step 115 from proof infinite-append-butlast (previous step) (back to tree)

σ[m0] = lf(n1 + 1).head, ii(2 + n1) = (m0 + 1) + # lf(n1 + 1).tail, ii(0) = 0, ii(n1 + 1) = m0 + 1, (σ from m0 + 1) to # lf(n1 + 1).tail = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-add, seq: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail), subst:[x, head, tail] → [lf(n1 + 1), a, x0]

Additional information

Used simplifier rules: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail); (elim) Used terms: lf(n1 + 1), head, tail

Proof step 116 from proof infinite-append-butlast (previous step) (back to tree)

σ[m0] = lf(n1 + 1).head, ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # lf(n1 + 1).tail, lf(n1 + 1) = [], (σ from m0 + 1) to # lf(n1 + 1).tail = ⌜lf(n1 + 1).tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 117 from proof infinite-append-butlast (previous step) (back to tree)

σ[m0] = [].head, ii(2 + n1) = (m0 + 1) + # [].tail, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(n1 + 1) = [], (σ from m0 + 1) to # [].tail = ⌜[].tail⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 10 terms: n1 + 1

Additional information

Used terms: n1 + 1

Proof step 118 from proof infinite-append-butlast (previous step) (back to tree)

σ[m0] = a, ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(n1 + 1) = a + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[ii(2 + n1) - 1] ≠ lf(2 + n1).head, lf(n1 + 1) ≠ [], ¬ # σ < ⌜ii(2 + n1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⊦ n + 0 = n; (s) ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s) a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 119 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(n1 + 1) = σ[m0] ' + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ lf(2 + n1).head, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-data, name:elim-add, seq: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail), subst:[x, head, tail] → [lf(2 + n1), a, x1]

Additional information

Used simplifier rules: ⊦ x ≠ [] → (head = x.head ∧ tail = x.tail ↔ x = head + tail); (elim) Used terms: lf(2 + n1), head, tail

Proof step 120 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = [], lf(n1 + 1) = σ[m0] ' + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ lf(2 + n1).head, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 121 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(n1 + 1) = σ[m0] ' + x0, lf(2 + n1) = [], (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ [].head, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 14 terms: 2 + n1

Additional information

Used terms: 2 + n1

Proof step 122 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(n1 + 1) = σ[m0] ' + x0, lf(2 + n1) = a + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ a, lf(2 + n1) ≠ [], lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ a ∈ a0 ' + x ↔ a = a0 ∨ a ∈ x; (s) ⊦ a ' + x ≠ []; (s) in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a + x = a ' + x; (s)

Proof step 123 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(n1 + 1) = σ[m0] ' + x0, lf(2 + n1) = a ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ a, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 14 terms: n1 + 1 abort: F discard: T computed: T

Additional information

Used terms: n1 + 1

Proof step 124 from proof infinite-append-butlast (previous step) (back to tree)

lf(n1 + 1).last = lf((n1 + 1) + 1).head, ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, lf(n1 + 1) = σ[m0] ' + x0, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ a, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ (a ' + x).head = a; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic

Proof step 125 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(n1 + 1) = σ[m0] ' + x0, lf(2 + n1) = lf(n1 + 1).last ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ lf(n1 + 1).last, lf(n1 + 1) ≠ [], σ[m0] ∈ lf(n1 + 1), lf(n1 + 1).last ∈ lf(2 + n1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule subst equation

And obtained the following new goals

Rule argument

pos: left 4, flags: discard

Additional information

Proof step 126 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = (σ[m0] ' + x0).last ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0] ' + x0 ≠ [], σ[m0 + # x0] ≠ (σ[m0] ' + x0).last, (σ[m0] ' + x0).last ∈ lf(2 + n1), σ[m0] ∈ σ[m0] ' + x0, ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ a ∈ a0 ' + x ↔ a = a0 ∨ a ∈ x; (s) ⊦ a ' + x ≠ []; (s)

Proof step 127 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(2 + n1) = (σ[m0] ' + x0).last ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ (σ[m0] ' + x0).last, (σ[m0] ' + x0).last ∈ lf(2 + n1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: list-last, name:lapp, seq: ⊦ y ≠ [] → (x + y).last = y.last, subst:[y, x] → [x0, σ[m0] '], <all paths>

Additional information

Used simplifier rules: ⊦ σ to 0 = []; (s) ⊦ ⌜[]⌝ = []; (s) ⊦ # [] = 0; (s) ⊦ n + 0 = n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ x + [] = x; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ a '.last = a; (s) Used terms: x0, σ[m0] '

Proof step 128 from proof infinite-append-butlast (previous step) (back to tree)

⊦ y ≠ [] → (x + y).last = y.last

A spec-lemma

Proof step 129 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = x0.last ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ x0.last, x0 ≠ [], x0.last ∈ lf(2 + n1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list

Proof step 130 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = (m0 + 1) + # x0, lf(2 + n1) = x0.last ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , σ[m0 + # x0] ≠ x0.last, x0 ≠ [], x0.last ∈ lf(2 + n1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: list-last, name:last-elim, seq:x ≠ [] ⊦ a = x.last ∧ y = x.butlast ↔ x = y + a ', subst:[x, a, y] → [x0, a, x2]

Additional information

Used simplifier rules: x ≠ [] ⊦ a = x.last ∧ y = x.butlast ↔ x = y + a '; (elim) Used terms: x0, a, y

Proof step 131 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = (m0 + 1) + # x0, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, (σ from m0 + 1) to # x0 = ⌜x0⌝ , x0 = x2 + a ', σ[m0 + # x0] ≠ a, x0 ≠ [], a ∈ lf(2 + n1), ¬ # σ < ⌜m0⌝ + ⌜1⌝ + ⌜# x0⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ a ∈ a0 ' + x ↔ a = a0 ∨ a ∈ x; (s) in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜(* n)⌝ + ⌜(* m)⌝ = ⌜n + m⌝ ; (s) ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⊦ # a ' = 0 +1; (s) ⊦ #(x + y) = # x + # y; (s) ⊦ x + a ' ≠ []; (s) ⊦ ⌜x + y⌝ = ⌜x⌝ + ⌜y⌝ ; (s)

Proof step 132 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = 2 + m0 + # x2, lf(2 + n1) = a ' + x1, (σ from m0 + 1) to # x2 + 1 = ⌜x2⌝ + ⌜a '⌝ , σ[m0 + # x2 + 1] ≠ a, ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:to-unwind-end, seq:⌜n⌝ < # σ ⊦ σ to n + 1 = (σ to n) + ⌜σ[n] '⌝ , subst:[n, σ] → [# x2, σ from m0 + 1], <all paths>

Additional information

Used simplifier rules: ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n + m < n0; (s) ⊦ ¬ m + n < m; (s) ⌜n⌝ < # σ ⊦ ⌜n0⌝ < #(σ from n) ↔ ⌜n0 + n⌝ < # σ; (s) ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic lele-trans: ⊦ ¬ n∞1 < n∞ ∧ ¬ n∞2 < n∞1 → ¬ n∞2 < n∞; (forward) from specification nat-inf ⊦ m ≤ n → (⌜(* m)⌝ + n∞2 < ⌜(* n)⌝ + n∞1 ↔ n∞2 < ⌜n - m⌝ + n∞1); (s) ⊦ ⌜n⌝ + n∞1 < ⌜n⌝ + n∞2 ↔ n∞1 < n∞2; (s) ⊦ ⌜n⌝ < ⌜1⌝ + n∞ ↔ ¬ n∞ < ⌜n⌝ ; (s) ⊦ ⌜m⌝ < ⌜n⌝ ↔ m < n; (s) ⊦ ¬ n < n; (s) add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf Used terms: # x2, σ from m0 + 1

Proof step 133 from proof infinite-append-butlast (previous step) (back to tree)

⌜n⌝ < # σ ⊦ σ to n + 1 = (σ to n) + ⌜σ[n] '⌝

A spec-lemma

Proof step 134 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(2 + n1) = 2 + m0 + # x2, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ < #(σ from m0 + 1), ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) ⌜n⌝ < # σ ⊦ ⌜n0⌝ < #(σ from n) ↔ ⌜n0 + n⌝ < # σ; (s) add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf ⊦ ¬ m + n < m; (s) ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n + m < n0; (s) ⊦ ⌜n⌝ < ⌜1⌝ + n∞ ↔ ¬ n∞ < ⌜n⌝ ; (s) ⊦ m ≤ n → (⌜(* m)⌝ + n∞2 < ⌜(* n)⌝ + n∞1 ↔ n∞2 < ⌜n - m⌝ + n∞1); (s) lele-trans: ⊦ ¬ n∞1 < n∞ ∧ ¬ n∞2 < n∞1 → ¬ n∞2 < n∞; (forward) from specification nat-inf

Proof step 135 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = 2 + m0 + # x2, lf(2 + n1) = a ' + x1, σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:append-split, seq: ⊦ finp(σ) ∧ # σ = # σ1 → (σ + σ0 = σ1 + σ2 ↔ σ = σ1 ∧ σ0 = σ2), subst:[σ2, σ1, σ0, σ] → [⌜a '⌝ , ⌜x2⌝ , ⌜(σ from m0 + 1)[# x2] '⌝ , (σ from m0 + 1) to # x2], <all paths>

Additional information

Used terms: ⌜a '⌝ , ⌜x2⌝ , ⌜(σ from m0 + 1)[# x2] '⌝ , (σ from m0 + 1) to # x2

Proof step 136 from proof infinite-append-butlast (previous step) (back to tree)

⊦ finp(σ) ∧ # σ = # σ1 → (σ + σ0 = σ1 + σ2 ↔ σ = σ1 ∧ σ0 = σ2)

A spec-lemma

Proof step 137 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(2 + n1) = 2 + m0 + # x2, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦ finp((σ from m0 + 1) to # x2) ∧ #((σ from m0 + 1) to # x2) = # ⌜x2⌝

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ # ⌜x⌝ = ⌜# x⌝ ; (s) ⊦ finp(σ to m); (s)

Proof step 138 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = 2 + m0 + # x2, lf(2 + n1) = a ' + x1, #((σ from m0 + 1) to # x2) ≠ ⌜# x2⌝ , σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:size-to, seq:¬ # σ < ⌜n⌝ ⊦ #(σ to n) = ⌜n⌝ , subst:[n, σ] → [# x2, σ from m0 + 1], <all paths>

Additional information

Used terms: # x2, σ from m0 + 1

Proof step 139 from proof infinite-append-butlast (previous step) (back to tree)

¬ # σ < ⌜n⌝ ⊦ #(σ to n) = ⌜n⌝

A spec-lemma

Proof step 140 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(2 + n1) = 2 + m0 + # x2, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, #((σ from m0 + 1) to # x2) ≠ ⌜# x2⌝ , σ[m0 + # x2 + 1] ≠ a, #(σ from m0 + 1) < ⌜# x2⌝ , ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 141 from proof infinite-append-butlast (previous step) (back to tree)

((σ from m0 + 1) to # x2) + ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜x2⌝ + ⌜a '⌝ , ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = 2 + m0 + # x2, lf(2 + n1) = a ' + x1, #((σ from m0 + 1) to # x2) ≠ ⌜# x2⌝ , σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, #(σ from m0 + 1) < ⌜# x2⌝ , ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:fin-size-from, seq: ⊦ ⌜n⌝ < # σ ∧ finp(σ) → #(σ from n) = ⌜(# σ).n - n⌝ , subst:[n, σ] → [m0 + 1, σ], <all paths>

Additional information

Used simplifier rules: ⊦ finp(σ) ↔ (∃ x. ⌜x⌝ = σ); (as) ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ ⌜m⌝ < ⌜n⌝ ↔ m < n; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ m < n ↔ ¬ n ≤ m; (ss) ⊦ ⌜x⌝ from n = ⌜x from n⌝ ; (s) ⊦ ⌜x⌝ to n = ⌜x to n⌝ ; (s) ⊦ ⌜n⌝ = ⌜n0⌝ ↔ n = n0; (s) ⊦ ⌜n⌝ .n = n; (s) ⊦ # ⌜x⌝ = ⌜# x⌝ ; (s) ⊦ ⌜n1⌝ + ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n1 + n + m < n0; (s) ⊦ m ≤ n → (n < m ↔ false); (s) add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf m + m0 < # x ⊦ (x from m)[m0] = x[m + m0]; (s) ⊦ ⌜x⌝ + ⌜y⌝ = ⌜x0⌝ + ⌜z⌝ ↔ x + y = x0 + z; (s) ⊦ x + a ' = y + a0 ' ↔ x = y ∧ a = a0; (ws) a: ⊦ (x + y) + z = x + y + z; from specification list append-assoc: ⊦ (σ + σ1) + σ2 = σ + σ1 + σ2; from specification stream-old ⊦ # x = 0 ↔ x = []; (s) ⊦ ⌜x⌝ [n] = x[n]; (s) lsle-trans: ⊦ n∞ < n∞1 ∧ ¬ n∞2 < n∞1 → n∞ < n∞2; (forward) from specification nat-inf lele-trans: ⊦ ¬ n∞1 < n∞ ∧ ¬ n∞2 < n∞1 → ¬ n∞2 < n∞; (forward) from specification nat-inf ⊦ m ≤ n → (⌜(* m)⌝ + n∞2 < ⌜(* n)⌝ + n∞1 ↔ n∞2 < ⌜n - m⌝ + n∞1); (s) ⊦ n∞ + ⌜0⌝ = n∞; (s) ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n + m < n0; (s) ⊦ ¬ m + n < m; (s) ⊦ n∞ < ∞ ↔ n∞ ≠ ∞; (s) ⊦ ⌜m⌝ + n∞ = ∞ ↔ n∞ = ∞; (s) ⊦ ⌜n⌝ ≠ ∞; (s) ⊦ ¬ finp(σ) → # σ = ∞; (s) ⊦ finp(σ) ↔ ¬(∃ nf. ⌜nf⌝ = σ); (ss) ⊦ ⌜nf⌝ from n = ⌜nf from n⌝ ; (s) ⊦ # ⌜nf⌝ = ∞; (s) ⊦ ¬ ∞ < n∞; (s) ¬ # σ < ⌜n⌝ ⊦ #(σ to n) = ⌜n⌝ ; (s) Used terms: m0 + 1, σ

Proof step 142 from proof infinite-append-butlast (previous step) (back to tree)

⊦ ⌜n⌝ < # σ ∧ finp(σ) → #(σ from n) = ⌜(# σ).n - n⌝

A spec-lemma

Proof step 143 from proof infinite-append-butlast (previous step) (back to tree)

#((σ from m0 + 1) to # x2) = # ⌜x2⌝ , ii(2 + n1) = 2 + m0 + # x2, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = a ' + x1, (σ from m0 + 1) to # x2 = ⌜x2⌝ , ⌜(σ from m0 + 1)[# x2] '⌝ = ⌜a '⌝ , σ[m0 + # x2 + 1] ≠ a, ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, finp((σ from m0 + 1) to # x2), ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list ⊦ ⌜n⌝ = ⌜n0⌝ ↔ n = n0; (s) ⊦ # ⌜x⌝ = ⌜# x⌝ ; (s) ⊦ finp(σ to m); (s) ⊦ a ' = a0 ' ↔ a = a0; (s) ⊦ ⌜x⌝ = ⌜x0⌝ ↔ x = x0; (s)

Proof step 144 from proof infinite-append-butlast (previous step) (back to tree)

ii(2 + n1) = 2 + m0 + # x2, ii(0) = 0, ii(n1 + 1) = m0 + 1, lf(2 + n1) = (σ from m0 + 1)[# x2] ' + x1, (σ from m0 + 1) to # x2 = ⌜x2⌝ , σ[m0 + # x2 + 1] ≠ (σ from m0 + 1)[# x2], ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, (σ from m0 + 1)[# x2] ∈ lf(2 + n1), ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. n ≠ 0 → ii(n) ≠ 0 ⊦

User applied rule subst equation

And obtained the following new goals

Rule argument

pos: left 1, flags:

Additional information

Proof step 145 from proof infinite-append-butlast (previous step) (back to tree)

ii(n1 + 1) = m0 + 1, ii(0) = 0, ii(2 + n1) = 2 + m0 + # x2, lf(2 + n1) = (σ from m0 + 1)[# x2] ' + x1, (σ from m0 + 1) to # x2 = ⌜x2⌝ , σ[m0 + # x2 + 1] ≠ (σ from m0 + 1)[# x2], ⌜# x2⌝ + ⌜m0⌝ + ⌜1⌝ < # σ, (σ from m0 + 1)[# x2] ∈ lf(2 + n1), ¬ # σ < ⌜2⌝ + ⌜m0⌝ + ⌜# x2⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. n ≠ 0 → ii(n) ≠ 0, ∀ m, n. m ≤ n → ii(m) ≤ ii(n) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: stream-old, name:get-from, seq: ⊦ ⌜n⌝ + ⌜m⌝ < # σ → (σ from n)[m] = σ[n + m], subst:[m, n, σ] → [# x2, m0 + 1, σ], <all paths>

Additional information

Used simplifier rules: a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s) add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf Used terms: # x2, m0 + 1, σ

Proof step 146 from proof infinite-append-butlast (previous step) (back to tree)

⊦ ⌜n⌝ + ⌜m⌝ < # σ → (σ from n)[m] = σ[n + m]

A spec-lemma

Proof step 147 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∀ n. n ≠ 0 → ii(n) ≠ 0, ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 148 from proof infinite-append-butlast (previous step) (back to tree)

ii(n0) = 0, ii(0) = 0, n0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 5 terms: n0 - 1 abort: F discard: F computed: F

Additional information

Used terms: n0 - 1

Proof step 149 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(n0) = 0, ii((n0 - 1) + 1) = ii(n0 - 1) + # (n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail), (σ from ii(n0 - 1)) to # (n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail) = ⌜(n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail)⌝ , n0 ≠ 0, ¬ # σ < ⌜ii((n0 - 1) + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 150 from proof infinite-append-butlast (previous step) (back to tree)

ii((n0 - 1) + 1) = ii(n0 - 1) + # (n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail), ii(n0) = 0, ii(0) = 0, (σ from ii(n0 - 1)) to # (n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail) = ⌜(n0 - 1 = 0 ⊃ lf(0);lf(n0 - 1).tail)⌝ , n0 ≠ 0, ¬ # σ < ⌜ii((n0 - 1) + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [n0, m0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: n0, m0

Proof step 151 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(n0) = 0, ii(m0 + 1) = ii(m0) + # (m0 = 0 ⊃ lf(0);lf(m0).tail), n0 = m0 + 1, (σ from ii(m0)) to # (m0 = 0 ⊃ lf(0);lf(m0).tail) = ⌜(m0 = 0 ⊃ lf(0);lf(m0).tail)⌝ , n0 ≠ 0, ¬ # σ < ⌜ii(m0 + 1)⌝ , (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ ⌜[]⌝ = []; (s) ⊦ σ to 0 = []; (s) ⊦ # [] = 0; (s) ⊦ σ from 0 = σ; (s) ⊦ ¬ n∞ < ⌜0⌝ ; (s) c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ # x = 0 ↔ x = []; (s) ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; (ws) ⊦ m + 1 ≠ 0; (s)

Proof step 152 from proof infinite-append-butlast (previous step) (back to tree)

(m0 = 0 ⊃ lf(0);lf(m0).tail) = [], ii(m0) = 0, ii(m0 + 1) = 0, ii(0) = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 1

Additional information

Proof step 153 from proof infinite-append-butlast (previous step) (back to tree)

ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, lf(0) = [], m0 = 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic

Proof step 154 from proof infinite-append-butlast (previous step) (back to tree)

ii(1) = 0, ii(0) = 0, lf(0) = [], (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m ≠ 0 → [] = lf(m).tail) ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ [];lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ [];lf(n).tail) = ⌜(n = 0 ⊃ [];lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 5 terms: 0

Additional information

Used terms: 0

Proof step 155 from proof infinite-append-butlast (previous step) (back to tree)

lf(m0).tail = [], ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 156 from proof infinite-append-butlast (previous step) (back to tree)

lf(m0).tail = [], ii(m0) = 0, ii(m0 + 1) = 0, ii(0) = 0, m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 9 terms: 0 abort: F discard: F computed: F

Additional information

Used terms: 0

Proof step 157 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(0 + 1).head, lf(m0).tail = [], ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, lf(0) ≠ [], m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic

Proof step 158 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, lf(m0).tail = [], ii(m0) = 0, ii(m0 + 1) = 0, ii(0) = 0, lf(0) ≠ [], m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 11 terms: 0 abort: F discard: F computed: F

Additional information

Used terms: 0

Proof step 159 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, lf(0).last = lf(0 + 1).head, lf(m0).tail = [], ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, lf(0) ≠ [], m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic

Proof step 160 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, lf(m0).tail = [], ii(m0) = 0, ii(m0 + 1) = 0, ii(0) = 0, lf(0) ≠ [], m0 ≠ 0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ , ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [] ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 10 terms: 1, m0 abort: F discard: F computed: F

Additional information

Used terms: 1, m0

Proof step 161 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, lf(m0).tail = [], ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, lf(0) ≠ [], m0 ≠ 0, 1 ≤ m0 → ii(1) ≤ ii(m0), (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: not-zero: 0 < n ⊦ (* n) ≤ m → m ≠ 0; (forward) from specification nat ⊦ m < 1 ↔ m = 0; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m ≤ 0 ↔ m = 0; (s)

Proof step 162 from proof infinite-append-butlast (previous step) (back to tree)

lf(0).last = lf(1).head, lf(m0).tail = [], ii(0) = 0, ii(m0 + 1) = 0, ii(m0) = 0, ii(1) = 0, lf(0) ≠ [], m0 ≠ 0, 1 ≤ m0, (finp(σ) ⊃ # σ = ⌜ii(n)⌝ ∧ (∀ m. n ≤ m → (m = 0 ⊃ lf(0);lf(m).tail) = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1)), ∀ n. lf(n).last = lf(n + 1).head ∧ lf(n) ≠ [], ∀ m, n. m ≤ n → ii(m) ≤ ii(n), ∀ n. ii(n + 1) = ii(n) + # (n = 0 ⊃ lf(0);lf(n).tail) ∧ ¬ # σ < ⌜ii(n + 1)⌝ ∧ (σ from ii(n)) to # (n = 0 ⊃ lf(0);lf(n).tail) = ⌜(n = 0 ⊃ lf(0);lf(n).tail)⌝ ⊦ ∃ σ, ii. ii(0) = 0 ∧ (∀ n. ii(n + 1) = ii(n) + # lf(n) - 1 ∧ ⌜ii(n + 1)⌝ < # σ ∧ (σ from ii(n)) to # lf(n) = ⌜lf(n)⌝ ) ∧ (∀ m, n. m ≤ n → ii(m) ≤ ii(n)) ∧ (finp(σ) ⊃ ∃ n. # σ = ⌜ii(n)⌝ + ⌜1⌝ ∧ (∀ m. n ≤ m → lf(m).tail = [] ∧ ii(m) = ii(n));∀ n. ∃ m. ii(m) ≤ n ∧ n < ii(m + 1))

User applied rule all left

And closed the goal!

Rule argument

pos: left 13 terms: 0 abort: F discard: T computed: F

Additional information

Used simplifier rules: ⊦ n + 0 = n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ # x = 0 ↔ x = []; (s) Used terms: 0

Proof Tree for infinite-append-butlast (View conclusion)

The following image shows the proof tree of sequent calculus. The proved goal is at the bottom. You can click on the nodes to view additional rules. See here for details on colors in a proof tree.

the proof tree