Model vocabulary — Conditional additivity and two finite cost witnesses
DefinitionAPFPaper1_familyCost_additivity_and_two_worlds_VocabularyData, predicates and immediate constructor helpers for this reviewed model. Its substantive results are published as separate proved theorem nodes.
Additivity requires the stated joining/splitting inequalities, or additive record bills plus exact availability and disjoint needs. OverheadWorld and DiscountWorld satisfy the eight encoded forms at revision 2026-11-14.1 and give costs above/below the separate sum with no shared or joint needed record. These supplied structures are not physical models or witnesses for the later occupant statement.
Supplied data and hypotheses
- Every parameter and hypothesis in the exact source declaration remains exposed; no author input is adopted.
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.
import Definitions.Def_APFPaper1_FamilyCost
import Theorems.Thm_APFPaper5_K1_sharedCost_self
import Theorems.Thm_APFPaper5_K1_sharedCost_le_right
import Theorems.Thm_APFPaper5_K1_sharedCost_le_left
import Theorems.Thm_APFPaper5_K1_sharedCost_nonneg_iff
import Theorems.Thm_APFPaper5_K1_sharedCost_channel_ledger
import Theorems.Thm_APFPaper5_K1_sharedCost_channel_no_joint
import Theorems.Thm_APFPaper5_K1_cost_is_count_times_floor
import Mathlib.Data.NNReal.Basic
import Mathlib.Tactic.Linarith
import Definitions.Def_APFPaper5_K1_bill_not_a_sum_world_Vocabulary
import Theorems.Thm_APFB06_OverheadWorld_one_le_cost
import Theorems.Thm_APFB06_OverheadWorld_cost_le_three
import Theorems.Thm_APFB06_OverheadWorld_cost_le_one_of_allA
import Theorems.Thm_APFB06_OverheadWorld_cost_le_one_of_allB
import Theorems.Thm_APFB06_OverheadWorld_three_le_cost
import Theorems.Thm_APFB06_OverheadWorld_floor_holds
import Theorems.Thm_APFB06_OverheadWorld_eight_hold
import Theorems.Thm_APFB06_OverheadWorld_keeps_iff_mem_kept
import Theorems.Thm_APFB06_OverheadWorld_maint_eq_kept
import Theorems.Thm_APFB06_OverheadWorld_no_record_costs
import Theorems.Thm_APFB06_OverheadWorld_meets_B02_r2
import Theorems.Thm_APFB06_OverheadWorld_ra_needed
import Theorems.Thm_APFB06_OverheadWorld_rb_needed
import Theorems.Thm_APFB06_OverheadWorld_ra_not_needed
import Theorems.Thm_APFB06_OverheadWorld_rb_not_needed
import Theorems.Thm_APFB06_OverheadWorld_pair_counted_first_typed
import Theorems.Thm_APFB06_OverheadWorld_pair_is_counted_leastBill
import Theorems.Thm_APFB06_OverheadWorld_world_meets_eight_without_a_book_and_counted_pair_meets_K1
import Theorems.Thm_APFPaper1_Source_familyCost_union_le_of_join
import Theorems.Thm_APFPaper1_Source_familyCost_union_le_of_join_within_capacity
import Theorems.Thm_APFPaper5_K1_sharedCost_familyCost_nonneg_of_join
import Theorems.Thm_APFPaper1_Source_sum_needed_le_bill
import Theorems.Thm_APFPaper1_Source_familyCost_eq_sum_of_available
import Theorems.Thm_APFPaper1_Source_supportNovel_of_private_record
import Theorems.Thm_APFPaper1_Source_supportNovel_of_private_record_count
import Theorems.Thm_APFPaper1_Source_marginal_ge_of_private_record
import Theorems.Thm_APFPaper1_Source_each_private_excludes_riding
import Theorems.Thm_APFPaper1_Source_supportNovel_of_each_private
import Theorems.Thm_APFPaper1_Source_marginal_zero_of_no_own_record
import Theorems.Thm_APFPaper1_Source_needs_own_record_of_supportNovel
import Mathlib.Tactic.NormNum
/-
APF Foundation Ledger — theorem node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-13; not
gated, not reviewed, not released, not built on the build box)
name: APFPaper1_familyCost_subadditive_of_join
title: Family cost is subadditive on a pair of families when their protocols can be run side by side for at most the sum of their bills
inputs_revision: 2026-10-04.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: Def_APFPaper1_FamilyCost (Supplement v9.28:1786-1790, the ledger valuation convention).
Supplement v9.28:1779-1781 (the residue kappa_int, of either sign), 2426-2470 (additivity is proved there
only under factorized support), 3066 ("parallel separate protocols"). Def_APFPaper5_K1_SharedCost and
APFPaper5.K1.sharedCost_nonneg_iff (seat 01WrrBvu, unchanged). Codebank apf/delta_calculus.py, note F2:
the sign of Delta is not fixed once anchors intersect.
consumes_inputs: none. A statement about the source data of the family-cost definition.
named_hypothesis: hjoin, the JOIN CLAUSE. For a protocol serving S and a protocol serving T there is a
protocol serving every member of S and of T whose bill is at most the two bills together. In the second
theorem it is asked only when the two bills together are within capacity.
statement: (familyCost_le_bill) the family cost is at most the bill of any protocol serving the family.
(exists_serving_near_cost) a feasible family has a serving protocol billing less than its cost plus any
positive tolerance. (familyCost_union_le_of_join) under the join clause, for feasible S and T, the cost
of S ∪ T is at most the cost of S plus the cost of T. (familyCost_union_le_of_join_within_capacity) the
same when the join clause is asked only within capacity C and S ∪ T is ledger-admissible at C.
(sharedCost_familyCost_nonneg_of_join) so the shared cost of S and T is nonnegative.
not_claimed: the join clause. It does not follow from the eight declared forms or from the readings of
2026-11-13: see Thm_APFB06_subadditivity_worlds. Nothing about equality (additivity).
-/
set_option autoImplicit false
namespace APFPaper1.Source
theorem familyCost_le_bill {D P R Record : Type*}
(wholeResource : P → R) (calibration : R → NNReal)
(maintained : P → Set Record)
(sufficient : P → Set Record → D → Prop)
(usesToRealize : P → D → Set Record → Prop) (S : Finset D) (p : P)
(hp : ∀ d ∈ S, ∃ sigma : Set Record,
sigma ⊆ maintained p ∧ sufficient p sigma d ∧ usesToRealize p d sigma) :
familyCost wholeResource calibration maintained sufficient usesToRealize S ≤
(calibration (wholeResource p) : ℝ) :=
csInf_le ⟨0, by rintro c ⟨q, _, rfl⟩; exact NNReal.coe_nonneg _⟩ ⟨p, hp, rfl⟩
end APFPaper1.Source
/-
APF Foundation Ledger — theorem node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-15; not
gated, not reviewed, not released, not built in the ledger repo)
name: APFPaper1_familyCost_additivity_and_two_worlds
title: The costs of two families add when protocols can be run side by side and taken apart; in two worlds where all eight declared forms hold and the two distinctions have no record in common, the pair costs more than the sum in one and less in the other
inputs_revision: 2026-11-14.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the author, 2026-11-15 07:36 HST: "Yes", to this seat's "Shall I check that second route next?" The
route: the codebank proves additivity of cost over independent parts from locality and independence
(check_L_cost, sub-lemma C2), so perhaps less than "the bill is a sum" has to be a commitment.
TEE_UP_ledger_completeness_option_C_2026-11-15, section 5.
Paper 1 v5.15:796-801 (L_cost, "Pricing on an Additive Count Model": the count-only and equal-generator
assumptions "contain the pricing restriction") and 803-805 (L_loc, "locality under a product model": the
hypotheses include that "the joint bill is the sum of local bills", and neither a scalar capacity nor
L_cost supplies the product hypothesis). Paper 1 Supplement v9.28:2426-2500 (factorized support and the
additivity theorem, under its factorization hypotheses). Codebank apf/core.py: check_L_loc (1602) records
that it compares supplied numbers and does not establish an additive joint bill or locality; check_T_M
(4910) records that its legs exhibit the mechanism on declared instances. apf/delta_calculus.py,
check_T_cost_count_characterization (588), clause X2.
consumes_inputs: none as hypotheses. In the two worlds declared forms are PROVED of supplied data, which
certifies nothing about the physical inputs.
theorems, on any source data of the declared forms:
- (familyCost_union_ge_of_split) if every protocol serving both families bills at least what some
protocol serving the one and some protocol serving the other bill together, the cost of the union is at
least the sum.
- (familyCost_union_eq_of_join_and_split) with that and the join clause of
Thm_APFPaper1_familyCost_subadditive_of_join, the costs add.
- (familyCost_union_eq_of_disjoint_needs) where the bill is the sum of the costs of the records kept and
availability holds at the two families and their union, families that need no record in common have
costs that add.
the overhead world (APFB06.OverheadWorld, of Thm_APFPaper5_K1_bill_not_a_sum_world, unchanged): bills 1, 1
and 3.
- (no_shared_no_joint_record) the two distinctions need no record in common, and the pair needs no record
that neither needs alone.
- (cost_single_A, cost_single_B, cost_pair, pair_costs_more) the costs are 1, 1 and 3.
- (eight_hold_no_common_record_and_cost_above_the_sum) the above with all eight declared forms, B02 with
its second sentence.
the discount world (APFB06.DiscountWorld, new): the same states, distinctions, processes and two records;
the bills are 2, 2 and 3. A copy of the residue world's block with those changes. Capacity 3, floor 1.
- (eight_hold, meets_B02_r2) all eight declared forms hold, B02 with its second sentence.
- (no_shared_no_joint_record, cost_single_A, cost_single_B, cost_pair, pair_costs_less) no record in
common, no joint record, costs 2, 2 and 3.
- (eight_hold_no_common_record_and_cost_below_the_sum) the above together.
reading: that the costs of two families with no record in common add is independent of the eight declared
forms as encoded, in both directions. The join clause fails in the overhead world and the split clause in
the discount world. A locality premise would have to supply both; Paper 1 v5.15 states locality under a
product model that assumes the joint bill is the sum of the local bills, so it cannot be used to derive
that.
not claimed: that either world is a physical context; independence for the physical inputs as the author
means them; anything about the codebank's grades, which are the author's. No lane. No claim that the
transfer is forced, that the carrier gap is closed or narrowed, or that Born is derived.
axioms: within propext, Classical.choice, Quot.sound. No sorry.
-/
set_option autoImplicit false
open APFPaper1.Source APFPaper5.K1
/-! ### When the costs of two families add -/
namespace APFPaper1.Source
section
variable {D P R Record : Type*} [DecidableEq D]
(wholeResource : P → R) (calibration : R → NNReal)
(maintained : P → Set Record)
(sufficient : P → Set Record → D → Prop)
(usesToRealize : P → D → Set Record → Prop)
variable [DecidableEq Record] (kept : P → Finset Record) (fam : D → Finset Record)
(cost : Record → NNReal)
end
end APFPaper1.Source
/-! ### The overhead world: no record in common, and the pair costs more than the sum -/
namespace APFB06.OverheadWorld
end APFB06.OverheadWorld
/-! ### The discount world: no record in common, and the pair costs less than the sum -/
namespace APFB06.DiscountWorld
inductive St
| a | b | c | e
deriving DecidableEq
/-- The processes: the protocol for dA, the protocol for dB, the protocol for both. -/
inductive Pr
| pa | pb | pab
deriving DecidableEq
/-- The records: one for dA, one for dB. There is no third record. -/
inductive Rc
| ra | rb
deriving DecidableEq
/-- The continuation relation. State a admits every process, state b the pair's process only, state c
none, state e the process for dA only. -/
def cont : St → Pr → Prop
| .a, _ => True
| .b, q => q = Pr.pab
| .c, _ => False
| .e, q => q = Pr.pa
theorem cont_inj (x y : St) (h : cont x = cont y) : x = y := by
have hab : cont St.a ≠ cont St.b := fun h => by
have h' : Pr.pa = Pr.pab := Eq.mp (congrFun h Pr.pa) trivial
cases h'
have hac : cont St.a ≠ cont St.c := fun h =>
show False from Eq.mp (congrFun h Pr.pa) trivial
have hbc : cont St.b ≠ cont St.c := fun h =>
show False from Eq.mp (congrFun h Pr.pab) rfl
have hae : cont St.a ≠ cont St.e := fun h => by
have h' : Pr.pab = Pr.pa := Eq.mp (congrFun h Pr.pab) trivial
cases h'
have hbe : cont St.b ≠ cont St.e := fun h => by
have h' : Pr.pab = Pr.pa := Eq.mp (congrFun h Pr.pab) rfl
cases h'
have hce : cont St.c ≠ cont St.e := fun h =>
show False from Eq.mpr (congrFun h Pr.pa) rfl
cases x <;> cases y
· rfl
· exact absurd h hab
· exact absurd h hac
· exact absurd h hae
· exact absurd h.symm hab
· rfl
· exact absurd h hbc
· exact absurd h hbe
· exact absurd h.symm hac
· exact absurd h.symm hbc
· rfl
· exact absurd h hce
· exact absurd h.symm hae
· exact absurd h.symm hbe
· exact absurd h.symm hce
· rfl
abbrev K : (g : Unit) → St → Pr → Prop := fun _ => cont
/-- True at a and e. -/
def dA : St → Bool
| .a => true
| .e => true
| _ => false
/-- True at a and b. -/
def dB : St → Bool
| .a => true
| .b => true
| _ => false
/-- The distinction domain: dA and dB. -/
abbrev Delta : (g : Unit) → (St → Bool) → Prop := fun _ d => d = dA ∨ d = dB
noncomputable instance instDecEqDomain (g : Unit) : DecidableEq {d : St → Bool // Delta g d} :=
Classical.decEq _
abbrev Dist : Type := {d : St → Bool // Delta () d}
theorem hresp (g : Unit) (d : {d : St → Bool // Delta g d}) (x y : St) (h : K g x = K g y) :
d.val x = d.val y := by
rw [cont_inj x y h]
def dAd : Dist := ⟨dA, Or.inl rfl⟩
def dBd : Dist := ⟨dB, Or.inr rfl⟩
/-- The protocols: all three processes. -/
def protocols : (g : Unit) → Set Pr := fun _ => Set.univ
def pA : {p : Pr // p ∈ protocols ()} := ⟨Pr.pa, Set.mem_univ _⟩
def pB : {p : Pr // p ∈ protocols ()} := ⟨Pr.pb, Set.mem_univ _⟩
def pAB : {p : Pr // p ∈ protocols ()} := ⟨Pr.pab, Set.mem_univ _⟩
/-- What each protocol keeps. -/
def keeps : Pr → Rc → Prop
| .pa, r => r = Rc.ra
| .pb, r => r = Rc.rb
| .pab, _ => True
/-- A distinction's record, read off its value at b: ra for dA, rb for dB. -/
def recOfB : Bool → Rc
| false => Rc.ra
| true => Rc.rb
def maint (g : Unit) (p : {p : Pr // p ∈ protocols g}) : Set Rc := {r | keeps p.val r}
def suff (g : Unit) (_ : {p : Pr // p ∈ protocols g}) (s : Set Rc)
(d : {d : St → Bool // Delta g d}) : Prop := recOfB (d.val St.b) ∈ s
def uses (g : Unit) (_ : {p : Pr // p ∈ protocols g}) (d : {d : St → Bool // Delta g d})
(s : Set Rc) : Prop := recOfB (d.val St.b) ∈ s
def wholeRes (g : Unit) (p : {p : Pr // p ∈ protocols g}) : Pr := p.val
def calibration (_ : Unit) : Pr → NNReal
| .pa => 2
| .pb => 2
| .pab => 3
def C : Unit → NNReal := fun _ => 3
abbrev ServesFam (p : {p : Pr // p ∈ protocols ()}) (S : Finset Dist) : Prop :=
∀ d ∈ S, ∃ sigma : Set Rc, sigma ⊆ maint () p ∧ suff () p sigma d ∧ uses () p d sigma
noncomputable abbrev cost (S : Finset Dist) : ℝ :=
familyCost (wholeRes ()) (calibration ()) (maint ()) (suff ()) (uses ()) S
abbrev billSet (S : Finset Dist) : Set ℝ :=
{c : ℝ | ∃ p : {p : Pr // p ∈ protocols ()},
ServesFam p S ∧ ((calibration () (wholeRes () p) : NNReal) : ℝ) = c}
/-- The held family: both distinctions. -/
noncomputable def heldD : Finset Dist := {dAd, dBd}
/-- The occupant's alignment: it sits at a and carries dA and dB. -/
noncomputable def alignP : APFB06.OriginalAlignment (K ())
(APFB06.physicalDomain (K ()) (Delta ()) (hresp ())) where
carrier := APFB01.physicalClass (K ()) St.a
carried := heldD.map (APFB06.taskEquiv (K ()) (Delta ()) (hresp ())).symm.toEmbedding
active := by
intro t ht
obtain ⟨d, hd, rfl⟩ := Finset.mem_map.mp ht
rcases Finset.mem_insert.mp hd with rfl | hd'
· rfl
· rw [Finset.mem_singleton.mp hd']
rfl
def actualJointP : Set (Sigma fun g =>
APFB06.OriginalAlignment (K g) (APFB06.physicalDomain (K g) (Delta g) (hresp g))) :=
{⟨(), alignP⟩}
/-- The eight declared forms on the supplied data. -/
def EightHold : Prop :=
APF_B01_DeclaredInput (K ())
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x))
(fun (f : APFB01.PhysicalState (K ()) → Prop) (x : St) => f (APFB01.physicalClass (K ()) x)) ∧
APFB02.B02SourceMeaning (Context := Unit) (X := fun _ => St) (Q := fun _ => Pr)
(P := fun g => {p : Pr // p ∈ protocols g}) (Record := fun _ => Rc)
K Delta maint suff uses ∧
APFB03.B03TaskCost (Context := Unit) (D := fun g => {d : St → Bool // Delta g d})
(P := fun g => {p : Pr // p ∈ protocols g}) (R := fun _ => Pr) (Record := fun _ => Rc)
wholeRes calibration maint suff uses ∧
APFB04.B04FiniteCapacity (Context := Unit) (fun g => ((C g : NNReal) : ℝ)) ∧
APFB05.MarginalFloor (Context := Unit) (D := fun g => {d : St → Bool // Delta g d})
(P := fun g => {p : Pr // p ∈ protocols g}) (R := fun _ => Pr) (Record := fun _ => Rc)
wholeRes calibration maint suff uses (fun _ _ => True) (fun g => ((C g : NNReal) : ℝ))
(fun _ => (1 : ℝ)) ∧
APFB06.AmendedB06_20260914 K
(fun g => APFB06.physicalDomain (K g) (Delta g) (hresp g)) protocols
(fun g => APFB06.extensionalJoint (maint g)
(fun p s t => suff g p s (APFB06.taskEquiv (K g) (Delta g) (hresp g) t))
(fun p t s => uses g p (APFB06.taskEquiv (K g) (Delta g) (hresp g) t) s))
wholeRes calibration C actualJointP ∧
APFB07a.A2Selection (Interface := Unit)
(Configuration := fun _ => APFB01.PhysicalState (K ()))
(fun _ s => s = APFB01.physicalClass (K ()) St.a) (fun _ _ => (1 : ℝ))
(fun _ => APFB01.physicalClass (K ()) St.a) ∧
APFB07b.BWUniqueMinimum (Interface := Unit)
(Configuration := fun _ => APFB01.PhysicalState (K ()))
(fun _ s => s = APFB01.physicalClass (K ()) St.a) (fun _ _ => (1 : ℝ))
/-- The state holding a given side of dA and a given side of dB. -/
def stateOf : Bool → Bool → St
| true, true => St.a
| false, true => St.b
| false, false => St.c
| true, false => St.e
end APFB06.DiscountWorld