| false ∈ bytes2bits(bytes0), true ∈ bytes2bits(bytes0), ∀ bytes1. # bytes1 < #(bytes0 + by ') → bytes2bits(bytes1) ≠ [] → bytes1 = [] ∨ b2i(bytes1.first) = 0 ∨ b2i(bytes1.first) = ~1 ∨ bits2bytes(sgn(bytes2bits(bytes1))) = bytes1 ⊦ bits2bytes(sgn(bytes2bits(bytes0)) + byte2bits(by)) = bytes0 + by ', b2i((bytes0 + by ').first) = ~1, b2i((bytes0 + by ').first) = 0 |
⊦ 8 < # bits → bits2bytes(bits) = bits2bytes(firstn(# bits - 8, bits)) + i2b(bits2int(lastn(8, bits)))
8 < #(sgn(bytes2bits(bytes0)) + byte2bits(by)), false ∈ bytes2bits(bytes0), true ∈ bytes2bits(bytes0), ∀ bytes1. # bytes1 < #(bytes0 + by ') → bytes2bits(bytes1) ≠ [] → bytes1 = [] ∨ b2i(bytes1.first) = 0 ∨ b2i(bytes1.first) = ~1 ∨ bits2bytes(sgn(bytes2bits(bytes1))) = bytes1 ⊦ bits2bytes(firstn(#(sgn(bytes2bits(bytes0)) + byte2bits(by)) - 8, sgn(bytes2bits(bytes0)) + byte2bits(by))) + i2b(bits2int(lastn(8, sgn(bytes2bits(bytes0)) + byte2bits(by)))) = bytes0 + by ', b2i((bytes0 + by ').first) = ~1, b2i((bytes0 + by ').first) = 0
Used simplifier rules: byte2bits-length: ⊦ # byte2bits(by) = 8;%bytes2bits-empty-01: ⊦ bytes2bits(bytes) = [] ↔ bytes = [];%bytes2bits-empty: ⊦ bytes2bits([]) = [];% ⊦ #(bits + bits0) = # bits + # bits0;% ⊦ (bits + bits0) + bits1 = bits + bits0 + bits1;% ⊦ ¬ m < n ↔ n ≤ m;% ⊦ m + n ≤ m ↔ n = 0;% ⊦ # bits = 0 ↔ bits = [];% ⊦ sgn(bits) = [] ↔ bits = [];% ⊦ (m + n0) + n1 = m + n0 + n1;% ⊦ m + n = n + m;% ⊦ [] + bytes = bytes;% ⊦ (bytes + bytes0) + bytes1 = bytes + bytes0 + bytes1;% ⊦ by '.first = by;% ⊦ sgn([]) = [];% ⊦ [] + bits = bits;% ⊦ ¬ boolvar ∈ []; Used terms: sgn(bytes2bits(bytes0)) + byte2bits(by)