Skip to content

feat: EctxLanguage - Evaluation context languages (PR I)#9

Open
hxrts wants to merge 25 commits intomasterfrom
fork/iris/language
Open

feat: EctxLanguage - Evaluation context languages (PR I)#9
hxrts wants to merge 25 commits intomasterfrom
fork/iris/language

Conversation

@hxrts
Copy link
Owner

@hxrts hxrts commented Feb 2, 2026

Summary

  • Port iris/program_logic/ectx_language.v to Lean 4
  • EctxLanguageMixin, EctxLanguage structures with ectx_lang coercion to Language
  • ectx_prim_step inductive, base predicates (base_reducible, base_irreducible, base_stuck, sub_redexes_are_values)
  • All lifting lemmas connecting base steps to primitive steps

Test plan

  • lake build passes with 0 sorries

hxrts and others added 25 commits February 1, 2026 22:41
Add the data structures and resource algebras needed for invariant mask
reasoning in the base logic (wsat, fancy updates). Includes CoPset/GSet
types with set operations, CoPsetDisj/GSetDisj disjoint-union CMRAs,
hierarchical namespaces with nclose, and PORTING.md updates.
Add `big_sepL` (list) and `big_sepM` (map) iterated separating
conjunction, specialized from the algebra-level big ops to the BI
separation connective. Includes monoid instance for sep/emp,
computation rules, structural lemmas (mono, app, sep, insert, delete,
lookup_acc, later, singleton, union), iprop notation, and root imports.
Add Auth resource algebra built on the view construction, including:
- authViewRel and IsViewRel instance
- Auth type with ● (authoritative) and ◯ (fragment) notation
- Validity, inclusion, and injectivity lemmas
- Frame-preserving updates: auth_update, auth_update_alloc,
  auth_update_dealloc, auth_update_auth_persist, auth_local_update
- AuthURF/AuthRF functors with URFunctor/RFunctor instances
- View, Heap, and HeapView functor additions
- CMRA infrastructure extensions (opM lemmas, validN helpers)

Based on upstream PR leanprover-community#134 (ahuoguo/AuthCmra).
Stub file for `iris/base_logic/lib/wsat.v` with sorry'd definitions
and theorems: WsatGS, ownI, ownE, ownD, wsat, and all key lemmas
(open/close, allocation, disjointness).
Implement all definitions and theorems for wsat.v: WsatGS, ownI,
ownE, ownD, wsat, open/close lemmas, allocation, and initial world.
Stub file for `iris/base_logic/lib/fancy_updates.v` with sorry'd
definitions and theorems: uPred_fupd, FUpd instance, mask intro,
mono, trans, frame, bupd lifting, plain interaction, and soundness.
Implement all definitions and theorems for fancy_updates.v: uPred_fupd,
FUpd instance, mask intro/mono/trans/frame, bupd lifting, plain
interaction, and soundness. ProofMode instances deferred.
Stub file for `iris/base_logic/lib/invariants.v` with sorry'd
definitions and theorems: own_inv, inv, persistent, alloc, alloc_open,
acc, acc_timeless, alter, iff.
Stub files for Language interface and WeakestPre with sorry'd proofs:
- Language.lean: Language structure, LanguageMixin, LanguageCtx, Atomic,
  Stuckness, reducible/irreducible/stuck, PureStep/PureExec, Step/cfg
- WeakestPre.lean: IrisGS class, wp_pre, wp fixpoint, wp_unfold,
  wp_value_fupd, wp_strong_mono, fupd_wp, wp_fupd, wp_bind,
  wp_bind_inv, wp_mono, wp_frame_l/r, wp_wand, wp_atomic
Fill in all sorry'd proofs for Language and WeakestPre:
- Language.lean: LanguageMixin, LanguageCtx, Atomic, PureStep/PureExec,
  IntoVal/AsVal, reducible/irreducible/stuck lemmas, fill lemmas
- WeakestPre.lean: IrisGS class, wp fixpoint via contractive iteration,
  wp_unfold, wp_value_fupd, wp_strong_mono, fupd_wp, wp_fupd, wp_bind,
  wp_bind_inv, wp_mono, wp_frame_l/r, wp_wand, wp_atomic

Also includes minor fixes to BigOp, FancyUpdates, Wsat, Invariants,
and CancelableInvariants discovered during integration.
Stub file for EctxLanguage with sorry'd proofs:
- EctxLanguageMixin, EctxLanguage structures
- ectx_lang: construct Language from EctxLanguage
- ectx_prim_step inductive (decompose into context + base redex)
- base_reducible, base_irreducible, base_stuck predicates
- sub_redexes_are_values, PureBaseStep
- 22 sorry'd theorems: fill lemmas, base_redex_unique,
  ectx_language_atomic, ectx_lang_ctx, pure_base_step_pure_step
Fill in all sorry'd proofs for EctxLanguage and add missing items:
- base_atomic definition, ectx_step', fill_reducible_no_obs,
  base_prim_reducible_no_obs, base_prim_fill_reducible_no_obs
- All 22+ theorems fully proved, 0 sorries
@hxrts hxrts changed the title feat: EctxLanguage — evaluation context languages feat: EctxLanguage - evaluation context languages (PR I) Feb 2, 2026
@hxrts hxrts changed the title feat: EctxLanguage - evaluation context languages (PR I) feat: EctxLanguage - Evaluation context languages (PR I) Feb 2, 2026
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.

2 participants