products
quiverlab.trace.products ¶
Plan 35 -- the worked-steps chapter for the HH product surface.
products_chapter(A, kind, obj) turns a Task-1 product result object (an
HHProducts for cup/cap/bracket, a ConnesB for connes_b) into the typed
trace-event stream the renderers turn into a homework-grade chapter:
- a prose
StepNotenaming the product and citing its source; - a
ResultDimscarrying the authoritative Hochschild (co)homology dimensions (rendered as the chapter's HH result table) -- and, in building it, the DRIFT GATE: every dimension the product object recorded is compared, degree by degree, against a FRESHhochschild_(co)homologyonA; a mismatch raisesQuiverlabErrorrather than shipping a chapter that misstates the computation (mirroring the module drift gates intrace.modules); - one
ProductStepper bidegree -- the nonzero structure-constant equations for cup/cap/bracket, the induced Connes differential matrix for connes_b.
The gate is genuine, not decorative: it re-derives the HH dimensions INDEPENDENTLY of the (possibly corrupted) product object, so a tampered table dimension is caught.
Float-free: every number is an int or an exact domain-element string. The fixed
per-kind definitional formula lives in render_html (the sole owner of the
worked-steps math source); this module owns only the DATA-derived equations.
balanced_coeff ¶
balanced_coeff(c, prime)
A GF(p) residue displayed as its BALANCED representative: c with c > p/2
(equivalently 2c > p) shows as c - p (so p-1 -> -1, p-2 -> -2). Display
only -- the JSON keeps the raw residue string. A coefficient that is not a residue
in [0, p) (a fraction, an out-of-range or already-signed value, or no prime at
all) is returned verbatim.
Source code in src/quiverlab/trace/products.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
balanced_rep_note ¶
balanced_rep_note(prime)
The one-sentence legend for the balanced-representative display, or "" for a
non-GF basis (nothing to balance).
Source code in src/quiverlab/trace/products.py
323 324 325 326 327 328 329 330 | |
beyond_window_note ¶
beyond_window_note()
The legend for the em-dash honesty mark used by the big product table.
Source code in src/quiverlab/trace/products.py
469 470 471 472 | |
cayley_table ¶
cayley_table(kind, degrees, out_degree, dims, constants, prime=None)
The structured Cayley multiplication table of one product bidegree: row labels
(left classes α^p_i), column labels (right classes α^q_j / z^n_j for
cap), the corner operator, and one TeX cell per entry -- the product in the target
basis (α^out / z^out), balanced-rep coefficients. Presentation-agnostic:
the HTML surfaces render it via render_html.cayley_grid_html, the GUI mirrors
it. structural_note_line is carried alongside so a caller shows it above the
grid.
Source code in src/quiverlab/trace/products.py
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
cell_tex ¶
cell_tex(kind, out_degree, coeffs, prime)
One Cayley cell: the product expressed in the TARGET basis as
Σ_k balanced(c_k)·g_k (g_k the k-th output generator), or "0" when
every coefficient vanishes. coeffs is [constants[k][i][j] for k].
Source code in src/quiverlab/trace/products.py
351 352 353 354 355 356 357 358 359 360 361 | |
combined_cayley ¶
combined_cayley(kind, tables, prime=None)
The ONE big Cayley table of a whole product family, from the per-bidegree
tables (each a mapping with degrees / out_degree / dims /
constants). Rows run over every left (cohomology) class degree-major; columns
over every right class (cohomology for cup/bracket, homology for cap) degree-major.
Returns a struct {corner, row_labels, col_labels, row_degsep, col_degsep,
cells, dl, dr, note, has_beyond} where each cell is "0" / a signed
combination / the em dash (beyond the computed window). row_degsep[i] /
col_degsep[j] flag the first class of a new degree block (skipping the very
first) for the heavier grid rule. The table is UNCAPPED (Marco 2026-08-02): it
always renders, however many classes the axes carry.
Source code in src/quiverlab/trace/products.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | |
equation_lines ¶
equation_lines(kind, degrees, out_degree, dims, constants)
A TeX equation per nonzero product left_i * right_j: the RHS lists the
output generators with their exact structure-constant coefficients (the unit
coefficient 1 is left implicit; every non-unit coefficient is shown, so
every nonzero constant appears verbatim).
Operates on the RAW table data (degrees/out_degree/dims/
constants) rather than a ProductTable, so the SAME builder serves both
the worked-steps chapter (from the frozen object, via _equation_lines) and
the report's Computed-results block (from the serialized blocks() dict, via
trace.results_html) -- one implementation, no divergent copy. Zero terms are
skipped; a fully vanishing table yields [] (the caller emits the vanish
note).
Source code in src/quiverlab/trace/products.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
notation_legend ¶
notation_legend(kind, degrees_note, basis)
One-sentence legend DEFINING the symbols the product-table equations use (Marco: "I need the definitions of alphas, betas, zetas..."). Shown immediately before each product family's tables in every render surface.
basis is the concrete recorded class-basis string (e.g. "bar/GF(7)" /
"cs/...") taken from the result block -- the structure constants are
basis-dependent, so the reader is told which basis; None (connes_b, which has
no single basis string) omits it. degrees_note is an optional trailing clause
(the degree indices p/q/n are otherwise per-table); appended when non-empty.
Plain prose with Unicode math glyphs (alpha/beta/gamma/z/w), rendered as escaped
text by every surface -- it never needs typesetting. This is the SINGLE source of
the legend text, consumed by render_html (via products_chapter) and
results_html._product_tables_html; the GUI hardcodes the same wording.
Source code in src/quiverlab/trace/products.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
prime_from_basis ¶
prime_from_basis(basis)
The prime p of a recorded GF(p) basis string, else None (QQ / an
extension-field repr -> coefficients shown verbatim, no balancing).
Source code in src/quiverlab/trace/products.py
296 297 298 299 300 301 302 | |
products_chapter ¶
products_chapter(A, kind, obj)
The worked-steps event stream for the product kind computed as obj.
Raises QuiverlabError if obj's recorded dimensions drift from a fresh
Hochschild (co)homology on A (the drift gate).
Source code in src/quiverlab/trace/products.py
155 156 157 158 159 160 161 162 163 164 165 166 167 | |
structural_note_line ¶
structural_note_line(kind, degrees, dims, constants, prime)
The structural notes of one table as a single caption sentence, or "".
Source code in src/quiverlab/trace/products.py
418 419 420 421 422 423 424 | |
structural_notes ¶
structural_notes(kind, degrees, dims, constants, prime)
Honest structural observations DERIVED from the constants (never asserted blindly):
"all squares are 0"when every diagonal productx·xvanishes;"the table is graded-antisymmetric"/"...graded-commutative (symmetric)"when the table equals its sign-mirrored transpose, the sign read off the degrees by :func:_mirror_sign.
Only meaningful for cup/bracket on a SQUARE bidegree (p == q and
dl == dr) -- the two operands then live in the same space, so the diagonal and
the transpose make sense; [] otherwise. The sign-mirror note needs residue
arithmetic and is emitted only over a GF(p) basis.
Source code in src/quiverlab/trace/products.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |