Skip to content

refactor: remove 20 unused Prop typeclass hypotheses across 19 theorems - #1509

Queued
DanielSwift1992 wants to merge 5 commits into
strata-org:mainfrom
DanielSwift1992:weaken/unused-typeclass-hypotheses
Queued

DanielSwift1992 wants to merge 5 commits into
strata-org:mainfrom
DanielSwift1992:weaken/unused-typeclass-hypotheses

Conversation

@DanielSwift1992

Copy link
Copy Markdown

Removes 20 unused Prop-typed typeclass binders ([LawfulMonad], [LawfulBEq], [LawfulHashable], [LawfulHasIdent], [LawfulHasVal], [LawfulHasFvar]) across 19 theorems (11 public, 8 private) in 12 files, weakening theorem preconditions. None of the modified files touch the directories listed for the upcoming repository split.

Public theorems (11)

  • Core.core_runInterp_sound, Core.runCoreInterpCFG_soundE ([LawfulMonad])
  • Imperative.StructuredToUnstructured.cfgInitEnvWF ([LawfulHasIdent])
  • Imperative.stepBaseCmdStore_init_det, Imperative.stepBaseCmdStore_set_det ([LawfulMonad])
  • Imperative.eval_fvarExpr_of_value, Imperative.eval_rename_seam ([LawfulHasFvar])
  • Lambda.LExpr.varClose_of_varOpen, Lambda.LExpr.varOpen_varClose_when_lcAt ([LawfulBEq])
  • Strata.Util.HMap.mem_values_iff_find?, Strata.Util.HMap.find?_mapValues ([LawfulHashable])

Private helper lemmas (8)

  • callStepKleeneCmd_sound (Strata/DL/Imperative/InterpreterKleeneSound.lean), skip_assert_event_true (Strata/Transform/DetToKleeneCorrect.lean), all_target_true (Strata/Transform/NondetElimProps.lean), flushGotoSim and flushCmds_analyses (Strata/Transform/StructuredToUnstructuredCorrect.lean), drun_agr and drunS_agr (Strata/Transform/WP/WPRestrict.lean), and find?_toList_snd (Strata/Util/HMap.lean).

Found with lean-cut. Verified locally with full lake build Strata (939 jobs, warningAsError = true)

Removes 20 unused `Prop`-typed typeclass binders (`[LawfulMonad]`, `[LawfulBEq]`, `[LawfulHashable]`, `[LawfulHasIdent]`, `[LawfulHasVal]`, `[LawfulHasFvar]`) across 19 theorems in 12 files, strictly weakening theorem preconditions with 100% backwards compatibility.

Includes public soundness and utility theorems:
- `Core.core_runInterp_sound`, `Core.runCoreInterpCFG_soundE` (`[LawfulMonad]`)
- `Imperative.StructuredToUnstructured.cfgInitEnvWF` (`[LawfulHasIdent]`)
- `Imperative.stepBaseCmdStore_init_det`, `Imperative.stepBaseCmdStore_set_det` (`[LawfulMonad]`)
- `Imperative.eval_fvarExpr_of_value`, `Imperative.eval_rename_seam` (`[LawfulHasFvar]`)
- `Strata.Util.HMap.mem_values_iff_find?`, `Strata.Util.HMap.find?_mapValues` (`[LawfulHashable]`)
plus 10 private helper lemmas across `Strata/Transform/` and `Strata/DL/`.

Verified with full `lake build Strata` (939 jobs, `warningAsError = true`).
@aqjune-aws
aqjune-aws added this pull request to the merge queue Dec 3, 2026

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants