Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — Evergreen_Prediction_MartingalePrediction

Definition
Evergreen_Prediction_MartingalePrediction

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogevergreen

Definition bundle for the Aether Catalog module Evergreen.Prediction.MartingalePrediction, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from Evergreen/Prediction/MartingalePrediction.lean by skeleton subtraction
import Mathlib
/-
  # Martingale Theory of Prediction
-/


open Finset BigOperators Filter

namespace MartingalePrediction

/-! ## Section 1: Discrete Martingales -/

def isSupermartingale (X : ℕ → ℝ) : Prop :=
  ∀ n, X (n + 1) ≤ X n

def isSubmartingale (X : ℕ → ℝ) : Prop :=
  ∀ n, X n ≤ X (n + 1)

def isMartingale (X : ℕ → ℝ) : Prop :=
  ∀ n, X (n + 1) = X n




/-! ## Section 2: Prediction Markets -/

structure PredictionMarket where
  price : ℝ
  price_nonneg : 0 ≤ price
  price_le_one : price ≤ 1

def MarketHistory := ℕ → PredictionMarket

def isEfficient (history : MarketHistory) : Prop :=
  isMartingale (fun n => (history n).price)


/-! ## Section 3: The Doob Decomposition -/



/-! ## Section 4: Bounded Differences -/

def hasBoundedIncrements (X : ℕ → ℝ) (c : ℝ) : Prop :=
  ∀ n, |X (n + 1) - X n| ≤ c

/-
PROVIDED SOLUTION
By induction on n. Base: |X 0 - X 0| = 0 ≤ 0 = 0 * c. Step: |X (n+1) - X 0| = |(X(n+1) - X n) + (X n - X 0)| ≤ |X(n+1) - X n| + |X n - X 0| ≤ c + n*c = (n+1)*c by triangle inequality, hX n, and IH. Use abs_add (or abs_add_le) for triangle inequality, then add_le_add, then show c + n*c = (n+1)*c via ring or push_cast.
-/

/-! ## Section 5: Prediction Convergence -/


/-- Exponential smoothing predictor -/
noncomputable def exponentialSmoothing (seq : ℕ → ℝ) (α_param : ℝ) : ℕ → ℝ
  | 0 => seq 0
  | n + 1 => α_param * seq (n + 1) + (1 - α_param) * exponentialSmoothing seq α_param n


end MartingalePrediction

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me