Congruence lemmas for have
have kernel performance issues when stated using have
directly.
Illustration of the problem: the kernel infers that the type of
have_congr (fun x => b) (fun x => b') h₁ h₂
is
(have x := a; (fun x => b) x) = (have x := a'; (fun x => b') x)
rather than
(have x := a; b x) = (have x := a'; b' x)
That means the kernel will do whnf_core
at every step of checking a sequence of these lemmas.
Thus, we get quadratically many zeta reductions.
For reference, we have the have
versions of the theorems in the following comment,
and then after that we have the versions that simpHaveTelescope
actually uses,
which avoid this issue.