Skip to content

Instantly share code, notes, and snippets.

@defeo
Created February 21, 2016 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defeo/b48b9a91791284cedbf8 to your computer and use it in GitHub Desktop.
Save defeo/b48b9a91791284cedbf8 to your computer and use it in GitHub Desktop.
A demonstration of Lemma 1.1
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schost
Copy link

schost commented Feb 21, 2016

Q1.<xx>=R.quo(P1)
R1.<z>=PolynomialRing(Q1)
Q2.<zz>=R1.quo(z^(l^2)-xx)
xx = Q2(R1(xx))

def to_Q2(aa):
    return add([aa[i]*xx^(i//25)*zz^(i%25) for i in range(100)])

def from_Q1(b):
    return b.lift()(x^25)

def from_Q2(bb):
    return add([from_Q1(bb[i])*x^i for i in range(25)])

A = to_Q2(a)
check = from_Q2(A^sigma)
check == expected

YY = xx^u*zz^r
YY == zz^sigma

monomials = [Q2(1)]
for i in range(25):
    monomials.append(monomials[i]*YY)
## here, we should be a bit careful; these guys can all be computed in O(25) ops in F1.

res = add([monomials[i] * Q2(R1(A[i])) for i in range(25)])
## same, this sum takes O(25) ops in F1.

from_Q2(res) == expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment