src/HOLCF/Cprod1.ML
author slotosch
Mon Feb 17 10:57:11 1997 +0100 (1997-02-17)
changeset 2640 ee4dfce170a0
parent 2033 639de962ded4
child 3323 194ae2e0c193
permissions -rw-r--r--
Changes of HOLCF from Oscar Slotosch:

1. axclass instead of class
* less instead of
less_fun,
less_cfun,
less_sprod,
less_cprod,
less_ssum,
less_up,
less_lift
* @x.!y.x<<y instead of UUU instead of
UU_fun, UU_cfun, ...
* no witness type void needed (eliminated Void.thy.Void.ML)
* inst_<typ>_<class> derived as theorems

2. improved some proves on less_sprod and less_cprod
* eliminated the following theorems
Sprod1.ML: less_sprod1a
Sprod1.ML: less_sprod1b
Sprod1.ML: less_sprod2a
Sprod1.ML: less_sprod2b
Sprod1.ML: less_sprod2c
Sprod2.ML: less_sprod3a
Sprod2.ML: less_sprod3b
Sprod2.ML: less_sprod4b
Sprod2.ML: less_sprod4c
Sprod3.ML: less_sprod5b
Sprod3.ML: less_sprod5c
Cprod1.ML: less_cprod1b
Cprod1.ML: less_cprod2a
Cprod1.ML: less_cprod2b
Cprod1.ML: less_cprod2c
Cprod2.ML: less_cprod3a
Cprod2.ML: less_cprod3b

3. new classes:
* cpo<po,
* chfin<pcpo,
* flat<pcpo,
* derived: flat<chfin
to do: show instances for lift

4. Data Type One
* Used lift for the definition: one = unit lift
* Changed the constant one into ONE

5. Data Type Tr
* Used lift for the definition: tr = bool lift
* adopted definitions of if,andalso,orelse,neg
* only one theory Tr.thy,Tr.ML instead of
Tr1.thy,Tr1.ML, Tr2.thy,Tr2.ML
* reintroduced ceils for =TT,=FF

6. typedef
* Using typedef instead of faking type definitions
to do: change fapp, fabs from Cfun1 to Rep_Cfun, Abs_Cfun

7. adopted examples and domain construct to theses changes

These changes eliminated all rules and arities from HOLCF
slotosch@2640
     1
(*  Title:      HOLCF/Cprod1.ML
nipkow@243
     2
    ID:         $Id$
clasohm@1461
     3
    Author:     Franz Regensburger
nipkow@243
     4
    Copyright   1993  Technische Universitaet Muenchen
nipkow@243
     5
slotosch@2640
     6
Lemmas for theory Cprod1.thy 
nipkow@243
     7
*)
nipkow@243
     8
nipkow@243
     9
open Cprod1;
nipkow@243
    10
nipkow@243
    11
nipkow@243
    12
(* ------------------------------------------------------------------------ *)
nipkow@243
    13
(* less_cprod is a partial order on 'a * 'b                                 *)
nipkow@243
    14
(* ------------------------------------------------------------------------ *)
nipkow@243
    15
slotosch@2640
    16
qed_goal "Sel_injective_cprod" Prod.thy 
slotosch@2640
    17
        "[|fst x = fst y; snd x = snd y|] ==> x = y"
slotosch@2640
    18
(fn prems =>
clasohm@1461
    19
        [
clasohm@1461
    20
        (cut_facts_tac prems 1),
slotosch@2640
    21
        (subgoal_tac "(fst x,snd x)=(fst y,snd y)" 1),
slotosch@2640
    22
        (rotate_tac ~1 1),
slotosch@2640
    23
        (asm_full_simp_tac(HOL_ss addsimps[surjective_pairing RS sym])1),
slotosch@2640
    24
        (Asm_simp_tac 1)
clasohm@1461
    25
        ]);
nipkow@243
    26
slotosch@2640
    27
qed_goalw "refl_less_cprod" Cprod1.thy [less_cprod_def] "less (p::'a*'b) p"
slotosch@2640
    28
 (fn prems => [Simp_tac 1]);
nipkow@243
    29
slotosch@2640
    30
qed_goalw "antisym_less_cprod" thy [less_cprod_def]
slotosch@2640
    31
        "[|less (p1::'a * 'b) p2;less p2 p1|] ==> p1=p2"
slotosch@2640
    32
(fn prems =>
clasohm@1461
    33
        [
clasohm@1461
    34
        (cut_facts_tac prems 1),
slotosch@2640
    35
        (rtac Sel_injective_cprod 1),
slotosch@2640
    36
        (fast_tac (HOL_cs addIs [antisym_less]) 1),
slotosch@2640
    37
        (fast_tac (HOL_cs addIs [antisym_less]) 1)
clasohm@1461
    38
        ]);
nipkow@243
    39
slotosch@2640
    40
qed_goalw "trans_less_cprod" thy [less_cprod_def]
slotosch@2640
    41
        "[|less (p1::'a*'b) p2;less p2 p3|] ==> less p1 p3"
slotosch@2640
    42
(fn prems =>
slotosch@2640
    43
        [
slotosch@2640
    44
        (cut_facts_tac prems 1),
slotosch@2640
    45
        (rtac conjI 1),
slotosch@2640
    46
        (fast_tac (HOL_cs addIs [trans_less]) 1),
slotosch@2640
    47
        (fast_tac (HOL_cs addIs [trans_less]) 1)
slotosch@2640
    48
        ]);