src/HOL/Cardinals/Wellfounded_More.thy
 author blanchet Mon Jan 20 18:24:56 2014 +0100 (2014-01-20) changeset 55066 4e5ddf3162ac parent 55027 a74ea6d75571 child 58889 5b7a9633cfa8 permissions -rw-r--r--
tuning
```     1 (*  Title:      HOL/Cardinals/Wellfounded_More.thy
```
```     2     Author:     Andrei Popescu, TU Muenchen
```
```     3     Copyright   2012
```
```     4
```
```     5 More on well-founded relations.
```
```     6 *)
```
```     7
```
```     8 header {* More on Well-Founded Relations *}
```
```     9
```
```    10 theory Wellfounded_More
```
```    11 imports Wellfounded Order_Relation_More
```
```    12 begin
```
```    13
```
```    14 subsection {* Well-founded recursion via genuine fixpoints *}
```
```    15
```
```    16 (*2*)lemma adm_wf_unique_fixpoint:
```
```    17 fixes r :: "('a * 'a) set" and
```
```    18       H :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b" and
```
```    19       f :: "'a \<Rightarrow> 'b" and g :: "'a \<Rightarrow> 'b"
```
```    20 assumes WF: "wf r" and ADM: "adm_wf r H" and fFP: "f = H f" and gFP: "g = H g"
```
```    21 shows "f = g"
```
```    22 proof-
```
```    23   {fix x
```
```    24    have "f x = g x"
```
```    25    proof(rule wf_induct[of r "(\<lambda>x. f x = g x)"],
```
```    26          auto simp add: WF)
```
```    27      fix x assume "\<forall>y. (y, x) \<in> r \<longrightarrow> f y = g y"
```
```    28      hence "H f x = H g x" using ADM adm_wf_def[of r H] by auto
```
```    29      thus "f x = g x" using fFP and gFP by simp
```
```    30    qed
```
```    31   }
```
```    32   thus ?thesis by (simp add: ext)
```
```    33 qed
```
```    34
```
```    35 (*2*)lemma wfrec_unique_fixpoint:
```
```    36 fixes r :: "('a * 'a) set" and
```
```    37       H :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b" and
```
```    38       f :: "'a \<Rightarrow> 'b"
```
```    39 assumes WF: "wf r" and ADM: "adm_wf r H" and
```
```    40         fp: "f = H f"
```
```    41 shows "f = wfrec r H"
```
```    42 proof-
```
```    43   have "H (wfrec r H) = wfrec r H"
```
```    44   using assms wfrec_fixpoint[of r H] by simp
```
```    45   thus ?thesis
```
```    46   using assms adm_wf_unique_fixpoint[of r H "wfrec r H"] by simp
```
```    47 qed
```
```    48
```
```    49 end
```