Composition and Substitution: Learning about Language from Algebra
description
Transcript of Composition and Substitution: Learning about Language from Algebra
![Page 1: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/1.jpg)
Composition and Substitution:Learning about Language
from Algebra
Ken Presting
University of North Carolina at Chapel Hill
![Page 2: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/2.jpg)
Introduction
• Intensional contexts are defined by substitution failure– Johnny heard that Venus is the Morning Star– Johnny heard that Venus is Venus
• Composition accounts for indefinite application of finite knowledge– ‘p and q’ is a sentence– ‘p and q and r’ is a sentence– …
![Page 3: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/3.jpg)
Role of Recursion
• Syntax– Atomic symbols– Combination rules– Closure principle
• Finiteness– Limited symbols, rules– Infinitely many expressions
![Page 4: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/4.jpg)
Compositional Semantics
• The usual:
– Choose assignments to atoms– Forced valuations for molecules
![Page 5: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/5.jpg)
The Two-Element Boolean Algebra
• The Truth Values
• Just two atomic objects: 2BA = {0, 1}
– Disjunction = max(a, b)– Conjunction = min(a, b)– Negation = 1 – a
![Page 6: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/6.jpg)
It’s almost familiar
• Boolean arithmetic– 0 1 = 1– 0 1 = 0
• Boolean algebra– A B = C– (A B) ~C = C ~C– (A B) ~C = 0
![Page 7: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/7.jpg)
A Homomorphism to 2BA
• Take any old function that labels sentences with 0 or 1.
• For example:
– f(S) = 0 – f(PQ) = 1– etc.
![Page 8: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/8.jpg)
A Homomorphism to 2BA
• Ask: Does this function have the ‘distributive’ – a(b + c) = ab + ac– f(S P) = f(S) f(P)
• and ‘commutative’ properties?– ac = ca– f(~S) = ~f(S)
![Page 9: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/9.jpg)
A Homomorphism to 2BA
…is a compositional semantics for propositional calculus
![Page 10: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/10.jpg)
Sentence Diagrams
• Tree diagrams– Binary– Associativity allows n-ary nodes
• (advanced topic: add leaves for empty expression)
![Page 11: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/11.jpg)
Repetition
• Identical Subtrees
– In many sentences, certain letters appear twice or more
• P & Q P
– Sometimes whole expressions recur• (P & R) (P & R)
![Page 12: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/12.jpg)
Reducing the diagram
• Identify like-labeled leaves
• Identify like-labeled nodes
• Form equivalence classes
• Redraw tree as lattice
– (advanced topics: empty expression as zero; quotient)
![Page 13: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/13.jpg)
Set Membership Model
• Mapping sentences to sets– Set of letters = conjunction– Singleton set = negation– Associativity
• And vs. Nand– Naturalness of negation– Failure of associativity
![Page 14: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/14.jpg)
Comparing lattices
• Embeddings
• Homomorphism
![Page 15: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/15.jpg)
Substitution for a Letter
• Single-letter expressions– Every sentence is a substitution-instance
of ‘P’– Substitution for single letters is easy
• Multiple occurrences of a letter
![Page 16: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/16.jpg)
Substitution for Expressions
• What do these sentences have in common?
(P & Q) v ~(P & Q)
(T & S) v ~(T & S)
![Page 17: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/17.jpg)
Subalgebras
• A subalgebra is a subset which follows the same rules as its container
• In our case, that means ‘is also a sentence’
![Page 18: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/18.jpg)
Quotients
• Ignore specfied details
• In our case, treat a subsentence as a letter
![Page 19: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/19.jpg)
Sentences as Functions
In Algebra, formulas map numbers to each other
– F(x) = mx + b
• Sentences map the language to itself
– (P v ~P)(Q) = Q v ~Q
![Page 20: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/20.jpg)
Sentences as Functions
• Mapping the language to itself
– Atomic Sentence letters map L to itself– No other sentence does
• Complex sentences map the language to a subset of itself
![Page 21: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/21.jpg)
Image of a Sentence
• Image = all the substitution-instances
Image of ‘P v ~P’ is:
Q v ~Q
R v ~R
(Q & R) v ~(Q & R)
(P & Q) v ~(P & Q)
…
![Page 22: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/22.jpg)
Composition of mappings
• Substitute into a substitution-instance
• Start with– P v ~P
• Substitute for P– (Q v R) v ~(Q v R)
• Substitute for R– (Q v (S & T)) v ~(Q v (S & T))
![Page 23: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/23.jpg)
Sentence Fractions
• Here’s a fraction
R (P & Q)
• The numerator is R
• The denominator is (P & Q)
![Page 24: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/24.jpg)
Fractions and Substitution
• ‘Multiply’
(P & Q) v ~(P & Q)
• by the fraction R (P & Q)
• This will be a substitution!
![Page 25: Composition and Substitution: Learning about Language from Algebra](https://reader033.fdocuments.in/reader033/viewer/2022061603/56813c28550346895da5a260/html5/thumbnails/25.jpg)
Sentence Arithmetic
Start with
– (P & Q) v ~(P & Q)
Dividing by (P & Q), gives a lattice with a missing label:
– ‘x’ v ~ ‘x’
But R replaces ‘x’ (this step is by fiat)
– R v ~R