Yes, and in general it&#x27;s pretty clear as you&#x27;re doing it that that&#x27;s what&#x27;s happening.  The ML family and Haskell type systems occupy a pretty nice place on the spectrum of expressiveness in that there&#x27;s not much you can add to them without losing the ability to infer unique types.  As long as your types are on the same level of complexity as a Haskell or ML type, you can typically get away with minimal type annotations - a bit more than ML or Haskell would&#x27;ve required, but not a lot more.  When you introduce more complex quantifiers such as the &quot;exists&quot; in these examples, in practice you have to start thinking about &quot;what the compiler knows&quot; and how to help it know the things you want it to.<p>There are some systems such as Coq that use heuristics (and let you write your own new heuristics) to try to automatically find proofs, and interactive sessions in which you guide the system to the proof by suggesting tactics that move hypotheses toward goals or vice versa.  This is one of the major factors that, in common speech, distinguishes between &quot;typed languages&quot; and &quot;proof assistants&quot; which otherwise are basically the same kind of thing.  Even in proof assistants, though, you still need to be quite intentional about what lemmas need to be proven in order to move toward your ultimate goal, and often even in how you phrase your goals in order to improve the chances that the heuristics will find a proof.<p>These are the kinds of things i mean by &quot;helping&quot; the system in my previous comment.  They are very powerful tools if assurance of correctness is a high priority, but definitely not a free lunch.<p>If you&#x27;re ever interested in going down the rabbit hole, there&#x27;s a pretty steep learning curve (though if you&#x27;re comfortable with ML or Haskell you&#x27;re already halfway up it) but an extensive and rewarding landscape of thought at the top.  Unfortunately it&#x27;s more of an academic or self-enrichment discipline than an industrial one these days, but if you look hard enough there are a few jobs where you can make use of these tools.