You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent cross-series style audit of QuantEcon lecture content (QuantEcon/audit.2026-05.style-guide — 5 series, 299 lectures) surfaced 7 conventions that are documented in the QuantEcon manual style guide but are not yet encoded as rules in this repository. This issue proposes adding them.
The proposals are split into two tiers:
5 strong-evidence rules — each violated repeatedly across the corpus, with a clear style-guide source.
2 weaker-evidence rules — documented in the style guide but with thinner corpus evidence. Included for completeness; the team may want to defer or skip these.
Ready-to-merge rule entries (in the existing style_checker/rules/*.md format) are linked from each item below.
Strong-evidence proposals (5)
1. qe-writing-009 — Write "IID", not "i.i.d." or "iid"
Type:rule (mechanical — regex catches bare E[, E_t, \mathbb E without braces, \Pr(, \Var()
Corpus evidence:~60 lectures across the corpus. Highest counts: lecture-python.myst (21 / 110), lecture-python-advanced.myst (17 / 55), lecture-dp (17 / 50). This is the single most violated math convention in the corpus that isn't already a coded rule.
Proposed implementation: Phase 4.3 candidate. Regex with awareness of math-environment boundaries.
Corpus evidence:~30 lectures. Concentrated in lecture-python-advanced.myst (14 / 55) and lecture-dp (9 / 50). Most violations are \mathcal{N}(\mu, \sigma^2) for the normal distribution.
Proposed implementation: Phase 4.3 candidate. Regex \\mathcal\{N\}|\{\\cal N\}|\\mathbb\{N\} for normal-distribution misuses; multi-letter distributions need \\text\{Beta\}|\\operatorname\{Beta\} → \\mathrm{Beta} checks.
Corpus evidence: Moderate. Repeatedly observed (manual "see equation (3)" or "(eq. above)" references in older lectures despite labelled equations being available). Currently qe-math-007 bans \tag (manual numbering) but doesn't positively require the {eq} reference syntax.
Type:style (judgment — distinguishing an "event" from a "set" requires reading)
Corpus evidence: Limited. The rule was identified during the audit but few clear violations were tallied (was scored under our audit ID qe-math-A2 with note "limited evidence").
Recommendation: Could be folded into qe-math-010 as a sub-rule rather than a separate rule, or deferred until a future audit confirms it's a real source of inconsistency.
Closes the gap between the human-readable style guide and the machine-enforceable rule registry.
Provides corpus-validated targets for Phase 4.3 deterministic checking (most of these are pure regex; see #19 — Phase 4.3 acceleration).
What's being asked
Are any of these rules already on the team's radar / in a draft branch?
Are there reasons (style debate, false-positive risk, scope) to exclude any?
If the team is open to adding them, the ready-to-merge rule entries can be submitted as a single PR against style_checker/rules/writing-rules.md and style_checker/rules/math-rules.md.
Summary
A recent cross-series style audit of QuantEcon lecture content (QuantEcon/audit.2026-05.style-guide — 5 series, 299 lectures) surfaced 7 conventions that are documented in the QuantEcon manual style guide but are not yet encoded as rules in this repository. This issue proposes adding them.
The proposals are split into two tiers:
Ready-to-merge rule entries (in the existing
style_checker/rules/*.mdformat) are linked from each item below.Strong-evidence proposals (5)
1.
qe-writing-009— Write "IID", not "i.i.d." or "iid"writing.md§ General writing advice;math.md§ IIDrule(mechanical — case-sensitive regex)lecture-python.myst(21 / 110)\bi\.i\.d\.\b|\biid\boutside fenced code / inline code / math blocks.qe-writing-009-IID.md(in the contribution PR)2.
qe-math-010— Use\mathbb{P},\mathbb{E},\mathbb{V}for probability, expectation, variancemath.md§ Probability, expectation, and variancerule(mechanical — regex catches bareE[,E_t,\mathbb Ewithout braces,\Pr(,\Var()lecture-python.myst(21 / 110),lecture-python-advanced.myst(17 / 55),lecture-dp(17 / 50). This is the single most violated math convention in the corpus that isn't already a coded rule.qe-math-010-blackboard-PEV.md3.
qe-math-011— Plain letters for distribution names;\mathrm{…}for multi-letter — never\mathcal{N}or\mathbb{N}math.md§ Distribution namesrule(mechanical)lecture-python-advanced.myst(14 / 55) andlecture-dp(9 / 50). Most violations are\mathcal{N}(\mu, \sigma^2)for the normal distribution.\\mathcal\{N\}|\{\\cal N\}|\\mathbb\{N\}for normal-distribution misuses; multi-letter distributions need\\text\{Beta\}|\\operatorname\{Beta\}→\\mathrm{Beta}checks.qe-math-011-distribution-naming.md4.
qe-math-012— Multiplication:\cdotor juxtaposition — never*inside mathmath.md§ Multiplication in equationsrule(mechanical)\*inside$…$/$$…$$blocks. Care needed to avoid false positives in non-math contexts (markdown emphasis, code).qe-math-012-multiplication.md5.
qe-math-013— Reference equations via{eq}`label`math.md§ end (auto-numbering example)rule(partial — regex flags candidates, judgment confirms)qe-math-007bans\tag(manual numbering) but doesn't positively require the{eq}reference syntax.qe-math-013-equation-refs.mdWeaker-evidence proposals (2) — for the team's consideration
These are documented in the style guide but have thinner corpus evidence. The team may prefer to defer or skip them.
6.
qe-math-014— Braces\{…\}for events; parentheses(…)for sets when using\mathbb{P}math.md§ Probability, expectation, and variancestyle(judgment — distinguishing an "event" from a "set" requires reading)qe-math-A2with note "limited evidence").qe-math-010as a sub-rule rather than a separate rule, or deferred until a future audit confirms it's a real source of inconsistency.qe-math-014-events-vs-sets.md7.
qe-math-015— Lowercase letters for densities/PMFs; uppercase for CDFsmath.md§ Density and mass functionsstyle(judgment — requires understanding which function is being referenced)qe-math-015-density-CDF-case.mdWhy now?
These rules are already enforced informally in code review and via the QuantEcon manual style guide. Adding them to action-style-guide:
What's being asked
style_checker/rules/writing-rules.mdandstyle_checker/rules/math-rules.md.References