Zulip Chat Archive

Stream: general

Topic: PSigma


Kind Bubble (Jan 05 2023 at 17:00):

Does anyone know how to set up list notation for PSigma.mk? This gives me errors:

def a : Σ'(x : Unit),Unit  := (Unit.unit, Unit.unit)

I want to be able to make something like this too:

def b : Σ'(x : Unit ),Σ'(x : Unit ),Σ'(x : Unit ),Unit := (Unit.unit, Unit.unit, Unit.unit, Unit.unit)

Floris van Doorn (Jan 05 2023 at 17:07):

Lean already supports this out of the box, with different brackets:

def a : Σ'(x : Unit),Unit  := Unit.unit, Unit.unit
def b : Σ'(x : Unit ),Σ'(x : Unit ),Σ'(x : Unit ),Unit := Unit.unit, Unit.unit, Unit.unit, Unit.unit

Floris van Doorn (Jan 05 2023 at 17:08):

this called is the anonymous constructor notation, if you want to search for it.

Eric Wieser (Jan 06 2023 at 02:13):

Are you aware you only need to write the sigma once?

def b : Σ'(x : Unit) (x : Unit) (x : Unit), Unit :=

Gabriel Ebner (Jan 06 2023 at 02:17):

Are you aware you don't need to write the sigma at all?

def b : (x : Unit) ×' (x : Unit) ×' (x : Unit) ×' Unit :=
  ⟨(), (), (), ()⟩

Last updated: Dec 20 2023 at 11:08 UTC