1461
|
1 |
(* Title: ZF/Rel.ML
|
435
|
2 |
ID: $Id$
|
1461
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
435
|
4 |
Copyright 1994 University of Cambridge
|
|
5 |
|
|
6 |
For Rel.thy. Relations in Zermelo-Fraenkel Set Theory
|
|
7 |
*)
|
|
8 |
|
|
9 |
open Rel;
|
|
10 |
|
|
11 |
(*** Some properties of relations -- useful? ***)
|
|
12 |
|
|
13 |
(* irreflexivity *)
|
|
14 |
|
|
15 |
val prems = goalw Rel.thy [irrefl_def]
|
|
16 |
"[| !!x. x:A ==> <x,x> ~: r |] ==> irrefl(A,r)";
|
|
17 |
by (REPEAT (ares_tac (prems @ [ballI]) 1));
|
760
|
18 |
qed "irreflI";
|
435
|
19 |
|
|
20 |
val prems = goalw Rel.thy [irrefl_def]
|
|
21 |
"[| irrefl(A,r); x:A |] ==> <x,x> ~: r";
|
|
22 |
by (rtac (prems MRS bspec) 1);
|
760
|
23 |
qed "irreflE";
|
435
|
24 |
|
|
25 |
(* symmetry *)
|
|
26 |
|
|
27 |
val prems = goalw Rel.thy [sym_def]
|
|
28 |
"[| !!x y.<x,y>: r ==> <y,x>: r |] ==> sym(r)";
|
|
29 |
by (REPEAT (ares_tac (prems @ [allI,impI]) 1));
|
760
|
30 |
qed "symI";
|
435
|
31 |
|
|
32 |
goalw Rel.thy [sym_def] "!!r. [| sym(r); <x,y>: r |] ==> <y,x>: r";
|
3016
|
33 |
by (Blast_tac 1);
|
760
|
34 |
qed "symE";
|
435
|
35 |
|
|
36 |
(* antisymmetry *)
|
|
37 |
|
|
38 |
val prems = goalw Rel.thy [antisym_def]
|
|
39 |
"[| !!x y.[| <x,y>: r; <y,x>: r |] ==> x=y |] ==> \
|
|
40 |
\ antisym(r)";
|
|
41 |
by (REPEAT (ares_tac (prems @ [allI,impI]) 1));
|
760
|
42 |
qed "antisymI";
|
435
|
43 |
|
|
44 |
val prems = goalw Rel.thy [antisym_def]
|
|
45 |
"!!r. [| antisym(r); <x,y>: r; <y,x>: r |] ==> x=y";
|
3016
|
46 |
by (Blast_tac 1);
|
760
|
47 |
qed "antisymE";
|
435
|
48 |
|
|
49 |
(* transitivity *)
|
|
50 |
|
|
51 |
goalw Rel.thy [trans_def]
|
|
52 |
"!!r. [| trans(r); <a,b>:r; <b,c>:r |] ==> <a,c>:r";
|
3016
|
53 |
by (Blast_tac 1);
|
760
|
54 |
qed "transD";
|
435
|
55 |
|
|
56 |
goalw Rel.thy [trans_on_def]
|
|
57 |
"!!r. [| trans[A](r); <a,b>:r; <b,c>:r; a:A; b:A; c:A |] ==> <a,c>:r";
|
3016
|
58 |
by (Blast_tac 1);
|
760
|
59 |
qed "trans_onD";
|
435
|
60 |
|