The joint reading of a family, and homomorphisms #
A selection comparing several aggregate values of one family reads them
in one world of the family (classWorlds). Under a homomorphism the
family's listing is reordered among tied occurrences – the evaluator
lists a group by its rows and then by the annotations, and the
annotations are not the same on the two sides – and a joint reading is
blind to that only if every value of the family is reordered together.
This holds when every value of the family is built from one listing
of the family's occurrences by a function of the occurrence's row: a
LeafSpec says how a value reads an occurrence (what each of its leaves
reads, whether it is in the leaf's group, whether the leaf's clause keeps
it), and LeafSpec.build is the value it builds from a listing. Then a
world of the family is read off the sequence of rows it selects
(classWorlds_presented), the bag of those is blind to a tie-block
permutation of the listing (subWorlds_tiePerm), and the joint worlds of
the two sides correspond (classWorlds_hom).
How an aggregate value reads an occurrence of its family, as a
function of the occurrence's row ρ: the value each leaf reads, whether
the occurrence is in each leaf's group, whether each leaf's clause keeps
it – and the leaves' aggregates, conventions and combining function.
- arity : ℕ
- aggs : Fin self.arity → SeqAggFunc T
Instances For
Dependency graph
The value built from a listing L of the family, an occurrence being
read through its row str and annotated by ann.
Equations
Instances For
Dependency graph
Whether a selected sequence of rows is a world of the value.
Instances For
Dependency graph
The value on a selected sequence of rows.
Equations
Instances For
Dependency graph
An aggregate expression presented by a listing: its occurrences
are the listing's, position for position, with the listing's
annotations, and its world condition and its value are read off the rows
a world selects, through ok and val. This is all a joint reading
asks of a value of a family.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Two lists related position by position #
A family built from one listing reads its worlds off the listing.
If every column of M holds a value presented by the listing L (each
read through its own ok and val), and so does the value x₀ the
family is listed by, then the family's worlds are the subfamilies of L,
each read through the rows it selects.
Dependency graph
The joint worlds of a family under a homomorphism. On the two
sides the family's values are presented, through the same readings, by
two listings, the second a tie-block permutation of the first pushed
through f – occurrences swapped only where their rows read alike. Then
the family's worlds correspond, annotations pushed through f and every
value unchanged: the values of the family are reordered together.
Dependency graph
The joint worlds of a row under a homomorphism. If the two rows hold aggregate values at the same compared columns, group them into families alike, and each family's worlds correspond, so do the joint worlds.
Dependency graph
Families presented on both sides #
What the joint reading of a row needs under a homomorphism, collected
over a set S of pairs of corresponding values (the target's and the
source's): that the two sides group them into families alike, and that
each family is presented – its flat values built from one listing on
each side, the two listings tie-block permuted (ListingRel), or its
nested values having corresponding worlds (NestedValue.WCorr).
Two listings of a family's occurrences, related by a
homomorphism: the target's is a tie-block permutation of the source's
pushed through f, occurrences swapped only where their rows read
alike.
Instances For
Dependency graph
A pair of flat values presented by a related pair of listings, through the same readings.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The worlds of two nested values correspond under a homomorphism:
both enumerations are images of one bag of indices, and at each index the
two worlds keep and leave out annotations related by f, read the same
inner values, and ask the same of what they keep. This is all a reading of
a nested value asks of its worlds – its admissibility, its value and its
weight – and it reads only the storey and the occurrences of the two
values, so a term over a nested column keeps it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A pair of nested values with the same outer aggregate and convention.
Equations
- NestMember y' y = ∃ (b : NestedValue T K) (b' : NestedValue T K'), y = AggTok.nest b ∧ y' = AggTok.nest b' ∧ b'.agg = b.agg ∧ b'.scalar = b.scalar
Instances For
Dependency graph
A set of corresponding values whose families are presented on both sides.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A nested family's worlds under a homomorphism. If the
representatives' worlds correspond and every column of the family holds a
nested value with the same outer aggregate and convention on both sides,
the family's worlds correspond, the pair pushed through f.
Dependency graph
The joint worlds of a row whose families are presented on both sides correspond.
Dependency graph
Closure under terms #
A term over an aggregate column (AggTok.postcompTerm) composes the
value's outer function and keeps its family: the same occurrences, the
same group key, a family identifier recording the term. So it stays in
its class, and a presented family stays presented.
The closure of a set of corresponding values under terms, taken on both sides alike.
- base {T K K' : Type} [ValueType T] {S : AggTok T K' × AggTok T K → Prop} {p : AggTok T K' × AggTok T K} : S p → PCl S p
- step {T K K' : Type} [ValueType T] {S : AggTok T K' × AggTok T K → Prop} {p : AggTok T K' × AggTok T K} (t : TermIn T 1 0) : PCl S p → PCl S (AggTok.postcompTerm t p.1, AggTok.postcompTerm t p.2)
- stepF {T K K' : Type} [ValueType T] {S : AggTok T K' × AggTok T K → Prop} {p : AggTok T K' × AggTok T K} (gf : T → T) : PCl S p → PCl S (AggTok.postcomp gf p.1, AggTok.postcomp gf p.2)
Instances For
Dependency graph
The operator a family records #
The label of the operator a family identifier records.
Instances For
Dependency graph
The label of the operator that built an aggregate value.
Instances For
Dependency graph
The operators' labels #
The hom commutation reads several values of one family in one world, so
what it asks of a query is that two operators building values never
share a label (AggQueryIn.labelsDistinct): values of different operators
are then in different families, and an identifier determines its value
across every evaluation the query performs
(AggQueryIn.builds_coherent).
An operator's label, where it builds a column: an aggregation with no aggregate builds no value, so its label is not one of a value.
Instances For
Dependency graph
The labels of the operators that build aggregate values, an
aggregation with no aggregate building none (labCons).
Equations
- (AggQueryIn.Rel x✝ a).labels = []
- (AggQueryIn.Hole x✝¹ s x✝).labels = []
- (AggQueryIn.Param pv x✝).labels = []
- AggQueryIn.Empty.labels = []
- (AggQueryIn.Proj ps q).labels = q.labels
- (AggQueryIn.Sel φ q hφ).labels = q.labels
- (q₁.Prod q₂).labels = q₁.labels ++ q₂.labels
- (q₁.Apply q₂).labels = q₁.labels ++ q₂.labels
- (q₁.Sum q₂).labels = q₁.labels ++ q₂.labels
- q.Dedup.labels = q.labels
- (q₁.Diff q₂).labels = q₁.labels ++ q₂.labels
- (AggQueryIn.Explode k a q).labels = q.labels
- (AggQueryIn.Mu s q₀ q₁).labels = q₀.labels ++ q₁.labels
- (AggQueryIn.MuSet s q₀ q₁).labels = q₀.labels ++ q₁.labels
- (AggQueryIn.Gamma is ts fs q keep ord).labels = labCons n₂ lab q.labels
- (AggQueryIn.GammaScalar ts fs q ord).labels = labCons x✝ lab q.labels
- (AggQueryIn.GammaNest is his p f q).labels = lab :: q.labels
- (AggQueryIn.ProvSum is his t q).labels = q.labels
- (AggQueryIn.Retag h q).labels = q.labels
- (AggQueryIn.GammaTok is his ts fs a q keep).labels = labCons n₂ lab q.labels
- (AggQueryIn.Win P O o w t f q a dist keep).labels = lab :: q.labels
- (AggQueryIn.WinExpr P O o ws ts fs g q_1 keeps).labels = lab :: q_1.labels
Instances For
Dependency graph
No two operators building aggregate values share a label.
Equations
- q.labelsDistinct = q.labels.Nodup