[STATEMENT]
lemma (in PolynRg) erH_multTr:"\<lbrakk>PolynRg A B Y; h \<in> rHom S B;
      pol_coeff S c\<rbrakk> \<Longrightarrow>
 \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (((fst c) + m), g) \<and>
       (polyn_expr R X (fst c) c) \<cdot>\<^sub>r (polyn_expr R X m (m, f)) =
             (polyn_expr R X ((fst c) + m) ((fst c) + m, g))  \<longrightarrow>
 (polyn_expr A Y (fst c) (cf_h h c)) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y m (cf_h h (m, f))) =
                 (polyn_expr A Y ((fst c) + m) (cf_h h ((fst c)+m, g)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst c + m, g) \<and> polyn_expr R X (fst c) c \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst c + m) (fst c + m, g) \<longrightarrow> polyn_expr A Y (fst c) (cf_h h c) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst c + m) (cf_h h (fst c + m, g))
[PROOF STEP]
apply (cut_tac subring, frule subring_Ring,
       frule PolynRg.is_Ring[of A B Y],
       frule PolynRg.subring[of A B Y],
       frule Ring.subring_Ring[of A B], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst c + m, g) \<and> polyn_expr R X (fst c) c \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst c + m) (fst c + m, g) \<longrightarrow> polyn_expr A Y (fst c) (cf_h h c) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst c + m) (cf_h h (fst c + m, g))
[PROOF STEP]
apply (cases c)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B; c = (a, b)\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst c + m, g) \<and> polyn_expr R X (fst c) c \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst c + m) (fst c + m, g) \<longrightarrow> polyn_expr A Y (fst c) (cf_h h c) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst c + m) (cf_h h (fst c + m, g))
[PROOF STEP]
apply (simp only:)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (a, b); Subring R S; Ring S; Ring A; Subring A B; Ring B; c = (a, b)\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst (a, b) + m, g) \<and> polyn_expr R X (fst (a, b)) (a, b) \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst (a, b) + m) (fst (a, b) + m, g) \<longrightarrow> polyn_expr A Y (fst (a, b)) (cf_h h (a, b)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst (a, b) + m) (cf_h h (fst (a, b) + m, g))
[PROOF STEP]
apply (rename_tac l u)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; c = (l, u)\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst (l, u) + m, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst (l, u) + m) (fst (l, u) + m, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst (l, u) + m) (cf_h h (fst (l, u) + m, g))
[PROOF STEP]
apply (thin_tac "c = (l, u)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (m, f) \<and> pol_coeff S (fst (l, u) + m, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X m (m, f) = polyn_expr R X (fst (l, u) + m) (fst (l, u) + m, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y m (cf_h h (m, f)) = polyn_expr A Y (fst (l, u) + m) (cf_h h (fst (l, u) + m, g))
[PROOF STEP]
apply (induct_tac m)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (0, f) \<and> pol_coeff S (fst (l, u) + 0, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X 0 (0, f) = polyn_expr R X (fst (l, u) + 0) (fst (l, u) + 0, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y 0 (cf_h h (0, f)) = polyn_expr A Y (fst (l, u) + 0) (cf_h h (fst (l, u) + 0, g))
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply ((rule allI)+, rule impI, (erule conjE)+, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X 0 (0, f) = polyn_expr R X l (l, g)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y 0 (cf_h h (0, f)) = polyn_expr A Y l (cf_h h (l, g))
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:cf_h_polyn[of A B Y h])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X 0 (0, f) = polyn_expr R X l (l, g)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y 0 (0, cmp h f) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:polyn_expr_def[of _ _ 0])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (l, u) \<cdot>\<^sub>r (f 0 \<cdot>\<^sub>r 1\<^sub>r) = polyn_expr R X l (l, g)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub>) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (frule_tac c = "(0, f)" and j = 0 in pol_coeff_mem, simp, simp,
        frule_tac c = "(0, f)" and j = 0 in pol_coeff_mem_R, simp, simp,
        frule_tac c = "(l, u)" and k = l in polyn_mem, simp,
        simp add:ring_r_one,
        simp add:ring_tOp_commute,
        simp add:scalar_times_pol_expr)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub>) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (frule_tac c = "(0, f)" in cf_h_coeff[of A B Y h], assumption+,
        frule_tac c = "(l, u)" in cf_h_coeff[of A B Y h], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (cf_h h (0, f)); pol_coeff B (cf_h h (l, u))\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub>) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (frule_tac c = "cf_h h (0, f)" in PolynRg.pol_coeff_mem[of A B Y _ 0],
        assumption+, simp, simp add:cf_h_cmp,
        frule_tac c = "cf_h h (0, f)" in PolynRg.pol_coeff_mem_R[of A B Y _ 0],
        assumption+, simp, simp add:cf_h_cmp,
        frule_tac c = "cf_h h (l, u)" and k = l in PolynRg.polyn_mem, simp,
        simp add:cf_h_len, simp add:cf_h_polyn,
        simp add:Ring.ring_r_one, simp add:Ring.ring_tOp_commute[of A],
        frule_tac n = l and f = u in cf_h_pol_coeff[of A B Y h],
              assumption+, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (cf_h h (0, f)); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; cf_h h (l, u) = (l, cmp h u)\<rbrakk> \<Longrightarrow> cmp h f 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:PolynRg.scalar_times_pol_expr,
         frule_tac c = "(l, u)" and a = "f 0" in sp_cf_pol_coeff, assumption+,
         frule_tac c = "(l, cmp h u)" and a = "(cmp h f) 0" in
           PolynRg.sp_cf_pol_coeff, assumption+,
         frule_tac c = "(l, g)" in cf_h_coeff[of A B Y h], assumption+,
         simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (sp_cf S (f 0) (l, u)); pol_coeff B (sp_cf B (cmp h f 0) (l, cmp h u)); pol_coeff B (l, cmp h g)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (sp_cf B (cmp h f 0) (l, cmp h u)) = polyn_expr A Y l (l, cmp h g)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (rule_tac c = "sp_cf B (cmp h f 0) (l, cmp h u)" and
         d = "(l, cmp h g)" and k = l in PolynRg.polyn_exprs_eq[of A B Y],
         assumption+, simp add:sp_cf_len,
         simp add:PolynRg.sp_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (sp_cf S (f 0) (l, u)); pol_coeff B (sp_cf B (cmp h f 0) (l, cmp h u)); pol_coeff B (l, cmp h g)\<rbrakk> \<Longrightarrow> \<forall>j\<le>l. snd (sp_cf B (cmp h f 0) (l, cmp h u)) j = snd (l, cmp h g) j
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (rule allI, rule impI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (sp_cf S (f 0) (l, u)); pol_coeff B (sp_cf B (cmp h f 0) (l, cmp h u)); pol_coeff B (l, cmp h g); j \<le> l\<rbrakk> \<Longrightarrow> snd (sp_cf B (cmp h f 0) (l, cmp h u)) j = snd (l, cmp h g) j
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (frule_tac c = "sp_cf S (f 0) (l, u)" and d = "(l, g)" in
         pol_expr_unique2, assumption+,
         simp add:sp_cf_len, simp add:sp_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (sp_cf S (f 0) (l, u)); pol_coeff B (sp_cf B (cmp h f 0) (l, cmp h u)); pol_coeff B (l, cmp h g); j \<le> l; \<forall>j\<le>l. snd (sp_cf S (f 0) (l, u)) j = g j\<rbrakk> \<Longrightarrow> snd (sp_cf B (cmp h f 0) (l, cmp h u)) j = cmp h g j
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (drule_tac a = j in forall_spec, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (sp_cf S (f 0) (l, u)) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (sp_cf S (f 0) (l, u)); pol_coeff B (sp_cf B (cmp h f 0) (l, cmp h u)); pol_coeff B (l, cmp h g); j \<le> l; snd (sp_cf S (f 0) (l, u)) j = g j\<rbrakk> \<Longrightarrow> snd (sp_cf B (cmp h f 0) (l, cmp h u)) j = cmp h g j
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:sp_cf_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); polyn_expr R X l (l, \<lambda>j. f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j) = polyn_expr R X l (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, cmp h f); pol_coeff B (l, cmp h u); cmp h f 0 \<in> carrier B; cmp h f 0 \<in> carrier A; polyn_expr A Y l (l, cmp h u) \<in> carrier A; pol_coeff S (l, \<lambda>j. f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j); pol_coeff B (l, \<lambda>j. cmp h f 0 \<cdot>\<^sub>r\<^bsub>B\<^esub> cmp h u j); pol_coeff B (l, cmp h g); j \<le> l; f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j = g j\<rbrakk> \<Longrightarrow> cmp h f 0 \<cdot>\<^sub>r\<^bsub>B\<^esub> cmp h u j = cmp h g j
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (rotate_tac -1, drule sym, simp add:cmp_def,
        thin_tac "pol_coeff B (l, \<lambda>x. h (g x))",
        thin_tac "pol_coeff B (l, \<lambda>j. h (f 0) \<cdot>\<^sub>r\<^bsub>B\<^esub> h (u j))",
        thin_tac "pol_coeff S (l, \<lambda>j. f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j)",
        thin_tac "polyn_expr A Y l (l, \<lambda>x. h (u x)) \<in> carrier A",
        thin_tac "pol_coeff B (l, \<lambda>x. h (u x))",
        thin_tac "polyn_expr R X l (l, \<lambda>j. f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j) =
                                          polyn_expr R X l (l, g)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, \<lambda>x. h (f x)); h (f 0) \<in> carrier B; h (f 0) \<in> carrier A; j \<le> l; g j = f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j\<rbrakk> \<Longrightarrow> h (f 0) \<cdot>\<^sub>r\<^bsub>B\<^esub> h (u j) = h (f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (frule_tac c = "(l, u)" and j = j in pol_coeff_mem, simp, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u f g j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (0, f); pol_coeff S (l, g); f 0 \<in> carrier S; f 0 \<in> carrier R; polyn_expr R X l (l, u) \<in> carrier R; pol_coeff B (0, \<lambda>x. h (f x)); h (f 0) \<in> carrier B; h (f 0) \<in> carrier A; j \<le> l; g j = f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j; u j \<in> carrier S\<rbrakk> \<Longrightarrow> h (f 0) \<cdot>\<^sub>r\<^bsub>B\<^esub> h (u j) = h (f 0 \<cdot>\<^sub>r\<^bsub>S\<^esub> u j)
 2. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:rHom_tOp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g))\<rbrakk> \<Longrightarrow> \<forall>f g. pol_coeff S (Suc n, f) \<and> pol_coeff S (fst (l, u) + Suc n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply ((rule allI)+, (rule impI), (erule conjE)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (fst (l, u) + n, g) \<and> polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (fst (l, u) + n) (fst (l, u) + n, g) \<longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (cf_h h (n, f)) = polyn_expr A Y (fst (l, u) + n) (cf_h h (fst (l, u) + n, g)); pol_coeff S (Suc n, f); pol_coeff S (fst (l, u) + Suc n, g); polyn_expr R X (fst (l, u)) (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (fst (l, u) + Suc n) (fst (l, u) + Suc n, g)\<rbrakk> \<Longrightarrow> polyn_expr A Y (fst (l, u)) (cf_h h (l, u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (cf_h h (Suc n, f)) = polyn_expr A Y (fst (l, u) + Suc n) (cf_h h (fst (l, u) + Suc n, g))
[PROOF STEP]
apply (simp add:cf_h_polyn,
        frule_tac n = n and f = f in pol_coeff_pre,
        frule_tac n = "l + n" and f = g in pol_coeff_pre,
        frule_tac n = l and f = u and m = n and g = f in polyn_expr_tOp,
        assumption+, erule exE, (erule conjE)+,
        rotate_tac -1, drule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; \<forall>f g. pol_coeff S (n, f) \<and> pol_coeff S (l + n, g) \<and> polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, g) \<longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h g); pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X (Suc n) (Suc n, f) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (n, f); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (Suc n, cmp h f) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (drule_tac x = f in spec,
        drule_tac x = e in spec, simp,
        frule_tac n = n and f = f in polyn_Suc_split,
        simp del:npow_suc,
        thin_tac "polyn_expr R X (Suc n) (Suc n, f) =
        polyn_expr R X n (n, f) \<plusminus> f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R (Suc n)\<^esup>")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X l (l, u) \<cdot>\<^sub>r (polyn_expr R X n (n, f) \<plusminus> f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (n, f); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (Suc n, cmp h f) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
(* got polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) =
        polyn_expr A Y (l + n) (l + n, cmp h e) *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X l (l, u) \<cdot>\<^sub>r (polyn_expr R X n (n, f) \<plusminus> f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (n, f); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (Suc n, cmp h f) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc n, f)" in cf_h_coeff[of A B Y h], assumption+,
        simp del:npow_suc add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X l (l, u) \<cdot>\<^sub>r (polyn_expr R X n (n, f) \<plusminus> f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (n, f); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (Suc n) (Suc n, cmp h f) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac n = n and f = "cmp h f" in PolynRg.polyn_Suc_split[of A B Y],
        simp add:cf_h_pol_coeff, simp del:npow_suc,
        thin_tac "polyn_expr A Y (Suc n) (Suc n, cmp h f) =
        polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A (Suc n)\<^esup>")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X l (l, u) \<cdot>\<^sub>r (polyn_expr R X n (n, f) \<plusminus> f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (n, f); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l, u)" and k = l in polyn_mem, simp,
       frule_tac n = n and f = f in pol_coeff_pre,
       frule_tac c = "(n, f)" and k = n in polyn_mem, simp,
       frule_tac c = "(Suc n, f)" and j = "Suc n" in pol_coeff_mem_R, simp,
       cut_tac X_mem_R, simp del:npow_suc,
       cut_tac n = "Suc n" in npClose[of X], assumption,
       frule_tac x = "f (Suc n)" and y = " X^\<^bsup>R (Suc n)\<^esup>" in ring_tOp_closed,
         assumption+,
       simp del:npow_suc add:ring_distrib1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; pol_coeff S (n, f); polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l, u)" in cf_h_coeff[of A B Y h], assumption+,
       frule_tac c = "(Suc n, f)" in cf_h_coeff[of A B Y h], assumption+,
       frule_tac n = n and f = f in pol_coeff_pre,
       frule_tac c = "(n, f)" in cf_h_coeff[of A B Y h], assumption+,
       simp del:npow_suc add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f)\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l, cmp h u)" and k = l in PolynRg.polyn_mem, simp, simp,      frule_tac c = "(n, cmp h f)" and k = n in PolynRg.polyn_mem, simp, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc n, f)" and j = "Suc n" in pol_coeff_mem_R, simp,
       cut_tac X_mem_R, simp del:npow_suc,
       cut_tac n = "Suc n" in npClose[of X], assumption,
       frule_tac x = "f (Suc n)" and y = " X^\<^bsup>R (Suc n)\<^esup>" in ring_tOp_closed,
         assumption+,
       simp del:npow_suc add:ring_distrib1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R\<rbrakk> \<Longrightarrow> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (polyn_expr A Y n (n, cmp h f) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc n, cmp h f)" and j = "Suc n" in
       PolynRg.pol_coeff_mem_R[of A B Y], simp del:npow_suc,
       simp del:npow_suc,
       frule_tac PolynRg.X_mem_R[of A B Y], simp del:npow_suc,
       frule_tac n = "Suc n" in Ring.npClose[of A Y], assumption,
       frule_tac x = "cmp h f (Suc n)" and y = " Y^\<^bsup>A (Suc n)\<^esup>" in
       Ring.ring_tOp_closed[of A], assumption+,
       simp del:npow_suc add:Ring.ring_distrib1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup>) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) = polyn_expr R X (l + n) (l + n, e); polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac x1 = "polyn_expr R X l (l, u)" and y1 = "f (Suc n)" and
       z1 = " X^\<^bsup>R (Suc n)\<^esup>" in ring_tOp_assoc[THEN sym], assumption+,
       simp del:npow_suc,
       thin_tac "polyn_expr R X l (l, u) \<cdot>\<^sub>r polyn_expr R X n (n, f) =
        polyn_expr R X (l + n) (l + n, e)",
       thin_tac "polyn_expr R X l (l, u) \<cdot>\<^sub>r (f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R (Suc n)\<^esup>) =
        polyn_expr R X l (l, u) \<cdot>\<^sub>r f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R (Suc n)\<^esup>",
       simp only:ring_tOp_commute,
       frule_tac c = "(Suc n, f)" and j = "Suc n" in pol_coeff_mem, simp,
       simp del:npow_suc,
       simp del:npow_suc add:scalar_times_pol_expr)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X l (sp_cf S (f (Suc n)) (l, u)) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l, u)" and a = "f (Suc n)" in sp_cf_pol_coeff,
                assumption+,
         frule_tac c = "sp_cf S (f (Suc n)) (l, u)" and k = l in polyn_mem,
         simp add:sp_cf_len, simp only:ring_tOp_commute,
         frule_tac c1 = "sp_cf S (f (Suc n)) (l, u)" and j1 = "Suc n" in
         low_deg_terms_zero1[THEN sym],
         simp only:sp_cf_len, simp del: npow_suc)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); polyn_expr R X (l + n) (l + n, e) \<plusminus> polyn_expr R X (Suc (l + n)) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))) = polyn_expr R X (Suc (l + n)) (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); polyn_expr R X l (l, u) \<in> carrier R; polyn_expr R X n (n, f) \<in> carrier R; f (Suc n) \<in> carrier R; pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; X \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<in> carrier R; f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R Suc n\<^esup> \<in> carrier R; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); polyn_expr R X l (sp_cf S (f (Suc n)) (l, u)) \<in> carrier R; X^\<^bsup>R Suc n\<^esup> \<cdot>\<^sub>r polyn_expr R X l (sp_cf S (f (Suc n)) (l, u)) = polyn_expr R X (Suc (l + n)) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "sp_cf S (f (Suc n)) (l, u)" and n = "Suc n" in
          ext_cf_pol_coeff,
          frule_tac c = "(l + n, e)" and d = "ext_cf S (Suc n) (sp_cf S (
           f (Suc n)) (l, u))" in polyn_add1, assumption+,
          simp del:npow_suc add:ext_cf_len sp_cf_len,
          cut_tac a = l and b = n in add.commute,
          simp del:npow_suc,
         thin_tac "polyn_expr R X (n + l) (n + l, e) \<plusminus>
         polyn_expr R X (Suc (n + l))
         (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))) =
         polyn_expr R X (Suc (n + l))
         (add_cf S (n + l, e)
           (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))",
         thin_tac "polyn_expr R X l (l, u) \<in> carrier R",
         thin_tac "polyn_expr R X n (n, f) \<in> carrier R",
         thin_tac "f (Suc n) \<in> carrier R",
         thin_tac "X \<in> carrier R",
         thin_tac "X^\<^bsup>R (Suc n)\<^esup> \<in> carrier R",
         thin_tac "f (Suc n) \<cdot>\<^sub>r X^\<^bsup>R (Suc n)\<^esup> \<in> carrier R",
         thin_tac "polyn_expr R X l (sp_cf S (f (Suc n)) (l, u)) \<in> carrier R",
         thin_tac "X^\<^bsup>R (Suc n)\<^esup> \<cdot>\<^sub>r polyn_expr R X l (sp_cf S (f (Suc n)) (l, u)) =
        polyn_expr R X (Suc (n + l))
         (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
(* got polyn_expr R X (Suc (n + l)) (Suc (n + l), g) =
        polyn_expr R X (Suc (n + l))
         (add_cf S (n + l, e)
           (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> (cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup>) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (subst Ring.ring_tOp_assoc[THEN sym], assumption+,
          subst Ring.ring_tOp_commute, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc n, f)" in cf_h_coeff[of A B Y h],
          assumption+,
          simp only:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); True\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc n, cmp h f)" and j = "Suc n" in
         PolynRg.pol_coeff_mem[of A B Y], assumption+, simp,
         simp del:npow_suc)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (subst PolynRg.scalar_times_pol_expr[of A B Y], assumption+,
          simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac a = "cmp h f (Suc n)" and c = "(l, cmp h u)" in
          PolynRg.sp_cf_pol_coeff[of A B Y], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "sp_cf B (cmp h f (Suc n)) (l, cmp h u)" and k = l
          in PolynRg.polyn_mem[of A B Y], assumption, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> l \<le> fst (sp_cf B (cmp h f (Suc n)) (l, cmp h u))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<in> carrier A\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:PolynRg.sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<in> carrier A\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (subst Ring.ring_tOp_commute[of A], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<in> carrier A\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c1 = "sp_cf B (cmp h f (Suc n)) (l, cmp h u)" and
         j1 = "Suc n" in PolynRg.low_deg_terms_zero1[of A B Y, THEN sym],
         assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y (fst (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) = polyn_expr A Y (fst (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) + Suc n) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp del:npow_suc add:sp_cf_len PolynRg.sp_cf_len,
          thin_tac "Y^\<^bsup>A (Suc n)\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub>
          polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u)) =
          polyn_expr A Y (Suc (l + n))
          (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))",
          thin_tac "polyn_expr A Y l (sp_cf B (cmp h f (Suc n)) (l, cmp h u))
          \<in> carrier A")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "sp_cf B (cmp h f (Suc n)) (l, cmp h u)" and
          n = "Suc n" in PolynRg.ext_cf_pol_coeff[of A B Y], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l + n, cmp h e)" and
          d = "ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))" in
          PolynRg.polyn_add1[of A B Y])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (fst (l + n, cmp h e)) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (max (fst (l + n, cmp h e)) (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(n + l, e)" in cf_h_coeff[of A B Y h], assumption+)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (cf_h h (n + l, e))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (fst (l + n, cmp h e)) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (max (fst (l + n, cmp h e)) (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:cf_h_pol_coeff[of A B Y h] add.commute, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> Y^\<^bsup>A Suc n\<^esup> \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (fst (l + n, cmp h e)) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (max (fst (l + n, cmp h e)) (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:PolynRg.ext_cf_len PolynRg.sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (n + l), g); pol_coeff S (n + l, g); pol_coeff S (n + l, e); e (n + l) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (n + l) (n + l, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (n + l)) (Suc (n + l), g) = polyn_expr R X (Suc (n + l)) (add_cf S (n + l, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (n + l)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (n + l)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (cut_tac a = n and b = l in add.commute, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
(** Now we got
      polyn_expr A Y (max (l + n) (Suc (l + n)))
           (add_cf B (l + n, cmp h e)
             (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) =
          polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l + n, e)" and
         d = "ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))" in
         add_cf_pol_coeff, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l + n, cmp h e)" and
         d = "ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))" in
         PolynRg.add_cf_pol_coeff[of A B Y])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(l + n, e)" in cf_h_coeff[of A B Y h], assumption+)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (cf_h h (l + n, e))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e); pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); polyn_expr A Y l (l, cmp h u) \<in> carrier A; polyn_expr A Y n (n, cmp h f) \<in> carrier A; cmp h f (Suc n) \<in> carrier A; Y \<in> carrier A; Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A; cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub> polyn_expr A Y (Suc (l + n)) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (thin_tac "polyn_expr A Y l (l, cmp h u) \<cdot>\<^sub>r\<^bsub>A\<^esub> polyn_expr A Y n
         (n, cmp h f) = polyn_expr A Y (l + n) (l + n, cmp h e)",
        thin_tac "polyn_expr A Y l (l, cmp h u) \<in> carrier A",
        thin_tac "polyn_expr A Y n (n, cmp h f) \<in> carrier A",
        thin_tac "Y \<in> carrier A",
        thin_tac "Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y \<in> carrier A",
        thin_tac "cmp h f (Suc n) \<cdot>\<^sub>r\<^bsub>A\<^esub> (Y^\<^bsup>A n\<^esup> \<cdot>\<^sub>r\<^bsub>A\<^esub> Y) \<in> carrier A",
        thin_tac "polyn_expr A Y (l + n) (l + n, cmp h e) \<plusminus>\<^bsub>A\<^esub>
        polyn_expr A Y (Suc (l + n))
         (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))) =
        polyn_expr A Y (Suc (l + n))
         (add_cf B (l + n, cmp h e)
           (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc (l + n), g)" in cf_h_coeff[of A B Y h],
          assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (cf_h h (Suc (l + n), g))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (frule_tac c = "(Suc (l + n), g)" and d = "add_cf S (l + n, e)
         (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))" in pol_expr_unique2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g)\<rbrakk> \<Longrightarrow> pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g)\<rbrakk> \<Longrightarrow> fst (Suc (l + n), g) = fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g); (polyn_expr R X (fst (Suc (l + n), g)) (Suc (l + n), g) = polyn_expr R X (fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) = (\<forall>j\<le>fst (Suc (l + n), g). snd (Suc (l + n), g) j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g)\<rbrakk> \<Longrightarrow> fst (Suc (l + n), g) = fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g); (polyn_expr R X (fst (Suc (l + n), g)) (Suc (l + n), g) = polyn_expr R X (fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) = (\<forall>j\<le>fst (Suc (l + n), g). snd (Suc (l + n), g) j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:add_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g)\<rbrakk> \<Longrightarrow> Suc (l + n) = max (l + n) (fst (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g); (polyn_expr R X (fst (Suc (l + n), g)) (Suc (l + n), g) = polyn_expr R X (fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) = (\<forall>j\<le>fst (Suc (l + n), g). snd (Suc (l + n), g) j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:ext_cf_len sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g); (polyn_expr R X (fst (Suc (l + n), g)) (Suc (l + n), g) = polyn_expr R X (fst (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) = (\<forall>j\<le>fst (Suc (l + n), g). snd (Suc (l + n), g) j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (simp add:add_cf_len ext_cf_len sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); polyn_expr R X (Suc (l + n)) (Suc (l + n), g) = polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff S (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); pol_coeff B (Suc (l + n), cmp h g); (polyn_expr R X (Suc (l + n)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) = polyn_expr R X (Suc (n + l)) (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))) = (\<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (cut_tac a = n and b = l in add.commute, simp,
     thin_tac "pol_coeff B
         (add_cf B (l + n, cmp h e)
           (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))",
     thin_tac "pol_coeff B (Suc (l + n), cmp h g)",
     thin_tac "pol_coeff S
         (add_cf S (l + n, e)
           (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))",
     thin_tac "pol_coeff B
         (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))",
     thin_tac "pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))",
     thin_tac "polyn_expr R X (Suc (l + n)) (Suc (l + n), g) =
        polyn_expr R X (Suc (l + n))
         (add_cf S (l + n, e)
           (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))))")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) = polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g)
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "(Suc (l + n), g)" in cf_h_coeff[of A B Y h],
             assumption+,
           frule_tac c = "(l + n, e)" in cf_h_coeff[of A B Y h],
             assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "(l, cmp h u)" and a = "cmp h f (Suc n)" in
           PolynRg.sp_cf_pol_coeff[of A B Y], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (cut_tac c = "(l + n, cmp h e)" and
           d = "ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))" in
           PolynRg.add_cf_pol_coeff, assumption+)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (rule PolynRg.ext_cf_pol_coeff, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "(Suc (l + n), cmp h g)" and
           d = "add_cf B (l + n, cmp h e)
             (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))" in
           PolynRg.pol_expr_unique2[of A B Y])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> pol_coeff B (Suc (l + n), cmp h g)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> fst (Suc (l + n), cmp h g) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 4. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> fst (Suc (l + n), cmp h g) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> fst (Suc (l + n), cmp h g) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:add_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> Suc (l + n) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac n = "l + n" and f = e in  cf_h_pol_coeff[of A B Y h],
            assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); cf_h h (l + n, e) = (l + n, cmp h e)\<rbrakk> \<Longrightarrow> Suc (l + n) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "sp_cf B (cmp h f (Suc n)) (l, cmp h u)" and
           n = "Suc n" in
           PolynRg.ext_cf_pol_coeff[of A B Y], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); cf_h h (l + n, e) = (l + n, cmp h e); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> Suc (l + n) = fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.add_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); cf_h h (l + n, e) = (l + n, cmp h e); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> Suc (l + n) = max (l + n) (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.ext_cf_len)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); cf_h h (l + n, e) = (l + n, cmp h e); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> Suc (l + n) = max (l + n) (Suc (n + fst (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (fst (Suc (l + n), cmp h g)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>fst (Suc (l + n), cmp h g). snd (Suc (l + n), cmp h g) j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.add_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j)\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "sp_cf B (cmp h f (Suc n)) (l, cmp h u)" and
           n = "Suc n" in PolynRg.ext_cf_pol_coeff[of A B Y],
            assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (frule_tac c = "(l + n, cmp h e)" and
           d = "ext_cf B (Suc n)
                   (sp_cf B (cmp h f (Suc n)) (l, cmp h u))" in
           PolynRg.add_cf_pol_coeff[of A B Y])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> pol_coeff B (l + n, cmp h e)
 2. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))\<rbrakk> \<Longrightarrow> pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))
 3. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:cf_h_pol_coeff, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (cf_h h (Suc (l + n), g)); pol_coeff B (cf_h h (l + n, e)); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:cf_h_pol_coeff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (fst (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.add_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (max (l + n) (fst (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.ext_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (max (l + n) (Suc (n + fst (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (simp add:PolynRg.sp_cf_len)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (n + l)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
[PROOF STEP]
apply (cut_tac a = n and b = l in add.commute, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> \<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j
[PROOF STEP]
(* we got
     \<forall>j\<le>Suc (l + n).
             cmp h g j =
             snd (add_cf B (l + n, cmp h e)
                   (ext_cf B (Suc n)
                     (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); (polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) = polyn_expr A Y (Suc (l + n)) (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) = (\<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> \<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j
[PROOF STEP]
apply (thin_tac "(polyn_expr A Y (Suc (l + n)) (Suc (l + n), cmp h g) =
         polyn_expr A Y (Suc (l + n))
          (add_cf B (l + n, cmp h e)
            (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))) =
        (\<forall>j\<le>Suc (l + n).
            cmp h g j =
            snd (add_cf B (l + n, cmp h e)
                  (ext_cf B (Suc n)
                    (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))
             j)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))))\<rbrakk> \<Longrightarrow> \<forall>j\<le>Suc (l + n). cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j
[PROOF STEP]
apply (rule allI, rule impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j \<le> Suc (l + n)\<rbrakk> \<Longrightarrow> cmp h g j = snd (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))) j
[PROOF STEP]
apply (subst cmp_def)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; \<forall>j\<le>Suc (l + n). g j = snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j \<le> Suc (l + n)\<rbrakk> \<Longrightarrow> h (g j) = snd (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))) j
[PROOF STEP]
apply (drule_tac a = j in forall_spec, simp, simp,
          thin_tac "g j = snd (add_cf S (l + n, e)
                     (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j \<le> Suc (l + n)\<rbrakk> \<Longrightarrow> h (snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j) = snd (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))) j
[PROOF STEP]
apply (case_tac "j = Suc (l+n)", simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j = Suc (l + n)\<rbrakk> \<Longrightarrow> h (snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) (Suc (l + n))) = snd (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))) (Suc (l + n))
 2. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j \<le> Suc (l + n); j \<noteq> Suc (l + n)\<rbrakk> \<Longrightarrow> h (snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j) = snd (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))) j
[PROOF STEP]
apply ((subst add_cf_def)+,
            simp add:ext_cf_len, simp add:sp_cf_len,
            simp add:cmp_def PolynRg.ext_cf_len,
            simp add:PolynRg.sp_cf_len,
            (subst ext_cf_def)+, simp add:sp_cf_len sliden_def,
            (subst sp_cf_def)+, simp,
           frule_tac c = "(l, u)" and j = l in pol_coeff_mem, simp, simp,
           simp add:rHom_tOp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, cmp h f); pol_coeff B (l, cmp h u); pol_coeff S (n, f); pol_coeff B (n, cmp h f); cmp h f (Suc n) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); cmp h f (Suc n) \<in> carrier B; pol_coeff B (Suc (l + n), cmp h g); pol_coeff B (l + n, cmp h e); pol_coeff B (sp_cf B (cmp h f (Suc n)) (l, cmp h u)); pol_coeff B (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u))); pol_coeff B (add_cf B (l + n, cmp h e) (ext_cf B (Suc n) (sp_cf B (cmp h f (Suc n)) (l, cmp h u)))); j \<le> Suc (l + n); j \<noteq> Suc (l + n)\<rbrakk> \<Longrightarrow> h (snd (add_cf S (l + n, e) (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u)))) j) = snd (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))) j
[PROOF STEP]
apply (frule_tac m = j and n = "Suc (l + n)" in noteq_le_less, assumption,
        thin_tac "j \<le> Suc (l + n)", thin_tac "j \<noteq> Suc (l + n)",
        (subst add_cf_def)+,
        simp add:ext_cf_len sp_cf_len, simp add:cmp_def,
        simp add:PolynRg.ext_cf_len PolynRg.sp_cf_len,
        (subst ext_cf_def)+, simp add:sp_cf_len,
        (subst sp_cf_def)+, simp add:sliden_def,
        frule_tac x = j and n = "l + n" in Suc_less_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, \<lambda>x. h (f x)); pol_coeff B (l, \<lambda>x. h (u x)); pol_coeff S (n, f); pol_coeff B (n, \<lambda>x. h (f x)); h (f (Suc n)) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); h (f (Suc n)) \<in> carrier B; pol_coeff B (Suc (l + n), \<lambda>x. h (g x)); pol_coeff B (l + n, \<lambda>x. h (e x)); pol_coeff B (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))); pol_coeff B (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x)))); pol_coeff B (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))); j < Suc (l + n); j \<le> l + n\<rbrakk> \<Longrightarrow> (Suc n \<le> j \<longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> f (Suc n) \<cdot>\<^sub>r\<^bsub>S\<^esub> u (j - Suc n)) = h (e j) \<plusminus>\<^bsub>B\<^esub> h (f (Suc n)) \<cdot>\<^sub>r\<^bsub>B\<^esub> h (u (j - Suc n))) \<and> (\<not> Suc n \<le> j \<longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> \<zero>\<^bsub>S\<^esub>) = h (e j) \<plusminus>\<^bsub>B\<^esub> \<zero>\<^bsub>B\<^esub>)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, \<lambda>x. h (f x)); pol_coeff B (l, \<lambda>x. h (u x)); pol_coeff S (n, f); pol_coeff B (n, \<lambda>x. h (f x)); h (f (Suc n)) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); h (f (Suc n)) \<in> carrier B; pol_coeff B (Suc (l + n), \<lambda>x. h (g x)); pol_coeff B (l + n, \<lambda>x. h (e x)); pol_coeff B (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))); pol_coeff B (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x)))); pol_coeff B (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))); j < Suc (l + n); j \<le> l + n\<rbrakk> \<Longrightarrow> Suc n \<le> j \<longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> f (Suc n) \<cdot>\<^sub>r\<^bsub>S\<^esub> u (j - Suc n)) = h (e j) \<plusminus>\<^bsub>B\<^esub> h (f (Suc n)) \<cdot>\<^sub>r\<^bsub>B\<^esub> h (u (j - Suc n))
 2. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, \<lambda>x. h (f x)); pol_coeff B (l, \<lambda>x. h (u x)); pol_coeff S (n, f); pol_coeff B (n, \<lambda>x. h (f x)); h (f (Suc n)) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); h (f (Suc n)) \<in> carrier B; pol_coeff B (Suc (l + n), \<lambda>x. h (g x)); pol_coeff B (l + n, \<lambda>x. h (e x)); pol_coeff B (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))); pol_coeff B (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x)))); pol_coeff B (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))); j < Suc (l + n); j \<le> l + n\<rbrakk> \<Longrightarrow> \<not> Suc n \<le> j \<longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> \<zero>\<^bsub>S\<^esub>) = h (e j) \<plusminus>\<^bsub>B\<^esub> \<zero>\<^bsub>B\<^esub>
[PROOF STEP]
apply (rule impI,
         frule_tac x = j and y = "Suc (l + n)" in less_imp_le,
         frule_tac m = j and n = "Suc (l + n)" and l = "Suc n" in diff_le_mono,
         simp,
         frule_tac c = "(l, u)" and j = "j - Suc n" in pol_coeff_mem, simp,
         frule_tac c = "(l + n, e)" and j = j in pol_coeff_mem, simp, simp,
         frule_tac x = "f (Suc n)" and y = "u (j - Suc n)" in
          Ring.ring_tOp_closed[of S], assumption+,
         simp add:rHom_add rHom_tOp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, \<lambda>x. h (f x)); pol_coeff B (l, \<lambda>x. h (u x)); pol_coeff S (n, f); pol_coeff B (n, \<lambda>x. h (f x)); h (f (Suc n)) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); h (f (Suc n)) \<in> carrier B; pol_coeff B (Suc (l + n), \<lambda>x. h (g x)); pol_coeff B (l + n, \<lambda>x. h (e x)); pol_coeff B (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))); pol_coeff B (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x)))); pol_coeff B (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))); j < Suc (l + n); j \<le> l + n\<rbrakk> \<Longrightarrow> \<not> Suc n \<le> j \<longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> \<zero>\<^bsub>S\<^esub>) = h (e j) \<plusminus>\<^bsub>B\<^esub> \<zero>\<^bsub>B\<^esub>
[PROOF STEP]
apply (rule impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l u n f g e j. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S (l, u); Subring R S; Ring S; Ring A; Subring A B; Ring B; pol_coeff S (Suc n, f); pol_coeff S (Suc (l + n), g); pol_coeff S (l + n, g); pol_coeff S (l + n, e); e (l + n) = u l \<cdot>\<^sub>r\<^bsub>S\<^esub> f n; pol_coeff B (Suc n, \<lambda>x. h (f x)); pol_coeff B (l, \<lambda>x. h (u x)); pol_coeff S (n, f); pol_coeff B (n, \<lambda>x. h (f x)); h (f (Suc n)) \<in> carrier A; f (Suc n) \<in> carrier S; pol_coeff S (sp_cf S (f (Suc n)) (l, u)); pol_coeff S (ext_cf S (Suc n) (sp_cf S (f (Suc n)) (l, u))); h (f (Suc n)) \<in> carrier B; pol_coeff B (Suc (l + n), \<lambda>x. h (g x)); pol_coeff B (l + n, \<lambda>x. h (e x)); pol_coeff B (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))); pol_coeff B (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x)))); pol_coeff B (add_cf B (l + n, \<lambda>x. h (e x)) (ext_cf B (Suc n) (sp_cf B (h (f (Suc n))) (l, \<lambda>x. h (u x))))); j < Suc (l + n); j \<le> l + n; \<not> Suc n \<le> j\<rbrakk> \<Longrightarrow> h (e j \<plusminus>\<^bsub>S\<^esub> \<zero>\<^bsub>S\<^esub>) = h (e j) \<plusminus>\<^bsub>B\<^esub> \<zero>\<^bsub>B\<^esub>
[PROOF STEP]
apply (frule_tac c = "(l + n, e)" and j = j in pol_coeff_mem, simp, simp,
         frule_tac Ring.ring_zero[of S],
         simp add:rHom_add rHom_0_0)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done