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

Add32 proofs in new formulation #43

Merged
merged 18 commits into from
Jan 14, 2025
Merged

Add32 proofs in new formulation #43

merged 18 commits into from
Jan 14, 2025

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Jan 10, 2025

closes #6

  • proofs for the new add32 gadget (with carry)
  • new tactic script field_to_nat_u32

Base automatically changed from subcircuit-soundness to main January 12, 2025 09:45
@mitschabaude mitschabaude changed the title WIP Transfer Add32 proofs Add32 proofs in new formulation Jan 13, 2025
@mitschabaude mitschabaude marked this pull request as ready for review January 13, 2025 15:59
Copy link
Collaborator

@marcobesier marcobesier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very nice and clean! There's a minor typo in one comment, but this surely doesn't block approval. :)

@@ -44,6 +47,12 @@ def is_normalized (x: U32 (F p)) :=
def value (x: U32 (F p)) :=
x.x0.val + x.x1.val * 256 + x.x2.val * 256^2 + x.x3.val * 256^3

/--
Return the value of a 32-bit unsigned integer as a field
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a missing word in this comment:

Return the value of a 32-bit unsigned integer as a field **element.**

Admittedly, it is a non-issue, but we might still want to fix it for the sake of clarity.

Copy link
Collaborator Author

@mitschabaude mitschabaude Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yep I'm actually used to just saying "field" instead of "field element", because this was the widely used shorthand in the ecosystem I worked in (Mina / o1js).
(in Starkware/Cairo they say "felt" :D)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, got it! felt is next level, tho 😂

@mitschabaude mitschabaude merged commit 56cbdfe into main Jan 14, 2025
1 check passed
@mitschabaude mitschabaude deleted the add32-proofs branch January 14, 2025 08:19
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

Successfully merging this pull request may close these issues.

32-bit addition circuit
2 participants