How to construct a logic argument like this one?

I can construct it like this:

Latex of my argument:

```
\documentclass[10pt]{article}
\usepackage{newtxtext}
\usepackage{newtxmath}
\begin{document}
$\begin{array}{rl}
& p \\
& p \to q \\
\cline{2-2}
\therefore & q
\end{array}$
\end{document}
```

There are three things I don't know how to do:

1) how to color the hline

2) how to control the length of the hline so it does not go beyond "p \to q"?

3) how to make the therefore symbol closer to q?

Basically, I need to construct one as close as possible to the first one.

## Best Answer

You can use a simple

`tabular`

and`colortbl`

:You can change the color of the line using

`xcolor`

Same works with arrays also (since the MWE is given using arrays):