71 | add_term_typed_consts (Abs (_, _, t), cs) = add_term_typed_consts (t, cs) |
71 | add_term_typed_consts (Abs (_, _, t), cs) = add_term_typed_consts (t, cs) |
72 | add_term_typed_consts (_, cs) = cs; |
72 | add_term_typed_consts (_, cs) = cs; |
73 |
73 |
74 fun term_typed_consts t = add_term_typed_consts(t,[]); |
74 fun term_typed_consts t = add_term_typed_consts(t,[]); |
75 |
75 |
76 (* Some Types*) |
76 (* SOME Types*) |
77 val bT = HOLogic.boolT; |
77 val bT = HOLogic.boolT; |
78 val iT = HOLogic.intT; |
78 val iT = HOLogic.intT; |
79 val binT = HOLogic.binT; |
79 val binT = HOLogic.binT; |
80 val nT = HOLogic.natT; |
80 val nT = HOLogic.natT; |
81 |
81 |
244 val sg = sign_of_thm st |
244 val sg = sign_of_thm st |
245 (* The Abstraction step *) |
245 (* The Abstraction step *) |
246 val g' = if a then abstract_pres sg g else g |
246 val g' = if a then abstract_pres sg g else g |
247 (* Transform the term*) |
247 (* Transform the term*) |
248 val (t,np,nh) = prepare_for_presburger sg q g' |
248 val (t,np,nh) = prepare_for_presburger sg q g' |
249 (* Some simpsets for dealing with mod div abs and nat*) |
249 (* SOME simpsets for dealing with mod div abs and nat*) |
250 val simpset0 = HOL_basic_ss |
250 val simpset0 = HOL_basic_ss |
251 addsimps [mod_div_equality', Suc_plus1] |
251 addsimps [mod_div_equality', Suc_plus1] |
252 addsplits [split_zdiv, split_zmod, split_div', split_min, split_max] |
252 addsplits [split_zdiv, split_zmod, split_div', split_min, split_max] |
253 (* Simp rules for changing (n::int) to int n *) |
253 (* Simp rules for changing (n::int) to int n *) |
254 val simpset1 = HOL_basic_ss |
254 val simpset1 = HOL_basic_ss |
311 [Method.add_method ("presburger", |
311 [Method.add_method ("presburger", |
312 presburger_args presburger_method, |
312 presburger_args presburger_method, |
313 "decision procedure for Presburger arithmetic"), |
313 "decision procedure for Presburger arithmetic"), |
314 ArithTheoryData.map (fn {splits, inj_consts, discrete, presburger} => |
314 ArithTheoryData.map (fn {splits, inj_consts, discrete, presburger} => |
315 {splits = splits, inj_consts = inj_consts, discrete = discrete, |
315 {splits = splits, inj_consts = inj_consts, discrete = discrete, |
316 presburger = Some (presburger_tac true false)})]; |
316 presburger = SOME (presburger_tac true false)})]; |
317 |
317 |
318 end; |
318 end; |
319 |
319 |
320 val presburger_tac = Presburger.presburger_tac true false; |
320 val presburger_tac = Presburger.presburger_tac true false; |