Symbolic language and reduction #
Expressions carry affine functions of earlier expectation-affinity samples. The symbolic reducer records those samples while preserving a fixed residual shape.
Symbolic expressions over sampleCount E-affinity draws: the paper syntax with every
real literal an affine form in those draws.
Equations
- Determinize.Proof.Paper.Symbolic.AffineExpr sampleCount = Determinize.Spec.Paper.Expr (Determinize.Proof.Paper.Symbolic.Affine sampleCount)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate every affine literal at environment, giving a concrete expression.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.realize environment Determinize.Spec.Paper.Expr.unit = Determinize.Spec.Paper.Expr.unit
- Determinize.Proof.Paper.Symbolic.AffineExpr.realize environment Determinize.Spec.Paper.Expr.reject = Determinize.Spec.Paper.Expr.reject
- Determinize.Proof.Paper.Symbolic.AffineExpr.realize environment Determinize.Spec.Paper.Expr.nil = Determinize.Spec.Paper.Expr.nil
Instances For
Equations
Instances For
The skeleton of every realization, which does not depend on the environment
(realize_skeleton).
Equations
Instances For
Equations
Instances For
Instances For
Embed a source program, every literal becoming a constant affine form (realize_ofExpr).
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.ofExpr Determinize.Spec.Paper.Expr.unit = Determinize.Spec.Paper.Expr.unit
- Determinize.Proof.Paper.Symbolic.AffineExpr.ofExpr Determinize.Spec.Paper.Expr.reject = Determinize.Spec.Paper.Expr.reject
- Determinize.Proof.Paper.Symbolic.AffineExpr.ofExpr Determinize.Spec.Paper.Expr.nil = Determinize.Spec.Paper.Expr.nil
Instances For
Apply transform to every affine literal.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.mapAffine transform Determinize.Spec.Paper.Expr.unit = Determinize.Spec.Paper.Expr.unit
- Determinize.Proof.Paper.Symbolic.AffineExpr.mapAffine transform Determinize.Spec.Paper.Expr.reject = Determinize.Spec.Paper.Expr.reject
- Determinize.Proof.Paper.Symbolic.AffineExpr.mapAffine transform Determinize.Spec.Paper.Expr.nil = Determinize.Spec.Paper.Expr.nil
Instances For
Equations
Instances For
The same expression over one more draw, which it does not mention (Affine.weaken).
Equations
Instances For
Equations
Instances For
Evaluate a primitive mean as an affine formula in the existing E samples.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- bvar {sampleCount : ℕ} {context : List Spec.Paper.Ty} {index : ℕ} {ty : Spec.Paper.Ty} : Spec.Paper.HasVar context index ty → WellTyped context (Spec.Paper.Expr.bvar Spec.Paper.DistributionAction index) ty
- reject {sampleCount : ℕ} {context : List Spec.Paper.Ty} {ty : Spec.Paper.Ty} : WellTyped context Spec.Paper.Expr.reject ty
- unit {sampleCount : ℕ} {context : List Spec.Paper.Ty} : WellTyped context Spec.Paper.Expr.unit Spec.Paper.Ty.unit
- bool {sampleCount : ℕ} {context : List Spec.Paper.Ty} {value : Bool} : WellTyped context (Spec.Paper.Expr.bool Spec.Paper.DistributionAction value) Spec.Paper.Ty.bool
- realE {sampleCount : ℕ} {context : List Spec.Paper.Ty} {value : Affine sampleCount} : WellTyped context (Spec.Paper.Expr.real Spec.Paper.DistributionAction value) (Spec.Paper.Ty.float Spec.Paper.Affinity.E)
- realG {sampleCount : ℕ} {value : Affine sampleCount} {context : List Spec.Paper.Ty} : value.2 = 0 → WellTyped context (Spec.Paper.Expr.real Spec.Paper.DistributionAction value) (Spec.Paper.Ty.float Spec.Paper.Affinity.G)
- lam {sampleCount : ℕ} {argument : Spec.Paper.Ty} {context : List Spec.Paper.Ty} {body : AffineExpr sampleCount} {result : Spec.Paper.Ty} : WellTyped (argument :: context) body result → WellTyped context (Spec.Paper.Expr.lam Spec.Paper.DistributionAction body) (argument.arr result)
- fix {sampleCount : ℕ} {argument result : Spec.Paper.Ty} {context : List Spec.Paper.Ty} {body : AffineExpr sampleCount} : WellTyped (argument :: argument.arr result :: context) body result → WellTyped context (Spec.Paper.Expr.fix Spec.Paper.DistributionAction body) (argument.arr result)
- app {sampleCount : ℕ} {context : List Spec.Paper.Ty} {function : AffineExpr sampleCount} {argument result : Spec.Paper.Ty} {operand : AffineExpr sampleCount} : WellTyped context function (argument.arr result) → WellTyped context operand argument → WellTyped context (Spec.Paper.Expr.app Spec.Paper.DistributionAction function operand) result
- pair {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left : AffineExpr sampleCount} {leftTy : Spec.Paper.Ty} {right : AffineExpr sampleCount} {rightTy : Spec.Paper.Ty} : WellTyped context left leftTy → WellTyped context right rightTy → WellTyped context (Spec.Paper.Expr.pair Spec.Paper.DistributionAction left right) (leftTy.prod rightTy)
- fst {sampleCount : ℕ} {context : List Spec.Paper.Ty} {pairValue : AffineExpr sampleCount} {leftTy rightTy : Spec.Paper.Ty} : WellTyped context pairValue (leftTy.prod rightTy) → WellTyped context (Spec.Paper.Expr.fst Spec.Paper.DistributionAction pairValue) leftTy
- snd {sampleCount : ℕ} {context : List Spec.Paper.Ty} {pairValue : AffineExpr sampleCount} {leftTy rightTy : Spec.Paper.Ty} : WellTyped context pairValue (leftTy.prod rightTy) → WellTyped context (Spec.Paper.Expr.snd Spec.Paper.DistributionAction pairValue) rightTy
- inl {sampleCount : ℕ} {context : List Spec.Paper.Ty} {operand : AffineExpr sampleCount} {leftTy rightTy : Spec.Paper.Ty} : WellTyped context operand leftTy → WellTyped context (Spec.Paper.Expr.inl Spec.Paper.DistributionAction operand) (leftTy.sum rightTy)
- inr {sampleCount : ℕ} {context : List Spec.Paper.Ty} {operand : AffineExpr sampleCount} {rightTy leftTy : Spec.Paper.Ty} : WellTyped context operand rightTy → WellTyped context (Spec.Paper.Expr.inr Spec.Paper.DistributionAction operand) (leftTy.sum rightTy)
- matchSum {sampleCount : ℕ} {context : List Spec.Paper.Ty} {scrutinee : AffineExpr sampleCount} {leftTy rightTy : Spec.Paper.Ty} {left : AffineExpr sampleCount} {result : Spec.Paper.Ty} {right : AffineExpr sampleCount} : WellTyped context scrutinee (leftTy.sum rightTy) → WellTyped (leftTy :: context) left result → WellTyped (rightTy :: context) right result → WellTyped context (Spec.Paper.Expr.matchSum Spec.Paper.DistributionAction scrutinee left right) result
- nil {sampleCount : ℕ} {context : List Spec.Paper.Ty} {element : Spec.Paper.Ty} : WellTyped context Spec.Paper.Expr.nil element.list
- cons {sampleCount : ℕ} {context : List Spec.Paper.Ty} {head : AffineExpr sampleCount} {element : Spec.Paper.Ty} {tail : AffineExpr sampleCount} : WellTyped context head element → WellTyped context tail element.list → WellTyped context (Spec.Paper.Expr.cons Spec.Paper.DistributionAction head tail) element.list
- matchList {sampleCount : ℕ} {context : List Spec.Paper.Ty} {scrutinee : AffineExpr sampleCount} {element : Spec.Paper.Ty} {nilCase : AffineExpr sampleCount} {result : Spec.Paper.Ty} {consCase : AffineExpr sampleCount} : WellTyped context scrutinee element.list → WellTyped context nilCase result → WellTyped (element :: element.list :: context) consCase result → WellTyped context (Spec.Paper.Expr.matchList Spec.Paper.DistributionAction scrutinee nilCase consCase) result
- ite {sampleCount : ℕ} {context : List Spec.Paper.Ty} {condition thenBranch : AffineExpr sampleCount} {result : Spec.Paper.Ty} {elseBranch : AffineExpr sampleCount} : WellTyped context condition Spec.Paper.Ty.bool → WellTyped context thenBranch result → WellTyped context elseBranch result → WellTyped context (Spec.Paper.Expr.ite Spec.Paper.DistributionAction condition thenBranch elseBranch) result
- letE {sampleCount : ℕ} {context : List Spec.Paper.Ty} {value : AffineExpr sampleCount} {valueTy : Spec.Paper.Ty} {body : AffineExpr sampleCount} {result : Spec.Paper.Ty} : WellTyped context value valueTy → WellTyped (valueTy :: context) body result → WellTyped context (Spec.Paper.Expr.letE Spec.Paper.DistributionAction value body) result
- sub {sampleCount : ℕ} {context : List Spec.Paper.Ty} {value : AffineExpr sampleCount} {a b : Spec.Paper.Ty} : WellTyped context value a → a.Sub b → WellTyped context value b
- negE {sampleCount : ℕ} {context : List Spec.Paper.Ty} {operand : AffineExpr sampleCount} : WellTyped context operand (Spec.Paper.Ty.float Spec.Paper.Affinity.E) → WellTyped context (Spec.Paper.Expr.neg Spec.Paper.DistributionAction operand) (Spec.Paper.Ty.float Spec.Paper.Affinity.E)
- negG {sampleCount : ℕ} {context : List Spec.Paper.Ty} {operand : AffineExpr sampleCount} : WellTyped context operand (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.neg Spec.Paper.DistributionAction operand) (Spec.Paper.Ty.float Spec.Paper.Affinity.G)
- addE {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.E) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.E) → WellTyped context (Spec.Paper.Expr.add Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.E)
- addG {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.add Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.G)
- mulGE {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.E) → WellTyped context (Spec.Paper.Expr.mul Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.E)
- mulGG {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.mul Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.G)
- divEG {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.E) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.div Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.E)
- divGG {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.div Spec.Paper.DistributionAction left right) (Spec.Paper.Ty.float Spec.Paper.Affinity.G)
- lt {sampleCount : ℕ} {context : List Spec.Paper.Ty} {left right : AffineExpr sampleCount} : WellTyped context left (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context right (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.lt Spec.Paper.DistributionAction left right) Spec.Paper.Ty.bool
- uniform {sampleCount : ℕ} {context : List Spec.Paper.Ty} {lower : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {upper : AffineExpr sampleCount} : WellTyped context lower (Spec.Paper.Ty.float affinity) → WellTyped context upper (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.uniform Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) lower upper) (Spec.Paper.Ty.float affinity)
- gaussian {sampleCount : ℕ} {context : List Spec.Paper.Ty} {mean : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {spread : AffineExpr sampleCount} : WellTyped context mean (Spec.Paper.Ty.float affinity) → WellTyped context spread (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.gaussian Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) mean spread) (Spec.Paper.Ty.float affinity)
- poisson {sampleCount : ℕ} {context : List Spec.Paper.Ty} {rate : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context rate (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.poisson Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) rate) (Spec.Paper.Ty.float affinity)
- discrete {sampleCount : ℕ} {context : List Spec.Paper.Ty} {probabilities : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context probabilities (Spec.Paper.Ty.float affinity).list → WellTyped context (Spec.Paper.Expr.discrete Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) probabilities) (Spec.Paper.Ty.float affinity)
- bernoulli {sampleCount : ℕ} {context : List Spec.Paper.Ty} {probability : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context probability (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.bernoulli Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) probability) (Spec.Paper.Ty.float affinity)
- exponential {sampleCount : ℕ} {context : List Spec.Paper.Ty} {rate : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context rate (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.exponential Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) rate) (Spec.Paper.Ty.float affinity)
- beta {sampleCount : ℕ} {context : List Spec.Paper.Ty} {alpha betaArg : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context alpha (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context betaArg (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.beta Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) alpha betaArg) (Spec.Paper.Ty.float affinity)
- gamma {sampleCount : ℕ} {context : List Spec.Paper.Ty} {shape : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {rate : AffineExpr sampleCount} : WellTyped context shape (Spec.Paper.Ty.float affinity) → WellTyped context rate (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.gamma Spec.Paper.DistributionAction (Spec.Paper.DistributionAction.sample affinity) shape rate) (Spec.Paper.Ty.float affinity)
- uniformMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {lower : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {upper : AffineExpr sampleCount} : WellTyped context lower (Spec.Paper.Ty.float affinity) → WellTyped context upper (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.uniform Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean lower upper) (Spec.Paper.Ty.float affinity)
- gaussianMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {mean : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {spread : AffineExpr sampleCount} : WellTyped context mean (Spec.Paper.Ty.float affinity) → WellTyped context spread (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.gaussian Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean mean spread) (Spec.Paper.Ty.float affinity)
- poissonMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {rate : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context rate (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.poisson Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean rate) (Spec.Paper.Ty.float affinity)
- discreteMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {probabilities : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context probabilities (Spec.Paper.Ty.float affinity).list → WellTyped context (Spec.Paper.Expr.discrete Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean probabilities) (Spec.Paper.Ty.float affinity)
- bernoulliMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {probability : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context probability (Spec.Paper.Ty.float affinity) → WellTyped context (Spec.Paper.Expr.bernoulli Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean probability) (Spec.Paper.Ty.float affinity)
- exponentialMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {rate : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context rate (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.exponential Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean rate) (Spec.Paper.Ty.float affinity)
- betaMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {alpha betaArg : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} : WellTyped context alpha (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context betaArg (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.beta Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean alpha betaArg) (Spec.Paper.Ty.float affinity)
- gammaMean {sampleCount : ℕ} {context : List Spec.Paper.Ty} {shape : AffineExpr sampleCount} {affinity : Spec.Paper.Affinity} {rate : AffineExpr sampleCount} : WellTyped context shape (Spec.Paper.Ty.float affinity) → WellTyped context rate (Spec.Paper.Ty.float Spec.Paper.Affinity.G) → WellTyped context (Spec.Paper.Expr.gamma Spec.Paper.DistributionAction Spec.Paper.DistributionAction.mean shape rate) (Spec.Paper.Ty.float affinity)
Instances For
Equations
- Determinize.Proof.Paper.Symbolic.AffineExpr.shift amount cutoff expression = Determinize.Spec.Paper.Expr.shift amount cutoff expression
Instances For
Equations
- Determinize.Proof.Paper.Symbolic.AffineExpr.substAt depth replacement expression = Determinize.Spec.Paper.Expr.substAt depth replacement expression
Instances For
Equations
- body.substHead replacement = Determinize.Spec.Paper.Expr.substHead body replacement
Instances For
Equations
- body.substTwo argument function = Determinize.Spec.Paper.Expr.substTwo body argument function
Instances For
Instances For
Equations
Instances For
Equations
Instances For
The value of a G-affinity literal, an affine form with zero coefficients; none for a
literal that depends on a draw and for any other expression.
Equations
- One or more equations did not get rendered due to their size.
- x✝.constantValue? = none
Instances For
Equations
Instances For
The affine coordinates of a list value of reals, a cons-chain of real ending in nil:
the symbolic counterpart of realListValue?.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.affineListValue? Determinize.Spec.Paper.Expr.nil = some []
- x✝.affineListValue? = none
Instances For
Equations
Instances For
The constants of a list value of general-affinity reals, the counterpart of constantValue?.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.constantListValue? Determinize.Spec.Paper.Expr.nil = some []
- x✝.constantListValue? = none
Instances For
Equations
Instances For
Realization evaluates the coordinates of a list value pointwise.
The arity a discrete site reads off the skeleton of its weights is the length of their
affine coordinate list.
A list value of floats is a cons-chain of real coordinates.
A list value of general-affinity floats has constant coordinates.
Equations
Instances For
The quotient of two affine forms when the denominator is constant and nonzero; none
otherwise.
Equations
Instances For
- next {sampleCount : ℕ} (expression : AffineExpr sampleCount) : SymbolicAction sampleCount
- sampleE {sampleCount : ℕ} (op : Spec.Paper.Op) (affineArgs : List (Affine sampleCount)) (generalArgs : List ℝ) (continuation : AffineExpr (sampleCount + 1)) : SymbolicAction sampleCount
- mean {sampleCount : ℕ} (op : Spec.Paper.Op) (affineArgs : List (Affine sampleCount)) (generalArgs : List ℝ) (continuation : Affine sampleCount → AffineExpr sampleCount) : SymbolicAction sampleCount
- sampleG {sampleCount : ℕ} (site : Spec.Paper.DistributionAction × Spec.Paper.Op) (fiber : MeasureTheory.Measure ℝ) (continuation : ℝ → AffineExpr sampleCount) : SymbolicAction sampleCount
- stuck {sampleCount : ℕ} : SymbolicAction sampleCount
Instances For
The concrete action at environment: a sampleE site draws from the primitive fiber at
the evaluated parameters and its continuation sees the draw as the fresh coordinate.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.SymbolicAction.realize environment Determinize.Proof.Paper.Symbolic.AffineExpr.SymbolicAction.stuck = Determinize.Spec.Paper.Action.stuck
Instances For
Continue a symbolic step under an evaluation context. The continuation of a sampleE
lives in n + 1 variables, hence the second, lifted context.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Typing of a symbolic step at ty: its expression or continuations are closed and well
typed, a sampleE carries the right number of parameters, and a sampleG is a G-affinity
site with a primitive fiber at constant parameters.
- stuck {ty : Spec.Paper.Ty} {x✝ : ℕ} : WellTyped ty SymbolicAction.stuck
- next {ty : Spec.Paper.Ty} {x✝ : ℕ} {expression : AffineExpr x✝} : AffineExpr.WellTyped [] expression ty → WellTyped ty (SymbolicAction.next expression)
- sampleE {ty : Spec.Paper.Ty} {op : Spec.Paper.Op} {x✝ : ℕ} {continuation : AffineExpr (x✝ + 1)} {affine : List (Affine x✝)} {general : List ℝ} : affine.length = Spec.Paper.affineArity op → general.length = Spec.Paper.generalArity op → AffineExpr.WellTyped [] continuation ty → WellTyped ty (SymbolicAction.sampleE op affine general continuation)
- mean {ty : Spec.Paper.Ty} {n : ℕ} {op : Spec.Paper.Op} {affine : List (Affine n)} {general : List ℝ} {continuation : Affine n → AffineExpr n} : affine.length = Spec.Paper.affineArity op → general.length = Spec.Paper.generalArity op → AffineExpr.WellTyped [] (continuation (meanAffine op affine general)) ty → (∀ (value : Affine n) (environment : Env n), AffineExpr.realize environment (continuation value) = AffineExpr.realize environment (continuation (value.eval environment, 0))) → WellTyped ty (SymbolicAction.mean op affine general continuation)
- sampleG {ty : Spec.Paper.Ty} {x✝ : ℕ} {continuation : ℝ → AffineExpr x✝} {site : Spec.Paper.DistributionAction × Spec.Paper.Op} {fiber : MeasureTheory.Measure ℝ} : (∀ (value : ℝ), AffineExpr.WellTyped [] (continuation value) ty) → WellTyped ty (SymbolicAction.sampleG site fiber continuation)
Instances For
One step of symbolic reduction, mirroring reduce (symbolicReduce_realize): deterministic
steps and G-affinity sites behave as in reduce, and an E-affinity site becomes a
sampleE whose continuation sees the draw as the fresh coordinate.
Equations
- One or more equations did not get rendered due to their size.
- Determinize.Proof.Paper.Symbolic.AffineExpr.symbolicReduce Determinize.Spec.Paper.Expr.reject = Determinize.Proof.Paper.Symbolic.AffineExpr.SymbolicAction.next Determinize.Spec.Paper.Expr.reject
- Determinize.Proof.Paper.Symbolic.AffineExpr.symbolicReduce Determinize.Spec.Paper.Expr.unit = Determinize.Proof.Paper.Symbolic.AffineExpr.SymbolicAction.next Determinize.Spec.Paper.Expr.unit
- Determinize.Proof.Paper.Symbolic.AffineExpr.symbolicReduce Determinize.Spec.Paper.Expr.nil = Determinize.Proof.Paper.Symbolic.AffineExpr.SymbolicAction.next Determinize.Spec.Paper.Expr.nil
Instances For
Equations
Instances For
realize as a measurable family over environments: the skeleton is fixed and every
coordinate is an affine function of the environment.
Equations
- expression.realizeFamily = { skeleton := expression.skeleton, skeleton_eq := ⋯, coordinate_measurable := ⋯ }