quot;. Now in natural language, "if then" is used in lots of ways. In standard logic it's only used in one specific way, which is that $A \rightarrow B$ can only be false in the specific case when $A$ is true and $B$ is false. In all other situations we say $A \rightarrow B$ is true. 1: So if $A$ and $B$ are both false then $A \rightarrow B$ is true? 0: Yep. Feels a bit weird at first but it doesn't cause too many problems. Plus, the other ways of defining the conditional are a bit of a rabbit hole, and they're not relevant for us here. If you're curious, look up "Material conditional" and poke around for any mention of alternative definitions. For now, that's implication. 1: Got it. What's next? 0: - $\land$ : The "AND" symbol. You can guess when $A \land B$ is true and when it's not. There's no philosophical subtlety to and. 1: Thank god. 0: - $\lor$ : The "OR" symbol. $A \lor B$ is only false when both $A$ and $B$ are false. In all other cases, whether one or the other or both are true, then $A \lor B$ is true. 1: Ok I know I asked for this, but I'm starting to realize I already know this stuff. 0: Do you? 1: Boolean logic? I'd sure hope so. I'm a professional devel--- 0: So no philosophical subtlety to "OR" either? 1: Zero c'mon, let's keep moving. 0: I was about to keep moving, but since you're sure you understand OR--- 1: _I UNDERSTAND OR!_ ## Constructive Criticism ### Or: OR 0: Exactly. But it turns out there are some questions I have, questions that are related to Church's thesis (the PhD one) and also to the axiom of choice. But my questions are more basic than that. Just some simple questions about "or." So since you're sure you understand "or," then maybe you can teach me some things about which I'm not sure. 1: Is this a game? 0: No, I'm serious. 1: I don't believe you. 0: Ok so, for any sentence $A$, is the following always true? $A \lor \lnot A$ 1: Is this a trick? 0: Not a trick. 1: And these are booleans? 0: Let's call them "propositions." 1: Is that a fancy word for boolean? 0: Sort of. A proposition is a bit more like a pre-boolean. 1: Wtf is a "pre-boolean"? 0: I mean $A$ is a sentence that can either be true or false, and it can't be half-true and half-false. 1: How is that not a boolean? 0: Well, suppose we don't know its value. 1: So we know $A$ is of type $Bool$, but we don't know its value? 0: Basically. 1: Zero that's a boolean, don't be stupid. 0: I'm trying as hard as I can not to be stupid, but I'm still not convinced it's a boolean. 1: You said this wasn't a game. 0: It's not! 1: Then what's your hang-up? 0: Well look, we're programmers, and if we were programming in a typical language, I'd have zero hang-ups and no worries. 1: So how is this different? 0: This is mathematics. 1: Fair. I mean I'm as convinced as ever that mathematics is a bit wacky. But how is OR tripping you up exactly? 0: Not OR per se. Just this: $A \lor \lnot A$ 1: So you're fine with that sentence in programming? 0: Of course. 1: How is that sentence any different in math? 0: Well, I have a strange feeling that it requires... how can I put this... omniscience. 1: Omniscience?! 0: Omniscience. And I'm not god, so I'm not sure I can handle it. 1: Is this just an excuse to bring up bible stuff again? 0: Not at all. 1: Then explain why you're being weird. 0: Suppose I hand you a sequence $a_n$ of natural numbers. For simplicity, let's say they're all $0$ and $1$. 1: Define your terms so I know this isn't a trick. 0: I just mean a function from $\mathbb{N}$ to $\{0, 1\}$. 1: I get the idea but I need more details because I'm assuming this is a trick. 0: Ok, good point. Math terminology is nowhere near precise enough to explain what information you actually have and don't have. Let's be precise. Imagine it's a python generator. 1: Ok. 0: And further, imagine I don't give you the source code to the generator. 1: What do I get? 0: All I give you is the ability to call `next()` on the generator. 1: Ok, how's this related to the thing where you're pretending not to understand "OR"? 0: Well, I've been thinking about what happens when $A$ is a sentence like this: > $A$ = The python generator I just handed you always yields $0$, and will never yield $1$, no matter how many times you call `next()`. or equivalently > $A$ = The sequence $a_n$ is always zero. or equivalently $A \; \equiv \; \forall n \in \mathbb{N}, \; a_n = 0$ 1: What's your problem with that sentence? 0: Nothing. My problem is with this sentence: $A \lor \lnot A$ 1: You have a problem with the sentence "A or not A"? 0: Not for all sentences. Just for sentences like that one. 1: I'm still not following. 0: Ok, suppose you think $A$ is false, and I think it's true. How would you convince me you're right? 1: $A$ being false means what again? 0: $A$ being false means that eventually the generator will spit out a $1$. 1: Well obviously in that case I'd just keep calling `next()` until I got a $1$. Then I'd show you the $1$ and that would prove I was right. 0: Good point. What about the other case? Like what if our beliefs were swapped, but you were still right? 1: You mean what if I think $A$ is true, and you think $A$ is false? 0: Right. 1: And $A$ is actually true, so I'm right? 0: Right. How would you convince me then? 1: _(Looking back over the definitions.)_ Ok so if $A$ is true then the sequence is always zero. Or the generator keeps yielding zero whenever I call `next()`. 0: But I don't believe that. 1: Right. And I do. 0: I need to be convinced. 1: And I don't. But I'm right. 0: Right. 1: So what's the question? 0: How would you convince me? 1: I don't know. 0: Well I've given you an awful lot to work with. 1: Have you? 0: Absolutely? I've been more than generous here. We've assumed that you're _actually_ correct and I'm incorrect. We've assumed that $A$ will always return $0$ no matter how many times we call `next()` to see what the next number in the sequence is. And we've assumed you believe that. And we've assumed I don't believe that. I'm just some ignoramus who has trouble with "OR", at least in this particular manifestation. Surely that's more than enough for a proof that I'm wrong. 1: I'm having trouble, can you give me a hint? 0: No. 1: Zerooo. 0: I'm not in a position to offer hints. I'm the confused one here. Plus I'm also incorrect. And worst of all, I'm finite. That's what I was saying before about $A \lor \lnot A$. 1: What's what you were saying before about $A \lor \lnot A$? 0: Omniscience. I'm not god, so I'm not sure I can handle it. And I'm not sure you can handle it either. 1: What does not being god have to do with $A \lor \lnot A$? 0: Well not in every case, but at least in the case of our sequence above, I'm not sure how you'll ever convince me. 1: Are you being dense on purpose? 0: No, I'm being a mathematician. But that's a fair point. If I was being a programmer, or a statistician, or a normal human being, I'd definitely be more and more convinced as we saw more zeros and gathered more evidence. But if I'm being a mathematician, then I would object and say no amount of evidence counts as a proof. 1: Ok I'm not sure what just happened, but I feel like it's more about the sequence being infinnite than it is about "OR". 0: In mathematics, those are the same thing. 1: HOW ARE THOSE THE SAME THING? 0: Well if you tell me you believe the statement: $A \lor \lnot A$ is always true, for any well-formed mathematical sentence $A$, then all I'll say is that a very large fraction of all mathematical sentences that $A$ might stand for, when unwrapped, look something like $\forall x P(x)$. 1: So? 0: And if that $\forall$ is quantifying over an infinite set, which (again) is the case for a very large fraction of all mathematical sentences, then I'm just saying I'm not sure how I feel about the claim that $A \lor \lnot A$ 1: Ok well even if convincing a skeptic works different in the two cases above, the sentence's possible truth values are still just booleans right? 0: I'd call them propositions. 1: What was the point of calling them propositions again? 0: I just felt that they're a bit more like pre-booleans. 1: I don't understand the distinction. 0: Well if they were booleans, then as a programmer, you should be able to write code like this: ```python if A: do thing 1 else: do thing 0 ``` 1: Why can't I write code like that? 0: Well, we've assumed A is true, correct? 1: Right. 0: But you don't have the source code to the generator $a_n$. 1: I wasn't super clear on the reason for that assumption. 0: I mean you can't do some fancy static analysis or metaprogramming or introspection to determine how the code for $a_n$ works from the outside. You can only run $a_n$ and use its outputs to determine the truth value of the (pre-)boolean $A$. 1: I still think "pre-boolean" in an unnecessary term. 0: Ok, then, tell me what happens in the code block above. 1: This one? ```python if A: do thing 1 else: do thing 0 ``` 0: Right. 1: Well if we call `next()` in a loop and eventually get a $1$, then we know $A$ is false, so we take the `else` branch and do thing 0. 0: Right. 1: And if we never get a $1$, then we take the `if` branch and do thing 1. 0: So you never do thing 1. 1: Why? 0: Because you never get a 1. 1: Oh Christ, I feel dumb. I see the problem now. 0: Don't. Most mathematicians agree. 1: I must be getting sick or something. Why didn't I see the problem before? Agree with what? 0: That there's absolutely no problem with the statement $A \lor \lnot A$ under any circumstances. 1: There's OBVIOUSLY a problem! 0: Obviously? Just two minutes ago you were arguing there wasn't. 1: Sure but I had the wrong mental model. 0: How so? 1: I assumed that because these sentence things were boolean valued that they were... well... booleans. 0: Aren't they? 1: Yes! But not yet. 0: Yet? Is their type a function of time? 1: No! But I mean if your sentence is about an infinite set and you don't have the source code, or if you don't have any information that lets you reduce it to something simpler, or just in the general case I guess, if your sentence says "For all x" and you have to evaluate that boolean by checking all the x, then even if your sentence is true, you can't take the "true" code path. 0: Is it always a problem with "For all" type sentences. 1: I think so. The branch that worked was when a "1" existed somewhere in the sequence. If it exists we can find it, so we can eventually take that branch. 0: What about situations like this? Suppose A is the sentence "There exists a 1 in this sequence", or equivalently, "This generator will eventually yield 1. 1: Isn't that the first example up above? The one that didn't have problems? 0: Right, same example. 1: So what's the problem? 0: I want to write this code: ```python if A: do thing 1 else: do thing 0 ``` 1: Are we assuming A is true or false? 0: Do both cases. 1: Ok if A is true, then there's a 1 in the sequence eventually, so eventually we find it, and then A turns from a pre-boolean to a boolean and we can take the first branch and do thing 1. 0: You're using the term pre-boolean now? 1: I understand the problem now. 0: Great. Then you can do case two. 1: Ok if A is false, then there doesn't exist a 1 in the sequence, so we're back in the case of all zeros, and the pre-boolean never becomes a boolean and we can never take branch two. Damn this is a serious problem. How did I not see this before? 0: Now that you get the idea, mind summarizing it for me? 1: Ok so... - Both "For all" sentences and "There exists" sentences have a good path and a bad path. - The good path of "For all" sentences occurs when they're false. - The good path of "There exists" sentences occurs when they're true. - The bad path of "For all" sentences occurs when they're true. - The bad path of "There exists" sentences occurs when they're false. - The good path is always executable, whether the domain is finite or infinite, no matter how much information we have about the domain being quantified over. - The bad path _may_ be executable in certain highly structured special cases when we have enough information to infer something about the whole domain at once. - If we have enough information that we can handle a "For all" sentence when it's true, or a "There exists" sentence when it's false, then we can use something like a "proof" to make the bad path executable. - In all other cases, the only way to turn these propositions into booleans is to use the information we have. - In those cases, if we only have finite means at our disposal, like checking values and iterating, then bad paths are bad, and generally will not be executable. - In other words, whenever we can't reduce a statement about an infinite set to a finite sequence of steps, "For all" statements require omniscience to execute when they're true, and "There exists" statements require omniscience to execute when they're false. 0: _(Applause)_ 1: Is that sarcastic applause? 0: No! That was fantastic. 1: I forget how we got here. 0: You said you understand "OR." 1: Jesus. I'm never gonna say I understand anything ever again. 0: Please do! You understand a lot. 1: Where were we? 0: We were covering this: ![[friedman-1997-the-formalization-of-mathematics-13.png]] 1: We're still on this? 0: It's ok, let's be quick. So ZFC has "not", "implies", "and", "or" 1: I'm now traumatized by "or". 0: It's also got "If and only if" which is just two "implies" in opposite directions with an "and" between them. Then it's got variables. It's for "For all" and "There exists." 1: With one bad path each. 0: It's got a set membership symbol $\in$ so we can say $this \in that$ to mean "this" is an element of "that", and it's got an equals sign that we use to mean "these two sets have the same elements." 1: That's it? 0: Well that's the language. On top of that there's ZFC. 1: I thought this was ZFC. 0: That's the language of ZFC. The theory of ZFC is all that, plus ten commandments. ![[friedman-1997-the-formalization-of-mathematics-14.png]] ![[friedman-1997-the-formalization-of-mathematics-15.png]] 1: That was nine. 0: Hard problems of computing. Off by one errors. There's usually ten. 1: What does it mean up there where it says "infinitely many axioms"? 0: Those are sentences that can't actually be expressed in the language of ZFC. 1: What? Why not? 0: See how Axiom 3 and Axiom 7 say "For any formula in our language"? 1: Yeah. 0: Well the language of ZFC can't quantify over sentences in ZFC. 1: What does that mean? 0: It can only say "For all x" and "There exists x" when x is a set. It can't say "For all sentences" or "There exists a sentence." 1: Ok. But Axioms 3 and 7 aren't talking about sentences, they're talking about formulas. What's a formula? 0: A sentence. 1: WHAT?! 0: Right. ZFC can't say "For all sentences." But the mathematicians want to say that anyway. And they don't want to change the language to give it quantifiers that range over sentences. So instead they just sort of cheat and squeeze these two axioms into a language that can't express them by saying "We'll add infinitely many axioms for Axiom 3, one for each possible formula in the language." Then for Axiom 7 they do the same thing and add another infinity of axioms again. 1: Math is completely unhinged. 0: In this case it's not technically that bad. It's not too different from if they had implemented a parser that could parse valid formulas of ZFC. Then for any of the infinitely many axioms above, they could have the parser tell you whether or not a given sentence was an axiom that was talking about some specific formula using the axiom schema of 3 or 7. 1: Did they implement that parser? 0: No. But they imagine they could. 1: This makes me dizzy. 0: Well you asked to see the details of ZFC. 1: Nevermind, let's go back and talk about something else. 0: Ok so, the mathematicians' experience with ZFC is pretty similar to yours. They don't really like it. They don't really like talking about it. And they REALLY don't like working within it. 1: So why do they call it foundations? 0: Because they don't really like talking about foundations either. 1: Rock and a hard place. 0: So because of that, ZFC sort of ended up as an impotent figurehead type of ruler. 1: Impotent figure what? 0: Like a king with no power. Everyone points to ZFC and says "That's the foundations," but no one likes it, no one uses it, and it's basically just been sitting there for a century plus with a big crown on that says "I'm the foundations of mathematics and mathematics is the foundation of everything." Like this guy from the memes. ![[theoden-is-zfc.jpg]] 1: Damn, that sucks. 0: Fortunately that's been changing recently though. 1: How so? 0: We'll get there eventually. For now, pop the stack back to the Hirst book. Because mathematicians don't like ZFC, they tend to talk about it rather than working within it. Like this: ![[zfc-hirst-04.jpg]] 0: Feels like normal math right? 1: I guess? Not really sure. 0: That's the point. It's mostly words. Here's another example. ![[zfc-hirst-02.jpg]] 1: "We could"? 0: Yep. That's the standard mathematical approach to ZFC. They're not actually working inside the formal system. They're just sort of writing pseudo-code and English that talks about what the proof would be like if we actually did it. They call it "foundations," but they basically always keep it at arms length. Even the logicians and set theorists. There are a few solid exceptions though. For example: ![[zfc-hirst-03.jpg]] 0: Mendelson and Kleene. They do the formal stuff. 1: Who are they? 0: Mendelson is the book we saw earlier in /opt/art. 1: No way! The bit with the "hell code"? 0: Exactly. That's Mendelson's _Introduction to Mathematical Logic_. It's a pretty approachable introduction to the actually formal side of foundations. 1: The second book sounds fun! 0: The Kleene one? 1: Yeah! Is that the same Kleene? 0: Same guy! Why does it sound fun? 1:I mean if that "hell code" book was the easy one, I can't imagine what the one for "readers with a frighteningly technical bent" is like. Makes me want to read it. ![[zfc-hirst-06.jpg]] 0: Yeah Kleene's book is pretty great. 1: What's it actually called? 0: This: ![[zfc-hirst-15.jpg]] 1: What's so frightening about it? 0: It's code. 1: What's so frightening about code? 0: I mean, the book is from 1952, based on work from the 1930s and 1940s. So there's no "computer code" in there in the usual sense. 1: So how's it code? 0: Because Kleene doesn't skip steps or hand-wave or say "it can be shown." He works inside the formal system. He adds a ton of documentation -- English explanations of what's happening -- but the way he behaves as the author of that book is exactly how you'd behave if you were a programmer. 1: I am a programme--- 0: I know. But that's an extremely unusual way to behave in a math book, when you're the author. I mean he behaves as if everything he claims actually has to be implemented. He doesn't write as if he's trying to convince a human mind where you can just handwave or say "obviously" or "exercise for the reader." He writes as if he's trying to convince a machine, and then documenting heavily so humans can read the code too. Kleene was pretty clearly the first programmer. 1: Wait, I thought the first programmer was Church and Gödel and Turing? 0: Exactly. They're the first. And Kleene is the glue. Like this. $3 = \{ 0, 1, 2 \}$ 1: Do you try to be confusing on purpose? 0: What's confusing about that? 1: Everything? 0: Ok so, in Cantor's set theory, the number N is defined to be the set of all the natural numbers less than it. So 3 is the set containing 0, 1, and 2. 1: That's weird. But ok. 0: And Kleene is the curly braces and commas. The bits that hold it all together and make the set be one thing. He's the glue. 1: That feels like a stretch. 0: It's not. 1: Anyways, can we read some of that book? 0: Not yet. We'll get to the bible eventually. 1: What? I didn't ask for more bible, I asked for the frighteningly technical book! ![[zfc-hirst-14.jpg]] 0: Oh sorry forgot to explain. The "frighteningly technical" book is also called Kleene's Blue Bible. 1: Oh ok. I'm down for that kind of bible. Can we read some now? 0: Nah, we're still at Church. 1: _(Looks back through the conversation.)_ I thought that book was by Jeff Hirst. 0: Right, this one is. But this situation has been going on since Church. 1: So? 0: So we're still talking about Church. 1: We haven't talked about Church in a while. 0: This is all about Church. 1: Are you sure this wasn't just a long digression? 0: I never digress. 1: I don't believe you. 0: I promise. We just need a reverse begat list to tie it back to Church. 1: What's a reverse begat list? goto: [[3 - Church's Descendants]]