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

[Circuit monad] Completeness composition #30

Merged
merged 8 commits into from
Dec 17, 2024

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Dec 16, 2024

  • changes the subcircuit operation to have notions of assumptions/inputs/outputs, and require both a soundness and completeness statement.
  • use a subcircuit's completeness when proving completeness of a parent circuit
  • confirm that the completeness proof of add8_wrapped is now trivial

Comment on lines +923 to +927
-- simplify `Add8Full.assumptions` and prove them easily by using our own assumptions
dsimp [Add8Full.circuit, Add8Full.assumptions]
show x.val < 256 ∧ y.val < 256 ∧ (0 = 0 ∨ 0 = 1)
have ⟨ asx, asy ⟩ := as
exact ⟨ asx, asy, by tauto ⟩
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the completeness proof of add8_wrapped after mechanical simplifications

Copy link
Collaborator

@gio54321 gio54321 left a comment

Choose a reason for hiding this comment

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

Very nice! LGTM

@mitschabaude mitschabaude merged commit ae911ce into main Dec 17, 2024
1 check passed
@mitschabaude mitschabaude deleted the feature/subcircuit-witgen branch December 17, 2024 10:48
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.

2 participants