Statement:
stringlengths
7
24.3k
lemma bi_unique_rel_set_bij_betw: assumes unique: "bi_unique R" and rel: "rel_set R A B" shows "\<exists>f. bij_betw f A B \<and> (\<forall>x\<in>A. R x (f x))"
lemma BinOpThrow1': "P,E \<turnstile> \<langle>e\<^sub>1,s\<^sub>0\<rangle> \<Rightarrow>' \<langle>throw e,s\<^sub>1\<rangle> \<Longrightarrow> P,E \<turnstile> \<langle>e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2, s\<^sub>0\<rangle> \<Rightarrow>' \<langle>throw e,s\<^sub>1\<rangle>"
lemma Subst_not_Nil: assumes "v \<noteq> \<^bold>\<sharp>" and "t \<noteq> \<^bold>\<sharp>" shows "t \<noteq> \<^bold>\<sharp> \<Longrightarrow> Subst n v t \<noteq> \<^bold>\<sharp>"
lemma listrelp_imp_listsp1: assumes H: "listrelp (\<lambda>x y. P x) xs ys" shows "listsp P xs"
lemma phis'_aux_finite: assumes "finite (Mapping.keys phis)" shows "finite (Mapping.keys (phis'_aux g v ns phis))"
lemma free_ag_single:"\<lbrakk>commute_bpp f (aug_pm_set z i {a}); assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f; ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a}); zeroA z i f {a} z; free_gen_condition f i a z; n \<noteq> m\<rbrakk> \<Longrightarrow> (n\<Odot>a\<^bsub>f,i,z\<^esub>) \<noteq> (m\<Odot>a\<^bsub>f,i,z\<^esub>)"
lemma infinite_finite_Inter: assumes "finite \<A>" "\<A>\<noteq>{}" "\<And>A. A \<in> \<A> \<Longrightarrow> infinite A" and "\<And>A B. \<lbrakk>A \<in> \<A>; B \<in> \<A>\<rbrakk> \<Longrightarrow> A \<inter> B \<in> \<A>" shows "infinite (\<Inter>\<A>)"
lemma wf_darcs_to_dtree_aux1: "r \<notin> verts T \<Longrightarrow> wf_darcs (to_dtree_aux r)"
lemma equivalence_data_in_hom\<^sub>B [intro]: assumes "B.obj a" shows "\<guillemotleft>e a : a \<rightarrow>\<^sub>B P\<^sub>0 a\<guillemotright>" and "\<guillemotleft>d a : P\<^sub>0 a \<rightarrow>\<^sub>B a\<guillemotright>" and "\<guillemotleft>e a : e a \<Rightarrow>\<^sub>B e a\<guillemotright>" and "\<guillemotleft>d a : d a \<Rightarrow>\<^sub>B d a\<guillemotright>" and "\<guillemotleft>\<eta> a : a \<rightarrow>\<^sub>B a\<guillemotright>" and "\<guillemotleft>\<epsilon> a : P\<^sub>0 a \<rightarrow>\<^sub>B P\<^sub>0 a\<guillemotright>" and "\<guillemotleft>\<eta> a : a \<Rightarrow>\<^sub>B d a \<star>\<^sub>B e a\<guillemotright>" and "\<guillemotleft>\<epsilon> a : e a \<star>\<^sub>B d a \<Rightarrow>\<^sub>B P\<^sub>0 a\<guillemotright>"
lemma (in Group) normal_closure: assumes "A\<subseteq>G" shows "normal (normal_closure A)"
lemma strong_confluentp_ACI: "strong_confluentp (~)"
lemma hull_Un_subset: "(S hull s) \<union> (S hull t) \<subseteq> (S hull (s \<union> t))"
lemma word_plus_mono_right: "y \<le> z \<Longrightarrow> x \<le> x + z \<Longrightarrow> x + y \<le> x + z" for x y z :: "'a::len word"
lemma Hash_imp_parts2 [rule_format]: "evs \<in> set_cr ==> Hash\<lbrace>X, Nonce M, Y, Nonce N\<rbrace> \<in> parts (knows Spy evs) \<longrightarrow> Nonce M \<in> parts (knows Spy evs) \<and> Nonce N \<in> parts (knows Spy evs)"
lemma delete1_correct: "(delete1,RETURN o delete) \<in> gap_rel \<rightarrow> \<langle>gap_rel\<rangle>nres_rel"
lemma word_plus_mcs_4': fixes x :: "'a :: len word" shows "\<lbrakk>x + v \<le> x + w; x \<le> x + v\<rbrakk> \<Longrightarrow> v \<le> w"
lemma Can_and_Nml_implies_Ide: assumes "Can t" and "Nml t" shows "Ide t"
lemma length_dropWhile [termination_simp]: "length (dropWhile P xs) \<le> length xs"
lemma lspasl_p_der: "(h1,h2\<triangleright>h0) \<Longrightarrow> (h1,h2\<triangleright>h3) \<Longrightarrow> (h1,h2\<triangleright>h0) \<and> h0 = h3"
lemma oneH:"\<one> \<in> H"
lemma int_shiftr_numeral [simp]: "drop_bit (numeral w') (1 :: int) = 0" "drop_bit (numeral w') (numeral num.One :: int) = 0" "drop_bit (numeral w') (numeral (num.Bit0 w) :: int) = drop_bit (pred_numeral w') (numeral w)" "drop_bit (numeral w') (numeral (num.Bit1 w) :: int) = drop_bit (pred_numeral w') (numeral w)" "drop_bit (numeral w') (- numeral (num.Bit0 w) :: int) = drop_bit (pred_numeral w') (- numeral w)" "drop_bit (numeral w') (- numeral (num.Bit1 w) :: int) = drop_bit (pred_numeral w') (- numeral (Num.inc w))"
lemma program_result_measure': "qbs_prob_measure (qbs_prob_space (exp_qbs \<real>\<^sub>Q \<real>\<^sub>Q, (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g, density (distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f) (\<lambda>r. (obs \<circ> (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) r / C))) = distr (density (\<nu> \<Otimes>\<^sub>M \<nu>) (\<lambda>(s,b). obs (\<lambda>r. s * r + b) / C)) (qbs_to_measure (exp_qbs \<real>\<^sub>Q \<real>\<^sub>Q)) (\<lambda>(s, b) r. s * r + b)"
lemma tape_of_ex1[intro]: "\<exists>rna ml. Oc \<up> a @ Bk \<up> rn = <ml::nat list> @ Bk \<up> rna \<or> Oc \<up> a @ Bk \<up> rn = Bk # <ml> @ Bk \<up> rna"
lemma outputTauTrans[dest]: fixes a :: name and b :: name and P :: pi and P' :: pi assumes "a{b}.P \<longmapsto>\<tau> \<prec> P'" shows False
lemma dirichlet_prod'_inversion2: assumes "\<forall>x\<ge>1. f x = dirichlet_prod' ainv g x" "x \<ge> 1" "dirichlet_prod a ainv = (\<lambda>n. if n = 1 then 1 else 0)" shows "g x = dirichlet_prod' a f x"
lemma cl_ident: "r\<in>L ==> cl L r = r"
lemma to_int_vec_index[simp]: "i < dim_vec v \<Longrightarrow> (to_int_vec v $i) = to_int_mod_ring (v $i)"
lemma punit_sminus [simp]: "punit.sminus = (-)"
lemma wf_max0: "x \<in> carrier R \<Longrightarrow> Max \<zero> x \<in> carrier R"
lemma [code_abbrev]: "(real_of_float (of_int a) :: real) = (Ratreal (Rat.of_int a) :: real)"
lemma (in Module) l_comb_transpos:" \<lbrakk>ideal R A; H \<subseteq> carrier M; s \<in> {l. l \<le> Suc n} \<rightarrow> A; f \<in> {l. l \<le> Suc n} \<rightarrow> H; j < Suc n \<rbrakk> \<Longrightarrow> \<Sigma>\<^sub>e M (cmp (\<lambda>k. s k \<cdot>\<^sub>s f k) (transpos j (Suc n))) (Suc n) = \<Sigma>\<^sub>e M (\<lambda>k. (cmp s (transpos j (Suc n))) k \<cdot>\<^sub>s (cmp f (transpos j (Suc n))) k) (Suc n)"
lemma zero_applied_to [simp]: "(0::('a \<Rightarrow> ('b::real_vector))) x = 0"
lemma ldistinct_coinduct [consumes 1, case_names ldistinct, case_conclusion ldistinct lhd ltl, coinduct pred: ldistinct]: assumes "X xs" and step: "\<And>xs. \<lbrakk> X xs; \<not> lnull xs \<rbrakk> \<Longrightarrow> lhd xs \<notin> lset (ltl xs) \<and> (X (ltl xs) \<or> ldistinct (ltl xs))" shows "ldistinct xs"
lemma alwaysE: "\<lbrakk>(\<box>P) \<sigma>; P (\<sigma> |\<^sub>s i) \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
lemma finite'_code [code]: "finite' (set xs) \<longleftrightarrow> True" "finite' (List.coset xs) \<longleftrightarrow> of_phantom (finite_UNIV :: 'a finite_UNIV)"
lemma ack_le_mono2: "j \<le> k \<Longrightarrow> ack i j \<le> ack i k"
lemma dtree_coinduct[elim, consumes 1, case_names Lift, induct pred: "HOL.eq"]: assumes phi: "\<phi> tr1 tr2" and Lift: "\<And> tr1 tr2. \<phi> tr1 tr2 \<Longrightarrow> root tr1 = root tr2 \<and> rel_set (rel_sum (=) \<phi>) (cont tr1) (cont tr2)" shows "tr1 = tr2"
lemma of_rat_sum: "of_rat (\<Sum>a\<in>A. f a) = (\<Sum>a\<in>A. of_rat (f a))"
lemma in_rangeC_singleton: "f x \<in> rangeC {f}"
lemma numsubst0_I: shows "Inum (b#bs) (numsubst0 a t) = Inum ((Inum (b#bs) a)#bs) t"
lemma is_in_insort: "y \<in> set xs \<Longrightarrow> y \<in> set (insort x xs l)"
lemma (in \<Z>) ntcf_Set_obj_coprod_is_tm_cat_obj_coprod: \<comment>\<open>See Theorem 5.2 in Chapter Introduction in \cite{hungerford_algebra_2003}.\<close> assumes "VLambda I F \<in>\<^sub>\<circ> Vset \<alpha>" shows "ntcf_Set_obj_coprod \<alpha> I F : F >\<^sub>C\<^sub>F\<^sub>.\<^sub>t\<^sub>m\<^sub>.\<^sub>\<Coprod> (\<Coprod>\<^sub>\<circ>i\<in>\<^sub>\<circ>I. F i) : I \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> cat_Set \<alpha>"
lemma action_order_is_new_actionD: "\<lbrakk> E \<turnstile> a \<le>a a'; is_new_action (action_obs E a') \<rbrakk> \<Longrightarrow> is_new_action (action_obs E a)"
lemma has_field_derivative_subset: "(f has_field_derivative y) (at x within s) \<Longrightarrow> t \<subseteq> s \<Longrightarrow> (f has_field_derivative y) (at x within t)"
lemma tau_om2 [simp]: "\<tau> x\<^sup>\<omega> = \<tau> x"
lemma evalF_subF_eq: "!phi theta. evalF M phi (subF theta A) = evalF M (phi o theta) A"
lemma \<alpha>edges_finite[simp, intro!]: "invar g \<Longrightarrow> finite (\<alpha>edges_aux g)"
lemma lemma_2_7_23: "(a r\<rightarrow> b) * (c r\<rightarrow> d) \<le> (a \<sqinter> c) r\<rightarrow> (b \<sqinter> d)"
lemma summable_in_conv_radius: fixes f :: "nat \<Rightarrow> 'a :: {banach, real_normed_div_algebra}" assumes "ereal (norm z) < conv_radius f" shows "summable (\<lambda>n. f n * z ^ n)"
lemma of_bool_Bex_eq_nn_integral: assumes unique: "\<And>x y. x \<in> X \<Longrightarrow> y \<in> X \<Longrightarrow> P x \<Longrightarrow> P y \<Longrightarrow> x = y" shows "of_bool (\<exists>y\<in>X. P y) = (\<integral>\<^sup>+y. of_bool (P y) \<partial>count_space X)"
lemma induced_automorphism_fixespointwise_C0_int_D0: "fixespointwise \<s> (C0\<inter>D0)"
lemma coneI: "p = a * h \<Longrightarrow> a \<in> P[U] \<Longrightarrow> p \<in> cone (h, U)"
lemma take_bit_or [simp]: \<open>take_bit n (a OR b) = take_bit n a OR take_bit n b\<close>
lemma tm_skip_first_arg_correct_Nil: "\<lbrace>\<lambda>tap. tap = ([], [])\<rbrace> tm_skip_first_arg \<lbrace>\<lambda>tap. tap = ([], [Bk]) \<rbrace>"
lemma W_continuous_on: "continuous_on (Sigma X existence_ivl0) (\<lambda>(x0, t). Dflow x0 t)" \<comment> \<open>TODO: somewhere here is hidden continuity wrt rhs of ODE, extract it!\<close>
lemma Inr_in_sum_iff [iff]: "Inr b \<in> elts (A \<Uplus> B) \<longleftrightarrow> b \<in> elts B"
lemma simulation_silent2_aux: "\<lbrakk> s1 \<approx> s2; s2 -\<tau>2\<rightarrow> s2' \<rbrakk> \<Longrightarrow> s1 \<approx> s2' \<and> \<mu>2\<^sup>+\<^sup>+ s2' s2 \<or> (\<exists>s1'. s1 -\<tau>1\<rightarrow>+ s1' \<and> s1' \<approx> s2')"
lemma gen_boolean_algebra_idempotent: assumes "S = \<Union> Xs" shows "gen_boolean_algebra S (gen_boolean_algebra S Xs) = (gen_boolean_algebra S Xs)"
lemma silent_moves_nonempty_nodestack_False: assumes "S,kind \<turnstile> ([m],[cf]) =as\<Rightarrow>\<^sub>\<tau> (m'#ms',s')" and "valid_node m" and "ms' \<noteq> []" and "CFG_node m' \<in> sum_SDG_slice1 nx" and "nx \<in> S" shows False
lemma "do x \<leftarrow> return 1; return (2::nat); return x od = return 1 >>= (\<lambda>x. return (2::nat) >>= K_bind (return x))"
lemma scaleC_right_mono_neg: "b \<le> a \<Longrightarrow> c \<le> 0 \<Longrightarrow> a *\<^sub>C c \<le> b *\<^sub>C c" for c :: "'a::ordered_complex_vector"
lemma minGraphProps9': "minGraphProps g \<Longrightarrow> f \<in> \<F> g \<Longrightarrow> v \<in> \<V> f \<Longrightarrow> v < countVertices g"
lemma (in wf_sub_rel) extends_imp_wf_sub_rel : assumes "extends g subs sub subs'" shows "wf_sub_rel subs'"
lemma permutes_funpow: assumes "p permutes S" shows "(p ^^ n) permutes S"
lemma sup_acc_app_cong: "j \<le> length rho \<Longrightarrow> sup_acc step accept (rho @ [x]) q i j = sup_acc step accept rho q i j"
lemma has_integral_implies_lebesgue_measurable_cbox: fixes f :: "'a :: euclidean_space \<Rightarrow> real" assumes f: "(f has_integral I) (cbox x y)" shows "f \<in> lebesgue_on (cbox x y) \<rightarrow>\<^sub>M borel"
lemma dtail_f_alt_commute: assumes "P = (\<lambda>xs. wf_darcs (Node r xs))" and "Q = (\<lambda>(t1,e1) b. e \<in> darcs t1)" and "R = (\<lambda>(t1,e1) b. dtail t1 def)" shows "comp_fun_commute (\<lambda>a b. if a \<notin> fset xs \<or> \<not> Q a b \<or> \<not> P xs then b else R a b)"
lemma dbm_not_lt_eq: "\<not> a \<prec> b \<Longrightarrow> \<not> b \<prec> a \<Longrightarrow> a = b"
theorem HStartBallot_HInv1: assumes inv1: "HInv1 s" and act: "HStartBallot s s' p" shows "HInv1 s'"
lemma MExit_correct: assumes wf: "wf_prog wt P" assumes meth: "P \<turnstile> C sees M:Ts\<rightarrow>T=\<lfloor>(mxs,mxl\<^sub>0,ins,xt)\<rfloor> in C" assumes ins: "ins!pc = MExit" assumes wt: "P,T,mxs,size ins,xt \<turnstile> ins!pc,pc :: \<Phi> C M" assumes conf: "\<Phi> \<turnstile> t: (None, h, (stk,loc,C,M,pc)#frs)\<surd>" assumes no_x: "(tas, \<sigma>) \<in> exec_instr (ins!pc) P t h stk loc C M pc frs" shows "\<Phi> \<turnstile> t: \<sigma> \<surd>"
lemma points_index_one_not_unique_block: assumes "B index ps = 1" assumes "ps \<subseteq> bl" assumes "bl \<in># B" assumes "bl' \<in># B - {#bl#}" shows "\<not> ps \<subseteq> bl'"
lemma collect_locksI: "Lock \<in> set (las $ l) \<Longrightarrow> l \<in> collect_locks las"
lemma distinct_fst_half_segments: "distinct (map fst (half_segments_of_aform X))"
lemma mkCone_cone: assumes "cone a \<chi>" shows "mkCone (\<chi> J.FF) (\<chi> J.TT) = \<chi>"
lemma (in BlueDFS_invar) red_DFS_precond_aux: assumes BI: "blue_basic_invar s" assumes [simp]: "lasso s = None" assumes SNE: "stack s \<noteq> []" shows "fb_graph (G \<lparr> g_V0 := {hd (stack s)} \<rparr>)" and "fb_graph (G \<lparr> g_E := E \<inter> UNIV \<times> - red s, g_V0 := {hd (stack s)} \<rparr>)" and "restr_invar E (red s) (\<lambda>x. x \<in> set (stack s))"
lemma lookup_hnr_aux: "(uncurry lookup,uncurry (RETURN oo op_map_lookup)) \<in> id_assn\<^sup>k *\<^sub>a is_map\<^sup>k \<rightarrow>\<^sub>a id_assn"
lemma is_mult_sum4sq_nat: "is_sum4sq_nat x \<Longrightarrow> is_sum4sq_nat y \<Longrightarrow> is_sum4sq_nat (x*y)"
lemma Form_quot_fm [iff]: fixes A :: fm shows "Form \<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e"
lemma attach_shadow_root_element_ptr_in_heap: assumes "h \<turnstile> ok (attach_shadow_root element_ptr shadow_root_mode)" shows "element_ptr |\<in>| element_ptr_kinds h"
lemma starts: fixes i j assumes "\<I> i" and "\<I> j" shows "((i,j) \<in> s \<union> s^-1 \<union> e) = (BEGIN i = BEGIN j)"
lemma (in normalization_semidom) factorial_semiring_altI_aux: assumes finite_divisors: "\<And>x. x \<noteq> 0 \<Longrightarrow> finite {y. y dvd x \<and> normalize y = y}" assumes irreducible_imp_prime_elem: "\<And>x. irreducible x \<Longrightarrow> prime_elem x" assumes "x \<noteq> 0" shows "\<exists>A. (\<forall>x. x \<in># A \<longrightarrow> prime_elem x) \<and> normalize (prod_mset A) = normalize x"
lemma sgn2_eq_1_sub_arg: "sgn2 = (\<lambda> x. 1 - x)"
lemma (in Gromov_hyperbolic_space_geodesic) proj_along_geodesic_contraction: assumes "geodesic_segment G" "px \<in> proj_set x G" "py \<in> proj_set y G" shows "dist px py \<le> max (5 * deltaG(TYPE('a))) (dist x y - dist px x - dist py y + 10 * deltaG(TYPE('a)))"
lemma greaterThanLessThan_eq: "{a<\<^sub>a..<\<^sub>ab} = {a<\<^sub>a..} \<inter> {..<\<^sub>ab}"
lemma matrix_change_of_basis_mat_1: fixes X::"'a::{field}^'n^'n" assumes basis_X: "is_basis (set_of_vector X)" shows "matrix_change_of_basis X X = mat 1"
lemma tendsto_neg_powr_complex_of_nat: assumes "filterlim f at_top F" and "Re s < 0" shows "((\<lambda>x. of_nat (f x) powr s) \<longlongrightarrow> 0) F"
lemma continuous_closed_quotient_map: "\<lbrakk>continuous_map X X' f; closed_map X X' f\<rbrakk> \<Longrightarrow> quotient_map X X' f \<longleftrightarrow> f ` (topspace X) = topspace X'"
lemma wf_inst_formula: assumes "wf_fmla (ty_term Q constT) \<phi>" shows "wf_fmla objT ((map_formula o map_atom o subst_term) f \<phi>)"
lemma take_length_ib[simp]: assumes "0 < j" "j \<le> length s" shows "take (length (intrinsic_border (take j s))) s = intrinsic_border (take j s)"
lemma assumes "invariant_1 plr" defines "x \<equiv> the_unique_root plr" and "p \<equiv> poly_real_alg_1 plr" and "l \<equiv> rai_lb plr" and "r \<equiv> rai_ub plr" shows invariant_1D: "root_cond plr x" "sgn l = sgn r" "sgn x = of_rat (sgn r)" "unique_root plr" "poly_cond p" "degree p > 0" "primitive p" and invariant_1_root_cond: "\<And> y. root_cond plr y \<longleftrightarrow> y = x"
lemma gmn_correct: assumes "is_measured_node nd" shows "gmn nd = sum_list (map snd (nodeToList nd))"
lemma density_context_equiv: assumes "\<And>\<sigma>. \<sigma> \<in> space (state_measure (V \<union> V') \<Gamma>) \<Longrightarrow> \<delta> \<sigma> = \<delta>' \<sigma>" assumes [simp, measurable]: "\<delta>' \<in> borel_measurable (state_measure (V \<union> V') \<Gamma>)" assumes "density_context V V' \<Gamma> \<delta>" shows "density_context V V' \<Gamma> \<delta>'"
lemma update_assignment_alt: "update_assignment u as = update_assignment_alt u as"
lemma assoc_ell2'_assoc_ell2[simp]: \<open>assoc_ell2' o\<^sub>C\<^sub>L assoc_ell2 = id_cblinfun\<close>
lemma if_SE_split_asm : " (\<sigma> \<Turnstile> if\<^sub>S\<^sub>E P B\<^sub>1 B\<^sub>2) = ((P \<sigma> \<and> (\<sigma> \<Turnstile> B\<^sub>1)) \<or> (\<not> P \<sigma> \<and> (\<sigma> \<Turnstile> B\<^sub>2)))"
lemma funpower_fixespointwise: assumes "fixespointwise f A" shows "fixespointwise (f^^n) A"
lemma wcode_double_case: shows "\<exists>stp ln rn. steps0 (Suc 0, Bk # Bk\<up>(m) @ Oc # Oc # ires, Bk # Oc\<up>(Suc rs) @ Bk\<up>(n)) wcode_main_tm stp = (Suc 0, Bk # Bk\<up>(ln) @ Oc # ires, Bk # Oc\<up>(Suc (2 * rs + 2)) @ Bk\<up>(rn))" (is "\<exists>stp ln rn. ?tm stp ln rn")
lemma ideduct_subst: "M \<turnstile> t \<Longrightarrow> M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<delta> \<turnstile> t \<cdot> \<delta>"
lemma lspasl_c_eq: "((h1,h2\<triangleright>h0) \<and> (h1,h3\<triangleright>h0)) = ((h1,h2\<triangleright>h0) \<and> h2 = h3)"
lemma tarski_aux: assumes "R - 1\<^sub>\<pi> \<noteq> {}" and "(a,A) \<in> NC" shows "(a,A) \<in> NC \<cdot> ((R - 1\<^sub>\<pi>) \<cdot> NC)"