src/HOL/Nitpick_Examples/Mono_Nits.thy
changeset 34982 7b8c366e34a2
parent 34124 c4628a1dcf75
child 35071 3df45b0ce819
equal deleted inserted replaced
34981:475aef44d5fb 34982:7b8c366e34a2
    16 
    16 
    17 val defs = Nitpick_HOL.all_axioms_of @{theory} |> #1
    17 val defs = Nitpick_HOL.all_axioms_of @{theory} |> #1
    18 val def_table = Nitpick_HOL.const_def_table @{context} defs
    18 val def_table = Nitpick_HOL.const_def_table @{context} defs
    19 val ext_ctxt : Nitpick_HOL.extended_context =
    19 val ext_ctxt : Nitpick_HOL.extended_context =
    20   {thy = @{theory}, ctxt = @{context}, max_bisim_depth = ~1, boxes = [],
    20   {thy = @{theory}, ctxt = @{context}, max_bisim_depth = ~1, boxes = [],
    21    user_axioms = NONE, debug = false, wfs = [], binary_ints = SOME false,
    21    stds = [(NONE, true)], wfs = [], user_axioms = NONE, debug = false,
    22    destroy_constrs = false, specialize = false, skolemize = false,
    22    binary_ints = SOME false, destroy_constrs = false, specialize = false,
    23    star_linear_preds = false, uncurry = false, fast_descrs = false,
    23    skolemize = false, star_linear_preds = false, uncurry = false,
    24    tac_timeout = NONE, evals = [], case_names = [], def_table = def_table,
    24    fast_descrs = false, tac_timeout = NONE, evals = [], case_names = [],
    25    nondef_table = Symtab.empty, user_nondefs = [],
    25    def_table = def_table, nondef_table = Symtab.empty, user_nondefs = [],
    26    simp_table = Unsynchronized.ref Symtab.empty, psimp_table = Symtab.empty,
    26    simp_table = Unsynchronized.ref Symtab.empty, psimp_table = Symtab.empty,
    27    intro_table = Symtab.empty, ground_thm_table = Inttab.empty,
    27    intro_table = Symtab.empty, ground_thm_table = Inttab.empty,
    28    ersatz_table = [], skolems = Unsynchronized.ref [],
    28    ersatz_table = [], skolems = Unsynchronized.ref [],
    29    special_funs = Unsynchronized.ref [], unrolled_preds = Unsynchronized.ref [],
    29    special_funs = Unsynchronized.ref [], unrolled_preds = Unsynchronized.ref [],
    30    wf_cache = Unsynchronized.ref [], constr_cache = Unsynchronized.ref []}
    30    wf_cache = Unsynchronized.ref [], constr_cache = Unsynchronized.ref []}
    31 (* term -> bool *)
    31 (* term -> bool *)
    32 val is_mono = Nitpick_Mono.formulas_monotonic ext_ctxt @{typ 'a} [] []
    32 val is_mono = Nitpick_Mono.formulas_monotonic ext_ctxt @{typ 'a}
       
    33                                               Nitpick_Mono.Plus [] []
    33 fun is_const t =
    34 fun is_const t =
    34   let val T = fastype_of t in
    35   let val T = fastype_of t in
    35     is_mono (Logic.mk_implies (Logic.mk_equals (Free ("dummyP", T), t),
    36     is_mono (Logic.mk_implies (Logic.mk_equals (Free ("dummyP", T), t),
    36                                @{const False}))
    37                                @{const False}))
    37   end
    38   end