feat(Logic.Equiv.BijectiveBase2): add bijective base-2 numeration#35857
feat(Logic.Equiv.BijectiveBase2): add bijective base-2 numeration#35857AlexeyMilovanov wants to merge 3 commits intoleanprover-community:masterfrom
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 7dfb413d60Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
17e23f3 to
a9a857f
Compare
This PR introduces a formalization of the bijective base-2 numeration system.
Unlike standard binary representation, bijective base-2 avoids the "leading zeros" problem, providing a strict mathematical bijection between natural numbers (
ℕ) and lists of booleans (List Bool).Main additions:
Equiv.BijectiveBase2.toBits: EncodesℕtoList Bool.Equiv.BijectiveBase2.ofBits: DecodesList Booltoℕ.equivBijectiveBase2: The formalℕ ≃ List Boolequivalence.(Note: This replaces my previously closed PR to avoid the terminology clash between "Dyadic" and dyadic rationals. The namespace and definitions have been updated accordingly).
(Note: Used AI to assist with standardizing proof structures).