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
proof(lean4/CNOCategory): close all 5 sorries (5 → 0); fix structural drift
CNO.lean
- `seqComp` `def` → `abbrev` so downstream callers can `rw` with
`eval_seqComp` even when the goal mentions the underlying `++`
directly (previously CNOCategory.composeMorphisms.evaluates failed
to elaborate for this reason).
CNOCategory.lean drift fixes (preconditions to closing the sorries)
- `id := idMorphism` had explicit/implicit binder mismatch under
v4.16; switched to `id := fun {A} => idMorphism A`.
- Renamed `Functor` → `CatFunctor`. `Functor` clashes with core
`Init.Functor (f : Type u → Type v)`; the namespace shadowing
failed once the class was applied to `Category`-typed terms.
- In `CatFunctor.fmap_compose`, renamed inner binders `{A B C}` →
`{X Y Z}` — the original `{A B C : C.Obj}` silently shadowed the
outer `(C : Category)`, breaking field resolution on `C.Hom`.
- `fmap_compose` body now uses `C.compose g f` / `D.compose ...`
rather than `g ∘ f`. The `∘` notation routes through
`Category.compose` via instance resolution, but `C`/`D` are bound
*terms* of type Category, not class instances, so the notation
cannot find them. Same fix in `yoneda_cno`.
- `CNOEquivalent`: pre-existing direction bug — original wrote
`F.fmap (G.fmap m)` for `m : C.Hom s s`, but `G : D ⟶ C` so
`G.fmap` consumes `D.Hom`. Swapped to `G.fmap (F.fmap m)`.
- `cno_model_independent`: original statement was type-incorrect
(`s : C.Obj` then concluded `m' : D.Hom s s`, requiring
`s : D.Obj`). Restated to existentially produce both the carrier
`s' : D.Obj` (set to `F.fobj s`) and the morphism (set to
`F.fmap m`), with `F.fmap_id` discharging the identity property.
- `yoneda_cno`: original `exact this.symm` was the wrong direction
(`m = C.id` is the goal, not `C.id = m`). Pre-paren parsing
masked the issue. Now `exact this`.
Sorries closed (5)
- `compose_assoc` ↦ `List.append_assoc` after `cases` on the
three morphisms and `simp only [composeMorphisms]; congr 1`.
- `compose_id_left` ↦ `List.append_nil` (right-id of ++).
- `compose_id_right` ↦ `rfl` (`[] ++ p` reduces).
- `cno_categorical_equiv` reverse direction: built the four
isCNO conjuncts from the identity hypothesis directly.
- `cno_model_independent`: closed under the type-corrected statement
via `F.fmap_id`.
0 commit comments