Documentation

VCVio.EvalDist.BitVec

Evaluation Distributions of Computations with BitVec #

Lemmas about probOutput involving BitVec, generic over any monad m with [HasEvalSPMF m].

The SampleableType (BitVec n) instance is defined in VCVio.OracleComp.Constructions.SampleableType.

@[simp]
theorem probOutput_ofFin_map {m : TypeType u_1} [Monad m] [LawfulMonad m] [HasEvalSPMF m] {n : } (mx : m (Fin (2 ^ n))) (x : BitVec n) :
@[simp]
theorem probOutput_bitVec_toFin_map {m : TypeType u_1} [Monad m] [LawfulMonad m] [HasEvalSPMF m] {n : } (mx : m (BitVec n)) (x : Fin (2 ^ n)) :
Pr[= x | BitVec.toFin <$> mx] = Pr[= { toFin := x } | mx]
@[simp]
theorem probOutput_xor_map {m : TypeType u_1} [Monad m] [LawfulMonad m] [HasEvalSPMF m] {n : } (mx : m (BitVec n)) (x y : BitVec n) :
Pr[= y | (fun (x_1 : BitVec n) => x ^^^ x_1) <$> mx] = Pr[= x ^^^ y | mx]