Zulip Chat Archive

Stream: general

Topic: fin_arrow vs fin_pi


Yaël Dillies (Apr 12 2022 at 15:06):

Aren't docs#encodable.fin_arrow and docs#encodable.fin_pi creating a (not even propeq) diamond?

Yaël Dillies (Apr 12 2022 at 15:15):

Also, can't both be generalized by

instance pi.encodable (ι : Type*) (π : ι  Type*) [decidable_eq ι] [fintype ι] [encodable ι]
  [Π i, encodable (π i)] : encodable (Π i, π i) := sorry

Alex J. Best (Apr 12 2022 at 15:18):

Thats docs#fintype_pi . You need to pick some order on iota right? So if you want a computable instance you have to stick to fin, unless there is some succ_order generalization?

Yaël Dillies (Apr 12 2022 at 15:19):

Read carefully. I added [encodable ι].

Reid Barton (Apr 12 2022 at 15:19):

A finite encodable type has an ordering that can be used for this purpose

Yaël Dillies (Apr 12 2022 at 15:20):

and you get the current instances out of mine using docs#encodable.trunc_encodable_of_fintype

Eric Wieser (Apr 12 2022 at 16:21):

Having just read your PR that adds docstrings and renames, your generalization looks like a good one to me

Yaël Dillies (Apr 12 2022 at 16:23):

Okay I will try it then :smiling_face:


Last updated: Dec 20 2023 at 11:08 UTC