One-step unfoldings of the exact-depth law #
How exactMeasure (depth + 1) unfolds for a deterministic step, a rejection and a sampling
step.
theorem
Determinize.Proof.StepTraces.exact_succ_next
(depth : ℕ)
(expression next : Spec.Paper.Expr)
(notValue : expression.isValue ≠ true)
(reduction : Spec.Paper.reduce expression = Spec.Paper.Action.next next)
:
exactMeasure (depth + 1) expression = MeasureTheory.Measure.map (prepend none) (exactMeasure depth next)
theorem
Determinize.Proof.StepTraces.exact_succ_sample
{site : Spec.Paper.DistributionAction × Spec.Paper.Op}
(depth : ℕ)
(expression : Spec.Paper.Expr)
(fiber : MeasureTheory.Measure ℝ)
(continuation : ℝ → Spec.Paper.Expr)
(notValue : expression.isValue ≠ true)
(reduction : Spec.Paper.reduce expression = Spec.Paper.Action.sample site fiber continuation)
:
exactMeasure (depth + 1) expression = fiber.bind fun (value : ℝ) =>
MeasureTheory.Measure.map (prepend (entry (generationOp expression.skeleton) value))
(exactMeasure depth (continuation value))