fact: Fixpoint PickIndexes {n} (qsSchema : Vector.t RawSchema n) (OccRank : OccurencesRankT (Vector.map rawSchemaHeading qsSchema)) {struct qsSchema} : ilist3 (B := fun sch => list (prod string (Attributes (rawSchemaHeading sch)))) qsSchema := match qsSchema return OccurencesRankT (Vector.map rawSchemaHeading qsSchema) -> ilist3 (B := fun sch => list (prod string (Attributes (rawSchemaHeading sch)))) qsSchema with | Vector.cons heading _ qsSchema' => fun OccRank => let bestLastIndex := match (PickIndex ((ilist3_hd (snd OccRank)))) with | idx :: _ => [fst idx] | _ => [ ] end in icons3 (map (@fst _ _) (PickIndex ((ilist3_hd (fst OccRank))) ) ++ bestLastIndex) (PickIndexes qsSchema' (ilist3_tl (fst OccRank), ilist3_tl (snd OccRank))) | Vector.nil => fun OccRank => inil3 end OccRank.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.Sorting.Mergesort Coq.Structures.Orders Coq.Arith.Arith Coq.Structures.OrderedType Coq.Structures.OrderedTypeEx Coq.Strings.String Coq.FSets.FMapAVL Fiat.Common.String_as_OT Fiat.Common.Tactics.CacheStringConstant Fiat.QueryStructure.Specification.Representation.QueryStructureNotations Fiat.QueryStructure.Implementation.Operations Fiat.QueryStructure.Implementation.DataStructures.BagADT.QueryStructureImplementation Fiat.QueryStructure.Implementation.DataStructures.BagADT.IndexSearchTerms Fiat.QueryStructure.Automation.Common