src/CCL/Set.thy
author clasohm
Thu Sep 16 12:20:38 1993 +0200 (1993-09-16)
changeset 0 a5a9c433f639
child 278 523518f44286
permissions -rw-r--r--
Initial revision
clasohm@0
     1
(*  Title:      CCL/set.thy
clasohm@0
     2
    ID:         $Id$
clasohm@0
     3
clasohm@0
     4
Modified version of HOL/set.thy that extends FOL
clasohm@0
     5
clasohm@0
     6
*)
clasohm@0
     7
clasohm@0
     8
Set = FOL +
clasohm@0
     9
clasohm@0
    10
types
clasohm@0
    11
  set 1
clasohm@0
    12
clasohm@0
    13
arities
clasohm@0
    14
  set :: (term) term
clasohm@0
    15
clasohm@0
    16
consts
clasohm@0
    17
  Collect       :: "['a => o] => 'a set"                    (*comprehension*)
clasohm@0
    18
  Compl         :: "('a set) => 'a set"                     (*complement*)
clasohm@0
    19
  Int           :: "['a set, 'a set] => 'a set"         (infixl 70)
clasohm@0
    20
  Un            :: "['a set, 'a set] => 'a set"         (infixl 65)
clasohm@0
    21
  Union, Inter  :: "(('a set)set) => 'a set"                (*...of a set*)
clasohm@0
    22
  UNION, INTER  :: "['a set, 'a => 'b set] => 'b set"       (*general*)
clasohm@0
    23
  Ball, Bex     :: "['a set, 'a => o] => o"                 (*bounded quants*)
clasohm@0
    24
  mono          :: "['a set => 'b set] => o"                (*monotonicity*)
clasohm@0
    25
  ":"           :: "['a, 'a set] => o"                  (infixl 50) (*membership*)
clasohm@0
    26
  "<="          :: "['a set, 'a set] => o"              (infixl 50)
clasohm@0
    27
  singleton     :: "'a => 'a set"                       ("{_}")
clasohm@0
    28
  empty         :: "'a set"                             ("{}")
clasohm@0
    29
  "oo"          :: "['b => 'c, 'a => 'b, 'a] => 'c"     (infixr 50) (*composition*)
clasohm@0
    30
clasohm@0
    31
  "@Coll"       :: "[idt, o] => 'a set"                 ("(1{_./ _})") (*collection*)
clasohm@0
    32
clasohm@0
    33
  (* Big Intersection / Union *)
clasohm@0
    34
clasohm@0
    35
  "@INTER"      :: "[idt, 'a set, 'b set] => 'b set"    ("(INT _:_./ _)" [0, 0, 0] 10)
clasohm@0
    36
  "@UNION"      :: "[idt, 'a set, 'b set] => 'b set"    ("(UN _:_./ _)" [0, 0, 0] 10)
clasohm@0
    37
clasohm@0
    38
  (* Bounded Quantifiers *)
clasohm@0
    39
clasohm@0
    40
  "@Ball"       :: "[idt, 'a set, o] => o"              ("(ALL _:_./ _)" [0, 0, 0] 10)
clasohm@0
    41
  "@Bex"        :: "[idt, 'a set, o] => o"              ("(EX _:_./ _)" [0, 0, 0] 10)
clasohm@0
    42
clasohm@0
    43
clasohm@0
    44
translations
clasohm@0
    45
  "{x. P}"      == "Collect(%x. P)"
clasohm@0
    46
  "INT x:A. B"  == "INTER(A, %x. B)"
clasohm@0
    47
  "UN x:A. B"   == "UNION(A, %x. B)"
clasohm@0
    48
  "ALL x:A. P"  == "Ball(A, %x. P)"
clasohm@0
    49
  "EX x:A. P"   == "Bex(A, %x. P)"
clasohm@0
    50
clasohm@0
    51
clasohm@0
    52
rules
clasohm@0
    53
  mem_Collect_iff       "(a : {x.P(x)}) <-> P(a)"
clasohm@0
    54
  set_extension         "A=B <-> (ALL x.x:A <-> x:B)"
clasohm@0
    55
clasohm@0
    56
  Ball_def      "Ball(A, P)  == ALL x. x:A --> P(x)"
clasohm@0
    57
  Bex_def       "Bex(A, P)   == EX x. x:A & P(x)"
clasohm@0
    58
  mono_def      "mono(f)     == (ALL A B. A <= B --> f(A) <= f(B))"
clasohm@0
    59
  subset_def    "A <= B      == ALL x:A. x:B"
clasohm@0
    60
  singleton_def "{a}         == {x.x=a}"
clasohm@0
    61
  empty_def     "{}          == {x.False}"
clasohm@0
    62
  Un_def        "A Un B      == {x.x:A | x:B}"
clasohm@0
    63
  Int_def       "A Int B     == {x.x:A & x:B}"
clasohm@0
    64
  Compl_def     "Compl(A)    == {x. ~x:A}"
clasohm@0
    65
  INTER_def     "INTER(A, B) == {y. ALL x:A. y: B(x)}"
clasohm@0
    66
  UNION_def     "UNION(A, B) == {y. EX x:A. y: B(x)}"
clasohm@0
    67
  Inter_def     "Inter(S)    == (INT x:S. x)"
clasohm@0
    68
  Union_def     "Union(S)    == (UN x:S. x)"
clasohm@0
    69
clasohm@0
    70
end
clasohm@0
    71