src/HOLCF/stream2.ML
author paulson
Mon Dec 07 18:26:25 1998 +0100 (1998-12-07)
changeset 6019 0e55c2fb2ebb
parent 243 c22b85994e17
permissions -rw-r--r--
tidying
nipkow@243
     1
(*  Title: 	HOLCF/stream2.ML
nipkow@243
     2
    ID:         $Id$
nipkow@243
     3
    Author: 	Franz Regensburger
nipkow@243
     4
    Copyright   1993 Technische Universitaet Muenchen
nipkow@243
     5
nipkow@243
     6
Lemmas for theory Stream2.thy
nipkow@243
     7
*)
nipkow@243
     8
nipkow@243
     9
open Stream2;
nipkow@243
    10
nipkow@243
    11
(* ------------------------------------------------------------------------- *)
nipkow@243
    12
(* expand fixed point properties                                             *)
nipkow@243
    13
(* ------------------------------------------------------------------------- *)
nipkow@243
    14
nipkow@243
    15
val smap_def2 = fix_prover Stream2.thy smap_def 
nipkow@243
    16
	"smap = (LAM f s. stream_when[LAM x l.scons[f[x]][smap[f][l]]][s])";
nipkow@243
    17
nipkow@243
    18
nipkow@243
    19
(* ------------------------------------------------------------------------- *)
nipkow@243
    20
(* recursive  properties                                                     *)
nipkow@243
    21
(* ------------------------------------------------------------------------- *)
nipkow@243
    22
nipkow@243
    23
nipkow@243
    24
val smap1 = prove_goal Stream2.thy "smap[f][UU] = UU"
nipkow@243
    25
 (fn prems =>
nipkow@243
    26
	[
nipkow@243
    27
	(rtac (smap_def2 RS ssubst) 1),
nipkow@243
    28
	(simp_tac (HOLCF_ss addsimps stream_when) 1)
nipkow@243
    29
	]);
nipkow@243
    30
nipkow@243
    31
val smap2 = prove_goal Stream2.thy 
nipkow@243
    32
	"x~=UU ==> smap[f][scons[x][xs]] = scons[f[x]][smap[f][xs]]"
nipkow@243
    33
 (fn prems =>
nipkow@243
    34
	[
nipkow@243
    35
	(cut_facts_tac prems 1),
nipkow@243
    36
	(rtac trans 1),
nipkow@243
    37
	(rtac (smap_def2 RS ssubst) 1),
nipkow@243
    38
	(asm_simp_tac (HOLCF_ss addsimps stream_rews) 1),
nipkow@243
    39
	(rtac refl 1)
nipkow@243
    40
	]);
nipkow@243
    41
nipkow@243
    42
nipkow@243
    43
val stream2_rews = [smap1, smap2];