Evidence register: defending the counting decisions

Purpose. This is the body of material behind the v1 counting contract: for each decision the analyzer makes — and will keep making as it audits codebases — the sources that justify it, how far each source was verified, and the boundary beyond which it must not be stretched. When a review questions a number, this is the register to answer from.

Verification levels. Every source states one:

No entry below claims more than its level. The Russell citation inventory records the database-reported line of descent in full.

D1. Fix the collection before counting

Decision. A count is only meaningful once the language, the accessible environment, the equivalence, and the model assumptions are fixed (plan §2). A free type parameter is one atom per binder, never "a type of unknown finite size"; binder identity is per declaration.

Evidence.

Boundary. None of these sources says which scope rules Scala has; they justify requiring explicit scope rules at all. Our particular rules (lexical chain, package peers, this.x surviving shadowing) are defended by our own regressions, not by 1907.

D2. Mathematical inhabitants are not expressible implementations

Decision. The analyzer reports Finite, Countable (ω), or Unresolved — never an uncountable implementation count. Stored-value estimates are kept in a separate report section.

Evidence.

Boundary. Countability does not mean effective enumerability with decidable equality or totality (D7). Reynolds and Pitts argue about specific idealized calculi, not Scala; they justify our shape of answer, not any particular number we emit.

D3. Parametricity constrains generic implementations

Decision. A universally quantified signature is counted uniformly across its admissible instantiations: ∀a. a -> a ~ 1, choose[A](x: A, y: A): A ~ 2, Pair's four-construction count. Concrete types mention concrete sizes.

Evidence.

Boundary. Free theorems hold for ideally parametric languages. Scala has asInstanceOf, reflection, and side effects; our model excludes them explicitly, and a signature whose result depends on such features must read ?, not a parametric count. Laws (functor, optic) are additional constraints on top of parametricity, never consequences of it — counting law-abiding implementations is a separate, unsolved mode (plan §8).

D4. Recursion requires productivity

Decision. A supplied endomorphism with a seed admits x, step(x), step(step(x)), … — countably many (ω); without a seed, the same cycle supplies nothing (0). Recursive type equations are read as least fixed points. A declaration may not supply its own implementation.

Evidence.

Boundary. Least-fixed-point semantics justifies reading a recursive type; it does not justify assuming a program terminates. Divergence is excluded by model assumption, not proven away, and any recursive signature our fragment cannot decide stays ?.

D5. Cardinality is not order type

Decision. The analyzer's ω means countably infinite cardinality (ℵ₀) and nothing else: no claim about ordering, construction depth, or evaluation cost.

Evidence.

Boundary. If we ever report construction depth or ordering — for instance, to bound the canonical forms counted in an ω family — that is a new quantity requiring its own evidence, rendered separately from the cardinality.

D6. Approximate counting must be labeled approximate

Decision. Estimates from probabilistic counting (HyperLogLog) would live in a separate, opt-in mode, never mixed into exact or unresolved rows.

Evidence.

Boundary. A sketch estimate is evidence about a sample, never about the full inhabitant set; it cannot turn ? into a number, prove ω, or prove a count impossible.

D7. ? is a first-class answer, not a failure

Decision. Unsupported syntax, incomplete scope, or an exhausted analysis budget yields Unresolved with a reason — never a finite guess, never an invented infinity.

Evidence.

Boundary. "Undecidable in general" does not mean "undecidable here": specific fragments (pure, first-order, finite sums and products) are decidable and we count them exactly. ? is for the cases outside the fragment, and the reason recorded with it is the work item.

D8. Resource limits report, never approximate silently

Decision. The solver's state and arithmetic budgets exhaust into Unresolved with the budget's name, rather than returning a partial count.

Evidence.

Boundary. A budget hit is an obligation to raise the limit or restructure, not evidence about the signature.

How to extend this register

A new source earns an entry only with: the decision it defends, the exact claim relied on, its verification level as defined above, and the boundary past which it must not be cited. A new decision earns an entry only when it can name at least one source or one executable artifact in this repository as evidence. Assertions that cannot meet either bar do not belong in the register; they belong in the plan's open-decisions list.