Documentation

Linglib.Theories.Semantics.Probabilistic.BayesianSemantics

structure Semantics.Montague.BayesianSemantics.ThresholdPred (E : Type u_1) (Θ : Type u_2) [Fintype Θ] [Preorder Θ] :
Type (max u_1 u_2)

A threshold predicate: "x has property P iff measure(x) > θ"

This models gradable adjectives like "tall", "expensive", etc.

  • measure : EΘ

    The measure function (e.g., height, price)

  • thresholdPrior : Core.FinitePMF Θ

    Prior over thresholds

Instances For

    Convert to a parameterized predicate

    Equations
    Instances For
      def Semantics.Montague.BayesianSemantics.ThresholdPred.gradedTruth {E : Type u_1} {Θ : Type u_2} [Fintype Θ] [Preorder Θ] [DecidableRel fun (x1 x2 : Θ) => x1 < x2] (pred : ThresholdPred E Θ) (x : E) :

      Graded truth for threshold predicates

      Equations
      Instances For
        theorem Semantics.Montague.BayesianSemantics.ThresholdPred.gradedTruth_eq_prob {E : Type u_1} {Θ : Type u_2} [Fintype Θ] [DecidableEq Θ] [Preorder Θ] [DecidableRel fun (x1 x2 : Θ) => x1 < x2] (pred : ThresholdPred E Θ) (x : E) :
        pred.gradedTruth x = pred.thresholdPrior.prob fun (θ : Θ) => decide (pred.measure x > θ)

        Graded truth equals probability that measure > threshold.

        For "tall(John)": P(height(John) > θ) under the threshold prior.

        structure Semantics.Montague.BayesianSemantics.FeaturePred (E : Type u_1) (n : ) :
        Type (max u_1 (u_2 + 1))

        A feature-based predicate where entities are characterized by features and the predicate is a linear classifier.

        Entity satisfaction: bias + Σᵢ weight_i · feature_i(x) > 0

        This models the Bernardy et al. approach where predicates are hyperplanes.

        Instances For

          Dot product of weight vector and feature vector

          Equations
          Instances For
            def Semantics.Montague.BayesianSemantics.FeaturePred.satisfies {E : Type u_1} {n : } (pred : FeaturePred E n) (p : pred.params) (x : E) :

            Boolean semantics for a specific parameter setting

            Equations
            Instances For

              Convert to parameterized predicate

              Equations
              Instances For

                Graded truth emerges from parameter uncertainty

                Equations
                Instances For

                  Compositional Structure #

                  @cite{bernardy-blanck-chatzikyriakidis-lappin-2018}

                  Two Strategies #

                  1. Marginalize early (GradedProposition.lean):

                    • Convert to graded values immediately
                    • Compose using probabilistic operations (×, +−pq)
                    • Algebraic structure (De Morgan, etc.)
                  2. Marginalize late (this module):

                    • Keep Boolean semantics during composition
                    • Parameter uncertainty tracked but not resolved
                    • Graded values emerge only when needed
                  3. Probability monad (Grove's PDS):

                    • Standard compositional semantics
                    • Probability as monadic effect
                    • Compiles to probabilistic programs

                  Strategy #3 is most principled but requires more infrastructure. This module implements #2 as an intermediate step.