142 next |
142 next |
143 case (Cons x xs n m) |
143 case (Cons x xs n m) |
144 {assume nxs: "n \<ge> length (x#xs)" hence ?case using removen_same[OF nxs] by simp} |
144 {assume nxs: "n \<ge> length (x#xs)" hence ?case using removen_same[OF nxs] by simp} |
145 moreover |
145 moreover |
146 {assume nxs: "\<not> (n \<ge> length (x#xs))" |
146 {assume nxs: "\<not> (n \<ge> length (x#xs))" |
147 {assume mln: "m < n" hence ?case using prems by (cases m, auto)} |
147 {assume mln: "m < n" hence ?case using Cons by (cases m, auto)} |
148 moreover |
148 moreover |
149 {assume mln: "\<not> (m < n)" |
149 {assume mln: "\<not> (m < n)" |
150 |
150 {assume mxs: "m \<le> length (x#xs)" hence ?case using Cons by (cases m, auto)} |
151 {assume mxs: "m \<le> length (x#xs)" hence ?case using prems by (cases m, auto)} |
|
152 moreover |
151 moreover |
153 {assume mxs: "\<not> (m \<le> length (x#xs))" |
152 {assume mxs: "\<not> (m \<le> length (x#xs))" |
154 have th: "length (removen n (x#xs)) = length xs" |
153 have th: "length (removen n (x#xs)) = length xs" |
155 using removen_length[where n="n" and xs="x#xs"] nxs by simp |
154 using removen_length[where n="n" and xs="x#xs"] nxs by simp |
156 with mxs have mxs':"m \<ge> length (removen n (x#xs))" by auto |
155 with mxs have mxs':"m \<ge> length (removen n (x#xs))" by auto |
160 by auto |
159 by auto |
161 hence ?case using nxs mln mxs by auto } |
160 hence ?case using nxs mln mxs by auto } |
162 ultimately have ?case by blast |
161 ultimately have ?case by blast |
163 } |
162 } |
164 ultimately have ?case by blast |
163 ultimately have ?case by blast |
165 |
164 } ultimately show ?case by blast |
166 } ultimately show ?case by blast |
|
167 qed |
165 qed |
168 |
166 |
169 lemma decrtm: assumes bnd: "tmboundslt (length bs) t" and nb: "tmbound m t" |
167 lemma decrtm: assumes bnd: "tmboundslt (length bs) t" and nb: "tmbound m t" |
170 and nle: "m \<le> length bs" |
168 and nle: "m \<le> length bs" |
171 shows "Itm vs (removen m bs) (decrtm m t) = Itm vs bs t" |
169 shows "Itm vs (removen m bs) (decrtm m t) = Itm vs bs t" |
172 using bnd nb nle |
170 using bnd nb nle by (induct t rule: tm.induct) (auto simp add: removen_nth) |
173 by (induct t rule: tm.induct, auto simp add: removen_nth) |
|
174 |
171 |
175 primrec tmsubst0:: "tm \<Rightarrow> tm \<Rightarrow> tm" where |
172 primrec tmsubst0:: "tm \<Rightarrow> tm \<Rightarrow> tm" where |
176 "tmsubst0 t (CP c) = CP c" |
173 "tmsubst0 t (CP c) = CP c" |
177 | "tmsubst0 t (Bound n) = (if n=0 then t else Bound n)" |
174 | "tmsubst0 t (Bound n) = (if n=0 then t else Bound n)" |
178 | "tmsubst0 t (CNP n c a) = (if n=0 then Add (Mul c t) (tmsubst0 t a) else CNP n c (tmsubst0 t a))" |
175 | "tmsubst0 t (CNP n c a) = (if n=0 then Add (Mul c t) (tmsubst0 t a) else CNP n c (tmsubst0 t a))" |
180 | "tmsubst0 t (Add a b) = Add (tmsubst0 t a) (tmsubst0 t b)" |
177 | "tmsubst0 t (Add a b) = Add (tmsubst0 t a) (tmsubst0 t b)" |
181 | "tmsubst0 t (Sub a b) = Sub (tmsubst0 t a) (tmsubst0 t b)" |
178 | "tmsubst0 t (Sub a b) = Sub (tmsubst0 t a) (tmsubst0 t b)" |
182 | "tmsubst0 t (Mul i a) = Mul i (tmsubst0 t a)" |
179 | "tmsubst0 t (Mul i a) = Mul i (tmsubst0 t a)" |
183 lemma tmsubst0: |
180 lemma tmsubst0: |
184 shows "Itm vs (x#bs) (tmsubst0 t a) = Itm vs ((Itm vs (x#bs) t)#bs) a" |
181 shows "Itm vs (x#bs) (tmsubst0 t a) = Itm vs ((Itm vs (x#bs) t)#bs) a" |
185 by (induct a rule: tm.induct,auto simp add: nth_pos2) |
182 by (induct a rule: tm.induct) (auto simp add: nth_pos2) |
186 |
183 |
187 lemma tmsubst0_nb: "tmbound0 t \<Longrightarrow> tmbound0 (tmsubst0 t a)" |
184 lemma tmsubst0_nb: "tmbound0 t \<Longrightarrow> tmbound0 (tmsubst0 t a)" |
188 by (induct a rule: tm.induct,auto simp add: nth_pos2) |
185 by (induct a rule: tm.induct) (auto simp add: nth_pos2) |
189 |
186 |
190 primrec tmsubst:: "nat \<Rightarrow> tm \<Rightarrow> tm \<Rightarrow> tm" where |
187 primrec tmsubst:: "nat \<Rightarrow> tm \<Rightarrow> tm \<Rightarrow> tm" where |
191 "tmsubst n t (CP c) = CP c" |
188 "tmsubst n t (CP c) = CP c" |
192 | "tmsubst n t (Bound m) = (if n=m then t else Bound m)" |
189 | "tmsubst n t (Bound m) = (if n=m then t else Bound m)" |
193 | "tmsubst n t (CNP m c a) = (if n=m then Add (Mul c t) (tmsubst n t a) |
190 | "tmsubst n t (CNP m c a) = (if n=m then Add (Mul c t) (tmsubst n t a) |
567 shows "Ifm vs (bs[n:=x]) p = Ifm vs bs p" |
564 shows "Ifm vs (bs[n:=x]) p = Ifm vs bs p" |
568 using bnd nb le tmbound_I[where bs=bs and vs = vs] |
565 using bnd nb le tmbound_I[where bs=bs and vs = vs] |
569 proof(induct p arbitrary: bs n rule: fm.induct) |
566 proof(induct p arbitrary: bs n rule: fm.induct) |
570 case (E p bs n) |
567 case (E p bs n) |
571 {fix y |
568 {fix y |
572 from prems have bnd: "boundslt (length (y#bs)) p" |
569 from E have bnd: "boundslt (length (y#bs)) p" |
573 and nb: "bound (Suc n) p" and le: "Suc n \<le> length (y#bs)" by simp+ |
570 and nb: "bound (Suc n) p" and le: "Suc n \<le> length (y#bs)" by simp+ |
574 from E.hyps[OF bnd nb le tmbound_I] have "Ifm vs ((y#bs)[Suc n:=x]) p = Ifm vs (y#bs) p" . } |
571 from E.hyps[OF bnd nb le tmbound_I] have "Ifm vs ((y#bs)[Suc n:=x]) p = Ifm vs (y#bs) p" . } |
575 thus ?case by simp |
572 thus ?case by simp |
576 next |
573 next |
577 case (A p bs n) {fix y |
574 case (A p bs n) {fix y |
578 from prems have bnd: "boundslt (length (y#bs)) p" |
575 from A have bnd: "boundslt (length (y#bs)) p" |
579 and nb: "bound (Suc n) p" and le: "Suc n \<le> length (y#bs)" by simp+ |
576 and nb: "bound (Suc n) p" and le: "Suc n \<le> length (y#bs)" by simp+ |
580 from A.hyps[OF bnd nb le tmbound_I] have "Ifm vs ((y#bs)[Suc n:=x]) p = Ifm vs (y#bs) p" . } |
577 from A.hyps[OF bnd nb le tmbound_I] have "Ifm vs ((y#bs)[Suc n:=x]) p = Ifm vs (y#bs) p" . } |
581 thus ?case by simp |
578 thus ?case by simp |
582 qed auto |
579 qed auto |
583 |
580 |
618 shows "Ifm vs (removen m bs) (decr m p) = Ifm vs bs p" |
615 shows "Ifm vs (removen m bs) (decr m p) = Ifm vs bs p" |
619 using bnd nb nle |
616 using bnd nb nle |
620 proof(induct p arbitrary: bs m rule: fm.induct) |
617 proof(induct p arbitrary: bs m rule: fm.induct) |
621 case (E p bs m) |
618 case (E p bs m) |
622 {fix x |
619 {fix x |
623 from prems have bnd: "boundslt (length (x#bs)) p" and nb: "bound (Suc m) p" |
620 from E have bnd: "boundslt (length (x#bs)) p" and nb: "bound (Suc m) p" |
624 and nle: "Suc m < length (x#bs)" by auto |
621 and nle: "Suc m < length (x#bs)" by auto |
625 from prems(4)[OF bnd nb nle] have "Ifm vs (removen (Suc m) (x#bs)) (decr (Suc m) p) = Ifm vs (x#bs) p". |
622 from E(1)[OF bnd nb nle] have "Ifm vs (removen (Suc m) (x#bs)) (decr (Suc m) p) = Ifm vs (x#bs) p". |
626 } thus ?case by auto |
623 } thus ?case by auto |
627 next |
624 next |
628 case (A p bs m) |
625 case (A p bs m) |
629 {fix x |
626 {fix x |
630 from prems have bnd: "boundslt (length (x#bs)) p" and nb: "bound (Suc m) p" |
627 from A have bnd: "boundslt (length (x#bs)) p" and nb: "bound (Suc m) p" |
631 and nle: "Suc m < length (x#bs)" by auto |
628 and nle: "Suc m < length (x#bs)" by auto |
632 from prems(4)[OF bnd nb nle] have "Ifm vs (removen (Suc m) (x#bs)) (decr (Suc m) p) = Ifm vs (x#bs) p". |
629 from A(1)[OF bnd nb nle] have "Ifm vs (removen (Suc m) (x#bs)) (decr (Suc m) p) = Ifm vs (x#bs) p". |
633 } thus ?case by auto |
630 } thus ?case by auto |
634 qed (auto simp add: decrtm removen_nth) |
631 qed (auto simp add: decrtm removen_nth) |
635 |
632 |
636 primrec subst0:: "tm \<Rightarrow> fm \<Rightarrow> fm" where |
633 primrec subst0:: "tm \<Rightarrow> fm \<Rightarrow> fm" where |
637 "subst0 t T = T" |
634 "subst0 t T = T" |
678 shows "Ifm vs bs (subst n t p) = Ifm vs (bs[n:= Itm vs bs t]) p" |
675 shows "Ifm vs bs (subst n t p) = Ifm vs (bs[n:= Itm vs bs t]) p" |
679 using nb nlm |
676 using nb nlm |
680 proof (induct p arbitrary: bs n t rule: fm.induct) |
677 proof (induct p arbitrary: bs n t rule: fm.induct) |
681 case (E p bs n) |
678 case (E p bs n) |
682 {fix x |
679 {fix x |
683 from prems have bn: "boundslt (length (x#bs)) p" by simp |
680 from E have bn: "boundslt (length (x#bs)) p" by simp |
684 from prems have nlm: "Suc n \<le> length (x#bs)" by simp |
681 from E have nlm: "Suc n \<le> length (x#bs)" by simp |
685 from prems(3)[OF bn nlm] have "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs ((x#bs)[Suc n:= Itm vs (x#bs) (incrtm0 t)]) p" by simp |
682 from E(1)[OF bn nlm] have "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs ((x#bs)[Suc n:= Itm vs (x#bs) (incrtm0 t)]) p" by simp |
686 hence "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs (x#bs[n:= Itm vs bs t]) p" |
683 hence "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs (x#bs[n:= Itm vs bs t]) p" |
687 by (simp add: incrtm0[where x="x" and bs="bs" and t="t"]) } |
684 by (simp add: incrtm0[where x="x" and bs="bs" and t="t"]) } |
688 thus ?case by simp |
685 thus ?case by simp |
689 next |
686 next |
690 case (A p bs n) |
687 case (A p bs n) |
691 {fix x |
688 {fix x |
692 from prems have bn: "boundslt (length (x#bs)) p" by simp |
689 from A have bn: "boundslt (length (x#bs)) p" by simp |
693 from prems have nlm: "Suc n \<le> length (x#bs)" by simp |
690 from A have nlm: "Suc n \<le> length (x#bs)" by simp |
694 from prems(3)[OF bn nlm] have "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs ((x#bs)[Suc n:= Itm vs (x#bs) (incrtm0 t)]) p" by simp |
691 from A(1)[OF bn nlm] have "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs ((x#bs)[Suc n:= Itm vs (x#bs) (incrtm0 t)]) p" by simp |
695 hence "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs (x#bs[n:= Itm vs bs t]) p" |
692 hence "Ifm vs (x#bs) (subst (Suc n) (incrtm0 t) p) = Ifm vs (x#bs[n:= Itm vs bs t]) p" |
696 by (simp add: incrtm0[where x="x" and bs="bs" and t="t"]) } |
693 by (simp add: incrtm0[where x="x" and bs="bs" and t="t"]) } |
697 thus ?case by simp |
694 thus ?case by simp |
698 qed(auto simp add: tmsubst) |
695 qed(auto simp add: tmsubst) |
699 |
696 |
1369 case 1 thus ?case by (auto,rule_tac x="min z za" in exI, auto) |
1366 case 1 thus ?case by (auto,rule_tac x="min z za" in exI, auto) |
1370 next |
1367 next |
1371 case 2 thus ?case by (auto,rule_tac x="min z za" in exI, auto) |
1368 case 2 thus ?case by (auto,rule_tac x="min z za" in exI, auto) |
1372 next |
1369 next |
1373 case (3 c e) hence nbe: "tmbound0 e" by simp |
1370 case (3 c e) hence nbe: "tmbound0 e" by simp |
1374 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1371 from 3 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1375 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1372 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1376 let ?c = "Ipoly vs c" |
1373 let ?c = "Ipoly vs c" |
1377 let ?e = "Itm vs (y#bs) e" |
1374 let ?e = "Itm vs (y#bs) e" |
1378 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1375 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1379 moreover {assume "?c = 0" hence ?case |
1376 moreover {assume "?c = 0" hence ?case |
1391 hence "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Eq (CNP 0 c e)))" |
1388 hence "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Eq (CNP 0 c e)))" |
1392 using tmbound0_I[OF nbe, where b="y" and b'="x"] eqs by auto} hence ?case by auto} |
1389 using tmbound0_I[OF nbe, where b="y" and b'="x"] eqs by auto} hence ?case by auto} |
1393 ultimately show ?case by blast |
1390 ultimately show ?case by blast |
1394 next |
1391 next |
1395 case (4 c e) hence nbe: "tmbound0 e" by simp |
1392 case (4 c e) hence nbe: "tmbound0 e" by simp |
1396 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1393 from 4 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1397 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1394 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1398 let ?c = "Ipoly vs c" |
1395 let ?c = "Ipoly vs c" |
1399 let ?e = "Itm vs (y#bs) e" |
1396 let ?e = "Itm vs (y#bs) e" |
1400 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1397 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1401 moreover {assume "?c = 0" hence ?case using eqs by auto} |
1398 moreover {assume "?c = 0" hence ?case using eqs by auto} |
1412 hence "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (NEq (CNP 0 c e)))" |
1409 hence "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (NEq (CNP 0 c e)))" |
1413 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] by auto} hence ?case by auto} |
1410 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] by auto} hence ?case by auto} |
1414 ultimately show ?case by blast |
1411 ultimately show ?case by blast |
1415 next |
1412 next |
1416 case (5 c e) hence nbe: "tmbound0 e" by simp |
1413 case (5 c e) hence nbe: "tmbound0 e" by simp |
1417 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1414 from 5 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1418 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1415 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1419 note eqs = lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] lt[OF nc(2), where ?'a = 'a] |
1416 note eqs = lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] lt[OF nc(2), where ?'a = 'a] |
1420 let ?c = "Ipoly vs c" |
1417 let ?c = "Ipoly vs c" |
1421 let ?e = "Itm vs (y#bs) e" |
1418 let ?e = "Itm vs (y#bs) e" |
1422 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1419 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1434 hence "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Lt (CNP 0 c e)))" |
1431 hence "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Lt (CNP 0 c e)))" |
1435 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] cp by auto} hence ?case by auto} |
1432 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] cp by auto} hence ?case by auto} |
1436 ultimately show ?case by blast |
1433 ultimately show ?case by blast |
1437 next |
1434 next |
1438 case (6 c e) hence nbe: "tmbound0 e" by simp |
1435 case (6 c e) hence nbe: "tmbound0 e" by simp |
1439 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1436 from 6 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1440 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1437 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1441 note eqs = lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] le[OF nc(2), where ?'a = 'a] |
1438 note eqs = lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] le[OF nc(2), where ?'a = 'a] |
1442 let ?c = "Ipoly vs c" |
1439 let ?c = "Ipoly vs c" |
1443 let ?e = "Itm vs (y#bs) e" |
1440 let ?e = "Itm vs (y#bs) e" |
1444 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1441 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1465 case 1 thus ?case by (auto,rule_tac x="max z za" in exI, auto) |
1462 case 1 thus ?case by (auto,rule_tac x="max z za" in exI, auto) |
1466 next |
1463 next |
1467 case 2 thus ?case by (auto,rule_tac x="max z za" in exI, auto) |
1464 case 2 thus ?case by (auto,rule_tac x="max z za" in exI, auto) |
1468 next |
1465 next |
1469 case (3 c e) hence nbe: "tmbound0 e" by simp |
1466 case (3 c e) hence nbe: "tmbound0 e" by simp |
1470 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1467 from 3 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1471 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1468 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1472 let ?c = "Ipoly vs c" |
1469 let ?c = "Ipoly vs c" |
1473 let ?e = "Itm vs (y#bs) e" |
1470 let ?e = "Itm vs (y#bs) e" |
1474 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1471 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1475 moreover {assume "?c = 0" hence ?case |
1472 moreover {assume "?c = 0" hence ?case |
1486 hence "?c * x + ?e < 0" by simp |
1483 hence "?c * x + ?e < 0" by simp |
1487 hence "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Eq (CNP 0 c e)))" |
1484 hence "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Eq (CNP 0 c e)))" |
1488 using tmbound0_I[OF nbe, where b="y" and b'="x"] eqs by auto} hence ?case by auto} |
1485 using tmbound0_I[OF nbe, where b="y" and b'="x"] eqs by auto} hence ?case by auto} |
1489 ultimately show ?case by blast |
1486 ultimately show ?case by blast |
1490 next |
1487 next |
1491 case (4 c e) hence nbe: "tmbound0 e" by simp |
1488 case (4 c e) hence nbe: "tmbound0 e" by simp |
1492 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1489 from 4 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1493 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1490 note eqs = eq[OF nc(1), where ?'a = 'a] eq[OF nc(2), where ?'a = 'a] |
1494 let ?c = "Ipoly vs c" |
1491 let ?c = "Ipoly vs c" |
1495 let ?e = "Itm vs (y#bs) e" |
1492 let ?e = "Itm vs (y#bs) e" |
1496 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1493 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1497 moreover {assume "?c = 0" hence ?case using eqs by auto} |
1494 moreover {assume "?c = 0" hence ?case using eqs by auto} |
1507 hence "?c * x + ?e < 0" by simp |
1504 hence "?c * x + ?e < 0" by simp |
1508 hence "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (NEq (CNP 0 c e)))" |
1505 hence "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (NEq (CNP 0 c e)))" |
1509 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] by auto} hence ?case by auto} |
1506 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] by auto} hence ?case by auto} |
1510 ultimately show ?case by blast |
1507 ultimately show ?case by blast |
1511 next |
1508 next |
1512 case (5 c e) hence nbe: "tmbound0 e" by simp |
1509 case (5 c e) hence nbe: "tmbound0 e" by simp |
1513 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1510 from 5 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1514 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1511 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1515 note eqs = lt[OF nc(1), where ?'a = 'a] lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] lt[OF nc(2), where ?'a = 'a] |
1512 note eqs = lt[OF nc(1), where ?'a = 'a] lt[OF nc', where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] lt[OF nc(2), where ?'a = 'a] |
1516 let ?c = "Ipoly vs c" |
1513 let ?c = "Ipoly vs c" |
1517 let ?e = "Itm vs (y#bs) e" |
1514 let ?e = "Itm vs (y#bs) e" |
1518 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1515 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1530 hence "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Lt (CNP 0 c e)))" |
1527 hence "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Lt (CNP 0 c e)))" |
1531 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] cp by auto} hence ?case by auto} |
1528 using eqs tmbound0_I[OF nbe, where b="y" and b'="x"] cp by auto} hence ?case by auto} |
1532 ultimately show ?case by blast |
1529 ultimately show ?case by blast |
1533 next |
1530 next |
1534 case (6 c e) hence nbe: "tmbound0 e" by simp |
1531 case (6 c e) hence nbe: "tmbound0 e" by simp |
1535 from prems have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1532 from 6 have nc: "allpolys isnpoly (CP c)" "allpolys isnpoly e" by simp_all |
1536 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1533 hence nc': "allpolys isnpoly (CP (~\<^sub>p c))" by (simp add: polyneg_norm) |
1537 note eqs = lt[OF nc(1), where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] le[OF nc(2), where ?'a = 'a] |
1534 note eqs = lt[OF nc(1), where ?'a = 'a] eq [OF nc(1), where ?'a = 'a] le[OF nc(2), where ?'a = 'a] |
1538 let ?c = "Ipoly vs c" |
1535 let ?c = "Ipoly vs c" |
1539 let ?e = "Itm vs (y#bs) e" |
1536 let ?e = "Itm vs (y#bs) e" |
1540 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |
1537 have "?c=0 \<or> ?c > 0 \<or> ?c < 0" by arith |