Formal logic model and machine verification in Lean 4 (2026)
https://doi.org/10.5281/zenodo.24368376
The argument of this book was complete when it was published in 2022 (the original was archived at the National Diet Library of Japan on publication).
In 2026 the argument was written out as a formal logic model (a system of definitions and axioms). In that model it is proved that the book’s main conclusions follow from its premises without any logical gap, and that the premises do not contradict one another (consistency); every one of these proofs has passed machine verification in the proof assistant Lean 4.
The verification was carried out not by AI but by Lean 4, and anyone can repeat it. The model was made with the help of AI. Naturally, however, whether the model exists or not does not change the structural value of the book Proof of a World itself: AI and Lean 4 are no more than auxiliary tools that presuppose the original text. For details, including how each formula corresponds to the text, see the link.
1/-2 Proof of a World (『世界の証明』, Ryuto Sako) —3 machine check of the formal model, Rev. 5 (19 November 2026)45 What this file does6 1. It writes down the symbols, the definitions D1–D5 and the axioms7 A1, A2, A4–A8 of the formal model as a Lean structure `ProofOfAWorld`.8 2. It proves Lemma L1 and Theorems T1–T8 with their corollaries for EVERY9 structure that satisfies those definitions and axioms (derivability).10 The proofs follow the steps of Section IV of the formal model.11 3. It builds the model ℳ of Section VI (three beings s, t, w; one12 coordinate k) and proves that it satisfies all 19 formulas13 (consistency). It also shows that the definitions and axioms do not14 force all beings to be numerically one (non-triviality).15 4. At the end, `#print axioms` reports what each result relies on.1617 How to read the result18 * No red error and no warning anywhere → every proof was accepted.19 * "does not depend on any axioms" → the result follows from the20 definitions and axioms of the formal model by logic alone; nothing21 else was assumed.22 * One result, `T6_cor_text_route` (the route of the text, which uses23 double-negation elimination), relies on classical logic; Lean then24 lists its three standard axioms `propext`, `Classical.choice`,25 `Quot.sound`. This is expected.26 * If any line lists any other axiom, that proof did not pass.2728 Notes on the encoding29 * Sorts: `Ent` (beings) and `Crd` (coordinates) are two separate types.30 * The sentential operators 𝐒, F, Truth are functions `Prop → Prop`31 (`Sop`, `F`, `Truth`).32 * The schemas A1, A2, A8 and D5a are written as single statements about33 all propositions, which is slightly stronger than a schema. The proofs34 use only instances that can be written in the language ℒ35 (B(a), AbsoluteNothing(a), x = x), and the model ℳ satisfies even the36 stronger form, so both conclusions hold for the schemas as well.37 * A3 is a meta-theoretic restriction, not a formula of ℒ, so it is not38 written here.39 * `Ext` stands for Ext_原理的 (being in the fundamental exterior of40 sō-omou).41 * Defined symbols are kept as symbols together with their defining42 biconditionals, as in Section VI, where the 19 formulas are checked.4344 Lean 4, core library only (no Mathlib).45 Formal model: https://ryutostudio.github.io/logic-en.html46 Book: https://doi.org/10.5281/zenodo.2360736947 This Lean file was written by Claude (Anthropic) at the author's request.48 Its correctness does not rest on trust in the writer: Lean checks it.49-/5051set_option autoImplicit false5253/-- The symbols of the formal language ℒ, with the definitions D1–D5 and54the axioms A1, A2, A4–A8. -/55structure ProofOfAWorld where56 -- Sorts (types)57 Ent : Type -- beings (entities)58 Crd : Type -- coordinates (locations)59 -- Constants and function60 S_ind : Ent -- an individual's personal sō-omou61 World : Ent -- the world as a whole62 c0 : Crd -- the single fundamental coordinate63 Loc : Ent → Crd -- the coordinate at which a being is located64 -- Sentential operators65 Sop : Prop → Prop -- 𝐒(φ): φ is established as sō-omou66 F : Prop → Prop -- F(φ): φ is a convenience within sō-omou67 Truth : Prop → Prop -- Truth(φ): φ appears as truth68 -- One-place predicates on beings69 S : Ent → Prop -- x is sō-omou70 B : Ent → Prop -- x exists (is real)71 PE : Ent → Prop -- x is a fundamental being72 Concept : Ent → Prop -- x is a concept73 M : Ent → Prop -- x is meaning74 Ext : Ent → Prop -- Ext_原理的: x is in the fundamental exterior75 Gen : Ent → Prop -- x is generated unilaterally76 Begin : Ent → Prop -- x has a beginning77 End : Ent → Prop -- x has an end78 AlreadyPresent : Ent → Prop -- x is already present79 AbsoluteNothing : Ent → Prop -- x is absolute nothingness80 Limited : Ent → Prop -- x is limited81 -- Two-place predicates82 P : Ent → Ent → Prop -- x pictures y83 CoPresent : Ent → Ent → Prop -- x and y are co-present84 Same : Ent → Ent → Prop -- x and y are fundamentally the same being85 C : Crd → Crd → Prop -- continuity86 Before : Crd → Crd → Prop -- chronological precedence87 -- Definitions D1–D588 D1 : ∀ x : Ent, S x ↔ Sop (B x)89 D2a : ∀ x : Ent, Ext x ↔ ¬ Sop (B x)90 D2b : ∀ x : Ent, Gen x ↔ ∃ a : Ent, P a x ∧ ¬ P x a91 D2c : ∀ x : Ent, Begin x ↔ ∃ c : Crd, Before c (Loc x)92 D2d : ∀ x : Ent, End x ↔ ∃ c : Crd, Before (Loc x) c93 D2e : ∀ x : Ent, AbsoluteNothing x ↔ ¬ B x94 D3 : ∀ x : Ent, PE x ↔ (S x ∧ ∀ y : Ent, (P x y ↔ P y x))95 D4a : ∀ x y : Ent, CoPresent x y ↔ (Loc x = c0 ∧ Loc y = c0)96 D4b : ∀ x : Ent, AlreadyPresent x ↔ (Loc x = c0 ∧ PE x ∧ ¬ Gen x)97 D4c : ∀ x y : Ent, Same x y ↔ (PE x ∧ PE y ∧ Loc x = Loc y)98 D5a : ∀ φ : Prop, Truth φ ↔ Sop φ99 D5b : ∀ x : Ent, M x ↔ B x100 -- Axioms A1, A2, A4–A8 (A3 is a meta-theoretic restriction)101 A1 : ∀ φ : Prop, φ → Sop φ102 A2 : ∀ φ : Prop, F φ → Sop φ103 A4 : ∀ x y : Ent, P x y ↔ P y x104 A5 : (∀ c : Crd, c = c0) ∧ (∀ c c' : Crd, Before c c' → c ≠ c') ∧ C c0 c0105 A6 : (∀ y : Ent, CoPresent S_ind y) → Limited S_ind106 A7 : ∀ x : Ent, S x → B x107 A8 : ∀ (φ : Ent → Prop) (x : Ent), Sop (φ x) → S x108109namespace ProofOfAWorld110111variable (W : ProofOfAWorld)112113/-! ## Lemma L1 and Theorems T1–T8 (Section IV) -/114115/-- L1. ∀x (Loc(x) = c0). Basis: A5 (first conjunct). -/116theorem L1 : ∀ x : W.Ent, W.Loc x = W.c0 :=117 fun x => W.A5.1 (W.Loc x)118119/-- T1. ¬∃x (B(x) ∧ Ext(x)). Basis: A1, D2a. -/120theorem T1 : ¬ ∃ x : W.Ent, W.B x ∧ W.Ext x :=121 fun ⟨a, hB, hExt⟩ =>122 -- Step 4: A1 with φ := B(a) gives 𝐒(B(a))123 have h4 : W.Sop (W.B a) := W.A1 (W.B a) hB124 -- Step 5: D2a gives ¬𝐒(B(a))125 have h5 : ¬ W.Sop (W.B a) := (W.D2a a).mp hExt126 -- Step 6: contradiction127 h5 h4128129/-- T2. ∀x (B(x) ↔ S(x)). Basis: A1, D1, A7. -/130theorem T2 : ∀ x : W.Ent, W.B x ↔ W.S x :=131 fun x =>132 ⟨fun hB => (W.D1 x).mpr (W.A1 (W.B x) hB), -- Steps 1–3133 fun hS => W.A7 x hS⟩ -- Step 4134135/-- T3. ∀x (B(x) ↔ PE(x)). Basis: A4, D3, T2. -/136theorem T3 : ∀ x : W.Ent, W.B x ↔ W.PE x :=137 fun x =>138 -- Step 1: A4 gives ∀y (P(x, y) ↔ P(y, x))139 have h1 : ∀ y : W.Ent, (W.P x y ↔ W.P y x) := fun y => W.A4 x y140 -- Step 2: with D3, S(x) ↔ PE(x)141 have h2 : W.S x ↔ W.PE x :=142 ⟨fun hS => (W.D3 x).mpr ⟨hS, h1⟩, fun hPE => ((W.D3 x).mp hPE).1⟩143 -- Step 3: T2 and transitivity144 (W.T2 x).trans h2145146/-- Corollary of T3: Limited(S_ind). Basis: L1, D4a, A6. -/147theorem T3_cor : W.Limited W.S_ind :=148 W.A6 (fun y => (W.D4a W.S_ind y).mpr ⟨W.L1 W.S_ind, W.L1 y⟩)149150/-- T4. ∀x ¬Gen(x). Basis: A4, D2b. -/151theorem T4 : ∀ x : W.Ent, ¬ W.Gen x :=152 fun x =>153 -- Steps 1–3: by A4, there is no a with P(a, x) ∧ ¬P(x, a)154 have h3 : ¬ ∃ a : W.Ent, W.P a x ∧ ¬ W.P x a :=155 fun ⟨a, hPax, hnPxa⟩ => hnPxa ((W.A4 a x).mp hPax)156 -- Step 4: contrapositive of D2b157 fun hGen => h3 ((W.D2b x).mp hGen)158159/-- T5. ∀x (¬Begin(x) ∧ ¬End(x)). Basis: A5, L1, D2c, D2d. -/160theorem T5 : ∀ x : W.Ent, ¬ W.Begin x ∧ ¬ W.End x := by161 intro x162 constructor163 · intro hBegin164 -- Step 2: by D2c, Before(c1, Loc(x)) for some coordinate c1165 match (W.D2c x).mp hBegin with166 | ⟨c1, hBefore⟩ =>167 -- Step 3: c1 = c0 (A5, first conjunct) and Loc(x) = c0 (L1),168 -- so Before(c0, c0)169 rw [W.A5.1 c1, W.L1 x] at hBefore170 -- Step 4: A5 (second conjunct) gives c0 ≠ c0, against c0 = c0171 exact W.A5.2.1 W.c0 W.c0 hBefore rfl172 · intro hEnd173 -- Step 5: the same argument with D2d174 match (W.D2d x).mp hEnd with175 | ⟨c2, hBefore⟩ =>176 rw [W.A5.1 c2, W.L1 x] at hBefore177 exact W.A5.2.1 W.c0 W.c0 hBefore rfl178179/-- Corollary of T5: ¬Begin(World) ∧ ¬End(World). -/180theorem T5_cor : ¬ W.Begin W.World ∧ ¬ W.End W.World :=181 W.T5 W.World182183/-- T6. ¬∃x AbsoluteNothing(x). Basis: A1, A8, A7, D2e. -/184theorem T6 : ¬ ∃ x : W.Ent, W.AbsoluteNothing x :=185 fun ⟨a, hAN⟩ =>186 -- Step 2: A1 with φ := AbsoluteNothing(a)187 have h2 : W.Sop (W.AbsoluteNothing a) := W.A1 (W.AbsoluteNothing a) hAN188 -- Step 3: A8 with φ(x) := AbsoluteNothing(x)189 have h3 : W.S a := W.A8 W.AbsoluteNothing a h2190 -- Step 4: A7191 have h4 : W.B a := W.A7 a h3192 -- Steps 5–6: D2e gives ¬B(a); contradiction193 (W.D2e a).mp hAN h4194195/-- Corollary of T6: ∀x B(x), by the route of the text (Step 8):196T6, the contrapositive of D2e, and double-negation elimination197(classical logic). -/198theorem T6_cor_text_route : ∀ x : W.Ent, W.B x :=199 fun x => Classical.byContradiction (fun hnB => W.T6 ⟨x, (W.D2e x).mpr hnB⟩)200201/-- Corollary of T6: ∀x B(x), by the route noted under A8: x = x holds;202by A1 it holds as sō-omou; by A8 x is sō-omou; by A7 x is real.203This route needs no classical logic. It is the one used below. -/204theorem T6_cor : ∀ x : W.Ent, W.B x :=205 fun x =>206 have h1 : W.Sop (x = x) := W.A1 (x = x) rfl207 have h2 : W.S x := W.A8 (fun y => y = y) x h1208 W.A7 x h2209210/-- T7. ∀x (Concept(x) → AlreadyPresent(x)).211Basis: corollary of T6, T3, L1, T4, D4b. -/212theorem T7 : ∀ x : W.Ent, W.Concept x → W.AlreadyPresent x :=213 fun x _ => (W.D4b x).mpr ⟨W.L1 x, (W.T3 x).mp (W.T6_cor x), W.T4 x⟩214215/-- Corollary of T7: ∀x AlreadyPresent(x)216(Steps 2–7 do not use the assumption Concept(x)). -/217theorem T7_cor : ∀ x : W.Ent, W.AlreadyPresent x :=218 fun x => (W.D4b x).mpr ⟨W.L1 x, (W.T3 x).mp (W.T6_cor x), W.T4 x⟩219220/-- T8. ∀x ((S(x) ↔ B(x)) ∧ (B(x) ↔ PE(x)) ∧ (PE(x) ↔ M(x))).221Basis: T2, T3, D5b. -/222theorem T8 : ∀ x : W.Ent, (W.S x ↔ W.B x) ∧ (W.B x ↔ W.PE x) ∧ (W.PE x ↔ W.M x) :=223 fun x => ⟨(W.T2 x).symm, W.T3 x, (W.T3 x).symm.trans (W.D5b x).symm⟩224225/-- Corollary 1 of T8: ∀x (S(x) ∧ B(x) ∧ PE(x) ∧ M(x)). -/226theorem T8_cor1 : ∀ x : W.Ent, W.S x ∧ W.B x ∧ W.PE x ∧ W.M x :=227 fun x =>228 have hB : W.B x := W.T6_cor x229 ⟨(W.T2 x).mp hB, hB, (W.T3 x).mp hB, (W.D5b x).mpr hB⟩230231/-- Corollary 2 of T8: ∀x∀y Same(x, y)232(fundamental identity, not numerical identity). -/233theorem T8_cor2 : ∀ x y : W.Ent, W.Same x y :=234 fun x y => (W.D4c x y).mpr ⟨(W.T8_cor1 x).2.2.1, (W.T8_cor1 y).2.2.1, (W.L1 x).trans (W.L1 y).symm⟩235236end ProofOfAWorld237238/-! ## The model ℳ of Section VI (consistency) -/239240/-- The three beings of ℳ: s (an individual's personal sō-omou),241t (another individual), w (the world as a whole). -/242inductive Being where243 | s244 | t245 | w246247/-- The model ℳ: beings {s, t, w}; one coordinate k (here `()`);248𝐒, F, Truth interpreted as the identity on truth values. -/249def modelM : ProofOfAWorld where250 Ent := Being251 Crd := Unit252 S_ind := Being.s253 World := Being.w254 c0 := ()255 Loc := fun _ => ()256 Sop := fun φ => φ257 F := fun φ => φ258 Truth := fun φ => φ259 S := fun _ => True260 B := fun _ => True261 PE := fun _ => True262 Concept := fun _ => True263 M := fun _ => True264 Ext := fun _ => False265 Gen := fun _ => False266 Begin := fun _ => False267 End := fun _ => False268 AlreadyPresent := fun _ => True269 AbsoluteNothing := fun _ => False270 Limited := fun x => x = Being.s ∨ x = Being.t271 P := fun _ _ => True272 CoPresent := fun _ _ => True273 Same := fun _ _ => True274 C := fun _ _ => True275 Before := fun _ _ => False276 -- The 19 formulas hold in ℳ:277 D1 := fun _ => Iff.rfl278 D2a := fun _ => ⟨fun h => False.elim h, fun h => False.elim (h trivial)⟩279 D2b := fun _ => ⟨fun h => False.elim h, fun ⟨_, _, h⟩ => False.elim (h trivial)⟩280 D2c := fun _ => ⟨fun h => False.elim h, fun ⟨_, h⟩ => False.elim h⟩281 D2d := fun _ => ⟨fun h => False.elim h, fun ⟨_, h⟩ => False.elim h⟩282 D2e := fun _ => ⟨fun h => False.elim h, fun h => False.elim (h trivial)⟩283 D3 := fun _ => ⟨fun _ => ⟨trivial, fun _ => Iff.rfl⟩, fun _ => trivial⟩284 D4a := fun _ _ => ⟨fun _ => ⟨rfl, rfl⟩, fun _ => trivial⟩285 D4b := fun _ => ⟨fun _ => ⟨rfl, trivial, fun h => h⟩, fun _ => trivial⟩286 D4c := fun _ _ => ⟨fun _ => ⟨trivial, trivial, rfl⟩, fun _ => trivial⟩287 D5a := fun _ => Iff.rfl288 D5b := fun _ => Iff.rfl289 A1 := fun _ h => h290 A2 := fun _ h => h291 A4 := fun _ _ => Iff.rfl292 A5 := ⟨(fun c => match c with | () => rfl), (fun _ _ h => False.elim h), trivial⟩293 A6 := fun _ => Or.inl rfl294 A7 := fun _ _ => trivial295 A8 := fun _ _ _ => trivial296297/-- Consistency: the definitions and axioms do not imply a contradiction,298because the model ℳ satisfies all of them. -/299theorem consistency : ¬ (ProofOfAWorld → False) :=300 fun h => h modelM301302/-- In ℳ, the individual s and the world w are numerically distinct... -/303theorem modelM_distinct : modelM.S_ind ≠ modelM.World := by304 show Being.s ≠ Being.w305 intro h306 cases h307308/-- ...and yet fundamentally the same being (T8, Corollary 2). -/309theorem modelM_distinct_but_same :310 modelM.S_ind ≠ modelM.World ∧ modelM.Same modelM.S_ind modelM.World :=311 ⟨modelM_distinct, modelM.T8_cor2 _ _⟩312313/-- Non-triviality: the definitions and axioms do not force all beings to be314numerically one. Shown by ℳ, where the individual s and the world w are315distinct. -/316theorem not_all_one : ¬ (∀ W : ProofOfAWorld, ∀ x y : W.Ent, x = y) :=317 fun h => modelM_distinct (h modelM modelM.S_ind modelM.World)318319/-! ## The result: what each statement relies on320321Each line below should print322 'NAME' does not depend on any axioms323except `T6_cor_text_route`, which prints (the order may differ)324 'ProofOfAWorld.T6_cor_text_route' depends on axioms: [propext, Classical.choice, Quot.sound]325If any line lists any other axiom, that proof did not pass. -/326327#print axioms ProofOfAWorld.L1328#print axioms ProofOfAWorld.T1329#print axioms ProofOfAWorld.T2330#print axioms ProofOfAWorld.T3331#print axioms ProofOfAWorld.T3_cor332#print axioms ProofOfAWorld.T4333#print axioms ProofOfAWorld.T5334#print axioms ProofOfAWorld.T5_cor335#print axioms ProofOfAWorld.T6336#print axioms ProofOfAWorld.T6_cor_text_route337#print axioms ProofOfAWorld.T6_cor338#print axioms ProofOfAWorld.T7339#print axioms ProofOfAWorld.T7_cor340#print axioms ProofOfAWorld.T8341#print axioms ProofOfAWorld.T8_cor1342#print axioms ProofOfAWorld.T8_cor2343#print axioms consistency344#print axioms modelM_distinct_but_same345#print axioms not_all_one
This is the full text of ProofOfAWorld_Rev5.lean. View on GitHub