Skip to content
Snippets Groups Projects
Commit 7915ff75 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Merge branch 'ci/msammler/join_length' into 'master'

Add join_length

See merge request !401
parents 3897126a d5e8449a
No related branches found
No related tags found
1 merge request!401Add join_length
Pipeline #69939 passed
...@@ -226,6 +226,10 @@ Section mjoin. ...@@ -226,6 +226,10 @@ Section mjoin.
Implicit Types l k : list A. Implicit Types l k : list A.
Implicit Types ls : list (list A). Implicit Types ls : list (list A).
Lemma join_length ls:
length (mjoin ls) = sum_list (length <$> ls).
Proof. induction ls; [done|]; csimpl. rewrite app_length. lia. Qed.
Lemma join_lookup_Some ls i x : Lemma join_lookup_Some ls i x :
mjoin ls !! i = Some x j l i', ls !! j = Some l l !! i' = Some x mjoin ls !! i = Some x j l i', ls !! j = Some l l !! i' = Some x
i = sum_list (length <$> take j ls) + i'. i = sum_list (length <$> take j ls) + i'.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment