231 and in_form t = |
231 and in_form t = |
232 (case Term.strip_comb t of |
232 (case Term.strip_comb t of |
233 (q as Const (qn, _), [Abs (n, T, t')]) => |
233 (q as Const (qn, _), [Abs (n, T, t')]) => |
234 if is_some (quantifier qn) then q $ Abs (n, T, in_trig t') |
234 if is_some (quantifier qn) then q $ Abs (n, T, in_trig t') |
235 else as_term (in_term t) |
235 else as_term (in_term t) |
236 | (Const (c as (@{const_name distinct}, T)), [t']) => |
236 | (Const (c as (@{const_name SMT.distinct}, T)), [t']) => |
237 if is_builtin_distinct then Const (pred c) $ in_list T in_term t' |
237 if is_builtin_distinct then Const (pred c) $ in_list T in_term t' |
238 else as_term (in_term t) |
238 else as_term (in_term t) |
239 | (Const c, ts) => |
239 | (Const c, ts) => |
240 if is_builtin_conn (conn c) |
240 if is_builtin_conn (conn c) |
241 then Term.list_comb (Const (conn c), map in_form ts) |
241 then Term.list_comb (Const (conn c), map in_form ts) |
375 trans b #>> (fn ((Ts', ps'), b') => SQua (q, Ts', ps', b')) |
375 trans b #>> (fn ((Ts', ps'), b') => SQua (q, Ts', ps', b')) |
376 | NONE => raise TERM ("intermediate", [t])) |
376 | NONE => raise TERM ("intermediate", [t])) |
377 | (Const (@{const_name Let}, _), [t1, Abs (_, T, t2)]) => |
377 | (Const (@{const_name Let}, _), [t1, Abs (_, T, t2)]) => |
378 transT T ##>> trans t1 ##>> trans t2 #>> |
378 transT T ##>> trans t1 ##>> trans t2 #>> |
379 (fn ((U, u1), u2) => SLet (U, u1, u2)) |
379 (fn ((U, u1), u2) => SLet (U, u1, u2)) |
380 | (h as Const (c as (@{const_name distinct}, T)), [t1]) => |
380 | (h as Const (c as (@{const_name SMT.distinct}, T)), [t1]) => |
381 (case builtin_fun ctxt c (HOLogic.dest_list t1) of |
381 (case builtin_fun ctxt c (HOLogic.dest_list t1) of |
382 SOME (n, ts) => fold_map trans ts #>> app n |
382 SOME (n, ts) => fold_map trans ts #>> app n |
383 | NONE => transs h T [t1]) |
383 | NONE => transs h T [t1]) |
384 | (h as Const (c as (_, T)), ts) => |
384 | (h as Const (c as (_, T)), ts) => |
385 (case try HOLogic.dest_number t of |
385 (case try HOLogic.dest_number t of |