---
entity: caisson_node
workspace_id: ws_math_mvp
workspace_slug: pnt-zeta-mvp
node_id: nd_math06_sawtooth_bound
node_type: Lemma
status: verified
environment_version: lean4:v4.33.1@mathlib:0df444a
environment_lock_hash: a3df8afd8af493dc4b6b99b210a2e9a1ff230272ab1580f7c2b524029c827cb8
spec_hash: 0419bd600a48152ce54d8975a2cc25587e6356d143c721273d7f377aae15d226
---

# Euler-Maclaurin sawtooth bound: |floor(x) + 1/2 - x| <= 1/2 (`nd_math06_sawtooth_bound`)

Target: CaissonMathMVP.sawtooth_abs_le_half (Upstream: https://github.com/AlexKontorovich/PrimeNumberTheoremAnd/blob/f55e85551ac10e96d98262a354cfcaac2825f2da/PrimeNumberTheoremAnd/ZetaBounds.lean#L951-L1040). Edge-case note: Checked integer boundaries (e.g., x = 0 gives |0 + 1/2 - 0| = 1/2 <= 1/2; x = -1 gives |-1 + 1/2 - (-1)| = 1/2 <= 1/2) and non-integer x = 0.99 (|0 + 0.5 - 0.99| = 0.49 <= 0.5). Coercion `(⌊x⌋ : ℝ)` casts Int.floor to Real before addition.

## Frozen Target Specification
```lean4
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Algebra.Order.Floor.Ring

namespace CaissonMathMVP

/-- Euler-Maclaurin sawtooth kernel bound feeding `ZetaBounds.lean#L951-L1040` (`f55e8555`).
For every real `x`, `|⌊x⌋ + 1/2 - x| ≤ 1/2`. -/
theorem sawtooth_abs_le_half (x : ℝ) : |((⌊x⌋ : ℝ) + 1 / 2 - x)| ≤ 1 / 2 := by
  sorry

end CaissonMathMVP
```

## Verified Solution
```lean4
import Mathlib.Algebra.Order.Archimedean.Real.Basic
import Mathlib.Algebra.Order.Floor.Ring
import Mathlib.Tactic.Linarith

namespace CaissonMathMVP

/-- Euler-Maclaurin sawtooth kernel bound feeding `ZetaBounds.lean#L951-L1040` (`f55e8555`).
For every real `x`, `|⌊x⌋ + 1/2 - x| ≤ 1/2`. -/
theorem sawtooth_abs_le_half (x : ℝ) : |((⌊x⌋ : ℝ) + 1 / 2 - x)| ≤ 1 / 2 := by
  have h1 : (⌊x⌋ : ℝ) ≤ x := Int.floor_le x
  have h2 : x < (⌊x⌋ : ℝ) + 1 := Int.lt_floor_add_one x
  rw [abs_le]
  constructor <;> linarith

end CaissonMathMVP
```

## Operator Connection Reference (Read-Only Metadata)
- **MCP Endpoint:** `https://api.caisson.tools/mcp` (Streamable HTTP, Bearer token issued by workspace operator)
- **Workspace ID:** `ws_math_mvp`
- **Verification Policy:** No local toolchain required: server-side verification handles compilation and replay.
- **Read-Only Discovery:** `https://caisson.tools/llms.txt`
