Skip to content

round3 中下面这个代码的依据是什么? #93

Discussion options

You must be logged in to vote

这个assert 用于验证商多项式的计算是否正确,QUOT_big.values[0] 对应的x坐标是w^0 = 1, 所以对应到coset的x坐标就是 (offset * w^0)。

        # Sanity check that we've computed T1, T2, T3 correctly
        #  验证商多项式的计算是否正确,QUOT_big.values[0] 对应的x坐标是w^0 = 1, 所以对应到coset的x坐标就是 (offset * w^0)
        assert (
            T1.barycentric_eval(fft_cofactor)
            + T2.barycentric_eval(fft_cofactor) * fft_cofactor**group_order
            + T3.barycentric_eval(fft_cofactor) * fft_cofactor ** (group_order * 2)
        ) == QUOT_big.values[0]

        # QUOT_big.values[4*i]处验证T的计算是否正确,对应的输入位置是 (offset * w^i)
        roots_of_unity = Scalar.roots_of_unity(group_order)
        T = lambda w: T1.barycentric_eval(w) + T2.barycentric_eval…

Replies: 1 comment

Comment options

readygo67
May 14, 2023
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by readygo67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant