Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

PM ✱1: hypothetical derivations (contexts)

Definition
PM_core_hypothetical_derivations

by AA · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

DRAFT — part of an in-progress public formalization of Principia Mathematica; it may still change, and every change is dated in the project's change log.

Contexts for derivations in PM's system ✱1. For a list of formulas Γ=[h1,…,hn]\Gamma = [h_1,\dots,h_n]Γ=[h1​,…,hn​] and a formula φ\varphiφ,

ctx(Γ,φ)=h1⊃(h2⊃(⋯⊃(hn⊃φ)))\mathrm{ctx}(\Gamma,\varphi) = h_1 \supset (h_2 \supset (\cdots \supset (h_n \supset \varphi)))ctx(Γ,φ)=h1​⊃(h2​⊃(⋯⊃(hn​⊃φ)))

and Γ⊢φ\Gamma \vdash \varphiΓ⊢φ (Pf Γ φ) is defined as: ctx(Γ,φ)\mathrm{ctx}(\Gamma,\varphi)ctx(Γ,φ) is a theorem of ✱1. So a derivation under hypotheses is an ordinary ✱1 theorem. Also: the nnn-th hypothesis of a context.

This is proof infrastructure, not a part of PM's text: PM argues from hypotheses informally; these definitions let such arguments be written as explicit ✱1 derivations.

Formalization Note The rules over contexts (modus ponens under hypotheses, ∧/≡ introduction and elimination, case split on ✱2·11, …) are theorems; they are copied into the solutions that use them. The repository's two tactic abbreviations are not in this bundle: the platform does not accept macros, so the solutions write out each use.

Source: PM.Derived.

Definition code
-- PM/Derived.lean at 2e43991fec42, without its theorems (skeleton subtraction);
-- generated by scripts/prove2me/export.py; every command kept is copied verbatim.
import Definitions.Def_PM_core_star1_system
import Definitions.Def_PM_core_statement_formulas

/-!
  Derived rules for the ✱1 Hilbert system. Every rule here is a meta-level Lean lemma of the shape
  `Thm a → … → Thm c` (or a theorem schema), built only from `Thm`'s constructors and the
  already-replayed `t…` theorems of PM.Replay. Nothing is assumed: `#print axioms` is empty.

  Part 1: Hilbert-level rules (syllogism, ∧/≡ introduction and elimination).
  Part 2: PM's chain ✱2·73 → ✱2·77 (Frege's "S" axiom), needed here for the deduction layer.
          PM.Replay2 proves `t2_73 … t2_77` again, line by line after PM.
  Part 3: a natural-deduction layer. `Pf Γ φ` is *defined* as the theorem `Thm (h₁ ⊃ (h₂ ⊃ … ⊃ φ))`,
          so the deduction theorem is definitional (`Pf (Γ ++ [h]) φ` is `Pf Γ (h ⊃ φ)`), and
          `Pf [] φ` is `Thm φ`. The rules lift PM's propositions into a context.
-/
namespace PM
open F

/-! ## Part 1: Hilbert-level rules -/

/-! ## Part 2: PM ✱2·73 – ✱2·77 -/

/-! ## Part 3: natural deduction in a context -/

/-- `ctx [h₁,…,hₙ] φ = h₁ ⊃ (… ⊃ (hₙ ⊃ φ))`. -/
@[reducible] def ctx : List F → F → F
  | [], φ => φ
  | h :: Γ, φ => imp h (ctx Γ φ)

/-- `Pf Γ φ`: φ is a theorem under the hypotheses Γ, i.e. `Thm (ctx Γ φ)`. -/
def Pf (Γ : List F) (φ : F) : Prop := Thm (ctx Γ φ)

namespace Pf

/-- The `n`-th hypothesis of a context (0-based, oldest first). -/
def nth : List F → Nat → F
  | [], _ => .var ""
  | a :: _, 0 => a
  | _ :: l, n + 1 => nth l n

end Pf

end PM
Source
Whitehead and Russell, Principia Mathematica, Vol. I (1910), ✱1–✱5; formalization: https://github.com/willmcginnis/principia-mathematica-lean/blob/2e43991fec4221198853c15ba637b6c8430cec4b/PM/Derived.lean

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me