Dependent types can prove your code is correct up to a specification. But how do you prove the specification is correct?

This is the static, type-system version of, How do you tell that your tests are correct? The only answer I can honestly give is, yes, the more complex and unwieldy your specification, the more likely you are to have made a mistake. You can mess up in writing something in a type theoretic formalism just … Read more

How to use Agda’s auto proof search effectively?

Agda’s auto proof search is hardwired into the compiler. That makes it fast, but limits the amount of customization you can do. One alternative approach would be to implement a similar proof search procedure using Agda’s reflection mechanism. With the recent beefed up version of reflection using the TC monad, you no longer need to … Read more

Why is my definition not allowed because of strict positivity?

Unfortunately, there’s nothing super deep about this example. As you noted Agda accepts it, and what trips Coq is the lack of uniformity in the parameters. For example, it accepts this: Inductive SwitchNSPA (A : Type) : Type := | switchNSPA : SwitchNSPA A -> SwitchNSPA A. Inductive UseSwitchNSPA := | useSwitchNSPA : SwitchNSPA UseSwitchNSPA … Read more

What is the combinatory logic equivalent of intuitionistic type theory?

So I thought about it a bit more and made some progress. Here’s a first stab at encoding Martin-Löf’s delightfully simple (but inconsistent) Set : Set system in a combinatory style. It’s not a good way to finish, but it’s the easiest place to get started. The syntax of this type theory is just lambda-calculus … Read more

Differences between Agda and Idris

I may not be the best person to answer this, as having implemented Idris I’m probably a bit biased! The FAQ – http://docs.idris-lang.org/en/latest/faq/faq.html – has something to say on it, but to expand on that a bit: Idris has been designed from the ground up to support general purpose programming ahead of theorem proving, and … Read more