proposition: Lemma freshIdx_UnConstrFreshIdx_Equiv : forall qsSchema (qs : QueryStructure qsSchema) Ridx, refine {x : nat | freshIdx qs Ridx x} {idx : nat | UnConstrFreshIdx (GetRelation qs Ridx) idx}.
proof: Proof. unfold freshIdx, UnConstrFreshIdx, refine; intros. computes_to_inv. computes_to_econstructor; intros. apply H in H0. unfold RawTupleIndex; intro; subst. destruct tup; omega. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.Strings.String Coq.ZArith.ZArith Coq.Lists.List Coq.Logic.FunctionalExtensionality Coq.Sets.Ensembles Fiat.Computation Fiat.Computation.Refinements.Iterate_Decide_Comp Fiat.ADT Fiat.ADTRefinement Fiat.ADTNotation Fiat.QueryStructure.Specification.Representation.QueryStructureSchema Fiat.ADTRefinement.BuildADTRefinements Fiat.QueryStructure.Specification.Representation.QueryStructure Fiat.Common.Ensembles.IndexedEnsembles Fiat.Common.IterateBoundedIndex Fiat.QueryStructure.Specification.Operations.Query Fiat.QueryStructure.Specification.Operations.Insert Fiat.QueryStructure.Implementation.Constraints.ConstraintChecksRefinements