Skip to content

Instantly share code, notes, and snippets.

@takeouchida
Last active January 4, 2019 02:32
Show Gist options
  • Save takeouchida/910026a9dc2d27f1c4d96bab6c995c1d to your computer and use it in GitHub Desktop.
Save takeouchida/910026a9dc2d27f1c4d96bab6c995c1d to your computer and use it in GitHub Desktop.
Pattern matching with 2 existential quantifiers in Isar
lemma "∃ x. x + 1 = 3" (is "∃ x. ?P x")
proof
show "?P 2" by simp
qed
(*
lemma "∃ x y. x + y + 1 = 3" (is "∃ x y. ?P x y")
proof
(*
Failed to refine any pending goal
Local statement fails to refine any pending goal
Failed attempt to solve goal by exported rule:
1 + 1 + 1 = 3
*)
show "?P 1 1" by simp
qed
*)
lemma "∃ x y. x + y + 1 = 3" (is "∃ x. ?P x")
proof
show "?P 1" (is "∃ y. ?Q y")
proof
show "?Q 1" by simp
qed
qed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment