TITLE: What makes dependent type theory more suitable than set theory for proof assistants?
QUESTION [138 upvotes]: In his talk, The Future of Mathematics, Dr. Kevin Buzzard states that Lean is the only existing proof assistant suitable for formalizing all of math. In the Q&A part of the talk (at 1:00:00) he justifies this as follows:

Automation is very difficult with set theory
Simple type theory is too simple
Univalent type theory hasn't been successful in proof assistants

My question is about the first of these: Why is automation very difficult with set theory (compared to dependent type theory)?

REPLY [7 votes]: I'll answer just the automation question since the other answers gave nice broad overview, but didn't seem focus on that narrow question.  My own direct automation experience is wrt to ACL2, Lean and SMT-based solvers.
Strictly speaking, I don't know if there's any foundational argument for why set theory would be better or worse than the type theory-based approach in Lean.
The strengths that Lean have from my perspective are: an expressive explicit type system, a relatively simple core language for representing terms, and a attention to how terms are represented for efficient manipulation.
With regards to typed core logics, most automation in theorem provers is tailored to specific common theories that are widely used in mathematics.  When writing such automation, it is important to know the types and operations involved.  For example, in writing a decision procedure for linear arithmetic in an untyped language, one needs to carefully check that any transformations still make sense even if the expressions do not denote numbers.  By having a typed and typechecked expression language, one gets from the theorem prover itself and does not have to pay the additional runtime and complexity costs.
A second strength of Lean is ensuring that the core language is simple, but expressive so that one can represent proofs compactly.  When using automation such as SMT solvers, the "proof terms" generated as evidence can be very large and the core proof language needs to be designed to compactly represent proofs while still be amenably to efficient checking.  I'm not sure if Lean has an advantage to Coq or other solvers here per se but it is a factor in Lean's design.
A third strength of Lean is that the language for writing tactics and creating definitions and theorems are one and the same.  There is a bit of syntactic sugar for the tactic sequences and a tactic-specific library, but by having the same language one does not have to learn multiple languages just to get started writing tactics.  Lean is also not unique here -- ACL2 is similar, but it is a strength of Lean still.  It will also become even more relevant with Lean 4 thanks to the efficient compiler being developed.