proposition: Lemma refine_disjoint_search_for_not {str offset len nt its} (H_disjoint : disjoint ascii_beq (possible_terminals_of nt) (possible_first_terminals_of_production its)) : refine {splits : list nat | split_list_is_complete G str offset len (NonTerminal nt::its) splits} (ret [find_first_char_such_that (substring offset len str) (fun ch => negb (list_bin ascii_beq ch (possible_terminals_of nt)))]).
proof: Proof. rewrite refine_disjoint_search_for_not' by assumption. setoid_rewrite refine_find_first_char_such_that. simplify with monad laws; reflexivity. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Lists.List Fiat.Parsers.Refinement.PreTactics Fiat.Computation.Refinements.General Fiat.Parsers.StringLike.Properties Fiat.Parsers.StringLike.FirstChar Fiat.Common.Equality Fiat.Common.List.Operations Fiat.Parsers.ContextFreeGrammar.ValidReflective Fiat.Parsers.Refinement.DisjointLemmas Fiat.Parsers.Refinement.DisjointRulesCommon Fiat.Parsers.Refinement.PossibleTerminalsSets Fiat.Parsers.ParserInterface Fiat.Parsers.StringLike.Core Fiat.Common.List.DisjointFacts