Derive theoretical result

From pjt222/agent-almanac · View interactive version

Derive theoretical result is an AI agent skill from the GitHub repository pjt222/agent-almanac. Derive a theoretical result step-by-step from first principles or established theorems, with every step explicitly justified and special cases checked. Use when deriving a formula or theorem from first principles, proving a mathematical statement by logical deduction, re-deriving a textbook result f

How to use this skill

Skill file

Derive Theoretical Result

Produce a rigorous, step-by-step derivation of a theoretical result starting from stated axioms, first principles, or established theorems. Every algebraic or logical step is explicitly justified, limiting cases are verified, and the final result is presented with a complete notation glossary.

When to Use

Inputs

Procedure

Step 1: State Starting Assumptions and Target Result

Write the derivation's contract explicitly before any calculation:

  1. Axioms and postulates: List every assumption the derivation rests on. For physics, this includes the symmetry group, the action principle, or the postulates of quantum mechanics. For mathematics, this includes the axiom system and any previously proven lemmas.
  2. Target result: State the result to be derived in precise mathematical notation. If the result is an equation, write both sides. If it is an inequality, state the direction and the conditions for equality.
  3. Scope and restrictions: State the domain of validity (e.g., "valid for non-relativistic, spinless particles in three dimensions"). Identify what the derivation does not cover.
  4. Notation declaration: Define every symbol that will appear. This prevents ambiguity and makes the derivation self-contained.
## Derivation Contract
- **Starting from**: [axioms, postulates, or established results]
- **Target**: [precise mathematical statement]
- **Domain of validity**: [restrictions and assumptions]
- **Notation**:
  - [symbol]: [meaning and units]
  - ...

Got: A complete, unambiguous statement of what is being derived from what, with all notation defined upfront.

If fail: If the target result is ambiguous or the starting assumptions are incomplete, clarify before proceeding. A derivation with hidden assumptions is unreliable.

Step 2: Identify Required Mathematical Machinery

Survey the tools needed and verify their applicability:

  1. Algebraic techniques: Identify required manipulations (tensor algebra, commutator algebra, matrix operations, series expansions). Verify that the structures involved satisfy the prerequisites (e.g., convergence conditions for series, invertibility for matrix operations).
  2. Calculus and analysis: Identify whether the derivation requires ordinary or partial differentiation, integration (and over what domain), functional derivatives, contour integration, or distribution theory. Verify regularity conditions (differentiability, integrability, analyticity).
  3. Symmetry and group theory: Identify representation-theoretic tools needed (irreducible representations, Clebsch-Gordan coefficients, character orthogonality, Wigner-Eckart theorem).
  4. Topology and geometry (if applicable): Identify geometric structures (manifolds, fiber bundles, connections) and topological constraints (boundary terms, winding numbers, index theorems).
  5. Known identities and lemmas: Collect the specific identities that will be invoked (e.g., Jacobi identity, Bianchi identity, integration by parts, Stokes' theorem). State each one explicitly so the derivation can cite them by name.
## Mathematical Toolkit
- **Algebra**: [techniques and prerequisites]
- **Analysis**: [calculus tools and regularity conditions]
- **Symmetry**: [group theory tools]
- **Identities to invoke**: [list with precise statements]

Got: A checklist of mathematical tools with their applicability conditions verified for the specific problem at hand.

If fail: If a required tool has unverified prerequisites (e.g., term-by-term differentiation of a series whose uniform convergence is unknown), flag it as a gap. Either prove the prerequisite or state it as an additional assumption.

Step 3: Execute Derivation with Step-by-Step Justification

Carry out the derivation with every step labeled and justified:

  1. One operation per step: Each numbered step performs exactly one algebraic or logical operation. Do not combine multiple manipulations into a single step.
  2. Justification labels: Tag each step with its justification. Common labels:
  1. Intermediate checkpoints: After every 5-10 steps, pause and verify:
  1. Branch points: If the derivation branches (e.g., case analysis for degenerate vs. non-degenerate eigenvalues), treat each branch as a labeled sub-derivation and merge the results.
## Derivation

**Step 1.** [Starting expression]
*Justification*: [by assumption / definition]

**Step 2.** [Result of operation on Step 1]
*Justification*: [specific reason]

...

**Checkpoint (after Step N).** Verify:
- Dimensions: [check]
- Symmetry: [check]

...

**Step M.** [Final expression = Target result]
*Justification*: [final operation]  QED

Got: A linear sequence of steps from the starting point to the target result, with no gaps in logic. Every step is independently verifiable.

If fail: If a step does not follow from the previous one, the derivation has a gap. Either insert the missing intermediate steps or identify the additional assumption needed. Never skip a step with "it can be shown that" unless the omitted result is a well-known identity listed in Step 2.

Step 4: Check Limiting Cases and Special Values

Validate the derived result against known physics or mathematics:

  1. Limiting cases: Identify at least three limiting cases where the result should reduce to something known:
  1. Special values: Substitute specific values of parameters where the answer is known independently (e.g., n=1 for the hydrogen atom, d=3 for three-dimensional results).
  1. Symmetry checks: Verify that the result transforms correctly under the symmetry group. If the result should be a scalar, check that it is invariant. If it should be a vector, check its transformation law.
  1. Consistency with related results: Check that the derived result is consistent with other known results in the same theory (e.g., Ward identities, sum rules, reciprocity relations).
## Limiting Case Verification
| Case | Condition | Expected Result | Derived Result | Match |
|------|-----------|----------------|----------------|-------|
| [name] | [parameter limit] | [known result] | [substitution] | [Yes/No] |
| ... | ... | ... | ... | ... |

Got: All limiting cases and special values produce the expected results. The derivation is internally consistent.

If fail: A failed limiting case indicates an error in the derivation. Trace the failure back by checking which step first produces an expression that fails the limit. Common causes: incorrect sign, missing factor of 2 or pi, wrong combinatorial coefficient, or a step where an order of limits matters.

Step 5: Present Complete Derivation with Notation Glossary

Assemble the final, polished derivation:

  1. Narrative structure: Write a brief introductory paragraph stating the physical or mathematical motivation, the approach, and the main result.
  2. Derivation body: Present the steps from Step 3, cleaned up for readability. Group related steps into logical blocks with descriptive headings (e.g., "Expanding the action to second order", "Applying the stationary phase condition").
  3. Result box: State the final result in a highlighted block, clearly separated from the derivation.
  4. Notation glossary: Compile every symbol used in the derivation with its meaning, units (if physical), and first occurrence.
  5. Assumptions summary: List all assumptions in a single place, distinguishing fundamental postulates from technical assumptions (e.g., smoothness, convergence).
## Final Result

> **Theorem/Result**: [precise statement with equation number]

## Notation Glossary
| Symbol | Meaning | Units | First appears |
|--------|---------|-------|---------------|
| [sym] | [meaning] | [units or dimensionless] | [Step N] |
| ... | ... | ... | ... |

## Assumptions
1. [Fundamental postulate 1]
2. [Technical assumption 1]
3. ...

Got: A self-contained document that a reader can follow from start to finish without consulting external references, except for the explicitly cited identities and theorems.

If fail: If the derivation is too long for a single document (more than ~50 steps), break it into lemmas. Derive each lemma separately, then assemble the main result by citing the lemmas.

Validation

Pitfalls

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.