equal
deleted
inserted
replaced
432 |
432 |
433 fun prove_case_congs new_type_names case_names descr nchotomys case_thms thy = |
433 fun prove_case_congs new_type_names case_names descr nchotomys case_thms thy = |
434 let |
434 let |
435 fun prove_case_cong ((t, nchotomy), case_rewrites) = |
435 fun prove_case_cong ((t, nchotomy), case_rewrites) = |
436 let |
436 let |
437 val Const ("==>", _) $ tm $ _ = t; |
437 val Const (@{const_name Pure.imp}, _) $ tm $ _ = t; |
438 val Const (@{const_name Trueprop}, _) $ (Const (@{const_name HOL.eq}, _) $ _ $ Ma) = tm; |
438 val Const (@{const_name Trueprop}, _) $ (Const (@{const_name HOL.eq}, _) $ _ $ Ma) = tm; |
439 val cert = cterm_of thy; |
439 val cert = cterm_of thy; |
440 val nchotomy' = nchotomy RS spec; |
440 val nchotomy' = nchotomy RS spec; |
441 val [v] = Term.add_vars (concl_of nchotomy') []; |
441 val [v] = Term.add_vars (concl_of nchotomy') []; |
442 val nchotomy'' = cterm_instantiate [(cert (Var v), cert Ma)] nchotomy'; |
442 val nchotomy'' = cterm_instantiate [(cert (Var v), cert Ma)] nchotomy'; |