87 "star_n X \<equiv> Abs_star (starrel `` {X})" |
87 "star_n X \<equiv> Abs_star (starrel `` {X})" |
88 |
88 |
89 star_of :: "'a \<Rightarrow> 'a star" |
89 star_of :: "'a \<Rightarrow> 'a star" |
90 "star_of x \<equiv> star_n (\<lambda>n. x)" |
90 "star_of x \<equiv> star_n (\<lambda>n. x)" |
91 |
91 |
92 theorem star_cases: |
92 theorem star_cases [case_names star_n, cases type: star]: |
93 "(\<And>X. x = star_n X \<Longrightarrow> P) \<Longrightarrow> P" |
93 "(\<And>X. x = star_n X \<Longrightarrow> P) \<Longrightarrow> P" |
94 by (unfold star_n_def, rule eq_Abs_star[of x], blast) |
94 by (unfold star_n_def, rule eq_Abs_star[of x], blast) |
95 |
95 |
96 lemma all_star_eq: "(\<forall>x. P x) = (\<forall>X. P (star_n X))" |
96 lemma all_star_eq: "(\<forall>x. P x) = (\<forall>X. P (star_n X))" |
97 by (auto, rule_tac x=x in star_cases, simp) |
97 by (auto, rule_tac x=x in star_cases, simp) |
310 |
310 |
311 lemmas star_of_less_1 = star_of_less [of _ 1, simplified star_of_one] |
311 lemmas star_of_less_1 = star_of_less [of _ 1, simplified star_of_one] |
312 lemmas star_of_le_1 = star_of_le [of _ 1, simplified star_of_one] |
312 lemmas star_of_le_1 = star_of_le [of _ 1, simplified star_of_one] |
313 lemmas star_of_eq_1 = star_of_eq [of _ 1, simplified star_of_one] |
313 lemmas star_of_eq_1 = star_of_eq [of _ 1, simplified star_of_one] |
314 |
314 |
|
315 text{*As above, for numerals*} |
|
316 |
|
317 lemmas star_of_number_less = |
|
318 star_of_less [of "number_of b", simplified star_of_number_of, standard] |
|
319 lemmas star_of_number_le = |
|
320 star_of_le [of "number_of b", simplified star_of_number_of, standard] |
|
321 lemmas star_of_number_eq = |
|
322 star_of_eq [of "number_of b", simplified star_of_number_of, standard] |
|
323 |
|
324 lemmas star_of_less_number = |
|
325 star_of_less [of _ "number_of b", simplified star_of_number_of, standard] |
|
326 lemmas star_of_le_number = |
|
327 star_of_le [of _ "number_of b", simplified star_of_number_of, standard] |
|
328 lemmas star_of_eq_number = |
|
329 star_of_eq [of _ "number_of b", simplified star_of_number_of, standard] |
|
330 |
315 lemmas star_of_simps = |
331 lemmas star_of_simps = |
316 star_of_add star_of_diff star_of_minus |
332 star_of_add star_of_diff star_of_minus |
317 star_of_mult star_of_divide star_of_inverse |
333 star_of_mult star_of_divide star_of_inverse |
318 star_of_div star_of_mod |
334 star_of_div star_of_mod |
319 star_of_power star_of_abs |
335 star_of_power star_of_abs |
321 star_of_less star_of_le star_of_eq |
337 star_of_less star_of_le star_of_eq |
322 star_of_0_less star_of_0_le star_of_0_eq |
338 star_of_0_less star_of_0_le star_of_0_eq |
323 star_of_less_0 star_of_le_0 star_of_eq_0 |
339 star_of_less_0 star_of_le_0 star_of_eq_0 |
324 star_of_1_less star_of_1_le star_of_1_eq |
340 star_of_1_less star_of_1_le star_of_1_eq |
325 star_of_less_1 star_of_le_1 star_of_eq_1 |
341 star_of_less_1 star_of_le_1 star_of_eq_1 |
|
342 star_of_number_less star_of_number_le star_of_number_eq |
|
343 star_of_less_number star_of_le_number star_of_eq_number |
326 |
344 |
327 declare star_of_simps [simp] |
345 declare star_of_simps [simp] |
328 |
346 |
329 end |
347 end |