Section Equivalences.
(** *** Equivalences between the different definition of the reflexive, symmetric, transitive closures *)
(** *** Contributed by P. Castéran *)
(** Direct transitive closure vs left-step extension *)
(** Direct transitive closure vs right-step extension *)
(** Direct reflexive-transitive closure is equivalent to transitivity by left-step extension *)
(** Direct reflexive-transitive closure is equivalent to transitivity by right-step extension *)
(** Induction on the left transitive step *)
(** Induction on the right transitive step *)
induction 3; auto.
apply H0 with y; auto.
Qed.
intros P z Hz IH x Hxz.
apply clos_rt_rt1n_iff in Hxz.
elim Hxz using rt1n_ind_right; auto.
clear x Hxz.
intros x y Hxy Hyz Hy.
apply clos_rt_rt1n_iff in Hyz.
eauto.
Qed.
(** Direct reflexive-symmetric-transitive closure is equivalent to transitivity by symmetric left-step extension *)
induction 1.
- auto.
- intros; right with y; eauto.
Qed.
induction 1.
- constructor 2 with y; auto.
constructor 1.
- constructor 1.
- apply clos_rst1n_sym; auto.
- eapply clos_rst1n_trans; eauto.
Qed.
(** Direct reflexive-symmetric-transitive closure is equivalent to transitivity by symmetric right-step extension *)

Lemma clos_rst_rstn1_iff : forall x y,
clos_refl_sym_trans R x y <-> clos_refl_sym_trans_n1 R x y.