proposition: Lemma DeletePrimaryKeysOK {qsSchema} : forall (qs : UnConstrQueryStructure qsSchema) (Ridx :Fin.t _) DeletedTuples attrlist1 attrlist2, refine {b | (forall tup tup', elementIndex tup <> elementIndex tup' -> GetUnConstrRelation qs Ridx tup -> GetUnConstrRelation qs Ridx tup' -> (FunctionalDependency_P attrlist1 attrlist2 (indexedElement tup) (indexedElement tup'))) -> decides b (Mutate.MutationPreservesTupleConstraints (EnsembleDelete (GetUnConstrRelation qs Ridx) DeletedTuples) (FunctionalDependency_P attrlist1 attrlist2) )} (ret true).
proof: Proof. unfold Mutate.MutationPreservesTupleConstraints, FunctionalDependency_P; intros * v Comp_v; computes_to_inv; subst. computes_to_constructor; simpl. intros. unfold EnsembleDelete in *; destruct H1; destruct H2; eauto. Qed.
imports: Fiat.QueryStructure.Specification.Representation.QueryStructureNotations Fiat.QueryStructure.Specification.Operations.Query Coq.Lists.List Coq.Arith.Compare_dec Coq.Bool.Bool Coq.Strings.String Fiat.Common.BoolFacts Fiat.Common.List.PermutationFacts Fiat.Common.List.ListMorphisms Fiat.QueryStructure.Specification.Operations.FlattenCompList Fiat.Common.Ensembles.EnsembleListEquivalence Fiat.QueryStructure.Implementation.Operations.General.QueryRefinements Fiat.Common.IterateBoundedIndex Fiat.Common.List.ListFacts Fiat.Common.LogicFacts Fiat.Common.DecideableEnsembles Fiat.Computation.Refinements.Iterate_Decide_Comp Fiat.Computation.Refinements.General Fiat.QueryStructure.Specification.Constraints.tupleAgree Fiat.QueryStructure.Specification.Operations.Mutate