axiom
Declaring conditional axioms in locked scopes
Overview
The axiom command declares statements inside a lock() scope. These axioms act as parameters — when the theorem is called, T[… | R], the axioms must be realized by the current proof context.
axiom(statement1; statement2; … | lockLabel)lockLabel- The label of the
lock()the axioms belong to; theaxiomcommand is inside that lock (possibly underfor,ifand other locks — they become the axiom's own context). statement1; …- The axioms, written as statements
left -> right(or without->withnotation("default", …)). A theorem proved under the lock needs a realization of each of them wherever it is called.
Command Properties
- Group
- Context
- Produces
- Statements (axiom declarations within a lock scope)
- Delivery & Label
- Into the current scope. Additionally registers each axiom in the lock's axiom list (for later matching by calls). A label on
axiomcaptures the declared axiom statements at this scope. - Creates scope
- No.
- Mechanism
- Reads the statements, creates them, delivers them to the current scope, and registers each in the lock label's axiom list. If the
axiomis insideifcommand (between the current scope and the lock), those conditions become part of the axiom's requirements when matched by a call.
Basic examples
Axioms are always declared inside a lock and reference the lock's label:
Basic axioms
Details
Axioms hold within their lock. Closing the lock does not make them facts outside it. A realization used outside a lock keeps that lock's full contract; every premise must match the required scheme. An unconditional result needs a proof of its premises. For assumptions used throughout a file, keep their lock open to the end of the file.
Conditional Axioms
When an axiom is inside an if command, it only takes effect when that condition holds. This is how you create theorems with preconditions:
Conditional axiom
Axiom Label Requirement
The first argument must be a label declared on a lock(). This ensures axioms are properly scoped:
Label requirement
The lock label must be the first argument to axiom
axiom and lock(), all statements would be unconditional.Why Axioms Need a Lock
Every axiom must reference a lock label. This is not a technicality — it reflects a fundamental design principle. A lock is a scope whose internal rules are defined by its axioms. You cannot create a statement "from thin air" with axiom; you must specify which lock this axiom belongs to.
Each axiom is registered in its lock's axiom list. This list is what a call inspects when applying a theorem: for every axiom that stood in the lock when the theorem was proved (an axiom written later is no obligation of it), the call must find a matching realization — a proof in the current context that satisfies the axiom's statement (and its if-conditions). If any axiom cannot be realized, the call fails.
Think of it this way: a lock says "these are the rules of my world", and each axiom adds a rule. When someone calls the theorem, they must prove that every rule holds in their world. This is what makes theorems trustworthy — they cannot be applied in contexts that don't satisfy their axioms.
-𝒜;). This prevents any further axiom calls while keeping existing axioms intact. See Sealing a Lock.