(* 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.
(**********************************************************************)
intros gamma work context a sound0.
apply sound_cons_gamma.
apply Derivable_Intro with (Var 0).
apply ByAssumption.
apply My_NthO.
unfold sound in |- *.
intros c in_gamma0.
elim (sound0 c in_gamma0).
intros t der_t.
apply Derivable_Intro with (Shift t).
apply ShiftIntro; assumption.
Qed.
(************************************************************)

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