Claude Code Settings#13
Merged
Merged
Conversation
Rewrite six `f.comp g` call sites to the Mathlib infix `f ∘L g` (defined in `Mathlib.Topology.Algebra.Module.LinearMap`). Paper-style notation aligns with how operator-algebra literature writes composition of continuous linear maps. Build verified via `lake env lean` on the touched file.
New skill `.claude/skills/paper-notation-refactor/` that rewrites Lean code toward publication-style notation. Two modes: - Mode A applies existing Mathlib notation from a static table (inner product brackets, BigOperators, norm, Complex.I, Real.pi, ∘L / ∘ₗ for linear-map composition, adjoint, star). - Mode B consumes the project's ingested paper knowledge under `references/<slug>/` (output of pdf-to-knowledge) to extract the paper's own symbol, then designs matching `scoped notation` / `syntax` + `macro_rules` declarations with companion `Coe` instances when bundled subtypes hide a type gap. Key design decisions baked in: - Paper is source of truth — the skill never invents a glyph the cited paper does not use. Restraint is part of correctness. - Placeholder precedence `:max` is documented as the default for separators that overlap with Lean operators (`‖`, `|`, etc.). - Lexer-gotcha escape (`α[g]` for subscripted prefixes) documented because Lean lexes `α_g` as one identifier. - `meta def` requirement for `app_unexpander` under `module` + `@[expose] public section` promoted to notation-map.md. - LaTeX → Unicode table includes Fraktur (𝔄 𝔉 𝔐) and script (𝒪 𝒩) glyphs needed for AQFT / operator-algebra papers.
Force-add the skill's inner references/notation-map.md (root .gitignore pattern `references/` matches nested paths; only the skill's own reference material belongs in-tree). Contents: - Part 1 — Mode A mapping table (inner product, BigOperators, norm, adjoint, star, Complex / Real scalars, .comp → ∘L with caveats). - Part 2 — Mode B crib sheet + extraction recipe from references/<slug>/, LaTeX-to-Unicode table (Greek + Fraktur + script), lexer-gotcha escape for subscripted prefixes, `meta def` mandate, Coe companion checklist, colocation rule, paper-reference policy.
Rewrite the frontmatter description to cover Japanese phrasings
("記法 付けて / 付与 / 抽出", "paper styleにしたい", "読みやすく")
and verb variants ("convert / replace / swap / substitute") that were
empirically under-triggered in a manual `scripts.run_eval` optimization
pass (20 queries, 10 should-trigger + 10 should-not-trigger,
3 runs each).
Result on 20-query trigger-eval with claude-opus-4-7:
- Average trigger rate for should-trigger queries: 0.20 → 0.27 (+35%).
- Queries totally cold (rate 0.00): 6 → 1.
- should-not-trigger pass rate: 10/10 maintained across all iterations.
Binary pass rate regressed from 4/10 to 0/10 but this is an artifact of
raising runs-per-query from 2 to 3 under the default 0.5 threshold
(1/2 passes, 1/3 fails). Continuous trigger rate is the honest metric
and moved in the right direction.
Fundamental limit: claude-opus-4-7 triggers this skill probabilistically
and rarely hits ≥ 67% on any single query regardless of wording. Full
optimization to reliable triggering would require the skill-creator's
run_loop.py with an API key — out of scope for this session.
See skill-creator-tests/paper-notation-refactor/description-opt/SUMMARY.md
for per-query rates and the three descriptions tried.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #12