[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 countevn-bounded-ind (conclusion) (back to tree)

m ≤ n, n ≤ # a ⊦ countevn(a, m, n, p) ≤ (even(m) ⊃ (n + 1 - m) / 2;(n - m) / 2)

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof countevn-bounded-ind (previous step) (back to tree)

n ≤ # a, m ≤ n, ¬ countevn(a, m, n, p) ≤ (even(m) ⊃ (n + 1 - m) / 2;(n - m) / 2) ⊦

User applied rule structural induction

And obtained the following new goals

Rule argument

term: n

Additional information

Used simplifier rules: countevn-base: m ≤ # a ⊦ countevn(a, m, m, p) = 0; nat freely generated by 0, +1;; ⊦ m ≤ 0 ↔ m = 0; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ m ≤ n ↔ ¬ n < m; (ss) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ 0 ≤ m; (s)

Proof step 3 from proof countevn-bounded-ind (previous step) (back to tree)

m ≤ n0 +1, n0 +1 ≤ # a, ¬ countevn(a, m, n0 +1, p) ≤ (even(m) ⊃ (n0 +1 + 1 - m) / 2;(n0 +1 - m) / 2), ∀ a, m, p. ¬(n0 ≤ # a ∧ m ≤ n0 ∧ ¬ countevn(a, m, n0, p) ≤ (even(m) ⊃ (n0 + 1 - m) / 2;(n0 - m) / 2)) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ # x = 0 ↔ x = []; (s) ⊦ m < n → n ≠ 0; (s) 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 le-one: ⊦ m ≤ n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m +1 = m + 1; (s) ⊦ m + 1 ≤ n ↔ m < n; (s)

Proof step 4 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], (even(m) ⊃ (2 + n0 - m) / 2;(n0 + 1 - m) / 2) < countevn(a, m, n0 + 1, p), n0 < # a, m ≤ # a, m ≤ n0 + 1, ∀ a0, m0, p0. ¬ n0 ≤ # a0 ∨ ¬ m0 ≤ n0 ∨ countevn(a0, m0, n0, p0) ≤ (even(m0) ⊃ ((n0 - m0) + 1) / 2;(n0 - m0) / 2) ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 6 terms: a, m, p abort: F discard: T computed: F

Additional information

Used terms: a, m, p

Proof step 5 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], n0 < # a, (even(m) ⊃ (2 + n0 - m) / 2;(n0 + 1 - m) / 2) < countevn(a, m, n0 + 1, p), m ≤ n0 + 1, m ≤ # a, ¬ n0 ≤ # a ∨ ¬ m ≤ n0 ∨ countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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

Proof step 6 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], (even(m) ⊃ (2 + n0 - m) / 2;(n0 + 1 - m) / 2) < countevn(a, m, n0 + 1, p), n0 < # a, m ≤ # a, m ≤ n0 + 1, ¬ m ≤ n0 ∨ countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:countevn-rec, seq:m ≤ n, n ≤ # a ⊦ countevn(a, m, n + 1, p) = countevn(a, m, n, p) + (even(n) ∧ p(a[n]) ⊃ 1;0), subst:[a, m, n, p] → [a, m, n0, p], <all paths>

Additional information

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

Proof step 7 from proof countevn-bounded-ind (previous step) (back to tree)

m ≤ n, n ≤ # a ⊦ countevn(a, m, n + 1, p) = countevn(a, m, n, p) + (even(n) ∧ p(a[n]) ⊃ 1;0)

Lemma countevn-rec

Proof step 8 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], n0 < # a, (even(m) ⊃ (2 + n0 - m) / 2;(n0 + 1 - m) / 2) < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), m ≤ n0 + 1, m ≤ # a, m ≤ n0, n0 ≤ # a, ¬ m ≤ n0 ∨ countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → m ≤ n; (s) fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s) ⊦ (m + 2) / 2 = m / 2 + 1; (s)

Proof step 9 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], m < # a, (even(m) ⊃ (n0 - m) / 2 + 1;((n0 - m) + 1) / 2) < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), n0 < # a, countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2), m ≤ n0 + 1, m ≤ n0 ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 3

Additional information

Proof step 10 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], n0 < # a, m < # a, (n0 - m) / 2 + 1 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), even(m), m ≤ n0, m ≤ n0 + 1, countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: m0 ≠ 0 ⊦ n ≤ m / m0 ↔ n * m0 ≤ m; (s)

Proof step 11 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], (n0 - m) / 2 + 1 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), m < # a, n0 < # a, even(m), m ≤ n0 + 1, m ≤ n0, countevn(a, m, n0, p) * 2 ≤ (n0 - m) + 1 ⊦

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-sub, seq:n ≤ m ⊦ n0 = m - n ↔ m = n0 + n, subst:[m, n, n0] → [n0, m, n1]

Additional information

Used simplifier rules: n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: n0, m, n1

Proof step 12 from proof countevn-bounded-ind (previous step) (back to tree)

n0 = n1 + m, a ≠ [], n0 < # a, m < # a, n1 / 2 + 1 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), even(m), countevn(a, m, n0, p) * 2 ≤ n1 + 1, m ≤ n0, m ≤ n0 + 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 ⊦ even(m) → (even(m + n) ↔ even(n)); (s) ⊦ m ≤ m + n; (s)

Proof step 13 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], m < # a, n1 + m < # a, n1 / 2 + 1 < countevn(a, m, n1 + m, p) + (even(n1) ∧ p(a[n1 + m]) ⊃ 1;0), even(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 + 1 ⊦

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat-div, name:div-elim, seq:n ≠ 0 ⊦ m0 = m / n ∧ n0 = m % n ↔ m = m0 * n + n0 ∧ n0 < n, subst:[m, n, m0, n0] → [n1, 2, m0, n0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m0 = m / n ∧ n0 = m % n ↔ m = m0 * n + n0 ∧ n0 < n; (elim) Used terms: n1, 2, m0, n0

Proof step 14 from proof countevn-bounded-ind (previous step) (back to tree)

n1 = m0 * 2 + n0, 2 ≠ 0, a ≠ [], m0 + 1 < countevn(a, m, n1 + m, p) + (even(n1) ∧ p(a[n1 + m]) ⊃ 1;0), n1 + m < # a, m < # a, n0 < 2, even(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 + 1 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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

Proof step 15 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], n0 < 2, m < # a, (m0 * 2 + n0) + m < # a, m0 + 1 < countevn(a, m, (m0 * 2 + n0) + m, p) + (even(m0 * 2 + n0) ∧ p(a[(m0 * 2 + n0) + m]) ⊃ 1;0), even(m), countevn(a, m, (m0 * 2 + n0) + m, p) * 2 ≤ (m0 * 2 + n0) + 1 ⊦

User applied rule constructor cut

And obtained the following new goals

Rule argument

var: n0

Additional information

Used simplifier rules: countevn-rec: m ≤ n, n ≤ # a ⊦ countevn(a, m, n + 1, p) = countevn(a, m, n, p) + (even(n) ∧ p(a[n]) ⊃ 1;0); nat freely generated by 0, +1;; ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; (ws) n < n0 ⊦ m + (* n) < (* n0) ↔ m < n0 - n; (s) ⊦ m < 1 ↔ m = 0; (s) ⊦ m ≤ m + n; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic trans-nat: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification nat-basic ⊦ m < n → n ≠ 0; (s) ⊦ m + n < m + n0 ↔ n < n0; (s) ⊦ ¬ m + n < m; (s) ⊦ even(m) → (even(m + n) ↔ even(n)); (s) ⊦ even(n + 1) ↔ odd(n); (s) ⊦ m +1 = m + 1; (s) ⊦ ¬ odd(2 * m); (s) ⊦ even(2 * m); (s) ⊦ n + 0 = n; (s) ⊦ m * n ≤ m1 * n + n ↔ m ≤ m1 + 1 ∨ n = 0; (s) ⊦ m < n → (n ≤ m ↔ false); (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult

Proof step 16 from proof countevn-bounded-ind (previous step) (back to tree)

n0 = 0, a ≠ [], m0 + 1 < countevn(a, m, (m0 * 2 + n0) + m, p) + (even(m0 * 2 + n0) ∧ p(a[(m0 * 2 + n0) + m]) ⊃ 1;0), (m0 * 2 + n0) + m < # a, m < # a, n0 < 2, even(m), countevn(a, m, (m0 * 2 + n0) + m, p) * 2 ≤ (m0 * 2 + n0) + 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) ⊦ ¬ m + n < m; (s) ⊦ m < n → n ≠ 0; (s) fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ n + 0 = n; (s) mult-c: ⊦ m * n = n * m; from specification nat-mult mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult ⊦ even(2 * m); (s) ⊦ 2 * n ≤ 2 * m + 1 ↔ n ≤ m; (s)

Proof step 17 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], m0 + 1 < countevn(a, m, m0 * 2 + m, p) + (p(a[m0 * 2 + m]) ⊃ 1;0), m0 * 2 + m < # a, m < # a, even(m), countevn(a, m, m0 * 2 + m, p) ≤ m0 ⊦

User applied rule case distinction

And closed the goal!

Rule argument

pos: left 2

Additional information

Used simplifier rules: ⊦ n + 0 = n; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat ⊦ m < n → n ≠ 0; (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 ⊦ m ≤ m0 ∧ n ≤ n0 → ¬ m0 + n0 < m + n; (s)

Proof step 18 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], n0 < # a, m < # a, ((n0 - m) + 1) / 2 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), m ≤ n0, m ≤ n0 + 1, countevn(a, m, n0, p) ≤ (even(m) ⊃ ((n0 - m) + 1) / 2;(n0 - m) / 2), ¬ even(m) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat ⊦ even(n) ↔ ¬ odd(n); (ss) n0 ≤ n ⊦ m ≤ n - n0 ↔ m + n0 ≤ n; (s) ⊦ m ≤ n → (n < m ↔ false); (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) m0 ≠ 0 ⊦ n ≤ m / m0 ↔ n * m0 ≤ m; (s)

Proof step 19 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], ((n0 - m) + 1) / 2 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), m < # a, n0 < # a, countevn(a, m, n0, p) * 2 + m < # a, odd(m), m ≤ n0 + 1, m ≤ n0, countevn(a, m, n0, p) * 2 + m ≤ n0 ⊦

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-sub, seq:n ≤ m ⊦ n0 = m - n ↔ m = n0 + n, subst:[m, n, n0] → [n0, m, n1]

Additional information

Used simplifier rules: n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: n0, m, n1

Proof step 20 from proof countevn-bounded-ind (previous step) (back to tree)

n0 = n1 + m, a ≠ [], countevn(a, m, n0, p) * 2 + m < # a, n0 < # a, m < # a, (n1 + 1) / 2 < countevn(a, m, n0, p) + (even(n0) ∧ p(a[n0]) ⊃ 1;0), odd(m), countevn(a, m, n0, p) * 2 + m ≤ n0, m ≤ n0, m ≤ n0 + 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 + n0 ↔ n ≤ n0; (s) ⊦ m ≤ m + n; (s)

Proof step 21 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], (n1 + 1) / 2 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat-div, name:div-elim, seq:n ≠ 0 ⊦ m0 = m / n ∧ n0 = m % n ↔ m = m0 * n + n0 ∧ n0 < n, subst:[m, n, m0, n0] → [n1 + 1, 2, m0, n0]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m0 = m / n ∧ n0 = m % n ↔ m = m0 * n + n0 ∧ n0 < n; (elim) Used terms: n1 + 1, 2, m0, n0

Proof step 22 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2 + n0, 2 ≠ 0, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, m0 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), n0 < 2, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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

Proof step 23 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2 + n0, a ≠ [], n0 < 2, m0 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

User applied rule constructor cut

And obtained the following new goals

Rule argument

var: n0

Additional information

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

Proof step 24 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2 + n0, n0 = 0, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, m0 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), n0 < 2, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

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 ⊦ n + 0 = n; (s)

Proof step 25 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m0 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 3

Additional information

Proof step 26 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, m0 < countevn(a, m, n1 + m, p) + 1, even(n1 + m), odd(m), p(a[n1 + m]), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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

Proof step 27 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, even(n1 + m), odd(m), p(a[n1 + m]), countevn(a, m, n1 + m, p) * 2 ≤ n1, m0 ≤ countevn(a, m, n1 + m, p) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:even-add, seq: ⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n), subst:[m, n] → [n1, m], <all paths>

Additional information

Used terms: n1, m

Proof step 28 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n)

A spec-lemma

Proof step 29 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, odd(m), p(a[n1 + m]), m0 ≤ countevn(a, m, n1 + m, p), countevn(a, m, n1 + m, p) * 2 ≤ n1, even(n1) ∧ even(m) ∨ odd(n1) ∧ odd(m) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ odd(n) → ¬ even(n); (s)

Proof step 30 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, odd(m), odd(n1), p(a[n1 + m]), countevn(a, m, n1 + m, p) * 2 ≤ n1, m0 ≤ countevn(a, m, n1 + m, p) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:oex, seq: ⊦ odd(n) ↔ (∃ m. n = m + m + 1), subst:[n] → [n1], <all paths>

Additional information

Used simplifier rules: countevn-rec: m ≤ n, n ≤ # a ⊦ countevn(a, m, n + 1, p) = countevn(a, m, n, p) + (even(n) ∧ p(a[n]) ⊃ 1;0); ⊦ m * n + n = m1 * n ↔ m + 1 = m1 ∨ n = 0; (s) ⊦ 2 * n ≤ 2 * m + 1 ↔ n ≤ m; (s) ⊦ n0 < m0 → (m0 * m + n0 < m0 * n ↔ m < n); (s) ⊦ 2 * m < 2 * n ↔ m < n; (s) mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult ⊦ m + m = 2 * m; (s) ⊦ m ≤ m + n; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic trans-nat: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification nat-basic ⊦ m < n → n ≠ 0; (s) ⊦ m +1 = m + 1; (s) ⊦ m + n < m + n0 ↔ n < n0; (s) ⊦ ¬ m + n < m; (s) ⊦ m + 1 ≤ n ↔ m < n; (s) ⊦ m ≤ n → (n < m ↔ false); (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic Used terms: n1

Proof step 31 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ odd(n) ↔ (∃ m. n = m + m + 1)

A spec-lemma

Proof step 32 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, m0 < countevn(a, m, n1 + m, p) + 0, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ even(n1 + m) ∨ ¬ p(a[n1 + m]) ⊦

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 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 33 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m0 < countevn(a, m, n1 + m, p), countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ even(n1 + m) ∨ ¬ p(a[n1 + m]) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:even-add, seq: ⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n), subst:[m, n] → [n1, m], <all paths>

Additional information

Used terms: n1, m

Proof step 34 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n)

A spec-lemma

Proof step 35 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, m0 < countevn(a, m, n1 + m, p), odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬(even(n1) ∧ even(m) ∨ odd(n1) ∧ odd(m)) ∨ ¬ p(a[n1 + m]) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ odd(n) → ¬ even(n); (s)

Proof step 36 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m0 < countevn(a, m, n1 + m, p), countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ odd(n1) ∨ ¬ p(a[n1 + m]) ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 9

Additional information

Proof step 37 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, m0 < countevn(a, m, n1 + m, p), odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ odd(n1) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ odd(n) ↔ ¬ even(n); (ss)

Proof step 38 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m0 < countevn(a, m, n1 + m, p), countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, even(n1), odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:Even, seq: ⊦ even(n) ↔ (∃ m. m + m = n), subst:[n] → [n1], <all paths>

Additional information

Used simplifier rules: ⊦ m + m = 2 * m; (s) ⊦ n0 < n → (m * n + n0 = m0 * n ↔ m = m0 ∧ n0 = 0); (ws) mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic Used terms: n1

Proof step 39 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ even(n) ↔ (∃ m. m + m = n)

A spec-lemma

Proof step 40 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, a ≠ [], m < # a, n1 + m < # a, countevn(a, m, n1 + m, p) * 2 + m < # a, m0 < countevn(a, m, n1 + m, p), odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ p(a[n1 + m]) ⊦

User applied rule constructor cut

And obtained the following new goals

Rule argument

var: m0

Additional information

Used simplifier rules: nat freely generated by 0, +1;; mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult ⊦ 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 41 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2, m0 = m1 +1, a ≠ [], m0 < countevn(a, m, n1 + m, p), countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1, ¬ p(a[n1 + m]) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: countevn-rec: m ≤ n, n ≤ # a ⊦ countevn(a, m, n + 1, p) = countevn(a, m, n, p) + (even(n) ∧ p(a[n]) ⊃ 1;0); mult-c: ⊦ m * n = n * m; from specification nat-mult mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ 2 * n ≤ 2 * m + 1 ↔ n ≤ m; (s) ⊦ ¬ m + n < m; (s) ⊦ m + n < m + n0 ↔ n < n0; (s) ⊦ m +1 = m + 1; (s) ⊦ m < n → n ≠ 0; (s) trans-nat: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification nat-basic lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m ≤ m + n; (s) ⊦ m ≠ 0 → (m * n = 0 ↔ n = 0); (s) ⊦ m < m + n ↔ n ≠ 0; (s) ⊦ 1 < 2 * n ↔ n ≠ 0; (s) n < n0 ⊦ m + (* n) = m0 + (* n0) ↔ m = m0 + (n0 - n); (s) ⊦ m * (n + 1) = m * n + m; (s)

Proof step 42 from proof countevn-bounded-ind (previous step) (back to tree)

a ≠ [], m1 + 1 < countevn(a, m, 2 * m1 + m, p) + (even(2 * m1 + m) ∧ p(a[2 * m1 + m]) ⊃ 1;0), (countevn(a, m, 2 * m1 + m, p) + (even(2 * m1 + m) ∧ p(a[2 * m1 + m]) ⊃ 1;0)) * 2 + m < # a, (2 * m1 + 1) + m < # a, m < # a, odd(m), countevn(a, m, 2 * m1 + m, p) + (even(2 * m1 + m) ∧ p(a[2 * m1 + m]) ⊃ 1;0) ≤ m1, ¬ p(a[(2 * m1 + 1) + m]) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:even-add, seq: ⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n), subst:[m, n] → [2 * m1, m], <all paths>

Additional information

Used simplifier rules: ⊦ even(2 * m); (s) ⊦ odd(n) → ¬ even(n); (s) ⊦ ¬ odd(2 * m); (s) mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult ⊦ n + 0 = n; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat ⊦ m < n → n ≠ 0; (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 Used terms: 2 * m1, m

Proof step 43 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ even(m + n) ↔ even(m) ∧ even(n) ∨ odd(m) ∧ odd(n)

A spec-lemma

Proof step 44 from proof countevn-bounded-ind (previous step) (back to tree)

n1 + 1 = m0 * 2 + n0, n0 = n +1, a ≠ [], countevn(a, m, n1 + m, p) * 2 + m < # a, n1 + m < # a, m < # a, m0 < countevn(a, m, n1 + m, p) + (even(n1 + m) ∧ p(a[n1 + m]) ⊃ 1;0), n0 < 2, odd(m), countevn(a, m, n1 + m, p) * 2 ≤ n1 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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

Proof step 45 from proof countevn-bounded-ind (previous step) (back to tree)

countevn(a, m, m0 * 2 + m, p) = m0, a ≠ [], m0 * 2 + m < # a, m < # a, even(m0 * 2 + m), odd(m), p(a[m0 * 2 + m]) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: nat-even, name:plus, seq: ⊦ even(m) → (even(m + n) ↔ even(n)), subst:[m, n] → [m0 * 2, m], <all paths>

Additional information

Used simplifier rules: ⊦ even(n) → ¬ odd(n); (s) ⊦ even(2 * m); (s) mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult mult-c: ⊦ m * n = n * m; from specification nat-mult Used terms: m0 * 2, m

Proof step 46 from proof countevn-bounded-ind (previous step) (back to tree)

⊦ even(m) → (even(m + n) ↔ even(n))

A spec-lemma

Proof Tree for countevn-bounded-ind (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