CS350 · Session 2 · What is Truth?

Sentences that can be true or false

A logical sentence is simply a statement that is either true or false. You may not know its truth value, but it has one. That modest definition is the foundation of everything we build in the logic unit, and it is easy to get wrong in the wild.

01

The sentence sorter

Classify each sentence. Is it a logical sentence at all? If so, is it contingent (could go either way), a tautology (true by logic alone), or a contradiction (false by logic alone)?

Color trade card of a carrot with human arms and legs, dressed as a gentleman in a top hat and monocle with a moustache, holding a cane and standing on grass. Printed below: C. Ribsam & Sons, Seedsmen, Florists & Nurserymen, Trenton, N.J.
C. Ribsam & Sons. (1880s). [Trade card featuring a monocle-wearing carrot man] [Trade card]. Horticultural Artifacts Collection, Smithsonian Gardens, Washington, D.C. Retrieved from Smithsonian Institution.
The definitions, precisely
Logical sentence
A statement that is either true or false. Questions and commands do not qualify: they have no truth value.
Contingent sentence
True in some situations, false in others. Logic alone cannot settle it.
Tautology
True purely in virtue of its logical form, in every possible situation. 'A or not-A.'
Contradiction
False purely in virtue of its logical form, in every possible situation. 'A and not-A.'

Silly sentences are deliberate. 'All men are carrots!' strips away your background knowledge so only the logic remains, which is exactly the skill being trained.

02

Can they both be true?

A set of sentences is consistent when it is logically possible for all of them to be true at the same time, and inconsistent otherwise. Judge each pair.

When meaning matters, and when structure matters

Nothing in the surface form of 'I have a younger brother' and 'I am an only child' clashes: as bare symbols, B and O are just two atoms. We judge them inconsistent because we understand what the sentences mean. Later, once we translate sentences into symbolic logic, consistency checks become purely structural: a truth table hunt for a row where everything is true.

03

R's == is not logical equivalence

In R, == asks: do these two expressions have the same value right now? Logical equivalence asks: do they have the same value in every possible world? Flip the variables and watch the difference.

Why the distinction matters

== evaluates the current state of your variables: one row of the truth table. Logical equivalence is a claim about all rows. Two expressions can happen to agree today and still mean different things.

This is why we use truth tables to establish equivalence, and why a passing test run is not a proof that two pieces of code do the same thing.

04

Reflection