Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules, showing all steps CLEARLY, please. TYPED answer is preferred.
a) (λx. x * x) 1
b) (λx. x + 4) ((λy. y + 5) 3)
c) (λf g x. g (f x)) (λa. a * a) (λb. b + 1 + 2) 3
d) (λf x. f (f (f x))) (λb. if b then false else true) true
assume λx.R .....where R is lambda expression.
a) (λx. x * x) 1
Solution: uderline show the lambda expression
put 1 in the lambda expression
x*x = 1*1 = 1 Ans
b) (λx. x + 4) ((λy. y + 5) 3)
solution: step1:
((λy. y + 5) 3) ----> y + 5) 3) lambda expression
f(x) value is 3 in place of x....
In given expression write such as f(y) = y+3, where y = 3
so value of expression is 3+5 =8
step : now comlete expression reduced to
(λx. x + 4)8
lambda expression is (x + 4)8 so we put value 8 in place of x
step
8+4 = 12 Ans
c) Solution:
(λf g x. g (f x)) (λa. a * a) (λb. b + 1 + 2) 3
Step (λb. b + 1 + 2) 3 solve first
step
(b + 1 + 2) 3 = 3+1+2 =6
step solve (λa. a * a)6
(a * a)6 = 6*6 =36
step solve (λf g x. g (f x))36
Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules,...
1. Which of the following statement is not true regarding sales tax: a)Sales tax is a consumption tax b)Sales tax applies to the sale of certain goods and services c) Sales tax is levied at the point of sale d)Sales tax is collected by the retailer and passed on to the government e)Consumers pay sales tax directly to the state f) If a business fails to collect sales tax from a consumer, they are still responsible for paying the uncollected...