Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — Cryptography_GradedEncoding_SecurityReduction

Definition
Cryptography_GradedEncoding_SecurityReduction

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

aether-catalogcryptography

Definition bundle for the Aether Catalog module Cryptography.GradedEncoding.SecurityReduction, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from Cryptography/GradedEncoding/SecurityReduction.lean by skeleton subtraction
import Mathlib
import Definitions.Def_Cryptography_GradedEncoding_Foundations
import Definitions.Def_Cryptography_LWE_OperationalSecurity

/-!
# Security reductions for multilinear graded encodings

The reduction layer is independent of any particular graded-encoding candidate.
A decisional multilinear Diffie--Hellman game is represented by its two finite
transcript distributions. A perfect reduction is an equivalence of transcript
spaces preserving both distributions pointwise. The main theorem proves exact
preservation of every deterministic distinguisher's advantage and transfers any
source hardness bound to the graded target game.
-/

open Finset

noncomputable section

namespace Cryptography.GradedEncoding

/-- A finite two-world decisional game. `false` is the random world and `true`
is the real multilinear Diffie--Hellman world. -/
structure DecisionGame (Ω : Type*) [Fintype Ω] where
  experiment : LWEOperational.EncryptionExperiment Ω

namespace DecisionGame

variable {Ω : Type*} [Fintype Ω]

/-- Acceptance probability of a deterministic distinguisher in one world. -/
def acceptance (G : DecisionGame Ω) (b : Bool) (A : Ω → Bool) : ℝ :=
  ∑ x with A x = true, (G.experiment.challenge b).mass x

/-- Absolute distinguishing advantage. -/
def advantage (G : DecisionGame Ω) (A : Ω → Bool) : ℝ :=
  |G.acceptance true A - G.acceptance false A|


end DecisionGame

variable {Source Target : Type*} [Fintype Source] [Fintype Target]

/-- A perfect, lossless reduction between finite decisional games. The transcript
equivalence is executable, while `mass_preserving` states exact simulation of
both challenge worlds. -/
structure PerfectReduction (source : DecisionGame Source)
    (target : DecisionGame Target) where
  transcriptEquiv : Source ≃ Target
  mass_preserving : ∀ (b : Bool) (x : Source),
    (target.experiment.challenge b).mass (transcriptEquiv x) =
      (source.experiment.challenge b).mass x

namespace PerfectReduction

variable {source : DecisionGame Source} {target : DecisionGame Target}

/-- Turn a target-game distinguisher into a source-game distinguisher. -/
def reduce (red : PerfectReduction source target) (A : Target → Bool) : Source → Bool :=
  A ∘ red.transcriptEquiv





end PerfectReduction

namespace DecisionGame



end DecisionGame
end Cryptography.GradedEncoding

end

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