Then "Software Foundations" may be of interest:
https://www.cis.upenn.edu/~bcpierce/sf/current/index.htmlIt covers the foundation of functional languages with the simply typed lambda calculus, and also the principles of formal specifications and proofs. It's suitable for self learning, but is a significant effort so you need to have a strong interest in these topics and be ok with a very formal approach to software.