add parameters block a constraint

This commit is contained in:
rhiannon morris 2021-09-03 15:00:43 +02:00
parent 3c411aca83
commit f592e2e3dc

View file

@ -319,21 +319,22 @@ mutual
pushSubstsE' (ps . th) ph e
parameters {auto _ : Alternative f}
||| `(λx. t ⦂ (x: A) → B) s >>> (t ⦂ B)[x ≔ (s ⦂ A)`
export
betaLam1 : Alternative f => Elim d n -> f (Elim d n)
betaLam1 : Elim d n -> f (Elim d n)
betaLam1 ((Lam {t, _} :# Pi {a, b, _}) :@ s) =
pure $ (t :# b) // (s :# a ::: id)
betaLam1 _ = empty
||| `(e ⦂ A) >>> e` [if `e` is an elim]
export
upsilon1 : Alternative f => Elim d n -> f (Elim d n)
upsilon1 : Elim d n -> f (Elim d n)
upsilon1 (E e :# _) = pure e
upsilon1 _ = empty
public export
step : Alternative f => Elim d n -> f (Elim d n)
step : Elim d n -> f (Elim d n)
step e = betaLam1 e <|> upsilon1 e
public export