The same occupied process retains its null and positive ledger contrast
ProvedAPFNativeLedgerHistory.same_deployment_anchorThe 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.
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
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
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.