Documentation

Determinize.Proof.Symbolic.TraceLaws

Trace laws of a symbolic configuration #

actualTraceLaw is the exact-depth trace/output law of the source realized under the history's actual law and targetTraceLaw that of the target realized at the history's mean environment: the two laws the lockstep argument compares (CompactFiberSoundness). This file unfolds them along values, deterministic steps and rejections.

theorem Determinize.Proof.StepTraces.map_bind_fun {α : Type u_1} {β : Type u_2} {γ : Type u_3} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] (law : MeasureTheory.Measure α) (family : α → MeasureTheory.Measure β) (hm : Measurable family) (f : β → γ) (hf : Measurable f) :
MeasureTheory.Measure.map f (law.bind family) = law.bind fun (a : α) => MeasureTheory.Measure.map f (family a)
noncomputable def Determinize.Proof.StepTraces.averageKernel {α : Type u_1} {β : Type u_2} {γ : Type u_3} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] (law : MeasureTheory.Measure β) [MeasureTheory.SFinite law] (body : Paper.SFiniteKernel (α × β) γ) :

Average body over a draw from law paired with the parameter (averageKernel_apply).

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Determinize.Proof.StepTraces.averageKernel_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] (law : MeasureTheory.Measure β) [MeasureTheory.SFinite law] (body : Paper.SFiniteKernel (α × β) γ) (parameter : α) :
    (averageKernel law body).kernel parameter = law.bind fun (value : β) => body.kernel (parameter, value)

    The exact-depth trace/output law of the source: exactMeasure of the realization, integrated over the history's actual law.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The exact-depth trace/output law of the target: exactMeasure of the determinized realization at the history's mean environment.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Determinize.Proof.StepTraces.sampleE_opNone {context : List Spec.Paper.Ty} {sampleCount✝ : ℕ} {expression : Paper.Symbolic.AffineExpr sampleCount✝} {ty : Spec.Paper.Ty} {op : Spec.Paper.Op} {affine : List (Paper.Symbolic.Affine sampleCount✝)} {general : List ℝ} {continuation : Paper.Symbolic.AffineExpr (sampleCount✝ + 1)} (typed : Paper.Symbolic.AffineExpr.WellTyped context expression ty) (actionEq : expression.symbolicReduce = Paper.Symbolic.AffineExpr.SymbolicAction.sampleE op affine general continuation) :
        theorem Determinize.Proof.StepTraces.sampleG_opSome {context : List Spec.Paper.Ty} {sampleCount✝ : ℕ} {expression : Paper.Symbolic.AffineExpr sampleCount✝} {ty : Spec.Paper.Ty} {site : Spec.Paper.DistributionAction × Spec.Paper.Op} {fiber : MeasureTheory.Measure ℝ} {continuation : ℝ → Paper.Symbolic.AffineExpr sampleCount✝} (typed : Paper.Symbolic.AffineExpr.WellTyped context expression ty) (actionEq : expression.symbolicReduce = Paper.Symbolic.AffineExpr.SymbolicAction.sampleG site fiber continuation) :
        ∃ (op : Spec.Paper.Op), generationOp expression.skeleton = some op
        theorem Determinize.Proof.StepTraces.actualTraceLaw_succ_value {n : ℕ} (depth : ℕ) (history : Paper.Symbolic.SampleEnv Paper.primitiveLaws n) (expression : Paper.Symbolic.AffineExpr n) (value : expression.isValue = true) :
        actualTraceLaw (depth + 1) history expression = 0

        A value has no trace at a positive depth.

        theorem Determinize.Proof.StepTraces.targetTraceLaw_succ_value {n : ℕ} (depth : ℕ) (history : Paper.Symbolic.SampleEnv Paper.primitiveLaws n) (expression : Paper.Symbolic.AffineExpr n) (value : expression.isValue = true) :
        targetTraceLaw (depth + 1) history expression = 0

        A value has no trace at a positive depth, on the target side either.

        An expression that is not a value has no trace at depth zero.

        An expression that is not a value has no trace at depth zero, on the target side either.

        theorem Determinize.Proof.StepTraces.actualTraceLaw_next {n : ℕ} {ty : Spec.Paper.Ty} (depth : ℕ) (history : Paper.Symbolic.SampleEnv Paper.primitiveLaws n) (expression next : Paper.Symbolic.AffineExpr n) (typed : Paper.Symbolic.AffineExpr.WellTyped [] expression ty) (notValue : expression.isValue ≠ true) (actionEq : expression.symbolicReduce = Paper.Symbolic.AffineExpr.SymbolicAction.next next) :
        actualTraceLaw (depth + 1) history expression = MeasureTheory.Measure.map (prepend none) (actualTraceLaw depth history next)

        A deterministic step keeps the trace law, up to the recorded empty event.

        theorem Determinize.Proof.StepTraces.targetTraceLaw_next {n : ℕ} {ty : Spec.Paper.Ty} (depth : ℕ) (history : Paper.Symbolic.SampleEnv Paper.primitiveLaws n) (expression next : Paper.Symbolic.AffineExpr n) (typed : Paper.Symbolic.AffineExpr.WellTyped [] expression ty) (notValue : expression.isValue ≠ true) (actionEq : expression.symbolicReduce = Paper.Symbolic.AffineExpr.SymbolicAction.next next) :
        targetTraceLaw (depth + 1) history expression = MeasureTheory.Measure.map (prepend none) (targetTraceLaw depth history next)

        A deterministic step keeps the target trace law, up to the recorded empty event.