# Yusheng's Commonplace Book

Why ?
Introduction In Chapter $4$ of Nature of Computation, a brief intuition was given on why is $P \subseteq NP$, where $P$ denotes problems with polynomial time solutions and $NP$ denotes problems with polynomial time verifiers. The intuition is that a polynomial time algorithm constructing the answer can be viewed as a verifier of the problem. In this sense, the correspondence between a proof and a program is ever so clear.

Why We learned to do proofs and derivations with pen and paper. There are two problems with this method. Firstly, there will be errors and typos. Secondly, efficient preservation of handwritten materials is hard. As a programmer, a tool that helps to overcome such problems is a combination of computer algebra system (CAS) and a proof assistant. There have been mature and feature rich CAS like Mathematica and Maple.

Why Proof assistants like Coq and Lean4 are becoming more and more popular. However, there is a lack of tutorials on how to set up a Coq project. As useful a tool as they are to mathematicians in the 21st century, they are almost useless if not configured to include other's libraries. This tutorial aims to fill this gap.
Installation Guide The first step in setting up a Coq Project is to install Coq.

Why The goal is to re-implement the Pie language in OCaml. The Pie language is a dialect of Lisp written in Racket to elucidate dependent type theory in the book the Little Typer.
How As a starter, we will following the tutorial from previous blog and setup the project structure.
After setting up the project skeleton, we could use racket -l pie -i to start the Racket repl and interact with Pie through the REPL.

What's OCaml OCaml is a functional programming language. I intend to use it for recreating the Pie programming language in the book the Little Typer. This post will serve as a learning note for OCaml based on the course CS3110.
Meaning of Name It means Objective categorical abstract machine langauge. ML part in the name originates from the famous Meta Language which is created for making a proof assistant.

Why This brief note serves to record project management tools and precedures for creating OCaml projects.
How Package Management The most important aspect of open-source development is for your code to be published and utilized by other users. In order to do that, it is essential to have a replicable environment and clean project structure. The PkgTemplates.jl is a Julia package for creating new Julia packages.