Terms of a many-sorted language #
The terms of a many-sorted language over sorted variables are built from variables and function symbols, with pairing to assemble the arguments of a symbol. A term has a shape, and a term of one sort is a term of the shape of that sort.
Main definitions #
ManySorted.Language.Term: the terms over sorted variables, by shape.ManySorted.Language.Term.bind: substitution of terms for variables.ManySorted.Signature.Place: the argument places of a sort in a shape.ManySorted.Language.Term.proj: the component of a term at an argument place.ManySorted.Language.Term.places: the term whose components are the argument places.
The terms of a language over variables α, by the shape of what they denote.
- var
{S : Type u}
{L : Language S}
{α : S → Type w}
{s : S}
(x : α s)
: L.Term α (Signature.of s)
A variable.
- func
{S : Type u}
{L : Language S}
{α : S → Type w}
{σ : Signature S}
{t : S}
(f : L.Functions σ t)
(r : L.Term α σ)
: L.Term α (Signature.of t)
A function symbol applied to a term of the shape of its arguments.
- prod
{S : Type u}
{L : Language S}
{α : S → Type w}
{σ τ : Signature S}
(a : L.Term α σ)
(b : L.Term α τ)
: L.Term α (σ.prod τ)
A pair of terms.
- nil
{S : Type u}
{L : Language S}
{α : S → Type w}
: L.Term α Signature.nil
The empty tuple.
Instances For
The argument places of sort s in a shape.
- here
{S : Type u}
{s : S}
: (of s).Place s
The place of a single argument.
- left
{S : Type u}
{σ τ : Signature S}
{s : S}
(p : σ.Place s)
: (σ.prod τ).Place s
A place in the left component.
- right
{S : Type u}
{σ τ : Signature S}
{s : S}
(p : τ.Place s)
: (σ.prod τ).Place s
A place in the right component.
Instances For
def
ManySorted.Language.Term.bind
{S : Type u}
{L : Language S}
{α : S → Type w}
{β : S → Type w'}
{σ : Signature S}
:
L.Term α σ → ({s : S} → α s → L.Term β (Signature.of s)) → L.Term β σ
Substitution of terms for the variables.
Equations
- (ManySorted.Language.Term.var x_3).bind x✝ = x✝ x_3
- (ManySorted.Language.Term.func f r).bind x✝ = ManySorted.Language.Term.func f (r.bind fun {s : S} => x✝)
- (a.prod b).bind x✝ = (a.bind fun {s : S} => x✝).prod (b.bind fun {s : S} => x✝)
- ManySorted.Language.Term.nil.bind x✝ = ManySorted.Language.Term.nil
Instances For
def
ManySorted.Language.Term.proj
{S : Type u}
{L : Language S}
{α : S → Type w}
{σ : Signature S}
{s : S}
:
σ.Place s → L.Term α σ → L.Term α (Signature.of s)
The component of a term at an argument place of its shape.
Equations
Instances For
The term of a shape whose components are its argument places.
Equations
- One or more equations did not get rendered due to their size.
- ManySorted.Language.Term.places ManySorted.Signature.nil = ManySorted.Language.Term.nil
- ManySorted.Language.Term.places (ManySorted.Signature.of s) = ManySorted.Language.Term.var ManySorted.Signature.Place.here