add parameters block a constraint
This commit is contained in:
parent
3c411aca83
commit
f592e2e3dc
1 changed files with 15 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue