diff -r e965391e2864 -r cf152ff55d16 src/HOL/Library/SCT_Theorem.thy --- a/src/HOL/Library/SCT_Theorem.thy Fri Apr 13 21:26:34 2007 +0200 +++ b/src/HOL/Library/SCT_Theorem.thy Fri Apr 13 21:26:35 2007 +0200 @@ -3,11 +3,13 @@ Author: Alexander Krauss, TU Muenchen *) +header "" + theory SCT_Theorem imports Main Ramsey SCT_Misc SCT_Definition begin -section {* The size change criterion SCT *} +subsection {* The size change criterion SCT *} definition is_thread :: "nat \ nat sequence \ (nat, scg) ipath \ bool" where @@ -33,7 +35,8 @@ "has_desc_fth p i j n m = (\\. is_desc_fthread \ p i j \ \ i = n \ \ j = m)" -section {* Bounded graphs and threads *} + +subsection {* Bounded graphs and threads *} definition "bounded_scg (P::nat) (G::scg) = @@ -325,9 +328,7 @@ qed - -section {* Contraction and more *} - +subsection {* Contraction and more *} abbreviation "pdesc P == (fst P, prod P, end_node P)" @@ -342,8 +343,6 @@ by (auto intro:sub_path_is_path[of "\" p i j] simp:sub_path_def) - - lemma combine_fthreads: assumes range: "i < j" "j \ k" shows @@ -657,7 +656,7 @@ by (auto simp:Lemma7a increasing_weak contract_def) -subsection {* Connecting threads *} +subsubsection {* Connecting threads *} definition "connect s \s = (\k. \s (section_of s k) k)" @@ -685,7 +684,6 @@ qed - lemma connect_threads: assumes [simp]: "increasing s" assumes connected: "\s i (s (Suc i)) = \s (Suc i) (s (Suc i))" @@ -889,7 +887,7 @@ assume "?A" then obtain \ n where fr: "\i\n. eqlat p \ i" - and ds: "\\<^sub>\i. descat p \ i" + and ds: "\\<^sub>\i. descat p \ i" unfolding is_desc_thread_def by auto @@ -903,18 +901,18 @@ proof (intro allI impI) fix i assume "n \ i" also have "i \ s i" - using increasing_inc by auto + using increasing_inc by auto finally have "n \ s i" . with fr have "is_fthread \ p (s i) (s (Suc i))" - unfolding is_fthread_def by auto + unfolding is_fthread_def by auto hence "has_fth p (s i) (s (Suc i)) (\ (s i)) (\ (s (Suc i)))" - unfolding has_fth_def by auto + unfolding has_fth_def by auto with less_imp_le[OF increasing_strict] have "eql (prod (p\s i,s (Suc i)\)) (\ (s i)) (\ (s (Suc i)))" - by (simp add:Lemma7a) + by (simp add:Lemma7a) thus "eqlat (contract s p) ?c\ i" unfolding contract_def - by auto + by auto qed show "\\<^sub>\i. descat (contract s p) ?c\ i" @@ -924,57 +922,56 @@ let ?K = "section_of s (max (s (Suc i)) n)" from `\\<^sub>\i. descat p \ i` obtain j - where "s (Suc ?K) < j" "descat p \ j" - unfolding INF_nat by blast + where "s (Suc ?K) < j" "descat p \ j" + unfolding INF_nat by blast let ?L = "section_of s j" { - fix x assume r: "x \ section s ?L" - - have e1: "max (s (Suc i)) n < s (Suc ?K)" by (rule section_of2) + fix x assume r: "x \ section s ?L" + + have e1: "max (s (Suc i)) n < s (Suc ?K)" by (rule section_of2) note `s (Suc ?K) < j` also have "j < s (Suc ?L)" by (rule section_of2) finally have "Suc ?K \ ?L" by (simp add:increasing_bij) - with increasing_weak have "s (Suc ?K) \ s ?L" by simp - with e1 r have "max (s (Suc i)) n < x" by simp + with increasing_weak have "s (Suc ?K) \ s ?L" by simp + with e1 r have "max (s (Suc i)) n < x" by simp - hence "(s (Suc i)) < x" "n < x" by auto + hence "(s (Suc i)) < x" "n < x" by auto } note range_est = this have "is_desc_fthread \ p (s ?L) (s (Suc ?L))" - unfolding is_desc_fthread_def is_fthread_def + unfolding is_desc_fthread_def is_fthread_def proof - show "\m\section s ?L. eqlat p \ m" + show "\m\section s ?L. eqlat p \ m" proof fix m assume "m\section s ?L" with range_est(2) have "n < m" . with fr show "eqlat p \ m" by simp qed - from in_section_of inc less_imp_le[OF `s (Suc ?K) < j`] - have "j \ section s ?L" . + have "j \ section s ?L" . - with `descat p \ j` - show "\m\section s ?L. descat p \ m" .. + with `descat p \ j` + show "\m\section s ?L. descat p \ m" .. qed with less_imp_le[OF increasing_strict] have a: "descat (contract s p) ?c\ ?L" - unfolding contract_def Lemma7b[symmetric] - by (auto simp:Lemma7b[symmetric] has_desc_fth_def) + unfolding contract_def Lemma7b[symmetric] + by (auto simp:Lemma7b[symmetric] has_desc_fth_def) have "i < ?L" proof (rule classical) - assume "\ i < ?L" - hence "s ?L < s (Suc i)" + assume "\ i < ?L" + hence "s ?L < s (Suc i)" by (simp add:increasing_bij) - also have "\ < s ?L" - by (rule range_est(1)) (simp add:increasing_strict) - finally show ?thesis . + also have "\ < s ?L" + by (rule range_est(1)) (simp add:increasing_strict) + finally show ?thesis . qed with a show "\l. i < l \ descat (contract s p) ?c\ l" by blast @@ -994,7 +991,7 @@ (\i. is_desc_fthread (\s i) p (s i) (s (Suc i)) \ \s i (s i) = \ i \ \s i (s (Suc i)) = \ (Suc i))" - (is "desc ?alw ?inf") + (is "desc ?alw ?inf") by blast then obtain n where fr: "\i\n. ?alw i" by blast @@ -1004,8 +1001,8 @@ let ?j\ = "connect s \s" from fr ths_spec have ths_spec2: - "\i. i > n \ is_fthread (\s i) p (s i) (s (Suc i))" - "\\<^sub>\i. is_desc_fthread (\s i) p (s i) (s (Suc i))" + "\i. i > n \ is_fthread (\s i) p (s i) (s (Suc i))" + "\\<^sub>\i. is_desc_fthread (\s i) p (s i) (s (Suc i))" by (auto intro:INF_mono) have p1: "\i. i > n \ is_fthread ?j\ p (s i) (s (Suc i))" @@ -1027,7 +1024,6 @@ qed - lemma repeated_edge: assumes "\i. i > n \ dsc (snd (p i)) k k" shows "is_desc_thread (\i. k) p" @@ -1050,9 +1046,7 @@ by auto - -section {* Ramsey's Theorem *} - +subsection {* Ramsey's Theorem *} definition "set2pair S = (THE (x,y). x < y \ S = {x,y})" @@ -1176,8 +1170,7 @@ qed -section {* Main Result *} - +subsection {* Main Result *} theorem LJA_Theorem4: assumes "bounded_acg P \" @@ -1383,7 +1376,6 @@ qed - lemma LJA_apply: assumes fin: "finite_acg A" assumes "SCT' A"