0% found this document useful (0 votes)
11 views105 pages

Ch02 Prop Logic Raw

Uploaded by

saniashah10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views105 pages

Ch02 Prop Logic Raw

Uploaded by

saniashah10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 105

ECE 108: Discrete Math and Logic I

Chapter 2: Propositional Logic

Mark Aagaard
[email protected]

Dept of Electrical and Computer Engineering


University of Waterloo

2025-Winter
Chapter 2 Propositional Logic 2.1 Introduction
2.1 Introduction
2.2 Syntax and Semantics
2.2.1 Syntax
2.2.2 Evaluation
2.2.3 Tautologies, Satisfiable, and Contradictions
2.2.4 Counterexample
2.2.5 Weaker, Equal, Stronger, Incomparable
2.3 Formalizing Natural Language
2.3.1 Overview
2.3.2 Rules for Formalization
2.3.3 Translating Logic into English
2.3.4 Problematic Sentences
2.3.5 Potentially Confusing
2.3.6 Ambiguities
2.3.7 Requirements and Recommendations
2.4 Proofs
2.4.1 Elimination Rules
2.4.2 Finishing a Proof
2.4.3 Introduction Rules
2.5 Index
Copyright © Mark Aagaard 2024–2025 2 / 102
Chapter 2 Propositional Logic 2.1 Introduction

2.1 Introduction
Motivation

▶ Engineers often design a product based on a set of informal


requirements.
▶ Engineers also use these requirements to create tests to verify if
the system behaves correctly.
▶ Tests are software or hardware (logic, not English)
▶ A key topic in this section is translating between English and logic
▶ Testing and verification jobs are usually a necessary first-step
toward a design job.
▶ Learning to read requirements (and recognizing when to ask
questions!) are important job skills.

Copyright © Mark Aagaard 2024–2025 3 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics
2.1 Introduction
2.2 Syntax and Semantics
2.2.1 Syntax
2.2.2 Evaluation
2.2.3 Tautologies, Satisfiable, and Contradictions
2.2.4 Counterexample
2.2.5 Weaker, Equal, Stronger, Incomparable
2.3 Formalizing Natural Language
2.3.1 Overview
2.3.2 Rules for Formalization
2.3.3 Translating Logic into English
2.3.4 Problematic Sentences
2.3.5 Potentially Confusing
2.3.6 Ambiguities
2.3.7 Requirements and Recommendations
2.4 Proofs
2.4.1 Elimination Rules
2.4.2 Finishing a Proof
2.4.3 Introduction Rules
2.5 Index
Copyright © Mark Aagaard 2024–2025 4 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics

2.2 Syntax and Semantics

▶ Syntax defines what we may write


▶ which formulas (aka “expressions”) are legal
▶ wff = “well-formed formula”
▶ Semantics defines the meaning of what we write

Copyright © Mark Aagaard 2024–2025 5 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

2.2.1 Syntax
▶ two constants: True and False
Note: When working on paper/tablet, you may abbreviate
with T and F. In Lean4, you must use True and False.
Note: Do not use T , F , t, or f in any font as variables
because it is easy to confuse them with True and False!
▶ atomic propositions a, b , c, d , e, . . . , p, q, r, . . .
▶ propositional operators
Informal Formal
Symbol name name
¬ not negation
∧ and conjunction
∨ or disjunction
⊕ xor exclusive or
⇒ implication
⇔ if-and-only-if
▶ parentheses (. . .)
Copyright © Mark Aagaard 2024–2025 6 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

Examples

Examples of propositions:

Formula English
p ⇒q “p implies q”
(p ∧ q) ⇒ r “p and q implies r”

Copyright © Mark Aagaard 2024–2025 7 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

Well-Formed Formulas

The well-formed formulas (wff) of propositional logic are generated


by the rules:
▶ Atomic propositions:
▶ propositional symbols (e.g., P )
(We will call these variables)
▶ constants True and False
▶ Compound propositions:
If P and Q are wffs, then each of the following are well-formed
formulas:
(P ) ¬P P ∧Q P ∨Q P ⇒Q P ⇔Q
No other expressions are well-formed formulas.
From now on, when we say “formula”, we mean “well-formed formula”.

Copyright © Mark Aagaard 2024–2025 8 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

Precedence and Associativity

Precedence of operators All binary operations are


⇔ loosest (low precedence) right-associative
⇒ No parens a ∨b ∨c
∨ With parens a ∨ (b ∨ c)

∧ No parens a ⇒b ⇒c
¬ tightest (high precedence) With parens a ⇒ (b ⇒ c)

▶ Precedence rules in logic are analogous to the BEDMAS rules for


arithmetic.
▶ The loosest operator in an expression is the outermost operator.

Copyright © Mark Aagaard 2024–2025 9 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

Example: Precedence and Associativity


Precedence of operators from loose to tight: ⇔, ⇒, ∨, ∧, ¬.
Add all of the parentheses defined by the rules of precedence:
Example 2.1:

¬ P ∧ ¬ Q ∨ R ∨ S

Example 2.2:

P ⇒ Q ∧ R ∨ X ⇔ Y ∨ R

Example 2.3:

¬P ⇒Q ∧ R ⇒ S

Copyright © Mark Aagaard 2024–2025 10 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.1 Syntax

Terminology

In the formula P ∧ Q , the symbols P and Q are conjuncts.

In the formula P ∨ Q , the symbols P and Q are disjuncts.

In implication, as in P ⇒ Q :
▶ P is the premise or antecedent or hypothesis
▶ Q is the consequent or conclusion

Copyright © Mark Aagaard 2024–2025 11 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.2 Evaluation

2.2.2 Evaluation

To evaluate a formula, we need to assign values to the variables.


An environment is a table, dictionary, or set of assignments that
assigns values to variables.
Example 2.4: Evaluation
Evaluate p ∨ q ⇒ q in the environment {p = True, q = False}.

Copyright © Mark Aagaard 2024–2025 12 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.2 Evaluation

Evaluation in a Set of Environments


▶ A formula is evaluated in an
environment. {p=F,q=F}

▶ We often want to evaluate a


formula in a set of environ- {p=F,q=T} {p=T,q=F}

ments.
▶ These figures show in which {p=T,q=T}

environments an expression
evaluates to true. All environments for p and q

{p=F,q=F} {p=F,q=F}

{p=F,q=T} {p=T,q=F} {p=F,q=T} {p=T,q=F}

{p=T,q=T} {p=T,q=T}

p q
Copyright © Mark Aagaard 2024–2025 13 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.2 Evaluation

Evaluation in a Set of Environments


{p=F,q=F} {p=F,q=F}

{p=F,q=T} {p=F,q=T} {p=T,q=F}


{p=T,q=F}

{p=T,q=T}
{p=T,q=T}

p ∧q p ∨q

{p=F,q=F} {p=F,q=F}

{p=F,q=T} {p=T,q=F}
{p=F,q=T} {p=T,q=F}

{p=T,q=T}
{p=T,q=T}

p ⇒q (p ∧ q) ⇒ q
Copyright © Mark Aagaard 2024–2025 14 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.2 Evaluation

Truth Tables
▶ Venn diagrams
▶ Good for intuition of simple formulas
▶ Tedious to draw
▶ Truth tables
▶ A more efficient technique to evaluate formulas in sets of
environments
▶ Each row represents one environment.
▶ Each column represents one variable or sub-formula
Example 2.5: Use a truth table to evaluate p ∧ q ⇒ q in all
possible environments.

Copyright © Mark Aagaard 2024–2025 15 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.3 Tautologies, Satisfiable, and Contradiction

2.2.3 Tautologies, Satisfiable, and Contradictions

Three categories of formulas with evaluation in a set of environments:


▶ Tautology: Evaluates to true in all environments
▶ Satisfiable: Evaluate to true in some environments
Note: “some”=“at least one”; tautologies are satisfiable
▶ Contradiction: Evaluate to true in no environments
(i.e., evaluates to false in all environments).

Copyright © Mark Aagaard 2024–2025 16 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.3 Tautologies, Satisfiable, and Contradiction

Example: Tautology, Satisfiable, Contradiction?

Recall: tautology=all, satisfiable=some, contradiction=none.


Recall: truth table: row=environment, col=sub-formula
Example 2.6: Determine if p ∨ q ⇒ q is a tautology, satisfiable,
or a contradiction.

Copyright © Mark Aagaard 2024–2025 17 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.3 Tautologies, Satisfiable, and Contradiction

Satisfying Assignment

A satisfying assignment for a proposition is an environment that


causes the proposition to evaluate to true.
Example 2.7: Find a satisfying assignment for p ⇔ ¬q.

Copyright © Mark Aagaard 2024–2025 18 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.4 Counterexample

2.2.4 Counterexample

▶ If a proposition is not a tautology, then there are environments


where it is false.
▶ counter example: an environment that makes a proposition
evaluate to false.
▶ If you are having difficulty proving a proposition that might not be
a theorem, try to construct a counter example.
If you find a counter example, then the proposition is not a
theorem.

Copyright © Mark Aagaard 2024–2025 19 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.4 Counterexample

Example: Counterexample

Example 2.8: Find a counterexample for: (p ∧ q) ⇒ (r ∨ s)

Copyright © Mark Aagaard 2024–2025 20 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

2.2.5 Weaker, Equal, Stronger, Incomparable


▶ Knowledge is power.
▶ The more you know, the more you can prove.
▶ False is the ultimate truth

We have four logicians:

Aristotle Leibniz Gödel


Shannon
Which logican is my favourite?
Copyright © Mark Aagaard 2024–2025 21 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Weaker, Equal, Stronger, Incomparable


Wears Blue Wears Red
Ancient

▶ All of these statements are


true.
▶ Which statement has the
most information?
▶ My favourite logician
wears red.
Modern

▶ My favourite logician
wears red or is modern.
▶ My favourite logician
wears red and is modern.

▶ More information == satisfied in fewer environments


▶ More information == stronger statement
∴ Stronger == satisfied in fewer environments
Note: “fewer” here means “subset”
Copyright © Mark Aagaard 2024–2025 22 / 102
Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Weaker, Equal, Stronger, Incomparable

Definition 2.1:
P is stronger than Q := (P ⇒ Q ) ∧ ¬(Q ⇒ P )
P is weaker than Q := (Q ⇒ P ) ∧ ¬(P ⇒ Q )

P is equal to Q := P ⇔Q
P is incomparable to Q := ¬(P ⇒ Q ) ∧ ¬(Q ⇒ P )

▶ Another attempt at intuition for stronger:


▶ Anything that we can conclude about an environment from
Q can also be concluded from P .
▶ The more that we can conclude from a formula,
the fewer environments satisfy the formula.
▶ Extreme case: False is the strongest formula

Copyright © Mark Aagaard 2024–2025 23 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Example: Weaker, Equal, Stronger, Incomparable

Example 2.9:
In each diagram, answer whether P is weaker, equal, stronger, or
incomparable to to Q .

Q P

P Q

P Q P Q

Copyright © Mark Aagaard 2024–2025 24 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Example: Weaker, Equal, Stronger, Incomparable

Example 2.10: For the pair of formulas below, is the first formula
weaker, equal, stronger, or incomparable to the second formula?
p ⇔ q and p

Copyright © Mark Aagaard 2024–2025 25 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Solution (cont’d)

Copyright © Mark Aagaard 2024–2025 26 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Solution (cont’d)

Copyright © Mark Aagaard 2024–2025 27 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Example: Weaker, Equal, Stronger, Incomparable

Example 2.11: For the pair formulas below, is the first formula
weaker, equal, stronger, or incomparable to the second formula?
p ⇔ q and p ⇒ q

Copyright © Mark Aagaard 2024–2025 28 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

A Simple Card Game

▶ Set of four cards.


▶ One side of each card is a number
▶ One side of each card has a colour, either red or blue.
▶ I claim, “If the number of a card is odd,
then the colour on the other side is red”
Given the cards below, what is the minimum set of cards that you need
to flip over to determine if my claim is correct?

3 8

Copyright © Mark Aagaard 2024–2025 29 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

Checking Credentials

I declare the rule that “If a person is teaching an engineering course,


then they must be an engineer.”
Which scenarios below might violate the rule?

Name of instructor Prof Mano Prof Nin Prof Ohrling Prof Pach
Course ECE-101 BIO-499 ??? ???
Engineer? ??? ??? No Yes

Copyright © Mark Aagaard 2024–2025 30 / 102


Chapter 2 Propositional Logic 2.2 Syntax and Semantics 2.2.5 Weaker, Equal, Stronger, Incomparable

False Implies Anything


▶ Why is implication defined such that false implies anything?
p q p ⇒q
False False True
False True True
▶ If the lhs of implication is false, the entire implication is true,
regardless of the rhs.
▶ “If the world is flat, then 0=1” is true.
▶ Short answer, False ⇒ False evaluates to True, because for any
expression p, we want p ⇒ p to be true.
▶ Because False ⇒ False, we know that False also implies any
proposition that is weaker than False.
▶ (Remember, “weaker” means true in more environments).
▶ False is the strongest proposition (true in the fewest
environments
∴ False implies anything.
Copyright © Mark Aagaard 2024–2025 31 / 102
Chapter 2 Propositional Logic 2.3 Formalizing Natural Language
2.1 Introduction
2.2 Syntax and Semantics
2.2.1 Syntax
2.2.2 Evaluation
2.2.3 Tautologies, Satisfiable, and Contradictions
2.2.4 Counterexample
2.2.5 Weaker, Equal, Stronger, Incomparable
2.3 Formalizing Natural Language
2.3.1 Overview
2.3.2 Rules for Formalization
2.3.3 Translating Logic into English
2.3.4 Problematic Sentences
2.3.5 Potentially Confusing
2.3.6 Ambiguities
2.3.7 Requirements and Recommendations
2.4 Proofs
2.4.1 Elimination Rules
2.4.2 Finishing a Proof
2.4.3 Introduction Rules
2.5 Index
Copyright © Mark Aagaard 2024–2025 32 / 102
Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

2.3.1 Overview
Motivation

▶ A sentence in natural language often has multiple


interpretations.
We use logic to clarify the meaning of a sentence.
▶ To describe computer systems and check that they are correct,
we need precise and unambiguous descriptions.
▶ Formalize: translate from natural language to logic.
▶ Begin with atomic propositions as the “atomic” building blocks of
a sentence.
▶ A compound proposition (i.e., complete sentence) is multiple
atomic propositions connected with propositional operators.
This section is based on SE-212 course notes by Nancy Day. Used with
permission.

Copyright © Mark Aagaard 2024–2025 33 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

Atomic Propositions

Each atomic proposition represents a declarative clause.


▶ Declarative: a statement that is true or false
▶ Clause: sentence (or part of a sentence) with a subject and verb
Example 2.12: Declarative clauses
▶ “It is snowing outside.”
▶ “2 + 5 = 3.”
▶ “The value of program variable a is 42.”

Copyright © Mark Aagaard 2024–2025 34 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

Atomic Propositions (cont’d)

Each atomic proposition represents a declarative clause.


Example 2.13: Clauses that are not declarative
▶ Interrogative sentences (questions)
▶ “Is it snowing?”
▶ Imperative sentences (commands)
▶ “Please make your lectures more interesting.”

Example 2.14: Statements that are not clauses


▶ The tall building
▶ Falling asleep

Copyright © Mark Aagaard 2024–2025 35 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

Formalizing Compound Propositions

In a sentence with multiple clauses:


▶ Each clause is represented by a variable
▶ The variables are joined by operators

Example 2.15: Formalization


Formalize “It is snowing outside and I am cold.”

Copyright © Mark Aagaard 2024–2025 36 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

Summary of Formalizing a Sentence

1. Replace each atomic proposition by a variable.


Each atomic proposition is the smallest declarative clause that
▶ does not contain any logical connectives
(“and”, “or”, “if . . . then”, etc.),
▶ can be considered true or false
2. Build compound propositions:
▶ Use propositional operators to connect propositions
▶ Match the form of the sentence as closely as possible
▶ Makes it easier to check that the formalization has the
same meaning as the sentence.

Copyright © Mark Aagaard 2024–2025 37 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.1 Overview

Example: Formalization

Example 2.16: Formalize the sentence below.


If the train arrives late and there are not any taxis at the station,
then John will be late for his meeting.

Copyright © Mark Aagaard 2024–2025 38 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

2.3.2 Rules for Formalization


Operator Possible interpretations in English
¬P not P it is not the case that P
P ∧Q P and Q P but Q P while Q
P ∨Q P or Q P and/or Q P unless Q
P ⊕Q either P or Q
P ⇒Q if P then Q Q if P P only if Q
P implies Q Q when P P only when Q
P is sufficient for Q
Q is necessary for P
P ⇔Q P iff Q P if and only if Q
P exactly if Q P is equivalent to Q
P is necessary and sufficient for Q
Adapted from From Nimal Nissanke, Introductory Logic and Sets for
Computer Scientists, pp 16.

Copyright © Mark Aagaard 2024–2025 39 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

Examples
Operator Possible interpretations in English
¬P not P it is not the case that P
P ∧Q P and Q P but Q P while Q
P ∨Q P or Q P and/or Q P unless Q
P ⊕Q either P or Q
P ⇒Q if P then Q Q if P P only if Q
P implies Q Q when P P only when Q
P is sufficient for Q
Q is necessary for P
P ⇔Q P iff Q P if and only if Q
P exactly if Q P is equivalent to Q
P is necessary and sufficient for Q

1. It is cold but it is not snowing.


2. It is cold if it is snowing.
3. It is snowing only if it is cold.
4. If a request occurs then either it will be acknowledged or the
process does not make progress.
Note: Normally, we must declare our propositions, but to save
space on the slide, we skipped that step.
Copyright © Mark Aagaard 2024–2025 40 / 102
Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

“If”

Boiling water and furry bears.


▶ If the water boils, then the stove is on.
▶ If the water boils, the stove is on.
▶ The stove is on if the water boils.
▶ If the animal is a bear, then it is furry.
▶ If the animal is a bear, it is furry.
▶ The animal is furry if it is a bear.

Copyright © Mark Aagaard 2024–2025 41 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

“If” (cont’d)

▶ Moving the “if” to between the propositions flips the direction of


the implication.
English Formalization
“if P then Q” P ⇒ Q
“P if Q” Q⇒P
▶ The proposition to the right of “if” is the antecedent (lhs) of
the implication.

Copyright © Mark Aagaard 2024–2025 42 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

“If” and “When”

▶ If the water boils, then the stove is on.


▶ The water boils when the stove is on.
▶ The stove is on when the water boils.
▶ When the water boils the stove is on.
▶ When the stove is on the water boils.
▶ The animal is furry when it is a bear.

Copyright © Mark Aagaard 2024–2025 43 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

“If” and “When” (cont’d)

▶ “when P, Q” is the same as “if P, Q”


▶ “P when Q” is the same as “P if Q”

Copyright © Mark Aagaard 2024–2025 44 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

Only and If

▶ “only” flips the direction of the implication


English Formalization
“if P then Q” P ⇒ Q
“P if Q” Q⇒P
“P only if Q” P ⇒ Q
▶ The water boils only if the stove is on.
▶ The stove is on only if the water boils.
▶ The animal is furry only if it is a bear.
▶ The animal is a bear only if it is furry.

Copyright © Mark Aagaard 2024–2025 45 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

Only and When

▶ “only” flips the direction of the implication


English Formalization
“P when Q” Q⇒P
“P only when Q” P ⇒ Q
▶ The water boils only if the stove is on.
▶ The stove is on only if the water boils.

Copyright © Mark Aagaard 2024–2025 46 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

Only and If with Separation


Example 2.17: Formalize: “A student does homework only if
they are an engineer.”

Example 2.18: Formalize: “Only engineering students do home-


work.”

Example 2.19: Formalize: “A student only does homework if


they are an engineer.”

Example 2.20: Formalize: “If a student only does homework,


then they are an engineer.”

Example 2.21: Formalize: “Engineering students do only home-


work.”

Copyright © Mark Aagaard 2024–2025 47 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.2 Rules for Formalization

Only and When with Separation

Example 2.22: Formalize: “The supervisor process sends a


warning message only to student processes when the diskspace
is low.”

Copyright © Mark Aagaard 2024–2025 48 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.3 Translating Logic into English

2.3.3 Translating Logic into English

Example 2.23: From logic to English


Translate the following formula into English:
(ofc ⇒ nws) ∧ (¬ofc ⇒ msg)
ofc := they are in the office
nws := we will tell them the news
msg := we will leave them a message

Copyright © Mark Aagaard 2024–2025 49 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.4 Problematic Sentences

2.3.4 Problematic Sentences


▶ Some sentences are problematic to formalize.
▶ Categories of problems:
▶ confusing sentence:
▶ applying the formalization rules gives a different
meaning than the common meaning of the sentence
▶ ambiguous sentence:
▶ multiple formalizations are consistent with the sentence
▶ irregular sentence:
▶ the structure of the sentence doesn’t match the
formalization rules
Note: Learn to identify whether a sentence is problematic and
explain precisely why it is problematic.

Note: Don’t memorize the three categories


Copyright © Mark Aagaard 2024–2025 50 / 102
Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

2.3.5 Potentially Confusing


Conjunction

The use of the logical connectives sometimes doesn’t exactly match


their meaning in English.
In English, there is a difference in meaning between:
The driver hit the cyclist and drove on.
and
The driver drove on and hit the cyclist.
▶ There is a temporal (time) element to this sentence.
▶ In “P and Q”, P happens before, or at the same time as, Q.
▶ In logic, “and” is commutative, i.e.
P ∧ Q is equivalent to Q ∧ P .

Copyright © Mark Aagaard 2024–2025 51 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Disjunction

Disjunction, P ∨ Q , means at least one of P or Q is true.


Both disjuncts could be true.

P ∨ Q is different from exclusive or, where exactly one disjunct is true.

“Exclusive or” means (P ∨ Q ) ∧ ¬(P ∧ Q ).

Example 2.24: Are these sentences regular “or” or


“exclusive or”?
1. You may skip lecture on Thursday or Friday.
2. The error is in the controller or the sensor.

Copyright © Mark Aagaard 2024–2025 52 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Implication
Example 2.25:
▶ Sentence: If an animal moos then it is a cow.
Which of these satisfy the sentence?

Copyright © Mark Aagaard 2024–2025 53 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Implication
Example 2.26: Formalize the sentence “If you do not behave
then I will take the toy away.”

▶ good means good behaviour


▶ toy means the child has the toy

Example 2.27: Does the formalization match the normal mean-


ing of the English in all environments?

Copyright © Mark Aagaard 2024–2025 54 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Unless
Example 2.29:
▶ Sentence: “It rains unless I take an umbrella”
▶ In the scenario where it rains and I take an umbrella, is the
sentence true or false?

Copyright © Mark Aagaard 2024–2025 55 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: “Unless” (cont’d)

▶ To check the formalization, think about what makes the sentence


true and what makes the sentence false.
▶ True: If I don’t take my umbrella, then it must rain.
▶ False: I don’t take my umbrella and it doesn’t rain.

Copyright © Mark Aagaard 2024–2025 56 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Unless (cont’d)

Copyright © Mark Aagaard 2024–2025 57 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: And/Or Precedence

In logic, ∧ binds tighter than ∨.


In English context (domain knowledge) sometimes overrides
precedence.
Example 2.30: Add parentheses to indicate precedence in each
of the following sentences.
▶ Mohab walks to school or drives to gym and the grocery
store.
▶ Mohab studies or goes out to dinner and parties.
▶ Mohab studies or sleeps and goes out to dinner.
▶ If the driver presses the brake pedal or turns left and accel-
erates, then the left-rear brake should be activated.

Copyright © Mark Aagaard 2024–2025 58 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: And/Or Precedence (cont’d)

Example 2.31:
▶ If the car’s current speed is greater than the cruise control
selected speed or the car is too close to the car in front
and the cruise control is on, then the cruise control system
should reduce the car’s speed.
▶ If the cruise control system is on and the car’s current speed
is greater than the cruise control selected speed or the car
is too close to the car in front and the cruise, then the cruise
control system should reduce the car’s speed.

Copyright © Mark Aagaard 2024–2025 59 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.5 Potentially Confusing

Confusing: Not Binding

How far to the right does “not” cover?


Example 2.32: Add parentheses to indicate the binding of “not”
in each of the following sentences.
▶ If the system is not overheated or unstable, then the indica-
tor light should be green.
▶ If the driver is not wearing sunglasses and blinking rapidly,
then the system shall issue a warning alert.

Copyright © Mark Aagaard 2024–2025 60 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

2.3.6 Ambiguities
Ambiguity: Pronouns

Sometimes it is confusing which object a pronoun (e.g., “it”) refers to.


Example 2.33:
“If a user process sends an error message to the supervisor pro-
cess, then it must write the error to the log file.”
▶ Which process should write the error message?
▶ These ambiguities can be difficult for authors to detect.
To the author it is obvious which process is “it”.
▶ To someone unfamiliar with the system, it is impossible to
know which process is “it”..

Copyright © Mark Aagaard 2024–2025 61 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Ambiguity: Pronouns

▶ General guideline: avoid pronouns whereever possible.


“If a user process sends an error message to the supervisor
process, then the user process must write the error to the log
file.”
▶ In complicated situations, use variables:
“If a user process (u) sends an error message to the supervisor
process (s), then u must write the error to the log file.”

Copyright © Mark Aagaard 2024–2025 62 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Ambiguity: Plural vs Singular


▶ Sentences such as the following are common:
▶ All students have majors.
▶ All Canadian provinces have capitols.
▶ All sharks have teeth.
▶ All unicorns have horns.
▶ There is ambiguity as to whether each student has one major or
multiple majors.
▶ A better way to write the sentences:
▶ Each student has one major. (Which of course isn’t strictly
true, because double majors are possible.)
▶ Each Canadian province has one capitol.
▶ Each shark has many teeth.
▶ Each unicorn has one horn.
▶ When writing a sentence of the form “X have Y”, try to use the
singular form.
Copyright © Mark Aagaard 2024–2025 63 / 102
Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Example: Ambiguous Sentence

Example 2.34:
Find three meanings for “The Mi’kmaq can fish for a week.”
(The Mi’kmaq are a First Nations people of Canada.)

Copyright © Mark Aagaard 2024–2025 64 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Example: Ambiguous Sentence

Example 2.35: Why is the sentence below ambiguous?


I enjoyed teaching your class a lot.

Example 2.36: Rewrite the sentence two different ways to illus-


trate the potential interpretations of the ambiguity.

Copyright © Mark Aagaard 2024–2025 65 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Ambiguous: Binding of Modifiers

Example: “The lawyer presented evidence of sabotage against the


accused.”
Possible bindings:
▶ “The lawyer presented evidence of (sabotage against the
accused).”
▶ “The lawyer presented (evidence of sabotage) against the
accused.”

Copyright © Mark Aagaard 2024–2025 66 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

2.3.6.1 Irregular Sentences


Irregular: Implicit Logical Operators

Sign at a Sobeys’ cake photo-printing machine:


You must:
▶ Have taken the photo yourself
▶ Have created the image yourself
▶ Have permission from the owner to use the image

Are the rules connected by “and” or “or”?

Copyright © Mark Aagaard 2024–2025 67 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.6 Ambiguities

Checking if a Formalization is Correct

▶ Analyze the meaning of the formalization in each possible


environment
▶ In the environments where your formula is true,
do you believe that the sentence should be true?
▶ In the environments where your formula is false,
do you believe that the sentence should be false?

NOTE: “you” actually means: you, your customer, your manager, etc..

Copyright © Mark Aagaard 2024–2025 68 / 102


Chapter 2 Propositional Logic 2.3 Formalizing Natural Language 2.3.7 Requirements and Recommendations

2.3.7 Requirements and Recommendations

▶ shall is used to mean that something must be true.


Ex: After turning the steering clockwise, the front wheels shall
turn to the right.
▶ shall not is used to mean that something must not be true.
Ex: If the car is off, the wheels shall not turn.
▶ should is used to recommend that something is true.
Ex: The driver’s seat should be comfortable.

Copyright © Mark Aagaard 2024–2025 69 / 102


Chapter 2 Propositional Logic 2.4 Proofs
2.1 Introduction
2.2 Syntax and Semantics
2.2.1 Syntax
2.2.2 Evaluation
2.2.3 Tautologies, Satisfiable, and Contradictions
2.2.4 Counterexample
2.2.5 Weaker, Equal, Stronger, Incomparable
2.3 Formalizing Natural Language
2.3.1 Overview
2.3.2 Rules for Formalization
2.3.3 Translating Logic into English
2.3.4 Problematic Sentences
2.3.5 Potentially Confusing
2.3.6 Ambiguities
2.3.7 Requirements and Recommendations
2.4 Proofs
2.4.1 Elimination Rules
2.4.2 Finishing a Proof
2.4.3 Introduction Rules
2.5 Index
Copyright © Mark Aagaard 2024–2025 70 / 102
Chapter 2 Propositional Logic 2.4 Proofs

2.4 Proofs
Proof Structure

▶ Start with the goal to prove


A goal is a formula that we try to prove is a theorem
▶ A proof is a sequence1 of proof steps.
▶ Each proof step, has:
▶ A set of assumptions: formulas that we assume to be true in
the current step
▶ A goal
▶ We apply a proof rule to get to the next proof step
▶ A proof rule transforms either
▶ an assumption: creates a new assumption
▶ the goal: modifies the goal and potentially creates a new
assumption

1 actually, a tree
Copyright © Mark Aagaard 2024–2025 71 / 102
Chapter 2 Propositional Logic 2.4 Proofs

Proof Structure (cont’d)

▶ A proof is done if:


▶ The goal is True
▶ The goal is identical to an assumption
▶ The goal is of the form x = x
▶ An assumption is False
(false implies anything)

Copyright © Mark Aagaard 2024–2025 72 / 102


Chapter 2 Propositional Logic 2.4 Proofs

Example: Mark Makes Mistakes

Example 2.37: Based on Aristotle’s syllogism about mortality.


Given the following assumptions:
▶ Mark is human
▶ If Mark is human, then Mark makes mistakes

Copyright © Mark Aagaard 2024–2025 73 / 102


Chapter 2 Propositional Logic 2.4 Proofs

Proof Rules

Recall:
▶ Each proof step applies a proof rule to an assumption or the goal.
▶ Apply a proof rule to:
▶ an assumption: creates a new assumption.
(All of the existing assumptions remain unchanged.)
▶ the goal,
▶ replace the current goal with the new goal(s)2
▶ and sometimes create a new assumption

2 if multiple goals, then we have a proof tree


Copyright © Mark Aagaard 2024–2025 74 / 102
Chapter 2 Propositional Logic 2.4 Proofs

Proof Rules (cont’d)

▶ The proof rules are based on the structure of formulas.


▶ Each logical operator has two elimination proof rules that
remove the outermost operator in the formula.
▶ apply to an assumption
▶ apply to the goal

Copyright © Mark Aagaard 2024–2025 75 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

2.4.1.1 Implication Elimination


Implication Elimination on the Goal

⊢ P ⇒Q
By ImplElim Goal
1 P
⊢ Q

Intuition:
▶ The goal says that if P is true, then Q is true.
▶ We only need to show that Q is true in scenarios where P is true.
▶ To prove that P implies Q , it is sufficient to assume that P is true
and prove that Q is true.
▶ We assume that P is true and then prove that Q is true.

Copyright © Mark Aagaard 2024–2025 76 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

Implication Elimination on an Assumption


1 P ⇒Q
2 P
By ImplElim Asm 1 Using Asm 2
3 Q

▶ Asm 1 says that if P is true, then Q is true


▶ Asm 2 says that P is true. Therefore, we know that Q is true.
▶ If we know that P is true and that P implies Q , then we know that
Q is true.
▶ In the proof rule, we need to specify which assumption(s) we are
using to justify that the left-hand side of the implication is true.
▶ Proof rules rely on the syntax of the assumptions.
▶ The assumptions we use with the proof rule must match the lhs of
the implication exactly
(modulo alpha renaming and commutativity)
▶ To prove that
Copyright © Mark Aagaard 2024–2025 77 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

Mark Makes Mistakes Formally

Copyright © Mark Aagaard 2024–2025 78 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

Implication Elim on Assumption with Subproofs

▶ The previous version of ImplElim on assumption required that we


have an existing assumption that matches the lhs of the
implication.
1 P ⇒Q
2 P
By ImplElim Asm 1 Using Asm 2
3 Q

Copyright © Mark Aagaard 2024–2025 79 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

ImplElim on Asm with Subproofs (cont’d)

▶ Sometimes it is easier to generate two subproofs:


▶ Prove P
▶ Assume Q

1 P ⇒Q
⊢ R
By ImplElim Asm 1

Sub proof 1. Prove P Sub proof 2. Assume Q ,


prove R
⊢ P
2.1 Q
⊢ R

Copyright © Mark Aagaard 2024–2025 80 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

ImplElim on Asm with Subproofs Intuition


1 P ⇒Q
⊢ R
By ImplElim Asm 1
Sub proof 1. Prove P

⊢ P

Sub proof 2. Assume Q , prove R


2.1 Q
⊢ R

▶ We know that if P is true, then Q is also true.


▶ In the first sub proof, we prove that P is true.
▶ In the second sub proof, we assume that Q is true.

Copyright © Mark Aagaard 2024–2025 81 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

2.4.1.2 And Elimination


And Elimination on Assumption

1 P ∧Q
By AndElim Asm 1
2 P
3 Q

▶ If we know that P ∧ Q is true, then we know both that P is true and


that Q is true.

Copyright © Mark Aagaard 2024–2025 82 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

And Elimination on Goal


This proof rule generates two subproofs that we must complete.
⊢ P ∧Q
By AndElim Goal
Sub proof 1. Prove P
⊢ P

Sub proof 2. Prove Q


⊢ Q

▶ To prove that P ∧ Q is true, we must prove that P is true and that


Q is true.
▶ To prove that P ∧ Q is true, it is sufficient to prove both that P is
true and that Q is true.
▶ Both sub proofs may use any of the assumptions that appear
before the split in the proof tree.
▶ Each sub proof is independent
They
Copyright © Mark may
Aagaard not use assumptions that appear only in the other
2024–2025 sub
83 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

2.4.1.3 Or Elimination
Or Elimination on Goal

⊢ P ∨Q ⊢ P ∨Q
By OrElimLeft Goal By OrElimRight Goal
1 P 1 Q

▶ The goal is to prove that P ∨ Q is true.


▶ To prove that P ∨ Q is true, it is sufficient prove that P is true or
prove that Q is true.
▶ We may choose to prove either:
▶ that P is true, or
▶ that Q is true.
▶ There are two rules
▶ OrElimLeft for the left disjunct (P )
▶ OrElimRight for the right disjunct (Q )
Copyright © Mark Aagaard 2024–2025 84 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

Or Elimination on Assumption
This proof rule generates two subproofs that we must complete.
1 P ∨Q
⊢ R
By OrElim Asm 1
Sub proof 1. Add P as asm
1.1 P
⊢ R

Sub proof 2. Add Q as asm


2.1 Q
⊢ R

▶ If we know that P ∨ Q is true, then we know that P is true or that


Q is true.
▶ We have two subproofs, one with P as an asm and one with Q as
anAagaard
Copyright © Mark asm.2024–2025 85 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

Example of Or Elim

Prove: (P ∨ Q ) ⇒ (Q ∨ P )

1 P ∨Q
⊢ Q ∨P
By OrElim Asm 1

Sub proof 1. Add P as asm Sub proof 2. Add Q as asm

1.1 P 2.1 Q
⊢ Q ∨P ⊢ Q ∨P
By OrElimRight Goal By OrElimLeft Goal
⊢ P ⊢ Q
QED Asm 1.1 QED Asm 2.1

Copyright © Mark Aagaard 2024–2025 86 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

2.4.1.4 Not Elimination


Not Elimination on Goal

This proof rule corresponds to “proof by contradiction”.

⊢ ¬P
By NotElim Goal
1 P
⊢ False

▶ To prove that P is false, we can assume that P is true and then


prove false.
▶ To prove that ¬P is true, it is sufficient to assume that P is true
and then prove False is True.
▶ This works, because “false implies anything”. To prove false, we
must have a contradiction in the assumptions.

Copyright © Mark Aagaard 2024–2025 87 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.1 Elimination Rules

There is no NotElim on Assumption


Bad
1 ¬P
By NotElim Asm 1
2 P
⊢ False

▶ This shows why there is not a proof rule for NotElim on an


assumption.
▶ After applying the bogus proof rule, we are guaranteed to have a
contradiction in the assumptions.
▶ The original assumption is ¬P .
▶ The new assumption is P .
▶ We can now prove that ketchup is a nutritious vegetable.

Copyright © Mark Aagaard 2024–2025 88 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.2 Finishing a Proof

2.4.2.1 Assumption

1 P
⊢ P
QED Asm 1

Copyright © Mark Aagaard 2024–2025 89 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.2 Finishing a Proof

2.4.2.2 Contradiction

1 F
⊢ P
QED Contradiction Asm 1

1 P
2 ¬P
⊢ Q
QED Contradiction Asm 1, Asm 2

▶ We have a contradiction if either:


▶ an assumption is false, or
▶ as assumption is the negation of another assumption

Copyright © Mark Aagaard 2024–2025 90 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.2 Finishing a Proof

2.4.2.3 Goal is True

⊢ True
QED Logic

Copyright © Mark Aagaard 2024–2025 91 / 102


Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

2.4.3.1 Overview of Introduction Rules

▶ The introduction rules are optional.


▶ You can do all of the proofs in the course without any
introduction rules.
▶ Introduction rules might shorten proofs.
▶ Recommendation: learn the introduction rules if
▶ you are comfortable with the elimination rules, and
▶ you enjoy proofs
▶ Each introduction rule adds a new instance of a logical operator.
Assumption Goal
And AndIntro Asm 1, Asm 2 AndIntro
Or
Implies
Not

Copyright © Mark Aagaard 2024–2025 This material will not be tested 92 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

2.4.3.2 And Introduction


And Introduction on Assumption

1 P
2 Q
By AndIntro Asm 1, Asm 2
3 P ∧Q

▶ This rule has exactly the opposite behaviour of AndElim on an


assumption.
▶ If we know both that P is true and that Q is true, then we know
that P ∧ Q is true.

Copyright © Mark Aagaard 2024–2025 This material will not be tested 93 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

Example: And Introduction on Assumption

1 P
2 Q
3 P ∧Q ⇒ R
⊢ R
By AndIntro Asm 1, Asm 2
4 P ∧Q
By ImplElim Asm 3 Using Asm 4
5 R
⊢ R
QED Asm 5

Copyright © Mark Aagaard 2024–2025 This material will not be tested 94 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

And Introduction on Goal

⊢ P
By AndIntro Goal Using Q
⊢ P ∧Q

▶ This rules strengthens the goal


(makes it more difficult to prove)
▶ Original goal: prove that P is true.
▶ New goal: prove that P is true and that Q is true.

Copyright © Mark Aagaard 2024–2025 This material will not be tested 95 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

Or Introduction on Assumption

1 P
By OrIntro Asm 1 Using Q
2 P ∨Q

▶ This rule weakens the assumption


(makes it more difficult to prove the goal)
▶ Original assumption: know that P is true.
▶ New assumption: know that either P is true or that Q is true.

Copyright © Mark Aagaard 2024–2025 This material will not be tested 96 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

Or Introduction on Goal

▶ There is not a proof rule for introducing a disjunction into the


goal.
▶ This would weaken the goal

Bad
⊢ P
By OrIntro Goal Using True
⊢ P ∨ True
By OrElimRight Goal
⊢ True
QED Logic

Copyright © Mark Aagaard 2024–2025 This material will not be tested 97 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

2.4.3.3 Implies Introduction


Implies Introduction on Goal

1 P
⊢ Q
By ImplIntro Goal Using Asm 1
⊢ P ⇒Q

▶ This rule is the opposite of ImplElim goal.

Copyright © Mark Aagaard 2024–2025 This material will not be tested 98 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

Implies Introduction on Assumption

1 P
2 Q
By ImplIntro Asm 2 Using Asm 1

3 P ⇒Q

▶ This rule is the opposite of ImplElim asm.

Copyright © Mark Aagaard 2024–2025 This material will not be tested 99 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

2.4.3.4 Not Introduction


Not Introduction on Goal

1 P
⊢ False
By NotIntro Goal Using Asm 1
⊢ ¬P

Copyright © Mark Aagaard 2024–2025 This material will not be tested 100 / 102
Chapter 2 Propositional Logic 2.4 Proofs 2.4.3 Introduction Rules

There is no NotIntro on Assumption

Copyright © Mark Aagaard 2024–2025 This material will not be tested 101 / 102
Chapter 2 Propositional Logic 2.5 Index
2.1 Introduction
2.2 Syntax and Semantics
2.2.1 Syntax
2.2.2 Evaluation
2.2.3 Tautologies, Satisfiable, and Contradictions
2.2.4 Counterexample
2.2.5 Weaker, Equal, Stronger, Incomparable
2.3 Formalizing Natural Language
2.3.1 Overview
2.3.2 Rules for Formalization
2.3.3 Translating Logic into English
2.3.4 Problematic Sentences
2.3.5 Potentially Confusing
2.3.6 Ambiguities
2.3.7 Requirements and Recommendations
2.4 Proofs
2.4.1 Elimination Rules
2.4.2 Finishing a Proof
2.4.3 Introduction Rules
2.5 Index
Copyright © Mark Aagaard 2024–2025 102 / 102
Chapter 2 Propositional Logic 2.5 Index

A ▶ consequent 11
▶ ambiguous 50 ▶ Contradiction 90
▶ And elim on asm 82 ▶ contradiction 16
▶ counter example 19
▶ And elim on goal 83
▶ And intro on asm 93 D
▶ And intro on goal 95 ▶ declarative 34
▶ antecedent 11 ▶ disjuncts 11
▶ assumption 71 E
▶ atomic propositions 6, 8 ▶ elimination 75
▶ environment 12
C
▶ equal 23
▶ clause 34
▶ evaluate 12
▶ compound propositions 8
▶ conclusion 11 F
▶ formalize 33
▶ confusing 50
▶ conjuncts 11
opyright © Mark Aa-
G
102 / 102
Chapter 2 Propositional Logic 2.5 Index

▶ goal 71 ▶ Or elim on asm 85


▶ Or elim on goal 84
H
▶ hypothesis 11 ▶ Or intro on asm 96

I P
▶ Implication elimin on asm 77 ▶ premise 11
▶ Implication elimin on goal 76 ▶ proof 71
▶ Implies intro on asm 99 ▶ proof rule 71
▶ Implies intro on goal 98 ▶ proof step 71
▶ incomparable 23
▶ proof, done 72
▶ introduction rule 92
▶ ▶ propositional operators 6
irregular 50

N Q
▶ Not elimin on goal 87 ▶ Qed with asm 89
▶ Not intro on goal 100 ▶ Qed with goal 91

opyright © Mark Aa-


O S
102 / 102
Chapter 2 Propositional Logic 2.5 Index

▶ satisfiable 16 ▶ tautology 16
▶ satisfying assignment 18
▶ semantics 5 V
▶ shall 69 ▶ variables 8
▶ shall not 69
▶ should 69 W
▶ stronger 23 ▶ weaker 23
▶ syntax 5 ▶ well-formed formulas (wff) 8
T ▶ wff 5

Copyright © Mark Aagaard 2024–2025 102 / 102

You might also like