leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: new members

Topic: Has type


Daniel Dávalos (Dec 05 2023 at 14:59):

How can I define if an element has a type α\alphaα or β\betaβ?
I want to write something this

def preset {\alpha : Type} {\beta : Type} {\gamma : Type} (t : ? ) : Set \gamma :=
   if (t : \alpha)? then do_something t else do_else t

Martin Dvořák (Dec 05 2023 at 14:59):

docs#Sum


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll