Maps between many-sorted languages #
A map between two languages over the same sorts sends each symbol to a symbol with arguments of
the same shape and a result of the same sort, as FirstOrder.Language.LHom does for the
first-order languages of mathlib. Along a map a term of the first language is a term of the
second, a structure for the second restricts to one for the first, and where a structure for the
second expands one for the first, interpreting the image of each symbol as the symbol, a term
keeps its value. Each of two languages maps into
their sum, whose structure expands both.
Main definitions #
ManySorted.Language.LHom: a map of symbols that preserves argument shape and result sort.ManySorted.Language.LHom.onTerm: the term of the second language that a term of the first is.ManySorted.Language.LHom.reduct: the structure for the first language that a structure for the second restricts to.ManySorted.Language.LHom.IsExpansionOn: a structure for the second language interprets the image of each symbol as a structure for the first interprets the symbol.
Implementation notes #
The declarations are those of Mathlib/ModelTheory/LanguageMap.lean, in its order and under its
names, for function symbols typed by shape and sort. Two things differ. The structures are
arguments of IsExpansionOn, where mathlib takes them as instances, since a language here has
several structures over the same domains; the instances of mathlib are theorems here. And
pi_isExpansionOn has no counterpart, the structure on values that depend on a parameter being
defined here.
A language homomorphism maps the symbols of one language to symbols of another, with arguments of the same shape and a result of the same sort.
The mapping of functions.
Instances For
A language homomorphism maps the symbols of one language to symbols of another, with arguments of the same shape and a result of the same sort.
Equations
- ManySorted.«term_→ᴸ_» = Lean.ParserDescr.trailingNode `ManySorted.«term_→ᴸ_» 10 10 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ᴸ ") (Lean.ParserDescr.cat `term 11))
Instances For
The identity language homomorphism.
Equations
- ManySorted.Language.LHom.id L = { onFunction := fun (x : ManySorted.Signature S) (x_1 : S) => id }
Instances For
The inclusion of the left factor into the sum of two languages.
Equations
- ManySorted.Language.LHom.sumInl = { onFunction := fun (x : ManySorted.Signature S) (x_1 : S) => ManySorted.Language.Sum.inl }
Instances For
The inclusion of the right factor into the sum of two languages.
Equations
- ManySorted.Language.LHom.sumInr = { onFunction := fun (x : ManySorted.Signature S) (x_1 : S) => ManySorted.Language.Sum.inr }
Instances For
The composition of two language homomorphisms.
Equations
- g.comp f = { onFunction := fun (x : ManySorted.Signature S) (x_1 : S) (F : L.Functions x x_1) => g.onFunction (f.onFunction F) }
Instances For
The composition of two language homomorphisms.
Equations
- ManySorted.«term_∘ᴸ_» = Lean.ParserDescr.trailingNode `ManySorted.«term_∘ᴸ_» 60 60 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∘ᴸ ") (Lean.ParserDescr.cat `term 61))
Instances For
Expansions #
A language homomorphism is an expansion on a pair of structures if it commutes with the interpretation of all symbols.
- map_onFunction ⦃σ : Signature S⦄ ⦃t : S⦄ (f : L.Functions σ t) (x : Signature.Interpret D σ) : Structure.funMap (φ.onFunction f) x = Structure.funMap f x
Instances For
An expansion is one of the structures on values that depend on a parameter.
Terms #
Maps a term's symbols along a language map.
Equations
- φ.onTerm (ManySorted.Language.Term.var x_2) = ManySorted.Language.Term.var x_2
- φ.onTerm (ManySorted.Language.Term.func f r) = ManySorted.Language.Term.func (φ.onFunction f) (φ.onTerm r)
- φ.onTerm (a.prod b) = (φ.onTerm a).prod (φ.onTerm b)
- φ.onTerm ManySorted.Language.Term.nil = ManySorted.Language.Term.nil