All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Perfectly Secret iff indep

Cslib.Crypto.Protocols.PerfectSecrecy.perfectlySecret_iff_indep

Plain-language statement

Perfect secrecy is equivalent to message-ciphertext independence. The two formulations are related by multiplying/dividing by marginal(c).

Exact Lean statement

theorem perfectlySecret_iff_indep (scheme : EncScheme M K C) :
    scheme.PerfectlySecret ↔
    ∀ (msgDist : PMF M) (m : M) (c : C),
      scheme.jointDist msgDist (m, c) =
        msgDist m * scheme.marginalCiphertextDist msgDist c

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem perfectlySecret_iff_indep (scheme : EncScheme M K C) :    scheme.PerfectlySecret      (msgDist : PMF M) (m : M) (c : C),      scheme.jointDist msgDist (m, c) =        msgDist m * scheme.marginalCiphertextDist msgDist c := by  constructor  · intro h msgDist m c    by_cases hc : (scheme.marginalCiphertextDist msgDist) c = 0    · have := ENNReal.tsum_eq_zero.mp        ((jointDist_tsum_fst scheme msgDist c).trans hc) m      rw [this, hc, mul_zero]    · have hne_top := ne_top_of_le_ne_top one_ne_top        (PMF.coe_le_one (scheme.marginalCiphertextDist msgDist) c)      have := DFunLike.congr_fun (h msgDist c ((PMF.mem_support_iff _ _).mpr hc)) m      simp only [EncScheme.posteriorMsgDist_apply] at this      rw [ this, ENNReal.div_mul_cancel hc hne_top]  · intro h msgDist c hc; ext m    simp only [EncScheme.posteriorMsgDist_apply]    rw [h msgDist m c, ENNReal.mul_div_cancel_right      ((PMF.mem_support_iff _ _).mp hc)      (ne_top_of_le_ne_top one_ne_top (PMF.coe_le_one _ c))]
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Crypto/Protocols/PerfectSecrecy/Internal/PerfectSecrecy.lean:44-64

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record