equal
deleted
inserted
replaced
32 | _ => error "num_of_term: unsupported Multiplication") |
32 | _ => error "num_of_term: unsupported Multiplication") |
33 | Const("RealDef.real",_)$ (Const (@{const_name "RComplete.floor"},_)$ t') => Floor (num_of_term vs t') |
33 | Const("RealDef.real",_)$ (Const (@{const_name "RComplete.floor"},_)$ t') => Floor (num_of_term vs t') |
34 | Const("RealDef.real",_)$ (Const (@{const_name "RComplete.ceiling"},_)$ t') => Neg(Floor (Neg (num_of_term vs t'))) |
34 | Const("RealDef.real",_)$ (Const (@{const_name "RComplete.ceiling"},_)$ t') => Neg(Floor (Neg (num_of_term vs t'))) |
35 | Const("RealDef.real",_) $ Const (@{const_name "Int.number_of"},_)$t' => C (HOLogic.dest_numeral t') |
35 | Const("RealDef.real",_) $ Const (@{const_name "Int.number_of"},_)$t' => C (HOLogic.dest_numeral t') |
36 | Const (@{const_name "Int.number_of"},_)$t' => C (HOLogic.dest_numeral t') |
36 | Const (@{const_name "Int.number_of"},_)$t' => C (HOLogic.dest_numeral t') |
37 | _ => error ("num_of_term: unknown term " ^ (Display.raw_string_of_term t)); |
37 | _ => error ("num_of_term: unknown term " ^ Sign.string_of_term CPure.thy t); |
38 |
38 |
39 |
39 |
40 (* pseudo reification : term -> fm *) |
40 (* pseudo reification : term -> fm *) |
41 fun fm_of_term vs t = |
41 fun fm_of_term vs t = |
42 case t of |
42 case t of |
56 | Const("Not",_)$t' => Not (fm_of_term vs t') |
56 | Const("Not",_)$t' => Not (fm_of_term vs t') |
57 | Const("Ex",_)$Abs(xn,xT,p) => |
57 | Const("Ex",_)$Abs(xn,xT,p) => |
58 E (fm_of_term (map (fn (v, n) => (v, Suc n)) vs) p) |
58 E (fm_of_term (map (fn (v, n) => (v, Suc n)) vs) p) |
59 | Const("All",_)$Abs(xn,xT,p) => |
59 | Const("All",_)$Abs(xn,xT,p) => |
60 A (fm_of_term (map (fn(v, n) => (v, Suc n)) vs) p) |
60 A (fm_of_term (map (fn(v, n) => (v, Suc n)) vs) p) |
61 | _ => error ("fm_of_term : unknown term!" ^ Display.raw_string_of_term t); |
61 | _ => error ("fm_of_term : unknown term!" ^ Sign.string_of_term CPure.thy t); |
62 |
62 |
63 fun start_vs t = |
63 fun start_vs t = |
64 let val fs = term_frees t |
64 let val fs = term_frees t |
65 in fs ~~ map nat (0 upto (length fs - 1)) |
65 in fs ~~ map nat (0 upto (length fs - 1)) |
66 end ; |
66 end ; |