Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions of TypedPresentation: The typed introspection CL presentation The three-level Pauli presentations are retained verbatim

Definition
MIPRE_Foundations_Introspection_TypedPresentation

by thomasvidick · Oct 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

introspectionmip-remipre-formalizationverifiers

The definitions of the module MIPRE.Foundations.Introspection.TypedPresentation of the MIP* = RE formalization (commit 70cbf1c of vidick/MIPRE-formalization). The typed introspection CL presentation. The three-level Pauli presentations are retained verbatim. Every auxiliary type uses the zero presentation, padded to three levels with a full factor partition. Both players use the same family. The corresponding finite game has an exactly uniform ordered-edge law, and the cross-introspection edge asks the two zero-content questions with probability the inverse edge count.

Definitions (2): MIPRE.Introspection.TypedPresentation.family (The typed sampler's complete three-level CL family.); MIPRE.Introspection.TypedPresentation.game (The actual finite typed introspection game, for the supplied decision predicate.).

Embedded lemmas (1): the small results the bodies of these definitions need (proof fields, simp rules, decidability and finiteness instances), proved inside the bundle so that it imports no unproved statement: eval_aux.

Formalization Note The bundle is the module MIPRE.Foundations.Introspection.TypedPresentation (MIPRE/Foundations/Introspection/TypedPresentation.lean) with every declaration not listed removed, imports rewritten to the bundles of the module's import closure; the declarations keep their names, statements and bodies; the source module is split over 16 imported bundle(s).

Definition code
/-
Copyright (c) 2026 MIPRE contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-/
/- Generated for Prove2Me from vidick/MIPRE-formalization@70cbf1c, MIPRE/Foundations/Introspection/TypedPresentation.lean (definition bundle: declarations the uploaded statements rest on);
   produced mechanically by prove2me/tools/gen.py, never edited by hand. -/
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Analysis.CStarAlgebra.CStarMatrix
import Mathlib.Analysis.CStarAlgebra.Classes
import Mathlib.Analysis.Matrix.Order
import Mathlib.Data.ENat.Lattice
import Mathlib.Data.Finset.Image
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sum
import Mathlib.Data.List.Basic
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Notation
import Mathlib.Data.Nat.Size
import Mathlib.Data.Real.Basic
import Mathlib.Data.ZMod.Basic
import Mathlib.LinearAlgebra.Matrix.Kronecker
import Mathlib.LinearAlgebra.Pi
import Mathlib.Tactic.DeriveFintype
import Definitions.Def_MIPRE_Foundations_Games
import Definitions.Def_MIPRE_Foundations_CL_Register
import Definitions.Def_MIPRE_Foundations_CL_Basic
import Definitions.Def_MIPRE_Foundations_Cost_Basic_B
import Definitions.Def_MIPRE_Foundations_Cost_Encoding_B
import Definitions.Def_MIPRE_Foundations_CL_Closure_B
import Definitions.Def_MIPRE_Foundations_GameTransport
import Definitions.Def_MIPRE_Foundations_GameAdapt
import Definitions.Def_MIPRE_Foundations_CL_Embedding
import Definitions.Def_MIPRE_Foundations_CL_Graph
import Definitions.Def_MIPRE_Foundations_CL_Detyping
import Definitions.Def_MIPRE_Foundations_CL_DetypingLaw
import Definitions.Def_MIPRE_Foundations_SampledGame
import Definitions.Def_MIPRE_Foundations_CL_DetypingGame
import Definitions.Def_MIPRE_Foundations_Introspection_Types
import Definitions.Def_MIPRE_Foundations_Introspection_TypeGraph
import Theorems.Thm_MIPRE_CL_CLFun_factorOfPrefix_zeroOn
import Theorems.Thm_MIPRE_CL_CLFun_mapOfPrefix_zeroOn
import Theorems.Thm_MIPRE_Introspection_TypeGraph_edges_nonempty

/-! # The typed introspection CL presentation

The three-level Pauli presentations are retained verbatim. Every auxiliary
type uses the zero presentation, padded to three levels with a full factor
partition. Both players use the same family. The corresponding finite game
has an exactly uniform ordered-edge law, and the cross-introspection edge
asks the two zero-content questions with probability the inverse edge count.
-/

noncomputable section

namespace MIPRE.Introspection.TypedPresentation

open Finset Classical

variable {PauliType F ι : Type*} [Fintype ι] [DecidableEq ι] [Semiring F] {ℓ : ℕ}

/-- The typed sampler's complete three-level CL family. -/
def family (P : PauliType → CL.CLFun F ι 3) : QuestionType PauliType ℓ → CL.CLFun F ι 3
  | .inl p => P p
  | .inr _ => CL.CLFun.zeroOn univ 3

/-- All auxiliary questions have zero content. -/
@[simp] theorem eval_aux (P : PauliType → CL.CLFun F ι 3) (t : AuxType ℓ)
    (w : Bool) (z : ι → F) : (family P (.inr (t, w))).eval z = 0 :=
  CL.CLFun.eval_zeroOn univ 3 z

section Game

variable [Fintype PauliType] [DecidableEq PauliType]
  {A B : Type*} [Fintype A] [Fintype B]

/-- The actual finite typed introspection game, for the supplied decision predicate. -/
def game (E : PauliType → PauliType → Bool) (X Z : PauliType) (ℓ : ℕ)
    (P : PauliType → CL.CLFun (ZMod 2) ι 3)
    (D : CL.Detyping.Question (QuestionType PauliType ℓ) ι →
      CL.Detyping.Question (QuestionType PauliType ℓ) ι → A → B → Bool) :=
  CL.Detyping.typedGame (TypeGraph.Adj E X Z) (TypeGraph.edges_nonempty E X Z ℓ)
    (fun _ => family P) D

end Game
end MIPRE.Introspection.TypedPresentation
Source
https://github.com/vidick/MIPRE-formalization/blob/70cbf1c52e3d5e1dff1162fdf952c9a9f4bd99ed/MIPRE/Foundations/Introspection/TypedPresentation.lean

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