I am new to coq and trying to prove this theorem
Inductive expression : Type :=
| Var (n : nat)
.
.
Theorem variable_equality : forall x : nat, forall n : nat,
((equals x n) = true) -> (Var x = Var n).
This is the definition of equals
Fixpoint equals (n1 : nat) (n2 : nat) :=
match (n1, n2) with
| (O, O) => true
| (O, S n) => false
| (S n, O) => false
| (S n, S n') => equals n n'
end.
This is my solution so far
Proof.
intros x n. induction x as [| x' IH].
- destruct n.
+ reflexivity.
+ simpl. intro.
and I end up with something like this
1 subgoal
n : nat
H : false = true
-------------------------
Var 0 = Var (S n)
I understand that this output means that the proposition "Var 0 = Var (S n)" should follow from the proposition "false = true" if the theorem has to be correct, but I don't know what to do about it and move ahead with my proof. Any help would be appreciated.
Thanks in advance!