intros goal l a b c gamma work context j j1 less1 spec0.
unfold search_spec in |- *.
intros below_goal below_gamma below_context sound0 minimal0.
generalize
(below_cons_list_head (vimp l (Imp (Imp (Atom a) b) c)) gamma j below_gamma).
generalize
(below_cons_list_tail (vimp l (Imp (Imp (Atom a) b) c)) gamma j below_gamma);
clear below_gamma.
intros below_gamma below_x.
generalize (below_vimp_head j l (Imp (Imp (Atom a) b) c) below_x).
generalize (below_vimp_tail j l (Imp (Imp (Atom a) b) c) below_x);
clear below_x.
intros below_l below_x.
elim below_x; clear below_x; intros below_x below_c.
elim below_x; clear below_x; intros below_a below_b.
elim spec0; clear spec0; try assumption.
clear minimal0.
intros derivable_i.
apply derivable.
apply
derivable_cut with (subst_form j b (vimp l (Imp (Atom a) (Imp b (Atom j))))).
rewrite (subst_vimp_head j b l (Imp (Atom a) (Imp b (Atom j))));
try assumption.
simpl in |- *.
rewrite (subst_form_below j b b); try assumption.
rewrite (equal_dec_refl j form b (Atom j)).
change (Derivable fnil (vimp l (Imp (subst_form j b (Atom a)) (Imp b b))))
in |- *.
rewrite (subst_form_below j b (Atom a)); try assumption.
change (Derivable fnil (vimp (a :: l) (Imp b b))) in |- *.
apply derivable_vimp0.
intros.
apply Derivable_Intro with (Abs b (Var 0)).
apply ImpIntro.
apply ByAssumption.
apply My_NthO.
apply
derivable_cut_merge
with (subst_form j b (vimp l (Imp (Imp (Atom a) (Atom j)) c))).
apply derivable_weak.
rewrite (subst_vimp_head j b l (Imp (Imp (Atom a) (Atom j)) c));
try assumption.
simpl in |- *.
rewrite (subst_form_below j b c); try assumption.
rewrite (equal_dec_refl j form b (Atom j)).
change (Derivable context (vimp l (Imp (Imp (subst_form j b (Atom a)) b) c)))
in |- *.
rewrite (subst_form_below j b (Atom a)); try assumption.
apply sound0.
apply in_gamma_cons_gamma_head.
rewrite <- (subst_form_below j b goal); try assumption.
rewrite <- (subst_list_below j b context); try assumption.
change
(Derivable
(subst_list j b
(vimp l (Imp (Imp (Atom a) (Atom j)) c)
:: vimp l (Imp (Atom a) (Imp b (Atom j))) :: context))
(subst_form j b goal)) in |- *.
apply derivable_subst; assumption.
clear minimal0 sound0 below_context below_gamma below_goal.
intros k k_is_mon k_forces_gamma k_notforces_goal.
apply refutable with k; try assumption.
apply
forces_gamma_cons_gamma_weak2
with
(vimp l (Imp (Imp (Atom a) (Atom j)) c))
(vimp (a :: l) (Imp b (Atom j))); try assumption.
intros forces1 forces2.
apply
forces_vimp2
with (Imp (Imp (Atom a) (Atom j)) c) (Imp (Atom a) (Imp b (Atom j)));
try assumption.
intros k' suc1 forces_ajc forces_abj.
unfold forces_t2 in |- *; simpl in |- *.
intros k'' suc2 suc3.
change (forces_t2 k k'' (Imp (Atom a) b) -> forces_t2 k k'' c) in |- *.
intros forces_ab.
apply (forces_ajc k''); try assumption.
intros k''' suc4 suc5.
change (forces_t2 k k''' (Atom a) -> forces_t2 k k''' (Atom j)) in |- *.
intros forces_a.
generalize (forces_abj k''' suc4).
simpl in |- *.
fold forces in |- *.
clear forces_abj; intros forces_abj.
unfold forces_t2 in |- *.
simpl in |- *.
apply forces_abj; try assumption.
unfold Suc in |- *; apply succs_trans with k''; try assumption.
unfold Suc in |- *; apply successor_refl.
apply forces_ab; try assumption.
clear minimal0 sound0.
apply below_form_less_below_form with j; assumption.
apply below_cons_list.
apply below_vimp_split.
intros i0 in0; apply less_trans with j.
apply below_l; assumption.
assumption.
split.
split.
apply below_form_less_below_form with j; assumption.
assumption.
apply below_form_less_below_form with j; assumption.
apply below_cons_list.
simpl in |- *.
apply below_vimp_split.
intros i0 in0; apply less_trans with j; try assumption.
apply below_l; assumption.
split.
apply below_form_less_below_form with j; assumption.
split.
apply below_form_less_below_form with j; assumption.
assumption.
apply below_list_less_below_list with j; assumption.
apply below_cons_list.
apply below_vimp_split.
intros i0 in0; apply less_trans with j; try assumption.
apply below_l; assumption.
split.
split.
apply below_form_less_below_form with j; assumption.
assumption.
apply below_form_less_below_form with j; assumption.
apply below_cons_list.
simpl in |- *.
apply below_vimp_split.
intros i0 in0; apply less_trans with j; try assumption.
apply below_l; assumption.
split.
apply below_form_less_below_form with j; assumption.
split.
apply below_form_less_below_form with j; assumption.
assumption.
apply below_list_less_below_list with j; assumption.
clear minimal0 below_context below_gamma below_goal.
apply sound_cons_gamma_cons_context.
apply sound_cons_gamma_cons_context.
apply sound_cons_gamma_tail with (vimp l (Imp (Imp (Atom a) b) c));
assumption.
clear sound0 below_context below_gamma below_goal below_b below_a.
unfold minimal in |- *.
intros x k k_is_mon k_forces_gamma in_x.
inversion_clear in_x.
rewrite <- H; clear H x.
apply k_forces_gamma.
apply in_gamma_cons_gamma_head.
inversion_clear H.
rewrite <- H0; clear H0 x.
apply k_forces_gamma.
apply in_gamma_cons_gamma_tail.
apply in_gamma_cons_gamma_head.
apply minimal0; try assumption.
clear H0 x.
apply
forces_gamma_cons_gamma_weak2
with
(vimp l (Imp (Imp (Atom a) (Atom j)) c))
(vimp (a :: l) (Imp b (Atom j))); try assumption.
intros forces1 forces2.
apply
forces_vimp2
with (Imp (Imp (Atom a) (Atom j)) c) (Imp (Atom a) (Imp b (Atom j)));
try assumption.
intros k' suc1 forces_ajc forces_abj.
unfold forces_t2 in |- *; simpl in |- *.
intros k'' suc2 suc3.
change (forces_t2 k k'' (Imp (Atom a) b) -> forces_t2 k k'' c) in |- *.
intros forces_ab.
apply (forces_ajc k''); try assumption.
intros k''' suc4 suc5.
change (forces_t2 k k''' (Atom a) -> forces_t2 k k''' (Atom j)) in |- *.
intros forces_a.
generalize (forces_abj k''' suc4).
simpl in |- *.
fold forces in |- *.
clear forces_abj; intros forces_abj.
unfold forces_t2 in |- *.
simpl in |- *.
apply forces_abj; try assumption.
unfold Suc in |- *; apply succs_trans with k''; try assumption.
unfold Suc in |- *; apply successor_refl.
apply forces_ab; try assumption.
Qed.

(* Specifications: *)
Lemma rule_a_imp_b_imp_c_gamma :
forall (goal : form) (l : list Int) (a b c : form)
(gamma : flist) (work : nf_list) (context : flist)
(j j1 : Int),
Less j j1 ->
search_spec goal
(vimp l (Imp (Imp (Atom j) b) c) :: Imp (Atom j) a :: gamma) work
(vimp l (Imp (Imp (Atom j) b) c) :: Imp (Atom j) a :: context) j1 ->
search_spec goal (vimp l (Imp (Imp a b) c) :: gamma) work context j.