0

What could be the reason for the following error message:

Pending sort hypotheses: trelations

Here,

Thanks.

Faddou
  • 13
  • 3

1 Answers1

1

The error arises because Isabelle can't know for sure that your assumptions are consistent. Here's a contrived example (from Brian Huffman):

class impossible =
  assumes impossible: "∃x. x ≠ x"

lemma False: "False"
proof -
  obtain x :: "'a::impossible" where "x ≠ x"
  using impossible ..
  then show "False" by simp
qed

Clearly, the system must reject this proof, because the impossible sort is empty. The technical reason why it is rejected is that the system doesn't know any instance of impossible.

There are two ways to prevent this from happening:

  1. Before doing any proofs over classes, register an instance.
  2. Add a "sort constraint" as an assumption for your lemma: SORT_CONSTRAINT('a::trelations). It gets automatically discharged when you use the lemma (once you've registered an instance somewhere).
larsrh
  • 2,579
  • 8
  • 30