You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The product instance requires [Fintype α] [Fintype β] [Inhabited α] [Inhabited β], but they don't seem to be needed anymore:
Fintype only fed the original cardinality-based probOutput_selectElem_eq proof (via probOutput_uniformSample, [Fintype]). A Fintype-free proof exists using probOutput_seq_map_prod_mk_eq_mul + the class's own probOutput_selectElem_eq per component.
The class itself doesn't seem to need Fintype (its docstring seems to say so). The constraints just block SampleableType (α × β) for abstract SampleableType carriers with no Fintype.
We could relax to [SampleableType α] [SampleableType β] only (same selectElem), and optionally add uniformSample_prod_eq_bind : $ᵗ(α×β) = do a ← $ᵗα; b ← $ᵗβ; pure (a,b).
The cost is that PRGfromPRF.lean declares [Fintype S/O] [Inhabited S/O] as section vars used only to synthesize SampleableType (S × O); relaxing makes them unused on some decls, tripping the unused-Fintype linter. So it needs a targeted signature cleanup there (~20 hyps, some public).
Would a PR dropping the constraints be of interest?
The product instance requires
[Fintype α] [Fintype β] [Inhabited α] [Inhabited β], but they don't seem to be needed anymore:Fintypeonly fed the original cardinality-basedprobOutput_selectElem_eqproof (viaprobOutput_uniformSample,[Fintype]). AFintype-free proof exists usingprobOutput_seq_map_prod_mk_eq_mul+ the class's ownprobOutput_selectElem_eqper component.Inhabitedfed the oldprobFailure_selectElemfield, deleted in chore: update to 4.27 #97.The class itself doesn't seem to need
Fintype(its docstring seems to say so). The constraints just blockSampleableType (α × β)for abstractSampleableTypecarriers with noFintype.We could relax to
[SampleableType α] [SampleableType β]only (sameselectElem), and optionally adduniformSample_prod_eq_bind : $ᵗ(α×β) = do a ← $ᵗα; b ← $ᵗβ; pure (a,b).The cost is that
PRGfromPRF.leandeclares[Fintype S/O] [Inhabited S/O]as section vars used only to synthesizeSampleableType (S × O); relaxing makes them unused on some decls, tripping the unused-Fintypelinter. So it needs a targeted signature cleanup there (~20 hyps, some public).Would a PR dropping the constraints be of interest?