-
Notifications
You must be signed in to change notification settings - Fork 5
Add builtins and proofs for the Merkle example #224
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
base: main
Are you sure you want to change the base?
Conversation
747876a to
8eb0223
Compare
468a582 to
ffb7706
Compare
This commit also provides `to_array_spec` which is not the same as the `to_array_inv` that it removes. The postcondition is _far_ simpler, and it requires far fewer input constraints to make it work. It should still suffice, however.
* remove redudant `exact ()` and `trivial`s * verify BE and LE decompositions * move lemmas to Ext module and remove least useful ones * simplify simps and fix formatting * applyRangeConstraint builtin + bn254 proofs + from le/be * initial unyieldy proof for pow32 * simplify pow_32 intro * remove map_toFin_map_ofFin * generalize mod_u32_sub_add_eq to mod_sub_add_eq * document empty postconditions being required for steps * reorder bits & bytes results more logically
5876c4f to
2a096aa
Compare
Eduardogbg
left a comment
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.
I guess changes mostly fall into the following categories:
- changes from my branch (which we already reviewed)
- removal of big int (which I have no context for but i assume is related to making lampe match noir more closely)
- builtin changes (some of which I did some of which i didn't)
i made comments about the ones i have questions about
Lampe/Lampe/Builtin/Helpers.lean
Outdated
| _ = _ := by simp [Nat.pow_succ, Nat.mul_comm] | ||
| ⟩ | ||
|
|
||
| -- def ofDigitsBE {d} (v : List.Vector (Digit r) d): RadixVec r d := match d with |
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.
i guess remove this?
| -- · exact Fin.prop _ | ||
| -- ⟩ | ||
|
|
||
| def ofDigitsBE' (l : List (Digit r)): Nat := |
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.
are we ok with this naming convention with '?
Lampe/Lampe/Builtin/Helpers.lean
Outdated
| -- := lst ++ (List.replicate (len - lst.length) default) | ||
|
|
||
| -- @[reducible] | ||
| -- def decomposeToRadix (r : Nat) (v : Nat) (h : r > 1) : List Nat := match v with |
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 seems interesting? I guess we could have used this for the semantics? what's your opinion @kustosz
e496b3b to
cd8b2a1
Compare
No description provided.