[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 rowsorted-smallercol-evnbounded (conclusion) (back to tree)

srowsorted(mx, #r mx, mx), c0 < #c mx, c < #c mx, c < c0, m ≤ n, n ≤ #r mx ⊦ count(mx[c]c, m, n, λ j. j < i) ≥ countevn(mx[c0]c, m, n, λ j. j < i)

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

c < c0, c < #c mx, c0 < #c mx, srowsorted(mx, #r mx, mx), n ≤ #r mx, m ≤ n, ¬ count(mx[c]c, m, n, λ j. j < i) ≥ countevn(mx[c0]c, m, n, λ j. j < i) ⊦

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) ⊦ n ≥ 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 ⊦ # mx[c]c = #r mx; (s) ⊦ 0 ≤ m; (s)

Proof step 3 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

c0 < #c mx, c < #c mx, c < c0, srowsorted(mx, #r mx, mx), m ≤ n0 +1, n0 +1 ≤ #r mx, ¬ count(mx[c]c, m, n0 +1, λ j. j < i) ≥ countevn(mx[c0]c, m, n0 +1, λ j. j < i), ∀ c, c0, mx, m, i. ¬ ( c < c0 ∧ c < #c mx ∧ c0 < #c mx ∧ srowsorted(mx, #r mx, mx) ∧ n0 ≤ #r mx ∧ m ≤ n0 ∧ ¬ count(mx[c]c, m, n0, λ j. j < i) ≥ countevn(mx[c0]c, m, n0, λ j. j < i)) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ 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 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 ≤ n; (s) ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m + 1 ≤ n ↔ m < n; (s)

Proof step 4 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

count(mx[c]c, m, n0 + 1, λ j. j < i) < countevn(mx[c0]c, m, n0 + 1, λ j. j < i), n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, srowsorted(mx, #r mx, mx), m ≤ n0 + 1, m ≤ #r mx, ∀ c1, c2, mx0, m0, i0. ¬ c1 < c2 ∨ ¬ c1 < #c mx0 ∨ ¬ c2 < #c mx0 ∨ ¬ srowsorted(mx0, #r mx0, mx0) ∨ ¬ n0 ≤ #r mx0 ∨ ¬ m0 ≤ n0 ∨ countevn(mx0[c2]c, m0, n0, λ j. j < i0) ≤ count(mx0[c1]c, m0, n0, λ j. j < i0) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: filter-count[oarray-sort-new], name:countrange-rec, seq:m ≤ n, n ≤ # x ⊦ count(x, m, n + 1, p) = count(x, m, n, p) + (p(x[n]) ⊃ 1;0), subst:[x, m, n, p] → [mx[c]c, m, n0, λ j. j < i], <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) m ≤ # x ⊦ count(x, m, m, p) = 0; (s) ⊦ # mx[c]c = #r mx; (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: mx[c]c, m, n0, λ j. j < i

Proof step 5 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

m ≤ n, n ≤ # x ⊦ count(x, m, n + 1, p) = count(x, m, n, p) + (p(x[n]) ⊃ 1;0)

A spec-lemma

Proof step 6 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, count(mx[c]c, m, n0, λ j. j < i) + (mx[c]c[n0] < i ⊃ 1;0) < countevn(mx[c0]c, m, n0 + 1, λ j. j < i), srowsorted(mx, #r mx, mx), m ≤ #r mx, m ≤ n0 + 1, m ≤ n0, n0 ≤ # mx[c]c, ∀ c1, c2, mx0, m0, i0. ¬ c1 < c2 ∨ ¬ c1 < #c mx0 ∨ ¬ c2 < #c mx0 ∨ ¬ srowsorted(mx0, #r mx0, mx0) ∨ ¬ n0 ≤ #r mx0 ∨ ¬ m0 ≤ n0 ∨ countevn(mx0[c2]c, m0, n0, λ j. j < i0) ≤ count(mx0[c1]c, m0, n0, λ j. j < i0) ⊦

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); ⊦ 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 ⊦ mx[c]c[r] = mx[r, c]; (s) ⊦ # mx[c]c = #r mx; (s)

Proof step 7 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

m < #r mx, count(mx[c]c, m, n0, λ j. j < i) + (mx[n0, c] < i ⊃ 1;0) < countevn(mx[c0]c, m, n0, λ j. j < i) + (even(n0) ∧ mx[n0, c0] < i ⊃ 1;0), c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, srowsorted(mx, #r mx, mx), m ≤ n0 + 1, m ≤ n0, ∀ c1, c2, mx0, m0, i0. ¬ c1 < c2 ∨ ¬ c1 < #c mx0 ∨ ¬ c2 < #c mx0 ∨ ¬ srowsorted(mx0, #r mx0, mx0) ∨ ¬ n0 ≤ #r mx0 ∨ ¬ m0 ≤ n0 ∨ countevn(mx0[c2]c, m0, n0, λ j. j < i0) ≤ count(mx0[c1]c, m0, n0, λ j. j < i0) ⊦

User applied rule all left

And obtained the following new goals

Rule argument

pos: left 11 terms: c, c0, mx, m, i abort: F discard: T computed: F

Additional information

Used terms: c, c0, mx, m, i

Proof step 8 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, count(mx[c]c, m, n0, λ j. j < i) + (mx[n0, c] < i ⊃ 1;0) < countevn(mx[c0]c, m, n0, λ j. j < i) + (even(n0) ∧ mx[n0, c0] < i ⊃ 1;0), m < #r mx, srowsorted(mx, #r mx, mx), m ≤ n0, m ≤ n0 + 1, ¬ c < c0 ∨ ¬ c < #c mx ∨ ¬ c0 < #c mx ∨ ¬ srowsorted(mx, #r mx, mx) ∨ ¬ n0 ≤ #r mx ∨ ¬ m ≤ n0 ∨ countevn(mx[c0]c, m, n0, λ j. j < i) ≤ count(mx[c]c, m, n0, λ j. j < i) ⊦

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 9 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

m < #r mx, count(mx[c]c, m, n0, λ j. j < i) + (mx[n0, c] < i ⊃ 1;0) < countevn(mx[c0]c, m, n0, λ j. j < i) + (even(n0) ∧ mx[n0, c0] < i ⊃ 1;0), c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, srowsorted(mx, #r mx, mx), m ≤ n0 + 1, m ≤ n0, countevn(mx[c0]c, m, n0, λ j. j < i) ≤ count(mx[c]c, m, n0, λ j. j < i) ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 2

Additional information

Proof step 10 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, m < #r mx, count(mx[c]c, m, n0, λ j. j < i) + 1 < countevn(mx[c0]c, m, n0, λ j. j < i) + (even(n0) ∧ mx[n0, c0] < i ⊃ 1;0), mx[n0, c] < i, srowsorted(mx, #r mx, mx), countevn(mx[c0]c, m, n0, λ j. j < i) ≤ count(mx[c]c, m, n0, λ j. j < i), m ≤ n0, m ≤ n0 + 1 ⊦

User applied rule case distinction

And closed the goal!

Rule argument

pos: left 7

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 11 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, m < #r mx, count(mx[c]c, m, n0, λ j. j < i) + 0 < countevn(mx[c0]c, m, n0, λ j. j < i) + (even(n0) ∧ mx[n0, c0] < i ⊃ 1;0), srowsorted(mx, #r mx, mx), countevn(mx[c0]c, m, n0, λ j. j < i) ≤ count(mx[c]c, m, n0, λ j. j < i), m ≤ n0, m ≤ n0 + 1, ¬ mx[n0, c] < i ⊦

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)

Proof step 12 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), mx[n0, c0] < i, m < #r mx, c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, even(n0), srowsorted(mx, #r mx, mx), m ≤ n0 + 1, m ≤ n0, ¬ mx[n0, c] < i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:srowsorted-def, seq:⊦ m ≤ #r mx → ( srowsorted(mx, m, mx0) ↔ #r mx = #r mx0 ∧ #c mx = #c mx0 ∧ (∀ r. r < #r mx → (r < m ⊃ perm(mx0[r]r, mx[r]r) ∧ ordered≤((even(r) ⊃ mx[r]r;rev(mx[r]r))) ;mx0[r]r = mx[r]r ))), subst:[mx, m, mx0] → [mx, #r mx, mx], <all paths>

Additional information

Used simplifier rules: ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ ¬ n < n; (s) Used terms: mx, #r mx, mx

Proof step 13 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

⊦ m ≤ #r mx → ( srowsorted(mx, m, mx0) ↔ #r mx = #r mx0 ∧ #c mx = #c mx0 ∧ (∀ r. r < #r mx → (r < m ⊃ perm(mx0[r]r, mx[r]r) ∧ ordered≤((even(r) ⊃ mx[r]r;rev(mx[r]r)));mx0[r]r = mx[r]r)))

Lemma srowsorted-def

Proof step 14 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

#c mx = #c mx, #r mx = #r mx, countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, m < #r mx, mx[n0, c0] < i, even(n0), m ≤ n0, m ≤ n0 + 1, #r mx ≤ #r mx, ¬ mx[n0, c] < i, ∀ r. r < #r mx → (r < #r mx ⊃ perm(mx[r]r, mx[r]r) ∧ ordered≤((even(r) ⊃ mx[r]r;rev(mx[r]r)));mx[r]r = mx[r]r) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ perm(x, x); (s) ⊦ m ≤ m; (s)

Proof step 15 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), mx[n0, c0] < i, m < #r mx, c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, even(n0), m ≤ n0 + 1, m ≤ n0, ¬ mx[n0, c] < i, ∀ r. r < #r mx → ordered≤((even(r) ⊃ mx[r]r;rev(mx[r]r))) ⊦

User applied rule all left

And obtained the following new goals

Rule argument

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

Additional information

Used terms: n0

Proof step 16 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, m < #r mx, mx[n0, c0] < i, even(n0), m ≤ n0, m ≤ n0 + 1, ¬ mx[n0, c] < i, n0 < #r mx → ordered≤((even(n0) ⊃ mx[n0]r;rev(mx[n0]r))) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 17 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), mx[n0, c0] < i, m < #r mx, c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, even(n0), ordered≤(mx[n0]r), m ≤ n0 + 1, m ≤ n0, ¬ mx[n0, c] < i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: olist-new[oarray-sort-new], name:orderedle-all, seq: ⊦ ordered≤(x) ↔ (∀ m, n. m ≤ n ∧ n < # x → ¬ x[n] < x[m]), subst:[x] → [mx[n0]r], <all paths>

Additional information

Used terms: mx[n0]r

Proof step 18 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

⊦ ordered≤(x) ↔ (∀ m, n. m ≤ n ∧ n < # x → ¬ x[n] < x[m])

A spec-lemma

Proof step 19 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), n0 < #r mx, c0 < #c mx, c < #c mx, c < c0, c + 1 < #c mx, m < #r mx, mx[n0, c0] < i, even(n0), m ≤ n0, m ≤ n0 + 1, ¬ mx[n0, c] < i, ∀ m, n. m ≤ n ∧ n < # mx[n0]r → ¬ mx[n0]r[n] < mx[n0]r[m] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ mx[r]r[c] = mx[r, c]; (s) ⊦ # mx[r]r = #c mx; (s)

Proof step 20 from proof rowsorted-smallercol-evnbounded (previous step) (back to tree)

countevn(mx[c0]c, m, n0, λ j. j < i) = count(mx[c]c, m, n0, λ j. j < i), mx[n0, c0] < i, m < #r mx, c + 1 < #c mx, c < c0, c < #c mx, c0 < #c mx, n0 < #r mx, even(n0), m ≤ n0 + 1, m ≤ n0, ¬ mx[n0, c] < i, ∀ m0, n. m0 ≤ n ∧ n < #c mx → ¬ mx[n0, n] < mx[n0, m0] ⊦

User applied rule all left

And closed the goal!

Rule argument

pos: left 13 terms: c, c0 abort: F discard: T computed: F

Additional information

Used simplifier rules: ⊦ m < n → m ≤ n; (s) nll: ⊦ ¬ b < a ∧ b < c → a < c; (forward) from specification oelem nnn: ⊦ ¬ c < b ∧ ¬ a < c → ¬ a < b; (forward) from specification oelem Used terms: c, c0

Proof Tree for rowsorted-smallercol-evnbounded (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