All proofs
Project-declaredLean 4.32.0 · mathlib@81a5d257

Rel Triple prod

OracleComp.ProgramLogic.Relational.relTriple_prod

Plain-language statement

Core lift: two support-style unary postconditions combine into a relational coupling. The product coupling evalDist oa ⊗ evalDist ob witnesses the conjunction, using the canonical MonadLiftT (OracleComp spec) PMF to ensure neither side has failure mass.

Exact Lean statement

theorem relTriple_prod {oa : OracleComp spec₁ α} {ob : OracleComp spec₂ β}
    {P : α → Prop} {Q : β → Prop} (hP : ∀ a ∈ support oa, P a) (hQ : ∀ b ∈ support ob, Q b) :
    RelTriple oa ob (fun a b => P a ∧ Q b)

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem relTriple_prod {oa : OracleComp spec₁ α} {ob : OracleComp spec₂ β}    {P : α  Prop} {Q : β  Prop} (hP :  a  support oa, P a) (hQ :  b  support ob, Q b) :    RelTriple oa ob (fun a b => P a  Q b) := by  rw [relTriple_iff_relWP, relWP_iff_couplingPost]  have hp : (𝒟[oa]).toPMF none = 0 := probFailure_eq_zero (mx := oa)  have hq : (𝒟[ob]).toPMF none = 0 := probFailure_eq_zero (mx := ob)  refine _root_.SPMF.Coupling.prod hp hq, ?_  intro z hz  rcases (mem_support_bind_iff (𝒟[oa])    (fun a => 𝒟[ob] >>= fun b => (pure (a, b) : SPMF (α × β))) z).1 hz with    a, ha, hz'  have ha_supp : a  support oa :=    (mem_support_iff (mx := oa) (x := a)).2      (by simpa [probOutput_def] using (mem_support_iff (mx := 𝒟[oa]) (x := a)).1 ha)  rcases (mem_support_bind_iff (𝒟[ob])    (fun b => (pure (a, b) : SPMF (α × β))) z).1 hz' with b, hb, hz''  have hb_supp : b  support ob :=    (mem_support_iff (mx := ob) (x := b)).2      (by simpa [probOutput_def] using (mem_support_iff (mx := 𝒟[ob]) (x := b)).1 hb)  obtain rfl : z = (a, b) := by simpa [support_pure, Set.mem_singleton_iff] using hz''  exact hP a ha_supp, hQ b hb_supp
Project
VCVio
License
Apache-2.0
Commit
2ceb2d825ee3
Source
VCVio/ProgramLogic/Relational/FromUnary.lean:47-67

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.32.0

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.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.0

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.

program verificationseparation logiccryptography

Source project: VCVio

Person-level attribution pending.

View proof record