Documentation

Learning.SQEnvelope

The SQ version-space envelope via Szörényi's maximality + packing #

The statistical dimension d_SQ with Assumption A, and the SQ-based enumeration of a version space. Mathematical route: Szörényi, "Characterizing Statistical Query Learning: Simplified Notions and Proofs" (ALT 2009) — the elementary maximality/packing argument (Def 2, §3, Prop 1), NOT the Fourier route.

This builds the BFJKMR-style version-space envelope directly over the GENUINE statistical dimension (SQObjects.sqDim), discharging the MODELED envelope premise candidates r ≤ A · (d_SQ r)^m that SQBounds.candidates_polyBounded takes as a hypothesis. Two pieces of added content over SQObjects.survivors_card_le_sqDim (which already handles the pairwise-SEPARATED survivor case): (a) the query schedule / covering family EXISTS — Szörényi's maximality (exists_sq_net); (b) a version-space size bound WITHOUT assuming the survivors are pairwise separated (subset_card_le_sqDim_of_ident), gated on a clean CLASS-LEVEL identifiability hypothesis instead of a survivor-set-level separation hypothesis.

The constant chain (the τ / 2τ / 3τ bookkeeping) #

What this DOES establish #

The identifiability hypothesis (named, flagged prominently) #

subset_card_le_sqDim_of_ident / subset_polyBounded_of_ident assume hident : ∀ i ∈ M, ∀ j ∈ M, (∀ φ, |ans φ i − ans φ j| ≤ 2τ) → i = j — "distinct candidate rules are 2τ-distinguishable on some query". It is a real hypothesis: with it, the covering map is injective and the version space collapses onto a separated family. WITHOUT it, |V| is UNBOUNDED by sqDim and the query count — distinct candidates can share one answer functional (a near-duplicate cluster), so no direct bound on |V| exists to prove (the [−1,1] per-query packing bounds only the distinct τ-rounded answer-VECTORS on the schedule — the net — not the survivor count, and even that count is exponential in the query number, not poly). Flagged, not hidden; hident_load_bearing below guards the hypothesis with the near-duplicate witness. The identifiability-FREE maintained-net envelope is already machine-checked, in the sibling module this file imports: SQObjects.version_space_net_envelope. It is the FORCED object without hident, not a sidestep of a harder-but-available direct |V| bound — no such bound exists.

What this does NOT establish (out of scope / stays in prose; no overclaiming) #

theorem SQEnvelope.pairwise_close_on_of_oracle {ι : Type u_1} {Q : Type u_2} (c : ℝ) (ans : Q → ι → ℝ) (o : Q → ℝ) (Qs : Finset Q) {i j : ι} (hi : ∀ φ ∈ Qs, |ans φ i - o φ| ≤ c) (hj : ∀ φ ∈ Qs, |ans φ j - o φ| ≤ c) (φ : Q) :
φ ∈ Qs → |ans φ i - ans φ j| ≤ 2 * c

Closeness transitivity — general constant (Szörényi Prop 1, abstract form): if i and j each answer within c of the same oracle answers on every scheduled query φ ∈ Qs, then i and j are pairwise 2c-close on Qs. Pure triangle inequality (the abstract analogue of the ⟨·,·⟩ inner-product bound; see the module docstring on the 6ε correlational constant).

theorem SQEnvelope.close_on_of_prune {ι : Type u_1} {Q : Type u_2} (τ : ℝ) (ans : Q → ι → ℝ) (o : Q → ℝ) (Qs : Finset Q) {i j : ι} (hi : ∀ φ ∈ Qs, |ans φ i - o φ| ≤ 2 * τ) (hj : ∀ φ ∈ Qs, |ans φ j - o φ| ≤ 2 * τ) (φ : Q) :
φ ∈ Qs → |ans φ i - ans φ j| ≤ 4 * τ

The version space is a close cluster on the schedule: survivors of the 2τ-pruning rule (|ans φ i − o φ| ≤ 2τ on every scheduled query) are pairwise 4τ-close on the schedule. So the version space need NOT be pairwise separated — the survivor pigeonhole of SQObjects.survivors_card_le_sqDim does not apply directly, and the envelope needs the covering argument below.

theorem SQEnvelope.exists_sq_net {ι : Type u_1} {Q : Type u_2} (M : Finset ι) (τ : ℝ) (hτ : 0 ≤ τ) (ans : Q → ι → ℝ) :
∃ S ⊆ M, SQObjects.SepFam M τ ans S ∧ S.card = SQObjects.sqDim M τ ans ∧ ∀ i ∈ M, ∃ j ∈ S, ∀ (φ : Q), |ans φ i - ans φ j| ≤ τ

Szörényi's maximality (the covering family exists). Every finite class M has a MAXIMAL τ-separated subfamily S: S is itself a SepFam with S.card = sqDim M τ ans, and by maximality it COVERS M — every candidate i ∈ M is τ-close on EVERY query to some j ∈ S (otherwise i could be added to S, contradicting maximum cardinality).

theorem SQEnvelope.subset_card_le_sqDim_of_ident {ι : Type u_1} {Q : Type u_2} (M : Finset ι) (τ : ℝ) (hτ : 0 ≤ τ) (ans : Q → ι → ℝ) (V : Finset ι) (hVM : V ⊆ M) (hident : ∀ i ∈ M, ∀ j ∈ M, (∀ (φ : Q), |ans φ i - ans φ j| ≤ 2 * τ) → i = j) :

The version-space envelope proper. Under class-level identifiability at scale 2τ (hident: distinct candidates differ by > 2τ on some query), ANY subfamily V ⊆ M — in particular the 2τ-pruning version space — satisfies V.card ≤ sqDim M τ ans.

Proof (Szörényi packing): take the maximal τ-separated covering family S (exists_sq_net), with S.card = sqDim. Assign each v ∈ V a covering point f v ∈ S that it is τ-close to. If f a = f b, then a and b are both τ-close to that point, hence 2τ-close on every query, so hident forces a = b: the assignment is injective on V, and V embeds into S.

The identifiability hypothesis is where "distinct rules are distinguishable" lives; removing it and bounding the covering-ball clusters by an extra poly(k) factor is the harder BFJKMR clustering argument (module docstring).

theorem SQEnvelope.version_space_card_le {ι : Type u_1} {Q : Type u_2} (M : Finset ι) (τ : ℝ) (hτ : 0 ≤ τ) (ans : Q → ι → ℝ) (o : Q → ℝ) (Qs : Finset Q) (V : Finset ι) (hVM : V ⊆ M) (hsurv : ∀ i ∈ V, ∀ φ ∈ Qs, |ans φ i - o φ| ≤ 2 * τ) (hident : ∀ i ∈ M, ∀ j ∈ M, (∀ (φ : Q), |ans φ i - ans φ j| ≤ 2 * τ) → i = j) :
(∀ i ∈ V, ∀ j ∈ V, ∀ φ ∈ Qs, |ans φ i - ans φ j| ≤ 4 * τ) ∧ V.card ≤ SQObjects.sqDim M τ ans

The version-space bound, assembled. The 2τ-pruning survivor set V (against a τ-good oracle o over schedule Qs) is (i) pairwise 4τ-close on the schedule and (ii) has V.card ≤ sqDim M τ ans, under class-level identifiability at scale 2τ. Part (i) is close_on_of_prune; part (ii) is subset_card_le_sqDim_of_ident.

theorem SQEnvelope.subset_polyBounded_of_ident {ι : Type u_1} {Q : Type u_2} (τ : ℝ) (hτ : 0 ≤ τ) (Mfam Vfam : ℝ → Finset ι) (ansfam : ℝ → Q → ι → ℝ) (hVM : ∀ (r : ℝ), Vfam r ⊆ Mfam r) (hident : ∀ (r : ℝ), ∀ i ∈ Mfam r, ∀ j ∈ Mfam r, (∀ (φ : Q), |ansfam r φ i - ansfam r φ j| ≤ 2 * τ) → i = j) (hpoly : SQBounds.PolyBounded fun (r : ℝ) => ↑(SQObjects.sqDim (Mfam r) τ (ansfam r))) :
SQBounds.PolyBounded fun (r : ℝ) => ↑(Vfam r).card

The modeled envelope premise, discharged. Reusing SQBounds.candidates_polyBounded verbatim with the A = m = 1 envelope supplied by subset_card_le_sqDim_of_ident: if the GENUINE statistical dimension sqDim (Mfam r) τ (ansfam r) is polynomially bounded (Assumption A) and each class Mfam r is 2τ-identifiable, then the version space Vfam r ⊆ Mfam r is poly(r). This is exactly SQObjects.survivors_polyBounded_of_separated with class-level identifiability hident in place of the survivor-set separation hypothesis hsep, closing the loop with the literal PolyBounded chain.

theorem SQEnvelope.hident_load_bearing (N : ℕ) (hN : 2 ≤ N) :
∃ (M : Finset (Fin N)) (V : Finset (Fin N)) (τ : ℝ) (ans : Unit → Fin N → ℝ), 0 ≤ τ ∧ V ⊆ M ∧ ¬V.card ≤ SQObjects.sqDim M τ ans ∧ ¬∀ i ∈ M, ∀ j ∈ M, (∀ (φ : Unit), |ans φ i - ans φ j| ≤ 2 * τ) → i = j

Guard: hident in subset_card_le_sqDim_of_ident is load-bearing (the near-duplicate witness). Over Fin N (N ≥ 2) with a CONSTANT answer functional (ans _ i = 0 for every query and every candidate — the generic case for distinct programs computing the same function, which is exactly why identifiability is a real hypothesis rather than a formality), no query separates any two candidates, so sqDim univ 1 ans = 1; but the whole class is its own 2τ-survivor set, so V.card = N. hident fails here (every pair shares an identical answer, so 2τ-closeness never forces equality), and the envelope's conclusion is FALSE for every N ≥ 2: |V| is unbounded while sqDim stays 1: without identifiability the direct |V| bound does not merely stay unproved, it fails, and the maintained net (SQObjects.version_space_net_envelope) is the forced object.