src/ZF/UNITY/UNITYMisc.ML
author paulson
Wed, 25 Jun 2003 13:17:26 +0200
changeset 14072 f932be305381
parent 14071 373806545656
permissions -rw-r--r--
Conversion of UNITY/Distributor to Isar script. General tidy-up.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/UNITYMisc.ML
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Sidi O Ehmety, Computer Laboratory
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   2001  University of Cambridge
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     5
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     6
Some miscellaneous and add-hoc set theory concepts.
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     7
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     8
*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     9
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    10
(** Ad-hoc set-theory rules **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    11
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    12
Goal "Union(B) Int A = (UN b:B. b Int A)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    13
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    14
qed "Int_Union_Union";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    15
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    16
Goal "A Int Union(B) = (UN b:B. A Int b)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    17
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    18
qed "Int_Union_Union2";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    19
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    20
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    21
(** Needed in State theory for the current definition of variables 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    22
where they are indexed by lists  **)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    23
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    24
Goal "i:list(nat) ==> i:univ(0)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    25
by (dres_inst_tac [("B", "0")] list_into_univ 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    26
by (blast_tac (claset() addIs [nat_into_univ]) 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    27
by (assume_tac 1);
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    28
qed "list_nat_into_univ";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    29
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    30
14072
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    31
(** Simplication rules for Collect **)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    32
14072
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    33
(*Currently unused*)
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    34
Goal "{x:A. P(x)} Int B = {x : A Int B. P(x)}";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    35
by Auto_tac;
14072
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    36
qed "Collect_Int_left";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    37
14072
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    38
(*Currently unused*)
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    39
Goal "A Int {x:B. P(x)} = {x : A Int B. P(x)}";
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    40
by Auto_tac;
f932be305381 Conversion of UNITY/Distributor to Isar script. General tidy-up.
paulson
parents: 14071
diff changeset
    41
qed "Collect_Int_right";
14060
c0c4af41fa3b Adding the theory UNITY/AllocImpl.thy, with supporting lemmas
paulson
parents: 14046
diff changeset
    42
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    43
Goal "{x:A. P(x) | Q(x)} = Collect(A, P) Un Collect(A, Q)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    44
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    45
qed "Collect_disj_eq";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    46
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    47
Goal "{x:A. P(x) & Q(x)} = Collect(A, P) Int Collect(A, Q)";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    48
by Auto_tac;
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    49
qed "Collect_conj_eq";
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    50
14046
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    51
Goal "Union(B) Int A = (UN C:B. C Int A)"; 
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    52
by (Blast_tac 1);
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    53
qed "Int_Union2";
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    54
14046
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    55
Goal "A Int succ(k) = (if k : A then cons(k, A Int k) else A Int k)";
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    56
by Auto_tac;
6616e6c53d48 updating ZF-UNITY with Sidi's new material
paulson
parents: 12215
diff changeset
    57
qed "Int_succ_right";