proposition: Lemma cmp_eq (a b : string): cmp a b = Eq <-> a = b.
proof: Proof. revert b. induction a, b; try easy. cbn. remember (Ascii.compare _ _) as c eqn:Heqc. symmetry in Heqc. destruct c; split; try discriminate; try rewrite Ascii_as_OT.cmp_eq in Heqc; try subst; try rewrite IHa; intro H. { now subst. } { now inversion H. } { inversion H; subst. rewrite<- Heqc. now rewrite Ascii_as_OT.cmp_eq. } { inversion H; subst. rewrite<- Heqc. now rewrite Ascii_as_OT.cmp_eq. } Qed.
imports: OrderedType ZArith_base PeanoNat Peano_dec Compare_dec Ascii String NArith Ndec