Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A qualified composite retains the same occurrence in its ledger and history action

Proved
APFC2SameOccurrence.ledger_action_assembly

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

apfnative-ledger-historyqualified-composition

Statement

Work in the unchanged original process, occurrence and whole-resource system. Assume its existing output interpretation and coverage, qualified-composition clauses and original history meanings.

Take two actual process occurrences with matching boundaries, the prescribed recovery and qualification, and a complete accounted composite procedure rrr. Its whole calibrated resource load must fit the original context capacity. These are the given qualified-chain assumptions; the result does not construct a new physical example.

There is an output occurrence ρr:x→rv\rho_r:x\xrightarrow{r}vρr​:xr​v of that composite, with the original output-relation conclusion and the correctly transported physical output class. Set h=letter⁡(r)h=\operatorname{letter}(r)h=letter(r) and t=wholeBill⁡(r)t=\operatorname{wholeBill}(r)t=wholeBill(r). One joint certificate establishes

e.occurrence⁡=ρr,B(h,t),Step⁡(s0,h,s1),qGraph⁡([h],t).e.\operatorname{occurrence}=\rho_r,\qquad B(h,t),\qquad \operatorname{Step}(s_0,h,s_1),\qquad \operatorname{qGraph}([h],t).e.occurrence=ρr​,B(h,t),Step(s0​,h,s1​),qGraph([h],t).

Here eee is the literal ledger witness built from that returned occurrence; BBB is the original partial ledger graph; s0,s1s_0,s_1s0​,s1​ are the empty and one-letter realized history states; and [h][h][h] is the supported history class supplied by this particular step. The same certificate retains the original account annotation, its view and budget facts, and the complete procedure's resource and ledger coordinates.

The physical occurrence certificate is kept alongside the quotient. The quotient alone need not recover it.

Scope

The result applies to the given original qualified chain. It does not identify the expanded two-stage instruction sequence with the complete process's history action, add stage bills, identify physical output states with history residuals, or supply a new interaction, profile change, quantum dynamics or completed physical transport.

Evidence

  • Papers: original qualified composition, continuation and whole-resource meanings from Paper 1.
  • Codebank: existing source-bound output, original-history and native-ledger components.
  • Machine checking: independent review passed four fresh Lean checks, including the exact theorem, standalone proof and their type agreement, using 43 verified cached predecessor objects. This was not a fresh rebuild of every predecessor. The current P2M proof status is shown separately on this theorem page.
  • Foundation connection: independent review accepted the exact formal statement, its original-source meaning and the complete 66-node premise account. This specific implication is eligible for the private Master Ledger under its stated qualified-chain assumptions; no new physical instance is asserted.
Preamble
import Theorems.Thm_APFSourceBoundOutput_qualified_two_step_composite
import Theorems.Thm_APFNativeLedgerHistory_history_assembly

set_option autoImplicit false
open APFTypedHistory APFHistorySource APFTF1 APFOriginalProcess APFOriginalSource
open APFUpstreamOccupant APFPaper1.Foundation APFOriginalFinitePossibilities APFOriginalAdmission
open APFOriginalC2 APFOutputRelation
variable {Γ : Type*} {Raw FullProcess Resource : Γ → Type*}
variable [∀ γ, AddCommMonoid (Resource γ)] [∀ γ, Preorder (Resource γ)]
variable {T : OriginalTyping Γ FullProcess} {P : ∀ γ, Set (FullProcess γ)}
variable {A : ∀ γ, Account (R := Resource γ) (P γ)}

/-- Exact accepted A: one returned original C2 occurrence is retained in the
literal ledger witness, its graph, the initial history step and its supported
quotient representative. The original qualified-chain domain is unchanged. -/
Formal statement
theorem APFC2SameOccurrence.ledger_action_assembly
    (U : UseSource (Raw := Raw) T P A)
    (S : APFOriginalResultBinding.ContextFacts U)
    (K : APFOriginalResultBinding.PossibleResultCoverage U S)
    (C : OriginalC2Presentation U)
    (laws : APFOriginalC2Binding.OriginalQualifiedC2Clauses U C)
    (H : APFIdentityHistoryBinding.OriginalSource U)
    {γ : Γ} (p : FullProcess γ) (q : FullProcess ((T γ).outputContext p))
    (r : ProtocolView (P γ)) (s : C.Procedure p q r)
    (a : PhysicalState (Profile U γ))
    (b : PhysicalState (Profile U ((T γ).outputContext p)))
    (c : PhysicalState (Profile U ((T ((T γ).outputContext p)).outputContext q)))
    (x : Raw γ) (y : Raw ((T γ).outputContext p))
    (z : Raw ((T ((T γ).outputContext p)).outputContext q))
    (ρp : U.occurrence γ p x y)
    (ρq : U.occurrence ((T γ).outputContext p) q y z) (rec : C.Recovery s)
    (hx : physicalClass (Profile U γ) x = a)
    (hy : physicalClass (Profile U ((T γ).outputContext p)) y = b)
    (hz : physicalClass (Profile U ((T ((T γ).outputContext p)).outputContext q)) z = c)
    (hqual : C.Qualification s rec ρp ρq)
    (hload : (A γ).calibration ((A γ).wholeResource r) ≤ (A γ).capacity) :
    let M := H.toHistoryMeaning
    let h := letter (T := T) r.val
    let t := APFResourceIdentity.wholeBill (A := A) r
    let L := language U M x
    let B := APFNativeLedgerHistory.graph U M x
    outputRelation U r.val a (castState U (C.output_context s).symm c) ∧
    ∃ (v : Raw ((T γ).outputContext r.val)) (ρr : U.occurrence γ r.val x v),
      physicalClass (Profile U ((T γ).outputContext r.val)) v =
        castState U (C.output_context s).symm c ∧
      (U.admissionOf ρr).view = U.account ρr ∧
      BudgetContent (A γ) (U.account ρr) ∧
      (let e : APFNativeLedgerHistory.Witness U M x h :=
        { protocol := r
          denotation := (M.single r.val r.val).mpr rfl
          boundary := v
          occurrence := ρr
          bound := hload }
       e.protocol = r ∧ e.boundary = v ∧ e.occurrence = ρr ∧
       APFNativeLedgerHistory.fullOccurrence e =
         (⟨x, v, ρr⟩ : APFResourceIdentity.FullOccurrence U r) ∧
       APFResourceIdentity.subject (APFNativeLedgerHistory.fullOccurrence e) = r ∧
       APFResourceIdentity.resourceCoordinate (APFNativeLedgerHistory.fullOccurrence e) =
         (A γ).wholeResource r ∧
       APFResourceIdentity.ledgerCoordinate (APFNativeLedgerHistory.fullOccurrence e) = t ∧
       APFNativeLedgerHistory.annotation e = U.account ρr ∧
       (U.admissionOf ρr).view = APFNativeLedgerHistory.annotation e ∧
       BudgetContent (A γ) (APFNativeLedgerHistory.annotation e) ∧
       B ((T γ).outputContext r.val) h t ∧
       ∃ (he : L γ (.nil γ)) (hh : L ((T γ).outputContext r.val) h)
         (step : APFObservedHistory.Step
           (APFObservedHistory.stateOf L B (.nil γ) he) h
           (APFObservedHistory.stateOf L B h hh)),
         let hs : APFObservedProcess.Supported L B h :=
           ⟨APFObservedHistory.stateOf L B (.nil γ) he,
            APFObservedHistory.stateOf L B h hh, step⟩
         let u : APFObservedProcess.SupportedWord L B γ ((T γ).outputContext r.val) := ⟨h, hs⟩
         let Qh := APFObservedProcess.classOf u
         APFObservedProcess.qGraph Qh t) := by
  sorry
Source
APF Paper 1 Supplement v9.27; independently accepted exact same-occurrence C2/ledger/history assembly on unchanged basis2026-09-14.1. Independent formal/source and recursive-premise review passed; Current P2M proof status is displayed separately on the theorem page.
Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by FiniteUniverse · Nov 18, 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