fix(clone): proof * [tag] must not drop untagged axioms - #1098
Open
namasikanam wants to merge 1 commit into
Open
fix(clone): proof * [tag] must not drop untagged axioms#1098namasikanam wants to merge 1 commit into
namasikanam wants to merge 1 commit into
Conversation
`check_evtags` (`ecTheoryReplay.ml`) decided whether an axiom was forced by a bracketed `proof * [tag]` directive by mapping the directive's tag test over the *axiom's own* tag list `src`. For an untagged axiom `src = []`, the test `List.mem true (List.map _ [])` is `false`, so the axiom was silently NOT forced and the correct default `dfl` was never consulted. A clone could then assume an untagged axiom without proof (e.g. instantiate `FinType.enum_spec` falsely and derive `false`). Fold the directive tags starting from the default `dfl`, testing membership of each directive tag in the axiom's `src`. Untagged axioms now fall back to the default (forced); explicit `[-tag]` exclusions still apply to tagged axioms. Regression: tests/clone-proofstar-tagdrop.ec (asserts the bracketed clone that dropped the untagged axiom now fails, via the `fail` idiom). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
namasikanam
force-pushed
the
fix/clone-proofstar-tags
branch
from
August 24, 2026 10:02
36150f0 to
70586cc
Compare
Member
|
I don't understand the problem here: gives: |
Contributor
|
Yeah. This one isn't a soundness issue. I would consider it unexpected that |
Collaborator
Author
|
I'm trying to understand and getting confused. What are the expected behavior of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clone ... proof * [tag].silently drops untagged axioms from the set of obligations itforces, so a cloned theory's untagged axiom can be assumed without proof. This lets a clone
instantiate a false instance of an untagged axiom (e.g.
FinType.enum_spec) and derivefalse.Root cause
check_evtags(src/ecTheoryReplay.ml) decides whether an axiom is forced by mapping thedirective's tag test over the axiom's own tag list
src. For an untagged axiomsrc = [],List.mem true (List.map _ []) = false, so it is never forced — and the correct default(
dfl) is never consulted.Fix (
src/ecTheoryReplay.ml)Rewrite the tag-matching so the directive is folded starting from the default
dfl, testingmembership of each directive tag in the axiom's
src. Untagged axioms now correctly fallback to the default (forced), while explicit
[-tag]exclusions still apply to taggedaxioms.
Test
tests/ko/clone-proofstar-tagdrop.ec(must-fail): aproof * [-dummy]clone that previouslydropped an untagged axiom is now rejected. Contrast: the no-bracket
proof *form alreadyrejected, confirming this was a genuine drop rather than the by-design "clone assumes its
axioms" behaviour.