ZK in Context - Part 4
Ali Atiia
yAcademy, yAudit
https://twitter.com/AliAtiia_
yAcademy
https://yacademy.dev/fellowships
(2) Accepted few self-evident Truths (axioms)
If:
(1) We started off with some set of alphabet like :
(3) Unambiguously defined the rules of derivation
Is there a guarantee that every conceivable language (=Truth, “problem”) is expressible thru? (completeness)
0 s ¬ ∀ ∃ = ( ) + ⨉ ∨ x1 x2 x3 …
Last time:
(2) Accepted few self-evident Truths (axioms)
If:
(1) We started off with some set of alphabet like :
(3) Unambiguously defined the rules of derivation
Is there a guarantee that no false statement cannot be arrived at by valid application of rules of derivation? (consistency)
0 s ¬ ∀ ∃ = ( ) + ⨉ ∨ x1 x2 x3 …
Last time:
(2) Accepted few self-evident Truths (axioms)
If:
(1) We started off with some set of alphabet like :
(3) Unambiguously defined the rules of derivation
Is there a guarantee that the truthfulness or falsehood of a statement can be determined by direct unambiguous mechanical application of the rules of derivation? (decidability)
0 s ¬ ∀ ∃ = ( ) + ⨉ ∨ x1 x2 x3 …
Last time:
Gödel’s reduction answered the first 2 questions
4) Construct a meta-statement that cannot be proven within the system
3) Arithmetized proofs into unique integers ∏1, ∏2, …. ∏∞
2) Arithmetized statements into unique integers n1, n2, …. n∞
1) Encoded the alphabet
❌ Completeness
❌ Consistency
? Decidability
Today: Decidability
7
Is there a Universal language ? A language of all languages ?
Is there a Universal machine?
Languages
Machines
TRUTHS
PROOFS
8
Universal machine:
Languages
Machines
TRUTHS
PROOFS
Is there a Universal language ? A language of all languages ?
Is there a Universal machine?
9
Nothing special about this machine really, when consulted about whether a number is IN our OUT, it consults the axioms and applies the rules mechanically
e.g. recall the machine sketched above for the P-E language has no conception of “addition”
Languages
Machines
TRUTHS
PROOFS
Is there a Universal language ? A language of all languages ?
Is there a Universal machine?
Universal machine:
10
Is there a Universal machine?
Is there a Universal language ?
Languages
Machines
TRUTHS
PROOFS
11
Is there a Universal machine?
Is there a Universal language ?
Let’s settle for a universal language (in small letters) ..
(ignore those logical blackholes, when was the last time someone bumped into one anyway, practically speaking ? )
Languages
Machines
TRUTHS
PROOFS
12
Is there a Universal machine?
Is there a Universal language ?
Let’s settle for a universal language (in small letters) ..
Languages
Machines
TRUTHS
PROOFS
the most widely used “universal language” in practice is ZFC set theory (13 axioms)
�We used it to define SAT, Knapsack, EC, 3-coloring…
(ignore those logical blackholes, when was the last time someone bumped into one anyway, practically speaking ? )
13
universal language = all Truths (minus some weird “problematic statements”)
Is there a Universal machine?
Is there a Universal language ?
Let’s settle for a universal language (in small letters) ..
Languages
Machines
TRUTHS
PROOFS
14
universal language = all Truths (minus some weird “problematic statements”)
universal language can describe everything, including machines
Is there a Universal machine?
Is there a Universal language ?
Let’s settle for a universal language (in small letters) ..
Languages
Machines
TRUTHS
PROOFS
15
Every conceivable sentence
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | | | | | | | | | | |
2 | | | | | | | | | | |
3 | | | | | | | | | | |
4 | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
n | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
Every conceivable machine
∞
∞
Languages
Machines
TRUTHS
PROOFS
16
Every conceivable sentence
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | | | | | | | | | | |
2 | | | | | | | | | | |
3 | | | | | | | | | | |
4 | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
n | | | | | | | | | | |
. | | | | | | | | | | |
. | | | | | | | | | | |
Every conceivable machine
∞
∞
Languages
Machines
TRUTHS
PROOFS
Recall the encoding of the P-E language�and its corresponding decider machine, �both encoded as natural numbers
17
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
Every conceivable machine
∞
∞
This is the result returned by
machine encoded with 2 when supplied with statement encoded with 1 as input
Every conceivable sentence
Languages
Machines
TRUTHS
PROOFS
18
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
Consider machine number k which �operates as follows:
Languages
Machines
TRUTHS
PROOFS
19
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
Consider machine number k which �operates as follows:
1. It receives sentence n
Languages
Machines
TRUTHS
PROOFS
20
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
Consider machine number k which �operates as follows:
1. It receives sentence n
2. It feeds sentence n to machine n
Languages
Machines
TRUTHS
PROOFS
21
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
Consider machine number k which �operates as follows:
1. It receives sentence n
2. It feeds sentence n to machine n
3. It adds 1 to the result (diagonal+1)
Languages
Machines
TRUTHS
PROOFS
22
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
Consider machine number k which �operates as follows:
1. It receives sentence n
2. It feeds sentence n to machine n
3. It adds 1 to the result (diagonal+1)
4. It terminates
Languages
Machines
TRUTHS
PROOFS
23
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
mk (n) = mn (n) + 1
In other words, in shorthand notation :
Consider machine number k which �operates as follows:
1. It receives sentence n
2. It feeds sentence n to machine n
3. It adds 1 to the result (diagonal+1)
4. It terminates
Languages
Machines
TRUTHS
PROOFS
24
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
What happens if we supply sentence k itself to mk ?
Languages
Machines
TRUTHS
PROOFS
25
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
mk (k) = mk (k) + 1
What happens if we supply sentence k itself to mk ?
Languages
Machines
TRUTHS
PROOFS
26
| 1 | 2 | 3 | 4 | 5 | . | . | n | . | . |
1 | 0 | 0 | 89 | 3 | 0 | . | . | 0 | . | . |
2 | 10 | 1 | 0 | 0 | 0 | . | . | 0 | . | . |
3 | 0 | 0 | 0 | 0 | 0 | . | . | 0 | . | . |
4 | 20 | 0 | 4 | 1 | 0 | . | . | 56 | . | . |
. | 60 | 0 | 0 | 0 | 0 | . | . | 3 | . | . |
. | 0 | 0 | 0 | 0 | 6 | . | . | 0 | . | . |
. | 30 | 0 | 0 | 3 | 0 | . | . | 3 | . | . |
n | 0 | 9 | 0 | 0 | 2 | . | . | 40 | . | . |
. | . | . | . | . | . | . | . | . | . | . |
. | . | . | . | . | . | . | . | . | . | . |
∞
∞
mk (k) = mk (k) + 1
What happens if we supply sentence k to mk ?
(!)
Logical blackhole, so mk does not, could not, exist!
Languages
Machines
TRUTHS
PROOFS
27
mk (k) = mk (k) + 1
(!)
Logical blackhole, so mk does not, could not, exist!
TRUTHS
PROOFS
Therefore, there exist at least one language that is beyond decidability
28
mk (k) = mk (k) + 1
(!)
Logical blackhole, so mk does not, could not, exist!
TRUTHS
PROOFS
Notice we didn’t even need to to define the internal of the machine (or the intricate details of an algorithm accepting and simulating other algorithms) in order to reach this undecidability result
29
No
Some Truths are beyond provability
No
There are more languages than there are machines to decide them!
Is there a Universal machine?
Is there a Universal language ?
Languages
Machines
TRUTHS
PROOFS
30
No
There are more languages than there are machines to decide them!
Is there a Universal machine?
Languages
Machines
TRUTHS
PROOFS
No
Some Truths are beyond provability
Is there a Universal language ?
❌ Completeness
❌ Consistency
❌ Decidability
fuck it we ball
screw it, we tried
Whatever the axiomatic system, some truths are beyond decidability
33
Decidability: a finite and unambiguous set of instructions (algorithm) that terminate with a yes (true) or no (false)
Whatever the axiomatic system, some truths are beyond decidability
34
What we have proven so far is “there exists at least one language (diagonal+1) that no machine can decide. Other “natural” undecidable languages exist. Classic example (the halting problem):
for arbitrary j, print “yes” if mj terminates with an answer -any answer- on every input
Whatever the axiomatic system, some truths are beyond decidability
Decidability: a finite and unambiguous set of instructions (algorithm) that terminate with a yes (true) or no (false)
35
36
ljk
Philosophy/Theology
Mathematical truths
Provability boundary
Decidability boundary
37
Chess
Protein folding
Eact Cover, 3-SAT, Knapsack, 3-Coloring
Arithmetic, sorting
38
Eact Cover, 3-SAT, Knapsack, 3-Coloring
39
Chess
Protein folding
Complexity Hierarchy: the closer the language is to this boundary, the harder (more computationally expensive) it is for a decider to tell who is IN and who is OUT
Eact Cover, 3-SAT, Knapsack, 3-Coloring
Arithmetic, sorting
40
Complexity Hierarchy is to computer scientists what the Periodic Table is to physicists
41
We classify problems within the black boundary (decidable) according to the computational resources that must be expended to solve them:
Easy classes:
42
We classify problems with the black boundary (decidable) according to the computational resources that must be expended to solve them:
Hard classes:
43
Another way of describing these classes:
problems that can be decomposed into two computations:
44
Next time:
In preparation for our first audit of a Circom codebase on Wednesday, here is a starter kit to prepare you for it:�
https://sweltering-bill-f01.notion.site/Circom-Starter-Kit-e567a20b7e76431aa5b01b0d908baa28
The introduction ties Circom to the theory we have been covering of the first 3 sessions, and provides a sneak-peak into what we will cover in the remaining 1-2 sessions of Module 1.�
We pick up next time with the mother of all reductions, Cook’s, to understand the inside of the green boundary (decidable) and the prover-verifier computation model that can decide various subset within that green set
Thanks