proposition: Lemma reset_nth_space_Permutation: forall n s, n < length s -> exists l, Permutation (reset_nth_space n s) (reset_space (nth n s null_space) :: l) /\ Permutation s (nth n s null_space :: l).
proof: Proof. induction n; intros; destruct s; simpl in *; try lia. - exists s0. split; constructor; reflexivity. - assert (n < length s0) by lia. destruct (IHn _ H0) as [ll [? ?]]. exists (s :: ll). split. + transitivity (s :: reset_space (nth n s0 null_space) :: ll). 1: constructor; assumption. apply perm_swap. + transitivity (s :: nth n s0 null_space :: ll). 1: constructor; assumption. apply perm_swap. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics Coq.micromega.Lia compcert.lib.Integers compcert.common.Values VST.veric.base VST.veric.Clight_lemmas VST.veric.val_lemmas VST.veric.shares VST.msl.seplog VST.msl.shares VST.zlist.sublist VST.floyd.coqlib3 VST.floyd.functional_base VST.floyd.data_at_rec_lemmas VST.zlist.list_solver CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen