Repository: pytorch
Issue: [feature request] Type promotions for Boolean tensors with sub operation + Numpy compatability
Labels: triaged,module: numpy,module: type promotion,module: boolean tensor

## 🚀 Feature
When doing operations involving boolean and non-boolean SCALARS, it would be desirable to have a type promotion for boolean tensors which is consistent with Numpy.

## Motivation

The behavior of PyTorch'es boolean tensors is not consistent with the Numpy's behavior when combining boolean tensors with non-boolean scalars, for example:
```python
In [1]: import torch
                                                                           
In [2]: import numpy as np                                                      
                    
In [3]: t = torch.tensor([True, False], dtype=bool)
                                 
In [4]: n = np.array([True, False], dtype=bool)

In [5]: t / 3                                                            
Out[5]: tensor([0.3333, 0.0000])                            
                                                                                                                                                                            
In [6]: n / 3                                                 
Out[6]: array([0.33333333, 0.        ])
                                                
In [7]: 1 - n
Out[7]: array([0, 1])                                                                                                                                                       

In [8]: 1 - t
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-8-1e9e812038db> in <module>()
----> 1 1 - t                  

/home/nik/git/Quansight/pytorch/torch/_tensor.py in wrapped(*args, **kwargs)
     26             return handle_torch_function(wrapped, args, *args, **kwargs)
     27         try:                                                       
---> 28             return f(*args, **kwargs)
     29         except TypeError:
     30             return NotImplemented
                                                                                                                                                                            
/home/nik/git/Quansight/pytorch/torch/_tensor.py in __rsub__(self, other)
    535         if has_torch_function_variadic(self, other):
    536             return handle_torch_function(Tensor.__rsub__, (self, other), self, other)
--> 537         return _C._VariableFunctions.rsub(self, other)             
    538                                      
    539     @_wrap_type_error_to_not_implemented

RuntimeError: Subtraction, the `-` operator, with a bool tensor is not supported. If you are trying to invert a mask, use the `~` or `logical_not()` operator instead.  
```

Doing something like `1 - x` is a very convenient dtype agnostic way of performing the negation of a tensor `x`.
With the current state of affairs one would need to write a branching code which is `x.dtype`-dependent.

cc @mruberry @rgommers @heitorschueroff @nairbv