Martin Escardo, 24-25 June 2026. This file answers a question posed in Various.LawvereFPT by myself on 12th October 2018, specifically in the module generalized-Coquand, regarding whether a certain diagonalization construction could be replaced by a second application of Lawvere's fixed point theorem. The answer is that no, not directly. However, we can generalize Lawvere's FPT as follows. In the above file, we defined lfix : {A : π€ Μ } {X : π₯ Μ } β (A β (A β X)) β ((A β X) β A) β (X β X) β X lfix r s f = r (s (Ξ» a β f (r a a))) (s (Ξ» a β f (r a a))) and then proved various fixed point properties, including lfix-is-fixed-point : {A : π€ Μ } {X : π₯ Μ } (r : A β (A β X)) β (s : (A β X) β A) β s is-sectionΒ·-of r β (f : X β X) β lfix r s f οΌ f (lfix r s f) and LFPT : {A : π€ Μ } {X : π₯ Μ } (Ο : A β (A β X)) β is-surjection Ο β (f : X β X) β β x κ X , x οΌ f x Here we generalize both, by replacing the identity type former _οΌ_ by any binary relation _β_ whatsoever, and by replacing the notions of section and of surjection accordingly. We apply the former to get a simplified version of the module generalized-Coquand, whose conclusions include Lemmaβ : Β¬ (Ξ£ U κ π€ Μ , retract π€ Μ of U) corollary : β π€ β Β¬ (retract π€ βΊ Μ of (π€ Μ )) Theorem : Β¬ (Ξ£ U κ π€ Μ , π€ Μ β U) Corollary : Β¬ (π€ βΊ Μ β π€ Μ ) At the moment we don't have any application of the second generalization. We work in a Martin-LΓΆf type theory with no HoTT/UF axioms other than propositional truncation, which isn't needed for the main theorem, but only for the second version of the fixed point theorem. James E Hanson came up with essentially the second generalization on 11 May 2026, before us, called (ββ) in his post https://mathoverflow.net/a/511183 (ββ) For any f:AΓAβB, g:BβB, and binary relation RβBΒ², if there is an a such that g(f(x,x)) R f(a,x) for all xβA, then g(f(a,a)) R f(a,a). Communicated by him to me on 26th June after I publicly distributed this file: https://mathstodon.xyz/deck/@jameshanson/116816664171797522 \begin{code} {-# OPTIONS --safe --without-K #-} module Various.LawvereFPT-Generalized where open import MLTT.Spartan open import Various.LawvereFPT \end{code} We now develop the first generalization, where the assumptions are given in two nested anonymous submodules. \begin{code} module _ {π€ π₯ π¦ : Universe} (A : π€ Μ ) (X : π₯ Μ ) (_β_ : X β X β π¦ Μ ) where private π : π€ β π₯ Μ π = (A β X) β (A β X) \end{code} We define (double) pointwise relationship as follows. \begin{code} _βΜ_ : π β π β π€ β π₯ β π¦ Μ Ο βΜ Ο = (g : A β X) (a : A) β Ο g a β Ο g a module _ (r : A β (A β X)) (s : (A β X) β A) (rs : (r β s) βΜ id) where \end{code} Notice that the proof of the following is the same as the original proof of the particular case lfix-is-fixed-point, with _οΌ_ replaced by _β_. \begin{code} lfix-is-relational-fixed-point : (f : X β X) β lfix r s f β f (lfix r s f) lfix-is-relational-fixed-point f = e where g : A β X g a = f (r a a) e : lfix r s f β f (lfix r s f) e = rs g (s g) relational-LFPT : (f : X β X) β Ξ£ x κ X , x β f x relational-LFPT f = lfix r s f , lfix-is-relational-fixed-point f \end{code} The above generalizes the original theorem in the strong sense that its proof is definitionally equal when _β_ is taken to be the identity type: \begin{code} private open retract-version sanity-check : {A : π€ Μ } {X : π₯ Μ } β lfix-is-fixed-point οΌ lfix-is-relational-fixed-point A X _οΌ_ sanity-check = by-construction \end{code} For the module generalized-Coquand-streamlined below, we use the following particular case, where B β C is taken to be "C is a retract of B". \begin{code} open import UF.Retracts LFPT-with-retract-relation : {A : π€ Μ } (r : A β (A β π₯ Μ )) (s : (A β π₯ Μ ) β A) β ((g : A β π₯ Μ ) (a : A) β retract g a of (r β s) g a) β (f : π₯ Μ β π₯ Μ ) β Ξ£ B κ π₯ Μ , retract f B of B LFPT-with-retract-relation {π€} {π₯} {A} = relational-LFPT A (π₯ Μ ) (Ξ» (B C : π₯ Μ ) β retract C of B) \end{code} We now develop the second generalization. In order the have the existential quantifier available, we need to assume the existence of propositional truncations. \begin{code} open import UF.PropTrunc module _ (pt : propositional-truncations-exist) where open PropositionalTruncation pt module _ {π€ π₯ π¦ : Universe} (A : π€ Μ ) (X : π₯ Μ ) (_β_ : X β X β π¦ Μ ) where \end{code} We define (single) pointwise equality as follows. \begin{code} private _βΜ_ : (A β X) β (A β X) β π€ β π¦ Μ Ο βΜ Ο = (a : A) β Ο a β Ο a module _ (Ο : A β (A β X)) (s : (g : A β X) β β a κ A , Ο a βΜ g) where relational-surjection-LFPT : (f : X β X) β β x κ X , x β f x relational-surjection-LFPT f = II where g : A β X g a = f (Ο a a) I : (Ξ£ a κ A , Ο a βΜ g) β Ξ£ x κ X , x β f x I (a , q) = Ο a a , q a II : β x κ X , x β f x II = β₯β₯-functor I (s g) \end{code} Again, the proof is literally the same as the original one with the identity type _οΌ_ in place of the arbitrary relation _β_. As discussed above, we don't yet have any application of the second generalization. We conclude with an application of the first, which was its original motivation. The argument assumes W types in our type theory. \begin{code} module generalized-Coquand-streamlined where open import W.Type open import UF.Base open import UF.Equiv \end{code} We begin by showing that certain assumptions are together impossible, by using two applications of the fixed point theorem, where the first one is the generalization and the second one is the original (to show that no type is logically equivalent to its own negation). \begin{code} Lemmaβ : (U : π€ Μ ) (R : U β π€ Μ ) (S : π€ Μ β U) (Ο : (X : π€ Μ ) β R (S X) β X) (Ο : (X : π€ Μ ) β X β R (S X)) (ΟΟ : (X : π€ Μ ) β Ο X β Ο X βΌ id) β π Lemmaβ {π€} U R S Ο Ο ΟΟ = III where A : π€ Μ A = W U R \end{code} Thus, an element of the type A is of the form ssup u Ο with u : U and Ο : R u β A. \begin{code} r : A β (A β π€ Μ ) r (ssup u Ο) = fiber Ο \end{code} Notice that, by definition, fiber Ο a = Ξ£ x κ R u , Ο x οΌ a. For g : A β π€, we have that the type Ξ£ a κ A , g a (abbreviated Ξ£ g) lives in π€, and hence we can apply S to get a point of the type U. We have that Ο (Ξ£ g) : R (S (Ξ£ g)) β Ξ£ g, and so post-composition with the first projection gives a function R (S (Ξ£ g)) β A \begin{code} s : (A β π€ Μ ) β A s g = ssup (S (Ξ£ g)) (prβ β Ο (Ξ£ g)) rs : (g : A β π€ Μ ) (a : A) β retract g a of r (s g) a rs g a = π» , πΌ , π»πΌ where π» : r (s g) a β g a π» (u , e) = transport g e (prβ (Ο (Ξ£ g) u)) πΌ : g a β r (s g) a πΌ y = Ο (Ξ£ g) (a , y) , ap prβ (ΟΟ (Ξ£ g) (a , y)) π»πΌ : (y : g a) β π» (πΌ y) οΌ y π»πΌ y = π» (πΌ y) οΌβ¨reflβ© transport g (ap prβ (ΟΟ (Ξ£ g) ay)) (prβ (Ο (Ξ£ g) (Ο (Ξ£ g) ay))) οΌβ¨ i β© transport (g β prβ) (ΟΟ (Ξ£ g) ay) (prβ (Ο (Ξ£ g) (Ο (Ξ£ g) ay))) οΌβ¨ ii β© prβ ay οΌβ¨reflβ© y β where ay : Ξ£ g ay = (a , y) i = (transport-ap g prβ (ΟΟ (Ξ£ g) ay))β»ΒΉ ii = apd prβ (ΟΟ (Ξ£ g) ay) I : Ξ£ B κ π€ Μ , retract Β¬ B of B I = LFPT-with-retract-relation r s rs Β¬_ II : Β¬ (Ξ£ B κ π€ Μ , retract Β¬ B of B) II (B , (f , g , _)) = not-equivalent-to-own-negation'' (f , g) III : π III = II I Lemmaβ : (U : π€ Μ ) (R : U β π€ Μ ) (S : π€ Μ β U) β Β¬ ((X : π€ Μ ) β retract X of R (S X)) Lemmaβ U R S Ο = Lemmaβ U R S (Ξ» X β retraction (Ο X)) (Ξ» X β section (Ο X)) (Ξ» X β retract-condition (Ο X)) Lemmaβ : (U : π€ Μ ) (R : U β π€ Μ ) (S : π€ Μ β U) β Β¬ ((X : π€ Μ ) β R (S X) β X) Lemmaβ U R S e = Lemmaβ U R S (Ξ» X β β-gives-β· (e X)) Lemmaβ : (U : π€ Μ ) (R : U β π€ Μ ) (S : π€ Μ β U) β Β¬ ((X : π€ Μ ) β R (S X) οΌ X) Lemmaβ U R S p = Lemmaβ U R S (Ξ» X β idtoeq (R (S X)) X (p X)) Lemmaβ : Β¬ (Ξ£ U κ π€ Μ , retract π€ Μ of U) Lemmaβ (U , R , S , RS) = Lemmaβ U R S RS corollary : β π€ β Β¬ (retract (π€ βΊ Μ ) of (π€ Μ )) corollary π€ Ο = Lemmaβ ((π€ Μ ) , Ο) Theorem : Β¬ (Ξ£ U κ π€ Μ , π€ Μ β U) Theorem (U , e) = Lemmaβ (U , β-gives-β e) Corollary : Β¬ (π€ βΊ Μ β π€ Μ ) Corollary {π€} e = Theorem ((π€ Μ ) , e) \end{code} A variation of this argument was used originally by Coquand to show that type theory with a judgment Type:Type is inconsistent [1]. This corresponds to the above theorem, which says that no type in a type a universe is equivalent to the universe. We originally developed this modification on 12 October 2018 in the file Various.LawvereFPT. [1] Thierry Coquand, The paradox of trees in type theory BIT Numerical Mathematics, March 1992, Volume 32, Issue , pp 10β14 https://pdfs.semanticscholar.org/f2f3/30b27f1d7ca99c2550f96581a4400c209ef8.pdf