proposition: Lemma parse_nonterminal'_substring_correct (nt : nonterminal_carrierT) : parse_nt_is_correct str nt (@parse_nonterminal'_substring nt) (GenericRecognizer.parse_nonterminal' str nt).
proof: Proof. rewrite <- drop_0 at 1. erewrite <- take_long at 1 by reflexivity. rewrite drop_length, Nat.sub_0_r. expand_once. destruct (Utils.dec (is_valid_nonterminal initial_nonterminals_data nt)) as [H|H]; repeat eq_t'. { eapply (parse_nonterminal_or_abort_correct (_, _)); assumption. } { unfold GenericRecognizer.parse_nonterminal_or_abort. rewrite Fix5_eq by (intros; apply parse_nonterminal_step_ext; assumption). unfold GenericRecognizer.parse_nonterminal_step at 1. simpl. rewrite H, Bool.andb_false_r; simpl. edestruct lt_dec; try omega; simpl. repeat eq_t'. } Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.Lists.List Coq.Arith.EqNat Coq.Arith.Compare_dec Coq.Arith.Wf_nat Coq.ZArith.ZArith Fiat.Common.List.Operations Fiat.Parsers.ContextFreeGrammar.Core Fiat.Parsers.BaseTypes Fiat.Parsers.GenericBaseTypes Fiat.Parsers.GenericCorrectnessBaseTypes Fiat.Parsers.StringLike.Properties Fiat.Parsers.MinimalParse Fiat.Parsers.CorrectnessBaseTypes Fiat.Parsers.BaseTypesLemmas Fiat.Parsers.ContextFreeGrammar.Properties Fiat.Parsers.WellFoundedParse Fiat.Parsers.MinimalParseOfParse Fiat.Parsers.GenericRecognizer Fiat.Parsers.GenericRecognizerExt Fiat.Common.Wf Fiat.Common.Wf1 Fiat.Common.List.ListFacts Fiat.Common.NatFacts Fiat.Common.UIP Fiat.Common