Legacy.Base.Structures.Terms¶
Interpretation of Terms in General Structures¶
This is the Legacy.Base.Structures.Terms module of the Agda Universal Algebra Library.
When we interpret a term in a structure we call the resulting
function a term operation. Given a term p and a structure ๐จ,
we denote by ๐จ โฆ p โง the interpretation of p in ๐จ.
This is defined inductively as follows.
-
If
pis a variable symbolx : Xand ifa : X โ โฃ ๐จ โฃis a tuple of elements ofโฃ ๐จ โฃ, then define๐จ โฆ p โง a := a x. -
If
p = f t, wheref : โฃ ๐ โฃis an operation symbol, ift : (arity ๐น) f โ ๐ป Xis a tuple of terms, and ifa : X โ โฃ ๐จ โฃis a tuple from๐จ, then define๐จ โฆ p โง a := (f แต ๐จ) (ฮป i โ ๐จ โฆ t i โง a).
Thus interpretation of a term is defined by structural induction.
{-# OPTIONS --cubical-compatible --exact-split --safe #-} module Legacy.Base.Structures.Terms where -- Imports from Agda and the Agda Standard Library --------------------- open import Agda.Primitive using () renaming ( Set to Type ) open import Level using ( Level ) open import Legacy.Base.Structures.Basic using ( signature ; structure ; _แต_ ) open import Legacy.Base.Terms.Basic private variable ๐โ ๐ฅโ ๐โ ๐ฅโ ฯ ฮฑ ฯ : Level ๐น : signature ๐โ ๐ฅโ ๐ : signature ๐โ ๐ฅโ X : Type ฯ open signature open structure _โฆ_โง : (๐จ : structure ๐น ๐ {ฮฑ} {ฯ}) โ Term X โ (X โ carrier ๐จ) โ carrier ๐จ ๐จ โฆ โ x โง = ฮป a โ a x ๐จ โฆ node f t โง = ฮป a โ (f แต ๐จ) (ฮป i โ (๐จ โฆ t i โง ) a)