1 (* Title: ZF/trancl.thy |
1 (* Title: ZF/Trancl.thy |
2 ID: $Id$ |
2 ID: $Id$ |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
4 Copyright 1992 University of Cambridge |
4 Copyright 1992 University of Cambridge |
5 |
5 |
6 1. General Properties of relations |
|
7 2. Transitive closure of a relation |
|
8 *) |
6 *) |
|
7 |
|
8 header{*Relations: Their General Properties and Transitive Closure*} |
9 |
9 |
10 theory Trancl = Fixedpt + Perm + mono: |
10 theory Trancl = Fixedpt + Perm + mono: |
11 |
11 |
12 constdefs |
12 constdefs |
13 refl :: "[i,i]=>o" |
13 refl :: "[i,i]=>o" |
54 |
54 |
55 subsubsection{*symmetry*} |
55 subsubsection{*symmetry*} |
56 |
56 |
57 lemma symI: |
57 lemma symI: |
58 "[| !!x y.<x,y>: r ==> <y,x>: r |] ==> sym(r)" |
58 "[| !!x y.<x,y>: r ==> <y,x>: r |] ==> sym(r)" |
59 apply (unfold sym_def, blast) |
59 by (unfold sym_def, blast) |
60 done |
|
61 |
60 |
62 lemma antisymI: "[| sym(r); <x,y>: r |] ==> <y,x>: r" |
61 lemma antisymI: "[| sym(r); <x,y>: r |] ==> <y,x>: r" |
63 by (unfold sym_def, blast) |
62 by (unfold sym_def, blast) |
64 |
63 |
65 subsubsection{*antisymmetry*} |
64 subsubsection{*antisymmetry*} |
66 |
65 |
67 lemma antisymI: |
66 lemma antisymI: |
68 "[| !!x y.[| <x,y>: r; <y,x>: r |] ==> x=y |] ==> antisym(r)" |
67 "[| !!x y.[| <x,y>: r; <y,x>: r |] ==> x=y |] ==> antisym(r)" |
69 apply (simp add: antisym_def, blast) |
68 by (simp add: antisym_def, blast) |
70 done |
|
71 |
69 |
72 lemma antisymE: "[| antisym(r); <x,y>: r; <y,x>: r |] ==> x=y" |
70 lemma antisymE: "[| antisym(r); <x,y>: r; <y,x>: r |] ==> x=y" |
73 by (simp add: antisym_def, blast) |
71 by (simp add: antisym_def, blast) |
74 |
72 |
75 subsubsection{*transitivity*} |
73 subsubsection{*transitivity*} |
362 apply (drule converseI) |
360 apply (drule converseI) |
363 apply (simp (no_asm_use) add: trancl_converse [symmetric]) |
361 apply (simp (no_asm_use) add: trancl_converse [symmetric]) |
364 apply (erule trancl_induct) |
362 apply (erule trancl_induct) |
365 apply (auto simp add: trancl_converse) |
363 apply (auto simp add: trancl_converse) |
366 done |
364 done |
|
365 |
|
366 lemmas rtrancl_induct = rtrancl_induct [case_names initial step, induct set: rtrancl] |
|
367 and trancl_induct = trancl_induct [case_names initial step, induct set: trancl] |
|
368 and converse_trancl_induct = converse_trancl_induct [case_names initial step, consumes 1] |
|
369 and rtrancl_full_induct = rtrancl_full_induct [case_names initial step, consumes 1] |
|
370 |
367 |
371 |
368 ML |
372 ML |
369 {* |
373 {* |
370 val refl_def = thm "refl_def"; |
374 val refl_def = thm "refl_def"; |
371 val irrefl_def = thm "irrefl_def"; |
375 val irrefl_def = thm "irrefl_def"; |