Please help! The expression to base answers off of is provided...
Requirements: Following the formal type system introduced in the Simply Typed Lambda Calculus Primer in this Topic, add pair data structure term to the language. For example, we'll use the Haskell notation of parentheses to represent our pair data structure in the Lambda Calculus. We'll use a Java like notation of a "." to represent the first (fst) and second (snd) functions. Hence, in an Applied Calculus with Boolean and Natural Number types, we might have, 1. (true, 1) (true, 1).fst> tdlue (true, 1).snd 1 Give the new syntax and value extensions (Table 1 and 3) a. Give the new evaluation rules (Table 2). Hints: you'll need to give two rules capturing the direct implementations of the fst and snd. You'll need to give four more rules capturing what it means to take a reduction step for the terms used in the fst and snd functions. Consider rules for a fully evaluated pair and partially evaluated pairs. Here's the last and most difficult the needed six rules: b. To further assist you, here's an evaluation (pay attention fo the order this evaluation/reduction takes place since the evaluation rules must force this ordering (i.e. it's like the discussion of the call-by-name vs. value associated with the Beta-reduction rule in this Topic's notes. (succ 4, if false then true else false).fst {5, if false then true else false).fst 5, false).fst Give the new typing rules (Table 4). Hint, a 2-tuple is a binary relation, whose value types can be represented with a cartesan-product Ti x T2 Hint: type the evaluation rules that form a pair, fst, and snd. c. true i false l 0 l succt l pred t l isZero t l if then t else t true I false | nu 01 succ nv ::= 7 :- nv ::= Requirements: Following the formal type system introduced in the Simply Typed Lambda Calculus Primer in this Topic, add pair data structure term to the language. For example, we'll use the Haskell notation of parentheses to represent our pair data structure in the Lambda Calculus. We'll use a Java like notation of a "." to represent the first (fst) and second (snd) functions. Hence, in an Applied Calculus with Boolean and Natural Number types, we might have, 1. (true, 1) (true, 1).fst> tdlue (true, 1).snd 1 Give the new syntax and value extensions (Table 1 and 3) a. Give the new evaluation rules (Table 2). Hints: you'll need to give two rules capturing the direct implementations of the fst and snd. You'll need to give four more rules capturing what it means to take a reduction step for the terms used in the fst and snd functions. Consider rules for a fully evaluated pair and partially evaluated pairs. Here's the last and most difficult the needed six rules: b. To further assist you, here's an evaluation (pay attention fo the order this evaluation/reduction takes place since the evaluation rules must force this ordering (i.e. it's like the discussion of the call-by-name vs. value associated with the Beta-reduction rule in this Topic's notes. (succ 4, if false then true else false).fst {5, if false then true else false).fst 5, false).fst Give the new typing rules (Table 4). Hint, a 2-tuple is a binary relation, whose value types can be represented with a cartesan-product Ti x T2 Hint: type the evaluation rules that form a pair, fst, and snd. c. true i false l 0 l succt l pred t l isZero t l if then t else t true I false | nu 01 succ nv ::= 7 :- nv ::=