Download lean/OAI/Algebra/AuslanderReiten/Stable/StableHom.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 10.7 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Algebra/AuslanderReiten/Stable/StableHom.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Algebra/AuslanderReiten/Stable/StableHom.lean
-
curl -L -o StableHom.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Algebra/AuslanderReiten/Stable/StableHom.lean
10.7 kB
Lean 4 · 40
declarations statementsfull
def FactorsThroughFiniteFree (f : M →ₗ[R] N) : Prop := body · 3 lines
∃ (P : Type u) (_ : AddCommGroup P) (_ : Module R P)
(_ : Module.Free R P) (_ : Module.Finite R P)
(i : M →ₗ[R] P) (p : P →ₗ[R] N), p.comp i = fdef FactorsThroughFiniteProjective (f : M →ₗ[R] N) : Prop := body · 3 lines
∃ (P : Type u) (_ : AddCommGroup P) (_ : Module R P)
(_ : Module.Projective R P) (_ : Module.Finite R P)
(i : M →ₗ[R] P) (p : P →ₗ[R] N), p.comp i = ftheorem factorsThroughFiniteFree_iff_projective (f : M →ₗ[R] N) :
FactorsThroughFiniteFree R M N f ↔ FactorsThroughFiniteProjective R M N f := by proof · 12 lines
constructor
· rintro ⟨P, hP, hRP, hfree, hfinite, i, p, h⟩
exact ⟨P, hP, hRP, inferInstance, hfinite, i, p, h⟩
· rintro ⟨P, hP, hRP, hprojective, hfinite, i, p, h⟩
obtain ⟨n, π, hπ⟩ := Module.Finite.exists_fin' R P
obtain ⟨s, hs⟩ := Module.projective_lifting_property π (LinearMap.id : P →ₗ[R] P) hπ
refine ⟨Fin n → R, inferInstance, inferInstance, inferInstance, inferInstance,
s.comp i, p.comp π, ?_⟩
ext x
calc
p (π (s (i x))) = p (i x) := congrArg p (DFunLike.congr_fun hs (i x))
_ = f x := DFunLike.congr_fun h xtheorem factorsThroughFiniteFree_zero :
FactorsThroughFiniteFree R M N (0 : M →ₗ[R] N) := by proof · 1 line
exact ⟨R, inferInstance, inferInstance, inferInstance, inferInstance, 0, 0, rfl⟩theorem FactorsThroughFiniteFree.add {f g : M →ₗ[R] N}
(hf : FactorsThroughFiniteFree R M N f) (hg : FactorsThroughFiniteFree R M N g) :
FactorsThroughFiniteFree R M N (f + g) := by proof · 6 lines
rcases hf with ⟨P, hP, hRP, hfreeP, hfiniteP, i, p, rfl⟩
rcases hg with ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, j, q, rfl⟩
refine ⟨P × Q, inferInstance, inferInstance, inferInstance, inferInstance,
i.prod j, p.coprod q, ?_⟩
ext x
rfltheorem FactorsThroughFiniteFree.neg {f : M →ₗ[R] N}
(hf : FactorsThroughFiniteFree R M N f) :
FactorsThroughFiniteFree R M N (-f) := by proof · 4 lines
rcases hf with ⟨P, hP, hRP, hfreeP, hfiniteP, i, p, rfl⟩
refine ⟨P, hP, hRP, hfreeP, hfiniteP, i, -p, ?_⟩
ext x
rfltheorem FactorsThroughFiniteFree.postcomp {f : M →ₗ[R] N}
(hf : FactorsThroughFiniteFree R M N f) (g : N →ₗ[R] P) :
FactorsThroughFiniteFree R M P (g.comp f) := by proof · 2 lines
rcases hf with ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i, p, rfl⟩
exact ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i, g.comp p, LinearMap.comp_assoc ..⟩theorem FactorsThroughFiniteFree.precomp {f : M →ₗ[R] N}
(hf : FactorsThroughFiniteFree R M N f) (g : L →ₗ[R] M) :
FactorsThroughFiniteFree R L N (f.comp g) := by proof · 2 lines
rcases hf with ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i, p, rfl⟩
exact ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i.comp g, p, (LinearMap.comp_assoc ..).symm⟩def projectiveMaps : AddSubgroup (M →ₗ[R] N) where body · 4 lines
carrier := FactorsThroughFiniteFree R M N
zero_mem' := factorsThroughFiniteFree_zero
add_mem' := FactorsThroughFiniteFree.add
neg_mem' := FactorsThroughFiniteFree.negabbrev StableHom := (M →ₗ[R] N) ⧸ projectiveMaps R M N def classOf : (M →ₗ[R] N) →+ StableHom R M N := body · 1 line
QuotientAddGroup.mk' (projectiveMaps R M N)theorem classOf_surjective : Function.Surjective (classOf R M N) := proof · 1 line
QuotientAddGroup.mk'_surjective _theorem classOf_eq_zero_iff (f : M →ₗ[R] N) :
classOf R M N f = 0 ↔ FactorsThroughFiniteFree R M N f := proof · 1 line
QuotientAddGroup.eq_zero_iff ftheorem classOf_eq_zero_iff_projective (f : M →ₗ[R] N) :
classOf R M N f = 0 ↔ FactorsThroughFiniteProjective R M N f := by proof · 1 line
rw [classOf_eq_zero_iff, factorsThroughFiniteFree_iff_projective]
theorem classOf_eq_iff (f g : M →ₗ[R] N) :
classOf R M N f = classOf R M N g ↔ FactorsThroughFiniteFree R M N (f - g) := proof · 1 line
QuotientAddGroup.eq_iff_sub_memtheorem identity_eq_zero_iff [Module.Finite R M] :
classOf R M M LinearMap.id = 0 ↔ Module.Projective R M := by proof · 7 lines
rw [classOf_eq_zero_iff_projective]
constructor
· rintro ⟨P, hP, hRP, hprojective, hfinite, i, p, h⟩
exact Module.Projective.of_split i p h
· intro h
exact ⟨M, inferInstance, inferInstance, h, inferInstance,
LinearMap.id, LinearMap.id, rfl⟩def postcomp (g : N →ₗ[R] P) : StableHom R M N →+ StableHom R M P := body · 5 lines
QuotientAddGroup.map (projectiveMaps R M N) (projectiveMaps R M P)
{ toFun := fun f => g.comp f
map_zero' := LinearMap.comp_zero g
map_add' := by intros; ext x; simp }
(fun _ hf => hf.postcomp g)def precomp (g : L →ₗ[R] M) : StableHom R M N →+ StableHom R L N := body · 5 lines
QuotientAddGroup.map (projectiveMaps R M N) (projectiveMaps R L N)
{ toFun := fun f => f.comp g
map_zero' := LinearMap.zero_comp g
map_add' := by intros; ext x; simp }
(fun _ hf => hf.precomp g)theorem postcomp_classOf (g : N →ₗ[R] P) (f : M →ₗ[R] N) :
postcomp g (classOf R M N f) = classOf R M P (g.comp f) := by proof · 1 line
exact QuotientAddGroup.map_mk' _ _ _ _ _theorem precomp_classOf (g : L →ₗ[R] M) (f : M →ₗ[R] N) :
precomp g (classOf R M N f) = classOf R L N (f.comp g) := by proof · 1 line
exact QuotientAddGroup.map_mk' _ _ _ _ _def postcompHom : (N →ₗ[R] P) →+ (StableHom R M N →+ StableHom R M P) where body · 14 lines
toFun := postcomp
map_zero' := by
apply AddMonoidHom.ext
intro f
obtain ⟨f, rfl⟩ := classOf_surjective f
simp
map_add' := by
intro g h
apply AddMonoidHom.ext
intro f
obtain ⟨f, rfl⟩ := classOf_surjective f
simp only [AddMonoidHom.add_apply, postcomp_classOf]
rw [show (g + h).comp f = g.comp f + h.comp f by ext x; rfl]
exact map_add (classOf R M P) _ _def comp : StableHom R N P →+ (StableHom R M N →+ StableHom R M P) := body · 7 lines
QuotientAddGroup.lift (projectiveMaps R N P) postcompHom (by
intro g hg
change postcomp g = 0
apply AddMonoidHom.ext
intro f
obtain ⟨f, rfl⟩ := classOf_surjective f
exact (classOf_eq_zero_iff (g.comp f)).mpr (hg.precomp f))theorem comp_classOf (g : N →ₗ[R] P) (f : M →ₗ[R] N) :
comp (classOf R N P g) (classOf R M N f) = classOf R M P (g.comp f) := by proof · 2 lines
change postcomp g (classOf R M N f) = _
exact postcomp_classOf g fdef identity : StableHom R M M := classOf R M M LinearMap.id theorem identity_comp (f : StableHom R M N) : comp identity f = f := by proof · 2 lines
obtain ⟨f, rfl⟩ := classOf_surjective f
simp [identity]theorem comp_identity (f : StableHom R M N) : comp f identity = f := by proof · 2 lines
obtain ⟨f, rfl⟩ := classOf_surjective f
simp [identity]theorem comp_assoc {Q : Type u} [AddCommGroup Q] [Module R Q]
(h : StableHom R P Q) (g : StableHom R N P) (f : StableHom R M N) :
comp h (comp g f) = comp (comp h g) f := by proof · 4 lines
obtain ⟨h, rfl⟩ := classOf_surjective h
obtain ⟨g, rfl⟩ := classOf_surjective g
obtain ⟨f, rfl⟩ := classOf_surjective f
simp only [comp_classOf, LinearMap.comp_assoc]theorem eq_zero_of_projective_source [Module.Finite R M] [Module.Projective R M]
(f : StableHom R M N) : f = 0 := by proof · 4 lines
obtain ⟨f, rfl⟩ := classOf_surjective f
apply (classOf_eq_zero_iff_projective f).mpr
exact ⟨M, inferInstance, inferInstance, inferInstance, inferInstance,
LinearMap.id, f, LinearMap.comp_id _⟩theorem eq_zero_of_projective_target [Module.Finite R N] [Module.Projective R N]
(f : StableHom R M N) : f = 0 := by proof · 4 lines
obtain ⟨f, rfl⟩ := classOf_surjective f
apply (classOf_eq_zero_iff_projective f).mpr
exact ⟨N, inferInstance, inferInstance, inferInstance, inferInstance,
f, LinearMap.id, LinearMap.id_comp _⟩theorem FactorsThroughFiniteFree.smul {f : M →ₗ[R] N}
(hf : FactorsThroughFiniteFree R M N f) (a : k) :
FactorsThroughFiniteFree R M N (a • f) := by proof · 4 lines
rcases hf with ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i, p, rfl⟩
refine ⟨Q, hQ, hRQ, hfreeQ, hfiniteQ, i, a • p, ?_⟩
ext x
rfldef projectiveMapsSubmodule : Submodule k (M →ₗ[R] N) where body · 2 lines
__ := projectiveMaps R M N
smul_mem' := fun a _ hf => hf.smul k ainstance stableHomModule : Module k (StableHom R M N) := body · 1 line
inferInstanceAs (Module k ((M →ₗ[R] N) ⧸ projectiveMapsSubmodule k))def classOfLinear : (M →ₗ[R] N) →ₗ[k] StableHom R M N := body · 1 line
(projectiveMapsSubmodule k).mkQ
theorem classOfLinear_apply (f : M →ₗ[R] N) :
classOfLinear k f = classOf R M N f := rfl theorem classOf_smul (a : k) (f : M →ₗ[R] N) :
classOf R M N (a • f) = a • classOf R M N f := proof · 1 line
(classOfLinear k).map_smul a f
theorem comp_smul (g : StableHom R N P) (a : k) (f : StableHom R M N) :
comp g (a • f) = a • comp g f := by proof · 4 lines
obtain ⟨g, rfl⟩ := classOf_surjective g
obtain ⟨f, rfl⟩ := classOf_surjective f
rw [← classOf_smul k a f, comp_classOf, LinearMap.comp_smul,
classOf_smul, comp_classOf]theorem smul_comp (a : k) (g : StableHom R N P) (f : StableHom R M N) :
comp (a • g) f = a • comp g f := by proof · 4 lines
obtain ⟨g, rfl⟩ := classOf_surjective g
obtain ⟨f, rfl⟩ := classOf_surjective f
rw [← classOf_smul k a g, comp_classOf, LinearMap.smul_comp,
classOf_smul, comp_classOf]def postcompLinear (g : StableHom R N P) :
StableHom R M N →ₗ[k] StableHom R M P where body · 3 lines
toFun := comp g
map_add' := map_add (comp g)
map_smul' := comp_smul k gdef compLinear :
StableHom R N P →ₗ[k] (StableHom R M N →ₗ[k] StableHom R M P) where body · 12 lines
toFun := postcompLinear k
map_add' := by
intro g h
apply LinearMap.ext
intro f
change comp (g + h) f = comp g f + comp h f
exact DFunLike.congr_fun (map_add comp g h) f
map_smul' := by
intro a g
apply LinearMap.ext
intro f
exact smul_comp k a g ftheorem compLinear_apply (g : StableHom R N P) (f : StableHom R M N) :
compLinear k g f = comp g f := rfl Outline
- def
FactorsThroughFiniteFree17 - def
FactorsThroughFiniteProjective22 - theorem
factorsThroughFiniteFree_iff_projective29 - theorem
factorsThroughFiniteFree_zero44 - theorem
FactorsThroughFiniteFree.add48 - theorem
FactorsThroughFiniteFree.neg58 - theorem
FactorsThroughFiniteFree.postcomp68 - theorem
FactorsThroughFiniteFree.precomp74 - def
projectiveMaps82 - abbrev
StableHom88 - def
classOf92 - theorem
classOf_surjective97 - theorem
classOf_eq_zero_iff101 - theorem
classOf_eq_zero_iff_projective105 - theorem
classOf_eq_iff110 - theorem
identity_eq_zero_iff114 - def
postcomp124 - def
precomp131 - theorem
postcomp_classOf139 - theorem
precomp_classOf144 - def
postcompHom148 - def
comp164 - theorem
comp_classOf174 - def
identity179 - theorem
identity_comp182 - theorem
comp_identity187 - theorem
comp_assoc191 - theorem
eq_zero_of_projective_source199 - theorem
eq_zero_of_projective_target206 - theorem
FactorsThroughFiniteFree.smul221 - def
projectiveMapsSubmodule229 - instance
stableHomModule233 - def
classOfLinear238 - theorem
classOfLinear_apply242 - theorem
classOf_smul246 - theorem
comp_smul252 - theorem
smul_comp260 - def
postcompLinear267 - def
compLinear273 - theorem
compLinear_apply289