The HoTT community is quite friendly, and produces many motivational introductions to HoTT. The [blog](https://homotopytypetheory.org/) and the HoTT book are quite helpful. However, I want to get my hands directly onto that, and am looking for a formal treatment of HoTT. Therefore this question: what's the formal definitions of the gadgets in homotopy type theory (HoTT)?


I expect an answer with absolutely no motivations and no explanations. It should define all terminologies, such as *type, term, `:`, for all, exist, identity, equivalence..* etc. It should also clarify which words are undefined. I feel like I'm almost asking for a computer program.. so if that's your answer, I'm happy to study it.



Formal definition of homotopy type theory
Here are some resources:


1. [The appendix](https://books.google.si/books?id=LkDUKMv3yp0C&lpg=PP1&dq=homotopy%20type%20theory&pg=PA417#v=onepage&q&f=false) of the homotopy type theory book gives two formal presentations of homotopy type theory.
2. Martín Escardó wrote lecture notes [Introduction to Univalent Foundations of Mathematics with Agda](https://arxiv.org/abs/1911.00580) which are at the same time written as traditional mathematics and formalized in Agda (so as formal as it gets).
3. Designed for teaching purposes is Egbert Rijke's formalization [HoTT-intro](https://github.com/EgbertRijke/HoTT-Intro) which accompanies his upcoming textbook on homotopy type theory.
4. The [HoTT library](https://github.com/HoTT/HoTT) is a formalization of homotopy type theory in Coq. Start reading in the order of files imported in [`HoTT.v`](https://github.com/HoTT/HoTT/blob/master/theories/HoTT.v).
5. The [HoTT-Agda](https://github.com/HoTT/HoTT-Agda) library is quite similar to the HoTT library, except formalized in Agda.
6. The [UniMath](https://github.com/UniMath/UniMath) library is another formalization of univalent mathematics in Coq.


