Math 2.0

General algebraic systems Definition

Term evaluation

Builds on TermSignatureStructure

Definition

Let σ\sigma be a signature with only function symbols and let XX be a set of variables. Let AA be a structure of signature σ\sigma, that is, an algebra, with operations fAf^A. Let α ⁣:X→A\alpha \colon X \to A be a map, called an assignment. The value tA[α]t^A[\alpha] of a term tt over σ\sigma and XX is defined by recursion on tt:

  1. if tt is a variable x∈Xx \in X, then tA[α]=α(x)t^A[\alpha] = \alpha(x);
  2. if tt is a constant symbol cc, then tA[α]=cAt^A[\alpha] = c^A;
  3. if t=f(t1,…,tn)t = f(t_1, \ldots, t_n) for a function symbol ff of arity n≥1n \ge 1, then tA[α]=fA(t1A[α],…,tnA[α])t^A[\alpha] = f^A(t_1^A[\alpha], \ldots, t_n^A[\alpha]).

Remarks

The recursion is well defined because every term has a unique reading. The value depends only on the values of α\alpha at the variables that occur in tt. If these variables are among x1,…,xnx_1, \ldots, x_n and α(xi)=ai\alpha(x_i) = a_i, one writes tA(a1,…,an)t^A(a_1, \ldots, a_n).

Example: in the ring (ℤ,+,⋅,0,1)(\Z, +, \cdot, 0, 1), let t=x⋅(y+1)t = x \cdot (y + 1) and α(x)=3\alpha(x) = 3, α(y)=4\alpha(y) = 4. Clause 1 gives x↦3x \mapsto 3 and y↦4y \mapsto 4, clause 2 gives 1↦11 \mapsto 1, and clause 3 twice gives y+1↦5y + 1 \mapsto 5 and t↦15t \mapsto 15.

Non-example: computing x⋅(y+1)x \cdot (y + 1) at the same assignment as 3⋅4+1=133 \cdot 4 + 1 = 13 is not term evaluation. The outermost symbol of tt is ⋅\cdot applied to xx and y+1y + 1, so clause 3 requires the product of the values 33 and 55.

Homomorphisms commute with evaluation: if h ⁣:A→Bh \colon A \to B is a homomorphism, then h(tA[α])=tB[h∘α]h(t^A[\alpha]) = t^B[h \circ \alpha]. In Mathlib term evaluation is FirstOrder.Language.Term.realize.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Signature concept
  2. Structure concept
  3. Term concept
  4. Term evaluation definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Term_(logic)
About this page
TagVA41ZY2HTF
URIm2://VA41ZY2HTF
Kinddefinition
WritingW0 stub
MSC08A40, 03C07
DefinesTerm evaluation
UsesTerm, Signature, Structure

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.