src/ZF/Induct/Acc.thy
author nipkow
Wed, 31 Jul 2024 10:36:28 +0200
changeset 80628 161286c9d426
parent 76987 4c275405faae
permissions -rw-r--r--
tuned names
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
     1
(*  Title:      ZF/Induct/Acc.thy
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
     3
    Copyright   1994  University of Cambridge
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
     4
*)
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
     5
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58871
diff changeset
     6
section \<open>The accessible part of a relation\<close>
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
     7
65449
c82e63b11b8b clarified main ZF.thy / ZFC.thy, and avoid name clash with global HOL/Main.thy;
wenzelm
parents: 61798
diff changeset
     8
theory Acc imports ZF begin
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
     9
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58871
diff changeset
    10
text \<open>
76987
4c275405faae isabelle update -u cite;
wenzelm
parents: 76215
diff changeset
    11
  Inductive definition of \<open>acc(r)\<close>; see \<^cite>\<open>"paulin-tlca"\<close>.
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58871
diff changeset
    12
\<close>
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    13
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    14
consts
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    15
  acc :: "i \<Rightarrow> i"
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    16
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    17
inductive
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    18
  domains "acc(r)" \<subseteq> "field(r)"
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    19
  intros
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 69593
diff changeset
    20
    vimage:  "\<lbrakk>r-``{a}: Pow(acc(r)); a \<in> field(r)\<rbrakk> \<Longrightarrow> a \<in> acc(r)"
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    21
  monos      Pow_mono
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    22
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58871
diff changeset
    23
text \<open>
69593
3dda49e08b9d isabelle update -u control_cartouches;
wenzelm
parents: 65449
diff changeset
    24
  The introduction rule must require \<^prop>\<open>a \<in> field(r)\<close>,
61798
27f3c10b0b50 isabelle update_cartouches -c -t;
wenzelm
parents: 60770
diff changeset
    25
  otherwise \<open>acc(r)\<close> would be a proper class!
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    26
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    27
  \medskip
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    28
  The intended introduction rule:
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58871
diff changeset
    29
\<close>
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    30
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    31
lemma accI: "\<lbrakk>\<And>b. \<langle>b,a\<rangle>:r \<Longrightarrow> b \<in> acc(r);  a \<in> field(r)\<rbrakk> \<Longrightarrow> a \<in> acc(r)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    32
  by (blast intro: acc.intros)
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    33
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    34
lemma acc_downward: "\<lbrakk>b \<in> acc(r);  \<langle>a,b\<rangle>: r\<rbrakk> \<Longrightarrow> a \<in> acc(r)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    35
  by (erule acc.cases) blast
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    36
18414
560f89584ada acc_induct: proper tags;
wenzelm
parents: 16417
diff changeset
    37
lemma acc_induct [consumes 1, case_names vimage, induct set: acc]:
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 69593
diff changeset
    38
    "\<lbrakk>a \<in> acc(r);
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    39
        \<And>x. \<lbrakk>x \<in> acc(r);  \<forall>y. \<langle>y,x\<rangle>:r \<longrightarrow> P(y)\<rbrakk> \<Longrightarrow> P(x)
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 69593
diff changeset
    40
\<rbrakk> \<Longrightarrow> P(a)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    41
  by (erule acc.induct) (blast intro: acc.intros)
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    42
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    43
lemma wf_on_acc: "wf[acc(r)](r)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    44
  apply (rule wf_onI2)
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    45
  apply (erule acc_induct)
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    46
  apply fast
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    47
  done
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    48
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    49
lemma acc_wfI: "field(r) \<subseteq> acc(r) \<Longrightarrow> wf(r)"
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    50
  by (erule wf_on_acc [THEN wf_on_subset_A, THEN wf_on_field_imp_wf])
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    51
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 69593
diff changeset
    52
lemma acc_wfD: "wf(r) \<Longrightarrow> field(r) \<subseteq> acc(r)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    53
  apply (rule subsetI)
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    54
  apply (erule wf_induct2, assumption)
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    55
   apply (blast intro: accI)+
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    56
  done
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    57
46822
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    58
lemma wf_acc_iff: "wf(r) \<longleftrightarrow> field(r) \<subseteq> acc(r)"
12610
8b9845807f77 tuned document sources;
wenzelm
parents: 12560
diff changeset
    59
  by (rule iffI, erule acc_wfD, erule acc_wfI)
12560
5820841f21fd converted some ZF/Induct examples to Isar
paulson
parents: 12088
diff changeset
    60
12088
6f463d16cbd0 reorganization of the ZF examples
paulson
parents:
diff changeset
    61
end