vellvm / ctrees

An itree-like data-structure to additionally support internal non-determinism
MIT License
14 stars 3 forks source link

Use the fin from ExtLib #15

Closed elefthei closed 2 years ago

elefthei commented 2 years ago

This is another annoying compatibility thing -- the Fin.t from ExtLib has many useful lemmas like

  Theorem fin_case : forall n (f : fin (S n)),
      f = F1 \/ exists f', f = FS f'.

But if we decide to use it we would have to change fin everywhere.

YaZko commented 2 years ago

By compatibility you just mean that importing Extlib too eagerly can shadow the standard library's Fin that we use?

Independently from that, there are a few options:

That being said, I'm almost certain that we will merge @nchappe 's branch for general indexing of choices sooner or later, in which case fin types will be a lot less present, so I would be in favor of the first bullet unless you're actually feeling like it's painful to work with currently.

elefthei commented 2 years ago

Ah ok these all make a lot of sense. Let's keep the standard library fin then and maybe we'll end up adding a dependency to stdpp in the future.