[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 divmod2-2pot-neg (conclusion) (back to tree)

⊦ j < 0 ∧ 1 < i → ((j % 2 ^ i - 1) / 2) % 2 = ((j - 1) / 2) % 2

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof divmod2-2pot-neg (previous step) (back to tree)

((j % 2 ^ i - 1) / 2) % 2 ≠ ((j - 1) / 2) % 2, j < 0, 1 < i ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: forward-le-05: ⊦ i < j ∧ 0 ≤ i → 0 < j; (forward) from specification int-abs forward-pos: ⊦ i < j ∧ 0 < i → 0 < j ∧ 1 < j; (forward) from specification int-basic1 forward-le-02: ⊦ j < i ∧ i ≤ 0 → j < 0; (forward) from specification int-abs

Proof step 3 from proof divmod2-2pot-neg (previous step) (back to tree)

((j % 2 ^ i - 1) / 2) % 2 ≠ ((j - 1) / 2) % 2, 0 < i, 1 < i, j < 0 ⊦

User applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: int-div, name:div-elim-negpos, seq:⊦ 0 < j ∧ i < 0 → ( i0 = i / j ∧ j0 = i % j ↔ i = i0 * j + j0 ∧ j0 ≤ 0 ∧ abs(j0) < j ∧ i0 ≤ 0), subst:[i, j, i0, j0] → [j, 2 ^ i, i0, j0]

Additional information

Used simplifier rules: pot2-pos: ⊦ 0 < 2 ^ i ↔ 0 ≤ i; ⊦ i ≤ j ↔ ¬ j < i; (ss) ⊦ i < j → ¬ j < i; (s) ⊦ 0 < j ∧ i < 0 → (i0 = i / j ∧ j0 = i % j ↔ i = i0 * j + j0 ∧ j0 ≤ 0 ∧ abs(j0) < j ∧ i0 ≤ 0); (elim) Used terms: j, 2 ^ i, i0, j0

Proof step 4 from proof divmod2-2pot-neg (previous step) (back to tree)

j = i0 * 2 ^ i + j0, ((j0 - 1) / 2) % 2 ≠ ((j - 1) / 2) % 2, j < 0, 1 < i, 0 < i, abs(j0) < 2 ^ i, 0 < 2 ^ i, j0 ≤ 0, i0 ≤ 0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: pot2-pos: ⊦ 0 < 2 ^ i ↔ 0 ≤ i; ⊦ i < 0 ∧ 0 ≤ j → i < j; (s) ⊦ i ≤ 0 ∧ 0 ≤ j → i ≤ j; (s) forward-le-02: ⊦ j < i ∧ i ≤ 0 → j < 0; (forward) from specification int-abs forward-lsle: ⊦ i < j ∧ j ≤ j0 → i < j0; (forward) from specification int-abs forward-lele: ⊦ j ≤ j0 ∧ j0 ≤ j1 → j ≤ j1; (forward) from specification int-abs forward-le-04: ⊦ j ≤ i ∧ i ≤ 0 → j ≤ 0; (forward) from specification int-abs forward-lels: ⊦ i ≤ j ∧ j < j0 → i < j0; (forward) from specification int-abs forward-le-01: ⊦ i ≤ j ∧ 0 ≤ i → 0 ≤ j; (forward) from specification int-abs

Proof step 5 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ ((i0 * 2 ^ i + j0 - 1) / 2) % 2, j0 < i, i0 < i, i0 * 2 ^ i + j0 < 0, 1 < i, 0 < i, abs(j0) < 2 ^ i, 0 ≤ i, j0 ≤ 0, i0 ≤ 0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: int-abs, name:sub-add-01, seq: ⊦ i + (j - i0) = i + j - i0, subst:[i0, j, i] → [1, j0, i0 * 2 ^ i], <rotated> <all paths>

Additional information

Used terms: 1, j0, i0 * 2 ^ i

Proof step 6 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ i + (j - i0) = i + j - i0

A spec-lemma

Proof step 7 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ ((i0 * 2 ^ i + (j0 - 1)) / 2) % 2, abs(j0) < 2 ^ i, 0 < i, 1 < i, i0 * 2 ^ i + j0 < 0, i0 < i, j0 < i, i0 ≤ 0, j0 ≤ 0, 0 ≤ i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: int-basic2, name:add-c, seq: ⊦ i + j = j + i, subst:[j, i] → [j0 - 1, i0 * 2 ^ i], <all paths>

Additional information

Used terms: j0 - 1, i0 * 2 ^ i

Proof step 8 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ i + j = j + i

A spec-lemma

Proof step 9 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ (((j0 - 1) + i0 * 2 ^ i) / 2) % 2, j0 < i, i0 < i, i0 * 2 ^ i + j0 < 0, 1 < i, 0 < i, abs(j0) < 2 ^ i, 0 ≤ i, j0 ≤ 0, i0 ≤ 0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: int-div, name:div-add-neg, seq:⊦ i0 % j = 0 ∧ i < 0 ∧ i0 < 0 ∧ 0 < j → (i + i0) / j = i / j + i0 / j, subst:[j, i0, i] → [2, i0 * 2 ^ i, j0 - 1], <all paths>

Additional information

Used simplifier rules: mod-2pot: ⊦ 0 < i → (j * 2 ^ i) % 2 = 0; pot2-pos: ⊦ 0 < 2 ^ i ↔ 0 ≤ i; ⊦ i + (j - i0) = i + j - i0; (s) ⊦ i - j < i0 ↔ i < j + i0; (s) ⊦ i < 1 ↔ i ≤ 0; (s) ⊦ i ≤ 0 → (i * j < 0 ↔ 0 < j ∧ i ≠ 0); (s) ⊦ i * 0 = 0; (s) associativity: ⊦ i * j * j0 = (i * j) * j0; from specification int-mult commutativity: ⊦ i * j = j * i; from specification int-mult ⊦ i + 0 = i; (s) add-a: ⊦ i + j + i0 = (i + j) + i0; from specification int-basic2 add-c: ⊦ i + j = j + i; from specification int-basic2 Used terms: 2, i0 * 2 ^ i, j0 - 1

Proof step 10 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ i0 % j = 0 ∧ i < 0 ∧ i0 < 0 ∧ 0 < j → (i + i0) / j = i / j + i0 / j

A spec-lemma

Proof step 11 from proof divmod2-2pot-neg (previous step) (back to tree)

(i0 * 2 ^ i) % 2 = 0, ((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + (i0 * 2 ^ i) / 2) % 2, abs(j0) < 2 ^ i, 0 < i, 1 < i, i0 * 2 ^ i + j0 < 0, i0 < i, j0 < i, j0 - 1 < 0, i0 * 2 ^ i < 0, 0 < 2, i0 ≤ 0, j0 ≤ 0, 0 ≤ i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:div2-2pot-04, seq: ⊦ 0 < j → (i * 2 ^ j) / 2 = i * 2 ^ (j - 1), subst:[j, i] → [i, i0], <all paths>

Additional information

Used terms: i, i0

Proof step 12 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ 0 < j → (i * 2 ^ j) / 2 = i * 2 ^ (j - 1)

Lemma div2-2pot-04

Proof step 13 from proof divmod2-2pot-neg (previous step) (back to tree)

(i0 * 2 ^ i) % 2 = 0, ((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, 0 < 2, i0 * 2 ^ i < 0, j0 - 1 < 0, j0 < i, i0 < i, i0 * 2 ^ i + j0 < 0, 1 < i, abs(j0) < 2 ^ i, 0 < i, 0 ≤ i, j0 ≤ 0, i0 ≤ 0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: int-div, name:mod-add-neg, seq: ⊦ i0 % j = 0 ∧ i < 0 ∧ i0 < 0 ∧ 0 < j → (i + i0) % j = i % j, subst:[j, i0, i] → [2, i0 * 2 ^ (i - 1), (j0 - 1) / 2], <all paths>

Additional information

Used terms: 2, i0 * 2 ^ (i - 1), (j0 - 1) / 2

Proof step 14 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ i0 % j = 0 ∧ i < 0 ∧ i0 < 0 ∧ 0 < j → (i + i0) % j = i % j

A spec-lemma

Proof step 15 from proof divmod2-2pot-neg (previous step) (back to tree)

(i0 * 2 ^ i) % 2 = 0, ((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, 0 < i, abs(j0) < 2 ^ i, 1 < i, i0 * 2 ^ i + j0 < 0, i0 < i, j0 < i, j0 - 1 < 0, i0 * 2 ^ i < 0, 0 < 2, i0 ≤ 0, j0 ≤ 0, 0 ≤ i ⊦ (i0 * 2 ^ (i - 1)) % 2 = 0 ∧ (j0 - 1) / 2 < 0 ∧ i0 * 2 ^ (i - 1) < 0 ∧ 0 < 2

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: mod-2pot: ⊦ 0 < i → (j * 2 ^ i) % 2 = 0; pot2-pos: ⊦ 0 < 2 ^ i ↔ 0 ≤ i; ⊦ i < 0 ∧ 0 ≤ j → i < j; (s) forward-le-02: ⊦ j < i ∧ i ≤ 0 → j < 0; (forward) from specification int-abs commutativity: ⊦ i * j = j * i; from specification int-mult associativity: ⊦ i * j * j0 = (i * j) * j0; from specification int-mult ⊦ 1 ≤ i ↔ 0 < i; (s) add-c: ⊦ i + j = j + i; from specification int-basic2 add-a: ⊦ i + j + i0 = (i + j) + i0; from specification int-basic2 ⊦ i ≤ j - i0 ↔ i + i0 ≤ j; (s) ⊦ i < 0 → (i * j < 0 ↔ 0 < j); (s) ⊦ i ≤ ~1 ↔ i < 0; (s) ⊦ i + (* j) ≤ (* j0) ↔ i ≤ j0 - j; (s) ⊦ (* i) + i0 - (* j) = (i - j) + i0; (s) ⊦ i + (j - i0) = i + j - i0; (s) 0 < j ⊦ i / (* j) < 0 ↔ i + j ≤ 0; (s) ⊦ i ≠ j → (i ≤ j ↔ i < j); (s) ⊦ i ≤ 0 ∧ 0 ≤ j → i ≤ j; (s) ⊦ i < 1 ↔ i ≤ 0; (s) ⊦ i - j < i0 ↔ i < j + i0; (s) ⊦ i ≤ 0 → (i * j < 0 ↔ 0 < j ∧ i ≠ 0); (s)

Proof step 16 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, i0 ≠ 0, i0 < 0, 0 < i, abs(j0) < 2 ^ i, 1 < i, i0 * 2 ^ i + j0 < 0, j0 < i, j0 ≤ 0, 0 ≤ i ⊦ (i0 * 2 ^ (i - 1)) % 2 = 0 ∧ j0 < 0

User applied rule cut formula

And obtained the following new goals

Rule argument

fma: j0 = 0

Additional information

Used formulas: j0 = 0

Proof step 17 from proof divmod2-2pot-neg (previous step) (back to tree)

j0 = 0, ((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, i0 ≠ 0, j0 < i, i0 * 2 ^ i + j0 < 0, 1 < i, abs(j0) < 2 ^ i, 0 < i, i0 < 0, 0 ≤ i, j0 ≤ 0 ⊦ (i0 * 2 ^ (i - 1)) % 2 = 0 ∧ j0 < 0

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: pot2-pos: ⊦ 0 < 2 ^ i ↔ 0 ≤ i; commutativity: ⊦ i * j = j * i; from specification int-mult associativity: ⊦ i * j * j0 = (i * j) * j0; from specification int-mult ⊦ i < 0 → (i * j < 0 ↔ 0 < j); (s) add-c: ⊦ i + j = j + i; from specification int-basic2 add-a: ⊦ i + j + i0 = (i + j) + i0; from specification int-basic2 ⊦ i + 0 = i; (s)

Proof step 18 from proof divmod2-2pot-neg (previous step) (back to tree)

0 ≠ (i0 * 2 ^ (i - 1)) % 2, i0 ≠ 0, i0 < 0, 0 < i, 1 < i, 0 ≤ i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:mod-2pot, seq: ⊦ 0 < i → (j * 2 ^ i) % 2 = 0, subst:[i, j] → [i - 1, i0], <all paths>

Additional information

Used simplifier rules: ⊦ i < j - i0 ↔ i + i0 < j; (s) ⊦ i < j ↔ ¬ j ≤ i; (ss) ⊦ 0 < i → (i ≤ 1 ↔ i = 1); (s) ⊦ i = j → i - j = 0; (s) ⊦ 1 * i = i; (s) associativity: ⊦ i * j * j0 = (i * j) * j0; from specification int-mult commutativity: ⊦ i * j = j * i; from specification int-mult Used terms: i - 1, i0

Proof step 19 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ 0 < i → (j * 2 ^ i) % 2 = 0

Lemma mod-2pot

Proof step 20 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, i0 ≠ 0, j0 ≠ 0, j0 < i, i0 * 2 ^ i + j0 < 0, 1 < i, abs(j0) < 2 ^ i, 0 < i, i0 < 0, 0 ≤ i, j0 ≤ 0 ⊦ (i0 * 2 ^ (i - 1)) % 2 = 0 ∧ j0 < 0

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: forward-le-02: ⊦ j < i ∧ i ≤ 0 → j < 0; (forward) from specification int-abs forward-le-05: ⊦ i < j ∧ 0 ≤ i → 0 < j; (forward) from specification int-abs ⊦ ~ i < j ↔ 0 < j + i; (s) ⊦ i < 0 → abs(i) = ~ i; (s) ⊦ i ≠ j → (i ≤ j ↔ i < j); (s)

Proof step 21 from proof divmod2-2pot-neg (previous step) (back to tree)

((j0 - 1) / 2) % 2 ≠ ((j0 - 1) / 2 + i0 * 2 ^ (i - 1)) % 2, (i0 * 2 ^ (i - 1)) % 2 ≠ 0, i0 ≠ 0, j0 ≠ 0, 1 < i, i0 * 2 ^ i + j0 < 0, j0 < i, i0 < 0, 0 < i, j0 < 0, 0 < 2 ^ i + j0, 0 ≤ i ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:mod-2pot, seq: ⊦ 0 < i → (j * 2 ^ i) % 2 = 0, subst:[i, j] → [i - 1, i0], <all paths>

Additional information

Used simplifier rules: ⊦ i < 0 ∧ 0 ≤ j → i < j; (s) ⊦ i < j - i0 ↔ i + i0 < j; (s) ⊦ i < j ↔ ¬ j ≤ i; (ss) ⊦ 0 < i → (i ≤ 1 ↔ i = 1); (s) ⊦ i = j → i - j = 0; (s) ⊦ 1 * i = i; (s) associativity: ⊦ i * j * j0 = (i * j) * j0; from specification int-mult commutativity: ⊦ i * j = j * i; from specification int-mult ⊦ (* j) < i0 + (* j0) ↔ j - j0 < i0; (s) ⊦ i < 0 → (~2 < i ↔ i = ~1); (s) add-a: ⊦ i + j + i0 = (i + j) + i0; from specification int-basic2 add-c: ⊦ i + j = j + i; from specification int-basic2 Used terms: i - 1, i0

Proof step 22 from proof divmod2-2pot-neg (previous step) (back to tree)

⊦ 0 < i → (j * 2 ^ i) % 2 = 0

Lemma mod-2pot

Proof Tree for divmod2-2pot-neg (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