use constraints when checking δ
when checking δ 𝑖 ⇒ s, add 𝑖=ε to Ψ instead of checking s‹ε/𝑖›. this has the same effect but an error message will show "𝑖, 𝑖=ε" in the context
This commit is contained in:
parent
ac85dc9352
commit
4db373a84f
1 changed files with 8 additions and 5 deletions
|
@ -196,12 +196,15 @@ mutual
|
|||
|
||||
check' ctx sg (DLam body) ty = do
|
||||
(ty, l, r) <- expectEq !ask ctx ty
|
||||
let ctx' = extendDim body.name ctx
|
||||
ty = ty.term
|
||||
body = body.term
|
||||
-- if Ψ, i | Γ ⊢ σ · t ⇐ A ⊳ Σ
|
||||
qout <- checkC (extendDim body.name ctx) sg body.term ty.term
|
||||
-- if Ψ | Γ ⊢ t‹0› = l : A‹0›
|
||||
equal ctx ty.zero body.zero l
|
||||
-- if Ψ | Γ ⊢ t‹1› = r : A‹1›
|
||||
equal ctx ty.one body.one r
|
||||
qout <- checkC ctx' sg body ty
|
||||
-- if Ψ, i, i = 0 | Γ ⊢ t = l : A
|
||||
equal (eqDim (BV 0) (K Zero) ctx') ty body (dweakT 1 l)
|
||||
-- if Ψ, i, i = 1 | Γ ⊢ t = r : A
|
||||
equal (eqDim (BV 0) (K One) ctx') ty body (dweakT 1 r)
|
||||
-- then Ψ | Γ ⊢ σ · (δ i ⇒ t) ⇐ Eq [i ⇒ A] l r ⊳ Σ
|
||||
pure qout
|
||||
|
||||
|
|
Loading…
Reference in a new issue