Zulip Chat Archive

Stream: Is there code for X?

Topic: A type dependent on a value


Mingli Yuan (Aug 09 2023 at 16:08):

I am a newbie, I had checked the docs and only found this topic was mentioned in https://leanprover.github.io/theorem_proving_in_lean/dependent_type_theory.html#dependent-types , but the vec example seems only for education purpose, so I want to found a working inductive type example like vec which have a type param of size, or something similar.

Eric Wieser (Aug 09 2023 at 16:08):

The vec example is a toy version of docs#Vector

Mingli Yuan (Aug 09 2023 at 16:13):

Aha, just a function, I find it, thanks

Eric Wieser (Aug 09 2023 at 16:15):

docs#Fin is another common one

Mingli Yuan (Aug 09 2023 at 16:18):

My problem at hand is to formalize a path group in some geometry space, but we know the 1 in a group is unique, so I need fix the paths in a group to a base point. So I think I need to create a dependent type to a point. Is my understanding correct? Or any advice?

Jireh Loreaux (Aug 09 2023 at 16:29):

Are you looking for the docs#FundamentalGroupoid ?

Mingli Yuan (Aug 09 2023 at 16:44):

Thanks, Jireh, it is a groupoid, but a little bit strength, for any two point, there is a path connecting them. Its purpose seems not to be the same with fundamental groupoid ...

Jireh Loreaux (Aug 10 2023 at 12:55):

Can you state more precisely what you want? Do you want homotopy classes of paths?


Last updated: Dec 20 2023 at 11:08 UTC