src/HOL/HOLCF/Tools/holcf_library.ML
changeset 44169 bdcc11b2fdc8
parent 44080 53d95b52954c
child 61424 c3658c18b7bc
equal deleted inserted replaced
44168:9c120cde98f9 44169:bdcc11b2fdc8
    13 
    13 
    14 (*** Operations from Isabelle/HOL ***)
    14 (*** Operations from Isabelle/HOL ***)
    15 
    15 
    16 val boolT = HOLogic.boolT
    16 val boolT = HOLogic.boolT
    17 val natT = HOLogic.natT
    17 val natT = HOLogic.natT
       
    18 val mk_setT = HOLogic.mk_setT
    18 
    19 
    19 val mk_equals = Logic.mk_equals
    20 val mk_equals = Logic.mk_equals
    20 val mk_eq = HOLogic.mk_eq
    21 val mk_eq = HOLogic.mk_eq
    21 val mk_trp = HOLogic.mk_Trueprop
    22 val mk_trp = HOLogic.mk_Trueprop
    22 val mk_fst = HOLogic.mk_fst
    23 val mk_fst = HOLogic.mk_fst
    54   Const (@{const_name chain}, Term.fastype_of t --> boolT) $ t
    55   Const (@{const_name chain}, Term.fastype_of t --> boolT) $ t
    55 
    56 
    56 fun mk_lub t =
    57 fun mk_lub t =
    57   let
    58   let
    58     val T = Term.range_type (Term.fastype_of t)
    59     val T = Term.range_type (Term.fastype_of t)
    59     val lub_const = Const (@{const_name lub}, (T --> boolT) --> T)
    60     val lub_const = Const (@{const_name lub}, mk_setT T --> T)
    60     val UNIV_const = @{term "UNIV :: nat set"}
    61     val UNIV_const = @{term "UNIV :: nat set"}
    61     val image_type = (natT --> T) --> (natT --> boolT) --> T --> boolT
    62     val image_type = (natT --> T) --> mk_setT natT --> mk_setT T
    62     val image_const = Const (@{const_name image}, image_type)
    63     val image_const = Const (@{const_name image}, image_type)
    63   in
    64   in
    64     lub_const $ (image_const $ t $ UNIV_const)
    65     lub_const $ (image_const $ t $ UNIV_const)
    65   end
    66   end
    66 
    67