equal
deleted
inserted
replaced
515 if z1 = z2 andalso num_occs_of_var z1 = 2 then @{const True} |
515 if z1 = z2 andalso num_occs_of_var z1 = 2 then @{const True} |
516 else raise SAME () |
516 else raise SAME () |
517 | (Const (x as (s, T)), args) => |
517 | (Const (x as (s, T)), args) => |
518 let val arg_Ts = binder_types T in |
518 let val arg_Ts = binder_types T in |
519 if length arg_Ts = length args andalso |
519 if length arg_Ts = length args andalso |
520 (is_constr thy x orelse s = @{const_name Pair} orelse |
520 (is_constr thy x orelse s = @{const_name Pair}) andalso |
521 x = (@{const_name Suc}, nat_T --> nat_T)) andalso |
|
522 (not careful orelse not (is_Var t1) orelse |
521 (not careful orelse not (is_Var t1) orelse |
523 String.isPrefix val_var_prefix (fst (fst (dest_Var t1)))) then |
522 String.isPrefix val_var_prefix (fst (fst (dest_Var t1)))) then |
524 discriminate_value hol_ctxt x t1 :: |
523 discriminate_value hol_ctxt x t1 :: |
525 map3 (sel_eq x t1) (index_seq 0 (length args)) arg_Ts args |
524 map3 (sel_eq x t1) (index_seq 0 (length args)) arg_Ts args |
526 |> foldr1 s_conj |
525 |> foldr1 s_conj |