src/HOL/Library/FuncSet.thy
changeset 53381 355a4cac5440
parent 53015 a1119cf551e8
child 54417 dbb8ecfe1337
equal deleted inserted replaced
53380:08f3491c50bf 53381:355a4cac5440
   373   assume "Pi\<^sub>E I F = {}"
   373   assume "Pi\<^sub>E I F = {}"
   374   show "\<exists>i\<in>I. F i = {}"
   374   show "\<exists>i\<in>I. F i = {}"
   375   proof (rule ccontr)
   375   proof (rule ccontr)
   376     assume "\<not> ?thesis"
   376     assume "\<not> ?thesis"
   377     then have "\<forall>i. \<exists>y. (i \<in> I \<longrightarrow> y \<in> F i) \<and> (i \<notin> I \<longrightarrow> y = undefined)" by auto
   377     then have "\<forall>i. \<exists>y. (i \<in> I \<longrightarrow> y \<in> F i) \<and> (i \<notin> I \<longrightarrow> y = undefined)" by auto
   378     from choice[OF this] guess f ..
   378     from choice[OF this]
       
   379     obtain f where " \<forall>x. (x \<in> I \<longrightarrow> f x \<in> F x) \<and> (x \<notin> I \<longrightarrow> f x = undefined)" ..
   379     then have "f \<in> Pi\<^sub>E I F" by (auto simp: extensional_def PiE_def)
   380     then have "f \<in> Pi\<^sub>E I F" by (auto simp: extensional_def PiE_def)
   380     with `Pi\<^sub>E I F = {}` show False by auto
   381     with `Pi\<^sub>E I F = {}` show False by auto
   381   qed
   382   qed
   382 qed (auto simp: PiE_def)
   383 qed (auto simp: PiE_def)
   383 
   384 
   435   assumes ne: "\<And>i. i \<in> I \<Longrightarrow> F i \<noteq> {}" "\<And>i. i \<in> I \<Longrightarrow> F' i \<noteq> {}"
   436   assumes ne: "\<And>i. i \<in> I \<Longrightarrow> F i \<noteq> {}" "\<And>i. i \<in> I \<Longrightarrow> F' i \<noteq> {}"
   436   assumes eq: "Pi\<^sub>E I F = Pi\<^sub>E I F'" and "i \<in> I"
   437   assumes eq: "Pi\<^sub>E I F = Pi\<^sub>E I F'" and "i \<in> I"
   437   shows "F i \<subseteq> F' i"
   438   shows "F i \<subseteq> F' i"
   438 proof
   439 proof
   439   fix x assume "x \<in> F i"
   440   fix x assume "x \<in> F i"
   440   with ne have "\<forall>j. \<exists>y. ((j \<in> I \<longrightarrow> y \<in> F j \<and> (i = j \<longrightarrow> x = y)) \<and> (j \<notin> I \<longrightarrow> y = undefined))" by auto
   441   with ne have "\<forall>j. \<exists>y. ((j \<in> I \<longrightarrow> y \<in> F j \<and> (i = j \<longrightarrow> x = y)) \<and> (j \<notin> I \<longrightarrow> y = undefined))"
   441   from choice[OF this] guess f .. note f = this
   442     by auto
       
   443   from choice[OF this] obtain f
       
   444     where f: " \<forall>j. (j \<in> I \<longrightarrow> f j \<in> F j \<and> (i = j \<longrightarrow> x = f j)) \<and> (j \<notin> I \<longrightarrow> f j = undefined)" ..
   442   then have "f \<in> Pi\<^sub>E I F" by (auto simp: extensional_def PiE_def)
   445   then have "f \<in> Pi\<^sub>E I F" by (auto simp: extensional_def PiE_def)
   443   then have "f \<in> Pi\<^sub>E I F'" using assms by simp
   446   then have "f \<in> Pi\<^sub>E I F'" using assms by simp
   444   then show "x \<in> F' i" using f `i \<in> I` by (auto simp: PiE_def)
   447   then show "x \<in> F' i" using f `i \<in> I` by (auto simp: PiE_def)
   445 qed
   448 qed
   446 
   449