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
- pred.toParamPred = { semantics := fun (θ : Θ) (x : E) => decide (pred.measure x > θ), prior := pred.thresholdPrior }
Instances For
Graded truth for threshold predicates
Equations
- pred.gradedTruth x = pred.toParamPred.gradedTruth x
Instances For
Graded truth equals probability that measure > threshold.
For "tall(John)": P(height(John) > θ) under the threshold prior.
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.
Extract feature vector from entity
- params : Type u_2
Predicate parameters: bias and weights
Fintype instance for params
- paramsDecEq : DecidableEq self.params
Bias for each parameter setting
Weights for each parameter setting
- prior : Core.FinitePMF self.params
Prior over parameters
Instances For
Dot product of weight vector and feature vector
Equations
- Semantics.Montague.BayesianSemantics.FeaturePred.dotProduct w f = ∑ i : Fin n, w i * f i
Instances For
Boolean semantics for a specific parameter setting
Equations
Instances For
Convert to parameterized predicate
Instances For
Graded truth emerges from parameter uncertainty
Equations
- pred.gradedTruth x = pred.toParamPred.gradedTruth x
Instances For
Compositional Structure #
@cite{bernardy-blanck-chatzikyriakidis-lappin-2018}
Two Strategies #
Marginalize early (
GradedProposition.lean):- Convert to graded values immediately
- Compose using probabilistic operations (×, +−pq)
- Algebraic structure (De Morgan, etc.)
Marginalize late (this module):
- Keep Boolean semantics during composition
- Parameter uncertainty tracked but not resolved
- Graded values emerge only when needed
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.