Statement:
stringlengths
7
24.3k
lemma transfer_FOREACH_nres[refine_transfer]: assumes A: "set_iterator iterate s" assumes R: "\<And>x \<sigma>. nres_of (fi x \<sigma>) \<le> f x \<sigma>" shows "nres_of (dres_it iterate (\<lambda>_. True) fi \<sigma>) \<le> FOREACH s f \<sigma>"
lemma sclose_subset_FV[rule_format]: "FV ({n \<leftarrow> [s,p]} t) \<subseteq> FV t"
lemma [iff]: "(P,E,h \<turnstile> e#es [:] T#Ts) = (P,E,h \<turnstile> e : T \<and> P,E,h \<turnstile> es [:] Ts)"
lemma PO_l3_inv9 [iff]: "reach l3 \<subseteq> l3_inv9"
lemma inext_less_mono_rev: " \<lbrakk> inext a I < inext b I; a \<in> I; b \<in> I \<rbrakk> \<Longrightarrow> a < b"
lemma rpr: "R \<subseteq> Id \<Longrightarrow> p2r (r2p R) = R"
lemma arity_var\<^sub>h_if_\<delta>\<^sub>h_gt_0_E: assumes \<delta>_gt_0: "\<delta>\<^sub>h > 0" obtains n where "arity_var\<^sub>h f = of_nat n"
lemma EmptyMap_ran [simp]: "S \<noteq> {} \<Longrightarrow> ran (EmptyMap S) = {{}}"
lemma inv_end5_exit_Bk_Oc_via_loop[elim]: "\<lbrakk>0 < x; inv_end5_loop x (b, Oc # list); b \<noteq> []; hd b = Bk\<rbrakk> \<Longrightarrow> inv_end5_exit x (tl b, Bk # Oc # list)"
lemma OclExcluding_rep_set: assumes S_def: "\<tau> \<Turnstile> \<delta> S" shows "\<lceil>\<lceil>Rep_Set\<^sub>b\<^sub>a\<^sub>s\<^sub>e (S->excluding\<^sub>S\<^sub>e\<^sub>t(\<lambda>_. \<lfloor>\<lfloor>x\<rfloor>\<rfloor>) \<tau>)\<rceil>\<rceil> = \<lceil>\<lceil>Rep_Set\<^sub>b\<^sub>a\<^sub>s\<^sub>e (S \<tau>)\<rceil>\<rceil> - {\<lfloor>\<lfloor>x\<rfloor>\<rfloor>}"
lemma MOST_neq [simp]: "MOST x. x \<noteq> a" "MOST x. a \<noteq> x"
lemma [code]: "prod_mset (mset xs) = fold times xs 1"
lemma sum_with_closed: assumes "g ` A \<subseteq> S" shows "sum_with pls z g A \<in> S"
lemma subgame_path_conforms_with_strategy: assumes V': "V' \<subseteq> V" and P: "path_conforms_with_strategy p P \<sigma>" "lset P \<subseteq> V'" shows "ParityGame.path_conforms_with_strategy (subgame V') p P \<sigma>"
lemma board_exec_aux_leq_mem: "(i,j) \<in> board_exec_aux k M \<longleftrightarrow> 1 \<le> i \<and> i \<le> int k \<and> j \<in> M"
lemma kernel_Proj[simp]: \<open>kernel (Proj S) = - S\<close>
lemma assm8: "0 < arity f \<Longrightarrow> \<Gamma> (Fun f X) = TComp f (map \<Gamma> X)"
theorem TBtheore54b_P: assumes "eoutM P M E" and "subcomponents PQ = {P,Q}" and "correctCompositionOut PQ" and "\<exists> ch. ((ch \<in> (out Q)) \<and> (exprChannel ch E) \<and> (ch \<notin> (loc PQ)) \<and> (ch \<in> M) )" shows "eoutM PQ M E"
lemma right_segment_congruence: assumes "{c, d} = {p, q}" and "a b \<congruent> p q" shows "a b \<congruent> c d"
lemma (in StdSet) set_i2_impl: "invar s \<Longrightarrow> invar (set_i2 l) \<and> \<alpha> (set_i2 l) = set_a2 l"
lemma add_edge_maximally_connected: assumes "maximally_connected H G" assumes "subgraph H G" assumes "(a, w, b) \<in> E" shows "maximally_connected (add_edge a w b H) G"
lemma OUTfromVCorrect1_data9: "OUTfromVCorrect1 data9"
lemma iso_img_block_orig_exists: "x \<in># \<B>' \<Longrightarrow> \<exists> bl . bl \<in># \<B> \<and> x = \<pi> ` bl"
lemma rec_inseparable_mono: "rec_inseparable A B \<Longrightarrow> A \<subseteq> A' \<Longrightarrow> B \<subseteq> B' \<Longrightarrow> rec_inseparable A' B'"
lemma set_interact [simp]: shows "list.set (interact xs ys) = list.set (concat xs) \<union> list.set (concat ys)"
lemma NS_subterm: assumes all: "\<And> f k. set (\<sigma> (f,k)) = {0 ..< k}" shows "s \<unrhd> t \<Longrightarrow> (s,t) \<in> NS"
lemma eccentricity_Max_alt: assumes "v \<in> V" assumes "V \<noteq> {v}" shows "eccentricity v = Max ((\<lambda> u. shortest_path v u) ` (V - {v}))"
lemma lang_eq_ext_Nil_fold_Deriv: fixes K L A R assumes "\<And>w. in_language K w \<Longrightarrow> w \<in> lists A" "\<And>w. in_language L w \<Longrightarrow> w \<in> lists B" "\<And>a b. R a b \<Longrightarrow> a \<in> A \<longleftrightarrow> b \<in> B" defines "\<BB> \<equiv> {(\<dd>s w1 K, \<dd>s w2 L) | w1 w2. w1 \<in> lists A \<and> w2 \<in> lists B \<and> list_all2 R w1 w2}" shows "rel_language R K L \<longleftrightarrow> (\<forall>(K, L) \<in> \<BB>. \<oo> K \<longleftrightarrow> \<oo> L)"
lemma unitary_unitary_gen [simp]: assumes "unitary M" shows "unitary_gen M"
lemma establish_invarI[case_names init new_root finish cross_edge back_edge discover]: \<comment> \<open>Establish a DFS invariant (explicit preconditions).\<close> assumes init: "on_init param \<le>\<^sub>n SPEC (\<lambda>x. I (empty_state x))" assumes new_root: "\<And>s s' v0. \<lbrakk>DFS_invar G param s; I s; cond s; \<not> is_break param s; stack s = []; v0 \<in> V0; v0 \<notin> dom (discovered s); s' = new_root v0 s\<rbrakk> \<Longrightarrow> on_new_root param v0 s' \<le>\<^sub>n SPEC (\<lambda>x. DFS_invar G param (s'\<lparr>state.more := x\<rparr>) \<longrightarrow> I (s'\<lparr>state.more := x\<rparr>))" assumes finish: "\<And>s s' u. \<lbrakk>DFS_invar G param s; I s; cond s; \<not> is_break param s; stack s \<noteq> []; u = hd (stack s); pending s `` {u} = {}; s' = finish u s\<rbrakk> \<Longrightarrow> on_finish param u s' \<le>\<^sub>n SPEC (\<lambda>x. DFS_invar G param (s'\<lparr>state.more := x\<rparr>) \<longrightarrow> I (s'\<lparr>state.more := x\<rparr>))" assumes cross_edge: "\<And>s s' u v. \<lbrakk>DFS_invar G param s; I s; cond s; \<not> is_break param s; stack s \<noteq> []; (u, v) \<in> pending s; u = hd (stack s); v \<in> dom (discovered s); v\<in>dom (finished s); s' = cross_edge u v (s\<lparr>pending := pending s - {(u,v)}\<rparr>)\<rbrakk> \<Longrightarrow> on_cross_edge param u v s' \<le>\<^sub>n SPEC (\<lambda>x. DFS_invar G param (s'\<lparr>state.more := x\<rparr>) \<longrightarrow> I (s'\<lparr>state.more := x\<rparr>))" assumes back_edge: "\<And>s s' u v. \<lbrakk>DFS_invar G param s; I s; cond s; \<not> is_break param s; stack s \<noteq> []; (u, v) \<in> pending s; u = hd (stack s); v \<in> dom (discovered s); v\<notin>dom (finished s); s' = back_edge u v (s\<lparr>pending := pending s - {(u,v)}\<rparr>)\<rbrakk> \<Longrightarrow> on_back_edge param u v s' \<le>\<^sub>n SPEC (\<lambda>x. DFS_invar G param (s'\<lparr>state.more := x\<rparr>) \<longrightarrow> I (s'\<lparr>state.more := x\<rparr>))" assumes discover: "\<And>s s' u v. \<lbrakk>DFS_invar G param s; I s; cond s; \<not> is_break param s; stack s \<noteq> []; (u, v) \<in> pending s; u = hd (stack s); v \<notin> dom (discovered s); s' = discover u v (s\<lparr>pending := pending s - {(u,v)}\<rparr>)\<rbrakk> \<Longrightarrow> on_discover param u v s' \<le>\<^sub>n SPEC (\<lambda>x. DFS_invar G param (s'\<lparr>state.more := x\<rparr>) \<longrightarrow> I (s'\<lparr>state.more := x\<rparr>))" shows "is_invar I"
lemma Figure_6: assumes "\<And>i. i \<le> k \<Longrightarrow> foldl1 f1 (map (h1 k i) js) = One" and "i > k" shows "i \<notin> set js"
lemma "\<Gamma>\<turnstile>\<^sub>t \<lbrace>\<acute>M=0 \<and> \<acute>N=0\<rbrace> WHILE (\<acute>M < i) INV \<lbrace>\<acute>M \<le> i \<and> (\<acute>M \<noteq> 0 \<longrightarrow> \<acute>N = j) \<and> \<acute>N \<le> j\<rbrace> VAR MEASURE (i - \<acute>M) DO \<acute>N :== 0;; WHILE (\<acute>N < j) FIX m. INV \<lbrace>\<acute>M=m \<and> \<acute>N \<le> j\<rbrace> VAR MEASURE (j - \<acute>N) DO \<acute>N :== \<acute>N + 1 OD;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>M=i \<and> (\<acute>M\<noteq>0 \<longrightarrow> \<acute>N=j)\<rbrace>"
lemma is_renamingD: "is_renaming \<sigma> \<Longrightarrow> (\<forall>A1 A2. A1 \<cdot>a \<sigma> = A2 \<cdot>a \<sigma> \<longleftrightarrow> A1 = A2)"
lemma crsp_step_dec_b_e_pre: assumes "ly = layout_of ap" and inv_start: "inv_locate_b (as, lm) (n, la, ra) ires" and dec_0: "abc_lm_v lm n = 0" and fetch: "abc_fetch as ap = Some (Dec n e)" shows "\<exists>stp lb rb. steps (Suc (start_of ly as) + 2 * n, la, ra) (ci ly (start_of ly as) (Dec n e), start_of ly as - Suc 0) stp = (start_of ly e, lb, rb) \<and> dec_inv_1 ly n e (as, lm) (start_of ly e, lb, rb) ires"
lemma the_wall_betw_adj_fundchamber: "(f,g)\<in>fundfoldpairs \<Longrightarrow> the_wall_betw C0 (Abs_induced_automorph f g `\<rightarrow> C0) = {f\<turnstile>\<C>,g\<turnstile>\<C>}"
lemma map_transfer [transfer_rule]: "rel_fun (=) (rel_fun (pcr_dnelist (=)) (pcr_dnelist (=))) (\<lambda>f xs. remdups (map f xs)) Applicative_DNEList.map"
lemma lookup_zero_fun: "lookup 0 = 0"
lemma (in fixed_carrier_mat) smult_mem: assumes "A \<in> fc_mats" shows "a \<cdot>\<^sub>m A \<in> fc_mats"
lemma (in group) generate_sincl: "A \<subseteq> generate G A"
lemma "id (a \<and> b) \<Longrightarrow> id a"
lemma pred_map_get: assumes "pred_map P m" and "m x = Some y" shows "P y"
lemma horner_bounds: fixes F :: "nat \<Rightarrow> nat" and G :: "nat \<Rightarrow> nat \<Rightarrow> nat" assumes "0 \<le> real_of_float x" and f_Suc: "\<And>n. f (Suc n) = G ((F ^^ n) s) (f n)" and lb_0: "\<And> i k x. lb 0 i k x = 0" and lb_Suc: "\<And> n i k x. lb (Suc n) i k x = float_plus_down prec (lapprox_rat prec 1 k) (- float_round_up prec (x * (ub n (F i) (G i k) x)))" and ub_0: "\<And> i k x. ub 0 i k x = 0" and ub_Suc: "\<And> n i k x. ub (Suc n) i k x = float_plus_up prec (rapprox_rat prec 1 k) (- float_round_down prec (x * (lb n (F i) (G i k) x)))" shows "(lb n ((F ^^ j') s) (f j') x) \<le> (\<Sum>j=0..<n. (- 1) ^ j * (1 / (f (j' + j))) * (x ^ j))" (is "?lb") and "(\<Sum>j=0..<n. (- 1) ^ j * (1 / (f (j' + j))) * (x ^ j)) \<le> (ub n ((F ^^ j') s) (f j') x)" (is "?ub")
lemma continuous_component[continuous_intros]: "continuous F f \<Longrightarrow> continuous F (\<lambda>x. f x $ i)"
lemma exec_final_notin_iff_execn: "\<Gamma>\<turnstile>\<langle>c,s\<rangle> \<Rightarrow>\<notin>T = (\<forall>n. \<Gamma>\<turnstile>\<langle>c,s\<rangle> =n\<Rightarrow>\<notin>T)"
lemma DT_D: "P \<sqsubseteq>\<^sub>D\<^sub>T Q \<Longrightarrow> P \<sqsubseteq>\<^sub>D Q"
lemma (in ring_hom_ring) img_is_subfield: assumes "subfield K R" and "\<one>\<^bsub>S\<^esub> \<noteq> \<zero>\<^bsub>S\<^esub>" shows "inj_on h K" and "subfield (h ` K) S"
lemma HSigmaE [elim!]: assumes "c \<^bold>\<in> HSigma A B" obtains x y where "x \<^bold>\<in> A" "y \<^bold>\<in> B(x)" "c=\<langle>x,y\<rangle>"
lemma invertible_Q_GS: "invertible\<^sub>L (Q_GS d)" for d
lemma fbox_antitone_var: "x \<le> y \<Longrightarrow> |y] z \<le> |x] z"
lemma overlap_imp_same: assumes "u \<in> \<C>" "v \<in> \<C>" and "p \<cdot> u \<bowtie> q \<cdot> v" and "\<^bold>|p\<^bold>| < \<^bold>|q\<^bold>| + \<^bold>|v\<^bold>|" "\<^bold>|q\<^bold>| < \<^bold>|p\<^bold>| + \<^bold>|u\<^bold>|" shows "u = v"
lemma ccProd_mono1: "S' \<subseteq> S'' \<Longrightarrow> S' G\<times> S \<sqsubseteq> S'' G\<times> S"
lemma bij_betw_partition_of: "bij_betw (\<lambda>R. A // R) {R. equiv A R} {P. partition_on A P}"
lemma trunc_bound_euclE: obtains err where "\<bar>err\<bar> \<le> snd (trunc_bound_eucl p x)" "fst (trunc_bound_eucl p x) = x + err"
lemma lesubstep_union: "\<lbrakk> A\<^sub>1 {\<sqsubseteq>\<^bsub>r\<^esub>} B\<^sub>1; A\<^sub>2 {\<sqsubseteq>\<^bsub>r\<^esub>} B\<^sub>2 \<rbrakk> \<Longrightarrow> A\<^sub>1 \<union> A\<^sub>2 {\<sqsubseteq>\<^bsub>r\<^esub>} B\<^sub>1 \<union> B\<^sub>2"
lemma is_pseudonatural_transformation: shows "pseudonatural_transformation V\<^sub>C H\<^sub>C \<a>\<^sub>C \<i>\<^sub>C src\<^sub>C trg\<^sub>C V\<^sub>D H\<^sub>D \<a>\<^sub>D \<i>\<^sub>D src\<^sub>D trg\<^sub>D F \<Phi>\<^sub>F F \<Phi>\<^sub>F map\<^sub>0 map\<^sub>1"
lemma iso_same_card: "G \<cong> H \<Longrightarrow> card (carrier G) = card (carrier H)"
theorem regexp_ewp: defines P_def: "P(t) \<equiv> \<exists> t'. t \<sim> ro(t) +\<^sub>r t' \<and> ro(t') = 0\<^sub>r" shows "P t"
lemma iT_Plus_neg_iprev: " iprev (n - k) (I \<oplus>- k) = iprev n (I \<down>\<ge> k) - k"
lemma bij_betw_subset_of: assumes "finite A" "finite B" shows "bij_betw (subset_of A) ({f \<in> A \<rightarrow>\<^sub>E B. inj_on f A} // domain_permutation A B) {X. X \<subseteq> B \<and> card X = card A}"
lemma freshBinp_empBinp[simp]: "freshBinp xs x empBinp"
lemma sorted_wrt_less_sum_mono_lowerbound: fixes f :: "nat \<Rightarrow> ('b::ordered_comm_monoid_add)" assumes mono: "\<And>x y. x\<le>y \<Longrightarrow> f x \<le> f y" shows "sorted_wrt (<) ns \<Longrightarrow> (\<Sum>i\<in>{0..<length ns}. f i) \<le> (\<Sum>i\<leftarrow>ns. f i)"
lemma term_beta_trans[trans]: "s \<leftrightarrow> t \<Longrightarrow> t \<rightarrow>\<^sub>\<beta> u \<Longrightarrow> s \<leftrightarrow> u"
lemma lprefix_refl [intro, simp]: "xs \<sqsubseteq> xs"
lemma prime_square_sum_nat_decomp_code [code]: "prime_square_sum_nat_decomp p = (if prime p \<and> (p = 2 \<or> [p = 1] (mod 4)) then the_elem (Set.filter (\<lambda>(x,y). x ^ 2 + y ^ 2 = p) (SIGMA x:{0..p}. {x..p})) else (0, 0))"
lemma lfinite_Sts: "lfinite Sts"
lemma RDirProd_list_iso1: "(\<lambda>(a, as). a # as) \<in> ring_iso (RDirProd R (RDirProd_list Rs)) (RDirProd_list (R # Rs))"
lemma nn_transfer_operator_mono: assumes "AE x in M. f x \<le> g x" and [measurable]: "f \<in> borel_measurable M" "g \<in> borel_measurable M" shows "AE x in M. nn_transfer_operator f x \<le> nn_transfer_operator g x"
lemma list_of_oalist_empty [simp, code abstract]: "list_of_oalist (empty ko) = ([], ko)"
lemma aux6: assumes "a \<in># wait" "start_subsumed passed wait" "set_mset wait' = set_mset (wait - {#a#}) \<union> Collect (E a)" shows "start_subsumed (insert a passed) wait'"
lemma (in Order) ord_isom_le_forall:"\<lbrakk>Order E; ord_isom D E f\<rbrakk> \<Longrightarrow> \<forall>a \<in> carrier D. \<forall> b \<in> carrier D. (a \<preceq> b) = ((f a) \<preceq>\<^bsub>E\<^esub> (f b))"
lemma bind_mono_strong: assumes "mono_state m" assumes "\<And>x s s'. run_state m s = (x, s') \<Longrightarrow> mono_state (f x)" shows "mono_state (bind m f)"
lemma oconf_hext: "P,h \<turnstile> obj \<surd> \<Longrightarrow> h \<unlhd> h' \<Longrightarrow> P,h' \<turnstile> obj \<surd>"
lemma nempty_sl_in_state_set: fixes sl assumes "sl \<noteq> []" shows "sl \<in> state_set sl"
lemma height_ge_one: shows "1 \<le> (height e)"
lemma bnt_flip_is_iso_ntcf'[cat_cs_intros]: assumes "category \<alpha> \<AA>" and "category \<alpha> \<BB>" and "\<NN> : \<SS> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>i\<^sub>s\<^sub>o \<SS>' : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> = bifunctor_flip \<AA> \<BB> \<SS>" and "\<GG> = bifunctor_flip \<AA> \<BB> \<SS>'" and "\<DD> = \<BB> \<times>\<^sub>C \<AA>" shows "bnt_flip \<AA> \<BB> \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>i\<^sub>s\<^sub>o \<GG> : \<DD> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
lemma Or\<^sub>n_empty[simp]: "Or\<^sub>n {} = False_ltln"
lemma sucs_encoding_inv: "sucs_decoding \<circ> sucs_encoding = id"
lemma slice1_param_in_slice1: "\<lbrakk>nx \<in> sum_SDG_slice1 n; n s-p:V\<rightarrow>\<^bsub>in\<^esub> n'\<rbrakk> \<Longrightarrow> nx \<in> sum_SDG_slice1 n'"
lemma maxim_mono: "\<lbrakk>X \<subseteq> Y; finite Y; X \<noteq> {}; Y \<subseteq> Field r\<rbrakk> \<Longrightarrow> (maxim X, maxim Y) \<in> r"
lemma "P a \<Longrightarrow> \<exists>A. (\<forall>x \<in> A. P x) \<and> (\<exists>y. y \<in> A)" \<comment> \<open>Example 3.\<close>
lemma validFrom_comp: "validFrom s tr \<Longrightarrow> comp s tr"
lemma somewhere_leq: "v \<le> v' \<longleftrightarrow> (\<exists>v1 v2 v3 vl vr vu vd. (v'=vl\<parallel>v1) \<and> (v1=v2\<parallel>vr) \<and> (v2=vd--v3) \<and> (v3=v--vu))"
lemma take_apply_is_hom: shows "take_apply (n + k) k \<in> ring_hom (SA k) (SA (n + k))"
lemma cl_idem [simp]: "cl L (cl L r) = cl L r"
lemma ereal_add_diff_cancel: fixes a b :: ereal shows "\<bar>b\<bar> \<noteq> \<infinity> \<Longrightarrow> (a + b) - b = a"
lemma join_ir_nth [simp]: "i < length is \<Longrightarrow> join_ir is r (I i) = Some (is ! i)"
lemma module_hom_neg: "module_hom s1 s2 f \<Longrightarrow> module_hom s1 s2 (\<lambda>x. - f x)"
lemma chamber_card: "chamber C \<Longrightarrow> chamber D \<Longrightarrow> card C = card D"
lemma mset_map_remdups_gen: "mset (map f (remdups_gen f xs)) = mset (remdups_gen (\<lambda>x. x) (map f xs))"
lemma compose_surj: "\<lbrakk>f:A \<rightarrow> B; surj_to f A B; g : B \<rightarrow> C; surj_to g B C \<rbrakk> \<Longrightarrow> surj_to (compose A g f) A C "
lemma filter_compliant_stateful_ACS_subseteq_input: "set (filter_compliant_stateful_ACS G M Es) \<subseteq> set Es"
lemma upto_rec2: "i \<le> j \<Longrightarrow> [i..j] = [i..j - 1]@[j]"
lemma pos_cons [simp]: "xs \<noteq> [] \<longrightarrow> pos (x#xs) = (if (x>0) then pos xs else False)" (is "?P x xs" is "?A xs \<longrightarrow> ?S x xs")
lemma c_IKKBZ_cf'_eq': "valid_tree t \<Longrightarrow> c_IKKBZ h cf' sf t = c_IKKBZ h cf sf t"
lemma inj_map_total[simp]: "inj_map (Some o \<pi>) = inj \<pi>"
lemma ordered_subdag: "\<lbrakk>ordered t var; not <= t\<rbrakk> \<Longrightarrow> ordered not var" for not
lemma chain_mono: assumes "R' \<subseteq> R" "chain R' seq" shows "chain R seq"
lemma os_distincts: assumes "A B OS X Y" shows "A \<noteq> B \<and> A \<noteq> X \<and> A \<noteq> Y \<and> B \<noteq> X \<and> B \<noteq> Y"
lemma infsetsum_nat: assumes "f abs_summable_on A" shows "infsetsum f A = (\<Sum>n. if n \<in> A then f n else 0)"
lemma "nats = (\<lambda>n. n \<in> {0, 1, 2, 3, 4})"