Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple (decreases ...) clauses #6

Open
gebner opened this issue Sep 28, 2023 · 0 comments
Open

Multiple (decreases ...) clauses #6

gebner opened this issue Sep 28, 2023 · 0 comments

Comments

@gebner
Copy link
Collaborator

gebner commented Sep 28, 2023

Right now, the harness fails on some mutually recursive lemmas because it puts one decreases on the val for the lemma that we check and on the let rec for the other lemmas in the block.

This also happens with single let recs:

val  elim_of_list'': #a: Type -> i: nat -> s: seq a -> l: list a
  -> Lemma
      (requires
        (List.Tot.length l + i = length s /\ i <= length s /\ slice s i (length s) == seq_of_list l)
      ) (ensures (explode_and i s l)) (decreases (List.Tot.length l))
let rec elim_of_list'': #a:Type ->
  i:nat ->
  s:seq a ->
  l:list a ->
  Lemma
    (requires (
      List.Tot.length l + i = length s /\
      i <= length s /\
      slice s i (length s) == seq_of_list l))
    (ensures (
      explode_and i s l))
    (decreases (
      List.Tot.length l))
= fun #_ i s l ->
  match l with
  | [] -> ()
  | hd :: tl ->
      lemma_seq_of_list_induction l;
      elim_of_list'' (i + 1) s tl
@gebner gebner changed the title Mutually recursive lemmas with decreases clause Multiple (decreases ...) clauses Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant