PM ✱1: hypothetical derivations (contexts)
DefinitionPM_core_hypothetical_derivationsDRAFT — 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 and a formula ,
and (Pf Γ φ) is defined as: is a theorem of ✱1. So a derivation under hypotheses is an ordinary ✱1 theorem. Also: the -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.
-- 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