remove inject stuff
injecting from m to (n+m) is just id ::: id ::: ... ::: shift n. specifically, injecting from 0 is just the shift. so.
This commit is contained in:
parent
126a585c74
commit
5053e9b234
13 changed files with 130 additions and 177 deletions
|
@ -120,21 +120,6 @@ ssDownViaNat by =
|
|||
%transform "Shift.ssDown" ssDown = ssDownViaNat
|
||||
|
||||
|
||||
public export
|
||||
inject : Shift from to -> Shift (from + n') (to + n')
|
||||
inject SZ = SZ
|
||||
inject (SS by) = SS (inject by)
|
||||
|
||||
public export
|
||||
injectViaNat : Shift from to -> Shift (from + n') (to + n')
|
||||
injectViaNat by =
|
||||
rewrite shiftDiff by in
|
||||
rewrite sym $ plusAssociative by.nat from n' in
|
||||
fromNat by.nat
|
||||
|
||||
%transform "Shift.inject" Shift.inject = Shift.injectViaNat
|
||||
|
||||
|
||||
public export
|
||||
shift : Shift from to -> Var from -> Var to
|
||||
shift SZ i = i
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue