Documentation

Linglib.Semantics.Entailment.Soundness

Soundness of the projectivity calculus #

Semantic grounding for [Ica12]'s projectivity machinery: NLRelation gets its lattice content (Holds, his Definition 1.2 — non-exclusive equations, so is plain ), and a signature is sound for a function (EntailmentSig.SoundFor) when the function projects every relation as the signature's project row says (his Lemma 2.5). The characterization theorems discharge each row from the property family in Entailment — the additive-family rows need the IsCompletely* unit conditions, exactly as Icard's tables assume; the soundness proofs go through over bounded lattices, not just his Boolean lattices.

SoundFor.comp and soundFor_contextProjectivity certify EntailmentSig.compose and path projection against function composition (his Lemma 2.7 and Proposition 2.10): study-file locality computations over the enum become corollaries of facts about actual context functions.

Main declarations #

Order soundness #

With the Refines orders carrying their [Ica12] readings (.all = •, the no-property top; not below the exclusion relations), both orders are certified here: NLRelation.Holds.of_refines (relation-level implication) and EntailmentSig.SoundFor.of_refines (a more specific signature's soundness implies a less specific one's), via the projection monotonicity EntailmentSig.project_refines. soundFor_all holds unconditionally — every function realizes the no-property row.

Lattice content of the relations #

def NaturalLogic.NLRelation.Holds {α : Type u_1} [Lattice α] [BoundedOrder α] :
NLRelationααProp

The lattice content of a natural-logic relation ([Ica12] Definition 1.2), in mathlib's complementation vocabulary: negation is IsCompl, alternation is Disjoint, cover is Codisjoint; forward is non-strict (the enum comments' follows MacCartney's exclusive reading, which the projectivity tables do not need).

Equations
Instances For

    Soundness of a signature for a function #

    def NaturalLogic.EntailmentSig.SoundFor {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] (σ : EntailmentSig) (f : αβ) :

    A signature σ is sound for f when f projects every relation as σ's row of the projection table says ([Ica12] Lemma 2.5: every φ-function projects R to [R]^φ).

    Equations
    Instances For
      theorem NaturalLogic.soundFor_mono_iff {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} :
      EntailmentSig.mono.SoundFor f Monotone f

      The .mono row is sound for exactly the monotone functions.

      theorem NaturalLogic.soundFor_anti_iff {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} :
      EntailmentSig.anti.SoundFor f Antitone f

      The .anti row is sound for exactly the antitone functions.

      theorem NaturalLogic.soundFor_additive {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (h : Entailment.IsCompletelyAdditive f) :

      The .additive row is sound for completely additive functions.

      theorem NaturalLogic.soundFor_mult {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (h : Entailment.IsCompletelyMultiplicative f) :

      The .mult row is sound for completely multiplicative functions.

      theorem NaturalLogic.soundFor_antiAdd {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (h : Entailment.IsCompletelyAntiAdditive f) :

      The .antiAdd row is sound for completely anti-additive functions.

      theorem NaturalLogic.soundFor_antiMult {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (h : Entailment.IsCompletelyAntiMultiplicative f) :

      The .antiMult row is sound for completely anti-multiplicative functions.

      theorem NaturalLogic.soundFor_addMult {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (hadd : Entailment.IsCompletelyAdditive f) (hmult : Entailment.IsCompletelyMultiplicative f) :

      The .addMult row (preserve everything) is sound for morphisms: completely additive and completely multiplicative functions.

      theorem NaturalLogic.soundFor_antiAddMult {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {f : αβ} (haa : Entailment.IsCompletelyAntiAdditive f) (ham : Entailment.IsCompletelyAntiMultiplicative f) :

      The .antiAddMult row is sound for anti-morphisms: completely anti-additive and completely anti-multiplicative functions. This is the sentential-negation row — the semantic content of "double negation is a morphism".

      theorem NaturalLogic.soundFor_all {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] (f : αβ) :

      Every function realizes the • row: .all is the no-property signature, projecting every relation to #.

      theorem NaturalLogic.NLRelation.Holds.of_refines {β : Type u_2} [Lattice β] [BoundedOrder β] {R R' : NLRelation} {u v : β} (h : R.Holds u v) (href : R.Refines R') :
      R'.Holds u v

      Relation-level order soundness: Refines is the implication order on the lattice content ([Ica12] §1).

      Projection is monotone in the signature order: a more specific signature projects every relation at least as informatively.

      theorem NaturalLogic.EntailmentSig.SoundFor.of_refines {α : Type u_1} {β : Type u_2} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] {σ τ : EntailmentSig} {f : αβ} (h : σ.SoundFor f) (hστ : σ.Refines τ) :

      Signature-order soundness: if σ refines τ (every σ-function is a τ-function), σ-soundness implies τ-soundness. This is the theorem that makes the Refines order mean class inclusion.

      Composition and paths #

      theorem NaturalLogic.EntailmentSig.SoundFor.comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} [Lattice α] [BoundedOrder α] [Lattice β] [BoundedOrder β] [Lattice γ] [BoundedOrder γ] {ψ φ : EntailmentSig} {f : βγ} {g : αβ} (hf : ψ.SoundFor f) (hg : φ.SoundFor g) :
      (ψ * φ).SoundFor (f g)

      Soundness composes along EntailmentSig.compose ([Ica12] Lemma 2.7 + Proposition 2.10): if ψ is sound for the outer function and φ for the inner one, ψ * φ is sound for the composite. This is the theorem that certifies the enum-level compose table against actual context functions.

      theorem NaturalLogic.soundFor_addMult_id {α : Type u_1} [Lattice α] [BoundedOrder α] :

      The identity context is sound for the identity signature .addMult.

      theorem NaturalLogic.soundFor_contextProjectivity {α : Type u_1} [Lattice α] [BoundedOrder α] (l : List (EntailmentSig × (αα))) :
      (∀ pl, p.1.SoundFor p.2)(EntailmentSig.contextProjectivity (List.map Prod.fst l)).SoundFor (List.foldr (fun (x1 x2 : αα) => x1 x2) id (List.map Prod.snd l))

      Path soundness: a path of (signature, context) pairs, each sound, yields a context sound for contextProjectivity of the signature path — the semantic counterpart of [Ica12] Definition 2.9's marking algorithm. Signatures are listed outermost-first, matching contextProjectivity.

      Worked instance: double negation is a morphism, semantically #

      pnot is completely anti-additive and completely anti-multiplicative, so the .antiAddMult row is sound for it; composing it with itself certifies the enum fact ◇⊟ ∘ ◇⊟ = ⊕⊞ against the actual function pnot ∘ pnot.