| i + 1 < # A, Inv-first-inner(A, A0, x, y, i, j), A[j - 1] ≤ x ⊦ j = 0, Inv-last-inner(A[j + 1, x], A0, x, y, i, j) |
# A = # A0, i + 1 < # A0, perm(A[j, y][j + 1, x], A0), sorted(A, j + 2, i + 2), sorted(A, 0, j), j ≤ # A0, j ≤ i, i ≤ # A0, j ≠ i → ¬ A[j + 2] < A[j - 1], j ≠ i → x < A[j + 2] ⊦ j = 0, x < y, x < A[j - 1], sorted(A[j + 1, x], j + 1, i + 2) ∧ ¬ x < A[j + 1, x][j - 1] ∧ perm(A[j + 1, x][j, y], A0)
Used simplifier rules: Inv-first-inner: ⊦ Inv-first-inner(A, A0, x, y, i, j) ↔ # A ≠ 0 ∧ # A = # A0 ∧ i ≤ # A ∧ j ≤ i ∧ y ≤ x ∧ (j ≠ i → x < A[j + 2]) ∧ sorted(A, 0, j) ∧ sorted(A, j + 2, i + 2) ∧ (j ≠ i ∧ j ≠ 0 → A[j - 1] ≤ A[j + 2]) ∧ perm(A[j, y][j + 1, x], A0);%Inv-last-inner: ⊦ Inv-last-inner(A, A0, x, y, i, j) ↔ # A ≠ 0 ∧ # A = # A0 ∧ i ≤ # A ∧ j ≤ i ∧ y ≤ x ∧ y ≤ A[j + 1] ∧ sorted(A, 0, j) ∧ sorted(A, j + 1, i + 2) ∧ (j ≠ 0 → A[j - 1] ≤ A[j + 1]) ∧ perm(A[j, y], A0);%m < # ar ⊦ ar[m, a][m] = a; (s)% ⊦ m ≤ m0 ∧ n ≤ n0 → ¬ m0 + n0 < m + n; (s)%fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat% ⊦ m < n ↔ ¬ n ≤ m; (ss)%n ≥ m, m ≤ # ar ⊦ sorted(ar, n, m); (s)% ⊦ m ≤ m + n; (s)% ⊦ n ≥ m ↔ m ≤ n; (s)%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat%sorted-merge: m > n0 ⊦ sorted(A, n, m) ∧ sorted(A, n0, m0) → sorted(A, n, m0); (forward) from specification oarray-sorted%n < n0 ⊦ (* n) ≠ m0 + (* n0); (s)% ⊦ 0 < m ↔ m ≠ 0; (s)% ⊦ m > n ↔ n < m; (s)%m ≤ m0 ⊦ sorted(A, m, n) → sorted(A, m0, n); (ss)%m ≤ n0 ⊦ sorted(ar[n0, a], n, m) ↔ sorted(ar, n, m); (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ ¬ m + n < m; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ # ar[n, a] = # ar; (s)% ⊦ m < n → n ≠ 0; (s)% ⊦ x ≤ y ↔ ¬ y < x; (s)