src/HOL/MetisExamples/set.thy
changeset 32864 a226f29d4bdc
parent 32685 29e4e567b5f4
equal deleted inserted replaced
32852:7c8bc41ce810 32864:a226f29d4bdc
   195   by (metis Un_least 9 Un_upper2 1 Un_upper1 0 8 9 Un_upper2 1 Un_upper1 0 10)
   195   by (metis Un_least 9 Un_upper2 1 Un_upper1 0 8 9 Un_upper2 1 Un_upper1 0 10)
   196 show "False"
   196 show "False"
   197   by (metis 11 6 Un_upper2 1 Un_upper1 0 9 Un_upper2 1 Un_upper1 0)
   197   by (metis 11 6 Un_upper2 1 Un_upper1 0 9 Un_upper2 1 Un_upper1 0)
   198 qed 
   198 qed 
   199 
   199 
   200 ML {*AtpWrapper.problem_name := "set__equal_union"*}
   200 declare [[ atp_problem_prefix = "set__equal_union" ]]
   201 lemma (*equal_union: *)
   201 lemma (*equal_union: *)
   202    "(X = Y \<union> Z) =
   202    "(X = Y \<union> Z) =
   203     (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" 
   203     (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" 
   204 (*One shot proof: hand-reduced. Metis can't do the full proof any more.*)
   204 (*One shot proof: hand-reduced. Metis can't do the full proof any more.*)
   205 by (metis Un_least Un_upper1 Un_upper2 set_eq_subset)
   205 by (metis Un_least Un_upper1 Un_upper2 set_eq_subset)
   206 
   206 
   207 
   207 
   208 ML {*AtpWrapper.problem_name := "set__equal_inter"*}
   208 declare [[ atp_problem_prefix = "set__equal_inter" ]]
   209 lemma "(X = Y \<inter> Z) =
   209 lemma "(X = Y \<inter> Z) =
   210     (X \<subseteq> Y \<and> X \<subseteq> Z \<and> (\<forall>V. V \<subseteq> Y \<and> V \<subseteq> Z \<longrightarrow> V \<subseteq> X))"
   210     (X \<subseteq> Y \<and> X \<subseteq> Z \<and> (\<forall>V. V \<subseteq> Y \<and> V \<subseteq> Z \<longrightarrow> V \<subseteq> X))"
   211 by (metis Int_greatest Int_lower1 Int_lower2 set_eq_subset)
   211 by (metis Int_greatest Int_lower1 Int_lower2 set_eq_subset)
   212 
   212 
   213 ML {*AtpWrapper.problem_name := "set__fixedpoint"*}
   213 declare [[ atp_problem_prefix = "set__fixedpoint" ]]
   214 lemma fixedpoint:
   214 lemma fixedpoint:
   215     "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
   215     "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
   216 by metis
   216 by metis
   217 
   217 
   218 lemma (*fixedpoint:*)
   218 lemma (*fixedpoint:*)
   227   by (metis 3 1 2)
   227   by (metis 3 1 2)
   228 show "False"
   228 show "False"
   229   by (metis 4 0)
   229   by (metis 4 0)
   230 qed
   230 qed
   231 
   231 
   232 ML {*AtpWrapper.problem_name := "set__singleton_example"*}
   232 declare [[ atp_problem_prefix = "set__singleton_example" ]]
   233 lemma (*singleton_example_2:*)
   233 lemma (*singleton_example_2:*)
   234      "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
   234      "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
   235 by (metis Set.subsetI Union_upper insertCI set_eq_subset)
   235 by (metis Set.subsetI Union_upper insertCI set_eq_subset)
   236   --{*found by SPASS*}
   236   --{*found by SPASS*}
   237 
   237 
   257 text {*
   257 text {*
   258   From W. W. Bledsoe and Guohui Feng, SET-VAR. JAR 11 (3), 1993, pages
   258   From W. W. Bledsoe and Guohui Feng, SET-VAR. JAR 11 (3), 1993, pages
   259   293-314.
   259   293-314.
   260 *}
   260 *}
   261 
   261 
   262 ML {*AtpWrapper.problem_name := "set__Bledsoe_Fung"*}
   262 declare [[ atp_problem_prefix = "set__Bledsoe_Fung" ]]
   263 (*Notes: 1, the numbering doesn't completely agree with the paper. 
   263 (*Notes: 1, the numbering doesn't completely agree with the paper. 
   264 2, we must rename set variables to avoid type clashes.*)
   264 2, we must rename set variables to avoid type clashes.*)
   265 lemma "\<exists>B. (\<forall>x \<in> B. x \<le> (0::int))"
   265 lemma "\<exists>B. (\<forall>x \<in> B. x \<le> (0::int))"
   266       "D \<in> F \<Longrightarrow> \<exists>G. \<forall>A \<in> G. \<exists>B \<in> F. A \<subseteq> B"
   266       "D \<in> F \<Longrightarrow> \<exists>G. \<forall>A \<in> G. \<exists>B \<in> F. A \<subseteq> B"
   267       "P a \<Longrightarrow> \<exists>A. (\<forall>x \<in> A. P x) \<and> (\<exists>y. y \<in> A)"
   267       "P a \<Longrightarrow> \<exists>A. (\<forall>x \<in> A. P x) \<and> (\<exists>y. y \<in> A)"