Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Three-state model with two correlated readings

Definition
APFPaper5_Worlds_ThreeObjects

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

apfapf-referencesib-v52-2026-11

Defines three raw states, two threshold readings, three finite protocols, specified record/bill relations, a family cost, 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-13; not gated, not reviewed)
name: APFPaper5_Worlds_ThreeObjects
title: A supplied world on three raw states with two distinctions, three protocols and a bill, on which the eight declared forms are stated together
inputs_revision: 2026-11-14.1
revision_note: EightHoldOn3 is built from the declared Lean forms as they stood at FOUNDATION_INPUTS revision 2026-10-04.1.
 World T does NOT meet B02 as revised at 2026-11-14.1 (world_T_fails_B02_r2, Thm_APFB02_r2_checks); it is kept
 as the record that the added sentence does not follow from the earlier forms.
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the author's statement of 2026-11-13 23:32 HST ("2 needs to be derivable or something is missing from
 the 8"). Def_APFPaper5_Worlds_TwoObjects (the pattern). The eight declared forms, unchanged.
standing: supplied data for a test world. Nothing here is a physical claim.
statement: raw states 0, 1, 2. dLow reads true at 1 and 2; dHigh reads true at 2. Protocols: the words [true],
 [false] and [true, true]. The first keeps the record of dLow, the second the record of dHigh, the third both.
 The bill is 1 for the first two and 2 for the third. A record is sufficient for a distinction when it is that
 distinction's record. EightHoldOn3 states the eight declared forms on this data with one continuation
 relation, capacity 2 and floor 1. contT admits at raw state x the words of length at most x.
-/
import Definitions.Def_APF_B01_DeclaredInput
import Definitions.Def_APF_B02_DeclaredInput
import Definitions.Def_APF_B03_DeclaredInput_r2
import Definitions.Def_APF_B04_DeclaredInput
import Definitions.Def_APF_B05_DeclaredInput_r2
import Definitions.Def_APF_B06_DeclaredInput
import Definitions.Def_APF_B07a_DeclaredInput
import Definitions.Def_APF_B07b_DeclaredInput

set_option autoImplicit false
namespace APFPaper5.Worlds

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

/-- True at raw state 2. -/
def dHigh : Fin 3 → Bool := fun i => decide (2 ≤ i.val)

/-- The protocols: three words. -/
abbrev Proto3 : Type :=
  {p : List Bool // p ∈ ({[true], [false], [true, true]} : Set (List Bool))}

/-- The distinctions: dLow and dHigh. -/
abbrev Dist3 : Type := {d : Fin 3 → Bool // d = dLow ∨ d = dHigh}

/-- The record of a distinction: false for dLow, true for dHigh. -/
def recOf (d : Dist3) : Bool := !(d.val 1)

instance : DecidableEq Dist3 := 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 pLow : Proto3 := ⟨[true], Or.inl rfl⟩

def pHigh : Proto3 := ⟨[false], Or.inr (Or.inl rfl)⟩

def pBoth : Proto3 := ⟨[true, true], Or.inr (Or.inr rfl)⟩

def wholeRes3 (_ : Unit) (p : Proto3) : Bool := decide (p.val = [true, true])

def calib3 (_ : Unit) (r : Bool) : NNReal := if r then 2 else 1

def maint3 (_ : Unit) (p : Proto3) : Set Bool :=
  {r | p.val = [true, true] ∨ (p.val = [true] ∧ r = false) ∨ (p.val = [false] ∧ r = true)}

def suff3 (_ : Unit) (_ : Proto3) (sigma : Set Bool) (d : Dist3) : Prop := recOf d ∈ sigma

def uses3 (_ : Unit) (_ : Proto3) (_ : Dist3) (_ : Set Bool) : Prop := True

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

/-- The ledger's family cost on this data. -/
noncomputable def cost3 (S : Finset Dist3) : ℝ :=
  APFPaper1.Source.familyCost (wholeRes3 ()) (calib3 ()) (maint3 ()) (suff3 ()) (uses3 ()) S

/-- The eight declared forms on the supplied data, sharing one continuation relation. -/
def EightHoldOn3 (Cont : Fin 3 → List Bool → Prop) : Prop :=
  APF_B01_DeclaredInput Cont
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 3) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 3) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 3) => f (APFB01.physicalClass Cont x))
      (fun (f : APFB01.PhysicalState Cont → Prop) (x : Fin 3) => f (APFB01.physicalClass Cont x)) ∧
    APFB02.B02SourceMeaning (Context := Unit) (X := fun _ => Fin 3) (Q := fun _ => List Bool)
      (P := fun _ => Proto3) (Record := fun _ => Bool)
      (fun _ => Cont) (fun _ d => d = dLow ∨ d = dHigh) maint3 suff3 uses3 ∧
    APFB03.B03TaskCost (Context := Unit) (D := fun _ => Dist3) (P := fun _ => Proto3)
      (R := fun _ => Bool) (Record := fun _ => Bool) wholeRes3 calib3 maint3 suff3 uses3 ∧
    APFB04.B04FiniteCapacity (Context := Unit) (fun _ => (2 : ℝ)) ∧
    APFB05.MarginalFloor (Context := Unit) (D := fun _ => Dist3) (P := fun _ => Proto3)
      (R := fun _ => Bool) (Record := fun _ => Bool) wholeRes3 calib3 maint3 suff3 uses3
      (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 3)
        (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 2) (fun _ _ => (1 : ℝ))
      (fun _ => APFB01.physicalClass Cont 2) ∧
    APFB07b.BWUniqueMinimum (Interface := Unit)
      (Configuration := fun _ => APFB01.PhysicalState Cont)
      (fun _ s => s = APFB01.physicalClass Cont 2) (fun _ _ => (1 : ℝ))

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

end APFPaper5.Worlds
Source
Definitions/Def_APFPaper5_Worlds_ThreeObjects.lean; Sib v52 / pullbacks v6; SHA-256 a5c269335b2c00e92fb072b007813d3f831c2e8c8348f3d9503f58dcdc8655b2. 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_ThreeObjects.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