Your hypothesis IHl
takes 4 arguments: lr : list nat
, d : nat
, x : nat
, and _ : d = x \/ In x l'
.
Your hypothesis Head : d = x
does not have the proper type to be passed as the 4th argument. You need to turn it from a proof of equality into a proof of a disjunction. Fortunately, you can use:
or_introl
: forall A B : Prop, A -> A \/ B
which is one of the two constructors of the or
type.
Now you might have to pass explicitly the B
Prop, unless it can be figured out in the context by unification.
Here are things that should work:
(* To keep IHl but use its result, given lr : list nat *)
pose proof (IHl lr _ _ (or_introl Head)).
(* To transform IHl into its result, given lr : list nat *)
specialize (IHl lr _ _ (or_introl Head)).
There's probably an apply
you can use, but depending on what is implicit/inferred for you, it's hard for me to tell you which one it is.