(* File: Forces_NGamma.v  (last edited on 27/10/2000) (c) Klaus Weich  *)
Require Export Le_Ks.
Definition forces_ngamma (work : nf_list) (ds : disjs)
(ni : nested_imps) (ai : atomic_imps) (a : atoms)
(k : kripke_tree) :=
forall c : normal_form,
in_ngamma work ds ni ai a c -> forces_t k (nf2form c).
(********************************************************************)
intros c work ds ni ai a k forces_a forces_ngamma0.
unfold forces_ngamma in |- *.
intros c0 in_ngamma.
elim (in_ngamma_cons_work_rev c work ds ni ai a c0 in_ngamma);
clear in_ngamma.
intros in_ngamma.
apply forces_ngamma0; assumption.
intros eq_c0_c;  rewrite eq_c0_c; assumption.
Qed.
intros c work ds ni ai a k forces.
unfold forces_ngamma in |- *.
intros c0 in_ngamma.
apply forces.
apply in_ngamma_cons_work_tail; assumption.
Qed.
Remark forces_ngamma_app_work :
forall (bs work : nf_list) (ds : disjs) (ni : nested_imps)
(ai : atomic_imps) (a : atoms) (k : kripke_tree),
(forall (n : nat) (b : normal_form),
my_nth normal_form n bs b -> forces_t k (nf2form b)) ->
forces_ngamma work ds ni ai a k -> forces_ngamma (bs ++ work) ds ni ai a k.
intros bs work ds ni ai a k forces_bs forces_ngamma0.
unfold forces_ngamma in |- *.
intros c in_ngamma.
elim (in_ngamma_work_app_rev bs work ds ni ai a c in_ngamma); clear in_ngamma.
intros in_ngamma.
apply forces_ngamma0; assumption.
intros nth; elim nth; clear nth.
intros n nth.
apply forces_bs with n; assumption.
Qed.
intros bs work ds ni ai a k forces.
unfold forces_ngamma in |- *.
intros c in_ngamma.
apply forces.
apply in_ngamma_work_app1; assumption.
Qed.
intros work i j ds ni ai a k forces.
unfold forces_ngamma in |- *.
intros c in_ngamma.
apply forces.
apply in_ngamma_cons_ds_tail; assumption.
Qed.
intros work ds x ni ai a k forces.
unfold forces_ngamma in |- *.
intros c in_ngamma.
apply forces.
apply in_ngamma_cons_ni_tail; assumption.
Qed.
Remark forces_ngamma_del_ai :
forall (i : Int) (work : nf_list) (ds : disjs) (ni : nested_imps)
(ai ai' : atomic_imps) (a : atoms) (k : kripke_tree),
EQUIV_DEL nf_list i ai ai' ->
forces_ngamma work ds ni ai a k -> forces_ngamma work ds ni ai' a k.
intros i work ds ni ai ai' a k equiv_del k_forces_ngamma.
unfold forces_ngamma in |- *.
intros c in_ngamma.
apply k_forces_ngamma.
apply in_ngamma_del_ai_tail with i ai'; assumption.
Qed.

Lemma forces_ngamma_del_ai_rev :
forall (i : Int) (bs work : nf_list) (ds : disjs)
(ni : nested_imps) (ai ai' : atomic_imps) (a : atoms)
(k : kripke_tree),
LOOKUP nf_list i ai bs ->
(forall (n : nat) (b : normal_form),
my_nth normal_form n bs b -> forces_t k (nf2form (AImp i b))) ->
EQUIV_DEL nf_list i ai ai' ->
forces_ngamma work ds ni ai' a k -> forces_ngamma work ds ni ai a k.