Skip to content

BooleanAlgebraStr now infers the underlying set#1297

Open
Freek98 wants to merge 3 commits into
agda:masterfrom
Freek98:BooleanAlgebra
Open

BooleanAlgebraStr now infers the underlying set#1297
Freek98 wants to merge 3 commits into
agda:masterfrom
Freek98:BooleanAlgebra

Conversation

@Freek98
Copy link
Copy Markdown
Contributor

@Freek98 Freek98 commented Mar 3, 2026

BooleanAlgebraStr was based on a Boolean Ring, which is a tuple consisting of a type and a witness that this type is a Boolean Ring. The problem with this is that instances get difficult to resolve. Now instead, the type (first element of the tuple) is an implicit argument and the structure (second element of the tuple) is explicit, and instances are resolved without hassle.

@Freek98
Copy link
Copy Markdown
Contributor Author

Freek98 commented Mar 25, 2026

@felixwellen is this a standard way to work with such instance resolution in the algebra libraries (Evan advised me to ask you).

@felixwellen
Copy link
Copy Markdown
Collaborator

felixwellen commented Mar 25, 2026

Looks good to me - you might get problems with type inference for homomorphisms (e.g. when you use composition). But you can still fix that later by making an extra record type for homs of boolean rings.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants