steel icon indicating copy to clipboard operation
steel copied to clipboard

Imprecise logical context in the match branch (cannot prove that the scrutinee is not a data constructor that is matched before this branch)

Open aseemr opened this issue 1 year ago • 1 comments

noeq
type t =
  | A : t
  | B : t

fn test (x:t)
  requires emp
  ensures emp
{
  match x {
    A -> {
      ()
    }
    _ -> {
      assert (pure (~ (A? x)))
    }
  }
}

aseemr avatar Jan 31 '24 11:01 aseemr

We should improve this and when we do also correspondingly update this piece of documentation.

https://github.com/FStarLang/PoP-in-FStar/blob/pulse/book/pulse/pulse_conditionals.rst?plain=1#L170-L183

nikswamy avatar Jan 31 '24 17:01 nikswamy