(* Title: Sequents/LK/Hard_Quantifiers.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1992 University of Cambridge
Hard examples with quantifiers. Can be read to test the LK system. From F. J. Pelletier, Seventy-Five Problems for Testing Automatic Theorem Provers, J. Automated Reasoning 2 (1986), 191-216. Errata, JAR 4 (1988), 236-236.
Uses pc_tac rather than fast_tac when the former is significantly faster.
*)
theory Hard_Quantifiers imports"../LK" begin
lemma"\ (\x. P(x) \ Q(x)) \ (\x. P(x)) \ (\x. Q(x))" by fast
lemma"\ (\x. P \ Q(x)) \ (P \ (\x. Q(x)))" by fast
lemma"\ (\x. P(x) \ Q) \ (\x. P(x)) \ Q" by fast
lemma"\ (\x. P(x)) \ Q \ (\x. P(x) \ Q)" by fast
text"Problems requiring quantifier duplication"
(*Not provable by fast: needs multiple instantiation of \<forall>*) lemma"\ (\x. P(x) \ P(f(x))) \ P(d) \ P(f(f(f(d))))" by best_dup
(*Needs double instantiation of the quantifier*) lemma"\ \x. P(x) \ P(a) \ P(b)" by fast_dup
lemma"\ \z. P(z) \ (\x. P(x))" by best_dup
text"Hard examples with quantifiers"
text"Problem 18" lemma"\ \y. \x. P(y)\P(x)" by best_dup
text"Problem 19" lemma"\ \x. \y z. (P(y)\Q(z)) \ (P(x)\Q(x))" by best_dup
text"Problem 20" lemma"\ (\x y. \z. \w. (P(x) \ Q(y)\R(z) \ S(w))) \<longrightarrow> (\<exists>x y. P(x) \<and> Q(y)) \<longrightarrow> (\<exists>z. R(z))" by fast
text"Problem 21" lemma"\ (\x. P \ Q(x)) \ (\x. Q(x) \ P) \ (\x. P \ Q(x))" by best_dup
text"Problem 22" lemma"\ (\x. P \ Q(x)) \ (P \ (\x. Q(x)))" by fast
text"Problem 23" lemma"\ (\x. P \ Q(x)) \ (P \ (\x. Q(x)))" by best
text"Problem 51" lemma"\ (\z w. \x y. P(x,y) \ (x = z \ y = w)) \
(\<exists>z. \<forall>x. \<exists>w. (\<forall>y. P(x,y) \<longleftrightarrow> y = w) \<longleftrightarrow> x = z)" by (fast add!: subst)
text"Problem 52"(*Almost the same as 51. *) lemma"\ (\z w. \x y. P(x,y) \ (x = z \ y = w)) \
(\<exists>w. \<forall>y. \<exists>z. (\<forall>x. P(x,y) \<longleftrightarrow> x = z) \<longleftrightarrow> y = w)" by (fast add!: subst)
text"Problem 56" lemma"\ (\x.(\y. P(y) \ x = f(y)) \ P(x)) \ (\x. P(x) \ P(f(x)))" by (best add: symL subst) (*requires tricker to orient the equality properly*)
text"Problem 57" lemma"\ P(f(a,b), f(b,c)) \ P(f(b,c), f(a,c)) \
(\<forall>x y z. P(x,y) \<and> P(y,z) \<longrightarrow> P(x,z)) \<longrightarrow> P(f(a,b), f(a,c))" by fast
text"Problem 58!" lemma"\ (\x y. f(x) = g(y)) \ (\x y. f(f(x)) = f(g(y)))" by (fast add!: subst)
text"Problem 59" (*Unification works poorly here -- the abstraction %sobj prevents efficient
operation of the occurs check*) lemma"\ (\x. P(x) \ \ P(f(x))) \ (\x. P(x) \ \ P(f(x)))" using [[unify_trace_bound = 50]] by best_dup
text"Problem 60" lemma"\ \x. P(x,f(x)) \ (\y. (\z. P(z,y) \ P(z,f(x))) \ P(x,y))" by fast
text"Problem 62 as corrected in JAR 18 (1997), page 135" lemma"\ (\x. p(a) \ (p(x) \ p(f(x))) \ p(f(f(x)))) \
(\<forall>x. (\<not> p(a) \<or> p(x) \<or> p(f(f(x)))) \<and>
(\<not> p(a) \<or> \<not> p(f(x)) \<or> p(f(f(x)))))" by fast
(*18 June 92: loaded in 372 secs*) (*19 June 92: loaded in 166 secs except #34, using repeat_goal_tac*) (*29 June 92: loaded in 370 secs*) (*18 September 2005: loaded in 1.809 secs*)
end
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.