Learning Objectives
With this assignment you will demonstrate:
- Your ability to write a simple function in a new programming language
- The ability to work with formal logic
- An understanding of some metalogical concepts
- The ability to work with mathematical operators you don’t see in high school
Readings and Videos
Please:
Optionally you can scan through these slides by Gabriel Robins, though his notation is different from mine, and for fun read Who can name the bigger number by Scott Aaronson.
Submission Instructions
Submit your work in a single beautiful PDF uploaded to BrightSpace. Please do not submit photos of handwritten answers; you need to take pride in your work. Take the time to learn LaTeX. Graduate-level computer science work pretty much demands it.
You may use Generative AI for this assignment. However, you must clean up its output when it does not align with the notation and terminology used in this course. Also please remove all of the silly sycophantic and other silly language it might generate. Your job is to turn in professional, polished work that reflects your understanding.
On the PDF, include your name along with the list of which of the assigned readings were done. For each reading, mark it skimmed, read, or did-not-do. Then include answers to the following:
-
On the
course notes page entitled “The Study of Programming Languages”
we saw a function written in several programming languages. Write this function in a language
not on this list.
-
In the Theories of Computer Science lecture we saw
how to express the odd-number test in Lambda Calculus notation, Lisp, Python, JavaScript, Java,
Ruby, Clojure, Swift, and Rust. Show how, in each of these notations or languages, to express a
function to cube a number. Add Kotlin, Go, and Haskell. (Research may be required.)
-
Translate the following sentences into logical notation.
- Your best friend must help you out of every jam.
- It is not okay to lie.
- You are allowed to not believe that everyone is telling the truth.
- If you know what is on the test, you will probably get a good score.
- Juliet once believed that Socrates was real, but no longer does.
- Everyone who attended Lollapalooza in 2025 was more likely to have a good time if they took public transportation or carpooled.
- No one knows if Goldbach’s Conjecture is true.
- Tanya wrote her book about logic swiftly and eloquently.
- The set of all rational numbers less than $\sqrt{2}$ has no greatest element.
- Romeo doesn’t know that he is doomed.
- Evaluate each of the following. As always, be careful about parentheses and variable renaming:
- $(P\,x)[x \mapsto y]$
- $(P\,x)[x \mapsto f\,x]$
- $(\forall x. P\,x\,y)[x \mapsto y]$
- $(\forall y. P\,x\,y)[x \mapsto y]$
- $(x \land \exists x. P\,x)[x \mapsto y]$
- $(\forall x. \exists y. P\,x\,y)[x \mapsto y]$
- $(\forall x. \exists y. P\,(f\,x\,y))[x \mapsto f\,y]$
- $(\forall f. \exists y. P\,(f\,x\,y))[x \mapsto f\,y]$
- Write judgments for the following:
- Truth is necessarily true.
- Assuming that Mercury is in retrograde, it is possible that you will have a bad day.
- Something is good assuming not everything is bad.
- Assuming $x$ has type integer and $y$ has type natural, then $\frac{x}{y+1}$ has type rational.
- What is this logical argument stating, in plain English?
$$
\frac{\forall P.\,P \supset \lozenge \mathscr{K}P}{\Box \mathscr{K}P}
$$
- Complete the following truth table for a three-valued logic, assuming your goal is falsity-avoidance.
| $A$ | $B$ | $\;\;\neg A\;\;$ | $\;\;\neg B\;\;$ | $A \land B$ | $A \lor B$ | $A \supset B$ | $A \equiv B$ |
| true | true | | | | | | |
| true | false | | | | | | |
| true | other | | | | | | |
| false | true | | | | | | |
| false | false | | | | | | |
| false | other | | | | | | |
| other | true | | | | | | |
| other | false | | | | | | |
| other | other | | | | | | |
-
Simplify each of the following as much as possible without introducing any roundoff errors. Your simplified expressions must still be exact:
- $3 \uparrow \uparrow 2$
- $2 \uparrow \uparrow \uparrow 3$
- $790912853^{3892359} \;\mathtt{mod}\; 90277$
- $(3 + 2i - 8k) \times (8i + 2j -k)$ (quaternion multiplication)
- $\log_8{2^{333333333}}$
- What is Graham’s number and at what timestamp can you find it in the 10 hour video on the Math Foundations page?
- List the ordinals from the Vsauce video in “increasing order”.