theoremsupportedRestriction_bijective (hf : Function.Injective f)
(hz : ∀ j, (¬∃ i, f i = j) →∀x : M j, x = 0) :
Function.Bijective (supportedRestriction (k := k) M f) :=by
proof · 21
lines
constructor
· intro x y hxy
funext j
by_cases hj : ∃ i, f i = j
· obtain ⟨i, rfl⟩ := hj
exact congrFun hxy i
· exact (hz j hj (x j)).trans (hz j hj (y j)).symm
· intro y
classical
letx : ∀ j, M j :=fun j =>ifhj : ∃ i, f i = j then
hj.choose_spec ▸ y hj.choose else0
refine ⟨x, ?_⟩
funext i
change x (f i) = y i
havehi : ∃ a, f a = f i := ⟨i, rfl⟩
simp only [x, dite_eq_left hi]
have hs (a : ι) (ha : f a = f i) : ha ▸ y a = y i :=byhavehai : a = i := hf ha
subst a
rfl
exact hs _ _