Skip to content

C9.3: Formalize averaging measure μ and finite-window conventions for D9 analysis#28

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-averaging-window-conventions
Draft

C9.3: Formalize averaging measure μ and finite-window conventions for D9 analysis#28
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-averaging-window-conventions

Conversation

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

D9 artifacts had no canonical definition of the averaging measure μ, window function w(n), or agreed window types — scripts used inconsistent (and partially broken) windowing logic with no asymptotic specification.

Canonical specification (docs/d9_averaging_window_conventions.md)

Defines the three window types every D9 artifact must use:

Type Window Size w(n)
Contiguous [1, N] N n
Dyadic [2^k, 2^(k+1)) 2^k ⌊log₂n⌋
Logarithmic [1, N], weight 1/n H_N ≈ ln N n

Also specifies: normalization rule for μ_W, limsup/liminf conventions, the chain d̲(A) ≤ δ(A) ≤ d̄(A), and a mandatory D9 metadata JSON schema for every artifact.

New implementation (scripts/collatz_c9_3_averaging.py)

python scripts/collatz_c9_3_averaging.py \
  --event strong_decrease --window-type dyadic --param 20 \
  --limsup-liminf --output scripts/out/d9.json
# [C9.3] window_type=dyadic  param=20  mu_W(strong_decrease)=0.25
# [C9.3] limsup≈0.25  liminf≈0.25  status=converged

Exposes mu_contiguous, mu_dyadic, mu_logarithmic, estimate_limsup_liminf, and build_d9_metadata as importable functions.

C9.2 fixes (scripts/collatz_c9_2_sampling.py)

  • T(n) replaced: was (3n+1) // 2^0 (wrong); now uses correct 2-adic valuation
  • sample() now actually iterates over the window (previously iterated M times on a fixed n)
  • Dyadic windows validated against spec boundaries at runtime
  • mu_W in output JSON is now the exhaustive event count over the full window (|{n∈W: A(n)}| / |W|), not len(sampled_results) / |W|
  • Output JSON includes the canonical D9 metadata block

Cross-references

  • docs/analysis_ns/README.md updated to point to the new spec (closes the open "waiting for windowing definition" status)
  • .gitignore added to exclude scripts/out/ empirical outputs

Copilot AI changed the title [WIP] Fix averaging window and normalization conventions for D9 analysis C9.3: Formalize averaging measure μ and finite-window conventions for D9 analysis Apr 3, 2026
Copilot AI requested a review from TOTOGT April 3, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C9.3 — Formalize averaging measure μ and finite‑window conventions for D9 analysis

2 participants