Avoid local function (fix #1).

This fixes an error about hidden vs. visible types in the type of a
local function. The error was introduced by switching to Agda 2.4.0. I
don't understand the error. It seems that the local function was
introduced to be able to use rewrite, so I rewrote the proof with subst
instead. This avoids the local function, and thus the error.

The ilc-agda project now type checks with current Agda. Tested versions:

agda/agda-stdlib@517d842ed43d0684e31b2e3e1f45ec9dda703761

agda/agda@b21f32a35f1a1b584538e3aaec3f62c9b4463aff (2_4_0)
agda/agda@70c8a575c46f6a568c7518150a1a64fcd03aa437