src/HOL/IMP/Abs_Int2_ivl.thy
changeset 52504 52cd8bebc3b6
parent 51994 82cc2aeb7d13
child 53427 415354b68f0c
equal deleted inserted replaced
52503:750b63fa4c4e 52504:52cd8bebc3b6
   307 
   307 
   308 lemma add_mono_Fin_le:
   308 lemma add_mono_Fin_le:
   309   "\<lbrakk>Fin y1 \<le> x1; Fin y2 \<le> x2\<rbrakk> \<Longrightarrow> Fin(y1 + y2::'a::ordered_ab_group_add) \<le> x1 + x2"
   309   "\<lbrakk>Fin y1 \<le> x1; Fin y2 \<le> x2\<rbrakk> \<Longrightarrow> Fin(y1 + y2::'a::ordered_ab_group_add) \<le> x1 + x2"
   310 by(drule (1) add_mono) simp
   310 by(drule (1) add_mono) simp
   311 
   311 
   312 interpretation Val_abs
   312 interpretation Val_semilattice
   313 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   313 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   314 proof
   314 proof
   315   case goal1 thus ?case by transfer (simp add: le_iff_subset)
   315   case goal1 thus ?case by transfer (simp add: le_iff_subset)
   316 next
   316 next
   317   case goal2 show ?case by transfer (simp add: \<gamma>_rep_def)
   317   case goal2 show ?case by transfer (simp add: \<gamma>_rep_def)
   323     apply(auto simp: \<gamma>_rep_def plus_rep_def add_mono_le_Fin add_mono_Fin_le)
   323     apply(auto simp: \<gamma>_rep_def plus_rep_def add_mono_le_Fin add_mono_Fin_le)
   324     by(auto simp: empty_rep_def is_empty_rep_def)
   324     by(auto simp: empty_rep_def is_empty_rep_def)
   325 qed
   325 qed
   326 
   326 
   327 
   327 
   328 interpretation Val_abs1_gamma
   328 interpretation Val_lattice_gamma
   329 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   329 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   330 defines aval_ivl is aval'
   330 defines aval_ivl is aval'
   331 proof
   331 proof
   332   case goal1 show ?case by(simp add: \<gamma>_inf)
   332   case goal1 show ?case by(simp add: \<gamma>_inf)
   333 next
   333 next
   334   case goal2 show ?case unfolding bot_ivl_def by transfer simp
   334   case goal2 show ?case unfolding bot_ivl_def by transfer simp
   335 qed
   335 qed
   336 
   336 
   337 interpretation Val_abs1
   337 interpretation Val_inv
   338 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   338 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   339 and test_num' = in_ivl
   339 and test_num' = in_ivl
   340 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   340 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   341 proof
   341 proof
   342   case goal1 thus ?case by transfer (auto simp: \<gamma>_rep_def)
   342   case goal1 thus ?case by transfer (auto simp: \<gamma>_rep_def)
   355       uminus_ivl.abs_eq uminus_rep_def \<gamma>_ivl_nice)
   355       uminus_ivl.abs_eq uminus_rep_def \<gamma>_ivl_nice)
   356     apply(simp add: \<gamma>_aboveI[of i2] \<gamma>_belowI[of i1])
   356     apply(simp add: \<gamma>_aboveI[of i2] \<gamma>_belowI[of i1])
   357     done
   357     done
   358 qed
   358 qed
   359 
   359 
   360 interpretation Abs_Int1
   360 interpretation Abs_Int_inv
   361 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   361 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   362 and test_num' = in_ivl
   362 and test_num' = in_ivl
   363 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   363 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   364 defines inv_aval_ivl is inv_aval''
   364 defines inv_aval_ivl is inv_aval''
   365 and inv_bval_ivl is inv_bval''
   365 and inv_bval_ivl is inv_bval''
   389 lemma mono_below: "iv1 \<le> iv2 \<Longrightarrow> below iv1 \<le> below iv2"
   389 lemma mono_below: "iv1 \<le> iv2 \<Longrightarrow> below iv1 \<le> below iv2"
   390 apply transfer
   390 apply transfer
   391 apply(auto simp: below_rep_def le_iff_subset split: if_splits prod.split)
   391 apply(auto simp: below_rep_def le_iff_subset split: if_splits prod.split)
   392 by(auto simp: is_empty_rep_iff \<gamma>_rep_cases split: extended.splits)
   392 by(auto simp: is_empty_rep_iff \<gamma>_rep_cases split: extended.splits)
   393 
   393 
   394 interpretation Abs_Int1_mono
   394 interpretation Abs_Int_inv_mono
   395 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   395 where \<gamma> = \<gamma>_ivl and num' = num_ivl and plus' = "op +"
   396 and test_num' = in_ivl
   396 and test_num' = in_ivl
   397 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   397 and inv_plus' = inv_plus_ivl and inv_less' = inv_less_ivl
   398 proof
   398 proof
   399   case goal1 thus ?case by (rule mono_plus_ivl)
   399   case goal1 thus ?case by (rule mono_plus_ivl)