Grounded context polarity #
Semantic grounding for ContextPolarity (defined in NaturalLogic) via
mathlib's Monotone/Antitone infrastructure: IsUpwardEntailing/
IsDownwardEntailing abbreviate Monotone/Antitone on Set α → Set β,
so the composition rules (UE ∘ UE = UE, DE ∘ DE = UE, mixed = DE) are
Monotone.comp/Antitone.comp and friends. The polarity composition rules
are a homomorphic image of the EntailmentSig monoid — see
EntailmentSig.toContextPolarity_compose. GroundedPolarity bundles a
context function with its monotonicity proof on the toy World model.
A context function is upward entailing if it preserves entailment:
Monotone on sets of worlds.
Equations
- Entailment.IsUpwardEntailing f = Monotone f
Instances For
A context function is downward entailing if it reverses entailment:
Antitone on sets of worlds.
Equations
- Entailment.IsDownwardEntailing f = Antitone f
Instances For
Equations
Instances For
Equations
Instances For
Double negation is UE.
UE ∘ UE = UE
DE ∘ DE = UE (double negation).
UE ∘ DE = DE
DE ∘ UE = DE
Material conditional with fixed consequent: "If _, then c"
Equations
- Entailment.materialCond c p w = (p w → c w)
Instances For
Conditional antecedent is DE.
Conditional consequent is UE.
A grounded polarity is either UE or DE, with proof.
- ue : GroundedUE → GroundedPolarity
- de : GroundedDE → GroundedPolarity
Instances For
Extract the ContextPolarity enum from a grounded polarity.
Equations
Instances For
Equations
- Entailment.mkUpward ctx h = Entailment.GroundedPolarity.ue { context := ctx, witness := h }
Instances For
Equations
- Entailment.mkDownward ctx h = Entailment.GroundedPolarity.de { context := ctx, witness := h }
Instances For
The identity context is grounded UE.
Instances For
Negation is grounded DE.
Equations
Instances For
Compose two grounded polarities, with proof that the composition has the right property.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Grounded polarity composition agrees with ContextPolarity.compose.
Double DE gives UE (grounded version).
Scalar implicatures require UE context.
Equations
Instances For
Implicature is allowed in identity context.
Implicature is blocked under single negation.
Implicature is allowed under double negation.