Skip to content

Polynomial Equality Circuit#51

Open
hridambasu wants to merge 30 commits intozsa1from
polynomial-inequality
Open

Polynomial Equality Circuit#51
hridambasu wants to merge 30 commits intozsa1from
polynomial-inequality

Conversation

@hridambasu
Copy link

@hridambasu hridambasu commented Feb 10, 2026

Halo2 Example: Polynomial Equality Circuit
This circuit proves knowledge of two field elements (a, b) such that:

  1. a^5 = b^2 (polynomial equality constraint)
  2. Computes sum = a + b and diff = a - b as public outputs

The circuit looks like this:
Row | I0 | A0 | A1 | F0 | F1 | S0 | S1 | S2
----+--------------------------------------------------------------------+--------------------------------------------------------------------+------+-----+----+----+----+---
0 | 0x24 | 0x4 | 0 | 0 | 0 | 0 | 0 | 0
1 | 0x40000000000000000000000000000000224698fc094cf91b992d30ecffffffe5 | 0x20 | 0 | 0 | 0 | 0 | 0 | 0
2 | 0 | 0x4 | 0x4 | 0 | 1 | 0 | 0 | 1
3 | 0 | 0x10 | 0 | 0 | 0 | 0 | 0 | 0
4 | 0 | 0x10 | 0x10 | 0 | 1 | 0 | 0 | 1
5 | 0 | 0x100 | 0 | 0 | 0 | 0 | 0 | 0
6 | 0 | 0x100 | 0x4 | 0 | 1 | 0 | 0 | 1
7 | 0 | 0x400 | 0 | 0 | 0 | 0 | 0 | 0
8 | 0 | 0x20 | 0x20 | 0 | 1 | 0 | 0 | 1
9 | 0 | 0x400 | 0 | 0 | 0 | 0 | 0 | 0
10 | 0 | 0x4 | 0x20 | 1 | 0 | 1 | 0 | 0
11 | 0 | 0x24 | 0 | 0 | 0 | 0 | 0 | 0
12 | 0 | 0x4 | 0x20 | 0x2 | 0 | 0 | 1 | 0
13 | 0 | 0x40000000000000000000000000000000224698fc094cf91b992d30ecffffffe5 | 0 | 0 | 0 | 0 | 0 | 0

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