Requirements for a TM to halt
The first condition makes no sense whatsoever to me, and neither condition is expressed in the most obvious way. I can't imagine why you'd ever want to define halting in that way.

A Turing machine halts exactly when it enters the HALT state.  It's as simple as that.  The only alternative I've ever seen is to have two halting states, corresponding to accepting and rejecting the input. In that case, the machine halts exactly when it enters either one of them.

Your source seems to be adopting a different approach, in which "HALT" is not a state but an action of the machine in the same class as "move the tape head left" or "move the tape head right". That's unusual, but not problematic in its own right. However, neither definition of halting is the one that I would expect.


The second one is the closest: the machine halts if it decides to stay in its current state, leave the current character on the tape and make the HALT action. But this is still strange&nbsp;&ndash; surely the HALT action on its own should halt the machine, regardless of what state the machine moves to and what it writes on its tape at that step? For example, the behaviour of hte machine at the next step would seem to be undefined if $\delta(q,a)=(q',a',\mathrm{HALT})$ and $q'\neq q$ and/or $a'\neq a$.
The first definition is very unnatural. I can see no motivation for saying that the machine halts only if it's in a state where seeing any character whatsoever would cause it to stay in the same state, leave the tape as it is and making the HALT action. In fact, this is basically defining the state to be a halting state in the way that Turing machines are usually defined. If one wanted to go down that route, why not just use the conventional HALT state instead of making HALT an action of the machine?


Note, however, that these definitions of halting, and the standard one, are all equivalent in that they can simulate each other. So, whichever of these definitions you use, the same class of problems can be computed by Turing machines.