Documentation

Linglib.Theories.Semantics.Composition.Effects

Effect-Driven Interpretation #

@cite{bumford-charlow-2024}

@cite{bumford-charlow-2024} propose that diverse semantic phenomena — scope, binding, conventional implicatures, indeterminacy — are all instances of algebraic effects within the Functor → Applicative → Monad hierarchy. The grammar's composition rules are built from meta-combinators (F̄, F̃, A, J) that systematically lift basic modes of combination to work in the presence of effects.

This file formalizes the core of their framework and bridges it to existing linglib infrastructure:

EffectPaper nameTypelinglib type
ScopeC(α → ρ) → ρCont R A
CI / supplementationWα × List PWriter P A
Input (binding)Rι → αReader (Binding.lean)
Output (antecedents)Wα × ιProd
IndeterminacyS{α}α → Prop (SetMonad.lean)

Organization #

Coverage #

Of the 9 meta-combinators in Figure 10, this file formalizes 5: F̄ (Map Left), F̃ (Map Right), A (Structured App), J (Join), C (Co-unit).

Omitted: Ū/Ũ (Unit Left/Right) are trivial wrappers around pure; ⊿̄/⊿̃ (Eject Left/Right) require the Υ isomorphism from §5.3.2 (Kleisli arrow repackaging), which is not yet formalized.

§1 Typeclass instances for existing types #

Register Functor, Applicative, and Monad instances for linglib's Cont R and Writer P types, delegating to existing operations.

Note: Cont R A := (A → R) → R requires R : Type (not universe-polymorphic) for Lean's Monad class.

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.
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.
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.

§2 Meta-combinators #

central contribution: meta-combinators that build higher-order modes of combination from basic ones. Given any binary combinator (∗) :: σ → τ → ω (e.g., function application), these produce new combinators that work when one or both daughters carry effects.

Meta-combinatorEffectful daughtersHierarchyPaper ref
F̄ (Map Left)leftFunctorFigure 4
F̃ (Map Right)rightFunctorFigure 4
A (Structured App)bothApplicativeFigure 7
J (Join)both + nestedMonadFigure 8
C (Co-unit)adjoint pairAdjunctionFigure 10

F̄, F̃, A, and J are parameterized over any effect type Σ for which the appropriate typeclass (Functor/Applicative/Monad) holds. C is defined in §4, parameterized over an adjunction (specifically W ⊣ R).

def Semantics.Composition.Effects.mapL {σ τ ω : Type} {F : TypeType} [Functor F] (star : στω) (e₁ : F σ) (e₂ : τ) :
F ω

(Map Left): lift a binary combinator when the left daughter carries an effect.

eq. 2.17a, Figure 4: F̄(∗) E₁ E₂ := (λa. a ∗ E₂) • E₁

Equations
Instances For
    def Semantics.Composition.Effects.mapR {σ τ ω : Type} {F : TypeType} [Functor F] (star : στω) (e₁ : σ) (e₂ : F τ) :
    F ω

    (Map Right): lift a binary combinator when the right daughter carries an effect.

    eq. 2.17b, Figure 4: F̃(∗) E₁ E₂ := (λb. E₁ ∗ b) • E₂

    Equations
    Instances For
      def Semantics.Composition.Effects.structuredApp {σ τ ω : Type} {F : TypeType} [Applicative F] (star : στω) (e₁ : F σ) (e₂ : F τ) :
      F ω

      A (Structured Application): lift when both daughters carry effects of the same type, merging them into a single layer.

      eq. 3.10, Figure 7: A(∗) E₁ E₂ := η(∗) ⊛ E₁ ⊛ E₂

      Equations
      Instances For
        def Semantics.Composition.Effects.joinMode {σ τ ω : Type} {F : TypeType} [Monad F] (star : στF ω) (e₁ : F σ) (e₂ : F τ) :
        F ω

        J (Join): monadic flattening for when the basic combinator produces a nested effect F(F ω).

        eq. 4.22, Figure 8: J(∗) E₁ E₂ := μ(E₁ ∗ E₂) where μ is monadic join.

        Equations
        Instances For
          @[reducible]
          def Semantics.Composition.Effects.fa' {α β : Type} (f : αβ) (x : α) :
          β

          Forward application: f > x := f x.

          Equations
          Instances For
            @[reducible]
            def Semantics.Composition.Effects.ba' {α β : Type} (x : α) (f : αβ) :
            β

            Backward application: x < f := f x.

            Equations
            Instances For
              theorem Semantics.Composition.Effects.mapR_fa_eq_fmap {α β : Type} {F : TypeType} [Functor F] (f : αβ) (e₂ : F α) :
              mapR fa' f e₂ = f <$> e₂

              F̃(>) = fmap. Map Right applied to forward application is functorial map — the forward mapping operation (•>).

              eq. 2.18.

              theorem Semantics.Composition.Effects.mapL_ba_eq_fmap {α β : Type} {F : TypeType} [Functor F] (e₁ : F α) (f : αβ) :
              mapL ba' e₁ f = f <$> e₁

              F̄(<) = fmap. Map Left applied to backward application is functorial map — the backward mapping operation (•<).

              eq. 2.18.

              theorem Semantics.Composition.Effects.fmap_eq_pure_ap {F : TypeType} [Applicative F] [LawfulApplicative F] {α β : Type} (f : αβ) (m : F α) :
              f <$> m = pure f <*> m

              Eq. 3.6: (•) = η + (⊛). The functorial map decomposes as pure (η) the function, then applicatively sequence (⊛).

              eq. 3.6: k • m := η k ⊛ m

              theorem Semantics.Composition.Effects.structuredApp_pure_left {σ τ ω : Type} {F : TypeType} [Applicative F] [LawfulApplicative F] (star : στω) (a : σ) (e₂ : F τ) :
              structuredApp star (pure a) e₂ = mapR star a e₂

              Structured Application with a pure left reduces to Map Right: A(∗)(η a)(E₂) = F̃(∗)(a)(E₂).

              Follows from the Homomorphism and Identity laws for applicatives (eq. 3.4).

              §3 Generalized Application and hierarchy theorems #

              The meta-combinators instantiated to forward application (>) yield the familiar hierarchy of composition rules:

              H&K's FA is the base case — the identity functor applied to ordinary (effect-free) meanings.

              def Semantics.Composition.Effects.fApp {α β : Type} {F : TypeType} [Functor F] (f : αβ) (ma : F α) :
              F β

              Functorial application: pure function, effectful argument.

              This is the (•) map operation from eq. 2.3, with the forward variant (•>) from Figure 3.

              Equations
              Instances For
                def Semantics.Composition.Effects.aApp {α β : Type} {F : TypeType} [Applicative F] (mf : F (αβ)) (ma : F α) :
                F β

                Applicative application: both function and argument effectful.

                This is (⊛) from eq. 3.3 — the applicative functor's sequencing operation.

                Equations
                Instances For
                  def Semantics.Composition.Effects.mApp {α β : Type} {F : TypeType} [Monad F] (mf : F (αβ)) (ma : F α) :
                  F β

                  Monadic application: both effectful, with sequencing.

                  Enabled by (≫=) from Ch. 4. Every monad determines an applicative via eq. 4.19a: F ⊛ X = F ≫= λf. f • X.

                  Equations
                  Instances For
                    theorem Semantics.Composition.Effects.fApp_id_is_fa {α β : Type} (f : αβ) (a : α) :
                    fApp f a = f a

                    FA is functorial application for the identity functor.

                    theorem Semantics.Composition.Effects.mApp_eq_aApp {α β : Type} {F : TypeType} [Monad F] [LawfulMonad F] (mf : F (αβ)) (ma : F α) :
                    mApp mf ma = aApp mf ma

                    For lawful monads, monadic application agrees with applicative.

                    theorem Semantics.Composition.Effects.aApp_pure_left {α β : Type} {F : TypeType} [Applicative F] [LawfulApplicative F] (f : αβ) (ma : F α) :
                    aApp (pure f) ma = fApp f ma

                    Applicative application with pure f reduces to functorial map.

                    theorem Semantics.Composition.Effects.aApp_eq_structuredApp_fa {α β : Type} {F : TypeType} [Applicative F] [LawfulApplicative F] (mf : F (αβ)) (ma : F α) :
                    aApp mf ma = structuredApp fa' mf ma

                    Applicative application = Structured Application applied to FA.

                    (⊛) is A(>) — the meta-combinator A instantiated to forward application (eq. 3.10).

                    §4 The W ⊣ R adjunction for binding #

                    §5.1 proposes that binding arises from an adjunction between the output effect W (= product) and the input effect R (= reader). The adjunction W ⊣ R says that functions out of pairs α × ι → β are isomorphic to curried functions α → ι → β — this is just currying.

                    The co-unit ε of this adjunction — which takes a pair ⟨f, x⟩ and applies f to x — IS the binding mechanism. When an antecedent stores itself via ▷(x) = ⟨x, x⟩ and the sentence body uses the bound variable, the co-unit ε yields the W combinator W κ x = κ x x from Binding.lean.

                    Note: the paper's W (product) is distinct from linglib's Writer P A (accumulating list log). The product W models single-referent storage; the Writer models CI accumulation.

                    def Semantics.Composition.Effects.Φ {ι α β : Type} (c : α × ιβ) (a : α) (x : ι) :
                    β

                    Φ (currying): convert from uncurried to curried form.

                    eq. 5.3: Φ := λcaλx. c ⟨a, x⟩

                    Equations
                    Instances For
                      def Semantics.Composition.Effects.Ψ {ι α β : Type} (k : αιβ) (p : α × ι) :
                      β

                      Ψ (uncurrying): convert from curried to uncurried form.

                      eq. 5.3: Ψ := λk⟨a, x⟩. k a x

                      Equations
                      Instances For
                        theorem Semantics.Composition.Effects.Φ_Ψ_id {ι α β : Type} (k : αιβ) :
                        Φ (Ψ k) = k

                        Φ and Ψ are inverses (curry-uncurry round-trip).

                        theorem Semantics.Composition.Effects.Ψ_Φ_id {ι α β : Type} (c : α × ιβ) :
                        Ψ (Φ c) = c

                        Ψ and Φ are inverses (uncurry-curry round-trip).

                        def Semantics.Composition.Effects.adj_η {ι α : Type} (a : α) (x : ι) :
                        α × ι

                        η (unit) of W ⊣ R: η a x = ⟨a, x⟩.

                        eq. 5.4: η := Φ id

                        Equations
                        Instances For
                          def Semantics.Composition.Effects.adj_ε {ι α : Type} (p : (ια) × ι) :
                          α

                          ε (co-unit) of W ⊣ R: ε ⟨f, x⟩ = f x.

                          eq. 5.4: ε := Ψ id

                          The co-unit extracts the value by applying the stored function to the stored referent — this IS binding resolution.

                          Equations
                          Instances For
                            theorem Semantics.Composition.Effects.adj_counit_yields_W {ι β : Type} (κ : ιιβ) (x : ι) :

                            The co-unit applied to reflexive binding yields the W combinator.

                            When an antecedent x stores itself (via ▷(x) = ⟨x, x⟩) and the sentence body κ has been partially applied to x, we get ε(κ x, x) = κ x x = W κ x.

                            This connects adjunction-based binding to the W combinator in Binding.lean.

                            theorem Semantics.Composition.Effects.adj_binding_agrees_with_hk {m : Montague.Model} (n : ) (body : m.Entitym.EntityBool) (binder : m.Entity) (g : Montague.Variables.Assignment m) :
                            adj_ε (body binder, binder) = body (g.update n binder n) (g.update n binder n)

                            H&K assignment-based binding and the adjunction co-unit agree for reflexive binding: both produce body(binder, binder).

                            This connects the adjunction (§5.1 of the paper) to the existing hk_bs_reflexive_equiv theorem in Binding.lean.

                            The C meta-combinator #

                            eq. 5.8, Figure 10: the co-unit meta-combinator uses the adjunction's ε to compose W-computations (antecedent storage) with R-computations (pronoun resolution). For W ⊣ R, C reduces to unpacking the stored referent and feeding it to the reader function.

                            def Semantics.Composition.Effects.counitApp {ι σ τ ω : Type} (star : στω) (e₁ : σ × ι) (e₂ : ιτ) :
                            ω

                            C (Co-unit): the adjunction-based meta-combinator for binding.

                            eq. 5.8, Figure 10: C(∗) E₁ E₂ := ε((λl. (λr. l ∗ r) • E₂) • E₁)

                            For the W ⊣ R adjunction (§5.1), where W α = α × ι (product) and R α = ι → α (reader), the two fmap operations compose the binary combinator with both computations, and ε extracts the result: C(∗) ⟨s, i⟩ f = s ∗ f(i)

                            Crossover (§5.2): The type signature encodes the crossover constraint — the W effect (antecedent, σ × ι) must be the left daughter and the R effect (pronoun, ι → τ) the right daughter. Swapping them produces a type error, not a binding failure: there is no well-typed counitApp star (e₂ : ι → τ) (e₁ : σ × ι).

                            Equations
                            Instances For
                              theorem Semantics.Composition.Effects.counitApp_via_adj_ε {ι σ τ ω : Type} (star : στω) (e₁ : σ × ι) (e₂ : ιτ) :
                              counitApp star e₁ e₂ = adj_ε (star e₁.1 e₂, e₁.2)

                              C decomposes as ε applied to the doubly-mapped product.

                              The general formula maps (λr. l ∗ r) over E₂ (R-fmap = ∘), maps the result over E₁ (W-fmap on the first component), then applies ε to extract the value.

                              theorem Semantics.Composition.Effects.counitApp_reflexive_is_W {ι ω : Type} (κ : ιιω) (x : ι) :

                              C with reflexive storage ▷(x) = ⟨x, x⟩ and identity reader yields W.

                              When an antecedent stores itself and the pronoun is the identity reader, C(>) reduces to the W combinator from Binding.lean: C(>) ⟨κ x, x⟩ id = κ x x = W κ x.

                              This connects adjunction mechanism (their central §5 contribution) to the classical duplicator combinator that underlies binding.

                              §5 Effect operations and handlers #

                              Named operations from, connecting existing linglib infrastructure to the effect/handler pattern.

                              Effects (introduce computational context):

                              Handlers (eliminate computational context):

                              Log a CI proposition as a side-effect. Alias for Writer.tell.

                              Equations
                              Instances For

                                Handle the scope effect by evaluating with the identity continuation. Alias for Cont.lower.

                                Equations
                                Instances For

                                  Handle CI effects by extracting the value and accumulated log.

                                  Equations
                                  Instances For

                                    §6 Bridge theorems #

                                    Connect the effect framework to existing linglib constructions, proving that independently-developed linglib modules are instances of the effect-driven architecture.

                                    theorem Semantics.Composition.Effects.writer_app_is_seq {P A B : Type} (mf : WriterMonad.Writer P (AB)) (mx : WriterMonad.Writer P A) :
                                    mf.app mx = mf <*> mx

                                    Writer.app is applicative application (⊛) for the Writer monad.

                                    This connects WriterMonad.lean's monadic application to the effect hierarchy.

                                    Lowering a Cont is handling the scope effect.

                                    A TwoDimProp embeds into a Writer (W → Bool) (W → Bool): the at-issue content is the value, the CI is the log.

                                    This connects @cite{potts-2005}'s two-dimensional semantics to Writer effect (their W constructor in Table 2).

                                    Equations
                                    Instances For

                                      CI projection through negation follows from the Writer architecture: map transforms the value but leaves the log untouched.

                                      The at-issue content of negation is pointwise negation of the original.

                                      A generalized quantifier IS a Cont Bool Entity value.

                                      Ch. 4: the continuation monad is the algebraic effect for scope-taking. A GQ (e → t) → t IS Cont Bool Entity by definition.

                                      Equations
                                      Instances For

                                        A Cont Bool Entity value IS a generalized quantifier.

                                        Equations
                                        Instances For

                                          Round-trip: GQ → Cont → GQ is identity.

                                          Binding via the C meta-combinator #

                                          Worked derivation connecting C (eq. 5.8) to existing binding infrastructure over the toy model.

                                          The W combinator W κ x = κ x x is the shared link between three independent binding mechanisms:

                                          The derivation follows §5.1: the subject stores itself as an antecedent via ▷(x) = ⟨x, x⟩ (a W-computation), the reflexive pronoun is the identity reader (an R-computation), and C resolves the binding by feeding the stored referent to the reader.

                                          def Semantics.Composition.Effects.store {α : Type} (x : α) :
                                          α × α

                                          Antecedent storage: ▷(x) = ⟨x, x⟩.

                                          eq. 5.1b: an entity stores its referent in the W (product) effect, making it available for downstream binding via the co-unit ε.

                                          Equations
                                          Instances For
                                            theorem Semantics.Composition.Effects.counitApp_ba_store_is_W {ι β : Type} (body : ιιβ) (x : ι) :

                                            C(<) with storage yields the W combinator.

                                            Backward-application variant of counitApp_reflexive_is_W: C(<) ▷(x) body = body x x = W body x.

                                            Reflexive binding: "John sees himself" via C.

                                            The subject stores itself (▷(john) = ⟨john, john⟩), the reflexive pronoun resolves to the object via the identity reader, and C(<) merges them: C(<) ▷(j) (λi. sees i) = sees j j = false.

                                            The false result confirms the toy model has no reflexive seeing (John sees Mary and Mary sees John, but neither sees themselves).

                                            C-based binding agrees with H&K assignment-based binding: both compute sees(g[1↦j](1), g[1↦j](1)) = sees(j, j).

                                            This connects adjunction mechanism to @cite{heim-kratzer-1998}'s predicate abstraction.

                                            §7 General scope agreement #

                                            The ScopeBridge section (§6) proved Cont ↔ QR agreement for the toy model via native_decide. Here we prove the agreement is structural: it holds for any type, any quantifier, and any predicate — not because we checked all cases, but because the two approaches compute the same function.

                                            The key insight: Cont R E := (E → R) → R is literally a generalized quantifier. The identity function gqAsCont witnesses this — there is no encoding, no coercion, no wrapper. So the Cont derivation is GQ application by definition.

                                            Scope ambiguity in the Cont framework is not a special mechanism: it is the order of monadic bind. Surface scope = bind the subject first; inverse scope = bind the object first. The bind order IS the scope order, and lower IS GQ application.

                                            This establishes Cont as a general scope framework, with QR trees as one particular syntax for specifying bind order.

                                            theorem Semantics.Composition.Effects.cont_scope_reduce {E R : Type} (q : Core.Continuation.Cont R E) (scope : ER) :
                                            (q.bind fun (x : E) => Core.Continuation.Cont.pure (scope x)).lower = q scope

                                            Single scope reduction: lowering a Cont-wrapped quantifier with a pure scope predicate is plain GQ application.

                                            lower(Q >>= λx. pure(P x)) = Q(P)

                                            This is the general version of scope_agrees_with_qr_everyStudentSleeps — it holds for ANY quantifier and ANY predicate, not just the toy model.

                                            theorem Semantics.Composition.Effects.cont_scope_double {E R : Type} (q₁ q₂ : Core.Continuation.Cont R E) (rel : EER) :
                                            (q₁.bind fun (x : E) => q₂.bind fun (y : E) => Core.Continuation.Cont.pure (rel x y)).lower = q₁ fun (x : E) => q₂ fun (y : E) => rel x y

                                            Two-quantifier scope reduction: nested Cont binds compute nested GQ application. The bind nesting determines scope order.

                                            lower(Q₁ >>= λx. Q₂ >>= λy. pure(R x y)) = Q₁(λx. Q₂(λy. R x y))

                                            theorem Semantics.Composition.Effects.scope_ambiguity_is_bind_order {E R : Type} (q₁ q₂ : Core.Continuation.Cont R E) (rel : EER) :
                                            ((q₁.bind fun (x : E) => q₂.bind fun (y : E) => Core.Continuation.Cont.pure (rel x y)).lower = q₁ fun (x : E) => q₂ fun (y : E) => rel x y) (q₂.bind fun (y : E) => q₁.bind fun (x : E) => Core.Continuation.Cont.pure (rel x y)).lower = q₂ fun (y : E) => q₁ fun (x : E) => rel x y

                                            Scope ambiguity = bind order. The two readings of "Q₁ R Q₂" arise from nesting Q₁ outside Q₂ vs Q₂ outside Q₁.

                                            Both reduce to GQ application in the corresponding order.

                                            theorem Semantics.Composition.Effects.cont_scope_triple {E R : Type} (q₁ q₂ q₃ : Core.Continuation.Cont R E) (rel : EEER) :
                                            (q₁.bind fun (x : E) => q₂.bind fun (y : E) => q₃.bind fun (z : E) => Core.Continuation.Cont.pure (rel x y z)).lower = q₁ fun (x : E) => q₂ fun (y : E) => q₃ fun (z : E) => rel x y z

                                            Three-quantifier scope: the pattern extends to arbitrary depth.

                                            theorem Semantics.Composition.Effects.cont_pure_is_fa {R A : Type} (f : AR) (x : A) :

                                            Non-scope-taking = ordinary FA: when all meanings are wrapped in Cont.pure, Cont composition reduces to function application.

                                            lower(pure(f) >>= λg. pure(x) >>= λy. pure(g y)) = f x

                                            This is the embedding of Reader (the non-scope-taking fragment) into Cont: @cite{charlow-2018}'s ρ(f) ⊛ ρ(x) = ρ(f x) is exactly the Cont homomorphism law.

                                            QR scope = Cont scope via lambdaAbsG: the structural connection between QR trees and Cont derivations.

                                            In a QR tree [Q [n body]], Predicate Abstraction produces Q(λx. ⟦body⟧^{g[n↦x]}) = Q(lambdaAbsG n body g).

                                            In a Cont derivation, lower(bind(Q, λx. pure(body(g[n↦x])))) = Q(λx. body(g[n↦x])) = Q(lambdaAbsG n body g).

                                            Both compute the same thing: the quantifier applied to the predicate abstraction of its scope. QR and Cont differ only in how scope order is specified (tree structure vs bind order), not in what they compute.

                                            §8 Three-way binding unification #

                                            Three independently-developed binding mechanisms in linglib all compute the same operation f e e:

                                            SourceOperationDefinitionFile
                                            @cite{heim-kratzer-1998}denotGJoin (μ)λg. f g gVariables.lean
                                            @cite{barker-shan-2014}W (duplicator)W κ x = κ x xBinding.lean
                                            adj_ε (co-unit)ε(f e, e) = (f e) eEffects.lean §4

                                            The individual two-way bridges exist:

                                            Here we close the triangle with a single three-way theorem.

                                            theorem Semantics.Composition.Effects.w_three_way {E A : Type} (f : EEA) (e : E) :
                                            (fun (g : E) => f g g) e = Reference.Binding.W f e Reference.Binding.W f e = adj_ε (f e, e)

                                            Three-way W: the duplicator, Reader join, and adjunction co-unit all compute f e e. This is the universal binding mechanism.

                                            The identity is definitional: the three frameworks are not merely extensionally equal but intensionally identical up to currying/pairing.

                                            Specialization for Montague assignments: denotGJoin = W = adj_ε when applied to assignment-dependent meanings.

                                            Closing the triangle directly: denotGJoin = adj_ε ∘ ⟨f·, ·⟩.

                                                denotGJoin ──── rfl ────→ W
                                                      \                    |
                                                       \                   |
                                                   rfl  \              rfl |
                                                         ↘                 ↓
                                                           adj_ε ∘ ⟨f·, ·⟩
                                            

                                            §9 Indeterminacy effect #

                                            The indeterminacy effect — labeled S in's Table 2 — is the set monad (S, η, ⫝̸) from @cite{charlow-2020}, formalized in SetMonad.lean.

                                            Effectη (pure)⫝̸ (bind)Linguistic use
                                            Scope (C)λκ. κ xλκ. m(λa. f a κ)Quantifier scope
                                            CI (W)⟨x, []⟩⟨(f m.val).val, m.log ++ ...⟩Supplements
                                            Binding (R)λ_. xλe. f(m e) eAssignment-sensitivity
                                            Indeterminacy (S){x}⋃_{a ∈ m} f(a)Indefinites, focus, wh

                                            The set monad's applicative instance is pointwise composition — the standard mechanism of alternative semantics (@cite{hamblin-1973b}, @cite{kratzer-shimoyama-2002}). Its monadic bind is scope-taking — the mechanism @cite{charlow-2020} argues is needed for exceptional scope.

                                            The applicative is strictly weaker: it cannot derive selectivity (§5.4 of the paper) or the Binder Roof Constraint (§6.4). The monad can.

                                            The set monad's η is the indeterminacy effect's pure.

                                            theorem Semantics.Composition.Effects.indeterminacy_bind_is_setBind {A B : Type} (m : AProp) (f : ABProp) :
                                            SetMonad.setBind m f = fun (b : B) => ∃ (a : A), m a f a b

                                            The set monad's ⫝̸ is the indeterminacy effect's bind.

                                            theorem Semantics.Composition.Effects.indeterminacy_associativity {A B C : Type} (m : AProp) (f : ABProp) (g : BCProp) :

                                            Indeterminacy obeys ASSOCIATIVITY. Re-export from SetMonad.lean.

                                            This is the property that distinguishes the full monad from the mere applicative: (m ⫝̸ f) ⫝̸ g = m ⫝̸ (λx. f x ⫝̸ g). Without it, indefinites cannot iteratively scope out of nested islands.