src/HOL/Library/Ramsey.thy
changeset 53374 a14d2a854c02
parent 46575 f1e387195a56
child 54580 7b9336176a1c
equal deleted inserted replaced
53373:3ca9e79ac926 53374:a14d2a854c02
   324    "\<exists>Y t. Y \<subseteq> Z & infinite Y & t < s & (\<forall>x\<in>Y. \<forall>y\<in>Y. x\<noteq>y --> f{x,y} = t)"
   324    "\<exists>Y t. Y \<subseteq> Z & infinite Y & t < s & (\<forall>x\<in>Y. \<forall>y\<in>Y. x\<noteq>y --> f{x,y} = t)"
   325 proof -
   325 proof -
   326   have part2: "\<forall>X. X \<subseteq> Z & finite X & card X = 2 --> f X < s"
   326   have part2: "\<forall>X. X \<subseteq> Z & finite X & card X = 2 --> f X < s"
   327     using part by (fastforce simp add: eval_nat_numeral card_Suc_eq)
   327     using part by (fastforce simp add: eval_nat_numeral card_Suc_eq)
   328   obtain Y t
   328   obtain Y t
   329     where "Y \<subseteq> Z" "infinite Y" "t < s"
   329     where *: "Y \<subseteq> Z" "infinite Y" "t < s"
   330           "(\<forall>X. X \<subseteq> Y & finite X & card X = 2 --> f X = t)"
   330           "(\<forall>X. X \<subseteq> Y & finite X & card X = 2 --> f X = t)"
   331     by (insert Ramsey [OF infZ part2]) auto
   331     by (insert Ramsey [OF infZ part2]) auto
   332   moreover from this have  "\<forall>x\<in>Y. \<forall>y\<in>Y. x \<noteq> y \<longrightarrow> f {x, y} = t" by auto
   332   then have "\<forall>x\<in>Y. \<forall>y\<in>Y. x \<noteq> y \<longrightarrow> f {x, y} = t" by auto
   333   ultimately show ?thesis by iprover
   333   with * show ?thesis by iprover
   334 qed
   334 qed
   335 
   335 
   336 
   336 
   337 subsection {* Disjunctive Well-Foundedness *}
   337 subsection {* Disjunctive Well-Foundedness *}
   338 
   338