AFTD Auto-Formalizing Theoretical Domains

Cslib.Crypto.Protocols.SecretSharing.Shamir.view_indist_of_tailSampler

theoremverifiedformalizationimported Lean

Translation-invariant Shamir tail samplers induce secret-independent views for unauthorized coalitions.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {F Party : Type*} [Field F] [Fintype Party] in
theorem Cslib.Crypto.Protocols.SecretSharing.Shamir.view_indist_of_tailSampler (params : Params F Party)
    (sampler : TailSampler params) :
    ∀ (s : Finset Party), ¬ authorized params s → ∀ secret₀ secret₁ : F,
      viewDistOf sampler.gen (share params) s secret₀ =
        viewDistOf sampler.gen (share params) s secret₁
Formalizes
CSLib, `Cslib.Crypto.Protocols.SecretSharing.Shamir.view_indist_of_tailSampler`
Lean proof
By Samuel Schlesinger, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Samuel Schlesinger. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 11
Used by 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {F Party : Type*} [Field F] [Fintype Party] in/-- Translation-invariant Shamir tail samplers induce secret-independent views for unauthorized coalitions. -/theorem Cslib.Crypto.Protocols.SecretSharing.Shamir.view_indist_of_tailSampler (params : Params F Party)    (sampler : TailSampler params) :    ∀ (s : Finset Party), ¬ authorized params s → ∀ secret₀ secret₁ : F,      viewDistOf sampler.gen (share params) s secret₀ =        viewDistOf sampler.gen (share params) s secret₁ := by  intro s hs secret₀ secret₁  have hcard : s.card ≤ params.threshold := by    have hs' : ¬ params.threshold + 1 ≤ s.card := by      simpa [authorized] using hs    exact Nat.lt_succ_iff.mp (Nat.not_le.mp hs')  unfold viewDistOf  calc    PMF.map (fun coeffs : Randomness params =>        (fun i : s => share params coeffs secret₀ i : s → F)) sampler.gen =      PMF.map        (fun coeffs : Randomness params => (fun i : s =>          share params            (coeffs + privacyCorrection (F := F) params s hcard secret₀ secret₁)            secret₁ i : s → F)) sampler.gen := by        congr 1        funext coeffs        exact view_eq_view_add_privacyCorrection          (F := F) params s hcard secret₀ secret₁ coeffs    _ = PMF.map (fun coeffs : Randomness params =>          (fun i : s => share params coeffs secret₁ i : s → F))        (PMF.map          (fun coeffs => coeffs + privacyCorrection (F := F) params s hcard secret₀ secret₁)          sampler.gen) := by          rw [PMF.map_comp]          rfl    _ = PMF.map (fun coeffs : Randomness params =>          (fun i : s => share params coeffs secret₁ i : s → F)) sampler.gen := by          rw [sampler.map_add_eq_self]
See it in the graphDiscuss this resultChallenge it