Skip to content

feat(computability): bound complete pair-first parsing - #83

Open
windsornguyen wants to merge 1 commit into
codex/pair-first-parsefrom
codex/pair-first-clock
Open

feat(computability): bound complete pair-first parsing#83
windsornguyen wants to merge 1 commit into
codex/pair-first-parsefrom
codex/pair-first-clock

Conversation

@windsornguyen

Copy link
Copy Markdown
Owner

Explain what this changes, why it is needed, and anything reviewers should
verify. Link an issue when one exists.

What does this change?

Completes the canonical pair parser by proving full witness consumption and decoded-input restoration. It proves parsing takes at most twice the complete pair length, then combines that cost with the source polynomial clock under one explicit full-input composition clock.

The bound charges the ignored witness instead of silently projecting it away. This is stack layer 7 of 8.

How was it tested?

  • lake build --wfail passes
  • lake lint passes
  • No sorry or new axioms, or this PR does not change Lean proofs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b083a4ede

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import ComplexityTheory.Computability.PairFirstComposition.ParseFirst

/-!
# Complete canonical-pair parsing

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cite borrowed transition machinery

The new module proves parser phases using Mathlib's StateTransition.EvalsToInTime/EvalsToInTime.trans, but the module docstring does not record any authors/title/year/version or precise declaration provenance. That violates the repo's source policy and makes the borrowed execution relation impossible to audit from this public module; add the Mathlib citation near the module header before merging.

AGENTS.md reference: AGENTS.md:L42-L44

Useful? React with 👍 / 👎.

variable {function : BitString → Bool}

/-- Witness clearing consumes the complete encoded second component. -/
def evaluatesClearSecond

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Rename proof declarations to snake_case

This public proof declaration, along with the other new evaluates…/…Time… proof names in this patch, is exported in lowerCamelCase, but proof and theorem names in this repo are required to be snake_case. Downstream users will otherwise take dependencies on nonconforming API names that need churn once the convention is enforced, so please rename these declarations before publishing the module.

AGENTS.md reference: AGENTS.md:L67-L67

Useful? React with 👍 / 👎.

import ComplexityTheory.Computability.PairFirstComposition.ParseFirst

/-!
# Complete canonical-pair parsing

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cite borrowed transition machinery

The new module proves parser phases using Mathlib's StateTransition.EvalsToInTime/EvalsToInTime.trans, but the module docstring does not record any authors/title/year/version or precise declaration provenance. That violates the repo's source policy and makes the borrowed execution relation impossible to audit from this public module; add the Mathlib citation near the module header before merging.

Useful? React with 👍 / 👎.

variable {function : BitString → Bool}

/-- Witness clearing consumes the complete encoded second component. -/
def evaluatesClearSecond

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Rename proof declarations to snake_case

This public proof declaration, along with the other new evaluates…/…Time… proof names in this patch, is exported in lowerCamelCase, but proof and theorem names in this repo are required to be snake_case. Downstream users will otherwise take dependencies on nonconforming API names that need churn once the convention is enforced, so please rename these declarations before publishing the module.

Useful? React with 👍 / 👎.

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.

1 participant