Is it really best practice to write out fun _ => True
every time one wants an always-true one-place predicate? Shouldn't there be some canonical name? I tried grepping through stdlib and stdpp to no avail.
there's Program.Basics.const
but that's a two-place predicate, right? Or it returns Type
.
it's Definition const {A B} (a : A) := fun _ : B => a.
however it's univ monomorphic so using it everywhere may have "fun" results
ah, that's a bit more than I'd normally bargain for, but thanks.
There is also Ensembles.Full_set
, not that I would recommend using it tho.
mathcomp uses predT
for fun=>true
, we also define a Prop-level PredT
in fcsl-pcm: https://github.com/imdea-software/fcsl-pcm/blob/master/core/pred.v#L84
Last updated: Sep 26 2023 at 11:01 UTC