A proof document is a scoped syntax tree. Valid checks every node; sound
derives its conclusion. Presentation never supplies a mathematical premise.
Equations
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.var v) = LeanMirror.Expr.var (ρ v)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.symbol s) = LeanMirror.Expr.symbol s
- LeanMirror.Expr.rename ρ (f.app x_1) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) f).app (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.nat n) = LeanMirror.Expr.nat n
- LeanMirror.Expr.rename ρ x_1.coeUnit = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).coeUnit
- LeanMirror.Expr.rename ρ (x_1.add y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).add (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (x_1.sub y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).sub (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (x_1.mul y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).mul (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (x_1.div y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).div (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ x_1.abs = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).abs
- LeanMirror.Expr.rename ρ (x_1.eq y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).eq (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (x_1.lt y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).lt (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (x_1.le y) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) x_1).le (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) y)
- LeanMirror.Expr.rename ρ (p.and q) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) p).and (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) q)
- LeanMirror.Expr.rename ρ (p.or q) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) p).or (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) q)
- LeanMirror.Expr.rename ρ (p.imp q) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) p).imp (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) q)
- LeanMirror.Expr.rename ρ (p.iff q) = (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) p).iff (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => ρ) q)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.all n p) = LeanMirror.Expr.all n (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => LeanMirror.Expr.liftRen fun {t : LeanMirror.Ty} => ρ) p)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.ex n p) = LeanMirror.Expr.ex n (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => LeanMirror.Expr.liftRen fun {t : LeanMirror.Ty} => ρ) p)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.integral n p) = LeanMirror.Expr.integral n (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => LeanMirror.Expr.liftRen fun {t : LeanMirror.Ty} => ρ) p)
- LeanMirror.Expr.rename ρ (LeanMirror.Expr.allIn n d p) = LeanMirror.Expr.allIn n d (LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => LeanMirror.Expr.liftRen fun {t : LeanMirror.Ty} => ρ) p)
Instances For
Equations
- e.weaken = LeanMirror.Expr.rename (fun {t : LeanMirror.Ty} => LeanMirror.Var.there) e
Instances For
Each constructor has fixed logical meaning and fixed controlled prose. Arbitrary source prose is kept separately and cannot certify a node.
- finish {S : Ty → Type} {Γ : List Ty} (claim : Expr S Γ Ty.prop) : Argument S Γ
- have {S : Ty → Type} {Γ : List Ty} (claim : Expr S Γ Ty.prop) (next : Argument S Γ) : Argument S Γ
- fix {S : Ty → Type} {Γ : List Ty} (a : Ty) (name : String) (next : Argument S (a :: Γ)) : Argument S Γ
- assume {S : Ty → Type} {Γ : List Ty} (claim : Expr S Γ Ty.prop) (next : Argument S Γ) : Argument S Γ
- choose {S : Ty → Type} {Γ : List Ty} (a : Ty) (name : String) (condition : Expr S (a :: Γ) Ty.prop) (goal : Expr S Γ Ty.prop) (next : Argument S (a :: Γ)) : Argument S Γ
- suffices {S : Ty → Type} {Γ : List Ty} (claim goal : Expr S Γ Ty.prop) (next : Argument S Γ) : Argument S Γ
Instances For
The conclusion is computed from the proof structure, never a separate caption.
Equations
- (LeanMirror.Argument.finish p).goal = p
- (LeanMirror.Argument.have claim next).goal = next.goal
- (LeanMirror.Argument.fix a n next).goal = LeanMirror.Expr.all n next.goal
- (LeanMirror.Argument.assume p next).goal = p.imp next.goal
- (LeanMirror.Argument.choose a name condition goal next).goal = goal
- (LeanMirror.Argument.suffices claim goal next).goal = goal
Instances For
Verification checks each assertion under exactly the assumptions available at that point. Choices require existence. Fresh variables cannot escape scope.
Equations
- One or more equations did not get rendered due to their size.
- LeanMirror.Argument.Valid M H (LeanMirror.Argument.finish p) = ∀ (env : LeanMirror.Context M.base Γ), H env → LeanMirror.Expr.eval M p env
- LeanMirror.Argument.Valid M H (LeanMirror.Argument.fix a n next) = LeanMirror.Argument.Valid M (fun (env : LeanMirror.Context M.base (a :: Γ)) => H env.2) next
- LeanMirror.Argument.Valid M H (LeanMirror.Argument.assume p next) = LeanMirror.Argument.Valid M (fun (env : LeanMirror.Context M.base Γ) => H env ∧ LeanMirror.Expr.eval M p env) next
Instances For
Structured formulas support prose and calculation layout without reparsing TeX.
Equations
- One or more equations did not get rendered due to their size.
- LeanMirror.Expr.toDocumentJson v vars e = Lean.Json.mkObj [("kind", Lean.Json.str "formula"), ("latex", Lean.Json.str (LeanMirror.Expr.latex v e vars))]
Instances For
Data view. Use checked_document% to obtain this from an audited certificate.
Equations
- LeanMirror.Argument.documentJson v doc = Lean.Json.mkObj [("statement", LeanMirror.Expr.toDocumentJson v [] doc.goal), ("proof", LeanMirror.Argument.toJson v [] doc)]
Instances For
Select the document directly from the type of an audited, closed validity theorem. Its noncomputable mathematical model stays in the proof, not in runtime output.
Equations
- One or more equations did not get rendered due to their size.