Skip to content

Clean up APIs for terminal and initial objects#647

Open
TOTBWF wants to merge 6 commits into
mainfrom
terminal-initial-cleanup
Open

Clean up APIs for terminal and initial objects#647
TOTBWF wants to merge 6 commits into
mainfrom
terminal-initial-cleanup

Conversation

@TOTBWF

@TOTBWF TOTBWF commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Previously, we defined initial and terminal objects directly via contractibility. This led to some really baroque goals, as things like term.! unfolded to term _ . centre. This PR defines is-initial and is-terminal records, and ports over all code to use the new records. I've also take the opportunity to sprinkle around some INLINE pragrams on helper functions that create initial/terminal objects.

On a whole, the code looks a lot clearer, though there are some places where things get a bit uglier.

TOTBWF added 3 commits July 8, 2026 14:39
@TOTBWF
TOTBWF requested review from ncfavier and plt-amy July 8, 2026 21:05
@TOTBWF
TOTBWF force-pushed the terminal-initial-cleanup branch from 0229880 to b59c351 Compare July 8, 2026 21:10
@Lavenza

Lavenza commented Jul 8, 2026

Copy link
Copy Markdown
Member

Comment thread src/Algebra/Ring/Solver.agda
Comment thread src/Cat/Diagram/Duals.lagda.md
Comment thread src/Cat/Diagram/Duals.lagda.md
Comment thread src/Cat/Diagram/Duals.lagda.md
Comment thread src/Cat/Diagram/Duals.lagda.md
Comment on lines +77 to +80
Extensional-Initial
: ∀ {ℓr}
→ ⦃ sa : Extensional Ob ℓr ⦄
→ Extensional (Initial C) ℓr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this ever actually used?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We use it to prove ⊥-is-prop later down in this file.

@plt-amy plt-amy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

blank lines around code blocks

Comment thread src/Cat/Diagram/Terminal.lagda.md
Comment thread src/Cat/Diagram/Terminal.lagda.md
plt-amy added a commit that referenced this pull request Jul 17, 2026
plt-amy added a commit that referenced this pull request Jul 17, 2026
@plt-amy plt-amy mentioned this pull request Jul 17, 2026
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.

4 participants