UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 1.1 Free with a free account
What Is Logic and Why It Matters in Mathematics
Discrete Mathematics · Chapter 1: Logic and Mathematical ProofSection 1.1 · lesson 1 of 8712 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Discrete Mathematics.
Lesson complete
Earn the 4 college credits for Discrete Mathematics
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Types of Logical Fallacies and How to Recognize Them →Next lesson: Types of Logical Fallacies and How to Recognize Them →
In this lesson
Judging an argument by its structure, not by how convincing it sounds.
- Distinguish a formal logical system from everyday argument
- Explain why mathematical proof requires formal logic
- Trace formal logic from Aristotle to Boole and Frege
- Explain why computer science depends on formal logic
Transcript
Everything said in the video, section by section (1,716 words). Read along, or search it.
Logic and Mathematical Proof
What Is Logic - and Why It Matters
Welcome to Discrete Mathematics. The course opens with logic, and this first section asks what logic is, and why mathematics cannot function without it. We'll separate a formal logical system from everyday argument, and see why a mathematical proof depends on one. Then we'll trace formal logic from Aristotle to Boole and Frege. And we'll see why it's just as essential to modern software as it is to a proof.
The Opening Problem
One Sentence, 2 Programs
Here's a rule that shows up constantly in the access-control logic of web applications. Allow checkout if the customer has a saved payment method or a verified account, and has confirmed a shipping address. Read once, it seems perfectly clear. Hand it to two engineers, though, and an ambiguity appears almost at once. Does the phrase about confirming an address apply to the whole first clause, so confirmation is always required? Or does it apply only to the verified-account branch, so a saved payment method alone can skip that step? English allows both readings. A fluent speaker resolves the ambiguity without noticing, using context a program doesn't have. If two engineers decide differently, the system behaves inconsistently, for reasons that have nothing to do with a typo. That's a logic problem, not an arithmetic one.
Formal Systems vs Everyday Argument
Validity Comes From Form
In ordinary conversation, the word logical is used loosely. It leans on context, tone, the credibility of the speaker, and assumptions never said out loud. Mathematical logic is narrower, and far more demanding. A logic, in this sense, is a formal system. A fixed collection of symbols, fixed rules for combining them, and fixed rules for deciding, from the symbols alone, whether an argument is valid. Formal doesn't mean stiff or official. It means validity is decided entirely by the structure, or form, of the argument. An argument is a finite sequence of statements, called premises, offered in support of a further statement, called the conclusion. It's deductively valid if it's structurally impossible for every premise to be true while the conclusion is false. So a valid argument built on false premises is still valid. And an invalid argument that happens to reach a true conclusion is still invalid. That separation of structure from content is exactly what everyday argument lacks.
Table 1.1.1
Everyday Argument vs a Formal System
This table compares the two along the dimensions that matter for trusting an argument. Everyday argument persuades through rhetoric, credibility, and tone. A formal system persuades through structure alone, whoever states it. In everyday argument, context is heavy, and meaning shifts with the audience. In a formal system, meaning is fixed by definition before reasoning begins. Everyday listeners resolve ambiguity unconsciously. A formal system tolerates none. An ambiguous statement must be rewritten before it can be evaluated. Everyday validity is subjective, and reasonable people can disagree. Formal validity is mechanical, checkable by following fixed rules, even by a machine. Which is why formal logic runs mathematical proof, digital circuits, algorithm verification, and database logic.
Worked Example
Formalizing Exposes the Weak Premise
Here's an everyday argument of the kind that comes up constantly in technical conversation. Databases don't lose data if you back them up regularly, and we back up every night, so we're fine. Written with its skeleton showing, there's a first premise. If a database is backed up regularly, it does not lose data. A second premise. This database is backed up every night. And a conclusion. This database does not lose data. Structurally, nothing is wrong. It has a valid form. From if P then Q, and P, it concludes Q. But formalizing does something the casual version doesn't. It isolates exactly which claim would have to be true, and puts it up for scrutiny. And the first premise is false in general. Backups don't protect against loss during the backup window, or corruption copied into every backup, or an attacker who deletes both. Formalizing doesn't make an argument true. It shows exactly what would have to be true for the argument to work, so the claim can be checked instead of merely felt.
Why Proof Requires Formal Logic
Every Case at Once
Mathematics makes claims of a particular kind. A theorem asserts that something is true for every object in some collection. Every even integer, every finite graph. Not just the cases someone happened to check. A researcher who tests a hypothesis on a thousand cases, with no counterexample, has strong empirical evidence. But a thousand successful cases don't rule out failure on the thousand-and-first. A proof is held to a different standard. It must show the claim follows of logical necessity, for every case at once, with no gap left for intuition to fill in silently. Before a claim can even be evaluated, its key terms must be pinned down. So here's a definition. An integer n is even if there exists an integer k such that n equals two times k.
Worked Proof
The Sum of 2 Even Integers Is Even
Now the claim. The sum of any two even integers is even. Let a and b be even integers. That's the only assumption the argument is entitled to use. By the definition, since a is even, there's an integer j with a equal to two j. And since b is even, there's an integer k with b equal to two k. Add the two. a plus b equals two j plus two k. Factor the right-hand side, and it's two times the quantity j plus k. Since j and k are integers, their sum is also an integer, because the integers are closed under addition. Call it m. So a plus b equals two m. That's exactly the form the definition requires, so a plus b is even. Notice that no step appeals to it's obviously true, or to a pattern spotted in a few examples. The argument never depended on which even integers a and b were. So the claim holds for every even integer at once, including ones no one will ever write down.
A Brief History
Aristotle: Validity by Pattern
Formal logic didn't appear all at once, and its history explains why it eventually became expressive enough for computer science. The first systematic treatment is usually credited to Aristotle, writing in Athens in the fourth century BCE. In the Prior Analytics, he cataloged categorical syllogisms. Arguments with exactly two premises and a conclusion, each relating categories of things. Here's the same shape in modern vocabulary. All decidable problems have an algorithm that terminates on every input. Sorting a finite list is a decidable problem. Therefore sorting a finite list has an algorithm that terminates on every input. The pattern is, all A are B, C is A, therefore C is B. Aristotle's insight was that it's valid whatever categories are substituted. Validity is a matter of the pattern. But syllogistic logic had a real limit. It could relate whole categories, with all, no, and some. It couldn't express claims like there exists exactly one.
Figure 1.1.1
Key Stages in Formal Logic
This figure shows the key stages in the development of formal logic, as an ordered sequence. It's deliberately not drawn to scale. Roughly two thousand two hundred years separate Aristotle and Boole, and a true time scale would squash everything after into a single point. In eighteen fifty-four, George Boole published An Investigation of the Laws of Thought. It treated logical reasoning as a kind of algebra. Statements could be combined and manipulated symbolically, much as numbers are. In eighteen seventy-nine, Gottlob Frege published the Begriffsschrift, or concept-script. It introduced a notation for quantification, the machinery behind for every, and there exists. For the first time, a notation could state the kinds of claims mathematics actually makes. Refined by later figures such as Bertrand Russell, Frege's system became the ancestor of today's predicate logic. And that expressive power is exactly what digital computing needed.
Why Computer Science Needs Logic
A Direct Dependency, Not an Analogy
The line from Boole and Frege to this course is not a loose analogy. It's a direct historical and technical dependency. Digital circuit design is the most literal example. In nineteen thirty-seven, Claude Shannon, an MIT graduate student, showed something in his master's thesis. Boole's algebra applies to networks of electrical switches. A switch is open or closed, and a statement is true or false. The same algebra describes both, and every processor since is built on it. Algorithm correctness depends on logic just as directly. A claim that a sorting algorithm always works is a statement about every possible input, just like a theorem. Database query logic is applied predicate logic. In nineteen seventy, Edgar Codd introduced the relational model, querying data with operations drawn from logic and set theory. Every modern query language, including SQL, descends from it. A where clause is a logical condition, and combining conditions with and and or is combining logical statements. That is exactly why the ambiguous checkout rule previews a real category of database bug. And with theorem provers such as Lean and Coq, a mathematician writes a proof in a strict formal language, and software checks every inference step.
Table 1.1.2
The Checkout Rule, Traced
Back to the checkout rule. This table traces five customers through the two readings. Under reading A, the confirmation requirement binds only to the verified-account branch. Under reading B, it applies to both branches. The two readings agree for four of the five customers. But customer one has a saved payment method, no verified account, and an unconfirmed address. Reading A lets them check out. Reading B blocks them. Nothing about customer one's data is unusual. The disagreement exists only because the sentence never said how far the word and was meant to reach. That's exactly the gap the tools in this chapter close. Connectives and truth tables let us write the rule so only one reading is possible, and check mechanically which cases it allows.
Limits and Takeaways
Certainty About Validity - Not About Premises
It's worth being honest about the limits, too. Writing a fully formal proof or specification is slow and demanding, and current tools still need substantial expert effort outside narrow domains. And a proof assistant checks only that an argument's logic is valid. It can't verify that the premises correctly describe the real system being reasoned about. Formal logic replaces guesswork about validity with certainty about validity. It doesn't replace the human judgment of deciding what to prove. To summarize. Logic judges reasoning by structure, independent of subject matter. No finite number of checked examples can substitute for a proof. Aristotle first judged validity by form, and Boole and Frege made logic expressive enough to formalize mathematics. And ambiguity that's harmless in conversation becomes a real bug once it's encoded into a system.
About Discrete Mathematics at UPI Study
Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take Discrete Mathematics with UPI Study
Where the credit goes
Universities that work with NCCRS
Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About What Is Logic and Why It Matters in Mathematics
What is the difference between a formal logical system and everyday argument?
Is checking many examples enough to prove a statement in mathematics?
How did formal logic develop from Aristotle to Boole and Frege?
Why does computer science depend on formal logic?
About the Discrete Mathematics course
How many college credits is Discrete Mathematics?
How much does Discrete Mathematics cost and what is included?
Which universities accept UPI Study credits?
How long does Discrete Mathematics take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 4 credits in Discrete Mathematics.
87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
4 credits · NCCRSEnroll →