I agree y+1 should be caught as an error somewhere, but I disagree where. That was the point I was making.

It is arguably better to catch it during a type checking phase rather than embedding types into the syntax phase. This will be more flexible: low level syntax should be rigid, while types should be extensible (e.g., suppose y+1 for a particular type y evaluated to a boolean in the future; we don't want to have to change the syntax of datalog expressions to support this).