Skip to content

Proof forms: discharge a conditional lemma from a hypothesis of the statement #291

Open

Description

@afflom

Problem

A language-1.2 theorem of the form P x → (f x = 0 ↔ Q x) cannot be proved from lemmas that each hold under the hypothesis P x. None of the closed proof forms can use a hypothesis of the statement to discharge a lemma's condition.

UOR-Foundation/mcp#24 met this while proving its UTF-8 validator against Table 3-7 of the Unicode Standard. For each lead-byte class (E0, E1..EC, ED, EE..EF, F0, F1..F3, F4) it proves universally:

  • a step lemma, for every lead byte of the class and any tail;
  • the scan of a complete sequence, as a nested conditional of the row's bounds;
  • for all bounds, that the conditional is 0 exactly when every range flag holds.

The composed statement for a variable lead byte of a class is "the scan is 0 exactly when the flags hold". It needs the step lemma's class hypothesis discharged from the theorem's own hypothesis. Per MCP#24's findings:

  • apply is a single exact.
  • linear_arithmetic only unfolds definitions, and its definition list admits only function definitions.
  • simplify has no hypothesis with which to discharge a conditional rule.

So each class carries the pair of theorems instead of the one statement. Nothing is wrong, but the statement a reader wants is missing.

Item

A closed proof form, or a step of simplify, that rewrites with a conditional lemma and discharges its condition from a named hypothesis of the theorem. The hypothesis is bound by the statement's →, as nested_induction binds its induction hypotheses (#278). The set of rules stays fixed by the source, so the form stays closed.

Accepted when

  • A theorem P x → (f x = 0 ↔ Q x), composed from a lemma conditional on P x, verifies with an exact axiom policy.
  • A variant whose hypothesis does not imply the lemma's condition is refused with a registered diagnostic.
  • A register row, a scenario and plants cover the form (R3, R5).

#249 records that the proof language is closed on the v0.4 line, so this is for the 0.5.0 line.

Needed by UOR-Foundation/mcp#18 (the UTF-8 refusal statement in its acceptance criteria).


Generated by Claude Code

Activity

  1. humuhumu33 commented on Oct 23, 2026

    @humuhumu33
    Contributor

    Taking this; targeting release/v0.5; say if you want another line.

  2. added 3 commits that reference this issue on Oct 23, 2026
  3. humuhumu33 commented on Oct 23, 2026

    @humuhumu33
    Contributor

    Draft PR #303 against release/v0.5: simplify gains hypotheses, names for the leading premises of its statement, introduced and put first in its closed simp only set (row PF-25). The issue's shape (a lead-byte class of Table 3-7, P x → (scan = 0 ↔ flags) from a lemma conditional on P x) verifies with an exact policy, and a hypothesis that does not imply the condition is refused with LLV7002. It moves the language-1.2 compiler-semantics ID; the records are regenerated in the PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions