src/HOL/Predicate_Compile_Examples/Specialisation_Examples.thy
changeset 40054 cd7b1fa20bce
parent 39919 9f6503aaa77d
child 41413 64cd30d6b0b8
equal deleted inserted replaced
40053:3fa49ea76cbb 40054:cd7b1fa20bce
    11 
    11 
    12 definition
    12 definition
    13   "greater_than_index xs = (\<forall>i x. nth_el' xs i = Some x --> x > i)"
    13   "greater_than_index xs = (\<forall>i x. nth_el' xs i = Some x --> x > i)"
    14 
    14 
    15 code_pred (expected_modes: i => bool) [inductify, skip_proof, specialise] greater_than_index .
    15 code_pred (expected_modes: i => bool) [inductify, skip_proof, specialise] greater_than_index .
    16 ML {* Predicate_Compile_Core.intros_of @{context} @{const_name specialised_nth_el'P} *}
    16 ML {* Core_Data.intros_of @{context} @{const_name specialised_nth_el'P} *}
    17 
    17 
    18 thm greater_than_index.equation
    18 thm greater_than_index.equation
    19 
    19 
    20 values [expected "{()}"] "{x. greater_than_index [1,2,4,6]}"
    20 values [expected "{()}"] "{x. greater_than_index [1,2,4,6]}"
    21 values [expected "{}"] "{x. greater_than_index [0,2,3,2]}"
    21 values [expected "{}"] "{x. greater_than_index [0,2,3,2]}"
    40 
    40 
    41 code_pred (modes: o => i => bool) [inductify, specialise, skip_proof] max_of_my_Suc .
    41 code_pred (modes: o => i => bool) [inductify, specialise, skip_proof] max_of_my_Suc .
    42 
    42 
    43 thm max_of_my_SucP.equation
    43 thm max_of_my_SucP.equation
    44 
    44 
    45 ML {* Predicate_Compile_Core.intros_of @{context} @{const_name specialised_max_natP} *}
    45 ML {* Core_Data.intros_of @{context} @{const_name specialised_max_natP} *}
    46 
    46 
    47 values "{x. max_of_my_SucP x 6}"
    47 values "{x. max_of_my_SucP x 6}"
    48 
    48 
    49 subsection {* Sorts *}
    49 subsection {* Sorts *}
    50 
    50