src/HOL/Decision_Procs/Parametric_Ferrante_Rackoff.thy
changeset 68442 477b3f7067c9
parent 67399 eab6ce8368fa
child 69214 74455459973d
equal deleted inserted replaced
68441:3b11d48a711a 68442:477b3f7067c9
    33 instance ..
    33 instance ..
    34 
    34 
    35 end
    35 end
    36 
    36 
    37 text \<open>Semantics of terms tm.\<close>
    37 text \<open>Semantics of terms tm.\<close>
    38 primrec Itm :: "'a::{field_char_0,field} list \<Rightarrow> 'a list \<Rightarrow> tm \<Rightarrow> 'a"
    38 primrec Itm :: "'a::field_char_0 list \<Rightarrow> 'a list \<Rightarrow> tm \<Rightarrow> 'a"
    39   where
    39   where
    40     "Itm vs bs (CP c) = (Ipoly vs c)"
    40     "Itm vs bs (CP c) = (Ipoly vs c)"
    41   | "Itm vs bs (Bound n) = bs!n"
    41   | "Itm vs bs (Bound n) = bs!n"
    42   | "Itm vs bs (Neg a) = -(Itm vs bs a)"
    42   | "Itm vs bs (Neg a) = -(Itm vs bs a)"
    43   | "Itm vs bs (Add a b) = Itm vs bs a + Itm vs bs b"
    43   | "Itm vs bs (Add a b) = Itm vs bs a + Itm vs bs b"
   317 
   317 
   318 lemma tmmul_blt[simp]: "tmboundslt n t \<Longrightarrow> tmboundslt n (tmmul t i)"
   318 lemma tmmul_blt[simp]: "tmboundslt n t \<Longrightarrow> tmboundslt n (tmmul t i)"
   319   by (induct t arbitrary: i rule: tmmul.induct) (auto simp add: Let_def)
   319   by (induct t arbitrary: i rule: tmmul.induct) (auto simp add: Let_def)
   320 
   320 
   321 lemma tmmul_allpolys_npoly[simp]:
   321 lemma tmmul_allpolys_npoly[simp]:
   322   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   322   assumes "SORT_CONSTRAINT('a::field_char_0)"
   323   shows "allpolys isnpoly t \<Longrightarrow> isnpoly c \<Longrightarrow> allpolys isnpoly (tmmul t c)"
   323   shows "allpolys isnpoly t \<Longrightarrow> isnpoly c \<Longrightarrow> allpolys isnpoly (tmmul t c)"
   324   by (induct t rule: tmmul.induct) (simp_all add: Let_def polymul_norm)
   324   by (induct t rule: tmmul.induct) (simp_all add: Let_def polymul_norm)
   325 
   325 
   326 definition tmneg :: "tm \<Rightarrow> tm"
   326 definition tmneg :: "tm \<Rightarrow> tm"
   327   where "tmneg t \<equiv> tmmul t (C (- 1,1))"
   327   where "tmneg t \<equiv> tmmul t (C (- 1,1))"
   343 
   343 
   344 lemma [simp]: "isnpoly (C (-1, 1))"
   344 lemma [simp]: "isnpoly (C (-1, 1))"
   345   by (simp add: isnpoly_def)
   345   by (simp add: isnpoly_def)
   346 
   346 
   347 lemma tmneg_allpolys_npoly[simp]:
   347 lemma tmneg_allpolys_npoly[simp]:
   348   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   348   assumes "SORT_CONSTRAINT('a::field_char_0)"
   349   shows "allpolys isnpoly t \<Longrightarrow> allpolys isnpoly (tmneg t)"
   349   shows "allpolys isnpoly t \<Longrightarrow> allpolys isnpoly (tmneg t)"
   350   by (auto simp: tmneg_def)
   350   by (auto simp: tmneg_def)
   351 
   351 
   352 lemma tmsub[simp]: "Itm vs bs (tmsub a b) = Itm vs bs (Sub a b)"
   352 lemma tmsub[simp]: "Itm vs bs (tmsub a b) = Itm vs bs (Sub a b)"
   353   using tmsub_def by simp
   353   using tmsub_def by simp
   360 
   360 
   361 lemma tmsub_blt[simp]: "tmboundslt n t \<Longrightarrow> tmboundslt n s \<Longrightarrow> tmboundslt n (tmsub t s)"
   361 lemma tmsub_blt[simp]: "tmboundslt n t \<Longrightarrow> tmboundslt n s \<Longrightarrow> tmboundslt n (tmsub t s)"
   362   using tmsub_def by simp
   362   using tmsub_def by simp
   363 
   363 
   364 lemma tmsub_allpolys_npoly[simp]:
   364 lemma tmsub_allpolys_npoly[simp]:
   365   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   365   assumes "SORT_CONSTRAINT('a::field_char_0)"
   366   shows "allpolys isnpoly t \<Longrightarrow> allpolys isnpoly s \<Longrightarrow> allpolys isnpoly (tmsub t s)"
   366   shows "allpolys isnpoly t \<Longrightarrow> allpolys isnpoly s \<Longrightarrow> allpolys isnpoly (tmsub t s)"
   367   by (simp add: tmsub_def isnpoly_def)
   367   by (simp add: tmsub_def isnpoly_def)
   368 
   368 
   369 fun simptm :: "tm \<Rightarrow> tm"
   369 fun simptm :: "tm \<Rightarrow> tm"
   370   where
   370   where
   377       (let i' = polynate i in if i' = 0\<^sub>p then CP 0\<^sub>p else tmmul (simptm t) i')"
   377       (let i' = polynate i in if i' = 0\<^sub>p then CP 0\<^sub>p else tmmul (simptm t) i')"
   378   | "simptm (CNP n c t) =
   378   | "simptm (CNP n c t) =
   379       (let c' = polynate c in if c' = 0\<^sub>p then simptm t else tmadd (CNP n c' (CP 0\<^sub>p)) (simptm t))"
   379       (let c' = polynate c in if c' = 0\<^sub>p then simptm t else tmadd (CNP n c' (CP 0\<^sub>p)) (simptm t))"
   380 
   380 
   381 lemma polynate_stupid:
   381 lemma polynate_stupid:
   382   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   382   assumes "SORT_CONSTRAINT('a::field_char_0)"
   383   shows "polynate t = 0\<^sub>p \<Longrightarrow> Ipoly bs t = (0::'a)"
   383   shows "polynate t = 0\<^sub>p \<Longrightarrow> Ipoly bs t = (0::'a)"
   384   apply (subst polynate[symmetric])
   384   apply (subst polynate[symmetric])
   385   apply simp
   385   apply simp
   386   done
   386   done
   387 
   387 
   400 lemma [simp]: "isnpoly 0\<^sub>p"
   400 lemma [simp]: "isnpoly 0\<^sub>p"
   401   and [simp]: "isnpoly (C (1, 1))"
   401   and [simp]: "isnpoly (C (1, 1))"
   402   by (simp_all add: isnpoly_def)
   402   by (simp_all add: isnpoly_def)
   403 
   403 
   404 lemma simptm_allpolys_npoly[simp]:
   404 lemma simptm_allpolys_npoly[simp]:
   405   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   405   assumes "SORT_CONSTRAINT('a::field_char_0)"
   406   shows "allpolys isnpoly (simptm p)"
   406   shows "allpolys isnpoly (simptm p)"
   407   by (induct p rule: simptm.induct) (auto simp add: Let_def)
   407   by (induct p rule: simptm.induct) (auto simp add: Let_def)
   408 
   408 
   409 declare let_cong[fundef_cong del]
   409 declare let_cong[fundef_cong del]
   410 
   410 
   450   with split0[where t="t" and bs="bs"] show "Itm vs bs t = Itm vs bs (CNP 0 c' t')"
   450   with split0[where t="t" and bs="bs"] show "Itm vs bs t = Itm vs bs (CNP 0 c' t')"
   451     by simp
   451     by simp
   452 qed
   452 qed
   453 
   453 
   454 lemma split0_nb0:
   454 lemma split0_nb0:
   455   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   455   assumes "SORT_CONSTRAINT('a::field_char_0)"
   456   shows "split0 t = (c',t') \<Longrightarrow>  tmbound 0 t'"
   456   shows "split0 t = (c',t') \<Longrightarrow>  tmbound 0 t'"
   457 proof -
   457 proof -
   458   fix c' t'
   458   fix c' t'
   459   assume "split0 t = (c', t')"
   459   assume "split0 t = (c', t')"
   460   then have "c' = fst (split0 t)" "t' = snd (split0 t)"
   460   then have "c' = fst (split0 t)" "t' = snd (split0 t)"
   462   with conjunct1[OF split0[where t="t"]] show "tmbound 0 t'"
   462   with conjunct1[OF split0[where t="t"]] show "tmbound 0 t'"
   463     by simp
   463     by simp
   464 qed
   464 qed
   465 
   465 
   466 lemma split0_nb0'[simp]:
   466 lemma split0_nb0'[simp]:
   467   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   467   assumes "SORT_CONSTRAINT('a::field_char_0)"
   468   shows "tmbound0 (snd (split0 t))"
   468   shows "tmbound0 (snd (split0 t))"
   469   using split0_nb0[of t "fst (split0 t)" "snd (split0 t)"]
   469   using split0_nb0[of t "fst (split0 t)" "snd (split0 t)"]
   470   by (simp add: tmbound0_tmbound_iff)
   470   by (simp add: tmbound0_tmbound_iff)
   471 
   471 
   472 lemma split0_nb:
   472 lemma split0_nb:
   490 
   490 
   491 lemma allpolys_split0: "allpolys isnpoly p \<Longrightarrow> allpolys isnpoly (snd (split0 p))"
   491 lemma allpolys_split0: "allpolys isnpoly p \<Longrightarrow> allpolys isnpoly (snd (split0 p))"
   492   by (induct p rule: split0.induct) (auto simp  add: isnpoly_def Let_def split_def)
   492   by (induct p rule: split0.induct) (auto simp  add: isnpoly_def Let_def split_def)
   493 
   493 
   494 lemma isnpoly_fst_split0:
   494 lemma isnpoly_fst_split0:
   495   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
   495   assumes "SORT_CONSTRAINT('a::field_char_0)"
   496   shows "allpolys isnpoly p \<Longrightarrow> isnpoly (fst (split0 p))"
   496   shows "allpolys isnpoly p \<Longrightarrow> isnpoly (fst (split0 p))"
   497   by (induct p rule: split0.induct)
   497   by (induct p rule: split0.induct)
   498     (auto simp  add: polyadd_norm polysub_norm polyneg_norm polymul_norm Let_def split_def)
   498     (auto simp  add: polyadd_norm polysub_norm polyneg_norm polymul_norm Let_def split_def)
   499 
   499 
   500 
   500 
  1170 definition "simple t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then le s else Le (CNP 0 c s))"
  1170 definition "simple t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then le s else Le (CNP 0 c s))"
  1171 definition "simpeq t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then eq s else Eq (CNP 0 c s))"
  1171 definition "simpeq t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then eq s else Eq (CNP 0 c s))"
  1172 definition "simpneq t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then neq s else NEq (CNP 0 c s))"
  1172 definition "simpneq t = (let (c,s) = split0 (simptm t) in if c= 0\<^sub>p then neq s else NEq (CNP 0 c s))"
  1173 
  1173 
  1174 lemma simplt_islin [simp]:
  1174 lemma simplt_islin [simp]:
  1175   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1175   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1176   shows "islin (simplt t)"
  1176   shows "islin (simplt t)"
  1177   unfolding simplt_def
  1177   unfolding simplt_def
  1178   using split0_nb0'
  1178   using split0_nb0'
  1179   by (auto simp add: lt_lin Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1179   by (auto simp add: lt_lin Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1180       islin_stupid allpolys_split0[OF simptm_allpolys_npoly])
  1180       islin_stupid allpolys_split0[OF simptm_allpolys_npoly])
  1181 
  1181 
  1182 lemma simple_islin [simp]:
  1182 lemma simple_islin [simp]:
  1183   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1183   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1184   shows "islin (simple t)"
  1184   shows "islin (simple t)"
  1185   unfolding simple_def
  1185   unfolding simple_def
  1186   using split0_nb0'
  1186   using split0_nb0'
  1187   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1187   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1188       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] le_lin)
  1188       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] le_lin)
  1189 
  1189 
  1190 lemma simpeq_islin [simp]:
  1190 lemma simpeq_islin [simp]:
  1191   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1191   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1192   shows "islin (simpeq t)"
  1192   shows "islin (simpeq t)"
  1193   unfolding simpeq_def
  1193   unfolding simpeq_def
  1194   using split0_nb0'
  1194   using split0_nb0'
  1195   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1195   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1196       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] eq_lin)
  1196       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] eq_lin)
  1197 
  1197 
  1198 lemma simpneq_islin [simp]:
  1198 lemma simpneq_islin [simp]:
  1199   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1199   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1200   shows "islin (simpneq t)"
  1200   shows "islin (simpneq t)"
  1201   unfolding simpneq_def
  1201   unfolding simpneq_def
  1202   using split0_nb0'
  1202   using split0_nb0'
  1203   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1203   by (auto simp add: Let_def split_def isnpoly_fst_split0[OF simptm_allpolys_npoly]
  1204       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] neq_lin)
  1204       islin_stupid allpolys_split0[OF simptm_allpolys_npoly] neq_lin)
  1205 
  1205 
  1206 lemma really_stupid: "\<not> (\<forall>c1 s'. (c1, s') \<noteq> split0 s)"
  1206 lemma really_stupid: "\<not> (\<forall>c1 s'. (c1, s') \<noteq> split0 s)"
  1207   by (cases "split0 s") auto
  1207   by (cases "split0 s") auto
  1208 
  1208 
  1209 lemma split0_npoly:
  1209 lemma split0_npoly:
  1210   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1210   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1211     and *: "allpolys isnpoly t"
  1211     and *: "allpolys isnpoly t"
  1212   shows "isnpoly (fst (split0 t))"
  1212   shows "isnpoly (fst (split0 t))"
  1213     and "allpolys isnpoly (snd (split0 t))"
  1213     and "allpolys isnpoly (snd (split0 t))"
  1214   using *
  1214   using *
  1215   by (induct t rule: split0.induct)
  1215   by (induct t rule: split0.induct)
  1321   apply (rename_tac poly, case_tac poly)
  1321   apply (rename_tac poly, case_tac poly)
  1322          apply auto
  1322          apply auto
  1323   done
  1323   done
  1324 
  1324 
  1325 lemma simplt_nb[simp]:
  1325 lemma simplt_nb[simp]:
  1326   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1326   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1327   shows "tmbound0 t \<Longrightarrow> bound0 (simplt t)"
  1327   shows "tmbound0 t \<Longrightarrow> bound0 (simplt t)"
  1328 proof (simp add: simplt_def Let_def split_def)
  1328 proof (simp add: simplt_def Let_def split_def)
  1329   assume "tmbound0 t"
  1329   assume "tmbound0 t"
  1330   then have *: "tmbound0 (simptm t)"
  1330   then have *: "tmbound0 (simptm t)"
  1331     by simp
  1331     by simp
  1342       fst (split0 (simptm t)) = 0\<^sub>p"
  1342       fst (split0 (simptm t)) = 0\<^sub>p"
  1343     by (simp add: simplt_def Let_def split_def lt_nb)
  1343     by (simp add: simplt_def Let_def split_def lt_nb)
  1344 qed
  1344 qed
  1345 
  1345 
  1346 lemma simple_nb[simp]:
  1346 lemma simple_nb[simp]:
  1347   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1347   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1348   shows "tmbound0 t \<Longrightarrow> bound0 (simple t)"
  1348   shows "tmbound0 t \<Longrightarrow> bound0 (simple t)"
  1349 proof(simp add: simple_def Let_def split_def)
  1349 proof(simp add: simple_def Let_def split_def)
  1350   assume "tmbound0 t"
  1350   assume "tmbound0 t"
  1351   then have *: "tmbound0 (simptm t)"
  1351   then have *: "tmbound0 (simptm t)"
  1352     by simp
  1352     by simp
  1363       fst (split0 (simptm t)) = 0\<^sub>p"
  1363       fst (split0 (simptm t)) = 0\<^sub>p"
  1364     by (simp add: simplt_def Let_def split_def le_nb)
  1364     by (simp add: simplt_def Let_def split_def le_nb)
  1365 qed
  1365 qed
  1366 
  1366 
  1367 lemma simpeq_nb[simp]:
  1367 lemma simpeq_nb[simp]:
  1368   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1368   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1369   shows "tmbound0 t \<Longrightarrow> bound0 (simpeq t)"
  1369   shows "tmbound0 t \<Longrightarrow> bound0 (simpeq t)"
  1370 proof (simp add: simpeq_def Let_def split_def)
  1370 proof (simp add: simpeq_def Let_def split_def)
  1371   assume "tmbound0 t"
  1371   assume "tmbound0 t"
  1372   then have *: "tmbound0 (simptm t)"
  1372   then have *: "tmbound0 (simptm t)"
  1373     by simp
  1373     by simp
  1384       fst (split0 (simptm t)) = 0\<^sub>p"
  1384       fst (split0 (simptm t)) = 0\<^sub>p"
  1385     by (simp add: simpeq_def Let_def split_def eq_nb)
  1385     by (simp add: simpeq_def Let_def split_def eq_nb)
  1386 qed
  1386 qed
  1387 
  1387 
  1388 lemma simpneq_nb[simp]:
  1388 lemma simpneq_nb[simp]:
  1389   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1389   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1390   shows "tmbound0 t \<Longrightarrow> bound0 (simpneq t)"
  1390   shows "tmbound0 t \<Longrightarrow> bound0 (simpneq t)"
  1391 proof (simp add: simpneq_def Let_def split_def)
  1391 proof (simp add: simpneq_def Let_def split_def)
  1392   assume "tmbound0 t"
  1392   assume "tmbound0 t"
  1393   then have *: "tmbound0 (simptm t)"
  1393   then have *: "tmbound0 (simptm t)"
  1394     by simp
  1394     by simp
  1539 
  1539 
  1540 lemma simpfm[simp]: "Ifm vs bs (simpfm p) = Ifm vs bs p"
  1540 lemma simpfm[simp]: "Ifm vs bs (simpfm p) = Ifm vs bs p"
  1541   by (induct p arbitrary: bs rule: simpfm.induct) auto
  1541   by (induct p arbitrary: bs rule: simpfm.induct) auto
  1542 
  1542 
  1543 lemma simpfm_bound0:
  1543 lemma simpfm_bound0:
  1544   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1544   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1545   shows "bound0 p \<Longrightarrow> bound0 (simpfm p)"
  1545   shows "bound0 p \<Longrightarrow> bound0 (simpfm p)"
  1546   by (induct p rule: simpfm.induct) auto
  1546   by (induct p rule: simpfm.induct) auto
  1547 
  1547 
  1548 lemma lt_qf[simp]: "qfree (lt t)"
  1548 lemma lt_qf[simp]: "qfree (lt t)"
  1549   apply (cases t)
  1549   apply (cases t)
  1589 
  1589 
  1590 lemma conj_lin: "islin p \<Longrightarrow> islin q \<Longrightarrow> islin (conj p q)"
  1590 lemma conj_lin: "islin p \<Longrightarrow> islin q \<Longrightarrow> islin (conj p q)"
  1591   by (simp add: conj_def)
  1591   by (simp add: conj_def)
  1592 
  1592 
  1593 lemma
  1593 lemma
  1594   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  1594   assumes "SORT_CONSTRAINT('a::field_char_0)"
  1595   shows "qfree p \<Longrightarrow> islin (simpfm p)"
  1595   shows "qfree p \<Longrightarrow> islin (simpfm p)"
  1596   by (induct p rule: simpfm.induct) (simp_all add: conj_lin disj_lin)
  1596   by (induct p rule: simpfm.induct) (simp_all add: conj_lin disj_lin)
  1597 
  1597 
  1598 fun prep :: "fm \<Rightarrow> fm"
  1598 fun prep :: "fm \<Rightarrow> fm"
  1599   where
  1599   where
  3311     by blast
  3311     by blast
  3312   from fr_eq[OF lp, of vs bs x, simplified **] show ?thesis .
  3312   from fr_eq[OF lp, of vs bs x, simplified **] show ?thesis .
  3313 qed
  3313 qed
  3314 
  3314 
  3315 lemma simpfm_lin:
  3315 lemma simpfm_lin:
  3316   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  3316   assumes "SORT_CONSTRAINT('a::field_char_0)"
  3317   shows "qfree p \<Longrightarrow> islin (simpfm p)"
  3317   shows "qfree p \<Longrightarrow> islin (simpfm p)"
  3318   by (induct p rule: simpfm.induct) (auto simp add: conj_lin disj_lin)
  3318   by (induct p rule: simpfm.induct) (auto simp add: conj_lin disj_lin)
  3319 
  3319 
  3320 definition "ferrack p \<equiv>
  3320 definition "ferrack p \<equiv>
  3321   let
  3321   let
  3625   using lp tnb
  3625   using lp tnb
  3626   by (induct p c t rule: msubstpos.induct)
  3626   by (induct p c t rule: msubstpos.induct)
  3627     (auto simp add: msubsteq2_nb msubstltpos_nb msubstlepos_nb)
  3627     (auto simp add: msubsteq2_nb msubstltpos_nb msubstlepos_nb)
  3628 
  3628 
  3629 lemma msubstneg_nb:
  3629 lemma msubstneg_nb:
  3630   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  3630   assumes "SORT_CONSTRAINT('a::field_char_0)"
  3631     and lp: "islin p"
  3631     and lp: "islin p"
  3632     and tnb: "tmbound0 t"
  3632     and tnb: "tmbound0 t"
  3633   shows "bound0 (msubstneg p c t)"
  3633   shows "bound0 (msubstneg p c t)"
  3634   using lp tnb
  3634   using lp tnb
  3635   by (induct p c t rule: msubstneg.induct)
  3635   by (induct p c t rule: msubstneg.induct)
  3636     (auto simp add: msubsteq2_nb msubstltneg_nb msubstleneg_nb)
  3636     (auto simp add: msubsteq2_nb msubstltneg_nb msubstleneg_nb)
  3637 
  3637 
  3638 lemma msubst2_nb:
  3638 lemma msubst2_nb:
  3639   assumes "SORT_CONSTRAINT('a::{field_char_0,field})"
  3639   assumes "SORT_CONSTRAINT('a::field_char_0)"
  3640     and lp: "islin p"
  3640     and lp: "islin p"
  3641     and tnb: "tmbound0 t"
  3641     and tnb: "tmbound0 t"
  3642   shows "bound0 (msubst2 p c t)"
  3642   shows "bound0 (msubst2 p c t)"
  3643   using lp tnb
  3643   using lp tnb
  3644   by (simp add: msubst2_def msubstneg_nb msubstpos_nb lt_nb simpfm_bound0)
  3644   by (simp add: msubst2_def msubstneg_nb msubstpos_nb lt_nb simpfm_bound0)