book/ zk_explainer: added title and math formatter

This commit is contained in:
lunar-mining
2022-06-08 12:16:32 -05:00
parent 757c464167
commit 69096cfc56

View File

@@ -1,3 +1,5 @@
# Zero-knowledge explainer
We start with this algorithm as an example:
```python
@@ -12,7 +14,7 @@ ZK code consists of lines of constraints. It has no concept of branching conditi
So our first task is to flatten (convert) the above code to a linear equation that can be evaluated in ZK.
Consider an interesting fact. For any value $x$, then $(1 - w) = 0$ if and only if $x = 1$.
Consider an interesting fact. For any value $\mathbb{x}$, then $(1 - w) = 0$ if and only if $x = 1$.
In our code above $w$ is a binary value. It's value is either $1$ or $0$. We make use of this fact by the following: