diff --git a/src/Quox/Syntax/Term.idr b/src/Quox/Syntax/Term.idr index ae7645f..8a6ab99 100644 --- a/src/Quox/Syntax/Term.idr +++ b/src/Quox/Syntax/Term.idr @@ -319,22 +319,23 @@ mutual pushSubstsE' (ps . th) ph e -||| `(λx. t ⦂ (x: A) → B) s >>> (t ⦂ B)[x ≔ (s ⦂ A)` -export -betaLam1 : Alternative f => Elim d n -> f (Elim d n) -betaLam1 ((Lam {t, _} :# Pi {a, b, _}) :@ s) = - pure $ (t :# b) // (s :# a ::: id) -betaLam1 _ = empty +parameters {auto _ : Alternative f} + ||| `(λx. t ⦂ (x: A) → B) s >>> (t ⦂ B)[x ≔ (s ⦂ A)` + export + 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 (E e :# _) = pure e -upsilon1 _ = empty + ||| `(e ⦂ A) >>> e` [if `e` is an elim] + export + 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 e = betaLam1 e <|> upsilon1 e + public export + step : Elim d n -> f (Elim d n) + step e = betaLam1 e <|> upsilon1 e public export step' : Elim d n -> Elim d n