๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Gentle Introduction to Dependent Types with Idris

โœ Scribed by Boro Sitnikovski


Publisher
CreateSpace Independent Publishing Platform
Year
2018
Tongue
English
Leaves
130
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Dependent types are a powerful concept that allows us to write proof-carrying code. Idris is a programming language that supports dependent types. We will learn about the mathematical foundations, and then write correct software and mathematically prove properties about it.This book aims to be accessible to novices that have no prior experience beyond high school mathematics. Thus, this book is designed to be self-contained.The first part of this book serves as an introduction to the theory behind Idris, while the second part is a practical introduction to Idris with examples.

โœฆ Table of Contents


Table of Contents
Preface and acknowledgments
Introduction
1. Formal systems
1.1. MU puzzle example
2. Classical mathematical logic
2.1. Hierarchy of mathematical logic and definitions
2.1.1. Propositional logic
2.1.2. First-order logic
2.1.3. Higher-order logic
2.2. Set theory abstractions
2.3. Substitution and mathematical proofs
2.3.1. Proofs by truth tables
2.3.2. Three-column proofs
2.3.3. Formal proofs
2.3.4. Mathematical induction
3. Type theory
3.1. Lambda calculus
3.1.1. Term reduction
3.2. Lambda calculus with types
3.3. Dependent types
3.4. Intuitionistic theory of types
3.4.1. Intuitionistic logic
4. Programming in Idris
4.1. Basic syntax and definitions
4.1.1. Defining functions
4.1.2. Defining and inferring types
4.1.3. Anonymous lambda functions
4.1.4. Recursive functions
4.1.5. Recursive data types
4.1.6. Total and partial functions
4.1.7. Higher-order functions
4.1.8. Dependent types
4.1.9. Implicit parameters
4.1.10. Pattern matching expressions
4.1.11. Interfaces and implementations
4.2. Curry-Howard isomorphism
4.3. Quantitative Type Theory
5. Proving in Idris
5.1. Weekdays
5.1.1. First proof (auto-inference)
5.1.2. Second proof (rewrite)
5.1.3. Third proof (impossible)
5.2. Natural numbers
5.2.1. First proof (auto-inference and existence)
5.2.2. Second proof (introduction of a new given)
5.2.3. Third proof (induction)
5.2.4. Ordering
5.2.5. Safe division
5.2.6. Maximum of two numbers
5.2.7. List of even naturals
5.2.8. Partial orders
5.3. Computations as types
5.3.1. Same elements in a list (vector)
5.3.2. Evenness of numbers
5.4. Trees
5.4.1. Depth
5.4.2. Map and size
5.4.3. Length of mapped trees
Conclusion
Further reading
Appendices
Appendix A: Writing a simple type checker in Haskell
Evaluator
Type checker
Environments
Appendix B: Theorem provers
Metamath
Simple Theorem Prover
Appendix C: IO, Codegen targets, compilation, and FFI
IO
Codegen
Compilation
Foreign Function Interface
Appendix D: Implementing a formal system
About the author


๐Ÿ“œ SIMILAR VOLUMES


Introduction to Dependent Types with Idr
โœ Boro Sitnikovski ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Apress ๐ŸŒ English

Dependent types are a concept that allows developers to write proof-carrying code. Idris is a programming language that supports dependent types. This book will teach you the mathematical foundations of Idris as well as how to use it to write software and mathematically prove properties. The firs

Introduction to Dependent Types with Idr
โœ Boro Sitnikovski ๐Ÿ“‚ Library ๐Ÿ› Apress ๐ŸŒ English

<p><span>Dependent types are a concept that allows developers to write proof-carrying code. Idris is a programming language that supports dependent types. This book will teach you the mathematical foundations of Idris as well as how to use it to write software and mathematically prove properties.</s

Type-driven Development with Idris
โœ Edwin Brady ๐Ÿ“‚ Library ๐Ÿ“… 2017 ๐Ÿ› Manning Publications ๐ŸŒ English

<div><p><b>Summary</b></p> <p><i>Type-Driven Development with Idris</i>, written by the creator of Idris, teaches you how to improve the performance and accuracy of your programs by taking advantage of a state-of-the-art type system. This book teaches you with Idris, a language designed to support t

Type-driven Development with Idris
โœ Edwin Brady ๐Ÿ“‚ Library ๐Ÿ“… 2017 ๐Ÿ› Manning Publications ๐ŸŒ English

Type-Driven Development with Idris, written by the creator of Idris, teaches you how to improve the performance and accuracy of your programs by taking advantage of a state-of-the-art type system. This book teaches you with Idris, a language designed to support type-driven development. About the