/* In this case we let H denote a copy of PSL(2,9)=Alt(6), L denote the subgroup Alt(5).
We give matrices defining L, then a matrix giving us H. We take a trilinear form from C4
(in which Alt(6), and in particular Alt(5), can be easily found) and conjugate it into
something nicer to understand. We prove that there are two copies of H above a given L,
swapped by an element of order 2 in C_E6(L). Then we give an element of order 3 in
C_E6(H), confirming that H lies in the A2A2 subgroup.
*/
F<w>:=GF(121);


l1:=GL(27,F)![[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,6,10,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,5,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,2,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,9,0,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,10,10,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,2,6,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,5,1,10,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,9,0,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,10,10,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,2,6,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,5,1,10,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,1,10,0,10,4,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,9,8,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,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,0,0,7,4,9,10,4],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,2,1,10],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,4,5,7],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,7,10]];

L:=sub<GL(27,F)|l1,l2>;

// We need the indices of the trilinear form as well.
seqs:=[[i,j,k]:i,j,k in [1..NumberOfRows(l1)]|i le j and j le k];

/* We next give the symmetric trilinear form that comes from E6 via C4. This was found by choosing elements of C4, mapping them to lie over our copy of L, and then using the G-invariance of the form to obtain constraints on the 
structure constants of it. Code is included at the end to reconstruct this, but it can take a while, so we give it here for ease of calculations.
*/

ents:=
[ 1, 28, 29, 30, 55, 79, 103, 104, 105, 106, 126, 127, 128, 148, 149, 169, 189, 190, 191, 192, 208, 209, 210, 226, 227,
243, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 274, 275, 276, 277, 278, 279, 280, 281, 282, 288, 289, 290,
291, 292, 293, 294, 295, 301, 303, 304, 305, 306, 313, 314, 315, 316, 318, 324, 325, 326, 327, 328, 334, 335, 336, 337, 343, 344, 345, 351, 358, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 378, 390, 391, 393, 394,
395, 396, 398, 399, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 460, 461, 472, 473, 474, 475, 476, 483, 494, 495, 496, 497, 501, 504, 515, 516, 517, 518, 519, 521, 522, 523, 535,
536, 537, 538, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 562, 563, 564, 565, 567, 568, 569, 570, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 595, 596, 597, 598, 600, 601, 602, 603, 621, 622, 623, 634, 636, 637, 638, 647,
648, 650, 651, 659, 660, 661, 663, 671, 672, 673, 681, 682, 683, 689, 691, 692, 693, 697, 698, 700, 701, 704, 705, 706, 708, 711, 712, 713, 740, 741, 744, 745, 746, 749, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 784, 785, 786,
797, 798, 799, 800, 801, 805, 808, 819, 820, 821, 822, 823, 826, 829, 840, 841, 842, 843, 844, 846, 847, 848, 860, 861, 862, 863, 864, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896,
904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 946, 948, 959, 961, 962, 963, 973, 975, 976, 984, 985, 986, 988, 996, 997, 998, 1006, 1008, 1014, 1016, 1017, 1018, 1023, 1025, 1026,
1029, 1030, 1031, 1033, 1036, 1037, 1038, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1085, 1086, 1097, 1098, 1099, 1100, 1101, 1107, 1108, 1119, 1120, 1121, 1122, 1123, 1126, 1127, 1129, 1140, 1141, 1142, 1143, 1144,
1146, 1147, 1148, 1160, 1161, 1162, 1163, 1164, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1220,
1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1246, 1247, 1248, 1249, 1259, 1263, 1272, 1275, 1276, 1284, 1286, 1288, 1295, 1296, 1297, 1298, 1306, 1307, 1308, 1309, 1314, 1318, 1322, 1325, 1326, 1329, 1331, 1333, 1335, 1336,
1337, 1338, 1355, 1356, 1357, 1358, 1363, 1364, 1365, 1366, 1368, 1369, 1370, 1371, 1378, 1379, 1380, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1400, 1401, 1408, 1409, 1410, 1413, 1414, 1415, 1421, 1426, 1427, 1428,
1429, 1430, 1431, 1432, 1433, 1434, 1435, 1441, 1442, 1443, 1444, 1455, 1456, 1457, 1458, 1460, 1461, 1462, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1492, 1493, 1494, 1495, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515,
1516, 1517, 1518, 1519, 1526, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1540, 1541, 1542, 1544, 1545, 1546, 1547, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1565, 1566, 1567, 1568, 1569, 1570, 1576, 1577, 1578, 1579, 1580, 1586, 1588,
1589, 1595, 1596, 1597, 1603, 1604, 1610, 1616, 1617, 1618, 1619, 1620, 1621, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1653, 1654, 1659, 1660, 1661,
1662, 1663, 1664, 1665, 1666, 1667, 1668, 1674, 1679, 1680, 1681, 1682, 1684, 1685, 1686, 1687, 1694, 1695, 1696, 1697, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1743, 1744, 1745, 1746,
1747, 1748, 1759, 1760, 1761, 1762, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1793, 1794, 1795, 1797, 1798, 1799, 1800, 1806, 1807, 1808, 1809, 1811, 1812, 1818,
1819, 1820, 1821, 1822, 1823, 1829, 1830, 1831, 1832, 1833, 1839, 1840, 1841, 1842, 1848, 1849, 1850, 1856, 1857, 1863, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1890, 1891,
1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1905, 1910, 1911, 1912, 1913, 1915, 1916, 1917, 1918, 1925, 1926, 1927, 1928, 1941, 1942, 1943, 1944, 1945, 1946, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1974, 1975, 1976, 1977, 1978,
1979, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2037, 2038, 2040, 2042, 2043, 2049, 2050, 2051,
2052, 2053, 2054, 2060, 2061, 2062, 2063, 2064, 2070, 2071, 2072, 2073, 2079, 2080, 2081, 2087, 2088, 2094, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2120, 2121, 2122, 2123, 2125,
2126, 2127, 2128, 2135, 2136, 2137, 2138, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2167, 2168, 2169, 2170, 2172, 2173, 2184, 2185, 2186, 2187, 2189, 2200, 2201, 2202, 2203, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213,
2214, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2235, 2236, 2237, 2238, 2240, 2241, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2259, 2260, 2261, 2262, 2263, 2264, 2270, 2271, 2272, 2273, 2274, 2280, 2281, 2282, 2283, 2290,
2291, 2297, 2298, 2304, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2320, 2321, 2322, 2323, 2324, 2329, 2330, 2331, 2332, 2334, 2335, 2336, 2337, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2366, 2367, 2368,
2371, 2372, 2373, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2405, 2406, 2407, 2409, 2419, 2420, 2421, 2422, 2423, 2432, 2433, 2434, 2435, 2436, 2444, 2445, 2446, 2447, 2448, 2455, 2456, 2457, 2458, 2459, 2465, 2466,
2467, 2468, 2474, 2475, 2476, 2477, 2478, 2483, 2484, 2485, 2486, 2489, 2490, 2491, 2492, 2493, 2495, 2496, 2497, 2498, 2499, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542,
2543, 2544, 2551, 2552, 2553, 2554, 2556, 2557, 2558, 2559, 2576, 2577, 2578, 2579, 2580, 2590, 2591, 2592, 2593, 2594, 2603, 2604, 2605, 2606, 2607, 2615, 2616, 2617, 2618, 2619, 2626, 2628, 2629, 2630, 2636, 2637, 2638, 2639, 2640,
2645, 2646, 2647, 2648, 2649, 2654, 2655, 2656, 2657, 2660, 2661, 2663, 2664, 2666, 2667, 2668, 2669, 2670, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2704, 2705, 2706, 2707, 2709, 2710, 2711, 2712, 2729, 2730, 2731,
2732, 2743, 2744, 2745, 2746, 2747, 2756, 2757, 2758, 2759, 2768, 2769, 2770, 2771, 2772, 2779, 2781, 2782, 2783, 2789, 2790, 2791, 2792, 2793, 2799, 2800, 2801, 2802, 2806, 2807, 2808, 2809, 2810, 2814, 2816, 2817, 2819, 2820, 2821,
2822, 2823, 2840, 2841, 2842, 2843, 2845, 2846, 2847, 2848, 2865, 2866, 2867, 2868, 2869, 2879, 2880, 2881, 2882, 2883, 2892, 2893, 2895, 2896, 2904, 2905, 2906, 2907, 2908, 2915, 2916, 2917, 2918, 2919, 2925, 2926, 2927, 2928, 2929,
2934, 2935, 2936, 2937, 2938, 2942, 2943, 2945, 2946, 2949, 2950, 2951, 2952, 2953, 2955, 2956, 2957, 2958, 2959, 2975, 2976, 2977, 2978, 2979, 2981, 2982, 2984, 2990, 2992, 2994, 2995, 2996, 2997, 2998, 3004, 3005, 3006, 3007, 3008,
3009, 3010, 3011, 3017, 3020, 3021, 3022, 3023, 3029, 3030, 3031, 3032, 3033, 3040, 3041, 3042, 3043, 3044, 3050, 3051, 3052, 3053, 3059, 3060, 3061, 3067, 3068, 3074, 3080, 3081, 3082, 3083, 3085, 3086, 3087, 3088, 3089, 3090, 3091,
3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3122, 3123, 3124, 3125, 3126, 3128, 3134, 3135, 3136, 3137, 3138, 3139, 3145, 3146, 3147, 3148, 3149, 3155, 3157,
3158, 3164, 3165, 3166, 3172, 3173, 3179, 3185, 3186, 3187, 3188, 3189, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3225, 3226, 3227,
3228, 3229, 3230, 3236, 3237, 3238, 3239, 3240, 3247, 3248, 3249, 3255, 3257, 3263, 3264, 3270, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3293, 3295, 3296, 3297, 3303, 3304, 3305,
3306, 3307, 3308, 3314, 3315, 3316, 3317, 3318, 3324, 3325, 3326, 3327, 3334, 3335, 3341, 3342, 3348, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3371, 3372, 3373, 3374, 3380, 3381,
3382, 3383, 3384, 3390, 3391, 3392, 3393, 3399, 3400, 3401, 3407, 3408, 3414, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3445, 3446, 3447, 3448, 3454, 3455, 3456, 3462,
3463, 3469, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3491, 3492, 3493, 3499, 3500, 3501, 3507, 3508, 3514, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3529, 3530, 3532, 3533, 3535,
3536, 3537, 3543, 3544, 3550, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3565, 3566, 3567, 3568, 3569, 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, 6, 6, 5, 10, 4, 5, 10, 7, 10, 6, 3, 4, 2, 7, 10, 5, 3, 2, 4, 10, 5, 8, 3, 5, 8, 10, 10, 7, 4, 7, 3, 9, 3, 7, 3, 5, 7, 3, 6, 5, 1, 2, 7, 7, 4, 9, 2, 4, 2, 3,
6, 7, 10, 10, 4, 8, 7, 2, 5, 4, 6, 2, 1, 10, 2, 9, 1, 4, 6, 4, 3, 7, 3, 2, 4, 3, 5, 6, 1, 6, 3, 7, 9, 7, 9, 4, 2, 4, 5, 9, 5, 5, 8, 6, 8, 10, 3, 10, 9, 8, 8, 7, 4, 6, 9, 7, 3, 2, 4, 6, 2, 5, 6, 1, 8, 7, 7, 6, 2, 2, 3, 5, 9, 2, 5, 7, 5,
3, 3, 7, 5, 2, 3, 6, 5, 1, 6, 1, 9, 3, 2, 1, 1, 7, 2, 4, 10, 6, 7, 6, 10, 8, 4, 1, 3, 8, 2, 7, 7, 9, 7, 6, 3, 7, 2, 4, 10, 3, 1, 2, 6, 3, 3, 3, 4, 9, 2, 4, 2, 3, 2, 2, 6, 7, 6, 1, 6, 3, 1, 9, 4, 1, 6, 4, 5, 9, 1, 4, 7, 10, 8, 2, 3, 3, 3,
9, 1, 6, 1, 3, 5, 2, 1, 10, 6, 8, 4, 3, 4, 6, 3, 5, 7 ];

f27:=[F!0:i in [1..#seqs]];
for i in [1..#ents] do f27[ents[i]]:=vals[i]; end for;

// Now set up the centralizer of L in GL(27,F), modulo the centralizer of H in GL(27,F). Notice that the action of L is 1+3+4+4+5+5+5, and the action of H is 1+8+9+9 (with 9 restricting as 4+5), so there is an obvious embedding of the centralizer of H into the centralizer of L. All that is left is the parameters for the copy of GL(3,k) that acts on the homogeneous 15-space.

R<m1,m2,m3,m4,m5,m6,m7,m8,m9>:=PolynomialRing(F,9);
mats:=MatrixRing(R,NumberOfRows(l1));
scal:=mats!1;

// These variables are the transpose of what you might expect.
// I messed them up and couldn't be bothered to reorder them.
// I have done it right in the E6 file.

for i in [1..5] do
  scal[12+i,12+i]:=m1; scal[17+i,12+i]:=m2; scal[22+i,12+i]:=m3;
  scal[12+i,17+i]:=m4; scal[17+i,17+i]:=m5; scal[22+i,17+i]:=m6;
  scal[12+i,22+i]:=m7; scal[17+i,22+i]:=m8; scal[22+i,22+i]:=m9;
end for;

// The matrix which, together with L, generated Alt(6).

h1:=GL(27,F)![[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,9,5,7,0,0,0,0,0,0,0,0,5,8,5,7,10,0,0,0,0,0,0,0,0,0,0],
[0,10,6,10,0,0,0,0,0,0,0,0,3,9,5,10,8,0,0,0,0,0,0,0,0,0,0],
[0,6,2,10,0,0,0,0,0,0,0,0,2,9,8,9,2,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,4,4,8,3,0,0,0,0,0,0,0,0,0,4,8,4,5,6,0,0,0,0,0],
[0,0,0,0,0,1,5,3,0,0,0,0,0,0,0,0,0,8,0,4,4,1,0,0,0,0,0],
[0,0,0,0,7,9,6,0,0,0,0,0,0,0,0,0,0,10,4,8,7,3,0,0,0,0,0],
[0,0,0,0,5,9,5,0,0,0,0,0,0,0,0,0,0,4,4,4,1,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,4,4,8,3,0,0,0,0,0,0,0,0,0,0,4,8,4,5,6],
[0,0,0,0,0,0,0,0,0,1,5,3,0,0,0,0,0,0,0,0,0,0,8,0,4,4,1],
[0,0,0,0,0,0,0,0,7,9,6,0,0,0,0,0,0,0,0,0,0,0,10,4,8,7,3],
[0,0,0,0,0,0,0,0,5,9,5,0,0,0,0,0,0,0,0,0,0,0,4,4,4,1,0],
[0,9,8,7,0,0,0,0,0,0,0,0,2,6,10,3,1,0,0,0,0,0,0,0,0,0,0],
[0,5,1,5,0,0,0,0,0,0,0,0,3,4,3,9,4,0,0,0,0,0,0,0,0,0,0],
[0,8,3,5,0,0,0,0,0,0,0,0,3,5,2,5,5,0,0,0,0,0,0,0,0,0,0],
[0,5,3,4,0,0,0,0,0,0,0,0,7,9,2,1,7,0,0,0,0,0,0,0,0,0,0],
[0,9,8,3,0,0,0,0,0,0,0,0,3,0,3,2,10,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,10,1,1,6,0,0,0,0,0,0,0,0,0,3,4,8,2,6,0,0,0,0,0],
[0,0,0,0,9,8,3,8,0,0,0,0,0,0,0,0,0,3,5,9,9,4,0,0,0,0,0],
[0,0,0,0,8,10,7,1,0,0,0,0,0,0,0,0,0,8,3,6,9,5,0,0,0,0,0],
[0,0,0,0,7,9,3,6,0,0,0,0,0,0,0,0,0,6,2,6,5,6,0,0,0,0,0],
[0,0,0,0,8,4,1,8,0,0,0,0,0,0,0,0,0,8,1,9,8,4,0,0,0,0,0],
[0,0,0,0,0,0,0,0,10,1,1,6,0,0,0,0,0,0,0,0,0,0,3,4,8,2,6],
[0,0,0,0,0,0,0,0,9,8,3,8,0,0,0,0,0,0,0,0,0,0,3,5,9,9,4],
[0,0,0,0,0,0,0,0,8,10,7,1,0,0,0,0,0,0,0,0,0,0,8,3,6,9,5],
[0,0,0,0,0,0,0,0,7,9,3,6,0,0,0,0,0,0,0,0,0,0,6,2,6,5,6],
[0,0,0,0,0,0,0,0,8,4,1,8,0,0,0,0,0,0,0,0,0,0,8,1,9,8,4]];


// We also need this matrix ring so we can multiply elements of E6 by scal, as we have to coerce them into this ring first

function Matricise(v)
return Matrix(1,NumberOfColumns(v),[R!v[i]:i in [1..NumberOfColumns(v)]]);
end function;

// We now show that g, which is the second generator of H (the first lies in L, so is fine)
// satisfies the equations mentioned
V:=GModule(L);
g:=mats!h1;

intseqs1:=[seqs[i]:i in ents];
intseqs:=&join{{[i[1],i[2],i[3]],[i[1],i[3],i[2]],[i[2],i[1],i[3]],[i[2],i[3],i[1]],[i[3],i[1],i[2]],[i[3],i[2],i[1]]}:i in intseqs1};


function ProdRel(seq)

u:=V.seq[1]; v:=V.seq[2]; w:=V.seq[3];
u1:=Matricise(u)*scal; v1:=Matricise(v)*scal; w1:=Matricise(w)*scal;
u2:=Matricise(u)*g*scal; v2:=Matricise(v)*g*scal; w2:=Matricise(w)*g*scal;
e1:=&+[u1[1,i[1]]*v1[1,i[2]]*w1[1,i[3]]*f27[Position(seqs,Sort([i[1],i[2],i[3]]))]:i in intseqs];
e2:=&+[u2[1,i[1]]*v2[1,i[2]]*w2[1,i[3]]*f27[Position(seqs,Sort([i[1],i[2],i[3]]))]:i in intseqs];

return e1-e2;
end function;

// We only need the first 500 relations before the two solutions are uniquely determined.

rels:=[]; for i in [1..500] do Append(~rels,ProdRel(seqs[i])); end for;

BB:=GroebnerBasis(rels);

// This yields two solutions, one of which is the image under the field automorphism of the other.
// Thus we only need check one.

BB eq [
    m1 + 7*m8,
    m2 + 9,
    m3 + 8*m8,
    m4 + 6*m8,
    m5 + 7,
    m6 + 5*m8,
    m7,
    (m8 - w^54)*(m8 - w^114),
    m9 + 9
];

coef1:=[-7*w^54,-9,-8*w^54,-6*w^54,-7,-5*w^54,0,w^54,-9];
coef2:=[-7*w^114,-9,-8*w^114,-6*w^114,-7,-5*w^114,0,w^114,-9];

scal1:=GL(27,F)!(Evaluate(scal,coef1));
scal2:=GL(27,F)!(Evaluate(scal,coef2));

htest1:=h1^scal1;
htest2:=h1^scal2;

// We delay checking that the htests lie in E6.

c1:=GL(27,F)![[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,5,0,0,0,w^78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,5,0,0,0,w^78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,5,0,0,0,0,w^90,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,5,0,0,0,0,w^90,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,5,0,0,0,0,w^90],
[0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,8,0,0,0,0,w^6,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,8,0,0,0,0,w^6,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,8,0,0,0,0,w^6,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,8,0,0,0,0,w^6,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,8,0,0,0,0,w^6],
[0,0,0,0,0,0,0,0,0,0,0,0,w^114,0,0,0,0,w^6,0,0,0,0,6,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,w^114,0,0,0,0,w^6,0,0,0,0,6,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,w^114,0,0,0,0,w^6,0,0,0,0,6,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,w^114,0,0,0,0,w^6,0,0,0,0,6,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,w^114,0,0,0,0,w^6,0,0,0,0,6]];

// c1 commutes with both htests.
&and[c1*i eq i*c1:i in [l1,l2,htest1,htest2]];

// c2 commutes with L and maps htest1 to htest2
&and[c1*i eq i*c1:i in [l1,l2]];
htest1^c2 eq htest2;

// Now we show that htest1, c1 and c2 lie inside E6.

G:=sub<GL(27,F)|l1,l2,htest1,c1,c2>;
Gtree:=CompositionTree(G);
CompositionTreeNonAbelianFactors(G) eq [* <"2A", 2, 11>, <"2A", 2, 11> *];

// Let's pump this up to an E6, or at least a 2E6(11).

x1:=G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10,5,3,3,8,10,0,5,6,10,8,7,8,10,0,6,8,7,1,9,0,5,5],
[3,2,1,5,4,6,8,8,7,6,9,3,5,10,9,0,6,10,5,8,4,1,0,6,0,7,3],
[0,2,9,8,6,10,7,2,4,9,9,4,1,5,4,3,7,9,8,1,2,5,4,9,3,6,5],
[10,8,2,6,0,7,4,10,0,0,6,1,6,0,7,7,4,7,9,9,6,0,1,1,0,0,1],
[0,8,6,3,4,2,4,10,9,10,4,4,6,8,7,9,5,0,1,2,0,1,1,8,2,8,2],
[0,5,1,10,10,3,9,8,5,9,4,4,5,4,0,6,3,8,3,6,10,8,3,2,5,9,2],
[0,1,9,10,2,0,1,0,0,7,6,0,6,9,8,2,3,2,2,3,0,1,1,9,5,4,7],
[0,8,5,7,7,1,2,5,9,6,8,10,10,6,5,10,10,8,3,5,7,10,10,9,4,10,0],
[0,8,6,4,4,9,8,5,4,0,3,1,8,2,6,9,1,3,4,1,7,1,2,9,2,10,1]];

G:=sub<GL(27,F)|l1,l2,htest1,c1,c2,x1>;
Gtree:=CompositionTree(G);
CompositionTreeNonAbelianFactors(G) eq [* <"2E", 6, 11> *];

// Thus there is a unique Alt(6) containing Alt(5), and it commutes with
// a 3, so lies in A2A2, and is therefore a blueprint for M(F4).

// We now give code that can prove that the trilinear form we gave is the correct one. This came from C4, so first
// we produce the space of 3-forms on L itself, and then map C4 over to contain L and reduce the space to dimension 1.

function CheckE6Form()

mat:=[];
for h in [l1,l2] do
  for nn in [1..#seqs] do a:=seqs[nn,1]; b:=seqs[nn,2]; c:=seqs[nn,3];
    val:=[F!0:i in [1..#seqs]];
    for i in [1..NumberOfRows(h)] do if(h[a,i] ne 0) then for j in [1..NumberOfRows(h)] do if(h[b,j] ne 0) then for k in [1..NumberOfRows(h)] do
      val[Position(seqs,Sort([i,j,k]))]+:=h[a,i]*h[b,j]*h[c,k];
    end for; end if; end for; end if; end for;
    val[nn]-:=1; Append(~mat,val); delete val;
  end for;
  delete h;
end for;

// First, check that x1,l1 and l2 generate PSp(8,11).

GG:=sub<GL(27,F)|l1,l2,x1>;
GGtree:=CompositionTree(GG);
CompositionTreeNonAbelianFactors(GG) eq [*<"C",4,11>*];
CompositionTreeOrder(GG) eq Order(Sp(8,11)) div 2;

// Now, the space of 3-forms is 75-dimensional for L. So choose 75
// elts of seqs at random. These worked, so fix these:

ss:=[ 123, 148, 214, 234, 289, 344, 367, 384, 420, 509, 523, 617, 667, 782, 786, 875, 909, 1055, 1092, 1184, 1191, 1203, 1219, 1268, 1287, 1447, 1450, 1484, 1487, 1549, 1628, 1631, 1641, 1660, 1701, 1902, 1950, 1953, 1971, 2010, 2063, 2181,
2242, 2278, 2305, 2344, 2395, 2417, 2471, 2472, 2492, 2510, 2643, 2856, 2859, 2873, 2963, 2998, 3085, 3146, 3157, 3174, 3191, 3231, 3243, 3249, 3285, 3340, 3400, 3473, 3496, 3529, 3572, 3613 ];

for nn in ss do a:=seqs[nn,1]; b:=seqs[nn,2]; c:=seqs[nn,3];
  val:=[F!0:i in [1..#seqs]];
  for i in [1..NumberOfRows(x1)] do if(x1[a,i] ne 0) then for j in [1..NumberOfRows(x1)] do if(x1[b,j] ne 0) then for k in [1..NumberOfRows(x1)] do
    val[Position(seqs,Sort([i,j,k]))]+:=x1[a,i]*x1[b,j]*x1[c,k];
  end for; end if; end for; end if; end for;
  val[nn]-:=1; Append(~mat,val); delete val;
end for;

ftest:=Nullspace(Transpose(Matrix(F,mat))).1;
"Is the trilinear form given in this document correct?";
return &and[ftest[i] eq f27[i]:i in [1..#f27]];

end function;


"The function CheckE6Form() checks that the trilinear form f27 from E6 is correct";
