src/HOL/Library/Numeral_Type.thy
changeset 35431 8758fe1fc9f8
parent 35362 828a42fb7445
child 36350 bc7982c54e37
equal deleted inserted replaced
35430:df2862dc23a8 35431:8758fe1fc9f8
    30 
    30 
    31 subsection {* Cardinalities of types *}
    31 subsection {* Cardinalities of types *}
    32 
    32 
    33 syntax "_type_card" :: "type => nat" ("(1CARD/(1'(_')))")
    33 syntax "_type_card" :: "type => nat" ("(1CARD/(1'(_')))")
    34 
    34 
    35 translations "CARD(t)" => "CONST card (CONST UNIV \<Colon> t set)"
    35 translations "CARD('t)" => "CONST card (CONST UNIV \<Colon> 't set)"
    36 
    36 
    37 typed_print_translation {*
    37 typed_print_translation {*
    38 let
    38 let
    39   fun card_univ_tr' show_sorts _ [Const (@{const_syntax UNIV}, Type(_, [T, _]))] =
    39   fun card_univ_tr' show_sorts _ [Const (@{const_syntax UNIV}, Type(_, [T, _]))] =
    40     Syntax.const @{syntax_const "_type_card"} $ Syntax.term_of_typ show_sorts T;
    40     Syntax.const @{syntax_const "_type_card"} $ Syntax.term_of_typ show_sorts T;