src/HOL/AxClasses/Lattice/Order.ML
author paulson
Tue, 16 Jul 1996 15:49:46 +0200
changeset 1868 836950047d85
parent 1440 de6f18da81bb
child 1899 0075a8d26a80
permissions -rw-r--r--
Put in minimal simpset to avoid excessive simplification, just as in revision 1.9 of HOL/indrule.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     1
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     2
open Order;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     3
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     4
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     5
(** basic properties of limits **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     6
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     7
(* uniqueness *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     8
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     9
val tac =
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    10
  rtac impI 1 THEN
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    11
  rtac (le_antisym RS mp) 1 THEN
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    12
  fast_tac HOL_cs 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    13
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    14
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    15
goalw thy [is_inf_def] "is_inf x y inf & is_inf x y inf' --> inf = inf'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    16
  by tac;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    17
qed "is_inf_uniq";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    18
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    19
goalw thy [is_sup_def] "is_sup x y sup & is_sup x y sup' --> sup = sup'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    20
  by tac;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    21
qed "is_sup_uniq";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    22
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    23
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    24
goalw thy [is_Inf_def] "is_Inf A inf & is_Inf A inf' --> inf = inf'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    25
  by tac;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    26
qed "is_Inf_uniq";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    27
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    28
goalw thy [is_Sup_def] "is_Sup A sup & is_Sup A sup' --> sup = sup'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    29
  by tac;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    30
qed "is_Sup_uniq";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    31
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    32
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    33
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    34
(* commutativity *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    35
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    36
goalw thy [is_inf_def] "is_inf x y inf = is_inf y x inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    37
  by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    38
qed "is_inf_commut";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    39
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    40
goalw thy [is_sup_def] "is_sup x y sup = is_sup y x sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    41
  by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    42
qed "is_sup_commut";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    43
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    44
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    45
(* associativity *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    46
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    47
goalw thy [is_inf_def] "is_inf x y xy & is_inf y z yz & is_inf xy z xyz --> is_inf x yz xyz";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    48
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    49
  (*level 1*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    50
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    51
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    52
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    53
  (*level 4*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    54
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    55
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    56
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    57
    br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    58
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    59
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    60
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    61
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    62
  (*level 11*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    63
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    64
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    65
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    66
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    67
    br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    68
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    69
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    70
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    71
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    72
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    73
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    74
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    75
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    76
    back();     (* !! *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    77
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    78
qed "is_inf_assoc";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    79
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    80
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    81
goalw thy [is_sup_def] "is_sup x y xy & is_sup y z yz & is_sup xy z xyz --> is_sup x yz xyz";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    82
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    83
  (*level 1*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    84
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    85
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    86
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    87
  (*level 4*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    88
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    89
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    90
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    91
    br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    92
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    93
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    94
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    95
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    96
  (*level 11*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    97
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    98
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    99
    back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   100
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   101
    br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   102
    by (step_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   103
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   104
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   105
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   106
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   107
    back();     (* !! *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   108
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   109
    br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   110
    be conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   111
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   112
qed "is_sup_assoc";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   113
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   114
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   115
(** limits in linear orders **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   116
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   117
goalw thy [minimum_def, is_inf_def] "is_inf (x::'a::lin_order) y (minimum x y)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   118
  by (stac expand_if 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   119
  by (REPEAT_FIRST (resolve_tac [conjI, impI]));
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   120
  (*case "x [= y"*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   121
    br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   122
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   123
    by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   124
  (*case "~ x [= y"*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   125
    br (le_lin RS disjE) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   126
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   127
    be notE 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   128
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   129
    br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   130
    by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   131
qed "min_is_inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   132
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   133
goalw thy [maximum_def, is_sup_def] "is_sup (x::'a::lin_order) y (maximum x y)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   134
  by (stac expand_if 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   135
  by (REPEAT_FIRST (resolve_tac [conjI, impI]));
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   136
  (*case "x [= y"*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   137
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   138
    br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   139
    by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   140
  (*case "~ x [= y"*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   141
    br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   142
    br (le_lin RS disjE) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   143
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   144
    be notE 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   145
    ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   146
    by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   147
qed "max_is_sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   148
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   149
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   150
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   151
(** general vs. binary limits **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   152
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   153
goalw thy [is_inf_def, is_Inf_def] "is_Inf {x, y} inf = is_inf x y inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   154
  br iffI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   155
  (*==>*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   156
    by (fast_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   157
  (*<==*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   158
    by (safe_tac set_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   159
    by (step_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   160
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   161
    by (fast_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   162
qed "bin_is_Inf_eq";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   163
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   164
goalw thy [is_sup_def, is_Sup_def] "is_Sup {x, y} sup = is_sup x y sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   165
  br iffI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   166
  (*==>*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   167
    by (fast_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   168
  (*<==*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   169
    by (safe_tac set_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   170
    by (step_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   171
    be mp 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   172
    by (fast_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
   173
qed "bin_is_Sup_eq";