PieriMaps: 2.0 overhaul#4246
Conversation
Adds projection-direction maps (dualPieri, dualPieriColumn, dualLR), point evaluators (applyPieri, applyPieriColumn, applyLR, applyDualPieri, applyDualLR, applyDualPieriColumn), three basis conventions (Row / Filling / Weyl) with conversion utilities, GL_n equivariance and well-definedness checkers (verifyEquivariant, verifyWellDefined), and symbolic display of any constructed map (symbolicForm).
|
One comment about this: since version 1.0 was verified as a JSAG paper, the citation generator was automatically adding me as an author of the actual JSAG article, which isn't correct. So I manually removed the JSAG certification but kept a line in the documentation stating that 1.0 was certified. However, it seems like a small oversight that any authors added after JSAG certification are automatically added as authors of the actual JSAG article. |
|
Yeah -- that's definitely a minor bug with the PackageCitations package. But on the other hand, keeping track of two separate sets of authors in the package metadata doesn't seem great, either. The solution is to use a M2/M2/Macaulay2/packages/TerraciniLoci.m2 Lines 137 to 147 in 661767f |
d-torrance
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I have a few comments
| orderedCols := {}; | ||
| for c in choice do ( | ||
| totalSign = totalSign * (c#0); | ||
| orderedCols = append(orderedCols, c#1); |
- Bring back the Certification block; drop the manual JSAG paragraph
in favor of a Citation key in the main doc node.
- error("...", x) instead of error("..." | toString x).
- Swap append-in-loop for `for ... list` / `apply` / MutableList
(avoids O(n^2)). Same trick for the offsets builds in pmGet*Blocks.
- ??= for memoize-or-compute (the *Cache helpers, the inner straighten memo, the symbolicForm cache slots). - ?? for read-with-default (`if H#?k then H#k else d` -> `H#k ?? d`) and for accumulate-or-init (`H#k = (H#k ?? 0) + new`). - Default symbolicForm basis labels are 0-indexed instead of 1-indexed.
d-torrance
left a comment
There was a problem hiding this comment.
Thanks for the updates! Found one more append issue
Same for-list idiom on the v1.0 leftovers. Drops `when true` and a
dead `output := {}` in pieriHelper too.
|
@d-torrance this is a good suggestion to support: accumulate-or-init |
d-torrance
left a comment
There was a problem hiding this comment.
Thanks again! Tentatively approving pending the Ubuntu builds finally working. (We're still recovering from a cyberattack on Canonical the other day, and fetching information from their servers keeps timing out...)
This reminds me of Python's >>> import collections
>>> x = collections.defaultdict(lambda:0)
>>> x[0]
0
>>> x[1] += 1
>>> x[1]
1We could do it all at top level if we use i1 : DefaultDict = new SelfInitializingType of MutableHashTable;
i2 : new DefaultDict from Function := (T, f) -> (
d := new DefaultDict;
d.DefaultFactory = f;
d);
i3 : DefaultDict_Thing := (d, k) -> (
if d#?k then d#k
else d#k = d.DefaultFactory());
i4 : DefaultDict_Thing = (d, k, e) -> d#k = e;
i5 : x = DefaultDict(() -> 0)
o5 = DefaultDict{...1...}
o5 : DefaultDict
i6 : x_0
o6 = 0
i7 : x_1 += 1
o7 = 1
i8 : x_1
o8 = 1 |
|
That's way too complicated. I would prefer something simple and intuitive, e.g. maybe |
Adds projection-direction maps (dualPieri, dualPieriColumn, dualLR),
point evaluators (applyPieri, applyPieriColumn, applyLR, applyDualPieri,
applyDualLR, applyDualPieriColumn), three basis conventions
(Row / Filling / Weyl) with conversion utilities, GL_n equivariance
and well-definedness checkers (verifyEquivariant, verifyWellDefined),
and symbolic display of any constructed map (symbolicForm).