Natural Logic Relations and Entailment Signatures #
Framework-agnostic infrastructure for the natural logic relation algebra and entailment signatures, following [Ica12] "Inclusion and Exclusion in Natural Language."
Contents #
- NLRelation — 7 natural logic relations (≡, ⊑, ⊒, ^, |, ⌣, #)
- EntailmentSig — 9 entailment signatures unifying monotonicity/additivity
Key operations #
NLRelation.join(⋈): determines resultant relation from chained inferencesEntailmentSig.compose(∘): composes entailment signaturesEntailmentSig.project([]^φ): projects a relation through a function of signature φ
Algebraic structure #
NLRelationcarries aPartialOrder+OrderTop(# = ⊤); the implication order has no bottom (≡ does not entail the exclusion relations)EntailmentSigcarries aPartialOrder+OrderTop(all = ⊤, the no-property signature •) +Monoid(compose; identityaddMult, • absorbing)
The seven basic set-theoretic relations between denotations ([MCM09], [Ica12] §1).
| Symbol | Name | Set relation | Example |
|---|---|---|---|
| ≡ | equivalence | A = B | couch / sofa |
| ⊑ | forward | A ⊂ B | dog / animal |
| ⊒ | reverse | A ⊃ B | animal / dog |
| ^ | negation | A ∩ B = ∅, A ∪ B = U | happy / unhappy |
| | | alternation | A ∩ B = ∅ | cat / dog |
| ⌣ | cover | A ∪ B = U | animal / nondog |
| # | independent | all other cases | hungry / tall |
- equiv : NLRelation
- forward : NLRelation
- reverse : NLRelation
- negation : NLRelation
- alternation : NLRelation
- cover : NLRelation
- independent : NLRelation
Instances For
Equations
- NaturalLogic.instDecidableEqNLRelation x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- NaturalLogic.instReprNLRelation = { reprPrec := NaturalLogic.instReprNLRelation.repr }
Informativity ordering on NL relations.
R ≤ R' means R is at least as informative as R'. The lattice has ≡ at
at the top (least informative); there is no bottom — the two diamonds #
(≡ over ⊑/⊒, ^ over |/⌣) meet only at #.
Refines R R' is the implication ordering ([Ica12] §1): xRy
entails xR'y (certified semantically by NLRelation.Holds.of_refines
in Semantics/Entailment/Soundness.lean). ≡ refines the inclusion
relations but not the exclusion relations (x = y does not make x,y
disjoint or exhaustive); ^ refines both | and ⌣.
Equations
- NaturalLogic.NLRelation.equiv.Refines NaturalLogic.NLRelation.equiv = True
- NaturalLogic.NLRelation.equiv.Refines NaturalLogic.NLRelation.forward = True
- NaturalLogic.NLRelation.equiv.Refines NaturalLogic.NLRelation.reverse = True
- NaturalLogic.NLRelation.equiv.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.forward.Refines NaturalLogic.NLRelation.forward = True
- NaturalLogic.NLRelation.forward.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.reverse.Refines NaturalLogic.NLRelation.reverse = True
- NaturalLogic.NLRelation.reverse.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.negation.Refines NaturalLogic.NLRelation.negation = True
- NaturalLogic.NLRelation.negation.Refines NaturalLogic.NLRelation.alternation = True
- NaturalLogic.NLRelation.negation.Refines NaturalLogic.NLRelation.cover = True
- NaturalLogic.NLRelation.negation.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.alternation.Refines NaturalLogic.NLRelation.alternation = True
- NaturalLogic.NLRelation.alternation.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.cover.Refines NaturalLogic.NLRelation.cover = True
- NaturalLogic.NLRelation.cover.Refines NaturalLogic.NLRelation.independent = True
- NaturalLogic.NLRelation.independent.Refines NaturalLogic.NLRelation.independent = True
- x✝¹.Refines x✝ = False
Instances For
Equations
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isTrue trivial
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.forward = isTrue trivial
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isTrue trivial
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.forward = isTrue trivial
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isTrue trivial
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.negation = isTrue trivial
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isTrue trivial
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.cover = isTrue trivial
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isTrue trivial
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.cover = isTrue trivial
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.independent = isTrue trivial
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isFalse not_false
- NaturalLogic.NLRelation.equiv.instDecidableRelRefines NaturalLogic.NLRelation.cover = isFalse not_false
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isFalse not_false
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isFalse not_false
- NaturalLogic.NLRelation.forward.instDecidableRelRefines NaturalLogic.NLRelation.cover = isFalse not_false
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.forward = isFalse not_false
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isFalse not_false
- NaturalLogic.NLRelation.reverse.instDecidableRelRefines NaturalLogic.NLRelation.cover = isFalse not_false
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.forward = isFalse not_false
- NaturalLogic.NLRelation.negation.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isFalse not_false
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.forward = isFalse not_false
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isFalse not_false
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.alternation.instDecidableRelRefines NaturalLogic.NLRelation.cover = isFalse not_false
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.forward = isFalse not_false
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isFalse not_false
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.cover.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.equiv = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.forward = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.reverse = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.negation = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.alternation = isFalse not_false
- NaturalLogic.NLRelation.independent.instDecidableRelRefines NaturalLogic.NLRelation.cover = isFalse not_false
Equations
Equations
- a.decidableLE b = a.instDecidableRelRefines b
Equations
- One or more equations did not get rendered due to their size.
Equations
- NaturalLogic.NLRelation.instPartialOrder = { toPreorder := NaturalLogic.NLRelation.instPreorder, le_antisymm := NaturalLogic.NLRelation.Refines_antisymm✝ }
Equations
Equations
- NaturalLogic.NLRelation.instOrderTop = { toTop := NaturalLogic.NLRelation.instTop, le_top := NaturalLogic.NLRelation.instOrderTop._proof_1 }
Join operation ⋈ ([Ica12], Lemma 1.5).
Given xRy and yR'z, determines the strongest relation x(R⋈R')z. This is the "join" in the relation algebra sense (not lattice join).
Equations
- NaturalLogic.NLRelation.equiv.join x✝ = x✝
- x✝.join NaturalLogic.NLRelation.equiv = x✝
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.forward = NaturalLogic.NLRelation.forward
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.reverse = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.negation = NaturalLogic.NLRelation.cover
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.alternation = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.cover = NaturalLogic.NLRelation.cover
- NaturalLogic.NLRelation.forward.join NaturalLogic.NLRelation.independent = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.forward = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.reverse = NaturalLogic.NLRelation.reverse
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.negation = NaturalLogic.NLRelation.alternation
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.alternation = NaturalLogic.NLRelation.alternation
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.cover = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.reverse.join NaturalLogic.NLRelation.independent = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.forward = NaturalLogic.NLRelation.alternation
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.reverse = NaturalLogic.NLRelation.cover
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.negation = NaturalLogic.NLRelation.equiv
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.alternation = NaturalLogic.NLRelation.reverse
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.cover = NaturalLogic.NLRelation.forward
- NaturalLogic.NLRelation.negation.join NaturalLogic.NLRelation.independent = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.forward = NaturalLogic.NLRelation.alternation
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.reverse = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.negation = NaturalLogic.NLRelation.forward
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.alternation = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.cover = NaturalLogic.NLRelation.forward
- NaturalLogic.NLRelation.alternation.join NaturalLogic.NLRelation.independent = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.forward = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.reverse = NaturalLogic.NLRelation.cover
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.negation = NaturalLogic.NLRelation.reverse
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.alternation = NaturalLogic.NLRelation.reverse
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.cover = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.cover.join NaturalLogic.NLRelation.independent = NaturalLogic.NLRelation.independent
- NaturalLogic.NLRelation.independent.join x✝ = NaturalLogic.NLRelation.independent
Instances For
≡ is the identity for join.
Entailment signature.
An entailment signature classifies a function by its algebraic properties with respect to ∨ and ∧. This unifies the separate monotonicity and additivity hierarchies into one 9-element lattice.
| Symbol | Name | Properties |
|---|---|---|
| • | all | Any function (no property) |
| + | mono | Monotone (= UE) |
| − | anti | Antitone (= DE) |
| ⊕ | additive | f(A∨B)=f(A)∨f(B), f(⊤)=⊤ |
| ◇ | antiAdd | f(A∨B)=f(A)∧f(B) |
| ⊞ | mult | f(A∧B)=f(A)∧f(B), f(⊥)=⊥ |
| ⊟ | antiMult | f(A∧B)=f(A)∨f(B), f(⊥)=⊤ |
| ⊕⊞ | addMult | Additive + Multiplicative |
| ◇⊟ | antiAddMult | Anti-additive + Anti-mult |
- all : EntailmentSig
- mono : EntailmentSig
- anti : EntailmentSig
- additive : EntailmentSig
- antiAdd : EntailmentSig
- mult : EntailmentSig
- antiMult : EntailmentSig
- addMult : EntailmentSig
- antiAddMult : EntailmentSig
Instances For
Equations
- NaturalLogic.instDecidableEqEntailmentSig x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- NaturalLogic.instReprEntailmentSig = { reprPrec := NaturalLogic.instReprEntailmentSig.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Refinement ordering on entailment signatures: σ.Refines τ iff every
σ-function is a τ-function ([Ica12]'s ≼, §2.2). addMult/antiAddMult
are the most specific elements of their halves; all (•, any function) is
the top — every class is contained in it. Certified semantically by
EntailmentSig.SoundFor.of_refines in Semantics/Entailment/Soundness.lean.
Equations
- x✝.Refines NaturalLogic.EntailmentSig.all = True
- NaturalLogic.EntailmentSig.addMult.Refines NaturalLogic.EntailmentSig.addMult = True
- NaturalLogic.EntailmentSig.addMult.Refines NaturalLogic.EntailmentSig.additive = True
- NaturalLogic.EntailmentSig.addMult.Refines NaturalLogic.EntailmentSig.mult = True
- NaturalLogic.EntailmentSig.addMult.Refines NaturalLogic.EntailmentSig.mono = True
- NaturalLogic.EntailmentSig.antiAddMult.Refines NaturalLogic.EntailmentSig.antiAddMult = True
- NaturalLogic.EntailmentSig.antiAddMult.Refines NaturalLogic.EntailmentSig.antiAdd = True
- NaturalLogic.EntailmentSig.antiAddMult.Refines NaturalLogic.EntailmentSig.antiMult = True
- NaturalLogic.EntailmentSig.antiAddMult.Refines NaturalLogic.EntailmentSig.anti = True
- NaturalLogic.EntailmentSig.additive.Refines NaturalLogic.EntailmentSig.additive = True
- NaturalLogic.EntailmentSig.additive.Refines NaturalLogic.EntailmentSig.mono = True
- NaturalLogic.EntailmentSig.mult.Refines NaturalLogic.EntailmentSig.mult = True
- NaturalLogic.EntailmentSig.mult.Refines NaturalLogic.EntailmentSig.mono = True
- NaturalLogic.EntailmentSig.antiAdd.Refines NaturalLogic.EntailmentSig.antiAdd = True
- NaturalLogic.EntailmentSig.antiAdd.Refines NaturalLogic.EntailmentSig.anti = True
- NaturalLogic.EntailmentSig.antiMult.Refines NaturalLogic.EntailmentSig.antiMult = True
- NaturalLogic.EntailmentSig.antiMult.Refines NaturalLogic.EntailmentSig.anti = True
- NaturalLogic.EntailmentSig.mono.Refines NaturalLogic.EntailmentSig.mono = True
- NaturalLogic.EntailmentSig.anti.Refines NaturalLogic.EntailmentSig.anti = True
- x✝¹.Refines x✝ = False
Instances For
Equations
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.all = isTrue trivial
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isTrue trivial
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isTrue trivial
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isTrue trivial
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isTrue trivial
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isTrue trivial
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isTrue trivial
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isTrue trivial
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isTrue trivial
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isTrue trivial
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isTrue trivial
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isTrue trivial
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isTrue trivial
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isTrue trivial
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isTrue trivial
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isTrue trivial
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isTrue trivial
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isTrue trivial
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isTrue trivial
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.all.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.mono.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.anti.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.additive.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAdd.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.mult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.anti = isFalse not_false
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAdd = isFalse not_false
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiMult = isFalse not_false
- NaturalLogic.EntailmentSig.addMult.instDecidableRelRefines NaturalLogic.EntailmentSig.antiAddMult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mono = isFalse not_false
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.additive = isFalse not_false
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.mult = isFalse not_false
- NaturalLogic.EntailmentSig.antiAddMult.instDecidableRelRefines NaturalLogic.EntailmentSig.addMult = isFalse not_false
Equations
Equations
- a.decidableLE b = a.instDecidableRelRefines b
Equations
- One or more equations did not get rendered due to their size.
Equations
- NaturalLogic.EntailmentSig.instPartialOrder = { toPreorder := NaturalLogic.EntailmentSig.instPreorder, le_antisymm := NaturalLogic.EntailmentSig.Refines_antisymm✝ }
Equations
Equations
Projection of a NL relation through a function of given signature ([Ica12], Lemma 2.4).
If xRy and f has signature φ, then f(x) [R]^φ f(y). Returns the ≪-maximal relation guaranteed to hold between f(x) and f(y).
The table follows from the algebraic definitions:
- Additive: f(x∨y) = f(x)∨f(y), f(1)=1 → preserves ∨ → [∧]^⊕ = ∼ (cover from x∨y=1)
- Multiplicative: f(x∧y) = f(x)∧f(y), f(0)=0 → preserves ∧ → [|]^⊞ = | (disjoint from x∧y=0)
- Anti-additive: f(x∨y) = f(x)∧f(y), f(1)=0 → [∼]^◇ = | (from x∨y=1 ⟹ f(x)∧f(y)=0)
- Anti-multiplicative: f(x∧y) = f(x)∨f(y), f(0)=1 → [|]^⊟ = ∼ (from x∧y=0 ⟹ f(x)∨f(y)=1)
- Mono/anti alone: only preserves ⊑/⊒; ^, |, ∼ all weaken to #
Equations
- NaturalLogic.EntailmentSig.project x✝ NaturalLogic.EntailmentSig.all = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project x✝ NaturalLogic.EntailmentSig.addMult = x✝
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.negation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.cover
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.alternation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.antiAddMult = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.mono = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.anti = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.cover
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.cover
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.additive = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.alternation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.alternation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.antiAdd = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.alternation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.alternation
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.mult = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.equiv NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.equiv
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.forward NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.reverse
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.reverse NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.forward
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.negation NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.cover
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.alternation NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.cover
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.cover NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.independent
- NaturalLogic.EntailmentSig.project NaturalLogic.NLRelation.independent NaturalLogic.EntailmentSig.antiMult = NaturalLogic.NLRelation.independent
Instances For
Every signature except • preserves equiv (• is the class of arbitrary functions, which need not respect equivalence).
Projection preserves independent for all signatures.
Composition of entailment signatures ([Ica12], Lemma 2.7).
Derived from project: compose(ψ, φ) is the unique signature whose
projection table matches projecting through φ then ψ. This makes
projection_composition hold by finite verification rather than
requiring two independently maintained tables to agree.
The signature is identified by probing with forward and negation,
which suffice to distinguish all 9 signatures (• included: its probe
pair is (#, #), which makes it absorbing, [Ica12] p. 716).
Equations
- One or more equations did not get rendered due to their size.
Instances For
• is absorbing: composing with the no-property class yields the no-property class ([Ica12] p. 716: φ ∘ • = • = • ∘ φ).
Composition is associative.
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Strength of downward entailingness.
Names the three levels of the DE hierarchy:
.weak= DE only (licenses weak NPIs: ever, any).antiAdditive= DE + ∨→∧ distributive (licenses strong NPIs: lift a finger).antiMorphic= AA + ∧→∨ distributive (= negation)
- weak : DEStrength
- antiAdditive : DEStrength
- antiMorphic : DEStrength
Instances For
Equations
- NaturalLogic.instDecidableEqDEStrength x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- NaturalLogic.instReprDEStrength = { reprPrec := NaturalLogic.instReprDEStrength.repr }
The Zwarts DE hierarchy as the linear order weak < antiAdditive < antiMorphic.
This is the carrier of the canonical zwartsScale (Semantics/Polarity/Licensing.lean);
other theories of NPI strength supply other ordered carriers.
Equations
Strength of upward entailingness (dual of DEStrength).
Names the three levels of the UE hierarchy:
.weak= plain UE (monotone).multiplicative= UE + ∧-distributive.additive= UE + ∨-distributive (strongest)
- weak : UEStrength
- multiplicative : UEStrength
- additive : UEStrength
Instances For
Equations
- NaturalLogic.instDecidableEqUEStrength x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- NaturalLogic.instReprUEStrength = { reprPrec := NaturalLogic.instReprUEStrength.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Check if a context's DE strength is sufficient for an NPI.
strengthSufficient contextStrength requiredStrength returns true
when requiredStrength ≤ contextStrength in the Zwarts hierarchy (LinearOrder DEStrength).
Equations
- NaturalLogic.strengthSufficient contextStrength requiredStrength = decide (requiredStrength ≤ contextStrength)
Instances For
Map an entailment signature to DE strength, derived from project.
A signature is DE iff it reverses forward entailment: [⊑]^φ = ⊒.
Within the DE side, anti-additivity is detected by [∼]^φ = |
(the ∨→∧ swap: x∨y=1 ⟹ f(x)∧f(y)=0), and anti-morphism additionally
requires [|]^φ = ∼ (the ∧→∨ swap).
Returns none for UE-side signatures.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Map an entailment signature to UE strength, derived from project.
A signature is UE iff it preserves forward entailment: [⊑]^φ = ⊑.
Additivity is detected by [∼]^φ = ∼ (∨-preservation: x∨y=1 ⟹ f(x)∨f(y)=1),
and multiplicativity by [|]^φ = | (∧-preservation: x∧y=0 ⟹ f(x)∧f(y)=0).
Returns none for DE-side signatures.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Whether a context preserves or reverses entailment direction.
This is a coarsening of EntailmentSig: all UE-side signatures collapse to
.upward, all DE-side signatures collapse to .downward. Contexts that are
neither monotone nor antitone (e.g., "exactly n") are .nonMonotonic.
Used by:
- NeoGricean: determines which alternatives count as "stronger"
- RSA: polarity-sensitive inference
- Any theory computing scalar implicatures
- upward : ContextPolarity
- downward : ContextPolarity
- nonMonotonic : ContextPolarity
Instances For
Equations
- NaturalLogic.instDecidableEqContextPolarity x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compose context polarities.
This is the coarse composition table derived from the EntailmentSig monoid:
UE ∘ UE = UE, DE ∘ DE = UE (double negation), UE ∘ DE = DE, DE ∘ UE = DE.
Any composition involving nonMonotonic yields nonMonotonic.
Equations
- NaturalLogic.ContextPolarity.upward.compose x✝ = x✝
- x✝.compose NaturalLogic.ContextPolarity.upward = x✝
- NaturalLogic.ContextPolarity.downward.compose NaturalLogic.ContextPolarity.downward = NaturalLogic.ContextPolarity.upward
- NaturalLogic.ContextPolarity.nonMonotonic.compose x✝ = NaturalLogic.ContextPolarity.nonMonotonic
- x✝.compose NaturalLogic.ContextPolarity.nonMonotonic = NaturalLogic.ContextPolarity.nonMonotonic
Instances For
Map an entailment signature to the coarser ContextPolarity type,
derived from project.
A signature is UE iff it preserves forward entailment ([⊑]^φ = ⊑),
DE iff it reverses it ([⊑]^φ = ⊒).
Equations
- One or more equations did not get rendered due to their size.
Instances For
toContextPolarity is a monoid homomorphism: composing signatures then
coarsening gives the same result as coarsening then composing polarities.
This theorem connects the fine-grained EntailmentSig monoid to the
coarse ContextPolarity composition, ensuring the two systems can never
disagree.
Compute the projectivity signature of a context from the signatures along the path from the target position to the root ([Ica12], Definition 2.9).
Given a parse tree and a target position (e.g., "dangerous" in
"Every job that involves a giant squid is dangerous"), the path collects
the top signature of each node from the target up to the root.
The composed signature is List.prod, using the Monoid instance.
Example from Icard §3.2: path = [⊞, ⊕, ◇] (top(is) ∘ top(involves) ∘ top(every_restrictor)) contextProjectivity path = ◇ (anti-additive)
Equations
- NaturalLogic.EntailmentSig.contextProjectivity path = path.prod
Instances For
Project a NL relation through a context given by its signature path.
Combines contextProjectivity with project.
Equations
Instances For
Projection composition ([Ica12], Corollary 2.12).
Projecting through f then g is the same as projecting through g∘f. This is the compositionality principle: nested function application corresponds to signature composition.
Since compose is derived from project (via fromProjectionPair),
the only content of this theorem is that the two probe relations
(forward, negation) suffice to determine the full projection table.
Any DE-side signature licenses weak NPIs.
This connects Icard's signature lattice to [Lad80]: a signature on the DE side (anti, antiAdd, antiMult, antiAddMult) creates a DE context, which is sufficient for weak NPI licensing.
Anti-additive or stronger signature licenses strong NPIs.
Strong NPIs (lift a finger, in weeks) require anti-additive contexts. In Icard's system, this corresponds to signatures antiAdd, antiAddMult — but NOT plain anti or antiMult.
Negation has the anti-morphism signature ◇⊟ (strongest DE signature).