_index.org

type theory

Last edited: August 8, 2025

type theory was originally aimed creating a basis of all of mathematics. it got out-competed in math by set theory. it formalizes…

  1. programs
  2. propositions (types)
  3. proofs that programs satisfies these propositions

and does so in one system.

key features

  • it creates an isomorphism between programs/types with proofs/propositions
  • it creates a hierarchy which allows defining types, type operations, proofs into the same system at different levels
  • it allows possibly-undecidable expressive dependent types to be constructed

musing

  • this is a foundation of mathematics, and in particular constructive mathematics
  • its pretty powerful to prove anything we want to prove—so can be used to verify the correctness of all sofware

properties of type systems

type stratification

Consider a type of all types Type,

typing

Last edited: August 8, 2025

what is a type? a type is a set of values.

consider

List[Int]; importantly, List is not a type; its a “type constructor” which takes a type as input (Int) and gives you as type as output List[int].

-> is another “type constructor”; its a type constructor written in infix notation. It takes two arguments, it constructs a type for set of functions which takes an integer as input and maps it to another integer Int -> Int

u1.c

Last edited: August 8, 2025

unbiased parameter learning

Last edited: August 8, 2025

If you are given the problem, you can learn the parameters by just computing them. For instance, to estimate the parameters of a gaussian, we can compute the mean and variance and shove it in.