我想证明字符串的“自反性”属性。请如果你能帮助我如何进行证明。这是我的代码:
Fixpoint beq_str (sa sb : String.string) {struct sb}: bool :=
match sa, sb with
| EmptyString, EmptyString => true
| EmptyString, String b sb' => false
| String a sa', EmptyString => false
| String a sa', String b sb'=> match (ascii_dec a b) with
| left _ => beq_str sa' sb'
| right _ => false
end
end.
(* compares two string names [n1] and [n2] of type [id'] - returs bool. *)
Definition beq_names n1 n2 :=
match (n1, n2) with
(name s1, name s2) => beq_str s1 s2
end.
Theorem reflexivty : forall i,
true = beq_str i i.
Proof.
intros. induction i.
auto. simpl. Admitted.