Prototypes — Graded Category Membership #
A prototype attaches a typicality grade (ℚ) to each member of a category.
Higher values are more prototypical. Used wherever graded membership is
needed (e.g. color-term typicality @cite{westerbeek-koolen-maes-2015}).
The TypicalityOrder wrapper carries the Preorder instance derived from
typicality: (a : TypicalityOrder p) ≤ b ↔ p.typicality a ≤ p.typicality b.
The wrapper pattern (cf. Core.Inheritance.IsAOrder) is needed because a
single α may carry multiple unrelated prototype gradings.
A prototype: a category with graded typicality over instances. Higher values = more prototypical.
- category : α
- typicality : α → ℚ
Instances For
a is at least as typical as b in proto.
Equations
- proto.AtLeastAsTypical a b = (proto.typicality b ≤ proto.typicality a)
Instances For
Equations
- proto.instDecidableRelAtLeastAsTypical x✝¹ x✝ = Core.Prototype.instDecidableRelAtLeastAsTypical._aux_1 proto x✝¹ x✝
a is strictly more typical than b in proto.
Equations
- proto.MoreTypical a b = (proto.typicality b < proto.typicality a)
Instances For
Equations
- proto.instDecidableRelMoreTypical x✝¹ x✝ = Core.Prototype.instDecidableRelMoreTypical._aux_1 proto x✝¹ x✝
A node type viewed as preordered by typicality under a particular
prototype. Definitionally equal to α, but carries the Preorder
instance. Mirrors Core.Inheritance.IsAOrder.
Equations
- Core.TypicalityOrder x✝ = α
Instances For
Tag a value as inhabiting the typicality preorder of proto. The
function-call wrapper avoids the elaboration pitfall where
(a : TypicalityOrder proto) ascription gets unfolded to α during
instance search.
Equations
- Core.TypicalityOrder.mk proto a = a
Instances For
Preorder by typicality: a ≤ b iff b is at least as typical as a.
Equations
- Core.TypicalityOrder.preorder proto = { le := fun (a b : Core.TypicalityOrder proto) => proto.AtLeastAsTypical b a, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }