Model vocabulary — A supplied record world with a quarter-turn hold
DefinitionAPFB06_moving_world_VocabularyData, predicates and immediate constructor helpers for this reviewed model. Its substantive results are published as separate proved theorem nodes.
Adds a record-free quarter turn to the stationary construction and verifies the encoded forms, separate r2 clause, bookkeeping and hold-map results. Every total runAll map is a signed permutation agreeing with execution wherever a word runs. All states, fragments, costs, capacities, protocol membership, actual alignments and singleton admissible sets for A2/BW are supplied data. Satisfaction of declared forms on them certifies no original physical instance. B02 r2 is handled as the current finite-combination clause; r3 is not installed. Total runAll coverage does not imply coverage of a word restricted to its running domain. The hold itself runs everywhere. No occupant history, A2 protocol binding or growing-region continuity is checked.
Supplied data and hypotheses
- All states, fragments, costs, capacities, protocol membership, actual alignments and singleton admissible sets for A2/BW are supplied data. Satisfaction of declared forms on them certifies no original physical instance. B02 r2 is handled as the current finite-combination clause; r3 is not installed. Total runAll coverage does not imply coverage of a word restricted to its running domain. The hold itself runs everywhere. No occupant history, A2 protocol binding or growing-region continuity is checked.
Limits
This is conditional reference mathematics. The supplied model and its hypotheses are not adopted Foundation inputs, and this node does not establish K1, K3 or K4 closure.
/-
APF Foundation Ledger — theorem node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-14; not
gated, not reviewed, not released, not built in the ledger repo)
name: APFB06_moving_world
title: One supplied world in which a hold moves every state, and which still meets the eight declared forms, B02 with its second sentence, the joint class, the held-relation reading, the four record sentences and the two hold readings
inputs_revision: 2026-11-14.1 (the eight declared forms as encoded, with B02 also in the builder seat's
proposed form Def_APF_B02_DeclaredInput_r2_proposed)
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: as for Thm_APFB06_readings_world, of which this is the moving version. The hold readings: the
author, 2026-11-14 11:33 HST (RULING_hold_readings_2026-11-14, seat 01WrrBvu); Def_APFB02_HoldOnDistinctions
(seat 01WrrBvu, bundle v58). The quarter turn of one pair is the builder seat's object for "something
moves, one opposition at a time, not back in two steps" (NOTE_derivation_pass_43_2026-11-14). The author,
2026-11-14 15:43 HST: "Proceed", on this seat's proposal to build the moving hold. No paper or codebank
file was reopened: the pass adds no physical statement.
consumes_inputs: none as hypotheses. Declared forms and readings are PROVED of supplied data, which
certifies nothing about the physical inputs.
the world (APFB06.MovingWorld): the readings world with one more fragment, the hold. One context. Four raw
states, one for each combination of sides of two distinctions dA and dR. Two records, ra and rr. Three
fragments: one that keeps ra, one that keeps rr, and the hold. A record fragment runs where its distinction
is held true and leaves the state. The hold runs everywhere, keeps no record of its own, and takes the
state (a, r) to (r, not a): dA comes to read what dR read, and dR what dA read, turned over. A word keeps
the records its fragments keep; its bill is the number of records kept; capacity 2; floor 1. Every word is
a protocol. The occupant sits where both distinctions are held true and carries both.
statement: everything proved of the readings world (eight_hold, meets_B02_r2, alignments_hold_relation,
sum_holds, keep_holds, after_holds, capacity_holds, empty_keeps_nothing, available, cost_eq_card,
cost_subadditive, prefix_restriction_holds, identity_holds, subword_heredity_holds), and:
(hold_acts, hold_admitted) the hold is a continuation from every state and takes it to its quarter turn;
(turn_ne) it moves every state; (turn_one_opposition) it changes the side of exactly one distinction;
(turn_turn_ne) two holds do not bring a state back; (hold_erases_no_record) it erases no record;
(word_acts, nothing_drawn, still_held_after, every_word_meets_the_hold_readings) every word that runs
induces a map on states that draws nothing and after which every combination of sides is still held.
reading: the adopted readings are consistent with something moving. The readings world met the hold
readings only because nothing moved in it; here a hold moves every state and they still hold.
not_claimed: that the readings are true or follow from the declared forms; that the hold is free in a
physical context (here it bills nothing because it keeps no record of its own); which words are holds;
that a hold of the builder seat's count route is admitted at an interface with more than two distinctions.
Families still do not overlap in the records they need. The occupant's alignment is one actual alignment
and is not followed along the hold. A2's protocol binding and the continuity clause are not checked here.
-/
import Definitions.Def_APFPaper5_Worlds_TwoObjects
import Definitions.Def_APFB06_ExtensionalJoint
import Definitions.Def_APFB06_AlignmentHoldsRelation
import Definitions.Def_APF_B02_DeclaredInput_r2_proposed
import Definitions.Def_APFB02_HoldOnDistinctions
import Definitions.Def_APF_B04_DeclaredInput
import Definitions.Def_APF_B07a_DeclaredInput
import Definitions.Def_APF_B07b_DeclaredInput
import Theorems.Thm_APFPaper1_Source_needed_subset_kept
import Theorems.Thm_APFPaper1_Source_card_needed_le_bill
import Theorems.Thm_APFPaper1_Source_card_needed_le_familyCost
import Theorems.Thm_APFPaper1_Source_familyCost_eq_card_of_available
import Theorems.Thm_APFPaper1_Source_join_of_available
import Theorems.Thm_APFPaper1_Continuation_prefixMonotone_of_sum_and_keep
import Theorems.Thm_APFPaper1_Continuation_cont_prefix_of_sum_and_keep
import Theorems.Thm_APFPaper1_Continuation_cont_iff_contHereditary_of_sum_and_keep
import Theorems.Thm_APFPaper1_Continuation_subwordHeredity_of_subword_bill
import Theorems.Thm_APFPaper1_Continuation_subwordHeredity_of_sum_and_keeps
import Theorems.Thm_APFPaper1_Continuation_bill_nullWord_of_sum
import Theorems.Thm_APFPaper1_Continuation_cont_identity_of_sum
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.NormNum
set_option autoImplicit false
open APFPaper1.Continuation
namespace APFB06.MovingWorld
/-- The records. -/
inductive Rc
| ra | rr
deriving DecidableEq
instance : Fintype Rc := ⟨{Rc.ra, Rc.rr}, fun r => by cases r <;> decide⟩
/-- The fragments: `some r` keeps the record r; `none` is the hold. -/
abbrev Frag : Unit → Unit → Type := fun _ _ => Option Rc
/-- Raw states: the side of dA, then the side of dR. -/
abbrev St : Type := Bool × Bool
abbrev Raw : Unit → Type := fun _ => St
abbrev Res : Unit → Type := fun _ => Finset Rc
/-- The quarter turn of the pair: dA comes to read what dR read, and dR what dA read, turned over. -/
def turn : St → St := fun x => (x.2, !x.1)
/-- Where a fragment can run: a record is kept where its distinction is held true; the hold runs
everywhere. -/
def runs : Option Rc → St → Prop
| some .ra, x => x.1 = true
| some .rr, x => x.2 = true
| none, _ => True
/-- What a fragment does to the state: keeping a record leaves it; the hold turns it. -/
def act : Option Rc → St → St
| some _, x => x
| none, x => turn x
def step : (g h : Unit) → Frag g h → Raw g → Raw h → Prop := fun _ _ f x y => runs f x ∧ y = act f x
/-- The fragments of a word, in execution order. -/
def labels : {g h : Unit} → Word Frag g h → List (Option Rc)
| _, _, Word.nil _ => []
| _, _, Word.cons f w => f :: labels w
/-- What a word keeps: the records its fragments keep. The hold keeps none of its own. -/
def kept (g : Unit) (w : WordFrom Frag g) : Finset Rc :=
Finset.univ.filter (fun r => some r ∈ labels w.2)
theorem card_kept_le (g : Unit) (w : WordFrom Frag g) : (kept g w).card ≤ 2 :=
le_trans (Finset.card_le_card (Finset.filter_subset _ _)) (by decide)
def resource : (g : Unit) → WordFrom Frag g → Res g := fun g w => kept g w
def calibration : (g : Unit) → Res g → NNReal := fun _ s => ((s.card : ℕ) : NNReal)
def C : Unit → NNReal := fun _ => 2
/-- Each record costs 1. -/
def recCost : Rc → NNReal := fun _ => 1
abbrev K : (g : Unit) → Raw g → WordFrom Frag g → Prop := Cont step resource calibration C
/-- Every word is within budget: there are only two records. -/
theorem in_budget (g : Unit) (w : WordFrom Frag g) : calibration g (resource g w) ≤ C g := by
show (((kept g w).card : ℕ) : NNReal) ≤ 2
have h := card_kept_le g w
exact_mod_cast h
/-! ### Words from lists of fragments -/
def wordOf : (g : Unit) → List (Option Rc) → Word Frag g g
| g, [] => Word.nil g
| g, f :: l => Word.cons (g := g) (h := g) (k := g) f (wordOf g l)
/-- The word with the listed fragments, in that order. -/
def wd (g : Unit) (l : List (Option Rc)) : WordFrom Frag g := ⟨g, wordOf g l⟩
theorem wA_in_iff (x : St) : K () x (wd () [some Rc.ra]) ↔ x.1 = true := by
constructor
· rintro ⟨⟨_, _, ⟨hr, _⟩, _⟩, _⟩
exact hr
· intro h
exact ⟨⟨x, x, ⟨h, rfl⟩, rfl⟩, in_budget _ _⟩
theorem wR_in_iff (x : St) : K () x (wd () [some Rc.rr]) ↔ x.2 = true := by
constructor
· rintro ⟨⟨_, _, ⟨hr, _⟩, _⟩, _⟩
exact hr
· intro h
exact ⟨⟨x, x, ⟨h, rfl⟩, rfl⟩, in_budget _ _⟩
/-- Different raw states have different continuation profiles. -/
theorem profile_inj (x y : St) (h : K () x = K () y) : x = y := by
have h1 : x.1 = true ↔ y.1 = true := by
rw [← wA_in_iff x, ← wA_in_iff y, h]
have h2 : x.2 = true ↔ y.2 = true := by
rw [← wR_in_iff x, ← wR_in_iff y, h]
exact Prod.ext (Bool.eq_iff_iff.mpr h1) (Bool.eq_iff_iff.mpr h2)
/-! ### The distinctions and what they need -/
def dA : St → Bool := fun x => x.1
def dR : St → Bool := fun x => x.2
/-- The distinction domain: dA and dR. -/
abbrev Delta : (g : Unit) → (St → Bool) → Prop := fun _ d => d = dA ∨ d = dR
noncomputable instance instDecEqDomain (g : Unit) : DecidableEq {d : St → Bool // Delta g d} :=
Classical.decEq _
abbrev Dist : Type := {d : St → Bool // Delta () d}
theorem hresp (g : Unit) (d : {d : St → Bool // Delta g d}) (x y : St) (h : K g x = K g y) :
d.val x = d.val y := by
cases g
rw [profile_inj x y h]
def dAd : Dist := ⟨dA, Or.inl rfl⟩
def dRd : Dist := ⟨dR, Or.inr rfl⟩
/-- The record a distinction needs: ra for dA, rr for dR. Read off the state where dA is held true and dR
false. -/
def recOf (d : Dist) : Rc := cond (d.val (true, false)) Rc.ra Rc.rr
/-- The records a distinction needs. -/
def fam (d : Dist) : Finset Rc := {recOf d}
/-! ### Protocols: every word -/
def protocols : (g : Unit) → Set (WordFrom Frag g) := fun _ => Set.univ
abbrev Pr (g : Unit) : Type := {p : WordFrom Frag g // p ∈ protocols g}
def pOf (l : List Rc) : Pr () := ⟨wd () (l.map some), Set.mem_univ _⟩
/-- The protocol keeping both records. -/
def pAR : Pr () := pOf [Rc.ra, Rc.rr]
def keptP (p : Pr ()) : Finset Rc := kept () p.val
def maint (g : Unit) (p : {p : WordFrom Frag g // p ∈ protocols g}) : Set Rc := ↑(kept g p.val)
def suff (g : Unit) (_ : {p : WordFrom Frag g // p ∈ protocols g}) (s : Set Rc)
(d : {d : St → Bool // Delta g d}) : Prop := recOf d ∈ s
def uses (g : Unit) (_ : {p : WordFrom Frag g // p ∈ protocols g})
(_ : {d : St → Bool // Delta g d}) (_ : Set Rc) : Prop := True
def wholeRes (g : Unit) (p : {p : WordFrom Frag g // p ∈ protocols g}) : Res g := resource g p.val
/-! ### The record model, and sentence 4: an exact protocol for every family -/
/-- The family cost of the ledger on this world. -/
noncomputable abbrev fcost (S : Finset Dist) : ℝ :=
APFPaper1.Source.familyCost (wholeRes ()) (calibration ()) (maint ()) (suff ()) (uses ()) S
/-! ### B06 on the physical domain, at the extensional joint class -/
noncomputable def heldD : Finset Dist := {dAd, dRd}
/-- The occupant's alignment: it sits where both are held true and carries dA and dR. -/
noncomputable def alignR : APFB06.OriginalAlignment (K ())
(APFB06.physicalDomain (K ()) (Delta ()) (hresp ())) where
carrier := APFB01.physicalClass (K ()) (true, true)
carried := heldD.map (APFB06.taskEquiv (K ()) (Delta ()) (hresp ())).symm.toEmbedding
active := by
intro t ht
obtain ⟨d, hd, rfl⟩ := Finset.mem_map.mp ht
rcases Finset.mem_insert.mp hd with rfl | hd'
· rfl
· rw [Finset.mem_singleton.mp hd']
rfl
def actualJointR : Set (Sigma fun g =>
APFB06.OriginalAlignment (K g) (APFB06.physicalDomain (K g) (Delta g) (hresp g))) :=
{⟨(), alignR⟩}
/-- The eight declared forms on the supplied data. -/
def EightHold : Prop :=
APF_B01_DeclaredInput (K ())
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x)) ∧
APFB02.B02SourceMeaning (Context := Unit) (X := fun _ => St) (Q := fun g => WordFrom Frag g)
(P := fun g => {p : WordFrom Frag g // p ∈ protocols g}) (Record := fun _ => Rc)
K Delta maint suff uses ∧
APFB03.B03TaskCost (Context := Unit) (D := fun g => {d : St → Bool // Delta g d})
(P := fun g => {p : WordFrom Frag g // p ∈ protocols g}) (R := fun _ => Finset Rc)
(Record := fun _ => Rc) wholeRes calibration maint suff uses ∧
APFB04.B04FiniteCapacity (Context := Unit) (fun g => ((C g : NNReal) : ℝ)) ∧
APFB05.MarginalFloor (Context := Unit) (D := fun g => {d : St → Bool // Delta g d})
(P := fun g => {p : WordFrom Frag g // p ∈ protocols g}) (R := fun _ => Finset Rc)
(Record := fun _ => Rc) wholeRes calibration maint suff uses (fun _ _ => True)
(fun g => ((C g : NNReal) : ℝ)) (fun _ => (1 : ℝ)) ∧
APFB06.AmendedB06_20260914 K
(fun g => APFB06.physicalDomain (K g) (Delta g) (hresp g)) protocols
(fun g => APFB06.extensionalJoint (maint g)
(fun p s t => suff g p s (APFB06.taskEquiv (K g) (Delta g) (hresp g) t))
(fun p t s => uses g p (APFB06.taskEquiv (K g) (Delta g) (hresp g) t) s))
wholeRes calibration C actualJointR ∧
APFB07a.A2Selection (Interface := Unit)
(Configuration := fun _ => APFB01.PhysicalState (K ()))
(fun _ s => s = APFB01.physicalClass (K ()) (true, true)) (fun _ _ => (1 : ℝ))
(fun _ => APFB01.physicalClass (K ()) (true, true)) ∧
APFB07b.BWUniqueMinimum (Interface := Unit)
(Configuration := fun _ => APFB01.PhysicalState (K ()))
(fun _ s => s = APFB01.physicalClass (K ()) (true, true)) (fun _ _ => (1 : ℝ))
/-! ### B02 with its second sentence -/
/-! ### The held-relation reading -/
/-! ### The record sentences, of every word -/
/-! ### What the sentences give here -/
/-! ### The hold: something moves -/
/-- The hold, as a word: the one fragment that keeps no record of its own. -/
def hold : WordFrom Frag () := wd () [none]
/-! ### The two hold readings, of every word -/
/-- What a list of fragments does to the state, in order. -/
def runAll : List (Option Rc) → St → St
| [], x => x
| f :: l, x => runAll l (act f x)
/-- How a distinction reads a state. -/
abbrev reads : Dist → St → Bool := fun d x => d.val x
end APFB06.MovingWorld