Documentation

Linglib.Theories.Semantics.Composition.MaybeMonad

The Maybe Monad: Presupposition as Scope #

@cite{grove-2022}

@cite{grove-2022} argues that presupposition projection is a scope phenomenon. The key insight: presupposition triggers denote values of type α_# (= Option α), and they interact with their semantic context by taking scope via monadic bind (Option.bind), exactly paralleling @cite{charlow-2020}'s treatment of indefinites with the set monad.

The Maybe monad (Option, some, bind) is the presuppositional analog of @cite{charlow-2020}'s set monad (S, η, ⫝̸) for alternatives. Where S gives scope to alternative-denoting expressions, Option gives scope to presupposition triggers. Both derive exceptional scope from ASSOCIATIVITY.

Organization #

The Maybe Monad as Presupposition #

Option is already a LawfulMonad in Lean. Grove's operators are:

Grove notationLeanType
η_#someα → Option α
⋆_#Option.bindOption α → (α → Option β) → Option β
#noneOption α

The monad laws (Left Identity, Right Identity, Associativity from Figure 7) hold definitionally.

Parallel with the Set Monad #

Alternatives (@cite{charlow-2020})Presupposition (@cite{grove-2022})
MonadS α = α → Prop (sets)Option α (maybe)
Unitη_S(x) = {x}η_#(v) = some v
Bindm ⫝̸_S f = ⋃_{x∈m} f(x)v ⋆_# k = k(v); # ⋆_# k = #
EffectIndeterminacyPartiality
ScopeIndefinites escape islandsPresuppositions project past filters

§1 Connectives on Option Bool #

Grove uses two distinct gap-propagation policies:

Material conditional with middle Kleene semantics (Grove eq. 16).

⊤ ⇒ ψ = ψ, ⊥ ⇒ ψ = ⊤, # ⇒ ψ = #.

The conditional is true when its antecedent is false (regardless of the consequent's definedness), and propagates the consequent when the antecedent is true. Undefinedness in the antecedent absorbs.

Equations
Instances For

    Weak Kleene conjunction (used by ∀ₚ).

    Undefinedness absorbs from either side, then falsity absorbs. In contrast, Strong Kleene has ⊥ ∧ # = ⊥, while Weak Kleene has ⊥ ∧ # = #.

    Equations
    Instances For

      §2 The monad Iₚ #

      Iₚ I α = I → Option α: the Reader monad transformer applied to the Maybe monad. An expression of type Iₚ I α reads an index (world, world-assignment pair, etc.) and returns a possibly-undefined value.

      This monad treats intensionality and presupposition uniformly (Grove §4.1): Iₚ is obtained by replacing t with t_# in standard intensional types (i → t becomes i → t_#).

      @[reducible, inline]

      Iₚ I α: the intensional-presuppositional monad.

      An expression of type Iₚ I α reads an index i and returns some v if defined at i, or none if presupposition failure occurs at i.

      Equations
      Instances For
        def Semantics.Composition.MaybeMonad.ηI {I α : Type} (v : α) :
        Iₚ I α

        ηI: unit for Iₚ. Makes a value trivially index-sensitive (ignores the index, always defined). Grove eq. 19, first line.

        Equations
        Instances For
          def Semantics.Composition.MaybeMonad.bindI {I α β : Type} (m : Iₚ I α) (k : αIₚ I β) :
          Iₚ I β

          bindI: bind for Iₚ. Evaluates m at index i; if defined, feeds the result to k at the same index. Grove eq. 19, second line.

          Equations
          Instances For

            §3 Monad laws #

            The three laws from Figure 7 hold for Iₚ. Left Identity and Associativity are the key properties for scope-taking: Left Identity ensures that η + = reconstruction (no scope), and Associativity ensures that cyclic scope-taking (roll-up pied-piping) works.

            theorem Semantics.Composition.MaybeMonad.left_identity {I α β : Type} (v : α) (k : αIₚ I β) :
            bindI (ηI v) k = k v

            Left Identity: lifting a value into the monad and immediately binding is the same as applying the continuation directly.

            This is why global scope for a presupposition trigger that has been locally η-shifted reconstructs to the local meaning (Grove fn. 13).

            Right Identity: binding with ηI is a no-op.

            theorem Semantics.Composition.MaybeMonad.assoc {I α β γ : Type} (m : Iₚ I α) (f : αIₚ I β) (g : βIₚ I γ) :
            bindI (bindI m f) g = bindI m fun (x : α) => bindI (f x) g

            Associativity: sequential scope-taking = direct wide scope.

            This is the presuppositional analog of @cite{charlow-2020}'s ASSOCIATIVITY theorem for the set monad. It guarantees that roll-up pied-piping (taking scope at an island edge, then further) yields the same result as direct scope-taking.

            theorem Semantics.Composition.MaybeMonad.backward_compat {I α β : Type} (f : αβ) (v : α) :
            (bindI (ηI v) fun (x : α) => ηI (f x)) = ηI (f v)

            Backward compatibility: non-presuppositional expressions (those wrapped in some) compose the same way they do without the monad. This means traditional satisfaction-theoretic analyses that use only defined values are preserved inside the monadic setting (Grove §5).

            §4 Evaluation and presuppositional universal #

            The evaluation function evalI (Grove's (·)^ž) converts an intension that may be undefined into an intensional truth value that may be undefined, by feeding the index to itself. The presuppositional universal forallP (Grove's ∀_#) quantifies over a domain with weak-Kleene semantics.

            Evaluation function (·)^ž (Grove eq. 20).

            Given φ : Iₚ I (I → Bool) (a proposition that reads an index, possibly undefined, to return an intension), evalI φ feeds the index to itself: evalI φ i = (φ i).map (· i).

            Equations
            Instances For

              Presuppositional universal ∀_# (Grove eq. 27).

              Uses weak Kleene semantics: none absorbs (if the scope is undefined at any value, the whole universal is undefined).

              Equations
              Instances For

                Presuppositional existential (dual of forallP).

                Equations
                Instances For
                  theorem Semantics.Composition.MaybeMonad.forallP_all_true {α : Type} (xs : List α) (φ : αOption Bool) (h : xxs, φ x = some true) :

                  forallP on an all-true list is some true.

                  theorem Semantics.Composition.MaybeMonad.forallP_undef {α : Type} (xs : List α) (φ : αOption Bool) (x : α) (hx : x xs) (hu : φ x = none) :
                  forallP xs φ = none

                  forallP with an undefined element is none.

                  Since meetWK has none as a zero element, once any φ(x) = none is encountered, the accumulator becomes none and stays none.

                  §5 believe via doxastic accessibility #

                  Grove §4.2 (eq. 28): believe = λφ,x,i. ∀_# j : dox(x,i,j) ⇒ φ(j). The verb quantifies over doxastically accessible worlds with ∀_# and uses the material conditional . The contributes the key filtering behavior: when dox(x,i,j) = false, returns some true regardless of φ(j)'s definedness.

                  def Semantics.Composition.MaybeMonad.believe {W E : Type} (dox : EWWBool) (worlds : List W) (φ : Iₚ W Bool) (x : E) :

                  believe (Grove eq. 28).

                  Given an accessibility relation dox, a list of worlds, a complement φ : Iₚ W Bool, an agent x, and an evaluation world i: believe dox worlds φ x i = ∀_# j ∈ worlds : dox(x,i,j) ⇒ φ(j)

                  Equations
                  Instances For

                    §6 Bridges to existing linglib types #

                    Option Bool, Truth3, and PrProp W are three representations of possibly-undefined truth values. These conversions connect Grove's formalization to the rest of the presupposition infrastructure.

                    materialCond corresponds to middle Kleene implication on Truth3.

                    meetWK corresponds to Truth3.meetWeak from Core.Duality.

                    joinWK corresponds to Truth3.joinWeak from Core.Duality.

                    Convert Iₚ W Bool to Prop3 W (world-indexed three-valued proposition).

                    Equations
                    Instances For

                      Convert Iₚ W Bool to PrProp W.

                      The presupposition field is isSome (defined?), and the assertion is the Bool value (defaulting to false when undefined).

                      Equations
                      Instances For
                        theorem Semantics.Composition.MaybeMonad.toPrProp_assertion {W : Type} (φ : Iₚ W Bool) (w : W) (v : Bool) (h : φ w = some v) :