Skip to content

Commit

Permalink
seq_seq_match_weaken_with_implies
Browse files Browse the repository at this point in the history
  • Loading branch information
tahina-pro committed Oct 5, 2023
1 parent cda335a commit 04873f1
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/cbor/CBOR.Steel.fst
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,42 @@ let seq_seq_match_weaken
rewrite (p' _ _) (seq_seq_match_item p' c1' c2' k)
)

let seq_seq_match_weaken_with_implies
(#opened: _)
(#t1 #t2: Type)
(p: t1 -> t2 -> vprop)
(c1 c1': Seq.seq t1)
(c2 c2': Seq.seq t2)
(i j: nat)
: STGhost unit opened
(seq_seq_match p c1 c2 i j)
(fun _ -> seq_seq_match p c1' c2' i j `star`
(seq_seq_match p c1' c2' i j `implies_` seq_seq_match p c1 c2 i j)
)
(i <= j /\ (i == j \/ (
j <= Seq.length c1 /\ j <= Seq.length c2 /\
j <= Seq.length c1' /\ j <= Seq.length c2' /\
Seq.slice c1 i j `Seq.equal` Seq.slice c1' i j /\
Seq.slice c2 i j `Seq.equal` Seq.slice c2' i j
)))
(fun _ -> True)
= seq_seq_match_weaken
p p (fun _ _ -> noop ())
c1 c1'
c2 c2'
i j;
intro_implies
(seq_seq_match p c1' c2' i j)
(seq_seq_match p c1 c2 i j)
emp
(fun _ ->
seq_seq_match_weaken
p p (fun _ _ -> noop ())
c1' c1
c2' c2
i j
)

let rec seq_seq_match_seq_list_match
(#opened: _)
(#t1 #t2: Type)
Expand Down

0 comments on commit 04873f1

Please sign in to comment.