proposition: Lemma uf_union_create_precons: forall (g: PreGraph Vertex Edge) (li : LstGraph g out_edge) (fin: FiniteGraph g) (ma: MathGraph g is_null) u v, vvalid g u -> vvalid g v -> exists u_rt v_rt, uf_root g u u_rt /\ uf_root g v v_rt /\ ufroot_same g u u /\ ufroot_same g v v /\ uf_set_in g (ufroot_same g u) /\ uf_set_in g (ufroot_same g v).
proof: Proof. intros. pose proof (ufroot_same_refl g _ u H). pose proof (ufroot_same_refl g _ v H0). assert (H3 := H1). assert (H4 := H2). destruct H1 as [u_rt [? _]]. destruct H2 as [v_rt [? _]]. pose proof (ufroot_uf_set_in g _ _ _ H1). pose proof (ufroot_uf_set_in g _ _ _ H2). exists u_rt, v_rt. split; [| split; [| split; [|split; [|split]]]]; trivial. Qed.
imports: CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.lib.Ensembles_ext CertiGraph.lib.EnumEnsembles CertiGraph.graph.graph_model CertiGraph.graph.path_lemmas CertiGraph.graph.graph_gen CertiGraph.graph.MathGraph CertiGraph.graph.LstGraph CertiGraph.graph.FiniteGraph CertiGraph.graph.reachable_computable