Icard (2012): Inclusion and Exclusion in Natural Language #
This file formalizes Icard's projectivity calculus, which extends the Monotonicity Calculus from
inclusion to the exclusion relations of MacCartney and Manning. The relations, their join and
projection tables and the composition of signatures are the library's NaturalLogic substrate,
whose implementations this file checks against the printed cells; on top of them it builds the typed
language of Section 2, with the projectivity markings of a lexicon's constants, the projectivity of
a context (Definition 2.9, Ctx.pro), and the soundness of projectivity marking (Proposition 2.10,
Model.soundFor_ctxFun). The calculus 𝒞 of Section 3 is Derives, with the Substitution rule over
contexts, and Theorem 3.1 is Derives.sound. The worked example of Section 3.2, that Every job
that involves a giant squid is dangerous entails Not every job that involves a cephalopod is
safe, is derived from the paper's assumption set by three substitutions and two compositions
(derives_squid), and Section 4's correspondence between the signatures and Zwarts's three classes
of negative polarity items is Licenses, read off the substrate's strength map
Signature.toDEStrength.
Implementation notes #
- Types are unmarked and the markings live on the lexicon's constants, one signature per
arrow, outermost first; the topmost projectivity of a term is its first remaining marking,
•when none is left. A model's constants are functions of their signatures over the whole unmarked domains, Boolean algebras, which is stronger than the paper's marked domains and leaves Definition 2.8's subtyping of marked types aside. - The paper's remark that terms of additive and anti-additive types always alternate, the
witness of incompleteness, is not formalized: in the unmarked function lattice the constant
⊤function and complementation are additive and anti-additive without being disjoint. - One cell of the printed projection table deviates from Definition 2.3 (
project_equiv).
References #
The printed tables #
The join table (Lemma 1.5), the projection table (Lemma 2.4) and the composition table
(Lemma 2.7) are the substrate's join, project and compose; the cells are certified sound
and least in Logic/Natural/Soundness.lean and Logic/Natural/Completeness.lean.
The typed language (Sections 2.1 and 2.3) #
Equations
- Icard2012.instDecidableEqBase 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.
- Icard2012.instDecidableEqTy.decEq (Icard2012.Ty.base a) (Icard2012.Ty.base b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Icard2012.instDecidableEqTy.decEq (Icard2012.Ty.base a) (a_1.arrow a_2) = isFalse ⋯
- Icard2012.instDecidableEqTy.decEq (a.arrow a_1) (Icard2012.Ty.base a_2) = isFalse ⋯
Instances For
A lexicon: the constants' types and the projectivity markings of their arrows, outermost first (Definition 2.1).
- ty : κ → Ty
- marks : κ → List NaturalLogic.Signature
Instances For
The markings a term still carries: applying a term consumes its outermost marking.
Instances For
The topmost projectivity of a term (Section 2.4): its outermost marking, • when it
has none.
Equations
- t.top = t.marks.headD NaturalLogic.Signature.all
Instances For
A context (Section 2.4): a term with one hole of type σ, in function or argument
position.
- hole {κ : Type u_1} {L : Lexicon κ} {σ : Ty} : Ctx L σ σ
- appL {κ : Type u_1} {L : Lexicon κ} {σ ρ τ : Ty} : Ctx L σ (ρ.arrow τ) → Term L ρ → Ctx L σ τ
- appR {κ : Type u_1} {L : Lexicon κ} {σ ρ τ : Ty} : Term L (ρ.arrow τ) → Ctx L σ ρ → Ctx L σ τ
Instances For
The projectivity of a context (Definition 2.9): the identity marking at the hole, the context's own projectivity into the function position, and the function's topmost projectivity composed with the argument's into the argument position.
Equations
- Icard2012.Ctx.hole.pro = NaturalLogic.Signature.addMult
- (c.appL a).pro = c.pro
- (Icard2012.Ctx.appR f c).pro = f.top * c.pro
Instances For
Models (Definition 2.8) #
The domain of a basic type is a Boolean algebra and that of an arrow all functions, the Boolean lattice of Proposition 1.1; a constant denotes a function of its signature whose values again are (Definition 2.2).
The domains of the unmarked types.
Equations
- Icard2012.Dom B (Icard2012.Ty.base b) = B b
- Icard2012.Dom B (σ.arrow τ) = (Icard2012.Dom B σ → Icard2012.Dom B τ)
Instances For
The Boolean algebra of a domain: that of the basic type, or the pointwise one on functions.
Equations
- One or more equations did not get rendered due to their size.
- Icard2012.Dom.booleanAlgebra (σ.arrow τ) = Pi.instBooleanAlgebra
Instances For
A value of a type is of the given markings when it is a function of the first marking whose values are of the remaining ones (Definition 2.2).
Equations
- Icard2012.Mem (φ :: ms) (σ.arrow τ) f = (φ.SoundFor f ∧ ∀ (x : Icard2012.Dom B σ), Icard2012.Mem ms τ (f x))
- Icard2012.Mem x✝² x✝¹ x✝ = True
Instances For
A model of the language: domains for the basic types and a denotation for each constant of its markings.
Instances For
The function a context denotes (Section 2.4).
Equations
- M.ctxFun Icard2012.Ctx.hole = id
- M.ctxFun (c.appL a) = fun (a_1 : Icard2012.Dom M.B σ) => M.ctxFun c a_1 (M.eval a)
- M.ctxFun (Icard2012.Ctx.appR f c) = M.eval f ∘ M.ctxFun c
Instances For
The calculus 𝒞 (Section 3.1) #
The projectivity calculus 𝒞: Reflexivity, the four Symmetry rules, Absurdity, Composition along the join, and Substitution through a context with the projection of the relation, deriving relational statements between terms of a type from an assumption set.
- ax {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t t' : Term L τ} {R : NaturalLogic.Relation} : Γ t R t' → Derives Γ t R t'
- refl {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} (t : Term L τ) : Derives Γ t NaturalLogic.Relation.forward t
- symm_forward {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t t' : Term L τ} : Derives Γ t NaturalLogic.Relation.forward t' → Derives Γ t' NaturalLogic.Relation.reverse t
- symm_reverse {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t t' : Term L τ} : Derives Γ t NaturalLogic.Relation.reverse t' → Derives Γ t' NaturalLogic.Relation.forward t
- symm_alternation {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t t' : Term L τ} : Derives Γ t NaturalLogic.Relation.alternation t' → Derives Γ t' NaturalLogic.Relation.alternation t
- symm_cover {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t t' : Term L τ} : Derives Γ t NaturalLogic.Relation.cover t' → Derives Γ t' NaturalLogic.Relation.cover t
- absurd {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ ρ : Ty} {t : Term L τ} {s s' : Term L ρ} (R : NaturalLogic.Relation) : Derives Γ t NaturalLogic.Relation.alternation t → Derives Γ s R s'
- comp {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {τ : Ty} {t u v : Term L τ} {R S : NaturalLogic.Relation} : Derives Γ t R u → Derives Γ u S v → Derives Γ t (R * S) v
- subst {κ : Type u_1} {L : Lexicon κ} {Γ : {τ : Ty} → Term L τ → NaturalLogic.Relation → Term L τ → Prop} {σ τ : Ty} {s s' : Term L σ} {R : NaturalLogic.Relation} (c : Ctx L σ τ) : Derives Γ s R s' → Derives Γ (c.fill s) (NaturalLogic.Signature.project R c.pro) (c.fill s')
Instances For
Soundness of 𝒞 (Theorem 3.1): a derivable statement holds in every model of the
assumptions in which no term denotes ⊥; Composition is Lemma 1.6, Substitution
Corollary 2.12, and Absurdity needs the nonvacuity.
The worked example (Section 3.2) #
Equations
- Icard2012.instDecidableEqConst x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
The fragment's lexicon: every is anti-additive then multiplicative, some additive twice, no anti-additive twice, not every additive then anti-multiplicative, and the adjectives, copula, verb and relativizer morphisms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A constant as a term.
Equations
Instances For
The assumption set Γ of Section 3.2.
- everyNegNotEvery : Assumption (k Const.every) NaturalLogic.Relation.negation (k Const.notEvery)
- someNegNo : Assumption (k Const.some) NaturalLogic.Relation.negation (k Const.no)
- noAltEvery : Assumption (k Const.no) NaturalLogic.Relation.alternation (k Const.every)
- safeAltDangerous : Assumption (k Const.safe) NaturalLogic.Relation.alternation (k Const.dangerous)
- squidLeCephalopod : Assumption (k Const.giantSquid) NaturalLogic.Relation.forward (k Const.cephalopod)
Instances For
no ⊑ not every needs no extra postulate: Composition on no | every and
every ^ not every, with | ⋈ ^ = ⊑.
Q job that involves a N is A, for a determiner q, a noun n and an adjective a.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every job that involves a giant squid is dangerous.
Equations
Instances For
Every job that involves a giant squid is safe.
Equations
Instances For
Every job that involves a cephalopod is safe.
Equations
Instances For
Not every job that involves a cephalopod is safe.
Equations
Instances For
The context of the determiner, under no function: projectivity ⊕⊞.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The main example: Every job that involves a giant squid is dangerous ⊑ Not every job that
involves a cephalopod is safe (the paper misprints giant squid in the conclusion). Substituting
safe for dangerous under ⊞ keeps |, cephalopod for giant squid under ◇ turns ⊑ into
⊒, and not every for every under ⊕⊞ keeps ^; Composition then gives | ⋈ ⊒ = | and | ⋈ ^ = ⊑.
Negative polarity items (Section 4) #
The three classes of [Zwa98] are the signatures' downward half: weak items need an antitone context, strong ones an anti-additive context and superstrong ones an anti-morphic one.
A signature licenses an item of a Zwarts class when the strength of negation it realizes,
Signature.toDEStrength, is at least as strong.
Equations
- Icard2012.Licenses level σ = (↑level ≤ σ.toDEStrength)
Instances For
Equations
- Icard2012.instDecidableLicenses level σ = Icard2012.instDecidableLicenses._aux_1 level σ
A downward signature licenses the weak items.