src/HOL/Library/SCT_Theorem.thy
changeset 23389 aaca6a8e5414
parent 23373 ead82c82da9e
child 23394 474ff28210c0
equal deleted inserted replaced
23388:77645da0db85 23389:aaca6a8e5414
  1137                       index_of l (f (set2pair {x, y})) = t))"
  1137                       index_of l (f (set2pair {x, y})) = t))"
  1138     by (rule Ramsey2[of "UNIV::nat set", simplified])
  1138     by (rule Ramsey2[of "UNIV::nat set", simplified])
  1139        (auto simp:index_less)
  1139        (auto simp:index_less)
  1140   then obtain T i
  1140   then obtain T i
  1141     where inf: "infinite T"
  1141     where inf: "infinite T"
  1142     and "i < length l"
  1142     and i: "i < length l"
  1143     and d: "\<And>x y. \<lbrakk>x \<in> T; y\<in>T; x \<noteq> y\<rbrakk>
  1143     and d: "\<And>x y. \<lbrakk>x \<in> T; y\<in>T; x \<noteq> y\<rbrakk>
  1144     \<Longrightarrow> index_of l (f (set2pair {x, y})) = i"
  1144     \<Longrightarrow> index_of l (f (set2pair {x, y})) = i"
  1145     by auto
  1145     by auto
  1146 
  1146 
  1147   have  "l ! i \<in> S" unfolding S
  1147   have "l ! i \<in> S" unfolding S using i
  1148     by (rule nth_mem)
  1148     by (rule nth_mem)
  1149   moreover
  1149   moreover
  1150   have "\<And>x y. x \<in> T \<Longrightarrow> y\<in>T \<Longrightarrow> x < y
  1150   have "\<And>x y. x \<in> T \<Longrightarrow> y\<in>T \<Longrightarrow> x < y
  1151     \<Longrightarrow> f (x, y) = l ! i"
  1151     \<Longrightarrow> f (x, y) = l ! i"
  1152   proof -
  1152   proof -