Part A. The example with p = 2, n = 3, |Q| = 512, |G_i| = 32, Q/H = D_8
  gamma is bilinear on all 64^3 triples: True; associativity (cocycle identity) on all triples: True
  U_i^2 = V_i^2 = 1, [U_i,U_j] = [V_i,V_j] = 1, [U_i,V_j] = eps_ij: True; 0 x C central: True; the six generators generate Q (order 512): True
  A_1 = normal closure of {U_1, V_1}: order 16; equals span(u_1, v_1) x span(eps_1j, eps_j1 : j) = span(u_1,v_1) x [0, 1, 4, 5]: True
  A_2 = normal closure of {U_2, V_2}: order 16; equals span(u_2, v_2) x span(eps_2j, eps_j2 : j) = span(u_2,v_2) x [0, 1, 2, 3]: True
  A_3 = normal closure of {U_3, V_3}: order 16; equals span(u_3, v_3) x span(eps_3j, eps_j3 : j) = span(u_3,v_3) x [0, 2, 4, 6]: True
  A_1 cap A_2 cap A_3 = [0] (trivial: True)
  q -> (qA_1, qA_2, qA_3) is injective on Q: True; |G_i| = |Q/A_i| = [32, 32, 32]
  G_1: |Z(G_1)| = 2 = |G_1'|, Z = G' and G/Z elementary abelian (extraspecial of order 32): True; involutions: 19
  G_2: |Z(G_2)| = 2 = |G_2'|, Z = G' and G/Z elementary abelian (extraspecial of order 32): True; involutions: 19
  G_3: |Z(G_3)| = 2 = |G_3'|, Z = G' and G/Z elementary abelian (extraspecial of order 32): True; involutions: 19
  the model of D_8: order 8, non-abelian True, involutions 5 (D_8 has 5, Q_8 has 1)
  psi is a homomorphism Q -> D_8 (all 512^2 pairs): True; onto: True; psi(U_i) = a, psi(V_i) = b, psi(f_k) = z: True
  H = ker psi has order 64; |Q/H| = 8
  |H A_1| = 512 (= |Q|, so H projects onto G_1); psi(A_1) = D_8: True; |H cap A_1| = 2
  |H A_2| = 512 (= |Q|, so H projects onto G_2); psi(A_2) = D_8: True; |H cap A_2| = 2
  |H A_3| = 512 (= |Q|, so H projects onto G_3); psi(A_3) = D_8: True; |H cap A_3| = 2
  lower central series of Q: orders [512, 8, 1] (class 2; gamma_3(Q) = 1 <= H)
  D_8 regular (Hall's identity on all 64 ordered pairs): False (24 failing pairs); witness a^2 = b^2 = 1, (ab)^2 != 1 with D_8' of exponent 2: True
  part A time 0.5 s
Part B. W_p = C_p wr C_p
  p = 2: |W_p| = 8 = p^(p+1): True; orders of gamma_k: [8, 2, 1]; class 2; exponent 4; gamma_2 elementary abelian: True; p-th powers in gamma_p: True
     witness: a^p = b_0^p = 1, <a,b_0> = W_p, U_1(W_p') = 1, (a b_0)^p != 1: True  -> W_p is not regular
     Jennings's formula: |D_k(W_p; F_p)| for k = 1..3: [8, 2, 1]; D_(p+1) = 1: True
     group algebra F_2 W_2: dim Delta^k = [7, 5, 3, 1]; |D_k| = [8, 2, 1, 1]; equal to Jennings's formula for k <= p+1: True
  p = 3: |W_p| = 81 = p^(p+1): True; orders of gamma_k: [81, 9, 3, 1]; class 3; exponent 9; gamma_2 elementary abelian: True; p-th powers in gamma_p: True
     witness: a^p = b_0^p = 1, <a,b_0> = W_p, U_1(W_p') = 1, (a b_0)^p != 1: True  -> W_p is not regular
     Jennings's formula: |D_k(W_p; F_p)| for k = 1..4: [81, 9, 3, 1]; D_(p+1) = 1: True
     group algebra F_3 W_3: dim Delta^k = [80, 78, 74, 69, 62]; |D_k| = [81, 9, 3, 1, 1]; equal to Jennings's formula for k <= p+1: True
  p = 5: |W_p| = 15625 = p^(p+1): True; orders of gamma_k: [15625, 625, 125, 25, 5, 1]; class 5; exponent 25; gamma_2 elementary abelian: True; p-th powers in gamma_p: True
     witness: a^p = b_0^p = 1, <a,b_0> = W_p, U_1(W_p') = 1, (a b_0)^p != 1: True  -> W_p is not regular
     Jennings's formula: |D_k(W_p; F_p)| for k = 1..6: [15625, 625, 125, 25, 5, 1]; D_(p+1) = 1: True
  part B time 3.0 s
Part C. The construction with finite factors, by exact group orders (deterministic Schreier-Sims)
  self-test: |S_m| for m <= 7 correct; 25 random permutation groups: Schreier-Sims order = enumeration: True; L for (D_8, n = 3): 4096 = 4096 by enumeration; G_1 for (C_3 wr C_3, n = 3): 59049 = 59049 by enumeration
  P = D_8, n = 3: |P| = 8, |L| = 4096, |Z| = |L|/|L restricted to C != [n]| = 1, |ev_[n](L)| = 8, |G_i| = [128, 128, 128], H projects onto every G_i: True
     |H| = |L|/|P| = 512, |K_i| = |L|/|G_i| = [32, 32, 32]: a configuration with Q = L, n = 3 and Q/H = P (0.0 s)
  P = C_3 wr C_3, n = 4: |P| = 81, |L| = 1853020188851841, |Z| = |L|/|L restricted to C != [n]| = 1, |ev_[n](L)| = 81, |G_i| = [1162261467, 1162261467, 1162261467, 1162261467], H projects onto every G_i: True
     |H| = |L|/|P| = 22876792454961, |K_i| = |L|/|G_i| = [1594323, 1594323, 1594323, 1594323]: a configuration with Q = L, n = 4 and Q/H = P (1.0 s)
     (|L| = 3^32 = 1853020188851841, |G_i| = 3^19, |H| = 3^28, |K_i| = 3^13)
  control P = D_8, n = 2: |P| = 8, |L| = 128, |Z| = |L|/|L restricted to C != [n]| = 2, |ev_[n](L)| = 8, |G_i| = [8, 8], H projects onto every G_i: True
     not a configuration with Q/H = P (Z != 1): as expected for a negative control: True (0.0 s)
  control P = C_3 wr C_3, n = 3: |P| = 81, |L| = 1162261467, |Z| = |L|/|L restricted to C != [n]| = 3, |ev_[n](L)| = 81, |G_i| = [59049, 59049, 59049], H projects onto every G_i: True
     not a configuration with Q/H = P (Z != 1): as expected for a negative control: True (0.1 s)
  part C time 1.9 s
Part D. Inclusion-exclusion: psi(omega(w)) lies in Delta^n for random words w
  D_8, n = 3, p = 2: dim Delta^n = 3; psi(omega(w)) in Delta^n for 400 of 400 random words; not in Delta^(n+1) for 143 of them (the test is not vacuous)
  C_3 wr C_3, n = 4, p = 3: dim Delta^n = 69; psi(omega(w)) in Delta^n for 400 of 400 random words; not in Delta^(n+1) for 170 of them (the test is not vacuous)
  sum over S containing B of (-1)^(n-|S|) equals 1 if B = [n] and 0 otherwise (n <= 7, all B): True
  part D time 0.0 s
Part E. Unitriangular groups UT_m(F_p)
  UT_3(F_2): order 8 = p^3: True; class 2; |D_k(UT_3(F_2); F_2)| for k = 1..3: [8, 2, 1]
  UT_4(F_2): order 64 = p^6: True; class 3; |D_k(UT_4(F_2); F_2)| for k = 1..4: [64, 8, 2, 1]
  UT_5(F_2): order 1024 = p^10: True; class 4
  UT_3(F_3): order 27 = p^3: True; class 2; |D_k(UT_3(F_3); F_3)| for k = 1..3: [27, 3, 1]
  UT_4(F_3): order 729 = p^6: True; class 3
  UT_3(F_5): order 125 = p^3: True; class 2; |D_k(UT_3(F_5); F_5)| for k = 1..3: [125, 5, 1]
  part E time 0.4 s
Part F. Exhaustive search: n = 3, every G_i is D_8 or Q_8
  D_8 table: group, non-abelian True, 5 involutions; Q_8 table: group, non-abelian True, 1 involution
  validation on D_8 x D_8: 389 subgroups by the index-2 method, 389 by naive join closure, same sets: True
  D8xD8xD8: 55338 subgroups, 1744 projecting onto all three factors, 16594 pairs (Q, H); Q/H non-abelian: 0; gamma_3(Q) not in H: 0 (1.0 s)
  D8xD8xQ8: 22746 subgroups, 1152 projecting onto all three factors, 13010 pairs (Q, H); Q/H non-abelian: 0; gamma_3(Q) not in H: 0 (0.5 s)
  D8xQ8xQ8: 13354 subgroups, 1744 projecting onto all three factors, 16402 pairs (Q, H); Q/H non-abelian: 0; gamma_3(Q) not in H: 0 (0.5 s)
  Q8xQ8xQ8: 9434 subgroups, 3520 projecting onto all three factors, 28306 pairs (Q, H); Q/H non-abelian: 0; gamma_3(Q) not in H: 0 (0.8 s)
  part F time 3.0 s
total time 8.8 s
ALL CHECKS PASSED
