partly improve coercions over constant lines
still needs a real quality check, or something, for stuff like e : (x ≡ x : A) ⊢ coe (𝑖 ⇒ e @𝑖) x
This commit is contained in:
parent
edfe30ff63
commit
2340b14407
2 changed files with 40 additions and 21 deletions
|
@ -314,6 +314,19 @@ dsqueeze (S names (Y body)) =
|
|||
dsqueeze (S names (N body)) = S names $ N body
|
||||
|
||||
|
||||
export
|
||||
squeezed : {s : Nat} -> ScopeTermN s d n ->
|
||||
Either (BContext s, Term d (s + n)) (Term d n)
|
||||
squeezed (S ns (N t)) = Right t
|
||||
squeezed (S ns (Y t)) = maybe (Left (ns, t)) Right $ tightenN s t
|
||||
|
||||
export
|
||||
dsqueezed : {s : Nat} -> DScopeTermN s d n ->
|
||||
Either (BContext s, Term (s + d) n) (Term d n)
|
||||
dsqueezed (S ns (N t)) = Right t
|
||||
dsqueezed (S ns (Y t)) = maybe (Left (ns, t)) Right $ tightenN s t @{TermD}
|
||||
|
||||
|
||||
|
||||
public export %inline
|
||||
CompH' : (ty : DScopeTerm d n) -> (p, q : Dim d) -> (val : Term d n) ->
|
||||
|
@ -324,7 +337,6 @@ CompH' {ty, p, q, val, r, zero, one, loc} =
|
|||
Comp {
|
||||
ty = dsub1 ty q, p, q,
|
||||
val = E $ Coe ty p q val val.loc, r,
|
||||
-- [fixme] better locations for these vars?
|
||||
zero = DST zero.names $ E $
|
||||
Coe ty' (B VZ zero.loc) (weakD 1 q) zero.term zero.loc,
|
||||
one = DST one.names $ E $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue