
diff -r f2094906e491 -r e44d86131648 src/ZF/Constructible/AC_in_L.thy
--- a/src/ZF/Constructible/AC_in_L.thy	Tue Sep 27 13:34:54 2022 +0200
+++ b/src/ZF/Constructible/AC_in_L.thy	Tue Sep 27 16:51:35 2022 +0100
@@ -17,17 +17,17 @@
   domains "rlist(A,r)" \<subseteq> "list(A) * list(A)"
   intros
     shorterI:
-      "[| length(l') < length(l); l' \<in> list(A); l \<in> list(A) |]
-       ==> <l', l> \<in> rlist(A,r)"
+      "\<lbrakk>length(l') < length(l); l' \<in> list(A); l \<in> list(A)\<rbrakk>
+       \<Longrightarrow> <l', l> \<in> rlist(A,r)"
 
     sameI:
-      "[| <l',l> \<in> rlist(A,r); a \<in> A |]
-       ==> <Cons(a,l'), Cons(a,l)> \<in> rlist(A,r)"
+      "\<lbrakk><l',l> \<in> rlist(A,r); a \<in> A\<rbrakk>
+       \<Longrightarrow> <Cons(a,l'), Cons(a,l)> \<in> rlist(A,r)"
 
     diffI:
-      "[| length(l') = length(l); <a',a> \<in> r;
-          l' \<in> list(A); l \<in> list(A); a' \<in> A; a \<in> A |]
-       ==> <Cons(a',l'), Cons(a,l)> \<in> rlist(A,r)"
+      "\<lbrakk>length(l') = length(l); <a',a> \<in> r;
+          l' \<in> list(A); l \<in> list(A); a' \<in> A; a \<in> A\<rbrakk>
+       \<Longrightarrow> <Cons(a',l'), Cons(a,l)> \<in> rlist(A,r)"
   type_intros list.intros
 
 
@@ -40,7 +40,7 @@
 subsubsection\<open>Linearity\<close>
 
 lemma rlist_Nil_Cons [intro]:
-    "[|a \<in> A; l \<in> list(A)|] ==> <[], Cons(a,l)> \<in> rlist(A, r)"
+    "\<lbrakk>a \<in> A; l \<in> list(A)\<rbrakk> \<Longrightarrow> <[], Cons(a,l)> \<in> rlist(A, r)"
 by (simp add: shorterI)
 
 lemma linear_rlist:
@@ -82,13 +82,13 @@
 lemma not_rlist_Nil [simp]: " <l,[]> \<notin> rlist(A,r)"
 by (blast intro: elim: rlist_NilE)
 
-lemma rlist_imp_length_le: "<l',l> \<in> rlist(A,r) ==> length(l') \<le> length(l)"
+lemma rlist_imp_length_le: "<l',l> \<in> rlist(A,r) \<Longrightarrow> length(l') \<le> length(l)"
 apply (erule rlist.induct)
 apply (simp_all add: leI)
 done
 
 lemma wf_on_rlist_n:
-  "[| n \<in> nat; wf[A](r) |] ==> wf[{l \<in> list(A). length(l) = n}](rlist(A,r))"
+  "\<lbrakk>n \<in> nat; wf[A](r)\<rbrakk> \<Longrightarrow> wf[{l \<in> list(A). length(l) = n}](rlist(A,r))"
 apply (induct_tac n)
  apply (rule wf_onI2, simp)
 apply (rule wf_onI2, clarify)
@@ -112,7 +112,7 @@
 by (blast intro: length_type)
 
 
-lemma wf_on_rlist: "wf[A](r) ==> wf[list(A)](rlist(A,r))"
+lemma wf_on_rlist: "wf[A](r) \<Longrightarrow> wf[list(A)](rlist(A,r))"
 apply (subst list_eq_UN_length)
 apply (rule wf_on_Union)
   apply (rule wf_imp_wf_on [OF wf_Memrel [of nat]])
@@ -125,14 +125,14 @@
 done
 
 
-lemma wf_rlist: "wf(r) ==> wf(rlist(field(r),r))"
+lemma wf_rlist: "wf(r) \<Longrightarrow> wf(rlist(field(r),r))"
 apply (simp add: wf_iff_wf_on_field)
 apply (rule wf_on_subset_A [OF _ field_rlist])
 apply (blast intro: wf_on_rlist)
 done
 
 lemma well_ord_rlist:
-     "well_ord(A,r) ==> well_ord(list(A), rlist(A,r))"
+     "well_ord(A,r) \<Longrightarrow> well_ord(list(A), rlist(A,r))"
 apply (rule well_ordI)
 apply (simp add: well_ord_def wf_on_rlist)
 apply (simp add: well_ord_def tot_ord_def linear_rlist)
@@ -167,20 +167,20 @@
   "enum(f, Forall(p)) = f ` <succ(2), enum(f,p)>"
 
 lemma (in Nat_Times_Nat) fn_type [TC,simp]:
-    "[|x \<in> nat; y \<in> nat|] ==> fn`<x,y> \<in> nat"
+    "\<lbrakk>x \<in> nat; y \<in> nat\<rbrakk> \<Longrightarrow> fn`<x,y> \<in> nat"
 by (blast intro: inj_is_fun [OF fn_inj] apply_funtype)
 
 lemma (in Nat_Times_Nat) fn_iff:
-    "[|x \<in> nat; y \<in> nat; u \<in> nat; v \<in> nat|]
-     ==> (fn`<x,y> = fn`<u,v>) \<longleftrightarrow> (x=u & y=v)"
+    "\<lbrakk>x \<in> nat; y \<in> nat; u \<in> nat; v \<in> nat\<rbrakk>
+     \<Longrightarrow> (fn`<x,y> = fn`<u,v>) \<longleftrightarrow> (x=u & y=v)"
 by (blast dest: inj_apply_equality [OF fn_inj])
 
 lemma (in Nat_Times_Nat) enum_type [TC,simp]:
-    "p \<in> formula ==> enum(fn,p) \<in> nat"
+    "p \<in> formula \<Longrightarrow> enum(fn,p) \<in> nat"
 by (induct_tac p, simp_all)
 
 lemma (in Nat_Times_Nat) enum_inject [rule_format]:
-    "p \<in> formula ==> \<forall>q\<in>formula. enum(fn,p) = enum(fn,q) \<longrightarrow> p=q"
+    "p \<in> formula \<Longrightarrow> \<forall>q\<in>formula. enum(fn,p) = enum(fn,q) \<longrightarrow> p=q"
 apply (induct_tac p, simp_all)
    apply (rule ballI)
    apply (erule formula.cases)
@@ -232,7 +232,7 @@
 definition
   env_form_r :: "[i,i,i]=>i" where
     \<comment> \<open>wellordering on (environment, formula) pairs\<close>
-   "env_form_r(f,r,A) ==
+   "env_form_r(f,r,A) \<equiv>
       rmult(list(A), rlist(A, r),
             formula, measure(formula, enum(f)))"
 
@@ -240,12 +240,12 @@
   env_form_map :: "[i,i,i,i]=>i" where
     \<comment> \<open>map from (environment, formula) pairs to ordinals\<close>
    "env_form_map(f,r,A,z)
-      == ordermap(list(A) * formula, env_form_r(f,r,A)) ` z"
+      \<equiv> ordermap(list(A) * formula, env_form_r(f,r,A)) ` z"
 
 definition
   DPow_ord :: "[i,i,i,i,i]=>o" where
     \<comment> \<open>predicate that holds if \<^term>\<open>k\<close> is a valid index for \<^term>\<open>X\<close>\<close>
-   "DPow_ord(f,r,A,X,k) ==
+   "DPow_ord(f,r,A,X,k) \<equiv>
            \<exists>env \<in> list(A). \<exists>p \<in> formula.
              arity(p) \<le> succ(length(env)) &
              X = {x\<in>A. sats(A, p, Cons(x,env))} &
@@ -254,61 +254,61 @@
 definition
   DPow_least :: "[i,i,i,i]=>i" where
     \<comment> \<open>function yielding the smallest index for \<^term>\<open>X\<close>\<close>
-   "DPow_least(f,r,A,X) == \<mu> k. DPow_ord(f,r,A,X,k)"
+   "DPow_least(f,r,A,X) \<equiv> \<mu> k. DPow_ord(f,r,A,X,k)"
 
 definition
   DPow_r :: "[i,i,i]=>i" where
     \<comment> \<open>a wellordering on \<^term>\<open>DPow(A)\<close>\<close>
-   "DPow_r(f,r,A) == measure(DPow(A), DPow_least(f,r,A))"
+   "DPow_r(f,r,A) \<equiv> measure(DPow(A), DPow_least(f,r,A))"
 
 
 lemma (in Nat_Times_Nat) well_ord_env_form_r:
     "well_ord(A,r)
-     ==> well_ord(list(A) * formula, env_form_r(fn,r,A))"
+     \<Longrightarrow> well_ord(list(A) * formula, env_form_r(fn,r,A))"
 by (simp add: env_form_r_def well_ord_rmult well_ord_rlist well_ord_formula)
 
 lemma (in Nat_Times_Nat) Ord_env_form_map:
-    "[|well_ord(A,r); z \<in> list(A) * formula|]
-     ==> Ord(env_form_map(fn,r,A,z))"
+    "\<lbrakk>well_ord(A,r); z \<in> list(A) * formula\<rbrakk>
+     \<Longrightarrow> Ord(env_form_map(fn,r,A,z))"
 by (simp add: env_form_map_def Ord_ordermap well_ord_env_form_r)
 
 lemma DPow_imp_ex_DPow_ord:
-    "X \<in> DPow(A) ==> \<exists>k. DPow_ord(fn,r,A,X,k)"
+    "X \<in> DPow(A) \<Longrightarrow> \<exists>k. DPow_ord(fn,r,A,X,k)"
 apply (simp add: DPow_ord_def)
 apply (blast dest!: DPowD)
 done
 
 lemma (in Nat_Times_Nat) DPow_ord_imp_Ord:
-     "[|DPow_ord(fn,r,A,X,k); well_ord(A,r)|] ==> Ord(k)"
+     "\<lbrakk>DPow_ord(fn,r,A,X,k); well_ord(A,r)\<rbrakk> \<Longrightarrow> Ord(k)"
 apply (simp add: DPow_ord_def, clarify)
 apply (simp add: Ord_env_form_map)
 done
 
 lemma (in Nat_Times_Nat) DPow_imp_DPow_least:
-    "[|X \<in> DPow(A); well_ord(A,r)|]
-     ==> DPow_ord(fn, r, A, X, DPow_least(fn,r,A,X))"
+    "\<lbrakk>X \<in> DPow(A); well_ord(A,r)\<rbrakk>
+     \<Longrightarrow> DPow_ord(fn, r, A, X, DPow_least(fn,r,A,X))"
 apply (simp add: DPow_least_def)
 apply (blast dest: DPow_imp_ex_DPow_ord intro: DPow_ord_imp_Ord LeastI)
 done
 
 lemma (in Nat_Times_Nat) env_form_map_inject:
-    "[|env_form_map(fn,r,A,u) = env_form_map(fn,r,A,v); well_ord(A,r);
-       u \<in> list(A) * formula;  v \<in> list(A) * formula|]
-     ==> u=v"
+    "\<lbrakk>env_form_map(fn,r,A,u) = env_form_map(fn,r,A,v); well_ord(A,r);
+       u \<in> list(A) * formula;  v \<in> list(A) * formula\<rbrakk>
+     \<Longrightarrow> u=v"
 apply (simp add: env_form_map_def)
 apply (rule inj_apply_equality [OF bij_is_inj, OF ordermap_bij,
                                 OF well_ord_env_form_r], assumption+)
 done
 
 lemma (in Nat_Times_Nat) DPow_ord_unique:
-    "[|DPow_ord(fn,r,A,X,k); DPow_ord(fn,r,A,Y,k); well_ord(A,r)|]
-     ==> X=Y"
+    "\<lbrakk>DPow_ord(fn,r,A,X,k); DPow_ord(fn,r,A,Y,k); well_ord(A,r)\<rbrakk>
+     \<Longrightarrow> X=Y"
 apply (simp add: DPow_ord_def, clarify)
 apply (drule env_form_map_inject, auto)
 done
 
 lemma (in Nat_Times_Nat) well_ord_DPow_r:
-    "well_ord(A,r) ==> well_ord(DPow(A), DPow_r(fn,r,A))"
+    "well_ord(A,r) \<Longrightarrow> well_ord(DPow(A), DPow_r(fn,r,A))"
 apply (simp add: DPow_r_def)
 apply (rule well_ord_measure)
  apply (simp add: DPow_least_def)
@@ -332,7 +332,7 @@
   rlimit :: "[i,i=>i]=>i" where
   \<comment> \<open>Expresses the wellordering at limit ordinals.  The conditional
       lets us remove the premise \<^term>\<open>Limit(i)\<close> from some theorems.\<close>
-    "rlimit(i,r) ==
+    "rlimit(i,r) \<equiv>
        if Limit(i) then 
          {z: Lset(i) * Lset(i).
           \<exists>x' x. z = <x',x> &
@@ -344,10 +344,10 @@
   Lset_new :: "i=>i" where
   \<comment> \<open>This constant denotes the set of elements introduced at level
       \<^term>\<open>succ(i)\<close>\<close>
-    "Lset_new(i) == {x \<in> Lset(succ(i)). lrank(x) = i}"
+    "Lset_new(i) \<equiv> {x \<in> Lset(succ(i)). lrank(x) = i}"
 
 lemma Limit_Lset_eq2:
-    "Limit(i) ==> Lset(i) = (\<Union>j\<in>i. Lset_new(j))"
+    "Limit(i) \<Longrightarrow> Lset(i) = (\<Union>j\<in>i. Lset_new(j))"
 apply (simp add: Limit_Lset_eq)
 apply (rule equalityI)
  apply safe
@@ -362,14 +362,14 @@
 done
 
 lemma wf_on_Lset:
-    "wf[Lset(succ(j))](r(succ(j))) ==> wf[Lset_new(j)](rlimit(i,r))"
+    "wf[Lset(succ(j))](r(succ(j))) \<Longrightarrow> wf[Lset_new(j)](rlimit(i,r))"
 apply (simp add: wf_on_def Lset_new_def)
 apply (erule wf_subset)
 apply (simp add: rlimit_def, force)
 done
 
 lemma wf_on_rlimit:
-    "(\<forall>j<i. wf[Lset(j)](r(j))) ==> wf[Lset(i)](rlimit(i,r))"
+    "(\<forall>j<i. wf[Lset(j)](r(j))) \<Longrightarrow> wf[Lset(i)](rlimit(i,r))"
 apply (case_tac "Limit(i)") 
  prefer 2
  apply (simp add: rlimit_def wf_on_any_0)
@@ -382,8 +382,8 @@
 done
 
 lemma linear_rlimit:
-    "[|Limit(i); \<forall>j<i. linear(Lset(j), r(j)) |]
-     ==> linear(Lset(i), rlimit(i,r))"
+    "\<lbrakk>Limit(i); \<forall>j<i. linear(Lset(j), r(j))\<rbrakk>
+     \<Longrightarrow> linear(Lset(i), rlimit(i,r))"
 apply (frule Limit_is_Ord)
 apply (simp add: Limit_Lset_eq2 Lset_new_def)
 apply (simp add: linear_def rlimit_def Ball_def lt_Ord Lset_iff_lrank_lt)
@@ -397,13 +397,13 @@
 done
 
 lemma well_ord_rlimit:
-    "[|Limit(i); \<forall>j<i. well_ord(Lset(j), r(j)) |]
-     ==> well_ord(Lset(i), rlimit(i,r))"
+    "\<lbrakk>Limit(i); \<forall>j<i. well_ord(Lset(j), r(j))\<rbrakk>
+     \<Longrightarrow> well_ord(Lset(i), rlimit(i,r))"
 by (blast intro: well_ordI wf_on_rlimit well_ord_is_wf
                            linear_rlimit well_ord_is_linear)
 
 lemma rlimit_cong:
-     "(!!j. j<i ==> r'(j) = r(j)) ==> rlimit(i,r) = rlimit(i,r')"
+     "(\<And>j. j<i \<Longrightarrow> r'(j) = r(j)) \<Longrightarrow> rlimit(i,r) = rlimit(i,r')"
 apply (simp add: rlimit_def, clarify) 
 apply (rule refl iff_refl Collect_cong ex_cong conj_cong)+
 apply (simp add: Limit_is_Ord Lset_lrank_lt)
@@ -414,7 +414,7 @@
 
 definition
   L_r :: "[i, i] => i" where
-  "L_r(f) == %i.
+  "L_r(f) \<equiv> %i.
       transrec3(i, 0, \<lambda>x r. DPow_r(f, r, Lset(x)), 
                 \<lambda>x r. rlimit(x, \<lambda>y. r`y))"
 
@@ -427,25 +427,25 @@
 
 text\<open>The limit case is non-trivial because of the distinction between
 object-level and meta-level abstraction.\<close>
-lemma [simp]: "Limit(i) ==> L_r(f,i) = rlimit(i, L_r(f))"
+lemma [simp]: "Limit(i) \<Longrightarrow> L_r(f,i) = rlimit(i, L_r(f))"
 by (simp cong: rlimit_cong add: transrec3_Limit L_r_def ltD)
 
 lemma (in Nat_Times_Nat) L_r_type:
-    "Ord(i) ==> L_r(fn,i) \<subseteq> Lset(i) * Lset(i)"
+    "Ord(i) \<Longrightarrow> L_r(fn,i) \<subseteq> Lset(i) * Lset(i)"
 apply (induct i rule: trans_induct3)
   apply (simp_all add: Lset_succ DPow_r_type well_ord_DPow_r rlimit_def
                        Transset_subset_DPow [OF Transset_Lset], blast)
 done
 
 lemma (in Nat_Times_Nat) well_ord_L_r:
-    "Ord(i) ==> well_ord(Lset(i), L_r(fn,i))"
+    "Ord(i) \<Longrightarrow> well_ord(Lset(i), L_r(fn,i))"
 apply (induct i rule: trans_induct3)
 apply (simp_all add: well_ord0 Lset_succ L_r_type well_ord_DPow_r
                      well_ord_rlimit ltD)
 done
 
 lemma well_ord_L_r:
-    "Ord(i) ==> \<exists>r. well_ord(Lset(i), r)"
+    "Ord(i) \<Longrightarrow> \<exists>r. well_ord(Lset(i), r)"
 apply (insert nat_times_nat_lepoll_nat)
 apply (unfold lepoll_def)
 apply (blast intro: Nat_Times_Nat.well_ord_L_r Nat_Times_Nat.intro)
@@ -453,7 +453,7 @@
 
 
 text\<open>Every constructible set is well-ordered! Therefore the Wellordering Theorem and
-      the Axiom of Choice hold in \<^term>\<open>L\<close>!!\<close>
+      the Axiom of Choice hold in \<^term>\<open>L\<close>\<And>\<close>
 theorem L_implies_AC: assumes x: "L(x)" shows "\<exists>r. well_ord(x,r)"
   using Transset_Lset x
 apply (simp add: Transset_def L_def)




