The apply written with products is well formed over the schema #
A query is well formed over a schema when every relation it reads is
declared, and every name it binds is fresh in its scope. The constructions
of Provenance.SymApply bind names from a supply, sliced so that a
construction never binds, inside a recursion, the name that recursion
binds. Sym.Over sch A q says that q is well formed over sch and names
nothing outside A; each construction is shown to keep it, with A the
names of its input and its supply's.
Well formed over a schema, naming only names in A.
Equations
- Sym.Over sch A q = (AggQueryIn.overSchema sch q ∧ ∀ x ∈ q.names, A x)
Instances For
Dependency graph
Supplies of names #
The order queries and the environment #
The environment's queries are well formed, naming only A.
Instances For
Dependency graph
The relations a query reads #
Every relation the query reads is declared, its name in A.
Equations
- Sym.RelsIn sch A (AggQueryIn.Rel x✝ s) = (sch.decl s = some x✝ ∧ A s)
- Sym.RelsIn sch A (AggQueryIn.Hole x✝¹ s x✝) = True
- Sym.RelsIn sch A (AggQueryIn.Param pv x✝) = True
- Sym.RelsIn sch A AggQueryIn.Empty = True
- Sym.RelsIn sch A (AggQueryIn.Proj ps q) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.Sel φ q hφ) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (q₁.Prod q₂) = (Sym.RelsIn sch A q₁ ∧ Sym.RelsIn sch A q₂)
- Sym.RelsIn sch A (q₁.Apply q₂) = (Sym.RelsIn sch A q₁ ∧ Sym.RelsIn sch A q₂)
- Sym.RelsIn sch A (q₁.Sum q₂) = (Sym.RelsIn sch A q₁ ∧ Sym.RelsIn sch A q₂)
- Sym.RelsIn sch A q.Dedup = Sym.RelsIn sch A q
- Sym.RelsIn sch A (q₁.Diff q₂) = (Sym.RelsIn sch A q₁ ∧ Sym.RelsIn sch A q₂)
- Sym.RelsIn sch A (AggQueryIn.Explode k a q) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.Retag h q) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.Mu s q₀ q₁) = (Sym.RelsIn sch A q₀ ∧ Sym.RelsIn sch A q₁)
- Sym.RelsIn sch A (AggQueryIn.MuSet s q₀ q₁) = (Sym.RelsIn sch A q₀ ∧ Sym.RelsIn sch A q₁)
- Sym.RelsIn sch A (AggQueryIn.Gamma is ts fs q keep ord) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.GammaScalar ts fs q ord) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.GammaNest is his p f q) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.ProvSum is his t q) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.GammaTok is his ts fs a q keep) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.Win P O o w t f q a dist keep) = Sym.RelsIn sch A q
- Sym.RelsIn sch A (AggQueryIn.WinExpr P O o ws ts fs g q_1 keeps) = Sym.RelsIn sch A q_1
Instances For
Dependency graph
Supplies, sliced #
The names of A and of a supply.
Instances For
Dependency graph
A supply of fresh names: injective, undeclared, and outside A.
- inj : Function.Injective f
Instances For
Dependency graph
The cut is well formed #
The names of A and of a supply at the indices P holds of.
Instances For
Dependency graph
The table and the apply are well formed #
The apply written with products is well formed, naming the names of its operands, of its pool and of its supply. The pool may name anything but the names of the union the apply builds over it.