AT2


Advanced Track Assignment 2

Corresponding to class 2019-10-02
Due 2019-10-05 End of Day

Instructions

You must complete all of these steps to receive credit.

  1. Download the AT2 template.

  2. Rename the file <firstname>_<lastname>_AT2.tex, filling in <firstname> and <lastname> with your first and last names, respectively.

  3. Fill in the sections marked TODO (removing the TODO markings) as directed in the assignment.

  4. Ask at least three questions about the lambda calculus, this assignment, or feedback in general (filling in the sections marked TODO).

  5. Submit both your source file, <firstname>_<lastname>_AT2.tex, and the compiled pdf <firstname>_<lastname>_AT2.pdf to this google form by 2019-10-05 End of Day.

Help

Assignment

Complete all points to the best of your ability. If you get stuck and have tried everything you can think of to get unstuck, explain your thinking, demonstrate effort and time.

  1. Convert these expressions from “mathematical” function notation (where ), to the “lambda” function notation (where ). Give both the minimally—e.g., —and fully—e.g., — parenthesized forms.

    As an example, see

    which has solution

    with code

     \begin{align*}
     \mathrm{example} &= f(x,g(y)) = \boxed{f\ x\ (g\ y)} = \boxed{((f\ x)\ (g\ y))}
     \end{align*}
    

    NOTE: for spaces in function application ( vs ): with single symbol identifiers (e.g., , as in all the problems on this assignment) it doesn’t really matter if you use spaces or not. It only matters when you have variable names that are more than one symbol, as they are in programming languages, as we’ll see, where the space is always manifested. For this assignment, therefore, you can put spaces in (as I’ve done in the example solutions), but you don’t have to. If you want to include spaces, the command is “\” (a backslash); however, you must put at least one space right after it, or it will gobble up the adjoining word (interpreting it as the name of a command), so f\x is bad, f\ x is good (and so is f \ x).

  2. Using English, describe a procedure, as clearly, concisely, and completely as you can, to determine whether a triangle in the Cartesian () coordinate plane contains the origin . You can assume that you are given the coordinates of each of the vertices of the triangle and that the values of the coordinates are real numbers.

    You can describe the procedure with the help of any standard mathematical operations on real numbers (e.g., etc). Be precise enough so that, if given concrete numbers for the coordinates, it would be clear how to compute the answer.

    For example, for coordinates

    Triangle contains the origin, while triangle does not.

    (Adapted from Problem 102 of Project Euler)