src/ZF/Order.ML
author paulson
Wed, 25 Nov 1998 15:54:41 +0100
changeset 5971 c5a7a7685826
parent 5488 9df083aed63d
child 6153 bff90585cce5
permissions -rw-r--r--
simplified ensures_UNIV
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
     1
(*  Title:      ZF/Order.ML
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     4
    Copyright   1994  University of Cambridge
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     5
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
     6
Orders in Zermelo-Fraenkel Set Theory 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
     7
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
     8
Results from the book "Set Theory: an Introduction to Independence Proofs"
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
     9
        by Ken Kunen.  Chapter 1, section 6.
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    10
*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    11
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    12
open Order;
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    13
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    14
(** Basic properties of the definitions **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    15
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    16
(*needed?*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    17
Goalw [part_ord_def, irrefl_def, trans_on_def, asym_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    18
    "part_ord(A,r) ==> asym(r Int A*A)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    19
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
    20
qed "part_ord_Imp_asym";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    21
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
    22
val major::premx::premy::prems = Goalw [linear_def]
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    23
    "[| linear(A,r);  x:A;  y:A;  \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    24
\       <x,y>:r ==> P;  x=y ==> P;  <y,x>:r ==> P |] ==> P";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    25
by (cut_facts_tac [major,premx,premy] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    26
by (REPEAT_FIRST (eresolve_tac [ballE,disjE]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    27
by (EVERY1 (map etac prems));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    28
by (ALLGOALS contr_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    29
qed "linearE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    30
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    31
(*Does the case analysis, deleting linear(A,r) and proving trivial subgoals*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    32
val linear_case_tac =
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    33
    SELECT_GOAL (EVERY [etac linearE 1, assume_tac 1, assume_tac 1,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
    34
                        REPEAT_SOME (assume_tac ORELSE' contr_tac)]);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    35
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    36
(** General properties of well_ord **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    37
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    38
Goalw [irrefl_def, part_ord_def, tot_ord_def, 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
    39
                 trans_on_def, well_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    40
    "[| wf[A](r); linear(A,r) |] ==> well_ord(A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
    41
by (asm_simp_tac (simpset() addsimps [wf_on_not_refl]) 1);
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
    42
by (fast_tac (claset() addEs [linearE, wf_on_asym, wf_on_chain3]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    43
qed "well_ordI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    44
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    45
Goalw [well_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    46
    "well_ord(A,r) ==> wf[A](r)";
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    47
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    48
qed "well_ord_is_wf";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    49
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    50
Goalw [well_ord_def, tot_ord_def, part_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    51
    "well_ord(A,r) ==> trans[A](r)";
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    52
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    53
qed "well_ord_is_trans_on";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    54
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    55
Goalw [well_ord_def, tot_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    56
  "well_ord(A,r) ==> linear(A,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    57
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    58
qed "well_ord_is_linear";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    59
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    60
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    61
(** Derived rules for pred(A,x,r) **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    62
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    63
Goalw [pred_def] "y : pred(A,x,r) <-> <y,x>:r & y:A";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    64
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    65
qed "pred_iff";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    66
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    67
bind_thm ("predI", conjI RS (pred_iff RS iffD2));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    68
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
    69
val [major,minor] = Goalw [pred_def]
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    70
    "[| y: pred(A,x,r);  [| y:A; <y,x>:r |] ==> P |] ==> P";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    71
by (rtac (major RS CollectE) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    72
by (REPEAT (ares_tac [minor] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    73
qed "predE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    74
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    75
Goalw [pred_def] "pred(A,x,r) <= r -`` {x}";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    76
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    77
qed "pred_subset_under";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    78
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    79
Goalw [pred_def] "pred(A,x,r) <= A";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    80
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    81
qed "pred_subset";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    82
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    83
Goalw [pred_def]
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    84
    "pred(pred(A,x,r), y, r) = pred(A,x,r) Int pred(A,y,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    85
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    86
qed "pred_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    87
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    88
Goalw [trans_on_def, pred_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
    89
    "[| trans[A](r);  <y,x>:r;  x:A;  y:A \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    90
\         |] ==> pred(pred(A,x,r), y, r) = pred(A,y,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
    91
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    92
qed "trans_pred_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    93
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
    94
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    95
(** The ordering's properties hold over all subsets of its domain 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    96
    [including initial segments of the form pred(A,x,r) **)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    97
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    98
(*Note: a relation s such that s<=r need not be a partial ordering*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
    99
Goalw [part_ord_def, irrefl_def, trans_on_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   100
    "[| part_ord(A,r);  B<=A |] ==> part_ord(B,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   101
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   102
qed "part_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   103
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   104
Goalw [linear_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   105
    "[| linear(A,r);  B<=A |] ==> linear(B,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   106
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   107
qed "linear_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   108
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   109
Goalw [tot_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   110
    "[| tot_ord(A,r);  B<=A |] ==> tot_ord(B,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   111
by (fast_tac (claset() addSEs [part_ord_subset, linear_subset]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   112
qed "tot_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   113
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   114
Goalw [well_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   115
    "[| well_ord(A,r);  B<=A |] ==> well_ord(B,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   116
by (fast_tac (claset() addSEs [tot_ord_subset, wf_on_subset_A]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   117
qed "well_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   118
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   119
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   120
(** Relations restricted to a smaller domain, by Krzysztof Grabczewski **)
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   121
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   122
Goalw [irrefl_def] "irrefl(A,r Int A*A) <-> irrefl(A,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   123
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   124
qed "irrefl_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   125
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   126
Goalw [trans_on_def] "trans[A](r Int A*A) <-> trans[A](r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   127
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   128
qed "trans_on_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   129
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   130
Goalw [part_ord_def] "part_ord(A,r Int A*A) <-> part_ord(A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   131
by (simp_tac (simpset() addsimps [irrefl_Int_iff, trans_on_Int_iff]) 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   132
qed "part_ord_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   133
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   134
Goalw [linear_def] "linear(A,r Int A*A) <-> linear(A,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   135
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   136
qed "linear_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   137
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   138
Goalw [tot_ord_def] "tot_ord(A,r Int A*A) <-> tot_ord(A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   139
by (simp_tac (simpset() addsimps [part_ord_Int_iff, linear_Int_iff]) 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   140
qed "tot_ord_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   141
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   142
Goalw [wf_on_def, wf_def] "wf[A](r Int A*A) <-> wf[A](r)";
4311
e220fb9bd4e5 Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents: 4152
diff changeset
   143
by (Fast_tac 1);   (*10 times faster than Blast_tac!*) 
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   144
qed "wf_on_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   145
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   146
Goalw [well_ord_def] "well_ord(A,r Int A*A) <-> well_ord(A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   147
by (simp_tac (simpset() addsimps [tot_ord_Int_iff, wf_on_Int_iff]) 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   148
qed "well_ord_Int_iff";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   149
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   150
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   151
(** Relations over the Empty Set **)
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   152
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   153
Goalw [irrefl_def] "irrefl(0,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   154
by (Blast_tac 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   155
qed "irrefl_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   156
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   157
Goalw [trans_on_def] "trans[0](r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   158
by (Blast_tac 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   159
qed "trans_on_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   160
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   161
Goalw [part_ord_def] "part_ord(0,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   162
by (simp_tac (simpset() addsimps [irrefl_0, trans_on_0]) 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   163
qed "part_ord_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   164
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   165
Goalw [linear_def] "linear(0,r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   166
by (Blast_tac 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   167
qed "linear_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   168
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   169
Goalw [tot_ord_def] "tot_ord(0,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   170
by (simp_tac (simpset() addsimps [part_ord_0, linear_0]) 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   171
qed "tot_ord_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   172
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   173
Goalw [wf_on_def, wf_def] "wf[0](r)";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   174
by (Blast_tac 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   175
qed "wf_on_0";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   176
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   177
Goalw [well_ord_def] "well_ord(0,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   178
by (simp_tac (simpset() addsimps [tot_ord_0, wf_on_0]) 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   179
qed "well_ord_0";
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   180
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   181
5262
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   182
(** The unit set is well-ordered by the empty relation (Grabczewski) **)
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   183
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   184
Goalw [irrefl_def, trans_on_def, part_ord_def, linear_def, tot_ord_def]
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   185
        "tot_ord({a},0)";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   186
by (Simp_tac 1);
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   187
qed "tot_ord_unit";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   188
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   189
Goalw [wf_on_def, wf_def] "wf[{a}](0)";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   190
by (Fast_tac 1);
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   191
qed "wf_on_unit";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   192
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   193
Goalw [well_ord_def] "well_ord({a},0)";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   194
by (simp_tac (simpset() addsimps [tot_ord_unit, wf_on_unit]) 1);
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   195
qed "well_ord_unit";
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   196
212d203d6cd3 New results from AC
paulson
parents: 5147
diff changeset
   197
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   198
(** Order-preserving (monotone) maps **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   199
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   200
Goalw [mono_map_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   201
    "f: mono_map(A,r,B,s) ==> f: A->B";
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   202
by (etac CollectD1 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   203
qed "mono_map_is_fun";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   204
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   205
Goalw [mono_map_def, inj_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   206
    "[| linear(A,r);  wf[B](s);  f: mono_map(A,r,B,s) |] ==> f: inj(A,B)";
3736
39ee3d31cfbc Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents: 3207
diff changeset
   207
by (Clarify_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   208
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   209
by (REPEAT 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   210
    (EVERY [eresolve_tac [wf_on_not_refl RS notE] 1,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   211
            etac ssubst 2,
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   212
            Fast_tac 2,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   213
            REPEAT (ares_tac [apply_type] 1)]));
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   214
qed "mono_map_is_inj";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   215
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   216
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   217
(** Order-isomorphisms -- or similarities, as Suppes calls them **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   218
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   219
val prems = Goalw [ord_iso_def]
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   220
    "[| f: bij(A, B);   \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   221
\       !!x y. [| x:A; y:A |] ==> <x, y> : r <-> <f`x, f`y> : s \
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   222
\    |] ==> f: ord_iso(A,r,B,s)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   223
by (blast_tac (claset() addSIs prems) 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   224
qed "ord_isoI";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   225
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   226
Goalw [ord_iso_def, mono_map_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   227
    "f: ord_iso(A,r,B,s) ==> f: mono_map(A,r,B,s)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   228
by (blast_tac (claset() addSDs [bij_is_fun]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   229
qed "ord_iso_is_mono_map";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   230
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   231
Goalw [ord_iso_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   232
    "f: ord_iso(A,r,B,s) ==> f: bij(A,B)";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   233
by (etac CollectD1 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   234
qed "ord_iso_is_bij";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   235
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   236
(*Needed?  But ord_iso_converse is!*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   237
Goalw [ord_iso_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   238
    "[| f: ord_iso(A,r,B,s);  <x,y>: r;  x:A;  y:A |] ==> \
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   239
\         <f`x, f`y> : s";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   240
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   241
qed "ord_iso_apply";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   242
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   243
Goalw [ord_iso_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   244
    "[| f: ord_iso(A,r,B,s);  <x,y>: s;  x:B;  y:B |] ==> \
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   245
\         <converse(f) ` x, converse(f) ` y> : r";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   246
by (etac CollectE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   247
by (etac (bspec RS bspec RS iffD2) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   248
by (REPEAT (eresolve_tac [asm_rl, 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   249
                          bij_converse_bij RS bij_is_fun RS apply_type] 1));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   250
by (asm_simp_tac (simpset() addsimps [right_inverse_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   251
qed "ord_iso_converse";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   252
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   253
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   254
(*Rewriting with bijections and converse (function inverse)*)
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   255
val bij_inverse_ss = 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   256
    simpset() setSolver (type_auto_tac [ord_iso_is_bij, bij_is_fun, apply_type, 
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   257
                                       bij_converse_bij, comp_fun, comp_bij])
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   258
          addsimps [right_inverse_bij, left_inverse_bij];
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   259
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   260
(** Symmetry and Transitivity Rules **)
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   261
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   262
(*Reflexivity of similarity*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   263
Goal "id(A): ord_iso(A,r,A,r)";
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   264
by (resolve_tac [id_bij RS ord_isoI] 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   265
by (Asm_simp_tac 1);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   266
qed "ord_iso_refl";
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   267
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   268
(*Symmetry of similarity*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   269
Goalw [ord_iso_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   270
    "f: ord_iso(A,r,B,s) ==> converse(f): ord_iso(B,s,A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   271
by (fast_tac (claset() addss bij_inverse_ss) 1);
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 769
diff changeset
   272
qed "ord_iso_sym";
769
66cdfde4ec5d not_well_ord_iso_pred: removed needless quantifier
lcp
parents: 760
diff changeset
   273
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   274
(*Transitivity of similarity*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   275
Goalw [mono_map_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   276
    "[| g: mono_map(A,r,B,s);  f: mono_map(B,s,C,t) |] ==> \
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   277
\         (f O g): mono_map(A,r,C,t)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   278
by (fast_tac (claset() addss bij_inverse_ss) 1);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   279
qed "mono_map_trans";
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   280
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   281
(*Transitivity of similarity: the order-isomorphism relation*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   282
Goalw [ord_iso_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   283
    "[| g: ord_iso(A,r,B,s);  f: ord_iso(B,s,C,t) |] ==> \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   284
\         (f O g): ord_iso(A,r,C,t)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   285
by (fast_tac (claset() addss bij_inverse_ss) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   286
qed "ord_iso_trans";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   287
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   288
(** Two monotone maps can make an order-isomorphism **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   289
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   290
Goalw [ord_iso_def, mono_map_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   291
    "[| f: mono_map(A,r,B,s);  g: mono_map(B,s,A,r);     \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   292
\              f O g = id(B);  g O f = id(A) |] ==> f: ord_iso(A,r,B,s)";
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   293
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   294
by (REPEAT_FIRST (ares_tac [fg_imp_bijective]));
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   295
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   296
by (subgoal_tac "<g`(f`x), g`(f`y)> : r" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   297
by (blast_tac (claset() addIs [apply_funtype]) 2);
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   298
by (asm_full_simp_tac (simpset() addsimps [comp_eq_id_iff RS iffD1]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   299
qed "mono_ord_isoI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   300
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   301
Goal "[| well_ord(A,r);  well_ord(B,s);                             \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   302
\            f: mono_map(A,r,B,s);  converse(f): mono_map(B,s,A,r)      \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   303
\         |] ==> f: ord_iso(A,r,B,s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   304
by (REPEAT (ares_tac [mono_ord_isoI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   305
by (forward_tac [mono_map_is_fun RS fun_is_rel] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   306
by (etac (converse_converse RS subst) 1 THEN rtac left_comp_inverse 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   307
by (DEPTH_SOLVE (ares_tac [mono_map_is_inj, left_comp_inverse] 1
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   308
          ORELSE eresolve_tac [well_ord_is_linear, well_ord_is_wf] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   309
qed "well_ord_mono_ord_isoI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   310
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   311
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   312
(** Order-isomorphisms preserve the ordering's properties **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   313
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   314
Goalw [part_ord_def, irrefl_def, trans_on_def, ord_iso_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   315
    "[| part_ord(B,s);  f: ord_iso(A,r,B,s) |] ==> part_ord(A,r)";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   316
by (Asm_simp_tac 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   317
by (fast_tac (claset() addIs [bij_is_fun RS apply_type]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   318
qed "part_ord_ord_iso";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   319
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   320
Goalw [linear_def, ord_iso_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   321
    "[| linear(B,s);  f: ord_iso(A,r,B,s) |] ==> linear(A,r)";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   322
by (Asm_simp_tac 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   323
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   324
by (dres_inst_tac [("x1", "f`x"), ("x", "f`xa")] (bspec RS bspec) 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   325
by (safe_tac (claset() addSEs [bij_is_fun RS apply_type]));
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   326
by (dres_inst_tac [("t", "op `(converse(f))")] subst_context 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   327
by (asm_full_simp_tac (simpset() addsimps [left_inverse_bij]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   328
qed "linear_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   329
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   330
Goalw [wf_on_def, wf_def, ord_iso_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   331
    "[| wf[B](s);  f: ord_iso(A,r,B,s) |] ==> wf[A](r)";
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   332
(*reversed &-congruence rule handles context of membership in A*)
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   333
by (asm_full_simp_tac (simpset() addcongs [conj_cong2]) 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   334
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   335
by (dres_inst_tac [("x", "{f`z. z:Z Int A}")] spec 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   336
by (safe_tac (claset() addSIs [equalityI]));
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   337
by (ALLGOALS (blast_tac
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   338
	      (claset() addSDs [equalityD1] addIs [bij_is_fun RS apply_type])));
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   339
qed "wf_on_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   340
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   341
Goalw [well_ord_def, tot_ord_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   342
    "[| well_ord(B,s);  f: ord_iso(A,r,B,s) |] ==> well_ord(A,r)";
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   343
by (fast_tac
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   344
    (claset() addSEs [part_ord_ord_iso, linear_ord_iso, wf_on_ord_iso]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   345
qed "well_ord_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   346
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   347
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   348
(*** Main results of Kunen, Chapter 1 section 6 ***)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   349
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   350
(*Inductive argument for Kunen's Lemma 6.1, etc. 
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   351
  Simple proof from Halmos, page 72*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   352
Goalw [well_ord_def, ord_iso_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   353
  "[| well_ord(A,r);  f: ord_iso(A,r, A',r);  A'<= A;  y: A |] \
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   354
\       ==> ~ <f`y, y>: r";
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   355
by (REPEAT (eresolve_tac [conjE, CollectE] 1));
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   356
by (wf_on_ind_tac "y" [] 1);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   357
by (dres_inst_tac [("a","y1")] (bij_is_fun RS apply_type) 1);
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   358
by (assume_tac 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   359
by (Blast_tac 1);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   360
qed "well_ord_iso_subset_lemma";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   361
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   362
(*Kunen's Lemma 6.1: there's no order-isomorphism to an initial segment
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   363
                     of a well-ordering*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   364
Goal "[| well_ord(A,r);  f : ord_iso(A, r, pred(A,x,r), r);  x:A |] ==> P";
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   365
by (metacut_tac well_ord_iso_subset_lemma 1);
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   366
by (REPEAT_FIRST (ares_tac [pred_subset]));
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   367
(*Now we know  f`x < x *)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   368
by (EVERY1 [dtac (ord_iso_is_bij RS bij_is_fun RS apply_type),
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   369
             assume_tac]);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   370
(*Now we also know f`x : pred(A,x,r);  contradiction! *)
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   371
by (asm_full_simp_tac (simpset() addsimps [well_ord_def, pred_def]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   372
qed "well_ord_iso_predE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   373
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   374
(*Simple consequence of Lemma 6.1*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   375
Goal "[| well_ord(A,r);  f : ord_iso(pred(A,a,r), r, pred(A,c,r), r);  \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   376
\         a:A;  c:A |] ==> a=c";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   377
by (forward_tac [well_ord_is_trans_on] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   378
by (forward_tac [well_ord_is_linear] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   379
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   380
by (dtac ord_iso_sym 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   381
by (REPEAT   (*because there are two symmetric cases*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   382
    (EVERY [eresolve_tac [pred_subset RSN (2, well_ord_subset) RS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   383
                          well_ord_iso_predE] 1,
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   384
            blast_tac (claset() addSIs [predI]) 2,
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   385
            asm_simp_tac (simpset() addsimps [trans_pred_pred_eq]) 1]));
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   386
qed "well_ord_iso_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   387
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   388
(*Does not assume r is a wellordering!*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   389
Goalw [ord_iso_def, pred_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   390
 "[| f : ord_iso(A,r,B,s);   a:A |] ==>    \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   391
\      f `` pred(A,a,r) = pred(B, f`a, s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   392
by (etac CollectE 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   393
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   394
    (simpset() addsimps [[bij_is_fun, Collect_subset] MRS image_fun]) 1);
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
   395
by (rtac equalityI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   396
by (safe_tac (claset() addSEs [bij_is_fun RS apply_type]));
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   397
by (rtac RepFun_eqI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   398
by (blast_tac (claset() addSIs [right_inverse_bij RS sym]) 1);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   399
by (asm_simp_tac bij_inverse_ss 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   400
qed "ord_iso_image_pred";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   401
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   402
(*But in use, A and B may themselves be initial segments.  Then use
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   403
  trans_pred_pred_eq to simplify the pred(pred...) terms.  See just below.*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   404
Goal "[| f : ord_iso(A,r,B,s);   a:A |] ==>    \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   405
\      restrict(f, pred(A,a,r)) : ord_iso(pred(A,a,r), r, pred(B, f`a, s), s)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   406
by (asm_simp_tac (simpset() addsimps [ord_iso_image_pred RS sym]) 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   407
by (rewtac ord_iso_def);
848
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   408
by (etac CollectE 1);
b1dc15d86081 Proved ord_isoI, ord_iso_refl. Simplified proof of
lcp
parents: 836
diff changeset
   409
by (rtac CollectI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   410
by (asm_full_simp_tac (simpset() addsimps [pred_def]) 2);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   411
by (eresolve_tac [[bij_is_inj, pred_subset] MRS restrict_bij] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   412
qed "ord_iso_restrict_pred";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   413
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   414
(*Tricky; a lot of forward proof!*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   415
Goal "[| well_ord(A,r);  well_ord(B,s);  <a,c>: r;     \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   416
\         f : ord_iso(pred(A,a,r), r, pred(B,b,s), s);  \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   417
\         g : ord_iso(pred(A,c,r), r, pred(B,d,s), s);  \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   418
\         a:A;  c:A;  b:B;  d:B |] ==> <b,d>: s";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   419
by (forward_tac [ord_iso_is_bij RS bij_is_fun RS apply_type] 1  THEN
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   420
    REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   421
by (subgoal_tac "b = g`a" 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   422
by (Asm_simp_tac 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   423
by (rtac well_ord_iso_pred_eq 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   424
by (REPEAT_SOME assume_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   425
by (forward_tac [ord_iso_restrict_pred] 1  THEN
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   426
    REPEAT1 (eresolve_tac [asm_rl, predI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   427
by (asm_full_simp_tac
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   428
    (simpset() addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   429
by (eresolve_tac [ord_iso_sym RS ord_iso_trans] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   430
by (assume_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   431
qed "well_ord_iso_preserving";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   432
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   433
val  bij_apply_cs = claset() addSIs [bij_converse_bij]
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   434
                            addIs  [ord_iso_is_bij, bij_is_fun, apply_funtype];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   435
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   436
(*See Halmos, page 72*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   437
Goal "[| well_ord(A,r);  \
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   438
\            f: ord_iso(A,r, B,s);  g: ord_iso(A,r, B,s);  y: A |] \
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   439
\         ==> ~ <g`y, f`y> : s";
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   440
by (forward_tac [well_ord_iso_subset_lemma] 1);
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   441
by (res_inst_tac [("f","converse(f)"), ("g","g")] ord_iso_trans 1);
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   442
by (REPEAT_FIRST (ares_tac [subset_refl, ord_iso_sym]));
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   443
by Safe_tac;
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   444
by (forward_tac [ord_iso_converse] 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   445
by (EVERY (map (blast_tac bij_apply_cs) [1,1,1]));
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   446
by (asm_full_simp_tac bij_inverse_ss 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   447
qed "well_ord_iso_unique_lemma";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   448
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   449
(*Kunen's Lemma 6.2: Order-isomorphisms between well-orderings are unique*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   450
Goal "[| well_ord(A,r);  \
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   451
\            f: ord_iso(A,r, B,s);  g: ord_iso(A,r, B,s) |] ==> f = g";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   452
by (rtac fun_extension 1);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   453
by (REPEAT (etac (ord_iso_is_bij RS bij_is_fun) 1));
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   454
by (subgoals_tac ["f`x : B", "g`x : B", "linear(B,s)"] 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   455
by (REPEAT (blast_tac bij_apply_cs 3));
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   456
by (dtac well_ord_ord_iso 2 THEN etac ord_iso_sym 2);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   457
by (asm_full_simp_tac (simpset() addsimps [tot_ord_def, well_ord_def]) 2);
812
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   458
by (linear_case_tac 1);
bf4b7c37db2c Simplified proof of ord_iso_image_pred using bij_inverse_ss.
lcp
parents: 794
diff changeset
   459
by (DEPTH_SOLVE (eresolve_tac [asm_rl, well_ord_iso_unique_lemma RS notE] 1));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   460
qed "well_ord_iso_unique";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   461
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   462
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   463
(** Towards Kunen's Theorem 6.3: linearity of the similarity relation **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   464
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   465
Goalw [ord_iso_map_def] "ord_iso_map(A,r,B,s) <= A*B";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   466
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   467
qed "ord_iso_map_subset";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   468
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   469
Goalw [ord_iso_map_def] "domain(ord_iso_map(A,r,B,s)) <= A";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   470
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   471
qed "domain_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   472
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   473
Goalw [ord_iso_map_def] "range(ord_iso_map(A,r,B,s)) <= B";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   474
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   475
qed "range_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   476
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   477
Goalw [ord_iso_map_def]
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   478
    "converse(ord_iso_map(A,r,B,s)) = ord_iso_map(B,s,A,r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   479
by (blast_tac (claset() addIs [ord_iso_sym]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   480
qed "converse_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   481
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   482
Goalw [ord_iso_map_def, function_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   483
    "well_ord(B,s) ==> function(ord_iso_map(A,r,B,s))";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   484
by (blast_tac (claset() addIs [well_ord_iso_pred_eq, 
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   485
			      ord_iso_sym, ord_iso_trans]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   486
qed "function_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   487
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   488
Goal "well_ord(B,s) ==> ord_iso_map(A,r,B,s)        \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   489
\          : domain(ord_iso_map(A,r,B,s)) -> range(ord_iso_map(A,r,B,s))";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   490
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   491
    (simpset() addsimps [Pi_iff, function_ord_iso_map,
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   492
                     ord_iso_map_subset RS domain_times_range]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   493
qed "ord_iso_map_fun";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   494
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   495
Goalw [mono_map_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   496
    "[| well_ord(A,r);  well_ord(B,s) |] ==> ord_iso_map(A,r,B,s)  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   497
\          : mono_map(domain(ord_iso_map(A,r,B,s)), r,  \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   498
\                     range(ord_iso_map(A,r,B,s)), s)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   499
by (asm_simp_tac (simpset() addsimps [ord_iso_map_fun]) 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
   500
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   501
by (subgoals_tac ["x:A", "xa:A", "y:B", "ya:B"] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   502
by (REPEAT 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   503
    (blast_tac (claset() addSEs [ord_iso_map_subset RS subsetD RS SigmaE]) 2));
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   504
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   505
    (simpset() addsimps [ord_iso_map_fun RSN (2,apply_equality)]) 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   506
by (rewtac ord_iso_map_def);
5488
paulson
parents: 5268
diff changeset
   507
by Safe_tac;
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   508
by (rtac well_ord_iso_preserving 1 THEN REPEAT_FIRST assume_tac);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   509
qed "ord_iso_map_mono_map";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   510
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   511
Goalw [mono_map_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   512
    "[| well_ord(A,r);  well_ord(B,s) |] ==> ord_iso_map(A,r,B,s)  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   513
\          : ord_iso(domain(ord_iso_map(A,r,B,s)), r,   \
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   514
\                     range(ord_iso_map(A,r,B,s)), s)";
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   515
by (rtac well_ord_mono_ord_isoI 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   516
by (resolve_tac [converse_ord_iso_map RS subst] 4);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   517
by (asm_simp_tac 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   518
    (simpset() addsimps [ord_iso_map_subset RS converse_converse]) 4);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   519
by (REPEAT (ares_tac [ord_iso_map_mono_map] 3));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   520
by (ALLGOALS (etac well_ord_subset));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   521
by (ALLGOALS (resolve_tac [domain_ord_iso_map, range_ord_iso_map]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   522
qed "ord_iso_map_ord_iso";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   523
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   524
(*One way of saying that domain(ord_iso_map(A,r,B,s)) is downwards-closed*)
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   525
Goalw [ord_iso_map_def]
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   526
  "[| well_ord(A,r);  well_ord(B,s);               \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   527
\          a: A;  a ~: domain(ord_iso_map(A,r,B,s))     \
1015
75110179587d Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents: 990
diff changeset
   528
\       |] ==>  domain(ord_iso_map(A,r,B,s)) <= pred(A, a, r)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   529
by (safe_tac (claset() addSIs [predI]));
1015
75110179587d Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents: 990
diff changeset
   530
(*Case analysis on  xaa vs a in r *)
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   531
by (forw_inst_tac [("A","A")] well_ord_is_linear 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   532
by (linear_case_tac 1);
1015
75110179587d Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents: 990
diff changeset
   533
(*Trivial case: a=xa*)
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   534
by (Blast_tac 2);
1015
75110179587d Changed proof of domain_ord_iso_map_subset for new hyp_subst_tac
lcp
parents: 990
diff changeset
   535
(*Harder case: <a, xa>: r*)
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   536
by (forward_tac [ord_iso_is_bij RS bij_is_fun RS apply_type] 1  THEN
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   537
    REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   538
by (forward_tac [ord_iso_restrict_pred] 1  THEN
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   539
    REPEAT1 (eresolve_tac [asm_rl, predI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   540
by (asm_full_simp_tac
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   541
    (simpset() addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   542
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   543
qed "domain_ord_iso_map_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   544
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   545
(*For the 4-way case analysis in the main result*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   546
Goal "[| well_ord(A,r);  well_ord(B,s) |] ==> \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   547
\       domain(ord_iso_map(A,r,B,s)) = A |      \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   548
\       (EX x:A. domain(ord_iso_map(A,r,B,s)) = pred(A,x,r))";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   549
by (forward_tac [well_ord_is_wf] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   550
by (rewrite_goals_tac [wf_on_def, wf_def]);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   551
by (dres_inst_tac [("x", "A-domain(ord_iso_map(A,r,B,s))")] spec 1);
3736
39ee3d31cfbc Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents: 3207
diff changeset
   552
by Safe_tac;
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   553
(*The first case: the domain equals A*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   554
by (rtac (domain_ord_iso_map RS equalityI) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   555
by (etac (Diff_eq_0_iff RS iffD1) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   556
(*The other case: the domain equals an initial segment*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   557
by (swap_res_tac [bexI] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   558
by (assume_tac 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   559
by (rtac equalityI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   560
(*not (claset()) below; that would use rules like domainE!*)
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   561
by (blast_tac (claset() addSEs [predE]) 2);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   562
by (REPEAT (ares_tac [domain_ord_iso_map_subset] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   563
qed "domain_ord_iso_map_cases";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   564
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   565
(*As above, by duality*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   566
Goal "[| well_ord(A,r);  well_ord(B,s) |] ==> \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   567
\       range(ord_iso_map(A,r,B,s)) = B |       \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   568
\       (EX y:B. range(ord_iso_map(A,r,B,s))= pred(B,y,s))";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   569
by (resolve_tac [converse_ord_iso_map RS subst] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   570
by (asm_simp_tac
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   571
    (simpset() addsimps [range_converse, domain_ord_iso_map_cases]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   572
qed "range_ord_iso_map_cases";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   573
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   574
(*Kunen's Theorem 6.3: Fundamental Theorem for Well-Ordered Sets*)
5268
59ef39008514 even more tidying of Goal commands
paulson
parents: 5262
diff changeset
   575
Goal "[| well_ord(A,r);  well_ord(B,s) |] ==>         \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   576
\       ord_iso_map(A,r,B,s) : ord_iso(A, r, B, s) |    \
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   577
\       (EX x:A. ord_iso_map(A,r,B,s) : ord_iso(pred(A,x,r), r, B, s)) | \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   578
\       (EX y:B. ord_iso_map(A,r,B,s) : ord_iso(A, r, pred(B,y,s), s))";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   579
by (forw_inst_tac [("B","B")] domain_ord_iso_map_cases 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   580
by (forw_inst_tac [("B","B")] range_ord_iso_map_cases 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   581
by (REPEAT_FIRST (eresolve_tac [asm_rl, disjE, bexE]));
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   582
by (ALLGOALS (dtac ord_iso_map_ord_iso THEN' assume_tac THEN' 
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   583
              asm_full_simp_tac (simpset() addsimps [bexI])));
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   584
by (resolve_tac [wf_on_not_refl RS notE] 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   585
by (etac well_ord_is_wf 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   586
by (assume_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   587
by (subgoal_tac "<x,y>: ord_iso_map(A,r,B,s)" 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   588
by (dtac rangeI 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   589
by (asm_full_simp_tac (simpset() addsimps [pred_def]) 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1015
diff changeset
   590
by (rewtac ord_iso_map_def);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   591
by (Blast_tac 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   592
qed "well_ord_trichotomy";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   593
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   594
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   595
(*** Properties of converse(r), by Krzysztof Grabczewski ***)
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   596
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   597
Goalw [irrefl_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   598
            "irrefl(A,r) ==> irrefl(A,converse(r))";
4311
e220fb9bd4e5 Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents: 4152
diff changeset
   599
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   600
qed "irrefl_converse";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   601
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   602
Goalw [trans_on_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   603
    "trans[A](r) ==> trans[A](converse(r))";
4311
e220fb9bd4e5 Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents: 4152
diff changeset
   604
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   605
qed "trans_on_converse";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   606
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   607
Goalw [part_ord_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   608
    "part_ord(A,r) ==> part_ord(A,converse(r))";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   609
by (blast_tac (claset() addSIs [irrefl_converse, trans_on_converse]) 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   610
qed "part_ord_converse";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   611
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   612
Goalw [linear_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   613
    "linear(A,r) ==> linear(A,converse(r))";
4311
e220fb9bd4e5 Deleted some needless addSIs; got rid of a slow Blast_tac
paulson
parents: 4152
diff changeset
   614
by (Blast_tac 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   615
qed "linear_converse";
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   616
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   617
Goalw [tot_ord_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   618
    "tot_ord(A,r) ==> tot_ord(A,converse(r))";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   619
by (blast_tac (claset() addSIs [part_ord_converse, linear_converse]) 1);
836
627f4842b020 Added Krzysztof's theorems irrefl_converse, trans_on_converse,
lcp
parents: 812
diff changeset
   620
qed "tot_ord_converse";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   621
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   622
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   623
(** By Krzysztof Grabczewski.
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   624
    Lemmas involving the first element of a well ordered set **)
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   625
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5067
diff changeset
   626
Goalw [first_def] "first(b,B,r) ==> b:B";
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   627
by (Blast_tac 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   628
qed "first_is_elem";
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   629
5067
62b6288e6005 isatool fixgoal;
wenzelm
parents: 4311
diff changeset
   630
Goalw [well_ord_def, wf_on_def, wf_def,     first_def] 
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5137
diff changeset
   631
        "[| well_ord(A,r); B<=A; B~=0 |] ==> (EX! b. first(b,B,r))";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   632
by (REPEAT (eresolve_tac [conjE,allE,disjE] 1));
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   633
by (contr_tac 1);
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   634
by (etac bexE 1);
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   635
by (res_inst_tac [("a","x")] ex1I 1);
2925
b0ae2e13db93 Using Blast_tac
paulson
parents: 2637
diff changeset
   636
by (Blast_tac 2);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   637
by (rewrite_goals_tac [tot_ord_def, linear_def]);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3736
diff changeset
   638
by (Blast.depth_tac (claset()) 7 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   639
qed "well_ord_imp_ex1_first";
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   640
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5067
diff changeset
   641
Goal "[| well_ord(A,r); B<=A; B~=0 |] ==> (THE b. first(b,B,r)) : B";
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   642
by (dtac well_ord_imp_ex1_first 1 THEN REPEAT (assume_tac 1));
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   643
by (rtac first_is_elem 1);
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   644
by (etac theI 1);
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1791
diff changeset
   645
qed "the_first_in";