Encyclopedia Cosmology Cosmology Domain Coarsening2 D Row Interface Cons

ARTICLE 3 claims 3 theorems

Cosmology Domain Coarsening2 D Row Interface Cons

A small formal lemma about counting boundaries in a grid, and the precise sense in which it is a theorem about cost, not a claim about physics.

The row interface

The declaration rowInterface_cons is a lemma about a simple counting operation on a list of rows. It states that the total horizontal interface of a grid, computed as the sum of the boundaries of each row, satisfies a recursive rule: the interface of a grid formed by adding one row to the front is the boundary of that new row plus the interface of the remaining rows. In plain terms, it says the total horizontal interface can be built up one row at a time, and the count is exactly additive across rows.

This lemma is part of a larger, proved theorem in the framework's machine-checked library of formal theorems. The theorem, rowwise_cost_eq, states that for any grid whose rows are all nonempty, the separable coarsening cost equals the total horizontal interface plus the number of rows. Here, coarsening means merging adjacent equal values in each row into a single super-region, and the cost is the number of such super-regions. The interface is the count of boundaries between differing values within each row. The lemma rowInterface_cons is the recursive step that makes this theorem provable by induction over rows.

The theorem's significance is that it bounds the cost of coarsening a two-dimensional grid by its interface, not its area. The cost depends only on the horizontal interface and the row count, never on the row widths. This is an exact identity for the separable, row-wise coarsening, and an upper bound for the true two-dimensional coarsening that also merges vertically. The framework models this as a step in a cosmological account where recognition cost localizes to boundaries rather than bulk.

What the declaration does not claim is equally precise. It does not assert anything about the physical world; it is a theorem about lists and counting. It does not claim that the true two-dimensional coarsening cost equals this value, only that it is at most this value. It does not claim that the grid represents actual physical space, only that the framework models it that way. The lemma itself is a definitional recursion, and its truth is a matter of the definitions chosen, not an empirical finding.

THEOREM rowInterface_cons · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
theorem rowInterface_cons (r : List α) (rs : List (List α)) :
    rowInterface (r :: rs) = boundaries r + rowInterface rs := by
  simp [rowInterface]
THEOREM rowwise_cost_eq · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
/-- **The separable coarsening cost = horizontal interface + number of rows.** For any 2D grid whose rows are
all nonempty, coarsening each row independently carries exactly (the total horizontal interface) plus (the
number of rows) super-regions. This is the exact per-axis generalization of the 1D law `runs = boundaries + 1`
summed over rows, and it depends only on the interface and the row count, never on the row widths (the area).
The true 2D component coarsening merges vertically as well, so it carries at most this many super-regions. -/
theorem rowwise_cost_eq (rows : List (List α)) (h : ∀ r ∈ rows, r ≠ []) :
    rowCost rows = rowInterface rows + rows.length := by
  induction rows with
  | nil => simp
  | cons r rs ih =>
    rw [rowCost_cons, rowInterface_cons, runs_eq_of_ne_nil r (h r (List.mem_cons.mpr (Or.inl rfl)))]
    rw [ih (fun row hrow => h row (List.mem_cons.mpr (Or.inr hrow)))]
    simp [List.length_cons]
    ring
THEOREM rowwise_cost_independent_of_width · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
rowwise_cost_independent_of_width · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean:88
/-- The carried cost is bounded by the interface, not the area: the separable coarsening cost is
`rowInterface + rows.length`, with no dependence on the row widths. -/
theorem rowwise_cost_independent_of_width (rows : List (List α)) (h : ∀ r ∈ rows, r ≠ []) :
    rowCost rows = rowInterface rows + rows.length :=
  rowwise_cost_eq rows h

What this page does not claim

The lemma does not claim that the true two-dimensional coarsening cost equals the row-wise cost. The theorem does not claim that the grid represents physical space. The declaration does not assert any empirical fact about the universe.

Verify this page

Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:

$ lake env lean IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)

A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.

Derived articles

This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND