Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The same occupied process retains its null and positive ledger contrast

Proved
APFNativeLedgerHistory.same_deployment_anchor

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

apfnative-ledger-history

The same original occupied whole-process witness retains all thirteen provenance clauses and its empty/one-letter history step. That very process has its existing positive whole bill, while the original null has bill zero. Both supply supported enriched actions and quotient observations. The classes are distinct only when endpoint types permit comparison in one hom-set.

Uses the unchanged original U/S/input and independently accepted source meanings.

Evidence: the papers supply the original resource and continuation meanings; existing code supplies the explicit source interfaces; independent Lean checking covers these exact exports; recursive physical-premise closure is accepted for the original-source applications only.

This is the native whole-ledger component of history comparison at the stated source and input. It does not establish all-input or full physical-profile equivalence, universal accounting of composites, observed readout, physical transport completion, or quantum structure.

Preamble
import Theorems.Thm_APFNativeLedgerHistory_history_assembly
import Theorems.Thm_APFSourceBoundHistory_same_deployment_anchor
import Theorems.Thm_APFOriginalProcess_positive_nonnull_enforcement
set_option autoImplicit false
open APFTypedHistory APFHistorySource APFTF1 APFOriginalProcess APFOriginalSource
open APFUpstreamOccupant APFPaper1.Foundation APFOriginalFinitePossibilities APFOriginalAdmission
variable {Γ : Type*} {Raw FullProcess Resource : Γ → Type*}
variable [∀ γ, AddCommMonoid (Resource γ)] [∀ γ, Preorder (Resource γ)]
variable {T : OriginalTyping Γ FullProcess} {P : ∀ γ, Set (FullProcess γ)}
variable {A : ∀ γ, Account (R := Resource γ) (P γ)}
open APFQualifiedOccupancy APFOriginalPhysical
namespace APFNativeLedgerHistory
theorem cast_graph (U : UseSource (Raw := Raw) T P A) (M : OriginalMeaning T P A)
    {γ δ θ : Γ} (x : Raw γ) (h : Word T γ δ) (e : δ=θ) (t : ℝ)
    (ht : graph U M x δ h t) : graph U M x θ (cast (congrArg (Word T γ) e) h) t := by
  subst θ;exact ht

theorem anchor_ledger (U : UseSource (Raw := Raw) T P A)
    (S : APFIdentityHistoryBinding.OriginalSource U) {γ : Γ} (x : Raw γ) (p : ProtocolView (P γ))
    (hpos : 0 < APFResourceIdentity.wholeBill (A:=A) p) (hnon : p ≠ (A γ).nullProtocol)
    (hgp : graph U S.toHistoryMeaning x ((T γ).outputContext p.val) (letter p.val)
      (APFResourceIdentity.wholeBill (A:=A) p)) : AnchorLedgerFacts U S x p := by
  let L := language U S.toHistoryMeaning x
  let B := graph U S.toHistoryMeaning x
  have hc : PrefixClosed L := (APFSourceBoundHistory.source_bridge U S x).2.2.2
  have hcompat : APFObservedHistory.Compatible L B := graph_admitted U S.toHistoryMeaning x
  have hnull : APFResourceIdentity.wholeBill (A:=A) (A γ).nullProtocol = 0 := by
    simp only [APFResourceIdentity.wholeBill,(A γ).null_bill,NNReal.coe_zero]
  have hgn : B γ (.nil γ) 0 := by
    apply (graph_exact U S.toHistoryMeaning x (.nil γ) 0).mpr
    refine ⟨(A γ).nullProtocol,(S.toHistoryMeaning.empty γ _).mpr rfl,S.toHistoryC1C3.c1 γ x,?_,hnull.symm⟩
    change APFResourceIdentity.wholeBill (A:=A) (A γ).nullProtocol ≤ ((A γ).capacity : ℝ)
    rw [hnull]; exact (A γ).capacity.property
  have supported : ∀ δ (h : Word T γ δ) t, B δ h t → APFObservedProcess.Supported L B h := by
    intro δ h t ht
    apply (APFObservedProcess.supported_iff hc h).mpr
    exact ⟨.nil γ,hcompat δ h t ht⟩
  have graphclass : ∀ δ (h : Word T γ δ) (hs : APFObservedProcess.Supported L B h) t,
      B δ h t → APFObservedProcess.qGraph (APFObservedProcess.classOf ⟨h,hs⟩) t := by
    intro δ h hs t ht
    change B δ (Path.append h (.nil δ)) t
    simpa only [Path.append_nil] using ht
  refine ⟨hpos,hnon,hgn,hgp,?_,supported γ (.nil γ) 0 hgn,
    supported _ (letter p.val) _ hgp,fun hn => graphclass γ (.nil γ) hn 0 hgn,
    fun hp => graphclass _ (letter p.val) hp _ hgp,?_⟩
  · intro he hp;exact ⟨hp,rfl⟩
  · intro e
    have hcast : B γ (endWord p.val e) (APFResourceIdentity.wholeBill (A:=A) p) :=
      cast_graph U S.toHistoryMeaning x (letter p.val) e _ hgp
    let hp := supported γ (endWord p.val e) _ hcast
    have hq := graphclass γ (endWord p.val e) hp _ hcast
    refine ⟨hp,hq,?_⟩
    intro hn heq
    have hzero := graphclass γ (.nil γ) hn 0 hgn
    rw [heq] at hq
    have hu := (history_assembly U S x).2.2.2.2.2 γ (APFObservedProcess.classOf ⟨.nil γ,hn⟩)
      (APFResourceIdentity.wholeBill (A:=A) p) 0 hq hzero
    exact (ne_of_gt hpos) hu
end APFNativeLedgerHistory
Formal statement
theorem APFNativeLedgerHistory.same_deployment_anchor {Support : Γ → Type*}
    (R : APFSameDeployment.Primary (Raw := Raw) (Support := Support) T P A)
    (S : APFIdentityHistoryBinding.OriginalSource R.physical)
    (hB03 : ∀ δ,B03TaskCost (R.distinctions δ) (toSourceData (A δ) (R.K δ)))
    (actualJoint : Set (Σ γ, OriginalAlignment (Profile R.physical γ) (R.distinctions γ)))
    (h : R.OriginalOperationalOccupancy actualJoint) :
    ∃ (γ : Γ) (o : OriginalAlignment (Profile R.physical γ) (R.distinctions γ))
      (p : ProtocolView (P γ)) (d : Task R.physical R.distinctions γ)
      (σ : Set (Support γ)) (w : Deployment R.physical ⟨γ,p,d⟩ (R.phi ⟨γ,p,d⟩) σ),
      (⟨γ,o⟩ : Σ δ, OriginalAlignment (Profile R.physical δ) (R.distinctions δ)) ∈ actualJoint ∧
      o.carried.Nonempty ∧ d ∈ o.carried ∧
      originalCost (toOriginalData (A γ) (R.K γ)) o.carried ≤ ((A γ).capacity : ENNReal) ∧
      p ∈ (R.K γ).jointClass o.carried ∧
      σ ⊆ (R.K γ).maintained p ∧ (R.K γ).sufficient p σ d ∧
      (R.K γ).usesToRealize p d σ ∧
      (R.physical.admissionOf w.use.val).view = AccountView.originalWhole p.property ∧
      OriginalWholeAdmission_20260914 (fun δ => Profile R.physical δ) R.distinctions P
        (fun δ => toOriginalData (A δ) (R.K δ)) (fun δ => (A δ).capacity) γ p w.input ∧
      p.val ∈ Profile R.physical γ w.input ∧
      (A γ).calibration ((A γ).wholeResource p) ≤ (A γ).capacity ∧
      IsOriginalResult T (fullUse T P A R.physical.judgment) p.val w.input
        (physicalClass (Profile R.physical ((T γ).outputContext p.val)) w.boundary) ∧
      ∃ (he : language R.physical S.toHistoryMeaning w.input γ (.nil γ))
        (hp : language R.physical S.toHistoryMeaning w.input ((T γ).outputContext p.val) (letter p.val)),
        Step (stateOf (language R.physical S.toHistoryMeaning w.input) (.nil γ) he)
          (letter p.val) (stateOf (language R.physical S.toHistoryMeaning w.input) (letter p.val) hp) ∧
        APFNativeLedgerHistory.AnchorLedgerFacts R.physical S w.input p := by
  sorry
Source
APF Paper 1 Supplement v9.27; exact native-ledger/history C1-C4 formal/source acceptance, 21 September 2026. Fixed original source and basis2026-09-14.1 retained.
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