(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
(****************************************************************************)
(*                 The Calculus of Inductive Constructions                  *)
(*                                                                          *)
(*                                Projet Coq                                *)
(*                                                                          *)
(*                     INRIA                        ENS-CNRS                *)
(*              Rocquencourt                        Lyon                    *)
(*                                                                          *)
(*                                Coq V5.10                                 *)
(*                              Nov 25th 1994                               *)
(*                                                                          *)
(****************************************************************************)
(*                                  Rat.v                                   *)
(****************************************************************************)
(*              Formal Language Theory                                      *)
(*                                                                          *)
(*              Judicael Courant - Jean-Christophe Filliatre                *)
(*                                                                          *)
(*              Developped in V5.8  June-July 1993                          *)
(*              Ported     to V5.10 October 1994                            *)
(****************************************************************************)
(*									*)
(*    On definit la concatenation, l'union, l'intersection de 2		*)
(*    langages, le langage L* si L est un langage, ainsi que le		*)
(*    langage reduit a un mot.						*)
(*									*)
Definition lword (w : Word) : wordset := fun w1 : Word => w = w1 :>Word.
Definition lconc (l1 l2 : wordset) : wordset :=
fun w : Word =>
exists w1 : Word,
(exists w2 : Word, l1 w1 /\ l2 w2 /\ w = Append w1 w2 :>Word).
Definition lunion (l1 l2 : wordset) : wordset := fun w : Word => l1 w \/ l2 w.
Definition linter (l1 l2 : wordset) : wordset := fun w : Word => l1 w /\ l2 w.
Fixpoint lpuiss (n : nat) : wordset -> wordset :=
fun l : wordset =>
match n return wordset with
| O =>
(* O *)  lword nil (* S *)
| S p => lconc l (lpuiss p l)
end.
Definition lstar (l : wordset) : wordset :=
fun w : Word => exists n : nat, lpuiss n l w.
unfold lstar in |- *.
intros.
elim H0; clear H0.
intros x H0.
apply (H x w); auto.
Qed.
(*									*)
(*  Si w est dans l alors w est dans l*.				*)
(*									*)

Lemma lw_imp_lstarlw : forall (l : wordset) (w : Word), l w -> lstar l w.