Encyclopedia Cosmology Cosmology Domain Coarsening2 D Runs Eq Of Ne Nil
ARTICLE 3 claims 3 theorems
Cosmology Domain Coarsening2 D Runs Eq Of Ne Nil
A single row of cells coarsens into exactly one more super-region than the number of boundaries it contains, a counting rule with a clean proof.
The row cost law
In the Recognition Science framework, a ledger (a discrete record of events) tracks regions of equal charge as they coarsen over time. The declaration runs_eq_of_ne_nil states a precise counting rule for one row of such a ledger: a nonempty row of cells coarsens into exactly (its number of horizontal boundaries) plus one super-regions. In symbols, for any nonempty list r, runs r = boundaries r + 1. The proof is short: it splits the row into its first cell and the rest, then applies the already-proved one-dimensional law runs_eq.
This row rule is the building block for a larger result about two-dimensional grids. The framework models a 2D field as a list of rows, coarsens each row independently, and sums the results. The theorem rowwise_cost_eq then proves that for any grid whose rows are all nonempty, the total separable coarsening cost equals the total horizontal interface plus the number of rows: rowCost rows = rowInterface rows + rows.length. The cost depends only on the interface and the row count, never on the row widths, so it is bounded by the perimeter, not the area.
The row law itself is dimension-free: it applies to any list of cells, not only to a row inside a 2D grid. It does not claim anything about how vertical merges between rows behave. The true 2D component coarsening also merges vertically, so it carries at most as many super-regions as the separable row-wise cost. That inequality, components_2D <= rowCost, is a separate theorem with its own proof, and it is the reason the row law is useful: it gives an upper bound on the carried 2D cost in terms of the horizontal interface and the row count.
What the row law does not establish is any statement about the actual 2D component count being equal to the separable cost. The exact analogue of the 1D identity becomes an inequality in 2D, because a 2D interface can be multiply connected. The row law is exact only for a single row or for the separable row-wise cost; it is a component of the 2D story, not the whole story.
THEOREM runs_eq_of_ne_nil · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
/-- The 1D cost law as a row lemma: a nonempty row coarsens into (its horizontal interface) + 1 super-regions. -/
theorem runs_eq_of_ne_nil (r : List α) (h : r ≠ []) : runs r = boundaries r + 1 := by
cases r with
| nil => exact absurd rfl h
| cons a l => exact runs_eq a l
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
/-- 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 row law does not claim that the true 2D component count equals the separable row-wise cost. The row law does not describe how vertical merges between rows affect the component count. The row law does not apply to empty rows, which are excluded by its hypothesis.
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:
- How does the 2D component count relate to the separable row-wise cost when vertical merges are included?
- What is the exact statement of the inequality components_2D <= rowCost and its proof?
- How does the row cost law generalize to grids with empty rows?
MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND
THEOREM runs_eq_of_ne_nil · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
/-- The 1D cost law as a row lemma: a nonempty row coarsens into (its horizontal interface) + 1 super-regions. -/ theorem runs_eq_of_ne_nil (r : List α) (h : r ≠ []) : runs r = boundaries r + 1 := by cases r with | nil => exact absurd rfl h | cons a l => exact runs_eq a lA nonempty row of cells coarsens into exactly (its number of horizontal boundaries) plus one super-regions. runs_eq_of_ne_nil · IndisputableMonolith/Cosmology/DomainCoarsening2D.leanTHEOREM 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] ringFor any grid whose rows are all nonempty, the total separable coarsening cost equals the total horizontal interface plus the number of rows. rowwise_cost_eq · IndisputableMonolith/Cosmology/DomainCoarsening2D.leanTHEOREM rowwise_cost_independent_of_width · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean
/-- 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 hThe separable coarsening cost depends only on the interface and the row count, never on the row widths. rowwise_cost_independent_of_width · IndisputableMonolith/Cosmology/DomainCoarsening2D.lean