The successor relation of a finite relation, without a recursion #
A relation of non-null rows, listed once each, is sorted by the
lexicographic ascending order (ascLt). Its successor relation – the
pairs of consecutive rows – its least row and its greatest row are
written with products, selections, projections and the NOT IN
difference: a pair of rows in increasing order with no row between them,
a row with no row below it, a row with no row above it
(Sym.evaluatePlain_succQ, Sym.evaluatePlain_leastQ,
Sym.evaluatePlain_greatestQ). These are what a bounded recursion's
counters and the gaps of a cut are read off.
Consecutive elements of a sorted list #
The sorted listing of a relation #
The listing of a relation's rows in increasing order.
Equations
- Sym.sortedRows R = R.toFinset.sort (ascLe p)
Instances For
Dependency graph
The comparison as a predicate #
One block of a row below another, in the ascending lexicographic order.
Equations
- Sym.ltOn x y = (OrderSpec.asc p).ltPredOn (fun (k : Fin p) => TermGIn.index (x k) ⋯) (fun (k : Fin p) => TermGIn.index (y k) ⋯) (List.finRange p)
Instances For
Dependency graph
The two blocks of a row #
Dependency graph
Dependency graph
Products and projections #
A projection onto arguments: columns, constants and context values.
Equations
- Sym.projQ F q = AggQueryIn.castKind ⋯ (AggQueryIn.Proj (Sym.projSA F) q)
Instances For
Dependency graph
The order queries #
The pairs of rows in increasing order.
Equations
- Sym.ltQ R = AggQueryIn.Sel (Sym.ltOn (Fin.castAdd p) (Fin.natAdd p)) (Sym.prodR R R) trivial
Instances For
Dependency graph
The pairs of rows with a row between them.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The rows with a row below them.
Equations
- Sym.aboveQ R = Sym.projQ (fun (k : Fin p) => Sym.SA.col (Fin.natAdd p k)) (Sym.ltQ R)
Instances For
Dependency graph
The rows with a row above them.
Equations
- Sym.belowQ R = Sym.projQ (fun (k : Fin p) => Sym.SA.col (Fin.castAdd p k)) (Sym.ltQ R)
Instances For
Dependency graph
The successor relation.
Equations
- Sym.succQ s₁ s₂ cnt R = AggQueryIn.notInDiffX s₁ s₂ cnt (Sym.ltQ R) (Sym.midQ R)
Instances For
Dependency graph
The least row.
Equations
- Sym.leastQ s₁ s₂ cnt R = AggQueryIn.notInDiffX s₁ s₂ cnt R (Sym.aboveQ R)
Instances For
Dependency graph
The greatest row.
Equations
- Sym.greatestQ s₁ s₂ cnt R = AggQueryIn.notInDiffX s₁ s₂ cnt R (Sym.belowQ R)
Instances For
Dependency graph
What the relation's rows are asked: no null value.
Equations
- Sym.NonNullRows R D γ = ∀ (x : Tuple T p), Multiset.Mem (R.evaluatePlain D γ) x → ∀ (i : Fin p), ValueType.isNull (x i) = false
Instances For
Dependency graph
The successor relation, as a query.
Dependency graph
The least row is the first of the sorted listing.