I don't follow either as a deduction step. Neither of the first two strings are wfs.
In both cases you have for left parenthesis and three right parenthesis. All wfs have the same number of left parenthesis and right parenthesis.
You also asked specifically:
Is it correct in the framework of deduction in an axiomatic system in propositional logic?
The answer is no, given that you mean Mendelson's "L" or any system which uses a similar definition of proof. Mendelson's L system is very clear in two respects.
- Every step of a proof for system L has to be a wf. Thus, there is NOT a single proof in Mendelson's book in L (or any other system for that matter), despite his repeated assertions, including his argument for 1.8, since not every step is a wf.
- Every wf in a proof has to be an axiom/instance of an axiom schema or an application of modus ponens applied to axioms or previously proved wfs. Thus, using something ¬¬γ⊢γ is not legal in L. It's neither an axiom, nor does it consist of an application of modus ponens. So, using it is not legal. This also entails that Mendelson's repeated use of 'corollaries' and 'deduction theorem', both of which consist of meta-theorems, are not legal.
However, I do NOT blame you for making this mistake. I blame Mendelson. He has a clear definition of a proof, but refuses to stick to that definition of a proof for a single moment in the text. He doesn't make it clear at all that he is using meta-language techniques and meta-proofs of strings at best. Instead, he jumps all around to meta-theorems and using meta-theroems and then pulls the wool over beginner's eyes leading them to believe that he has 'proved' things, when his own definition clearly indicates he hasn't proved anything at all in the strict sense he uses the term in multiple ways. Thus, that you aren't clear here I feel has more to do with Mendelson than you.