From BIP341 this example code shows how you can tweak an x-only pubkey:
def taproot_tweak_pubkey(pubkey, h):
t = int_from_bytes(tagged_hash("TapTweak", pubkey + h))
if t >= SECP256K1_ORDER:
raise ValueError
Q = point_add(lift_x(int_from_bytes(pubkey)), point_mul(G, t))
return 0 if has_even_y(Q) else 1, bytes_from_int(x(Q))
(The function lift_x will returns a point (x, y) with an even y-coordinate.)
My question is: what would happen if you had a secret key that produced a pubkey with an odd y-coordinate, e.g. 03af455f4989d122e9185f8c351dbaecd13adca3eef8a9d38ef8ffed6867e342e3, but then simply ignore the first byte (03) and passed in af455f4989d122e9185f8c351dbaecd13adca3eef8a9d38ef8ffed6867e342e3 to the taproot_tweak_pubkey function and sent funds to the resulting tweaked pubkey?
Would you still be able to spend the output via key path and script path? And if so, how?
And a similar question: what would happen if instead you actually did the point addition using the public key with an odd y-coordinate, e.g.:
Q = point_add(P_with_odd_y, point_mul(G, t))
Would the output still be spendable (from either key path or script path) in this case?