Docs / Semantics / Alternatives / WithAlternatives

Meanings with alternatives

import Linglib.Semantics.Alternatives.WithAlternatives

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: an application's ordinary value is the application of the ordinary values, and its alternatives are the applications of the alternatives. Composition does not depend on the order of the daughters, so an application can bind its argument first, and a Given function contributes only its ordinary value.

Main definitions

Implementation notes

The monad lives in one universe; binary composition across universes is WithAlternatives.map₂, the same composition with Set.image2 as its alternatives.

References

Declarations

An ordinary denotation together with the alternatives the expression evokes (Rooth 1992).

structure WithAlternativesL51–60
(α : Type u_1) :
Type u_1
  • ordinary : α

    The denotation the expression would have with no focus on it.

  • alternatives : Set α

    The alternatives the expression evokes. Rooth's containment constraint, that they include the ordinary value, is the predicate WellFormed rather than a field, so that composition is a Monad.

Built from

Used by WithAlternatives.unfeatured, WithAlternatives.focused, WithAlternatives.instMonad, WithAlternatives.instLawfulMonad, WithAlternatives.ordinary_bind, WithAlternatives.ordinary_map, WithAlternatives.ordinary_seq, WithAlternatives.mem_alternatives_map, WithAlternatives.mem_alternatives_seq, WithAlternatives.alternatives_seq, WithAlternatives.alternatives_bind, WithAlternatives.instCommApplicative, WithAlternatives.seq_eq_bind_seq_pure, WithAlternatives.WellFormed, WithAlternatives.WellFormed.bind, WithAlternatives.WellFormed.map, WithAlternatives.WellFormed.seq, WithAlternatives.Given, WithAlternatives.alternatives_seq_eq_univ, WithAlternatives.Given.alternatives_seq, WithAlternatives.not_given_of_nontrivial, WithAlternatives.map₂, WithAlternatives.ordinary_map₂, WithAlternatives.alternatives_map₂, WithAlternatives.WellFormed.map₂, WithAlternatives.map₂_eq_seq

Used in Semantics/Alternatives/Structural, Semantics/Focus/Marking, Semantics/Focus/Polarity, Semantics/Focus/Unalternatives, Semantics/PolarityItem/Environment and 9 more

The meaning unfeatured x of an expression bearing no focus feature has ordinary value x and evokes only {x}.

def WithAlternatives.unfeaturedL62–65
{α : Type u_1} (x : α) :

Built from

Used by WithAlternatives.unfeatured_ordinary, WithAlternatives.unfeatured_alternatives, WithAlternatives.WellFormed.unfeatured, WithAlternatives.Given.unfeatured

Used in Semantics/Focus/Control, Semantics/Focus/Marking, Semantics/Focus/Polarity, BarLevBassi2026, Buring2015 and 3 more

L67–68

The meaning of an F-marked expression whose alternatives are its whole type: focused x has ordinary value x and evokes every value (Rooth 1992's focus semantic value of a constant).

def WithAlternatives.focusedL73–77
{α : Type u_1} (x : α) :

Built from

Used by WithAlternatives.focused_ordinary, WithAlternatives.focused_alternatives, WithAlternatives.alternatives_map_focused, WithAlternatives.WellFormed.focused

Used in Semantics/Focus/Marking, Buring2015, HartmannZimmermann2007, Rooth1992, TurkHirsch2026 and 1 more

L79–80
L82–83

Composition

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.

L109
L130–132

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.

L150–160

Rooth's containment constraint says that the alternatives contain the ordinary value.

def WithAlternatives.WellFormedL171–172
{α : Type u} (m : WithAlternatives α) :

Built from

Used by WithAlternatives, WithAlternatives.WellFormed.unfeatured, WithAlternatives.WellFormed.focused, WithAlternatives.WellFormed.bind, WithAlternatives.WellFormed.map, WithAlternatives.WellFormed.seq, WithAlternatives.WellFormed.map₂

Used in Semantics/Alternatives/Structural, Semantics/Focus/Marking, Semantics/Focus/Polarity, Semantics/Focus/Unalternatives, Buring2015 and 1 more

Givenness

L198–200

Binary composition

Binary composition by f composes the ordinary values, and its alternatives are the compositions of an alternative of each daughter.

def WithAlternatives.map₂L234–238
{α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → β → γ) (a : WithAlternatives α) (b : WithAlternatives β) :

Built from

Used by WithAlternatives.ordinary_map₂, WithAlternatives.alternatives_map₂, WithAlternatives.WellFormed.map₂, WithAlternatives.map₂_eq_seq

Used in Semantics/Focus/Marking, Semantics/Focus/Polarity, Semantics/Focus/Unalternatives, Charlow2014, Rooth1992 and 1 more