src/CCL/Fix.thy
changeset 60770 240563fbf41d
parent 58977 9576b510f6a2
child 61337 4645502c3c64
equal deleted inserted replaced
60769:cf7f3465eaf1 60770:240563fbf41d
     1 (*  Title:      CCL/Fix.thy
     1 (*  Title:      CCL/Fix.thy
     2     Author:     Martin Coen
     2     Author:     Martin Coen
     3     Copyright   1993  University of Cambridge
     3     Copyright   1993  University of Cambridge
     4 *)
     4 *)
     5 
     5 
     6 section {* Tentative attempt at including fixed point induction; justified by Smith *}
     6 section \<open>Tentative attempt at including fixed point induction; justified by Smith\<close>
     7 
     7 
     8 theory Fix
     8 theory Fix
     9 imports Type
     9 imports Type
    10 begin
    10 begin
    11 
    11 
    16   INCL_def: "INCL(\<lambda>x. P(x)) == (ALL f.(ALL n:Nat. P(f^n`bot)) \<longrightarrow> P(fix(f)))" and
    16   INCL_def: "INCL(\<lambda>x. P(x)) == (ALL f.(ALL n:Nat. P(f^n`bot)) \<longrightarrow> P(fix(f)))" and
    17   po_INCL: "INCL(\<lambda>x. a(x) [= b(x))" and
    17   po_INCL: "INCL(\<lambda>x. a(x) [= b(x))" and
    18   INCL_subst: "INCL(P) \<Longrightarrow> INCL(\<lambda>x. P((g::i\<Rightarrow>i)(x)))"
    18   INCL_subst: "INCL(P) \<Longrightarrow> INCL(\<lambda>x. P((g::i\<Rightarrow>i)(x)))"
    19 
    19 
    20 
    20 
    21 subsection {* Fixed Point Induction *}
    21 subsection \<open>Fixed Point Induction\<close>
    22 
    22 
    23 lemma fix_ind:
    23 lemma fix_ind:
    24   assumes base: "P(bot)"
    24   assumes base: "P(bot)"
    25     and step: "\<And>x. P(x) \<Longrightarrow> P(f(x))"
    25     and step: "\<And>x. P(x) \<Longrightarrow> P(f(x))"
    26     and incl: "INCL(P)"
    26     and incl: "INCL(P)"
    31    apply (rule base)
    31    apply (rule base)
    32   apply (erule step)
    32   apply (erule step)
    33   done
    33   done
    34 
    34 
    35 
    35 
    36 subsection {* Inclusive Predicates *}
    36 subsection \<open>Inclusive Predicates\<close>
    37 
    37 
    38 lemma inclXH: "INCL(P) \<longleftrightarrow> (ALL f. (ALL n:Nat. P(f ^ n ` bot)) \<longrightarrow> P(fix(f)))"
    38 lemma inclXH: "INCL(P) \<longleftrightarrow> (ALL f. (ALL n:Nat. P(f ^ n ` bot)) \<longrightarrow> P(fix(f)))"
    39   by (simp add: INCL_def)
    39   by (simp add: INCL_def)
    40 
    40 
    41 lemma inclI: "\<lbrakk>\<And>f. ALL n:Nat. P(f^n`bot) \<Longrightarrow> P(fix(f))\<rbrakk> \<Longrightarrow> INCL(\<lambda>x. P(x))"
    41 lemma inclI: "\<lbrakk>\<And>f. ALL n:Nat. P(f^n`bot) \<Longrightarrow> P(fix(f))\<rbrakk> \<Longrightarrow> INCL(\<lambda>x. P(x))"
    46 
    46 
    47 lemma inclE: "\<lbrakk>INCL(P); (ALL n:Nat. P(f^n`bot)) \<longrightarrow> P(fix(f)) \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
    47 lemma inclE: "\<lbrakk>INCL(P); (ALL n:Nat. P(f^n`bot)) \<longrightarrow> P(fix(f)) \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
    48   by (blast dest: inclD)
    48   by (blast dest: inclD)
    49 
    49 
    50 
    50 
    51 subsection {* Lemmas for Inclusive Predicates *}
    51 subsection \<open>Lemmas for Inclusive Predicates\<close>
    52 
    52 
    53 lemma npo_INCL: "INCL(\<lambda>x. \<not> a(x) [= t)"
    53 lemma npo_INCL: "INCL(\<lambda>x. \<not> a(x) [= t)"
    54   apply (rule inclI)
    54   apply (rule inclI)
    55   apply (drule bspec)
    55   apply (drule bspec)
    56    apply (rule zeroT)
    56    apply (rule zeroT)
    75   apply (simp add: eq_iff)
    75   apply (simp add: eq_iff)
    76   apply (rule conj_INCL po_INCL)+
    76   apply (rule conj_INCL po_INCL)+
    77   done
    77   done
    78 
    78 
    79 
    79 
    80 subsection {* Derivation of Reachability Condition *}
    80 subsection \<open>Derivation of Reachability Condition\<close>
    81 
    81 
    82 (* Fixed points of idgen *)
    82 (* Fixed points of idgen *)
    83 
    83 
    84 lemma fix_idgenfp: "idgen(fix(idgen)) = fix(idgen)"
    84 lemma fix_idgenfp: "idgen(fix(idgen)) = fix(idgen)"
    85   apply (rule fixB [symmetric])
    85   apply (rule fixB [symmetric])