Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Records kept by a word's fragments

Definition
APFPaper1_KeptByFragments

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

apfapf-referenceusb-v58-batch-a-2026-11

A supplied finite record assignment to typed fragments is accumulated by finite union. This defines a word ledger; compositional physical recording and record release are not derived.

Supplied data and hypotheses

  • Every formal parameter and hypothesis remains exposed. Historical model encodings and named conditions are not adopted as current physical inputs.

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.

Definition code
/-
APF Foundation Ledger — definition node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-16; not
 gated, not reviewed, not released, not bundled, not built in the ledger repo, not built on the build
 machine)
name: APFPaper1_KeptByFragments
title: What a word keeps when records are kept fragment by fragment: the records its fragments keep, and nothing else
inputs_revision: 2026-11-20.2
restated: 2026-11-21 09:49 HST, for bundle v57, at the author's word of 09:43 HST, "yes", to this seat's question
 "Shall I build v57 as set out, yes or no?"
 (RULING_build_v57_with_the_headers_restated_to_2026-11-20.2_and_stage_the_run_2026-11-21; set out in
 TEE_UP_the_build_run_before_the_upload_bundle_v57_with_headers_restated_to_the_revision_in_force_2026-11-21).
 HEADER ONLY. Every line after this comment is the file as in bundle v56 (sha256
 c8c330eff260c2ef93567a9371e5b4478528aed210ebfcd3b93cfd325e9a381e), kept in Old/ as
 Def_APFPaper1_KeptByFragments_pre-restating_v57_2026-11-21.lean. No declaration is changed. THE RESTATED
 BYTES ARE NOT RELEASED.
 Changed in this header: the revision named on the inputs_revision line, which was 2026-11-14.1, and this
 entry. Nothing else.
 WHAT HAPPENED: since revision 2026-11-14.1, which this header named until now, five revisions of
 FOUNDATION_INPUTS were installed. Revision 2026-11-17.2, installed 2026-11-17 at 06:12 HST (sha256
 21e889b3b56b78cc571392fb652da60d22d81cbc79c7185ea6fed0f866fca65a;
 INSTALL_RECEIPT_FOUNDATION_INPUTS_2026-11-17): seven sentences were added to the end of B06's wording: the
 six quoted below as replaced at revision 2026-11-20.2, then "A process that keeps no record costs nothing."
 A reading of B02's first sentence and a guard on the declared Lean form of B07b were recorded. There is no
 installed revision 2026-11-16.1. Revision 2026-11-17.4, installed 2026-11-17 at 19:11 HST (sha256
 641cb7725112dc24168d4b5342e8ab94feb8f7cb8803ded1fbb8ac1daf6316c8;
 INSTALL_RECEIPT_FOUNDATION_INPUTS_2026-11-17.4_2026-11-17): two sentences were added to the end of B06: "A
 process that keeps no record changes nothing that is recorded. Every record a protocol keeps is the record
 of some tested distinction or family of tested distinctions, and is used for it." There is no installed
 revision 2026-11-17.3. Revision 2026-11-18.2, installed 2026-11-18 at 18:22 HST (sha256
 290a59cad5591706d9b929fc98dde9f1b1215b4e40dc3d8eff790e8c59090cf0;
 INSTALL_RECEIPT_FOUNDATION_INPUTS_2026-11-18.2_2026-11-18): the reading of B02's first sentence
 (reading_20261114_list_complete) is scoped to what is recorded. It now reads: "The distinctions of a
 context are complete for what is recorded: potential states that every distinction of the context reads
 alike are recorded alike. They may differ in what they hold unrecorded. Then what can follow them tells
 them apart, and no side does." It is a reading and not a commitment; B02's two sentences are unchanged.
 Revision 2026-11-18.3, installed 2026-11-18 at 19:50 HST (sha256
 95815d3a9ef01dd631bd52729a66a79531ff4590ed44d451be5882af20cc35b2;
 INSTALL_RECEIPT_FOUNDATION_INPUTS_2026-11-18.3_and_GATE_POLICY_2026-11-18.inputs.2_2026-11-18): one block
 was added that records where 13 cited files now resolve. No wording of a commitment changed. Revision
 2026-11-20.2, installed 2026-11-20 at 12:36 HST (sha256
 05c831bf6e786f168d9a9f0bb366b496388bd049960e9df3ca0acad8680d6252;
 INSTALL_RECEIPT_FOUNDATION_INPUTS_2026-11-20.2_2026-11-20): B06 is reduced. After its first four sentences,
 which are unchanged, it now reads: "To draw a distinction is to keep its record: each distinction has one
 record, the same in every protocol, and a protocol draws the distinction exactly when it keeps that record.
 Every record a protocol keeps is the record of some tested distinction or family of tested distinctions,
 and is used for it. Every process pays epsilon for each record it keeps, and nothing else, where epsilon is
 positive and fixed by the context. In every context some protocol draws no distinction. The occupant draws
 exactly its family, and every part of that family is drawn alone by some protocol. A process that keeps no
 record costs nothing. A process that keeps no record changes nothing that is recorded." Against revision
 2026-11-18.3, six sentences are replaced by four and three are kept word for word. The six that are no
 longer sentences of the inputs: "Each record carries a cost. What a set of records is sufficient for does
 not depend on the protocol that keeps it. The occupant holds its distinctions with exactly the records they
 need, and its bill is the cost of those records. The same is true of every part of it: any family of its
 distinctions is held with exactly the records that family needs, at exactly their cost, and there is no
 cheaper way to hold that family. Epsilon is the unit of the occupant: each record it keeps costs epsilon,
 the floor of its context. Holding nothing costs nothing." B03 and B05 are retired as inputs and are kept in
 the inputs file as derived statements. B07a and B07b each gain a note, note_20261120_protocol_binding;
 their wording, scope and forms are unchanged. B01, B02 and B04 are unchanged. The commitments are six: B01,
 B02, B04, B06, B07a, B07b. The gate policy on the build machine is policy_revision 2026-11-20.inputs.1
 (sha256 5e9f3ec3cfa6c9a0a0b28549d13370c31ef78de38272ac6391efeac472f9a4aa) and requires this revision
 (INSTALL_RECEIPT_GATE_POLICY_2026-11-20.inputs.1_2026-11-20).
 HOW TO READ THE REST OF THIS HEADER: it named revision 2026-11-14.1 and is left as written, any earlier
 entries "restated" below included. Where it names revision 2026-11-14.1 or an earlier one as the revision
 in force, that is no longer so: the revision in force is 2026-11-20.2. Where it counts eight commitments,
 eight inputs or eight declared forms: there are now six commitments. The declared forms of B03 and B05 are
 unchanged and are now forms of derived statements. Where it calls B03 or B05 an input, or takes the
 declared form of either as a hypothesis: the installed file says of B03, and in the same words of B05, "A
 dependency on B03 is a dependency on its declared form, which is unchanged. From revision 2026-11-20.2 that
 form is a derived statement and not an input. The derivation is a draft and is not certified: until it is
 admitted through the gate, a node that consumes B03 is conditional on it. Resolve it before foundation
 certification. Do not treat an old use of B03 as a use of B06." Where it speaks of B06 by a count of its
 sentences or by their numbers, of the occupant statement, of the amended B06, or of a sentence of B06 as an
 input: that is B06 as it stood at the revision the header then named, and B06 now reads as quoted above. A
 statement here that takes one of the six replaced sentences as a premise stays true as a conditional;
 whether it follows from the reduced B06 is NOT SAID by this entry (for what used them see
 MEMO_pullbacks_passes119_and_120_what_used_the_dropped_sentences_and_one_world_for_all_eleven_2026-11-18 in
 Notes). Where it says of a sentence that is in B06 as quoted above that it is proposed, a ruling carried as
 a named hypothesis, NOT RULED, not installed or not an input: that is no longer so, for that sentence as
 worded above and for no typing of it. Where it takes the reading of B02's first sentence as first recorded
 (the distinctions of a context are complete: potential states that every distinction reads alike have the
 same continuation profile; the physical objects of a context correspond one to one with the combinations of
 sides of its distinctions) as a reading of the inputs: from revision 2026-11-18.2 the inputs do not assert
 it. A statement that takes it as a premise stays true as a conditional. A supplied world in which it holds
 is not excluded: the scoped reading adds no constraint. THE NEW SENTENCES OF B06 HAVE NO CERTIFIED LEAN
 FORM: the forms the inputs file names for the reduced B06 are drafts of the two seats, marked
 PROPOSED_NOT_CERTIFIED, and the Lean that derives the declared forms of B03 and B05 is a draft and is not
 gated. NOTHING in this entry says that a theorem of this file follows from the inputs at revision
 2026-11-20.2, or that a supplied world of this file is a world of them: each theorem stands as before, on
 its named hypotheses or on its supplied world, and a supplied world that breaks a sentence of the inputs at
 revision 2026-11-20.2 is not a world of the inputs at that revision, whatever this header says of an
 earlier one. The gate policy says of the move to this revision: "immutable; dependency compatibility must
 be established separately; no stale-basis waiver". This entry establishes no such compatibility. Proposed
 revision 2026-11-20.3 (one further note on each of B07a and B07b) is NOT installed.
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
ruling: the author, 2026-11-16 19:45 HST, "Yes", to "Is 'a word keeps what its fragments keep, and nothing
 else' what you mean by a record being kept?"
 (RULING_a_word_keeps_what_its_fragments_keep_and_nothing_else_2026-11-16). Before it, 19:34 HST: "Those
 facts are all derivable", of the three supplied facts under the group of holds.
source: the builder seat's Def_APFPaper1_ContinuationWords (Word, WordFrom, nullWord). This seat's
 Thm_APFPaper1_Cont_prefix_from_sum_and_keep and Thm_APFPaper1_Cont_identity_from_sum (the record
 sentences SUM, KEEP, AFTER and EMPTY, each said there of a SUPPLIED rule for what a word keeps);
 Thm_APFB06_moving_world and Thm_APFB06_shared_world, whose own rule is this one ("what a word keeps: the
 records its fragments keep"). Paper 1 Supplement v9.28:2889-2891 (the empty family is realized by the
 empty protocol at zero cost).
standing: A DEFINITION, by the author's ruling of 19:45 HST. This file was first typed at 19:39 HST as this
 seat's own, not ruled; that copy is kept as Old/Def_APFPaper1_KeptByFragments_pre-reheading_2026-11-16.lean.
 The code is unchanged. The definition says more than the record sentences KEEP and AFTER: those say a
 word keeps at least what its parts keep, and this says it keeps nothing else. What each fragment keeps
 (keptFrag) stays SUPPLIED. Not an input: FOUNDATION_INPUTS is unchanged.
definitions:
 - keptByFragments: given what each fragment keeps, a word keeps the union of what its fragments keep. The
   empty word has no fragment and keeps nothing.
 - keepsFW: the same as a rule on words from a context, in the form Def_APFPaper5_K2_HoldWord takes.
not claimed: that records are kept fragment by fragment in the physical continuation class. No lane. No
 claim that the transfer is forced, that the carrier gap is closed or narrowed, or that Born is derived.
no structure, no class, no Prop-valued field.
-/
import Definitions.Def_APFPaper1_ContinuationWords
import Mathlib.Data.Finset.Union

set_option autoImplicit false
namespace APFPaper1.Continuation

universe uC uF uK
variable {Context : Type uC} {Frag : Context → Context → Type uF}

/-- What a word keeps when each fragment keeps its own records: the union, over the fragments of the word,
of what they keep. `keptFrag g h k f` is what the fragment `f` from `h` to `k` keeps, as records of the
context `g` whose ledger is being read. -/
def keptByFragments {Rec : Context → Type uK} [∀ g, DecidableEq (Rec g)]
    (keptFrag : (g h k : Context) → Frag h k → Finset (Rec g)) (g : Context) :
    {h k : Context} → Word Frag h k → Finset (Rec g)
  | _, _, Word.nil _ => ∅
  | _, _, Word.cons (g := h) (h := m) f w => keptFrag g h m f ∪ keptByFragments keptFrag g w

/-- The same, as a rule on the words from a context. -/
def keepsFW {Rec : Context → Type uK} [∀ g, DecidableEq (Rec g)]
    (keptFrag : (g h k : Context) → Frag h k → Finset (Rec g)) :
    (g : Context) → WordFrom Frag g → Rec g → Prop :=
  fun g w r => r ∈ keptByFragments keptFrag g w.2

end APFPaper1.Continuation
Source
Definitions.Def_APFPaper1_KeptByFragments; USB pullbacks v58 batch A, SHA-256 c722c322afad90c462f7d86a56ac824d4323d02e00210a7f3bff7e7b5306dce5. Definitions.Def_APFPaper1_KeptByFragments; USB pullbacks v58 batch A; SHA-256 c722c322afad90c462f7d86a56ac824d4323d02e00210a7f3bff7e7b5306dce5

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