$FV(e)$ denotes all variables which are unbound existing in$e$
$FV(true) = FV(\lambda t.\lambda f.t) = \emptyset$
$FV(false) = FV(\lambda t.\lambda f.f) = \emptyset$
$FV(\operatorname{not} e) = FV\left( (\lambda x.\lambda a.\lambda b.x\ b\ a)\ e \right) = FV(e)$
$FV(e_1 \operatorname{andalso} e_2) = FV\left( (\lambda x.\lambda y.x\ y\ false)\ e_1\ e_2 \right) = FV(e_1) \cup FV(e_2)$ the other is similar
$FV(\operatorname{if} e_1 \operatorname{then} e_2 \operatorname{else} e_3) = FV\left( (\lambda x.\lambda then.\lambda else.x\ then\ else)\ e_1\ e_2\ e_3 \right) = FV(e_1) \cup FV(e_2) \cup FV(e_3)$
for natural number:
$FV(0) = FV(\lambda f.\lambda x.x) = \emptyset$ ,$FV(1) = FV(\lambda f.\lambda x.f\ x) = \emptyset$ ,$FV(n) = FV(\lambda f.\lambda x.f^{n}\ x) = \emptyset$ for integer number:
$FV(i) = FV(\operatorname{zero}\ (\operatorname{pair}\ n_1\ n_2)) = FV(\operatorname{zero}) \cup FV(\operatorname{pair}) \cup FV(n_1) \cup FV(n_2) = \emptyset$
for integer number:
$FV(\sim e) = FV\left( (\lambda i.\operatorname{pair}\ (\operatorname{snd}\ i)\ (\operatorname{fst}\ i))\ e \right) = FV(\operatorname{pair}) \cup FV(\operatorname{fst}) \cup FV(\operatorname{snd}) \cup FV(e) = FV(e)$
for natural number:
$FV(e_1 + e_2) = FV\left( (\lambda m.\lambda n.\lambda f.\lambda x.m\ f\ (n\ f\ x))\ e_1\ e_2 \right) = FV\left( \lambda m.\lambda n.\lambda f.\lambda x.m\ f\ (n\ f\ x) \right) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ for integer number:
$FV(e_1 + e_2) = FV( (\lambda i.\lambda j.\operatorname{zero}\ \left( \operatorname{pair}\ (\operatorname{add}\ (\operatorname{fst}\ i)\ (\operatorname{fst}\ j))\ (\operatorname{add}\ (\operatorname{snd}\ i)\ (\operatorname{snd}\ j)) \right))\ e_1\ e_2 ) = FV(\operatorname{zero}) \cup FV(\operatorname{add}) \cup FV(\operatorname{pair}) \cup FV(fst) \cup FV(snd) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ the others are similar
for natural number:
$FV(e_1 < e_2) = FV\left( (\lambda m.\lambda n.\operatorname{andalso}\ (\operatorname{leq}\ m\ n)\ (\operatorname{not}\ (\operatorname{equal}\ m\ n)))\ e_1\ e_2 \right) = FV(\operatorname{andalso}) \cup FV(\operatorname{leq}) \cup FV(\operatorname{equal}) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ for integer number:
$FV(e_1 < e_2) = FV\left( (\lambda i.\lambda j.\operatorname{less}\ (\operatorname{add}\ (\operatorname{fst}\ i)\ (\operatorname{snd}\ j))\ (\operatorname{add}\ (\operatorname{snd}\ i)\ (\operatorname{fst}\ j)))\ e_1\ e_2 \right) = FV(\operatorname{less}) \cup FV(\operatorname{fst}) \cup FV(\operatorname{snd}) \cup FV(\operatorname{add}) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ the others are similar
for natural number:
$FV(e_1 = e_2) = FV\left( (\lambda m.\lambda n.\operatorname{andalso}\ (\operatorname{leq}\ m\ n)\ (\operatorname{leq}\ n\ m))\ e_1\ e_2 \right) = FV(\operatorname{andalso}) \cup FV(\operatorname{leq}) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ for integer number:
$FV(e_1 = e_2) = FV\left( (\lambda i.\lambda j.\operatorname{equal}\ (\operatorname{add}\ (\operatorname{fst}\ i)\ (\operatorname{snd}\ j))\ (\operatorname{add}\ (\operatorname{snd}\ i)\ (\operatorname{fst}\ j)))\ e_1\ e_2 \right) = FV(\operatorname{equal}) \cup FV(\operatorname{add}) \cup FV(\operatorname{fst}) \cup FV(\operatorname{snd}) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$ the others are similar
$FV(\operatorname{let} x = e_1 \operatorname{in} e_2 \operatorname{end}) = FV((\lambda x.e_2)\ e_1) = FV(e_1) \cup (FV(e_2) - {x})$
$FV((e_1, e_2)) = FV(\operatorname{pair}\ e_1\ e_2) = FV(\lambda f.\lambda s.\lambda b.b\ f\ s) \cup FV(e_1) \cup FV(e_2) = FV(e_1) \cup FV(e_2)$
unknown
unknown
$FV(\operatorname{rec} x \Rightarrow e) = FV(\operatorname{fix}\ \lambda x.e) = FV( \lambda f.\left( (\lambda x.f\ (\lambda y.x\ x\ y))\ (\lambda x.f\ (\lambda y.x\ x\ y)) \right) ) \cup FV(\lambda x.e) = FV(e) - {x}$
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
$FV(\operatorname{while} e_1 \operatorname{do} e_2) = FV(\operatorname{if} e_1 \operatorname{then} (e_2;\operatorname{while} e_1 \operatorname{do} e_2) \operatorname{else} ()) = FV(e_1) \cup FV(e_2)$
unknown
unknown
unknown
$Vars(e)$ denotes all variables existing in$e$
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
$Vars(\operatorname{let} x = e_1 \operatorname{in} e_2 \operatorname{end}) = Vars((\lambda x.e_2)\ e_1) = Vars(e_1) \cup (Vars(e_2) \cup {x})$
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
unknown
$Vars(\operatorname{while} e_1 \operatorname{do} e_2) = Vars(\operatorname{if} e_1 \operatorname{then} (e_2;\operatorname{while} e_1 \operatorname{do} e_2) \operatorname{else} ()) = Vars(e_1) \cup Vars(e_2)$
unknown
unknown
unknown