However, a function with type `((True->False) /\ (False->True)) \/

((True->True) /\ (False->False))` can definitively give a result in

`True`. The correct result should be `Bool`.

The proof in Coq of the soundness of this definition given in the appendix of the thesis does not cover this case, as any other case in which functions are typed by unions, since it assumes that the disjunctive normal form of a function type is formed only by intersections of arrows and of negations thereof.

If we change the union at issue into an intersection, it becomes equivalent to our algorithmic definition of *worra* (p13) as it can be verified by a simple application of De Morgan's Laws.

We would be grateful if the reviewer could confirm that we did not misinterpret the definition in the dissertation. If it is so, was the author aware of this problem and does there exist a corrected version of the algorithm to which we could refer in our related work section? Thank you in advance.

A. Kent's approach is based on control flow. As soon as a variable is defined, it computes and remember under which constraints this variable can be in True or ~True (Beppe: isn it rather False and ¬False?). Typecases can only be done on variables (Beppe: really???), and the former information is used to refine the context of the then and else branches. A new idea of A. Kent's thesis compared to previous works on occurence typing is the use of semantic types to store these constraints, and the use of an application inversion function to compute them. We also use these ideas in our paper.

(Beppe: where do we use it other than for False and ¬False?) (Beppe: isint (f x) on ne peut rien apprendre sur x )

...

...

@@ -147,9 +182,12 @@ Similarly the need for an explosion

rule in order to circumvent difficulties in proofs of type soundness

is discussed in [22].

**DONE** we added a long discussion on this point in the related work

**DONE** we added a long discussion on this point, namely how to handle the type preservation property, in the related work

section when comparing with [22] (see lines: ??-??)

More generally, we also went more in depth in the comparaison with the

logical approach by THF, to highlight further limitations of our