Statement:
stringlengths
7
24.3k
lemma 35: \<open>\<turnstile> (p \<rightarrow> q \<rightarrow> r) \<rightarrow> (p \<rightarrow> q) \<rightarrow> p \<rightarrow> r\<close>
lemma OrdP_cases_disj: assumes p: "atom p \<sharp> x" shows "insert (OrdP x) H \<turnstile> x EQ Zero OR Ex p (OrdP (Var p) AND x EQ SUCC (Var p))"
lemma f'_cong: "(g has_derivative blinfun_apply (f' x)) (at x)" if "x \<in> Y"
lemma Ate_Refines_LV_VOting: "PO_refines (ate_ref_rel) majorities.flv_TS (Ate_TS HOs HOs crds)"
lemma access_type_safe [simp,intro]: "typeof (s@@l) \<le> ltype l"
theorem StateParallel_frame_hoare [hoare]: assumes "vwb_lens a" "vwb_lens b" "a \<bowtie> b" "a \<natural> d\<^sub>1" "b \<natural> d\<^sub>2" "a \<sharp> c\<^sub>1" "b \<sharp> c\<^sub>1" "\<lbrace>c\<^sub>1 \<and> c\<^sub>2\<rbrace>P\<lbrace>d\<^sub>1\<rbrace>\<^sub>u" "\<lbrace>c\<^sub>1 \<and> c\<^sub>2\<rbrace>Q\<lbrace>d\<^sub>2\<rbrace>\<^sub>u" shows "\<lbrace>c\<^sub>1 \<and> c\<^sub>2\<rbrace>P |a|b|\<^sub>\<sigma> Q\<lbrace>c\<^sub>1 \<and> d\<^sub>1 \<and> d\<^sub>2\<rbrace>\<^sub>u"
lemma i_set_Plus_closed: "I \<in> i_set \<Longrightarrow> I \<oplus> k \<in> i_set"
lemma deadlock_state_alt_def_h : "deadlock_state M q = (\<forall> x \<in> inputs M . h M (q,x) = {})"
lemma all_bex_swap_lemma [iff]: "(\<forall>x. (\<exists>y\<in>A. x = f y) \<longrightarrow> P x) = (\<forall>y\<in>A. P(f y))"
lemma kill_short_uwellformed: assumes "finite (uverts G)" "uwellformed G" shows "uwellformed (kill_short G k)"
lemma mset_ran_xfer_pointwise: assumes "mset_ran a r = mset_ran a' r" assumes "finite r" shows "(\<forall>i\<in>r. P (a i)) \<longleftrightarrow> (\<forall>i\<in>r. P (a' i))"
lemma demorgans2: "-(x \<squnion> y) = -x \<sqinter> -y"
lemma fresh_minus_atom_set: fixes S::"atom set" assumes "finite S" shows "a \<sharp> S - T \<longleftrightarrow> (a \<notin> T \<longrightarrow> a \<sharp> S)"
lemma Node_in_tree_sigma: assumes L: "X \<in> sets (M \<Otimes>\<^sub>M (tree_sigma M \<Otimes>\<^sub>M tree_sigma M))" shows "{Node l v r | l v r. (v, l, r) \<in> X} \<in> sets (tree_sigma M)"
lemma infer_v_conj: assumes "\<Theta> ; \<B> ; GNil \<turnstile> v \<Leftarrow> \<lbrace> z : b | c1 \<rbrace>" and "\<Theta> ; \<B> ; GNil \<turnstile> v \<Leftarrow> \<lbrace> z : b | c2 \<rbrace>" shows "\<Theta> ; \<B> ; GNil \<turnstile> v \<Leftarrow> \<lbrace> z : b | c1 AND c2 \<rbrace>"
lemma map_vec_mat_cols: "map (map_vec f) (cols M) = cols ((map_mat f) M)"
lemma one_side_transitivity: assumes "P Q OS A B" and "P Q OS B C" shows "P Q OS A C"
lemma FIXME_third_fiddle: "\<lbrakk> (r \<inter> Y \<times> Y) `` X \<subseteq> X; X \<subseteq> Y; x \<in> X; y \<in> Y - X ; r `` {y} \<inter> X = {} \<rbrakk> \<Longrightarrow> (r \<inter> (Y - (X - r `` {x})) \<times> (Y - (X - r `` {x}))) `` {y} = (r \<inter> (Y - X) \<times> (Y - X)) `` {y}"
lemma floor_has_real_derivative: fixes f :: "real \<Rightarrow> 'a::{floor_ceiling,order_topology}" assumes "isCont f x" and "f x \<notin> \<int>" shows "((\<lambda>x. floor (f x)) has_real_derivative 0) (at x)"
lemma True_steps_concD[rule_format]: "\<forall>p. (True#p,q) : steps (conc L R) w \<longrightarrow> ((\<exists>r. (p,r) : steps L w \<and> q = True#r) \<or> (\<exists>u a v. w = u@a#v \<and> (\<exists>r. (p,r) : steps L u \<and> fin L r \<and> (\<exists>s. (start R,s) : step R a \<and> (\<exists>t. (s,t) : steps R v \<and> q = False#t)))))"
lemma l10_2_uniqueness_spec: assumes "P1 P ReflectL A B" and "P2 P ReflectL A B" shows "P1 = P2"
lemma WHILE_refine_rwof: assumes "nofail (m \<bind> WHILE c f) \<Longrightarrow> mi \<le> SPEC (\<lambda>s. rwof m c f s \<and> \<not>c s)" shows "mi \<le> m \<bind> WHILE c f"
lemma eval_binop_arg2_indep: "\<not> need_second_arg binop v1 \<Longrightarrow> eval_binop binop v1 x = eval_binop binop v1 y"
lemma shadow_root_put_get_4 [simp]: "h \<turnstile> put_M\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr setter v \<rightarrow>\<^sub>h h' \<Longrightarrow> preserved (get_M\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr getter) h h'"
lemma filter_map_elem : "t \<in> set (map g (filter f xs)) \<Longrightarrow> \<exists> x \<in> set xs . f x \<and> t = g x"
lemma set_conv_list [code]: "set.F g (set xs) = list.F (map g (remdups xs))"
lemma length_mirror1_aux: "length ps = length (mirror1_aux n ps)"
lemma sum_list_hd_tl: fixes xs :: "(_ :: group_add) list" shows "xs \<noteq> [] \<Longrightarrow> sum_list (tl xs) = (- hd xs) + sum_list xs"
lemma AbsAxiomCheck: "OrdinaryObjectsPossiblyConcrete \<longleftrightarrow> (\<forall> x. ([\<lparr>\<^bold>\<lambda> x . \<^bold>\<box>(\<^bold>\<not>\<lparr>E!, x\<^sup>P\<rparr>), x\<^sup>P\<rparr> in v] \<longleftrightarrow> (case x of \<alpha>\<nu> y \<Rightarrow> True | _ \<Rightarrow> False)))"
lemma R26_d [simp]: "pmf (sds R26) d = 1 - pmf (sds R26) a"
lemma list_sorted_max[simp]: shows "sorted list \<Longrightarrow> list = (x#xs) \<Longrightarrow> fold max xs x = (last list)"
lemma len_ge_1: "len ts \<ge> 1"
lemma subtensor_prod_with_vec: assumes "order A = 1" "i < hd (dims A)" shows "subtensor (A \<otimes> B) i = lookup A [i] \<cdot> B"
lemma a_de_morgan_var_3: "ad (d x + d y) = ad x \<cdot> ad y"
lemma vsv_vdoubleton: assumes "a \<noteq> c" shows "vsv (set {\<langle>a, b\<rangle>, \<langle>c, d\<rangle>})"
lemma while_denest_5: "w * ((x \<star> (y * w)) \<star> (x \<star> (y * z))) = w * (((x \<star> y) * w) \<star> ((x \<star> y) * z))"
lemma subseteq_guards_DynCom: "\<exists>C'. c=DynCom C' \<and> (\<forall>s. C' s \<subseteq>\<^sub>g C s)" if "c \<subseteq>\<^sub>g DynCom C"
lemma heap_read_typedI: "\<lbrakk> heap_read h ad al v; \<And>T. P,h \<turnstile> ad@al : T \<Longrightarrow> P,h \<turnstile> v :\<le> T \<rbrakk> \<Longrightarrow> heap_read_typed P h ad al v"
lemma LtK_Exp: "LtK X \<noteq> Exp X' Y'"
lemma bottom_eq_False[simp]: "\<bottom> = False"
lemma f_shrink_assoc: "xs \<div>\<^sub>f a \<div>\<^sub>f b = xs \<div>\<^sub>f (a * b)"
lemma "app (fs @ gs) x = app fs (app gs x)"
lemma inverse_ii [simp]: "inverse quat_ii = -quat_ii"
lemma tj_stack_incr_disc: assumes "k < length (tj_stack s)" and "j < k" shows "\<delta> s (tj_stack s ! j) > \<delta> s (tj_stack s ! k)"
lemma fds_eqI_truncate: assumes "\<And>m. m > 0 \<Longrightarrow> fds_truncate m f = fds_truncate m g" shows "f = g"
lemma eigenvalue_root_char_poly: assumes A: "(A :: 'a :: field mat) \<in> carrier_mat n n" shows "eigenvalue A k \<longleftrightarrow> poly (char_poly A) k = 0"
lemma interleave_tl: "xs \<in> ys \<otimes> zs \<Longrightarrow> tl xs \<in> tl ys \<otimes> zs \<or> tl xs \<in> ys \<otimes> (tl zs)"
lemma resolvent_upon_and_partial_saturation : assumes "redundant P1 S" assumes "redundant P2 S" assumes "partial_saturation S A (S \<union> R)" assumes "C = resolvent_upon P1 P2 A" shows "redundant C (S \<union> R)"
lemma ide_char\<^sub>S\<^sub>b\<^sub>C: shows "ide a \<longleftrightarrow> arr a \<and> C.ide a"
lemma continuous_at_left_imp_sup_continuous: fixes f :: "'a::{complete_linorder, linorder_topology} \<Rightarrow> 'b::{complete_linorder, linorder_topology}" assumes "mono f" "\<And>x. continuous (at_left x) f" shows "sup_continuous f"
lemma AE_lim_stream: "AE \<omega> in K.lim_stream x. \<forall>i. snd ((x ## \<omega>) !! i) \<in> DTMC.acc``{snd x} \<and> snd (\<omega> !! i) \<in> J (snd ((x ## \<omega>) !! i)) \<and> fst ((x ## \<omega>) !! i) < fst (\<omega> !! i)" (is "AE \<omega> in K.lim_stream x. \<forall>i. ?P \<omega> i")
lemma NSconvergent_NSBseq: "NSconvergent X \<Longrightarrow> NSBseq X"
lemma ProcProcParModifyReturn: assumes q: "P \<subseteq> {s. p s = q} \<inter> P'" \<comment> \<open>@{thm[source] DynProcProcPar} introduces the same constraint as first conjunction in @{term P'}, so the vcg can simplify it.\<close> assumes to_prove: "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> P' (dynCall init p return' c) Q,A" assumes ret_nrm_modif: "\<forall>s t. t \<in> (Modif (init s)) \<longrightarrow> return' s t = return s t" assumes ret_abr_modif: "\<forall>s t. t \<in> (ModifAbr (init s)) \<longrightarrow> return' s t = return s t" assumes modif_clause: "\<forall>\<sigma>. \<Gamma>,\<Theta>\<turnstile>\<^bsub>/UNIV\<^esub> {\<sigma>} (Call q) (Modif \<sigma>),(ModifAbr \<sigma>)" shows "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> P (dynCall init p return c) Q,A"
lemma bounded_linear_prod_right[bounded_linear]: "bounded_linear prod_right"
lemma mergeSL: assumes "adm_woL L" shows "adm_wo (mergeSL S L)"
lemma Iam_calc: "$(Ia)^{m}_n = (\<Sum>j<n. (j+1)/m * (\<Sum>k=j*m..<(j+1)*m. $v.^((k+1)/m)))" if "m \<noteq> 0" for n m :: nat
lemma nocp_cp_triv: "nocp Q \<Longrightarrow> cp Q = Q"
lemma ni_bot: "ni(bot) = bot"
lemma sum_Basis_prod_eq: fixes f::"('a*'b)\<Rightarrow>('a*'b)" shows "sum f Basis = sum (\<lambda>i. f (i, 0)) Basis + sum (\<lambda>i. f (0, i)) Basis"
lemma irreflexive_cong: "(\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> r a b \<longleftrightarrow> r' a b) \<Longrightarrow> irreflexive A r \<longleftrightarrow> irreflexive A r'"
lemma circline_set_x_axis: shows "circline_set x_axis = of_complex ` {x. is_real x} \<union> {\<infinity>\<^sub>h}"
lemma indefinite_integral_continuous_real: fixes f :: "real \<Rightarrow> 'a::euclidean_space" assumes "integrable (lebesgue_on {a..b}) f" shows "continuous_on {a..b} (\<lambda>x. integral\<^sup>L (lebesgue_on {a..x}) f)"
lemma redT_updIs_insert_Interrupt: "\<lbrakk> t \<in> redT_updIs is ias; t \<notin> is \<rbrakk> \<Longrightarrow> Interrupt t \<in> set ias"
lemma concurrent_ops_commute_singleton [intro!]: "concurrent_ops_commute [x]"
lemma ab_obey_1[PLM]: "[(\<lparr>A!,x\<^sup>P\<rparr> \<^bold>& \<lparr>A!,y\<^sup>P\<rparr>) \<^bold>\<rightarrow> ((\<^bold>\<forall> F . \<lbrace>x\<^sup>P, F\<rbrace> \<^bold>\<equiv> \<lbrace>y\<^sup>P, F\<rbrace>) \<^bold>\<rightarrow> x\<^sup>P \<^bold>= y\<^sup>P) in v]"
lemma image_preserves_per: assumes "A A' Reflect X Y" and "B B' Reflect X Y"and "C C' Reflect X Y" and "Per A B C" shows "Per A' B' C'"
lemma continuous_on_open_Collect_neq: fixes f g :: "'a::topological_space \<Rightarrow> 'b::t2_space" assumes f: "continuous_on S f" and g: "continuous_on S g" and "open S" shows "open {x\<in>S. f x \<noteq> g x}"
lemma index_mult_mat_vec[simp]: "i < dim_row A \<Longrightarrow> (A *\<^sub>v v) $ i = row A i \<bullet> v"
lemma strict_mono_ordinal_of_nat: "strict_mono ordinal_of_nat"
lemma funas_term_ctxt_apply [simp]: "funas_term (C\<langle>t\<rangle>) = funas_ctxt C \<union> funas_term t"
lemma (in monoid_cancel) properfactor_mult_l [simp]: assumes carr: "a \<in> carrier G" "b \<in> carrier G" "c \<in> carrier G" shows "properfactor G (c \<otimes> a) (c \<otimes> b) = properfactor G a b"
lemma infnorm_sub: "infnorm (x - y) = infnorm (y - x)"
lemma Inl_Inr_dataspace [simp]: "[Part UNIV Inl, Part UNIV Inr] \<in> dataspace"
theorem fusion_lfp_eq: assumes monoH: "mono H" and monoG: "mono G" and distF: "dist_over_sup F" and fgh_comp: "\<And>x. ((F \<circ> G) x = (H \<circ> F) x)" shows "F (lfp G) = (lfp H)"
lemma cf_cat_prod_12_of_3_components: shows "cf_cat_prod_12_of_3 \<AA> \<BB> \<CC>\<lparr>ObjMap\<rparr> = (\<lambda>A\<in>\<^sub>\<circ>(\<AA> \<times>\<^sub>C\<^sub>3 \<BB> \<times>\<^sub>C\<^sub>3 \<CC>)\<lparr>Obj\<rparr>. [A\<lparr>0\<rparr>, [A\<lparr>1\<^sub>\<nat>\<rparr>, A\<lparr>2\<^sub>\<nat>\<rparr>]\<^sub>\<circ>]\<^sub>\<circ>)" and "cf_cat_prod_12_of_3 \<AA> \<BB> \<CC>\<lparr>ArrMap\<rparr> = (\<lambda>F\<in>\<^sub>\<circ>(\<AA> \<times>\<^sub>C\<^sub>3 \<BB> \<times>\<^sub>C\<^sub>3 \<CC>)\<lparr>Arr\<rparr>. [F\<lparr>0\<rparr>, [F\<lparr>1\<^sub>\<nat>\<rparr>, F\<lparr>2\<^sub>\<nat>\<rparr>]\<^sub>\<circ>]\<^sub>\<circ>)" and [cat_cs_simps]: "cf_cat_prod_12_of_3 \<AA> \<BB> \<CC>\<lparr>HomDom\<rparr> = \<AA> \<times>\<^sub>C\<^sub>3 \<BB> \<times>\<^sub>C\<^sub>3 \<CC>" and [cat_cs_simps]: "cf_cat_prod_12_of_3 \<AA> \<BB> \<CC>\<lparr>HomCod\<rparr> = \<AA> \<times>\<^sub>C (\<BB> \<times>\<^sub>C \<CC>)"
lemma inj_on_image_lesspoll_1 [simp]: assumes "inj_on f A" shows "f ` A \<prec> B \<longleftrightarrow> A \<prec> B"
lemma bin_code_lcp_concat: assumes "us \<in> lists {u\<^sub>0,u\<^sub>1}" and "vs \<in> lists {u\<^sub>0,u\<^sub>1}" and "\<not> us \<bowtie> vs" shows "concat us \<cdot> \<alpha> \<and>\<^sub>p concat vs \<cdot> \<alpha> = concat (us \<and>\<^sub>p vs) \<cdot> \<alpha>"
lemma dverts_mset_sub_dverts: "set_mset (dverts_mset t) \<subseteq> dverts t"
lemma (in Square_impl) shows "\<Gamma>\<turnstile>\<lbrace>\<acute>I = 2\<rbrace> \<acute>R :== CALL Square(\<acute>I) \<lbrace>\<acute>R = 4\<rbrace>"
lemma finite_set [iff]: "finite (set xs)"
lemma domain_comp: "fst ` set (\<sigma> \<lozenge> \<theta>) = fst ` (set \<sigma> \<union> set \<theta>)"
lemma strict2[simp]: "f self X invalid = invalid"
lemma lower_set_imp_not_SN_on: assumes "s \<in> X" "\<forall>t \<in> X. \<exists>u \<in> X. (t,u) \<in> R" shows "\<not> SN_on R {s}"
lemma brnL_Int_lt: assumes n12: "n1 < n2" and n2: "n2 < length cl" shows "{brnL cl n1 ..<+ brn (cl!n1)} \<inter> {brnL cl n2 ..<+ brn (cl!n2)} = {}"
lemma subgroup_inter: assumes "subgroup A" and "subgroup B" shows "subgroup (A \<inter> B)"
lemma (in Ring) nonilp_residue_nilrad:"\<lbrakk>\<not> zeroring R; x \<in> carrier R; nilpotent (qring R (nilrad R)) (x \<uplus>\<^bsub>R\<^esub> (nilrad R))\<rbrakk> \<Longrightarrow> x \<uplus>\<^bsub>R\<^esub> (nilrad R) = \<zero>\<^bsub>(qring R (nilrad R))\<^esub>"
lemma ereal_bot: fixes x :: ereal assumes "\<And>B. x \<le> ereal B" shows "x = - \<infinity>"
lemma in_Inter_image_nth_conv: "a \<in> \<Inter> (f ` set xs) = (\<forall>i < length xs. a \<in> f (xs!i))"
lemma uIsInvar_phase_leq_closedPH: "uIsInvar phase_leq_closedPH"
lemma simplex_furthest_le_exists: fixes S :: "('a::real_inner) set" shows "finite S \<Longrightarrow> \<forall>x\<in>(convex hull S). \<exists>y\<in>S. norm (x - a) \<le> norm (y - a)"
lemma case_bool_If: "case_bool P Q b = (if b then P else Q)"
lemma TNil_Lazy_tllist [code]: "TNil b = Lazy_tllist (\<lambda>_. Inr b)"
lemma vrat_inverse_closed: assumes "x \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ>" shows "x\<inverse>\<^sub>\<rat> \<in>\<^sub>\<circ> \<rat>\<^sub>\<circ>"
lemma Thread_neq_sys_xcpts_aux: "Thread \<noteq> NullPointer" "Thread \<noteq> ClassCast" "Thread \<noteq> OutOfMemory" "Thread \<noteq> ArrayIndexOutOfBounds" "Thread \<noteq> ArrayStore" "Thread \<noteq> NegativeArraySize" "Thread \<noteq> ArithmeticException" "Thread \<noteq> IllegalMonitorState" "Thread \<noteq> IllegalThreadState" "Thread \<noteq> InterruptedException"
lemma arccos: "- 1 \<le> y \<Longrightarrow> y \<le> 1 \<Longrightarrow> 0 \<le> arccos y \<and> arccos y \<le> pi \<and> cos (arccos y) = y"
lemma projection_insert_finite: fixes S :: \<open>'a::chilbert_space set\<close> assumes a1: "\<And>s. s \<in> S \<Longrightarrow> is_orthogonal a s" and a2: "finite S" shows "projection (cspan (insert a S)) u = projection (cspan {a}) u + projection (cspan S) u"
lemma disjointI: assumes "\<And>A B. A \<in> Ss \<Longrightarrow> B \<in> Ss \<Longrightarrow> A \<noteq> B \<Longrightarrow> A \<inter> B = {}" shows "disjoint Ss"
lemma LV_From_5: shows "LV (From r n) s \<subseteq> Stars_Append (LV (Star r) s) (\<Union>i\<le>n. LV (From r i) [])"
lemma indep_and_equiv_implies_ief: assumes "wb_lens x" "x \<bowtie> y" "x \<approx>\<^sub>L y" shows "ief_lens x"
lemma (in Group) rfn_tool16:"\<lbrakk>0 < r; 0 < s; i \<le> (s * r - Suc 0); G \<guillemotright> f (i div s); (Gp G (f (i div s))) \<triangleright> f (Suc (i div s)); (Gp G (f (i div s))) \<guillemotright> (f (i div s) \<inter> g (s - Suc 0))\<rbrakk> \<Longrightarrow> (Gp G ((f (Suc (i div s)) \<diamondop>\<^bsub>G\<^esub> (f (i div s) \<inter> g (s - Suc 0))))) \<triangleright> (f (Suc (i div s)))"