I'm manipulating proofs of coercibility:
data a ~=~ b where
IsCoercible :: Coercible a b => a ~=~ b
infix 0 ~=~
sym :: (a ~=~ b) -> (b ~=~ a)
sym IsCoercible = IsCoercible
instance Category (~=~) where
id = IsCoercible
IsCoercible . IsCoercible = IsCoercible
coerceBy :: a ~=~ b -> a -> b
coerceBy IsCoercible = coerce
I can trivially prove Coercible a b => forall x. Coercible (a x) (b x)
introduce :: (a ~=~ b) -> (forall x. a x ~=~ b x)
introduce IsCoercible = IsCoercible
But not the converse, (forall x. Coercible (a x) (b x)) => Coercible a b) isn't quite as free:
eliminate :: (forall x. a x ~=~ b x) -> (a ~=~ b)
eliminate IsCoercible = IsCoercible
{-
• Could not deduce: Coercible a b
arising from a use of ‘IsCoercible’
from the context: Coercible (a x0) (b x0)
bound by a pattern with constructor:
IsCoercible :: forall k (a :: k) (b :: k).
Coercible a b =>
a ~=~ b,
in an equation for ‘eliminate’
-}
I'm fairly certain my claim is valid (though I'm open to being disproven), but I'm not having any bright ideas as to how to prove it within Haskell short of unsafeCoerce.