Documentation

CategorialAlgebras.Homogeneous.Evaluation

Evaluation in the homogeneous signature #

Unary and binary applications reduce to their arguments and basic partial operations. These formulas make the domain specification and the contextual equations independent of positional casts, and apply to carriers which need not be inhabited.

@[simp]
theorem CategorialAlgebras.Homogeneous.partFamily_some {J : Type x} {A : J → Type w} (x : (j : J) → A j) :
(partFamily fun (j : J) => Part.some (x j)) = Part.some x

A family of defined values assembles to its defined function.

def CategorialAlgebras.Homogeneous.single {S : Type u} {A : S → Type w} {s : S} (x : A s) :

A one-entry sorted family.

Equations
Instances For
    def CategorialAlgebras.Homogeneous.pair {S : Type u} {A : S → Type w} {s : S} (x y : A s) :

    A two-entry sorted family.

    Equations
    Instances For
      @[simp]
      theorem CategorialAlgebras.Homogeneous.single_eta {S : Type u} {A : S → Type w} {s : S} (x : Word.Family A [s]) :
      single (x 0) = x

      A one-entry family is determined by its only value.

      @[simp]
      theorem CategorialAlgebras.Homogeneous.pair_eta {S : Type u} {A : S → Type w} {s : S} (x : Word.Family A [s, s]) :
      pair (x 0) (x 1) = x

      A two-entry family is determined by its two values.

      theorem CategorialAlgebras.Homogeneous.partialEval_unary {I : Type i} {S : Type u} {sig : Signature S} {X : S → Type x} {A : PartialAlgebra (Symbol I sig)} (v : SortedSet.Map X A.carrier) {s : S} (σ : Symbol I sig [s] s) (t : Term (Symbol I sig) X s) :
      Term.partialEval v (unary σ t) = (Term.partialEval v t).bind fun (x : A.carrier s) => A.op σ (single x)

      Evaluate a unary application by first evaluating its only argument.

      theorem CategorialAlgebras.Homogeneous.partialEval_binary {I : Type i} {S : Type u} {sig : Signature S} {X : S → Type x} {A : PartialAlgebra (Symbol I sig)} (v : SortedSet.Map X A.carrier) {s : S} (k : I) (t r : Term (Symbol I sig) X s) :
      Term.partialEval v (binary k t r) = (Term.partialEval v t).bind fun (x : A.carrier s) => (Term.partialEval v r).bind fun (y : A.carrier s) => A.op (Symbol.comp k s) (pair x y)

      Evaluate a binary application by first evaluating both arguments.

      @[simp]
      theorem CategorialAlgebras.Homogeneous.partialEval_variables {I : Type i} {S : Type u} {sig : Signature S} {A : PartialAlgebra (Symbol I sig)} {a : List S} {s : S} (σ : Symbol I sig a s) (v : SortedSet.Map (Word.Variables a) A.carrier) :
      Term.partialEval v (Term.app σ fun (j : Fin a.length) => Term.var (Word.position a j)) = A.op σ fun (j : Fin a.length) => v (a.get j) (Word.position a j)

      Evaluate an application to variables as the corresponding basic operation.

      @[simp]
      theorem CategorialAlgebras.Homogeneous.satisfies_defined {I : Type i} {S : Type u} {sig : Signature S} {X : S → Type x} (A : PartialAlgebra (Symbol I sig)) (v : SortedSet.Map X A.carrier) {s : S} (t : Term (Symbol I sig) X s) :

      An existence assertion is equivalent to definedness of the term.

      def CategorialAlgebras.Homogeneous.uniformValuation {S : Type u} {A : S → Type w} {s : S} {m : ℕ} (x : Fin m → A s) :

      Interpret a uniform context at an arbitrary tuple of elements of its sole sort.

      Equations
      Instances For
        @[simp]
        theorem CategorialAlgebras.Homogeneous.eval_uniform_variable {I : Type i} {S : Type u} {sig : Signature S} (A : PartialAlgebra (Symbol I sig)) {s : S} {m : ℕ} (x : Fin m → A.carrier s) (j : Fin m) :

        Uniform variables evaluate to the entries of their tuple.

        @[simp]
        theorem CategorialAlgebras.Homogeneous.satisfies_transport {I : Type i} {S : Type u} {sig : Signature S} {X : S → Type x} (A : PartialAlgebra (Symbol I sig)) (v : SortedSet.Map X A.carrier) {s t : S} (h : s = t) (e : EEquation (Symbol I sig) X s) :

        Transport of the output sort does not change satisfaction of an equation.

        theorem CategorialAlgebras.Homogeneous.uniform_valid_iff {I : Type i} {S : Type u} {sig : Signature S} (A : PartialAlgebra (Symbol I sig)) {s : S} {m p : ℕ} (prem : Fin p → EEquation (Symbol I sig) (UniformVariables s m) s) (concl : EEquation (Symbol I sig) (UniformVariables s m) s) :
        QEEquation.Valid A (uniformEquation s m p prem concl).equation ↔ ∀ (x : Fin m → A.carrier s), (∀ (j : Fin p), EEquation.Satisfies A (uniformValuation x) (prem j)) → EEquation.Satisfies A (uniformValuation x) concl

        Validity of a uniform contextual equation can be used at any tuple of its sort.

        theorem CategorialAlgebras.Homogeneous.boundary_total {I : Type i} {S : Type u} {sig : Signature S} [LT I] {A : PartialAlgebra (Symbol I sig)} (h : SatisfiesEquations A) (k : I) (s : S) (b : Bool) (x : A.carrier s) :
        (A.op (Symbol.boundary k s b) (single x)).Dom

        Source and target are total in every algebra satisfying the contextual equations.

        theorem CategorialAlgebras.Homogeneous.base_total {I : Type i} {S : Type u} {sig : Signature S} [LT I] {A : PartialAlgebra (Symbol I sig)} (h : SatisfiesEquations A) {a : List S} {s : S} (σ : sig a s) (x : Word.Family A.carrier a) :
        (A.op (Symbol.base σ) x).Dom

        The original symbols are total in every algebra satisfying the contextual equations.