Documentation

Provenance.SymRel

Symbolic rows #

A symbolic relation for a query whose context starts with k parameter components holds rows of k + n cells, each cell 7 + k columns (Provenance.SymCells): the first k cells are the codes of the parameter row – its descriptor – and the other n the codes of an output row. A value of an output row is coded canonically (Sym.vcode): the code of the parameter component it equals where that component is fresh, itself elsewhere. Sym.rowEnc is the symbolic row of a parameter row and an output row, and what a symbolic evaluation is asked is that the rows it holds under the descriptor of a parameter row be the encodings of the output rows at that parameter row.

Cells of a row #

def Sym.ci {k N : ℕ} (i : Fin N) (j : Fin (7 + k)) :
Fin (N * (7 + k))

The column j of cell i.

Equations
Instances For
    Dependency graph
    def Sym.cellOf {T : Type} {k N : ℕ} (r : Tuple T (N * (7 + k))) (i : Fin N) :
    Tuple T (7 + k)

    The cell i of a row.

    Equations
    Instances For
      Dependency graph
      def Sym.ofCells {T : Type} {k N : ℕ} (cs : Fin N → Tuple T (7 + k)) :
      Tuple T (N * (7 + k))

      A row from its cells.

      Equations
      Instances For
        Dependency graph

        The canonical code of a value #

        noncomputable def Sym.vcode {T : Type} [ValueType T] (C : Finset T) {k : ℕ} (par : Fin k → T) (b : T) :

        The code of a value of an output row: the code of the parameter component it is, where that component is fresh; the value itself elsewhere.

        Equations
        Instances For
          Dependency graph
          def Sym.GoodVal {T : Type} [ValueType T] {C : Finset T} {k : ℕ} (par : Fin k → T) (b : T) :

          A value the symbolic evaluation can code: a component of the parameter row, a value of the cut, or the null.

          Equations
          Instances For
            Dependency graph

            Encodings are injective #

            def Sym.RankOK {T : Type} (k : ℕ) :
            Code T → Prop

            The fresh codes a row holds have their ranks below k.

            Equations
            Instances For
              Dependency graph

              The symbolic row of a parameter row and an output row #

              def Sym.descEnc {T : Type} [ValueType T] (C : Finset T) {k : ℕ} (par : Fin k → T) :
              Tuple T (k * (7 + k))

              The descriptor of a parameter row: the codes of its components.

              Equations
              Instances For
                Dependency graph
                noncomputable def Sym.rowEnc {T : Type} [ValueType T] (C : Finset T) {k n : ℕ} (par : Fin k → T) (v : Tuple T n) :
                Tuple T ((k + n) * (7 + k))

                The symbolic row of a parameter row and an output row.

                Equations
                Instances For
                  Dependency graph
                  def Sym.descPart {T : Type} {k n : ℕ} (r : Tuple T ((k + n) * (7 + k))) :
                  Tuple T (k * (7 + k))

                  The descriptor part of a symbolic row.

                  Equations
                  Instances For
                    Dependency graph
                    def Sym.outPart {T : Type} {k n : ℕ} (r : Tuple T ((k + n) * (7 + k))) :
                    Tuple T (n * (7 + k))

                    The output part of a symbolic row.

                    Equations
                    Instances For
                      Dependency graph