Skip to content

Conversation

jamesmckinna
Copy link
Contributor

@jamesmckinna jamesmckinna commented Aug 24, 2025

This tackles one version of how to develop 'subsetoid's via PERs. Cf. #2814

Not necessarily the 'right' way to go, but still functionality which may be useful in the future

UPDATED: to live under Relation.Binary.Construct

@jamesmckinna jamesmckinna added the subsets relies on/infleunced by/influences, various approaches to the notion of 'subset(oid)' in type theory label Aug 24, 2025
@@ -45,3 +53,37 @@ partial-reflexiveˡ p ≡.refl = partial-reflˡ p
partial-reflexiveʳ : x ≈ y → y ≡ z → y ≈ z
partial-reflexiveʳ p ≡.refl = partial-reflʳ p

------------------------------------------------------------------------
-- Setoids from partial setoids
Copy link
Contributor

Choose a reason for hiding this comment

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

My instinct would be to put all of these in a (named) module rather than adding more things to the exported namespace of this module. That would also obviate the need for the awkward names with subscripts.

Also: definitely a construction. In fact, why not build the Setoid bundle directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you saying that I 'just' build a value of type Setoid, and not explicitly define all the other fields at top-level?
I'm not quite sure what you mean otherwise, but it would be good to be clear...

Our custom to date seems to be to such structures/bundle explicitly piece-by-piece, but my suggestion in #2391 was that, at least for additional structure, that we could apply a Construct, and then publicly re-open it to expose its subfields. But that's not the same as making a Construct definition from scratch, as here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In any case, will move to Relation.Binary.Construct.SetoidFromPartialSetoid, unless a better name is available/recommended?

Copy link
Contributor Author

@jamesmckinna jamesmckinna Aug 28, 2025

Choose a reason for hiding this comment

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

Or did you mean to build the relevant Function.Bundles object(s) directly from isRelHomomorphism? That's not possible, precisely because the Function hierarchy is based on Setoids as source and target, ... and we only have the former here!

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you saying that I 'just' build a value of type Setoid, and not explicitly define all the other fields at top-level?

Yes. Because the pieces are so trivial.

Having all the pieces exposed in SetoidFromPartialSetoid does make sense. It's just pollution here.

Copy link
Contributor

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

One quibble, but otherwise I like this now.

Carrier = Σ S.Carrier λ x → x S.≈ x

_≈_ : Rel Carrier _
x≈x@(x , _) ≈ y≈y@(y , _) = x S.≈ y
Copy link
Contributor

Choose a reason for hiding this comment

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

x ≈ y = proj₁ x S.≈ proj₁ y

? Or even

_≈_ = S._≈_ on proj₁

I certainly don't like binding names that are not used on the rhs as you do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition subsets relies on/infleunced by/influences, various approaches to the notion of 'subset(oid)' in type theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants