Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Companion to "Pfaffian Point Processes for Two Classes of Random Plane Partitions"

27669 views

Demonstration of tsscpp_interpolation.sage

Recall the conjectured form of the order-nn TSSCPP kernel KnK_n: Kn(x,y)α,β=22(x+y)Qx,y,α,β(n)i=1x/2(4n2(2i1)2)j=1y/2(4n2(2j1)2), K_n(x,y)_{\alpha, \beta} = \frac{2^{-2(x+y)} \, Q_{x, y, \alpha, \beta}(n)}{\prod_{i=1}^{\lfloor x/2 \rfloor} (4n^2 - (2i-1)^2) \prod_{j=1}^{\lfloor y/2 \rfloor} (4n^2 - (2j-1)^2)} , where Kn(x,y)α,βK_n(x,y)_{\alpha, \beta} denotes entry (α,β)(\alpha, \beta) of Kn(x,y)K_n(x,y) (note α,β{1,2}\alpha, \beta \in \{1,2\}), and where Qx,y,α,β(n)Q_{x, y, \alpha, \beta}(n) is an even polynomial with integer coefficients and degree at most 2(x/2+y/2)2(\lfloor x/2 \rfloor + \lfloor y/2 \rfloor)). The library tsscpp_interpolation.sage contains tools for interpolating the entries Kn(x,y)α,βK_n(x,y)_{\alpha, \beta} of KnK_n based on the conjectured form above. The main functions include:

  • make_denom(n, x, y) computes i=1x/2(4n2(2i1)2)j=1y/2(4n2(2j1)2)\prod_{i=1}^{\lfloor x/2 \rfloor} (4n^2 - (2i-1)^2) \prod_{j=1}^{\lfloor y/2 \rfloor} (4n^2 - (2j-1)^2)

  • make_Q_interpolated(x, y, alpha, beta, K_mats) computes the interpolated polynomial Qx,y,α,β(n)Q_{x, y, \alpha, \beta}(n), where K_mats is a list containing the matrices KnK_n

  • make_rat_fn(x, y, alpha, beta, K_mats) returns the interpolated rational function for Kn(x,y)α,βK_n(x,y)_{\alpha, \beta}

  • make_K_interpolated(K_mats) uses the above functions to interpolate the entries Kn(x,y)α,βK_n(x,y)_{\alpha, \beta} based on the matrices KnK_n contained in K_mats

1. Creating the List K_mats

We first create a list object containing the matrices K1K_1 through KNK_N for N=100N = 100, which was computed in the worksheet tsscpp_matrices.sagews. A function make_K_mats included in tsscpp_interpolation.sage performs this task.

import os load('mat_to_list.sage') load('tsscpp_interpolation.sage') N = 100 K_mats = make_K_mats(N) print('Done')
Done

2. Creating and Saving the Interpolated Kernel KnK_n

With our matrix data contained in the list K_mats, we now interpolate the entries of KnK_n using the function make_K_interpolated:

K_interpolated = make_K_interpolated(K_mats) dim = K_interpolated.nrows() print('The size of the interpolated matrix K_n is {0}-by-{0}\n'.format(dim)) print('Now writing K_interpolated_{0}_by_{0}:'.format(dim)) K_interpolated_file = open('tsscpp_data/tsscpp_K/K_interpolated_{0}_by_{0}.sage'.format(dim), 'w') K_interpolated_file.write("var('n')" + "\n" + "K_interpolated = Matrix(SR, {0})".format(str(mat_to_list(K_interpolated)))) K_interpolated_file.close() print('Done')
x=5 completed x=10 completed x=15 completed x=20 completed x=25 completed x=30 completed x=35 completed The size of the interpolated matrix K_n is 76-by-76 Now writing K_interpolated_76_by_76: Done

3. Reading the Interpolated Kernel Back In

Since the computation of the interpolated kernel above is somewhat time-consuming, it is convenient to be able to read the interpolated kernel back in after saving it. Specifically, loading the file K_interpolated_76_by_76.sage, creates the matrix K_interpolated stored in the previous step

N = 100 dim = 2*floor((2*N - 9) / 5) filename = 'K_interpolated_{0}_by_{0}.sage'.format(dim) print('Now loading {0}:\n'.format(filename)) # load('tsscpp_data/tsscpp_K/{0}'.format(filename)) print('A sample of the interpolated matrix:') show(K_interpolated[0:6, 0:6]) print('Done')
Now loading K_interpolated_76_by_76.sage: A sample of the interpolated matrix:
(05(n21)2(4n21)n244n213(n2+1)2(4n21)7(37n6+7n4692n2+288)16(64n6176n4+76n29)131n61039n41396n2+122416(64n6176n4+76n29)5(n21)2(4n21)03(n2+1)2(4n21)05(65n6175n4322n272)16(64n6176n4+76n29)59n6+299n4+866n2+57616(64n6176n4+76n29)n244n213(n2+1)2(4n21)05(n21)2(4n21)391n61799n4+1624n2273616(64n6176n4+76n29)3(83n6147n4+112n2+792)16(64n6176n4+76n29)3(n2+1)2(4n21)05(n21)2(4n21)05(65n6175n4322n272)16(64n6176n4+76n29)59n6+299n4+866n2+57616(64n6176n4+76n29)7(37n6+7n4692n2+288)16(64n6176n4+76n29)5(65n6175n4322n272)16(64n6176n4+76n29)391n61799n4+1624n2273616(64n6176n4+76n29)5(65n6175n4322n272)16(64n6176n4+76n29)0358n61337n4+7n215488(64n6176n4+76n29)131n61039n41396n2+122416(64n6176n4+76n29)59n6+299n4+866n2+57616(64n6176n4+76n29)3(83n6147n4+112n2+792)16(64n6176n4+76n29)59n6+299n4+866n2+57616(64n6176n4+76n29)358n61337n4+7n215488(64n6176n4+76n29)0)\displaystyle \left(\begin{array}{rrrrrr} 0 & \frac{5 \, {\left(n^{2} - 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & \frac{n^{2} - 4}{4 \, n^{2} - 1} & \frac{3 \, {\left(n^{2} + 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & \frac{7 \, {\left(37 \, n^{6} + 7 \, n^{4} - 692 \, n^{2} + 288\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{131 \, n^{6} - 1039 \, n^{4} - 1396 \, n^{2} + 1224}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} \\ -\frac{5 \, {\left(n^{2} - 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & 0 & -\frac{3 \, {\left(n^{2} + 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & 0 & \frac{5 \, {\left(65 \, n^{6} - 175 \, n^{4} - 322 \, n^{2} - 72\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & \frac{59 \, n^{6} + 299 \, n^{4} + 866 \, n^{2} + 576}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} \\ -\frac{n^{2} - 4}{4 \, n^{2} - 1} & \frac{3 \, {\left(n^{2} + 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & 0 & \frac{5 \, {\left(n^{2} - 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & \frac{391 \, n^{6} - 1799 \, n^{4} + 1624 \, n^{2} - 2736}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & \frac{3 \, {\left(83 \, n^{6} - 147 \, n^{4} + 112 \, n^{2} + 792\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} \\ -\frac{3 \, {\left(n^{2} + 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & 0 & -\frac{5 \, {\left(n^{2} - 1\right)}}{2 \, {\left(4 \, n^{2} - 1\right)}} & 0 & -\frac{5 \, {\left(65 \, n^{6} - 175 \, n^{4} - 322 \, n^{2} - 72\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{59 \, n^{6} + 299 \, n^{4} + 866 \, n^{2} + 576}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} \\ -\frac{7 \, {\left(37 \, n^{6} + 7 \, n^{4} - 692 \, n^{2} + 288\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{5 \, {\left(65 \, n^{6} - 175 \, n^{4} - 322 \, n^{2} - 72\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{391 \, n^{6} - 1799 \, n^{4} + 1624 \, n^{2} - 2736}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & \frac{5 \, {\left(65 \, n^{6} - 175 \, n^{4} - 322 \, n^{2} - 72\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & 0 & \frac{358 \, n^{6} - 1337 \, n^{4} + 7 \, n^{2} - 1548}{8 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} \\ \frac{131 \, n^{6} - 1039 \, n^{4} - 1396 \, n^{2} + 1224}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{59 \, n^{6} + 299 \, n^{4} + 866 \, n^{2} + 576}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{3 \, {\left(83 \, n^{6} - 147 \, n^{4} + 112 \, n^{2} + 792\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & \frac{59 \, n^{6} + 299 \, n^{4} + 866 \, n^{2} + 576}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & -\frac{358 \, n^{6} - 1337 \, n^{4} + 7 \, n^{2} - 1548}{8 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}} & 0 \end{array}\right)
Done

4. Creating and Saving the Limiting Kernel KK_\infty

Besides its tools for interpolating the entries of KnK_n, tsscpp_interpolation.sage also includes funtions for computing the limiting kernel KK_\infty from the interpolated kernel KnK_n. Below, we use rat_limit to create and save this limiting kernel.

i = 0 j = 4 print('Entry ({0},{1}) of the interpolated kernel is'.format(i+1, j+1)) show(K_interpolated[i,j]) print('and its limit as n goes to infinity is') show(rat_limit(K_interpolated[i,j]))
Entry (1,5) of the interpolated kernel is
7(37n6+7n4692n2+288)16(64n6176n4+76n29)\displaystyle \frac{7 \, {\left(37 \, n^{6} + 7 \, n^{4} - 692 \, n^{2} + 288\right)}}{16 \, {\left(64 \, n^{6} - 176 \, n^{4} + 76 \, n^{2} - 9\right)}}
and its limit as n goes to infinity is
2591024\displaystyle \frac{259}{1024}
N = 100 dim = 2*floor((2*N - 9) / 5) K_infinity = Matrix(QQ, dim) for i in [0 .. dim-1]: for j in [0 .. dim-1]: K_infinity[i,j] = rat_limit(K_interpolated[i,j]) if i % 5 == 0: print('i={0} complete'.format(i)) K_infinity_file = open('tsscpp_data/tsscpp_K/K_infinity_{0}_by_{0}.sage'.format(dim), 'w') K_infinity_file.write("K_infinity = Matrix(QQ, {0})".format(str(mat_to_list(K_infinity)))) K_infinity_file.close() print('Done')
i=0 complete i=5 complete i=10 complete i=15 complete i=20 complete i=25 complete i=30 complete i=35 complete i=40 complete i=45 complete i=50 complete i=55 complete i=60 complete i=65 complete i=70 complete i=75 complete Done

5. Reading the Limiting Kernel Back In

As before, we read the limiting kernel back in by loading K_infinity_76_by_76.sage, which stores this matrix as K_infinity.

N = 100 dim = 2*floor((2*N - 9) / 5) load('tsscpp_data/tsscpp_K/K_infinity_{0}_by_{0}.sage'.format(dim)) print('A sample of the limiting kernel:') show(K_infinity[0:6, 0:6]) print('Done')
A sample of the limiting kernel:
(0581438259102413110245803803251024591024143805839110242491024380580325102459102425910243251024391102432510240179256131102459102424910245910241792560)\displaystyle \left(\begin{array}{rrrrrr} 0 & \frac{5}{8} & \frac{1}{4} & \frac{3}{8} & \frac{259}{1024} & -\frac{131}{1024} \\ -\frac{5}{8} & 0 & -\frac{3}{8} & 0 & \frac{325}{1024} & \frac{59}{1024} \\ -\frac{1}{4} & \frac{3}{8} & 0 & \frac{5}{8} & \frac{391}{1024} & \frac{249}{1024} \\ -\frac{3}{8} & 0 & -\frac{5}{8} & 0 & -\frac{325}{1024} & -\frac{59}{1024} \\ -\frac{259}{1024} & -\frac{325}{1024} & -\frac{391}{1024} & \frac{325}{1024} & 0 & \frac{179}{256} \\ \frac{131}{1024} & -\frac{59}{1024} & -\frac{249}{1024} & \frac{59}{1024} & -\frac{179}{256} & 0 \end{array}\right)
Done