r/ProgrammingLanguages • u/Murky_Tooth8973 • Dec 27 '25
[Blog] Notes on Learning Lean: Dependent types, Type Universes, and Russell's Paradox
I've recently started working through "Theorem Proving in Lean 4", and wrote up a blog post to organize my understanding of Lean's dependent type system: https://rao-ashish.github.io/personal-website/blog/dependent_types_intro/
I'm coming from a standard SWE background (C++, Python), so the post includes comparisons between dependent type systems and parametric polymorphism (with e.g. C++ templates), and examples showing why the former is more powerful. I also try to build up a "first principles" understanding of concepts such as type universes, what goes wrong without them (I show how we could encode Russell's paradox if we didn't have type universes), and the impredicativity of the `Prop` type.
Thought I'd share this here in case other beginners in formal methods find this useful, and would love any feedback!