LMU ☀️ CMSI 585
PROGRAMMING LANGUAGE FOUNDATIONS
Midterm

Answer as many questions as you can.

  1. Write (in the logic notation used in this class) an encoding of “Everyone in Tanya’s class is more likely to pass the midterm if they know Type Theory”. Context: Tanya is a student and is only taking one class right now. “Everyone” means Tanya and her classmates.
  2. A logical system has three parts. Choose the best description for the three parts:
    $\bigcirc$ syntax, axioms, inference rules
    $\bigcirc$ axioms, inference rules, theorems
    $\bigcirc$ alphabet, grammar, inference rules
    $\bigcirc$ symbols, models, inference rules
    $\bigcirc$ syntax, semantics, inference rules
    $\bigcirc$ symbols, axioms, models
  3. Which of the following are accurate descriptions of 5 pentated to 2?
    $\Box$ 25
    $\Box$ A power tower of five 2s
    $\Box$ A number that would take weeks to write out by hand
    $\Box$ $5\uparrow\uparrow 5\uparrow\uparrow 5\uparrow\uparrow 5\uparrow\uparrow 5$
    $\Box$ $5^{5^{5^{5^5}}}$
  4. Let $R = \{ (1,2), (2,1), (3,3) \}$. What is $R^2$ assuming (a) $R$ is just a regular set, and (b) $R$ is a relation?
  5. Write the cond function in lambda notation.
  6. Match the people on the left with something they are known for on the right.
      Bertrand Russell          Entscheidungsproblem
      Abraham Fränkel           Replacement
      Ernst Zermelo             Lambda Calculus
      David Hilbert             A letter to Frege
      Ada Lovelace              Bernoulli Numbers Program
      Alonzo Church             Infinities
      Georg Cantor              Axiomatizing Set Theory
    
  7. Match the Set Theory axioms with their intent.
      Foundation                You can combine two sets
      Extensionality            Set of all subsets is a set
      Pairing                   The natural numbers comprise a set
      Union                     You can make a set by filtering
      Power Set                 No self-containing sets
      Replacement               Set of all members' images under a function
      Infinity                  All the elements of the elements are a set
      Choice                    Set with one element from each member
      Separation                What equality means
    
  8. How is the list $[1,2,3]$ encoded in ZFC?
  9. Give an inductive definition for a type which we will call Propositional Logic Formulas, or $\textsf{PLF}$. PLF’s are either constants, variables, not-expressions, and-expressions, or-expressions, or material implication expressions. You should be able to take it from here.
  10. What are the inhabitants of the type $\textsf{Bool}\to\textsf{Bool}$? Write them out precisely.