magma-to-lmfdb-object
Convert a native Magma object (CliffOrd, GrpPSL2Cliff, Gamma0, etc.) into its LMFDB wrapper type. Use this skill whenever the user wants to wrap a Magma object for serialization, asks "how do I create an LMFDB object", wants to set timing, or needs to populate LMFDB attributes from a live computation.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- magma-to-lmfdb-object
- description
- Convert a native Magma object (CliffOrd, GrpPSL2Cliff, Gamma0, etc.) into its LMFDB wrapper type. Use this skill whenever the user wants to wrap a Magma object for serialization, asks "how do I create an LMFDB object", wants to set timing, or needs to populate LMFDB attributes from a live computation.
03 SKILL.md 正文
magma-to-lmfdb-object
Purpose: Wrap a native Magma object in its LMFDB type so it can be serialized.
Key intrinsic
create_lmfdb_object(X) // CliffOrd → LMFDBCliffOrd
create_lmfdb_object(PSL2O) // GrpPSL2Cliff → LMFDBGrpSL2Cliff
create_lmfdb_object(SL2O, alpha) // Gamma0 → LMFDBGrpSL2CliffGamma0
create_lmfdb_object(MS, beta) // ModSymCliff + matrix → LMFDBHeckeMatrices
create_lmfdb_conj_intersection(SL2O, sigma_label, PSigma, alpha, CI_grp)
// → LMFDBConjugateIntersection
All create_lmfdb_object variants accept an optional timing keyword (default " "):
T0 := Cputime();
X := create_lmfdb_object(O: timing := Sprintf("%o", Cputime(T0)));
Minimal example
O := load_clifford_orders(cl)[1];
X := create_lmfdb_object(O); // LMFDBCliffOrd
Y := create_lmfdb_object(PSL2O); // LMFDBGrpSL2Cliff
alpha := levels(PSL2O)[1];
Z := create_lmfdb_object(PSL2O, alpha); // LMFDBGrpSL2CliffGamma0
What gets populated
Attributes are filled from the live Magma object — label, generators, relations, abelianization, coset representatives, etc. The full attribute list for each type is stored in the *_ATTRS constant in package-LMFDB.mag (always sorted alphabetically).
Edge cases
create_lmfdb_object(SL2O, alpha)requires thatSL2O\gamma0fp_dict[alpha]is already computed (i.e.,Gamma0_fp(SL2O, alpha)` has been called).- Timing defaults to
" "(a space, not empty) because an empty string fails to register. - See
/magma/package-LMFDB.magfor allcreate_lmfdb_objectoverloads.
Next step
Pass the result to /lmfdb-object-to-string or /lmfdb-object-to-textfile.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code