src/HOL/AxClasses/Lattice/OrdDefs.ML
author wenzelm
Mon, 22 Jun 1998 17:26:46 +0200
changeset 5069 3ea049f7979d
parent 4153 e534c4c32d54
child 5711 5a1cd4b4b20e
permissions -rw-r--r--
isatool fixgoal;
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
     9
Goalw [le_prod_def] "x [= (x::'a::quasi_order*'b::quasi_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    10
  by (rtac conjI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    11
  by (rtac le_refl 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    12
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    13
qed "le_prod_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    14
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    15
Goalw [le_prod_def] "x [= y & y [= z --> x [= (z::'a::quasi_order*'b::quasi_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    16
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    17
  by (etac (conjI RS (le_trans RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    18
  by (assume_tac 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    19
  by (etac (conjI RS (le_trans RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    20
  by (assume_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    21
qed "le_prod_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    22
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    23
Goalw [le_prod_def] "x [= y & y [= x --> x = (y::'a::partial_order*'b::partial_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    24
  by Safe_tac;
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    25
  by (stac Pair_fst_snd_eq 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    26
  by (rtac conjI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    27
  by (etac (conjI RS (le_antisym RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    28
  by (assume_tac 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    29
  by (etac (conjI RS (le_antisym RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    30
  by (assume_tac 1);
1440
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    36
Goalw [le_fun_def] "f [= (f::'a=>'b::quasi_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    37
  by (rtac allI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    38
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    39
qed "le_fun_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    40
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    41
Goalw [le_fun_def] "f [= g & g [= h --> f [= (h::'a=>'b::quasi_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    42
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    43
  by (rtac (le_trans RS mp) 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    44
  by (Fast_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    45
qed "le_fun_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    46
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    47
Goalw [le_fun_def] "f [= g & g [= f --> f = (g::'a=>'b::partial_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    48
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    49
  by (rtac ext 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    50
  by (rtac (le_antisym RS mp) 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    51
  by (Fast_tac 1);
1440
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*)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    59
Goal "Rep_dual (Abs_dual y) = y";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    60
  by (rtac Abs_dual_inverse 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1440
diff changeset
    61
  by (rewtac dual_def);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    62
  by (Fast_tac 1);
1440
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
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    66
Goalw [le_dual_def] "x [= (x::'a::quasi_order dual)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    67
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    68
qed "le_dual_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    69
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    70
Goalw [le_dual_def] "x [= y & y [= z --> x [= (z::'a::quasi_order dual)";
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    71
  by (stac conj_commut 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    72
  by (rtac le_trans 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    73
qed "le_dual_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    74
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    75
Goalw [le_dual_def] "x [= y & y [= x --> x = (y::'a::partial_order dual)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    76
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    77
  by (rtac (Rep_dual_inverse RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    78
  by (rtac sym 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    79
  by (rtac (Rep_dual_inverse RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    80
  by (rtac arg_cong 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    81
  back();
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    82
  by (etac (conjI RS (le_antisym RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    83
  by (assume_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    84
qed "le_dual_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    85
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    86
Goalw [le_dual_def] "x [= y | y [= (x::'a::linear_order dual)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    87
  by (rtac le_linear 1);
2606
27cdd600a3b1 tuned names: partial order, linear order;
wenzelm
parents: 1899
diff changeset
    88
qed "le_dual_linear";