(* File: Sound.v  (last edited on 27/10/2000) (c) Klaus Weich  *)
Require Export NSound.
Require Export In_Gamma.
Definition sound (Gamma : flist) (work : nf_list) (context : flist) :=
forall a : form, in_gamma Gamma work a -> Derivable context a.
intros gamma work context a der_a sound0.
unfold sound in |- *.
intros c in_gamma0.
elim (in_gamma_cons_gamma_rev a gamma work c in_gamma0); clear in_gamma0.
intros in_gamma0.
apply sound0; assumption.
intros eq_c;  rewrite eq_c; assumption.
Qed.
intros gamma work context a sound0.
unfold sound in |- *.
intros c in_gamma0.
apply sound0.
apply in_gamma_cons_gamma_tail; assumption.
Qed.
intros gamma work context a sound0.
apply sound0.
apply in_gamma_cons_gamma_head; assumption.
Qed.
(**********************************************************************)
intros a gamma work context sound0.
unfold sound in |- *.
intros c in_gamma.
apply sound0.
apply in_gamma_shift_work_gamma; assumption.
Qed.
intros a gamma work context sound0.
unfold sound in |- *.
intros c in_gamma.
apply sound0.
apply in_gamma_shift_gamma_work; assumption.
Qed.
(**********************************************************************)

Lemma sound_cons_gamma_cons_context :
forall (gamma : flist) (work : nf_list) (context : flist) (a : form),
sound gamma work context -> sound (a :: gamma) work (a :: context).