-
Notifications
You must be signed in to change notification settings - Fork 1
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
Definition of 8-bit addition and local proof #15
Conversation
The soundness direction of the 8-bit addition is proven, the completeness direction should be easier but IMO before tackling that we should focus on providing a good set of utility theorems/tactics for working with "large enough" fields. Once those are in place we can refactor the proof using those, which should hopefully be also easier to read. |
Since those issues are tightly coupled, this PR partially addresses also #12, refactoring some utility theorems over large enough fields. instance (p : ℕ) : LT (F p) := ⟨fun x y => x.val < y.val⟩ Then take this expression variable {x y : F p}
#check (x+y) < 5 The #check (x.val + y.val) < 5 makes sure that all values are taken as their representation in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!!
simp [forallList, ByteLookup.lookup] | ||
let equivBoolean := Boolean.equiv N M carry X | ||
simp [forallList, Boolean.spec] at equivBoolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's nice how well simp
works here on forallList
Issues #5 and #10
It turns out that having the assumption
p > 512
is very important for the proof. For now there are explicit field assumptions here, but they will be refactored (possibly as part of #12) in some global structure that takes into account all the global assumptions of the field we are working on.