Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Four-state model with two independent readings

Definition
APFPaper5_Worlds_FourObjects

by FiniteUniverse · Nov 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

apfapf-referencesib-v52-2026-11

Defines four raw states, parity/threshold readings, specified records and costs, old-eight predicate and continuation relation.

Meaning and scope

Only supplied finite data and the stated Lean predicates are established. EightHold uses the old B02 predicate; revised B02 is checked separately. The B06 distinction domain/actualJoint are existentially chosen, its serving relation is Set.univ, and A2/BW admission is a singleton with constant price. No consistency or independence of the original physical inputs, actual admissibility, occupancy or admitted dynamics is certified.

Status: conditional reference mathematics. The supplied predicates and model assumptions are not additional Foundation inputs. These records do not establish K1, K3 or K4 closure.

Definition code
/-
APF Foundation Ledger — definition node DRAFT (session EthanBrooke-01WrrBvu, 2026-11-14; not gated, not reviewed)
name: APFPaper5_Worlds_FourObjects
title: A supplied world on four raw states with two distinctions that can be sided independently, on the protocols and bill of the three-object world
inputs_revision: 2026-11-14.1
revision_note: EightHoldOn4 is built from the declared Lean forms as they stood at FOUNDATION_INPUTS revision 2026-10-04.1.
 The sentence added to B02 at revision 2026-11-14.1 is not part of it and is proved of World C separately
 (world_C_meets_B02_r2, Thm_APFB02_r2_checks).
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the author's question of 2026-11-14 02:38 HST. Def_APFPaper5_Worlds_ThreeObjects (protocols, bill and
 records are taken from it unchanged). The eight declared forms, unchanged.
standing: supplied data for a test world. Nothing here is a physical claim.
statement: raw states 0, 1, 2, 3. dA reads true at 1 and 3; dB reads true at 2 and 3. Protocols, records and
 bill as in the three-object world: one protocol keeps dA's record (bill 1), one keeps dB's (bill 1), one
 keeps both (bill 2). EightHoldOn4 states the eight declared forms on this data with one continuation
 relation, capacity 2 and floor 1, the occupant at state 3. contC admits at raw state x the words of length
 at most x.
-/
import Definitions.Def_APFPaper5_Worlds_ThreeObjects

set_option autoImplicit false
namespace APFPaper5.Worlds

/-- True at raw states 1 and 3. -/
def dA : Fin 4 → Bool := fun i => decide (i.val % 2 = 1)

/-- True at raw states 2 and 3. -/
def dB : Fin 4 → Bool := fun i => decide (2 ≤ i.val)

/-- The distinctions: dA and dB. -/
abbrev Dist4 : Type := {d : Fin 4 → Bool // d = dA ∨ d = dB}

/-- The record of a distinction: false for dA, true for dB. -/
def recOf4 (d : Dist4) : Bool := !(d.val 1)

instance : DecidableEq Dist4 := fun a b =>
  decidable_of_iff (a.val 1 = b.val 1)
    ⟨fun h => by
      obtain ⟨a, ha⟩ := a
      obtain ⟨b, hb⟩ := b
      apply Subtype.ext
      show a = b
      rcases ha with rfl | rfl <;> rcases hb with rfl | rfl
      · rfl
      · exact absurd h (by decide)
      · exact absurd h (by decide)
      · rfl,
     fun h => by rw [h]⟩

def suff4 (_ : Unit) (_ : Proto3) (sigma : Set Bool) (d : Dist4) : Prop := recOf4 d ∈ sigma

def uses4 (_ : Unit) (_ : Proto3) (_ : Dist4) (_ : Set Bool) : Prop := True

/-- The calibrated bills of the protocols that serve a family. -/
def costSet4 (S : Finset Dist4) : Set ℝ :=
  {c : ℝ | ∃ p : Proto3,
    (∀ d ∈ S, ∃ sigma : Set Bool,
      sigma ⊆ maint3 () p ∧ suff4 () p sigma d ∧ uses4 () p d sigma) ∧
    ((calib3 () (wholeRes3 () p) : NNReal) : ℝ) = c}

/-- The ledger's family cost on this data. -/
noncomputable def cost4 (S : Finset Dist4) : ℝ :=
  APFPaper1.Source.familyCost (wholeRes3 ()) (calib3 ()) (maint3 ()) (suff4 ()) (uses4 ()) S

/-- The eight declared forms on the supplied data, sharing one continuation relation. -/
def EightHoldOn4 (Cont : Fin 4 → List Bool → Prop) : Prop :=
  APF_B01_DeclaredInput Cont
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 4) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 4) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 4) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 4) => f (APFB01.physicalClass Cont x)) ∧
    APFB02.B02SourceMeaning (Context := Unit) (X := fun _ => Fin 4) (Q := fun _ => List Bool)
      (P := fun _ => Proto3) (Record := fun _ => Bool)
      (fun _ => Cont) (fun _ d => d = dA ∨ d = dB) maint3 suff4 uses4 ∧
    APFB03.B03TaskCost (Context := Unit) (D := fun _ => Dist4) (P := fun _ => Proto3)
      (R := fun _ => Bool) (Record := fun _ => Bool) wholeRes3 calib3 maint3 suff4 uses4 ∧
    APFB04.B04FiniteCapacity (Context := Unit) (fun _ => (2 : ℝ)) ∧
    APFB05.MarginalFloor (Context := Unit) (D := fun _ => Dist4) (P := fun _ => Proto3)
      (R := fun _ => Bool) (Record := fun _ => Bool) wholeRes3 calib3 maint3 suff4 uses4
      (fun _ _ => True) (fun _ => 2) (fun _ => 1) ∧
    (∃ (D : Unit → Set (APFB01.PhysicalState Cont → Bool))
        (actualJoint : Set (Sigma fun g : Unit => APFB06.OriginalAlignment Cont (D g))),
      APFB06.AmendedB06_20260914 (Context := Unit) (Raw := fun _ => Fin 4)
        (FullProcess := fun _ => List Bool) (Resource := fun _ => Bool)
        (fun _ => Cont) D (fun _ => ({[true], [false], [true, true]} : Set (List Bool)))
        (fun _ _ => Set.univ) wholeRes3 calib3 (fun _ => (2 : NNReal)) actualJoint) ∧
    APFB07a.A2Selection (Interface := Unit) (Configuration := fun _ => APFB01.PhysicalState Cont)
      (fun _ s => s = APFB01.physicalClass Cont 3) (fun _ _ => (1 : ℝ))
      (fun _ => APFB01.physicalClass Cont 3) ∧
    APFB07b.BWUniqueMinimum (Interface := Unit)
      (Configuration := fun _ => APFB01.PhysicalState Cont)
      (fun _ s => s = APFB01.physicalClass Cont 3) (fun _ _ => (1 : ℝ))

/-- World C. Raw state x admits the words of length at most x. -/
def contC (x : Fin 4) (w : List Bool) : Prop := w.length ≤ x.val

end APFPaper5.Worlds
Source
Definitions/Def_APFPaper5_Worlds_FourObjects.lean; Sib v52 / pullbacks v6; SHA-256 9cf1faf09beec679515c501165e9cbcaf15cadd299cdf2659e8ee9c13c371447. Papers/Paper 01 - The Enforceability of Distinction/Paper_1_Enforceability_of_Distinction_Supplement_v9.28.tex; lines 1224-1243,1276-1332,1741-1771,1833-1885,2601-2680; APF Reference Docs/APF Reconstruction Spine/FOUNDATION_INPUTS.json; revision 2026-11-14.1; input B02; source/Definitions/Def_APFPaper5_Worlds_FourObjects.lean
Human review
  • Endorsed by Shuze Chen · Nov 16, 2026

    Confirmed by the moderator at approval.

  • Endorsed by FiniteUniverse · Nov 16, 2026

    Confirmed by the mission captain (proposal self-audit).

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