Skip to content

Commit 9a9592c

Browse files
author
Alex Gryzlov
committed
further simplify PartialMap lemmas
1 parent be238fa commit 9a9592c

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/Maps.lidr

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -345,28 +345,17 @@ partial maps.
345345
> apply_empty = Refl
346346
>
347347
> update_eq : (update x v m) x = Just v
348-
> update_eq {x} {v} {m} =
349-
> rewrite t_update_eq {x} {v=Just v} {m} in
350-
> Refl
348+
> update_eq {v} = t_update_eq {v=Just v}
351349
>
352350
> update_neq : Not (x2 = x1) -> (update x2 v m) x1 = m x1
353-
> update_neq {x1} {x2} {v} {m} neq =
354-
> rewrite t_update_neq neq {x1=x2} {x2=x1} {v=Just v} {m} in
355-
> Refl
351+
> update_neq {x1} {x2} {v} = t_update_neq {x1=x2} {x2=x1} {v=Just v}
356352
>
357353
> update_shadow : update x v2 $ update x v1 m = update x v2 m
358-
> update_shadow {x} {v1} {v2} {m} =
359-
> rewrite t_update_shadow {x} {v1=Just v1} {v2=Just v2} {m} in
360-
> Refl
354+
> update_shadow {v1} {v2} = t_update_shadow {v1=Just v1} {v2=Just v2}
361355
>
362356
> update_same : m x = Just v -> update x v m = m
363-
> update_same {x} {m} prf =
364-
> rewrite sym prf in
365-
> rewrite t_update_same {x} {m} in
366-
> Refl
357+
> update_same prf = rewrite sym prf in t_update_same
367358
>
368359
> update_permute : Not (x2 = x1) -> update x1 v1 $ update x2 v2 m
369360
> = update x2 v2 $ update x1 v1 m
370-
> update_permute {v1} {v2} {m} neq =
371-
> rewrite t_update_permute neq {v1=Just v1} {v2=Just v2} {m} in
372-
> Refl
361+
> update_permute {v1} {v2} = t_update_permute {v1=Just v1} {v2=Just v2}

0 commit comments

Comments
 (0)