Statement:
stringlengths
7
24.3k
lemma pickInp_psubstInp_qPsubstInp: assumes good: "goodInp inp" and good_rho: "goodEnv rho" shows "pickInp (inp %[rho]) %= ((pickInp inp) %[[pickE rho]])"
lemma \<psi>_eq: "\<psi> = ccos (\<theta> / 2) \<cdot>\<^sub>v \<alpha> + csin (\<theta> / 2) \<cdot>\<^sub>v \<beta>"
lemma continuous_on_inverse_closed_map: assumes contf: "continuous_on S f" and imf: "f ` S = T" and injf: "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" and oo: "\<And>U. closedin (top_of_set S) U \<Longrightarrow> closedin (top_of_set T) (f ` U)" shows "continuous_on T g"
lemma kc_6x5_hd: "hd kc6x5 = (1,1)"
lemma entry_in_tree_keys: assumes "(k, v) \<in> set (entries t)" shows "k \<in> set (keys t)"
lemma uadmit_sterm_ntadjoint: assumes TUA:"NTUadmit \<sigma> \<theta> U" assumes VA:"Vagree \<nu> \<omega> (-U)" assumes dsafe:"\<And>i . dsafe (\<sigma> i)" assumes good_interp:"is_interp I" shows "sterm_sem (adjointFO I \<sigma> \<nu>) \<theta> = sterm_sem (adjointFO I \<sigma> \<omega>) \<theta>"
lemma InitSeqThrowReds: assumes "P \<turnstile> \<langle>INIT C ([C],b) \<leftarrow> unit,s\<^sub>0,b\<^sub>0\<rangle> \<rightarrow>* \<langle>throw a,s\<^sub>1,b\<^sub>1\<rangle>" shows "P \<turnstile> \<langle>INIT C ([C],b) \<leftarrow> e,s\<^sub>0,b\<^sub>0\<rangle> \<rightarrow>* \<langle>throw a,s\<^sub>1,b\<^sub>1\<rangle>"
lemma ps_ta_states: "\<Q> (ps_ta \<A>) |\<subseteq>| Wrapp |`| fPow (\<Q> \<A>)"
lemma complete_ht_copy: "n \<le> List.length ss \<Longrightarrow> <is_hashtable ss src * is_hashtable ds dst> ht_copy n src dst <\<lambda>r. is_hashtable ss src * is_hashtable (ls_copy n ss ds) r>"
lemma (in comm_monoid_mult) prod_list_multf: "(\<Prod>x\<leftarrow>xs. f x * g x) = prod_list (map f xs) * prod_list (map g xs)"
lemma not_ex_not: "\<not> (\<exists> x \<bullet> \<not> P) = (\<forall> x \<bullet> P)"
lemma ins_inorder_pairs [rewrite]: "rbt_sorted t \<Longrightarrow> rbt_in_traverse_pairs (ins x v t) = ordered_insert_pairs x v (rbt_in_traverse_pairs t)"
lemma Omega_mult: "(x * y)\<^sup>\<Omega> = 1 \<squnion> x * (y * x)\<^sup>\<Omega> * y"
lemma PRE_D1: "(Q x \<and> P x) \<longrightarrow> comp_PRE S1 Q (\<lambda>x _. P x) S x"
lemma sec_case_party_collapse [simp]: "sec.case_party x x p = x"
lemma saturated_upto_complete_if: assumes satur: "saturated_upto N" and unsat: "\<not> satisfiable N" shows "{#} \<in> N"
lemma wf_cont: assumes "wf tr" and "Inr tr' \<in> cont tr" shows "wf tr'"
lemma mkId4b: "(l,ll):(mkId h) \<Longrightarrow> l:Dom h \<and> l = ll"
lemma lookup_operator_eq_name: "lookup_operator name = Some (name', pres, effs, layer) \<Longrightarrow> name = name'"
theorem sorted_wrt_dist_nearest_neighbors: "sorted_wrt_dist p (nearest_neighbors n p kdt)"
lemma param_rbt_union[param]: fixes less assumes param_less[param]: "(less,less') \<in> Ra \<rightarrow> Ra \<rightarrow> Id" shows "(ord.rbt_union less, ord.rbt_union less') \<in> \<langle>Ra,Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra,Rb\<rangle>rbt_rel \<rightarrow> \<langle>Ra,Rb\<rangle>rbt_rel"
lemma [code]: fixes xs :: "('a::finite \<times> 'a) list" shows "Wellfounded.acc (set xs) = bacc (set xs) (card_UNIV TYPE('a))"
theorem RPO_SN_order_pair: "SN_order_pair RPO_S RPO_NS"
lemma topspace_discrete_topology [simp]: "topspace(discrete_topology U) = U"
lemma eval_conj_tuple_empty2: assumes "fo_nmlzd Z xs" "fo_nmlzd Z ys" "length nsx = length xs" "length nsy = length ys" "sorted_distinct nsx" "sorted_distinct nsy" "sorted_distinct ns" "set ns \<subseteq> set nsx \<inter> set nsy" "fo_nmlz Z (proj_tuple ns (zip nsx xs)) \<noteq> fo_nmlz Z (proj_tuple ns (zip nsy ys)) \<or> (proj_tuple ns (zip nsx xs) \<noteq> proj_tuple ns (zip nsy ys) \<and> (\<forall>x \<in> set (proj_tuple ns (zip nsx xs)). isl x) \<and> (\<forall>y \<in> set (proj_tuple ns (zip nsy ys)). isl y))" shows "eval_conj_tuple Z nsx nsy xs ys = {}"
lemma insort_insert_sorted: assumes "l<j" assumes "insort_insert_post l j a a' i'" assumes "ran_sorted a l j" shows "ran_sorted a' l (j + 1)"
lemma irreducible_poly_uminus_abs[simp]: "irreducible p \<Longrightarrow> irreducible (poly_uminus_abs p)"
lemma gauge_integral_Fubini_curve_bounded_region_x: fixes f g :: "('a::euclidean_space * 'b::euclidean_space) \<Rightarrow> 'c::euclidean_space" and g1 g2:: "'a \<Rightarrow> 'b" and s:: "('a * 'b) set" assumes fun_lesbegue_integrable: "integrable lborel f" and x_axis_gauge_integrable: "\<And>x. (\<lambda>y. f(x, y)) integrable_on UNIV" and (*IS THIS redundant? NO IT IS NOT*) x_axis_integral_measurable: "(\<lambda>x. integral UNIV (\<lambda>y. f(x, y))) \<in> borel_measurable lborel" and f_is_g_indicator: "f = (\<lambda>x. if x \<in> s then g x else 0)" and s_is_bounded_by_g1_and_g2: "s = {(x,y). (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i) \<and> (\<forall>i\<in>Basis. (g1 x) \<bullet> i \<le> y \<bullet> i \<and> y \<bullet> i \<le> (g2 x) \<bullet> i)}" shows "integral s g = integral (cbox a b) (\<lambda>x. integral (cbox (g1 x) (g2 x)) (\<lambda>y. g(x,y)))"
lemma square_free_square_free_factorization: "square_free (p :: 'a :: {field,factorial_ring_gcd,semiring_gcd_mult_normalize} poly) \<Longrightarrow> degree p \<noteq> 0 \<Longrightarrow> square_free_factorization p (1,[(p,0)])"
lemma cla_mono': "Z' \<subseteq> V \<Longrightarrow> Z \<subseteq> Z' \<Longrightarrow> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> Z'"
lemma upper_asymptotic_density_0_Delta: assumes "upper_asymptotic_density (A \<Delta> B) = 0" shows "upper_asymptotic_density A = upper_asymptotic_density B"
lemma renaming: fixes P :: pi and a :: name and b :: name and c :: name assumes "c \<sharp> P" shows "P[a::=b] = ([(c, a)] \<bullet> P)[c::=b]"
lemma run_one_step_basic_cvtop_result: assumes "run_one_step d i (s,vs,ves,$Cvtop t2 x312 t1 sx) = (s', vs', res)" shows "(\<exists>r. res = RSNormal r) \<or> (\<exists>e. res = RSCrash e)"
lemma setdist_closure_2 [simp]: "setdist T (closure S) = setdist T S"
lemma rtrancl_to_subtuple: "(subtuple r)\<^sup>*\<^sup>* xm ym \<Longrightarrow> subtuple r\<^sup>*\<^sup>* xm ym"
lemma fvi_plus_bound: assumes "\<forall>i\<in>fvi (b + c) \<phi>. i < n" shows "\<forall>i\<in>fvi b \<phi>. i < c + n"
lemma word_2p_mult_inc: assumes x: "2 * 2 ^ n < (2::'a::len word) * 2 ^ m" assumes suc_n: "Suc n < LENGTH('a::len)" shows "2^n < (2::'a::len word)^m"
lemma ipresCons_imp_ipresSubstAll_aux: assumes *: "ipresCons h hA MOD" and **: "igSubstCls MOD" and "igConsIPresIGWls MOD" and "igFreshCls MOD" assumes P: "wlsPar P" shows "(wls s X \<longrightarrow> (\<forall> ys y Y. y \<in> varsOfS P ys \<and> Y \<in> termsOfS P (asSort ys) \<longrightarrow> h (X #[Y / y]_ys) = igSubst MOD ys (h Y) y (h X))) \<and> (wlsAbs (us,s') A \<longrightarrow> (\<forall> ys y Y. y \<in> varsOfS P ys \<and> Y \<in> termsOfS P (asSort ys) \<longrightarrow> hA (A $[Y / y]_ys) = igSubstAbs MOD ys (h Y) y (hA A)))"
lemma push_down_rank_tokens: "\<lbrakk>rank x n = rank y n; rank x n = Some i\<rbrakk> \<Longrightarrow> (\<exists>q. x \<in> configuration q n \<and> y \<in> configuration q n)"
lemma subcls''_eq_subcls: "subcls'' P = subcls (Program P)"
lemma ts_inf_make_untimed_inf_tl: assumes "ts x" shows "inf_make_untimed (inf_tl x) i = inf_make_untimed x (Suc i)"
lemma i_join_i_expand_iMOD: " 0 < k \<Longrightarrow> f \<odot>\<^sub>i k \<Join>\<^sub>i [n * k, mod k] = f \<Join>\<^sub>i [n\<dots>]"
lemma step_4_push_big_size_ok_1: "\<lbrakk> invar (States dir big small); 4 \<le> remaining_steps (States dir big small); (step^^4) (States dir (Big.push x big) small) = States dir' big' small'; remaining_steps (States dir big small) + 1 \<le> 4 * size small \<rbrakk> \<Longrightarrow> remaining_steps (States dir' big' small') + 1 \<le> 4 * size small'"
lemma fls_prpart_minus [simp] : "fls_prpart (f - g) = fls_prpart f - fls_prpart g"
lemma count_list_gr_0_iff: "0 < count_list u a \<longleftrightarrow> a \<in> set u"
lemma subtr2_StepR: assumes r: "root tr3 \<in> ns" and tr23: "Inr tr2 \<in> cont tr3" and s: "subtr2 ns tr1 tr2" shows "subtr2 ns tr1 tr3"
theorem CauchysMeanTheorem_Eq: fixes z::"real list" assumes "pos z" shows "gmean z = mean z \<longleftrightarrow> het z = 0"
lemma measure_of_eq: assumes closed: "A \<subseteq> Pow \<Omega>" and eq: "(\<And>a. a \<in> sigma_sets \<Omega> A \<Longrightarrow> \<mu> a = \<mu>' a)" shows "measure_of \<Omega> A \<mu> = measure_of \<Omega> A \<mu>'"
lemma wf_interp_for_formula_FOr: "wf_interp_for_formula (w, I) (FOr \<phi>1 \<phi>2) = (wf_interp_for_formula (w, I) \<phi>1 \<and> wf_interp_for_formula (w, I) \<phi>2)"
lemma lens_plus_swap: "X \<bowtie> Y \<Longrightarrow> swap\<^sub>L ;\<^sub>L (X +\<^sub>L Y) = (Y +\<^sub>L X)"
lemma powr_growth2: "\<exists>C c2. 0 < c2 \<and> C < Min (set bs) \<and> eventually (\<lambda>x. \<forall>u\<in>{C * x..x}. c2 * x powr p' \<ge> u powr p') at_top"
lemma extreme_point_of_convex_hull_affine_independent: fixes S :: "'a::euclidean_space set" shows "\<not> affine_dependent S \<Longrightarrow> (x extreme_point_of (convex hull S) \<longleftrightarrow> x \<in> S)"
lemma borel_eq_atLeastAtMost: "borel = sigma UNIV (range (\<lambda>(a,b). {a..b} ::'a::ordered_euclidean_space set))" (is "_ = ?SIGMA")
lemma cauchy_ine\<^sub>N_I: assumes "\<And>e. e > 0 \<Longrightarrow> (\<exists>M. \<forall>n\<ge>M. \<forall>m\<ge>M. eNorm N (u n - u m) < e)" shows "cauchy_ine\<^sub>N N u"
lemma lub_set: "lub S = \<Union>S"
lemma lmap_eq_lmap_conv_llist_all2: "lmap f xs = lmap g ys \<longleftrightarrow> llist_all2 (\<lambda>x y. f x = g y) xs ys" (is "?lhs \<longleftrightarrow> ?rhs")
lemma Omega_one: "1\<^sup>\<Omega> = top"
lemma jumpNestingOk_eval_no_jump: assumes eval: "prg Env\<turnstile> s0 \<midarrow>t\<succ>\<rightarrow> (v,s1)" and jmpOk: "jumpNestingOk {} t" and no_jmp: "abrupt s0 \<noteq> Some (Jump j)" and wt: "Env\<turnstile>t\<Colon>T" and wf: "wf_prog (prg Env)" shows "abrupt s1 \<noteq> Some (Jump j) \<and> (normal s1 \<longrightarrow> v=In2 (w,upd) \<longrightarrow> abrupt s \<noteq> Some (Jump j') \<longrightarrow> abrupt (upd val s) \<noteq> Some (Jump j'))"
lemma lift_bool: "x \<Longrightarrow> x=True"
lemma closedin_Int_closure_of: "closedin (subtopology X S) T \<longleftrightarrow> S \<inter> X closure_of T = T"
lemma dprodI [intro!]: "\<lbrakk>(M,M') \<in> r; (N,N') \<in> s\<rbrakk> \<Longrightarrow> (Scons M N, Scons M' N') \<in> dprod r s"
lemma lunit_char_eqn: assumes "ide a" shows "prod \<one> (lunit a) = prod \<iota> a \<cdot> assoc' \<one> \<one> a"
lemma shEx_lift_seq_2 [uquant_lift]: "(P ;; (\<^bold>\<exists> x \<bullet> Q x)) = (\<^bold>\<exists> x \<bullet> (P ;; Q x))"
lemma(in UP_cring) cfs_monom_mult_2: assumes "f \<in> carrier P" assumes "a \<in> carrier R" assumes "m < n" shows "((monom P a n) \<otimes>\<^bsub>P\<^esub> f) m = \<zero>"
lemma path2_tl_in_\<alpha>n[elim]: "g \<turnstile> n-ns\<rightarrow>m \<Longrightarrow> m \<in> set (\<alpha>n g)"
lemma chine_assoc_naturality: shows "cods.chine_assoc \<cdot> \<mu>\<nu>_\<pi>.chine = \<mu>\<nu>\<pi>.chine \<cdot> doms.chine_assoc"
lemma pj_invim_cont_I:"\<lbrakk>Ring R; ideal R I; ideal (qring R I) J\<rbrakk> \<Longrightarrow> I \<subseteq> (rInvim R (qring R I) (pj R I) J)"
lemma epsclo_UN [simp]: "epsclo (\<Union>x\<in>A. B x) = (\<Union>x\<in>A. epsclo (B x))"
lemma autoref_the[autoref_rules]: assumes "SIDE_PRECOND (x\<noteq>None)" assumes "(x',x)\<in>\<langle>R\<rangle>option_rel" shows "(the x', (OP the ::: \<langle>R\<rangle>option_rel \<rightarrow> R)$x) \<in> R"
lemma [code]: "(\<sigma> \<Turnstile> m) = (case (m \<sigma>) of None \<Rightarrow> False | (Some (x,y)) \<Rightarrow> x)"
lemma (in finite_product_prob_space) finite_measure_PiM_emb: "(\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> measure (PiM I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. measure (M i) (A i))"
lemma qFresh_imp_ex_qAFresh2: assumes "qGood X" and "qFresh xs x X" and "qFresh ys y X" shows "\<exists> X'. qGood X' \<and> X #= X' \<and> qAFresh xs x X' \<and> qAFresh ys y X'"
lemma ICdual: "\<I> \<^bold>\<equiv> \<C>\<^sup>d"
lemma second_summand_overlap: "O z y \<Longrightarrow> O z (x \<oplus> y)"
lemma inj_vreal_of_real: "inj vreal_of_real"
lemma cmp_simps [simp]: assumes "B.VV.arr \<mu>\<nu>" shows "D.arr (cmp \<mu>\<nu>)" and "D.dom (cmp \<mu>\<nu>) = H\<^sub>DoGF_GF.map (B.VV.dom \<mu>\<nu>)" and "D.cod (cmp \<mu>\<nu>) = GFoH\<^sub>B.map (B.VV.cod \<mu>\<nu>)"
lemma subcls1_induct [consumes 1]: "\<lbrakk>ws_prog G; \<And>x. \<forall>y. (x, y) \<in> subcls1 G \<longrightarrow> P y \<Longrightarrow> P x\<rbrakk> \<Longrightarrow> P a"
lemma val2formAppend: fixes valuation1 :: Valuation and valuation2 :: Valuation shows "val2form (valuation1 @ valuation2) = (val2form valuation1 @ val2form valuation2)"
lemma card_UNIV_option: "CARD('a option) = (if CARD('a) = 0 then 0 else CARD('a) + 1)"
lemma vars_load: "\<lbrakk>0 \<le> i; i < size P; P !! i = LOAD x\<rbrakk> \<Longrightarrow> x \<in> set (vars P)"
lemma remove_shadow_root_writes: "writes (remove_shadow_root_locs element_ptr (the |h \<turnstile> get_shadow_root element_ptr|\<^sub>r)) (remove_shadow_root element_ptr) h h'"
lemma cnf_of_literal_formula: assumes "is_literal_formula f" shows "cnf f = {{ literal_formula_to_literal f }}"
lemma to_fun_res_ltrm: assumes "a \<in> carrier Zp" assumes "b \<in> carrier Zp" assumes "f \<in> carrier Zp_x" assumes "a k = b k" shows "((ltrm f)\<bullet>a) k = ((ltrm f)\<bullet>b) k"
lemma HFun_Sigma_Iff: assumes "atom z \<sharp> (r,z',x,y,x',y')" "atom z' \<sharp> (r,x,y,x',y')" "atom x \<sharp> (r,y,x',y')" "atom y \<sharp> (r,x',y')" "atom x' \<sharp> (r,y')" "atom y' \<sharp> (r)" shows "{} \<turnstile>HFun_Sigma r IFF All2 z r (All2 z' r (Ex x (Ex y (Ex x' (Ex y' (Var z EQ HPair (Var x) (Var y) AND Var z' EQ HPair (Var x') (Var y') AND OrdP (Var x) AND OrdP (Var x') AND ((Var x NEQ Var x') OR (Var y EQ Var y'))))))))"
theorem sigma_protocol: shows "chaum_ped_sigma.\<Sigma>_protocol n"
lemma e_lam_intro[intro]: "\<lbrakk> v = VFun f; \<forall> v1 v2. (v1,v2) \<in> set f \<longrightarrow> v2 \<in> E e ((x,v1)#\<rho>) \<rbrakk> \<Longrightarrow> v \<in> E (ELam x e) \<rho>"
lemma ta_der_ctxt_n_loop: assumes "q |\<in>| ta_der \<A> t" "q |\<in>| ta_der \<A> C\<langle>Var q\<rangle>" shows " q |\<in>| ta_der \<A> (C^n)\<langle>t\<rangle>"
lemma sorted_list_of_set_bij_betw: assumes "finite A" shows "bij_betw (\<lambda>n. sorted_list_of_set A ! n) {..<card A} A"
lemma lcp_lenI: assumes "i < min \<^bold>|u\<^bold>| \<^bold>|v\<^bold>|" and "take i u = take i v" and "u!i \<noteq> v!i" shows "i = \<^bold>|u \<and>\<^sub>p v\<^bold>|"
lemma rGamma_series_nonpos_Ints_LIMSEQ: "z \<in> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> rGamma_series z \<longlonglongrightarrow> 0"
lemma emeasure_return_pmf[simp]: "emeasure (return_pmf x) X = indicator X x"
lemma compact_imp_bounded: assumes "compact U" shows "bounded U"
lemma in_var_plus [simp]: "in_var (x +\<^sub>L y) = in_var x +\<^sub>L in_var y"
lemma M_perp_to_compass: assumes "M_perp l m" and "a \<in> hyp2" and "proj2_incident a l" and "b \<in> hyp2" and "proj2_incident b m" shows "\<exists> J. is_K2_isometry J \<and> apply_cltn2_line equator J = l \<and> apply_cltn2_line meridian J = m"
lemma lemParallelTrans: assumes "lineA \<parallel> lineB" and "lineB \<parallel> lineC" and "direction lineB \<noteq> vecZero" shows "lineA \<parallel> lineC"
theorem substEnv_def2: "(rho &[Y / y]_ys) = (\<lambda>xs x. case rho xs x of None \<Rightarrow> if (xs = ys \<and> x = y) then Some Y else None |Some X \<Rightarrow> Some (X #[Y / y]_ys))"
lemma (in flowgraph) ntrp_mon_loc_e_no_ctx: "((s,c),LOC e,(s',c'))\<in>ntrp fg \<Longrightarrow> mon_w fg e \<inter> mon_c fg c = {}"
lemma (in Corps) eSum_tr:" ( \<forall>j \<le> n. (x j) \<in> carrier K) \<and> ( \<forall>j \<le> n. (b j) \<in> carrier K) \<and> l \<le> n \<and> ( \<forall>j\<in>({h. h \<le> n} -{l}). (g j = (x j) \<cdot>\<^sub>r (1\<^sub>r \<plusminus> -\<^sub>a (b j)))) \<and> g l = (x l) \<cdot>\<^sub>r (-\<^sub>a (b l)) \<longrightarrow> (nsum K (\<lambda>j \<in> {h. h \<le> n}. (x j) \<cdot>\<^sub>r (1\<^sub>r \<plusminus> -\<^sub>a (b j))) n) \<plusminus> (-\<^sub>a (x l)) = nsum K g n"
lemma red_external_imp_red_external_aggr: "P,t \<turnstile> \<langle>a\<bullet>M(vs), h\<rangle> -ta\<rightarrow>ext \<langle>va, h'\<rangle> \<Longrightarrow> (ta, va, h') \<in> red_external_aggr P t a M vs h"
lemma subdivide_count_ex: "\<exists>n. L * abs (t1 - t0) / (Suc n) < 1"