--- a/src/HOL/HOLCF/Library/Stream.thy Mon Jul 25 14:02:29 2016 +0200
+++ b/src/HOL/HOLCF/Library/Stream.thy Mon Jul 25 21:50:04 2016 +0200
@@ -29,27 +29,26 @@
(* concatenation *)
definition
- i_rt :: "nat => 'a stream => 'a stream" where (* chops the first i elements *)
- "i_rt = (%i s. iterate i$rt$s)"
+ i_rt :: "nat \<Rightarrow> 'a stream \<Rightarrow> 'a stream" where (* chops the first i elements *)
+ "i_rt = (\<lambda>i s. iterate i\<cdot>rt\<cdot>s)"
definition
- i_th :: "nat => 'a stream => 'a" where (* the i-th element *)
- "i_th = (%i s. ft$(i_rt i s))"
+ i_th :: "nat \<Rightarrow> 'a stream \<Rightarrow> 'a" where (* the i-th element *)
+ "i_th = (\<lambda>i s. ft\<cdot>(i_rt i s))"
definition
- sconc :: "'a stream => 'a stream => 'a stream" (infixr "ooo" 65) where
+ sconc :: "'a stream \<Rightarrow> 'a stream \<Rightarrow> 'a stream" (infixr "ooo" 65) where
"s1 ooo s2 = (case #s1 of
- enat n \<Rightarrow> (SOME s. (stream_take n$s=s1) & (i_rt n s = s2))
+ enat n \<Rightarrow> (SOME s. (stream_take n\<cdot>s = s1) \<and> (i_rt n s = s2))
| \<infinity> \<Rightarrow> s1)"
-primrec constr_sconc' :: "nat => 'a stream => 'a stream => 'a stream"
+primrec constr_sconc' :: "nat \<Rightarrow> 'a stream \<Rightarrow> 'a stream \<Rightarrow> 'a stream"
where
constr_sconc'_0: "constr_sconc' 0 s1 s2 = s2"
-| constr_sconc'_Suc: "constr_sconc' (Suc n) s1 s2 = ft$s1 &&
- constr_sconc' n (rt$s1) s2"
+| constr_sconc'_Suc: "constr_sconc' (Suc n) s1 s2 = ft\<cdot>s1 && constr_sconc' n (rt\<cdot>s1) s2"
definition
- constr_sconc :: "'a stream => 'a stream => 'a stream" where (* constructive *)
+ constr_sconc :: "'a stream \<Rightarrow> 'a stream \<Rightarrow> 'a stream" where (* constructive *)
"constr_sconc s1 s2 = (case #s1 of
enat n \<Rightarrow> constr_sconc' n s1 s2
| \<infinity> \<Rightarrow> s1)"
@@ -65,33 +64,33 @@
lemma scons_eq_UU: "(a && s = UU) = (a = UU)"
by simp
-lemma scons_not_empty: "[| a && x = UU; a ~= UU |] ==> R"
+lemma scons_not_empty: "\<lbrakk>a && x = UU; a \<noteq> UU\<rbrakk> \<Longrightarrow> R"
by simp
-lemma stream_exhaust_eq: "(x ~= UU) = (EX a y. a ~= UU & x = a && y)"
+lemma stream_exhaust_eq: "x \<noteq> UU \<longleftrightarrow> (\<exists>a y. a \<noteq> UU \<and> x = a && y)"
by (cases x, auto)
-lemma stream_neq_UU: "x~=UU ==> EX a a_s. x=a&&a_s & a~=UU"
+lemma stream_neq_UU: "x \<noteq> UU \<Longrightarrow> \<exists>a a_s. x = a && a_s \<and> a \<noteq> UU"
by (simp add: stream_exhaust_eq,auto)
lemma stream_prefix:
- "[| a && s << t; a ~= UU |] ==> EX b tt. t = b && tt & b ~= UU & s << tt"
+ "\<lbrakk>a && s \<sqsubseteq> t; a \<noteq> UU\<rbrakk> \<Longrightarrow> \<exists>b tt. t = b && tt \<and> b \<noteq> UU \<and> s \<sqsubseteq> tt"
by (cases t, auto)
lemma stream_prefix':
- "b ~= UU ==> x << b && z =
- (x = UU | (EX a y. x = a && y & a ~= UU & a << b & y << z))"
+ "b \<noteq> UU \<Longrightarrow> x \<sqsubseteq> b && z =
+ (x = UU \<or> (\<exists>a y. x = a && y \<and> a \<noteq> UU \<and> a \<sqsubseteq> b \<and> y \<sqsubseteq> z))"
by (cases x, auto)
(*
-lemma stream_prefix1: "[| x<<y; xs<<ys |] ==> x&&xs << y&&ys"
-by (insert stream_prefix' [of y "x&&xs" ys],force)
+lemma stream_prefix1: "\<lbrakk>x \<sqsubseteq> y; xs \<sqsubseteq> ys\<rbrakk> \<Longrightarrow> x && xs \<sqsubseteq> y && ys"
+by (insert stream_prefix' [of y "x && xs" ys],force)
*)
lemma stream_flat_prefix:
- "[| x && xs << y && ys; (x::'a::flat) ~= UU|] ==> x = y & xs << ys"
-apply (case_tac "y=UU",auto)
+ "\<lbrakk>x && xs \<sqsubseteq> y && ys; (x::'a::flat) \<noteq> UU\<rbrakk> \<Longrightarrow> x = y \<and> xs \<sqsubseteq> ys"
+apply (case_tac "y = UU",auto)
apply (drule ax_flat,simp)
done
@@ -105,7 +104,7 @@
section "stream_case"
-lemma stream_case_strictf: "stream_case$UU$s=UU"
+lemma stream_case_strictf: "stream_case\<cdot>UU\<cdot>s = UU"
by (cases s, auto)
@@ -115,19 +114,19 @@
(* ----------------------------------------------------------------------- *)
-section "ft & rt"
+section "ft and rt"
-lemma ft_defin: "s~=UU ==> ft$s~=UU"
+lemma ft_defin: "s \<noteq> UU \<Longrightarrow> ft\<cdot>s \<noteq> UU"
by simp
-lemma rt_strict_rev: "rt$s~=UU ==> s~=UU"
+lemma rt_strict_rev: "rt\<cdot>s \<noteq> UU \<Longrightarrow> s \<noteq> UU"
by auto
-lemma surjectiv_scons: "(ft$s)&&(rt$s)=s"
+lemma surjectiv_scons: "(ft\<cdot>s) && (rt\<cdot>s) = s"
by (cases s, auto)
-lemma monofun_rt_mult: "x << s ==> iterate i$rt$x << iterate i$rt$s"
+lemma monofun_rt_mult: "x \<sqsubseteq> s \<Longrightarrow> iterate i\<cdot>rt\<cdot>x \<sqsubseteq> iterate i\<cdot>rt\<cdot>s"
by (rule monofun_cfun_arg)
@@ -140,13 +139,13 @@
section "stream_take"
-lemma stream_reach2: "(LUB i. stream_take i$s) = s"
+lemma stream_reach2: "(LUB i. stream_take i\<cdot>s) = s"
by (rule stream.reach)
-lemma chain_stream_take: "chain (%i. stream_take i$s)"
+lemma chain_stream_take: "chain (\<lambda>i. stream_take i\<cdot>s)"
by simp
-lemma stream_take_prefix [simp]: "stream_take n$s << s"
+lemma stream_take_prefix [simp]: "stream_take n\<cdot>s \<sqsubseteq> s"
apply (insert stream_reach2 [of s])
apply (erule subst) back
apply (rule is_ub_thelub)
@@ -154,14 +153,14 @@
done
lemma stream_take_more [rule_format]:
- "ALL x. stream_take n$x = x --> stream_take (Suc n)$x = x"
+ "\<forall>x. stream_take n\<cdot>x = x \<longrightarrow> stream_take (Suc n)\<cdot>x = x"
apply (induct_tac n,auto)
apply (case_tac "x=UU",auto)
apply (drule stream_exhaust_eq [THEN iffD1],auto)
done
lemma stream_take_lemma3 [rule_format]:
- "ALL x xs. x~=UU --> stream_take n$(x && xs) = x && xs --> stream_take n$xs=xs"
+ "\<forall>x xs. x \<noteq> UU \<longrightarrow> stream_take n\<cdot>(x && xs) = x && xs \<longrightarrow> stream_take n\<cdot>xs = xs"
apply (induct_tac n,clarsimp)
(*apply (drule sym, erule scons_not_empty, simp)*)
apply (clarify, rule stream_take_more)
@@ -170,62 +169,60 @@
done
lemma stream_take_lemma4:
- "ALL x xs. stream_take n$xs=xs --> stream_take (Suc n)$(x && xs) = x && xs"
+ "\<forall>x xs. stream_take n\<cdot>xs = xs \<longrightarrow> stream_take (Suc n)\<cdot>(x && xs) = x && xs"
by auto
lemma stream_take_idempotent [rule_format, simp]:
- "ALL s. stream_take n$(stream_take n$s) = stream_take n$s"
+ "\<forall>s. stream_take n\<cdot>(stream_take n\<cdot>s) = stream_take n\<cdot>s"
apply (induct_tac n, auto)
apply (case_tac "s=UU", auto)
apply (drule stream_exhaust_eq [THEN iffD1], auto)
done
lemma stream_take_take_Suc [rule_format, simp]:
- "ALL s. stream_take n$(stream_take (Suc n)$s) =
- stream_take n$s"
+ "\<forall>s. stream_take n\<cdot>(stream_take (Suc n)\<cdot>s) = stream_take n\<cdot>s"
apply (induct_tac n, auto)
apply (case_tac "s=UU", auto)
apply (drule stream_exhaust_eq [THEN iffD1], auto)
done
lemma mono_stream_take_pred:
- "stream_take (Suc n)$s1 << stream_take (Suc n)$s2 ==>
- stream_take n$s1 << stream_take n$s2"
-by (insert monofun_cfun_arg [of "stream_take (Suc n)$s1"
- "stream_take (Suc n)$s2" "stream_take n"], auto)
+ "stream_take (Suc n)\<cdot>s1 \<sqsubseteq> stream_take (Suc n)\<cdot>s2 \<Longrightarrow>
+ stream_take n\<cdot>s1 \<sqsubseteq> stream_take n\<cdot>s2"
+by (insert monofun_cfun_arg [of "stream_take (Suc n)\<cdot>s1"
+ "stream_take (Suc n)\<cdot>s2" "stream_take n"], auto)
(*
lemma mono_stream_take_pred:
- "stream_take (Suc n)$s1 << stream_take (Suc n)$s2 ==>
- stream_take n$s1 << stream_take n$s2"
+ "stream_take (Suc n)\<cdot>s1 \<sqsubseteq> stream_take (Suc n)\<cdot>s2 \<Longrightarrow>
+ stream_take n\<cdot>s1 \<sqsubseteq> stream_take n\<cdot>s2"
by (drule mono_stream_take [of _ _ n],simp)
*)
lemma stream_take_lemma10 [rule_format]:
- "ALL k<=n. stream_take n$s1 << stream_take n$s2
- --> stream_take k$s1 << stream_take k$s2"
+ "\<forall>k\<le>n. stream_take n\<cdot>s1 \<sqsubseteq> stream_take n\<cdot>s2 \<longrightarrow> stream_take k\<cdot>s1 \<sqsubseteq> stream_take k\<cdot>s2"
apply (induct_tac n,simp,clarsimp)
apply (case_tac "k=Suc n",blast)
apply (erule_tac x="k" in allE)
apply (drule mono_stream_take_pred,simp)
done
-lemma stream_take_le_mono : "k<=n ==> stream_take k$s1 << stream_take n$s1"
+lemma stream_take_le_mono : "k \<le> n \<Longrightarrow> stream_take k\<cdot>s1 \<sqsubseteq> stream_take n\<cdot>s1"
apply (insert chain_stream_take [of s1])
apply (drule chain_mono,auto)
done
-lemma mono_stream_take: "s1 << s2 ==> stream_take n$s1 << stream_take n$s2"
+lemma mono_stream_take: "s1 \<sqsubseteq> s2 \<Longrightarrow> stream_take n\<cdot>s1 \<sqsubseteq> stream_take n\<cdot>s2"
by (simp add: monofun_cfun_arg)
(*
-lemma stream_take_prefix [simp]: "stream_take n$s << s"
-apply (subgoal_tac "s=(LUB n. stream_take n$s)")
+lemma stream_take_prefix [simp]: "stream_take n\<cdot>s \<sqsubseteq> s"
+apply (subgoal_tac "s=(LUB n. stream_take n\<cdot>s)")
apply (erule ssubst, rule is_ub_thelub)
apply (simp only: chain_stream_take)
by (simp only: stream_reach2)
*)
-lemma stream_take_take_less:"stream_take k$(stream_take n$s) << stream_take k$s"
+lemma stream_take_take_less:"stream_take k\<cdot>(stream_take n\<cdot>s) \<sqsubseteq> stream_take k\<cdot>s"
by (rule monofun_cfun_arg,auto)
@@ -237,15 +234,15 @@
section "induction"
lemma stream_finite_ind:
- "[| stream_finite x; P UU; !!a s. [| a ~= UU; P s |] ==> P (a && s) |] ==> P x"
+ "\<lbrakk>stream_finite x; P UU; \<And>a s. \<lbrakk>a \<noteq> UU; P s\<rbrakk> \<Longrightarrow> P (a && s)\<rbrakk> \<Longrightarrow> P x"
apply (simp add: stream.finite_def,auto)
apply (erule subst)
apply (drule stream.finite_induct [of P _ x], auto)
done
lemma stream_finite_ind2:
-"[| P UU; !! x. x ~= UU ==> P (x && UU); !! y z s. [| y ~= UU; z ~= UU; P s |] ==> P (y && z && s )|] ==>
- !s. P (stream_take n$s)"
+ "\<lbrakk>P UU; \<And>x. x \<noteq> UU \<Longrightarrow> P (x && UU); \<And>y z s. \<lbrakk>y \<noteq> UU; z \<noteq> UU; P s\<rbrakk> \<Longrightarrow> P (y && z && s)\<rbrakk> \<Longrightarrow>
+ \<forall>s. P (stream_take n\<cdot>s)"
apply (rule nat_less_induct [of _ n],auto)
apply (case_tac n, auto)
apply (case_tac nat, auto)
@@ -258,7 +255,7 @@
done
lemma stream_ind2:
-"[| adm P; P UU; !!a. a ~= UU ==> P (a && UU); !!a b s. [| a ~= UU; b ~= UU; P s |] ==> P (a && b && s) |] ==> P x"
+"\<lbrakk> adm P; P UU; \<And>a. a \<noteq> UU \<Longrightarrow> P (a && UU); \<And>a b s. \<lbrakk>a \<noteq> UU; b \<noteq> UU; P s\<rbrakk> \<Longrightarrow> P (a && b && s)\<rbrakk> \<Longrightarrow> P x"
apply (insert stream.reach [of x],erule subst)
apply (erule admD, rule chain_stream_take)
apply (insert stream_finite_ind2 [of P])
@@ -273,7 +270,7 @@
section "coinduction"
-lemma stream_coind_lemma2: "!s1 s2. R s1 s2 --> ft$s1 = ft$s2 & R (rt$s1) (rt$s2) ==> stream_bisim R"
+lemma stream_coind_lemma2: "\<forall>s1 s2. R s1 s2 \<longrightarrow> ft\<cdot>s1 = ft\<cdot>s2 \<and> R (rt\<cdot>s1) (rt\<cdot>s2) \<Longrightarrow> stream_bisim R"
apply (simp add: stream.bisim_def,clarsimp)
apply (drule spec, drule spec, drule (1) mp)
apply (case_tac "x", simp)
@@ -293,29 +290,29 @@
lemma stream_finite_UU [simp]: "stream_finite UU"
by (simp add: stream.finite_def)
-lemma stream_finite_UU_rev: "~ stream_finite s ==> s ~= UU"
+lemma stream_finite_UU_rev: "\<not> stream_finite s \<Longrightarrow> s \<noteq> UU"
by (auto simp add: stream.finite_def)
-lemma stream_finite_lemma1: "stream_finite xs ==> stream_finite (x && xs)"
+lemma stream_finite_lemma1: "stream_finite xs \<Longrightarrow> stream_finite (x && xs)"
apply (simp add: stream.finite_def,auto)
apply (rule_tac x="Suc n" in exI)
apply (simp add: stream_take_lemma4)
done
-lemma stream_finite_lemma2: "[| x ~= UU; stream_finite (x && xs) |] ==> stream_finite xs"
+lemma stream_finite_lemma2: "\<lbrakk>x \<noteq> UU; stream_finite (x && xs)\<rbrakk> \<Longrightarrow> stream_finite xs"
apply (simp add: stream.finite_def, auto)
apply (rule_tac x="n" in exI)
apply (erule stream_take_lemma3,simp)
done
-lemma stream_finite_rt_eq: "stream_finite (rt$s) = stream_finite s"
+lemma stream_finite_rt_eq: "stream_finite (rt\<cdot>s) = stream_finite s"
apply (cases s, auto)
apply (rule stream_finite_lemma1, simp)
apply (rule stream_finite_lemma2,simp)
apply assumption
done
-lemma stream_finite_less: "stream_finite s ==> !t. t<<s --> stream_finite t"
+lemma stream_finite_less: "stream_finite s \<Longrightarrow> \<forall>t. t \<sqsubseteq> s \<longrightarrow> stream_finite t"
apply (erule stream_finite_ind [of s], auto)
apply (case_tac "t=UU", auto)
apply (drule stream_exhaust_eq [THEN iffD1],auto)
@@ -323,12 +320,12 @@
apply (rule stream_finite_lemma1, simp)
done
-lemma stream_take_finite [simp]: "stream_finite (stream_take n$s)"
+lemma stream_take_finite [simp]: "stream_finite (stream_take n\<cdot>s)"
apply (simp add: stream.finite_def)
apply (rule_tac x="n" in exI,simp)
done
-lemma adm_not_stream_finite: "adm (%x. ~ stream_finite x)"
+lemma adm_not_stream_finite: "adm (\<lambda>x. \<not> stream_finite x)"
apply (rule adm_upward)
apply (erule contrapos_nn)
apply (erule (1) stream_finite_less [rule_format])
@@ -346,7 +343,7 @@
lemma slen_empty [simp]: "#\<bottom> = 0"
by (simp add: slen_def stream.finite_def zero_enat_def Least_equality)
-lemma slen_scons [simp]: "x ~= \<bottom> ==> #(x&&xs) = eSuc (#xs)"
+lemma slen_scons [simp]: "x \<noteq> \<bottom> \<Longrightarrow> #(x && xs) = eSuc (#xs)"
apply (case_tac "stream_finite (x && xs)")
apply (simp add: slen_def, auto)
apply (simp add: stream.finite_def, auto simp add: eSuc_enat)
@@ -364,20 +361,20 @@
lemma slen_empty_eq: "(#x = 0) = (x = \<bottom>)"
by (cases x) auto
-lemma slen_scons_eq: "(enat (Suc n) < #x) = (? a y. x = a && y & a ~= \<bottom> & enat n < #y)"
+lemma slen_scons_eq: "(enat (Suc n) < #x) = (? a y. x = a && y \<and> a \<noteq> \<bottom> \<and> enat n < #y)"
apply (auto, case_tac "x=UU",auto)
apply (drule stream_exhaust_eq [THEN iffD1], auto)
apply (case_tac "#y") apply simp_all
apply (case_tac "#y") apply simp_all
done
-lemma slen_eSuc: "#x = eSuc n --> (? a y. x = a&&y & a ~= \<bottom> & #y = n)"
+lemma slen_eSuc: "#x = eSuc n \<longrightarrow> (\<exists>a y. x = a && y \<and> a \<noteq> \<bottom> \<and> #y = n)"
by (cases x) auto
-lemma slen_stream_take_finite [simp]: "#(stream_take n$s) ~= \<infinity>"
+lemma slen_stream_take_finite [simp]: "#(stream_take n\<cdot>s) \<noteq> \<infinity>"
by (simp add: slen_def)
-lemma slen_scons_eq_rev: "(#x < enat (Suc (Suc n))) = (!a y. x ~= a && y | a = \<bottom> | #y < enat (Suc n))"
+lemma slen_scons_eq_rev: "#x < enat (Suc (Suc n)) \<longleftrightarrow> (\<forall>a y. x \<noteq> a && y \<or> a = \<bottom> \<or> #y < enat (Suc n))"
apply (cases x, auto)
apply (simp add: zero_enat_def)
apply (case_tac "#stream") apply (simp_all add: eSuc_enat)
@@ -385,7 +382,7 @@
done
lemma slen_take_lemma4 [rule_format]:
- "!s. stream_take n$s ~= s --> #(stream_take n$s) = enat n"
+ "\<forall>s. stream_take n\<cdot>s \<noteq> s \<longrightarrow> #(stream_take n\<cdot>s) = enat n"
apply (induct n, auto simp add: enat_0)
apply (case_tac "s=UU", simp)
apply (drule stream_exhaust_eq [THEN iffD1], auto simp add: eSuc_enat)
@@ -393,23 +390,23 @@
(*
lemma stream_take_idempotent [simp]:
- "stream_take n$(stream_take n$s) = stream_take n$s"
-apply (case_tac "stream_take n$s = s")
+ "stream_take n\<cdot>(stream_take n\<cdot>s) = stream_take n\<cdot>s"
+apply (case_tac "stream_take n\<cdot>s = s")
apply (auto,insert slen_take_lemma4 [of n s]);
-by (auto,insert slen_take_lemma1 [of "stream_take n$s" n],simp)
+by (auto,insert slen_take_lemma1 [of "stream_take n\<cdot>s" n],simp)
-lemma stream_take_take_Suc [simp]: "stream_take n$(stream_take (Suc n)$s) =
- stream_take n$s"
+lemma stream_take_take_Suc [simp]: "stream_take n\<cdot>(stream_take (Suc n)\<cdot>s) =
+ stream_take n\<cdot>s"
apply (simp add: po_eq_conv,auto)
apply (simp add: stream_take_take_less)
-apply (subgoal_tac "stream_take n$s = stream_take n$(stream_take n$s)")
+apply (subgoal_tac "stream_take n\<cdot>s = stream_take n\<cdot>(stream_take n\<cdot>s)")
apply (erule ssubst)
apply (rule_tac monofun_cfun_arg)
apply (insert chain_stream_take [of s])
by (simp add: chain_def,simp)
*)
-lemma slen_take_eq: "ALL x. (enat n < #x) = (stream_take n\<cdot>x ~= x)"
+lemma slen_take_eq: "\<forall>x. enat n < #x \<longleftrightarrow> stream_take n\<cdot>x \<noteq> x"
apply (induct_tac n, auto)
apply (simp add: enat_0, clarsimp)
apply (drule not_sym)
@@ -426,38 +423,38 @@
apply simp_all
done
-lemma slen_take_eq_rev: "(#x <= enat n) = (stream_take n\<cdot>x = x)"
+lemma slen_take_eq_rev: "#x \<le> enat n \<longleftrightarrow> stream_take n\<cdot>x = x"
by (simp add: linorder_not_less [symmetric] slen_take_eq)
-lemma slen_take_lemma1: "#x = enat n ==> stream_take n\<cdot>x = x"
+lemma slen_take_lemma1: "#x = enat n \<Longrightarrow> stream_take n\<cdot>x = x"
by (rule slen_take_eq_rev [THEN iffD1], auto)
-lemma slen_rt_mono: "#s2 <= #s1 ==> #(rt$s2) <= #(rt$s1)"
+lemma slen_rt_mono: "#s2 \<le> #s1 \<Longrightarrow> #(rt\<cdot>s2) \<le> #(rt\<cdot>s1)"
apply (cases s1)
apply (cases s2, simp+)+
done
-lemma slen_take_lemma5: "#(stream_take n$s) <= enat n"
-apply (case_tac "stream_take n$s = s")
+lemma slen_take_lemma5: "#(stream_take n\<cdot>s) \<le> enat n"
+apply (case_tac "stream_take n\<cdot>s = s")
apply (simp add: slen_take_eq_rev)
apply (simp add: slen_take_lemma4)
done
-lemma slen_take_lemma2: "!x. ~stream_finite x --> #(stream_take i\<cdot>x) = enat i"
+lemma slen_take_lemma2: "\<forall>x. \<not> stream_finite x \<longrightarrow> #(stream_take i\<cdot>x) = enat i"
apply (simp add: stream.finite_def, auto)
apply (simp add: slen_take_lemma4)
done
-lemma slen_infinite: "stream_finite x = (#x ~= \<infinity>)"
+lemma slen_infinite: "stream_finite x \<longleftrightarrow> #x \<noteq> \<infinity>"
by (simp add: slen_def)
-lemma slen_mono_lemma: "stream_finite s ==> ALL t. s << t --> #s <= #t"
+lemma slen_mono_lemma: "stream_finite s \<Longrightarrow> \<forall>t. s \<sqsubseteq> t \<longrightarrow> #s \<le> #t"
apply (erule stream_finite_ind [of s], auto)
-apply (case_tac "t=UU", auto)
+apply (case_tac "t = UU", auto)
apply (drule stream_exhaust_eq [THEN iffD1], auto)
done
-lemma slen_mono: "s << t ==> #s <= #t"
+lemma slen_mono: "s \<sqsubseteq> t \<Longrightarrow> #s \<le> #t"
apply (case_tac "stream_finite t")
apply (frule stream_finite_less)
apply (erule_tac x="s" in allE, simp)
@@ -465,20 +462,20 @@
apply (simp add: slen_def)
done
-lemma iterate_lemma: "F$(iterate n$F$x) = iterate n$F$(F$x)"
+lemma iterate_lemma: "F\<cdot>(iterate n\<cdot>F\<cdot>x) = iterate n\<cdot>F\<cdot>(F\<cdot>x)"
by (insert iterate_Suc2 [of n F x], auto)
-lemma slen_rt_mult [rule_format]: "!x. enat (i + j) <= #x --> enat j <= #(iterate i$rt$x)"
+lemma slen_rt_mult [rule_format]: "\<forall>x. enat (i + j) \<le> #x \<longrightarrow> enat j \<le> #(iterate i\<cdot>rt\<cdot>x)"
apply (induct i, auto)
-apply (case_tac "x=UU", auto simp add: zero_enat_def)
+apply (case_tac "x = UU", auto simp add: zero_enat_def)
apply (drule stream_exhaust_eq [THEN iffD1], auto)
-apply (erule_tac x="y" in allE, auto)
+apply (erule_tac x = "y" in allE, auto)
apply (simp add: not_le) apply (case_tac "#y") apply (simp_all add: eSuc_enat)
apply (simp add: iterate_lemma)
done
lemma slen_take_lemma3 [rule_format]:
- "!(x::'a::flat stream) y. enat n <= #x --> x << y --> stream_take n\<cdot>x = stream_take n\<cdot>y"
+ "\<forall>(x::'a::flat stream) y. enat n \<le> #x \<longrightarrow> x \<sqsubseteq> y \<longrightarrow> stream_take n\<cdot>x = stream_take n\<cdot>y"
apply (induct_tac n, auto)
apply (case_tac "x=UU", auto)
apply (simp add: zero_enat_def)
@@ -489,20 +486,20 @@
by (drule ax_flat, simp)
lemma slen_strict_mono_lemma:
- "stream_finite t ==> !s. #(s::'a::flat stream) = #t & s << t --> s = t"
+ "stream_finite t \<Longrightarrow> \<forall>s. #(s::'a::flat stream) = #t \<and> s \<sqsubseteq> t \<longrightarrow> s = t"
apply (erule stream_finite_ind, auto)
-apply (case_tac "sa=UU", auto)
+apply (case_tac "sa = UU", auto)
apply (drule stream_exhaust_eq [THEN iffD1], clarsimp)
apply (drule ax_flat, simp)
done
-lemma slen_strict_mono: "[|stream_finite t; s ~= t; s << (t::'a::flat stream) |] ==> #s < #t"
+lemma slen_strict_mono: "\<lbrakk>stream_finite t; s \<noteq> t; s \<sqsubseteq> (t::'a::flat stream)\<rbrakk> \<Longrightarrow> #s < #t"
by (auto simp add: slen_mono less_le dest: slen_strict_mono_lemma)
-lemma stream_take_Suc_neq: "stream_take (Suc n)$s ~=s ==>
- stream_take n$s ~= stream_take (Suc n)$s"
+lemma stream_take_Suc_neq: "stream_take (Suc n)\<cdot>s \<noteq> s \<Longrightarrow>
+ stream_take n\<cdot>s \<noteq> stream_take (Suc n)\<cdot>s"
apply auto
-apply (subgoal_tac "stream_take n$s ~=s")
+apply (subgoal_tac "stream_take n\<cdot>s \<noteq> s")
apply (insert slen_take_lemma4 [of n s],auto)
apply (cases s, simp)
apply (simp add: slen_take_lemma4 eSuc_enat)
@@ -515,13 +512,13 @@
section "smap"
-lemma smap_unfold: "smap = (\<Lambda> f t. case t of x&&xs \<Rightarrow> f$x && smap$f$xs)"
+lemma smap_unfold: "smap = (\<Lambda> f t. case t of x && xs \<Rightarrow> f\<cdot>x && smap\<cdot>f\<cdot>xs)"
by (insert smap_def [where 'a='a and 'b='b, THEN eq_reflection, THEN fix_eq2], auto)
lemma smap_empty [simp]: "smap\<cdot>f\<cdot>\<bottom> = \<bottom>"
by (subst smap_unfold, simp)
-lemma smap_scons [simp]: "x~=\<bottom> ==> smap\<cdot>f\<cdot>(x&&xs) = (f\<cdot>x)&&(smap\<cdot>f\<cdot>xs)"
+lemma smap_scons [simp]: "x \<noteq> \<bottom> \<Longrightarrow> smap\<cdot>f\<cdot>(x && xs) = (f\<cdot>x) && (smap\<cdot>f\<cdot>xs)"
by (subst smap_unfold, force)
@@ -548,7 +545,7 @@
by (subst sfilter_unfold, force)
lemma sfilter_scons [simp]:
- "x ~= \<bottom> ==> sfilter\<cdot>f\<cdot>(x && xs) =
+ "x \<noteq> \<bottom> \<Longrightarrow> sfilter\<cdot>f\<cdot>(x && xs) =
If f\<cdot>x then x && sfilter\<cdot>f\<cdot>xs else sfilter\<cdot>f\<cdot>xs"
by (subst sfilter_unfold, force)
@@ -563,39 +560,39 @@
lemma i_rt_0 [simp]: "i_rt 0 s = s"
by (simp add: i_rt_def)
-lemma i_rt_Suc [simp]: "a ~= UU ==> i_rt (Suc n) (a&&s) = i_rt n s"
+lemma i_rt_Suc [simp]: "a \<noteq> UU \<Longrightarrow> i_rt (Suc n) (a&&s) = i_rt n s"
by (simp add: i_rt_def iterate_Suc2 del: iterate_Suc)
-lemma i_rt_Suc_forw: "i_rt (Suc n) s = i_rt n (rt$s)"
+lemma i_rt_Suc_forw: "i_rt (Suc n) s = i_rt n (rt\<cdot>s)"
by (simp only: i_rt_def iterate_Suc2)
-lemma i_rt_Suc_back:"i_rt (Suc n) s = rt$(i_rt n s)"
+lemma i_rt_Suc_back: "i_rt (Suc n) s = rt\<cdot>(i_rt n s)"
by (simp only: i_rt_def,auto)
-lemma i_rt_mono: "x << s ==> i_rt n x << i_rt n s"
+lemma i_rt_mono: "x << s \<Longrightarrow> i_rt n x << i_rt n s"
by (simp add: i_rt_def monofun_rt_mult)
-lemma i_rt_ij_lemma: "enat (i + j) <= #x ==> enat j <= #(i_rt i x)"
+lemma i_rt_ij_lemma: "enat (i + j) \<le> #x \<Longrightarrow> enat j \<le> #(i_rt i x)"
by (simp add: i_rt_def slen_rt_mult)
-lemma slen_i_rt_mono: "#s2 <= #s1 ==> #(i_rt n s2) <= #(i_rt n s1)"
+lemma slen_i_rt_mono: "#s2 \<le> #s1 \<Longrightarrow> #(i_rt n s2) \<le> #(i_rt n s1)"
apply (induct_tac n,auto)
apply (simp add: i_rt_Suc_back)
apply (drule slen_rt_mono,simp)
done
-lemma i_rt_take_lemma1 [rule_format]: "ALL s. i_rt n (stream_take n$s) = UU"
+lemma i_rt_take_lemma1 [rule_format]: "\<forall>s. i_rt n (stream_take n\<cdot>s) = UU"
apply (induct_tac n)
apply (simp add: i_rt_Suc_back,auto)
apply (case_tac "s=UU",auto)
apply (drule stream_exhaust_eq [THEN iffD1],auto)
done
-lemma i_rt_slen: "(i_rt n s = UU) = (stream_take n$s = s)"
+lemma i_rt_slen: "i_rt n s = UU \<longleftrightarrow> stream_take n\<cdot>s = s"
apply auto
apply (insert i_rt_ij_lemma [of n "Suc 0" s])
apply (subgoal_tac "#(i_rt n s)=0")
- apply (case_tac "stream_take n$s = s",simp+)
+ apply (case_tac "stream_take n\<cdot>s = s",simp+)
apply (insert slen_take_eq [rule_format,of n s],simp)
apply (cases "#s") apply (simp_all add: zero_enat_def)
apply (simp add: slen_take_eq)
@@ -604,7 +601,7 @@
apply (simp_all add: zero_enat_def)
done
-lemma i_rt_lemma_slen: "#s=enat n ==> i_rt n s = UU"
+lemma i_rt_lemma_slen: "#s=enat n \<Longrightarrow> i_rt n s = UU"
by (simp add: i_rt_slen slen_take_lemma1)
lemma stream_finite_i_rt [simp]: "stream_finite (i_rt n s) = stream_finite s"
@@ -613,15 +610,15 @@
apply (simp add: i_rt_Suc_back stream_finite_rt_eq)+
done
-lemma take_i_rt_len_lemma: "ALL sl x j t. enat sl = #x & n <= sl &
- #(stream_take n$x) = enat t & #(i_rt n x)= enat j
- --> enat (j + t) = #x"
+lemma take_i_rt_len_lemma: "\<forall>sl x j t. enat sl = #x \<and> n \<le> sl \<and>
+ #(stream_take n\<cdot>x) = enat t \<and> #(i_rt n x) = enat j
+ \<longrightarrow> enat (j + t) = #x"
apply (induct n, auto)
apply (simp add: zero_enat_def)
apply (case_tac "x=UU",auto)
apply (simp add: zero_enat_def)
apply (drule stream_exhaust_eq [THEN iffD1],clarsimp)
-apply (subgoal_tac "EX k. enat k = #y",clarify)
+apply (subgoal_tac "\<exists>k. enat k = #y",clarify)
apply (erule_tac x="k" in allE)
apply (erule_tac x="y" in allE,auto)
apply (erule_tac x="THE p. Suc p = t" in allE,auto)
@@ -634,7 +631,7 @@
done
lemma take_i_rt_len:
-"[| enat sl = #x; n <= sl; #(stream_take n$x) = enat t; #(i_rt n x) = enat j |] ==>
+"\<lbrakk>enat sl = #x; n \<le> sl; #(stream_take n\<cdot>x) = enat t; #(i_rt n x) = enat j\<rbrakk> \<Longrightarrow>
enat (j + t) = #x"
by (blast intro: take_i_rt_len_lemma [rule_format])
@@ -652,7 +649,7 @@
done
lemma i_th_stream_take_Suc [rule_format]:
- "ALL s. i_th n (stream_take (Suc n)$s) = i_th n s"
+ "\<forall>s. i_th n (stream_take (Suc n)\<cdot>s) = i_th n s"
apply (induct_tac n,auto)
apply (simp add: i_th_def)
apply (case_tac "s=UU",auto)
@@ -662,21 +659,21 @@
apply (simp add: i_th_def i_rt_Suc_forw)
done
-lemma i_th_last: "i_th n s && UU = i_rt n (stream_take (Suc n)$s)"
-apply (insert surjectiv_scons [of "i_rt n (stream_take (Suc n)$s)"])
+lemma i_th_last: "i_th n s && UU = i_rt n (stream_take (Suc n)\<cdot>s)"
+apply (insert surjectiv_scons [of "i_rt n (stream_take (Suc n)\<cdot>s)"])
apply (rule i_th_stream_take_Suc [THEN subst])
apply (simp add: i_th_def i_rt_Suc_back [symmetric])
by (simp add: i_rt_take_lemma1)
lemma i_th_last_eq:
-"i_th n s1 = i_th n s2 ==> i_rt n (stream_take (Suc n)$s1) = i_rt n (stream_take (Suc n)$s2)"
+"i_th n s1 = i_th n s2 \<Longrightarrow> i_rt n (stream_take (Suc n)\<cdot>s1) = i_rt n (stream_take (Suc n)\<cdot>s2)"
apply (insert i_th_last [of n s1])
apply (insert i_th_last [of n s2])
apply auto
done
lemma i_th_prefix_lemma:
-"[| k <= n; stream_take (Suc n)$s1 << stream_take (Suc n)$s2 |] ==>
+"\<lbrakk>k \<le> n; stream_take (Suc n)\<cdot>s1 << stream_take (Suc n)\<cdot>s2\<rbrakk> \<Longrightarrow>
i_th k s1 << i_th k s2"
apply (insert i_th_stream_take_Suc [of k s1, THEN sym])
apply (insert i_th_stream_take_Suc [of k s2, THEN sym],auto)
@@ -687,9 +684,9 @@
done
lemma take_i_rt_prefix_lemma1:
- "stream_take (Suc n)$s1 << stream_take (Suc n)$s2 ==>
- i_rt (Suc n) s1 << i_rt (Suc n) s2 ==>
- i_rt n s1 << i_rt n s2 & stream_take n$s1 << stream_take n$s2"
+ "stream_take (Suc n)\<cdot>s1 << stream_take (Suc n)\<cdot>s2 \<Longrightarrow>
+ i_rt (Suc n) s1 << i_rt (Suc n) s2 \<Longrightarrow>
+ i_rt n s1 << i_rt n s2 \<and> stream_take n\<cdot>s1 << stream_take n\<cdot>s2"
apply auto
apply (insert i_th_prefix_lemma [of n n s1 s2])
apply (rule i_th_i_rt_step,auto)
@@ -697,19 +694,18 @@
done
lemma take_i_rt_prefix_lemma:
-"[| stream_take n$s1 << stream_take n$s2; i_rt n s1 << i_rt n s2 |] ==> s1 << s2"
+"\<lbrakk>stream_take n\<cdot>s1 << stream_take n\<cdot>s2; i_rt n s1 << i_rt n s2\<rbrakk> \<Longrightarrow> s1 << s2"
apply (case_tac "n=0",simp)
apply (auto)
-apply (subgoal_tac "stream_take 0$s1 << stream_take 0$s2 &
- i_rt 0 s1 << i_rt 0 s2")
+apply (subgoal_tac "stream_take 0\<cdot>s1 << stream_take 0\<cdot>s2 \<and> i_rt 0 s1 << i_rt 0 s2")
defer 1
apply (rule zero_induct,blast)
apply (blast dest: take_i_rt_prefix_lemma1)
apply simp
done
-lemma streams_prefix_lemma: "(s1 << s2) =
- (stream_take n$s1 << stream_take n$s2 & i_rt n s1 << i_rt n s2)"
+lemma streams_prefix_lemma: "s1 << s2 \<longleftrightarrow>
+ (stream_take n\<cdot>s1 << stream_take n\<cdot>s2 \<and> i_rt n s1 << i_rt n s2)"
apply auto
apply (simp add: monofun_cfun_arg)
apply (simp add: i_rt_mono)
@@ -717,7 +713,7 @@
done
lemma streams_prefix_lemma1:
- "[| stream_take n$s1 = stream_take n$s2; i_rt n s1 = i_rt n s2 |] ==> s1 = s2"
+ "\<lbrakk>stream_take n\<cdot>s1 = stream_take n\<cdot>s2; i_rt n s1 = i_rt n s2\<rbrakk> \<Longrightarrow> s1 = s2"
apply (simp add: po_eq_conv,auto)
apply (insert streams_prefix_lemma)
apply blast+
@@ -731,10 +727,10 @@
lemma UU_sconc [simp]: " UU ooo s = s "
by (simp add: sconc_def zero_enat_def)
-lemma scons_neq_UU: "a~=UU ==> a && s ~=UU"
+lemma scons_neq_UU: "a \<noteq> UU \<Longrightarrow> a && s \<noteq> UU"
by auto
-lemma singleton_sconc [rule_format, simp]: "x~=UU --> (x && UU) ooo y = x && y"
+lemma singleton_sconc [rule_format, simp]: "x \<noteq> UU \<longrightarrow> (x && UU) ooo y = x && y"
apply (simp add: sconc_def zero_enat_def eSuc_def split: enat.splits, auto)
apply (rule someI2_ex,auto)
apply (rule_tac x="x && y" in exI,auto)
@@ -743,7 +739,7 @@
by (drule stream_exhaust_eq [THEN iffD1],auto)
lemma ex_sconc [rule_format]:
- "ALL k y. #x = enat k --> (EX w. stream_take k$w = x & i_rt k w = y)"
+ "\<forall>k y. #x = enat k \<longrightarrow> (\<exists>w. stream_take k\<cdot>w = x \<and> i_rt k w = y)"
apply (case_tac "#x")
apply (rule stream_finite_ind [of x],auto)
apply (simp add: stream.finite_def)
@@ -753,7 +749,7 @@
apply (rule_tac x="a && w" in exI,auto)
done
-lemma rt_sconc1: "enat n = #x ==> i_rt n (x ooo y) = y"
+lemma rt_sconc1: "enat n = #x \<Longrightarrow> i_rt n (x ooo y) = y"
apply (simp add: sconc_def split: enat.splits, arith?,auto)
apply (rule someI2_ex,auto)
apply (drule ex_sconc,simp)
@@ -777,7 +773,7 @@
apply (simp add: sconc_def)
done
-lemma stream_take_sconc [simp]: "enat n = #x ==> stream_take n$(x ooo y) = x"
+lemma stream_take_sconc [simp]: "enat n = #x \<Longrightarrow> stream_take n\<cdot>(x ooo y) = x"
apply (simp add: sconc_def)
apply (cases "#x")
apply auto
@@ -785,7 +781,7 @@
apply (drule ex_sconc,simp)
done
-lemma scons_sconc [rule_format,simp]: "a~=UU --> (a && x) ooo y = a && x ooo y"
+lemma scons_sconc [rule_format,simp]: "a \<noteq> UU \<longrightarrow> (a && x) ooo y = a && x ooo y"
apply (cases "#x",auto)
apply (simp add: sconc_def eSuc_enat)
apply (rule someI2_ex)
@@ -799,7 +795,7 @@
apply (simp add: sconc_def)
done
-lemma ft_sconc: "x ~= UU ==> ft$(x ooo y) = ft$x"
+lemma ft_sconc: "x \<noteq> UU \<Longrightarrow> ft\<cdot>(x ooo y) = ft\<cdot>x"
by (cases x) auto
lemma sconc_assoc: "(x ooo y) ooo z = x ooo y ooo z"
@@ -825,7 +821,7 @@
apply (erule cont_sconc_lemma2)
done
-lemma sconc_mono: "y << y' ==> x ooo y << x ooo y'"
+lemma sconc_mono: "y << y' \<Longrightarrow> x ooo y << x ooo y'"
by (rule cont_sconc [THEN cont2mono, THEN monofunE])
lemma sconc_mono1 [simp]: "x << x ooo y"
@@ -833,7 +829,7 @@
(* ----------------------------------------------------------------------- *)
-lemma empty_sconc [simp]: "(x ooo y = UU) = (x = UU & y = UU)"
+lemma empty_sconc [simp]: "x ooo y = UU \<longleftrightarrow> x = UU \<and> y = UU"
apply (case_tac "#x",auto)
apply (insert sconc_mono1 [of x y])
apply auto
@@ -841,11 +837,11 @@
(* ----------------------------------------------------------------------- *)
-lemma rt_sconc [rule_format, simp]: "s~=UU --> rt$(s ooo x) = rt$s ooo x"
+lemma rt_sconc [rule_format, simp]: "s \<noteq> UU \<longrightarrow> rt\<cdot>(s ooo x) = rt\<cdot>s ooo x"
by (cases s, auto)
lemma i_th_sconc_lemma [rule_format]:
- "ALL x y. enat n < #x --> i_th n (x ooo y) = i_th n x"
+ "\<forall>x y. enat n < #x \<longrightarrow> i_th n (x ooo y) = i_th n x"
apply (induct_tac n, auto)
apply (simp add: enat_0 i_th_def)
apply (simp add: slen_empty_eq ft_sconc)
@@ -861,7 +857,7 @@
(* ----------------------------------------------------------------------- *)
-lemma sconc_lemma [rule_format, simp]: "ALL s. stream_take n$s ooo i_rt n s = s"
+lemma sconc_lemma [rule_format, simp]: "\<forall>s. stream_take n\<cdot>s ooo i_rt n s = s"
apply (induct_tac n,auto)
apply (case_tac "s=UU",auto)
apply (drule stream_exhaust_eq [THEN iffD1],auto)
@@ -871,26 +867,26 @@
subsection "pointwise equality"
(* ----------------------------------------------------------------------- *)
-lemma ex_last_stream_take_scons: "stream_take (Suc n)$s =
- stream_take n$s ooo i_rt n (stream_take (Suc n)$s)"
-by (insert sconc_lemma [of n "stream_take (Suc n)$s"],simp)
+lemma ex_last_stream_take_scons: "stream_take (Suc n)\<cdot>s =
+ stream_take n\<cdot>s ooo i_rt n (stream_take (Suc n)\<cdot>s)"
+by (insert sconc_lemma [of n "stream_take (Suc n)\<cdot>s"],simp)
lemma i_th_stream_take_eq:
-"!!n. ALL n. i_th n s1 = i_th n s2 ==> stream_take n$s1 = stream_take n$s2"
+ "\<And>n. \<forall>n. i_th n s1 = i_th n s2 \<Longrightarrow> stream_take n\<cdot>s1 = stream_take n\<cdot>s2"
apply (induct_tac n,auto)
-apply (subgoal_tac "stream_take (Suc na)$s1 =
- stream_take na$s1 ooo i_rt na (stream_take (Suc na)$s1)")
- apply (subgoal_tac "i_rt na (stream_take (Suc na)$s1) =
- i_rt na (stream_take (Suc na)$s2)")
- apply (subgoal_tac "stream_take (Suc na)$s2 =
- stream_take na$s2 ooo i_rt na (stream_take (Suc na)$s2)")
+apply (subgoal_tac "stream_take (Suc na)\<cdot>s1 =
+ stream_take na\<cdot>s1 ooo i_rt na (stream_take (Suc na)\<cdot>s1)")
+ apply (subgoal_tac "i_rt na (stream_take (Suc na)\<cdot>s1) =
+ i_rt na (stream_take (Suc na)\<cdot>s2)")
+ apply (subgoal_tac "stream_take (Suc na)\<cdot>s2 =
+ stream_take na\<cdot>s2 ooo i_rt na (stream_take (Suc na)\<cdot>s2)")
apply (insert ex_last_stream_take_scons,simp)
apply blast
apply (erule_tac x="na" in allE)
apply (insert i_th_last_eq [of _ s1 s2])
by blast+
-lemma pointwise_eq_lemma[rule_format]: "ALL n. i_th n s1 = i_th n s2 ==> s1 = s2"
+lemma pointwise_eq_lemma[rule_format]: "\<forall>n. i_th n s1 = i_th n s2 \<Longrightarrow> s1 = s2"
by (insert i_th_stream_take_eq [THEN stream.take_lemma],blast)
(* ----------------------------------------------------------------------- *)
@@ -898,17 +894,17 @@
(* ----------------------------------------------------------------------- *)
lemma slen_sconc_finite1:
- "[| #(x ooo y) = \<infinity>; enat n = #x |] ==> #y = \<infinity>"
-apply (case_tac "#y ~= \<infinity>",auto)
+ "\<lbrakk>#(x ooo y) = \<infinity>; enat n = #x\<rbrakk> \<Longrightarrow> #y = \<infinity>"
+apply (case_tac "#y \<noteq> \<infinity>",auto)
apply (drule_tac y=y in rt_sconc1)
apply (insert stream_finite_i_rt [of n "x ooo y"])
apply (simp add: slen_infinite)
done
-lemma slen_sconc_infinite1: "#x=\<infinity> ==> #(x ooo y) = \<infinity>"
+lemma slen_sconc_infinite1: "#x=\<infinity> \<Longrightarrow> #(x ooo y) = \<infinity>"
by (simp add: sconc_def)
-lemma slen_sconc_infinite2: "#y=\<infinity> ==> #(x ooo y) = \<infinity>"
+lemma slen_sconc_infinite2: "#y=\<infinity> \<Longrightarrow> #(x ooo y) = \<infinity>"
apply (case_tac "#x")
apply (simp add: sconc_def)
apply (rule someI2_ex)
@@ -918,7 +914,7 @@
apply (fastforce simp add: slen_infinite,auto)
by (simp add: sconc_def)
-lemma sconc_finite: "(#x~=\<infinity> & #y~=\<infinity>) = (#(x ooo y)~=\<infinity>)"
+lemma sconc_finite: "#x \<noteq> \<infinity> \<and> #y \<noteq> \<infinity> \<longleftrightarrow> #(x ooo y) \<noteq> \<infinity>"
apply auto
apply (metis not_infinity_eq slen_sconc_finite1)
apply (metis not_infinity_eq slen_sconc_infinite1)
@@ -927,7 +923,7 @@
(* ----------------------------------------------------------------------- *)
-lemma slen_sconc_mono3: "[| enat n = #x; enat k = #(x ooo y) |] ==> n <= k"
+lemma slen_sconc_mono3: "\<lbrakk>enat n = #x; enat k = #(x ooo y)\<rbrakk> \<Longrightarrow> n \<le> k"
apply (insert slen_mono [of "x" "x ooo y"])
apply (cases "#x") apply simp_all
apply (cases "#(x ooo y)") apply simp_all
@@ -937,7 +933,7 @@
subsection "finite slen"
(* ----------------------------------------------------------------------- *)
-lemma slen_sconc: "[| enat n = #x; enat m = #y |] ==> #(x ooo y) = enat (n + m)"
+lemma slen_sconc: "\<lbrakk>enat n = #x; enat m = #y\<rbrakk> \<Longrightarrow> #(x ooo y) = enat (n + m)"
apply (case_tac "#(x ooo y)")
apply (frule_tac y=y in rt_sconc1)
apply (insert take_i_rt_len [of "THE j. enat j = #(x ooo y)" "x ooo y" n n m],simp)
@@ -949,9 +945,9 @@
subsection "flat prefix"
(* ----------------------------------------------------------------------- *)
-lemma sconc_prefix: "(s1::'a::flat stream) << s2 ==> EX t. s1 ooo t = s2"
+lemma sconc_prefix: "(s1::'a::flat stream) << s2 \<Longrightarrow> \<exists>t. s1 ooo t = s2"
apply (case_tac "#s1")
- apply (subgoal_tac "stream_take nat$s1 = stream_take nat$s2")
+ apply (subgoal_tac "stream_take nat\<cdot>s1 = stream_take nat\<cdot>s2")
apply (rule_tac x="i_rt nat s2" in exI)
apply (simp add: sconc_def)
apply (rule someI2_ex)
@@ -967,18 +963,18 @@
subsection "continuity"
(* ----------------------------------------------------------------------- *)
-lemma chain_sconc: "chain S ==> chain (%i. (x ooo S i))"
+lemma chain_sconc: "chain S \<Longrightarrow> chain (\<lambda>i. (x ooo S i))"
by (simp add: chain_def,auto simp add: sconc_mono)
-lemma chain_scons: "chain S ==> chain (%i. a && S i)"
+lemma chain_scons: "chain S \<Longrightarrow> chain (\<lambda>i. a && S i)"
apply (simp add: chain_def,auto)
apply (rule monofun_cfun_arg,simp)
done
-lemma contlub_scons_lemma: "chain S ==> (LUB i. a && S i) = a && (LUB i. S i)"
+lemma contlub_scons_lemma: "chain S \<Longrightarrow> (LUB i. a && S i) = a && (LUB i. S i)"
by (rule cont2contlubE [OF cont_Rep_cfun2, symmetric])
-lemma finite_lub_sconc: "chain Y ==> (stream_finite x) ==>
+lemma finite_lub_sconc: "chain Y \<Longrightarrow> stream_finite x \<Longrightarrow>
(LUB i. x ooo Y i) = (x ooo (LUB i. Y i))"
apply (rule stream_finite_ind [of x])
apply (auto)
@@ -987,13 +983,13 @@
done
lemma contlub_sconc_lemma:
- "chain Y ==> (LUB i. x ooo Y i) = (x ooo (LUB i. Y i))"
+ "chain Y \<Longrightarrow> (LUB i. x ooo Y i) = (x ooo (LUB i. Y i))"
apply (case_tac "#x=\<infinity>")
apply (simp add: sconc_def)
apply (drule finite_lub_sconc,auto simp add: slen_infinite)
done
-lemma monofun_sconc: "monofun (%y. x ooo y)"
+lemma monofun_sconc: "monofun (\<lambda>y. x ooo y)"
by (simp add: monofun_def sconc_mono)