(* Title: FOLP/ex/Quantifiers_Int.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1991 University of Cambridge First-Order Logic: quantifier examples (intuitionistic and classical) Needs declarations of the theory "thy" and the tactic "tac". *)
theory Quantifiers_Int imports IFOLP begin
schematic_goal "?p : (ALL x y. P(x,y)) --> (ALL y x. P(x,y))" by (tactic ‹IntPr.fast_tac 🍋 1›)
schematic_goal "?p : (EX x y. P(x,y)) --> (EX y x. P(x,y))" by (tactic ‹IntPr.fast_tac 🍋 1›)
schematic_goal "?p : (EX x. P(x) | Q(x)) <-> (EX x. P(x)) | (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
(*Converse is false*)
schematic_goal "?p : (EX x. P(x)&Q(x)) --> (EX x. P(x)) & (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
text"Basic test of quantifier reasoning" (*TRUE*)
schematic_goal "?p : (EX y. ALL x. Q(x,y)) --> (ALL x. EX y. Q(x,y))" by (tactic ‹IntPr.fast_tac 🍋 1›)
schematic_goal "?p : (ALL x. Q(x)) --> (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
text"The following should fail, as they are false!"
schematic_goal "?p : (ALL x. EX y. Q(x,y)) --> (EX y. ALL x. Q(x,y))" apply (tactic ‹IntPr.fast_tac 🍋 1›)? oops
schematic_goal "?p : (ALL x. P(x)-->Q(x)) & (EX x. P(x)) --> (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
(*An example of why exI should be delayed as long as possible*)
schematic_goal "?p : (P --> (EX x. Q(x))) & P --> (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
schematic_goal "?p : (ALL x. Q(x)) --> (EX x. Q(x))" by (tactic ‹IntPr.fast_tac 🍋 1›)
text"Some slow ones"
(*Principia Mathematica *11.53 *)
schematic_goal "?p : (ALL x y. P(x) --> Q(y)) <-> ((EX x. P(x)) --> (ALL y. Q(y)))" by (tactic ‹IntPr.fast_tac 🍋 1›)
(*Principia Mathematica *11.55 *)
schematic_goal "?p : (EX x y. P(x) & Q(x,y)) <-> (EX x. P(x) & (EX y. Q(x,y)))" by (tactic ‹IntPr.fast_tac 🍋 1›)
(*Principia Mathematica *11.61 *)
schematic_goal "?p : (EX y. ALL x. P(x) --> Q(x,y)) --> (ALL x. P(x) --> (EX y. Q(x,y)))" by (tactic ‹IntPr.fast_tac 🍋 1›)
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-04-28)
¤
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 und die Messung sind noch experimentell.