Skip to content

proofs(agda): Compose group in Agda, reconciled (PWG-2i for 12); UsesK pragma fix - #64

Open
hyperpolymath wants to merge 3 commits into
mainfrom
claude/new-session-up7579
Open

hyperpolymath wants to merge 3 commits into
mainfrom
claude/new-session-up7579

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Second group of the Agda port, plus a small fixture fix. They share a PR because this session works on a single branch.

1. UsesK sets --safe in its pragma (9a1feaf)

The mathesis census flags an Agda file without {-# OPTIONS --safe #-} as an estate-policy break (proof-holes.sh). So after #63 the marches row showed policy 1, from tests/reject-agda/UsesK.agda.

  • Its pragma now sets --safe alone, still without --without-K or --cubical-compatible.
  • Under Agda's defaults, which have K, the file is accepted. Checked: exit 0.
  • The gate still refuses it with "because K has been disabled". So it still shows that the gate's command line runs with --without-K.

2. Compose group (2c4f9a2, 9392318)

  • Port: proofs/agda/Marches/Compose.agda ports Marches/Compose.lean.
    • Constructors: Pos, CLabel, Interface, CBetter, Step, Trace.
    • Theorems: ctrans, cirrefl, no-back-cross, no-a-label-in-B, step-worsens, trace-cbe, trace-worsens, wt-cycles-are-empty.
    • Prelude gains ⊥-elim.
  • New fixture: tests/reject-agda/BackCross.agda offers a crossing from B back into A, and it must be refused.
  • Warnings: Agda warns UnsupportedIndexedMatch for ctrans, cirrefl and trace-worsens. The cause is constructor injectivity, which Cubical Agda cannot yet compute along transports. This concerns computation, not the statements. The warnings stay visible, as in januskey, and are recorded as residual R4.
  • Statement comparison: docs/agda-lean-correspondence.adoc gains a Compose section, compared binder by binder.
  • PROOF-STATUS.adoc:
    • the Agda receipt is retaken at 2c4f9a2, inputs-sha256 6e9394f6…6f7d, five files;
    • the lineage: the Kernel-only receipt at 660e1c6 is superseded, and its four files give the same digest 4f589df… on main at 08f6a79 (an echo);
    • the Lean re-check of the eight theorems reports "does not depend on any axioms";
    • census PWG-2i 12 and ungraded 199, of 211.
  • README, ROADMAP and STATE are updated to match.

Evidence (local)

  • scripts/check-agda.sh at 2c4f9a2 ends with [check-agda] OK. Three fixtures are refused for their stated reasons, and the --safe control is refused too.
  • The policy's shell line reproduces the digest.
  • Lean v4.35.0: #print axioms reports none for all eight Compose theorems. Marches/ is unchanged, tree 7ef83e4.

Next

  • After merge: refresh the marches row in mathesis.
  • Then the GaoRexford group. Its Lean leg rests on propext, so PWG-2i there needs that axiom's disposition (c).

🤖 Generated with Claude Code

https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX

The mathesis census reads every Agda file with no `OPTIONS --safe` as an
estate-policy break (proof-holes.sh), so this fixture counted as one. Its
pragma now sets --safe alone. It still leaves out --without-K and
--cubical-compatible, which implies --without-K. Under Agda's defaults,
which have K, the file is accepted, as checked locally with no flags. The
gate's refusal therefore still shows that its own command line runs with
--without-K. The correspondence doc says so. The receipt is unaffected,
because fixtures are not in the input set.

Agda-source session (estate proof policy), Kernel group follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Clarified the Agda settings used in the example and the gate’s command-line context.
  • Tests
    • Updated the test comments to explain which options are enabled and how the gate handles the file.

The UsesK.agda fixture now sets only --safe and documents its default K-enabled settings and gate context. The correspondence documentation reflects this description.

Changes: UsesK fixture settings

Layer / File(s) Summary
Fixture settings and documentation
tests/reject-agda/UsesK.agda, docs/agda-lean-correspondence.adoc
The fixture sets --safe alone. Its comments and the correspondence documentation describe the Agda defaults and the gate’s refusal.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: Minimal · up to 9a1fe

This updates a test fixture and its documentation so the fixture carries the --safe pragma while the gate still rejects it for using K. There is no production impact and the change is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the main change, the Agda Compose group port (PWG-2i for 12), and the UsesK pragma fix. The changeset adds the Compose port, the BackCross fixture, correspondence docs and receipt upda…
Description check Passed The description is specific and related to the changeset. It explains the UsesK pragma change to --safe and its gate behaviour. It also covers the Compose port, the new BackCross fixture, the Agda war…
Full details: Title check

Explanation

The title names the main change, the Agda Compose group port (PWG-2i for 12), and the UsesK pragma fix. The changeset adds the Compose port, the BackCross fixture, correspondence docs and receipt updates, and the UsesK pragma change. The title is long and combines two changes, but it is related to the changeset and does not mislead. The raw summary covers only the docs and UsesK files, so it does not reflect the Compose work described in the description.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains the UsesK pragma change to --safe and its gate behaviour. It also covers the Compose port, the new BackCross fixture, the Agda warnings, the statement comparison doc, PROOF-STATUS receipt updates, and the local evidence. It is detailed and on-topic, so it passes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2b1d31e6-d8cf-4273-bd5d-91aac0d0647e
Commits

Reviewing files that changed from the base of the PR and between 08f6a79 and 9a1feaf.

Files selected for processing: 2

  • docs/agda-lean-correspondence.adoc
  • tests/reject-agda/UsesK.agda

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 7

  • GitHub Check: CodeRabbit
  • GitHub Check: estate / languages
  • GitHub Check: estate / advisory
  • GitHub Check: scan / gitleaks
  • GitHub Check: agda
  • GitHub Check: CodeQL Analysis (actions, none)
  • GitHub Check: semgrep-cloud-platform/scan

proofs/agda/Marches/Compose.agda is the Agda source of
Marches/Compose.lean. It has the same constructors and the same theorems:
- the two-region positions, labels and interface;
- stratified preference (`CBetter`, `ctrans`, `cirrefl`);
- the typed step and trace judgments;
- `no-back-cross` and `no-a-label-in-B`;
- `step-worsens`, `trace-cbe`, `trace-worsens` and `wt-cycles-are-empty`.

Prelude gains `⊥-elim`.

A new fixture, tests/reject-agda/BackCross.agda, offers a crossing from B
back into A, and it must be refused. Agda reports UnsupportedIndexedMatch
warnings for ctrans, cirrefl and trace-worsens. Those concern computation
under Cubical transports, not the statements, so they stay visible, as in
januskey.

Agda-source session (estate proof policy), Compose group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX
coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 16, 2026
@linear-code
linear-code Bot marked this pull request as ready for review November 16, 2026 19:40
docs/agda-lean-correspondence.adoc gains the Compose section. It compares
the eight theorems binder by binder and adds residual R4: Agda's
UnsupportedIndexedMatch warnings concern computation under Cubical
transports, not the statements.

PROOF-STATUS.adoc:

- the Agda receipt is retaken at 2c4f9a2, digest 6e9394f…, with five input
  files;
- the lineage: the Kernel-only receipt at 660e1c6 is superseded, and its
  digest still holds on main at 08f6a79;
- the Lean re-check of Compose reports no axioms;
- the census is PWG-2i 12 and ungraded 199, of 211.

README, ROADMAP and STATE are updated to match.

Agda-source session (estate proof policy), Compose group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTeVWDEJgdYKsUNr4uhnXX
@hyperpolymath hyperpolymath changed the title test(agda): UsesK sets --safe in its pragma, and only --safe proofs(agda): Compose group in Agda, reconciled (PWG-2i for 12); UsesK pragma fix Nov 16, 2026
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 16, 2026 20:40
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.

3 participants