proposition: Lemma exists_gen_hd A (g : nat -> G (option A)) (gs : nat -> list (nat * G (option A))) x n : (exists s, semProdOpt (g s) x) -> exists s, semProdOpt (backtrack ((S n, g s) :: gs s)) x.
proof: Proof. intros [s He]. exists s. eapply (@backtrack_correct_opt A). eexists. split. split. now left. simpl. lia. eassumption. Qed.
imports: String micromega.Lia List Tactics TacticsUtil Instances Classes DependentClasses Sets Producer Generators EnumProofs Checker Decidability CheckerProofs mathcomp(ssreflect ssrfun ssrbool ssrnat eqtype seq) Ltac2(Ltac2)