<font color="#f00">Why does the cross term appear while folding R1CS instances under the hood? </font> <br /> To illustrate this issue we split the problem into three parts: ## how does cross term appear The bottom reason of it is "R1CS constrain system is a relation of vector element-wise **production**, **not addition**", like: $$ A z \circ B z = C z $$ If there are two instances to be folded, such as $z_1$ and $z_2$, they have relations: $$ A z_1 \circ B z_1 = C z_1 \\ A z_2 \circ B z_2 = C z_2 \\ $$ We need a new "bigger" instance $z'$, which contains all information about $z_1$ and $z_2$, also has the same relation: $$ A z' \circ B z' = C z' $$ To make it simple(to fold), the new "bigger" instance should be composed through a simple linear combination method: $$ z' = z_1 + r * z_2 $$ Unfortunately it **DOES NOT** satisfy the original R1CS relation: $$ A (z_1 + r * z_2) \circ B (z_1 + r * z_2) \overset{?}= C (z_1 + r * z_2) $$ Therefore the cross term $E$, which have the same number of rows as A/B/C, came out: $$ A (z_1 + r * z_2) \circ B (z_1 + r * z_2) \overset{?}= C (z_1 + r * z_2) + E $$ But what's inside the cross term $E$, it's very easy to get: $$ E = r · (A z_1 ◦ B z_2 + A z_2 ◦ B z_1 − C z_2 − C z_1) $$ <br /> So we have to update the original R1CS constrain relation into a new **relaxed** one: $$ A z \circ B z = uC z + E $$ <br /> ## Why does the relaxed relation work We define two newly instances $U_1 = \{z_1, u_1, E_1\}, U_2 = \{z_2, u_2, E_2\}$, satisfy the updated **relaxed** R1CS relation: $$ A z_1 \circ B z_1 = u_1 C z_1 + E_1 \\ A z_2 \circ B z_2 = u_2 C z_2 + E_2 \\ $$ Then if we have a new folded "bigger" instance $U' = \{z', u', E'\}$, the first term $z'$: $$ z' = z_1 + r * z_2 $$ and other two auxilaries: $$ u' = u_1 + r * u_2 \\ E' = E_1 + r * E_2 \\ $$ So does the newly instance $U'$, which contains $z'$, $u'$ and $E'$, satisfies the **relaxed** R1CS relation? Let's see how it goes: $$ A z' \circ B z' \overset{?}= u' C z' + E' $$ The answer is YES, you can try it out: $$ A (z_1 + r*z_2) \circ B (z_1 + r*z_2) \overset{?}= (u_1 + r * u_2) C (z_1 + r*z_2) + (E_1 + r * E_2) $$ <br /> ## what if it is a addition If R1CS constrain relation is a addition one: $$ A z_1 + B z_1 = C z_1 \\ A z_2 + B z_2 = C z_2 \\ $$ and $$ z' = z_1 + r * z_2 \\ $$ We can certaily have: $$ A z' + B z' = C z' \\ $$ No cross terms, no **relaxed** relation any more! Unfortunately it's actually not, it won't happen! <br />