Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary and octal number notations #23

Open
JasonGross opened this issue May 6, 2021 · 1 comment
Open

binary and octal number notations #23

JasonGross opened this issue May 6, 2021 · 1 comment

Comments

@JasonGross
Copy link
Member

I think it would be nice to support printing and parsing of binary and octal constants in addition to hexadecimal ones. In addition it might make sense to factor out DecimalFacts and HexadecimalFacts to be parameterized over, say,

digits : Type
all_digits : list digits
digit_index : digits -> nat
all_digits_complete : forall d, List.nth_error all_digits (digit_index d) = Some d
all_digits_unique : forall n d, List.nth_error all_digits n = Some d -> digit_index d = n

and then to have proofs about list digits. This should allow compact proofs for all base systems.

cc @proux01, what do you think?

@proux01
Copy link
Contributor

proux01 commented May 6, 2021

This should indeed be rather straightforward by taking inspiration from coq/coq#11948 your idea seems indeed good and if that works it should avoid most of the bulky duplications that came with hexadecimal numbers.

I don't have neither time nor use for this but if you implement it, I can promise a careful review.

@proux01 proux01 transferred this issue from coq/coq Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants