Documentation

Linglib.Semantics.Entailment.Polarity

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.

@[reducible, inline]
abbrev Entailment.IsUpwardEntailing {α : Type u_1} {β : Type u_2} (f : Set αSet β) :

A context function is upward entailing if it preserves entailment: Monotone on sets of worlds.

Equations
Instances For
    @[reducible, inline]
    abbrev Entailment.IsDownwardEntailing {α : Type u_1} {β : Type u_2} (f : Set αSet β) :

    A context function is downward entailing if it reverses entailment: Antitone on sets of worlds.

    Equations
    Instances For
      @[reducible, inline]
      abbrev Entailment.IsUE {α : Type u_1} {β : Type u_2} (f : Set αSet β) :
      Equations
      Instances For
        @[reducible, inline]
        abbrev Entailment.IsDE {α : Type u_1} {β : Type u_2} (f : Set αSet β) :
        Equations
        Instances For
          theorem Entailment.ue_comp_ue {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : Set βSet γ} {g : Set αSet β} (hf : IsUpwardEntailing f) (hg : IsUpwardEntailing g) :

          UE ∘ UE = UE

          theorem Entailment.de_comp_de {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : Set βSet γ} {g : Set αSet β} (hf : IsDownwardEntailing f) (hg : IsDownwardEntailing g) :

          DE ∘ DE = UE (double negation).

          theorem Entailment.ue_comp_de {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : Set βSet γ} {g : Set αSet β} (hf : IsUpwardEntailing f) (hg : IsDownwardEntailing g) :

          UE ∘ DE = DE

          theorem Entailment.de_comp_ue {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : Set βSet γ} {g : Set αSet β} (hf : IsDownwardEntailing f) (hg : IsUpwardEntailing g) :

          DE ∘ UE = DE

          Negation reverses entailment.

          DE contexts reverse scalar strength.

          def Entailment.materialCond (c : Set World) :
          Set WorldSet World

          Material conditional with fixed consequent: "If _, then c"

          Equations
          Instances For

            Conditional antecedent is DE.

            Conditional consequent is UE.

            A grounded UE polarity carries proof that a context function is monotone.

            Instances For

              A grounded DE polarity carries proof that a context function is antitone.

              Instances For

                A grounded polarity is either UE or DE, with proof.

                Instances For
                  def Entailment.mkUpward (ctx : Set WorldSet World) (h : Monotone ctx) :
                  Equations
                  Instances For
                    def Entailment.mkDownward (ctx : Set WorldSet World) (h : Antitone ctx) :
                    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.

                        theorem Entailment.double_de_is_ue_grounded (f g : Set WorldSet World) (hf : Antitone f) (hg : Antitone g) :

                        Double DE gives UE (grounded version).

                        Implicature is allowed in identity context.

                        Implicature is blocked under single negation.