(* *********************************************************************)
(*                                                                     *)
(*              The Compcert verified compiler                         *)
(*                                                                     *)
(*          Jacques-Henri Jourdan, INRIA Paris-Rocquencourt            *)
(*                                                                     *)
(*  Copyright Institut National de Recherche en Informatique et en     *)
(*  Automatique.  All rights reserved.  This file is distributed       *)
(*  under the terms of the GNU General Public License as published by  *)
(*  the Free Software Foundation, either version 2 of the License, or  *)
(*  (at your option) any later version.  This file is also distributed *)
(*  under the terms of the INRIA Non-Commercial License Agreement.     *)
(*                                                                     *)
(* *********************************************************************)
Require Grammar.
Require Automaton.
Require Interpreter.
Require Validator_complete.
Module Make(Import A:Automaton.T) (Import Inter:Interpreter.T A).
Module Import Valid := Validator_complete.Make A.
(** * Completeness Proof **)
Section Completeness_Proof.
Hypothesis complete: complete.

(** If the first predicate has been validated, then it is correct. **)
Lemma first_correct:
forall head sem word t q, word = t::q ->
parse_tree head word sem ->
TerminalSet.In (projT1 t) (first_symb_set head)
with first_correct_list:
forall heads sems word t q, word = t::q ->
parse_tree_list heads word sems ->
TerminalSet.In (projT1 t) (first_word_set heads).