For simplicity, here an applicative functor means (in a proof assistant based on dependent type theory) the Haskellian applicative functor, bundled with its equational laws.
This I can of course brute force in any proof assistant. Nevertheless, streamlining such a proof is an interesting challenge. The definition for pure
and <*>
is easy, as can be copied off any Haskell library. The equational reasoning however is very very tedious, which anyone would agree if they were to write it down on paper.
One thing to note is that you can mechanically prove all four laws by deciding on a set of appropriate rewriting directions, and apply laws whenever you can. I would like to know how this is actually carried out in a tactic-based approach, and also whether this strategy can be used in non-tactic based proofs. And if unfortunately not, what other techniques can be used to reduce the tedium?