mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

feat: define Gray code

Open Command-Master opened this issue 1 year ago • 2 comments


Define binary reflected gray code, both as a permutation of Nat and as a permutation of BitVec n, and prove some theorems about them. Additionally, remove @[simp] from Nat.bit_false and Nat.bit_true, as bit0 and bit1 are deprecated, and add some lemmas to Bits, Bitwise and Size.

  • [ ] depends on: #12751

Open in Gitpod

Command-Master avatar May 08 '24 04:05 Command-Master

It seems this PR is awaiting action by the PR author: let me label it accordingly.

Looking at the PR description, it seems to me this PR is doing several things at once: usually, you can get your changes merged faster if you split them - especially since these look (to me) like quite different changes.

grunweg avatar May 24 '24 18:05 grunweg

This PR/issue depends on:

PR summary e2c8b0856b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Data.Nat.GrayCode 333

Declarations diff

+ add_pow_testBit + and_div2 + bit_false_succ + bit_true_succ + bitwise_div2 + div2_testBit + grayCode + grayCodeInv + grayCodeInv_val + grayCode_prop + grayCode_size + or_div2 + partialGrayCode + partialGrayCode_prop + size_eq_iff_le_and_lt + size_eq_iff_testBit + succ_testBit_zero + xor_div2

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

github-actions[bot] avatar Jul 25 '24 15:07 github-actions[bot]