src/HOL/AxClasses/Lattice/OrdDefs.ML
author clasohm
Tue, 30 Jan 1996 15:24:36 +0100
changeset 1465 5d7a7e439cec
parent 1440 de6f18da81bb
child 1899 0075a8d26a80
permissions -rw-r--r--
expanded tabs
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 OrdDefs;
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
(** lifting of quasi / partial orders **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     6
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     7
(* pairs *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     8
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     9
goalw thy [le_prod_def] "x [= (x::'a::quasi_order*'b::quasi_order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    10
  br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    11
  br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    12
  br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    13
qed "le_prod_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    14
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    15
goalw thy [le_prod_def] "x [= y & y [= z --> x [= (z::'a::quasi_order*'b::quasi_order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    16
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    17
  be (conjI RS (le_trans RS mp)) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    18
  ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    19
  be (conjI RS (le_trans RS mp)) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    20
  ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    21
qed "le_prod_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    22
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    23
goalw thy [le_prod_def] "x [= y & y [= x --> x = (y::'a::order*'b::order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    24
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    25
  by (stac Pair_fst_snd_eq 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    26
  br conjI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    27
  be (conjI RS (le_antisym RS mp)) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    28
  ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    29
  be (conjI RS (le_antisym RS mp)) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    30
  ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    31
qed "le_prod_antisym";
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
(* functions *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    35
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    36
goalw thy [le_fun_def] "f [= (f::'a=>'b::quasi_order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    37
  br allI 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    38
  br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    39
qed "le_fun_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    40
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    41
goalw thy [le_fun_def] "f [= g & g [= h --> f [= (h::'a=>'b::quasi_order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    42
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    43
  br (le_trans RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    44
  by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    45
qed "le_fun_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    46
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    47
goalw thy [le_fun_def] "f [= g & g [= f --> f = (g::'a=>'b::order)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    48
  by (safe_tac HOL_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    49
  br ext 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    50
  br (le_antisym RS mp) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    51
  by (fast_tac HOL_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    52
qed "le_fun_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    53
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    54
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    55
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    56
(** duals **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    57
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    58
(*"'a dual" is even an isotype*)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    59
goal thy "Rep_dual (Abs_dual y) = y";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    60
  br Abs_dual_inverse 1;
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1440
diff changeset
    61
  by (rewtac dual_def);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    62
  by (fast_tac set_cs 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    63
qed "Abs_dual_inverse'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    64
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    65
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    66
goalw thy [le_dual_def] "x [= (x::'a::quasi_order dual)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    67
  br le_refl 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    68
qed "le_dual_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    69
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    70
goalw thy [le_dual_def] "x [= y & y [= z --> x [= (z::'a::quasi_order dual)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    71
  by (stac conj_commut 1);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    72
  br le_trans 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    73
qed "le_dual_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    74
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    75
goalw thy [le_dual_def] "x [= y & y [= x --> x = (y::'a::order dual)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    76
  by (safe_tac prop_cs);
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    77
  br (Rep_dual_inverse RS subst) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    78
  br sym 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    79
  br (Rep_dual_inverse RS subst) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    80
  br arg_cong 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    81
  back();
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    82
  be (conjI RS (le_antisym RS mp)) 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    83
  ba 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    84
qed "le_dual_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    85
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    86
goalw thy [le_dual_def] "x [= y | y [= (x::'a::lin_order dual)";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    87
  br le_lin 1;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    88
qed "le_dual_lin";