| int2bytes(i) = i2b(~1) ' + bytes, i2b(~1) ∈ int2bytes(i), 0 ≤ b2i(bytes.first), bytes2int(i2b(~1) ' + bytes.first ' + bytes.rest) + 2 ^ (8 * (n→i(# bytes.rest) + 1) - 1) < 0, 0 ≤ 2 ^ ((n→i(# bytes.rest) + 1) * 8) + bytes2int(i2b(~1) ' + bytes.first ' + bytes.rest) ⊦ n ≤ # int2bytes(i) ↔ ¬ 0 ≤ i + 2 ^ (8 * (n→i(n) - 1) - 1), i2b(~1) ' + bytes.first ' + bytes.rest = int2bytes(i) |
Used simplifier rules: int2bytes-minus-one: ⊦ int2bytes(i) = i2b(~1) ' ↔ i = ~1;%int2bytes-byte: ~128 ≤ i, i < 128 ⊦ int2bytes((* i)) = i2b(i) ';% ⊦ by + bytes = by ' + bytes;% ⊦ bytes + [] = bytes;% ⊦ (bytes + bytes0) + bytes1 = bytes + bytes0 + bytes1;% ⊦ i ≤ j ∧ 0 ≤ i → 0 ≤ j; (forward)% ⊦ i < j ∧ j ≤ j0 → i < j0; (forward)% ⊦ j < i ∧ i ≤ 0 → j < 0; (forward)% ⊦ bytes = bytes + bytes0 ↔ bytes0 = [];% ⊦ by ' + bytes ≠ [];% ⊦ # by ' = 0 +1;%i < 0 ⊦ (* i) + j = j - ~ i;% ⊦ i + j + i0 = (i + j) + i0;% ⊦ i + j = j + i;% ⊦ i ≤ j - i0 ↔ i + i0 ≤ j;% ⊦ 1 ≤ i ↔ 0 < i;% ⊦ 0 < 2 ^ i ↔ 0 ≤ i;% ⊦ 0 < i → (0 < i * j ↔ 0 < j);% ⊦ i < j - i0 ↔ i + i0 < j;%0 ≤ i ⊦ (* i) < n→i(n) ↔ i→n(i) < n;% ⊦ 1 < m ↔ ¬(m = 0 ∨ m = 1);% ⊦ i * j * j0 = (i * j) * j0;% ⊦ i * j = j * i;% ⊦ m ≠ 0 → (m ≤ 1 ↔ m = 1);% ⊦ ¬ m ≤ n ↔ n < m;%⊦ bytes ≠ [] → (by = bytes.first ∧ bytes0 = bytes.rest ↔ bytes = by + bytes0); (elim) Used terms: bytes, by, bytes0