Skip to content

Conversation

@jamesmckinna
Copy link
Contributor

Fixes #2842

Issues:

  • lots of knock-on viscosity
  • lots of other occurrences of -dec as a suffix which could/should be changed to ?

Copy link
Member

@gallais gallais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for that. Wondering whether there are a few more opportunities for consistent naming.

... | inj₂ y₁∼x₁ | inj₂ y₂∼x₂ = inj₂ ( y₁∼x₁ , y₂∼x₂)
... | inj₂ y₁∼x₁ | inj₁ x₂∼y₂ = inj₁ (sym₁ y₁∼x₁ , x₂∼y₂)

×-decidable : Decidable R Decidable S Decidable (Pointwise R S)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called pointwise??

Copy link
Contributor Author

@jamesmckinna jamesmckinna Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably! But see above below...


×-decidable : Decidable _≈₁_ Decidable _<₁_ Decidable _<₂_
Decidable _<ₗₑₓ_
×-decidable dec-≈₁ dec-<₁ dec-≤₂ x y =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called <ₗₑₓ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

∷-injective : x ∷ xs ≡ y ∷ ys x ≡ y × xs ≡ ys
∷-injective refl = refl , refl

≡-dec : DecidableEquality A DecidableEquality (Vec A n)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called ≡??

Copy link
Contributor Author

@jamesmckinna jamesmckinna Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. (this one seems especially egregious, given that conventionally, we make the different choice of _≟_ instead... one reason I wanted to leave this alone, until we could agree a/the 'blessed'/'right' name!) #2845


module _ {L : REL A B ℓ₁} {R : REL A B ℓ₂} where

decidable : Decidable L Decidable R Decidable (L ∩ R)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called _∩?_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

@jamesmckinna
Copy link
Contributor Author

jamesmckinna commented Oct 26, 2025

Thank you for that. Wondering whether there are a few more opportunities for consistent naming.

yes, hence the OP reference to "lots of other occurrences of -dec"... but I thought it better to handle those downstream.

I already encountered the need for some careful qualified importing in order to avoid name clashes, and I didn't want to get into deeper rabbit holes by widening the impact of this PR.

But happy to do so if reviewers agree, although Suggest we move such things downstream, as I think/worry it might open many more cans of worms? The ones you identify arise as direct consequences of this PR, but I fear the general pattern (and its violation) may be even more widespread...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use consistent names for Decidable combinators

2 participants