Predicate Logic with Anaphora: syntax #
Syntax for Predicate Logic with Anaphora (PLA), the dynamic system originating
in [Dek94] and consolidated in [Dek12]. PLA distinguishes variables
x_i, bound by quantifiers, from pronouns p_i, anaphoric expressions resolved
from discourse context; the distinction prevents variable clash and keeps
composition clean.
Main definitions #
PLA.Term,PLA.Formula: terms (variables or pronouns) and formulasPLA.Formula.domain: the variables existentially bound in a formula,n(φ)PLA.Formula.range: the pronouns occurring in a formula,r(φ)PLA.Resolution,PLA.Formula.resolve: replacing pronouns with variables,φ^ρ
Main results #
PLA.Formula.resolve_preserves_domain: resolution preserves the domainPLA.Formula.resolve_no_pronouns: resolution eliminates all pronouns
Equations
- PLA.instDecidableEqTerm.decEq (PLA.Term.var a) (PLA.Term.var b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- PLA.instDecidableEqTerm.decEq (PLA.Term.var a) (PLA.Term.pron a_1) = isFalse ⋯
- PLA.instDecidableEqTerm.decEq (PLA.Term.pron a) (PLA.Term.var a_1) = isFalse ⋯
- PLA.instDecidableEqTerm.decEq (PLA.Term.pron a) (PLA.Term.pron b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- PLA.instReprTerm = { reprPrec := PLA.instReprTerm.repr }
Equations
- PLA.instHashableTerm = { hash := PLA.instHashableTerm.hash }
Equations
- PLA.instHashableTerm.hash (PLA.Term.var a) = mixHash 0 (hash a)
- PLA.instHashableTerm.hash (PLA.Term.pron a) = mixHash 1 (hash a)
Instances For
Pronouns in a term (singleton or empty)
Equations
- (PLA.Term.var a).pronouns = ∅
- (PLA.Term.pron a).pronouns = {a}
Instances For
Pronouns in a list of terms via Finset.biUnion.
Equations
- PLA.termsPronouns ts = ts.toFinset.biUnion PLA.Term.pronouns
Instances For
Equations
- PLA.instReprFormula = { reprPrec := PLA.instReprFormula.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- PLA.Formula.«term_⋀_» = Lean.ParserDescr.trailingNode `PLA.Formula.«term_⋀_» 35 36 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋀ ") (Lean.ParserDescr.cat `term 35))
Instances For
Equations
- PLA.Formula.«term∼_» = Lean.ParserDescr.node `PLA.Formula.«term∼_» 40 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∼") (Lean.ParserDescr.cat `term 40))
Instances For
Equations
- PLA.Formula.«term_⋁_» = Lean.ParserDescr.trailingNode `PLA.Formula.«term_⋁_» 30 31 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋁ ") (Lean.ParserDescr.cat `term 30))
Instances For
Equations
- PLA.Formula.«term_⟶_» = Lean.ParserDescr.trailingNode `PLA.Formula.«term_⟶_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⟶ ") (Lean.ParserDescr.cat `term 25))
Instances For
Equations
- PLA.Formula.forall_ i φ = (∼PLA.Formula.exists_ i (∼φ))
Instances For
Range: pronouns in formula (using biUnion for atoms)
Equations
- (PLA.Formula.atom a a_1).range = PLA.termsPronouns a_1
- (∼a).range = a.range
- (a ⋀ a_1).range = a.range ∪ a_1.range
- (PLA.Formula.exists_ a a_1).range = a_1.range
Instances For
Free variables in formula
Equations
- (PLA.Formula.atom a a_1).freeVars = a_1.toFinset.biUnion PLA.Term.vars
- (∼a).freeVars = a.freeVars
- (a ⋀ a_1).freeVars = a.freeVars ∪ a_1.freeVars
- (PLA.Formula.exists_ a a_1).freeVars = a_1.freeVars.erase a
Instances For
Resolution: maps pronouns to variables
Equations
Instances For
Apply resolution to a term
Equations
- PLA.Term.resolve ρ (PLA.Term.var a) = PLA.Term.var a
- PLA.Term.resolve ρ (PLA.Term.pron a) = PLA.Term.var (ρ a)
Instances For
Apply resolution to a formula
Equations
- PLA.Formula.resolve ρ (PLA.Formula.atom a a_1) = PLA.Formula.atom a (List.map (PLA.Term.resolve ρ) a_1)
- PLA.Formula.resolve ρ (∼a) = (∼PLA.Formula.resolve ρ a)
- PLA.Formula.resolve ρ (a ⋀ a_1) = (PLA.Formula.resolve ρ a ⋀ PLA.Formula.resolve ρ a_1)
- PLA.Formula.resolve ρ (PLA.Formula.exists_ a a_1) = PLA.Formula.exists_ a (PLA.Formula.resolve ρ a_1)
Instances For
Observation 2 ([Dek12] §2.1): Resolution preserves domain.
n(φ^ρ) = n(φ): resolving pronouns doesn't affect which variables are bound.
Resolution removes all pronouns from a term
Observation 3 ([Dek12] §2.1): Resolution eliminates all pronouns.
r(φ^ρ) = ∅: after resolution, the formula contains no pronouns.