7 use "factorization-coords"
18 const numerically_test_rotate : (kc : KC_type, seed : uint32, fast : bool -> std.result(void, byte[:]))
19 const numerically_test_flip : (kc : KC_type, seed : uint32, fast : bool -> std.result(void, byte[:]))
21 pkglocal const assign_TQ_to_quiver : (kc : KC_type, TQ : T_Q#, q : quiver.quiver# -> void)
22 pkglocal const assign_quiver_to_TQ : (kc : KC_type, q : quiver.quiver#, TQ : T_Q# -> void)
23 pkglocal const assign_quiver_to_TQ02 : (kc : KC_type, q : quiver.quiver#, TQ : T_Q02# -> void)
24 pkglocal const assign_quiver_to_TQ13 : (kc : KC_type, q : quiver.quiver#, TQ : T_Q13# -> void)
25 pkglocal const assign_TQ02_to_quiver : (kc : KC_type, TQ : T_Q02#, q : quiver.quiver# -> void)
26 pkglocal const assign_TQ13_to_quiver : (kc : KC_type, TQ : T_Q13#, q : quiver.quiver# -> void)
27 pkglocal const random_minor : (rng : std.rng# -> yakmo.ratfunc#)
34 std.fmtinstall(std.typeof(s), subscriptfmt)
37 const subscripts = [ '₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', '₈', '₉' ][:]
39 const subscriptfmt = {sb, ap, opts
40 var ss : subscript = std.vanext(ap)
48 std.sbputc(sb, subscripts[0])
54 std.slpush(&l, subscripts[s % 10])
58 for var k = l.len - 1; k >= 0; --k
63 const random_minor = {rng
64 var a : int = std.rngrand(rng, 2, 29)
65 if std.rngrand(rng, 0, 2) == 1
67 Commenting out this line makes all minors displayed
68 in tests positive. This useful for verifying in other
69 software that is unable to handle negative
74 var b : int = std.rngrand(rng, 1, 29)
75 var aq : yakmo.Q# = auto yakmo.QfromZ(a)
76 var bq : yakmo.Q# = auto yakmo.QfromZ(b)
77 var ap : yakmo.polynomial# = yakmo.polynomialfromQ(aq)
78 var bp : yakmo.polynomial# = yakmo.polynomialfromQ(bq)
79 var base : yakmo.ratfunc = [ .num = ap, .den = bp, .reduced = false ]
80 yakmo.reduceratfunc(&base)
85 const numerically_test_rotate = {kc, seed, fast
86 var rng : std.rng# = std.mksrng(seed)
87 std.put("seed = {}\n", seed)
88 var rank : int = get_n(kc)
89 var w0 : weyl_reflection[:] = get_w0(kc)
90 var c : weyl_reflection[:] = [][:]
91 match get_coxeter_elt(kc)
93 | `std.Err e: -> `std.Err std.fmt("get_coxeter_elt({}): {}", kc, e)
95 var h1 : minor_coordinate[:] = [][:]
96 var h2 : minor_coordinate[:] = [][:]
97 var h3 : minor_coordinate[:] = [][:]
98 var u : minor_coordinate[:] = [][:]
99 var perm_class : Dynkin_automorphism_class = get_trivial_Dynkin_automorphism(kc)
101 /* Recall that hi[k] = χ_{ω_{i_k}}(hi) */
102 for var j = 1; j <= rank; ++j
103 std.slpush(&h1, [ .k = j, .c = random_minor(rng) ])
104 std.slpush(&h2, [ .k = j, .c = random_minor(rng) ])
105 std.slpush(&h3, [ .k = j, .c = random_minor(rng) ])
108 for var j = rank + 1; j <= w0.len; ++j
109 std.slpush(&u, [ .k = j, .c = random_minor(rng) ])
112 var alpha : conf_3_star = [ .h1 = h1, .h2 = h2, .h3 = h3, .u = u ]
113 match fill_in_alpha(kc, &alpha)
115 auto (e : t.doomed_str)
116 -> `std.Err std.fmt("fill_in_alpha: {}", e)
120 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, alpha.u)
122 // auto (e : t.doomed_str)
123 // -> `std.Err std.fmt("whatever: {}", e)
125 // std.put("DXJ 01\n")
126 // for var j = 0; j < f.len; ++j
127 // std.put("{}\n", f[j])
132 /* via Lusztig's calculus */
134 match rotate(kc, &alpha)
135 | `std.Err e: -> `std.Err std.fmt("rotate(): {}", e)
136 | `std.Ok a: via_lusztig = a
138 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, via_lusztig.u)
140 // auto (e : t.doomed_str)
141 // -> `std.Err std.fmt("whatever: {}", e)
143 // std.put("DXJ 02\n")
144 // for var j = 0; j < f.len; ++j
145 // std.put("{}\n", f[j])
153 mures = get_mutwistingrot(kc)
155 mures = get_murot(kc)
159 match (mures, mk_Q(kc), apply_M(kc, &alpha, perm_class))
160 | (`std.Err e, _, _): -> `std.Err std.fmt("murot({}): {}", kc, e)
161 | (_, `std.Err e, _): -> `std.Err std.fmt("mk_Q({}): {}", kc, e)
162 | (_, _, `std.Err e): -> `std.Err std.fmt("apply_M({}, α): {}", kc, e)
163 | (`std.Ok mu, `std.Ok q, `std.Ok (TQ, perm_class_prime)):
164 /* Assign coordinates to q from TQ */
165 assign_TQ_to_quiver(kc, TQ, q)
166 perm_class = perm_class_prime
168 // std.put("DXJ 03\n")
169 // for var j = 0; j < q.v.len; ++j
170 // std.put("{} : {}\n", q.v[j].name, q.v[j].acoord)
174 var q_dup : quiver.quiver# = t.dup(q)
176 match quiver.mutateseq_ip(q, mu)
178 | `std.Err e: -> `std.Err std.fmt("applying murot: {}", e)
180 perm_class = apply_sigmaG(perm_class)
182 /* Rename according to mutation */
184 perm_class = apply_sigmaG(perm_class)
186 match rename_according_to_twistingrot(kc, q_dup, q)
188 | `std.Err e: -> `std.Err std.fmt("rename_according_to_twistingrot: {}", e)
191 match rename_according_to_rot(kc, q_dup, q)
193 | `std.Err e: -> `std.Err std.fmt("rename_according_to_murot: {}", e)
197 // std.put("DXJ 04\n")
198 // for var j = 0; j < q.v.len; ++j
199 // std.put("{} : {}\n", q.v[j].name, q.v[j].acoord)
202 /* Get coordinates back from q to TQ */
203 assign_quiver_to_TQ(kc, q, TQ)
205 match unapply_M(kc, TQ, perm_class)
206 | `std.Err e: -> `std.Err std.fmt("unapply_M({}, μrot(T_Q)): {}", kc, e)
207 | `std.Ok (a, perm_class_primeprime):
208 (via_section_5, perm_class) = (a, perm_class_primeprime)
211 -> display_seed_tori(kc, &alpha, via_lusztig, via_section_5, "rot")
215 const numerically_test_flip = {kc, seed, fast
216 var rng : std.rng# = std.mksrng(seed)
217 std.put("seed = {}\n", seed)
218 var rank : int = get_n(kc)
219 var w0 : weyl_reflection[:] = get_w0(kc)
220 var c : weyl_reflection[:] = [][:]
221 match get_coxeter_elt(kc)
223 | `std.Err e: -> `std.Err std.fmt("get_coxeter_elt({}): {}", kc, e)
227 Canonical form of α = (g₀N, g₁N, g₂N, g₃N) as
229 (N, w₀(h₀₂) w₀(h₁₂)⁻¹ u⁻¹ N, w₀ h₀₂ N, Φ⁻¹(v) w₀ h₀₃ N)
231 var h01_sG : minor_coordinate[:] = [][:]
232 var h12 : minor_coordinate[:] = [][:]
233 var h02 : minor_coordinate[:] = [][:]
234 var h23 : minor_coordinate[:] = [][:]
235 var h03_sG : minor_coordinate[:] = [][:]
236 var u : minor_coordinate[:] = [][:]
237 var v : minor_coordinate[:] = [][:]
239 for var j = 1; j <= rank; ++j
240 std.slpush(&h01_sG, [ .k = j, .c = random_minor(rng) ])
241 std.slpush(&h12, [ .k = j, .c = random_minor(rng) ])
242 std.slpush(&h02, [ .k = j, .c = random_minor(rng) ])
243 std.slpush(&h23, [ .k = j, .c = random_minor(rng) ])
244 std.slpush(&h03_sG, [ .k = j, .c = random_minor(rng) ])
246 for var j = rank + 1; j <= w0.len; ++j
247 std.slpush(&u, [ .k = j, .c = random_minor(rng) ])
248 std.slpush(&v, [ .k = j, .c = random_minor(rng) ])
252 match multiply_h_mc_by_sG(kc, h03_sG)
253 | `std.Err e: -> `std.Err std.fmt("w₀(h₀₃⁻¹): {}", e)
259 match multiply_h_mc_by_sG(kc, h01_sG)
260 | `std.Err e: -> `std.Err std.fmt("w₀(h₀₁⁻¹): {}", e)
265 /* u is the N_{-} component of alpha_120 = (g1, g2, g0 sG). */
267 match apply_wo_of_inv(kc, h02)
268 | `std.Err e: -> `std.Err std.fmt("w₀(h₀₂⁻¹): {}", e)
269 | `std.Ok h: wo_h02_inv = h
273 fill_in_u_from_h01_h12_h20(kc, &u, h12, wo_h02_inv, h01_sG)
275 /* v is the N_{-} component of alpha_023 */
277 match apply_wo_of_inv(kc, h03)
278 | `std.Err e: -> `std.Err std.fmt("w₀(h₀₃⁻¹): {}", e)
279 | `std.Ok h: w0_h03i = h
284 match multiply_h_mc_by_sG(kc, w0_h03i)
285 | `std.Err e: -> `std.Err std.fmt("w₀(h₀₃⁻¹): {}", e)
290 fill_in_u_from_h01_h12_h20(kc, &v, h02, h23, h30)
292 var alpha : conf_4_star = [
302 var psi_02_alpha : (conf_3_star#, conf_3_star#)
303 match psi_02(kc, &alpha)
304 | `std.Err e: -> `std.Err std.fmt("Ψ₀₂(α): {}", e)
305 | `std.Ok aa: psi_02_alpha = aa
308 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, psi_02_alpha.0.u)
310 // auto (e : t.doomed_str)
311 // -> `std.Err std.fmt("whatever: {}", e)
313 // std.put("DXJ 01: u = \n")
314 // for var j = 0; j < f.len; ++j
315 // std.put(" {}\n", f[j])
319 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, psi_02_alpha.1.u)
321 // auto (e : t.doomed_str)
322 // -> `std.Err std.fmt("whatever: {}", e)
324 // std.put("DXJ 02: v = \n")
325 // for var j = 0; j < f.len; ++j
326 // std.put(" {}\n", f[j])
332 /* via Zickert + Lusztig */
333 var psi_13_alpha : (conf_3_star#, conf_3_star#)
334 match psi_13(kc, &alpha)
335 | `std.Err e: -> `std.Err std.fmt("Ψ₁₃(α): {}", e)
336 | `std.Ok aa: psi_13_alpha = aa
339 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, psi_13_alpha.0.u)
341 // auto (e : t.doomed_str)
342 // -> `std.Err std.fmt("whatever: {}", e)
344 // std.put("DXJ 03: u~ = \n")
345 // for var j = 0; j < f.len; ++j
346 // std.put(" {}\n", f[j])
350 // match interior_fc_from_mc_and_undo_psi_phi_psi(kc, psi_13_alpha.1.u)
352 // auto (e : t.doomed_str)
353 // -> `std.Err std.fmt("whatever: {}", e)
355 // std.put("DXJ 04: v~ = \n")
356 // for var j = 0; j < f.len; ++j
357 // std.put(" {}\n", f[j])
365 mures = get_mutwistingflip(kc)
367 mures = get_muflip(kc)
371 match (mures, mk_Qdv(kc), apply_Mdv(kc, psi_02_alpha))
372 | (`std.Err e, _, _): -> `std.Err std.fmt("muflip({}): {}", kc, e)
373 | (_, `std.Err e, _): -> `std.Err std.fmt("mk_Qdv({}): {}", kc, e)
374 | (_, _, `std.Err e): -> `std.Err std.fmt("apply_Mdv({}, α): {}", kc, e)
375 | (`std.Ok mu, `std.Ok qdv, `std.Ok T02):
376 /* Assign coordinates to qdv from TQ02 */
377 assign_TQ02_to_quiver(kc, T02, qdv)
379 // std.put("DXJ 03: Qdv:\n")
380 // for var j = 0; j < qdv.v.len; ++j
381 // std.put(" {}: {}\n", qdv.v[j].name, qdv.v[j].acoord)
385 var q_dup : quiver.quiver# = t.dup(qdv)
387 match quiver.mutateseq_ip(qdv, mu)
389 | `std.Err e: -> `std.Err std.fmt("applying muflip: {}", e)
392 /* Rename according to mutation */
394 match rename_according_to_twistingflip(kc, q_dup, qdv)
396 | `std.Err e: -> `std.Err std.fmt("rename_according_to_muflip: {}", e)
399 match rename_according_to_flip(kc, q_dup, qdv)
401 | `std.Err e: -> `std.Err std.fmt("rename_according_to_muflip: {}", e)
405 /* Construct empty TQ13 */
407 .D = std.slalloc(T02.D.len),
408 .E = std.slalloc(T02.E.len),
409 .F = std.slalloc(T02.F.len),
410 .G = std.slalloc(T02.G.len),
411 .w = std.slalloc(T02.w.len),
413 for var j = 0; j < T13.D.len; ++j
414 T13.D[j] = yakmo.rid()
416 for var j = 0; j < T13.E.len; ++j
417 T13.E[j] = yakmo.rid()
419 for var j = 0; j < T13.F.len; ++j
420 T13.F[j] = yakmo.rid()
422 for var j = 0; j < T13.G.len; ++j
423 T13.G[j] = yakmo.rid()
425 for var j = 0; j < T13.w.len; ++j
426 T13.w[j] = std.slalloc(T02.w[j].len)
427 for var k = 0; k < T13.w[j].len; ++k
428 T13.w[j][k] = yakmo.rid()
432 /* Get coordinates back from qdv (which now should be isomorphic to qdh) */
433 assign_quiver_to_TQ13(kc, qdv, &T13)
435 match unapply_Mdh(kc, &T13)
436 | `std.Err e: -> `std.Err std.fmt("unapply_Mdh({}, μflip(T_Q)): {}", kc, e)
437 | `std.Ok a: via_section_5 = a
440 std.put("Top (displayed α is coordinates for Left):\n")
441 match display_seed_tori(kc, psi_02_alpha.0, psi_13_alpha.0, via_section_5.0, "flip")
442 | `std.Err e: -> `std.Err e
446 std.put("\nBottom (displayed α is coordinates for Right):\n")
447 match display_seed_tori(kc, psi_02_alpha.1, psi_13_alpha.1, via_section_5.1, "flip")
448 | `std.Err e: -> `std.Err e
456 const display_seed_tori = {kc : KC_type, alpha : conf_3_star#, via_lusztig : conf_3_star#, via_section_5 : conf_3_star#, function_name : byte[:]
457 var rank : int = get_n(kc)
458 var w0 : weyl_reflection[:] = get_w0(kc)
459 var c : weyl_reflection[:] = [][:]
460 match get_coxeter_elt(kc)
462 | `std.Err e: -> `std.Err std.fmt("get_coxeter_elt({}): {}", kc, e)
465 var fake_label_1 = std.fmt("X_w{}(h3)", rank)
466 var fake_label_2 = std.fmt("D^y_{}(u)", w0.len)
467 var lw = std.max(fake_label_1.len, fake_label_2.len)
468 std.slfree(fake_label_1)
469 std.slfree(fake_label_2)
472 for aa : [ alpha, via_lusztig, via_section_5 ][:]
473 for hh : [ aa.h1, aa.h2, aa.h3 ][:]
474 for var j = 0 ; j < hh.len; ++j
475 var temp = std.fmt("{}", hh[j].c)
476 cw = std.max(cw, temp.len)
480 for var j = 0; j < aa.u.len; ++j
481 var temp = std.fmt("{}", aa.u[j].c)
482 cw = std.max(cw, temp.len)
487 var good_color = "\u{001b}[48;2;12;55;55m"
488 var bad_color = "\u{001b}[48;2;85;12;12m"
489 var end_color = "\u{001b}[0m"
491 std.put("+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+\n", "", lw, "", cw, "", cw, "", cw)
492 std.put("| {w=?} | {w=?}α{w=?} | {w=?}{}(α){w=?} |\n", "", lw, "", (cw-0)/2, "", (cw-1)/2, "", cw-2, function_name, "", cw + 2 - function_name.len)
493 std.put("| {w=?} | {w=?} | {w=?}Lusztig{w=?} | {w=?}Section 5{w=?} |\n", "", lw, "", cw, "", (cw-6)/2, "", (cw-7)/2, "", (cw-8)/2, "", (cw-9)/2)
494 std.put("+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+\n", "", lw, "", cw, "", cw, "", cw)
496 for (sn, ah, lh, s5h) : [
497 ('₁', alpha.h1, via_lusztig.h1, via_section_5.h1),
498 ('₂', alpha.h2, via_lusztig.h2, via_section_5.h2),
499 ('₃', alpha.h3, via_lusztig.h3, via_section_5.h3),
501 for var j = 0; j < rank; j++
502 var label = std.fmt("Δ^w{}(h{})", (c[j] : subscript), sn)
503 var label_width = std.strcellwidth(label)
504 var in_alpha = std.fmt("{}", ah[j].c)
505 var in_lusztig = std.fmt("{}", lh[j].c)
506 var in_section_5 = std.fmt("{}", s5h[j].c)
507 var color = good_color
508 if !std.eq(lh[j].c, s5h[j].c)
513 std.put("| {}{w=?} | {w=?} |{} {w=?} {}|{} {w=?} {}|\n", label, "", lw - label_width, in_alpha, cw, color, in_lusztig, cw, end_color, color, in_section_5, cw, end_color)
516 std.slfree(in_lusztig)
517 std.slfree(in_section_5)
519 std.put("+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+\n", "", lw, "", cw, "", cw, "", cw)
522 for var j = 0; j < w0.len; ++j
523 var label = std.fmt("Δ^γ{}(u)", (j + 1 : subscript))
524 var label_width = std.strcellwidth(label)
525 var in_alpha = std.fmt("{}", alpha.u[j].c)
526 var in_lusztig = std.fmt("{}", via_lusztig.u[j].c)
527 var in_section_5 = std.fmt("{}", via_section_5.u[j].c)
528 var color = good_color
529 if !std.eq(via_lusztig.u[j].c, via_section_5.u[j].c)
533 std.put("| {}{w=?} | {w=?} |{} {w=?} {}|{} {w=?} {}|\n", label, "", lw - label_width, in_alpha, cw, color, in_lusztig, cw, end_color, color, in_section_5, cw, end_color)
536 std.slfree(in_lusztig)
537 std.slfree(in_section_5)
539 std.put("+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+-{w=?,p=-}-+\n", "", lw, "", cw, "", cw, "", cw)
541 std.put("\n {}All ok{}\n\n", good_color, end_color)
543 std.put("\n {}There were mismatches{}\n\n", bad_color, end_color)
549 const assign_TQ_to_quiver = {kc : KC_type, TQ : T_Q#, q : quiver.quiver#
551 var l = coxeter_num(kc) / 2 - 1
553 for var i = 1; i <= rank; ++i
554 var name = std.fmt("A{}", i)
555 match quiver.find_vertex(q, name)
561 vp.acoord = `std.None
563 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(TQ.A[i]))
567 name[0] = ('B' : byte)
568 match quiver.find_vertex(q, name)
574 vp.acoord = `std.None
576 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(TQ.B[i]))
580 name[0] = ('C' : byte)
581 match quiver.find_vertex(q, name)
587 vp.acoord = `std.None
589 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(TQ.C[i]))
595 for var j = 1; j <= l; ++j
597 match quiver.find_vertex(q, name)
603 vp.acoord = `std.None
605 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(TQ.v[i][j]))
613 const assign_quiver_to_TQ = {kc : KC_type, q : quiver.quiver#, TQ : T_Q#
615 var l = coxeter_num(kc) / 2 - 1
617 for var i = 1; i <= rank; ++i
618 var name = std.fmt("A{}", i)
619 match quiver.find_vertex(q, name)
622 TQ.A[i] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
626 name[0] = ('B' : byte)
627 match quiver.find_vertex(q, name)
630 TQ.B[i] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
634 name[0] = ('C' : byte)
635 match quiver.find_vertex(q, name)
638 TQ.C[i] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
644 for var j = 1; j <= l; ++j
646 match quiver.find_vertex(q, name)
648 __dispose__(TQ.v[i][j])
649 TQ.v[i][j] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
657 const assign_TQ02_to_quiver = {kc : KC_type, TQ : T_Q02#, q : quiver.quiver#
659 var l = coxeter_num(kc) / 2 - 1
662 for var i = 1; i <= rank; ++i
663 var name = std.fmt("X{}", i)
665 for (letter, list) : [ ('D', TQ.D), ('E', TQ.E), ('F', TQ.F), ('G', TQ.G) ][:]
666 name[0] = (letter : byte)
667 match quiver.find_vertex(q, name)
673 vp.acoord = `std.None
675 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(list[i]))
682 for var j = 1; j <= L; ++j
685 match quiver.find_vertex(q, name)
691 vp.acoord = `std.None
693 vp.acoord = `std.Some std.get(yakmo.polynomialfromratfunc(TQ.w[i][j]))
702 const assign_TQ13_to_quiver = {kc : KC_type, TQ : T_Q13#, q : quiver.quiver#
704 Because of the way I've set up the quivers and apply_Md{h,v},
705 the naming should be so that
707 apply_Mdv assign_TQ02_to_quiver
708 conf_4_star# ----> (conf_3_star#, conf_3_star#) -----> quiver
710 apply_Mdh assign_TQ13_to_quiver
711 conf_4_star# ----> (conf_3_star#, conf_3_star#) -----> quiver
713 can use the exact same assignments as the second part:
714 assign_TQ{02,13}_to_quiver may be the same function. For
715 clarity, however, they're called separate names.
724 -> assign_TQ02_to_quiver(kc, &TQ_as_02, q)
727 const assign_quiver_to_TQ02 = {kc : KC_type, q : quiver.quiver#, TQ : T_Q02#
729 var l = coxeter_num(kc) / 2 - 1
732 for var i = 1; i <= rank; ++i
733 var name = std.fmt("X{}", i)
735 for (letter, list) : [ ('D', TQ.D), ('E', TQ.E), ('F', TQ.F), ('G', TQ.G) ][:]
736 name[0] = (letter : byte)
737 match quiver.find_vertex(q, name)
740 list[i] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
747 for var j = 1; j <= L; ++j
750 match quiver.find_vertex(q, name)
752 __dispose__(TQ.w[i][j])
753 TQ.w[i][j] = yakmo.ratfuncfrompoly(std.get(vp.acoord))
762 const assign_quiver_to_TQ13 = {kc : KC_type, q : quiver.quiver#, TQ : T_Q13#
763 /* See comment in assign_TQ13_to_quiver */
764 var TQ_as_02 : T_Q02 = [
772 assign_quiver_to_TQ02(kc, q, &TQ_as_02)
775 I may, someday, carelessly rewrite the above function so that
776 it clobbers the slices, perhaps through slgrow. So copy them