mirror of https://github.com/zcash/halo2.git
book: Use \cdot for multiplications
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
8f929888af
commit
653cb6ca88
|
@ -4,7 +4,7 @@ Let's start with a simple circuit, to introduce you to the common APIs and how t
|
|||
used. The circuit will take a public input $c$, and will prove knowledge of two private
|
||||
inputs $a$ and $b$ such that
|
||||
|
||||
$$a * b = c.$$
|
||||
$$a \cdot b = c.$$
|
||||
|
||||
```rust
|
||||
# extern crate halo2;
|
||||
|
|
|
@ -12,11 +12,11 @@ In halo2 circuits, you can similarly constrain a cell to have one of a small set
|
|||
values. For example, to constrain $a$ to the range $[0..5]$, you would create a gate of
|
||||
the form:
|
||||
|
||||
$$a * (1 - a) * (2 - a) * (3 - a) * (4 - a) = 0$$
|
||||
$$a \cdot (1 - a) \cdot (2 - a) \cdot (3 - a) \cdot (4 - a) = 0$$
|
||||
|
||||
while to constraint $c$ to be either 7 or 13, you would use:
|
||||
|
||||
$$(7 - c) * (13 - c) = 0$$
|
||||
$$(7 - c) \cdot (13 - c) = 0$$
|
||||
|
||||
> The underlying principle here is that we create a polynomial constraint with roots at
|
||||
> each value in the set of possible values we want to allow. In R1CS circuits, the maximum
|
||||
|
|
Loading…
Reference in New Issue