src/HOL/Decision_Procs/Commutative_Ring.thy
changeset 67649 1e1782c1aedf
parent 67341 df79ef3b3a41
child 69597 ff784d5a5bfb
equal deleted inserted replaced
67648:f6e351043014 67649:1e1782c1aedf
   735 
   735 
   736 fun get_ring_simps ctxt optcT t =
   736 fun get_ring_simps ctxt optcT t =
   737   (case get_matching_rules ctxt (Ring_Simps.get (Context.Proof ctxt)) t of
   737   (case get_matching_rules ctxt (Ring_Simps.get (Context.Proof ctxt)) t of
   738      SOME (ths1, ths2, ths3, ths4, th5, th) =>
   738      SOME (ths1, ths2, ths3, ths4, th5, th) =>
   739        let val tr =
   739        let val tr =
   740          Thm.transfer (Proof_Context.theory_of ctxt) #>
   740          Thm.transfer' ctxt #>
   741          (case optcT of NONE => I | SOME cT => inst [cT] [] #> norm)
   741          (case optcT of NONE => I | SOME cT => inst [cT] [] #> norm)
   742        in (map tr ths1, map tr ths2, map tr ths3, map tr ths4, tr th5, tr th) end
   742        in (map tr ths1, map tr ths2, map tr ths3, map tr ths4, tr th5, tr th) end
   743    | NONE => error "get_ring_simps: lookup failed");
   743    | NONE => error "get_ring_simps: lookup failed");
   744 
   744 
   745 fun ring_struct (Const (@{const_name Ring.ring.add}, _) $ R $ _ $ _) = SOME R
   745 fun ring_struct (Const (@{const_name Ring.ring.add}, _) $ R $ _ $ _) = SOME R