{
  "all_configs_exact_integral": true,
  "all_configs_in_regime_M_ge_d2": true,
  "all_configs_ordered_floor_le_flash_le_naive": true,
  "all_ok": true,
  "approx_attention": {
    "all_ok": true,
    "citation": "arXiv:2605.23751 (2026) \u2014 Approaching I/O-optimality for Approximate Attention",
    "compliance_oracle": {
      "foil_below_scan_floor_flagged": true,
      "valid_kernel_safe": true
    },
    "exact_lower_bound": "I/O >= 3\u00b7N\u00b7d \u2014 every entry of Q,K,V loaded at least once (verbatim, Case I); holds for ANY algorithm, exact or approximate, any hardware",
    "honest_scope": "Only Case I carries an EXACT constant (3Nd, quoted); Cases II-IV are asymptotic Omega-bounds with no explicit constant \u2014 disclosed, NOT pinned. Approximation escapes the QUADRATIC exact floor down to the LINEAR input-scan floor; the oracle now spans both regimes. MODEL, NOT OTA.",
    "input_scan_floor_matches_pin": true,
    "input_scan_floor_words_flagship": 6291456,
    "regime": "Case I of arXiv:2605.23751 (2026): fast memory M = Omega(d\u00b7r); optimal I/O = Theta(n\u00b7d)",
    "savings_demo": {
      "M": 262144,
      "N": 131072,
      "achievable_below_exact_floor": true,
      "approx_scan_floor_words": 50331648,
      "approximation_saves_io": true,
      "case_I_regime_M_ge_dr": true,
      "d": 128,
      "exact_over_approx": 10.666666666666666,
      "exact_pebble_floor_words": 536870912,
      "in_savings_regime_Nd_ge_6M": true,
      "r": 256
    },
    "z3_ordering_lemma": {
      "name": "approx_attention_io_floor_ordering",
      "proven": true
    }
  },
  "citations": {
    "approximate_regime": "arXiv:2605.23751 (2026) \u2014 approximate/sparse attention (v99b)",
    "flashattention": "Dao et al. 2022 (the O(N\u00b2d\u00b2/M) achievability)",
    "i_o_lower_bound": "Saha & Ye, arXiv:2402.07443 (2024) \u2014 The I/O Complexity of Attention",
    "pebble_game": "Hong & Kung, 'I/O complexity: the red-blue pebble game', 1981"
  },
  "compliance_oracle": {
    "foil": {
      "claimed_io_words": 1048576,
      "verdict": "FLAG"
    },
    "foil_below_floor_flagged": true,
    "note": "the converse-gated oracle: a kernel claiming sub-floor I/O is FLAGged (impossible for exact attention even with fast matmul; must disclose approximation/sparsity)",
    "valid": {
      "claimed_io_words": 4194304,
      "verdict": "SAFE"
    },
    "valid_kernel_safe": true
  },
  "declared_model": {
    "attention": "exact softmax(Q K\u1d40) V, Q,K,V in R^{N x d}",
    "cost": "red-blue pebble-game I/O: accesses to slow memory (HBM) from a fast cache of M words",
    "per_part_entry_bound": "each M-partition part computes <= 2M\u00b2/d\u00b2 entries of QK\u1d40 (Saha-Ye, cited premise)",
    "regime": "M >= d\u00b2 (the large-cache regime where FlashAttention is I/O-optimal)"
  },
  "executed": true,
  "explicit_non_claim": "NOT a claim about a specific chip's measured I/O (the red-blue pebble game is a two-level-memory MODEL); the floor is for EXACT attention in the M >= d\u00b2 regime \u2014 APPROXIMATION/SPARSITY is a SEPARATE regime (arXiv:2605.23751, the v99b leg) that the oracle force-discloses, and fast matrix multiplication is COVERED (the floor holds even with FMM, via BCH codes). Lean certifies the ORDER only (the pebble per-part entry bound is a cited imported premise, never re-proven; the I/O magnitudes are the producer's exact arithmetic). A law of math is not patentable \u2014 the contribution is the machine-checked certifier + the converse-gated mechanism, not the bound itself. Booked EVIDENCE-ONLY; base byte-identical.",
  "flagship": {
    "M": 1048576,
    "N": 16384,
    "d": 128,
    "flash_over_floor": 2,
    "flashattention_io_words": 4194304,
    "floor_matches_pinned": true,
    "headline": "at N=16384 context, head-dim d=128, M=1048576 words (~2 MB fp16 SRAM), NO exact-attention kernel on any hardware can move less than 2,097,152 words \u2014 FlashAttention (2x the floor) is provably I/O-optimal; naive materialization is 259x worse; even fast matrix multiplication cannot beat the floor",
    "io_floor_bytes_fp16": 4194304,
    "io_floor_words": 2097152,
    "naive_io_words": 543162368,
    "naive_over_floor": 259
  },
  "flashattention_optimal_within_factor_2_all_configs": true,
  "grid": [
    {
      "M": 262144,
      "N": 4096,
      "d": 64,
      "flash_over_floor": 2,
      "flashattention_io_words": 262144,
      "io_floor_words": 131072,
      "naive_io_words": 34340864,
      "naive_over_floor": 262,
      "ordered": true,
      "regime_M_ge_d2": true
    },
    {
      "M": 262144,
      "N": 4096,
      "d": 128,
      "flash_over_floor": 2,
      "flashattention_io_words": 1048576,
      "io_floor_words": 524288,
      "naive_io_words": 35127296,
      "naive_over_floor": 67,
      "ordered": true,
      "regime_M_ge_d2": true
    },
    {
      "M": 1048576,
      "N": 16384,
      "d": 64,
      "flash_over_floor": 2,
      "flashattention_io_words": 1048576,
      "io_floor_words": 524288,
      "naive_io_words": 540016640,
      "naive_over_floor": 1030,
      "ordered": true,
      "regime_M_ge_d2": true
    },
    {
      "M": 1048576,
      "N": 16384,
      "d": 128,
      "flash_over_floor": 2,
      "flashattention_io_words": 4194304,
      "io_floor_words": 2097152,
      "naive_io_words": 543162368,
      "naive_over_floor": 259,
      "ordered": true,
      "regime_M_ge_d2": true
    },
    {
      "M": 4194304,
      "N": 65536,
      "d": 128,
      "flash_over_floor": 2,
      "flashattention_io_words": 16777216,
      "io_floor_words": 8388608,
      "naive_io_words": 8615100416,
      "naive_over_floor": 1027,
      "ordered": true,
      "regime_M_ge_d2": true
    }
  ],
  "honest_scope": "An EXACT machine-checked lower bound in the declared red-blue pebble-game two-level-memory model for EXACT attention with M >= d\u00b2: the floor N\u00b2d\u00b2/(2M) is computed in exact rational arithmetic, the ordering is z3-certified AND kernel-checked in Lean (6 theorems), FlashAttention is optimal within factor 2, and the compliance oracle FLAGs any sub-floor claim. We own the certifier + the gated oracle, NOT the theorem (Saha-Ye's / Hong-Kung's) \u2014 Alice/Mayo. MODEL, NOT OTA.",
  "lean_rung": {
    "build_rc": 0,
    "credited": true,
    "n_v99_theorems": 16,
    "n_v99_verified": 16
  },
  "schema": "attention-io-floor-v99",
  "skipped": false,
  "wall_banner_untouched": {
    "checked": true,
    "unchanged": true
  },
  "z3_ordering_lemma": {
    "name": "io_floor_ordering",
    "proven": true,
    "tier": "z3-lra"
  }
}
