OAI/MathematicalPhysics/ContinuumCoulomb/Reduction/BinaryEncoding.lean
25 declarations, 0 contain sorry, 0 declared as axioms
Explicit prefix-free binary encodings for finite source and circuit data. Natural numbers use their binary digits, with one marker bit per digit. Pairs concatenate; lists have a binary length header. In particular, list serialization does not repeatedly pair large natural-number codes.
- abbrev
OAI.ContinuumCoulomb.BinaryEncoding.BitStringline 15Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:12 (same declaration text).
- structure
OAI.ContinuumCoulomb.BinaryEncoding.Codecline 17Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:14 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.Codec.encode_injectiveline 22 - def
OAI.ContinuumCoulomb.BinaryEncoding.encodeDigitsline 28Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:19 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.readDigitsline 32Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:23 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.readDigits_encodeline 37Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:28 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.decodeDigitsline 43Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:34 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.decodeDigits_bitsline 47Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:38 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.naturalline 52Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:43 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.encodeDigits_lengthline 57 - theorem
OAI.ContinuumCoulomb.BinaryEncoding.natural_lengthline 64Source documentation
The code of a natural has linear overhead in its binary bit length.
theorem natural_length (n : ℕ) : (natural.encode n).length = 2 * n.size + 1 := by …
- def
OAI.ContinuumCoulomb.BinaryEncoding.encodeUnaryline 69Source documentation
Unary electron counts use one true bit per electron and a false terminator.
Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:48 (same declaration text).
def encodeUnary : ℕ → BitString | 0 => [false] | n + 1 => true :: encodeUnary n
- def
OAI.ContinuumCoulomb.BinaryEncoding.readUnaryline 73Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:52 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.readUnary_encodeline 78Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:57 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.unaryline 84Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:63 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.unary_lengthline 89 - def
OAI.ContinuumCoulomb.BinaryEncoding.integerline 95Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:68 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.pairline 106Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:79 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.readCountline 113Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:86 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.readCount_encodeline 117Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:90 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.listline 124Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:97 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.equivline 130Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:103 (same declaration text).
- def
OAI.ContinuumCoulomb.BinaryEncoding.sumline 135Also declared: ComparatorChallenges/ContinuumCoulombHardness.lean:108 (same declaration text).
- theorem
OAI.ContinuumCoulomb.BinaryEncoding.pair_lengthline 146 - theorem
OAI.ContinuumCoulomb.BinaryEncoding.list_lengthline 150