Zulip Chat Archive

Stream: general

Topic: Definitional equality in a Prop?


Arnoud van der Leer (Apr 27 2024 at 15:32):

I have been trying to port some code about presheafed spaces from mathlib4 to UniMath (a univalent foundations library, written in coq). However, I had a bit of trouble doing that. There even are some proof statements that do not typecheck when ported to UniMath. When searching for the root cause for this, I started suspecting that elements of a Prop are definitionally equal. For example, in Lean this seems to work:

theorem map_along_id
  (U : (Opens β))
  : U = (comap (ContinuousMap.id β)) U := by
    rfl

Whereas in UniMath / coq its equivalent would give a "cannot unify U with (comap (ContinuousMap.id β)) U" error.

Is this indeed true? Are all elements of a Prop definitionally equal in Lean? I.e., if we have some type T=x:XPxT = \sum_{x : X} P x with P:PropP : Prop, and we have a dependent type A:TTypeA: T \to Type, is it then true that if we have x:Xx: X and p,q:Pxp, q: P x and a:A(x,p)a: A (x, p), we also have a:A(x,q)a: A(x, q)? Does this not lead to problems?

Sébastien Gouëzel (Apr 27 2024 at 15:37):

Yes, it's true in Lean's type theory. It's called proof irrelevance. No, it doesn't create problems.

Sébastien Gouëzel (Apr 27 2024 at 15:38):

See SProp in Coq/Rocq.

Arnoud van der Leer (Apr 27 2024 at 15:38):

Ah, thanks :-)
I always thought proof irrelevance was an axiom, but in Lean, it is builtin.

Arnoud van der Leer (Apr 27 2024 at 15:39):

And thanks, I'll take a look at SProp


Last updated: May 02 2025 at 03:31 UTC