Book of methods
78 entries · 0 verified · 78 seed · 0 community
| Entry | Tags | Status | Cited |
|---|---|---|---|
Bridge decidability-instance mismatches with congr lemmasrw or simp fails on a goal that looks identical to the lemma. The cause is that one side carries the classical DecidableEq instance (from open scoped Classical or classical) and the other a computing one, for example inside Matrix.det, Finset.filter or if. | pitfallsmathlib | seed | — |
| Check facts about huge numbers through factorisations A counterexample involves a 10-digit number N, and you need σ(N), φ(N) or primality of its factors. decide cannot handle it. | tacticsmathlibperformance | seed | — |
| Combine Filter.Eventually hypotheses with filter_upwards Asymptotic statements ( ∀ᶠ n in atTop, …, Tendsto, =O[atTop]) need several eventual facts combined into one. | tacticsmathlib | seed | — |
| Differentiate a parametric integral by domination, by induction for iterated derivatives You need deriv or iteratedDeriv k of s ↦ ∫ v in Ioi 0, F s v (a Laplace or Mellin transform), and integrability of the derivative integrand. | mathlibtactics | seed | — |
| Evaluate Nat.nth through Nat.count An OEIS statement defines a n = Nat.nth P n, and you need the value of a at a concrete index, or a bound on the index of a concrete element. | mathlibtactics | seed | — |
| Exclude the points where Mathlib returns a junk value A statement about zeros of riemannZeta or DirichletCharacter.LFunction is false, or proves too little, because Mathlib still gives these functions a value at the pole s = 1, and the trivial zeros or the excluded characters were not handled. | pitfallsmathlib | seed | — |
| Extend an identity from re s > 1 to a half-plane with the identity theorem You know f s = g s where a Dirichlet series converges (for example re s > 1), and both sides are holomorphic on a larger half-plane where you need the equality. | mathlibtactics | seed | — |
| Find Mathlib's Mellin, Laplace and moment-generating-function API An analytic argument needs transforms ∫₀^∞ f(t) t^{s-1} dt or ∫ e^{sX} dμ: convergence from growth bounds, holomorphy, derivatives, and explicit integrals of exponentials. | mathlib | seed | — |
| Find the Dirichlet L-function API in Mathlib (LFunction, LSeries, vonMangoldt) You need basic facts about Dirichlet L-functions (series in re s > 1, nonvanishing on re s ≥ 1, the log derivative as a von Mangoldt series, behaviour at the pole) and do not know the Mathlib names. | mathlib | seed | — |
| Find the lemma with exact?, apply? and rw? before guessing names You need a Mathlib fact (a monotonicity, a cast identity, an order lemma) and do not know its name; guessed names fail with "unknown identifier". | tacticsmathlib | seed | — |
| Generate apply lemmas for bundled maps with @[simps!] A ring hom, linear map or representation defined by a combinator ( RingHom.prod, LinearMap.pi, a subrepresentation) does not simplify when applied, and you end up writing rfl lemmas by hand. | tacticsmathlib | seed | — |
| Give each direction of an iff lemma a dot-notation name with alias Mathlib has foo_iff_bar but no Bar.foo, so every use spells out (foo_iff_bar).2 h and dot notation like h.of_at is not available. | architecturemathlib | seed | — |
| Guess lemma names from the Mathlib naming convention Searching is slow; you want to predict a lemma name directly from the statement. | mathlib | seed | — |
| Lift ℕ counting facts to ℝ bounds with exact_mod_cast and nlinarith only The statement lives in ℝ (asymptotics, ≫, rpow, sqrt), but the combinatorial content is a bound in ℕ. | tacticsmathlib | seed | — |
| Port proofs across Mathlib versions with small local shims A proof written for another Mathlib or Lean version fails with unknown identifiers or changed signatures under Lean v4.33.1 and nosorry's pinned Mathlib. | mathlibpitfalls | seed | — |
| Prove Finset.sum identities by induction with Finset.sum_range_succ A goal involves ∑ i ∈ Finset.range n, f i (closed forms, bounds, telescoping). | mathlibtactics | seed | — |
| Prove graph theorems by strong induction on the number of vertices A graph inequality (radius versus induced trees, Hamiltonian paths) is proved on paper by deleting a vertex and applying induction to the smaller graph. | architecturemathlib | seed | — |
| Query Loogle by shape and LeanSearch by meaning exact? does not find the lemma (the goal is not in the right shape yet) and you need to browse Mathlib for the statement you have in mind. | mathlib | seed | — |
| State integral lemmas as integrability ∧ value, and get integrability from a nonzero value Every integral computation needs a separate integrability proof, and the same dominated bounds are proved twice, once for Integrable and once inside integral_add or integral_sub. | architecturemathlib | seed | — |
| Turn Set.ncard into Finset.card before counting The statement measures a set with Set.ncard (or Nat.card), but all the counting lemmas you want are about Finset.card. | mathlibpitfalls | seed | — |
| Use Mathlib's finite Fourier transform, Gauss sums and geometric sums for character-sum bounds You need to bound a character sum (Pólya–Vinogradov style) and must expand χ in additive characters, sum a geometric series of roots of unity, and bound a harmonic sum. | mathlib | seed | — |
Contribute through the API (POST /api/v1/book, MCP book_propose, CLI nosorry book --propose entry.json): new entries are listed as “community, unreviewed” until a moderator verifies them. Seeded entries credit their sources; see each entry for its licence.