Skip to content

Commit fcefb45

Browse files
committed
fix #736
1 parent f4e1350 commit fcefb45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lec_07_other_models.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ As mentioned in [curryingsec](){.ref}, we also use the shorthand $\lambda x,y.e$
722722

723723

724724

725-
__Equivalence of λ expressions.__ As we have seen in [lambdaexptwoex](){.ref}, the rule that $(\lambda x. exp) exp'$ is equivalent to $exp[x \rightarrow exp']$ enables us to modify λ expressions and obtain simpler _equivalent form_ for them.
725+
__Equivalence of λ expressions.__ As we have seen in [lambdaexptwoex](){.ref}, the rule that $(\lambda x. exp) exp'$ is equivalent to $exp[x \rightarrow exp']$ enables us to modify λ expressions and obtain a simpler _equivalent form_ for them.
726726
Another rule that we can use is that the parameter does not matter and hence for example $\lambda y.y$ is the same as $\lambda z.z$.
727727
Together these rules define the notion of _equivalence_ of λ expressions:
728728

@@ -739,12 +739,12 @@ Hence the λ calculus naturally implies a computational model.
739739
Since in the λ calculus the inputs can themselves be functions, we need to decide in what order we evaluate an expression such as
740740

741741
$$
742-
(\lambda x.f)(\lambda y.g z) \;. \label{lambdaexpeq}
742+
(\lambda x.f)(\lambda y.g\; z) \;. \label{lambdaexpeq}
743743
$$
744744
There are two natural conventions for this:
745745

746746

747-
* _Call by name_ (aka _"lazy evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first plugging in the right-hand expression $(\lambda y.g z)$ as input to the left-hand side function, obtaining $f[x \rightarrow (\lambda y.g z)]$ and then continue from there.
747+
* _Call by name_ (aka _"lazy evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first plugging in the right-hand expression $(\lambda y.g\; z)$ as input to the left-hand side function, obtaining $f[x \rightarrow (\lambda y.g\; z)]$ and then continue from there.
748748

749749
* _Call by value_ (aka _"eager evaluation"_): We evaluate [lambdaexpeq](){.eqref} by first evaluating the right-hand side and obtaining $h=g[y \rightarrow z]$, and then plugging this into the left-hand side to obtain $f[x \rightarrow h]$.
750750

@@ -775,7 +775,7 @@ Prove that the following two expressions $e$ and $f$ are equivalent:
775775

776776
$$e = \lambda x.x$$
777777

778-
$$f = (\lambda a.(\lambda b.b)) (\lambda z.zz)$$
778+
$$f = (\lambda a.(\lambda b.b)) (\lambda z.z\; z)$$
779779

780780
:::
781781

0 commit comments

Comments
 (0)