I am trying to write a proof for an equality in results of a function with a HIT domain. Because the function is defined over a HIT, the proof of equality also has to handle path cases. In those cases, Agda reports a ton of constraints on the higher-dimensional path I'm required to construct; for example:
Goal: fromList (toList m) ≡ εˡ m i
————————————————————————————————————————————————————————————
i : I
m : FreeMonoid A
AIsSet : isSet A
A : Type ℓ
ℓ : Level
———— Constraints ———————————————————————————————————————————
(hcomp
(λ { j ((~ i ∨ i) = i1)
→ (λ { (i = i0) → fromList (toList ε ++ toList a₁)
; (i = i1)
→ cong₂ _·_ (fromList-toList ε) (fromList-toList a₁) (i1 ∧ j)
})
_
; j (i1 = i0)
→ outS (inS (fromList-homo (toList ε) (toList a₁) (~ i)))
})
(outS (inS (fromList-homo (toList ε) (toList a₁) (~ i)))))
= (?1 (AIsSet = AIsSet₁) (m = a₁) (i = i0) i)
: FreeMonoid A₁
(fromList-toList a₁ i)
= (?1 (AIsSet = AIsSet₁) (m = a₁) (i = i1) i)
: FreeMonoid A₁
However, the HIT in question happens to be a set (in the isSet
sense). So, any path I can come up with that has the right endpoints will be indistinguishable from one that also solves the given constraints. So in more concrete terms, suppose I bring two more terms in scope:
fillSquare : isSet' (FreeMonoid A)
rightEndpointsButConstraintsDon'tHold : fromList (toList m) ≡ εˡ m i
How can I use these two definitions to fill the hole?
from-to
so that the termination checker is willing to look a bit deeper, instead of having to inline it? – Canadianism