Monthly Archives: July 2011

Classical Logic I

1.1. Introduction

Alright, let’s kick this off with some easy stuff.

Before we begin, though, I want to talk briefly about what logic actually is. Logic is a system of inference that allows you to derive conclusions from premises. That’s pretty much it. Most of the time when you apply logic, you deal with conclusions and premises that look something like:

  • Socrates is a man.
  • All Men are mortal.
  • Therefore Socrates is mortal.

Most of the time when you’re talking about logic, however, you use variables (just like math! yay!) in order to generalize the forms of the arguments you’re interested in. This is what you’ll mostly see later, although for now I’m going to stick with full sentences in order to keep things clear(-ish).

Some people try to claim that logic is simply one thing: a collection of logical absolutes that are demanded by the universe, written into the fabric of existence or other such nonsense. Truth is, logic has many different models, and each of these models can be used to reflect something different in reality. It may seem like a universal requirement that you can’t have a sentence and its negation both be true, but believe it or not there are logics which allow that. Perhaps even more surprisingly, they have real world applications!

But for now we’re going to stick with what’s called classical logic. It’s what people tend to think of when they think about logic (certainly, it tends to be what gets taught in introductory logic courses). Basically it was designed as a way to reason about mathematics. Thus, it has certain properties that you’d expect: it is non-contradictory, non-constructivist, immutable, sound and complete (among other properties). Don’t worry if you don’t know what these words mean. You can either look them up on the Internet or wait for me to get around to explaining them some day.

1.2. Arguments

1.2.1. Premises and Conclusions

I said before that logic is a system of inference that allows you to derive conclusions from premises. Let’s work out exactly what that means. A system of inference is a collection of rules used to form conclusions. The system of inference we will be talking about is called Classical Logic and is usually written without capital letters. There’s a reason it’s called “classical”, which is also the same reason it’s taught at the introductory level: it reflects a lot of our intuitions about logic. Many of the rules in classical logic will seem “obvious” and you may not be able to imagine how they could be otherwise. That’s both good and bad. Good, because it makes classical logic easier to grasp; but bad because it can make it more difficult to learn more complicated systems later on. Don’t worry too much about this, but try to keep it in the back of your mind.

So what are premises? Basically these are the building blocks of an argument. Premises are a set of “assumptions”, usually taken for granted for the purposes of the argument. Sometimes they can be painfully obvious: “The sun is hot.” or “One plus one equals two.”, for example. Other times, they can be more difficult to verify: “Taking a life is morally reprehensible in all situations.”  The important thing to remember is that they’re called “assumptions” for a reason: the point of the argument is, assuming your premises, how do you establish your conclusion.

Finally, a conclusion is what you’re building towards using your premises. It is much more likely to be controversial than your premises, however establishing the truth of a controversial conclusion is much easier than establishing that of a controversial premise: that’s exactly the point of the argument.

So let’s consider the canonical example:

  • P1) Socrates is a man.
  • P2) All men are mortal.
  • C) Therefore, Socrates is mortal.

In this argument, we see the premises (P1 and P2) and the conclusion (C). Now, if we assume that P1 and P2 are both true (as we should, given their status as assumptions) then it’s hard to argue with C. But are P1 and P2 true? It’s difficult to say. Is Socrates truly a man if he is dead? Perhaps he never even truly existed? Are all men indeed mortal? Maybe science can someday achieve immortality. Should these doubts affect our argument? In the grand scheme of things, perhaps. However all we are considering is whether the premises establish the conclusion. In our case, I hope it is clear to see that they do so.

1.2.2. Valid Arguments

Now, clearly, not all arguments are going to be good ones. Thus, in order to determine how much attention to give to an argument, we need a way of assessing it. This assessment is going to be called validity. A valid argument is one whose conclusion must necessarily follow from its premises. In other words, if it is impossible to imagine a world where the premises of an argument are true and its conclusion false; then the argument is valid. Similarly, if you can imagine such a world, the argument is said to be invalid.

Let’s see some examples:

  • P1) If it rains, the grass will be wet.
  • P2) It is raining.
  • C1) Therefore, the grass is wet.

and:

  • P3) If it rains, the grass will be wet.
  • P4) The grass is wet.
  • C2) Therefore, it is raining.

Now, one of these is a valid argument and one is not. Can you figure out which is which? Seriously, think about it for a minute. I’ll wait.

Did you say that the first one is valid and the second one invalid? If so, you’ve just taken your first step into a larger world! Buy why is that? In the first example, we can see that it is impossible for P1 and P2 to both be true and have C1 be false. We can ignore things like the possibility of a tarp or an awning because P1 guarantees us that if it is raining, then the grass will bet wet. Since P2 tells us it is raining then the only possibility is that the grass is wet. But why isn’t the second argument valid? Sure the grass will be wet  if it rains (P3), but just because the grass is wet (P4) doesn’t mean it is raining (C2). Suppose it is sunny out and we have the sprinkler running on the lawn? Then P3 and P4 will be true, but C2 will not be. That makes this an invalid argument.

Let’s try a harder one:

  • P5) Either the sky is made of marshmallows or the capital of Ohio is Columbus.
  • P6) Columbus is not the capital of Ohio.
  • C3) Therefore, the sky is made of marshmallows.

and:

  • P7) The sky is blue.
  • P8) The ocean is blue.
  • C4) Therefore, sapphires are also blue.

What do you think? Which one is valid and which one is invalid? If you said the first one is invalid and the second one is valid, then you are… WRONG! But don’t worry about it: that’s the point of trick questions. They’re how we learn.

So what makes the first of these two arguments valid? Clearly it’s crazy: the sky isn’t made of marshmallows! Columbus is the capital of Ohio! Who invented this crazy logic-stuff anyways? Well let’s think about the definition of validity. At any point does it say anything about whether the conclusion must actually be true? It may seem like it, but read it carefully: “if it is impossible to imagine a world where the premises of an argument are true and its conclusion false; then the argument is valid.” So can we imagine a world where Columbus is not the capital of Ohio? Sure, that’s easy! Maybe in this world it’s Cleveland. Why not? Can we imagine a world where either the sky is made of mashmallows or the capital of Ohio is Columbus? That shouldn’t be too hard either (in fact, we live in such a world). But can we imagine a world where both those things are true? It might seem bizarre, but there’s nothing really stopping us if we put our mind to it. But in this world, if Cleveland is the capital of Ohio and then either the capital of Ohio is Columbus or the sky is marshmallows, then I guess the sky must be marshmallows. It sounds weird, but if you give it some thought, it really does make sense. Kind of. Trust me.

Well what about the other argument: clearly the sky, the ocean and sapphires are all blue. So what makes this argument invalid? Well it’s basically the opposite of the last one. Imagine a world where the sky is still blue, the ocean is still blue but sapphires are (for some reason) yellow. Easy right? The argument must be invalid. In fact, an early clue towards this might be that the conclusion has nothing to do with the premises. That’s called a non-sequitur and is usually a good sign for when you’re looking at an invalid argument. Although as we’ll see, there’s a quirk in classical logic where this doesn’t always invalidate an argument. We’ll look at that in a bit.

So we’ve seen that valid arguments can have false conclusions and invalid arguments can have true conclusions. You might be asking yourself (or, more likely, me) what the hell use this notion of validity is in the first place!? Which brings us to…

1.2.3. Sound Arguments

Validity is a property examining the structure of an argument. Soundness is the property that you actually want to use to determine in order to judge an argument. A sound argument must fulfill two criteria:

  1. It must be valid. (Hah! You just learned what that was! Awesome! You’re so ahead!)
  2. Its premises must be true.

So if you ever want to critique an argument, the real thing you want to look at is soundness. Because if the premises are true, and the premises imply the conclusion, then the conclusion must be true! (Look, ma, I just made an argument about arguments!)

What about our four arguments above? Well numbers 2 and 4 are clearly out, as they weren’t even valid. Thus, they must not be sound. Number 3 is also out because of this Columbus is the capital of Ohio (oddly enough, it’s this and not P5 that makes the argument unsound, but you’ll see why later on). So what about number 1? Well, it depends. For me, right now as I write this, it happens to be a sound argument. For you, where you are as you read this, it might not be. So maybe that’s a bit confusing. Let’s see if we can find a better example:

  • P1) The sun is very hot.
  • P2) Touching something very hot can burn you.
  • C) Touching the sun can burn you.

Hard to argue with: P1 and P2 are both true and necessarily imply C. Impractical though it may be, I think we’ve found our first sound argument! (You know, at least until the sun burns out, or we invent a ridiculous full body version of the grill glove…)

1.3. Non-Contradiction

One of the important notions of classical logic is that of non-contradiction. It’s a fairly intuitive concept, basically stating that something can’t be both true and not true (ie: false) at the same time. Or to put it another way, a sentence and its negation cannot both be true at the same time. So for example, the statements “I am hungry” and “I am not hungry” cannot be simultaneously true. Similarly, the sentence pairs:

  • “One plus one equals three”/”One plus one does not equal three.”
  • “I have better things to do than to read this.”/”I do not have better things to do than to read this.”
  • “Logic is stupid.”/”Logic is not stupid.”

are all contradictory. Thus, exactly one of each of them must be true. (I’ll leave you to decide which of each of the pairs is which.)

This has some odd results when it shows up in arguments, which can be split up into two parts: contradictions appearing among premises and contradictions appearing in conclusions.

1.3.1. Contradictions in Premises

There’s a strange little feature in classical logic whereby anything can be derived from a contradiction. As such, an argument like:

  • P1) The sky is blue.
  • P2) The sky is not blue.
  • C) You are being eaten alive by dinosaurs RIGHT AS WE SPEAK!

is actually (oddly) a valid argument.

“Oh, that’s bullshit, I’m out of here!” I hear you saying. Well hang on a minute, let’s take a moment to consider this for a second. Let’s think again about what it means for an argument to be valid: if the premises of the argument are true, then the conclusion must necessarily also be true. Okay, great. So let’s imagine a world where the sky is blue. And also not blue. Wait, okay… that doesn’t make sense. No such world could possibly exist, right? But the weird thing about non-existent things is that we can say whatever we want about them.

It’s just like God. He doesn’t exist, so we can easily say that he’s omnipotent, omnibenevolent, omniscient, a dinosaur, a transvestite, and enjoys the occasional hamburger. Oh, and he also exists (my best summary of the ontological argument). You can say whatever you want about him. At the end of the day, it doesn’t matter because once you’ve already established non-existence (even simply as a premise, as in the God case), anything else you say about the subject just doesn’t matter.

Okay, so back to our world of the blue-and-yet-not-blue sky. It doesn’t exist. It can’t! So we might as well say whatever we want about it, including how delicious you taste to the velociraptor standing… right… BEHIND YOU!

Heck, you can even use it to derive other contradictions. Which brings us to…

1.3.2. Contradictions in Conclusions

Classical logic has a property known as soundness. While confusing, this is different from the property of soundness that an argument may or may not have. Basically some philosopher decided that it would be funny if two surface-unrelated concepts had the same name, and also made them both likely to come up in a gentle introduction to logic.

So what does this new version of soundness say? Basically it tells us that anything derived from true premises is also true.  But since, as we know, a contradiction cannot be true, having a contradiction in your conclusion means either that your premises are contradictory (since anything can then be derived from them) or that you made a mistake along the way. Either way, having contradictory conclusions will give you a lot of information, so keep an eye out for them.

1.4. Excluded Middle

One important bit that will seem obvious when I say it, but warrants saying anyways is a bit about truth values and the law of the excluded middle.

What is a truth value? Basically it’s a the status regarding the truth of a sentence. A truth value can only be one of two things: true or false. Any given sentence is one or the other: it cannot be both nor can it be neither.

Any sentence which is not true is false; and any sentence which is not false is true. This may sound confusing, if only because it’s so obvious that you’re wondering why the heck I’m bothering to say it, and that’s a fair question. In classical logic, truth behaves almost exactly as you’d expect it to. And so to avoid confusing you, I will say no more except to warn you that there are variations of logic which avoid this principle. But they’re way off in the future. For now just think of truth as a binary thing, the negation of which is false.

1.5. Sentences

I just want to wrap up quickly. There’s a concept in introductory logic that always gets mentioned, and I’d be remiss if I didn’t do so myself. Basically that concept is sentences.

Now, this won’t matter so much later on when we’re dealing with sentences that look more like this:

(a\wedge b)\rightarrow(c\vee (d\wedge a))

but there’s a slight issue about what sentences actually are. Basically, every introductory logic textbook I’ve ever seen defines them as this: a sentence is a sequence of words which can either be true or false and not both.

This might be confusing, but we’ve seen enough premises and conclusions today to give you an idea of what sentences look like. So just for clarity, here are a few things that aren’t sentences, at least not as far as logic is concerned:

  • S1) “Hello!”
  • S2) “Please go over there.”
  • S3) “Purple squid monkey penis!”
  • S4) “This sentence is false.”

S1 and S2 are (perhaps obviously) not considered sentences because they cannot be either true or false. Certainly, they have meaning, but you can’t really apply them in an argument. S3 is a complete non sequitur and is so devoid of meaning as to be utterly useless when trying to discuss truth.

S4 raises some interesting questions, however. It seems like the kind of thing that should have a truth value. But what value ought it to have? Let’s say it’s true. Well if it’s true, that immediately means it must be false. So it’s false? But if that’s the case then its falsehood makes itself true. And you just keep going around in circles trying to figure it out. Thus, not only does it not have a truth value, but it cannot have any truth value. Which is kind of neat when you think about it. (And for those of you wondering, yes, this is where the joke in Portal 2 comes from. See, learning is fun and it gives you a better appreciation for the things you already love!)

1.6. Questions

You should now be able to answer the following questions:

  1. What are the two parts of an argument?
  2. Describe in your own words what a valid argument is.
  3. Give two examples of valid arguments: one with true premises and one with false premises.
  4. Give two examples of invalid argumens: one with a true conclusion and one with a false conclusion.
  5. Give an example of a sound argument with false premises.
  6. What kind of premises allow you to derive a contradiction?
  7. How many different truth values can sentences possibly have? What are they?
  8. Give an example of a meaningful sequence of words that is not a sentence.
Advertisements

Introduction

Hi! My name is Zach, and this is my blog. Basically, lately, I’ve been getting the urge to write some stuff down, but the thought of actually going through and creating a blog before I could to all that seemed daunting. Thus, I have created this blog at 2 in the morning after getting home from a New Kids on the Block/Back Street Boys tour concert (don’t judge me to harshly: I work at a concert venue selling merch) so that should that need arise again, I have the option waiting here for me.

Some of the stuff I’ve wanted to write about in the past (and, thus, may in the future) is mostly to do with logic, computer science and set theory. I guess you could call this another atheist blog, too, since I plan on writing about certain atheist-related issues, but we’ll see what comes up.

One difference to a lot of blogs I’ve seen, I really want to dive into the nitty-gritty of the logic and math that I’m talking about here, so I suspect a lot of what I write will be explanations of classical logic, non-classical logics, introductory set theory, modal logic, etc so that I can move on to do cooler stuff that I think would be fun to talk about, such as Gödel’s theorems, epistemic logic, artificial intelligence, paraconsistent logics, and more. In fact, just today I learned about something cool called abductive programming which is a model for teaching machines how to make leaps in reasoning that might not necessarily be true (much like the way the human brain works). I also have some thoughts about how I think modelling a computer system after a brain works, but those are more on the philosophical side of things. I chose wordpress because I heard it has LaTeX support, which will make that easier to present. Thus, I can write cool things like:

\forall\Phi\varphi,\psi,\chi(\varphi\Phi\varphi\rightarrow(((\varphi\Phi\psi\wedge\varphi\Phi\chi)\rightarrow\psi\Phi\chi)\leftrightarrow((\varphi\Phi\psi\rightarrow\psi\Phi\varphi)\wedge((\varphi\Phi\psi\wedge\psi\Phi\chi)\rightarrow\varphi\Phi\chi))))

Which is supposed to be a sentence of second-order logic saying that any reflexive relation is euclidean if and only if it is both symmetric and transitive. But like I said, 2am… so I’m not going to proof read it. Even if I did, those words probably won’t mean much to you… yet!

On the atheism side, I guess I’ll just talk about whatever strikes my fancy, although one thing I’d like to lead up to is a modal logic-based refutation of Matt Slick’s transcendental argument for the existence of God. It’s too late at night for me to bother looking up links, so you can Google it if you really want. That’ll take a lot of building up to, I think.

Oh, anyways, who am I? Like I said, I’m Zach. I have a BSc in Computer Science with a minor in philosophy, where I mostly focused on logic. I live in Canada, am an atheist, and a nerd.

But more from me later…