A generic countable-universe interface #
The original core fixes the universe to ℕ, as in the finite-query
Kleinberg--Mullainathan construction. Many later papers state their results
over an arbitrary countable example space. This file supplies that generic
paper-facing layer without changing the existing API.
A finite history of length t is represented by Fin t → α. Thus a
Generator α is literally a function on finite sequences, while
output G stream t exposes only the prefix strictly before time t.
A language over an arbitrary example type.
Equations
Instances For
A possibly uncountable class of languages.
Equations
Instances For
An enumerated countable family of languages. Unlike LanguageClass,
this representation preserves the paper's index order and repetitions.
Equations
Instances For
An infinite stream of examples.
Equations
- GenLimit.Generic.Stream α = (ℕ → α)
Instances For
A generator is a map from each finite sequence to one new example.
Equations
- GenLimit.Generic.Generator α = ((t : ℕ) → (Fin t → α) → α)
Instances For
Exact presentation: repetitions are allowed, and every target element must eventually occur.
Equations
- GenLimit.Generic.Presents stream L = (Set.range stream = L)
Instances For
Every element ever shown by the stream belongs to L.
Equations
- GenLimit.Generic.StreamIn stream L = (Set.range stream ⊆ L)
Instances For
The distinct values in a finite sequence.
Equations
Instances For
The distinct observations strictly before time t.
Equations
- GenLimit.Generic.sample stream t = Finset.image stream (Finset.range t)
Instances For
The stream that follows a finite history and then repeats a fallback value forever.
Equations
Instances For
A finite history followed by a fallback stays in a language when both the history and fallback do.
Run G on the prefix of stream strictly before time t.
Equations
- GenLimit.Generic.output G stream t = G t fun (i : Fin t) => stream ↑i
Instances For
Passing a list through its canonical Fin-indexed input recovers its
underlying finite set of values.
An injective finite history has as many distinct observations as positions.
Pointwise membership of a finite history implies membership of every element in its underlying sample.
The value map of a finset's canonical Fin enumeration is injective.
An injective stream has exactly t distinct observations before round
t.
Sampling a finite-history stream at the end of the history recovers exactly the history's distinct values.
If every reached size can be crossed exactly, a property that holds
eventually after reaching exact size d also holds after reaching any larger
exact size.
An exact presentation of an infinite language passes through every finite number of distinct observations.
The generated value is a fresh member of L at time t.
Equations
- GenLimit.Generic.CorrectAt G L stream t = (GenLimit.Generic.output G stream t ∈ L ∧ GenLimit.Generic.output G stream t ∉ GenLimit.Generic.sample stream t)