src/HOL/Decision_Procs/Reflected_Multivariate_Polynomial.thy
changeset 41814 3848eb635eab
parent 41813 4eb43410d2fa
child 41815 9a0cacbcd825
     1.1 --- a/src/HOL/Decision_Procs/Reflected_Multivariate_Polynomial.thy	Mon Feb 21 23:14:36 2011 +0100
     1.2 +++ b/src/HOL/Decision_Procs/Reflected_Multivariate_Polynomial.thy	Mon Feb 21 23:14:36 2011 +0100
     1.3 @@ -107,12 +107,6 @@
     1.4  subsection{* Operations for normalization *}
     1.5  
     1.6  
     1.7 -consts 
     1.8 -  polysub :: "poly\<times>poly \<Rightarrow> poly"
     1.9 -
    1.10 -abbreviation poly_sub :: "poly \<Rightarrow> poly \<Rightarrow> poly" (infixl "-\<^sub>p" 60)
    1.11 -  where "a -\<^sub>p b \<equiv> polysub (a,b)"
    1.12 -
    1.13  declare if_cong[fundef_cong del]
    1.14  declare let_cong[fundef_cong del]
    1.15  
    1.16 @@ -136,8 +130,9 @@
    1.17  | "polyneg (CN c n p) = CN (polyneg c) n (polyneg p)"
    1.18  | "polyneg a = Neg a"
    1.19  
    1.20 -defs polysub_def[code]: "polysub \<equiv> \<lambda> (p,q). polyadd p (polyneg q)"
    1.21 -
    1.22 +definition polysub :: "poly \<Rightarrow> poly \<Rightarrow> poly" (infixl "-\<^sub>p" 60)
    1.23 +where
    1.24 +  "p -\<^sub>p q = polyadd p (polyneg q)"
    1.25  
    1.26  fun polymul :: "poly \<Rightarrow> poly \<Rightarrow> poly" (infixl "*\<^sub>p" 60)
    1.27  where
    1.28 @@ -592,15 +587,15 @@
    1.29  
    1.30  text{* polysub is a substraction and preserves normal forms *}
    1.31  
    1.32 -lemma polysub[simp]: "Ipoly bs (polysub (p,q)) = (Ipoly bs p) - (Ipoly bs q)"
    1.33 +lemma polysub[simp]: "Ipoly bs (polysub p q) = (Ipoly bs p) - (Ipoly bs q)"
    1.34  by (simp add: polysub_def polyneg polyadd)
    1.35 -lemma polysub_normh: "\<And> n0 n1. \<lbrakk> isnpolyh p n0 ; isnpolyh q n1\<rbrakk> \<Longrightarrow> isnpolyh (polysub(p,q)) (min n0 n1)"
    1.36 +lemma polysub_normh: "\<And> n0 n1. \<lbrakk> isnpolyh p n0 ; isnpolyh q n1\<rbrakk> \<Longrightarrow> isnpolyh (polysub p q) (min n0 n1)"
    1.37  by (simp add: polysub_def polyneg_normh polyadd_normh)
    1.38  
    1.39 -lemma polysub_norm: "\<lbrakk> isnpoly p; isnpoly q\<rbrakk> \<Longrightarrow> isnpoly (polysub(p,q))"
    1.40 +lemma polysub_norm: "\<lbrakk> isnpoly p; isnpoly q\<rbrakk> \<Longrightarrow> isnpoly (polysub p q)"
    1.41    using polyadd_norm polyneg_norm by (simp add: polysub_def) 
    1.42  lemma polysub_same_0[simp]:   assumes "SORT_CONSTRAINT('a::{field_char_0, field_inverse_zero})"
    1.43 -  shows "isnpolyh p n0 \<Longrightarrow> polysub (p, p) = 0\<^sub>p"
    1.44 +  shows "isnpolyh p n0 \<Longrightarrow> polysub p p = 0\<^sub>p"
    1.45  unfolding polysub_def split_def fst_conv snd_conv
    1.46  by (induct p arbitrary: n0,auto simp add: Let_def Nsub0[simplified Nsub_def])
    1.47