src/HOL/Library/Tools/smt_word.ML
changeset 80636 4041e7c8059d
parent 76183 8089593a364a
equal deleted inserted replaced
80635:27d5452d20fc 80636:4041e7c8059d
    61 
    61 
    62   fun if_fixed_all m = if_fixed (forall (can dest_wordT) o (op ::)) m
    62   fun if_fixed_all m = if_fixed (forall (can dest_wordT) o (op ::)) m
    63   fun if_fixed_args m = if_fixed (forall (can dest_wordT) o snd) m
    63   fun if_fixed_args m = if_fixed (forall (can dest_wordT) o snd) m
    64 
    64 
    65   fun add_word_fun f (t, n) =
    65   fun add_word_fun f (t, n) =
    66     let val (m, _) = Term.dest_Const t
    66     let val m = dest_Const_name t
    67     in SMT_Builtin.add_builtin_fun smtlibC (Term.dest_Const t, K (f m n)) end
    67     in SMT_Builtin.add_builtin_fun smtlibC (Term.dest_Const t, K (f m n)) end
    68 
    68 
    69   val mk_nat = HOLogic.mk_number \<^typ>\<open>nat\<close>
    69   val mk_nat = HOLogic.mk_number \<^typ>\<open>nat\<close>
    70 
    70 
    71   fun mk_shift c [u, t] = Const c $ mk_nat (snd (HOLogic.dest_number u)) $ t
    71   fun mk_shift c [u, t] = Const c $ mk_nat (snd (HOLogic.dest_number u)) $ t