src/HOLCF/Cfun1.ML
author berghofe
Thu, 27 Jan 2005 12:37:02 +0100
changeset 15475 fdf9434b04ea
parent 14981 e73f8140af78
child 15566 eb3b1a5c304e
permissions -rw-r--r--
- Proofs are now hidden by default when generating documents - New syntax for referring to theorems in lists - Improvements to theory loader (relative and absolute paths)
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/Cfun1.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
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     4
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
     5
The type ->  of continuous functions.
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
     6
*)
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
(* ------------------------------------------------------------------------ *)
5291
5706f0ef1d43 eliminated fabs,fapp.
slotosch
parents: 3323
diff changeset
     9
(* derive old type definition rules for Abs_CFun & Rep_CFun                         *)
5706f0ef1d43 eliminated fabs,fapp.
slotosch
parents: 3323
diff changeset
    10
(* Rep_CFun and Abs_CFun should be replaced by Rep_Cfun anf Abs_Cfun in future      *)
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    11
(* ------------------------------------------------------------------------ *)
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    12
Goal "Rep_CFun fo : CFun";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    13
by (rtac Rep_CFun 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    14
qed "Rep_Cfun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    15
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    16
Goal "Abs_CFun (Rep_CFun fo) = fo";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    17
by (rtac Rep_CFun_inverse 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    18
qed "Rep_Cfun_inverse";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents: 2033
diff changeset
    19
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    20
Goal "f:CFun==>Rep_CFun(Abs_CFun f)=f";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    21
by (etac Abs_CFun_inverse 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    22
qed "Abs_Cfun_inverse";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    23
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    24
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    25
(* less_cfun is a partial order on type 'a -> 'b                            *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    26
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    27
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    28
Goalw [less_cfun_def] "(f::'a->'b) << f";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    29
by (rtac refl_less 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    30
qed "refl_less_cfun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    31
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    32
Goalw [less_cfun_def] 
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    33
        "[|(f1::'a->'b) << f2; f2 << f1|] ==> f1 = f2";
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    34
by (rtac injD 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    35
by (rtac antisym_less 2);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    36
by (atac 3);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    37
by (atac 2);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    38
by (rtac inj_inverseI 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    39
by (rtac Rep_Cfun_inverse 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    40
qed "antisym_less_cfun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    41
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    42
Goalw [less_cfun_def] 
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    43
        "[|(f1::'a->'b) << f2; f2 << f3|] ==> f1 << f3";
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    44
by (etac trans_less 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    45
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    46
qed "trans_less_cfun";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    47
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    48
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    49
(* lemmas about application of continuous functions                         *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    50
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    51
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 9248
diff changeset
    52
Goal "[| f=g; x=y |] ==> f$x = g$y";
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    53
by (Asm_simp_tac 1);
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    54
qed "cfun_cong";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    55
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 9248
diff changeset
    56
Goal "f=g ==> f$x = g$x";
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    57
by (Asm_simp_tac 1);
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    58
qed "cfun_fun_cong";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    59
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 9248
diff changeset
    60
Goal "x=y ==> f$x = f$y";
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    61
by (Asm_simp_tac 1);
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    62
qed "cfun_arg_cong";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    63
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    64
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    65
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    66
(* additional lemma about the isomorphism between -> and Cfun               *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    67
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    68
9248
e1dee89de037 massive tidy-up: goal -> Goal, remove use of prems, etc.
paulson
parents: 9245
diff changeset
    69
Goal "cont f ==> Rep_CFun (Abs_CFun f) = f";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    70
by (rtac Abs_Cfun_inverse 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    71
by (rewtac CFun_def);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    72
by (etac (mem_Collect_eq RS ssubst) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    73
qed "Abs_Cfun_inverse2";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    74
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    75
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    76
(* simplification of application                                            *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    77
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    78
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 9248
diff changeset
    79
Goal "cont f ==> (Abs_CFun f)$x = f x";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    80
by (etac (Abs_Cfun_inverse2 RS fun_cong) 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    81
qed "Cfunapp2";
243
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    82
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    83
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    84
(* beta - equality for continuous functions                                 *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    85
(* ------------------------------------------------------------------------ *)
c22b85994e17 Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff changeset
    86
10834
a7897aebbffc *** empty log message ***
nipkow
parents: 9248
diff changeset
    87
Goal "cont(c1) ==> (LAM x .c1 x)$u = c1 u";
9245
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    88
by (rtac Cfunapp2 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    89
by (atac 1);
428385c4bc50 removed most batch-style proofs
paulson
parents: 5291
diff changeset
    90
qed "beta_cfun";