Skip to content

Instance synthesis fails with a match expression #145

@lzy0505

Description

@lzy0505
/-- error: (match ?b with
  | true => ?Q
  | false => ?Q) ⊢
  ?Q is not an entailment -/
#guard_msgs in
example [BI PROP] (Q : PROP) : Q ⊢ Q := by
  iintro HQ
  have H: (∀ b (Q: PROP), (match b with | true => iprop(Q) | false => iprop(Q)) ⊢ Q) := by sorry
  iapply H

This example failed at iapply H.
But the iapply works if I replace the match expression with (if b == true then iprop(Q) else iprop(Q)).

The problem seems to be at this line:

let instances ← SynthInstance.getInstances mvarType

Is this an upstream bug?

cc @MackieLoeffel

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