I am to prove a triviality using type classes:
class order =
fixes lesseq :: " 'a ⇒ 'a ⇒ bool" (infix "≼" 50)
assumes refl: "x ≼ x"
and trans: "x ≼ y ⟹ y ≼ z ⟹ x ≼ z"
and antisym: "x ≼ y ⟹ y ≼ x ⟹ x = y"
begin
theorem "(myle:: ('b::order) ⇒ 'b ⇒ bool) x x"
proof -
show ?thesis by (rule refl)
qed
end
Here, Isabelle/jEdit highlights by (rule refl) in pink and says
Failed to apply initial proof method⌂:
goal (1 subgoal):
1. myle x x
What is the problem here? Otherwise the proof seems to go through.
myleand≼are not the same function.The type annotation
(myle:: ('b::order) ⇒ 'b ⇒ bool)just states thatmyleis a function that takes two elements of type'band returns a boolean and that'bis a type belonging to theordertypeclass.If you want to prove something about
≼just use the same symbol or the namelesseq.