Statement:
stringlengths
7
24.3k
lemma bound_of_nat_times: "bound (of_nat n * v) \<le> n * bound v"
lemma pow_in_lists_dest2: "u \<cdot> v = w\<^sup>@n \<Longrightarrow> w \<in> lists A \<Longrightarrow> v \<in> lists A"
lemma att_elem_seq[rule_format]: "\<turnstile> x1 \<longrightarrow> (\<forall> x \<in> fst(attack x1). (\<exists> y. y \<in> snd(attack x1) \<and> x \<rightarrow>\<^sub>i* y))"
lemma addition_over_vec_to_lin_poly: fixes x y assumes "a < dim_vec x" assumes "dim_vec x = dim_vec y" shows "(x + y) $ a = coeff (vec_to_lpoly x + vec_to_lpoly y) a"
lemma compact_continuous_image_eq: fixes f :: "'a::heine_borel \<Rightarrow> 'b::heine_borel" assumes f: "inj_on f S" shows "continuous_on S f \<longleftrightarrow> (\<forall>T. compact T \<and> T \<subseteq> S \<longrightarrow> compact(f ` T))" (is "?lhs = ?rhs")
lemma conc_fun_fail_iff[simp]: "\<Down>R S = FAIL \<longleftrightarrow> S=FAIL" "FAIL = \<Down>R S \<longleftrightarrow> S=FAIL"
lemma bij_set_rel_for_inj: fixes R defines "\<alpha> \<equiv> fun_of_rel R" assumes "bijective R" "(s,s')\<in>\<langle>R\<rangle>set_rel" shows "inj_on \<alpha> s" "s' = \<alpha>`s" \<comment> \<open>To be used when generating refinement conditions for foreach-loops\<close>
lemma Bind: assumes adapt: "P \<subseteq> {s. s \<in> P' s}" assumes c: "\<forall>s. \<Gamma>,\<Theta>\<turnstile>\<^bsub>/F\<^esub> (P' s) (c (e s)) Q,A" shows "\<Gamma>,\<Theta>\<turnstile>\<^bsub>/F\<^esub> P (bind e c) Q,A"
lemma nonEmptyListFiltered: assumes "P -` {True} \<inter> set l \<noteq> {}" shows "[n. n \<leftarrow> [0..<size l], P (l!n)] \<noteq> []"
lemma kop_galois: "(op\<^sub>K f = g) = (op\<^sub>K g = f)"
lemma of_nat_unat_le_mask_ucast: "\<lbrakk>of_nat (unat t) = w; t \<le> mask LENGTH('a)\<rbrakk> \<Longrightarrow> t = UCAST('a::len \<rightarrow> 'b::len) w"
lemma join_wf_tuple: "x \<in> join X b Y \<Longrightarrow> \<forall>v \<in> X. wf_tuple n A v \<Longrightarrow> \<forall>v \<in> Y. wf_tuple n B v \<Longrightarrow> (\<not> b \<Longrightarrow> B \<subseteq> A) \<Longrightarrow> A \<union> B = C \<Longrightarrow> wf_tuple n C x"
lemma lconcat_lmap_singleton [simp]: "lconcat (lmap (\<lambda>x. LCons (f x) LNil) xs) = lmap f xs"
lemma maintain_invar2: assumes A: "prim_invar2 Q \<pi>" assumes UNS: "Q u = enat d" assumes MIN: "\<forall>v. enat d \<le> Q v" shows "prim_invar2 (Q' Q \<pi> u) (\<pi>' Q \<pi> u)" (is ?G1) and "T_measure2 (Q' Q \<pi> u) (\<pi>' Q \<pi> u) < T_measure2 Q \<pi>" (is ?G2)
lemma hom_chain_map: "\<lbrakk>continuous_map X Y f; f ` S \<subseteq> T\<rbrakk> \<Longrightarrow> (chain_map p f) \<in> hom (relcycle_group p X S) (relcycle_group p Y T)"
lemma jmm'_heap_read_typeable: "jmm'_heap_read_typeable P"
lemma min_single: "min [x] = Some a \<Longrightarrow> priority (the x) = a" "min [x] = None \<Longrightarrow> x = None"
lemma radical_sqrt_rule_power2: "x \<in> radical_sqrt \<Longrightarrow> x \<ge> 0 \<Longrightarrow> x^2 \<in> radical_sqrt"
lemma subtype_let: fixes s'::s and cs::branch_s and css::branch_list and v::v shows "\<Theta> ; \<Phi> ; \<B> ; GNil ; \<Delta> \<turnstile> AS_let x e\<^sub>1 s \<Leftarrow> \<tau> \<Longrightarrow> \<Theta> ; \<Phi> ; \<B> ; GNil ; \<Delta> \<turnstile> e\<^sub>1 \<Rightarrow> \<tau>\<^sub>1 \<Longrightarrow> \<Theta> ; \<Phi> ; \<B> ; GNil ; \<Delta> \<turnstile> e\<^sub>2 \<Rightarrow> \<tau>\<^sub>2 \<Longrightarrow> \<Theta> ; \<B> ; GNil \<turnstile> \<tau>\<^sub>2 \<lesssim> \<tau>\<^sub>1 \<Longrightarrow> \<Theta> ; \<Phi> ; \<B> ; GNil ; \<Delta> \<turnstile> AS_let x e\<^sub>2 s \<Leftarrow> \<tau>" and "check_branch_s \<Theta> \<Phi> {||} GNil \<Delta> tid dc const v cs \<tau> \<Longrightarrow> True" and "check_branch_list \<Theta> \<Phi> {||} \<Gamma> \<Delta> tid dclist v css \<tau> \<Longrightarrow> True"
lemma lex_less_simps [simp]: \<open>[] [\<^bold><] y # ys\<close> \<open>\<not> xs [\<^bold><] []\<close> \<open>x # xs [\<^bold><] y # ys \<longleftrightarrow> x \<^bold>< y \<or> x \<^bold>\<le> y \<and> y \<^bold>\<le> x \<and> xs [\<^bold><] ys\<close>
lemma pow_int_divide: "a / pow_int x b = a * pow_int x (-b)"
lemma not_SignatureE [elim!]: "b \<noteq> Signature \<Longrightarrow> b = Encryption"
lemma complement_bibd_index: assumes "ps \<subseteq> \<V>" assumes "card ps = 2" shows "\<B>\<^sup>C index ps = \<b> + \<Lambda> - 2*\<r>"
lemma All_to_Unassigned: "\<forall> s r. allowed_flow (nP s) s DontCare r"
lemma upt_conv_Nil [simp]: "j \<le> i \<Longrightarrow> [i..<j] = []"
lemma remdups_fwd_distinct: "distinct (remdups_fwd xs)"
lemma inner_axis: "inner x (axis i y) = inner (x $ i) y"
lemma "\<exists>x y::'a \<Rightarrow> bool. x = y"
lemma same_x_stable: assumes run: "HORun UV_M rho HOs" and comm: "\<forall>r. HOcommPerRd UV_M (HOs r)" and x: "\<forall>p. x (rho r p) = v" shows "x (rho (Suc r) q) = v"
lemma acomp_size: "(1::int) \<le> size (acomp a)"
lemma Gen_Shleg_0_left: "Gen_Shleg 0 x = x ^ n * (1 - x) ^ n"
lemma Append: "\<turnstile> Append \<lbrace>\<acute>Proper\<rbrace>"
lemma Q_diff_qf_SQ: "Q - {qf} = SQ"
lemma insertAssertionSimps[simp]: fixes A\<^sub>F :: "name list" and \<Psi>\<^sub>F :: 'b and \<Psi> :: 'b assumes "A\<^sub>F \<sharp>* \<Psi>" shows "insertAssertion (\<langle>A\<^sub>F, \<Psi>\<^sub>F\<rangle>) \<Psi> = \<langle>A\<^sub>F, \<Psi> \<otimes> \<Psi>\<^sub>F\<rangle>"
lemma Lambert_W_neg_ln_over_self: assumes "x \<in> {exp (-1)..exp 1}" shows "Lambert_W (-ln x / x) = -ln x"
lemma stopping_time_min: "stopping_time F T \<Longrightarrow> stopping_time F S \<Longrightarrow> stopping_time F (\<lambda>x. min (T x) (S x))"
lemma S_list_automorphism: "ss\<in>lists S \<Longrightarrow> ChamberComplexAutomorphism X (permutation (sum_list ss))"
lemma fresh_eqvt_at: assumes asm: "eqvt_at f x" and fin: "finite (supp x)" and fresh: "a \<sharp> x" shows "a \<sharp> f x"
lemma continuous_at_enn2ereal: "continuous (at x within A) enn2ereal"
lemma C_eq_rd[rule_format]: "p \<noteq> [] \<Longrightarrow> C (list2FWpolicy (remdups p)) = C (list2FWpolicy p)"
lemma Gets_imp_knows_Spy: "[| Gets B X \<in> set evs; evs \<in> set_pur |] ==> X \<in> knows Spy evs"
lemma mssnth_arctan_series_stream_aux: "mssnth (arctan_series_stream_aux b n) m = (-1) ^ (if b then Suc m else m) / (2*m + n)"
lemma omega_vplus_commutative: assumes "a \<in>\<^sub>\<circ> \<omega>" and "b \<in>\<^sub>\<circ> \<omega>" shows "a + b = b + a"
lemma nth_Cons_0 [simp, code]: "(x # xs)!0 = x"
lemma discr0_transC_indis: assumes *: "discr0 c" and **: "mustT c s" "(c,s) \<rightarrow>c (c',s')" shows "s \<approx> s'"
lemma drop_ext': \<open>(\<forall>i. i\<ge>k \<and> i<length xs \<longrightarrow> xs'!i=xs!i) \<Longrightarrow> 0<k \<Longrightarrow> xs\<noteq>[] \<Longrightarrow> \<comment> \<open>These corner cases will be dealt with in the next lemma\<close> length xs'=length xs \<Longrightarrow> drop k xs' = drop k xs\<close>
lemma smcf_dghm_smcf_id[slicing_commute]: "dghm_id (smc_dg \<CC>) = smcf_dghm (smcf_id \<CC>)"
lemma (in Order) fTo_Order_sub:"\<lbrakk>A \<in> carrier (fTo D); B \<in> carrier (fTo D)\<rbrakk> \<Longrightarrow> (A \<preceq>\<^bsub>(fTo D)\<^esub> B) = (A \<subseteq> B)"
lemma invalid_pure_recover: "invalid_assn (pure R) x y = pure R x y * true"
lemma dist_divide[simp]: "dist (y / r) (z / r) = dist y z / \<bar>r\<bar>"
lemma cont2val_val2cont_id: "cont2val oo val2cont = ID"
lemma msg_zhops_simps [simp]: "\<And>hops dip dsn dsk oip osn sip. msg_zhops (Rreq hops dip dsn dsk oip osn sip) = (hops = 0 \<longrightarrow> oip = sip)" "\<And>hops dip dsn oip sip. msg_zhops (Rrep hops dip dsn oip sip) = (hops = 0 \<longrightarrow> dip = sip)" "\<And>dests sip. msg_zhops (Rerr dests sip) = True" "\<And>d dip. msg_zhops (Newpkt d dip) = True" "\<And>d dip sip. msg_zhops (Pkt d dip sip) = True"
lemma mon_s_empty[simp]: "mon_s fg [] = {}"
lemma errorT_induct [case_names ErrorT]: fixes P :: "'a\<cdot>('f::functor,'e) errorT \<Rightarrow> bool" assumes "\<And>k. P (ErrorT\<cdot>k)" shows "P y"
lemma defAss'_ign[simp]: "CFG_base.defAss' (ign gen_\<alpha>n g) gen_wf_invar (ign gen_inEdges' g) (ign gen_Entry g) (ign gen_defs g) ga = CFG_base.defAss' gen_\<alpha>n gen_wf_invar gen_inEdges' gen_Entry gen_defs g"
lemma A6_NSources_L1: "\<forall> C \<in> (AbstrLevel level1). (C \<noteq> sA93 \<and> C \<noteq> sA92 \<and> C \<noteq> sA91 \<and> C \<noteq> sA82 \<and> C \<noteq> sA81 \<and> C \<noteq> sA72 \<and> C \<noteq> sA71 \<longrightarrow> sA6 \<notin> (Sources level1 C))"
lemma compare_expansions_EQ: assumes "compare_expansions F G = (EQ, c, c')" "trimmed F" "trimmed G" "(f expands_to F) basis" "(g expands_to G) basis" "basis_wf basis" shows "(\<lambda>x. c' * f x) \<sim>[at_top] (\<lambda>x. c * g x)"
lemma l12_21_b: assumes "A C TS B D" and "B A C CongA D C A" shows "A B Par C D"
lemma expands_to_max_lt: assumes "(g expands_to G) basis" "eventually (\<lambda>x. f x < g x) at_top" shows "((\<lambda>x. max (f x) (g x)) expands_to G) basis"
lemma subst_type_term_irrelevant_order: assumes instT_assms: "distinct (map fst instT)" "distinct (map fst instT')" "set instT = set instT'" assumes insts_assms: "distinct (map fst insts)" "distinct (map fst insts')" "set insts = set insts'" shows "subst_type_term instT insts t = subst_type_term instT' insts' t"
lemma ACIDZ_le_ACIDZEQ: "r ~ s \<Longrightarrow> r \<approx> s"
lemma get_ancestors_si_parent_child_a_host_shadow_root_rel: assumes "heap_is_wellformed h" and "known_ptrs h" and "type_wf h" assumes "h \<turnstile> get_ancestors_si child \<rightarrow>\<^sub>r ancestors" shows "(ptr, child) \<in> (parent_child_rel h \<union> a_host_shadow_root_rel h)\<^sup>* \<longleftrightarrow> ptr \<in> set ancestors"
lemma [enres_breakdown]: "ERETURN x = enres_lift (RETURN x)" "EASSERT \<Phi> = enres_lift (ASSERT \<Phi>)" "doE { x \<leftarrow> enres_lift m; ef x } = do { x \<leftarrow> m; ef x }"
lemma (in linorder_topology) eventually_at_right: "x < y \<Longrightarrow> eventually P (at_right x) \<longleftrightarrow> (\<exists>b>x. \<forall>y>x. y < b \<longrightarrow> P y)"
lemma fs_mem_refine[autoref_rules]: "(\<lambda>x f. f x,(\<in>)) \<in> R \<rightarrow> \<langle>R\<rangle>fun_set_rel \<rightarrow> bool_rel"
lemma (in UP_ring) deg_diff_by_const': assumes "g \<in> carrier (UP R)" assumes "a \<in> carrier R" assumes "h = g \<ominus>\<^bsub>UP R\<^esub> up_ring.monom (UP R) a 0" shows "deg R g = deg R h"
lemma inline_aux_Inr: "inline_aux (Inr (rpv, oracl)) = bind_gpv oracl (\<lambda>(x, s). inline (rpv x) s)"
lemma differentiable_at_fst: "(\<lambda>x. fst (f x)) differentiable at x within X" if "f differentiable at x within X"
lemma matrix_left_right_inverse: fixes A A' :: "'a::{field}^'n^'n" shows "A ** A' = mat 1 \<longleftrightarrow> A' ** A = mat 1"
lemma eulerian_poly: "fps_of_poly (eulerian_poly k :: 'a :: field poly) = Abs_fps (\<lambda>n. of_nat (n+1) ^ k) * (1 - fps_X) ^ (k + 1)"
lemma pmf_mix_induct [consumes 2, case_names degenerate mix]: assumes "finite A" "set_pmf p \<subseteq> A" assumes degenerate: "\<And>x. x \<in> A \<Longrightarrow> P (return_pmf x)" assumes mix: "\<And>p a y. set_pmf p \<subseteq> A \<Longrightarrow> a \<in> {0<..<1} \<Longrightarrow> y \<in> A \<Longrightarrow> P p \<Longrightarrow> P (mix_pmf a p (return_pmf y))" shows "P p"
lemma not_enat_eq [iff]: "(\<forall>y. x \<noteq> enat y) = (x = \<infinity>)"
lemma fs[simp]: "finite ((supp subst)::name set)"
lemma iWeakUntil_disj_iWeakUntil_conv: " (P t1 \<or> Q t1. t1 \<W> t2 I. Q t2) = (P t1. t1 \<W> t2 I. Q t2)"
lemma start_point_no_predecessor: "x;start_points(x) = 0"
lemma integrable_\<Omega>: fixes f :: "((nat \<times> nat) \<Rightarrow> (nat list)) \<Rightarrow> real" shows "integrable \<Omega>\<^sub>p f"
lemma pr0_tuple: assumes "span f g" shows "comp (pr0 (cod f) (cod g)) (tuple f g) = g"
lemma polytope_imp_compact: fixes S :: "'a::real_normed_vector set" shows "polytope S \<Longrightarrow> compact S"
lemma oconf_blank [intro, simp]: "\<lbrakk>is_class P C; wf_prog wt P\<rbrakk> \<Longrightarrow> P,h \<turnstile> blank P C \<surd>"
lemma get_owner_document_is_component_unsafe: assumes "heap_is_wellformed h" and "type_wf h" and "known_ptrs h" assumes "h \<turnstile> get_owner_document ptr \<rightarrow>\<^sub>r owner_document" assumes "\<not>is_document_ptr_kind |h \<turnstile> get_root_node ptr|\<^sub>r" shows "set |h \<turnstile> get_dom_component ptr|\<^sub>r \<inter> set |h \<turnstile> get_dom_component (cast owner_document)|\<^sub>r = {}"
lemma return_time_gt: assumes ret: "returns_to P x" "closed P" assumes flow_not: "\<And>s. 0 < s \<Longrightarrow> s \<le> t \<Longrightarrow> flow0 x s \<notin> P" shows "t < return_time P x"
lemma chambercomplex_image: "ChamberComplex (f\<turnstile>X)"
lemma subst_cls_lists_comp_substs[simp]: "Cs \<cdot>\<cdot>cl (\<tau>s \<odot>s \<sigma>s) = Cs \<cdot>\<cdot>cl \<tau>s \<cdot>\<cdot>cl \<sigma>s"
lemma row_mat[simp]: "i < nr \<Longrightarrow> row (mat nr nc f) i = vec nc (\<lambda> j. f (i,j))"
lemma ini_morphism: assumes "j \<in> I" shows "(\<lambda>x. (j,x)) \<in> X j \<rightarrow>\<^sub>Q (\<amalg>\<^sub>Q i\<in>I. X i)"
lemma weight_correct: "distinct (inorder t) \<Longrightarrow> cost' t = cost t"
lemma replacefacesAt_nth: "k \<in> set ns \<Longrightarrow> k < |F| \<Longrightarrow> oldf \<notin> set newfs \<Longrightarrow> distinct (F!k) \<Longrightarrow> distinct newfs \<Longrightarrow> oldf \<in> set (F!k) \<longrightarrow> set newfs \<inter> set (F!k) \<subseteq> {oldf} \<Longrightarrow> (replacefacesAt ns oldf newfs F) ! k = (replace oldf newfs (F!k))"
lemma conjugate_conjugate [simp]: "conjugate ` conjugate ` A = A"
lemma U0_not_in_FIN: "U\<^sub>0 \<notin> FIN"
lemma s_t_stop: "s_stop = p_max"
lemma deg_eqI: "[| \<And>m. n < m \<Longrightarrow> coeff P p m = \<zero>; \<And>n. n \<noteq> 0 \<Longrightarrow> coeff P p n \<noteq> \<zero>; p \<in> carrier P |] ==> deg R p = n"
lemma ani_export_n: "ani(n(x) * y) = ani(x) \<squnion> ani(y)"
lemma multi_plus_two: assumes "length l \<ge> 2" shows "multi_plus l \<omega> \<longleftrightarrow> (\<exists>a b la lb. l = (la @ lb) \<and> length la > 0 \<and> length lb > 0 \<and> multi_plus la a \<and> multi_plus lb b \<and> Some \<omega> = a \<oplus> b)" (is "?A \<longleftrightarrow> ?B")
lemma (in semiring_of_sets) generated_ringI[intro?]: assumes "finite C" "disjoint C" "C \<subseteq> M" "a = \<Union>C" shows "a \<in> generated_ring"
lemma active_subset_insert[simp]: "active_subset (insert Cl N) = (if snd Cl = active then {Cl} else {}) \<union> active_subset N"
lemma iUntil_True[simp]: "(P t'. t' \<U> t I. True) = (I \<noteq> {})"
lemma 1: assumes "redundant_set g P" shows "\<exists>scc \<subseteq> P. redundant_scc g P scc"
lemma Ree_sum [simp]: "Ree (sum f S) = sum (\<lambda>x. Ree(f x)) S" and Im1_sum [simp]: "Im1 (sum f S) = sum (\<lambda>x. Im1 (f x)) S" and Im2_sum [simp]: "Im2 (sum f S) = sum (\<lambda>x. Im2 (f x)) S" and Im3_sum [simp]: "Im3 (sum f S) = sum (\<lambda>x. Im3 (f x)) S" and Im4_sum [simp]: "Im4 (sum f S) = sum (\<lambda>x. Im4 (f x)) S" and Im5_sum [simp]: "Im5 (sum f S) = sum (\<lambda>x. Im5 (f x)) S" and Im6_sum [simp]: "Im6 (sum f S) = sum (\<lambda>x. Im6 (f x)) S" and Im7_sum [simp]: "Im7 (sum f S) = sum (\<lambda>x. Im7 (f x)) S"
lemma emp_wand_equal: "(emp -* H) = H"
lemma supt_const: "\<not> (Fun f [] \<rhd> u)"