Skip to content

check_equiv fails to check provably equal terms #4001

@gebner

Description

@gebner

In Pulse, we're using check_equiv to check the equality of various things, including slprops. But it seems that check_equiv only does a very limited form of equality checking (unifiability?).

module EquivTrueFalse
module T = FStar.Tactics.V2

let foo (p: squash (true == false)) =
  // assert (true == false); // ok
  assert true == false by (
    let g = T.top_env () in
    match T.check_equiv g (`(true)) (`(false)) with
    | Some tok, _ -> T.tadmit ()
    | None, issues -> T.log_issues issues; T.fail "cannot prove equality"
  )

// fails with:
// check_relation failed:  Eq ()
//     - (not equatable) not equal terms: true <> false

cc @mtzguido Is this intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions