List.fold_left
https://twitter.com/lambda0xE/status/1962189461720105316
elon's latex editor looks very limited, but I like the idea, hope they will expand it
1❤3
function TAPE_Verify(A, B, C, rounds):
For r in 1..rounds:
u = RandomBitVector(1024)
// compute expected result
expected = Map<(lid, idx, sign), bit>
For ea in A.E:
For eb in B.E:
pa = InnerProduct(u, ea.sigma) mod 2
pb = InnerProduct(u, eb.sigma) mod 2
bit = pa ⨁ pb
lid = ea.layer_id * |B.L| + eb.layer_id
idx = (ea.idx + eb.idx) mod 61
sign = (ea.sign = eb.sign) ? + : -
expected[(lid, idx, sign)] ⨁= bit
// check actual result
actual = Map<(lid, idx, sign), bit>
For ec in C.E:
pc = InnerProduct(u, ec.sigma) mod 2
actual[(ec.layer_id, ec.idx, ec.sign)] ⨁= pc
If expected ≠ actual:
Return FAIL
Return PASS
the simplest example of TAPE proof, which posted earlier (maybe a change of ZK narratives?)
❤2