 So, we are going over lambda calculus, so we have some questions that we're talking about how to parse these lambda calculus expressions, so it really goes back to the disambiguation rules. So, these are something that you have to study and then you have to look at and do the transformations and do the disambiguation until you don't feel like you have to do them anymore, if that makes sense. And you can use all the examples that we have in the slides and the examples you find online. So there's two core things, two core disambiguation rules. When we see A, B, C, D, whatever, E, a series of applications, just like when we have maybe if we have A plus D plus C plus D plus E, right, we can have arbitrary mathematical operations but we need to know what happens first, right, I mean the computer has to execute something. So one way to solve that is you just say what happens first, so and that's left associativity, so that would be here we'd say we first do A plus B, the result of that we're going to add to C, the result of that we're going to add to D and then finally the result of that we add to D, right, so that's just left associativity, that's the general what that is, it's just one strategy of disambiguation but that is the strategy we are using for when we have in what would look like an ambiguous sequence of applications. So now when we disambiguate this, what this means is, right, because there's multiple ways we can parse this, well this A and B application is going to happen first and then the result of that, C will be applied to the result of that and the result of that will be applied to D and the result of that will be applied to E, which is kind of cool, right, and so this way there's no ambiguity, we know this happens first and the result of that is applied to that, the result of that is applied to this, the result of that is applied to that, that's just something you got to get in your bones, practice, exactly, cool. So for instance in this example we have an instance of this, where is it, well the first one would that be A and B, right, yes so we have here we have A, B and C, we have applications here, so we know from this rule that if we wanted to add parentheses to disambiguate this, we would first apply B to A and then apply the result of that to C, so that's how we would parse that. Now the next thing that's ambiguous is, so we have this, lambda x dot xy, does this mean lambda x dot x and y, so we have an application of y to lambda x dot x or does it mean lambda x dot xy, where xy is the body of this abstraction? It is going to be based on our rules, right, but this is kind of an arbitrary thing. We have defined it that yes, whatever we see this, you can think of this dot extends all the way as far as possible and we could put parentheses around there. Now the tricky thing is if we look at an example like this, we have lambda x dot x applied to y, right, if we're trying to extend the dot as far as possible, we can't extend it outside of this parentheses, this parentheses forces us to parse this as one unit, right, so we can't say that well this is actually the body of this abstraction because that doesn't make sense, we can't force it to go outside of there, so you know this is already not ambiguous but we would add parentheses around there because we're saying this is the body of this abstraction. But if it was split up like that, in my case, that would be just basically saying that you take y into the value, you replace the x with y? Yes, yes, that's when we're getting the computation, but the first step of that is really being able to disambiguate these things because on the exam or on homework or anything, if you don't understand the, if you don't parse the lambda expression the same way that we're parsing in class, you're gonna have problems or even if you do it correctly, but the result that you write is not correct based on our disambiguation rules and that's not right. So you want to save yourself from that. So, now we have this case where we have ABC, right, we have three function applications, right, and so here we'd say okay by this rule, this, the body of this abstraction is gonna extend as far as it can and the body of this abstraction is gonna extend as far as it can and the body of this abstraction is gonna extend as far as it can and that would be our disambiguation rules. Okay, because what I did was I put the parentheses around the A, is that not correct? Around here? After before the lambda, so. Oh, around this whole thing? Yeah. Yeah, you can, that's fine. That doesn't really change or hurt anything. It can be, that would be super important if there was something out here, right? If there's something out here, this means you're applying 10 to this, which means you're gonna end up replacing A in here with 10, but this means that this is part of that body, this ABC, so this 10 should be there, right? So this means this body goes all the way out to here, actually it wouldn't be part of there, it would be part of here, right? So this body would be here, because this, so this would try to extend as far as it can, it would only be able to get, I can't count all the things, but if we redid this, it would go only so far, right? This would get stopped, this would get stopped, but we go to here, this goes all the way, and so this is the body of A, this lambda A. So this one to be clear, so with the lambda C as far as you can go is the last proof in C by that C, right? Yes. And then the B can go all the way to the, that the lambda C's parentheses we just set up. Yes. And then the same thing with A. Because we have these, these in place. I got you. If we got rid of all of these, they would all extend, this would extend all the way over. I got you. Right, so if we have lambda A dot lambda B dot lambda C dot ABC 10, right? This would go here, this would go here, this would go here, and this whole thing is the body, right? And we got boom, boom, boom. I got you. So it just depends on how it's, how it's set up. Yes. So if we have the disambiguous, we have to do the best we can, if it was something like that. Yes. It's just practice. I think that's the main thing, it's practicing this thing. Yeah. So you get familiar with it. Cool. Let me kill this.