The ledger of a source data record
DefinitionAPFPaper1_LedgerOfSourceFix a protocol class, distinction and record types, calibrated whole-resource bills, maintained records, sufficient support and actual-use data. Choose a designated protocol . The source adapter constructs a CostLedger with that protocol as its null protocol and with the supplied support relations unchanged.
Its prices satisfy the defining convention
The adapter itself assumes no law about the data. The separate cost and support-novelty bridge theorems explicitly require to identify all ledger prices with the original calibrated bills. This conditional bridge does not prove that an arbitrary chosen is the original empty protocol or that an arbitrary data instance describes the physical source.
Formalization note. Foundation Inputs revision 2026-10-04.1; independent source review brook-2026-11-12-cold_fidelity_review. Stated hypotheses and representation limits are retained.
/-
APF Foundation Ledger — definition node (Batch 1, bridge)
name: APFPaper1_LedgerOfSource
title: The ledger of a source data record
inputs_revision: 2026-10-04.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: Paper 1 Supplement v9.27:1754-1757,1778-1787,2188-2221,2880-2883. Builds a CostLedger Ledger from the
source data used by B03/B05 (whole resource, calibration, maintained, sufficient, usesToRealize) and a
designated null protocol.
statement: Ledger.ofSource p0 wholeResource calibration maintained sufficient usesToRealize is the Ledger whose
null protocol is p0, whose non-null bill is the calibrated whole resource, and whose support predicates are
the given ones. Its price agrees with the calibrated whole resource at every protocol exactly when the null
protocol's calibrated bill is zero; that null-bill convention (Supplement 2880-2883) is a hypothesis of the
bridge theorems, not a field.
-/
import Definitions.Def_APFPaper1_CostLedger
import Definitions.Def_APFPaper1_FamilyCost
set_option autoImplicit false
namespace APFPaper1.Foundation
/-- The Ledger of a source data record. -/
noncomputable def Ledger.ofSource {D P R Record : Type*} (p0 : P)
(wholeResource : P → R) (calibration : R → NNReal)
(maintained : P → Set Record)
(sufficient : P → Set Record → D → Prop)
(usesToRealize : P → D → Set Record → Prop) : Ledger D P Record where
nullProtocol := p0
nonNullBill := fun q => calibration (wholeResource q.val)
maintained := maintained
sufficient := sufficient
usesToRealize := usesToRealize
end APFPaper1.Foundation
Confirmed by the mission captain (proposal self-audit).