fact: Fixpoint make_tower base (ls : list A) new_comp old_comp := match ls with | nil => refine (x0 <- new_comp base; r_o x0) retv -> refine (x0 <- old_comp base; r_o x0) retv | cons x xs => match proj x with | ret_pick _ => forall part_retv, (test x -> refine (test_true x) part_retv) -> make_tower base xs (fun new_comp' => new_comp (If test x Then part_retv Else new_comp')) (fun old_comp' => old_comp (If test x Then test_true x Else old_comp')) | _ => make_tower base xs (fun new_comp' => new_comp (If test x Then test_true x Else new_comp')) (fun old_comp' => old_comp (If test x Then test_true x Else old_comp')) end end.
imports: Coq.Strings.String Fiat.Common.List.ListFacts Fiat.ADTNotation.BuildADT Fiat.ADTNotation.BuildADTSig Fiat.ADT.ComputationalADT Fiat.ADTRefinement Fiat.ADTRefinement.BuildADTRefinements.HoneRepresentation Fiat.Parsers.ParserADTSpecification Fiat.Parsers.Refinement.IndexedAndAtMostOneNonTerminalReflective Fiat.Parsers.StringLike.Core Fiat.Parsers.ContextFreeGrammar.Precompute Fiat.Parsers.BaseTypes Fiat.Parsers.Splitters.RDPList Fiat.Parsers.ContextFreeGrammar.Carriers Fiat.Parsers.ContextFreeGrammar.PreNotations