Q:

Replacing gamma at half integers by double factorial

It is well-known that for any positive integer $n$ the equality $\Gamma(n+\frac12)=\sqrt\pi\,(2n-1)!!/2^n$ holds, where $!!$ stands for the double factorial. I am using FullSimplify[expr,Assumptions -> n \[Element] Integers] on certain expression expr, and the output contains $\Gamma(-\frac12+n)/\sqrt\pi$.
My question is: how can I instruct Mathematica to perform the simplification "$\Gamma(n+\frac12)=\sqrt\pi\,(2n-1)!!/2^n$ whenever $n$ is a positive integer" ? Of course, I want an answer no limited to this specific situation. 
Edit: What I want is to "add" the simplification rule above to the list of simplifications included in FullSimplify, not merely "replace" the "string" $\Gamma(\cdots)$ by $\cdots !!/\cdots$.

A:

You could use a function to do this expansion for you:
ClearAll[gammaExpand]
gammaExpand[e_] := e /. (Gamma[n_ + 1/2 /; FullSimplify[n ∈ Integers && n > 0]] :> 
                         Sqrt[π] (2 n - 1)!!/2^n)

The FullSimplify in the definition takes care of picking up any assumptions placed in surrounding Assumptions blocks or assignments to $Assumptions.
expr = Sin[Log[Gamma[1/2 + n]]];

This doesn't expand (as it should):
gammaExpand@expr

Sin[Log[Gamma[1/2 + n]]]

This does:
Assuming[n ∈ Integers && n > 0, gammaExpand@expr]

Sin[Log[2^-n Sqrt[π] (-1 + 2 n)!!]]

It would be nice if you could build this rule into FullSimplify itself. It has the option TransformationFunctions for that. However, there is a reason that this doesn't work:
FullSimplify[expr, 
            Assumptions -> n ∈ Integers && n > 0, 
            TransformationFunctions -> {Automatic, gammaExpand}
]

Sin[Log[Gamma[1/2 + n]]]

The reason is that the resulting expression is simply more complex than the original, so FullSimplify doesn't have an incentive to perform this step. In fact, whenever it sees anything like the expanded form it will try to reduce it:
FullSimplify[2^-n Sqrt[π] (-1 + 2 n)!!,
             Assumptions -> n ∈ Integers && n > 0]

Gamma[1/2 + n]

You could try to come up with a modified version of the default ComplexityFunction but that would probably be too much hassle for this simple goal. Easier would be to forbid the reducing transformation using ExcludedForms:
Assuming[n ∈ Integers && n > 0, 
   FullSimplify[expr // gammaExpand, 
                ExcludedForms -> {Sqrt[π] (2 n_ - 1)!!/2^n_}
   ]
]

Sin[Log[2^-n Sqrt[π] (-1 + 2 n)!!]]

