src/HOL/Wellfounded.thy
changeset 80321 31b9dfbe534c
parent 80317 be2e772e0adf
child 80322 b10f7c981df6
equal deleted inserted replaced
80318:cdf26ac90f87 80321:31b9dfbe534c
   919   by (erule rtranclp_induct) (blast dest: accp_downward)+
   919   by (erule rtranclp_induct) (blast dest: accp_downward)+
   920 
   920 
   921 theorem accp_downwards: "accp r a \<Longrightarrow> r\<^sup>*\<^sup>* b a \<Longrightarrow> accp r b"
   921 theorem accp_downwards: "accp r a \<Longrightarrow> r\<^sup>*\<^sup>* b a \<Longrightarrow> accp r b"
   922   by (blast dest: accp_downwards_aux)
   922   by (blast dest: accp_downwards_aux)
   923 
   923 
   924 theorem accp_wfPI: "\<forall>x. accp r x \<Longrightarrow> wfP r"
   924 theorem accp_wfpI: "\<forall>x. accp r x \<Longrightarrow> wfp r"
   925 proof (rule wfPUNIVI)
   925 proof (rule wfPUNIVI)
   926   fix P x
   926   fix P x
   927   assume "\<forall>x. accp r x" "\<forall>x. (\<forall>y. r y x \<longrightarrow> P y) \<longrightarrow> P x"
   927   assume "\<forall>x. accp r x" "\<forall>x. (\<forall>y. r y x \<longrightarrow> P y) \<longrightarrow> P x"
   928   then show "P x"
   928   then show "P x"
   929     using accp_induct[where P = P] by blast
   929     using accp_induct[where P = P] by blast
   930 qed
   930 qed
   931 
   931 
   932 theorem accp_wfPD: "wfP r \<Longrightarrow> accp r x"
   932 theorem accp_wfpD: "wfp r \<Longrightarrow> accp r x"
   933   apply (erule wfP_induct_rule)
   933   apply (erule wfP_induct_rule)
   934   apply (rule accp.accI)
   934   apply (rule accp.accI)
   935   apply blast
   935   apply blast
   936   done
   936   done
   937 
   937 
   938 theorem wfp_iff_accp: "wfp r = (\<forall>x. accp r x)"
   938 theorem wfp_iff_accp: "wfp r = (\<forall>x. accp r x)"
   939   by (blast intro: accp_wfPI dest: accp_wfPD)
   939   by (blast intro: accp_wfpI dest: accp_wfpD)
   940 
   940 
   941 
   941 
   942 text \<open>Smaller relations have bigger accessible parts:\<close>
   942 text \<open>Smaller relations have bigger accessible parts:\<close>
   943 
   943 
   944 lemma accp_subset:
   944 lemma accp_subset:
   984 lemmas acc_induct_rule = acc_induct [rule_format, induct set: acc]
   984 lemmas acc_induct_rule = acc_induct [rule_format, induct set: acc]
   985 lemmas acc_downward = accp_downward [to_set]
   985 lemmas acc_downward = accp_downward [to_set]
   986 lemmas not_acc_down = not_accp_down [to_set]
   986 lemmas not_acc_down = not_accp_down [to_set]
   987 lemmas acc_downwards_aux = accp_downwards_aux [to_set]
   987 lemmas acc_downwards_aux = accp_downwards_aux [to_set]
   988 lemmas acc_downwards = accp_downwards [to_set]
   988 lemmas acc_downwards = accp_downwards [to_set]
   989 lemmas acc_wfI = accp_wfPI [to_set]
   989 lemmas acc_wfI = accp_wfpI [to_set]
   990 lemmas acc_wfD = accp_wfPD [to_set]
   990 lemmas acc_wfD = accp_wfpD [to_set]
   991 lemmas wf_iff_acc = wfp_iff_accp [to_set]
   991 lemmas wf_iff_acc = wfp_iff_accp [to_set]
   992 lemmas acc_subset = accp_subset [to_set]
   992 lemmas acc_subset = accp_subset [to_set]
   993 lemmas acc_subset_induct = accp_subset_induct [to_set]
   993 lemmas acc_subset_induct = accp_subset_induct [to_set]
   994 
   994 
   995 
   995