Zulip Chat Archive

Stream: lean4

Topic: Sigma and Pi types


James Caldwell (Mar 10 2023 at 22:16):

Is there a library I can load to be able to use the standard notations for dependent types?

Σx:τ,px      \Sigma x:\tau, p x\;\;\; and       Πx:τ,px\;\;\; \Pi x:\tau, p x

I get the symbols, Π\Pi and Σ\Sigma but they don't seem to be bound to the corresponding dependent types.

Martin Dvořák (Mar 10 2023 at 22:20):

Unfortunately, the notation seems to have disappeared from Lean:
https://github.com/leanprover/lean4/blob/master/doc/lean3changes.md#dependent-function-types

Henrik Böving (Mar 10 2023 at 22:23):

Only the Pi one, it was replaced in favour of (x : t) -> p x or the forall one. Sigma you can still use

James Caldwell (Mar 10 2023 at 22:31):

OK - I see that x:τ,px\forall x:\tau,p x is equivalent - I can live with that. Looking at Core.lean, it seems like someome could roll their own which is why I asked.

Patrick Massot (Mar 10 2023 at 22:32):

You can definitely define your own notation.

Eric Wieser (Mar 11 2023 at 15:55):

Lean 3 had Σ i : ι, p i and Π i : ι, p i. Lean4 encourages you to write those as (i : ι) × p i and (i : ι) → p i, although for whatever reason only actually removed the pi syntax and left the sigma syntax intact.


Last updated: Dec 20 2023 at 11:08 UTC