Meanings with alternatives #
A meaning in alternative semantics is a pair: an ordinary denotation, and a set of alternatives
that focus features and operators manipulate while leaving the ordinary denotation alone.
WithAlternatives is that pair. It is the product of the identity monad and the set monad, so the
two-dimensional recursion of alternative semantics is <$> and <*> of a lawful Monad, and the
two dimensions are its two monad morphisms. The monad lives in one universe; binary composition
across universes is WithAlternatives.map₂, the same composition with Set.image2 as its
alternatives.
Main definitions #
WithAlternatives— an ordinary value together with the alternatives it evokesWithAlternatives.unfeatured,WithAlternatives.focused— the meanings of an unfocused and of an F-marked expression, evoking only their own value and every value respectivelyWithAlternatives.WellFormed— the containment constraint: the alternatives include the ordinary valueWithAlternatives.Given— the alternatives have collapsed to a singletonWithAlternatives.map₂— binary composition, alternatives composed pointwise
Main results #
ordinary_seq,mem_alternatives_seq— the two dimensions of Hamblin compositionalternatives_seq— the alternatives of an application are those of theSetapplicativeCommApplicative WithAlternatives,seq_eq_bind_seq_pure— composition does not depend on the order of the daughters, so an application can bind its argument firstGiven.alternatives_seq— a Given function contributes only its ordinary value
References #
An ordinary denotation together with the alternatives the expression evokes ([Roo92]).
- ordinary : α
The denotation the expression would have with no focus on it.
- alternatives : Set α
The alternatives, which by Rooth's containment constraint include the ordinary value — see
WellFormed, kept a predicate rather than a field so that the composition engine below is aMonad.
Instances For
The meaning unfeatured x of an expression bearing no focus feature has ordinary value x
and evokes only {x}.
Equations
- WithAlternatives.unfeatured x = { ordinary := x, alternatives := {x} }
Instances For
The meaning of an F-marked expression whose alternatives are its whole type: focused x
has ordinary value x and evokes every value ([Roo92]'s focus semantic value of a
constant).
Equations
- WithAlternatives.focused x = { ordinary := x, alternatives := Set.univ }
Instances For
The composition engine #
Alternative semantics composes pointwise: the ordinary values apply to each other while the
alternatives collect applications of alternative functions to alternative arguments (Hamblin
functional application). pure is unfeatured and <$>/<*> are the recursive clauses of the
two-dimensional semantics.
Equations
- One or more equations did not get rendered due to their size.
The ordinary dimension is a monad morphism onto Id.
The alternatives of f <$> m are the images of m's alternatives.
In Hamblin functional application alternative functions apply to alternative arguments.
Mapping over an F-marked constituent evokes the whole range of the function.
The alternatives as a morphism into the Set applicative #
With the laws above these exhibit the monad as a span Id ⟵ WithAlternatives ⟶ Set: ordinary
denotation and alternative set are its two structure-preserving projections.
Hamblin composition does not depend on the order in which the daughters are composed, since
both dimensions, Id and Set, are commutative.
By commutativity an application can run its argument first, binding the argument into the function applied to it.
Rooth's containment constraint says that the alternatives contain the ordinary value.
Equations
- m.WellFormed = (m.ordinary ∈ m.alternatives)
Instances For
Composition preserves well-formedness.
Givenness #
A meaning is Given with respect to a when its alternatives have collapsed to {a}.
Equations
- m.Given a = (m.alternatives = {a})
Instances For
Unfeatured meanings are Given with respect to their value.
A function evoking every function, applied to an argument that evokes something, evokes every value.
A Given function collapses Hamblin composition to application on the argument's alternatives: deaccented material contributes exactly its ordinary value.
Binary composition #
A meaning whose alternatives are nontrivial is Given with respect to nothing.
Binary composition by f composes the ordinary values, and its alternatives are the
compositions of an alternative of each daughter.
Equations
- WithAlternatives.map₂ f a b = { ordinary := f a.ordinary b.ordinary, alternatives := Set.image2 f a.alternatives b.alternatives }
Instances For
Within a universe, binary composition is the monad's f <$> a <*> b.