proposition: Lemma Invariance4: invariant edge_closed.
proof: Proof. unfold edge_closed. intros; intros len g l r; simpl; intros. destruct H1. + rewrite in_app_iff. destruct (in_dec equiv_dec y (g :: r)); [right; auto | left]. rewrite in_new_working_list, in_app_iff. subst; unfold edge in H2. split; [| split; [auto | pose proof valid_not_null G y; tauto]]. right. rewrite <- edge_func_step. tauto. + specialize (H0 x y H1 H2). rewrite in_app_iff in H0 |- *. destruct (in_dec equiv_dec y (g :: r)); [right; auto | left]. simpl in n. destruct H0 as [? | [? | ?]]; [tauto | | tauto]. rewrite in_new_working_list, in_app_iff. unfold edge in H2. split; [| split; [auto | pose proof valid_not_null G y; tauto]]. left; auto. Qed.
imports: Coq.Sets.Finite_sets Coq.Arith.Arith Coq.Logic.ProofIrrelevance Coq.Logic.FunctionalExtensionality Coq.Sorting.Permutation Coq.micromega.Lia CertiGraph.lib.Coqlib CertiGraph.lib.List_ext CertiGraph.lib.EquivDec_ext CertiGraph.lib.EnumEnsembles Coq.Lists.List VST.msl.Coqlib2 CertiGraph.graph.graph_model CertiGraph.graph.path_lemmas CertiGraph.graph.reachable_ind CertiGraph.graph.subgraph2 CertiGraph.graph.graph_gen CertiGraph.graph.MathGraph CertiGraph.graph.FiniteGraph