src/HOL/Hyperreal/NthRoot.thy
changeset 23257 9117e228a8e3
parent 23122 3d853d6f2f7d
child 23441 ee218296d635
equal deleted inserted replaced
23256:d797768d5655 23257:9117e228a8e3
   176 lemmas real_root_gt_0_iff [simp] = real_root_less_iff [where x=0, simplified]
   176 lemmas real_root_gt_0_iff [simp] = real_root_less_iff [where x=0, simplified]
   177 lemmas real_root_lt_0_iff [simp] = real_root_less_iff [where y=0, simplified]
   177 lemmas real_root_lt_0_iff [simp] = real_root_less_iff [where y=0, simplified]
   178 lemmas real_root_ge_0_iff [simp] = real_root_le_iff [where x=0, simplified]
   178 lemmas real_root_ge_0_iff [simp] = real_root_le_iff [where x=0, simplified]
   179 lemmas real_root_le_0_iff [simp] = real_root_le_iff [where y=0, simplified]
   179 lemmas real_root_le_0_iff [simp] = real_root_le_iff [where y=0, simplified]
   180 lemmas real_root_eq_0_iff [simp] = real_root_eq_iff [where y=0, simplified]
   180 lemmas real_root_eq_0_iff [simp] = real_root_eq_iff [where y=0, simplified]
       
   181 
       
   182 lemma real_root_gt_1_iff [simp]: "0 < n \<Longrightarrow> (1 < root n y) = (1 < y)"
       
   183 by (insert real_root_less_iff [where x=1], simp)
       
   184 
       
   185 lemma real_root_lt_1_iff [simp]: "0 < n \<Longrightarrow> (root n x < 1) = (x < 1)"
       
   186 by (insert real_root_less_iff [where y=1], simp)
       
   187 
       
   188 lemma real_root_ge_1_iff [simp]: "0 < n \<Longrightarrow> (1 \<le> root n y) = (1 \<le> y)"
       
   189 by (insert real_root_le_iff [where x=1], simp)
       
   190 
       
   191 lemma real_root_le_1_iff [simp]: "0 < n \<Longrightarrow> (root n x \<le> 1) = (x \<le> 1)"
       
   192 by (insert real_root_le_iff [where y=1], simp)
       
   193 
       
   194 lemma real_root_eq_1_iff [simp]: "0 < n \<Longrightarrow> (root n x = 1) = (x = 1)"
       
   195 by (insert real_root_eq_iff [where y=1], simp)
       
   196 
       
   197 text {* Roots of roots *}
       
   198 
       
   199 lemma real_root_Suc_0 [simp]: "root (Suc 0) x = x"
       
   200 by (simp add: odd_real_root_unique)
       
   201 
       
   202 lemma real_root_pos_mult_exp:
       
   203   "\<lbrakk>0 < m; 0 < n; 0 < x\<rbrakk> \<Longrightarrow> root (m * n) x = root m (root n x)"
       
   204 by (rule real_root_pos_unique, simp_all add: power_mult)
       
   205 
       
   206 lemma real_root_mult_exp:
       
   207   "\<lbrakk>0 < m; 0 < n\<rbrakk> \<Longrightarrow> root (m * n) x = root m (root n x)"
       
   208 apply (rule linorder_cases [where x=x and y=0])
       
   209 apply (subgoal_tac "root (m * n) (- x) = root m (root n (- x))")
       
   210 apply (simp add: real_root_minus)
       
   211 apply (simp_all add: real_root_pos_mult_exp)
       
   212 done
       
   213 
       
   214 lemma real_root_commute:
       
   215   "\<lbrakk>0 < m; 0 < n\<rbrakk> \<Longrightarrow> root m (root n x) = root n (root m x)"
       
   216 by (simp add: real_root_mult_exp [symmetric] mult_commute)
       
   217 
       
   218 text {* Monotonicity in first argument *}
       
   219 
       
   220 lemma real_root_strict_decreasing:
       
   221   "\<lbrakk>0 < n; n < N; 1 < x\<rbrakk> \<Longrightarrow> root N x < root n x"
       
   222 apply (subgoal_tac "root n (root N x) ^ n < root N (root n x) ^ N", simp)
       
   223 apply (simp add: real_root_commute power_strict_increasing
       
   224             del: real_root_pow_pos2)
       
   225 done
       
   226 
       
   227 lemma real_root_strict_increasing:
       
   228   "\<lbrakk>0 < n; n < N; 0 < x; x < 1\<rbrakk> \<Longrightarrow> root n x < root N x"
       
   229 apply (subgoal_tac "root N (root n x) ^ N < root n (root N x) ^ n", simp)
       
   230 apply (simp add: real_root_commute power_strict_decreasing
       
   231             del: real_root_pow_pos2)
       
   232 done
       
   233 
       
   234 lemma real_root_decreasing:
       
   235   "\<lbrakk>0 < n; n < N; 1 \<le> x\<rbrakk> \<Longrightarrow> root N x \<le> root n x"
       
   236 by (auto simp add: order_le_less real_root_strict_decreasing)
       
   237 
       
   238 lemma real_root_increasing:
       
   239   "\<lbrakk>0 < n; n < N; 0 \<le> x; x \<le> 1\<rbrakk> \<Longrightarrow> root n x \<le> root N x"
       
   240 by (auto simp add: order_le_less real_root_strict_increasing)
   181 
   241 
   182 text {* Roots of multiplication and division *}
   242 text {* Roots of multiplication and division *}
   183 
   243 
   184 lemma real_root_mult_lemma:
   244 lemma real_root_mult_lemma:
   185   "\<lbrakk>0 < n; 0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> root n (x * y) = root n x * root n y"
   245   "\<lbrakk>0 < n; 0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> root n (x * y) = root n x * root n y"