'@memberwise SignedInteger' doesn't really mean anything sensible to me. Besides, if there's more than one protocol in the hierarchy that supports memberwise synthesis, how would you opt into some but not all with option 1?
I don't feel a Memberwise protocol or a MemberwiseAdditiveArithmetic protocol is a good solution because a dummy protocol provides no useful requirements (but potentially misleading information) to generic algorithms defined on it. MemberwiseAdditiveArithmetic won't prevent people from providing a custom implementation to make the conformance implementation non-memberwise.
Not currently, although I would like to see final "default" implementations be possible someday. This would allow library authors to define refining protocols with a guarantee that the library-provided implementation is used for types that conform to the more-refined protocol (while still supporting user-defined conformances to the base protocol). I have run into use cases for this feature on a number of occasions.
One thing to keep in mind here is that MemberwiseAdditiveArithmetic fits better with the desired direction to eventually move synthesis out of the compiler and into library code. Using an attribute couples this feature with the compiler in a way that a refining protocol would not.
If you go in the direction of MemberwiseAdditiveArithmetic with final "defaults" this question answers itself.
While moving derived conformances out of the compiler is the direction that most of us want to see, I don't think adding an attribute is at odds with this direction. For example, derivation rules could be defined as a type that can be used as a custom attribute, which will replace any compiler-supported ones.
Maybe this is possible but is a different strategy than I have seen discussed elsewhere is to allow protocol authors to provide protocol-specific default implementations that use some form of metaprogramming.
The approach you're suggesting would be complementary to this by supporting protocol-agnostic deriving behaviors. This is an interesting approach and I'm curious to know if you have any other examples in mind. What other @conformanceDeriver types might there be?
The attribute @memberwise doesn't really do anything either, and seems so niche that it won't find much use except for gating synthesis of AdditiveArithmetic. You could warn about use of MemberwiseAdditiveArithmetic in generic algorithms, suggesting AdditiveArithmetic instead, if this is a big concern. I just don't see how an attribute is justified here, when it seems it will be nearly single-use. Or do you have a few other use cases in mind?
If you do go down the attribute route then I think you should at least pick something more theoretically general, like @deriving or @synthesising, which might see some use in other situations where the compiler synthesis will often be wrong.
One other use case of @memberwise is ElementaryFunctions, which can be derived for product spaces. Similarly, if we add a vector space protocol and/or a ring/field protocol to the standard library someday, they can all be memberwise-derivable.
Field structure is never memberwise-derivable (the memberwise product operation necessarily admits zero divisors, which means you don't have a field). A ring structure is, but it's not the ring structure that you actually want more often than not (e.g. you do not want to have memberwise multiplication for matrices or complex numbers or quaternions or ... ; the memberwise product exists as an operation, but it's not the privileged operation that we normally call "multiplication").
I see. Could you suggest a possible abstraction for generalizing pointwise multiplication and division?
In numeric optimizers, we need many generic math APIs for aggregate arithmetics, elementary functions, and comparison, and they need to be derived for them to be practically usable.