(* File: Disjunct.v  (last edited on 27/10/2000) (c) Klaus Weich  *)
Require Export In_NGamma.
Definition a_ai_disj (a : atoms) (ai : atomic_imps) :=
forall i : Int,
LOOKUP unit i a tt -> forall bs : nf_list, LOOKUP nf_list i ai bs -> False.
Definition a_goal_disj (a : atoms) (goal : Int) :=
LOOKUP unit goal a tt -> False.
intros i b a ai ai'.
elim a; clear a; intros a avl_a.
elim ai; clear ai; intros ai avl_ai.
elim ai'; clear ai'; intros ai' avl_ai'.
unfold a_ai_disj in |- *.
simpl in |- *.
intros a_ai_disj0 not_lookup_i equiv_ins j lookup_j bs lookup_bs.
elim (equal_dec j i).
intros equal_ji.
apply (not_lookup_i tt).
rewrite <- (equal_eq j i); assumption.
intros not_equal_ji.
apply a_ai_disj0 with j bs; clear a_ai_disj0; try assumption.
inversion_clear equiv_ins.
apply H2; assumption.
Qed.

Lemma disjs_delete_ai :
forall (i : Int) (a a' : atoms) (ai ai' : atomic_imps),
a_ai_disj a ai ->
EQUIV_INS unit i (fun _ : unit => tt) tt a a' ->
EQUIV_DEL nf_list i ai ai' -> a_ai_disj a' ai'.