Eval Dist uniform Sample map comp injective
evalDist_uniformSample_map_comp_injective
Plain-language statement
Restricting a uniform function table to a subdomain along an injection is uniform. For an injection e : A → B between finite types, drawing a uniform table g : B → R and restricting it along e (i.e. g ∘ e) yields the uniform distribution on A → R. This is the marginalization of the uniform (product) distribution on B → R onto the block of...
Exact Lean statement
lemma evalDist_uniformSample_map_comp_injective
{A B R : Type} [Finite A] [Finite B] [Finite R]
[Nonempty R] [SampleableType R] [SampleableType (A → R)] [SampleableType (B → R)]
{e : A → B} (he : Function.Injective e) :
𝒟[do let g ← $ᵗ (B → R); pure (g ∘ e)] = 𝒟[$ᵗ (A → R)]Formal artifact
Lean source
lemma evalDist_uniformSample_map_comp_injective {A B R : Type} [Finite A] [Finite B] [Finite R] [Nonempty R] [SampleableType R] [SampleableType (A → R)] [SampleableType (B → R)] {e : A → B} (he : Function.Injective e) : 𝒟[do let g ← $ᵗ (B → R); pure (g ∘ e)] = 𝒟[$ᵗ (A → R)] := by classical letI := Fintype.ofFinite A letI := Fintype.ofFinite B letI := Fintype.ofFinite R letI : Inhabited R := Classical.inhabited_of_nonempty inferInstance set C := {b : B // b ∉ Set.range e} -- A table `g : B → R` is determined by its restriction `g ∘ e` along `e` and its values off -- `range e`, splitting `B → R` as the product `(A → R) × (C → R)` via the reindexing of `B` by -- `A ⊕ C` along `e` and the complement inclusion. set φ : (B → R) ≃ (A → R) × (C → R) := (Equiv.arrowCongr ((Equiv.Set.sumCompl (Set.range e)).symm.trans ((Equiv.ofInjective e he).symm.sumCongr (Equiv.refl C))) (Equiv.refl R)).trans (Equiv.sumArrowEquivProdArrow _ _ _) have hφ1 : ∀ g : B → R, (φ g).1 = g ∘ e := fun g => funext fun a => by simp [φ, Equiv.sumArrowEquivProdArrow, Equiv.ofInjective] calc 𝒟[do let g ← $ᵗ (B → R); pure (g ∘ e)] = 𝒟[Prod.fst <$> (φ <$> ($ᵗ (B → R)))] := by simp only [bind_pure_comp, Functor.map_map, Function.comp_def, hφ1] _ = 𝒟[Prod.fst <$> ($ᵗ ((A → R) × (C → R)))] := by rw [evalDist_map, evalDist_ext fun p => probOutput_map_bijective_uniform_cross (α := B → R) φ φ.bijective p, ← evalDist_map] _ = 𝒟[$ᵗ (A → R)] := evalDist_map_fst_uniformSample_prod- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/OracleComp/Constructions/SampleableType.lean:527-553
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
Expected Cost Nat eq sum tail probs of pathwise Cost At Most
AddWriterT.expectedCostNat_eq_sum_tail_probs_of_pathwiseCostAtMost
Plain-language statement
Finite tail-sum formula for natural-valued writer cost under a pathwise upper bound. If every execution path of oa incurs cost at most n, then the tail probabilities vanish above n, so the infinite tail sum truncates to Finset.range n.
Source project: VCVio
Person-level attribution pending.
IND CPA advantage to Real le sum step signed Advantage Real abs
AsymmEncAlg.IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs
Plain-language statement
Planned generic one-time-to-many-time lift: bounded multi-query IND-CPA advantage is at most the sum of the extracted one-time signed advantages over the first q fresh LR queries.
Source project: VCVio
Person-level attribution pending.
IND CPA LR hybrid Game q eval Dist eq left of Makes At Most Queries
AsymmEncAlg.IND_CPA_LR_hybridGame_q_evalDist_eq_left_of_MakesAtMostQueries
Plain-language statement
If an adversary makes at most q fresh LR queries, then the leftUntil = q LR-hybrid is the all-left endpoint game.
Source project: VCVio
Person-level attribution pending.