src/HOL/AxClasses/Lattice/OrdDefs.ML
author wenzelm
Mon, 29 Nov 1999 15:52:49 +0100
changeset 8039 a901bafe4578
parent 6162 484adda70b65
permissions -rw-r--r--
Goal: tuned pris;
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
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     3
(** lifting of quasi / partial orders **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     4
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     5
(* pairs *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     6
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
     7
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
     8
  by (rtac conjI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
     9
  by (rtac le_refl 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    10
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    11
qed "le_prod_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    12
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    13
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
    14
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    15
  by (etac (conjI RS (le_trans RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    16
  by (assume_tac 1);
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);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    19
qed "le_prod_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    20
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    21
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
    22
  by Safe_tac;
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    23
  by (stac Pair_fst_snd_eq 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    24
  by (rtac conjI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    25
  by (etac (conjI RS (le_antisym RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    26
  by (assume_tac 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);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    29
qed "le_prod_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    30
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    31
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    32
(* functions *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    33
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    34
Goalw [le_fun_def] "f [= (f::'a=>'b::quasi_order)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    35
  by (rtac allI 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    36
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    37
qed "le_fun_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    38
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    39
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
    40
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    41
  by (rtac (le_trans RS mp) 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    42
  by (Fast_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    43
qed "le_fun_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    44
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    45
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
    46
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    47
  by (rtac ext 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    48
  by (rtac (le_antisym RS mp) 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    49
  by (Fast_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    50
qed "le_fun_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    51
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    52
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    53
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    54
(** duals **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    55
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    56
(*"'a dual" is even an isotype*)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    57
Goal "Rep_dual (Abs_dual y) = y";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    58
  by (rtac Abs_dual_inverse 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1440
diff changeset
    59
  by (rewtac dual_def);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    60
  by (Fast_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    61
qed "Abs_dual_inverse'";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    62
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    63
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    64
Goalw [le_dual_def] "x [= (x::'a::quasi_order dual)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    65
  by (rtac le_refl 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    66
qed "le_dual_refl";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    67
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    68
Goalw [le_dual_def] "x [= y & y [= z --> x [= (z::'a::quasi_order dual)";
6162
484adda70b65 expandshort
paulson
parents: 5712
diff changeset
    69
  by (rtac impI 1);
484adda70b65 expandshort
paulson
parents: 5712
diff changeset
    70
  by (rtac (le_trans RS mp) 1);
5712
wenzelm
parents: 5711
diff changeset
    71
  by (Blast_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    72
qed "le_dual_trans";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    73
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    74
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
    75
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    76
  by (rtac (Rep_dual_inverse RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    77
  by (rtac sym 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    78
  by (rtac (Rep_dual_inverse RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    79
  by (rtac arg_cong 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    80
  back();
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    81
  by (etac (conjI RS (le_antisym RS mp)) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    82
  by (assume_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    83
qed "le_dual_antisym";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    84
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    85
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
    86
  by (rtac le_linear 1);
2606
27cdd600a3b1 tuned names: partial order, linear order;
wenzelm
parents: 1899
diff changeset
    87
qed "le_dual_linear";