src/HOLCF/Fun1.ML
author nipkow
Sun, 22 Dec 2002 10:43:43 +0100
changeset 13763 f94b569cd610
parent 12338 de0f4a63baa5
child 14981 e73f8140af78
permissions -rw-r--r--
added print translations tha avoid eta contraction for important binders.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2033
diff changeset
     1
(*  Title:      HOLCF/Fun1.ML
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1168
diff changeset
     3
    Author:     Franz Regensburger
12030
wenzelm
parents: 9245
diff changeset
     4
    License:    GPL (GNU GENERAL PUBLIC LICENSE)
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     5
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
     6
Definition of the partial ordering for the type of all functions => (fun)
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     7
*)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     8
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     9
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    10
(* less_fun is a partial order on 'a => 'b                                  *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    11
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    12
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 12030
diff changeset
    13
val prems = goalw thy [less_fun_def] "(f::'a::type =>'b::po) << f";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    14
by (fast_tac (HOL_cs addSIs [refl_less]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    15
qed "refl_less_fun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    16
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    17
val prems = goalw Fun1.thy [less_fun_def] 
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 12030
diff changeset
    18
        "[|(f1::'a::type =>'b::po) << f2; f2 << f1|] ==> f1 = f2";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    19
by (cut_facts_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    20
by (stac expand_fun_eq 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    21
by (fast_tac (HOL_cs addSIs [antisym_less]) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    22
qed "antisym_less_fun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    23
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    24
val prems = goalw Fun1.thy [less_fun_def] 
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 12030
diff changeset
    25
        "[|(f1::'a::type =>'b::po) << f2; f2 << f3 |] ==> f1 << f3";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    26
by (cut_facts_tac prems 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    27
by (strip_tac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    28
by (rtac trans_less 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    29
by (etac allE 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    30
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    31
by ((etac allE 1) THEN (atac 1));
428385c4bc50 removed most batch-style proofs
paulson
parents: 3323
diff changeset
    32
qed "trans_less_fun";