src/HOL/Library/Ramsey.thy
changeset 21634 369e38e35686
parent 20810 3377a830b727
child 22367 6860f09242bf
equal deleted inserted replaced
21633:d1cb78244e30 21634:369e38e35686
    54 
    54 
    55 definition
    55 definition
    56   part :: "nat => nat => 'a set => ('a set => nat) => bool"
    56   part :: "nat => nat => 'a set => ('a set => nat) => bool"
    57   --{*the function @{term f} partitions the @{term r}-subsets of the typically
    57   --{*the function @{term f} partitions the @{term r}-subsets of the typically
    58        infinite set @{term Y} into @{term s} distinct categories.*}
    58        infinite set @{term Y} into @{term s} distinct categories.*}
       
    59 where
    59   "part r s Y f = (\<forall>X. X \<subseteq> Y & finite X & card X = r --> f X < s)"
    60   "part r s Y f = (\<forall>X. X \<subseteq> Y & finite X & card X = r --> f X < s)"
    60 
    61 
    61 text{*For induction, we decrease the value of @{term r} in partitions.*}
    62 text{*For induction, we decrease the value of @{term r} in partitions.*}
    62 lemma part_Suc_imp_part:
    63 lemma part_Suc_imp_part:
    63      "[| infinite Y; part (Suc r) s Y f; y \<in> Y |] 
    64      "[| infinite Y; part (Suc r) s Y f; y \<in> Y |] 
   240 IEEE Symposium on Logic in Computer Science (LICS'04), pages 32--41 (2004).
   241 IEEE Symposium on Logic in Computer Science (LICS'04), pages 32--41 (2004).
   241 *}
   242 *}
   242 
   243 
   243 definition
   244 definition
   244   disj_wf         :: "('a * 'a)set => bool"
   245   disj_wf         :: "('a * 'a)set => bool"
       
   246 where
   245   "disj_wf r = (\<exists>T. \<exists>n::nat. (\<forall>i<n. wf(T i)) & r = (\<Union>i<n. T i))"
   247   "disj_wf r = (\<exists>T. \<exists>n::nat. (\<forall>i<n. wf(T i)) & r = (\<Union>i<n. T i))"
   246 
   248 
       
   249 definition
   247   transition_idx :: "[nat => 'a, nat => ('a*'a)set, nat set] => nat"
   250   transition_idx :: "[nat => 'a, nat => ('a*'a)set, nat set] => nat"
       
   251 where
   248   "transition_idx s T A =
   252   "transition_idx s T A =
   249     (LEAST k. \<exists>i j. A = {i,j} & i<j & (s j, s i) \<in> T k)"
   253     (LEAST k. \<exists>i j. A = {i,j} & i<j & (s j, s i) \<in> T k)"
   250 
   254 
   251 
   255 
   252 lemma transition_idx_less:
   256 lemma transition_idx_less: