Model vocabulary — A shared-cost table can be degenerate
DefinitionAPFPaper5_K1_joint_record_countermodel_Vocabularyapfapf-referencepullbacks-v39-2026-11
Data, predicates and immediate constructor helpers for this reviewed model. Its substantive results are published as separate proved theorem nodes.
The supplied ResidueWorld pair has a degenerate shared-cost table and a negative coefficient in the algebraic cost-book transform. That coefficient is not a negative NNReal record cost or a physical counterexample to K1.
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.
Definition code
import Definitions.Def_APFB06_held_relation_worlds_Vocabulary_r2
import Theorems.Thm_APFB06_BridgeWorld_no_held_relation_r2
import Theorems.Thm_APFB06_RelationWorldR2_servesAll
import Theorems.Thm_APFB06_RelationWorldR2_bill_pF
import Theorems.Thm_APFB06_RelationWorldR2_bill_ge_one
import Theorems.Thm_APFB06_RelationWorldR2_one_le_cost
import Theorems.Thm_APFB06_RelationWorldR2_cost_le_two
import Theorems.Thm_APFB06_RelationWorldR2_world_B06
import Theorems.Thm_APFB06_RelationWorldR2_eight_hold
import Theorems.Thm_APFB06_RelationWorldR2_alignment_holds_relation
import Theorems.Thm_APFB06_RelationWorldR2_alignments_hold_relation
import Definitions.Def_APFPaper5_K1_SharedCost
import Mathlib.Tactic.NormNum
import Theorems.Thm_APFPaper5_K1_atomTable_symm
import Theorems.Thm_APFPaper5_K1_atomTable_form
import Theorems.Thm_APFPaper5_K1_atomTable_nonneg
import Theorems.Thm_APFPaper5_K1_record_book_table_satisfies_K1
import Mathlib.Data.Fintype.Powerset
import Mathlib.Data.Finset.Powerset
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
import Mathlib.Data.Finset.Card
import Definitions.Def_APFPaper5_K1_cost_book_Vocabulary
import Theorems.Thm_APFPaper5_K1_book_empty
import Theorems.Thm_APFPaper5_K1_book_singleton
import Theorems.Thm_APFPaper5_K1_cost_table_satisfies_K1
import Definitions.Def_APFB06_subadditivity_worlds_Vocabulary_r2
import Theorems.Thm_APFB06_RelationWorldR2_cost_subadditive
import Theorems.Thm_APFB06_ResidueWorldR2_servesAll
import Theorems.Thm_APFB06_ResidueWorldR2_bill_pA
import Theorems.Thm_APFB06_ResidueWorldR2_bill_pB
import Theorems.Thm_APFB06_ResidueWorldR2_bill_pAB
import Theorems.Thm_APFB06_ResidueWorldR2_bill_ge_one
import Theorems.Thm_APFB06_ResidueWorldR2_bill_of_both
import Theorems.Thm_APFB06_ResidueWorldR2_servesA
import Theorems.Thm_APFB06_ResidueWorldR2_servesB
import Theorems.Thm_APFB06_ResidueWorldR2_keeps_ra_of_serves
import Theorems.Thm_APFB06_ResidueWorldR2_keeps_rb_of_serves
import Theorems.Thm_APFB06_ResidueWorldR2_exists_false_of_not_all_true
import Theorems.Thm_APFB06_ResidueWorldR2_exists_true_of_not_all_false
import Theorems.Thm_APFB06_ResidueWorldR2_floor_holds
import Theorems.Thm_APFB06_ResidueWorldR2_eight_hold
import Theorems.Thm_APFB06_ResidueWorldR2_dAd_b
import Theorems.Thm_APFB06_ResidueWorldR2_dBd_b
import Theorems.Thm_APFB06_ResidueWorldR2_alignment_holds_relation
import Theorems.Thm_APFB06_ResidueWorldR2_keeps_iff_mem_kept
import Theorems.Thm_APFB06_ResidueWorldR2_bill_eq_number_kept
import Theorems.Thm_APFB06_ResidueWorldR2_cost_pair
import Theorems.Thm_APFB06_ResidueWorldR2_not_subadditive
import Theorems.Thm_APFB06_ResidueWorldR2_sharedCost_eq
import Theorems.Thm_APFB06_ResidueWorldR2_no_join
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.Algebra.BigOperators.Fin
/-
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: APFB06_subadditivity_worlds
title: The eight declared forms and both readings of 2026-11-13 hold in one supplied world where family cost is subadditive and in another where it is not
inputs_revision: 2026-10-04.1 for the eight declared forms as encoded. Revised 2026-11-14 (v2) so that the
second world also meets the sentence added to B02 at revision 2026-11-14.1: see Thm_APFB06_worlds_meet_B02_r2.
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the eight declared-input definition nodes, unchanged. RULING_joint_class_2026-11-13 and
RULING_held_relation_reading_2026-11-13 (the two readings). Def_APFPaper5_K1_SharedCost (seat 01WrrBvu).
Thm_APFB06_held_relation_worlds (the relation world). Supplement v9.28:1779-1781 (the residue kappa_int),
1805 and 7313 (it may be positive: coupling overhead, C4), 2426-2470 (additivity only under factorized
support). Codebank apf/delta_calculus.py: Delta = epsilon * (J - R), sign not fixed (note F2); world W1,
two anchors and one irreducibly joint term.
consumes_inputs: none as hypotheses. Declared forms are PROVED of supplied data, which certifies nothing
about the physical inputs.
first world (APFB06.RelationWorldR2, unchanged): (cost_subadditive) cost of S ∪ T is at most cost of S plus
cost of T, for all families. (join_holds) the join clause holds there.
second world (APFB06.ResidueWorldR2): raw states a, b, c, e with four different continuation relations. Two
distinctions: dA, true at a and e; dB, true at a and b. (v1 had no state e, so no state held dA without
dB; v2 adds it and changes nothing else.) Three records ra, rb, rj and three protocols: one
keeps ra and bills 1, one keeps rb and bills 1, one keeps ra, rb and rj and bills 3. No admitted protocol
keeps ra and rb alone. Capacity 3, floor 1. The alignment sits at a and carries both distinctions.
(eight_hold) all eight declared forms hold, B06 at the extensional joint class on the physical domain.
(alignments_hold_relation) every actual joint alignment holds a relation. (bill_eq_number_kept) each bill
is the number of records the protocol keeps. (cost_single_A, cost_single_B, cost_pair) the costs are 1, 1
and 3. (not_subadditive) the cost of the pair exceeds the sum of the two costs. (sharedCost_eq) the
shared cost of the two singletons is -1. (no_join) no protocol serves both for at most the two bills
together: the join clause of Thm_APFPaper1_familyCost_subadditive_of_join fails.
reading: subadditivity of family cost is independent of the eight declared forms as encoded, with B06 read
under both rulings. Bills that are sums over kept records do not give it either: what is missing is that
the admitted protocols are closed under running two of them side by side.
not_claimed: independence from the physical inputs as the author means them; that either world is a
physical context; anything about the hold sentence or the occupant binding, which are not typed here.
-/
set_option autoImplicit false
open APFPaper1.Source
/-! ### First world: the relation world is subadditive -/
namespace APFB06.RelationWorldR2
end APFB06.RelationWorldR2
/-! ### Second world: holding the pair needs a record neither member needs -/
namespace APFB06.ResidueWorldR2
theorem cost_eq (S : Finset Dist) : cost S = sInf (billSet S) := rfl
theorem billSet_nonempty (S : Finset Dist) : (billSet S).Nonempty := ⟨_, pAB, servesAll S, rfl⟩
theorem billSet_bdd (S : Finset Dist) : BddBelow (billSet S) :=
⟨0, by rintro c ⟨p, _, rfl⟩; exact NNReal.coe_nonneg _⟩
theorem one_le_cost (S : Finset Dist) : 1 ≤ cost S := by
rw [cost_eq]
refine le_csInf (billSet_nonempty S) ?_
rintro c ⟨p, _, rfl⟩
exact bill_ge_one p
theorem cost_le_one_of_allA (S : Finset Dist) (h : ∀ d ∈ S, d.val St.b = false) : cost S ≤ 1 := by
rw [cost_eq]
exact csInf_le (billSet_bdd S) ⟨pA, servesA S h, bill_pA⟩
theorem cost_le_one_of_allB (S : Finset Dist) (h : ∀ d ∈ S, d.val St.b = true) : cost S ≤ 1 := by
rw [cost_eq]
exact csInf_le (billSet_bdd S) ⟨pB, servesB S h, bill_pB⟩
theorem cost_single_A : cost {dAd} = 1 :=
le_antisymm
(cost_le_one_of_allA {dAd} (fun e he => by rw [Finset.mem_singleton.mp he]; rfl))
(one_le_cost _)
theorem cost_single_B : cost {dBd} = 1 :=
le_antisymm
(cost_le_one_of_allB {dBd} (fun e he => by rw [Finset.mem_singleton.mp he]; rfl))
(one_le_cost _)
end APFB06.ResidueWorldR2
/-
APF Foundation Ledger — theorem node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-14; not
gated, not reviewed, not released, not built in the ledger repo)
name: APFPaper5_K1_cost_book
title: Every cost on the families of a finite set of distinctions is the cost of a book of records, one record for each set of distinctions and needed by exactly those; the shared cost of two distinctions is the cost of the records both need; and where no record has negative cost and each distinction's own record has positive cost, the table meets K1's typed conditions
inputs_revision: 2026-11-14.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the author, 2026-11-14 HST. 20:26: "The record ledger can be derived - each item in it". 20:31:
"Yes" (to typing the derivation: the book of a cost function, the identity, and K1 from B05 plus
nonnegative shared costs). NOTE_record_ledger_can_be_derived_2026-11-14. Builder seat:
Def_APFPaper5_K1_MarkTable (atomTable), Def_APFPaper5_K1_SharedCost, record_book_table_satisfies_K1.
The mathematics is inversion over subsets (Moebius inversion on a finite Boolean lattice), stated here
through its defining recursion.
standing: THEOREMS ABOUT ANY REAL-VALUED FUNCTION OF FINITE FAMILIES. No input is consumed and no reading is
used. Nothing is assumed of the cost except, in the last theorem, the three stated sign conditions.
what this file says:
1. bookCost, book: the cost of the record needed by exactly the members of T, defined by the recursion
"what T adds over the rest, less the costs of the records of the proper subsets of T".
2. cost_eq_sum_book: the cost of a family is the cost of the empty family plus the costs of the records
that some member of the family needs. An identity, for every cost function.
3. book_empty, book_singleton: the record of no distinction costs nothing; the record a distinction needs
alone costs what that distinction adds over all the others.
4. sharedCost_eq_atomTable_book: the shared cost of two distinctions is the total cost of the records
both need, the cost of the empty family being carried on the record that all need.
5. cost_table_satisfies_K1: if the empty family costs at least nothing, no record has negative cost, and
each distinction's own record has positive cost, the table of shared costs is bilinear with a
nonnegative and faithful diagonal under the identity role exchange.
what this file does NOT say:
- That the record costs are nonnegative. They can be negative; that is a property of the cost function.
- That the book is the only one (it is, by the same inversion; not typed), or the closed alternating-sum
formula for a record's cost (not typed), or that nonnegative record costs is the same as the cost being
completely alternating (classical; not typed).
- Anything about a single protocol's bill.
- 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
namespace APFPaper5.K1
variable {ι : Type} [DecidableEq ι]
theorem bookCost_eq (g : Finset ι → ℝ) (A : Finset ι) :
bookCost g A = g A - ∑ T ∈ A.ssubsets, bookCost g T := by
have h : bookCost g A = g A - ∑ T ∈ A.ssubsets.attach, bookCost g T.1 :=
Finset.strongInduction_eq (p := fun _ => ℝ) _ A
rw [h, Finset.sum_attach A.ssubsets (fun T => bookCost g T)]
/-- The records of the subsets of `A` cost `g A` in all. -/
theorem sum_powerset_bookCost (g : Finset ι → ℝ) (A : Finset ι) :
∑ T ∈ A.powerset, bookCost g T = g A := by
have hmem : A ∈ A.powerset := Finset.mem_powerset.mpr (Finset.Subset.refl A)
rw [← Finset.add_sum_erase A.powerset (bookCost g) hmem]
have hss : A.powerset.erase A = A.ssubsets := rfl
rw [hss, bookCost_eq g A]
ring
variable [Fintype ι]
/-- The cost of a family is the cost of the empty family plus the costs of the records that some member
of the family needs. -/
theorem cost_eq_sum_book (f : Finset ι → ℝ) (S : Finset ι) :
f S = f ∅ + ∑ T : Finset ι, (if Disjoint T S then 0 else book f T) := by
have h1 : ∑ T : Finset ι, book f T = f Finset.univ - f ∅ := by
have h := sum_powerset_bookCost (addsOverRest f) Finset.univ
rw [Finset.powerset_univ] at h
simpa [book, addsOverRest] using h
have h2 : ∑ T ∈ Sᶜ.powerset, book f T = f Finset.univ - f S := by
have h := sum_powerset_bookCost (addsOverRest f) Sᶜ
simpa [book, addsOverRest] using h
have hfilt : (Finset.univ : Finset (Finset ι)).filter (fun T => Disjoint T S) = Sᶜ.powerset := by
ext T
simp [Finset.subset_compl_iff_disjoint_right]
have hsplit := Finset.sum_filter_add_sum_filter_not (Finset.univ : Finset (Finset ι))
(fun T => Disjoint T S) (book f)
have hite : ∑ T : Finset ι, (if Disjoint T S then 0 else book f T) =
∑ T ∈ (Finset.univ : Finset (Finset ι)).filter (fun T => ¬ Disjoint T S), book f T := by
rw [Finset.sum_filter]
apply Finset.sum_congr rfl
intro T _
by_cases h : Disjoint T S <;> simp [h]
rw [hite]
rw [hfilt] at hsplit
linarith
/-- The shared cost of two distinctions is the total cost of the records both need. -/
theorem sharedCost_eq_atomTable_book (f : Finset ι → ℝ) (i j : ι) :
sharedCost f {i} {j} = atomTable (bookWeight f) (fun k T => decide (k ∈ T)) i j := by
have hi := cost_eq_sum_book f {i}
have hj := cost_eq_sum_book f {j}
have hij := cost_eq_sum_book f ({i} ∪ {j})
have key : ∀ T : Finset ι,
book f T * (ind (decide (i ∈ T)) * ind (decide (j ∈ T))) =
(if Disjoint T {i} then 0 else book f T) + (if Disjoint T {j} then 0 else book f T) -
(if Disjoint T ({i} ∪ {j}) then 0 else book f T) := by
intro T
by_cases h1 : i ∈ T <;> by_cases h2 : j ∈ T <;>
simp [h1, h2, ind]
have hsum : ∑ T : Finset ι, book f T * (ind (decide (i ∈ T)) * ind (decide (j ∈ T))) =
f {i} + f {j} - f ({i} ∪ {j}) - f ∅ := by
rw [Finset.sum_congr rfl (fun T _ => key T), Finset.sum_sub_distrib, Finset.sum_add_distrib]
linarith
have hc : ∑ T : Finset ι, (if T = Finset.univ then f ∅ else 0) *
(ind (decide (i ∈ T)) * ind (decide (j ∈ T))) = f ∅ := by
rw [Finset.sum_eq_single (Finset.univ : Finset ι)]
· simp [ind]
· intro T _ hT
simp [hT]
· intro h
exact absurd (Finset.mem_univ _) h
unfold sharedCost atomTable bookWeight
simp only [add_mul, Finset.sum_add_distrib]
rw [hsum, hc]
ring
end APFPaper5.K1
/-
APF Foundation Ledger — theorem node DRAFT (session EthanBrooke-01WrrBvu, 2026-11-12; not gated, not reviewed)
name: APFPaper5_K1_shared_cost
title: The shared cost is symmetric, equals a family's own cost on the diagonal, and counts shared channels less joint channels
inputs_revision: 2026-10-04.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: as Def_APFPaper5_K1_SharedCost. The channel identity is the codebank's check_T_delta_JR_derived, with
its two named clauses as hypotheses: CH1 (a join activates at least both activation sets) and CH2 (cost is the
floor times the number of activated channels).
consumes_inputs: none. Ordinary mathematics on a cost function of families.
statement: (sharedCost_symm) the shared cost of S and T is that of T and S. (sharedCost_self) a family's shared
cost with itself is its cost. (sharedCost_eq_discount) it equals T's cost less what T adds to S.
(sharedCost_le_left, sharedCost_le_right) if adding a family never lowers cost, the shared cost is at most
each family's own cost. (sharedCost_nonneg_iff) it is nonnegative exactly when together costs no more than
apart. (sharedCost_channel_ledger) under CH1 and CH2 it is the floor times (shared channels less joint
channels). (sharedCost_channel_no_joint) with no joint channel it is the floor times the shared channels.
(sharedCost_channel_le) it never exceeds the floor times the shared channels.
(sharedCost_channel_disjoint) with no joint channel and no shared channel, cost adds.
(cost_is_count_times_floor) the codebank's characterization: a cost that depends only on the count, adds
across disjoint counts and is eps on one channel is the count times eps. So CH2 reduces to those two clauses.
not_claimed: CH1 or CH2 for the ledger's familyCost; any sign of the shared cost in general; that this number
is the K layer's score.
-/
set_option autoImplicit false
namespace APFPaper5.K1
universe u v
variable {D : Type u} [DecidableEq D]
theorem sharedCost_symm (cost : Finset D → ℝ) (S T : Finset D) :
sharedCost cost S T = sharedCost cost T S := by
unfold sharedCost
rw [Finset.union_comm S T]
ring
end APFPaper5.K1
/-
APF Foundation Ledger — theorem node DRAFT (Claude seat, session EthanBrooke-01WrrBvv, 2026-11-14; not
gated, not reviewed, not released, not built in the ledger repo)
name: APFPaper5_K1_joint_record_countermodel
title: "No record needed by two or more has negative cost" does not follow from the eight declared forms: in the residue world, which meets them, the record needed by both distinctions costs less than nothing, and the table of shared costs has no faithful diagonal
inputs_revision: 2026-11-14.1
mathlib_rev: 0df444a360eaa60ab8c11dca51a86af692955474
source: the author, 2026-11-14 20:39 HST: "Derive the premise - we got this". Thm_APFPaper5_K1_cost_book and
Thm_APFPaper5_K1_interface_cost_book (this seat, pass 29). Builder seat, Thm_APFB06_subadditivity_worlds,
namespace APFB06.ResidueWorldR2: eight_hold (the eight declared forms and both readings of 2026-11-13 hold),
cost_single_A, cost_single_B (each distinction alone costs 1), cost_pair (the two together cost 3),
sharedCost_eq (their shared cost is -1), one_le_cost. This seat, Thm_APFB06_worlds_meet_B02_r2:
APFB06.ResidueWorldR2.meets_B02_r2 (the world also meets B02's second sentence). Thm_APFB06_count_worlds: in
that world bills count the records kept and each distinction is served by its own record.
standing: A COUNTERMODEL, on a world already on file. It answers "derive the premise" with: it cannot be
derived from the eight declared forms, because it fails where they hold.
what this file says:
1. sharedCost_nonneg_of_book_nonneg (general). If no record of the book has negative cost and the empty
family costs at least nothing, every two distinctions have nonnegative shared cost: together they cost
no more than apart.
2. pair_book_has_negative_record. In the residue world the book of the two distinctions has a record of
negative cost.
3. pairTable_values, pairTable_not_faithful. There the table of shared costs is 1 on the diagonal and -1
off it, its form vanishes on the vector (1, 1), and so K1's faithful diagonal FAILS for it.
reading (not typed beyond the instance): a record that is needed only when both distinctions are held, which
is what B06's irreducibly joint relation is, enters the book as a negative cost on the record "needed by
either". The premise of pass 29 therefore says that the family has no joint record beyond what it shares.
what this file does NOT say:
- That the pair is a counted family in the residue world (each support-novel over the other, within
capacity). It looks like one; that is NOT checked here. So this is a countermodel to the premise, and to
K1's conclusion for the shared-cost table in a world meeting the eight; it is not yet shown to be a
countermodel to the pass-29 K1 statement with all its hypotheses.
- That the form can be negative. Here it is nonnegative and degenerate. A dearer joint record would make
it negative; no such world is built.
- 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
namespace APFPaper5.K1
end APFPaper5.K1
namespace APFB06.ResidueWorldR2
open APFPaper5.K1
/-- The two distinctions of the residue world, indexed. -/
def pairDist : Fin 2 → Dist := fun k => if k = 0 then dAd else dBd
/-- The cost of the sub-families of the pair. -/
noncomputable def pairCost : Finset (Fin 2) → ℝ := fun S => cost (S.image pairDist)
/-- The table of shared costs of the two distinctions. -/
noncomputable def pairTable : Fin 2 → Fin 2 → ℝ :=
fun a b => sharedCost cost {pairDist a} {pairDist b}
end APFB06.ResidueWorldR2
Source
Theorems.Thm_APFPaper5_K1_joint_record_countermodel; Pullbacks v39, SHA-256 1ecf47f5086b77bfc0e0f92884dc691a4356b2d406a9df4f15f6dce4fe9a6c52. Theorems.Thm_APFPaper5_K1_joint_record_countermodel; pullbacks v39; SHA-256 1ecf47f5086b77bfc0e0f92884dc691a4356b2d406a9df4f15f6dce4fe9a6c52