Commit b896ca4
Origin/main (aa65b23) failed `lean proofs/BetLang.lean` with four
pre-existing errors that block any further proof work:
1. `progress` (line 304): `induction ht` failed with "index in target's
type is not a variable" because `HasType [] e T` carries the concrete
`[]` index. Refactored to `generalize hΓ : ([] : Ctx) = Γ at ht`,
then `subst hΓ` in branches that need the closed-context invariant
(`tVar` for the empty-lookup contradiction; `tApp`/`tIf`/`tSample`/
`tDistBind` for the canonical-forms lemmas). Used non-`@` patterns
where possible to avoid having to know the constructor's implicit-
argument order; `tIf` still needs `@tIf Γ c t T e ...` because the
two if-branches `t` and `e` are positional witnesses in the goal.
2. `lookup_extend_ge` (line 367): broken `omega` + `rw` chain (IH was
over the wrong index because `induction Γ` didn't generalize `n`).
Deleted as unused — the substitution machinery in the next commit
will use a cleaner `Ctx.insertAt`-based formulation, so this lemma
has no caller now and won't have one later.
3. Two orphan `/-- … -/` doc-comment blocks (lines 386-391 and 393-399)
not attached to any declaration. Both were stale guidance about the
not-yet-discharged substitution lemma. Replaced with a single line
comment pointing at the upcoming Section 8.5.
Verified: `lean proofs/BetLang.lean` exits 0 with no errors (seven
unused-variable warnings remain in `preservation`, all pre-existing
and untouched by this commit).
The `substTop_preserves_typing` axiom (line 420 pre-edit) is still in
place; discharging it is the next commit on this branch (Refs #23).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent aa65b23 commit b896ca4
1 file changed
Lines changed: 33 additions & 61 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
313 | 316 | | |
314 | | - | |
| 317 | + | |
315 | 318 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
322 | | - | |
| 326 | + | |
323 | 327 | | |
324 | | - | |
| 328 | + | |
325 | 329 | | |
326 | 330 | | |
327 | | - | |
| 331 | + | |
328 | 332 | | |
329 | | - | |
330 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
331 | 336 | | |
332 | 337 | | |
333 | 338 | | |
334 | 339 | | |
335 | | - | |
| 340 | + | |
336 | 341 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
342 | 346 | | |
343 | 347 | | |
344 | 348 | | |
345 | | - | |
| 349 | + | |
346 | 350 | | |
347 | | - | |
348 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
349 | 354 | | |
350 | 355 | | |
351 | | - | |
352 | | - | |
| 356 | + | |
| 357 | + | |
353 | 358 | | |
354 | 359 | | |
355 | | - | |
| 360 | + | |
356 | 361 | | |
357 | | - | |
358 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
403 | 375 | | |
404 | 376 | | |
405 | 377 | | |
| |||
0 commit comments