Statement:
stringlengths
7
24.3k
lemma two_step_zero [simp]: "two_step 0 = 0"
lemma tMap_tLast_inv: assumes M: "tMap f t = tMap f' t'" shows "f (tLast t) = f' (tLast t')"
lemma jvm_InitDP: "\<lbrakk> ics_of f = Calling C Cs; sh C = \<lfloor>(sfs,i)\<rfloor>; i = Done \<or> i = Processing \<rbrakk> \<Longrightarrow> P \<turnstile> (None,h,f#frs,sh) -jvm\<rightarrow> (None,h,(calling_to_scalled f)#frs,sh)" (is "\<lbrakk> ?P; ?Q; ?R \<rbrakk> \<Longrightarrow> P \<turnstile> ?s1 -jvm\<rightarrow> ?s2")
lemma clearjunk_map: assumes "\<And>kv. fst (f kv) = fst kv" shows "clearjunk (map f ps) = map f (clearjunk ps)"
lemma assumes \<D>: "\<D> division_of S" shows lmeasurable_division: "S \<in> lmeasurable" (is ?l) and content_division: "(\<Sum>k\<in>\<D>. measure lebesgue k) = measure lebesgue S" (is ?m)
lemma fiter_induct_nil: "x \<sqsubseteq> nil \<sqinter> c;x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star>"
lemma NEQ_DEP_IMP_IN_DOM: fixes PROB :: "(('a, 'b) fmap \<times> ('a, 'b) fmap) set" and v v' assumes "\<not>(v = v')" "(dep PROB v v')" shows "(v \<in> (prob_dom PROB) \<and> v' \<in> (prob_dom PROB))"
lemma entries_rbtreeify_g [simp]: "n \<le> Suc (length kvs) \<Longrightarrow> entries (fst (rbtreeify_g n kvs)) = take (n - 1) kvs"
lemma satisfies_bounded_nFEx: "\<AA> \<Turnstile>\<^sub>b nFEx b \<phi> \<longleftrightarrow> \<AA> \<Turnstile>\<^sub>b FEx b \<phi>"
lemma anga_out_anga: assumes "QCongAAcute a" and "a A B C" and "B Out A A'" and "B Out C C'" shows "a A' B C'"
lemma convex_halfspace_Re_gt: "convex {x. Re x > b}"
lemma (in Order) segment_inc_less:"\<lbrakk>W \<subseteq> carrier D; a \<in> carrier D; y \<in> W; x \<in> segment (Iod D W) a; y \<prec> x\<rbrakk> \<Longrightarrow> y \<in> segment (Iod D W) a"
lemma createSInt_id_g0: fixes b::nat and v::int assumes "v \<ge> 0" and "v < 2^(b-1)" and "b > 0" shows "createSInt b v = ShowL\<^sub>i\<^sub>n\<^sub>t v"
lemma cont2cont_abs_ccache[cont2cont,simp]: assumes "cont f" shows "cont (\<lambda>x. abs_ccache(f x))"
lemma (in order) mono_onI [intro?]: fixes f :: "'a \<Rightarrow> 'b::order" shows "(\<And>x y. x \<in> X \<Longrightarrow> y \<in> X \<Longrightarrow> x \<le> y \<Longrightarrow> f x \<le> f y) \<Longrightarrow> mono_on f X"
theorem (in graph) stack_not_nil [simp]: "(mrk, S) \<in> Loop \<Longrightarrow> x \<in> S \<Longrightarrow> x \<noteq> nil"
lemma effect_lengthI [effect_intros]: assumes "h' = h" "r = length h a" shows "effect (len a) h h' r"
lemma sum_list_filter_dense_list_of_pdevs[symmetric]: "sum_list (map snd (filter (p o snd) (list_of_pdevs x))) = sum_list (filter p (dense_list_of_pdevs x))"
lemma lens_comp_right_id [simp]: "X ;\<^sub>L 1\<^sub>L = X"
lemma not_coprime_imp_fermat_witness: fixes n :: nat assumes "n > 1" "\<not>coprime a n" shows "fermat_witness a n"
lemma msb_uint16_code [code]: "msb x \<longleftrightarrow> uint8_test_bit x 7"
lemma OUTfromChCorrect_data15: "OUTfromChCorrect data15"
lemma trivial_cartesian: assumes "trivial X" "trivial Y" shows "trivial (X \<times> Y)"
lemma span_image_scale_eq_image_scale: "span ((*s) q ` F) = (*s) q ` span F" (is "?A = ?B")
theorem completeness_countable: assumes inf_uni: "infinite (UNIV :: ('u :: countable) set)" assumes finite_cs: "finite Cs" "\<forall>C\<in>Cs. finite C" assumes unsat: "\<forall>(F::'u fun_denot) (G::'u pred_denot). \<not>eval\<^sub>c\<^sub>s F G Cs" shows "\<exists>Cs'. resolution_deriv Cs Cs' \<and> {} \<in> Cs'"
lemma taut_refine_impl: "\<lbrakk> Q \<sqsubseteq> P; `P` \<rbrakk> \<Longrightarrow> `Q`"
lemma bet_cop2__cop: assumes "Coplanar A B C U" and "Coplanar A B C W" and "Bet U V W" shows "Coplanar A B C V"
lemma collinear: fixes S :: "'a::{perfect_space,real_vector} set" shows "collinear S \<longleftrightarrow> (\<exists>u. u \<noteq> 0 \<and> (\<forall>x \<in> S. \<forall> y \<in> S. \<exists>c. x - y = c *\<^sub>R u))"
lemma smaller_interp_applies_cons: assumes "smaller_interp (applies_eq A \<Delta>) (applies_eq A \<Delta>')" and "a, s, \<Delta> \<Turnstile> A" shows "a, s, \<Delta>' \<Turnstile> A"
lemma Or_propos: "propos (Or xs) = \<Union>{propos x| x. x \<in> set xs}"
lemma comp_Rel_vsv[dg_Rel_shared_cs_intros, dg_Rel_cs_intros]: "vsv (S \<circ>\<^sub>R\<^sub>e\<^sub>l T)"
lemma g_inter_impl: "set_inter s1.\<alpha> s1.invar s2.\<alpha> s2.invar s3.\<alpha> s3.invar g_inter"
lemma possible_states_set_ii_b: fixes s x v assumes "(v \<notin> fmdom' s)" shows "(fmdom' ((\<lambda>s. fmupd v x s) s) = fmdom' s \<union> {v})"
lemma measure_eqI_finite: assumes [simp]: "sets M = Pow A" "sets N = Pow A" and "finite A" assumes eq: "\<And>a. a \<in> A \<Longrightarrow> emeasure M {a} = emeasure N {a}" shows "M = N"
lemma num_params_tm_abs_le: "num_params (tm_poly (tm_abs prec I a t)) \<le> X" if "num_params (tm_poly t) \<le> X"
lemma shows all_countings_set: "all_countings a b = card {V\<in>Pow {0..<a+b}. card V = a}" (is "_ = card ?A") and valid_countings_set: "valid_countings a b = card {V\<in>Pow {0..<a+b}. card V = a \<and> (\<forall>m\<in>{1..a+b}. card ({0..<m} \<inter> V) > m - card ({0..<m} \<inter> V))}" (is "_ = card ?V")
lemma if_SE_execE': assumes A: "\<sigma> \<Turnstile> ((if\<^sub>S\<^sub>E P then B\<^sub>1 else B\<^sub>2 fi);-M)" and B: "P \<sigma> \<Longrightarrow> \<sigma> \<Turnstile> (B\<^sub>1;-M) \<Longrightarrow> Q" and C: "\<not> P \<sigma>\<Longrightarrow> \<sigma> \<Turnstile> (B\<^sub>2;-M) \<Longrightarrow> Q" shows "Q"
lemma compute_monom_mult_poly_mapping [code]: "monom_mult c t (Pm_fmap xs) = Pm_fmap (if c = 0 then fmempty else shift_map_keys t ((*) c) xs)"
lemma reachable_state_fragmentsLS: assumes "reachable_state sys sh" shows "fragmentsLS (GST sh p) \<subseteq> fragments (PGMs sys p) {}"
lemma mat_kernel_mult_eq: assumes A: "A \<in> carrier_mat nr nc" and B: "B \<in> carrier_mat nr nr" and C: "C \<in> carrier_mat nr nr" and inv: "C * B = 1\<^sub>m nr" shows "mat_kernel (B * A) = mat_kernel A"
lemma HMA_Hermite_reduce_above[transfer_rule]: assumes "n<CARD('m)" shows "((Mod_Type_Connect.HMA_M :: _ \<Rightarrow> int ^ 'n :: mod_type ^ 'm :: mod_type \<Rightarrow> _) ===> (Mod_Type_Connect.HMA_I) ===> (Mod_Type_Connect.HMA_I) ===> (Mod_Type_Connect.HMA_M)) (\<lambda>A i j. Hermite_reduce_above A n i j) (\<lambda>A i j. Hermite.Hermite_reduce_above A n i j res_int)"
lemma compare_expansions_same_exp: assumes "e1 - e2 = 0" "compare_expansions C1 C2 = res" shows "compare_expansions (MS (MSLCons (C1, e1) xs) f) (MS (MSLCons (C2, e2) ys) g) = res"
lemma lex_ext_SN_2: assumes compat: "\<And> x y z. \<lbrakk>snd (g x y); fst (g y z)\<rbrakk> \<Longrightarrow> fst (g x z)" and SN: "SN {(s, t). fst (g s t)}" shows "SN { (ys, xs). fst (lex_ext g m ys xs) }"
lemma pos_pred: assumes "x \<noteq> first_el" shows "pos (pred x) = pos x - 1"
lemma num_succtran_zero: "\<lbrakk>succ_tran G v = {}\<rbrakk> \<Longrightarrow> num_reachable G v = 0"
lemma \<open>M, g, w \<Turnstile> \<^bold>\<top>\<close>
theorem(in Order_Rule) Seg_density : assumes "\<not> Eq (Geos (Poi A) add Emp) (Geos (Poi C) add Emp)" shows "\<exists>p. Bet_Point (Se A C) p"
lemma frestriction_vinsert_in: assumes "a \<in>\<^sub>\<circ> A" and "b \<in>\<^sub>\<circ> A" shows "(vinsert [a, b]\<^sub>\<circ> r) \<restriction>\<^sub>\<bullet> A = vinsert [a, b]\<^sub>\<circ> (r \<restriction>\<^sub>\<bullet> A)"
lemma invar_empty_step: assumes "bfs_invar' src dst (False, V, {}, N, d)" shows "bfs_invar' src dst (False, V, N, {}, Suc d)"
lemma perp_in_perp_bis: assumes "X PerpAt A B C D" shows "X B Perp C D \<or> A X Perp C D"
lemma inf_implies [simp]: "(x \<sqinter> y) \<leadsto> x = top"
lemma "bind_fv (x,\<tau>) (mk_eq' \<tau>' s t) = mk_eq' \<tau>' (bind_fv (x,\<tau>) s) (bind_fv (x,\<tau>) t)"
lemma I2c: assumes nxt: "HNext s s'" and inv: "HInv1 s \<and> HInv2 s \<and> HInv3 s" shows "HInv3 s'"
lemma (in linorder) rbt_lookup_RBT_Impl_diag: "ord.rbt_lookup (less_prod (\<le>) (<) (<)) (RBT_Impl_diag t) = (\<lambda>(k, k'). if k = k' then ord.rbt_lookup (<) t k else None)"
lemma Vv_is_Vv1_union_Vv2: "V\<^bsub>\<V>\<^esub> = V\<^bsub>\<V>1\<^esub> \<union> V\<^bsub>\<V>2\<^esub>"
lemma det_echelon_form: fixes A::"'a::{bezout_domain}^'n::{mod_type}^'n::{mod_type}" assumes ef: "echelon_form A" shows "det A = prod (\<lambda>i. A $ i $ i) (UNIV:: 'n set)"
lemma finite_states[simp, intro!]: "finite (ta_rstates TA)"
lemma content_pos_lt: "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i \<Longrightarrow> 0 < content (cbox a b)"
lemma succ_ne_self [simp]: "i \<noteq> succ i"
lemma enat_times_less: "enat c * enat lst < y * enat c \<Longrightarrow> lst < y"
lemma get_host_wf_is_l_get_host_wf [instances]: "l_get_host_wf heap_is_wellformed known_ptr known_ptrs type_wf get_host"
lemma check_ipresIGCons: "ipresIGCons check check (errMOD MOD) MOD"
lemma [def_pat_rules]: "FOREACHc \<equiv> PR_CONST (FOREACHoci (\<lambda>_ _. True) (\<lambda>_ _. True))" "FOREACHci$I \<equiv> PR_CONST (FOREACHoci (\<lambda>_ _. True) I)" "FOREACHi$I \<equiv> \<lambda>\<^sub>2s. PR_CONST (FOREACHoci (\<lambda>_ _. True) I)$s$(\<lambda>\<^sub>2x. True)" "FOREACH \<equiv> FOREACHi$(\<lambda>\<^sub>2_ _. True)"
lemma ta_bisim0_extNTA2J_extNTA2J0: "\<lbrakk> wwf_J_prog P; P,t \<turnstile> \<langle>a'\<bullet>M'(vs), h\<rangle> -ta\<rightarrow>ext \<langle>va, h'\<rangle> \<rbrakk> \<Longrightarrow> ta_bisim0 (extTA2J P ta) (extTA2J0 P ta)"
lemma Diagonalize_Comp_Cod_Arr: assumes "Arr t" shows "\<^bold>\<lfloor>Cod t \<^bold>\<cdot> t\<^bold>\<rfloor> = \<^bold>\<lfloor>t\<^bold>\<rfloor>"
lemma ROI_init: assumes "CNV_ANNOT a a' R" assumes "(c,a')\<in>R" shows "(c,a)\<in>R"
lemma sint_up_scast: \<open>sint (SCAST w) = sint w\<close> if \<open>is_up SCAST\<close>
lemma valid5[simp]: "\<upsilon> \<upsilon> X = true"
lemma prefixI': assumes "length vs = Suc n" and "\<And>x. x < Suc n \<Longrightarrow> f x \<down>= vs ! x" shows "prefix f n = vs"
lemma lsorted_LCons': "lsorted (LCons x xs) \<longleftrightarrow> (\<not> lnull xs \<longrightarrow> x \<le> lhd xs \<and> lsorted xs)"
lemma top_mult_annil [simp]: "\<top> \<cdot> x = \<top>"
lemma hom_map1[autoref_hom]: "CONSTRAINT Map.empty (\<langle>Rk,Rv\<rangle>Rm)" "CONSTRAINT map_of (\<langle>\<langle>Rk,Rv\<rangle>prod_rel\<rangle>list_rel \<rightarrow> \<langle>Rk,Rv\<rangle>Rm)" "CONSTRAINT (++) (\<langle>Rk,Rv\<rangle>Rm \<rightarrow> \<langle>Rk,Rv\<rangle>Rm \<rightarrow> \<langle>Rk,Rv\<rangle>Rm)"
lemma exec_appendL_if [intro]: fixes i i' j :: int shows "\<lbrakk>size P' \<le> i; P \<turnstile> (i - size P', s, stk) \<rightarrow>* (j, s', stk'); i' = size P' + j\<rbrakk> \<Longrightarrow> P' @ P \<turnstile> (i, s, stk) \<rightarrow>* (i', s', stk')"
lemma row_elems_ss01:"i < dim_row M \<Longrightarrow> vec_set (row M i) \<subseteq> {0, 1}"
lemma complete_join_all: "\<forall>t \<in> trees ts. complete t \<and> height t = n \<Longrightarrow> complete (join_all ts)"
lemma simulation_steps: "\<exists> bs. B.steps (b # bs) \<and> list_all2 (\<lambda> a b. a \<sim> b \<and> PA a \<and> PB b) as bs" if "A.steps (a # as)" "a \<sim> b" "PA a" "PB b"
lemma [simp,code_unfold]: "\<delta> \<zero>.\<zero> = true"
lemma stepfun_imp_chainp: assumes "\<forall>i\<ge>n::nat. f i > i \<and> P (S i) (S (f i))" shows "chainp P (\<lambda>i. S ((f ^^ i) n))" (is "chainp P ?T")
lemma collect_suc_eq_lt[simp]: "{f i |i::nat. i < Suc n} = {f i |i. i = 0} \<union> {f (Suc i) |i. i < n}"
lemma of_rat_of_nat_eq [simp]: "of_rat (of_nat n) = of_nat n"
lemma bernoulli_in_Rats: "bernoulli n \<in> \<rat>"
lemma norm_unsigned_result: "norm_unsigned xs = [] \<or> bv_msb (norm_unsigned xs) = \<one>"
lemma intersect_segment_xline: assumes "intersect_segment_xline prec (p0, p1) x = Some (m, M)" shows "closed_segment p0 p1 \<inter> {p. fst p = x} \<subseteq> {(x, m) .. (x, M)}"
theorem process_coind[elim, consumes 1, case_names iss Action Choice, induct pred: "HOL.eq"]: assumes phi: "\<phi> p p'" and iss: "\<And>p p'. \<phi> p p' \<Longrightarrow> (isAction p \<longleftrightarrow> isAction p') \<and> (isChoice p \<longleftrightarrow> isChoice p')" and Act: "\<And> a a' p p'. \<phi> (Action a p) (Action a' p') \<Longrightarrow> a = a' \<and> \<phi> p p'" and Ch: "\<And> p q p' q'. \<phi> (Choice p q) (Choice p' q') \<Longrightarrow> \<phi> p p' \<and> \<phi> q q'" shows "p = p'"
lemma no_cross_apath: "\<lbrakk>matching_rels t; no_cross_products t; x \<in> relations t; y \<in> relations t\<rbrakk> \<Longrightarrow> \<exists>p. apath x p y \<and> set (awalk_verts x p) \<subseteq> relations t"
lemma the_set_union [simp]: "the_set (A \<union> B) = the_set A \<union> the_set B"
lemma sums_offset: fixes f g :: "nat \<Rightarrow> 'a :: {t2_space, topological_comm_monoid_add}" assumes "(\<lambda>n. f (n + i)) sums l" shows "f sums (l + (\<Sum>j<i. f j))"
lemma class_name_mem_map[rule_format]: "(ctx, cld, class_name_f cld) \<in> set ctx_cld_dcl_list \<Longrightarrow> (ctx, class_name_f cld) \<in> ((\<lambda>(ctx, cld). (ctx, class_name_f cld)) \<circ> (\<lambda>(ctx, cld, dcl). (ctx, cld))) ` set ctx_cld_dcl_list"
lemma RSpan_contains_spanset_append_left : "set ms \<subseteq> M \<Longrightarrow> set ns \<subseteq> M \<Longrightarrow> set ms \<subseteq> RSpan (ms@ns)"
lemma in_store_sops_conv: "(sop \<in> store_sops xs) = ((\<exists>volatile a A L R W. Write volatile a sop A L R W \<in> set xs) \<or> (\<exists>a t cond ret A L R W. RMW a t sop cond ret A L R W \<in> set xs))"
lemma (in encoding) enc_reflects_binary_pred_iff_indRelR_reflects_binary_pred: fixes Pred :: "('procS, 'procT) Proc \<Rightarrow> 'b \<Rightarrow> bool" shows "enc_reflects_binary_pred Pred = rel_reflects_binary_pred indRelR Pred"
lemma fixpoints_on_finite : assumes "finite A" shows "finite (fixpoints_on A \<phi>)"
lemma (in conservative) induced_function_birkhoff_sum: fixes f::"'a \<Rightarrow> real" assumes "A \<in> sets M" shows "birkhoff_sum f (qmpt.birkhoff_sum (induced_map A) (return_time_function A) n x) x = qmpt.birkhoff_sum (induced_map A) (induced_function A f) n x"
lemma if_pred_holds: "if_pred (holds P) = P"
lemma word_no_log_defs [simp]: "NOT (numeral a) = word_of_int (NOT (numeral a))" "NOT (- numeral a) = word_of_int (NOT (- numeral a))" "numeral a AND numeral b = word_of_int (numeral a AND numeral b)" "numeral a AND - numeral b = word_of_int (numeral a AND - numeral b)" "- numeral a AND numeral b = word_of_int (- numeral a AND numeral b)" "- numeral a AND - numeral b = word_of_int (- numeral a AND - numeral b)" "numeral a OR numeral b = word_of_int (numeral a OR numeral b)" "numeral a OR - numeral b = word_of_int (numeral a OR - numeral b)" "- numeral a OR numeral b = word_of_int (- numeral a OR numeral b)" "- numeral a OR - numeral b = word_of_int (- numeral a OR - numeral b)" "numeral a XOR numeral b = word_of_int (numeral a XOR numeral b)" "numeral a XOR - numeral b = word_of_int (numeral a XOR - numeral b)" "- numeral a XOR numeral b = word_of_int (- numeral a XOR numeral b)" "- numeral a XOR - numeral b = word_of_int (- numeral a XOR - numeral b)"
lemma (in semiring_0) poly_add: "poly (p1 +++ p2) x = poly p1 x + poly p2 x"
lemma gauss_jordan_row_echelon: assumes A: "A \<in> carrier_mat nr nc" and res: "gauss_jordan A B = (A', B')" shows "row_echelon_form A'"
lemma poly_shift_eq_0: assumes "f \<in> carrier P" shows "f n = (ctrm f \<oplus>\<^bsub>P\<^esub> X \<otimes>\<^bsub>P\<^esub> poly_shift f) n"
lemma N_vector_top [simp]: "N(x * top) * top = x * top"
lemma self_codomain_iff_ide: shows "a \<in> codomains a \<longleftrightarrow> ide a"