Skip to content

Commit 0030f5b

Browse files
committed
fix: congr_arg instead of rw assoc (avoids first-occurrence-only issue)
1 parent 4a18736 commit 0030f5b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Mathlib/Condensed/Solid.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,11 @@ theorem profiniteSolid_fintype_isSolid (T : FintypeCat.{u}) :
192192
intro g g' hgg'
193193
have h_step : g ≫ (finFree_iso_solid R T).hom = g' ≫ (finFree_iso_solid R T).hom := by
194194
sorry
195-
-- Cancel hom via hom_inv_id; use simp to handle left-normalization
196-
have h : g ≫ (finFree_iso_solid R T).hom ≫ (finFree_iso_solid R T).inv =
197-
g' ≫ (finFree_iso_solid R T).hom ≫ (finFree_iso_solid R T).inv := by
198-
rw [← Category.assoc, h_step]
199-
rw [(finFree_iso_solid R T).hom_inv_id, Category.comp_id] at h
200-
exact h
195+
-- congr_arg gives (g ≫ hom) ≫ inv = (g' ≫ hom) ≫ inv (left-assoc, both sides)
196+
-- then Category.assoc + hom_inv_id + comp_id reduce to g = g'
197+
have key := congr_arg (· ≫ (finFree_iso_solid R T).inv) h_step
198+
simp only [Category.assoc, (finFree_iso_solid R T).hom_inv_id, Category.comp_id] at key
199+
exact key
201200
· -- SURJECTIVITY (proved 2026-06-13)
202201
intro h
203202
-- Translate h to Hom(profiniteFree X, finFree T) via finFree_iso_solid.hom
@@ -248,10 +247,11 @@ lemma isSolid_of_isLimit_gen
248247
· intro f g hfg
249248
apply hc.hom_ext; intro j; apply (bijFun j).1
250249
show sol ≫ f ≫ c.π.app j = sol ≫ g ≫ c.π.app j
251-
-- hfg has Yoneda type, not sol ≫ f = sol ≫ g syntactically;
252-
-- explicit coercion needed for rw to find the pattern
250+
-- hfg has Yoneda type; coerce, then congr_arg avoids ← assoc one-occurrence problem
253251
have hfg' : sol ≫ f = sol ≫ g := hfg
254-
rw [← Category.assoc, hfg']
252+
have key := congr_arg (· ≫ c.π.app j) hfg'
253+
simp only [Category.assoc] at key
254+
exact key
255255
· intro h_map
256256
choose g_j hg_j using fun j => (bijFun j).2 (h_map ≫ c.π.app j)
257257
have hg_j' : ∀ j, sol ≫ g_j j = h_map ≫ c.π.app j := hg_j

0 commit comments

Comments
 (0)