src/ZF/Constructible/MetaExists.thy
author wenzelm
Tue Nov 07 19:40:13 2006 +0100 (2006-11-07)
changeset 21233 5a5c8ea5f66a
parent 16417 9bc16273c2d4
child 21404 eb85850d3eb7
permissions -rw-r--r--
tuned specifications;
paulson@13505
     1
(*  Title:      ZF/Constructible/MetaExists.thy
paulson@13505
     2
    ID:         $Id$
paulson@13505
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@13505
     4
*)
paulson@13505
     5
paulson@13314
     6
header{*The meta-existential quantifier*}
paulson@13314
     7
haftmann@16417
     8
theory MetaExists imports Main begin
paulson@13314
     9
paulson@13314
    10
text{*Allows quantification over any term having sort @{text logic}.  Used to
paulson@13314
    11
quantify over classes.  Yields a proposition rather than a FOL formula.*}
paulson@13314
    12
wenzelm@21233
    13
definition
wenzelm@14854
    14
  ex :: "(('a::{}) => prop) => prop"            (binder "?? " 0)
paulson@13314
    15
  "ex(P) == (!!Q. (!!x. PROP P(x) ==> PROP Q) ==> PROP Q)"
paulson@13314
    16
wenzelm@21233
    17
notation (xsymbols)
wenzelm@21233
    18
  ex  (binder "\<Or>" 0)
paulson@13314
    19
paulson@13314
    20
lemma meta_exI: "PROP P(x) ==> (?? x. PROP P(x))"
wenzelm@13315
    21
proof (unfold ex_def)
paulson@13314
    22
  assume P: "PROP P(x)"
wenzelm@13315
    23
  fix Q
wenzelm@13315
    24
  assume PQ: "\<And>x. PROP P(x) \<Longrightarrow> PROP Q"
wenzelm@13315
    25
  from P show "PROP Q" by (rule PQ)
paulson@13314
    26
qed 
paulson@13314
    27
paulson@13314
    28
lemma meta_exE: "[| ?? x. PROP P(x);  !!x. PROP P(x) ==> PROP R |] ==> PROP R"
wenzelm@13315
    29
proof (unfold ex_def)
paulson@13314
    30
  assume QPQ: "\<And>Q. (\<And>x. PROP P(x) \<Longrightarrow> PROP Q) \<Longrightarrow> PROP Q"
paulson@13314
    31
  assume PR: "\<And>x. PROP P(x) \<Longrightarrow> PROP R"
paulson@13314
    32
  from PR show "PROP R" by (rule QPQ)
paulson@13314
    33
qed
paulson@13314
    34
paulson@13314
    35
end