From e0316c39e211ca52857889886903600879ecf52f Mon Sep 17 00:00:00 2001 From: Thibaut Schaeffer Date: Fri, 1 Feb 2019 11:44:44 +0100 Subject: [PATCH] Update ir.md --- zokrates_book/src/reference/ir.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zokrates_book/src/reference/ir.md b/zokrates_book/src/reference/ir.md index 14ee0490..ffeaa3fb 100644 --- a/zokrates_book/src/reference/ir.md +++ b/zokrates_book/src/reference/ir.md @@ -5,9 +5,11 @@ ZIR is the intermediate representation ZoKrates uses to represent programs. It i **Note that ZIR is still in development and can change without notice.** When generating R1CS constraints, very large numbers are often used, which can make reading ZIR hard for humans. -To mitigate this, ZIR applies an isomorphism when displaying field elements: they are shown as members of the interval `[-(p-1)/2, (p-1)/2]`. +To mitigate this, ZIR applies an isomorphism when displaying field elements: they are shown as members of the interval `[- (p - 1)/2, (p - 1)/2]`. In other words, the following mapping is used: +- elements in `[0, (p - 1)/2]` map to themselves +- elements in `[(p + 1)/2, p - 1]` map to themselves minus `p` -Therefore, instead of writing p - 1 as: +Therefore, instead of writing `p - 1` as: ``` 21888242871839275222246405745257275088548364400416034343698204186575808495616 ```