After getting QAP, how did it happen to get reminder zero when t/z is computed ? What is the corelation between cubic equation and QAP ?
Numbering the gates as 1, 2, 3, 4 etc, you think of this number as the x-coordinate of a point. The first column of the $A$ Matrix is $[0, 0, 0, 5]^T$
Each element corresponds to one of the gates. So if you think of these values as the corresponding y co-ordinates.
So you have 4 points $(1,0), (2,0), (3,0), (4,5)$.
Using Lagrange interpolation, you can get the polynomial passing through these 4 points. Likewise you can find the polynomials for first column of the $B$ & $C$ matrices also.
So you get your $A_1(x), B_1(x)$ & $C_1(x)$ polynomials & all the way upto $A_6(x), B_6(x), C_6(x)$
The witness vector is $S$.
$A(x).S + B(x).S = C(x).S$
This is shown in Buterin's diagram
You can create a new polynomial $T(x) = A(x).S + B(x).S - C(x).S$.
$T(x)$ has 4 known roots at $x = [1, 2, 3, 4]$.
Let $Z(x) = (x-1)(x-2)(x-3)(x-4)$
By the Polynomial Reminder Theorem, with constant $a$, the remainder of a polynomial $P(x)$ divided by $x−a$ is equal to $P(a)$. So $P(1), P(2), P(3), P(4)$ are all equal to $0$.
Hence when $T(x)$ is divided by each of the $(x-1), (x-2), (x-3), (x-4)$, the remainder is $0$.
Hence when $T(x)$ is divided by $Z(x)$, the remainder is $0$
i.e. when divided, it's exactly divisible & has no remainder.
Why did the inital cubic polynomial converted to QAP ? Can we not use an equation which have multiple real roots. Ultimately, we got a polynomial of higher degree(QAP) to divide it by z.
In Computer Science, there are 2 models of computation - circuits and Turing Machines. Circuits can express most things through just the 2 operations addition & multiplication & hence reduce the complexity of ZK proofs. If you hadn't flattened the original program & had not used circuits, you would also needed powerof operation & in other computations more operations.