[STATEMENT]
lemma int_clset_is_a_model:
  assumes "ground_inference_saturated S"
  assumes all_finite: "\<forall>x \<in> S. (finite (cl_ecl x))"
  assumes "Ball S well_constrained"
  assumes all_non_empty: "\<forall>x \<in> S. (cl_ecl x) \<noteq> {}"
  assumes "closed_under_renaming S"
  shows "\<forall> C \<sigma>. (fst pair = C) \<longrightarrow> \<sigma> = (snd pair) \<longrightarrow> C \<in> S \<longrightarrow>
    ground_clause (subst_cl (cl_ecl C) \<sigma>)
    \<longrightarrow> (all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. (trm_rep t S)))
          \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. (trm_rep t S))) (subst_cl (cl_ecl C) \<sigma>)"
          (is "?P pair")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
proof ((rule wf_induct [of "ecl_ord" "?P" "pair"]),(simp add: wf_ecl_ord))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
text \<open>The proof is by induction and contradiction. We consider a minimal instance
that is not true in the interpretation and we derive a contradiction.\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
fix pair
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
assume hyp_ind: "\<forall>y. (y,pair) \<in> ecl_ord \<longrightarrow> (?P y)"
[PROOF STATE]
proof (state)
this:
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
let ?I = "(int_clset S)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "fo_interpretation ?I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fo_interpretation (int_clset S)
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fo_interpretation (same_values (\<lambda>x. trm_rep x S))
[PROOF STEP]
using trm_rep_compatible_with_structure same_values_fo_int
[PROOF STATE]
proof (prove)
using this:
value_is_compatible_with_structure (\<lambda>x. trm_rep x ?S)
value_is_compatible_with_structure ?f \<Longrightarrow> fo_interpretation (same_values ?f)

goal (1 subgoal):
 1. fo_interpretation (same_values (\<lambda>x. trm_rep x S))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
fo_interpretation (int_clset S)

goal (1 subgoal):
 1. \<And>x. \<forall>y. (y, x) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> \<forall>C \<sigma>. fst x = C \<longrightarrow> \<sigma> = snd x \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show "(?P pair)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(?P pair)"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))
[PROOF STEP]
obtain C \<sigma> where "C = (fst pair)" and "\<sigma> = (snd pair)" and "C \<in> S"
            and "ground_clause (subst_cl (cl_ecl C) \<sigma>)"
            and "(all_trms_irreducible (subst_set (trms_ecl C) \<sigma>)
                  (\<lambda>t. (trm_rep t S)))"
            and cm: "\<not>validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. (\<And>C \<sigma>. \<lbrakk>C = fst pair; \<sigma> = snd pair; C \<in> S; ground_clause (subst_cl (cl_ecl C) \<sigma>); all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. (\<And>C \<sigma>. \<lbrakk>C = fst pair; \<sigma> = snd pair; C \<in> S; ground_clause (subst_cl (cl_ecl C) \<sigma>); all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
C = fst pair
\<sigma> = snd pair
C \<in> S
ground_clause (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>First, we prove that no reduction is possible (otherwise the superposition rule applies).\<close>
[PROOF STATE]
proof (state)
this:
C = fst pair
\<sigma> = snd pair
C \<in> S
ground_clause (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
let ?nored = "(\<forall>L1 L2 D t s u' u v p polarity \<sigma>'.
      \<not> ((reduction L1 C \<sigma>' t s polarity L2 u u' p v D ?I S \<sigma>) \<and> (variable_disjoint C D)))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have ?nored
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?nored"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D))

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D))
[PROOF STEP]
obtain L1 L2 D t s u' u v p polarity \<sigma>'
          where red: "reduction L1 C \<sigma>' t s polarity L2 u u' p v D ?I S \<sigma>"
            and "variable_disjoint C D"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D))

goal (1 subgoal):
 1. (\<And>L1 \<sigma>' t s polarity L2 u u' p v D. \<lbrakk>reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>; variable_disjoint C D\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
variable_disjoint C D

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(subst u \<sigma>') \<noteq> (subst v \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "ground_clause (subst_cl (cl_ecl D) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl D) \<sigma>')
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl D) \<sigma>')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl D) \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)))"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "\<not> is_a_variable u'"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. \<not> is_a_variable u'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. \<not> is_a_variable u'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<not> is_a_variable u'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "D \<in> S"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. D \<in> S
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. D \<in> S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
D \<in> S

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have el1: "(eligible_literal L1 C \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. eligible_literal L1 C \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. eligible_literal L1 C \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
eligible_literal L1 C \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have el2: "(eligible_literal L2 D \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. eligible_literal L2 D \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. eligible_literal L2 D \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
eligible_literal L2 D \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "D \<in> S"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. D \<in> S
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. D \<in> S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
D \<in> S

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(minimal_redex p (subst t \<sigma>) C S t)"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. minimal_redex p (t \<lhd> \<sigma>) C S t
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. minimal_redex p (t \<lhd> \<sigma>) C S t
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
minimal_redex p (t \<lhd> \<sigma>) C S t

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have l1: "L1 \<in> (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. L1 \<in> cl_ecl C
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. L1 \<in> cl_ecl C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have l2: "L2 \<in> (cl_ecl D)"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. L2 \<in> cl_ecl D
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. L2 \<in> cl_ecl D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L2 \<in> cl_ecl D

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have  o1: "(orient_lit_inst L1 t s polarity \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have  o2: "(orient_lit_inst L2 u v pos \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. orient_lit_inst L2 u v pos \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. orient_lit_inst L2 u v pos \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
orient_lit_inst L2 u v pos \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have  e:"(subst u' \<sigma>') = (subst u \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(\<not> validate_ground_clause ?I (subst_cl ( (cl_ecl D) - { L2 } ) \<sigma>'))"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(\<forall>x \<in> (cl_ecl D) - { L2 }. ( (subst_lit x \<sigma>'),(subst_lit L2 \<sigma>'))
                                        \<in> lit_ord)"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. \<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. \<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have st: "(subterm t p u')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. subterm t p u'
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. subterm t p u'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
subterm t p u'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(allowed_redex u' C \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. allowed_redex u' C \<sigma>
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. allowed_redex u' C \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
allowed_redex u' C \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from st
[PROOF STATE]
proof (chain)
picking this:
subterm t p u'
[PROOF STEP]
have "u' \<in> (subterms_of t)"
[PROOF STATE]
proof (prove)
using this:
subterm t p u'

goal (1 subgoal):
 1. u' \<in> subterms_of t
[PROOF STEP]
using occurs_in_def
[PROOF STATE]
proof (prove)
using this:
subterm t p u'
occurs_in ?t ?s = (\<exists>p. subterm ?s p ?t)

goal (1 subgoal):
 1. u' \<in> subterms_of t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u' \<in> subterms_of t

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and o1
[PROOF STATE]
proof (chain)
picking this:
u' \<in> subterms_of t
orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
have "u' \<in> (subterms_of_lit L1)"
[PROOF STATE]
proof (prove)
using this:
u' \<in> subterms_of t
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. u' \<in> subterms_of_lit L1
[PROOF STEP]
using orient_lit_inst_subterms
[PROOF STATE]
proof (prove)
using this:
u' \<in> subterms_of t
orient_lit_inst L1 t s polarity \<sigma>'
\<lbrakk>orient_lit_inst ?L ?t ?s ?polarity ?\<sigma>; ?u \<in> subterms_of ?t\<rbrakk> \<Longrightarrow> ?u \<in> subterms_of_lit ?L

goal (1 subgoal):
 1. u' \<in> subterms_of_lit L1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u' \<in> subterms_of_lit L1

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>L1 \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
u' \<in> subterms_of_lit L1
L1 \<in> cl_ecl C
[PROOF STEP]
have "u' \<in> (subterms_of_cl (cl_ecl C))"
[PROOF STATE]
proof (prove)
using this:
u' \<in> subterms_of_lit L1
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. u' \<in> subterms_of_cl (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u' \<in> subterms_of_cl (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(allowed_redex u' C \<sigma>)\<close> and \<open>C \<in> S\<close>
          and \<open>(coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)))\<close>
          assms(3)
[PROOF STATE]
proof (chain)
picking this:
u' \<in> subterms_of_cl (cl_ecl C)
allowed_redex u' C \<sigma>
C \<in> S
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
Ball S well_constrained
[PROOF STEP]
have rte: "(allowed_redex u' C \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
u' \<in> subterms_of_cl (cl_ecl C)
allowed_redex u' C \<sigma>
C \<in> S
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
Ball S well_constrained

goal (1 subgoal):
 1. allowed_redex u' C \<sigma>'
[PROOF STEP]
using allowed_redex_coincide [of u' C \<sigma> \<sigma>']
[PROOF STATE]
proof (prove)
using this:
u' \<in> subterms_of_cl (cl_ecl C)
allowed_redex u' C \<sigma>
C \<in> S
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
Ball S well_constrained
\<lbrakk>allowed_redex u' C \<sigma>; u' \<in> subterms_of_cl (cl_ecl C); coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)); well_constrained C\<rbrakk> \<Longrightarrow> allowed_redex u' C \<sigma>'

goal (1 subgoal):
 1. allowed_redex u' C \<sigma>'
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
allowed_redex u' C \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "( (subst_lit L2 \<sigma>'),(subst_lit L1 \<sigma>'))
            \<in> lit_ord"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "(all_trms_irreducible (subst_set (trms_ecl D) \<sigma>')
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S)
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from red
[PROOF STATE]
proof (chain)
picking this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>
[PROOF STEP]
have "?I (subst u \<sigma>')  (subst v \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma>

goal (1 subgoal):
 1. int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>')
[PROOF STEP]
unfolding reduction_def
[PROOF STATE]
proof (prove)
using this:
D \<in> S \<and> eligible_literal L1 C \<sigma>' \<and> eligible_literal L2 D \<sigma>' \<and> ground_clause (subst_cl (cl_ecl D) \<sigma>') \<and> minimal_redex p (t \<lhd> \<sigma>) C S t \<and> coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<and> allowed_redex u' C \<sigma> \<and> \<not> is_a_variable u' \<and> L1 \<in> cl_ecl C \<and> L2 \<in> cl_ecl D \<and> orient_lit_inst L1 t s polarity \<sigma>' \<and> orient_lit_inst L2 u v pos \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> u' \<lhd> \<sigma>' = u \<lhd> \<sigma>' \<and> \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>') \<and> (subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord \<and> (\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord) \<and> all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S) \<and> int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>') \<and> subterm t p u'

goal (1 subgoal):
 1. int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from e
[PROOF STATE]
proof (chain)
picking this:
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'
[PROOF STEP]
have t: "ck_unifier u' u \<sigma>' Ground"
[PROOF STATE]
proof (prove)
using this:
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'

goal (1 subgoal):
 1. ck_unifier u' u \<sigma>' Ground
[PROOF STEP]
unfolding ck_unifier_def Unifier_def
[PROOF STATE]
proof (prove)
using this:
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'

goal (1 subgoal):
 1. if Ground = FirstOrder then min_IMGU \<sigma>' u' u else u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ck_unifier u' u \<sigma>' Ground

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "\<forall>x \<in> (cl_ecl D). ( (mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<in> (mult trm_ord)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(\<forall>x \<in> (cl_ecl D). ( (mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<in> (mult trm_ord))"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord)
[PROOF STEP]
obtain x where "x \<in> (cl_ecl D)"
          and "( (mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<notin> (mult trm_ord)"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> cl_ecl D; (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> cl_ecl D
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord) \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
assume "x = L2"
[PROOF STATE]
proof (state)
this:
x = L2

goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
from this and \<open>((subst_lit L2 \<sigma>'),(subst_lit L1 \<sigma>'))
            \<in> lit_ord\<close> and \<open>( (mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<notin> (mult trm_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
x = L2
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
x = L2
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding lit_ord_def
[PROOF STATE]
proof (prove)
using this:
x = L2
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> {(x, y). (mset_lit x, mset_lit y) \<in> mult trm_ord}
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
assume "x \<noteq> L2"
[PROOF STATE]
proof (state)
this:
x \<noteq> L2

goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
from this and \<open>x \<in> (cl_ecl D)\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> L2
x \<in> cl_ecl D
[PROOF STEP]
have "x \<in> (cl_ecl D) - { L2 }"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> L2
x \<in> cl_ecl D

goal (1 subgoal):
 1. x \<in> cl_ecl D - {L2}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> cl_ecl D - {L2}

goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(\<forall>x \<in> (cl_ecl D) - { L2 }. ( (subst_lit x \<sigma>'),(subst_lit L2 \<sigma>'))
                                        \<in> lit_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in> cl_ecl D - {L2}
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
have "( (subst_lit x \<sigma>'),(subst_lit L2 \<sigma>'))
                                        \<in> lit_ord"
[PROOF STATE]
proof (prove)
using this:
x \<in> cl_ecl D - {L2}
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
from \<open>((mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<notin> (mult trm_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord
[PROOF STEP]
have "((subst_lit x \<sigma>'),(subst_lit L1 \<sigma>'))
                                        \<notin> lit_ord"
[PROOF STATE]
proof (prove)
using this:
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord

goal (1 subgoal):
 1. (subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord
[PROOF STEP]
unfolding lit_ord_def
[PROOF STATE]
proof (prove)
using this:
(mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<notin> mult trm_ord

goal (1 subgoal):
 1. (subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> {(x, y). (mset_lit x, mset_lit y) \<in> mult trm_ord}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord

goal (1 subgoal):
 1. x \<noteq> L2 \<Longrightarrow> False
[PROOF STEP]
from this and \<open>( (subst_lit x \<sigma>'),(subst_lit L2 \<sigma>'))
                                        \<in> lit_ord\<close>
             and \<open>((subst_lit L2 \<sigma>'),(subst_lit L1 \<sigma>'))
            \<in> lit_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
(subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord
(subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord
(subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
using lit_ord_trans
[PROOF STATE]
proof (prove)
using this:
(subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord
(subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
trans lit_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding trans_def
[PROOF STATE]
proof (prove)
using this:
(subst_lit x \<sigma>', subst_lit L1 \<sigma>') \<notin> lit_ord
(subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
\<forall>x y z. (x, y) \<in> lit_ord \<longrightarrow> (y, z) \<in> lit_ord \<longrightarrow> (x, z) \<in> lit_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from all_finite and \<open>C \<in> S\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S. finite (cl_ecl x)
C \<in> S
[PROOF STEP]
have "finite (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. finite (cl_ecl x)
C \<in> S

goal (1 subgoal):
 1. finite (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>L1 \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
finite (cl_ecl C)
L1 \<in> cl_ecl C
[PROOF STEP]
have "(mset_lit (subst_lit L1 \<sigma>')) \<in>#  mset_ecl (C,\<sigma>')"
[PROOF STATE]
proof (prove)
using this:
finite (cl_ecl C)
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
[PROOF STEP]
using mset_ecl_and_mset_lit
[PROOF STATE]
proof (prove)
using this:
finite (cl_ecl C)
L1 \<in> cl_ecl C
\<lbrakk>?L \<in> cl_ecl ?C; finite (cl_ecl ?C)\<rbrakk> \<Longrightarrow> mset_lit (subst_lit ?L ?\<sigma>) \<in># mset_ecl (?C, ?\<sigma>)

goal (1 subgoal):
 1. mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
[PROOF STEP]
have "(mset_lit (subst_lit L1 \<sigma>')) \<in> (set_mset (mset_ecl (C,\<sigma>')))"
[PROOF STATE]
proof (prove)
using this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')

goal (1 subgoal):
 1. mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "\<forall>x. (x \<in> (set_mset (mset_ecl (D,\<sigma>')))
          \<longrightarrow> (\<exists>y \<in> set_mset (mset_ecl (C,\<sigma>')). (x,y) \<in> (mult trm_ord)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)
[PROOF STEP]
proof ((rule allI),(rule impI))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
assume "x \<in> (set_mset (mset_ecl (D,\<sigma>')))"
[PROOF STATE]
proof (state)
this:
x \<in># mset_ecl (D, \<sigma>')

goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in># mset_ecl (D, \<sigma>')
[PROOF STEP]
have "x \<in># mset_ecl (D,\<sigma>')"
[PROOF STATE]
proof (prove)
using this:
x \<in># mset_ecl (D, \<sigma>')

goal (1 subgoal):
 1. x \<in># mset_ecl (D, \<sigma>')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in># mset_ecl (D, \<sigma>')

goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
from \<open>x \<in># mset_ecl (D,\<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in># mset_ecl (D, \<sigma>')
[PROOF STEP]
obtain x'
            where "x' \<in># (mset_set (cl_ecl D))"
            and "x = (mset_lit (subst_lit x' \<sigma>'))"
[PROOF STATE]
proof (prove)
using this:
x \<in># mset_ecl (D, \<sigma>')

goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>x' \<in># mset_set (cl_ecl D); x = mset_lit (subst_lit x' \<sigma>')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x' \<in># mset_set (cl_ecl D)
x = mset_lit (subst_lit x' \<sigma>')

goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
from \<open>x' \<in># (mset_set (cl_ecl D))\<close>
[PROOF STATE]
proof (chain)
picking this:
x' \<in># mset_set (cl_ecl D)
[PROOF STEP]
have "x' \<in> (cl_ecl D)"
[PROOF STATE]
proof (prove)
using this:
x' \<in># mset_set (cl_ecl D)

goal (1 subgoal):
 1. x' \<in> cl_ecl D
[PROOF STEP]
using count_mset_set(3)
[PROOF STATE]
proof (prove)
using this:
x' \<in># mset_set (cl_ecl D)
?x \<notin> ?A \<Longrightarrow> count (mset_set ?A) ?x = 0

goal (1 subgoal):
 1. x' \<in> cl_ecl D
[PROOF STEP]
by (fastforce simp: count_eq_zero_iff)
[PROOF STATE]
proof (state)
this:
x' \<in> cl_ecl D

goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
from this
          and \<open>\<forall>x \<in> (cl_ecl D).
          ( (mset_lit (subst_lit x \<sigma>')),(mset_lit (subst_lit L1 \<sigma>')))
                                        \<in> (mult trm_ord)\<close>
                  and \<open>x = (mset_lit (subst_lit x' \<sigma>'))\<close>
[PROOF STATE]
proof (chain)
picking this:
x' \<in> cl_ecl D
\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord
x = mset_lit (subst_lit x' \<sigma>')
[PROOF STEP]
have "(x,(mset_lit (subst_lit L1 \<sigma>'))) \<in> (mult trm_ord)"
[PROOF STATE]
proof (prove)
using this:
x' \<in> cl_ecl D
\<forall>x\<in>cl_ecl D. (mset_lit (subst_lit x \<sigma>'), mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord
x = mset_lit (subst_lit x' \<sigma>')

goal (1 subgoal):
 1. (x, mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x, mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord

goal (1 subgoal):
 1. \<And>x. x \<in># mset_ecl (D, \<sigma>') \<Longrightarrow> \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
from \<open>(mset_lit (subst_lit L1 \<sigma>')) \<in> (set_mset (mset_ecl (C,\<sigma>')))\<close>
          and \<open>(x,(mset_lit (subst_lit L1 \<sigma>'))) \<in> (mult trm_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
(x, mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord
[PROOF STEP]
show
          "(\<exists>y \<in> set_mset (mset_ecl (C,\<sigma>')). (x,y) \<in> (mult trm_ord))"
[PROOF STATE]
proof (prove)
using this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
(x, mset_lit (subst_lit L1 \<sigma>')) \<in> mult trm_ord

goal (1 subgoal):
 1. \<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)
[PROOF STEP]
have
          dom: "\<And>I J K. J \<noteq> {#} \<and> (\<forall>k\<in>set_mset K. \<exists>j\<in>set_mset J. (k, j) \<in> (mult trm_ord)) \<longrightarrow>
          (I + K, I + J) \<in> mult (mult trm_ord)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)

goal (1 subgoal):
 1. \<And>I J K. J \<noteq> {#} \<and> (\<forall>k\<in>#K. \<exists>j\<in>#J. (k, j) \<in> mult trm_ord) \<longrightarrow> (I + K, I + J) \<in> mult (mult trm_ord)
[PROOF STEP]
by (blast intro: one_step_implies_mult)
[PROOF STATE]
proof (state)
this:
?J \<noteq> {#} \<and> (\<forall>k\<in>#?K. \<exists>j\<in>#?J. (k, j) \<in> mult trm_ord) \<longrightarrow> (?I + ?K, ?I + ?J) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(mset_lit (subst_lit L1 \<sigma>')) \<in>#  mset_ecl (C,\<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')
[PROOF STEP]
have "mset_ecl (C,\<sigma>') \<noteq> {#}"
[PROOF STATE]
proof (prove)
using this:
mset_lit (subst_lit L1 \<sigma>') \<in># mset_ecl (C, \<sigma>')

goal (1 subgoal):
 1. mset_ecl (C, \<sigma>') \<noteq> {#}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_ecl (C, \<sigma>') \<noteq> {#}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>\<forall>x. (x \<in> (set_mset (mset_ecl (D,\<sigma>')))
                \<longrightarrow> (\<exists>y \<in> set_mset (mset_ecl (C,\<sigma>')). (x,y) \<in> (mult trm_ord)))\<close>
             and \<open>mset_ecl (C,\<sigma>') \<noteq> {#}\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)
mset_ecl (C, \<sigma>') \<noteq> {#}
[PROOF STEP]
have "({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)
mset_ecl (C, \<sigma>') \<noteq> {#}

goal (1 subgoal):
 1. ({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
using dom [of "(mset_ecl (C,\<sigma>'))" "mset_ecl (D,\<sigma>')" "{#}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>x. x \<in># mset_ecl (D, \<sigma>') \<longrightarrow> (\<exists>y\<in>#mset_ecl (C, \<sigma>'). (x, y) \<in> mult trm_ord)
mset_ecl (C, \<sigma>') \<noteq> {#}
mset_ecl (C, \<sigma>') \<noteq> {#} \<and> (\<forall>k\<in>#mset_ecl (D, \<sigma>'). \<exists>j\<in>#mset_ecl (C, \<sigma>'). (k, j) \<in> mult trm_ord) \<longrightarrow> ({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. ({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
have "(mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)"
[PROOF STATE]
proof (prove)
using this:
({#} + mset_ecl (D, \<sigma>'), {#} + mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. (mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
(mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
have "( (D,\<sigma>'), (C,\<sigma>') ) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
(mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. ((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
unfolding ecl_ord_def
[PROOF STATE]
proof (prove)
using this:
(mset_ecl (D, \<sigma>'), mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. ((D, \<sigma>'), C, \<sigma>') \<in> {(x, y). (mset_ecl x, mset_ecl y) \<in> mult (mult trm_ord)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from st
[PROOF STATE]
proof (chain)
picking this:
subterm t p u'
[PROOF STEP]
obtain t' where rt: "(replace_subterm t p v t')"
[PROOF STATE]
proof (prove)
using this:
subterm t p u'

goal (1 subgoal):
 1. (\<And>t'. replace_subterm t p v t' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using replace_subterm_is_a_function
[PROOF STATE]
proof (prove)
using this:
subterm t p u'
subterm ?t ?p ?u \<Longrightarrow> \<exists>s. replace_subterm ?t ?p ?v s

goal (1 subgoal):
 1. (\<And>t'. replace_subterm t p v t' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
replace_subterm t p v t'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from st
[PROOF STATE]
proof (chain)
picking this:
subterm t p u'
[PROOF STEP]
obtain R Cl_R nt_R L' Cl_C Cl_D  where
            ntr: "nt_R = (dom_trms Cl_R (subst_set
              ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>'))"
            and r: "R = Ecl Cl_R nt_R"
            and clc: "Cl_C = (cl_ecl C)"
            and cld: "Cl_D = (cl_ecl D)"
            and clr: "Cl_R = (subst_cl ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } )) \<sigma>')"
            and l': "L' = mk_lit polarity (Eq t' s)"
[PROOF STATE]
proof (prove)
using this:
subterm t p u'

goal (1 subgoal):
 1. (\<And>nt_R Cl_R R Cl_C Cl_D L'. \<lbrakk>nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'); R = Ecl Cl_R nt_R; Cl_C = cl_ecl C; Cl_D = cl_ecl D; Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'; L' = mk_lit polarity (Eq t' s)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
R = Ecl Cl_R nt_R
Cl_C = cl_ecl C
Cl_D = cl_ecl D
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
L' = mk_lit polarity (Eq t' s)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L1 t s polarity \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
have "vars_of t \<subseteq> vars_of_lit L1"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. vars_of t \<subseteq> vars_of_lit L1
[PROOF STEP]
using orient_lit_inst_vars
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L1 t s polarity \<sigma>'
orient_lit_inst ?L ?t ?s ?p ?\<sigma> \<Longrightarrow> vars_of ?t \<subseteq> vars_of_lit ?L \<and> vars_of ?s \<subseteq> vars_of_lit ?L

goal (1 subgoal):
 1. vars_of t \<subseteq> vars_of_lit L1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of t \<subseteq> vars_of_lit L1

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>L1 \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
L1 \<in> cl_ecl C
[PROOF STEP]
have "vars_of_lit L1 \<subseteq> vars_of_cl (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. vars_of_lit L1 \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit L1 \<subseteq> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of t \<subseteq> vars_of_lit L1\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit L1 \<subseteq> vars_of_cl (cl_ecl C)
vars_of t \<subseteq> vars_of_lit L1
[PROOF STEP]
have "vars_of t \<subseteq>vars_of_cl (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit L1 \<subseteq> vars_of_cl (cl_ecl C)
vars_of t \<subseteq> vars_of_lit L1

goal (1 subgoal):
 1. vars_of t \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of t \<subseteq> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of t \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "coincide_on \<sigma> \<sigma>' (vars_of t)"
[PROOF STATE]
proof (prove)
using this:
vars_of t \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. coincide_on \<sigma> \<sigma>' (vars_of t)
[PROOF STEP]
unfolding coincide_on_def
[PROOF STATE]
proof (prove)
using this:
vars_of t \<subseteq> vars_of_cl (cl_ecl C)
\<forall>x\<in>vars_of_cl (cl_ecl C). Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<forall>x\<in>vars_of t. Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coincide_on \<sigma> \<sigma>' (vars_of t)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
coincide_on \<sigma> \<sigma>' (vars_of t)
[PROOF STEP]
have "subst t \<sigma> = subst t \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of t)

goal (1 subgoal):
 1. t \<lhd> \<sigma> = t \<lhd> \<sigma>'
[PROOF STEP]
using coincide_on_term
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of t)
coincide_on ?\<sigma> ?\<eta> (vars_of ?t) \<Longrightarrow> ?t \<lhd> ?\<sigma> = ?t \<lhd> ?\<eta>

goal (1 subgoal):
 1. t \<lhd> \<sigma> = t \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> = t \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(\<forall>x \<in> (cl_ecl D) - { L2 }. ( (subst_lit x \<sigma>'),(subst_lit L2 \<sigma>'))
                                        \<in> lit_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
have "strictly_maximal_literal D L2 \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. strictly_maximal_literal D L2 \<sigma>'
[PROOF STEP]
unfolding strictly_maximal_literal_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord

goal (1 subgoal):
 1. \<forall>x\<in>cl_ecl D - {L2}. (subst_lit x \<sigma>', subst_lit L2 \<sigma>') \<in> lit_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
strictly_maximal_literal D L2 \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from ntr
[PROOF STATE]
proof (chain)
picking this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
[PROOF STEP]
have "nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set
              ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>')) Ground"
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')

goal (1 subgoal):
 1. nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground
[PROOF STEP]
unfolding get_trms_def
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')

goal (1 subgoal):
 1. nt_R = (if Ground = FirstOrder then filter_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) else dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this \<open>(subst u \<sigma>') \<noteq> (subst v \<sigma>')\<close> \<open>\<not> is_a_variable u'\<close> l1 l2 el1 el2
        \<open>variable_disjoint C D\<close> rte r o1 o2 t st rt l' clr ntr clr clc cld \<open>R = Ecl Cl_R nt_R\<close>
        \<open>( (subst_lit L2 \<sigma>'),(subst_lit L1 \<sigma>'))
            \<in> lit_ord\<close>
        \<open>strictly_maximal_literal D L2 \<sigma>' \<close>
[PROOF STATE]
proof (chain)
picking this:
nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground
u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'
\<not> is_a_variable u'
L1 \<in> cl_ecl C
L2 \<in> cl_ecl D
eligible_literal L1 C \<sigma>'
eligible_literal L2 D \<sigma>'
variable_disjoint C D
allowed_redex u' C \<sigma>'
R = Ecl Cl_R nt_R
orient_lit_inst L1 t s polarity \<sigma>'
orient_lit_inst L2 u v pos \<sigma>'
ck_unifier u' u \<sigma>' Ground
subterm t p u'
replace_subterm t p v t'
L' = mk_lit polarity (Eq t' s)
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
Cl_C = cl_ecl C
Cl_D = cl_ecl D
R = Ecl Cl_R nt_R
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
strictly_maximal_literal D L2 \<sigma>'
[PROOF STEP]
have "superposition C D R \<sigma>' Ground ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } ))"
[PROOF STATE]
proof (prove)
using this:
nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground
u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'
\<not> is_a_variable u'
L1 \<in> cl_ecl C
L2 \<in> cl_ecl D
eligible_literal L1 C \<sigma>'
eligible_literal L2 D \<sigma>'
variable_disjoint C D
allowed_redex u' C \<sigma>'
R = Ecl Cl_R nt_R
orient_lit_inst L1 t s polarity \<sigma>'
orient_lit_inst L2 u v pos \<sigma>'
ck_unifier u' u \<sigma>' Ground
subterm t p u'
replace_subterm t p v t'
L' = mk_lit polarity (Eq t' s)
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
Cl_C = cl_ecl C
Cl_D = cl_ecl D
R = Ecl Cl_R nt_R
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
strictly_maximal_literal D L2 \<sigma>'

goal (1 subgoal):
 1. superposition C D R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
[PROOF STEP]
unfolding superposition_def
[PROOF STATE]
proof (prove)
using this:
nt_R = get_trms Cl_R (dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground
u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>'
\<not> is_a_variable u'
L1 \<in> cl_ecl C
L2 \<in> cl_ecl D
eligible_literal L1 C \<sigma>'
eligible_literal L2 D \<sigma>'
variable_disjoint C D
allowed_redex u' C \<sigma>'
R = Ecl Cl_R nt_R
orient_lit_inst L1 t s polarity \<sigma>'
orient_lit_inst L2 u v pos \<sigma>'
ck_unifier u' u \<sigma>' Ground
subterm t p u'
replace_subterm t p v t'
L' = mk_lit polarity (Eq t' s)
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
Cl_C = cl_ecl C
Cl_D = cl_ecl D
R = Ecl Cl_R nt_R
(subst_lit L2 \<sigma>', subst_lit L1 \<sigma>') \<in> lit_ord
strictly_maximal_literal D L2 \<sigma>'

goal (1 subgoal):
 1. \<exists>L t s u v M p Cl_P1 Cl_P2 Cl_Ca polarity t' u' L'a trms_C. L \<in> Cl_P1 \<and> M \<in> Cl_P2 \<and> eligible_literal L C \<sigma>' \<and> eligible_literal M D \<sigma>' \<and> variable_disjoint C D \<and> Cl_P1 = cl_ecl C \<and> Cl_P2 = cl_ecl D \<and> \<not> is_a_variable u' \<and> allowed_redex u' C \<sigma>' \<and> trms_C = get_trms Cl_Ca (dom_trms Cl_Ca (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')) Ground \<and> R = Ecl Cl_Ca trms_C \<and> orient_lit_inst M u v pos \<sigma>' \<and> orient_lit_inst L t s polarity \<sigma>' \<and> u \<lhd> \<sigma>' \<noteq> v \<lhd> \<sigma>' \<and> subterm t p u' \<and> ck_unifier u' u \<sigma>' Ground \<and> replace_subterm t p v t' \<and> (Ground = FirstOrder \<or> (subst_lit M \<sigma>', subst_lit L \<sigma>') \<in> lit_ord) \<and> (Ground = FirstOrder \<or> strictly_maximal_literal D M \<sigma>') \<and> L'a = mk_lit polarity (Eq t' s) \<and> Cl_Ca = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>' \<and> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}) = Cl_P1 - {L} \<union> (Cl_P2 - {M} \<union> {L'a})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
superposition C D R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from l2
[PROOF STATE]
proof (chain)
picking this:
L2 \<in> cl_ecl D
[PROOF STEP]
have "(subst_lit L2 \<sigma>') \<in> (subst_cl (cl_ecl D) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
L2 \<in> cl_ecl D

goal (1 subgoal):
 1. subst_lit L2 \<sigma>' \<in> subst_cl (cl_ecl D) \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L2 \<sigma>' \<in> subst_cl (cl_ecl D) \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl D) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L2 \<sigma>' \<in> subst_cl (cl_ecl D) \<sigma>'
ground_clause (subst_cl (cl_ecl D) \<sigma>')
[PROOF STEP]
have "vars_of_lit (subst_lit L2 \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
subst_lit L2 \<sigma>' \<in> subst_cl (cl_ecl D) \<sigma>'
ground_clause (subst_cl (cl_ecl D) \<sigma>')

goal (1 subgoal):
 1. vars_of_lit (subst_lit L2 \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L2 \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and o2
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit L2 \<sigma>') = {}
orient_lit_inst L2 u v pos \<sigma>'
[PROOF STEP]
have "vars_of (subst v \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>') = {}
orient_lit_inst L2 u v pos \<sigma>'

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>') = {}
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>') = {}
(L2 = Pos (Eq u v) \<or> L2 = Pos (Eq v u)) \<and> (u \<lhd> \<sigma>', v \<lhd> \<sigma>') \<notin> trm_ord \<and> pos = pos \<or> (L2 = Neg (Eq u v) \<or> L2 = Neg (Eq v u)) \<and> (u \<lhd> \<sigma>', v \<lhd> \<sigma>') \<notin> trm_ord \<and> pos = neg

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>') = {}
[PROOF STEP]
using vars_of_lit.simps vars_of_eq.simps
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>') = {}
(L2 = Pos (Eq u v) \<or> L2 = Pos (Eq v u)) \<and> (u \<lhd> \<sigma>', v \<lhd> \<sigma>') \<notin> trm_ord \<and> pos = pos \<or> (L2 = Neg (Eq u v) \<or> L2 = Neg (Eq v u)) \<and> (u \<lhd> \<sigma>', v \<lhd> \<sigma>') \<notin> trm_ord \<and> pos = neg
vars_of_lit (Pos ?e) = vars_of_eq ?e
vars_of_lit (Neg ?e) = vars_of_eq ?e
vars_of_eq (Eq ?t ?s) = vars_of ?t \<union> vars_of ?s

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>') = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
vars_of (v \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)))\<close>
[PROOF STATE]
proof (chain)
picking this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "(subst_cl (cl_ecl C) \<sigma>') = (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
[PROOF STEP]
using  coincide_on_cl [of  \<sigma> \<sigma>' "(cl_ecl C)"]
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<Longrightarrow> subst_cl (cl_ecl C) \<sigma> = subst_cl (cl_ecl C) \<sigma>'

goal (1 subgoal):
 1. subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "ground_clause (subst_cl (cl_ecl C) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) \<sigma>')
[PROOF STEP]
using
              coincide_on_cl
[PROOF STATE]
proof (prove)
using this:
subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
coincide_on ?\<sigma> ?\<eta> (vars_of_cl ?C) \<Longrightarrow> subst_cl ?C ?\<sigma> = subst_cl ?C ?\<eta>

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl C) \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from l1
[PROOF STATE]
proof (chain)
picking this:
L1 \<in> cl_ecl C
[PROOF STEP]
have "(subst_lit L1 \<sigma>') \<in> (subst_cl (cl_ecl C) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'
ground_clause (subst_cl (cl_ecl C) \<sigma>')
[PROOF STEP]
have "vars_of_lit (subst_lit L1 \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'
ground_clause (subst_cl (cl_ecl C) \<sigma>')

goal (1 subgoal):
 1. vars_of_lit (subst_lit L1 \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L1 \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and o1
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
have "vars_of (subst t \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>') = {}
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = neg

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>') = {}
[PROOF STEP]
using vars_of_lit.simps vars_of_eq.simps
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = neg
vars_of_lit (Pos ?e) = vars_of_eq ?e
vars_of_lit (Neg ?e) = vars_of_eq ?e
vars_of_eq (Eq ?t ?s) = vars_of ?t \<union> vars_of ?s

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>') = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
vars_of (t \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>vars_of_lit (subst_lit L1 \<sigma>') = {}\<close>
          and o1
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
have "vars_of (subst s \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>') = {}
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = neg

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>') = {}
[PROOF STEP]
using vars_of_lit.simps vars_of_eq.simps
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>') = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>', s \<lhd> \<sigma>') \<notin> trm_ord \<and> polarity = neg
vars_of_lit (Pos ?e) = vars_of_eq ?e
vars_of_lit (Neg ?e) = vars_of_eq ?e
vars_of_eq (Eq ?t ?s) = vars_of ?t \<union> vars_of ?s

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>') = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
vars_of (s \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>vars_of (subst t \<sigma>') = {}\<close> and \<open>vars_of (subst v \<sigma>') = {}\<close>
          and rt
[PROOF STATE]
proof (chain)
picking this:
vars_of (t \<lhd> \<sigma>') = {}
vars_of (v \<lhd> \<sigma>') = {}
replace_subterm t p v t'
[PROOF STEP]
have "vars_of (subst t' \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of (t \<lhd> \<sigma>') = {}
vars_of (v \<lhd> \<sigma>') = {}
replace_subterm t p v t'

goal (1 subgoal):
 1. vars_of (t' \<lhd> \<sigma>') = {}
[PROOF STEP]
using ground_replacement [of t p v t' \<sigma>']
[PROOF STATE]
proof (prove)
using this:
vars_of (t \<lhd> \<sigma>') = {}
vars_of (v \<lhd> \<sigma>') = {}
replace_subterm t p v t'
\<lbrakk>replace_subterm t p v t'; ground_term (t \<lhd> \<sigma>'); ground_term (v \<lhd> \<sigma>')\<rbrakk> \<Longrightarrow> ground_term (t' \<lhd> \<sigma>')

goal (1 subgoal):
 1. vars_of (t' \<lhd> \<sigma>') = {}
[PROOF STEP]
unfolding ground_term_def
[PROOF STATE]
proof (prove)
using this:
vars_of (t \<lhd> \<sigma>') = {}
vars_of (v \<lhd> \<sigma>') = {}
replace_subterm t p v t'
\<lbrakk>replace_subterm t p v t'; vars_of (t \<lhd> \<sigma>') = {}; vars_of (v \<lhd> \<sigma>') = {}\<rbrakk> \<Longrightarrow> vars_of (t' \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. vars_of (t' \<lhd> \<sigma>') = {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
vars_of (t' \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>vars_of (subst t' \<sigma>') = {}\<close> and \<open>vars_of (subst s \<sigma>') = {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of (t' \<lhd> \<sigma>') = {}
vars_of (s \<lhd> \<sigma>') = {}
[PROOF STEP]
have "vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of (t' \<lhd> \<sigma>') = {}
vars_of (s \<lhd> \<sigma>') = {}

goal (1 subgoal):
 1. vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from l'
[PROOF STATE]
proof (chain)
picking this:
L' = mk_lit polarity (Eq t' s)
[PROOF STEP]
have "L' = (Pos (Eq t' s)) \<or> L' = (Neg (Eq t' s))"
[PROOF STATE]
proof (prove)
using this:
L' = mk_lit polarity (Eq t' s)

goal (1 subgoal):
 1. L' = Pos (Eq t' s) \<or> L' = Neg (Eq t' s)
[PROOF STEP]
using mk_lit.elims
[PROOF STATE]
proof (prove)
using this:
L' = mk_lit polarity (Eq t' s)
\<lbrakk>mk_lit ?x ?xa = ?y; \<And>x. \<lbrakk>?x = pos; ?xa = x; ?y = Pos x\<rbrakk> \<Longrightarrow> ?P; \<And>x. \<lbrakk>?x = neg; ?xa = x; ?y = Neg x\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. L' = Pos (Eq t' s) \<or> L' = Neg (Eq t' s)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L' = Pos (Eq t' s) \<or> L' = Neg (Eq t' s)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}\<close>
[PROOF STATE]
proof (chain)
picking this:
L' = Pos (Eq t' s) \<or> L' = Neg (Eq t' s)
vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}
[PROOF STEP]
have "vars_of_lit (subst_lit L' \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
L' = Pos (Eq t' s) \<or> L' = Neg (Eq t' s)
vars_of_eq (subst_equation (Eq t' s) \<sigma>') = {}

goal (1 subgoal):
 1. vars_of_lit (subst_lit L' \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L' \<sigma>') = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>C \<in> S\<close> and \<open>D \<in> S\<close> and
          \<open>superposition C D R \<sigma>' Ground ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } ))\<close>
[PROOF STATE]
proof (chain)
picking this:
C \<in> S
D \<in> S
superposition C D R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
[PROOF STEP]
have "derivable R { C,D } S \<sigma>' Ground ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } ))"
[PROOF STATE]
proof (prove)
using this:
C \<in> S
D \<in> S
superposition C D R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))

goal (1 subgoal):
 1. derivable R {C, D} S \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
[PROOF STEP]
unfolding derivable_def
[PROOF STATE]
proof (prove)
using this:
C \<in> S
D \<in> S
superposition C D R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))

goal (1 subgoal):
 1. (\<exists>P1 P2. P1 \<in> S \<and> P2 \<in> S \<and> {C, D} = {P1, P2} \<and> superposition P1 P2 R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))) \<or> (\<exists>P1. P1 \<in> S \<and> {C, D} = {P1} \<and> factorization P1 R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))) \<or> (\<exists>P1. P1 \<in> S \<and> {C, D} = {P1} \<and> reflexion P1 R \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
derivable R {C, D} S \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "ground_clause Cl_R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ground_clause Cl_R
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
assume "\<not>ground_clause Cl_R"
[PROOF STATE]
proof (state)
this:
\<not> ground_clause Cl_R

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> ground_clause Cl_R
[PROOF STEP]
have "vars_of_cl Cl_R \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
\<not> ground_clause Cl_R

goal (1 subgoal):
 1. vars_of_cl Cl_R \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_cl Cl_R \<noteq> {}

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vars_of_cl Cl_R \<noteq> {}
[PROOF STEP]
obtain M where "M \<in> Cl_R" and "vars_of_lit M \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_cl Cl_R \<noteq> {}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> Cl_R; vars_of_lit M \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M \<in> Cl_R
vars_of_lit M \<noteq> {}

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
from \<open>M \<in> Cl_R\<close> and clr
[PROOF STATE]
proof (chain)
picking this:
M \<in> Cl_R
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
[PROOF STEP]
obtain M' where "M = (subst_lit M' \<sigma>')"
          and "M' \<in> ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } )) "
[PROOF STATE]
proof (prove)
using this:
M \<in> Cl_R
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'

goal (1 subgoal):
 1. (\<And>M'. \<lbrakk>M = subst_lit M' \<sigma>'; M' \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M = subst_lit M' \<sigma>'
M' \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
assume "M' = L'"
[PROOF STATE]
proof (state)
this:
M' = L'

goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of_lit (subst_lit L' \<sigma>') = {}\<close> and \<open>vars_of_lit M \<noteq> {}\<close>
              and \<open>M = (subst_lit M' \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
M' = L'
vars_of_lit (subst_lit L' \<sigma>') = {}
vars_of_lit M \<noteq> {}
M = subst_lit M' \<sigma>'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
M' = L'
vars_of_lit (subst_lit L' \<sigma>') = {}
vars_of_lit M \<noteq> {}
M = subst_lit M' \<sigma>'

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
assume "M' \<noteq> L'"
[PROOF STATE]
proof (state)
this:
M' \<noteq> L'

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
from this and l1 clc cld and \<open>M' \<in>(Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } )\<close>
[PROOF STATE]
proof (chain)
picking this:
M' \<noteq> L'
L1 \<in> cl_ecl C
Cl_C = cl_ecl C
Cl_D = cl_ecl D
M' \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})
[PROOF STEP]
have "M' \<in> (cl_ecl C) \<or> M' \<in> (cl_ecl D)"
[PROOF STATE]
proof (prove)
using this:
M' \<noteq> L'
L1 \<in> cl_ecl C
Cl_C = cl_ecl C
Cl_D = cl_ecl D
M' \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})

goal (1 subgoal):
 1. M' \<in> cl_ecl C \<or> M' \<in> cl_ecl D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M' \<in> cl_ecl C \<or> M' \<in> cl_ecl D

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
M' \<in> cl_ecl C \<or> M' \<in> cl_ecl D
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
M' \<in> cl_ecl C \<or> M' \<in> cl_ecl D

goal (1 subgoal):
 1. False
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. M' \<in> cl_ecl C \<Longrightarrow> False
 2. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
assume "M' \<in> (cl_ecl C)"
[PROOF STATE]
proof (state)
this:
M' \<in> cl_ecl C

goal (2 subgoals):
 1. M' \<in> cl_ecl C \<Longrightarrow> False
 2. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
M' \<in> cl_ecl C
ground_clause (subst_cl (cl_ecl C) \<sigma>')
[PROOF STEP]
have
              "vars_of_lit (subst_lit M' \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
M' \<in> cl_ecl C
ground_clause (subst_cl (cl_ecl C) \<sigma>')

goal (1 subgoal):
 1. vars_of_lit (subst_lit M' \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit M' \<sigma>') = {}

goal (2 subgoals):
 1. M' \<in> cl_ecl C \<Longrightarrow> False
 2. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>M = (subst_lit M' \<sigma>')\<close> and
              \<open>vars_of_lit M \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit M' \<sigma>') = {}
M = subst_lit M' \<sigma>'
vars_of_lit M \<noteq> {}
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit M' \<sigma>') = {}
M = subst_lit M' \<sigma>'
vars_of_lit M \<noteq> {}

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
assume "M' \<in> (cl_ecl D)"
[PROOF STATE]
proof (state)
this:
M' \<in> cl_ecl D

goal (1 subgoal):
 1. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl D) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
M' \<in> cl_ecl D
ground_clause (subst_cl (cl_ecl D) \<sigma>')
[PROOF STEP]
have
              "vars_of_lit (subst_lit M' \<sigma>') = {}"
[PROOF STATE]
proof (prove)
using this:
M' \<in> cl_ecl D
ground_clause (subst_cl (cl_ecl D) \<sigma>')

goal (1 subgoal):
 1. vars_of_lit (subst_lit M' \<sigma>') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit M' \<sigma>') = {}

goal (1 subgoal):
 1. M' \<in> cl_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>M = (subst_lit M' \<sigma>')\<close> and
              \<open>vars_of_lit M \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit M' \<sigma>') = {}
M = subst_lit M' \<sigma>'
vars_of_lit M \<noteq> {}
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit M' \<sigma>') = {}
M = subst_lit M' \<sigma>'
vars_of_lit M \<noteq> {}

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ground_clause Cl_R

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>')\<close> and \<open>ground_clause (subst_cl (cl_ecl D) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>')
ground_clause (subst_cl (cl_ecl D) \<sigma>')
[PROOF STEP]
have "grounding_set { C,D } \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>')
ground_clause (subst_cl (cl_ecl D) \<sigma>')

goal (1 subgoal):
 1. grounding_set {C, D} \<sigma>'
[PROOF STEP]
unfolding grounding_set_def
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>')
ground_clause (subst_cl (cl_ecl D) \<sigma>')

goal (1 subgoal):
 1. \<forall>x. x \<in> {C, D} \<longrightarrow> ground_clause (subst_cl (cl_ecl x) \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
grounding_set {C, D} \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause Cl_R\<close> and \<open>R = Ecl Cl_R nt_R\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause Cl_R
R = Ecl Cl_R nt_R
[PROOF STEP]
have "ground_clause (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
ground_clause Cl_R
R = Ecl Cl_R nt_R

goal (1 subgoal):
 1. ground_clause (cl_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_clause (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>derivable R { C,D } S \<sigma>' Ground ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } ))\<close>
          and \<open>ground_inference_saturated S\<close> \<open>grounding_set { C,D } \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (cl_ecl R)
derivable R {C, D} S \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
ground_inference_saturated S
grounding_set {C, D} \<sigma>'
[PROOF STEP]
have "(redundant_inference R S { C,D } \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
ground_clause (cl_ecl R)
derivable R {C, D} S \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
ground_inference_saturated S
grounding_set {C, D} \<sigma>'

goal (1 subgoal):
 1. redundant_inference R S {C, D} \<sigma>'
[PROOF STEP]
unfolding ground_inference_saturated_def
[PROOF STATE]
proof (prove)
using this:
ground_clause (cl_ecl R)
derivable R {C, D} S \<sigma>' Ground (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}))
\<forall>C P \<sigma> C'. derivable C P S \<sigma> Ground C' \<longrightarrow> ground_clause (cl_ecl C) \<longrightarrow> grounding_set P \<sigma> \<longrightarrow> redundant_inference C S P \<sigma>
grounding_set {C, D} \<sigma>'

goal (1 subgoal):
 1. redundant_inference R S {C, D} \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
redundant_inference R S {C, D} \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
redundant_inference R S {C, D} \<sigma>'
[PROOF STEP]
obtain S' where "S' \<subseteq> (instances S)" and
          "(set_entails_clause (clset_instances S') (cl_ecl R))"
          and order: "(\<forall>x \<in> S'. (((fst x),(snd x)),(C,\<sigma>')) \<in> ecl_ord
          \<or> (((fst x),(snd x)),(D,\<sigma>')) \<in> ecl_ord)"
          and all_normalized_term_included: "(\<forall>x \<in> S'.
          (subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x))
              (trms_ecl R)))"
[PROOF STATE]
proof (prove)
using this:
redundant_inference R S {C, D} \<sigma>'

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding redundant_inference_def
[PROOF STATE]
proof (prove)
using this:
\<exists>S'\<subseteq>instances S. set_entails_clause (clset_instances S') (cl_ecl R) \<and> (\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)) \<and> (\<forall>x\<in>S'. \<exists>D'\<in>{C, D}. ((fst x, snd x), D', \<sigma>') \<in> ecl_ord)

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S' \<subseteq> instances S
set_entails_clause (clset_instances S') (cl_ecl R)
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have all_smaller: "(\<forall>x \<in> S'. (((fst x),(snd x)),(C,\<sigma>)) \<in> ecl_ord)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(\<forall>x \<in> S'. (((fst x),(snd x)),(C,\<sigma>)) \<in> ecl_ord)"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord)
[PROOF STEP]
obtain x where "x \<in> S'" and "(((fst x),(snd x)),(C,\<sigma>)) \<notin> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> S'; ((fst x, snd x), C, \<sigma>) \<notin> ecl_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> S'
((fst x, snd x), C, \<sigma>) \<notin> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
from \<open>x \<in> S'\<close> and order
[PROOF STATE]
proof (chain)
picking this:
x \<in> S'
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord
[PROOF STEP]
have "(((fst x),(snd x)),(C,\<sigma>')) \<in> ecl_ord
          \<or> (((fst x),(snd x)),(D,\<sigma>')) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
x \<in> S'
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord
[PROOF STEP]
have "(((fst x),(snd x)),(C,\<sigma>')) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<or> ((fst x, snd x), D, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
 2. ((fst x, snd x), D, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
assume "(((fst x),(snd x)),(C,\<sigma>')) \<in> ecl_ord"
[PROOF STATE]
proof (state)
this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal (2 subgoals):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
 2. ((fst x, snd x), D, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), D, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((fst x, snd x), D, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
assume "(((fst x),(snd x)),(D,\<sigma>')) \<in> ecl_ord"
[PROOF STATE]
proof (state)
this:
((fst x, snd x), D, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), D, \<sigma>') \<in> ecl_ord \<Longrightarrow> ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
from this and \<open>( (D,\<sigma>'),(C,\<sigma>')) \<in> ecl_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
((fst x, snd x), D, \<sigma>') \<in> ecl_ord
((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
show
              "(((fst x),(snd x)),(C,\<sigma>')) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), D, \<sigma>') \<in> ecl_ord
((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
using ecl_ord_trans
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), D, \<sigma>') \<in> ecl_ord
((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord
trans ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
unfolding trans_def
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), D, \<sigma>') \<in> ecl_ord
((D, \<sigma>'), C, \<sigma>') \<in> ecl_ord
\<forall>x y z. (x, y) \<in> ecl_ord \<longrightarrow> (y, z) \<in> ecl_ord \<longrightarrow> (x, z) \<in> ecl_ord

goal (1 subgoal):
 1. ((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord
[PROOF STEP]
have
            "((mset_ecl x), (mset_ecl (C,\<sigma>'))) \<in> (mult (mult trm_ord))"
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), C, \<sigma>') \<in> ecl_ord

goal (1 subgoal):
 1. (mset_ecl x, mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
unfolding ecl_ord_def
[PROOF STATE]
proof (prove)
using this:
((fst x, snd x), C, \<sigma>') \<in> {(x, y). (mset_ecl x, mset_ecl y) \<in> mult (mult trm_ord)}

goal (1 subgoal):
 1. (mset_ecl x, mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(mset_ecl x, mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
from \<open>(coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)))\<close>
[PROOF STATE]
proof (chain)
picking this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "(mset_ecl (C,\<sigma>')) = (mset_ecl (C,\<sigma>))"
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. mset_ecl (C, \<sigma>') = mset_ecl (C, \<sigma>)
[PROOF STEP]
using ecl_ord_coincide [of \<sigma> \<sigma>' C]
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C)) \<Longrightarrow> mset_ecl (C, \<sigma>) = mset_ecl (C, \<sigma>')

goal (1 subgoal):
 1. mset_ecl (C, \<sigma>') = mset_ecl (C, \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset_ecl (C, \<sigma>') = mset_ecl (C, \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>((mset_ecl x), (mset_ecl (C,\<sigma>'))) \<in> (mult (mult trm_ord))\<close>
[PROOF STATE]
proof (chain)
picking this:
mset_ecl (C, \<sigma>') = mset_ecl (C, \<sigma>)
(mset_ecl x, mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)
[PROOF STEP]
have "((mset_ecl x), (mset_ecl (C,\<sigma>))) \<in> (mult (mult trm_ord))"
[PROOF STATE]
proof (prove)
using this:
mset_ecl (C, \<sigma>') = mset_ecl (C, \<sigma>)
(mset_ecl x, mset_ecl (C, \<sigma>')) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. (mset_ecl x, mset_ecl (C, \<sigma>)) \<in> mult (mult trm_ord)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(mset_ecl x, mset_ecl (C, \<sigma>)) \<in> mult (mult trm_ord)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not>(((fst x),(snd x)),(C,\<sigma>)) \<in> ecl_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
(mset_ecl x, mset_ecl (C, \<sigma>)) \<in> mult (mult trm_ord)
((fst x, snd x), C, \<sigma>) \<notin> ecl_ord
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(mset_ecl x, mset_ecl (C, \<sigma>)) \<in> mult (mult trm_ord)
((fst x, snd x), C, \<sigma>) \<notin> ecl_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding ecl_ord_def
[PROOF STATE]
proof (prove)
using this:
(mset_ecl x, mset_ecl (C, \<sigma>)) \<in> mult (mult trm_ord)
((fst x, snd x), C, \<sigma>) \<notin> {(x, y). (mset_ecl x, mset_ecl y) \<in> mult (mult trm_ord)}

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
assume "\<not> validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (state)
this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
obtain x where "x \<in>(clset_instances S')" and "\<not>validate_clause ?I x"
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_clause_set.simps
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
validate_clause_set ?I ?S = (\<forall>C. C \<in> ?S \<longrightarrow> validate_clause ?I C)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> clset_instances S'
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>x \<in>(clset_instances S')\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in> clset_instances S'
[PROOF STEP]
obtain pair' where "pair' \<in> S'"
          and "x = (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
x \<in> clset_instances S'

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding clset_instances_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {C. \<exists>x. x \<in> S' \<and> C = subst_cl (cl_ecl (fst x)) (snd x)}

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pair' \<in> S'
x = subst_cl (cl_ecl (fst pair')) (snd pair')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from all_smaller and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'
[PROOF STEP]
have "(pair',(C,\<sigma>)) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'

goal (1 subgoal):
 1. (pair', C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and  \<open>C = fst pair\<close> and \<open>\<sigma> = snd pair\<close>
[PROOF STATE]
proof (chain)
picking this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair
[PROOF STEP]
have "(pair',pair) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair

goal (1 subgoal):
 1. (pair', pair) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', pair) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and hyp_ind
[PROOF STATE]
proof (chain)
picking this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))
[PROOF STEP]
have "?P pair'"
[PROOF STATE]
proof (prove)
using this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>pair' \<in> S'\<close> and all_normalized_term_included
[PROOF STATE]
proof (chain)
picking this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)
[PROOF STEP]
have
          "(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair'))
             (trms_ecl R))"
[PROOF STATE]
proof (prove)
using this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
have i: "(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (state)
this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
obtain w w' where "w \<in> subst_set (trms_ecl (fst pair')) (snd pair')"
           and "occurs_in w' w"
            "trm_rep w' S \<noteq> w'"
[PROOF STATE]
proof (prove)
using this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. (\<And>w w'. \<lbrakk>w \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in w' w; trm_rep w' S \<noteq> w'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x y. x \<in> subst_set (trms_ecl (fst pair')) (snd pair') \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y)

goal (1 subgoal):
 1. (\<And>w w'. \<lbrakk>w \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in w' w; trm_rep w' S \<noteq> w'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
w \<in> subst_set (trms_ecl (fst pair')) (snd pair')
occurs_in w' w
trm_rep w' S \<noteq> w'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>w \<in> subst_set (trms_ecl (fst pair')) (snd pair')\<close> and
          \<open>(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair'))
             (trms_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
w \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
obtain w'' where "w'' \<in> trms_ecl R" and "occurs_in w w''"
[PROOF STATE]
proof (prove)
using this:
w \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. (\<And>w''. \<lbrakk>w'' \<in> trms_ecl R; occurs_in w w''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding subterms_inclusion_def
[PROOF STATE]
proof (prove)
using this:
w \<in> subst_set (trms_ecl (fst pair')) (snd pair')
\<forall>x1\<in>subst_set (trms_ecl (fst pair')) (snd pair'). Bex (trms_ecl R) (occurs_in x1)

goal (1 subgoal):
 1. (\<And>w''. \<lbrakk>w'' \<in> trms_ecl R; occurs_in w w''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w'' \<in> trms_ecl R
occurs_in w w''

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>occurs_in w w''\<close> and \<open>occurs_in w' w\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in w w''
occurs_in w' w
[PROOF STEP]
have "occurs_in w' w''"
[PROOF STATE]
proof (prove)
using this:
occurs_in w w''
occurs_in w' w

goal (1 subgoal):
 1. occurs_in w' w''
[PROOF STEP]
using occur_in_subterm
[PROOF STATE]
proof (prove)
using this:
occurs_in w w''
occurs_in w' w
\<lbrakk>occurs_in ?u ?t; occurs_in ?t ?s\<rbrakk> \<Longrightarrow> occurs_in ?u ?s

goal (1 subgoal):
 1. occurs_in w' w''
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
occurs_in w' w''

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from  ntr
[PROOF STATE]
proof (chain)
picking this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
[PROOF STEP]
have "nt_R \<subseteq> (subst_set ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')

goal (1 subgoal):
 1. nt_R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
[PROOF STEP]
using dom_trms_subset [of Cl_R "(subst_set ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>')"]
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>')
dom_trms Cl_R (subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>') \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'

goal (1 subgoal):
 1. nt_R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
nt_R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and r
[PROOF STATE]
proof (chain)
picking this:
nt_R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
R = Ecl Cl_R nt_R
[PROOF STEP]
have "trms_ecl R \<subseteq> (subst_set ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
nt_R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
R = Ecl Cl_R nt_R

goal (1 subgoal):
 1. trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>w'' \<in> trms_ecl R\<close>
[PROOF STATE]
proof (chain)
picking this:
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
w'' \<in> trms_ecl R
[PROOF STEP]
have
            "w'' \<in> (subst_set ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) }) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
w'' \<in> trms_ecl R

goal (1 subgoal):
 1. w'' \<in> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
w'' \<in> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
w'' \<in> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'
[PROOF STEP]
obtain w'''
            where "w''' \<in> ((trms_ecl C) \<union> (trms_ecl D) \<union>
              { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) })" and "w'' = subst w''' \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
w'' \<in> subst_set (trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}) \<sigma>'

goal (1 subgoal):
 1. (\<And>w'''. \<lbrakk>w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}; w'' = w''' \<lhd> \<sigma>'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}
w'' = w''' \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>occurs_in w' w''\<close>
[PROOF STATE]
proof (chain)
picking this:
w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}
w'' = w''' \<lhd> \<sigma>'
occurs_in w' w''
[PROOF STEP]
have "occurs_in w' (subst w''' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}
w'' = w''' \<lhd> \<sigma>'
occurs_in w' w''

goal (1 subgoal):
 1. occurs_in w' (w''' \<lhd> \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
occurs_in w' (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
have "\<not> (w''' \<in> trms_ecl C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w''' \<notin> trms_ecl C
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
assume "w''' \<in> trms_ecl C"
[PROOF STATE]
proof (state)
this:
w''' \<in> trms_ecl C

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>occurs_in w' w''\<close> and \<open>w'' = subst w''' \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
w''' \<in> trms_ecl C
occurs_in w' w''
w'' = w''' \<lhd> \<sigma>'
[PROOF STEP]
have
              "occurs_in w' (subst w''' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
w''' \<in> trms_ecl C
occurs_in w' w''
w'' = w''' \<lhd> \<sigma>'

goal (1 subgoal):
 1. occurs_in w' (w''' \<lhd> \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
occurs_in w' (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from assms(3) and \<open>C \<in> S\<close> and \<open>w''' \<in> trms_ecl C\<close>
[PROOF STATE]
proof (chain)
picking this:
Ball S well_constrained
C \<in> S
w''' \<in> trms_ecl C
[PROOF STEP]
have "vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
Ball S well_constrained
C \<in> S
w''' \<in> trms_ecl C

goal (1 subgoal):
 1. vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
using dom_trm_vars
[PROOF STATE]
proof (prove)
using this:
Ball S well_constrained
C \<in> S
w''' \<in> trms_ecl C
dom_trm ?t ?C \<Longrightarrow> vars_of ?t \<subseteq> vars_of_cl ?C

goal (1 subgoal):
 1. vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
unfolding Ball_def well_constrained_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x. x \<in> S \<longrightarrow> (\<forall>y. y \<in> trms_ecl x \<longrightarrow> dom_trm y (cl_ecl x))
C \<in> S
w''' \<in> trms_ecl C
dom_trm ?t ?C \<Longrightarrow> vars_of ?t \<subseteq> vars_of_cl ?C

goal (1 subgoal):
 1. vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "coincide_on \<sigma> \<sigma>' (vars_of w''')"
[PROOF STATE]
proof (prove)
using this:
vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. coincide_on \<sigma> \<sigma>' (vars_of w''')
[PROOF STEP]
unfolding coincide_on_def
[PROOF STATE]
proof (prove)
using this:
vars_of w''' \<subseteq> vars_of_cl (cl_ecl C)
\<forall>x\<in>vars_of_cl (cl_ecl C). Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<forall>x\<in>vars_of w'''. Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coincide_on \<sigma> \<sigma>' (vars_of w''')

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
coincide_on \<sigma> \<sigma>' (vars_of w''')
[PROOF STEP]
have "subst w''' \<sigma> = subst w''' \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of w''')

goal (1 subgoal):
 1. w''' \<lhd> \<sigma> = w''' \<lhd> \<sigma>'
[PROOF STEP]
using coincide_on_term
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of w''')
coincide_on ?\<sigma> ?\<eta> (vars_of ?t) \<Longrightarrow> ?t \<lhd> ?\<sigma> = ?t \<lhd> ?\<eta>

goal (1 subgoal):
 1. w''' \<lhd> \<sigma> = w''' \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w''' \<lhd> \<sigma> = w''' \<lhd> \<sigma>'

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this
              and \<open>occurs_in w' (subst w''' \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
w''' \<lhd> \<sigma> = w''' \<lhd> \<sigma>'
occurs_in w' (w''' \<lhd> \<sigma>')
[PROOF STEP]
have "occurs_in w' (subst w''' \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
w''' \<lhd> \<sigma> = w''' \<lhd> \<sigma>'
occurs_in w' (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. occurs_in w' (w''' \<lhd> \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
occurs_in w' (w''' \<lhd> \<sigma>)

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>w''' \<in> trms_ecl C\<close>
              \<open>(all_trms_irreducible (subst_set (trms_ecl C) \<sigma>)
                  (\<lambda>t. (trm_rep t S)))\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in w' (w''' \<lhd> \<sigma>)
w''' \<in> trms_ecl C
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
[PROOF STEP]
have "trm_rep w' S = w'"
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>)
w''' \<in> trms_ecl C
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>)
w''' \<in> trms_ecl C
\<forall>x y. x \<in> subst_set (trms_ecl C) \<sigma> \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
using subst_set.simps
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>)
w''' \<in> trms_ecl C
\<forall>x y. x \<in> subst_set (trms_ecl C) \<sigma> \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y
subst_set ?S ?\<sigma> = {t \<lhd> ?\<sigma> |t. t \<in> ?S}

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep w' S = w'

goal (1 subgoal):
 1. w''' \<in> trms_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>trm_rep w' S \<noteq> w'\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
w''' \<notin> trms_ecl C

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
have "\<not> (w''' \<in> trms_ecl D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w''' \<notin> trms_ecl D
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. w''' \<in> trms_ecl D \<Longrightarrow> False
[PROOF STEP]
assume "w''' \<in> trms_ecl D"
[PROOF STATE]
proof (state)
this:
w''' \<in> trms_ecl D

goal (1 subgoal):
 1. w''' \<in> trms_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>occurs_in w' w''\<close> and \<open>w'' = subst w''' \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
w''' \<in> trms_ecl D
occurs_in w' w''
w'' = w''' \<lhd> \<sigma>'
[PROOF STEP]
have
              "occurs_in w' (subst w''' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
w''' \<in> trms_ecl D
occurs_in w' w''
w'' = w''' \<lhd> \<sigma>'

goal (1 subgoal):
 1. occurs_in w' (w''' \<lhd> \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
occurs_in w' (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. w''' \<in> trms_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>w''' \<in> trms_ecl D\<close>
              \<open>(all_trms_irreducible (subst_set (trms_ecl D) \<sigma>')
                  (\<lambda>t. (trm_rep t S)))\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in w' (w''' \<lhd> \<sigma>')
w''' \<in> trms_ecl D
all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S)
[PROOF STEP]
have "trm_rep w' S = w'"
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>')
w''' \<in> trms_ecl D
all_trms_irreducible (subst_set (trms_ecl D) \<sigma>') (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>')
w''' \<in> trms_ecl D
\<forall>x y. x \<in> subst_set (trms_ecl D) \<sigma>' \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
using subst_set.simps
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>')
w''' \<in> trms_ecl D
\<forall>x y. x \<in> subst_set (trms_ecl D) \<sigma>' \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y
subst_set ?S ?\<sigma> = {t \<lhd> ?\<sigma> |t. t \<in> ?S}

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep w' S = w'

goal (1 subgoal):
 1. w''' \<in> trms_ecl D \<Longrightarrow> False
[PROOF STEP]
from this and \<open>trm_rep w' S \<noteq> w'\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
w''' \<notin> trms_ecl D

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and
          \<open>w''' \<in> ((trms_ecl C) \<union> (trms_ecl D)
            \<union> { r. \<exists> q. (q,p) \<in> (pos_ord C t) \<and> (subterm t q r) })\<close>
          and \<open>\<not> (w''' \<in> trms_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
w''' \<notin> trms_ecl D
w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}
w''' \<notin> trms_ecl C
[PROOF STEP]
obtain q_w where "(subterm t q_w w''')" and "(q_w,p) \<in> (pos_ord C t)"
[PROOF STATE]
proof (prove)
using this:
w''' \<notin> trms_ecl D
w''' \<in> trms_ecl C \<union> trms_ecl D \<union> {r. \<exists>q. (q, p) \<in> pos_ord C t \<and> subterm t q r}
w''' \<notin> trms_ecl C

goal (1 subgoal):
 1. (\<And>q_w. \<lbrakk>subterm t q_w w'''; (q_w, p) \<in> pos_ord C t\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterm t q_w w'''
(q_w, p) \<in> pos_ord C t

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>subterm t q_w w'''\<close>
[PROOF STATE]
proof (chain)
picking this:
subterm t q_w w'''
[PROOF STEP]
have "subterm (subst t \<sigma>') q_w (subst w''' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
subterm t q_w w'''

goal (1 subgoal):
 1. subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')
[PROOF STEP]
using substs_preserve_subterms
[PROOF STATE]
proof (prove)
using this:
subterm t q_w w'''
subterm ?t ?p ?s \<Longrightarrow> subterm (?t \<lhd> ?\<sigma>) ?p (?s \<lhd> ?\<sigma>)

goal (1 subgoal):
 1. subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>occurs_in w' (subst w''' \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in w' (w''' \<lhd> \<sigma>')
[PROOF STEP]
obtain q
            where "(subterm  (subst w''' \<sigma>') q w')"
[PROOF STATE]
proof (prove)
using this:
occurs_in w' (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. (\<And>q. subterm (w''' \<lhd> \<sigma>') q w' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding occurs_in_def
[PROOF STATE]
proof (prove)
using this:
\<exists>p. subterm (w''' \<lhd> \<sigma>') p w'

goal (1 subgoal):
 1. (\<And>q. subterm (w''' \<lhd> \<sigma>') q w' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
subterm (w''' \<lhd> \<sigma>') q w'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>subterm (subst t \<sigma>') q_w (subst w''' \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
subterm (w''' \<lhd> \<sigma>') q w'
subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')
[PROOF STEP]
have "subterm (subst t \<sigma>') (append q_w q) w'"
[PROOF STATE]
proof (prove)
using this:
subterm (w''' \<lhd> \<sigma>') q w'
subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')

goal (1 subgoal):
 1. subterm (t \<lhd> \<sigma>') (q_w @ q) w'
[PROOF STEP]
using subterm_of_a_subterm_is_a_subterm
[PROOF STATE]
proof (prove)
using this:
subterm (w''' \<lhd> \<sigma>') q w'
subterm (t \<lhd> \<sigma>') q_w (w''' \<lhd> \<sigma>')
\<lbrakk>subterm ?u ?q ?v; subterm ?t ?p ?u\<rbrakk> \<Longrightarrow> subterm ?t (?p @ ?q) ?v

goal (1 subgoal):
 1. subterm (t \<lhd> \<sigma>') (q_w @ q) w'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
subterm (t \<lhd> \<sigma>') (q_w @ q) w'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(subst t \<sigma>) = (subst t \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
subterm (t \<lhd> \<sigma>') (q_w @ q) w'
t \<lhd> \<sigma> = t \<lhd> \<sigma>'
[PROOF STEP]
have "subterm (subst t \<sigma>) (append q_w q) w'"
[PROOF STATE]
proof (prove)
using this:
subterm (t \<lhd> \<sigma>') (q_w @ q) w'
t \<lhd> \<sigma> = t \<lhd> \<sigma>'

goal (1 subgoal):
 1. subterm (t \<lhd> \<sigma>) (q_w @ q) w'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterm (t \<lhd> \<sigma>) (q_w @ q) w'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>(q_w,p) \<in> (pos_ord C t)\<close>
[PROOF STATE]
proof (chain)
picking this:
(q_w, p) \<in> pos_ord C t
[PROOF STEP]
have "((append q_w q),p) \<in> (pos_ord C t)"
[PROOF STATE]
proof (prove)
using this:
(q_w, p) \<in> pos_ord C t

goal (1 subgoal):
 1. (q_w @ q, p) \<in> pos_ord C t
[PROOF STEP]
using pos_ord_prefix
[PROOF STATE]
proof (prove)
using this:
(q_w, p) \<in> pos_ord C t
\<forall>x y p q r. (q, p) \<in> pos_ord x y \<longrightarrow> (q @ r, p) \<in> pos_ord x y

goal (1 subgoal):
 1. (q_w @ q, p) \<in> pos_ord C t
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(q_w @ q, p) \<in> pos_ord C t

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>minimal_redex p (subst t \<sigma>) C S t\<close>
            and \<open>subterm (subst t \<sigma>) (append q_w q) w'\<close>
[PROOF STATE]
proof (chain)
picking this:
(q_w @ q, p) \<in> pos_ord C t
minimal_redex p (t \<lhd> \<sigma>) C S t
subterm (t \<lhd> \<sigma>) (q_w @ q) w'
[PROOF STEP]
have "trm_rep w' S = w'"
[PROOF STATE]
proof (prove)
using this:
(q_w @ q, p) \<in> pos_ord C t
minimal_redex p (t \<lhd> \<sigma>) C S t
subterm (t \<lhd> \<sigma>) (q_w @ q) w'

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
unfolding minimal_redex_def
[PROOF STATE]
proof (prove)
using this:
(q_w @ q, p) \<in> pos_ord C t
\<forall>q s. (q, p) \<in> pos_ord C t \<longrightarrow> subterm (t \<lhd> \<sigma>) q s \<longrightarrow> trm_rep s S = s
subterm (t \<lhd> \<sigma>) (q_w @ q) w'

goal (1 subgoal):
 1. trm_rep w' S = w'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep w' S = w'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>trm_rep w' S \<noteq> w'\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep w' S = w'
trm_rep w' S \<noteq> w'

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          ii: "ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          iii: "(fst pair') \<in> S"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
fst pair' \<in> S

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>?P pair'\<close> and i ii iii
[PROOF STATE]
proof (chain)
picking this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S
[PROOF STEP]
have "validate_ground_clause ?I
          (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and \<open>x = (subst_cl (cl_ecl (fst pair')) (snd pair'))\<close>
          and \<open>\<not>validate_clause ?I x\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis ii substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>fo_interpretation ?I\<close> and
        \<open>(set_entails_clause (clset_instances S') (cl_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)
[PROOF STEP]
have "validate_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
unfolding set_entails_clause_def
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
\<forall>I. fo_interpretation I \<longrightarrow> validate_clause_set I (clset_instances S') \<longrightarrow> validate_clause I (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
have "validate_ground_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by (metis \<open>R = Ecl Cl_R nt_R\<close> \<open>ground_clause Cl_R\<close>
            cl_ecl.simps substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
obtain L'' where "L'' \<in> (cl_ecl R)" and "validate_ground_lit ?I L''"
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. (\<And>L''. \<lbrakk>L'' \<in> cl_ecl R; validate_ground_lit (int_clset S) L''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_ground_clause.simps
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)
validate_ground_clause ?I ?C = (\<exists>L. L \<in> ?C \<and> validate_ground_lit ?I L)

goal (1 subgoal):
 1. (\<And>L''. \<lbrakk>L'' \<in> cl_ecl R; validate_ground_lit (int_clset S) L''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L'' \<in> cl_ecl R
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from \<open>L'' \<in> (cl_ecl R)\<close> and \<open>R = Ecl Cl_R nt_R\<close> and
          \<open>Cl_R = (subst_cl ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } )) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
L'' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'
[PROOF STEP]
obtain M where m: "M \<in> ((Cl_C - { L1 }) \<union> ((Cl_D - { L2 }) \<union> { L' } ))"
          and "L'' = subst_lit M \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
L'' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})) \<sigma>'

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'}); L'' = subst_lit M \<sigma>'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})
L'' = subst_lit M \<sigma>'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "M \<notin> cl_ecl C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<notin> cl_ecl C
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
assume "M \<in> cl_ecl C"
[PROOF STATE]
proof (state)
this:
M \<in> cl_ecl C

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
M \<in> cl_ecl C
[PROOF STEP]
have "vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
M \<in> cl_ecl C

goal (1 subgoal):
 1. vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "coincide_on \<sigma> \<sigma>' (vars_of_lit M)"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)
coincide_on \<sigma> \<sigma>' (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. coincide_on \<sigma> \<sigma>' (vars_of_lit M)
[PROOF STEP]
unfolding coincide_on_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit M \<subseteq> vars_of_cl (cl_ecl C)
\<forall>x\<in>vars_of_cl (cl_ecl C). Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'

goal (1 subgoal):
 1. \<forall>x\<in>vars_of_lit M. Var x \<lhd> \<sigma> = Var x \<lhd> \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coincide_on \<sigma> \<sigma>' (vars_of_lit M)

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
coincide_on \<sigma> \<sigma>' (vars_of_lit M)
[PROOF STEP]
have "subst_lit M \<sigma> = subst_lit M \<sigma>'"
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_lit M)

goal (1 subgoal):
 1. subst_lit M \<sigma> = subst_lit M \<sigma>'
[PROOF STEP]
using coincide_on_lit
[PROOF STATE]
proof (prove)
using this:
coincide_on \<sigma> \<sigma>' (vars_of_lit M)
coincide_on ?\<sigma> ?\<eta> (vars_of_lit ?l) \<Longrightarrow> subst_lit ?l ?\<sigma> = subst_lit ?l ?\<eta>

goal (1 subgoal):
 1. subst_lit M \<sigma> = subst_lit M \<sigma>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit M \<sigma> = subst_lit M \<sigma>'

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>L'' = subst_lit M \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit M \<sigma> = subst_lit M \<sigma>'
L'' = subst_lit M \<sigma>'
[PROOF STEP]
have "L'' = subst_lit M \<sigma>"
[PROOF STATE]
proof (prove)
using this:
subst_lit M \<sigma> = subst_lit M \<sigma>'
L'' = subst_lit M \<sigma>'

goal (1 subgoal):
 1. L'' = subst_lit M \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L'' = subst_lit M \<sigma>

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from \<open>M \<in> cl_ecl C\<close> and \<open>L'' = subst_lit M \<sigma>\<close>and \<open>validate_ground_lit ?I L''\<close>
[PROOF STATE]
proof (chain)
picking this:
M \<in> cl_ecl C
L'' = subst_lit M \<sigma>
validate_ground_lit (int_clset S) L''
[PROOF STEP]
have "validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
M \<in> cl_ecl C
L'' = subst_lit M \<sigma>
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by (metis (mono_tags, lifting) subst_cl.simps mem_Collect_eq
              validate_ground_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. M \<in> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and cm
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M \<notin> cl_ecl C

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "M \<notin> Cl_D - { L2 }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<notin> Cl_D - {L2}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M \<in> Cl_D - {L2} \<Longrightarrow> False
[PROOF STEP]
assume "M \<in> Cl_D - { L2 }"
[PROOF STATE]
proof (state)
this:
M \<in> Cl_D - {L2}

goal (1 subgoal):
 1. M \<in> Cl_D - {L2} \<Longrightarrow> False
[PROOF STEP]
from this  and cld and \<open>L'' = subst_lit M \<sigma>'\<close> and \<open>validate_ground_lit ?I L''\<close>
[PROOF STATE]
proof (chain)
picking this:
M \<in> Cl_D - {L2}
Cl_D = cl_ecl D
L'' = subst_lit M \<sigma>'
validate_ground_lit (int_clset S) L''
[PROOF STEP]
have "validate_ground_clause ?I (subst_cl ( (cl_ecl D) - { L2 } ) \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
M \<in> Cl_D - {L2}
Cl_D = cl_ecl D
L'' = subst_lit M \<sigma>'
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
[PROOF STEP]
by (metis (mono_tags, lifting) subst_cl.simps mem_Collect_eq validate_ground_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')

goal (1 subgoal):
 1. M \<in> Cl_D - {L2} \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not>validate_ground_clause ?I (subst_cl ( (cl_ecl D) - { L2 } ) \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl D - {L2}) \<sigma>')

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M \<notin> Cl_D - {L2}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
have "M \<noteq> L'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<noteq> L'
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
assume "M = L'"
[PROOF STATE]
proof (state)
this:
M = L'

goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
from \<open>?I (subst u \<sigma>')  (subst v \<sigma>')\<close>
            and e
[PROOF STATE]
proof (chain)
picking this:
int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>')
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'
[PROOF STEP]
have "?I (subst u' \<sigma>')  (subst v \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
int_clset S (u \<lhd> \<sigma>') (v \<lhd> \<sigma>')
u' \<lhd> \<sigma>' = u \<lhd> \<sigma>'

goal (1 subgoal):
 1. int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')

goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
from rt and st \<open>fo_interpretation ?I\<close> \<open>?I (subst u' \<sigma>')  (subst v \<sigma>')\<close>
[PROOF STATE]
proof (chain)
picking this:
replace_subterm t p v t'
subterm t p u'
fo_interpretation (int_clset S)
int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')
[PROOF STEP]
have "?I (subst t \<sigma>') (subst t' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
replace_subterm t p v t'
subterm t p u'
fo_interpretation (int_clset S)
int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')

goal (1 subgoal):
 1. int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
[PROOF STEP]
using replacement_preserves_congruences [of ?I u' \<sigma>' v t p t']
[PROOF STATE]
proof (prove)
using this:
replace_subterm t p v t'
subterm t p u'
fo_interpretation (int_clset S)
int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')
\<lbrakk>congruence (int_clset S); int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>'); subterm t p u'; replace_subterm t p v t'\<rbrakk> \<Longrightarrow> int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')

goal (1 subgoal):
 1. int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
[PROOF STEP]
unfolding fo_interpretation_def
[PROOF STATE]
proof (prove)
using this:
replace_subterm t p v t'
subterm t p u'
congruence (int_clset S)
int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>')
\<lbrakk>congruence (int_clset S); int_clset S (u' \<lhd> \<sigma>') (v \<lhd> \<sigma>'); subterm t p u'; replace_subterm t p v t'\<rbrakk> \<Longrightarrow> int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')

goal (1 subgoal):
 1. int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')

goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
from l1 and cm
[PROOF STATE]
proof (chain)
picking this:
L1 \<in> cl_ecl C
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "\<not> (validate_ground_lit ?I (subst_lit L1 \<sigma>'))"
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')
[PROOF STEP]
using \<open>subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>\<close>
            \<open>subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'\<close>
            validate_ground_clause.simps
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
subst_cl (cl_ecl C) \<sigma>' = subst_cl (cl_ecl C) \<sigma>
subst_lit L1 \<sigma>' \<in> subst_cl (cl_ecl C) \<sigma>'
validate_ground_clause ?I ?C = (\<exists>L. L \<in> ?C \<and> validate_ground_lit ?I L)

goal (1 subgoal):
 1. \<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')

goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
from this and \<open>?I (subst t \<sigma>') (subst t' \<sigma>')\<close> and \<open>fo_interpretation ?I\<close>
            and l' \<open>orient_lit_inst L1 t s polarity \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')
int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
fo_interpretation (int_clset S)
L' = mk_lit polarity (Eq t' s)
orient_lit_inst L1 t s polarity \<sigma>'
[PROOF STEP]
have "\<not>validate_ground_lit ?I (subst_lit L' \<sigma>')"
[PROOF STATE]
proof (prove)
using this:
\<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')
int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
fo_interpretation (int_clset S)
L' = mk_lit polarity (Eq t' s)
orient_lit_inst L1 t s polarity \<sigma>'

goal (1 subgoal):
 1. \<not> validate_ground_lit (int_clset S) (subst_lit L' \<sigma>')
[PROOF STEP]
using trm_rep_preserves_lit_semantics [of ?I t \<sigma>' t' L1 s polarity \<sigma>']
[PROOF STATE]
proof (prove)
using this:
\<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')
int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>')
fo_interpretation (int_clset S)
L' = mk_lit polarity (Eq t' s)
orient_lit_inst L1 t s polarity \<sigma>'
\<lbrakk>fo_interpretation (int_clset S); int_clset S (t \<lhd> \<sigma>') (t' \<lhd> \<sigma>'); orient_lit_inst L1 t s polarity \<sigma>'; \<not> validate_ground_lit (int_clset S) (subst_lit L1 \<sigma>')\<rbrakk> \<Longrightarrow> \<not> validate_ground_lit (int_clset S) (subst_lit (mk_lit polarity (Eq t' s)) \<sigma>')

goal (1 subgoal):
 1. \<not> validate_ground_lit (int_clset S) (subst_lit L' \<sigma>')
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_lit (int_clset S) (subst_lit L' \<sigma>')

goal (1 subgoal):
 1. M = L' \<Longrightarrow> False
[PROOF STEP]
from this and \<open>M = L'\<close> and \<open>validate_ground_lit ?I L''\<close> and \<open>L'' = subst_lit M \<sigma>'\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_ground_lit (int_clset S) (subst_lit L' \<sigma>')
M = L'
validate_ground_lit (int_clset S) L''
L'' = subst_lit M \<sigma>'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> validate_ground_lit (int_clset S) (subst_lit L' \<sigma>')
M = L'
validate_ground_lit (int_clset S) L''
L'' = subst_lit M \<sigma>'

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M \<noteq> L'

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>M \<notin> Cl_D - { L2 }\<close> \<open>M \<notin> (cl_ecl C)\<close> and m clc
[PROOF STATE]
proof (chain)
picking this:
M \<noteq> L'
M \<notin> Cl_D - {L2}
M \<notin> cl_ecl C
M \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})
Cl_C = cl_ecl C
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
M \<noteq> L'
M \<notin> Cl_D - {L2}
M \<notin> cl_ecl C
M \<in> Cl_C - {L1} \<union> (Cl_D - {L2} \<union> {L'})
Cl_C = cl_ecl C

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>Second, we show that the clause contains no contradictory literal (otherwise the reflexion
rule applies).\<close>
[PROOF STATE]
proof (state)
this:
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
let ?no_cont = "\<forall>L t s. (L \<in> (cl_ecl C)) \<longrightarrow> (eligible_literal L C \<sigma>)
        \<longrightarrow> (orient_lit_inst L t s neg \<sigma>) \<longrightarrow> (trm_rep (subst t \<sigma>)  S) =  (subst t \<sigma>)
        \<longrightarrow> (subst t \<sigma>) \<noteq> (subst s \<sigma>)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have ?no_cont
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?no_cont"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>)
[PROOF STEP]
obtain L t s where l: "L \<in> (cl_ecl C)" and e: "(eligible_literal L C \<sigma>)"
          and o: "orient_lit_inst L t s neg \<sigma>"
          and "(trm_rep (subst t \<sigma>)  S) =  (subst t \<sigma>)"
          and "(subst t \<sigma>) = (subst s \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>)

goal (1 subgoal):
 1. (\<And>L t s. \<lbrakk>L \<in> cl_ecl C; eligible_literal L C \<sigma>; orient_lit_inst L t s neg \<sigma>; trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>; t \<lhd> \<sigma> = s \<lhd> \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s neg \<sigma>
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>(subst t \<sigma>) = (subst s \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
t \<lhd> \<sigma> = s \<lhd> \<sigma>
[PROOF STEP]
have t: "ck_unifier t s \<sigma> Ground"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> = s \<lhd> \<sigma>

goal (1 subgoal):
 1. ck_unifier t s \<sigma> Ground
[PROOF STEP]
unfolding ck_unifier_def Unifier_def
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> = s \<lhd> \<sigma>

goal (1 subgoal):
 1. if Ground = FirstOrder then min_IMGU \<sigma> t s else t \<lhd> \<sigma> = s \<lhd> \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ck_unifier t s \<sigma> Ground

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from l and e and o and t
[PROOF STATE]
proof (chain)
picking this:
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s neg \<sigma>
ck_unifier t s \<sigma> Ground
[PROOF STEP]
obtain R Cl_R nt_R where
            "R = Ecl Cl_R nt_R" and "Cl_R = (subst_cl ((cl_ecl C) - { L }) \<sigma>)" and
            "reflexion C R \<sigma> Ground ((cl_ecl C) - { L })"
            and "trms_ecl R = (dom_trms (cl_ecl R) (subst_set ((trms_ecl C) \<union> { t }) \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s neg \<sigma>
ck_unifier t s \<sigma> Ground

goal (1 subgoal):
 1. (\<And>R Cl_R nt_R. \<lbrakk>R = Ecl Cl_R nt_R; Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>; reflexion C R \<sigma> Ground (cl_ecl C - {L}); trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding reflexion_def get_trms_def
[PROOF STATE]
proof (prove)
using this:
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s neg \<sigma>
ck_unifier t s \<sigma> Ground

goal (1 subgoal):
 1. (\<And>R Cl_R nt_R. \<lbrakk>R = Ecl Cl_R nt_R; Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>; \<exists>L1 t s Cl_P Cl_C trms_C. eligible_literal L1 C \<sigma> \<and> L1 \<in> cl_ecl C \<and> Cl_C = cl_ecl R \<and> Cl_P = cl_ecl C \<and> orient_lit_inst L1 t s neg \<sigma> \<and> ck_unifier t s \<sigma> Ground \<and> R = Ecl Cl_C trms_C \<and> trms_C = (if Ground = FirstOrder then filter_trms Cl_C (dom_trms Cl_C (subst_set (trms_ecl C \<union> {t}) \<sigma>)) else dom_trms Cl_C (subst_set (trms_ecl C \<union> {t}) \<sigma>)) \<and> Cl_C = subst_cl (cl_ecl C - {L}) \<sigma> \<and> cl_ecl C - {L} = Cl_P - {L1}; trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>
reflexion C R \<sigma> Ground (cl_ecl C - {L})
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>C \<in> S\<close> and \<open>reflexion C R \<sigma> Ground ((cl_ecl C) - { L })\<close>
[PROOF STATE]
proof (chain)
picking this:
C \<in> S
reflexion C R \<sigma> Ground (cl_ecl C - {L})
[PROOF STEP]
have "derivable R { C } S \<sigma> Ground ((cl_ecl C) - { L })"
[PROOF STATE]
proof (prove)
using this:
C \<in> S
reflexion C R \<sigma> Ground (cl_ecl C - {L})

goal (1 subgoal):
 1. derivable R {C} S \<sigma> Ground (cl_ecl C - {L})
[PROOF STEP]
unfolding derivable_def
[PROOF STATE]
proof (prove)
using this:
C \<in> S
reflexion C R \<sigma> Ground (cl_ecl C - {L})

goal (1 subgoal):
 1. (\<exists>P1 P2. P1 \<in> S \<and> P2 \<in> S \<and> {C} = {P1, P2} \<and> superposition P1 P2 R \<sigma> Ground (cl_ecl C - {L})) \<or> (\<exists>P1. P1 \<in> S \<and> {C} = {P1} \<and> factorization P1 R \<sigma> Ground (cl_ecl C - {L})) \<or> (\<exists>P1. P1 \<in> S \<and> {C} = {P1} \<and> reflexion P1 R \<sigma> Ground (cl_ecl C - {L}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
derivable R {C} S \<sigma> Ground (cl_ecl C - {L})

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>Cl_R = (subst_cl ((cl_ecl C) - { L }) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>
[PROOF STEP]
have "ground_clause Cl_R"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>

goal (1 subgoal):
 1. ground_clause Cl_R
[PROOF STEP]
using ground_clause.simps
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>
ground_clause ?C = (vars_of_cl ?C = {})

goal (1 subgoal):
 1. ground_clause Cl_R
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_clause Cl_R

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>R = Ecl Cl_R nt_R\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause Cl_R
R = Ecl Cl_R nt_R
[PROOF STEP]
have "ground_clause (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
ground_clause Cl_R
R = Ecl Cl_R nt_R

goal (1 subgoal):
 1. ground_clause (cl_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_clause (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "grounding_set { C } \<sigma>"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. grounding_set {C} \<sigma>
[PROOF STEP]
unfolding grounding_set_def
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<forall>x. x \<in> {C} \<longrightarrow> ground_clause (subst_cl (cl_ecl x) \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
grounding_set {C} \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (cl_ecl R)\<close>
         \<open>derivable R { C } S \<sigma> Ground ((cl_ecl C) - { L })\<close> and \<open>ground_inference_saturated S\<close>
[PROOF STATE]
proof (chain)
picking this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L})
ground_inference_saturated S
[PROOF STEP]
have "(redundant_inference R S { C } \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L})
ground_inference_saturated S

goal (1 subgoal):
 1. redundant_inference R S {C} \<sigma>
[PROOF STEP]
unfolding ground_inference_saturated_def
[PROOF STATE]
proof (prove)
using this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L})
\<forall>C P \<sigma> C'. derivable C P S \<sigma> Ground C' \<longrightarrow> ground_clause (cl_ecl C) \<longrightarrow> grounding_set P \<sigma> \<longrightarrow> redundant_inference C S P \<sigma>

goal (1 subgoal):
 1. redundant_inference R S {C} \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
redundant_inference R S {C} \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
redundant_inference R S {C} \<sigma>
[PROOF STEP]
obtain S' where "S' \<subseteq> (instances S)" and
          "(set_entails_clause (clset_instances S') (cl_ecl R))"
          and all_smaller: "(\<forall>x \<in> S'. (((fst x),(snd x)),(C,\<sigma>)) \<in> ecl_ord)"
          and all_normalized_term_included: "(\<forall>x \<in> S'.
          (subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x))
              (trms_ecl R)))"
[PROOF STATE]
proof (prove)
using this:
redundant_inference R S {C} \<sigma>

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding redundant_inference_def
[PROOF STATE]
proof (prove)
using this:
\<exists>S'\<subseteq>instances S. set_entails_clause (clset_instances S') (cl_ecl R) \<and> (\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)) \<and> (\<forall>x\<in>S'. \<exists>D'\<in>{C}. ((fst x, snd x), D', \<sigma>) \<in> ecl_ord)

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S' \<subseteq> instances S
set_entails_clause (clset_instances S') (cl_ecl R)
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
have "validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
assume "\<not> validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (state)
this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
obtain x where "x \<in>(clset_instances S')" and "\<not>validate_clause ?I x"
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_clause_set.simps
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
validate_clause_set ?I ?S = (\<forall>C. C \<in> ?S \<longrightarrow> validate_clause ?I C)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> clset_instances S'
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>x \<in>(clset_instances S')\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in> clset_instances S'
[PROOF STEP]
obtain pair' where "pair' \<in> S'"
          and "x = (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
x \<in> clset_instances S'

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding clset_instances_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {C. \<exists>x. x \<in> S' \<and> C = subst_cl (cl_ecl (fst x)) (snd x)}

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pair' \<in> S'
x = subst_cl (cl_ecl (fst pair')) (snd pair')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from all_smaller and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'
[PROOF STEP]
have "(pair',(C,\<sigma>)) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'

goal (1 subgoal):
 1. (pair', C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and  \<open>C = fst pair\<close> and \<open>\<sigma> = snd pair\<close>
[PROOF STATE]
proof (chain)
picking this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair
[PROOF STEP]
have "(pair',pair) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair

goal (1 subgoal):
 1. (pair', pair) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', pair) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and hyp_ind
[PROOF STATE]
proof (chain)
picking this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))
[PROOF STEP]
have "?P pair'"
[PROOF STATE]
proof (prove)
using this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>trms_ecl R = (dom_trms (cl_ecl R) (subst_set ((trms_ecl C) \<union> { t }) \<sigma>))\<close>
[PROOF STATE]
proof (chain)
picking this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)
[PROOF STEP]
have "trms_ecl R \<subseteq> (subst_set ((trms_ecl C) \<union> { t }) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)

goal (1 subgoal):
 1. trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> {t}) \<sigma>
[PROOF STEP]
using dom_trms_subset
[PROOF STATE]
proof (prove)
using this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> {t}) \<sigma>)
dom_trms ?C ?E \<subseteq> ?E

goal (1 subgoal):
 1. trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> {t}) \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> {t}) \<sigma>

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>pair' \<in> S'\<close> and all_normalized_term_included
[PROOF STATE]
proof (chain)
picking this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)
[PROOF STEP]
have
          "(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair'))
             (trms_ecl R))"
[PROOF STATE]
proof (prove)
using this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
have i: "(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (state)
this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
obtain t' t'' where "t' \<in> (subst_set (trms_ecl (fst pair')) (snd pair'))"
            "occurs_in t'' t'" and "trm_rep t'' S \<noteq> t''"
[PROOF STATE]
proof (prove)
using this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. (\<And>t' t''. \<lbrakk>t' \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in t'' t'; trm_rep t'' S \<noteq> t''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x y. x \<in> subst_set (trms_ecl (fst pair')) (snd pair') \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y)

goal (1 subgoal):
 1. (\<And>t' t''. \<lbrakk>t' \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in t'' t'; trm_rep t'' S \<noteq> t''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
occurs_in t'' t'
trm_rep t'' S \<noteq> t''

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>t' \<in> (subst_set (trms_ecl (fst pair')) (snd pair'))\<close>
            and \<open>(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
obtain s' where "s' \<in> (trms_ecl R)" and "occurs_in t' s'"
[PROOF STATE]
proof (prove)
using this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. (\<And>s'. \<lbrakk>s' \<in> trms_ecl R; occurs_in t' s'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding subterms_inclusion_def
[PROOF STATE]
proof (prove)
using this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
\<forall>x1\<in>subst_set (trms_ecl (fst pair')) (snd pair'). Bex (trms_ecl R) (occurs_in x1)

goal (1 subgoal):
 1. (\<And>s'. \<lbrakk>s' \<in> trms_ecl R; occurs_in t' s'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' \<in> trms_ecl R
occurs_in t' s'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>s' \<in> (trms_ecl R)\<close> and \<open>trms_ecl R \<subseteq> (subst_set ((trms_ecl C) \<union> { t }) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
s' \<in> trms_ecl R
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> {t}) \<sigma>
[PROOF STEP]
obtain s'' where "s' = subst s'' \<sigma>" and "s'' \<in> ((trms_ecl C) \<union> { t })"
[PROOF STATE]
proof (prove)
using this:
s' \<in> trms_ecl R
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> {t}) \<sigma>

goal (1 subgoal):
 1. (\<And>s''. \<lbrakk>s' = s'' \<lhd> \<sigma>; s'' \<in> trms_ecl C \<union> {t}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' = s'' \<lhd> \<sigma>
s'' \<in> trms_ecl C \<union> {t}

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>s'' \<in> ((trms_ecl C) \<union> { t })\<close>
[PROOF STATE]
proof (chain)
picking this:
s'' \<in> trms_ecl C \<union> {t}
[PROOF STEP]
have "s'' \<in> trms_ecl C \<or> s'' = t"
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C \<union> {t}

goal (1 subgoal):
 1. s'' \<in> trms_ecl C \<or> s'' = t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s'' \<in> trms_ecl C \<or> s'' = t

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C \<or> s'' = t

goal (1 subgoal):
 1. False
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' = t \<Longrightarrow> False
[PROOF STEP]
assume "s'' \<in> trms_ecl C"
[PROOF STATE]
proof (state)
this:
s'' \<in> trms_ecl C

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' = t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>s' = subst s'' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
s'' \<in> trms_ecl C
s' = s'' \<lhd> \<sigma>
[PROOF STEP]
have "s' \<in> (subst_set (trms_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C
s' = s'' \<lhd> \<sigma>

goal (1 subgoal):
 1. s' \<in> subst_set (trms_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' \<in> subst_set (trms_ecl C) \<sigma>

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' = t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(all_trms_irreducible (subst_set (trms_ecl C) \<sigma>)
                  (\<lambda>t. (trm_rep t S)))\<close> and \<open>occurs_in t' s'\<close>
[PROOF STATE]
proof (chain)
picking this:
s' \<in> subst_set (trms_ecl C) \<sigma>
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
occurs_in t' s'
[PROOF STEP]
have "trm_rep t' S = t'"
[PROOF STATE]
proof (prove)
using this:
s' \<in> subst_set (trms_ecl C) \<sigma>
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
occurs_in t' s'

goal (1 subgoal):
 1. trm_rep t' S = t'
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
s' \<in> subst_set (trms_ecl C) \<sigma>
\<forall>x y. x \<in> subst_set (trms_ecl C) \<sigma> \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y
occurs_in t' s'

goal (1 subgoal):
 1. trm_rep t' S = t'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep t' S = t'

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' = t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>occurs_in t'' t'\<close> and \<open>trm_rep t'' S \<noteq> t''\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''

goal (1 subgoal):
 1. False
[PROOF STEP]
using occurs_in_def subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''
occurs_in ?t ?s = (\<exists>p. subterm ?s p ?t)
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. s'' = t \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. s'' = t \<Longrightarrow> False
[PROOF STEP]
assume "s'' = t"
[PROOF STATE]
proof (state)
this:
s'' = t

goal (1 subgoal):
 1. s'' = t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>s' = subst s'' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
s'' = t
s' = s'' \<lhd> \<sigma>
[PROOF STEP]
have "s' = subst t \<sigma>"
[PROOF STATE]
proof (prove)
using this:
s'' = t
s' = s'' \<lhd> \<sigma>

goal (1 subgoal):
 1. s' = t \<lhd> \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' = t \<lhd> \<sigma>

goal (1 subgoal):
 1. s'' = t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(trm_rep (subst t \<sigma>)  S) =  (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
s' = t \<lhd> \<sigma>
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
[PROOF STEP]
have "trm_rep s' S = s'"
[PROOF STATE]
proof (prove)
using this:
s' = t \<lhd> \<sigma>
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>

goal (1 subgoal):
 1. trm_rep s' S = s'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep s' S = s'

goal (1 subgoal):
 1. s'' = t \<Longrightarrow> False
[PROOF STEP]
from \<open>trm_rep s' S = s'\<close> \<open>trm_rep t'' S \<noteq> t''\<close> \<open>occurs_in t' s'\<close> \<open>occurs_in t'' t'\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep s' S = s'
trm_rep t'' S \<noteq> t''
occurs_in t' s'
occurs_in t'' t'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep s' S = s'
trm_rep t'' S \<noteq> t''
occurs_in t' s'
occurs_in t'' t'

goal (1 subgoal):
 1. False
[PROOF STEP]
using occurs_in_def subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
trm_rep s' S = s'
trm_rep t'' S \<noteq> t''
occurs_in t' s'
occurs_in t'' t'
occurs_in ?t ?s = (\<exists>p. subterm ?s p ?t)
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          ii: "ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          iii: "(fst pair') \<in> S"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
fst pair' \<in> S

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>?P pair'\<close> and i ii iii
[PROOF STATE]
proof (chain)
picking this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S
[PROOF STEP]
have "validate_ground_clause ?I
          (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and \<open>x = (subst_cl (cl_ecl (fst pair')) (snd pair'))\<close>
          and \<open>\<not>validate_clause ?I x\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis ii substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>fo_interpretation ?I\<close> and
        \<open>(set_entails_clause (clset_instances S') (cl_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)
[PROOF STEP]
have "validate_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
unfolding set_entails_clause_def
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
\<forall>I. fo_interpretation I \<longrightarrow> validate_clause_set I (clset_instances S') \<longrightarrow> validate_clause I (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
have "validate_ground_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by (metis \<open>R = Ecl Cl_R nt_R\<close> \<open>ground_clause Cl_R\<close>
            cl_ecl.simps substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
obtain L' where "L' \<in> (cl_ecl R)" and "validate_ground_lit ?I L'"
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. (\<And>L'. \<lbrakk>L' \<in> cl_ecl R; validate_ground_lit (int_clset S) L'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_ground_clause.simps
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)
validate_ground_clause ?I ?C = (\<exists>L. L \<in> ?C \<and> validate_ground_lit ?I L)

goal (1 subgoal):
 1. (\<And>L'. \<lbrakk>L' \<in> cl_ecl R; validate_ground_lit (int_clset S) L'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L' \<in> cl_ecl R
validate_ground_lit (int_clset S) L'

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>L' \<in> (cl_ecl R)\<close> and \<open>R = Ecl Cl_R nt_R\<close> and
          \<open>Cl_R = (subst_cl ((cl_ecl C) - { L }) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
L' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>
[PROOF STEP]
obtain L'' where "L'' \<in> cl_ecl C" and "L' = subst_lit L'' \<sigma>"
[PROOF STATE]
proof (prove)
using this:
L' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L}) \<sigma>

goal (1 subgoal):
 1. (\<And>L''. \<lbrakk>L'' \<in> cl_ecl C; L' = subst_lit L'' \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L'' \<in> cl_ecl C
L' = subst_lit L'' \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from \<open>L'' \<in> cl_ecl C\<close> and \<open>L' = subst_lit L'' \<sigma>\<close>and \<open>validate_ground_lit ?I L'\<close>
[PROOF STATE]
proof (chain)
picking this:
L'' \<in> cl_ecl C
L' = subst_lit L'' \<sigma>
validate_ground_lit (int_clset S) L'
[PROOF STEP]
have "validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
L'' \<in> cl_ecl C
L' = subst_lit L'' \<sigma>
validate_ground_lit (int_clset S) L'

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by (metis (mono_tags, lifting) subst_cl.simps mem_Collect_eq
              validate_ground_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>) \<Longrightarrow> False
[PROOF STEP]
from this and cm
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>Third, we prove that the clause contains no pair of equations with the same left-hand side
and equivalent right-hand sides (otherwise the factorization rule applies and a smaller false clause
is derived).\<close>
[PROOF STATE]
proof (state)
this:
\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
let ?no_fact = "\<forall>L1 L2 t s u v. (L1 \<in> (cl_ecl C)) \<longrightarrow> (eligible_literal L1 C \<sigma>)
       \<longrightarrow> (L2 \<in> (cl_ecl C) - { L1 }) \<longrightarrow> (orient_lit_inst L1 t s pos \<sigma>)
       \<longrightarrow> (orient_lit_inst L2 u v pos \<sigma>) \<longrightarrow> (subst t \<sigma>) = (subst u \<sigma>)
       \<longrightarrow> (\<not> (proper_subterm_red t S \<sigma>))
       \<longrightarrow> (trm_rep ((subst s) \<sigma>) S) \<noteq>  (trm_rep ((subst v) \<sigma>) S)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have ?no_fact
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?no_fact"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S)
[PROOF STEP]
obtain L1 L2 t s u v where l1: "L1 \<in> (cl_ecl C)" and l2: "L2 \<in> (cl_ecl C) - { L1 }"
       and e1: "(eligible_literal L1 C \<sigma>)" and o1: "(orient_lit_inst L1 t s pos \<sigma>)"
       and o2: "(orient_lit_inst L2 u v pos \<sigma>)" and e: "(subst t \<sigma>) = (subst u \<sigma>)"
       and "(\<not> (proper_subterm_red t S \<sigma>))"
       and i: "(trm_rep ((subst s) \<sigma>) S) =  (trm_rep ((subst v) \<sigma>) S)"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S)

goal (1 subgoal):
 1. (\<And>L1 L2 t s u v. \<lbrakk>L1 \<in> cl_ecl C; L2 \<in> cl_ecl C - {L1}; eligible_literal L1 C \<sigma>; orient_lit_inst L1 t s pos \<sigma>; orient_lit_inst L2 u v pos \<sigma>; t \<lhd> \<sigma> = u \<lhd> \<sigma>; \<not> proper_subterm_red t S \<sigma>; trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L1 \<in> cl_ecl C
L2 \<in> cl_ecl C - {L1}
eligible_literal L1 C \<sigma>
orient_lit_inst L1 t s pos \<sigma>
orient_lit_inst L2 u v pos \<sigma>
t \<lhd> \<sigma> = u \<lhd> \<sigma>
\<not> proper_subterm_red t S \<sigma>
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from e
[PROOF STATE]
proof (chain)
picking this:
t \<lhd> \<sigma> = u \<lhd> \<sigma>
[PROOF STEP]
have t: "ck_unifier t u \<sigma> Ground"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> = u \<lhd> \<sigma>

goal (1 subgoal):
 1. ck_unifier t u \<sigma> Ground
[PROOF STEP]
unfolding ck_unifier_def Unifier_def
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> = u \<lhd> \<sigma>

goal (1 subgoal):
 1. if Ground = FirstOrder then min_IMGU \<sigma> t u else t \<lhd> \<sigma> = u \<lhd> \<sigma>
[PROOF STEP]
using "inferences.distinct"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> = u \<lhd> \<sigma>
Ground \<noteq> FirstOrder
FirstOrder \<noteq> Ground

goal (1 subgoal):
 1. if Ground = FirstOrder then min_IMGU \<sigma> t u else t \<lhd> \<sigma> = u \<lhd> \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
ck_unifier t u \<sigma> Ground

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>L1 \<in> (cl_ecl C)\<close> o1 \<open>\<not>(validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>))\<close>
[PROOF STATE]
proof (chain)
picking this:
L1 \<in> cl_ecl C
orient_lit_inst L1 t s pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "trm_rep (subst t \<sigma>) S \<noteq> trm_rep (subst s \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C
orient_lit_inst L1 t s pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
using no_valid_literal
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C
orient_lit_inst L1 t s pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<lbrakk>?L \<in> ?C; orient_lit_inst ?L ?t ?s pos ?\<sigma>; \<not> validate_ground_clause (int_clset ?S) (subst_cl ?C ?\<sigma>)\<rbrakk> \<Longrightarrow> trm_rep (?t \<lhd> ?\<sigma>) ?S \<noteq> trm_rep (?s \<lhd> ?\<sigma>) ?S

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
have "subst t \<sigma> \<noteq> subst s \<sigma>"
[PROOF STATE]
proof (prove)
using this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>L2 \<in> (cl_ecl C) - { L1 }\<close>
[PROOF STATE]
proof (chain)
picking this:
L2 \<in> cl_ecl C - {L1}
[PROOF STEP]
have "L2 \<in> (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
L2 \<in> cl_ecl C - {L1}

goal (1 subgoal):
 1. L2 \<in> cl_ecl C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L2 \<in> cl_ecl C

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this o2 \<open>\<not>(validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>))\<close>
[PROOF STATE]
proof (chain)
picking this:
L2 \<in> cl_ecl C
orient_lit_inst L2 u v pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "trm_rep (subst u \<sigma>) S \<noteq> trm_rep (subst v \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
L2 \<in> cl_ecl C
orient_lit_inst L2 u v pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. trm_rep (u \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
using no_valid_literal
[PROOF STATE]
proof (prove)
using this:
L2 \<in> cl_ecl C
orient_lit_inst L2 u v pos \<sigma>
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<lbrakk>?L \<in> ?C; orient_lit_inst ?L ?t ?s pos ?\<sigma>; \<not> validate_ground_clause (int_clset ?S) (subst_cl ?C ?\<sigma>)\<rbrakk> \<Longrightarrow> trm_rep (?t \<lhd> ?\<sigma>) ?S \<noteq> trm_rep (?s \<lhd> ?\<sigma>) ?S

goal (1 subgoal):
 1. trm_rep (u \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (u \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and e
[PROOF STATE]
proof (chain)
picking this:
trm_rep (u \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
t \<lhd> \<sigma> = u \<lhd> \<sigma>
[PROOF STEP]
have "subst t \<sigma> \<noteq> subst v \<sigma>"
[PROOF STATE]
proof (prove)
using this:
trm_rep (u \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
t \<lhd> \<sigma> = u \<lhd> \<sigma>

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
obtain R Cl_R nt_R L' where
            ntr: "nt_R = (dom_trms Cl_R (subst_set ((trms_ecl C) \<union> (proper_subterms_of t)) \<sigma>))"
            and r: "R = Ecl Cl_R nt_R"
            and clr: "Cl_R = (subst_cl ( ((cl_ecl C) - { L2 }) \<union> { L' } ) \<sigma>)"
            and l': "L' = Neg (Eq s v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>nt_R Cl_R R L'. \<lbrakk>nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>); R = Ecl Cl_R nt_R; Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>; L' = Neg (Eq s v)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
L' = Neg (Eq s v)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from ntr r l' clr l1 l2 o1 o2 e1 t
        \<open>subst t \<sigma> \<noteq> subst s \<sigma>\<close> \<open>subst t \<sigma> \<noteq> subst v \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
R = Ecl Cl_R nt_R
L' = Neg (Eq s v)
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
L1 \<in> cl_ecl C
L2 \<in> cl_ecl C - {L1}
orient_lit_inst L1 t s pos \<sigma>
orient_lit_inst L2 u v pos \<sigma>
eligible_literal L1 C \<sigma>
ck_unifier t u \<sigma> Ground
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>
[PROOF STEP]
have "factorization C R \<sigma> Ground (((cl_ecl C) - { L2 }) \<union> { L' } )"
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
R = Ecl Cl_R nt_R
L' = Neg (Eq s v)
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
L1 \<in> cl_ecl C
L2 \<in> cl_ecl C - {L1}
orient_lit_inst L1 t s pos \<sigma>
orient_lit_inst L2 u v pos \<sigma>
eligible_literal L1 C \<sigma>
ck_unifier t u \<sigma> Ground
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>

goal (1 subgoal):
 1. factorization C R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
[PROOF STEP]
unfolding factorization_def get_trms_def
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
R = Ecl Cl_R nt_R
L' = Neg (Eq s v)
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
L1 \<in> cl_ecl C
L2 \<in> cl_ecl C - {L1}
orient_lit_inst L1 t s pos \<sigma>
orient_lit_inst L2 u v pos \<sigma>
eligible_literal L1 C \<sigma>
ck_unifier t u \<sigma> Ground
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>

goal (1 subgoal):
 1. \<exists>L1 L2a L'a t s u v Cl_P Cl_C trms_C. eligible_literal L1 C \<sigma> \<and> L1 \<in> cl_ecl C \<and> L2a \<in> cl_ecl C - {L1} \<and> Cl_C = cl_ecl R \<and> Cl_P = cl_ecl C \<and> orient_lit_inst L1 t s pos \<sigma> \<and> orient_lit_inst L2a u v pos \<sigma> \<and> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma> \<and> t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma> \<and> ck_unifier t u \<sigma> Ground \<and> L'a = Neg (Eq s v) \<and> (R = Ecl Cl_C trms_C \<and> trms_C = (if Ground = FirstOrder then filter_trms Cl_C (dom_trms Cl_C (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)) else dom_trms Cl_C (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>))) \<and> Cl_C = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma> \<and> cl_ecl C - {L2} \<union> {L'} = Cl_P - {L2a} \<union> {L'a}
[PROOF STEP]
using inferences.distinct
[PROOF STATE]
proof (prove)
using this:
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
R = Ecl Cl_R nt_R
L' = Neg (Eq s v)
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
L1 \<in> cl_ecl C
L2 \<in> cl_ecl C - {L1}
orient_lit_inst L1 t s pos \<sigma>
orient_lit_inst L2 u v pos \<sigma>
eligible_literal L1 C \<sigma>
ck_unifier t u \<sigma> Ground
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma>
Ground \<noteq> FirstOrder
FirstOrder \<noteq> Ground

goal (1 subgoal):
 1. \<exists>L1 L2a L'a t s u v Cl_P Cl_C trms_C. eligible_literal L1 C \<sigma> \<and> L1 \<in> cl_ecl C \<and> L2a \<in> cl_ecl C - {L1} \<and> Cl_C = cl_ecl R \<and> Cl_P = cl_ecl C \<and> orient_lit_inst L1 t s pos \<sigma> \<and> orient_lit_inst L2a u v pos \<sigma> \<and> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma> \<and> t \<lhd> \<sigma> \<noteq> v \<lhd> \<sigma> \<and> ck_unifier t u \<sigma> Ground \<and> L'a = Neg (Eq s v) \<and> (R = Ecl Cl_C trms_C \<and> trms_C = (if Ground = FirstOrder then filter_trms Cl_C (dom_trms Cl_C (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)) else dom_trms Cl_C (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>))) \<and> Cl_C = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma> \<and> cl_ecl C - {L2} \<union> {L'} = Cl_P - {L2a} \<union> {L'a}
[PROOF STEP]
by (metis cl_ecl.simps)
[PROOF STATE]
proof (state)
this:
factorization C R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from l2
[PROOF STATE]
proof (chain)
picking this:
L2 \<in> cl_ecl C - {L1}
[PROOF STEP]
have "(subst_lit L2 \<sigma>) \<in> (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
L2 \<in> cl_ecl C - {L1}

goal (1 subgoal):
 1. subst_lit L2 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L2 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L2 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "vars_of_lit (subst_lit L2 \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
subst_lit L2 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. vars_of_lit (subst_lit L2 \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L2 \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and o2
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit L2 \<sigma>) = {}
orient_lit_inst L2 u v pos \<sigma>
[PROOF STEP]
have "vars_of (subst v \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>) = {}
orient_lit_inst L2 u v pos \<sigma>

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>) = {}
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>) = {}
(L2 = Pos (Eq u v) \<or> L2 = Pos (Eq v u)) \<and> (u \<lhd> \<sigma>, v \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = pos \<or> (L2 = Neg (Eq u v) \<or> L2 = Neg (Eq v u)) \<and> (u \<lhd> \<sigma>, v \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = neg

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>) = {}
[PROOF STEP]
using vars_of_lit.simps vars_of_eq.simps
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L2 \<sigma>) = {}
(L2 = Pos (Eq u v) \<or> L2 = Pos (Eq v u)) \<and> (u \<lhd> \<sigma>, v \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = pos \<or> (L2 = Neg (Eq u v) \<or> L2 = Neg (Eq v u)) \<and> (u \<lhd> \<sigma>, v \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = neg
vars_of_lit (Pos ?e) = vars_of_eq ?e
vars_of_lit (Neg ?e) = vars_of_eq ?e
vars_of_eq (Eq ?t ?s) = vars_of ?t \<union> vars_of ?s

goal (1 subgoal):
 1. vars_of (v \<lhd> \<sigma>) = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
vars_of (v \<lhd> \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from l1
[PROOF STATE]
proof (chain)
picking this:
L1 \<in> cl_ecl C
[PROOF STEP]
have "(subst_lit L1 \<sigma>) \<in> (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. subst_lit L1 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L1 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L1 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "vars_of_lit (subst_lit L1 \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
subst_lit L1 \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. vars_of_lit (subst_lit L1 \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L1 \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and o1
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit L1 \<sigma>) = {}
orient_lit_inst L1 t s pos \<sigma>
[PROOF STEP]
have "vars_of (subst s \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>) = {}
orient_lit_inst L1 t s pos \<sigma>

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) = {}
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>) = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = neg

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) = {}
[PROOF STEP]
using vars_of_lit.simps vars_of_eq.simps
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit L1 \<sigma>) = {}
(L1 = Pos (Eq t s) \<or> L1 = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = pos \<or> (L1 = Neg (Eq t s) \<or> L1 = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> pos = neg
vars_of_lit (Pos ?e) = vars_of_eq ?e
vars_of_lit (Neg ?e) = vars_of_eq ?e
vars_of_eq (Eq ?t ?s) = vars_of ?t \<union> vars_of ?s

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
vars_of (s \<lhd> \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>vars_of (subst v \<sigma>) = {}\<close> and \<open>vars_of (subst s \<sigma>) = {}\<close>
          and l'
[PROOF STATE]
proof (chain)
picking this:
vars_of (v \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}
L' = Neg (Eq s v)
[PROOF STEP]
have "vars_of_lit (subst_lit L' \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of (v \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}
L' = Neg (Eq s v)

goal (1 subgoal):
 1. vars_of_lit (subst_lit L' \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L' \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>C \<in> S\<close> and \<open>factorization C R \<sigma> Ground (((cl_ecl C) - { L2 }) \<union> { L' } )\<close>
[PROOF STATE]
proof (chain)
picking this:
C \<in> S
factorization C R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
[PROOF STEP]
have "derivable R { C } S \<sigma> Ground (((cl_ecl C) - { L2 }) \<union> { L' } )"
[PROOF STATE]
proof (prove)
using this:
C \<in> S
factorization C R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})

goal (1 subgoal):
 1. derivable R {C} S \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
[PROOF STEP]
unfolding derivable_def
[PROOF STATE]
proof (prove)
using this:
C \<in> S
factorization C R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})

goal (1 subgoal):
 1. (\<exists>P1 P2. P1 \<in> S \<and> P2 \<in> S \<and> {C} = {P1, P2} \<and> superposition P1 P2 R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})) \<or> (\<exists>P1. P1 \<in> S \<and> {C} = {P1} \<and> factorization P1 R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})) \<or> (\<exists>P1. P1 \<in> S \<and> {C} = {P1} \<and> reflexion P1 R \<sigma> Ground (cl_ecl C - {L2} \<union> {L'}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
derivable R {C} S \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
have "ground_clause Cl_R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ground_clause Cl_R
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
assume "\<not>ground_clause Cl_R"
[PROOF STATE]
proof (state)
this:
\<not> ground_clause Cl_R

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> ground_clause Cl_R
[PROOF STEP]
have "vars_of_cl Cl_R \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
\<not> ground_clause Cl_R

goal (1 subgoal):
 1. vars_of_cl Cl_R \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_cl Cl_R \<noteq> {}

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vars_of_cl Cl_R \<noteq> {}
[PROOF STEP]
obtain M where "M \<in> Cl_R" and "vars_of_lit M \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_cl Cl_R \<noteq> {}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> Cl_R; vars_of_lit M \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M \<in> Cl_R
vars_of_lit M \<noteq> {}

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
from \<open>M \<in> Cl_R\<close> and clr
[PROOF STATE]
proof (chain)
picking this:
M \<in> Cl_R
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
[PROOF STEP]
obtain M' where "M = (subst_lit M' \<sigma>)"
          and "M' \<in>((cl_ecl C) - { L2, L1 }) \<union> { L', L1 } "
[PROOF STATE]
proof (prove)
using this:
M \<in> Cl_R
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>

goal (1 subgoal):
 1. (\<And>M'. \<lbrakk>M = subst_lit M' \<sigma>; M' \<in> cl_ecl C - {L2, L1} \<union> {L', L1}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M = subst_lit M' \<sigma>
M' \<in> cl_ecl C - {L2, L1} \<union> {L', L1}

goal (1 subgoal):
 1. \<not> ground_clause Cl_R \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
assume "M' = L'"
[PROOF STATE]
proof (state)
this:
M' = L'

goal (2 subgoals):
 1. ?P \<Longrightarrow> False
 2. \<not> ?P \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of_lit (subst_lit L' \<sigma>) = {}\<close> and \<open>vars_of_lit M \<noteq> {}\<close>
              and \<open>M = (subst_lit M' \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
M' = L'
vars_of_lit (subst_lit L' \<sigma>) = {}
vars_of_lit M \<noteq> {}
M = subst_lit M' \<sigma>
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
M' = L'
vars_of_lit (subst_lit L' \<sigma>) = {}
vars_of_lit M \<noteq> {}
M = subst_lit M' \<sigma>

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
assume "M' \<noteq> L'"
[PROOF STATE]
proof (state)
this:
M' \<noteq> L'

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
from this and l1 and \<open>M' \<in>((cl_ecl C) - { L2, L1 }) \<union> { L', L1 }\<close>
[PROOF STATE]
proof (chain)
picking this:
M' \<noteq> L'
L1 \<in> cl_ecl C
M' \<in> cl_ecl C - {L2, L1} \<union> {L', L1}
[PROOF STEP]
have "M' \<in> (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
M' \<noteq> L'
L1 \<in> cl_ecl C
M' \<in> cl_ecl C - {L2, L1} \<union> {L', L1}

goal (1 subgoal):
 1. M' \<in> cl_ecl C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M' \<in> cl_ecl C

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
M' \<in> cl_ecl C
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have
              "vars_of_lit (subst_lit M' \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
M' \<in> cl_ecl C
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. vars_of_lit (subst_lit M' \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit M' \<sigma>) = {}

goal (1 subgoal):
 1. M' \<noteq> L' \<Longrightarrow> False
[PROOF STEP]
from this and \<open>M = (subst_lit M' \<sigma>)\<close> and
              \<open>vars_of_lit M \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_lit (subst_lit M' \<sigma>) = {}
M = subst_lit M' \<sigma>
vars_of_lit M \<noteq> {}
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
vars_of_lit (subst_lit M' \<sigma>) = {}
M = subst_lit M' \<sigma>
vars_of_lit M \<noteq> {}

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ground_clause Cl_R

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause Cl_R\<close> and \<open>R = Ecl Cl_R nt_R\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause Cl_R
R = Ecl Cl_R nt_R
[PROOF STEP]
have "ground_clause (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
ground_clause Cl_R
R = Ecl Cl_R nt_R

goal (1 subgoal):
 1. ground_clause (cl_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_clause (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "grounding_set { C } \<sigma>"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. grounding_set {C} \<sigma>
[PROOF STEP]
unfolding grounding_set_def
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<forall>x. x \<in> {C} \<longrightarrow> ground_clause (subst_cl (cl_ecl x) \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
grounding_set {C} \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this \<open>ground_clause (cl_ecl R)\<close>
          and \<open>derivable R { C } S \<sigma> Ground (((cl_ecl C) - { L2 }) \<union> { L' } )\<close>
          and \<open>ground_inference_saturated S\<close>
[PROOF STATE]
proof (chain)
picking this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
ground_inference_saturated S
[PROOF STEP]
have "(redundant_inference R S { C } \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
ground_inference_saturated S

goal (1 subgoal):
 1. redundant_inference R S {C} \<sigma>
[PROOF STEP]
unfolding ground_inference_saturated_def
[PROOF STATE]
proof (prove)
using this:
grounding_set {C} \<sigma>
ground_clause (cl_ecl R)
derivable R {C} S \<sigma> Ground (cl_ecl C - {L2} \<union> {L'})
\<forall>C P \<sigma> C'. derivable C P S \<sigma> Ground C' \<longrightarrow> ground_clause (cl_ecl C) \<longrightarrow> grounding_set P \<sigma> \<longrightarrow> redundant_inference C S P \<sigma>

goal (1 subgoal):
 1. redundant_inference R S {C} \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
redundant_inference R S {C} \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
redundant_inference R S {C} \<sigma>
[PROOF STEP]
obtain S' where "S' \<subseteq> (instances S)" and
          "(set_entails_clause (clset_instances S') (cl_ecl R))"
          and all_smaller: "(\<forall>x \<in> S'. (((fst x),(snd x)),(C,\<sigma>)) \<in> ecl_ord)"
          and all_normalized_term_included: "(\<forall>x \<in> S'.
          (subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x))
            (trms_ecl R)))"
[PROOF STATE]
proof (prove)
using this:
redundant_inference R S {C} \<sigma>

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding redundant_inference_def
[PROOF STATE]
proof (prove)
using this:
\<exists>S'\<subseteq>instances S. set_entails_clause (clset_instances S') (cl_ecl R) \<and> (\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)) \<and> (\<forall>x\<in>S'. \<exists>D'\<in>{C}. ((fst x, snd x), D', \<sigma>) \<in> ecl_ord)

goal (1 subgoal):
 1. (\<And>S'. \<lbrakk>S' \<subseteq> instances S; set_entails_clause (clset_instances S') (cl_ecl R); \<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord; \<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S' \<subseteq> instances S
set_entails_clause (clset_instances S') (cl_ecl R)
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
have "validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
assume "\<not> validate_clause_set ?I (clset_instances S')"
[PROOF STATE]
proof (state)
this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
[PROOF STEP]
obtain x where "x \<in>(clset_instances S')" and "\<not>validate_clause ?I x"
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_clause_set.simps
[PROOF STATE]
proof (prove)
using this:
\<not> validate_clause_set (int_clset S) (clset_instances S')
validate_clause_set ?I ?S = (\<forall>C. C \<in> ?S \<longrightarrow> validate_clause ?I C)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> clset_instances S'; \<not> validate_clause (int_clset S) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> clset_instances S'
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>x \<in>(clset_instances S')\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in> clset_instances S'
[PROOF STEP]
obtain pair' where "pair' \<in> S'"
          and "x = (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
x \<in> clset_instances S'

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding clset_instances_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {C. \<exists>x. x \<in> S' \<and> C = subst_cl (cl_ecl (fst x)) (snd x)}

goal (1 subgoal):
 1. (\<And>pair'. \<lbrakk>pair' \<in> S'; x = subst_cl (cl_ecl (fst pair')) (snd pair')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pair' \<in> S'
x = subst_cl (cl_ecl (fst pair')) (snd pair')

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from all_smaller and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'
[PROOF STEP]
have "(pair',(C,\<sigma>)) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S'. ((fst x, snd x), C, \<sigma>) \<in> ecl_ord
pair' \<in> S'

goal (1 subgoal):
 1. (pair', C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and  \<open>C = fst pair\<close> and \<open>\<sigma> = snd pair\<close>
[PROOF STATE]
proof (chain)
picking this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair
[PROOF STEP]
have "(pair',pair) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
(pair', C, \<sigma>) \<in> ecl_ord
C = fst pair
\<sigma> = snd pair

goal (1 subgoal):
 1. (pair', pair) \<in> ecl_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pair', pair) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and hyp_ind
[PROOF STATE]
proof (chain)
picking this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))
[PROOF STEP]
have "?P pair'"
[PROOF STATE]
proof (prove)
using this:
(pair', pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from r ntr
[PROOF STATE]
proof (chain)
picking this:
R = Ecl Cl_R nt_R
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
[PROOF STEP]
have "trms_ecl R = (dom_trms (cl_ecl R)
            (subst_set ((trms_ecl C) \<union> (proper_subterms_of t)) \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
R = Ecl Cl_R nt_R
nt_R = dom_trms Cl_R (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)

goal (1 subgoal):
 1. trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
[PROOF STEP]
have "trms_ecl R \<subseteq> (subst_set ((trms_ecl C) \<union> (proper_subterms_of t)) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)

goal (1 subgoal):
 1. trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>
[PROOF STEP]
using dom_trms_subset
[PROOF STATE]
proof (prove)
using this:
trms_ecl R = dom_trms (cl_ecl R) (subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>)
dom_trms ?C ?E \<subseteq> ?E

goal (1 subgoal):
 1. trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>pair' \<in> S'\<close> and all_normalized_term_included
[PROOF STATE]
proof (chain)
picking this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)
[PROOF STEP]
have
          "(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair'))
             (trms_ecl R))"
[PROOF STATE]
proof (prove)
using this:
pair' \<in> S'
\<forall>x\<in>S'. subterms_inclusion (subst_set (trms_ecl (fst x)) (snd x)) (trms_ecl R)

goal (1 subgoal):
 1. subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
have i: "(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair'))
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (state)
this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
[PROOF STEP]
obtain t' t'' where "t' \<in> (subst_set (trms_ecl (fst pair')) (snd pair'))"
            "occurs_in t'' t'" and "trm_rep t'' S \<noteq> t''"
[PROOF STATE]
proof (prove)
using this:
\<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. (\<And>t' t''. \<lbrakk>t' \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in t'' t'; trm_rep t'' S \<noteq> t''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x y. x \<in> subst_set (trms_ecl (fst pair')) (snd pair') \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y)

goal (1 subgoal):
 1. (\<And>t' t''. \<lbrakk>t' \<in> subst_set (trms_ecl (fst pair')) (snd pair'); occurs_in t'' t'; trm_rep t'' S \<noteq> t''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
occurs_in t'' t'
trm_rep t'' S \<noteq> t''

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>t' \<in> (subst_set (trms_ecl (fst pair')) (snd pair'))\<close>
            and \<open>(subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)
[PROOF STEP]
obtain s' where "s' \<in> (trms_ecl R)" and "occurs_in t' s'"
[PROOF STATE]
proof (prove)
using this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
subterms_inclusion (subst_set (trms_ecl (fst pair')) (snd pair')) (trms_ecl R)

goal (1 subgoal):
 1. (\<And>s'. \<lbrakk>s' \<in> trms_ecl R; occurs_in t' s'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding subterms_inclusion_def
[PROOF STATE]
proof (prove)
using this:
t' \<in> subst_set (trms_ecl (fst pair')) (snd pair')
\<forall>x1\<in>subst_set (trms_ecl (fst pair')) (snd pair'). Bex (trms_ecl R) (occurs_in x1)

goal (1 subgoal):
 1. (\<And>s'. \<lbrakk>s' \<in> trms_ecl R; occurs_in t' s'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' \<in> trms_ecl R
occurs_in t' s'

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>s' \<in> (trms_ecl R)\<close> and \<open>trms_ecl R \<subseteq> (subst_set ((trms_ecl C) \<union> (proper_subterms_of t)) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
s' \<in> trms_ecl R
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>
[PROOF STEP]
have "s' \<in>(subst_set ((trms_ecl C) \<union> (proper_subterms_of t)) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
s' \<in> trms_ecl R
trms_ecl R \<subseteq> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>

goal (1 subgoal):
 1. s' \<in> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' \<in> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
s' \<in> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>
[PROOF STEP]
obtain s''
            where "s' = subst s'' \<sigma>" and "s'' \<in> ((trms_ecl C) \<union> (proper_subterms_of t))"
[PROOF STATE]
proof (prove)
using this:
s' \<in> subst_set (trms_ecl C \<union> proper_subterms_of t) \<sigma>

goal (1 subgoal):
 1. (\<And>s''. \<lbrakk>s' = s'' \<lhd> \<sigma>; s'' \<in> trms_ecl C \<union> proper_subterms_of t\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' = s'' \<lhd> \<sigma>
s'' \<in> trms_ecl C \<union> proper_subterms_of t

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
from \<open>s'' \<in> ((trms_ecl C) \<union> (proper_subterms_of t))\<close>
[PROOF STATE]
proof (chain)
picking this:
s'' \<in> trms_ecl C \<union> proper_subterms_of t
[PROOF STEP]
have "s'' \<in> trms_ecl C
            \<or> s'' \<in> (proper_subterms_of t)"
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C \<union> proper_subterms_of t

goal (1 subgoal):
 1. s'' \<in> trms_ecl C \<or> s'' \<in> proper_subterms_of t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s'' \<in> trms_ecl C \<or> s'' \<in> proper_subterms_of t

goal (1 subgoal):
 1. \<not> all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C \<or> s'' \<in> proper_subterms_of t

goal (1 subgoal):
 1. False
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
assume "s'' \<in> trms_ecl C"
[PROOF STATE]
proof (state)
this:
s'' \<in> trms_ecl C

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>s' = subst s'' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
s'' \<in> trms_ecl C
s' = s'' \<lhd> \<sigma>
[PROOF STEP]
have "s' \<in> (subst_set (trms_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
s'' \<in> trms_ecl C
s' = s'' \<lhd> \<sigma>

goal (1 subgoal):
 1. s' \<in> subst_set (trms_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s' \<in> subst_set (trms_ecl C) \<sigma>

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(all_trms_irreducible (subst_set (trms_ecl C) \<sigma>)
                  (\<lambda>t. (trm_rep t S)))\<close> and \<open>occurs_in t' s'\<close>
[PROOF STATE]
proof (chain)
picking this:
s' \<in> subst_set (trms_ecl C) \<sigma>
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
occurs_in t' s'
[PROOF STEP]
have "trm_rep t' S = t'"
[PROOF STATE]
proof (prove)
using this:
s' \<in> subst_set (trms_ecl C) \<sigma>
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
occurs_in t' s'

goal (1 subgoal):
 1. trm_rep t' S = t'
[PROOF STEP]
unfolding all_trms_irreducible_def
[PROOF STATE]
proof (prove)
using this:
s' \<in> subst_set (trms_ecl C) \<sigma>
\<forall>x y. x \<in> subst_set (trms_ecl C) \<sigma> \<longrightarrow> occurs_in y x \<longrightarrow> trm_rep y S = y
occurs_in t' s'

goal (1 subgoal):
 1. trm_rep t' S = t'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep t' S = t'

goal (2 subgoals):
 1. s'' \<in> trms_ecl C \<Longrightarrow> False
 2. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>occurs_in t'' t'\<close> and \<open>trm_rep t'' S \<noteq> t''\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''

goal (1 subgoal):
 1. False
[PROOF STEP]
using occurs_in_def subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
trm_rep t' S = t'
occurs_in t'' t'
trm_rep t'' S \<noteq> t''
occurs_in ?t ?s = (\<exists>p. subterm ?s p ?t)
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
assume " s'' \<in> (proper_subterms_of t)"
[PROOF STATE]
proof (state)
this:
s'' \<in> proper_subterms_of t

goal (1 subgoal):
 1. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
from \<open>occurs_in t' s'\<close> \<open>occurs_in t'' t'\<close> \<open>s' = s'' \<lhd> \<sigma>\<close> \<open>trm_rep t'' S \<noteq> t''\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in t' s'
occurs_in t'' t'
s' = s'' \<lhd> \<sigma>
trm_rep t'' S \<noteq> t''
[PROOF STEP]
have "trm_rep (subst s'' \<sigma>) S \<noteq>  (subst s'' \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
occurs_in t' s'
occurs_in t'' t'
s' = s'' \<lhd> \<sigma>
trm_rep t'' S \<noteq> t''

goal (1 subgoal):
 1. trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>
[PROOF STEP]
using occurs_in_def subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
occurs_in t' s'
occurs_in t'' t'
s' = s'' \<lhd> \<sigma>
trm_rep t'' S \<noteq> t''
occurs_in ?t ?s = (\<exists>p. subterm ?s p ?t)
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>

goal (1 subgoal):
 1. s'' \<in> proper_subterms_of t \<Longrightarrow> False
[PROOF STEP]
from this and \<open>s'' \<in> (proper_subterms_of t)\<close> and \<open>\<not> (proper_subterm_red t S \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>
s'' \<in> proper_subterms_of t
\<not> proper_subterm_red t S \<sigma>
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>
s'' \<in> proper_subterms_of t
\<not> proper_subterm_red t S \<sigma>

goal (1 subgoal):
 1. False
[PROOF STEP]
using proper_subterm_red_def "proper_subterms_of.simps"
[PROOF STATE]
proof (prove)
using this:
trm_rep (s'' \<lhd> \<sigma>) S \<noteq> s'' \<lhd> \<sigma>
s'' \<in> proper_subterms_of t
\<not> proper_subterm_red t S \<sigma>
proper_subterm_red ?t ?S ?\<sigma> = (\<exists>p s. subterm ?t p s \<and> p \<noteq> [] \<and> trm_rep (s \<lhd> ?\<sigma>) ?S \<noteq> s \<lhd> ?\<sigma>)
proper_subterms_of ?t = {s. \<exists>p. p \<noteq> [] \<and> subterm ?t p s}

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          ii: "ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>S' \<subseteq> (instances S)\<close> and \<open>pair' \<in> S'\<close>
[PROOF STATE]
proof (chain)
picking this:
S' \<subseteq> instances S
pair' \<in> S'
[PROOF STEP]
have
          iii: "(fst pair') \<in> S"
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> instances S
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
unfolding instances_def [of S]
[PROOF STATE]
proof (prove)
using this:
S' \<subseteq> {x. \<exists>C \<sigma>. C \<in> S \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> x = (C, \<sigma>)}
pair' \<in> S'

goal (1 subgoal):
 1. fst pair' \<in> S
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
fst pair' \<in> S

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from \<open>?P pair'\<close> and i ii iii
[PROOF STATE]
proof (chain)
picking this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S
[PROOF STEP]
have "validate_ground_clause ?I
          (subst_cl (cl_ecl (fst pair')) (snd pair'))"
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<forall>C \<sigma>. fst pair' = C \<longrightarrow> \<sigma> = snd pair' \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)
all_trms_irreducible (subst_set (trms_ecl (fst pair')) (snd pair')) (\<lambda>t. trm_rep t S)
ground_clause (subst_cl (cl_ecl (fst pair')) (snd pair'))
fst pair' \<in> S

goal (1 subgoal):
 1. validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl (fst pair')) (snd pair'))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))

goal (1 subgoal):
 1. \<not> validate_clause_set (int_clset S) (clset_instances S') \<Longrightarrow> False
[PROOF STEP]
from this and \<open>x = (subst_cl (cl_ecl (fst pair')) (snd pair'))\<close>
          and \<open>\<not>validate_clause ?I x\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl (fst pair')) (snd pair'))
x = subst_cl (cl_ecl (fst pair')) (snd pair')
\<not> validate_clause (int_clset S) x

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis ii substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
validate_clause_set (int_clset S) (clset_instances S')

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>fo_interpretation ?I\<close> and
        \<open>(set_entails_clause (clset_instances S') (cl_ecl R))\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)
[PROOF STEP]
have "validate_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
set_entails_clause (clset_instances S') (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
unfolding set_entails_clause_def
[PROOF STATE]
proof (prove)
using this:
validate_clause_set (int_clset S) (clset_instances S')
fo_interpretation (int_clset S)
\<forall>I. fo_interpretation I \<longrightarrow> validate_clause_set I (clset_instances S') \<longrightarrow> validate_clause I (cl_ecl R)

goal (1 subgoal):
 1. validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
have "validate_ground_clause ?I (cl_ecl R)"
[PROOF STATE]
proof (prove)
using this:
validate_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
by (metis \<open>R = Ecl Cl_R nt_R\<close> \<open>ground_clause Cl_R\<close>
            cl_ecl.simps substs_preserve_ground_clause validate_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (cl_ecl R)
[PROOF STEP]
obtain L'' where "L'' \<in> (cl_ecl R)" and "validate_ground_lit ?I L''"
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)

goal (1 subgoal):
 1. (\<And>L''. \<lbrakk>L'' \<in> cl_ecl R; validate_ground_lit (int_clset S) L''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using validate_ground_clause.simps
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (cl_ecl R)
validate_ground_clause ?I ?C = (\<exists>L. L \<in> ?C \<and> validate_ground_lit ?I L)

goal (1 subgoal):
 1. (\<And>L''. \<lbrakk>L'' \<in> cl_ecl R; validate_ground_lit (int_clset S) L''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
L'' \<in> cl_ecl R
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>L'' \<in> (cl_ecl R)\<close> and \<open>R = Ecl Cl_R nt_R\<close> and
          \<open>Cl_R = (subst_cl ( ((cl_ecl C) - { L2 }) \<union> { L' } ) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
L'' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>
[PROOF STEP]
obtain M where m: "M \<in> ( ((cl_ecl C) - { L2, L1 }) \<union> { L', L1 } )"
          and "L'' = subst_lit M \<sigma>"
[PROOF STATE]
proof (prove)
using this:
L'' \<in> cl_ecl R
R = Ecl Cl_R nt_R
Cl_R = subst_cl (cl_ecl C - {L2} \<union> {L'}) \<sigma>

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> cl_ecl C - {L2, L1} \<union> {L', L1}; L'' = subst_lit M \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M \<in> cl_ecl C - {L2, L1} \<union> {L', L1}
L'' = subst_lit M \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
have "M \<in> cl_ecl C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<in> cl_ecl C
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M \<notin> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
assume "M \<notin> cl_ecl C"
[PROOF STATE]
proof (state)
this:
M \<notin> cl_ecl C

goal (1 subgoal):
 1. M \<notin> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and m and l1
[PROOF STATE]
proof (chain)
picking this:
M \<notin> cl_ecl C
M \<in> cl_ecl C - {L2, L1} \<union> {L', L1}
L1 \<in> cl_ecl C
[PROOF STEP]
have "M = L'"
[PROOF STATE]
proof (prove)
using this:
M \<notin> cl_ecl C
M \<in> cl_ecl C - {L2, L1} \<union> {L', L1}
L1 \<in> cl_ecl C

goal (1 subgoal):
 1. M = L'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M = L'

goal (1 subgoal):
 1. M \<notin> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>L'' = subst_lit M \<sigma>\<close> and \<open>L' = (Neg (Eq s v))\<close>
[PROOF STATE]
proof (chain)
picking this:
M = L'
L'' = subst_lit M \<sigma>
L' = Neg (Eq s v)
[PROOF STEP]
have "L'' = (Neg (Eq (subst s \<sigma>)  (subst v \<sigma>)))"
[PROOF STATE]
proof (prove)
using this:
M = L'
L'' = subst_lit M \<sigma>
L' = Neg (Eq s v)

goal (1 subgoal):
 1. L'' = Neg (Eq (s \<lhd> \<sigma>) (v \<lhd> \<sigma>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L'' = Neg (Eq (s \<lhd> \<sigma>) (v \<lhd> \<sigma>))

goal (1 subgoal):
 1. M \<notin> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and \<open>validate_ground_lit ?I L''\<close>
[PROOF STATE]
proof (chain)
picking this:
L'' = Neg (Eq (s \<lhd> \<sigma>) (v \<lhd> \<sigma>))
validate_ground_lit (int_clset S) L''
[PROOF STEP]
have "\<not>(?I (subst s \<sigma>) (subst v \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
L'' = Neg (Eq (s \<lhd> \<sigma>) (v \<lhd> \<sigma>))
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. \<not> int_clset S (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)
[PROOF STEP]
using validate_ground_lit.simps(2) validate_ground_eq.simps
[PROOF STATE]
proof (prove)
using this:
L'' = Neg (Eq (s \<lhd> \<sigma>) (v \<lhd> \<sigma>))
validate_ground_lit (int_clset S) L''
validate_ground_lit ?I (Neg ?E) = (\<not> validate_ground_eq ?I ?E)
validate_ground_eq ?I (Eq ?t ?s) = ?I ?t ?s

goal (1 subgoal):
 1. \<not> int_clset S (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> int_clset S (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)

goal (1 subgoal):
 1. M \<notin> cl_ecl C \<Longrightarrow> False
[PROOF STEP]
from this and i
[PROOF STATE]
proof (chain)
picking this:
\<not> int_clset S (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> int_clset S (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding same_values_def int_clset_def
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M \<in> cl_ecl C

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from \<open>M \<in> cl_ecl C\<close> and \<open>L'' = subst_lit M \<sigma>\<close>and \<open>validate_ground_lit ?I L''\<close>
[PROOF STATE]
proof (chain)
picking this:
M \<in> cl_ecl C
L'' = subst_lit M \<sigma>
validate_ground_lit (int_clset S) L''
[PROOF STEP]
have "validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
M \<in> cl_ecl C
L'' = subst_lit M \<sigma>
validate_ground_lit (int_clset S) L''

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by (metis (mono_tags, lifting) subst_cl.simps mem_Collect_eq
              validate_ground_clause.simps)
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S) \<Longrightarrow> False
[PROOF STEP]
from this and cm
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>Now, it remains to prove that the considered clause yields a rule which can be used to
reduce the left-hand side of the maximal equation, which (since no reduction is possible)
entails that the left-hand side must be equivalent to the right-hand side
(thus contradicting the fact that the clause is false).\<close>
[PROOF STATE]
proof (state)
this:
\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "(finite (cl_ecl C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (cl_ecl C)
[PROOF STEP]
by (simp add: \<open>C \<in> S\<close> all_finite)
[PROOF STATE]
proof (state)
this:
finite (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "(cl_ecl C) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cl_ecl C \<noteq> {}
[PROOF STEP]
by (simp add: \<open>C \<in> S\<close> all_non_empty)
[PROOF STATE]
proof (state)
this:
cl_ecl C \<noteq> {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>finite (cl_ecl C)\<close> \<open>(cl_ecl C) \<noteq> {}\<close> \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
finite (cl_ecl C)
cl_ecl C \<noteq> {}
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
obtain L where "L \<in> (cl_ecl C)" "eligible_literal L C \<sigma>"
[PROOF STATE]
proof (prove)
using this:
finite (cl_ecl C)
cl_ecl C \<noteq> {}
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. (\<And>L. \<lbrakk>L \<in> cl_ecl C; eligible_literal L C \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using eligible_lit_exists
[PROOF STATE]
proof (prove)
using this:
finite (cl_ecl C)
cl_ecl C \<noteq> {}
ground_clause (subst_cl (cl_ecl C) \<sigma>)
\<lbrakk>finite (cl_ecl ?C); cl_ecl ?C \<noteq> {}; ground_clause (subst_cl (cl_ecl ?C) ?\<sigma>)\<rbrakk> \<Longrightarrow> \<exists>L. eligible_literal L ?C ?\<sigma> \<and> L \<in> cl_ecl ?C

goal (1 subgoal):
 1. (\<And>L. \<lbrakk>L \<in> cl_ecl C; eligible_literal L C \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
L \<in> cl_ecl C
eligible_literal L C \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
obtain t s p where "orient_lit_inst L t s p \<sigma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t s p. orient_lit_inst L t s p \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using literal.exhaust equation.exhaust
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>t s p. orient_lit_inst L t s p \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using trm_ord_irrefl trm_ord_trans
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P
irrefl trm_ord
trans trm_ord

goal (1 subgoal):
 1. (\<And>t s p. orient_lit_inst L t s p \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding orient_lit_inst_def irrefl_def trans_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<forall>a. (a, a) \<notin> trm_ord
\<forall>x y z. (x, y) \<in> trm_ord \<longrightarrow> (y, z) \<in> trm_ord \<longrightarrow> (x, z) \<in> trm_ord

goal (1 subgoal):
 1. (\<And>t s p. (L = Pos (Eq t s) \<or> L = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = pos \<or> (L = Neg (Eq t s) \<or> L = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = neg \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>We first show that the terms occurring inside variables are irreducible. To this aim,
we need to consider the normal form of the substitution @{term "\<sigma>"}, obtained by replacing the
image of each variable by its normal form.\<close>
[PROOF STATE]
proof (state)
this:
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "\<forall>x y.
        ((x \<in> vars_of_cl (cl_ecl C)) \<longrightarrow> occurs_in y (subst (Var x) \<sigma>) \<longrightarrow> trm_rep y S = y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(\<forall>x y. (x \<in> vars_of_cl (cl_ecl C)) \<longrightarrow> occurs_in y (subst (Var x) \<sigma>) \<longrightarrow> trm_rep y S = y)"
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y)

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y)
[PROOF STEP]
obtain x y where "(x \<in> vars_of_cl (cl_ecl C))" and
          "occurs_in y (subst (Var x) \<sigma>)" and "trm_rep y S \<noteq> y"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y)

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>x \<in> vars_of_cl (cl_ecl C); occurs_in y (Var x \<lhd> \<sigma>); trm_rep y S \<noteq> y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> vars_of_cl (cl_ecl C)
occurs_in y (Var x \<lhd> \<sigma>)
trm_rep y S \<noteq> y

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>occurs_in y (subst (Var x) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
occurs_in y (Var x \<lhd> \<sigma>)
[PROOF STEP]
obtain p where "subterm (subst (Var x) \<sigma>) p y"
[PROOF STATE]
proof (prove)
using this:
occurs_in y (Var x \<lhd> \<sigma>)

goal (1 subgoal):
 1. (\<And>p. subterm (Var x \<lhd> \<sigma>) p y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding occurs_in_def
[PROOF STATE]
proof (prove)
using this:
\<exists>p. subterm (Var x \<lhd> \<sigma>) p y

goal (1 subgoal):
 1. (\<And>p. subterm (Var x \<lhd> \<sigma>) p y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subterm (Var x \<lhd> \<sigma>) p y

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>subterm (subst (Var x) \<sigma>) p y\<close> and \<open>trm_rep y S \<noteq> y\<close>
[PROOF STATE]
proof (chain)
picking this:
subterm (Var x \<lhd> \<sigma>) p y
trm_rep y S \<noteq> y
[PROOF STEP]
have "trm_rep (subst (Var x) \<sigma>) S \<noteq> (subst (Var x) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
subterm (Var x \<lhd> \<sigma>) p y
trm_rep y S \<noteq> y

goal (1 subgoal):
 1. trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>
[PROOF STEP]
using subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
subterm (Var x \<lhd> \<sigma>) p y
trm_rep y S \<noteq> y
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
let ?\<theta> = "map_subst (\<lambda>x. (trm_rep x S)) \<sigma>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
have "equivalent_on \<sigma> ?\<theta> (vars_of_cl (cl_ecl C)) ?I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>equivalent_on \<sigma> ?\<theta> (vars_of_cl (cl_ecl C)) ?I"
[PROOF STATE]
proof (state)
this:
\<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)

goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
[PROOF STEP]
obtain z where "z \<in> vars_of_cl (cl_ecl C)"
            and "\<not> (?I (subst (Var z) \<sigma>)  (subst (Var z) ?\<theta>))"
[PROOF STATE]
proof (prove)
using this:
\<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> vars_of_cl (cl_ecl C); \<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding equivalent_on_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>vars_of_cl (cl_ecl C). int_clset S (Var x \<lhd> \<sigma>) (Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>))

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> vars_of_cl (cl_ecl C); \<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> vars_of_cl (cl_ecl C)
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)

goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
from \<open>\<not> (?I (subst (Var z) \<sigma>)  (subst (Var z) ?\<theta>))\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)
[PROOF STEP]
have "trm_rep (subst (Var z) \<sigma>) S \<noteq> trm_rep (subst (Var z) ?\<theta>) S"
[PROOF STATE]
proof (prove)
using this:
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)

goal (1 subgoal):
 1. trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
unfolding same_values_def int_clset_def
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S

goal (1 subgoal):
 1. trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S

goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
have "trm_rep (trm_rep (subst (Var z) \<sigma>) S) S \<noteq> trm_rep (subst (Var z) ?\<theta>) S"
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S

goal (1 subgoal):
 1. trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
using trm_rep_involutive
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var z \<lhd> \<sigma>) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
trm_rep (trm_rep ?t ?S) ?S = trm_rep ?t ?S

goal (1 subgoal):
 1. trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S

goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
[PROOF STEP]
have "(subst (Var z) \<sigma>) = (subst (Var z) ?\<theta>)"
[PROOF STATE]
proof (prove)
using this:
trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S

goal (1 subgoal):
 1. Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
using map_subst_lemma [of z \<sigma> "\<lambda>x. (trm_rep x S)"]
[PROOF STATE]
proof (prove)
using this:
trm_rep (trm_rep (Var z \<lhd> \<sigma>) S) S \<noteq> trm_rep (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>) S
Var z \<lhd> \<sigma> \<noteq> Var z \<or> Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> \<longrightarrow> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> = trm_rep (Var z \<lhd> \<sigma>) S

goal (1 subgoal):
 1. Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>

goal (1 subgoal):
 1. \<not> equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not> (?I (subst (Var z) \<sigma>)  (subst (Var z) ?\<theta>))\<close>
[PROOF STATE]
proof (chain)
picking this:
Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>fo_interpretation ?I\<close>
[PROOF STATE]
proof (prove)
using this:
Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)
fo_interpretation (int_clset S)

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding fo_interpretation_def congruence_def equivalence_relation_def reflexive_def
[PROOF STATE]
proof (prove)
using this:
Var z \<lhd> \<sigma> = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
\<not> int_clset S (Var z \<lhd> \<sigma>) (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>)
((\<forall>y. int_clset S y y) \<and> symmetric (int_clset S) \<and> transitive (int_clset S)) \<and> compatible_with_structure (int_clset S)

goal (1 subgoal):
 1. False
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)\<close>
          \<open>fo_interpretation ?I\<close>
[PROOF STATE]
proof (chain)
picking this:
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
[PROOF STEP]
have "\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) ?\<theta>)"
[PROOF STATE]
proof (prove)
using this:
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)

goal (1 subgoal):
 1. \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
using equivalent_on_cl
[PROOF STATE]
proof (prove)
using this:
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
\<lbrakk>equivalent_on ?\<sigma> ?\<eta> (vars_of_cl ?C) ?I; fo_interpretation ?I\<rbrakk> \<Longrightarrow> validate_ground_clause ?I (subst_cl ?C ?\<sigma>) = validate_ground_clause ?I (subst_cl ?C ?\<eta>)

goal (1 subgoal):
 1. \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
have "lower_on ?\<theta> \<sigma> (vars_of_cl (cl_ecl C))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C)) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>lower_on ?\<theta> \<sigma> (vars_of_cl (cl_ecl C))"
[PROOF STATE]
proof (state)
this:
\<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. \<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
[PROOF STEP]
obtain z where "z \<in> vars_of_cl (cl_ecl C)"
            and "(subst (Var z) \<sigma>) \<noteq> (subst (Var z) ?\<theta>)"
            and "((subst (Var z) ?\<theta>),(subst (Var z) \<sigma>)) \<notin> trm_ord"
[PROOF STATE]
proof (prove)
using this:
\<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> vars_of_cl (cl_ecl C); Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>; (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding lower_on_def lower_or_eq_def
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>vars_of_cl (cl_ecl C). Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> = Var x \<lhd> \<sigma> \<or> (Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> vars_of_cl (cl_ecl C); Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>; (Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
z \<in> vars_of_cl (cl_ecl C)
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
(Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord

goal (1 subgoal):
 1. \<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(subst (Var z) \<sigma>) \<noteq> (subst (Var z) ?\<theta>)\<close>
[PROOF STATE]
proof (chain)
picking this:
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
have
            "(trm_rep (subst (Var z) \<sigma>) S) = (subst (Var z) ?\<theta>)"
[PROOF STATE]
proof (prove)
using this:
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>

goal (1 subgoal):
 1. trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
using map_subst_lemma [of z \<sigma> "\<lambda>x. (trm_rep x S)"]
[PROOF STATE]
proof (prove)
using this:
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
Var z \<lhd> \<sigma> \<noteq> Var z \<or> Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> \<longrightarrow> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> = trm_rep (Var z \<lhd> \<sigma>) S

goal (1 subgoal):
 1. trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>

goal (1 subgoal):
 1. \<not> lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(subst (Var z) \<sigma>) \<noteq> (subst (Var z) ?\<theta>)\<close>
            and \<open>((subst (Var z) ?\<theta>),(subst (Var z) \<sigma>)) \<notin> trm_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
(Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
(Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
using trm_rep_is_lower
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var z \<lhd> \<sigma>) S = Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
Var z \<lhd> \<sigma> \<noteq> Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
(Var z \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var z \<lhd> \<sigma>) \<notin> trm_ord
?t \<noteq> trm_rep ?t ?S \<longrightarrow> (trm_rep ?t ?S, ?t) \<in> trm_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
have "subst (Var x) \<sigma> \<noteq> (Var x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Var x \<lhd> \<sigma> \<noteq> Var x
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Var x \<lhd> \<sigma> = Var x \<Longrightarrow> False
[PROOF STEP]
assume "subst (Var x) \<sigma> = (Var x)"
[PROOF STATE]
proof (state)
this:
Var x \<lhd> \<sigma> = Var x

goal (1 subgoal):
 1. Var x \<lhd> \<sigma> = Var x \<Longrightarrow> False
[PROOF STEP]
from this and \<open>x \<in> vars_of_cl (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
Var x \<lhd> \<sigma> = Var x
x \<in> vars_of_cl (cl_ecl C)
[PROOF STEP]
have "\<not> (ground_on (vars_of_cl (cl_ecl C)) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
Var x \<lhd> \<sigma> = Var x
x \<in> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. \<not> ground_on (vars_of_cl (cl_ecl C)) \<sigma>
[PROOF STEP]
unfolding ground_on_def ground_term_def
[PROOF STATE]
proof (prove)
using this:
Var x \<lhd> \<sigma> = Var x
x \<in> vars_of_cl (cl_ecl C)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>vars_of_cl (cl_ecl C). vars_of (Var x \<lhd> \<sigma>) = {})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> ground_on (vars_of_cl (cl_ecl C)) \<sigma>

goal (1 subgoal):
 1. Var x \<lhd> \<sigma> = Var x \<Longrightarrow> False
[PROOF STEP]
from this and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> ground_on (vars_of_cl (cl_ecl C)) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> ground_on (vars_of_cl (cl_ecl C)) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
using ground_clauses_and_ground_substs
[PROOF STATE]
proof (prove)
using this:
\<not> ground_on (vars_of_cl (cl_ecl C)) \<sigma>
ground_clause (subst_cl (cl_ecl C) \<sigma>)
ground_clause (subst_cl ?C ?\<sigma>) \<Longrightarrow> ground_on (vars_of_cl ?C) ?\<sigma>

goal (1 subgoal):
 1. False
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Var x \<lhd> \<sigma> \<noteq> Var x

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>subst (Var x) \<sigma> \<noteq> (Var x)\<close>
[PROOF STATE]
proof (chain)
picking this:
Var x \<lhd> \<sigma> \<noteq> Var x
[PROOF STEP]
have "(trm_rep (subst (Var x) \<sigma>) S) = (subst (Var x) ?\<theta>)"
[PROOF STATE]
proof (prove)
using this:
Var x \<lhd> \<sigma> \<noteq> Var x

goal (1 subgoal):
 1. trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
using map_subst_lemma [of x \<sigma> "\<lambda>x. (trm_rep x S)"]
[PROOF STATE]
proof (prove)
using this:
Var x \<lhd> \<sigma> \<noteq> Var x
Var x \<lhd> \<sigma> \<noteq> Var x \<or> Var x \<lhd> \<sigma> \<noteq> Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> \<longrightarrow> Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma> = trm_rep (Var x \<lhd> \<sigma>) S

goal (1 subgoal):
 1. trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>trm_rep (subst (Var x) \<sigma>) S \<noteq> (subst (Var x) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>
[PROOF STEP]
have "((subst (Var x) ?\<theta>),(subst (Var x) \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>

goal (1 subgoal):
 1. (Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
using trm_rep_is_lower
[PROOF STATE]
proof (prove)
using this:
trm_rep (Var x \<lhd> \<sigma>) S = Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>
trm_rep (Var x \<lhd> \<sigma>) S \<noteq> Var x \<lhd> \<sigma>
?t \<noteq> trm_rep ?t ?S \<longrightarrow> (trm_rep ?t ?S, ?t) \<in> trm_ord

goal (1 subgoal):
 1. (Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>lower_on ?\<theta> \<sigma> (vars_of_cl (cl_ecl C))\<close> and \<open>x \<in> vars_of_cl (cl_ecl C)\<close>
          \<open>finite (cl_ecl C)\<close>
          and \<open>((subst (Var x) ?\<theta>),(subst (Var x) \<sigma>)) \<in> trm_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
x \<in> vars_of_cl (cl_ecl C)
finite (cl_ecl C)
(Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
have "((C,?\<theta>), (C, \<sigma>)) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
x \<in> vars_of_cl (cl_ecl C)
finite (cl_ecl C)
(Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. ((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
using lower_on_cl
[PROOF STATE]
proof (prove)
using this:
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
x \<in> vars_of_cl (cl_ecl C)
finite (cl_ecl C)
(Var x \<lhd> map_subst (\<lambda>x. trm_rep x S) \<sigma>, Var x \<lhd> \<sigma>) \<in> trm_ord
\<lbrakk>lower_on ?\<sigma> ?\<eta> (vars_of_cl (cl_ecl ?C)); (Var ?x \<lhd> ?\<sigma>, Var ?x \<lhd> ?\<eta>) \<in> trm_ord; ?x \<in> vars_of_cl (cl_ecl ?C); finite (cl_ecl ?C)\<rbrakk> \<Longrightarrow> ((?C, ?\<sigma>), ?C, ?\<eta>) \<in> ecl_ord

goal (1 subgoal):
 1. ((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>C = fst pair\<close> \<open>\<sigma> = snd pair\<close>
[PROOF STATE]
proof (chain)
picking this:
C = fst pair
\<sigma> = snd pair
[PROOF STEP]
have "pair = (C,\<sigma>)"
[PROOF STATE]
proof (prove)
using this:
C = fst pair
\<sigma> = snd pair

goal (1 subgoal):
 1. pair = (C, \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pair = (C, \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from this  and \<open>((C,?\<theta>), (C, \<sigma>)) \<in> ecl_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
pair = (C, \<sigma>)
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), C, \<sigma>) \<in> ecl_ord
[PROOF STEP]
have
          "((C,?\<theta>),pair) \<in> ecl_ord"
[PROOF STATE]
proof (prove)
using this:
pair = (C, \<sigma>)
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), C, \<sigma>) \<in> ecl_ord

goal (1 subgoal):
 1. ((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), pair) \<in> ecl_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), pair) \<in> ecl_ord

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from this and hyp_ind
[PROOF STATE]
proof (chain)
picking this:
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))
[PROOF STEP]
have "?P (C,?\<theta>)"
[PROOF STATE]
proof (prove)
using this:
((C, map_subst (\<lambda>x. trm_rep x S) \<sigma>), pair) \<in> ecl_ord
\<forall>y. (y, pair) \<in> ecl_ord \<longrightarrow> (\<forall>C \<sigma>. fst y = C \<longrightarrow> \<sigma> = snd y \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>))

goal (1 subgoal):
 1. \<forall>Ca \<sigma>'. fst (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) = Ca \<longrightarrow> \<sigma>' = snd (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<longrightarrow> Ca \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl Ca) \<sigma>') \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl Ca) \<sigma>') (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl Ca) \<sigma>')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>Ca \<sigma>'. fst (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) = Ca \<longrightarrow> \<sigma>' = snd (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<longrightarrow> Ca \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl Ca) \<sigma>') \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl Ca) \<sigma>') (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl Ca) \<sigma>')

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from \<open>(all_trms_irreducible (subst_set (trms_ecl C) \<sigma>)
                  (\<lambda>t. (trm_rep t S)))\<close>
              \<open>lower_on ?\<theta> \<sigma> (vars_of_cl (cl_ecl C))\<close> \<open>C \<in> S\<close> \<open>fo_interpretation ?I\<close>
              \<open>equivalent_on \<sigma> ?\<theta> (vars_of_cl (cl_ecl C)) ?I\<close> assms(3)
[PROOF STATE]
proof (chain)
picking this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
C \<in> S
fo_interpretation (int_clset S)
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
Ball S well_constrained
[PROOF STEP]
have "(all_trms_irreducible (subst_set (trms_ecl C) ?\<theta>)
                  (\<lambda>t. (trm_rep t S)))"
[PROOF STATE]
proof (prove)
using this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
C \<in> S
fo_interpretation (int_clset S)
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
Ball S well_constrained

goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
[PROOF STEP]
using irred_terms_and_reduced_subst
[PROOF STATE]
proof (prove)
using this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
C \<in> S
fo_interpretation (int_clset S)
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
Ball S well_constrained
\<lbrakk>?f = (\<lambda>t. trm_rep t ?S); ?\<eta> = map_subst ?f ?\<sigma>; all_trms_irreducible (subst_set ?E ?\<sigma>) ?f; ?I = int_clset ?S; equivalent_on ?\<sigma> ?\<eta> (vars_of_cl (cl_ecl ?C)) ?I; lower_on ?\<eta> ?\<sigma> (vars_of_cl (cl_ecl ?C)); ?E = trms_ecl ?C; \<forall>x\<in>?S. \<forall>y. y \<in> trms_ecl x \<longrightarrow> dom_trm y (cl_ecl x); ?C \<in> ?S; fo_interpretation ?I\<rbrakk> \<Longrightarrow> all_trms_irreducible (subst_set ?E ?\<eta>) ?f

goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
[PROOF STEP]
unfolding Ball_def well_constrained_def
[PROOF STATE]
proof (prove)
using this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
C \<in> S
fo_interpretation (int_clset S)
equivalent_on \<sigma> (map_subst (\<lambda>x. trm_rep x S) \<sigma>) (vars_of_cl (cl_ecl C)) (int_clset S)
\<forall>x. x \<in> S \<longrightarrow> (\<forall>y. y \<in> trms_ecl x \<longrightarrow> dom_trm y (cl_ecl x))
\<lbrakk>?f = (\<lambda>t. trm_rep t ?S); ?\<eta> = map_subst ?f ?\<sigma>; all_trms_irreducible (subst_set ?E ?\<sigma>) ?f; ?I = int_clset ?S; equivalent_on ?\<sigma> ?\<eta> (vars_of_cl (cl_ecl ?C)) ?I; lower_on ?\<eta> ?\<sigma> (vars_of_cl (cl_ecl ?C)); ?E = trms_ecl ?C; \<forall>x. x \<in> ?S \<longrightarrow> (\<forall>y. y \<in> trms_ecl x \<longrightarrow> dom_trm y (cl_ecl x)); ?C \<in> ?S; fo_interpretation ?I\<rbrakk> \<Longrightarrow> all_trms_irreducible (subst_set ?E ?\<eta>) ?f

goal (1 subgoal):
 1. all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
have "ground_clause (subst_cl (cl_ecl C) ?\<theta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "ground_on (vars_of_cl (cl_ecl C)) \<sigma>"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. ground_on (vars_of_cl (cl_ecl C)) \<sigma>
[PROOF STEP]
using ground_clauses_and_ground_substs
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
ground_clause (subst_cl ?C ?\<sigma>) \<Longrightarrow> ground_on (vars_of_cl ?C) ?\<sigma>

goal (1 subgoal):
 1. ground_on (vars_of_cl (cl_ecl C)) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ground_on (vars_of_cl (cl_ecl C)) \<sigma>

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
from this and \<open>lower_on ?\<theta> \<sigma> (vars_of_cl (cl_ecl C))\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_on (vars_of_cl (cl_ecl C)) \<sigma>
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
[PROOF STEP]
have "ground_on (vars_of_cl (cl_ecl C)) ?\<theta>"
[PROOF STATE]
proof (prove)
using this:
ground_on (vars_of_cl (cl_ecl C)) \<sigma>
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))

goal (1 subgoal):
 1. ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)
[PROOF STEP]
using lower_on_ground
[PROOF STATE]
proof (prove)
using this:
ground_on (vars_of_cl (cl_ecl C)) \<sigma>
lower_on (map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<sigma> (vars_of_cl (cl_ecl C))
\<lbrakk>lower_on ?\<sigma> ?\<eta> ?V; ground_on ?V ?\<eta>\<rbrakk> \<Longrightarrow> ground_on ?V ?\<sigma>

goal (1 subgoal):
 1. ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)
[PROOF STEP]
by meson
[PROOF STATE]
proof (state)
this:
ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
using ground_substs_yield_ground_clause
[PROOF STATE]
proof (prove)
using this:
ground_on (vars_of_cl (cl_ecl C)) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)
ground_on (vars_of_cl ?C) ?\<sigma> \<Longrightarrow> ground_clause (subst_cl ?C ?\<sigma>)

goal (1 subgoal):
 1. ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))

goal (1 subgoal):
 1. \<not> (\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y) \<Longrightarrow> False
[PROOF STEP]
from this
          \<open>(all_trms_irreducible (subst_set (trms_ecl C) ?\<theta>) (\<lambda>t. (trm_rep t S)))\<close>
          \<open>?P (C,?\<theta>)\<close> \<open>\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) ?\<theta>)\<close>
          \<open>C \<in> S\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
\<forall>Ca \<sigma>'. fst (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) = Ca \<longrightarrow> \<sigma>' = snd (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<longrightarrow> Ca \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl Ca) \<sigma>') \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl Ca) \<sigma>') (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl Ca) \<sigma>')
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
C \<in> S
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
\<forall>Ca \<sigma>'. fst (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) = Ca \<longrightarrow> \<sigma>' = snd (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<longrightarrow> Ca \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl Ca) \<sigma>') \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl Ca) \<sigma>') (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl Ca) \<sigma>')
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
C \<in> S

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
all_trms_irreducible (subst_set (trms_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>)) (\<lambda>t. trm_rep t S)
\<forall>Ca \<sigma>'. fst (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) = Ca \<longrightarrow> \<sigma>' = snd (C, map_subst (\<lambda>x. trm_rep x S) \<sigma>) \<longrightarrow> Ca \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl Ca) \<sigma>') \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl Ca) \<sigma>') (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl Ca) \<sigma>')
\<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) (map_subst (\<lambda>x. trm_rep x S) \<sigma>))
C \<in> S

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis fst_conv snd_conv)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>Next, we show that the eligible term @{term "t"} is in normal form.
We first need to establish the result for proper subterms of @{term "t"} before considering
the general case.\<close>
[PROOF STATE]
proof (state)
this:
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "\<not>(proper_subterm_red t S \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> proper_subterm_red t S \<sigma>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. proper_subterm_red t S \<sigma> \<Longrightarrow> False
[PROOF STEP]
assume "(proper_subterm_red t S \<sigma>)"
[PROOF STATE]
proof (state)
this:
proper_subterm_red t S \<sigma>

goal (1 subgoal):
 1. proper_subterm_red t S \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
proper_subterm_red t S \<sigma>
[PROOF STEP]
have "trm_rep (subst t \<sigma>) S \<noteq> subst t \<sigma>"
[PROOF STATE]
proof (prove)
using this:
proper_subterm_red t S \<sigma>

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
[PROOF STEP]
using proper_subterm_red_def substs_preserve_subterms subts_of_irred_trms_are_irred
[PROOF STATE]
proof (prove)
using this:
proper_subterm_red t S \<sigma>
proper_subterm_red ?t ?S ?\<sigma> = (\<exists>p s. subterm ?t p s \<and> p \<noteq> [] \<and> trm_rep (s \<lhd> ?\<sigma>) ?S \<noteq> s \<lhd> ?\<sigma>)
subterm ?t ?p ?s \<Longrightarrow> subterm (?t \<lhd> ?\<sigma>) ?p (?s \<lhd> ?\<sigma>)
trm_rep ?y ?S \<noteq> ?y \<Longrightarrow> subterm ?x ?p ?y \<longrightarrow> trm_rep ?x ?S \<noteq> ?x

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>

goal (1 subgoal):
 1. proper_subterm_red t S \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>(proper_subterm_red t S \<sigma>)\<close>
          \<open>\<forall>x y.
        ((x \<in> vars_of_cl (cl_ecl C)) \<longrightarrow> occurs_in y (subst (Var x) \<sigma>) \<longrightarrow> trm_rep y S = y)\<close>
        \<open>eligible_literal L C \<sigma>\<close>
        \<open>trm_rep (subst t \<sigma>) S \<noteq> subst t \<sigma>\<close> \<open>L \<in> cl_ecl C\<close>
        \<open>orient_lit_inst L t s p \<sigma>\<close> \<open>\<forall>x\<in>S. finite (cl_ecl x)\<close>
        \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
        \<open>fo_interpretation (int_clset S)\<close>
        \<open>Ball S well_constrained\<close> \<open>C \<in> S\<close>
        \<open>all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)\<close>
        \<open>\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)\<close>
        \<open>closed_under_renaming S\<close>
[PROOF STATE]
proof (chain)
picking this:
proper_subterm_red t S \<sigma>
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
[PROOF STEP]
have "
            \<exists>\<sigma>'' u u' pa v D L2. (reduction L C \<sigma>'' t s p L2 u u' pa v D
              (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D)"
[PROOF STATE]
proof (prove)
using this:
proper_subterm_red t S \<sigma>
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
using reduction_exists [of p t s C S \<sigma> L]
[PROOF STATE]
proof (prove)
using this:
proper_subterm_red t S \<sigma>
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
\<lbrakk>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L \<or> proper_subterm_red t S \<sigma>; \<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y; eligible_literal L C \<sigma>; trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>; L \<in> cl_ecl C; orient_lit_inst L t s p \<sigma>; \<forall>x\<in>S. finite (cl_ecl x); ground_clause (subst_cl (cl_ecl C) \<sigma>); fo_interpretation (same_values (\<lambda>t. trm_rep t S)); C \<in> S; Ball S well_constrained; all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>); closed_under_renaming S\<rbrakk> \<Longrightarrow> \<exists>\<sigma>' u u' pa v D L2. reduction L C \<sigma>' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
proper_subterm_red t S \<sigma>
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (same_values (\<lambda>x. trm_rep x S))
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
\<lbrakk>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L \<or> proper_subterm_red t S \<sigma>; \<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y; eligible_literal L C \<sigma>; trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>; L \<in> cl_ecl C; orient_lit_inst L t s p \<sigma>; \<forall>x\<in>S. finite (cl_ecl x); ground_clause (subst_cl (cl_ecl C) \<sigma>); fo_interpretation (same_values (\<lambda>t. trm_rep t S)); C \<in> S; Ball S well_constrained; all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>); closed_under_renaming S\<rbrakk> \<Longrightarrow> \<exists>\<sigma>' u u' pa v D L2. reduction L C \<sigma>' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. proper_subterm_red t S \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this and \<open>?nored\<close>
[PROOF STATE]
proof (chain)
picking this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (same_values (\<lambda>x. trm_rep x S)) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> proper_subterm_red t S \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma>
        L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
assume neg: "\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C)
            (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)"
[PROOF STATE]
proof (state)
this:
\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)
[PROOF STEP]
have "p \<noteq> neg"
[PROOF STATE]
proof (prove)
using this:
\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)

goal (1 subgoal):
 1. p \<noteq> neg
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
p \<noteq> neg

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from neg
[PROOF STATE]
proof (chain)
picking this:
\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)
[PROOF STEP]
have "equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L"
[PROOF STATE]
proof (prove)
using this:
\<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L)

goal (1 subgoal):
 1. equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from \<open>p \<noteq> neg\<close>
[PROOF STATE]
proof (chain)
picking this:
p \<noteq> neg
[PROOF STEP]
have "p = pos"
[PROOF STATE]
proof (prove)
using this:
p \<noteq> neg

goal (1 subgoal):
 1. p = pos
[PROOF STEP]
using sign.exhaust
[PROOF STATE]
proof (prove)
using this:
p \<noteq> neg
\<lbrakk>?y = pos \<Longrightarrow> ?P; ?y = neg \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. p = pos
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = pos

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from \<open>equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L\<close>
[PROOF STATE]
proof (chain)
picking this:
equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
obtain L2 where "L2 \<in> (cl_ecl C) - { L }" and f:"\<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and>
                subst t \<sigma> = subst u \<sigma> \<and> trm_rep (subst s \<sigma>) S = trm_rep (subst v \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L

goal (1 subgoal):
 1. (\<And>L2. \<lbrakk>L2 \<in> cl_ecl C - {L}; \<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding equivalent_eq_exists_def
[PROOF STATE]
proof (prove)
using this:
\<exists>L\<in>cl_ecl C - {L}. \<exists>u v. orient_lit_inst L u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> same_values (\<lambda>x. trm_rep x S) (s \<lhd> \<sigma>) (v \<lhd> \<sigma>)

goal (1 subgoal):
 1. (\<And>L2. \<lbrakk>L2 \<in> cl_ecl C - {L}; \<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding same_values_def
[PROOF STATE]
proof (prove)
using this:
\<exists>L\<in>cl_ecl C - {L}. \<exists>u v. orient_lit_inst L u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. (\<And>L2. \<lbrakk>L2 \<in> cl_ecl C - {L}; \<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
L2 \<in> cl_ecl C - {L}
\<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from f
[PROOF STATE]
proof (chain)
picking this:
\<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
obtain u v where f': "orient_lit_inst L2 u v pos \<sigma> \<and> subst t \<sigma> = subst u \<sigma>
            \<and> trm_rep (subst s \<sigma>) S = trm_rep (subst v \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
\<exists>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. (\<And>u v. orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from f'
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
have "orient_lit_inst L2 u v pos \<sigma>"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. orient_lit_inst L2 u v pos \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
orient_lit_inst L2 u v pos \<sigma>

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from f'
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
have "subst t \<sigma> = subst u \<sigma>"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. t \<lhd> \<sigma> = u \<lhd> \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> = u \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from f'
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
have "trm_rep (subst s \<sigma>) S = trm_rep (subst v \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L2 u v pos \<sigma> \<and> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<and> trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L) \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L2 u v pos \<sigma>\<close> \<open>subst t \<sigma> = subst u \<sigma>\<close>
            \<open>trm_rep (subst s \<sigma>) S = trm_rep (subst v \<sigma>) S\<close>
            \<open>orient_lit_inst L t s p \<sigma>\<close> \<open>p = pos\<close> \<open>L \<in> (cl_ecl C)\<close> \<open>L2 \<in> (cl_ecl C) - { L }\<close>
            \<open>eligible_literal L C \<sigma>\<close>
           \<open>\<not>(proper_subterm_red t S \<sigma>)\<close>
            and \<open>?no_fact\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L2 u v pos \<sigma>
t \<lhd> \<sigma> = u \<lhd> \<sigma>
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
orient_lit_inst L t s p \<sigma>
p = pos
L \<in> cl_ecl C
L2 \<in> cl_ecl C - {L}
eligible_literal L C \<sigma>
\<not> proper_subterm_red t S \<sigma>
\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L2 u v pos \<sigma>
t \<lhd> \<sigma> = u \<lhd> \<sigma>
trm_rep (s \<lhd> \<sigma>) S = trm_rep (v \<lhd> \<sigma>) S
orient_lit_inst L t s p \<sigma>
p = pos
L \<in> cl_ecl C
L2 \<in> cl_ecl C - {L}
eligible_literal L C \<sigma>
\<not> proper_subterm_red t S \<sigma>
\<forall>L1 L2 t s u v. L1 \<in> cl_ecl C \<longrightarrow> eligible_literal L1 C \<sigma> \<longrightarrow> L2 \<in> cl_ecl C - {L1} \<longrightarrow> orient_lit_inst L1 t s pos \<sigma> \<longrightarrow> orient_lit_inst L2 u v pos \<sigma> \<longrightarrow> t \<lhd> \<sigma> = u \<lhd> \<sigma> \<longrightarrow> \<not> proper_subterm_red t S \<sigma> \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (v \<lhd> \<sigma>) S

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "(trm_rep (subst t \<sigma>) S) = (subst t \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma> \<Longrightarrow> False
[PROOF STEP]
assume "(trm_rep (subst t \<sigma>) S) \<noteq>  (subst t \<sigma>)"
[PROOF STATE]
proof (state)
this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L\<close>
          \<open>\<forall>x y.
        ((x \<in> vars_of_cl (cl_ecl C)) \<longrightarrow> occurs_in y (subst (Var x) \<sigma>) \<longrightarrow> trm_rep y S = y)\<close>
        \<open>eligible_literal L C \<sigma>\<close>
        \<open>trm_rep (subst t \<sigma>) S \<noteq> subst t \<sigma>\<close> \<open>L \<in> cl_ecl C\<close>
        \<open>orient_lit_inst L t s p \<sigma>\<close> \<open>\<forall>x\<in>S. finite (cl_ecl x)\<close>
        \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
        \<open>fo_interpretation (int_clset S)\<close>
        \<open>Ball S well_constrained\<close> \<open>C \<in> S\<close>
        \<open>all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)\<close>
        \<open>\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)\<close>
        \<open>closed_under_renaming S\<close>
[PROOF STATE]
proof (chain)
picking this:
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
[PROOF STEP]
have "
            \<exists>\<sigma>'' u u' pa v D L2. (reduction L C \<sigma>'' t s p L2 u u' pa v D
              (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D)"
[PROOF STATE]
proof (prove)
using this:
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
using reduction_exists [of p t s C S \<sigma> L]
[PROOF STATE]
proof (prove)
using this:
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (int_clset S)
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
\<lbrakk>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L \<or> proper_subterm_red t S \<sigma>; \<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y; eligible_literal L C \<sigma>; trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>; L \<in> cl_ecl C; orient_lit_inst L t s p \<sigma>; \<forall>x\<in>S. finite (cl_ecl x); ground_clause (subst_cl (cl_ecl C) \<sigma>); fo_interpretation (same_values (\<lambda>t. trm_rep t S)); C \<in> S; Ball S well_constrained; all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>); closed_under_renaming S\<rbrakk> \<Longrightarrow> \<exists>\<sigma>' u u' pa v D L2. reduction L C \<sigma>' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
\<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y
eligible_literal L C \<sigma>
trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
\<forall>x\<in>S. finite (cl_ecl x)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
fo_interpretation (same_values (\<lambda>x. trm_rep x S))
Ball S well_constrained
C \<in> S
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
\<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>)
closed_under_renaming S
\<lbrakk>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L \<or> proper_subterm_red t S \<sigma>; \<forall>x y. x \<in> vars_of_cl (cl_ecl C) \<longrightarrow> occurs_in y (Var x \<lhd> \<sigma>) \<longrightarrow> trm_rep y S = y; eligible_literal L C \<sigma>; trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma>; L \<in> cl_ecl C; orient_lit_inst L t s p \<sigma>; \<forall>x\<in>S. finite (cl_ecl x); ground_clause (subst_cl (cl_ecl C) \<sigma>); fo_interpretation (same_values (\<lambda>t. trm_rep t S)); C \<in> S; Ball S well_constrained; all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S); \<not> validate_ground_clause (same_values (\<lambda>x. trm_rep x S)) (subst_cl (cl_ecl C) \<sigma>); closed_under_renaming S\<rbrakk> \<Longrightarrow> \<exists>\<sigma>' u u' pa v D L2. reduction L C \<sigma>' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. \<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> t \<lhd> \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this and \<open>?nored\<close>
[PROOF STATE]
proof (chain)
picking this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (int_clset S) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
\<exists>\<sigma>'' u u' pa v D L2. reduction L C \<sigma>'' t s p L2 u u' pa v D (same_values (\<lambda>t. trm_rep t S)) S \<sigma> \<and> variable_disjoint C D
\<forall>L1 L2 D t s u' u v p polarity \<sigma>'. \<not> (reduction L1 C \<sigma>' t s polarity L2 u u' p v D (same_values (\<lambda>x. trm_rep x S)) S \<sigma> \<and> variable_disjoint C D)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L t s p \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L t s p \<sigma>
[PROOF STEP]
have "((subst t \<sigma>),(subst s \<sigma>)) \<notin> trm_ord"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
(L = Pos (Eq t s) \<or> L = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = pos \<or> (L = Neg (Eq t s) \<or> L = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = neg

goal (1 subgoal):
 1. (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
ground_clause (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>L \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}
L \<in> cl_ecl C
[PROOF STEP]
have "vars_of_lit (subst_lit L \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}
L \<in> cl_ecl C

goal (1 subgoal):
 1. vars_of_lit (subst_lit L \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit L \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L t s p \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L t s p \<sigma>
[PROOF STEP]
have "orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
using lift_orient_lit
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>
orient_lit_inst ?L ?t ?s ?p ?\<sigma> \<Longrightarrow> orient_lit (subst_lit ?L ?\<sigma>) (?t \<lhd> ?\<sigma>) (?s \<lhd> ?\<sigma>) ?p

goal (1 subgoal):
 1. orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from  \<open>orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
have "vars_of (subst t \<sigma>) \<subseteq> vars_of_lit  (subst_lit L \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
[PROOF STEP]
using  orient_lit_vars
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
orient_lit ?L ?t ?s ?p \<Longrightarrow> vars_of ?t \<subseteq> vars_of_lit ?L \<and> vars_of ?s \<subseteq> vars_of_lit ?L

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of (t \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of_lit (subst_lit L \<sigma>) = {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of (t \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
vars_of_lit (subst_lit L \<sigma>) = {}
[PROOF STEP]
have "vars_of (subst t \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of (t \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
vars_of_lit (subst_lit L \<sigma>) = {}

goal (1 subgoal):
 1. vars_of (t \<lhd> \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of (t \<lhd> \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from  \<open>orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
have "vars_of (subst s \<sigma>) \<subseteq> vars_of_lit  (subst_lit L \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
[PROOF STEP]
using  orient_lit_vars
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
orient_lit ?L ?t ?s ?p \<Longrightarrow> vars_of ?t \<subseteq> vars_of_lit ?L \<and> vars_of ?s \<subseteq> vars_of_lit ?L

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of (s \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>vars_of_lit (subst_lit L \<sigma>) = {}\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of (s \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
vars_of_lit (subst_lit L \<sigma>) = {}
[PROOF STEP]
have "vars_of (subst s \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of (s \<lhd> \<sigma>) \<subseteq> vars_of_lit (subst_lit L \<sigma>)
vars_of_lit (subst_lit L \<sigma>) = {}

goal (1 subgoal):
 1. vars_of (s \<lhd> \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of (s \<lhd> \<sigma>) = {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from
          \<open>((subst t \<sigma>),(subst s \<sigma>)) \<notin> trm_ord\<close>
          \<open>vars_of (subst t \<sigma>) = {}\<close> \<open>vars_of (subst s \<sigma>) = {}\<close>
[PROOF STATE]
proof (chain)
picking this:
(t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
vars_of (t \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}
[PROOF STEP]
have "(subst t \<sigma>) = (subst s \<sigma>) \<or> ((subst s \<sigma>),(subst t \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
(t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
vars_of (t \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}

goal (1 subgoal):
 1. t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
using trm_ord_ground_total
[PROOF STATE]
proof (prove)
using this:
(t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
vars_of (t \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}
\<forall>x y. ground_term x \<longrightarrow> ground_term y \<longrightarrow> x \<noteq> y \<longrightarrow> (x, y) \<in> trm_ord \<or> (y, x) \<in> trm_ord

goal (1 subgoal):
 1. t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
unfolding ground_term_def
[PROOF STATE]
proof (prove)
using this:
(t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord
vars_of (t \<lhd> \<sigma>) = {}
vars_of (s \<lhd> \<sigma>) = {}
\<forall>x y. vars_of x = {} \<longrightarrow> vars_of y = {} \<longrightarrow> x \<noteq> y \<longrightarrow> (x, y) \<in> trm_ord \<or> (y, x) \<in> trm_ord

goal (1 subgoal):
 1. t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from  \<open>L \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
L \<in> cl_ecl C
[PROOF STEP]
have "(subst_lit L \<sigma>) \<in> (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
L \<in> cl_ecl C

goal (1 subgoal):
 1. subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>Using the fact that the eligible term is in normal form and that the eligible literal
is false in the considered interpretation but is not a contradiction, we deduce that this literal
must be positive.\<close>
[PROOF STATE]
proof (state)
this:
subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "p = pos"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = pos
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
assume "p \<noteq> pos"
[PROOF STATE]
proof (state)
this:
p \<noteq> pos

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
p \<noteq> pos
[PROOF STEP]
have "p = neg"
[PROOF STATE]
proof (prove)
using this:
p \<noteq> pos

goal (1 subgoal):
 1. p = neg
[PROOF STEP]
using sign.exhaust
[PROOF STATE]
proof (prove)
using this:
p \<noteq> pos
\<lbrakk>?y = pos \<Longrightarrow> ?P; ?y = neg \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. p = neg
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = neg

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from \<open>trm_rep (subst t \<sigma>) S =  (subst t \<sigma>)\<close> \<open>L \<in> (cl_ecl C)\<close> \<open>eligible_literal L C \<sigma>\<close>
          and \<open>orient_lit_inst L t s p \<sigma>\<close> \<open>p = neg\<close> \<open>?no_cont\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s p \<sigma>
p = neg
\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
[PROOF STEP]
have "(subst t \<sigma>) \<noteq> (subst s \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
L \<in> cl_ecl C
eligible_literal L C \<sigma>
orient_lit_inst L t s p \<sigma>
p = neg
\<forall>L t s. L \<in> cl_ecl C \<longrightarrow> eligible_literal L C \<sigma> \<longrightarrow> orient_lit_inst L t s neg \<sigma> \<longrightarrow> trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma> \<longrightarrow> t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this and
           \<open>(subst t \<sigma>) = (subst s \<sigma>) \<or> ((subst s \<sigma>),(subst t \<sigma>)) \<in> trm_ord\<close>
          and \<open>trm_rep (subst t \<sigma>) S = subst t \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
[PROOF STEP]
have "((trm_rep (subst s \<sigma>) S),(trm_rep (subst t \<sigma>) S)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>

goal (1 subgoal):
 1. (trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord
[PROOF STEP]
using trm_rep_is_lower [of " (subst s \<sigma>)" S ] trm_ord_trans
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
s \<lhd> \<sigma> \<noteq> trm_rep (s \<lhd> \<sigma>) S \<longrightarrow> (trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> trm_ord
trans trm_ord

goal (1 subgoal):
 1. (trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord
[PROOF STEP]
unfolding trans_def
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
s \<lhd> \<sigma> \<noteq> trm_rep (s \<lhd> \<sigma>) S \<longrightarrow> (trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> trm_ord
\<forall>x y z. (x, y) \<in> trm_ord \<longrightarrow> (y, z) \<in> trm_ord \<longrightarrow> (x, z) \<in> trm_ord

goal (1 subgoal):
 1. (trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
(trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord
[PROOF STEP]
have "(trm_rep (subst s \<sigma>) S) \<noteq> (trm_rep (subst t \<sigma>) S)"
[PROOF STATE]
proof (prove)
using this:
(trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord

goal (1 subgoal):
 1. trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
[PROOF STEP]
using trm_ord_irrefl irrefl_def
[PROOF STATE]
proof (prove)
using this:
(trm_rep (s \<lhd> \<sigma>) S, trm_rep (t \<lhd> \<sigma>) S) \<in> trm_ord
irrefl trm_ord
irrefl ?r = (\<forall>a. (a, a) \<notin> ?r)

goal (1 subgoal):
 1. trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
[PROOF STEP]
have "\<not>validate_ground_eq ?I (Eq (subst t \<sigma>) (subst s \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> validate_ground_eq (int_clset S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))
[PROOF STEP]
unfolding same_values_def int_clset_def
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> validate_ground_eq (\<lambda>x y. trm_rep x S = trm_rep y S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))
[PROOF STEP]
using validate_ground_eq.simps
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
validate_ground_eq ?I (Eq ?t ?s) = ?I ?t ?s

goal (1 subgoal):
 1. \<not> validate_ground_eq (\<lambda>x y. trm_rep x S = trm_rep y S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))
[PROOF STEP]
by (metis (mono_tags, lifting))
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_eq (int_clset S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from \<open>(trm_rep (subst s \<sigma>) S) \<noteq> (trm_rep (subst t \<sigma>) S)\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
[PROOF STEP]
have "\<not>validate_ground_eq ?I (Eq (subst s \<sigma>) (subst t \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> validate_ground_eq (int_clset S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
[PROOF STEP]
unfolding same_values_def  int_clset_def
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> validate_ground_eq (\<lambda>x y. trm_rep x S = trm_rep y S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
[PROOF STEP]
using validate_ground_eq.simps
[PROOF STATE]
proof (prove)
using this:
trm_rep (s \<lhd> \<sigma>) S \<noteq> trm_rep (t \<lhd> \<sigma>) S
validate_ground_eq ?I (Eq ?t ?s) = ?I ?t ?s

goal (1 subgoal):
 1. \<not> validate_ground_eq (\<lambda>x y. trm_rep x S = trm_rep y S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
[PROOF STEP]
by (metis (mono_tags, lifting))
[PROOF STATE]
proof (state)
this:
\<not> validate_ground_eq (int_clset S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L t s p \<sigma>\<close> and \<open>p=neg\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L t s p \<sigma>
p = neg
[PROOF STEP]
have "L = (Neg (Eq t s)) \<or> L = (Neg (Eq s t))"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>
p = neg

goal (1 subgoal):
 1. L = Neg (Eq t s) \<or> L = Neg (Eq s t)
[PROOF STEP]
unfolding orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
(L = Pos (Eq t s) \<or> L = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = pos \<or> (L = Neg (Eq t s) \<or> L = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = neg
p = neg

goal (1 subgoal):
 1. L = Neg (Eq t s) \<or> L = Neg (Eq s t)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L = Neg (Eq t s) \<or> L = Neg (Eq s t)

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
L = Neg (Eq t s) \<or> L = Neg (Eq s t)
[PROOF STEP]
have "subst_lit L \<sigma> = (Neg (Eq (subst t \<sigma>)  (subst s \<sigma>)))
          \<or> subst_lit L \<sigma> = (Neg (Eq (subst s \<sigma>)  (subst t \<sigma>)))"
[PROOF STATE]
proof (prove)
using this:
L = Neg (Eq t s) \<or> L = Neg (Eq s t)

goal (1 subgoal):
 1. subst_lit L \<sigma> = Neg (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>)) \<or> subst_lit L \<sigma> = Neg (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
subst_lit L \<sigma> = Neg (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>)) \<or> subst_lit L \<sigma> = Neg (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not>validate_ground_eq ?I (Eq (subst s \<sigma>) (subst t \<sigma>))\<close>
          and \<open>\<not>validate_ground_eq ?I (Eq (subst t \<sigma>) (subst s \<sigma>))\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L \<sigma> = Neg (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>)) \<or> subst_lit L \<sigma> = Neg (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))
[PROOF STEP]
have "validate_ground_lit ?I (subst_lit L \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
subst_lit L \<sigma> = Neg (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>)) \<or> subst_lit L \<sigma> = Neg (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))

goal (1 subgoal):
 1. validate_ground_lit (int_clset S) (subst_lit L \<sigma>)
[PROOF STEP]
using validate_ground_lit.simps(2)
[PROOF STATE]
proof (prove)
using this:
subst_lit L \<sigma> = Neg (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>)) \<or> subst_lit L \<sigma> = Neg (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (s \<lhd> \<sigma>) (t \<lhd> \<sigma>))
\<not> validate_ground_eq (int_clset S) (Eq (t \<lhd> \<sigma>) (s \<lhd> \<sigma>))
validate_ground_lit ?I (Neg ?E) = (\<not> validate_ground_eq ?I ?E)

goal (1 subgoal):
 1. validate_ground_lit (int_clset S) (subst_lit L \<sigma>)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
validate_ground_lit (int_clset S) (subst_lit L \<sigma>)

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from \<open>(subst_lit L \<sigma>) \<in> (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>validate_ground_lit ?I (subst_lit L \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
validate_ground_lit (int_clset S) (subst_lit L \<sigma>)
[PROOF STEP]
have "validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
validate_ground_lit (int_clset S) (subst_lit L \<sigma>)

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
using validate_ground_clause.elims(3)
[PROOF STATE]
proof (prove)
using this:
subst_lit L \<sigma> \<in> subst_cl (cl_ecl C) \<sigma>
validate_ground_lit (int_clset S) (subst_lit L \<sigma>)
\<lbrakk>\<not> validate_ground_clause ?x ?xa; \<And>I C. \<lbrakk>?x = I; ?xa = C; \<nexists>L. L \<in> C \<and> validate_ground_lit I L\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. p \<noteq> pos \<Longrightarrow> False
[PROOF STEP]
from this and \<open>\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
p = pos

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
text \<open>This entails that the right-hand side of the eligible literal occurs in the set of
possible values for the left-hand side @{term "t"}, which is impossible since this term is
irreducible.\<close>
[PROOF STATE]
proof (state)
this:
p = pos

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>L \<in> (cl_ecl C)\<close> \<open>orient_lit_inst L t s p \<sigma>\<close> \<open>p = pos\<close>
      \<open>\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
p = pos
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "trm_rep (subst t \<sigma>) S \<noteq> trm_rep (subst s \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
p = pos
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
using no_valid_literal
[PROOF STATE]
proof (prove)
using this:
L \<in> cl_ecl C
orient_lit_inst L t s p \<sigma>
p = pos
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<lbrakk>?L \<in> ?C; orient_lit_inst ?L ?t ?s pos ?\<sigma>; \<not> validate_ground_clause (int_clset ?S) (subst_cl ?C ?\<sigma>)\<rbrakk> \<Longrightarrow> trm_rep (?t \<lhd> ?\<sigma>) ?S \<noteq> trm_rep (?s \<lhd> ?\<sigma>) ?S

goal (1 subgoal):
 1. trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S
[PROOF STEP]
have "(subst t \<sigma>) \<noteq> (subst s \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
trm_rep (t \<lhd> \<sigma>) S \<noteq> trm_rep (s \<lhd> \<sigma>) S

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(subst t \<sigma>) = (subst s \<sigma>) \<or> ((subst s \<sigma>),(subst t \<sigma>)) \<in> trm_ord\<close>
[PROOF STATE]
proof (chain)
picking this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
have "((subst s \<sigma>),(subst t \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
using trm_ord_ground_total
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
\<forall>x y. ground_term x \<longrightarrow> ground_term y \<longrightarrow> x \<noteq> y \<longrightarrow> (x, y) \<in> trm_ord \<or> (y, x) \<in> trm_ord

goal (1 subgoal):
 1. (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
unfolding ground_term_def
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<noteq> s \<lhd> \<sigma>
t \<lhd> \<sigma> = s \<lhd> \<sigma> \<or> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
\<forall>x y. vars_of x = {} \<longrightarrow> vars_of y = {} \<longrightarrow> x \<noteq> y \<longrightarrow> (x, y) \<in> trm_ord \<or> (y, x) \<in> trm_ord

goal (1 subgoal):
 1. (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>p=pos\<close> and \<open>orient_lit_inst L t s p \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
p = pos
orient_lit_inst L t s p \<sigma>
[PROOF STEP]
have "\<not>negative_literal L"
[PROOF STATE]
proof (prove)
using this:
p = pos
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. \<not> negative_literal L
[PROOF STEP]
unfolding  orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
p = pos
(L = Pos (Eq t s) \<or> L = Pos (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = pos \<or> (L = Neg (Eq t s) \<or> L = Neg (Eq s t)) \<and> (t \<lhd> \<sigma>, s \<lhd> \<sigma>) \<notin> trm_ord \<and> p = neg

goal (1 subgoal):
 1. \<not> negative_literal L
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> negative_literal L

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>eligible_literal L C \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> negative_literal L
eligible_literal L C \<sigma>
[PROOF STEP]
have "sel(cl_ecl C) = {}" and "maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
\<not> negative_literal L
eligible_literal L C \<sigma>

goal (1 subgoal):
 1. sel (cl_ecl C) = {} &&& maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
using sel_neg
[PROOF STATE]
proof (prove)
using this:
\<not> negative_literal L
eligible_literal L C \<sigma>
\<forall>x. sel (cl_ecl x) \<subseteq> cl_ecl x \<and> (\<forall>y\<in>sel (cl_ecl x). negative_literal y)

goal (1 subgoal):
 1. sel (cl_ecl C) = {} &&& maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
unfolding eligible_literal_def
[PROOF STATE]
proof (prove)
using this:
\<not> negative_literal L
L \<in> sel (cl_ecl C) \<or> sel (cl_ecl C) = {} \<and> maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
\<forall>x. sel (cl_ecl x) \<subseteq> cl_ecl x \<and> (\<forall>y\<in>sel (cl_ecl x). negative_literal y)

goal (1 subgoal):
 1. sel (cl_ecl C) = {} &&& maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sel (cl_ecl C) = {}
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>\<not> validate_ground_clause ?I (subst_cl (cl_ecl C) \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
[PROOF STEP]
have "smaller_lits_are_false (subst t \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S"
[PROOF STATE]
proof (prove)
using this:
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)

goal (1 subgoal):
 1. smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S
[PROOF STEP]
using smaller_lits_are_false_if_cl_not_valid [of S "(subst_cl (cl_ecl C) \<sigma>)" ]
[PROOF STATE]
proof (prove)
using this:
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>)
\<not> validate_ground_clause (int_clset S) (subst_cl (cl_ecl C) \<sigma>) \<Longrightarrow> smaller_lits_are_false ?t (subst_cl (cl_ecl C) \<sigma>) S

goal (1 subgoal):
 1. smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>p = pos\<close> and \<open>p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C)
                          (same_values (\<lambda>x. trm_rep x S)) \<sigma> L\<close>
[PROOF STATE]
proof (chain)
picking this:
p = pos
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
have "\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L"
[PROOF STATE]
proof (prove)
using this:
p = pos
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L

goal (1 subgoal):
 1. \<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L
[PROOF STEP]
unfolding int_clset_def
[PROOF STATE]
proof (prove)
using this:
p = pos
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L

goal (1 subgoal):
 1. \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
using sign.distinct
[PROOF STATE]
proof (prove)
using this:
p = pos
p = neg \<or> \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
pos \<noteq> neg
neg \<noteq> pos

goal (1 subgoal):
 1. \<not> equivalent_eq_exists t s (cl_ecl C) (same_values (\<lambda>x. trm_rep x S)) \<sigma> L
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this \<open>p=pos\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L
p = pos
[PROOF STEP]
have "maximal_literal_is_unique (subst t \<sigma>) (subst s \<sigma>) (cl_ecl C) L S \<sigma>"
[PROOF STATE]
proof (prove)
using this:
\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L
p = pos

goal (1 subgoal):
 1. maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
[PROOF STEP]
using maximal_literal_is_unique_lemma [of t s "(cl_ecl C)" S \<sigma> L]
[PROOF STATE]
proof (prove)
using this:
\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L
p = pos
\<not> equivalent_eq_exists t s (cl_ecl C) (int_clset S) \<sigma> L \<Longrightarrow> maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>

goal (1 subgoal):
 1. maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)\<close>
[PROOF STATE]
proof (chain)
picking this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
[PROOF STEP]
have "trms_irreducible C \<sigma> S (subst t \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)

goal (1 subgoal):
 1. trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)
[PROOF STEP]
using trms_irreducible_lemma
[PROOF STATE]
proof (prove)
using this:
all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S)
all_trms_irreducible (subst_set (trms_ecl ?C) ?\<sigma>) (\<lambda>t. trm_rep t ?S) \<Longrightarrow> trms_irreducible ?C ?\<sigma> ?S ?t

goal (1 subgoal):
 1. trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
have "(subst t \<sigma>) \<notin> subst_set (trms_ecl C) \<sigma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
assume "(subst t \<sigma>) \<in> subst_set (trms_ecl C) \<sigma>"
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma>

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma>
[PROOF STEP]
obtain t' where "t' \<in> trms_ecl C" and "(subst t' \<sigma>) = (subst t \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma>

goal (1 subgoal):
 1. (\<And>t'. \<lbrakk>t' \<in> trms_ecl C; t' \<lhd> \<sigma> = t \<lhd> \<sigma>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t' \<in> trms_ecl C
t' \<lhd> \<sigma> = t \<lhd> \<sigma>

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>t' \<in> trms_ecl C\<close> and assms(3) and \<open>C \<in> S\<close>
[PROOF STATE]
proof (chain)
picking this:
t' \<in> trms_ecl C
Ball S well_constrained
C \<in> S
[PROOF STEP]
have "dom_trm t' (cl_ecl C)"
[PROOF STATE]
proof (prove)
using this:
t' \<in> trms_ecl C
Ball S well_constrained
C \<in> S

goal (1 subgoal):
 1. dom_trm t' (cl_ecl C)
[PROOF STEP]
unfolding Ball_def well_constrained_def
[PROOF STATE]
proof (prove)
using this:
t' \<in> trms_ecl C
\<forall>x. x \<in> S \<longrightarrow> (\<forall>y. y \<in> trms_ecl x \<longrightarrow> dom_trm y (cl_ecl x))
C \<in> S

goal (1 subgoal):
 1. dom_trm t' (cl_ecl C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dom_trm t' (cl_ecl C)

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
dom_trm t' (cl_ecl C)
[PROOF STEP]
obtain M u v q where "M \<in> (cl_ecl C)" "decompose_literal M u v q" and
        "q = neg \<and> (u = t') \<or> ( (t',u) \<in> trm_ord)"
[PROOF STATE]
proof (prove)
using this:
dom_trm t' (cl_ecl C)

goal (1 subgoal):
 1. (\<And>M u v q. \<lbrakk>M \<in> cl_ecl C; decompose_literal M u v q; q = neg \<and> u = t' \<or> (t', u) \<in> trm_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding dom_trm_def
[PROOF STATE]
proof (prove)
using this:
\<exists>L u v p. L \<in> cl_ecl C \<and> decompose_literal L u v p \<and> (p = neg \<and> t' = u \<or> (t', u) \<in> trm_ord)

goal (1 subgoal):
 1. (\<And>M u v q. \<lbrakk>M \<in> cl_ecl C; decompose_literal M u v q; q = neg \<and> u = t' \<or> (t', u) \<in> trm_ord\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
M \<in> cl_ecl C
decompose_literal M u v q
q = neg \<and> u = t' \<or> (t', u) \<in> trm_ord

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
obtain u' v' q' where "orient_lit_inst M u' v' q' \<sigma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>u' v' q'. orient_lit_inst M u' v' q' \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using literal.exhaust equation.exhaust
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P

goal (1 subgoal):
 1. (\<And>u' v' q'. orient_lit_inst M u' v' q' \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using trm_ord_irrefl trm_ord_trans
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P
irrefl trm_ord
trans trm_ord

goal (1 subgoal):
 1. (\<And>u' v' q'. orient_lit_inst M u' v' q' \<sigma> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding orient_lit_inst_def irrefl_def trans_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x1. ?y = Pos x1 \<Longrightarrow> ?P; \<And>x2. ?y = Neg x2 \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
(\<And>x1 x2. ?y = Eq x1 x2 \<Longrightarrow> ?P) \<Longrightarrow> ?P
\<forall>a. (a, a) \<notin> trm_ord
\<forall>x y z. (x, y) \<in> trm_ord \<longrightarrow> (y, z) \<in> trm_ord \<longrightarrow> (x, z) \<in> trm_ord

goal (1 subgoal):
 1. (\<And>u' v' q'. (M = Pos (Eq u' v') \<or> M = Pos (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = pos \<or> (M = Neg (Eq u' v') \<or> M = Neg (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = neg \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
orient_lit_inst M u' v' q' \<sigma>

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>decompose_literal M u v q\<close> and \<open>orient_lit_inst M u' v' q' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
decompose_literal M u v q
orient_lit_inst M u' v' q' \<sigma>
[PROOF STEP]
have "u = u' \<or> u = v'"
[PROOF STATE]
proof (prove)
using this:
decompose_literal M u v q
orient_lit_inst M u' v' q' \<sigma>

goal (1 subgoal):
 1. u = u' \<or> u = v'
[PROOF STEP]
unfolding decompose_literal_def orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
\<exists>e. q = pos \<and> M = Pos e \<and> decompose_equation e u v \<or> q = neg \<and> M = Neg e \<and> decompose_equation e u v
(M = Pos (Eq u' v') \<or> M = Pos (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = pos \<or> (M = Neg (Eq u' v') \<or> M = Neg (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = neg

goal (1 subgoal):
 1. u = u' \<or> u = v'
[PROOF STEP]
by (metis atom.simps(2) decompose_equation_def equation.inject literal.distinct(1)
              literal.inject(1))
[PROOF STATE]
proof (state)
this:
u = u' \<or> u = v'

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>decompose_literal M u v q\<close> and \<open>orient_lit_inst M u' v' q' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
decompose_literal M u v q
orient_lit_inst M u' v' q' \<sigma>
[PROOF STEP]
have "q = q'"
[PROOF STATE]
proof (prove)
using this:
decompose_literal M u v q
orient_lit_inst M u' v' q' \<sigma>

goal (1 subgoal):
 1. q = q'
[PROOF STEP]
unfolding decompose_literal_def orient_lit_inst_def
[PROOF STATE]
proof (prove)
using this:
\<exists>e. q = pos \<and> M = Pos e \<and> decompose_equation e u v \<or> q = neg \<and> M = Neg e \<and> decompose_equation e u v
(M = Pos (Eq u' v') \<or> M = Pos (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = pos \<or> (M = Neg (Eq u' v') \<or> M = Neg (Eq v' u')) \<and> (u' \<lhd> \<sigma>, v' \<lhd> \<sigma>) \<notin> trm_ord \<and> q' = neg

goal (1 subgoal):
 1. q = q'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
q = q'

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}\<close> and \<open>M \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}
M \<in> cl_ecl C
[PROOF STEP]
have "vars_of_lit (subst_lit M \<sigma>) = {}"
[PROOF STATE]
proof (prove)
using this:
vars_of_cl (subst_cl (cl_ecl C) \<sigma>) = {}
M \<in> cl_ecl C

goal (1 subgoal):
 1. vars_of_lit (subst_lit M \<sigma>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vars_of_lit (subst_lit M \<sigma>) = {}

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst M u' v' q' \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst M u' v' q' \<sigma>
[PROOF STEP]
have
          "orient_lit (subst_lit M \<sigma>) (subst u' \<sigma>) (subst v' \<sigma>) q'"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst M u' v' q' \<sigma>

goal (1 subgoal):
 1. orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
[PROOF STEP]
using lift_orient_lit
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst M u' v' q' \<sigma>
orient_lit_inst ?L ?t ?s ?p ?\<sigma> \<Longrightarrow> orient_lit (subst_lit ?L ?\<sigma>) (?t \<lhd> ?\<sigma>) (?s \<lhd> ?\<sigma>) ?p

goal (1 subgoal):
 1. orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit_inst L t s p \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit_inst L t s p \<sigma>
[PROOF STEP]
have
          "orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p"
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>

goal (1 subgoal):
 1. orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
using lift_orient_lit
[PROOF STATE]
proof (prove)
using this:
orient_lit_inst L t s p \<sigma>
orient_lit_inst ?L ?t ?s ?p ?\<sigma> \<Longrightarrow> orient_lit (subst_lit ?L ?\<sigma>) (?t \<lhd> ?\<sigma>) (?s \<lhd> ?\<sigma>) ?p

goal (1 subgoal):
 1. orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
have "(t',u) \<notin> trm_ord"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t', u) \<notin> trm_ord
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (t', u) \<in> trm_ord \<Longrightarrow> False
[PROOF STEP]
assume "(t',u) \<in> trm_ord"
[PROOF STATE]
proof (state)
this:
(t', u) \<in> trm_ord

goal (1 subgoal):
 1. (t', u) \<in> trm_ord \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(t', u) \<in> trm_ord
[PROOF STEP]
have "((subst t' \<sigma>),(subst u \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
(t', u) \<in> trm_ord

goal (1 subgoal):
 1. (t' \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
using trm_ord_subst
[PROOF STATE]
proof (prove)
using this:
(t', u) \<in> trm_ord
\<forall>s x y. (x, y) \<in> trm_ord \<longrightarrow> (x \<lhd> s, y \<lhd> s) \<in> trm_ord

goal (1 subgoal):
 1. (t' \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(t' \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. (t', u) \<in> trm_ord \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(subst t' \<sigma>) = (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
(t' \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
t' \<lhd> \<sigma> = t \<lhd> \<sigma>
[PROOF STEP]
have
          "((subst t \<sigma>),(subst u \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
(t' \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
t' \<lhd> \<sigma> = t \<lhd> \<sigma>

goal (1 subgoal):
 1. (t \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(t \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. (t', u) \<in> trm_ord \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit (subst_lit M \<sigma>) (subst u' \<sigma>) (subst v' \<sigma>) q'\<close>
          and \<open>orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p\<close>
          and \<open>((subst t \<sigma>),(subst u \<sigma>)) \<in> trm_ord\<close>
          and \<open>vars_of_lit (subst_lit M \<sigma>) = {}\<close>
          and \<open>vars_of_lit (subst_lit L \<sigma>) = {}\<close>
          and \<open>u = u' \<or> u = v'\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
(t \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'
[PROOF STEP]
have "((subst_lit L \<sigma>),(subst_lit M \<sigma>)) \<in> lit_ord"
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
(t \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'

goal (1 subgoal):
 1. (subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
[PROOF STEP]
using lit_ord_dominating_term
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
(t \<lhd> \<sigma>, u \<lhd> \<sigma>) \<in> trm_ord
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'
\<lbrakk>(?s1.0, ?s2.0) \<in> trm_ord \<or> (?s1.0, ?t2.0) \<in> trm_ord; orient_lit ?x1.0 ?s1.0 ?t1.0 ?p1.0; orient_lit ?x2.0 ?s2.0 ?t2.0 ?p2.0; vars_of_lit ?x1.0 = {}; vars_of_lit ?x2.0 = {}\<rbrakk> \<Longrightarrow> (?x1.0, ?x2.0) \<in> lit_ord

goal (1 subgoal):
 1. (subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord

goal (1 subgoal):
 1. (t', u) \<in> trm_ord \<Longrightarrow> False
[PROOF STEP]
from this and \<open>maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>M \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C

goal (1 subgoal):
 1. False
[PROOF STEP]
using maximal_literal_def
[PROOF STATE]
proof (prove)
using this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C
maximal_literal ?L ?C = (\<forall>x. x \<in> ?C \<longrightarrow> (?L, x) \<notin> lit_ord)

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(t', u) \<notin> trm_ord

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
have "\<not> (q = neg \<and> (u = t'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (q = neg \<and> u = t')
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. q = neg \<and> u = t' \<Longrightarrow> False
[PROOF STEP]
assume "q = neg \<and> (u = t')"
[PROOF STATE]
proof (state)
this:
q = neg \<and> u = t'

goal (1 subgoal):
 1. q = neg \<and> u = t' \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
q = neg \<and> u = t'
[PROOF STEP]
have "q = neg" and "u = t'"
[PROOF STATE]
proof (prove)
using this:
q = neg \<and> u = t'

goal (1 subgoal):
 1. q = neg &&& u = t'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
q = neg
u = t'

goal (1 subgoal):
 1. q = neg \<and> u = t' \<Longrightarrow> False
[PROOF STEP]
from \<open>orient_lit (subst_lit M \<sigma>) (subst u' \<sigma>) (subst v' \<sigma>) q'\<close>
          and \<open>orient_lit (subst_lit L \<sigma>) (subst t \<sigma>) (subst s \<sigma>) p\<close>
          and \<open>u = t'\<close>
          and \<open>(subst t' \<sigma>) = (subst t \<sigma>)\<close>
          and \<open>q = neg\<close> and \<open>q = q'\<close>
          and \<open>p = pos\<close>
          and \<open>vars_of_lit (subst_lit M \<sigma>) = {}\<close>
          and \<open>vars_of_lit (subst_lit L \<sigma>) = {}\<close>
          and \<open>u = u' \<or> u = v'\<close>
[PROOF STATE]
proof (chain)
picking this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
u = t'
t' \<lhd> \<sigma> = t \<lhd> \<sigma>
q = neg
q = q'
p = pos
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'
[PROOF STEP]
have "((subst_lit L \<sigma>),(subst_lit M \<sigma>)) \<in> lit_ord"
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
u = t'
t' \<lhd> \<sigma> = t \<lhd> \<sigma>
q = neg
q = q'
p = pos
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'

goal (1 subgoal):
 1. (subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
[PROOF STEP]
using lit_ord_neg_lit_lhs lit_ord_neg_lit_rhs
[PROOF STATE]
proof (prove)
using this:
orient_lit (subst_lit M \<sigma>) (u' \<lhd> \<sigma>) (v' \<lhd> \<sigma>) q'
orient_lit (subst_lit L \<sigma>) (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) p
u = t'
t' \<lhd> \<sigma> = t \<lhd> \<sigma>
q = neg
q = q'
p = pos
vars_of_lit (subst_lit M \<sigma>) = {}
vars_of_lit (subst_lit L \<sigma>) = {}
u = u' \<or> u = v'
\<lbrakk>orient_lit ?x1.0 ?s ?t1.0 pos; orient_lit ?x2.0 ?s ?t2.0 neg; vars_of_lit ?x1.0 = {}; vars_of_lit ?x2.0 = {}\<rbrakk> \<Longrightarrow> (?x1.0, ?x2.0) \<in> lit_ord
\<lbrakk>orient_lit ?x1.0 ?s ?t1.0 pos; orient_lit ?x2.0 ?t2.0 ?s neg; vars_of_lit ?x1.0 = {}; vars_of_lit ?x2.0 = {}\<rbrakk> \<Longrightarrow> (?x1.0, ?x2.0) \<in> lit_ord

goal (1 subgoal):
 1. (subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord

goal (1 subgoal):
 1. q = neg \<and> u = t' \<Longrightarrow> False
[PROOF STEP]
from this and \<open>maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>M \<in> (cl_ecl C)\<close>
[PROOF STATE]
proof (chain)
picking this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C

goal (1 subgoal):
 1. False
[PROOF STEP]
using maximal_literal_def
[PROOF STATE]
proof (prove)
using this:
(subst_lit L \<sigma>, subst_lit M \<sigma>) \<in> lit_ord
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
M \<in> cl_ecl C
maximal_literal ?L ?C = (\<forall>x. x \<in> ?C \<longrightarrow> (?L, x) \<notin> lit_ord)

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> (q = neg \<and> u = t')

goal (1 subgoal):
 1. t \<lhd> \<sigma> \<in> subst_set (trms_ecl C) \<sigma> \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(t',u) \<notin> trm_ord\<close> and \<open>q = neg \<and> (u = t') \<or> ( (t',u) \<in> trm_ord)\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> (q = neg \<and> u = t')
(t', u) \<notin> trm_ord
q = neg \<and> u = t' \<or> (t', u) \<in> trm_ord
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> (q = neg \<and> u = t')
(t', u) \<notin> trm_ord
q = neg \<and> u = t' \<or> (t', u) \<in> trm_ord

goal (1 subgoal):
 1. False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma>

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>C \<in> S\<close> \<open>(subst s \<sigma>, subst t \<sigma>) \<in> trm_ord\<close>
          and \<open>p=pos\<close> \<open>orient_lit_inst L t s p \<sigma>\<close> and \<open>sel (cl_ecl C) = {}\<close>
          and \<open>L \<in> cl_ecl C\<close>
          and \<open>maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>ground_clause (subst_cl (cl_ecl C) \<sigma>)\<close>
          and \<open>finite (cl_ecl C)\<close>
          and \<open>smaller_lits_are_false (subst t \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S\<close>
          and \<open>maximal_literal_is_unique  (subst t \<sigma>) (subst s \<sigma>) (cl_ecl C) L S \<sigma>\<close>
          and \<open>trms_irreducible C \<sigma> S  (subst t \<sigma>)\<close>
          and \<open>(subst t \<sigma>) \<notin> subst_set (trms_ecl C) \<sigma>\<close>
[PROOF STATE]
proof (chain)
picking this:
C \<in> S
(s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
p = pos
orient_lit_inst L t s p \<sigma>
sel (cl_ecl C) = {}
L \<in> cl_ecl C
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
finite (cl_ecl C)
smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S
maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)
t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma>
[PROOF STEP]
have cv: "(candidate_values (trm_rep (subst s \<sigma>) S) C (cl_ecl C)
          (subst_cl (cl_ecl C) \<sigma>) (subst s \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (subst t \<sigma>) S)"
[PROOF STATE]
proof (prove)
using this:
C \<in> S
(s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
p = pos
orient_lit_inst L t s p \<sigma>
sel (cl_ecl C) = {}
L \<in> cl_ecl C
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
finite (cl_ecl C)
smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S
maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)
t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma>

goal (1 subgoal):
 1. candidate_values (trm_rep (s \<lhd> \<sigma>) S) C (cl_ecl C) (subst_cl (cl_ecl C) \<sigma>) (s \<lhd> \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (t \<lhd> \<sigma>) S
[PROOF STEP]
unfolding candidate_values_def
[PROOF STATE]
proof (prove)
using this:
C \<in> S
(s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord
p = pos
orient_lit_inst L t s p \<sigma>
sel (cl_ecl C) = {}
L \<in> cl_ecl C
maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>)
ground_clause (subst_cl (cl_ecl C) \<sigma>)
finite (cl_ecl C)
smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S
maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
trms_irreducible C \<sigma> S (t \<lhd> \<sigma>)
t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma>

goal (1 subgoal):
 1. C \<in> S \<and> t \<lhd> \<sigma> \<notin> subst_set (trms_ecl C) \<sigma> \<and> trms_irreducible C \<sigma> S (t \<lhd> \<sigma>) \<and> cl_ecl C = cl_ecl C \<and> (s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord \<and> ((s \<lhd> \<sigma>, t \<lhd> \<sigma>) \<in> trm_ord \<longrightarrow> trm_rep (s \<lhd> \<sigma>) S = trm_rep (s \<lhd> \<sigma>) S) \<and> orient_lit_inst L t s pos \<sigma> \<and> sel (cl_ecl C) = {} \<and> L \<in> cl_ecl C \<and> maximal_literal (subst_lit L \<sigma>) (subst_cl (cl_ecl C) \<sigma>) \<and> subst_lit L \<sigma> = subst_lit L \<sigma> \<and> subst_cl (cl_ecl C) \<sigma> = subst_cl (cl_ecl C) \<sigma> \<and> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<and> t \<lhd> \<sigma> = t \<lhd> \<sigma> \<and> s \<lhd> \<sigma> = s \<lhd> \<sigma> \<and> finite (cl_ecl C) \<and> smaller_lits_are_false (t \<lhd> \<sigma>) (subst_cl (cl_ecl C) \<sigma>) S \<and> maximal_literal_is_unique (t \<lhd> \<sigma>) (s \<lhd> \<sigma>) (cl_ecl C) L S \<sigma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
candidate_values (trm_rep (s \<lhd> \<sigma>) S) C (cl_ecl C) (subst_cl (cl_ecl C) \<sigma>) (s \<lhd> \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from cv
[PROOF STATE]
proof (chain)
picking this:
candidate_values (trm_rep (s \<lhd> \<sigma>) S) C (cl_ecl C) (subst_cl (cl_ecl C) \<sigma>) (s \<lhd> \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (t \<lhd> \<sigma>) S
[PROOF STEP]
have "(trm_rep (subst s \<sigma>) S,(subst s \<sigma>)) \<in> set_of_candidate_values S (subst t \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
candidate_values (trm_rep (s \<lhd> \<sigma>) S) C (cl_ecl C) (subst_cl (cl_ecl C) \<sigma>) (s \<lhd> \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. (trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)
[PROOF STEP]
unfolding set_of_candidate_values_def
[PROOF STATE]
proof (prove)
using this:
candidate_values (trm_rep (s \<lhd> \<sigma>) S) C (cl_ecl C) (subst_cl (cl_ecl C) \<sigma>) (s \<lhd> \<sigma>) (subst_lit L \<sigma>) L \<sigma> t s (t \<lhd> \<sigma>) S

goal (1 subgoal):
 1. (trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> {pair. \<exists>z CC C' C s L L' \<sigma>' t' s'. pair = (z, s) \<and> candidate_values z CC C' C s L L' \<sigma>' t' s' (t \<lhd> \<sigma>) S}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>trm_rep (subst t \<sigma>) S = (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
[PROOF STEP]
have "\<not>(subterm_reduction_applicable S (subst t \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>

goal (1 subgoal):
 1. \<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)
[PROOF STEP]
using trm_rep_is_lower_subt_red trm_ord_irrefl irrefl_def
[PROOF STATE]
proof (prove)
using this:
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
subterm_reduction_applicable ?S ?x \<Longrightarrow> (trm_rep ?x ?S, ?x) \<in> trm_ord
irrefl trm_ord
irrefl ?r = (\<forall>a. (a, a) \<notin> ?r)

goal (1 subgoal):
 1. \<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(trm_rep (subst s \<sigma>) S, subst s \<sigma>)
              \<in> set_of_candidate_values S (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)
[PROOF STEP]
have "set_of_candidate_values S (subst t \<sigma>) \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)

goal (1 subgoal):
 1. set_of_candidate_values S (t \<lhd> \<sigma>) \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
set_of_candidate_values S (t \<lhd> \<sigma>) \<noteq> {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>(trm_rep (subst s \<sigma>) S, subst s \<sigma>)
              \<in> set_of_candidate_values S (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)
[PROOF STEP]
have "min_trms (set_of_candidate_values S (subst t \<sigma>)) \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)

goal (1 subgoal):
 1. min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}
[PROOF STEP]
using min_trms_not_empty
[PROOF STATE]
proof (prove)
using this:
(trm_rep (s \<lhd> \<sigma>) S, s \<lhd> \<sigma>) \<in> set_of_candidate_values S (t \<lhd> \<sigma>)
?E \<noteq> {} \<Longrightarrow> min_trms ?E \<noteq> {}

goal (1 subgoal):
 1. min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from \<open>\<not>(subterm_reduction_applicable S (subst t \<sigma>))\<close>
        \<open>min_trms (set_of_candidate_values S (subst t \<sigma>)) \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)
min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}
[PROOF STEP]
have "(trm_rep (subst t \<sigma>) S,(subst t \<sigma>)) \<in> trm_ord"
[PROOF STATE]
proof (prove)
using this:
\<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)
min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}

goal (1 subgoal):
 1. (trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
using trm_rep_is_lower_root_red [of S "subst t \<sigma>"]
[PROOF STATE]
proof (prove)
using this:
\<not> subterm_reduction_applicable S (t \<lhd> \<sigma>)
min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}
\<lbrakk>\<not> subterm_reduction_applicable S (t \<lhd> \<sigma>); min_trms (set_of_candidate_values S (t \<lhd> \<sigma>)) \<noteq> {}\<rbrakk> \<Longrightarrow> (trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. (trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord

goal (1 subgoal):
 1. \<not> (\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)) \<Longrightarrow> False
[PROOF STEP]
from this and \<open>(trm_rep (subst t \<sigma>) S) = (subst t \<sigma>)\<close>
[PROOF STATE]
proof (chain)
picking this:
(trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>

goal (1 subgoal):
 1. False
[PROOF STEP]
using trm_ord_irrefl irrefl_def
[PROOF STATE]
proof (prove)
using this:
(trm_rep (t \<lhd> \<sigma>) S, t \<lhd> \<sigma>) \<in> trm_ord
trm_rep (t \<lhd> \<sigma>) S = t \<lhd> \<sigma>
irrefl trm_ord
irrefl ?r = (\<forall>a. (a, a) \<notin> ?r)

goal (1 subgoal):
 1. False
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>C \<sigma>. fst pair = C \<longrightarrow> \<sigma> = snd pair \<longrightarrow> C \<in> S \<longrightarrow> ground_clause (subst_cl (cl_ecl C) \<sigma>) \<longrightarrow> all_trms_irreducible (subst_set (trms_ecl C) \<sigma>) (\<lambda>t. trm_rep t S) \<longrightarrow> validate_ground_clause (same_values (\<lambda>t. trm_rep t S)) (subst_cl (cl_ecl C) \<sigma>)

goal:
No subgoals!
[PROOF STEP]
qed