I have a definition involving match, similar like this:
Definition five (n: nat): bool :=
match n with
| 5 => true
| _ => false
end.
I try to proof something similar like this:
Theorem fiveT: forall (n: nat),
n <> 5 -> five n = false.
Proof. intros. unfold five.
But when I unfold the definition of five
, I don't know how to tell coq that the first match case is irrelevant because of H
. How can I proof this?
1 goal
n : nat
H : n <> 5
______________________________________(1/1)
match n with
| 5 => true
| _ => false
end = false
Please note that my real problem is much bigger than this one but I wanted to give a small understandable example, so please don't tell me a complete different approach from mine, thank you :)