src/HOL/Tools/Quotient/quotient_tacs.ML
changeset 52230 1105b3b5aa77
parent 51717 9e7d1c139569
child 54742 7a86358a3c0b
equal deleted inserted replaced
52228:ee8e3eaad24c 52230:1105b3b5aa77
   478         val (ty_c, ty_d) = dest_funT (fastype_of a2)
   478         val (ty_c, ty_d) = dest_funT (fastype_of a2)
   479         val tyinst = map (SOME o (ctyp_of thy)) [ty_a, ty_b, ty_c, ty_d]
   479         val tyinst = map (SOME o (ctyp_of thy)) [ty_a, ty_b, ty_c, ty_d]
   480         val tinst = [NONE, NONE, SOME (cterm_of thy r1), NONE, SOME (cterm_of thy a2)]
   480         val tinst = [NONE, NONE, SOME (cterm_of thy r1), NONE, SOME (cterm_of thy a2)]
   481         val thm1 = Drule.instantiate' tyinst tinst @{thm lambda_prs[THEN eq_reflection]}
   481         val thm1 = Drule.instantiate' tyinst tinst @{thm lambda_prs[THEN eq_reflection]}
   482         val thm2 = solve_quotient_assm ctxt (solve_quotient_assm ctxt thm1)
   482         val thm2 = solve_quotient_assm ctxt (solve_quotient_assm ctxt thm1)
   483         val thm3 = Raw_Simplifier.rewrite_rule @{thms id_apply[THEN eq_reflection]} thm2
   483         val thm3 = rewrite_rule @{thms id_apply[THEN eq_reflection]} thm2
   484         val (insp, inst) =
   484         val (insp, inst) =
   485           if ty_c = ty_d
   485           if ty_c = ty_d
   486           then make_inst_id (term_of (Thm.lhs_of thm3)) (term_of ctrm)
   486           then make_inst_id (term_of (Thm.lhs_of thm3)) (term_of ctrm)
   487           else make_inst (term_of (Thm.lhs_of thm3)) (term_of ctrm)
   487           else make_inst (term_of (Thm.lhs_of thm3)) (term_of ctrm)
   488         val thm4 = Drule.instantiate_normalize ([], [(cterm_of thy insp, cterm_of thy inst)]) thm3
   488         val thm4 = Drule.instantiate_normalize ([], [(cterm_of thy insp, cterm_of thy inst)]) thm3