Statement:
stringlengths
7
24.3k
lemma mult_assoc: "mult (mult i j) k = mult i (mult j k)"
lemma GDERIV_minus: "GDERIV f x :> df \<Longrightarrow> GDERIV (\<lambda>x. - f x) x :> - df"
lemma carrier_vecD[simp]: "v \<in> carrier_vec n \<Longrightarrow> dim_vec v = n"
lemma multiply_by_add_tc: "VARS m s a b [a=A \<and> b=B] m := 0; s := 0; WHILE m\<noteq>a INV {s=m*b \<and> a=A \<and> b=B \<and> m\<le>a} VAR {a-m} DO s := s+b; m := m+(1::nat) OD [s = A*B]"
lemma remdups_on_subset_input: "set (remdups_on f xs) \<subseteq> set xs"
lemma affine_independent_Diff: "\<not> affine_dependent s \<Longrightarrow> \<not> affine_dependent(s - t)"
lemma interpret_floatarith_uminus[simp]: "interpret_floatarith (- f) xs = - interpret_floatarith f xs"
lemma lock_okI: "\<lbrakk> \<And>t l. ts t = None \<Longrightarrow> has_locks (ls $ l) t = 0; \<And>t e x ln l. ts t = \<lfloor>((e, x), ln)\<rfloor> \<Longrightarrow> has_locks (ls $ l) t + ln $ l= expr_locks e l \<rbrakk> \<Longrightarrow> lock_ok ls ts"
lemma compute_round_down[code]: "round_down prec (real_of_float f) = real_of_float (float_down prec f)"
lemma editVar_variable_inv: assumes "variable_inv v" shows "variable_inv (editVar v idx val)"
lemma close_Var_open_Var[simp]: "fresh xT t \<Longrightarrow> close_Var i xT (open_Var i xT t) = t"
lemma to_list_ga_rule: assumes IT: "imp_set_iterate is_set is_it it_init it_has_next it_next" assumes EM: "imp_list_empty is_list l_empty" assumes PREP: "imp_list_prepend is_list l_prepend" assumes FIN: "finite s" shows " <is_set s si> to_list_ga it_init it_has_next it_next l_empty l_prepend si <\<lambda>r. \<exists>\<^sub>Al. is_set s si * is_list l r * true * \<up>(set l = s)>"
lemma nth_prime_eqI': assumes "prime p" "card {q. prime q \<and> q \<le> p} = Suc n" shows "nth_prime n = p"
lemma (in ring) const_term_eq_last: assumes "set p \<subseteq> carrier R" and "a \<in> carrier R" shows "const_term (p @ [ a ]) = a"
lemma sym_mpoly_nz [simp]: assumes "finite A" "k \<le> card A" shows "sym_mpoly A k \<noteq> (0 :: 'a :: zero_neq_one mpoly)"
lemma qFresh_qPsubst_commute_qAbs: assumes good_X: "qGood X" and good_rho: "qGoodEnv rho" and x_fresh_rho: "qFreshEnv xs x rho" shows "((qAbs xs x X) $[[rho]]) $= qAbs xs x (X #[[rho]])"
lemma nlistsE_set[simp]: "xs \<in> nlists n A \<Longrightarrow> set xs \<subseteq> A"
lemma (in encoding_wrt_barbs) enc_and_TRel_impl_indRelRTPO_weakly_respects_barbs: fixes TRel :: "('procT \<times> 'procT) set" assumes encRS: "enc_weakly_respects_barbs" and trelPS: "rel_weakly_preserves_barbs TRel TWB" and trelRS: "rel_weakly_reflects_barbs TRel TWB" shows "rel_weakly_respects_barbs (indRelRTPO TRel) (STCalWB SWB TWB)"
lemma closed_sum_assoc: fixes A B C::"'a::real_normed_vector set" shows \<open>A +\<^sub>M (B +\<^sub>M C) = (A +\<^sub>M B) +\<^sub>M C\<close>
lemma numeral_mult_ennreal: "0 \<le> x \<Longrightarrow> numeral b * ennreal x = ennreal (numeral b * x)"
lemma min_elt_mem: assumes "B \<subseteq> A" and "B \<noteq> {}" shows "min_elt B \<in> B"
lemma rel_gpv_Pause [iff]: "rel_gpv A C (Pause out c) (Pause out' c') \<longleftrightarrow> C out out' \<and> (\<forall>x. rel_gpv A C (c x) (c' x))"
lemma r_result1_Some': assumes "eval r_result1 [t, i, x] \<down>= Suc v" shows "eval r_phi [i, x] \<down>= v"
lemma set_of_graph_rulesD[dest]: assumes "set_of_graph_rules Rs" "R \<in> Rs" shows "finite_graph (fst R)" "finite_graph (snd R)" "subgraph (fst R) (snd R)"
lemma Phi_diff_split_min: "split_min t = (x, t') \<Longrightarrow> t \<noteq> Leaf \<Longrightarrow> \<Phi> t' - \<Phi> t \<le> 6*e*height t"
lemma prod_upto_nat_unfold: "prod f {m..(n::nat)} = (if n < m then 1 else (if n = 0 then f 0 else f n * prod f {m..(n - 1)}))"
lemma af_equiv': "af \<phi> (w [0 \<rightarrow> Suc i]) = step (af\<^sub>\<UU> (Unf \<phi>) (w [0 \<rightarrow> i])) (w i)"
lemma D': assumes "\<sigma>' \<in> Lxx x y" and "x \<noteq> y" and "TS_inv' ([x, y], h) x [x, y]" shows "T_on' (rTS h0) ([x, y], h) \<sigma>' \<le> 2 * T\<^sub>p [x, y] \<sigma>' (OPT2 \<sigma>' [x, y]) \<and> TS_inv (config'_rand (embed (rTS h0)) (return_pmf ([x, y], h)) \<sigma>') (last \<sigma>') [x, y]"
lemma defensive_imp_aggressive: "G \<turnstile> (Normal s) \<midarrow>jvmd\<rightarrow> (Normal t) \<Longrightarrow> G \<turnstile> s \<midarrow>jvm\<rightarrow> t"
lemma loc_connectivity_implies_confluence: assumes "is_loc_connective_on A ord (\<rightarrow>)" and "dw_closed A" shows "is_confluent_on A"
lemma "(\<exists>x. P x \<longrightarrow> Q) = ((\<forall>x. P x) \<longrightarrow> Q)"
lemma inorder_splay: "inorder(splay x t) = inorder t"
lemma HStartBallot_HInv5_q2: assumes act: "HStartBallot s s' p" and pnq: "p\<noteq>q" and inv5_2: "\<exists>D\<in>MajoritySet. \<exists>qq. (\<forall>d\<in>D. bal(dblock s q) < mbal(disk s d qq) \<and> \<not>hasRead s q d qq)" shows "\<exists>D\<in>MajoritySet. \<exists>qq. (\<forall>d\<in>D. bal(dblock s' q) < mbal(disk s' d qq) \<and> \<not>hasRead s' q d qq)"
lemma zeta_tail_bigo': fixes s :: real assumes s: "s > 1" shows "(\<lambda>n. Re (hurwitz_zeta (real n) s)) \<in> O(\<lambda>x. real x powr (1 - s))"
lemma DynProc: assumes adapt: "P \<subseteq> {s. \<exists>Z. init s \<in> P' s Z \<and> (\<forall>t. t \<in> Q' s Z \<longrightarrow> return s t \<in> R s t) \<and> (\<forall>t. t \<in> A' s Z \<longrightarrow> return s t \<in> A)}" assumes c: "\<forall>s t. \<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> (R s t) (c s t) Q,A" assumes p: "\<forall>s\<in> P. \<forall>Z. \<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> (P' s Z) Call (p s) (Q' s Z),(A' s Z)" shows "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> P dynCall init p return c Q,A"
lemma im_set_mono: "\<lbrakk>f \<in>A \<rightarrow> B; A1 \<subseteq> A2; A2 \<subseteq> A \<rbrakk> \<Longrightarrow> (f ` A1) \<subseteq> (f ` A2)"
lemma get_ancestors_si_pure [simp]: "pure (get_ancestors_si ptr) h"
lemma bibd_point_occ_rep: assumes "x \<in> bl" assumes "bl \<in># \<B>" shows "(\<B> - {#bl#}) rep x = \<r> - 1"
lemma return_mono[simp, intro]: "mono_state (return x)"
lemma tdev'_float[simp]: "tdev' p xs \<in> float"
lemma degenerate_lots_subset_all: "degenerate_lotteries \<subseteq> \<P>"
lemma edges_split_loop_inter_empty: "{} = {e \<in> E . is_loop e } \<inter> {e \<in> E . is_sedge e}"
lemma hmr_invarI[simp]: "heapmap_invar hm \<Longrightarrow> hmr_invar hm"
lemma map_graph_preserves_restricted[intro]: assumes "graph G" shows "graph (map_graph f G)"
lemma inc_never_one [simp, intro]: "inc x \<noteq> 1"
lemma subst_sb_id: "subst_sb A a (B_var a) = A" and subst_branchb_id [simp]: "subst_branchb B a (B_var a) = B" and subst_branchlb_id: "subst_branchlb C a (B_var a) = C"
lemma list_rev_decomp[rule_format]: "l~=[] \<longrightarrow> (EX ll e . l = ll@[e])"
lemma (in normal_set) less_next: "x < (LEAST z. z \<in> A \<and> x < z)"
theorem I_qe_dlo: "DLO.I (qe_dlo \<phi>) xs = DLO.I \<phi> xs"
lemma "monomial (-4) (sparse\<^sub>0 [(0, 2::nat)]) = - 4 * X\<^sup>2"
lemma minSetOfComponentsTestL1p3: "minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}"
lemma strict_increasingD: "!!z::nat. F \<in> increasing f ==> F \<in> stable {s. z < f s}"
lemma (in linorder) map_it_to_list_rev_linord_correct: assumes A: "map_iterator_rev_linord (it s) m" shows "map_of (it_to_list it s) = m \<and> distinct (map fst (it_to_list it s)) \<and> sorted (rev (map fst (it_to_list it s)))"
lemma insert_rga_Some_commutes: assumes "i1 \<in> set xs" and "i2 \<in> set xs" and "e1 \<noteq> i2" and "e2 \<noteq> i1" shows "insert_rga (insert_rga xs (e1, Some i1)) (e2, Some i2) = insert_rga (insert_rga xs (e2, Some i2)) (e1, Some i1)"
lemma G_simp: assumes "C.arr f" shows "G f = terminal_arrow_from_functor.the_coext D C F (Go (C.cod f)) (\<epsilon>o (C.cod f)) (Go (C.dom f)) (f \<cdot>\<^sub>C \<epsilon>o (C.dom f))"
lemma P_component [simp]: "distr P M (\<lambda>f. f i) = M"
lemma upper_triangular_Z_eq_Q: "upper_triangular (map_matrix rat_of_int A) = upper_triangular A"
lemma In0_inject: "In0(M) = In0(N) ==> M=N"
lemma stdz_insert_Ide: shows "Ide (t # U) \<Longrightarrow> stdz_insert t U = []"
lemma pgwt_type_map: assumes "public_ground_wf_term t" shows "\<Gamma> t = TAtom a \<Longrightarrow> \<exists>f. t = Fun f []" "\<Gamma> t = TComp g Y \<Longrightarrow> \<exists>X. t = Fun g X \<and> map \<Gamma> X = Y"
lemma point_is_point: "point x \<longleftrightarrow> is_point x"
lemma not_comp_bin_fst_snd: "\<not> u\<^sub>0 \<cdot> \<alpha> \<bowtie> u\<^sub>1 \<cdot> \<alpha>"
lemma maximal_Extend: fixes S :: \<open>('a, 'b) block set\<close> assumes inf: \<open>infinite (UNIV :: 'b set)\<close> and \<open>finite A\<close> \<open>consistent A S\<close> \<open>finite (\<Union> (block_nominals ` S))\<close> \<open>surj f\<close> shows \<open>maximal A (Extend A S f)\<close>
lemma diff_compose: "diff k M1 M3 (g \<circ> f)" if "diff k M1 M2 f" "diff k M2 M3 g"
lemma assumes d: "D = {#}" and n: "N = {D, C}" and c: "C = {#Pos A#}" shows "D \<in> N" and "\<And>D'. D' < D \<Longrightarrow> Interp D' \<Turnstile> C" and "\<not> interp D \<Turnstile> C"
lemma FreeGroupD_transfer': "Abs_freelist xs \<in> FreeGroup S \<Longrightarrow> xs \<in> lists S"
lemma map_replicate [simp]: "map f (replicate n x) = replicate n (f x)"
lemma timpl_closure_Fun_not_Var[simp]: "Fun f T \<notin> timpl_closure (Var x) TI"
lemma denote_measure_expand: assumes m: "m \<le> n" and wc: "well_com (Measure n M S)" shows "denote (Measure m M S) \<rho> = matrix_sum d (\<lambda>k. denote (S!k) ((M k) * \<rho> * adjoint (M k))) m"
lemma "\<sim>ECQm \<^bold>\<not>\<^sup>C \<and> rDNE \<^bold>\<not>\<^sup>C \<and> rDNI \<^bold>\<not>\<^sup>C"
lemma deepL_list: assumes "is_leveln_ftree (Suc n) m \<and> is_measured_ftree m" and "is_leveln_digit n sf \<and> is_measured_digit sf" and "\<forall> x \<in> set pr. (is_measured_node x \<and> is_leveln_node n x) \<and> length pr \<le> 4" shows "toList (deepL pr m sf) = nlistToList pr @ toList m @ digitToList sf"
lemma imp_as_conj: assumes "P x \<Longrightarrow> Q x" shows "P x \<and> Q x \<longleftrightarrow> P x"
lemma (in composition_series) composition_snd_simple_iff: assumes "i < length \<GG>" shows "(simple_group (G\<lparr>carrier := \<GG> ! i\<rparr>)) = (i = 1)"
lemma p_le_inf : "p_less_eq Infty x \<Longrightarrow> x = Infty"
lemma index_add_vec[simp]: "i < dim_vec v\<^sub>2 \<Longrightarrow> (v\<^sub>1 + v\<^sub>2) $ i = v\<^sub>1 $ i + v\<^sub>2 $ i" "dim_vec (v\<^sub>1 + v\<^sub>2) = dim_vec v\<^sub>2"
lemma ln_inverse: "0 < x \<Longrightarrow> ln (inverse x) = - ln x" for x :: real
lemma admits_diagonal_reduction_intro: assumes "P \<in> carrier_mat (dim_row A) (dim_row A)" and "Q \<in> carrier_mat (dim_col A) (dim_col A)" and "invertible_mat P" and "invertible_mat Q " and "Smith_normal_form_mat (P * A * Q)" shows "admits_diagonal_reduction A"
lemma string_rel_string_assn: \<open>(\<up> ((c, a) \<in> string_rel)) = string_assn a c\<close>
lemma optimize_matches_a: "\<forall>a m. matches \<gamma> m a = matches \<gamma> (f a m) a \<Longrightarrow> approximating_bigstep_fun \<gamma> p (optimize_matches_a f rs) s = approximating_bigstep_fun \<gamma> p rs s"
lemma characteristic_weak_formula_eqvt_raw [simp]: "p \<bullet> characteristic_weak_formula = characteristic_weak_formula"
lemma homeomorphic_map_connectedness_eq: "homeomorphic_map X Y f \<Longrightarrow> connectedin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> connectedin Y (f ` U)"
lemma ldrop_finT[simp]: "t \<in> A\<^sup>\<star> \<Longrightarrow> t \<up> i \<in> A\<^sup>\<star>"
lemma order_sup_state_opt [intro, simp]: "wf_prog wf_mb P \<Longrightarrow> order (sup_state_opt P)"
lemma bij_betw_respects_domain_and_range_permutation: "(\<lambda>f. bij_betw f A B) respects domain_and_range_permutation A B"
lemma os_is_empty_impl: "imp_list_is_empty os_list os_is_empty"
lemma strictI[intro?]: "f bot = bot \<Longrightarrow> strict f"
lemma f_upwards: "f s n = [] ==> f s (n+m) = []"
lemma get_dom_component_separates_tree_order: assumes "heap_is_wellformed h" and "type_wf h" and "known_ptrs h" assumes "h \<turnstile> get_dom_component ptr \<rightarrow>\<^sub>r c" assumes "h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r to" assumes "h \<turnstile> get_dom_component ptr' \<rightarrow>\<^sub>r c'" assumes "ptr' \<notin> set c" shows "set to \<inter> set c' = {}"
lemma decs_unclocked_ignore: "evaluate_decs ck mn env s d res \<Longrightarrow> \<forall>s' r count. res = (s',r) \<and> r \<noteq> Rerr (Rabort Rtimeout_error) \<longrightarrow> evaluate_decs False mn env (s (| clock := count |)) d ((s' (| clock := count |)),r)"
lemma distinct_list_find_indices: shows "\<lbrakk> i < length Vs; Vs ! i = x; distinct Vs \<rbrakk> \<Longrightarrow> find_indices x Vs = [i]"
lemma pbij_lens_mwb [simp]: "pbij_lens x \<Longrightarrow> mwb_lens x"
lemma to_list_dtree_root_eq_root: "Dtree.root (to_list_dtree) = [root]"
lemma (in monoid) nat_pow_pow: "x \<in> carrier G ==> (x [^] n) [^] m = x [^] (n * m::nat)"
lemma (in prob_space) simp_exp_composed: assumes X: "simple_distributed M X Px" shows "expectation (\<lambda>a. f (X a)) = (\<Sum>x \<in> X`space M. f x * Px x)"
lemma le_lemma [simp]: "rec_eval rec_le [x, y] = (if (x \<le> y) then 1 else 0)"
lemma non_npD: "\<lbrakk> v \<noteq> Null; P,h \<turnstile> v :\<le> Class C; C \<noteq> Object \<rbrakk> \<Longrightarrow> \<exists>a C'. v = Addr a \<and> typeof_addr h a = \<lfloor>Class_type C'\<rfloor> \<and> P \<turnstile> C' \<preceq>\<^sup>* C"
lemma SN_on_Image: assumes "SN_on r A" shows "SN_on r (r `` A)"
lemma sum_eq: fixes x :: "'a::ordered_ab_group_add" shows "x + t = 0 \<equiv> x = - t"
lemma qtable_eval_agg: assumes inner: "qtable (b + n) (Formula.fv \<phi>) (mem_restr (lift_envs' b R)) (\<lambda>v. Formula.sat \<sigma> V (map the v) i \<phi>) rel" and n: "\<forall>x\<in>Formula.fv (Formula.Agg y \<omega> b f \<phi>). x < n" and fresh: "y + b \<notin> Formula.fv \<phi>" and b_fv: "{0..<b} \<subseteq> Formula.fv \<phi>" and f_fv: "Formula.fv_trm f \<subseteq> Formula.fv \<phi>" and g0: "g0 = (Formula.fv \<phi> \<subseteq> {0..<b})" shows "qtable n (Formula.fv (Formula.Agg y \<omega> b f \<phi>)) (mem_restr R) (\<lambda>v. Formula.sat \<sigma> V (map the v) i (Formula.Agg y \<omega> b f \<phi>)) (eval_agg n g0 y \<omega> b f rel)" (is "qtable _ ?fv _ ?Q ?rel'")
lemma tendsto_cos [tendsto_intros]: "(f \<longlongrightarrow> a) F \<Longrightarrow> ((\<lambda>x. cos (f x)) \<longlongrightarrow> cos a) F"