RSRL interpretations #
This file defines the interpretations of an RSRL signature. An interpretation over a universe
U of entities assigns a sort to every entity, a partial function on entities to every
attribute, and a set of tuples of entities to every relation symbol. A term then denotes a
partial function on entities, and the components of an entity are the entities that some path
reaches from it.
Main definitions #
HPSG.RSRL.Interpretation: an interpretation of a signature over a universeU.HPSG.RSRL.Interpretation.termDenot: the term interpretation function under a variable assignment.HPSG.RSRL.Interpretation.IsComponentOf: the component relation between entities.HPSG.RSRL.Interpretation.IsSortResolved: every entity has a species as its sort.HPSG.RSRL.Interpretation.IsWellTyped: every defined attribute is appropriate and has a value of the appropriate sort.HPSG.RSRL.Interpretation.IsTotallyWellTyped: in addition, every appropriate attribute is defined.
Main results #
HPSG.RSRL.Interpretation.isComponentOf_iff_exists_path: the components of an entity are the denotations of the paths that are defined on it.HPSG.RSRL.Interpretation.termDenot_congr: a term denotation depends only on the values that the assignment gives to the variables of the term.HPSG.RSRL.Interpretation.IsWellTyped.admits: in a well-typed interpretation the signature admits every defined path.
Implementation notes #
The universe is a parameter of Interpretation rather than a field, as the carrier of a
first-order structure is in mathlib, so that Fintype and DecidableEq instances on the
universe are found without any per-model declaration.
Richter builds sort resolution and total well-typedness into the definition of an interpretation. Here they are separate predicates, named as in Carpenter's typed feature logic, because a worked example usually interprets only the part of a feature structure that the principle under test mentions. Such an example is well-typed without being totally well-typed. Richter also restricts the tuples of a relation to entities that are components of one common entity. That restriction is not imposed.
References #
An interpretation of the signature Sig over the universe U
([Ric24], Definition 7).
- S : U → Srt
The sort of each entity.
- A : Sig.Attr → U → Option U
The partial function on entities that interprets each attribute.
The set of argument tuples that interprets each relation symbol.
Instances For
Term denotation #
The entity that a term denotes at the described entity u under the assignment g, when
every attribute along the term is defined ([Ric24], Definition 10).
Equations
- I.termDenot g HPSG.RSRL.Term.colon x✝ = some x✝
- I.termDenot g (HPSG.RSRL.Term.var n) x✝ = some (g n)
- I.termDenot g (t.feat α) x✝ = (I.termDenot g t x✝).bind (I.A α)
Instances For
A term denotation depends only on the values of the variables that occur in the term.
The denotation of a path does not depend on the assignment.
Components #
The entity v is the value of some attribute at u.
Instances For
Equations
- HPSG.RSRL.Interpretation.instDecidableRelAttrSuccOfFintypeAttrOfDecidableEq x✝¹ x✝ = id inferInstance
The entity v is a component of u when a sequence of attributes leads from u to v.
Quantification in RSRL ranges over the components of the described entity.
Equations
- I.IsComponentOf u v = Relation.ReflTransGen I.attrSucc u v
Instances For
The components of u are the entities that some path denotes at u
([Ric24], Definition 11).
Typing #
An interpretation is sort-resolved when the sort of every entity is a species.
Equations
- I.IsSortResolved = ∀ (u : U), HPSG.RSRL.IsSpecies (I.S u)
Instances For
An interpretation is well-typed when every attribute that is defined on an entity is appropriate to the entity's sort, with a value of the appropriate sort.
Equations
Instances For
An interpretation is totally well-typed when it is well-typed and every attribute that is appropriate to the sort of an entity is defined on it.
- isWellTyped : I.IsWellTyped
The interpretation is well-typed.
Every appropriate attribute is defined.
Instances For
Equations
- HPSG.RSRL.Interpretation.instDecidableIsSpeciesOfFintypeOfDecidableLE σ = { decide := decide (∀ a ∈ Finset.univ, (fun (b : Srt) => b ≤ σ → σ ≤ b) a), reflects_decide := ⋯ }
Equations
- HPSG.RSRL.Interpretation.instDecidableIsSortResolvedOfDecidableLEOfFintype = { decide := decide (∀ a ∈ Finset.univ, (fun (u : U) => HPSG.RSRL.IsSpecies (I.S u)) a), reflects_decide := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
The denotation of a path that starts with α is the denotation of the rest at the value
of α.
The denotation of a path p ++ q is the denotation of q at the end of p.
In a well-typed interpretation the signature admits every path that is defined, from the sort of the entity it starts at to the sort of the entity it reaches.
The relations of an interpretation are decidable when the signature has no relation symbols.
Equations
- HPSG.RSRL.Interpretation.instDecidablePredForallFinArityROfIsEmptyRel ρ = isEmptyElim ρ