You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 2 |`S_Let_Step`| ✅ | ✅ via `region_add_typing`| ✅ via lift+perm |
184
+
| 3 |`S_LetLin_Step`| ✅ | ✅ | ✅ |
185
+
| 4 |`S_App_Step2`| ✅ | ✅ | ✅ |
186
+
| 5 |`S_If_Step`| ✅ | ✅ | ✅ |
187
+
| 6 |`S_Pair_Step1`| ✅ | ✅ | ✅ |
188
+
| 7 |`S_Pair_Step2`| ✅ | ✅ | ✅ |
189
+
| 9 |`S_Case_Step`| ✅ | ✅ | ✅ |
190
+
191
+
The RIGHT sub-case (when the inner step exits a region) is closed by:
192
+
1.`region_add_typing` lifts the post-step sibling typing from
193
+
`remove_first r R0` to `r :: remove_first r R0`.
194
+
2.`region_env_perm_typing` converts to `R0` via
195
+
`remove_first_then_cons_membership_eq` — the new helper that proves
196
+
`r :: remove_first r R0` and `R0` have the same membership when
197
+
`In r R0` (NO `NoDup R` invariant needed; works even for duplicates).
198
+
3.`type_determinacy` aligns the types under the now-shared `R0`.
199
+
200
+
### Partially closed — one sub-case admitted (1 of 12)
201
+
202
+
| Goal | Step rule | Closures | Remaining admit |
203
+
|------|-----------|----------|-----------------|
204
+
| 11 |`S_Region_Step` (ERegion r e → ERegion r e') | T_Region (Hte) contradicted by `In r R0`; T_Region_Active × T_Region_Active via IH; T_Region_Active × T_Region 3 of 4 R-shape sub-cases close (R = R', R' = r1::R0, R' = remove_first r1 R0 with r ≠ r1) — all by contradiction with `~In r R0'`| One sub-case: T_Region_Active × T_Region with `R0' = remove_first r R0` (the outer r is exited from inside). Closing requires `expr_free_of_region r e'` to shrink the post-step inner typing, derivable but requires further inversion on `Hstep` to reach the underlying `S_Region_Exit`'s premise. |
205
+
206
+
### Net effect
207
+
208
+
-**Before**: `step_preserves_type` was `all: admit` with 12 open
209
+
goals — every case admitted with no structure.
210
+
-**After (pass 1)**: 4 of 12 closed fully, 7 of 12 had LEFT (R = R')
211
+
branch closed, 1 of 12 had main branch closed. 8 admits.
212
+
-**After (pass 2)**: each congruence admit narrowed to just the
213
+
`R' = remove_first r R` sub-case via `step_R_change_shape` +
214
+
`region_add_typing`. Still 8 admits but each strictly narrower.
215
+
-**After (pass 3)**: all 7 congruence RIGHT sub-cases closed via the
216
+
new `remove_first_then_cons_membership_eq` helper +
217
+
`region_env_perm_typing`. **1 admit remains** — the
218
+
`T_Region_Active × T_Region` cross-case of `S_Region_Step` when
219
+
the inner step exits the outer region from inside.
220
+
221
+
New supporting lemmas added (all `Qed.`):
222
+
-`step_R_change_shape` (~10 LOC): refines the 2-way disjunction
223
+
into 3-way, also exposing `~In r R` / `In r R` for the prepend /
|`S_Drop`| atomic: `EDrop (ELoc _) → EUnit`, both T_Drop and T_Unit are identity-output |
156
252
|`S_Borrow_Step`|**accidental congruence closure**: both `T_Borrow` and `T_Borrow_Val` output the input context unchanged, so `Ga = G = Gb` regardless of whether the inner step is reachable. Vacuous-but-closes. |
157
253
158
-
### Open (31)
159
-
160
-
Three clusters, ordered by closure tractability:
161
-
162
-
#### Cluster A — β-reduction (~7)
163
-
164
-
Need a strengthened `subst_preserves_typing_strong` exposing the
165
-
specific output context (currently hidden behind an existential).
166
-
`subst_typing_gen` already has the `remove_at k Gout` shape — wrap
167
-
it.
168
-
169
-
| Step rule | Post-step expr (from coqc dump) |
170
-
|-----------|---------------------------------|
171
-
|`S_Let_Val`|`subst 0 v1 e2`|
172
-
|`S_LetLin_Val`|`subst 0 v1 e2`|
173
-
|`S_App_Fun`|`subst 0 v2 ebody`|
174
-
|`S_If_True`|`e0'` (the `e2` branch, abstract) |
175
-
|`S_If_False`|`e0'` (the `e3` branch, abstract) |
176
-
|`S_Case_Inl`|`subst 0 v e1`|
177
-
|`S_Case_Inr`|`subst 0 v e2`|
178
-
179
-
#### Cluster B — congruence (~18)
180
-
181
-
Every `S_*_Step` except `S_Borrow_Step`. Recipe per case: apply
182
-
`step_R_eq_or_touches_region` → in the R-equal branch, apply IH for
183
-
the inner step + recursive Lemma B for siblings. RIGHT branch
184
-
(`touches_region`) is blocked on the same region-env weakening
185
-
lemma as preservation Phase 3 — these cases share the bottleneck.
254
+
### Open (24, was 31)
255
+
256
+
#### Cluster A — β-reduction ✅ FULLY CLOSED (2026-05-24)
257
+
258
+
All 7 β-reduction cases closed via
259
+
`subst_preserves_typing_strong` (PR: this branch) + `output_ctx_det`
260
+
(PR: this branch). Recipe per case:
261
+
1. Invert the outer compound typing (`T_Let`, `T_App`, `T_If`,
262
+
`T_Case`) to expose body + value premises.
263
+
2. For T_App: also invert `T_Lam` on the function value.
264
+
3. For T_Case: apply `value_context_unchanged` on the EInl/EInr
265
+
premise, then invert `T_Inl`/`T_Inr`.
266
+
4. Apply `value_context_unchanged` on the value premise(s) to
267
+
align intermediate contexts with the input context.
268
+
5.`destruct (subst_preserves_typing_strong ...)` to construct a
269
+
typing of the substituted form at the specific output context.
270
+
6.`eapply output_ctx_det` against `Htype_e'` to conclude
0 commit comments