From 2aea5828651539cb0a72b2afdae2c7b1ce649384 Mon Sep 17 00:00:00 2001 From: str4d Date: Fri, 11 Dec 2020 18:45:14 +0000 Subject: [PATCH] book: Note that roots don't have to be constant Co-authored-by: Daira Hopwood --- book/src/user/tips-and-tricks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/src/user/tips-and-tricks.md b/book/src/user/tips-and-tricks.md index e1dcce5..9f1cb73 100644 --- a/book/src/user/tips-and-tricks.md +++ b/book/src/user/tips-and-tricks.md @@ -23,3 +23,5 @@ $$(7 - c) \cdot (13 - c) = 0$$ > supported polynomial degree is 2 (due to all constraints being of the form $a * b = c$). > In halo2 circuits, you can use arbitrary-degree polynomials - with the proviso that > higher-degree constraints are more expensive to use. + +Note that the roots don't have to be constants; for example $(a - x) \cdot (a - y) \cdot (a - z) = 0$ will constrain $a$ to be equal to one of $\{ x, y, z \}$ where the latter can be arbitrary polynomials, as long as the whole expression stays within the maximum degree bound.