Logics & Formal Semantics
:material-circle-edit-outline: 约 2560 个字 :fontawesome-solid-code: 24 行代码 :material-clock-time-two-outline: 预计阅读时间 9 分钟
Metalanguage
- object language: the language we talk about
- metalanguage: the language that we use to talk about the object language
Liar sentence
solutions: (不考)
-
fuzzy logic
-
Alfred Tarski paradox arises only in languages that are “semantically closed”.
-
Arthur Prior equivalent
-
Saul Kripke Whether a sentence is paradoxical or not can be depend upon contingent facts.
If a statement's truth value is ultimately tied up in some evaluable fact about the world, that statement is "grounded". If not, that statement is "ungrounded". Ungrounded statements do not have a truth value. Liar statements and liar-like statements are ungrounded, and therefore have no truth value.
-
Jon Barwise and John Etchemendy “denial” or “negation”
-
Dialetheism
Dialetheism is the view that there are true contradictions. Dialetheism raises its own problems. Chief among these is that since dialetheism recognizes the liar paradox, an intrinsic contradiction, as being true, it must discard the long-recognized principle of explosion, which asserts that any proposition can be deduced from a contradiction, unless the dialetheist is willing to accept trivialism – the view that all propositions are true. Since trivialism is an intuitively false view, dialetheists nearly always reject the explosion principle. Logics that reject it are called paraconsistent.
-
Non-cognitivism
- Bhartrhari’s perspectivism
Connectives, truth, and truth conditions
logic overview
graph TD
Logic --> Logic_from_antiquity
Logic --> Predicate_Logic
Logic_from_antiquity --> Term_Logic
Logic_from_antiquity --> Propositional_Logic
logic from antiquity: older
predicate logic: newer
Aristotle: term logic
Gottlob Frege: predicate logic
History of Logics
- term logic (syllogism logic)
- Aristotle
- syllogism
- propositional logic (predicate calculus, semantic, sentence, symbolic logic)
- antiquity
- proposition: true and false
- logical words
- predicate logic
- gottlob frege
- meaning
- quantifier
Not applied for - question (?) - exclamation - modal: modal logic
Term logic
Modus Ponens
Means of putting, MP syllogism, affirming the antecedent
Formal fallacy: affirming the consequent. Abductive reasoning.
Modus Tollens
Means of carrying, MT syllogism, denying the consequent.
Hypothetical syllogism
principle of transitivity
P: If it rains, the soils goes wet. If the soil goes wet, the plants grow.
H: It rains.
C: The plants grow.
Disjunctive syllogism
two premises and a conclusion
Three types of reasoning
-
Deductive reasoning
general to the particular. based on entailment
-
Inductive reasoning
particular to the general. empiricism
-
Abductive reasoning
formal fallacy. All dogs bark, Fido barks, Fido is a dog.
Abductive reasoning allows inferring a as an explanation of b. As a result of this inference, abduction allows the precondition a to be abducted from the consequence b.
Properly used, abductive reasoning can be a useful source of priors in Bayesian statistics.
Propositional logic
- propositional 1: p
- propositional 2: q
- propositional 3: r
- negation: \(\neg\)
- conjunction:
- disjunction:
- inclusive disjunction
- exclusive disjunction
- conditional:
- biconditional:
conditional, material implication
- antecedent
- consequent
- →, arrow.
biconditional
- ↔
- if and only if
- logical equivalence
De Swarts formalizations
- \(\phi\) phi, any proposition
- \(\psi\) psi, any other proposition
- wff, well-formed formula
Well-formed formula
- Any atomic proposition is itself a wff.
- If \(\phi\) is wff, then \(\neg\phi\) is wff.
- Two wff’s conbinations under logical operators are a wff.
- No other are wff.
Propositional practice
John is happy. | p |
---|---|
John is not happy. | ~p |
John is happy or sad. | p or q exlusive |
John is happy, not sad. | p and ~q |
If John has eaten, John is happy. | p -> q |
If John has not eaten, John is not happy. | ~p -> ~q |
John is hungry or thirsty. | p or q inclusive. |
John left before you did. | p |
John is not hungry or thirsty. | ~(p or q inclusive) <-> ~p and ~q |
John is not hungry and thirsty. | ~(p and q) <-> ~p or ~q inclusive |
If John did not laugh, then John cried. | ~p → q ↔ p or q |
If John laughed, then John also cried. | p → q ↔ ~p or q inclusive |
John did not laugh, or John cried. | ~p or q ↔ p → q |
John laughed, or John cried and beat on the table. | p and (q or r) ↔ (p and q) or (p and r) |
John is not happy, but rather sad. (scope of “not”) | ~p and q. * ~(p and q) |
John is not happy, or sad. | ~(p and q) |
John is not happy, or John is sad. | ~p or q |
John did not help us or hinder us. | ~(p or q) ↔ ~p and ~q |
John did not help us or John hinders us. | ~p or q |
- Tautology: necessarily true
- Contradiction: necessarily false
- Contingent: possible
p | V_e | ~p |
---|---|---|
T | T | F |
F | T | T |
p | and | ~p |
---|---|---|
T | F | F |
F | F | T |
~ | ~ | p |
---|---|---|
T | F | T |
F | T | F |
contingent.
~( | p | or | ~q |
---|---|---|---|
F | T | T | T |
F | T | T | F |
F | F | T | T |
T | F | F | F |
Material implication →
converse: q→p. affirming the consequent
inverse: ~p→~q. denying the antecedent
contrapositive: ~q→~p. modus tollens
given p→q.
- Sufficient condition: if p is True, p is the necessary condition for q so q must be True.
- Necessary condition: if q is True, q is not a necessary condition for p so p may or may not be True.
Although it was extremely cold, Sally did not stay indoors.
We get a holiday, or we protest.
Jone said that Jane helped him.
John’s sister burped
John arrives before Jane left
John did not arrive before Jane left.
Predication and Quantification
universal quantifier: every, each, all, any, only
existential quantifier: a, some, there is \(\exist\), for all \(\forall\)
predicate, argument
John may like Sally.
John has a crush on Sally.
Frank is the father of Susan.
Frank is Susan’s father.
Adjunct: if, probably, means, of course, early
Valent, empty place holder: formal subject
Collective and distributive readings
Jogn and Molly ate a pizza.
p: one pizza, ate one together. distributive
p and q: two pizzas, each ate a pizza. collective
Content verb is a predicate, but functional verbs are not
John obviously spoke with Jane because he had to.
If I get a chance, I will probably try to avoid the mistake.
John performed Jill’s operation first.
The person who talk loudly is Jim’s father.
the talking loudly person
predicate: the nodes that are connected in SUD parsing tree
universal dependency (UD)
syntactic-universal dependency (SUD)
graph TD
Primitive_units_within_propositions --> Predicates
Primitive_units_within_propositions --> Arguments
Arguments --> individuals_Terms
individuals_Terms --> constants
individuals_Terms --> variables
lexical predicates vs. syntactic predicates
- lexical: content verbs, adjectives, common nouns, some prepositions
- syntactic: content verbs plus functional elements, adjective plus functional elements, predicate expressions (nouns, prepositions, subordinators, plus functional elements)
individual constants vs. individual variables
- names and definite descriptions: John, the first one, the idea
- quantified phrases: every man, some idea, no paper
e.g. We think John likes Susan.
Types of predicates:
- converse: husband-wife, above-below, precede-follow
- symmetric: be the roommate of, be married to, be related to
- reflexive: see oneself, praise oneself
- transitive: older than, be north of, be a sibling of
e.g. Monica hid her bicycle.
e.g. Monica did not hide her bicycle.
e.g. Monica laughed and cried.
e.g. Jim sent Monica his dog.
e.g. William did not help or hinder Mike.
e.g. Jennifer promise to help.
e.g. Jennifer did not promise to help.
e.g. Jennifer promise to not laugh.
e.g. Mike claimed he wanted to help.
e.g. John asked Mandy to stop laughing.
e.g. John and Larry called Molly.
e.g. Molly did not call John and Larry.
entailment: (universal instantiation)
every dog barks → if something is a dog, then it is a dog.
Universal quantification
\(\forall\)x (Dx → Bx)
D = (d1, d2, d3,…)
\(\forall\)x (Dx → Bx)= (Bd1 and Bd2 and Bd3, ….)
Existential quantification
\(\exist\)x (Dx and Bx)
D = (d1, d2, d3,…)
\(\exist\)x (Dx and Bx) = (Bd1 or Bd2 or Bd3, ….)
e.g. Every cat barfed.
e.g. The cat barfed.
e.g. Bill fed cat.
e.g. Some dog barked at Fred.
e.g. Fred scolded some dog.
e.g. Fred and Susan avoid some dog.
e.g. No dog barks.
e.g. Bill fed no dog.
e.g. No dog barked at Susan or chased Fred.
~\exist x ((Dx and (Bx,s or Cx,f))
\forall x ((Dx -> (~Bx,s and ~Cx,f))
\forall x ((Dx -> ~(Bx,s or Cx,f))
Scope ambiguity
e.g. Some boy kissed every girl.
\exist x \forall y (Bx and (Gy -> Kx,y)) = \exist x(Bx and \forall y (Gy -> Kx,y))
\forall y \exist x (Gy -> (Bx and Kx,y)) = \forall y (Gy -> \exist x (Bx and Kx,y))
Every boy kissed some girl.
Every students did not laugh.
Not every student laughs.
each studnet did not laugh.
Polarity item
any: negative polarity item
John did not pass every exam.
John did not pass any exam.
- universal quantifier: all, every, each, any
- existential: some, a/an, one, there is
e.g.
Jack saw a rat.
Jack is a rat.
the quantifier is in the predicate but not the argument. here rat is a constant.
Jack knows no genius.
use not exist to render “no”
Jack is no genius. <=> Jack is not a genius.
These problems are difficult.
These problems are difficult ones.
All the problems are difficult.
These problems are all the problems.
These problems are not all the problems.
Jack is our plumber.
Our plumer is Jack. (has presupposition)
Everything counts.
whether thing includes animate and inanimate.
Everybody counts.
predicates
- content words
- adjectives
- predicative expressions (common nouns, adjectives, preposition, subordinators)
-
some prepositions.
The present under the tree is big. (prepositions that gives location)
-
argument nouns.
common nouns
- John is a teacher. Tj
- Every teacher was present. \forall x (Tx → Px)
- The teacher was present. Pt
content verbs are the core of syntactic predicates
adjectives are most always the core of syntactic predicates.
e.g. Mike’s wife thinks Mikes if lazy.
- thinks (Mike’s wife, Mike is Lazy) - propositional
- ‘s (Mike, wife) ‘Mike has a wife’ - presuppositional: does not affect the truth value
- is lazy (Mike) - intensional: does not affect the truth value
predicates inside individual constants are presuppositional
A thin man was present.
- was present (a thin man)
- thin (a man)
- \exist x (Mx and Tx and Px)
predicates inside … .are propositional
e.g. Every barking is harmless
has true or false impact on the truth
this proposition has to show up in the predicate
The barking dog is harmless.
the presupposition does not show in the predicate
John avoids every dog he sees.
John said every dog barks.
intensional
Adjunct predicates
Jane probably teased Sam last night
- teased (Jane, Sam)
- probably (Jane, teased Sam last night) - model adverbs
- last night (Jane teased Sam) - temporal adjuncts
John arrived drunk.
- arrived (John)
- drunk (John)
Jim burped twice.
twice: propositional or presuppositional
Susan did not cheat yesterday.
Mary stayed because John stayed.
- stayed (Mary)
- stayed (John)
- because (Mary stayed, John stayed)
Mary did not stay because John stayed
- ~stay (Mary)
- ~because ()
restricted quantification
Every boy was hungry
Some boy was hungry.
Every cat barfed.
Bill fed every cat.
Some dog barked at Fred.
Fred and Susan avoid some dog.
No dog barks.
Formal Predicate Semantics
graph TD
Semantic_Rules --> Model
Semantic_Rules --> Valuation_Function
Model --> Universe_of_Discourse
Model --> Interpretation_Function
Universe_of_Discourse --> entities
- model M:
- Universe of discourse in which all constants have clearly assigned values
- A limited part of a world (real or imagined), a discourse context
- Clearly defined
- Values of linguistics expressions known
- universe/domain of discourse U/D
- Constants all the constants in M (set members)
-
interpretation function I
- Assign a value to an individual constant
-
assignment function g[x/e]
- Assign a value to an individual variable
- g iterates all the variables and assigns the value
- g() := for x in domain of e
-
valuation function V
- Assigns a value 1 or 0 to a wffs. (propositions)
-
[[\alpha]]^M the denotation of \alpha wrt M (same as interpretation function I)
Relation
- if t is a constant, [[]]^{M,g} = I(t)
- if t is a variable, [[]]^{M,g} = g(t)