w b) =>
               Theorem a -> Proof b -> (a -> Term b) -> Proof b
matchMPInst imp ant inst =
  let antT = concl ant in
    case termOfTheorem imp of
      p :=>: q ->
        case match p antT of
          Just insts -> MP (UseTheorem $ instM inst insts imp) ant
          _          -> error "MATCH MP: No match"
      _ -> error "MATCH MP"

-- | matchMP without any instantiation. All theorems and proofs must be drawn from
-- the same alphabet.
matchMP :: (Ord a, Show a) => T
matchMPInst :: (Eq a, Ord b, Show b) =>
               Theorem a -> Proof b -> (a -> Term b) -> Proof b
matchMPInst imp ant inst =
  let antT = concl ant in
    case termOfTheorem imp of
      p :=>: q ->
        case match p antT of
          Just insts -> MP (UseTheorem $ instM inst insts imp) ant
          _          -> error "MATCH MP: No match"
      _ -> error "MATCH MP"

-- | matchMP without any instantiation. All theorems and proofs must be drawn from
-- the same alphabet.
matchMPInst imp ant inst =
  let antT = concl ant in
    case termOfTheorem imp of
      p :=>: q ->
        case match p antT of
          Just insts -> MP (UseTheorem $ instM inst insts imp) ant
          _          -> error "MATCH MP: No match"
      _ -> error "MATCH MP"

-- | matchMP without any instantiation. All theorems and proofs must be drawn from
-- the same alphabet.