loosen pushCoe's type slightly

This commit is contained in:
rhiannon morris 2023-08-28 20:03:06 +02:00
parent add2eb400c
commit d5d30ee198

View file

@ -97,8 +97,7 @@ parameters {auto _ : CanWhnf Term Interface.isRedexT}
boxCoe qty sty@(S [< i] ty) p q val ret body loc = do
-- caseπ (coe [i ⇒ [ρ. A]] @p @q s) return z ⇒ C of { [a] ⇒ e }
-- ⇝
-- caseπ s ∷ [ρ. A]p/i return z ⇒ C
-- of { [a] ⇒ e[(coe [i ⇒ A] p q a)/a] }
-- caseπ s ∷ [ρ. A]p/i return z ⇒ C of { [a] ⇒ e[(coe [i ⇒ A] p q a)/a] }
let ctx1 = extendDim i ctx
Element ty tynf <- whnf defs ctx1 ty.term
ta <- tycaseBOX defs ctx1 ty
@ -110,9 +109,8 @@ parameters {auto _ : CanWhnf Term Interface.isRedexT}
||| pushes a coercion inside a whnf-ed term
export covering
pushCoe : BindName ->
(ty : Term (S d) n) ->
(p, q : Dim d) -> (0 npq : Not (p `Eqv` q)) =>
(s : Term d n) -> (0 pc : So (canPushCoe ty s)) => Loc ->
(ty : Term (S d) n) -> (p, q : Dim d) -> (s : Term d n) -> Loc ->
(0 pc : So (canPushCoe ty s)) =>
Eff Whnf (NonRedex Elim d n defs)
pushCoe i ty p q s loc =
case ty of