This repo is a library of Lean formalizations of theoretical foundations of AI and ML. We explicitly allow and encourage AI-generated / AI-assisted proofs, with the following quality assurance:
- The formal theorem statements (in directory
ArtificialTheoremsSpec/) are vetted by human experts. - The proofs (in
ArtificialTheorems/) are checked using secure verifiers (Comparator, SafeVerify) to ensure that they prove exactly the statements inArtificalTheoremsSpec/
To verify that the proofs match their specifications, run:
./scripts/verify.shThis script:
- Builds both
ArtificialTheoremsandArtificialTheoremsSpec - Runs
lean4checkeron all implementation modules to validate the olean files - Runs
safe_verifyon each spec/impl pair to ensure the implementations match their specifications exactly
All checks must pass for the proofs to be considered valid.
Contributions are appreciated! Both formal theorem statements vetted by human experts, and autoformalizations of proofs. I am particularly interested in these areas:
- Universal representation theorems for deep neural nets
- Generalization theory
- A recent Lean formalization of generalization error bound by Radmacher complexity: https://github.com/auto-res/lean-rademacher
- Implicit regularization (how training via SGD can achieve generalization)
- RL theory
- A recent Lean formalization of convergence of Q-Learning: https://github.com/ShangtongZhang/rl-theory-in-lean
- Bayesian learning; and perhaps building on top of that, Singular Learning Theory.