Provedalphabaguettealgorithm-ideac9
Adding any prefix-only feature to a causal model keeps it causal (no target leakage)
For all , and , if and , then
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - x ∈ TVariables
- α, β, γ range over Type: the statement must hold for every choice. (
(α β γ : Type)) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - ⟹Implies
- If ℕ, then α. (Between types, A → B is the type of functions from A to B.) (
ℕ → α) - ×Product
- Pairs of an element of α and an element of β. (
α × β) - ∀For all
- The statement after the comma holds for every i. (
∀ i ≤ t, s i = s' i) - f(x)Function application
- s applied to i. Lean writes f x; papers write f(x). (
s i) - =Equality
- s(i) and s'(i) are the same. (
s i = s' i) - x ↦ f(x)Function (λ-abstraction)
- The function sending i to (s(i), φ(s, i)). Lean writes fun x => …; papers write x ↦ …. (
fun i => (s i, φ s i)) - (a, b)Tuple
- The ordered pair (or tuple) of s(i), φ(s, i). (
(s i, φ s i))
theorem copy-channel-preserves-causality {α β γ : Type} (φ : (ℕ → α) → ℕ → β) (M : (ℕ → α × β) → ℕ → γ) (hφ : ∀ s s' t, (∀ i ≤ t, s i = s' i) → φ s t = φ s' t) (hM : ∀ u u' t, (∀ i ≤ t, u i = u' i) → M u t = M u' t) :
∀ s s' t, (∀ i ≤ t, s i = s' i) → M (fun i => (s i, φ s i)) t = M (fun i => (s' i, φ s' i)) tIdea C9 (suffix-automaton copy channel). The copy feature φ at position t (e.g. the token after the longest earlier match of the current suffix) depends only on tokens ≤ t. Feeding the pair (token, feature) into a causal model M yields a model that is still causal, so training with the channel cannot leak targets.
How it was proved
- Proved
- 3 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- None
- Proof
- 18 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.