src/ZF/Order.ML
author lcp
Fri, 16 Dec 1994 13:43:01 +0100
changeset 794 349d41ffa378
parent 789 30bdc59198ff
child 812 bf4b7c37db2c
permissions -rw-r--r--
moved congruence rule conj_cong2 to FOL/IFOL.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/Order.ML
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     2
    ID:         $Id$
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
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"
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
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
val bij_apply_cs = ZF_cs addSEs [bij_converse_bij]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    15
                         addIs  [bij_is_fun, apply_type];
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    16
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    17
(** Basic properties of the definitions **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    18
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    19
(*needed?*)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    20
goalw Order.thy [part_ord_def, irrefl_def, trans_on_def, asym_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    21
    "!!r. part_ord(A,r) ==> asym(r Int A*A)";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    22
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
    23
qed "part_ord_Imp_asym";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
    24
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    25
val major::premx::premy::prems = goalw Order.thy [linear_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    26
    "[| linear(A,r);  x:A;  y:A;  \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    27
\       <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
    28
by (cut_facts_tac [major,premx,premy] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    29
by (REPEAT_FIRST (eresolve_tac [ballE,disjE]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    30
by (EVERY1 (map etac prems));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    31
by (ALLGOALS contr_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    32
qed "linearE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    33
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    34
(*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
    35
val linear_case_tac =
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    36
    SELECT_GOAL (EVERY [etac linearE 1, assume_tac 1, assume_tac 1,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    37
			REPEAT_SOME (assume_tac ORELSE' contr_tac)]);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    38
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    39
(** General properties of well_ord **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    40
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    41
goalw Order.thy [irrefl_def, part_ord_def, tot_ord_def, 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    42
		 trans_on_def, well_ord_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    43
    "!!r. [| wf[A](r); linear(A,r) |] ==> well_ord(A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    44
by (asm_simp_tac (ZF_ss addsimps [wf_on_not_refl]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    45
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    46
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    47
(*case x=xb*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    48
by (fast_tac (ZF_cs addSEs [wf_on_asym]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    49
(*case x<xb*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    50
by (fast_tac (ZF_cs addSEs [wf_on_chain3]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    51
qed "well_ordI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    52
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    53
goalw Order.thy [well_ord_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    54
    "!!r. well_ord(A,r) ==> wf[A](r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    55
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    56
qed "well_ord_is_wf";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    57
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    58
goalw Order.thy [well_ord_def, tot_ord_def, part_ord_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    59
    "!!r. well_ord(A,r) ==> trans[A](r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    60
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    61
qed "well_ord_is_trans_on";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
    62
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    63
goalw Order.thy [well_ord_def, tot_ord_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    64
  "!!r. well_ord(A,r) ==> linear(A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    65
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    66
qed "well_ord_is_linear";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    67
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    68
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    69
(** Derived rules for pred(A,x,r) **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    70
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    71
goalw Order.thy [pred_def] "y : pred(A,x,r) <-> <y,x>:r & y:A";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    72
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    73
qed "pred_iff";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    74
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    75
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
    76
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    77
val [major,minor] = goalw Order.thy [pred_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    78
    "[| 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
    79
by (rtac (major RS CollectE) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    80
by (REPEAT (ares_tac [minor] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    81
qed "predE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    82
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    83
goalw Order.thy [pred_def] "pred(A,x,r) <= r -`` {x}";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    84
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    85
qed "pred_subset_under";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    86
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    87
goalw Order.thy [pred_def] "pred(A,x,r) <= A";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    88
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    89
qed "pred_subset";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    90
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    91
goalw Order.thy [pred_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    92
    "pred(pred(A,x,r), y, r) = pred(A,x,r) Int pred(A,y,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    93
by (fast_tac eq_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    94
qed "pred_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    95
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    96
goalw Order.thy [trans_on_def, pred_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    97
    "!!r. [| trans[A](r);  <y,x>:r;  x:A;  y:A \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    98
\         |] ==> pred(pred(A,x,r), y, r) = pred(A,y,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
    99
by (fast_tac eq_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   100
qed "trans_pred_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   101
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   102
(** 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
   103
    [including initial segments of the form pred(A,x,r) **)
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   104
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   105
(*Note: a relation s such that s<=r need not be a partial ordering*)
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   106
goalw Order.thy [part_ord_def, irrefl_def, trans_on_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   107
    "!!A B r. [| part_ord(A,r);  B<=A |] ==> part_ord(B,r)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   108
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   109
qed "part_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   110
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   111
goalw Order.thy [linear_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   112
    "!!A B r. [| linear(A,r);  B<=A |] ==> linear(B,r)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   113
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   114
qed "linear_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   115
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   116
goalw Order.thy [tot_ord_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   117
    "!!A B r. [| tot_ord(A,r);  B<=A |] ==> tot_ord(B,r)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   118
by (fast_tac (ZF_cs addSEs [part_ord_subset, linear_subset]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   119
qed "tot_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   120
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   121
goalw Order.thy [well_ord_def]
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   122
    "!!A B r. [| well_ord(A,r);  B<=A |] ==> well_ord(B,r)";
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   123
by (fast_tac (ZF_cs addSEs [tot_ord_subset, wf_on_subset_A]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   124
qed "well_ord_subset";
484
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   125
70b789956bd3 Axiom of choice, cardinality results, etc.
lcp
parents: 467
diff changeset
   126
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   127
(** Order-preserving (monotone) maps **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   128
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   129
(*Rewriting with bijections and converse (function inverse)*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   130
val bij_inverse_ss = 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   131
    ZF_ss setsolver (type_auto_tac [bij_is_fun, apply_type, 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   132
				    bij_converse_bij, comp_fun, comp_bij])
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   133
          addsimps [right_inverse_bij, left_inverse_bij, comp_fun_apply];
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   134
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   135
goalw Order.thy [mono_map_def] 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   136
    "!!f. f: mono_map(A,r,B,s) ==> f: A->B";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   137
by (etac CollectD1 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   138
qed "mono_map_is_fun";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   139
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   140
goalw Order.thy [mono_map_def, inj_def] 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   141
    "!!f. [| linear(A,r);  wf[B](s);  f: mono_map(A,r,B,s) |] ==> f: inj(A,B)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   142
by (step_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   143
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   144
by (REPEAT 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   145
    (EVERY [eresolve_tac [wf_on_not_refl RS notE] 1,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   146
	    eresolve_tac [ssubst] 2,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   147
	    fast_tac ZF_cs 2,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   148
	    REPEAT (ares_tac [apply_type] 1)]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   149
qed "mono_map_is_inj";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   150
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   151
(*Transitivity of similarity: the order-isomorphism relation*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   152
goalw Order.thy [mono_map_def] 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   153
    "!!f. [| g: mono_map(A,r,B,s);  f: mono_map(B,s,C,t) |] ==> \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   154
\         (f O g): mono_map(A,r,C,t)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   155
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   156
by (ALLGOALS (asm_full_simp_tac bij_inverse_ss));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   157
qed "mono_map_trans";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   158
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   159
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   160
(** Order-isomorphisms -- or similarities, as Suppes calls them **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   161
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   162
goalw Order.thy [ord_iso_def, mono_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   163
    "!!f. f: ord_iso(A,r,B,s) ==> f: mono_map(A,r,B,s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   164
by (fast_tac (ZF_cs addSDs [bij_is_fun]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   165
qed "ord_iso_is_mono_map";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   166
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   167
goalw Order.thy [ord_iso_def] 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   168
    "!!f. f: ord_iso(A,r,B,s) ==> f: bij(A,B)";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   169
by (etac CollectD1 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   170
qed "ord_iso_is_bij";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   171
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   172
(*Needed?  But ord_iso_converse is!*)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   173
goalw Order.thy [ord_iso_def] 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   174
    "!!f. [| f: ord_iso(A,r,B,s);  <x,y>: r;  x:A;  y:A |] ==> \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   175
\         <f`x, f`y> : s";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   176
by (fast_tac ZF_cs 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   177
qed "ord_iso_apply";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   178
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   179
goalw Order.thy [ord_iso_def] 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   180
    "!!f. [| f: ord_iso(A,r,B,s);  <x,y>: s;  x:B;  y:B |] ==> \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   181
\         <converse(f) ` x, converse(f) ` y> : r";
437
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   182
by (etac CollectE 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   183
by (etac (bspec RS bspec RS iffD2) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   184
by (REPEAT (eresolve_tac [asm_rl, 
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   185
			  bij_converse_bij RS bij_is_fun RS apply_type] 1));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   186
by (asm_simp_tac (ZF_ss addsimps [right_inverse_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   187
qed "ord_iso_converse";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   188
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   189
(*Symmetry of similarity: the order-isomorphism relation*)
769
66cdfde4ec5d not_well_ord_iso_pred: removed needless quantifier
lcp
parents: 760
diff changeset
   190
goalw Order.thy [ord_iso_def] 
66cdfde4ec5d not_well_ord_iso_pred: removed needless quantifier
lcp
parents: 760
diff changeset
   191
    "!!f. f: ord_iso(A,r,B,s) ==> converse(f): ord_iso(B,s,A,r)";
66cdfde4ec5d not_well_ord_iso_pred: removed needless quantifier
lcp
parents: 760
diff changeset
   192
by (safe_tac ZF_cs);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   193
by (ALLGOALS (asm_full_simp_tac bij_inverse_ss));
782
200a16083201 added bind_thm for theorems defined by "standard ..."
clasohm
parents: 769
diff changeset
   194
qed "ord_iso_sym";
769
66cdfde4ec5d not_well_ord_iso_pred: removed needless quantifier
lcp
parents: 760
diff changeset
   195
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   196
(*Transitivity of similarity: the order-isomorphism relation*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   197
goalw Order.thy [ord_iso_def] 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   198
    "!!f. [| g: ord_iso(A,r,B,s);  f: ord_iso(B,s,C,t) |] ==> \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   199
\         (f O g): ord_iso(A,r,C,t)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   200
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   201
by (ALLGOALS (asm_full_simp_tac bij_inverse_ss));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   202
qed "ord_iso_trans";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   203
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   204
(** Two monotone maps can make an order-isomorphism **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   205
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   206
goalw Order.thy [ord_iso_def, mono_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   207
    "!!f g. [| f: mono_map(A,r,B,s);  g: mono_map(B,s,A,r);	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   208
\              f O g = id(B);  g O f = id(A) |] ==> f: ord_iso(A,r,B,s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   209
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   210
by (REPEAT_FIRST (ares_tac [fg_imp_bijective]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   211
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   212
by (subgoal_tac "<g`(f`x), g`(f`y)> : r" 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   213
by (fast_tac (ZF_cs addIs [apply_type] addSEs [bspec RS bspec RS mp]) 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   214
by (asm_full_simp_tac 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   215
    (ZF_ss addsimps [comp_eq_id_iff RS iffD1]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   216
qed "mono_ord_isoI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   217
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   218
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   219
    "!!B. [| well_ord(A,r);  well_ord(B,s); 				\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   220
\            f: mono_map(A,r,B,s);  converse(f): mono_map(B,s,A,r)	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   221
\         |] ==> f: ord_iso(A,r,B,s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   222
by (REPEAT (ares_tac [mono_ord_isoI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   223
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
   224
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
   225
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
   226
          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
   227
qed "well_ord_mono_ord_isoI";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   228
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   229
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   230
(** Order-isomorphisms preserve the ordering's properties **)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   231
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   232
goalw Order.thy [part_ord_def, irrefl_def, trans_on_def, ord_iso_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   233
    "!!A B r. [| part_ord(B,s);  f: ord_iso(A,r,B,s) |] ==> part_ord(A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   234
by (asm_simp_tac ZF_ss 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   235
by (fast_tac (ZF_cs addIs [bij_is_fun RS apply_type]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   236
qed "part_ord_ord_iso";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   237
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   238
goalw Order.thy [linear_def, ord_iso_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   239
    "!!A B r. [| linear(B,s);  f: ord_iso(A,r,B,s) |] ==> linear(A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   240
by (asm_simp_tac ZF_ss 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   241
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   242
by (dres_inst_tac [("x1", "f`x"), ("x", "f`xa")] (bspec RS bspec) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   243
by (safe_tac (ZF_cs addSEs [bij_is_fun RS apply_type]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   244
by (dres_inst_tac [("t", "op `(converse(f))")] subst_context 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   245
by (asm_full_simp_tac (ZF_ss addsimps [left_inverse_bij]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   246
qed "linear_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   247
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   248
goalw Order.thy [wf_on_def, wf_def, ord_iso_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   249
    "!!A B r. [| wf[B](s);  f: ord_iso(A,r,B,s) |] ==> wf[A](r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   250
(*reversed &-congruence rule handles context of membership in A*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   251
by (asm_full_simp_tac (ZF_ss addcongs [conj_cong2]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   252
by (safe_tac ZF_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   253
by (dres_inst_tac [("x", "{f`z. z:Z Int A}")] spec 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   254
by (safe_tac eq_cs);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   255
by (dtac equalityD1 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   256
by (fast_tac (ZF_cs addSIs [bexI]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   257
by (fast_tac (ZF_cs addSIs [bexI]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   258
	      addIs [bij_is_fun RS apply_type]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   259
qed "wf_on_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   260
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   261
goalw Order.thy [well_ord_def, tot_ord_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   262
    "!!A B r. [| well_ord(B,s);  f: ord_iso(A,r,B,s) |] ==> well_ord(A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   263
by (fast_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   264
    (ZF_cs addSEs [part_ord_ord_iso, linear_ord_iso, wf_on_ord_iso]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   265
qed "well_ord_ord_iso";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   266
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   267
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   268
(*** Main results of Kunen, Chapter 1 section 6 ***)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   269
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   270
(*Inductive argument for proving Kunen's Lemma 6.1*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   271
goalw Order.thy [well_ord_def, tot_ord_def, part_ord_def, pred_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   272
  "!!r. [| well_ord(A,r);  x: A;  f: ord_iso(A, r, pred(A,x,r), r);  y: A |] \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   273
\       ==> f`y = y";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   274
by (safe_tac ZF_cs);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   275
by (wf_on_ind_tac "y" [] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   276
by (forward_tac [ord_iso_is_bij] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   277
by (subgoal_tac "f`y1 : {y: A . <y, x> : r}" 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   278
by (fast_tac (ZF_cs addSEs [bij_is_fun RS apply_type]) 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   279
(*Now we know f`y1 : A  and  <f`y1, x> : r  *)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   280
by (etac CollectE 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   281
by (linear_case_tac 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   282
(*Case  <f`y1, y1> : r *)   (*use induction hyp*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   283
by (dtac bspec 1 THEN mp_tac 2 THEN assume_tac 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   284
by (dres_inst_tac [("t", "op `(converse(f))")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   285
by (asm_full_simp_tac (ZF_ss addsimps [left_inverse_bij]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   286
(*The case  <y1, f`y1> : r  *)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   287
by (subgoal_tac "<y1,x> : r" 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   288
by (fast_tac (ZF_cs addSEs [trans_onD]) 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   289
by (dtac ord_iso_converse 1 THEN assume_tac 1 THEN fast_tac ZF_cs 2);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   290
by (fast_tac ZF_cs 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   291
by (asm_full_simp_tac (ZF_ss addsimps [left_inverse_bij]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   292
(*now use induction hyp*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   293
by (dtac bspec 1 THEN mp_tac 2 THEN fast_tac bij_apply_cs 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   294
by (dres_inst_tac [("t", "op `(f)")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   295
by (asm_full_simp_tac (ZF_ss addsimps [right_inverse_bij]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   296
qed "not_well_ord_iso_pred_lemma";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   297
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   298
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   299
(*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
   300
                     of a well-ordering*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   301
goal Order.thy
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   302
    "!!r. [| well_ord(A,r);  f : ord_iso(A, r, pred(A,x,r), r);  x:A |] ==> P";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   303
by (metacut_tac not_well_ord_iso_pred_lemma 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   304
by (REPEAT_FIRST assume_tac);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   305
(*Now we know f`x = x*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   306
by (EVERY1 [dtac (ord_iso_is_bij RS bij_is_fun RS apply_type),
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   307
	     assume_tac]);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   308
(*Now we know f`x : pred(A,x,r) *)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   309
by (asm_full_simp_tac (ZF_ss addsimps [well_ord_def, pred_def]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   310
by (fast_tac (ZF_cs addSEs [wf_on_not_refl RS notE]) 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   311
qed "well_ord_iso_predE";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   312
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   313
(*Simple consequence of Lemma 6.1*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   314
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   315
 "!!r. [| well_ord(A,r);  f : ord_iso(pred(A,a,r), r, pred(A,c,r), r);	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   316
\         a:A;  c:A |] ==> a=c";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   317
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
   318
by (forward_tac [well_ord_is_linear] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   319
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   320
by (dtac ord_iso_sym 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   321
by (REPEAT   (*because there are two symmetric cases*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   322
    (EVERY [eresolve_tac [pred_subset RSN (2, well_ord_subset) RS
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   323
			  well_ord_iso_predE] 1,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   324
	    fast_tac (ZF_cs addSIs [predI]) 2,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   325
	    asm_simp_tac (ZF_ss addsimps [trans_pred_pred_eq]) 1]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   326
qed "well_ord_iso_pred_eq";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   327
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   328
(*Does not assume r is a wellordering!*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   329
goalw Order.thy [ord_iso_def, pred_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   330
 "!!r. [| f : ord_iso(A,r,B,s);	  a:A |] ==> 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   331
\      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
   332
by (etac CollectE 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   333
by (asm_simp_tac 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   334
    (ZF_ss addsimps [[bij_is_fun, Collect_subset] MRS image_fun]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   335
by (safe_tac (eq_cs addSEs [bij_is_fun RS apply_type]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   336
by (resolve_tac [RepFun_eqI] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   337
by (fast_tac (ZF_cs addSIs [right_inverse_bij RS sym]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   338
by (asm_simp_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   339
    (ZF_ss addsimps [right_inverse_bij]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   340
           setsolver type_auto_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   341
	                [bij_is_fun, apply_funtype, bij_converse_bij]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   342
qed "ord_iso_image_pred";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   343
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   344
(*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
   345
  trans_pred_pred_eq to simplify the pred(pred...) terms.  See just below.*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   346
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   347
 "!!r. [| f : ord_iso(A,r,B,s);	  a:A |] ==> 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   348
\      restrict(f, pred(A,a,r)) : ord_iso(pred(A,a,r), r, pred(B, f`a, s), s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   349
by (asm_simp_tac (ZF_ss addsimps [ord_iso_image_pred RS sym]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   350
by (rewrite_goals_tac [ord_iso_def]);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   351
by (step_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   352
by (asm_full_simp_tac (ZF_ss addsimps [pred_def]) 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   353
by (asm_full_simp_tac (ZF_ss addsimps [pred_def]) 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   354
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
   355
qed "ord_iso_restrict_pred";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   356
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   357
(*Tricky; a lot of forward proof!*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   358
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   359
 "!!r. [| well_ord(A,r);  well_ord(B,s);  <a,c>: r;	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   360
\         f : ord_iso(pred(A,a,r), r, pred(B,b,s), s);	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   361
\         g : ord_iso(pred(A,c,r), r, pred(B,d,s), s);	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   362
\         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
   363
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
   364
    REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   365
by (subgoal_tac "b = g`a" 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   366
by (asm_simp_tac ZF_ss 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   367
by (resolve_tac [well_ord_iso_pred_eq] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   368
by (REPEAT_SOME assume_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   369
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
   370
    REPEAT1 (eresolve_tac [asm_rl, predI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   371
by (asm_full_simp_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   372
    (ZF_ss addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   373
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
   374
by (assume_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   375
qed "well_ord_iso_preserving";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   376
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   377
(*Inductive argument for proving Kunen's Lemma 6.2*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   378
goalw Order.thy [well_ord_def, tot_ord_def, part_ord_def]
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   379
    "!!r. [| well_ord(A,r);  well_ord(B,s);  \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   380
\            f: ord_iso(A,r, B,s);  g: ord_iso(A,r, B,s);  y: A |] \
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   381
\         ==> f`y = g`y";
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   382
by (safe_tac ZF_cs);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   383
by (wf_on_ind_tac "y" [] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   384
by (subgoals_tac ["f: bij(A,B)", "g: bij(A,B)", "f`y1 : B", "g`y1 : B"] 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   385
by (REPEAT (fast_tac (bij_apply_cs addSEs [ord_iso_is_bij]) 2));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   386
by (linear_case_tac 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   387
(*The case  <f`y1, g`y1> : s  *)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   388
by (forw_inst_tac [("f","g")] ord_iso_converse 1 THEN REPEAT (assume_tac 1));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   389
by (asm_full_simp_tac (ZF_ss addsimps [left_inverse_bij]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   390
by (dtac bspec 1 THEN mp_tac 2 THEN fast_tac bij_apply_cs 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   391
by (dres_inst_tac [("t", "op `(converse(f))")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   392
by (dres_inst_tac [("t", "op `(g)")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   393
by (asm_full_simp_tac bij_inverse_ss 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   394
(*The case  <g`y1, f`y1> : s  *)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   395
by (forw_inst_tac [("f","f")] ord_iso_converse 1 THEN REPEAT (assume_tac 1));
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   396
by (asm_full_simp_tac (ZF_ss addsimps [left_inverse_bij]) 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   397
by (dtac bspec 1 THEN mp_tac 2 THEN fast_tac bij_apply_cs 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   398
by (dres_inst_tac [("t", "op `(converse(g))")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   399
by (dres_inst_tac [("t", "op `(f)")] subst_context 1);
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   400
by (asm_full_simp_tac bij_inverse_ss 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   401
qed "well_ord_iso_unique_lemma";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   402
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   403
(*Kunen's Lemma 6.2: Order-isomorphisms between well-orderings are unique*)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   404
goal Order.thy
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   405
    "!!r. [| well_ord(B,s);  \
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   406
\            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
   407
by (rtac fun_extension 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   408
by (etac (ord_iso_is_bij RS bij_is_fun) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   409
by (etac (ord_iso_is_bij RS bij_is_fun) 1);
435875e4b21d modifications for cardinal arithmetic
lcp
parents: 435
diff changeset
   410
by (rtac well_ord_iso_unique_lemma 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   411
by (REPEAT_SOME (eresolve_tac [asm_rl, well_ord_ord_iso]));
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 484
diff changeset
   412
qed "well_ord_iso_unique";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   413
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   414
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   415
(** 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
   416
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   417
goalw Order.thy [ord_iso_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   418
    "ord_iso_map(A,r,B,s) <= A*B";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   419
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   420
qed "ord_iso_map_subset";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   421
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   422
goalw Order.thy [ord_iso_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   423
    "domain(ord_iso_map(A,r,B,s)) <= A";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   424
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   425
qed "domain_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   426
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   427
goalw Order.thy [ord_iso_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   428
    "range(ord_iso_map(A,r,B,s)) <= B";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   429
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   430
qed "range_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   431
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   432
goalw Order.thy [ord_iso_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   433
    "converse(ord_iso_map(A,r,B,s)) = ord_iso_map(B,s,A,r)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   434
by (fast_tac (eq_cs addIs [ord_iso_sym]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   435
qed "converse_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   436
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   437
goalw Order.thy [ord_iso_map_def, function_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   438
    "!!B. well_ord(B,s) ==> function(ord_iso_map(A,r,B,s))";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   439
by (safe_tac ZF_cs);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   440
by (resolve_tac [well_ord_iso_pred_eq] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   441
by (REPEAT_SOME assume_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   442
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
   443
by (assume_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   444
qed "function_ord_iso_map";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   445
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   446
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   447
    "!!B. well_ord(B,s) ==> ord_iso_map(A,r,B,s) 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   448
\          : 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
   449
by (asm_simp_tac 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   450
    (ZF_ss addsimps [Pi_iff, function_ord_iso_map,
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   451
		     ord_iso_map_subset RS domain_times_range]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   452
qed "ord_iso_map_fun";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   453
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   454
goalw Order.thy [mono_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   455
    "!!B. [| well_ord(A,r);  well_ord(B,s) |] ==> ord_iso_map(A,r,B,s) 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   456
\          : mono_map(domain(ord_iso_map(A,r,B,s)), r, 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   457
\	              range(ord_iso_map(A,r,B,s)), s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   458
by (asm_simp_tac (ZF_ss addsimps [ord_iso_map_fun]) 1);
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   459
by (safe_tac ZF_cs);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   460
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
   461
by (REPEAT 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   462
    (fast_tac (ZF_cs addSEs [ord_iso_map_subset RS subsetD RS SigmaE]) 2));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   463
by (asm_simp_tac (ZF_ss addsimps [ord_iso_map_fun RSN (2,apply_equality)]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   464
by (rewrite_goals_tac [ord_iso_map_def]);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   465
by (safe_tac (ZF_cs addSEs [UN_E]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   466
by (resolve_tac [well_ord_iso_preserving] 1 THEN REPEAT_FIRST assume_tac);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   467
qed "ord_iso_map_mono_map";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   468
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   469
goalw Order.thy [mono_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   470
    "!!B. [| well_ord(A,r);  well_ord(B,s) |] ==> ord_iso_map(A,r,B,s) 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   471
\          : ord_iso(domain(ord_iso_map(A,r,B,s)), r, 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   472
\	              range(ord_iso_map(A,r,B,s)), s)";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   473
by (resolve_tac [well_ord_mono_ord_isoI] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   474
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
   475
by (asm_simp_tac 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   476
    (ZF_ss addsimps [ord_iso_map_subset RS converse_converse, 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   477
		     domain_converse, range_converse]) 4);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   478
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
   479
by (ALLGOALS (etac well_ord_subset));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   480
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
   481
qed "ord_iso_map_ord_iso";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   482
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   483
(*One way of saying that domain(ord_iso_map(A,r,B,s)) is downwards-closed*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   484
goalw Order.thy [ord_iso_map_def]
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   485
  "!!B. [| well_ord(A,r);  well_ord(B,s);    		\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   486
\          x: A;  x ~: domain(ord_iso_map(A,r,B,s)) 	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   487
\       |] ==>  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
   488
by (step_tac (ZF_cs addSIs [predI]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   489
(*Case analysis on  xaa vs x in r *)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   490
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
   491
by (linear_case_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   492
(*Trivial case: xaa=x*)
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   493
by (fast_tac ZF_cs 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   494
(*Harder case: <x, xaa>: r*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   495
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
   496
    REPEAT1 (eresolve_tac [asm_rl, predI, predE] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   497
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
   498
    REPEAT1 (eresolve_tac [asm_rl, predI] 1));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   499
by (asm_full_simp_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   500
    (ZF_ss addsimps [well_ord_is_trans_on, trans_pred_pred_eq]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   501
by (fast_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   502
qed "domain_ord_iso_map_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents:
diff changeset
   503
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   504
(*For the 4-way case analysis in the main result*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   505
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   506
  "!!B. [| well_ord(A,r);  well_ord(B,s) |] ==> \
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   507
\       domain(ord_iso_map(A,r,B,s)) = A |	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   508
\       (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
   509
by (forward_tac [well_ord_is_wf] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   510
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
   511
by (dres_inst_tac [("x", "A-domain(ord_iso_map(A,r,B,s))")] spec 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   512
by (step_tac ZF_cs 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   513
(*The first case: the domain equals A*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   514
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
   515
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
   516
(*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
   517
by (swap_res_tac [bexI] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   518
by (assume_tac 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   519
by (rtac equalityI 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   520
(*not ZF_cs below; that would use rules like domainE!*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   521
by (fast_tac (pair_cs addSEs [predE]) 2);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   522
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
   523
qed "domain_ord_iso_map_cases";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   524
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   525
(*As above, by duality*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   526
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   527
  "!!B. [| well_ord(A,r);  well_ord(B,s) |] ==>	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   528
\       range(ord_iso_map(A,r,B,s)) = B |	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   529
\       (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
   530
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
   531
by (asm_simp_tac
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   532
    (ZF_ss addsimps [range_converse, domain_ord_iso_map_cases]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   533
qed "range_ord_iso_map_cases";
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   534
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   535
(*Kunen's Theorem 6.3: Fundamental Theorem for Well-Ordered Sets*)
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   536
goal Order.thy
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   537
  "!!B. [| well_ord(A,r);  well_ord(B,s) |] ==>  	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   538
\       ord_iso_map(A,r,B,s) : ord_iso(A, r, B, s) |	\
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   539
\       (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
   540
\       (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
   541
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
   542
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
   543
by (REPEAT_FIRST (eresolve_tac [asm_rl, disjE, bexE]));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   544
by (ALLGOALS (dresolve_tac [ord_iso_map_ord_iso] THEN' assume_tac THEN' 
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   545
	      asm_full_simp_tac (ZF_ss addsimps [bexI])));
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   546
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   547
by (resolve_tac [wf_on_not_refl RS notE] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   548
by (eresolve_tac [well_ord_is_wf] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   549
by (assume_tac 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   550
by (subgoal_tac "<x,y>: ord_iso_map(A,r,B,s)" 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   551
by (dresolve_tac [rangeI] 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   552
by (asm_full_simp_tac (ZF_ss addsimps [pred_def]) 1);
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   553
by (rewrite_goals_tac [ord_iso_map_def]);
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   554
by (fast_tac ZF_cs 1);
789
30bdc59198ff well_ord_iso_predE replaces not_well_ord_iso_pred
lcp
parents: 782
diff changeset
   555
qed "well_ord_trichotomy";
467
92868dab2939 new cardinal arithmetic developments
lcp
parents: 437
diff changeset
   556