src/CCL/Set.thy
author wenzelm
Wed, 03 Feb 1999 20:25:53 +0100
changeset 6219 b360065c2b07
parent 3935 52c14fe8f16b
child 17456 bcf7544875b2
permissions -rw-r--r--
check_thy: include ML stamp;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title:      CCL/set.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
Modified version of HOL/set.thy that extends FOL
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
Set = FOL +
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
3935
52c14fe8f16b adapted to qualified names;
wenzelm
parents: 3837
diff changeset
    10
global
52c14fe8f16b adapted to qualified names;
wenzelm
parents: 3837
diff changeset
    11
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
types
278
523518f44286 adapted type definition to new syntax
clasohm
parents: 0
diff changeset
    13
  'a set
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
arities
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
  set :: (term) term
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
consts
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
  Collect       :: "['a => o] => 'a set"                    (*comprehension*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
  Compl         :: "('a set) => 'a set"                     (*complement*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
  Int           :: "['a set, 'a set] => 'a set"         (infixl 70)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
  Un            :: "['a set, 'a set] => 'a set"         (infixl 65)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
  Union, Inter  :: "(('a set)set) => 'a set"                (*...of a set*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
  UNION, INTER  :: "['a set, 'a => 'b set] => 'b set"       (*general*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
  Ball, Bex     :: "['a set, 'a => o] => o"                 (*bounded quants*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
  mono          :: "['a set => 'b set] => o"                (*monotonicity*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
  ":"           :: "['a, 'a set] => o"                  (infixl 50) (*membership*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
  "<="          :: "['a set, 'a set] => o"              (infixl 50)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
  singleton     :: "'a => 'a set"                       ("{_}")
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
  empty         :: "'a set"                             ("{}")
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
  "oo"          :: "['b => 'c, 'a => 'b, 'a] => 'c"     (infixr 50) (*composition*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
3935
52c14fe8f16b adapted to qualified names;
wenzelm
parents: 3837
diff changeset
    33
syntax
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
  "@Coll"       :: "[idt, o] => 'a set"                 ("(1{_./ _})") (*collection*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
  (* Big Intersection / Union *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
  "@INTER"      :: "[idt, 'a set, 'b set] => 'b set"    ("(INT _:_./ _)" [0, 0, 0] 10)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
  "@UNION"      :: "[idt, 'a set, 'b set] => 'b set"    ("(UN _:_./ _)" [0, 0, 0] 10)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
  (* Bounded Quantifiers *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
  "@Ball"       :: "[idt, 'a set, o] => o"              ("(ALL _:_./ _)" [0, 0, 0] 10)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
  "@Bex"        :: "[idt, 'a set, o] => o"              ("(EX _:_./ _)" [0, 0, 0] 10)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
translations
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
  "{x. P}"      == "Collect(%x. P)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
  "INT x:A. B"  == "INTER(A, %x. B)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
  "UN x:A. B"   == "UNION(A, %x. B)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
  "ALL x:A. P"  == "Ball(A, %x. P)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
  "EX x:A. P"   == "Bex(A, %x. P)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
3935
52c14fe8f16b adapted to qualified names;
wenzelm
parents: 3837
diff changeset
    54
local
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
rules
3837
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    57
  mem_Collect_iff       "(a : {x. P(x)}) <-> P(a)"
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    58
  set_extension         "A=B <-> (ALL x. x:A <-> x:B)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
  Ball_def      "Ball(A, P)  == ALL x. x:A --> P(x)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
  Bex_def       "Bex(A, P)   == EX x. x:A & P(x)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
  mono_def      "mono(f)     == (ALL A B. A <= B --> f(A) <= f(B))"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
  subset_def    "A <= B      == ALL x:A. x:B"
3837
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    64
  singleton_def "{a}         == {x. x=a}"
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    65
  empty_def     "{}          == {x. False}"
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    66
  Un_def        "A Un B      == {x. x:A | x:B}"
d7f033c74b38 fixed dots;
wenzelm
parents: 278
diff changeset
    67
  Int_def       "A Int B     == {x. x:A & x:B}"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    68
  Compl_def     "Compl(A)    == {x. ~x:A}"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
  INTER_def     "INTER(A, B) == {y. ALL x:A. y: B(x)}"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
  UNION_def     "UNION(A, B) == {y. EX x:A. y: B(x)}"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    71
  Inter_def     "Inter(S)    == (INT x:S. x)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
  Union_def     "Union(S)    == (UN x:S. x)"
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
end
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    75