path
stringlengths 12
84
| imports
sequencelengths 0
4.45k
| premises
listlengths 0
625
|
---|---|---|
Mathlib/CategoryTheory/Galois/Prorepresentability.lean | [
"Mathlib/CategoryTheory/Limits/IndYoneda.lean",
"Mathlib/CategoryTheory/Limits/Preserves/Ulift.lean",
"Mathlib/CategoryTheory/CofilteredSystem.lean",
"Mathlib/CategoryTheory/Galois/Decomposition.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Category/Grp/Limits.lean",
"Mathlib/CategoryTheory/Limits/FunctorCategory.lean"
] | [
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject",
"code": "structure PointedGaloisObject : Type (max u₁ u₂) where\n \n obj : C\n \n pt : F.obj obj\n \n isGalois : IsGalois obj := by infer_instance",
"start": [
54,
1
],
"end": [
61,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.Hom",
"code": "@[ext]\nstructure Hom (A B : PointedGaloisObject F) where\n \n val : A.obj ⟶ B.obj\n \n comp : F.map val A.pt = B.pt := by simp",
"start": [
71,
1
],
"end": [
78,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.hom_ext",
"code": "@[ext]\nlemma hom_ext {A B : PointedGaloisObject F} {f g : A ⟶ B} (h : f.val = g.val) : f = g :=\n Hom.ext f g h",
"start": [
93,
1
],
"end": [
95,
16
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.id_val",
"code": "@[simp]\nlemma id_val (A : PointedGaloisObject F) : 𝟙 A = 𝟙 A.obj :=\n rfl",
"start": [
97,
1
],
"end": [
99,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.comp_val",
"code": "@[simp, reassoc]\nlemma comp_val {A B C : PointedGaloisObject F} (f : A ⟶ B) (g : B ⟶ C) :\n (f ≫ g).val = f.val ≫ g.val :=\n rfl",
"start": [
101,
1
],
"end": [
104,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl",
"code": "def incl : PointedGaloisObject F ⥤ C where\n obj := fun A ↦ A\n map := fun ⟨f, _⟩ ↦ f",
"start": [
122,
1
],
"end": [
125,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl_obj",
"code": "@[simp]\nlemma incl_obj (A : PointedGaloisObject F) : (incl F).obj A = A :=\n rfl",
"start": [
127,
1
],
"end": [
129,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl_map",
"code": "@[simp]\nlemma incl_map {A B : PointedGaloisObject F} (f : A ⟶ B) : (incl F).map f = f.val :=\n rfl",
"start": [
131,
1
],
"end": [
133,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone",
"code": "def cocone : Cocone ((incl F).op ⋙ coyoneda) where\n pt := F ⋙ FintypeCat.incl\n ι := {\n app := fun ⟨A, a, _⟩ ↦ { app := fun X (f : (A : C) ⟶ X) ↦ F.map f a }\n naturality := fun ⟨A, a, _⟩ ⟨B, b, _⟩ ⟨f, (hf : F.map f b = a)⟩ ↦ by\n ext Y (g : (A : C) ⟶ Y)\n suffices h : F.map g (F.map f b) = F.map g a by simpa\n rw [hf]\n }",
"start": [
135,
1
],
"end": [
145,
4
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone_app",
"code": "@[simp]\nlemma cocone_app (A : PointedGaloisObject F) (B : C) (f : (A : C) ⟶ B) :\n ((cocone F).ι.app ⟨A⟩).app B f = F.map f A.pt :=\n rfl",
"start": [
147,
1
],
"end": [
150,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.PointedGaloisObject.isColimit",
"code": "noncomputable def isColimit : IsColimit (cocone F) := by\n refine evaluationJointlyReflectsColimits _ (fun X ↦ ?_)\n refine Types.FilteredColimit.isColimitOf _ _ ?_ ?_\n · intro (x : F.obj X)\n obtain ⟨Y, i, y, h1, _, _⟩ := fiber_in_connected_component F X x\n obtain ⟨Z, f, z, hgal, hfz⟩ := exists_hom_from_galois_of_fiber F Y y\n refine ⟨⟨Z, z, hgal⟩, f ≫ i, ?_⟩\n simp only [mapCocone_ι_app, evaluation_obj_map, cocone_app, map_comp,\n ← h1, FintypeCat.comp_apply, hfz]\n · intro ⟨A, a, _⟩ ⟨B, b, _⟩ (u : (A : C) ⟶ X) (v : (B : C) ⟶ X) (h : F.map u a = F.map v b)\n obtain ⟨⟨Z, z, _⟩, ⟨f, hf⟩, ⟨g, hg⟩, _⟩ :=\n IsFilteredOrEmpty.cocone_objs (C := (PointedGaloisObject F)ᵒᵖ)\n ⟨{ obj := A, pt := a}⟩ ⟨{obj := B, pt := b}⟩\n refine ⟨⟨{ obj := Z, pt := z }⟩, ⟨f, hf⟩, ⟨g, hg⟩, ?_⟩\n apply evaluation_injective_of_isConnected F Z X z\n change F.map (f ≫ u) z = F.map (g ≫ v) z\n rw [map_comp, FintypeCat.comp_apply, hf, map_comp, FintypeCat.comp_apply, hg, h]",
"start": [
152,
1
],
"end": [
169,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autGaloisSystem",
"code": "@[simps]\nnoncomputable def autGaloisSystem : PointedGaloisObject F ⥤ Grp.{u₂} where\n obj := fun A ↦ Grp.of <| Aut (A : C)\n map := fun {A B} f ↦ (autMapHom f : Aut (A : C) →* Aut (B : C))\n map_id := fun A ↦ by\n ext (σ : Aut A.obj)\n simp\n map_comp {A B C} f g := by\n ext (σ : Aut A.obj)\n simp",
"start": [
178,
1
],
"end": [
189,
9
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.AutGalois",
"code": "noncomputable def AutGalois : Type (max u₁ u₂) :=\n (autGaloisSystem F ⋙ forget _).sections",
"start": [
191,
1
],
"end": [
193,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.AutGalois.π",
"code": "noncomputable def AutGalois.π (A : PointedGaloisObject F) : AutGalois F →* Aut (A : C) :=\n Grp.sectionsπMonoidHom (autGaloisSystem F) A",
"start": [
198,
1
],
"end": [
201,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.AutGalois.π_apply",
"code": "lemma AutGalois.π_apply (A : PointedGaloisObject F) (x : AutGalois F) :\n AutGalois.π F A x = x.val A :=\n rfl",
"start": [
204,
1
],
"end": [
206,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autGaloisSystem_map_surjective",
"code": "lemma autGaloisSystem_map_surjective ⦃A B : PointedGaloisObject F⦄ (f : A ⟶ B) :\n Function.Surjective ((autGaloisSystem F).map f) := by\n intro (φ : Aut B.obj)\n obtain ⟨ψ, hψ⟩ := autMap_surjective_of_isGalois f.val φ\n use ψ\n simp only [autGaloisSystem_map]\n exact hψ",
"start": [
208,
1
],
"end": [
214,
11
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.AutGalois.π_surjective",
"code": "theorem AutGalois.π_surjective (A : PointedGaloisObject F) :\n Function.Surjective (AutGalois.π F A)",
"start": [
216,
1
],
"end": [
222,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.AutGalois.ext",
"code": "lemma AutGalois.ext {f g : AutGalois F}\n (h : ∀ (A : PointedGaloisObject F), AutGalois.π F A f = AutGalois.π F A g) : f = g := by\n dsimp only [AutGalois]\n ext A\n exact h A",
"start": [
224,
1
],
"end": [
230,
12
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endEquivSectionsFibers",
"code": "noncomputable def endEquivSectionsFibers : End F ≃ (incl F ⋙ F').sections :=\n let i1 : End F ≃ End F' :=\n (FullyFaithful.whiskeringRight (FullyFaithful.ofFullyFaithful FintypeCat.incl) C).homEquiv\n let i2 : End F' ≅ (colimit ((incl F).op ⋙ coyoneda) ⟶ F') :=\n (yoneda.obj (F ⋙ FintypeCat.incl)).mapIso (colimit.isoColimitCocone ⟨cocone F, isColimit F⟩).op\n let i3 : (colimit ((incl F).op ⋙ coyoneda) ⟶ F') ≅ limit ((incl F ⋙ F') ⋙ uliftFunctor.{u₁}) :=\n colimitCoyonedaHomIsoLimit' (incl F) F'\n let i4 : limit (incl F ⋙ F' ⋙ uliftFunctor.{u₁}) ≃ ((incl F ⋙ F') ⋙ uliftFunctor.{u₁}).sections :=\n Types.limitEquivSections (incl F ⋙ (F ⋙ FintypeCat.incl) ⋙ uliftFunctor.{u₁, u₂})\n let i5 : ((incl F ⋙ F') ⋙ uliftFunctor.{u₁}).sections ≃ (incl F ⋙ F').sections :=\n (Types.sectionsEquiv (incl F ⋙ F')).symm\n i1.trans <| i2.toEquiv.trans <| i3.toEquiv.trans <| i4.trans i5",
"start": [
265,
1
],
"end": [
278,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endEquivSectionsFibers_π",
"code": "@[simp]\nlemma endEquivSectionsFibers_π (f : End F) (A : PointedGaloisObject F) :\n (endEquivSectionsFibers F f).val A = f.app A A.pt := by\n dsimp [endEquivSectionsFibers, Types.sectionsEquiv]\n erw [Types.limitEquivSections_apply]\n simp only [colimitCoyonedaHomIsoLimit'_π_apply, incl_obj, comp_obj, FintypeCat.incl_obj, op_obj,\n FunctorToTypes.comp]\n change (((FullyFaithful.whiskeringRight (FullyFaithful.ofFullyFaithful\n FintypeCat.incl) C).homEquiv) f).app A\n (((colimit.ι _ _) ≫ (colimit.isoColimitCocone ⟨cocone F, isColimit F⟩).hom).app\n A _) = f.app A A.pt\n simp\n rfl",
"start": [
280,
1
],
"end": [
292,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autIsoFibers",
"code": "noncomputable def autIsoFibers :\n autGaloisSystem F ⋙ forget Grp ≅ incl F ⋙ F' :=\n NatIso.ofComponents (fun A ↦ ((evaluationEquivOfIsGalois F A A.pt).toIso))\n (fun {A B} f ↦ by\n ext (φ : Aut A.obj)\n dsimp\n erw [evaluationEquivOfIsGalois_apply, evaluationEquivOfIsGalois_apply]\n simp [-Hom.comp, ← f.comp])",
"start": [
294,
1
],
"end": [
302,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autIsoFibers_inv_app",
"code": "lemma autIsoFibers_inv_app (A : PointedGaloisObject F) (b : F.obj A) :\n (autIsoFibers F).inv.app A b = (evaluationEquivOfIsGalois F A A.pt).symm b :=\n rfl",
"start": [
304,
1
],
"end": [
306,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endEquivAutGalois",
"code": "noncomputable def endEquivAutGalois : End F ≃ AutGalois F :=\n let e1 := endEquivSectionsFibers F\n let e2 := ((Functor.sectionsFunctor _).mapIso (autIsoFibers F).symm).toEquiv\n e1.trans e2",
"start": [
308,
1
],
"end": [
313,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endEquivAutGalois_π",
"code": "lemma endEquivAutGalois_π (f : End F) (A : PointedGaloisObject F) :\n F.map (AutGalois.π F A (endEquivAutGalois F f)).hom A.pt = f.app A A.pt := by\n dsimp [endEquivAutGalois, AutGalois.π_apply]\n change F.map ((((sectionsFunctor _).map (autIsoFibers F).inv) _).val A).hom A.pt = _\n dsimp [autIsoFibers]\n simp only [endEquivSectionsFibers_π]\n erw [evaluationEquivOfIsGalois_symm_fiber]",
"start": [
315,
1
],
"end": [
321,
45
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endEquivAutGalois_mul",
"code": "@[simp]\ntheorem endEquivAutGalois_mul (f g : End F) :\n (endEquivAutGalois F) (g ≫ f) = (endEquivAutGalois F g) * (endEquivAutGalois F f)",
"start": [
323,
1
],
"end": [
331,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endMulEquivAutGalois",
"code": "noncomputable def endMulEquivAutGalois : End F ≃* (AutGalois F)ᵐᵒᵖ :=\n MulEquiv.mk (Equiv.trans (endEquivAutGalois F) MulOpposite.opEquiv) (by simp)",
"start": [
333,
1
],
"end": [
336,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.endMulEquivAutGalois_pi",
"code": "lemma endMulEquivAutGalois_pi (f : End F) (A : PointedGaloisObject F) :\n F.map (AutGalois.π F A (endMulEquivAutGalois F f).unop).hom A.2 = f.app A A.pt :=\n endEquivAutGalois_π F f A",
"start": [
338,
1
],
"end": [
340,
28
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.FibreFunctor.end_isUnit",
"code": "theorem FibreFunctor.end_isUnit (f : End F) : IsUnit f",
"start": [
342,
1
],
"end": [
345,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.FibreFunctor.end_isIso",
"code": "instance FibreFunctor.end_isIso (f : End F) : IsIso f := by\n rw [← isUnit_iff_isIso]\n exact FibreFunctor.end_isUnit F f",
"start": [
347,
1
],
"end": [
350,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autMulEquivAutGalois",
"code": "noncomputable def autMulEquivAutGalois : Aut F ≃* (AutGalois F)ᵐᵒᵖ where\n toFun := MonoidHom.comp (endMulEquivAutGalois F) (Aut.toEnd F)\n invFun t := asIso ((endMulEquivAutGalois F).symm t)\n left_inv t := by\n simp only [MonoidHom.coe_comp, MonoidHom.coe_coe, Function.comp_apply,\n MulEquiv.symm_apply_apply]\n exact Aut.ext rfl\n right_inv t := by\n simp only [MonoidHom.coe_comp, MonoidHom.coe_coe, Function.comp_apply, Aut.toEnd_apply]\n exact (MulEquiv.eq_symm_apply (endMulEquivAutGalois F)).mp rfl\n map_mul' := by simp",
"start": [
352,
1
],
"end": [
365,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autMulEquivAutGalois_π",
"code": "lemma autMulEquivAutGalois_π (f : Aut F) (A : C) [IsGalois A] (a : F.obj A) :\n F.map (AutGalois.π F { obj := A, pt := a } (autMulEquivAutGalois F f).unop).hom a =\n f.hom.app A a := by\n dsimp [autMulEquivAutGalois, endMulEquivAutGalois]\n rw [endEquivAutGalois_π]\n rfl",
"start": [
367,
1
],
"end": [
372,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.autMulEquivAutGalois_symm_app",
"code": "@[simp]\nlemma autMulEquivAutGalois_symm_app (x : AutGalois F) (A : C) [IsGalois A] (a : F.obj A) :\n ((autMulEquivAutGalois F).symm ⟨x⟩).hom.app A a =\n F.map (AutGalois.π F ⟨A, a, inferInstance⟩ x).hom a := by\n rw [← autMulEquivAutGalois_π, MulEquiv.apply_symm_apply]\n rfl",
"start": [
374,
1
],
"end": [
379,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.FiberFunctor.isPretransitive_of_isGalois",
"code": "theorem FiberFunctor.isPretransitive_of_isGalois (X : C) [IsGalois X] :\n MulAction.IsPretransitive (Aut F) (F.obj X)",
"start": [
383,
1
],
"end": [
391,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.PreGaloisCategory.FiberFunctor.isPretransitive_of_isConnected",
"code": "instance FiberFunctor.isPretransitive_of_isConnected (X : C) [IsConnected X] :\n MulAction.IsPretransitive (Aut F) (F.obj X) := by\n obtain ⟨A, f, hgal⟩ := exists_hom_from_galois_of_connected F X\n have hs : Function.Surjective (F.map f) := surjective_of_nonempty_fiber_of_isConnected F f\n refine ⟨fun x y ↦ ?_⟩\n obtain ⟨a, ha⟩ := hs x\n obtain ⟨b, hb⟩ := hs y\n have : MulAction.IsPretransitive (Aut F) (F.obj A) := isPretransitive_of_isGalois F A\n obtain ⟨σ, (hσ : σ.hom.app A a = b)⟩ := MulAction.exists_smul_eq (Aut F) a b\n use σ\n rw [← ha, ← hb]\n show (F.map f ≫ σ.hom.app X) a = F.map f b\n rw [σ.hom.naturality, FintypeCat.comp_apply, hσ]",
"start": [
393,
1
],
"end": [
406,
51
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Star/RingQuot.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/RingQuot.lean",
"Mathlib/Algebra/Star/Basic.lean"
] | [
{
"full_name": "RingQuot.Rel.star",
"code": "theorem Rel.star ⦃a b : R⦄ (h : Rel r a b) : Rel r (star a) (star b)",
"start": [
23,
1
],
"end": [
31,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "RingQuot.star'",
"code": "private irreducible_def star' : RingQuot r → RingQuot r\n | ⟨a⟩ => ⟨Quot.map (star : R → R) (Rel.star r hr) a⟩",
"start": [
34,
1
],
"end": [
35,
55
],
"kind": "leanelabcommandcommandirreducibledef"
},
{
"full_name": "RingQuot.star'_quot",
"code": "theorem star'_quot (hr : ∀ a b, r a b → r (star a) (star b)) {a} :\n (star' r hr ⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (star a)⟩",
"start": [
37,
1
],
"end": [
38,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "RingQuot.starRing",
"code": "def starRing {R : Type u} [Semiring R] [StarRing R] (r : R → R → Prop)\n (hr : ∀ a b, r a b → r (star a) (star b)) : StarRing (RingQuot r) where\n star := star' r hr\n star_involutive := by\n rintro ⟨⟨⟩⟩\n simp [star'_quot]\n star_mul := by\n rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩\n simp [star'_quot, mul_quot, star_mul]\n star_add := by\n rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩\n simp [star'_quot, add_quot, star_add]",
"start": [
41,
1
],
"end": [
53,
42
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/ConstantSpeed.lean | [
"Mathlib/Data/Set/Function.lean",
"Mathlib/Analysis/BoundedVariation.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "HasConstantSpeedOnWith",
"code": "def HasConstantSpeedOnWith :=\n ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (l * (y - x))",
"start": [
50,
1
],
"end": [
54,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "HasConstantSpeedOnWith.hasLocallyBoundedVariationOn",
"code": "theorem HasConstantSpeedOnWith.hasLocallyBoundedVariationOn (h : HasConstantSpeedOnWith f s l) :\n LocallyBoundedVariationOn f s",
"start": [
59,
1
],
"end": [
61,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "hasConstantSpeedOnWith_of_subsingleton",
"code": "theorem hasConstantSpeedOnWith_of_subsingleton (f : ℝ → E) {s : Set ℝ} (hs : s.Subsingleton)\n (l : ℝ≥0) : HasConstantSpeedOnWith f s l",
"start": [
64,
1
],
"end": [
68,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "hasConstantSpeedOnWith_iff_ordered",
"code": "theorem hasConstantSpeedOnWith_iff_ordered :\n HasConstantSpeedOnWith f s l ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s),\n x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (l * (y - x))",
"start": [
71,
1
],
"end": [
82,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "hasConstantSpeedOnWith_iff_variationOnFromTo_eq",
"code": "theorem hasConstantSpeedOnWith_iff_variationOnFromTo_eq :\n HasConstantSpeedOnWith f s l ↔ LocallyBoundedVariationOn f s ∧\n ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), variationOnFromTo f s x y = l * (y - x)",
"start": [
85,
1
],
"end": [
99,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "HasConstantSpeedOnWith.union",
"code": "theorem HasConstantSpeedOnWith.union {t : Set ℝ} (hfs : HasConstantSpeedOnWith f s l)\n (hft : HasConstantSpeedOnWith f t l) {x : ℝ} (hs : IsGreatest s x) (ht : IsLeast t x) :\n HasConstantSpeedOnWith f (s ∪ t) l",
"start": [
102,
1
],
"end": [
137,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "HasConstantSpeedOnWith.Icc_Icc",
"code": "theorem HasConstantSpeedOnWith.Icc_Icc {x y z : ℝ} (hfs : HasConstantSpeedOnWith f (Icc x y) l)\n (hft : HasConstantSpeedOnWith f (Icc y z) l) : HasConstantSpeedOnWith f (Icc x z) l",
"start": [
140,
1
],
"end": [
153,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "hasConstantSpeedOnWith_zero_iff",
"code": "theorem hasConstantSpeedOnWith_zero_iff :\n HasConstantSpeedOnWith f s 0 ↔ ∀ᵉ (x ∈ s) (y ∈ s), edist (f x) (f y) = 0",
"start": [
156,
1
],
"end": [
173,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "HasConstantSpeedOnWith.ratio",
"code": "theorem HasConstantSpeedOnWith.ratio {l' : ℝ≥0} (hl' : l' ≠ 0) {φ : ℝ → ℝ} (φm : MonotoneOn φ s)\n (hfφ : HasConstantSpeedOnWith (f ∘ φ) s l) (hf : HasConstantSpeedOnWith f (φ '' s) l') ⦃x : ℝ⦄\n (xs : x ∈ s) : EqOn φ (fun y => l / l' * (y - x) + φ x) s",
"start": [
176,
1
],
"end": [
190,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "HasUnitSpeedOn",
"code": "def HasUnitSpeedOn (f : ℝ → E) (s : Set ℝ) :=\n HasConstantSpeedOnWith f s 1",
"start": [
193,
1
],
"end": [
195,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "HasUnitSpeedOn.union",
"code": "theorem HasUnitSpeedOn.union {t : Set ℝ} {x : ℝ} (hfs : HasUnitSpeedOn f s)\n (hft : HasUnitSpeedOn f t) (hs : IsGreatest s x) (ht : IsLeast t x) :\n HasUnitSpeedOn f (s ∪ t)",
"start": [
198,
1
],
"end": [
201,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "HasUnitSpeedOn.Icc_Icc",
"code": "theorem HasUnitSpeedOn.Icc_Icc {x y z : ℝ} (hfs : HasUnitSpeedOn f (Icc x y))\n (hft : HasUnitSpeedOn f (Icc y z)) : HasUnitSpeedOn f (Icc x z)",
"start": [
204,
1
],
"end": [
206,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "unique_unit_speed",
"code": "theorem unique_unit_speed {φ : ℝ → ℝ} (φm : MonotoneOn φ s) (hfφ : HasUnitSpeedOn (f ∘ φ) s)\n (hf : HasUnitSpeedOn f (φ '' s)) ⦃x : ℝ⦄ (xs : x ∈ s) : EqOn φ (fun y => y - x + φ x) s",
"start": [
209,
1
],
"end": [
216,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "unique_unit_speed_on_Icc_zero",
"code": "theorem unique_unit_speed_on_Icc_zero {s t : ℝ} (hs : 0 ≤ s) (ht : 0 ≤ t) {φ : ℝ → ℝ}\n (φm : MonotoneOn φ <| Icc 0 s) (φst : φ '' Icc 0 s = Icc 0 t)\n (hfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)) (hf : HasUnitSpeedOn f (Icc 0 t)) :\n EqOn φ id (Icc 0 s)",
"start": [
219,
1
],
"end": [
235,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "naturalParameterization",
"code": "noncomputable def naturalParameterization (f : α → E) (s : Set α) (a : α) : ℝ → E :=\n f ∘ @Function.invFunOn _ _ ⟨a⟩ (variationOnFromTo f s a) s",
"start": [
238,
1
],
"end": [
244,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "edist_naturalParameterization_eq_zero",
"code": "theorem edist_naturalParameterization_eq_zero {f : α → E} {s : Set α}\n (hf : LocallyBoundedVariationOn f s) {a : α} (as : a ∈ s) {b : α} (bs : b ∈ s) :\n edist (naturalParameterization f s a (variationOnFromTo f s a b)) (f b) = 0",
"start": [
247,
1
],
"end": [
256,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "has_unit_speed_naturalParameterization",
"code": "theorem has_unit_speed_naturalParameterization (f : α → E) {s : Set α}\n (hf : LocallyBoundedVariationOn f s) {a : α} (as : a ∈ s) :\n HasUnitSpeedOn (naturalParameterization f s a) (variationOnFromTo f s a '' s)",
"start": [
259,
1
],
"end": [
277,
59
],
"kind": "commanddeclaration"
}
] |
Mathlib/Geometry/Euclidean/Inversion/Calculus.lean | [
"Mathlib/Analysis/Calculus/Deriv/Inv.lean",
"Mathlib/Tactic/AdaptationNote.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/InnerProductSpace/Calculus.lean",
"Mathlib/Geometry/Euclidean/Inversion/Basic.lean"
] | [
{
"full_name": "ContDiffWithinAt.inversion",
"code": "protected theorem ContDiffWithinAt.inversion (hc : ContDiffWithinAt ℝ n c s a)\n (hR : ContDiffWithinAt ℝ n R s a) (hx : ContDiffWithinAt ℝ n x s a) (hne : x a ≠ c a) :\n ContDiffWithinAt ℝ n (fun a ↦ inversion (c a) (R a) (x a)) s a",
"start": [
38,
1
],
"end": [
41,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffOn.inversion",
"code": "protected theorem ContDiffOn.inversion (hc : ContDiffOn ℝ n c s) (hR : ContDiffOn ℝ n R s)\n (hx : ContDiffOn ℝ n x s) (hne : ∀ a ∈ s, x a ≠ c a) :\n ContDiffOn ℝ n (fun a ↦ inversion (c a) (R a) (x a)) s",
"start": [
43,
1
],
"end": [
46,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.inversion",
"code": "protected nonrec theorem ContDiffAt.inversion (hc : ContDiffAt ℝ n c a) (hR : ContDiffAt ℝ n R a)\n (hx : ContDiffAt ℝ n x a) (hne : x a ≠ c a) :\n ContDiffAt ℝ n (fun a ↦ inversion (c a) (R a) (x a)) a",
"start": [
48,
1
],
"end": [
51,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiff.inversion",
"code": "protected nonrec theorem ContDiff.inversion (hc : ContDiff ℝ n c) (hR : ContDiff ℝ n R)\n (hx : ContDiff ℝ n x) (hne : ∀ a, x a ≠ c a) :\n ContDiff ℝ n (fun a ↦ inversion (c a) (R a) (x a))",
"start": [
53,
1
],
"end": [
56,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "DifferentiableWithinAt.inversion",
"code": "protected theorem DifferentiableWithinAt.inversion (hc : DifferentiableWithinAt ℝ c s a)\n (hR : DifferentiableWithinAt ℝ R s a) (hx : DifferentiableWithinAt ℝ x s a) (hne : x a ≠ c a) :\n DifferentiableWithinAt ℝ (fun a ↦ inversion (c a) (R a) (x a)) s a",
"start": [
58,
1
],
"end": [
62,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "DifferentiableOn.inversion",
"code": "protected theorem DifferentiableOn.inversion (hc : DifferentiableOn ℝ c s)\n (hR : DifferentiableOn ℝ R s) (hx : DifferentiableOn ℝ x s) (hne : ∀ a ∈ s, x a ≠ c a) :\n DifferentiableOn ℝ (fun a ↦ inversion (c a) (R a) (x a)) s",
"start": [
64,
1
],
"end": [
67,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "DifferentiableAt.inversion",
"code": "protected theorem DifferentiableAt.inversion (hc : DifferentiableAt ℝ c a)\n (hR : DifferentiableAt ℝ R a) (hx : DifferentiableAt ℝ x a) (hne : x a ≠ c a) :\n DifferentiableAt ℝ (fun a ↦ inversion (c a) (R a) (x a)) a",
"start": [
69,
1
],
"end": [
73,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Differentiable.inversion",
"code": "protected theorem Differentiable.inversion (hc : Differentiable ℝ c)\n (hR : Differentiable ℝ R) (hx : Differentiable ℝ x) (hne : ∀ a, x a ≠ c a) :\n Differentiable ℝ (fun a ↦ inversion (c a) (R a) (x a))",
"start": [
75,
1
],
"end": [
78,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "EuclideanGeometry.hasFDerivAt_inversion",
"code": "theorem hasFDerivAt_inversion (hx : x ≠ c) :\n HasFDerivAt (inversion c R)\n ((R / dist x c) ^ 2 • (reflection (ℝ ∙ (x - c))ᗮ : F →L[ℝ] F)) x",
"start": [
86,
1
],
"end": [
108,
67
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Array/ExtractLemmas.lean | [
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "Array.extract_eq_nil_of_start_eq_end",
"code": "@[simp]\ntheorem extract_eq_nil_of_start_eq_end {a : Array α} :\n a.extract i i = #[]",
"start": [
15,
1
],
"end": [
19,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Array.extract_append_left",
"code": "theorem extract_append_left {a b : Array α} {i j : Nat} (h : j ≤ a.size) :\n (a ++ b).extract i j = a.extract i j",
"start": [
21,
1
],
"end": [
27,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Array.extract_append_right",
"code": "theorem extract_append_right {a b : Array α} {i j : Nat} (h : a.size ≤ i) :\n (a ++ b).extract i j = b.extract (i - a.size) (j - a.size)",
"start": [
29,
1
],
"end": [
38,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "Array.extract_eq_of_size_le_end",
"code": "theorem extract_eq_of_size_le_end {a : Array α} (h : a.size ≤ l) :\n a.extract p l = a.extract p a.size",
"start": [
40,
1
],
"end": [
42,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "Array.extract_extract",
"code": "theorem extract_extract {a : Array α} (h : s1 + e2 ≤ e1) :\n (a.extract s1 e1).extract s2 e2 = a.extract (s1 + s2) (s1 + e2)",
"start": [
44,
1
],
"end": [
50,
43
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Limits/FullSubcategory.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Limits/Creates.lean"
] | [
{
"full_name": "CategoryTheory.Limits.ClosedUnderLimitsOfShape",
"code": "def ClosedUnderLimitsOfShape {C : Type u} [Category.{v} C] (J : Type w) [Category.{w'} J]\n (P : C → Prop) : Prop :=\n ∀ ⦃F : J ⥤ C⦄ ⦃c : Cone F⦄ (_hc : IsLimit c), (∀ j, P (F.obj j)) → P c.pt",
"start": [
28,
1
],
"end": [
32,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.ClosedUnderColimitsOfShape",
"code": "def ClosedUnderColimitsOfShape {C : Type u} [Category.{v} C] (J : Type w) [Category.{w'} J]\n (P : C → Prop) : Prop :=\n ∀ ⦃F : J ⥤ C⦄ ⦃c : Cocone F⦄ (_hc : IsColimit c), (∀ j, P (F.obj j)) → P c.pt",
"start": [
35,
1
],
"end": [
39,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.ClosedUnderLimitsOfShape.limit",
"code": "theorem ClosedUnderLimitsOfShape.limit (h : ClosedUnderLimitsOfShape J P) {F : J ⥤ C} [HasLimit F] :\n (∀ j, P (F.obj j)) → P (limit F)",
"start": [
46,
1
],
"end": [
48,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.ClosedUnderColimitsOfShape.colimit",
"code": "theorem ClosedUnderColimitsOfShape.colimit (h : ClosedUnderColimitsOfShape J P) {F : J ⥤ C}\n [HasColimit F] : (∀ j, P (F.obj j)) → P (colimit F)",
"start": [
51,
1
],
"end": [
53,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsLimitFullSubcategoryInclusion'",
"code": "def createsLimitFullSubcategoryInclusion' (F : J ⥤ FullSubcategory P)\n {c : Cone (F ⋙ fullSubcategoryInclusion P)} (hc : IsLimit c) (h : P c.pt) :\n CreatesLimit F (fullSubcategoryInclusion P) :=\n createsLimitOfFullyFaithfulOfIso' hc ⟨_, h⟩ (Iso.refl _)",
"start": [
62,
1
],
"end": [
67,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsLimitFullSubcategoryInclusion",
"code": "def createsLimitFullSubcategoryInclusion (F : J ⥤ FullSubcategory P)\n [HasLimit (F ⋙ fullSubcategoryInclusion P)] (h : P (limit (F ⋙ fullSubcategoryInclusion P))) :\n CreatesLimit F (fullSubcategoryInclusion P) :=\n createsLimitFullSubcategoryInclusion' F (limit.isLimit _) h",
"start": [
70,
1
],
"end": [
75,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsColimitFullSubcategoryInclusion'",
"code": "def createsColimitFullSubcategoryInclusion' (F : J ⥤ FullSubcategory P)\n {c : Cocone (F ⋙ fullSubcategoryInclusion P)} (hc : IsColimit c) (h : P c.pt) :\n CreatesColimit F (fullSubcategoryInclusion P) :=\n createsColimitOfFullyFaithfulOfIso' hc ⟨_, h⟩ (Iso.refl _)",
"start": [
78,
1
],
"end": [
83,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsColimitFullSubcategoryInclusion",
"code": "def createsColimitFullSubcategoryInclusion (F : J ⥤ FullSubcategory P)\n [HasColimit (F ⋙ fullSubcategoryInclusion P)]\n (h : P (colimit (F ⋙ fullSubcategoryInclusion P))) :\n CreatesColimit F (fullSubcategoryInclusion P) :=\n createsColimitFullSubcategoryInclusion' F (colimit.isColimit _) h",
"start": [
86,
1
],
"end": [
92,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsLimitFullSubcategoryInclusionOfClosed",
"code": "def createsLimitFullSubcategoryInclusionOfClosed (h : ClosedUnderLimitsOfShape J P)\n (F : J ⥤ FullSubcategory P) [HasLimit (F ⋙ fullSubcategoryInclusion P)] :\n CreatesLimit F (fullSubcategoryInclusion P) :=\n createsLimitFullSubcategoryInclusion F (h.limit fun j => (F.obj j).property)",
"start": [
95,
1
],
"end": [
99,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsLimitsOfShapeFullSubcategoryInclusion",
"code": "def createsLimitsOfShapeFullSubcategoryInclusion (h : ClosedUnderLimitsOfShape J P)\n [HasLimitsOfShape J C] : CreatesLimitsOfShape J (fullSubcategoryInclusion P) where\n CreatesLimit := @fun F => createsLimitFullSubcategoryInclusionOfClosed h F",
"start": [
102,
1
],
"end": [
105,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.hasLimit_of_closedUnderLimits",
"code": "theorem hasLimit_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)\n (F : J ⥤ FullSubcategory P) [HasLimit (F ⋙ fullSubcategoryInclusion P)] : HasLimit F",
"start": [
108,
1
],
"end": [
112,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.hasLimitsOfShape_of_closedUnderLimits",
"code": "theorem hasLimitsOfShape_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)\n [HasLimitsOfShape J C] : HasLimitsOfShape J (FullSubcategory P)",
"start": [
117,
1
],
"end": [
119,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsColimitFullSubcategoryInclusionOfClosed",
"code": "def createsColimitFullSubcategoryInclusionOfClosed (h : ClosedUnderColimitsOfShape J P)\n (F : J ⥤ FullSubcategory P) [HasColimit (F ⋙ fullSubcategoryInclusion P)] :\n CreatesColimit F (fullSubcategoryInclusion P) :=\n createsColimitFullSubcategoryInclusion F (h.colimit fun j => (F.obj j).property)",
"start": [
122,
1
],
"end": [
126,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.createsColimitsOfShapeFullSubcategoryInclusion",
"code": "def createsColimitsOfShapeFullSubcategoryInclusion (h : ClosedUnderColimitsOfShape J P)\n [HasColimitsOfShape J C] : CreatesColimitsOfShape J (fullSubcategoryInclusion P) where\n CreatesColimit := @fun F => createsColimitFullSubcategoryInclusionOfClosed h F",
"start": [
129,
1
],
"end": [
132,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.hasColimit_of_closedUnderColimits",
"code": "theorem hasColimit_of_closedUnderColimits (h : ClosedUnderColimitsOfShape J P)\n (F : J ⥤ FullSubcategory P) [HasColimit (F ⋙ fullSubcategoryInclusion P)] : HasColimit F",
"start": [
135,
1
],
"end": [
139,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.hasColimitsOfShape_of_closedUnderColimits",
"code": "theorem hasColimitsOfShape_of_closedUnderColimits (h : ClosedUnderColimitsOfShape J P)\n [HasColimitsOfShape J C] : HasColimitsOfShape J (FullSubcategory P)",
"start": [
144,
1
],
"end": [
146,
68
],
"kind": "commanddeclaration"
}
] |
Mathlib/Logic/Godel/GodelBetaFunction.lean | [
"Mathlib/Data/Nat/Prime.lean",
"Mathlib/Data/Nat/ChineseRemainder.lean",
"Mathlib/Data/Nat/Pairing.lean",
"Mathlib/Data/Nat/ModEq.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "Nat.coprime_mul_succ",
"code": "lemma coprime_mul_succ {n m a} (h : n ≤ m) (ha : m - n ∣ a) : Coprime (n * a + 1) (m * a + 1) :=\n Nat.coprime_of_dvd fun p pp hn hm => by\n have : p ∣ (m - n) * a := by\n simpa [Nat.succ_sub_succ, ← Nat.mul_sub_right_distrib] using\n Nat.dvd_sub (Nat.succ_le_succ $ Nat.mul_le_mul_right a h) hm hn\n have : p ∣ a := by\n rcases (Nat.Prime.dvd_mul pp).mp this with (hp | hp)\n · exact Nat.dvd_trans hp ha\n · exact hp\n apply pp.ne_one\n simpa [Nat.add_sub_cancel_left] using Nat.dvd_sub (le_add_right _ _) hn (this.mul_left n)",
"start": [
45,
1
],
"end": [
55,
94
],
"kind": "lemma"
},
{
"full_name": "Nat.supOfSeq",
"code": "private def supOfSeq (a : Fin m → ℕ) : ℕ := max m (Finset.sup .univ a) + 1",
"start": [
59,
1
],
"end": [
59,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.coprimes",
"code": "private def coprimes (a : Fin m → ℕ) : Fin m → ℕ := fun i => (i + 1) * (supOfSeq a)! + 1",
"start": [
61,
1
],
"end": [
61,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.coprimes_lt",
"code": "lemma coprimes_lt (a : Fin m → ℕ) (i) : a i < coprimes a i := by\n have h₁ : a i < supOfSeq a :=\n Nat.lt_add_one_iff.mpr (le_max_of_le_right $ Finset.le_sup (by simp))\n have h₂ : supOfSeq a ≤ (i + 1) * (supOfSeq a)! + 1 :=\n le_trans (self_le_factorial _) (le_trans (Nat.le_mul_of_pos_left (supOfSeq a)! (succ_pos i))\n (le_add_right _ _))\n simpa only [coprimes] using lt_of_lt_of_le h₁ h₂",
"start": [
63,
1
],
"end": [
69,
51
],
"kind": "lemma"
},
{
"full_name": "Nat.pairwise_coprime_coprimes",
"code": "private lemma pairwise_coprime_coprimes (a : Fin m → ℕ) : Pairwise (Coprime on coprimes a) := by\n intro i j hij\n wlog ltij : i < j\n · exact (this a hij.symm (lt_of_le_of_ne (Fin.not_lt.mp ltij) hij.symm)).symm\n unfold Function.onFun coprimes\n have hja : j < supOfSeq a := lt_of_lt_of_le j.prop (le_step (le_max_left _ _))\n exact coprime_mul_succ\n (Nat.succ_le_succ $ le_of_lt ltij)\n (Nat.dvd_factorial\n (by simp [Nat.succ_sub_succ, ltij])\n (by simpa only [Nat.succ_sub_succ] using le_of_lt (lt_of_le_of_lt (sub_le j i) hja)))",
"start": [
71,
1
],
"end": [
81,
92
],
"kind": "lemma"
},
{
"full_name": "Nat.beta",
"code": "def beta (n i : ℕ) : ℕ := n.unpair.1 % ((i + 1) * n.unpair.2 + 1)",
"start": [
83,
1
],
"end": [
85,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.unbeta",
"code": "def unbeta (l : List ℕ) : ℕ :=\n (chineseRemainderOfFinset l.get (coprimes l.get) Finset.univ\n (by simp [coprimes])\n (by simpa using Set.pairwise_univ.mpr (pairwise_coprime_coprimes _)) : ℕ).pair\n (supOfSeq l.get)!",
"start": [
87,
1
],
"end": [
93,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.beta_unbeta_coe",
"code": "lemma beta_unbeta_coe (l : List ℕ) (i : Fin l.length) : beta (unbeta l) i = l.get i := by\n simpa [beta, unbeta, coprimes] using mod_eq_of_modEq\n ((chineseRemainderOfFinset l.get (coprimes l.get) Finset.univ\n (by simp [coprimes])\n (by simpa using Set.pairwise_univ.mpr (pairwise_coprime_coprimes _))).prop i (by simp))\n (coprimes_lt l.get _)",
"start": [
95,
1
],
"end": [
101,
26
],
"kind": "lemma"
}
] |
Mathlib/Algebra/Category/Ring/Adjunctions.lean | [
"Mathlib/Algebra/Category/Ring/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/MvPolynomial/CommRing.lean"
] | [
{
"full_name": "CommRingCat.free",
"code": "def free : Type u ⥤ CommRingCat.{u} where\n obj α := of (MvPolynomial α ℤ)\n map {X Y} f := (↑(rename f : _ →ₐ[ℤ] _) : MvPolynomial X ℤ →+* MvPolynomial Y ℤ)\n map_id _ := RingHom.ext <| rename_id\n map_comp f g := RingHom.ext fun p => (rename_rename f g p).symm",
"start": [
30,
1
],
"end": [
39,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "CommRingCat.free_obj_coe",
"code": "@[simp]\ntheorem free_obj_coe {α : Type u} : (free.obj α : Type u) = MvPolynomial α ℤ",
"start": [
42,
1
],
"end": [
44,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CommRingCat.free_map_coe",
"code": "@[simp, nolint simpNF]\ntheorem free_map_coe {α β : Type u} {f : α → β} : ⇑(free.map f) = ⇑(rename f)",
"start": [
49,
1
],
"end": [
51,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CommRingCat.adj",
"code": "def adj : free ⊣ forget CommRingCat.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun X R => homEquiv\n homEquiv_naturality_left_symm := fun {_ _ Y} f g =>\n RingHom.ext fun x => eval₂_cast_comp f (Int.castRingHom Y) g x }",
"start": [
54,
1
],
"end": [
60,
73
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Category/Cat/Limit.lean | [
"Mathlib/CategoryTheory/Limits/Preserves/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Limits/Types.lean",
"Mathlib/CategoryTheory/Category/Cat.lean"
] | [
{
"full_name": "CategoryTheory.Cat.HasLimits.categoryObjects",
"code": "instance categoryObjects {F : J ⥤ Cat.{u, u}} {j} :\n SmallCategory ((F ⋙ Cat.objects.{u, u}).obj j) :=\n (F.obj j).str",
"start": [
39,
1
],
"end": [
41,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.homDiagram",
"code": "@[simps]\ndef homDiagram {F : J ⥤ Cat.{v, v}} (X Y : limit (F ⋙ Cat.objects.{v, v})) : J ⥤ Type v where\n obj j := limit.π (F ⋙ Cat.objects) j X ⟶ limit.π (F ⋙ Cat.objects) j Y\n map f g := by\n refine eqToHom ?_ ≫ (F.map f).map g ≫ eqToHom ?_\n · exact (congr_fun (limit.w (F ⋙ Cat.objects) f) X).symm\n · exact congr_fun (limit.w (F ⋙ Cat.objects) f) Y\n map_id X := by\n funext f\n letI : Category (objects.obj (F.obj X)) := (inferInstance : Category (F.obj X))\n simp [Functor.congr_hom (F.map_id X) f]\n map_comp {_ _ Z} f g := by\n funext h\n letI : Category (objects.obj (F.obj Z)) := (inferInstance : Category (F.obj Z))\n simp [Functor.congr_hom (F.map_comp f g) h, eqToHom_map]",
"start": [
45,
1
],
"end": [
61,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.limitConeX",
"code": "@[simps]\ndef limitConeX (F : J ⥤ Cat.{v, v}) : Cat.{v, v} where α := limit (F ⋙ Cat.objects)",
"start": [
81,
1
],
"end": [
83,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.limitCone",
"code": "@[simps]\ndef limitCone (F : J ⥤ Cat.{v, v}) : Cone F where\n pt := limitConeX F\n π :=\n { app := fun j =>\n { obj := limit.π (F ⋙ Cat.objects) j\n map := fun f => limit.π (homDiagram _ _) j f }\n naturality := fun j j' f =>\n CategoryTheory.Functor.ext (fun X => (congr_fun (limit.w (F ⋙ Cat.objects) f) X).symm)\n fun X Y h => (congr_fun (limit.w (homDiagram X Y) f) h).symm }",
"start": [
87,
1
],
"end": [
97,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.limitConeLift",
"code": "@[simps]\ndef limitConeLift (F : J ⥤ Cat.{v, v}) (s : Cone F) : s.pt ⟶ limitConeX F where\n obj :=\n limit.lift (F ⋙ Cat.objects)\n { pt := s.pt\n π :=\n { app := fun j => (s.π.app j).obj\n naturality := fun _ _ f => objects.congr_map (s.π.naturality f) } }\n map f := by\n fapply Types.Limit.mk.{v, v}\n · intro j\n refine eqToHom ?_ ≫ (s.π.app j).map f ≫ eqToHom ?_ <;> simp\n · intro j j' h\n dsimp\n simp only [Category.assoc, Functor.map_comp, eqToHom_map, eqToHom_trans,\n eqToHom_trans_assoc, ← Functor.comp_map]\n have := (s.π.naturality h).symm\n dsimp at this\n rw [Category.id_comp] at this\n erw [Functor.congr_hom this f]\n simp",
"start": [
101,
1
],
"end": [
122,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.limit_π_homDiagram_eqToHom",
"code": "@[simp]\ntheorem limit_π_homDiagram_eqToHom {F : J ⥤ Cat.{v, v}} (X Y : limit (F ⋙ Cat.objects.{v, v}))\n (j : J) (h : X = Y) :\n limit.π (homDiagram X Y) j (eqToHom h) =\n eqToHom (congr_arg (limit.π (F ⋙ Cat.objects.{v, v}) j) h)",
"start": [
126,
1
],
"end": [
132,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Cat.HasLimits.limitConeIsLimit",
"code": "def limitConeIsLimit (F : J ⥤ Cat.{v, v}) : IsLimit (limitCone F) where\n lift := limitConeLift F\n fac s j := CategoryTheory.Functor.ext (by simp) fun X Y f => by\n dsimp [limitConeLift]\n exact Types.Limit.π_mk.{v, v} _ _ _ _\n uniq s m w := by\n symm\n refine CategoryTheory.Functor.ext ?_ ?_\n · intro X\n apply Types.limit_ext.{v, v}\n intro j\n simp [Types.Limit.lift_π_apply', ← w j]\n · intro X Y f\n dsimp\n simp [fun j => Functor.congr_hom (w j).symm f]",
"start": [
136,
1
],
"end": [
151,
53
],
"kind": "commanddeclaration"
}
] |
Mathlib/Testing/SlimCheck/Functions.lean | [
"Mathlib/Testing/SlimCheck/Sampleable.lean",
"Mathlib/Data/Finsupp/Defs.lean",
"Mathlib/Testing/SlimCheck/Testable.lean",
"Mathlib/Data/Finsupp/ToDFinsupp.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/List/Sigma.lean",
"Mathlib/Data/Int/Range.lean"
] | [
{
"full_name": "SlimCheck.TotalFunction",
"code": "inductive TotalFunction (α : Type u) (β : Type v) : Type max u v\n | withDefault : List (Σ _ : α, β) → β → TotalFunction α β",
"start": [
58,
1
],
"end": [
69,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.inhabited",
"code": "instance TotalFunction.inhabited [Inhabited β] : Inhabited (TotalFunction α β) :=\n ⟨TotalFunction.withDefault ∅ default⟩",
"start": [
73,
1
],
"end": [
74,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.comp",
"code": "def comp {γ : Type w} (f : β → γ) : TotalFunction α β → TotalFunction α γ\n | TotalFunction.withDefault m y => TotalFunction.withDefault\n (m.map <| Sigma.map id fun _ => f) (f y)",
"start": [
80,
1
],
"end": [
83,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.apply",
"code": "def apply [DecidableEq α] : TotalFunction α β → α → β\n | TotalFunction.withDefault m y, x => (m.dlookup x).getD y",
"start": [
85,
1
],
"end": [
87,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.reprAux",
"code": "def reprAux [Repr α] [Repr β] (m : List (Σ _ : α, β)) : String :=\n String.join <|\n Array.toList <| Array.qsort (lt := fun x y => x < y)\n (m.map fun x => s!\"{(repr <| Sigma.fst x)} ↦ {repr <| Sigma.snd x}, \").toArray",
"start": [
90,
1
],
"end": [
99,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.repr",
"code": "protected def repr [Repr α] [Repr β] : TotalFunction α β → String\n | TotalFunction.withDefault m y => s!\"[{(reprAux m)}_ ↦ {repr y}]\"",
"start": [
102,
1
],
"end": [
106,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.List.toFinmap'",
"code": "def List.toFinmap' (xs : List (α × β)) : List (Σ _ : α, β) :=\n xs.map Prod.toSigma",
"start": [
112,
1
],
"end": [
114,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.shrink",
"code": "def shrink {α β} [DecidableEq α] [Shrinkable α] [Shrinkable β] :\n TotalFunction α β → List (TotalFunction α β)\n | ⟨m, x⟩ => (Shrinkable.shrink (m, x)).map fun ⟨m', x'⟩ => ⟨List.dedupKeys m', x'⟩",
"start": [
135,
1
],
"end": [
138,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.Pi.sampleableExt",
"code": "instance Pi.sampleableExt : SampleableExt (α → β) where\n proxy := TotalFunction α (SampleableExt.proxy β)\n interp f := SampleableExt.interp ∘ f.apply\n sample := do\n let xs : List (_ × _) ← (SampleableExt.sample (α := List (α × β)))\n let ⟨x⟩ ← ULiftable.up.{max u ub} <| (SampleableExt.sample : Gen (SampleableExt.proxy β))\n pure <| TotalFunction.withDefault (List.toFinmap' <| xs.map <|\n Prod.map SampleableExt.interp id) x\n shrink := { shrink := letI : Shrinkable α := {}; TotalFunction.shrink }",
"start": [
143,
1
],
"end": [
152,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.zeroDefault",
"code": "@[simp]\ndef zeroDefault : TotalFunction α β → TotalFunction α β\n | withDefault A _ => withDefault A 0",
"start": [
161,
1
],
"end": [
164,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.zeroDefaultSupp",
"code": "@[simp]\ndef zeroDefaultSupp : TotalFunction α β → Finset α\n | withDefault A _ =>\n List.toFinset <| (A.dedupKeys.filter fun ab => Sigma.snd ab ≠ 0).map Sigma.fst",
"start": [
169,
1
],
"end": [
173,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.applyFinsupp",
"code": "def applyFinsupp (tf : TotalFunction α β) : α →₀ β where\n support := zeroDefaultSupp tf\n toFun := tf.zeroDefault.apply\n mem_support_toFun := by\n intro a\n rcases tf with ⟨A, y⟩\n simp only [apply, zeroDefaultSupp, List.mem_map, List.mem_filter, exists_and_right,\n List.mem_toFinset, exists_eq_right, Sigma.exists, Ne, zeroDefault]\n constructor\n · rintro ⟨od, hval, hod⟩\n have := List.mem_dlookup (List.nodupKeys_dedupKeys A) hval\n rw [(_ : List.dlookup a A = od)]\n · simpa using hod\n · simpa [List.dlookup_dedupKeys]\n · intro h\n use (A.dlookup a).getD (0 : β)\n rw [← List.dlookup_dedupKeys] at h ⊢\n simp only [h, ← List.mem_dlookup_iff A.nodupKeys_dedupKeys, and_true_iff, not_false_iff,\n Option.mem_def]\n cases haA : List.dlookup a A.dedupKeys\n · simp [haA] at h\n · simp",
"start": [
176,
1
],
"end": [
199,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.Finsupp.sampleableExt",
"code": "instance Finsupp.sampleableExt : SampleableExt (α →₀ β) where\n proxy := TotalFunction α (SampleableExt.proxy β)\n interp := fun f => (f.comp SampleableExt.interp).applyFinsupp\n sample := SampleableExt.sample (α := α → β)\n shrink := { shrink := letI : Shrinkable α := {}; TotalFunction.shrink }",
"start": [
204,
1
],
"end": [
209,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.DFinsupp.sampleableExt",
"code": "instance DFinsupp.sampleableExt : SampleableExt (Π₀ _ : α, β) where\n proxy := TotalFunction α (SampleableExt.proxy β)\n interp := fun f => (f.comp SampleableExt.interp).applyFinsupp.toDFinsupp\n sample := SampleableExt.sample (α := α → β)\n shrink := { shrink := letI : Shrinkable α := {}; TotalFunction.shrink }",
"start": [
213,
1
],
"end": [
218,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.PiPred.sampleableExt",
"code": "instance (priority := 2000) PiPred.sampleableExt [SampleableExt (α → Bool)] :\n SampleableExt.{u + 1} (α → Prop) where\n proxy := proxy (α → Bool)\n interp m x := interp m x\n sample := sample\n shrink := SampleableExt.shrink",
"start": [
227,
1
],
"end": [
232,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.TotalFunction.PiUncurry.sampleableExt",
"code": "instance (priority := 2000) PiUncurry.sampleableExt [SampleableExt (α × β → γ)] :\n SampleableExt.{imax (u + 1) (v + 1) w} (α → β → γ) where\n proxy := proxy (α × β → γ)\n interp m x y := interp m (x, y)\n sample := sample\n shrink := SampleableExt.shrink",
"start": [
235,
1
],
"end": [
240,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction",
"code": "inductive InjectiveFunction (α : Type u) : Type u\n | mapToSelf (xs : List (Σ _ : α, α)) :\n xs.map Sigma.fst ~ xs.map Sigma.snd → List.Nodup (xs.map Sigma.snd) → InjectiveFunction α",
"start": [
256,
1
],
"end": [
268,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.apply",
"code": "def apply [DecidableEq α] : InjectiveFunction α → α → α\n | InjectiveFunction.mapToSelf m _ _, x => (m.dlookup x).getD x",
"start": [
277,
1
],
"end": [
279,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.repr",
"code": "protected def repr [Repr α] : InjectiveFunction α → String\n | InjectiveFunction.mapToSelf m _ _ => s! \"[{TotalFunction.reprAux m}x ↦ x]\"",
"start": [
282,
1
],
"end": [
288,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.List.applyId",
"code": "def List.applyId [DecidableEq α] (xs : List (α × α)) (x : α) : α :=\n ((xs.map Prod.toSigma).dlookup x).getD x",
"start": [
294,
1
],
"end": [
297,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.List.applyId_cons",
"code": "@[simp]\ntheorem List.applyId_cons [DecidableEq α] (xs : List (α × α)) (x y z : α) :\n List.applyId ((y, z)::xs) x = if y = x then z else List.applyId xs x",
"start": [
300,
1
],
"end": [
304,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.List.applyId_zip_eq",
"code": "theorem List.applyId_zip_eq [DecidableEq α] {xs ys : List α} (h₀ : List.Nodup xs)\n (h₁ : xs.length = ys.length) (x y : α) (i : ℕ) (h₂ : xs[i]? = some x) :\n List.applyId.{u} (xs.zip ys) x = y ↔ ys[i]? = some y",
"start": [
312,
1
],
"end": [
331,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.applyId_mem_iff",
"code": "theorem applyId_mem_iff [DecidableEq α] {xs ys : List α} (h₀ : List.Nodup xs) (h₁ : xs ~ ys)\n (x : α) : List.applyId.{u} (xs.zip ys) x ∈ ys ↔ x ∈ xs",
"start": [
334,
1
],
"end": [
365,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.List.applyId_eq_self",
"code": "theorem List.applyId_eq_self [DecidableEq α] {xs ys : List α} (x : α) :\n x ∉ xs → List.applyId.{u} (xs.zip ys) x = x",
"start": [
368,
1
],
"end": [
377,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.applyId_injective",
"code": "theorem applyId_injective [DecidableEq α] {xs ys : List α} (h₀ : List.Nodup xs) (h₁ : xs ~ ys) :\n Injective.{u + 1, u + 1} (List.applyId (xs.zip ys))",
"start": [
380,
1
],
"end": [
404,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.Perm.slice",
"code": "def Perm.slice [DecidableEq α] (n m : ℕ) :\n (Σ' xs ys : List α, xs ~ ys ∧ ys.Nodup) → Σ' xs ys : List α, xs ~ ys ∧ ys.Nodup\n | ⟨xs, ys, h, h'⟩ =>\n let xs' := List.dropSlice n m xs\n have h₀ : xs' ~ ys.inter xs' := List.Perm.dropSlice_inter _ _ h h'\n ⟨xs', ys.inter xs', h₀, h'.inter _⟩",
"start": [
411,
1
],
"end": [
419,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.sliceSizes",
"code": "def sliceSizes : ℕ → LazyList ℕ+\n | n =>\n if h : 0 < n then\n have : n / 2 < n := Nat.div_lt_self h (by decide : 1 < 2)\n LazyList.cons ⟨_, h⟩ (sliceSizes <| n / 2)\n else LazyList.nil",
"start": [
422,
1
],
"end": [
430,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.shrinkPerm",
"code": "protected def shrinkPerm {α : Type} [DecidableEq α] :\n (Σ' xs ys : List α, xs ~ ys ∧ ys.Nodup) → List (Σ' xs ys : List α, xs ~ ys ∧ ys.Nodup)\n | xs => do\n let k := xs.1.length\n let n ← (sliceSizes k).toList\n let i ← List.finRange <| k / n\n pure <| Perm.slice (i * n) n xs",
"start": [
433,
1
],
"end": [
445,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.shrink",
"code": "protected def shrink {α : Type} [DecidableEq α] :\n InjectiveFunction α → List (InjectiveFunction α)\n | ⟨xs, h₀, h₁⟩ => do\n let ⟨xs', ys', h₀, h₁⟩ ← InjectiveFunction.shrinkPerm ⟨_, _, h₀, h₁⟩\n have h₃ : xs'.length ≤ ys'.length := le_of_eq (List.Perm.length_eq h₀)\n have h₄ : ys'.length ≤ xs'.length := le_of_eq (List.Perm.length_eq h₀.symm)\n pure\n ⟨(List.zip xs' ys').map Prod.toSigma,\n by simp only [comp, List.map_fst_zip, List.map_snd_zip, *, Prod.fst_toSigma,\n Prod.snd_toSigma, List.map_map],\n by simp only [comp, List.map_snd_zip, *, Prod.snd_toSigma, List.map_map]⟩",
"start": [
454,
1
],
"end": [
468,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.mk",
"code": "protected def mk (xs ys : List α) (h : xs ~ ys) (h' : ys.Nodup) : InjectiveFunction α :=\n have h₀ : xs.length ≤ ys.length := le_of_eq h.length_eq\n have h₁ : ys.length ≤ xs.length := le_of_eq h.length_eq.symm\n InjectiveFunction.mapToSelf (List.toFinmap' (xs.zip ys))\n (by\n simp only [List.toFinmap', comp, List.map_fst_zip, List.map_snd_zip, *, Prod.fst_toSigma,\n Prod.snd_toSigma, List.map_map])\n (by simp only [List.toFinmap', comp, List.map_snd_zip, *, Prod.snd_toSigma, List.map_map])",
"start": [
471,
1
],
"end": [
479,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.injective",
"code": "protected theorem injective [DecidableEq α] (f : InjectiveFunction α) : Injective (apply f)",
"start": [
482,
1
],
"end": [
499,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.InjectiveFunction.PiInjective.sampleableExt",
"code": "instance PiInjective.sampleableExt : SampleableExt { f : ℤ → ℤ // Function.Injective f } where\n proxy := InjectiveFunction ℤ\n interp f := ⟨apply f, f.injective⟩\n sample := do\n let ⟨sz⟩ ← ULiftable.up Gen.getSize\n let xs' := Int.range (-(2 * sz + 2)) (2 * sz + 2)\n let ys ← Gen.permutationOf xs'\n have Hinj : Injective fun r : ℕ => -(2 * sz + 2 : ℤ) + ↑r := fun _x _y h =>\n Int.ofNat.inj (add_right_injective _ h)\n let r : InjectiveFunction ℤ :=\n InjectiveFunction.mk.{0} xs' ys.1 ys.2 (ys.2.nodup_iff.1 <| (List.nodup_range _).map Hinj)\n pure r\n shrink := {shrink := @InjectiveFunction.shrink ℤ _ }",
"start": [
502,
1
],
"end": [
514,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.Injective.testable",
"code": "instance Injective.testable (f : α → β)\n [I : Testable (NamedBinder \"x\" <|\n ∀ x : α, NamedBinder \"y\" <| ∀ y : α, NamedBinder \"H\" <| f x = f y → x = y)] :\n Testable (Injective f) :=\n I",
"start": [
521,
1
],
"end": [
525,
4
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.Monotone.testable",
"code": "instance Monotone.testable [Preorder α] [Preorder β] (f : α → β)\n [I : Testable (NamedBinder \"x\" <|\n ∀ x : α, NamedBinder \"y\" <| ∀ y : α, NamedBinder \"H\" <| x ≤ y → f x ≤ f y)] :\n Testable (Monotone f) :=\n I",
"start": [
528,
1
],
"end": [
532,
4
],
"kind": "commanddeclaration"
},
{
"full_name": "SlimCheck.Antitone.testable",
"code": "instance Antitone.testable [Preorder α] [Preorder β] (f : α → β)\n [I : Testable (NamedBinder \"x\" <|\n ∀ x : α, NamedBinder \"y\" <| ∀ y : α, NamedBinder \"H\" <| x ≤ y → f y ≤ f x)] :\n Testable (Antitone f) :=\n I",
"start": [
535,
1
],
"end": [
539,
4
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/List/Sections.lean | [
"Mathlib/Data/List/Forall2.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "List.mem_sections",
"code": "theorem mem_sections {L : List (List α)} {f} : f ∈ sections L ↔ Forall₂ (· ∈ ·) f L",
"start": [
23,
1
],
"end": [
34,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "List.mem_sections_length",
"code": "theorem mem_sections_length {L : List (List α)} {f} (h : f ∈ sections L) : length f = length L",
"start": [
37,
1
],
"end": [
38,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "List.rel_sections",
"code": "theorem rel_sections {r : α → β → Prop} :\n (Forall₂ (Forall₂ r) ⇒ Forall₂ (Forall₂ r)) sections sections",
"start": [
41,
1
],
"end": [
45,
91
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Calculus/Implicit.lean | [
"Mathlib/Analysis/Calculus/FDeriv/Add.lean",
"Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean",
"Mathlib/Analysis/Calculus/FDeriv/Prod.lean",
"Mathlib/Analysis/NormedSpace/Complemented.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "ImplicitFunctionData",
"code": "structure ImplicitFunctionData (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)\n [NormedAddCommGroup E] [NormedSpace 𝕜 E] [CompleteSpace E] (F : Type*) [NormedAddCommGroup F]\n [NormedSpace 𝕜 F] [CompleteSpace F] (G : Type*) [NormedAddCommGroup G] [NormedSpace 𝕜 G]\n [CompleteSpace G] where\n leftFun : E → F\n leftDeriv : E →L[𝕜] F\n rightFun : E → G\n rightDeriv : E →L[𝕜] G\n pt : E\n left_has_deriv : HasStrictFDerivAt leftFun leftDeriv pt\n right_has_deriv : HasStrictFDerivAt rightFun rightDeriv pt\n left_range : range leftDeriv = ⊤\n right_range : range rightDeriv = ⊤\n isCompl_ker : IsCompl (ker leftDeriv) (ker rightDeriv)",
"start": [
93,
1
],
"end": [
113,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.prodFun",
"code": "def prodFun (x : E) : F × G :=\n (φ.leftFun x, φ.rightFun x)",
"start": [
123,
1
],
"end": [
125,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.prodFun_apply",
"code": "@[simp]\ntheorem prodFun_apply (x : E) : φ.prodFun x = (φ.leftFun x, φ.rightFun x)",
"start": [
128,
1
],
"end": [
130,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.hasStrictFDerivAt",
"code": "protected theorem hasStrictFDerivAt :\n HasStrictFDerivAt φ.prodFun\n (φ.leftDeriv.equivProdOfSurjectiveOfIsCompl φ.rightDeriv φ.left_range φ.right_range\n φ.isCompl_ker :\n E →L[𝕜] F × G)\n φ.pt",
"start": [
133,
1
],
"end": [
139,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.toPartialHomeomorph",
"code": "def toPartialHomeomorph : PartialHomeomorph E (F × G) :=\n φ.hasStrictFDerivAt.toPartialHomeomorph _",
"start": [
142,
1
],
"end": [
147,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.implicitFunction",
"code": "def implicitFunction : F → G → E :=\n Function.curry <| φ.toPartialHomeomorph.symm",
"start": [
150,
1
],
"end": [
155,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.toPartialHomeomorph_coe",
"code": "@[simp]\ntheorem toPartialHomeomorph_coe : ⇑φ.toPartialHomeomorph = φ.prodFun",
"start": [
158,
1
],
"end": [
160,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.toPartialHomeomorph_apply",
"code": "theorem toPartialHomeomorph_apply (x : E) : φ.toPartialHomeomorph x = (φ.leftFun x, φ.rightFun x)",
"start": [
163,
1
],
"end": [
164,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.pt_mem_toPartialHomeomorph_source",
"code": "theorem pt_mem_toPartialHomeomorph_source : φ.pt ∈ φ.toPartialHomeomorph.source",
"start": [
167,
1
],
"end": [
168,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.map_pt_mem_toPartialHomeomorph_target",
"code": "theorem map_pt_mem_toPartialHomeomorph_target :\n (φ.leftFun φ.pt, φ.rightFun φ.pt) ∈ φ.toPartialHomeomorph.target",
"start": [
171,
1
],
"end": [
173,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.prod_map_implicitFunction",
"code": "theorem prod_map_implicitFunction :\n ∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.prodFun (φ.implicitFunction p.1 p.2) = p",
"start": [
176,
1
],
"end": [
178,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.left_map_implicitFunction",
"code": "theorem left_map_implicitFunction :\n ∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.leftFun (φ.implicitFunction p.1 p.2) = p.1",
"start": [
181,
1
],
"end": [
183,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.right_map_implicitFunction",
"code": "theorem right_map_implicitFunction :\n ∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.rightFun (φ.implicitFunction p.1 p.2) = p.2",
"start": [
186,
1
],
"end": [
188,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.implicitFunction_apply_image",
"code": "theorem implicitFunction_apply_image :\n ∀ᶠ x in 𝓝 φ.pt, φ.implicitFunction (φ.leftFun x) (φ.rightFun x) = x",
"start": [
191,
1
],
"end": [
193,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.map_nhds_eq",
"code": "theorem map_nhds_eq : map φ.leftFun (𝓝 φ.pt) = 𝓝 (φ.leftFun φ.pt)",
"start": [
196,
1
],
"end": [
198,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "ImplicitFunctionData.implicitFunction_hasStrictFDerivAt",
"code": "theorem implicitFunction_hasStrictFDerivAt (g'inv : G →L[𝕜] E)\n (hg'inv : φ.rightDeriv.comp g'inv = ContinuousLinearMap.id 𝕜 G)\n (hg'invf : φ.leftDeriv.comp g'inv = 0) :\n HasStrictFDerivAt (φ.implicitFunction (φ.leftFun φ.pt)) g'inv (φ.rightFun φ.pt)",
"start": [
201,
1
],
"end": [
214,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitFunctionDataOfComplemented",
"code": "@[simp]\ndef implicitFunctionDataOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) : ImplicitFunctionData 𝕜 E F (ker f') where\n leftFun := f\n leftDeriv := f'\n rightFun x := Classical.choose hker (x - a)\n rightDeriv := Classical.choose hker\n pt := a\n left_has_deriv := hf\n right_has_deriv :=\n (Classical.choose hker).hasStrictFDerivAt.comp a ((hasStrictFDerivAt_id a).sub_const a)\n left_range := hf'\n right_range := LinearMap.range_eq_of_proj (Classical.choose_spec hker)\n isCompl_ker := LinearMap.isCompl_of_proj (Classical.choose_spec hker)",
"start": [
245,
1
],
"end": [
260,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented",
"code": "def implicitToPartialHomeomorphOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) : PartialHomeomorph E (F × ker f') :=\n (implicitFunctionDataOfComplemented f f' hf hf' hker).toPartialHomeomorph",
"start": [
263,
1
],
"end": [
267,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitFunctionOfComplemented",
"code": "def implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) : F → ker f' → E :=\n (implicitFunctionDataOfComplemented f f' hf hf' hker).implicitFunction",
"start": [
270,
1
],
"end": [
273,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented_fst",
"code": "@[simp]\ntheorem implicitToPartialHomeomorphOfComplemented_fst (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (x : E) :\n (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker x).fst = f x",
"start": [
278,
1
],
"end": [
282,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented_apply",
"code": "theorem implicitToPartialHomeomorphOfComplemented_apply (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (y : E) :\n hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker y =\n (f y, Classical.choose hker (y - a))",
"start": [
285,
1
],
"end": [
289,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented_apply_ker",
"code": "@[simp]\ntheorem implicitToPartialHomeomorphOfComplemented_apply_ker (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (y : ker f') :\n hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker (y + a) = (f (y + a), y)",
"start": [
292,
1
],
"end": [
297,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented_self",
"code": "@[simp]\ntheorem implicitToPartialHomeomorphOfComplemented_self (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) :\n hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker a = (f a, 0)",
"start": [
300,
1
],
"end": [
304,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.mem_implicitToPartialHomeomorphOfComplemented_source",
"code": "theorem mem_implicitToPartialHomeomorphOfComplemented_source (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) :\n a ∈ (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker).source",
"start": [
307,
1
],
"end": [
310,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.mem_implicitToPartialHomeomorphOfComplemented_target",
"code": "theorem mem_implicitToPartialHomeomorphOfComplemented_target (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) :\n (f a, (0 : ker f')) ∈ (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker).target",
"start": [
313,
1
],
"end": [
318,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.map_implicitFunctionOfComplemented_eq",
"code": "theorem map_implicitFunctionOfComplemented_eq (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) :\n ∀ᶠ p : F × ker f' in 𝓝 (f a, 0),\n f (hf.implicitFunctionOfComplemented f f' hf' hker p.1 p.2) = p.1",
"start": [
321,
1
],
"end": [
328,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.eq_implicitFunctionOfComplemented",
"code": "theorem eq_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) :\n ∀ᶠ x in 𝓝 a, hf.implicitFunctionOfComplemented f f' hf' hker (f x)\n (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker x).snd = x",
"start": [
331,
1
],
"end": [
337,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitFunctionOfComplemented_apply_image",
"code": "@[simp]\ntheorem implicitFunctionOfComplemented_apply_image (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) :\n hf.implicitFunctionOfComplemented f f' hf' hker (f a) 0 = a",
"start": [
340,
1
],
"end": [
346,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.to_implicitFunctionOfComplemented",
"code": "theorem to_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (hker : (ker f').ClosedComplemented) :\n HasStrictFDerivAt (hf.implicitFunctionOfComplemented f f' hf' hker (f a))\n (ker f').subtypeL 0",
"start": [
349,
1
],
"end": [
366,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorph",
"code": "def implicitToPartialHomeomorph (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n PartialHomeomorph E (F × ker f') :=\n haveI := FiniteDimensional.complete 𝕜 F\n hf.implicitToPartialHomeomorphOfComplemented f f' hf'\n f'.ker_closedComplemented_of_finiteDimensional_range",
"start": [
394,
1
],
"end": [
400,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitFunction",
"code": "def implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) : F → ker f' → E :=\n Function.curry <| (hf.implicitToPartialHomeomorph f f' hf').symm",
"start": [
403,
1
],
"end": [
405,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorph_fst",
"code": "@[simp]\ntheorem implicitToPartialHomeomorph_fst (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (x : E) : (hf.implicitToPartialHomeomorph f f' hf' x).fst = f x",
"start": [
410,
1
],
"end": [
413,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorph_apply_ker",
"code": "@[simp]\ntheorem implicitToPartialHomeomorph_apply_ker (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)\n (y : ker f') : hf.implicitToPartialHomeomorph f f' hf' (y + a) = (f (y + a), y)",
"start": [
416,
1
],
"end": [
421,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitToPartialHomeomorph_self",
"code": "@[simp]\ntheorem implicitToPartialHomeomorph_self (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n hf.implicitToPartialHomeomorph f f' hf' a = (f a, 0)",
"start": [
424,
1
],
"end": [
428,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.mem_implicitToPartialHomeomorph_source",
"code": "theorem mem_implicitToPartialHomeomorph_source (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) : a ∈ (hf.implicitToPartialHomeomorph f f' hf').source",
"start": [
431,
1
],
"end": [
434,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.mem_implicitToPartialHomeomorph_target",
"code": "theorem mem_implicitToPartialHomeomorph_target (hf : HasStrictFDerivAt f f' a)\n (hf' : range f' = ⊤) : (f a, (0 : ker f')) ∈ (hf.implicitToPartialHomeomorph f f' hf').target",
"start": [
437,
1
],
"end": [
440,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.tendsto_implicitFunction",
"code": "theorem tendsto_implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) {α : Type*}\n {l : Filter α} {g₁ : α → F} {g₂ : α → ker f'} (h₁ : Tendsto g₁ l (𝓝 <| f a))\n (h₂ : Tendsto g₂ l (𝓝 0)) :\n Tendsto (fun t => hf.implicitFunction f f' hf' (g₁ t) (g₂ t)) l (𝓝 a)",
"start": [
443,
1
],
"end": [
450,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.map_implicitFunction_eq",
"code": "theorem map_implicitFunction_eq (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n ∀ᶠ p : F × ker f' in 𝓝 (f a, 0), f (hf.implicitFunction f f' hf' p.1 p.2) = p.1",
"start": [
456,
1
],
"end": [
460,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.implicitFunction_apply_image",
"code": "@[simp]\ntheorem implicitFunction_apply_image (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n hf.implicitFunction f f' hf' (f a) 0 = a",
"start": [
463,
1
],
"end": [
467,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.eq_implicitFunction",
"code": "theorem eq_implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n ∀ᶠ x in 𝓝 a,\n hf.implicitFunction f f' hf' (f x) (hf.implicitToPartialHomeomorph f f' hf' x).snd = x",
"start": [
470,
1
],
"end": [
476,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "HasStrictFDerivAt.to_implicitFunction",
"code": "theorem to_implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :\n HasStrictFDerivAt (hf.implicitFunction f f' hf' (f a)) (ker f').subtypeL 0",
"start": [
479,
1
],
"end": [
482,
39
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Group/Submonoid/Units.lean | [
"Mathlib/Algebra/Group/Submonoid/Operations.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Group/Submonoid/Pointwise.lean",
"Mathlib/Algebra/Group/Subgroup/Basic.lean"
] | [
{
"full_name": "Submonoid.units",
"code": "@[to_additive \" The additive units of `S`, packaged as an additive subgroup of `AddUnits M`. \"]\ndef Submonoid.units (S : Submonoid M) : Subgroup Mˣ where\n toSubmonoid := S.comap (coeHom M) ⊓ (S.comap (coeHom M))⁻¹\n inv_mem' ha := ⟨ha.2, ha.1⟩",
"start": [
43,
1
],
"end": [
47,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Subgroup.ofUnits",
"code": "@[to_additive \" A additive subgroup of additive units represented as a additive submonoid of `M`. \"]\ndef Subgroup.ofUnits (S : Subgroup Mˣ) : Submonoid M := S.toSubmonoid.map (coeHom M)",
"start": [
49,
1
],
"end": [
51,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "Submonoid.units_mono",
"code": "@[to_additive]\nlemma Submonoid.units_mono : Monotone (Submonoid.units (M := M)) :=\n fun _ _ hST _ ⟨h₁, h₂⟩ => ⟨hST h₁, hST h₂⟩",
"start": [
53,
1
],
"end": [
55,
45
],
"kind": "lemma"
},
{
"full_name": "Submonoid.ofUnits_units_le",
"code": "@[to_additive (attr := simp)]\nlemma Submonoid.ofUnits_units_le (S : Submonoid M) : S.units.ofUnits ≤ S :=\n fun _ ⟨_, hm, he⟩ => he ▸ hm.1",
"start": [
57,
1
],
"end": [
59,
34
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_mono",
"code": "@[to_additive]\nlemma Subgroup.ofUnits_mono : Monotone (Subgroup.ofUnits (M := M)) :=\n fun _ _ hST _ ⟨x, hx, hy⟩ => ⟨x, hST hx, hy⟩",
"start": [
61,
1
],
"end": [
63,
47
],
"kind": "lemma"
},
{
"full_name": "Subgroup.units_ofUnits_eq",
"code": "@[to_additive (attr := simp)]\nlemma Subgroup.units_ofUnits_eq (S : Subgroup Mˣ) : S.ofUnits.units = S :=\n Subgroup.ext (fun _ =>\n ⟨fun ⟨⟨_, hm, he⟩, _⟩ => (Units.ext he) ▸ hm, fun hm => ⟨⟨_, hm, rfl⟩, _, S.inv_mem hm, rfl⟩⟩)",
"start": [
65,
1
],
"end": [
68,
97
],
"kind": "lemma"
},
{
"full_name": "ofUnits_units_gci",
"code": "@[to_additive \" A Galois coinsertion exists between the coercion from a additive subgroup of\nadditive units to a additive submonoid and the reduction from a additive submonoid to its unit\ngroup. \" ]\ndef ofUnits_units_gci : GaloisCoinsertion (Subgroup.ofUnits (M := M)) (Submonoid.units) :=\n GaloisCoinsertion.monotoneIntro Submonoid.units_mono Subgroup.ofUnits_mono\n Submonoid.ofUnits_units_le Subgroup.units_ofUnits_eq",
"start": [
70,
1
],
"end": [
77,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "ofUnits_units_gc",
"code": "@[to_additive]\nlemma ofUnits_units_gc : GaloisConnection (Subgroup.ofUnits (M := M)) (Submonoid.units) :=\nofUnits_units_gci.gc",
"start": [
79,
1
],
"end": [
81,
21
],
"kind": "lemma"
},
{
"full_name": "ofUnits_le_iff_le_units",
"code": "@[to_additive]\nlemma ofUnits_le_iff_le_units (S : Submonoid M) (H : Subgroup Mˣ) :\n H.ofUnits ≤ S ↔ H ≤ S.units := ofUnits_units_gc _ _",
"start": [
83,
1
],
"end": [
85,
56
],
"kind": "lemma"
},
{
"full_name": "Submonoid.mem_units_iff",
"code": "@[to_additive]\nlemma mem_units_iff (S : Submonoid M) (x : Mˣ) : x ∈ S.units ↔\n ((x : M) ∈ S ∧ ((x⁻¹ : Mˣ) : M) ∈ S) := Iff.rfl",
"start": [
91,
1
],
"end": [
93,
52
],
"kind": "lemma"
},
{
"full_name": "Submonoid.mem_units_of_val_mem_inv_val_mem",
"code": "@[to_additive]\nlemma mem_units_of_val_mem_inv_val_mem (S : Submonoid M) {x : Mˣ} (h₁ : (x : M) ∈ S)\n (h₂ : ((x⁻¹ : Mˣ) : M) ∈ S) : x ∈ S.units := ⟨h₁, h₂⟩",
"start": [
95,
1
],
"end": [
97,
58
],
"kind": "lemma"
},
{
"full_name": "Submonoid.val_mem_of_mem_units",
"code": "@[to_additive]\nlemma val_mem_of_mem_units (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) : (x : M) ∈ S := h.1",
"start": [
99,
1
],
"end": [
100,
93
],
"kind": "lemma"
},
{
"full_name": "Submonoid.inv_val_mem_of_mem_units",
"code": "@[to_additive]\nlemma inv_val_mem_of_mem_units (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) :\n ((x⁻¹ : Mˣ) : M) ∈ S := h.2",
"start": [
102,
1
],
"end": [
104,
32
],
"kind": "lemma"
},
{
"full_name": "Submonoid.coe_inv_val_mul_coe_val",
"code": "@[to_additive]\nlemma coe_inv_val_mul_coe_val (S : Submonoid M) {x : Sˣ} :\n ((x⁻¹ : Sˣ) : M) * ((x : Sˣ) : M) = 1 := DFunLike.congr_arg S.subtype x.inv_mul",
"start": [
106,
1
],
"end": [
108,
84
],
"kind": "lemma"
},
{
"full_name": "Submonoid.coe_val_mul_coe_inv_val",
"code": "@[to_additive]\nlemma coe_val_mul_coe_inv_val (S : Submonoid M) {x : Sˣ} :\n ((x : Sˣ) : M) * ((x⁻¹ : Sˣ) : M) = 1 := DFunLike.congr_arg S.subtype x.mul_inv",
"start": [
110,
1
],
"end": [
112,
84
],
"kind": "lemma"
},
{
"full_name": "Submonoid.mk_inv_mul_mk_eq_one",
"code": "@[to_additive]\nlemma mk_inv_mul_mk_eq_one (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) :\n (⟨_, h.2⟩ : S) * ⟨_, h.1⟩ = 1 := Subtype.ext x.inv_mul",
"start": [
114,
1
],
"end": [
116,
59
],
"kind": "lemma"
},
{
"full_name": "Submonoid.mk_mul_mk_inv_eq_one",
"code": "@[to_additive]\nlemma mk_mul_mk_inv_eq_one (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) :\n (⟨_, h.1⟩ : S) * ⟨_, h.2⟩ = 1 := Subtype.ext x.mul_inv",
"start": [
118,
1
],
"end": [
120,
59
],
"kind": "lemma"
},
{
"full_name": "Submonoid.mul_mem_units",
"code": "@[to_additive]\nlemma mul_mem_units (S : Submonoid M) {x y : Mˣ} (h₁ : x ∈ S.units) (h₂ : y ∈ S.units):\n x * y ∈ S.units := mul_mem h₁ h₂",
"start": [
122,
1
],
"end": [
124,
37
],
"kind": "lemma"
},
{
"full_name": "Submonoid.inv_mem_units",
"code": "@[to_additive]\nlemma inv_mem_units (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) : x⁻¹ ∈ S.units := inv_mem h",
"start": [
126,
1
],
"end": [
127,
94
],
"kind": "lemma"
},
{
"full_name": "Submonoid.inv_mem_units_iff",
"code": "@[to_additive]\nlemma inv_mem_units_iff (S : Submonoid M) {x : Mˣ} : x⁻¹ ∈ S.units ↔ x ∈ S.units := inv_mem_iff",
"start": [
129,
1
],
"end": [
130,
96
],
"kind": "lemma"
},
{
"full_name": "Submonoid.unitsEquivUnitsType",
"code": "@[to_additive \" The equivalence between the additive subgroup of additive units of\n`S` and the type of additive units of `S`. \"]\ndef unitsEquivUnitsType (S : Submonoid M) : S.units ≃* Sˣ where\n toFun := fun ⟨_, h⟩ => ⟨⟨_, h.1⟩, ⟨_, h.2⟩, S.mk_mul_mk_inv_eq_one h, S.mk_inv_mul_mk_eq_one h⟩\n invFun := fun x => ⟨⟨_, _, S.coe_val_mul_coe_inv_val, S.coe_inv_val_mul_coe_val⟩, ⟨x.1.2, x.2.2⟩⟩\n left_inv := fun _ => rfl\n right_inv := fun _ => rfl\n map_mul' := fun _ _ => rfl",
"start": [
132,
1
],
"end": [
140,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "Submonoid.units_top",
"code": "@[to_additive (attr := simp)]\nlemma units_top : (⊤ : Submonoid M).units = ⊤ := ofUnits_units_gc.u_top",
"start": [
142,
1
],
"end": [
143,
72
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_inf",
"code": "@[to_additive]\nlemma units_inf (S T : Submonoid M): (S ⊓ T).units = S.units ⊓ T.units :=\n ofUnits_units_gc.u_inf",
"start": [
145,
1
],
"end": [
147,
25
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_sInf",
"code": "@[to_additive]\nlemma units_sInf {s: Set (Submonoid M)} : (sInf s).units = ⨅ S ∈ s, S.units :=\n ofUnits_units_gc.u_sInf",
"start": [
149,
1
],
"end": [
151,
26
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_iInf",
"code": "@[to_additive]\nlemma units_iInf {ι : Sort*} (f : ι → Submonoid M) : (iInf f).units = ⨅ (i : ι), (f i).units :=\n ofUnits_units_gc.u_iInf",
"start": [
153,
1
],
"end": [
155,
26
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_iInf₂",
"code": "@[to_additive]\nlemma units_iInf₂ {ι : Sort*} {κ : ι → Sort*} (f : (i : ι) → κ i → Submonoid M) :\n (⨅ (i : ι), ⨅ (j : κ i), f i j).units = ⨅ (i : ι), ⨅ (j : κ i), (f i j).units :=\n ofUnits_units_gc.u_iInf₂",
"start": [
157,
1
],
"end": [
160,
27
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_bot",
"code": "@[to_additive (attr := simp)]\nlemma units_bot : (⊥ : Submonoid M).units = ⊥ := ofUnits_units_gci.u_bot",
"start": [
162,
1
],
"end": [
163,
73
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_surjective",
"code": "@[to_additive]\nlemma units_surjective : Function.Surjective (units (M := M)) :=\n ofUnits_units_gci.u_surjective",
"start": [
165,
1
],
"end": [
167,
33
],
"kind": "lemma"
},
{
"full_name": "Submonoid.units_left_inverse",
"code": "@[to_additive]\nlemma units_left_inverse :\n Function.LeftInverse (units (M := M)) (Subgroup.ofUnits (M := M)) :=\n ofUnits_units_gci.u_l_leftInverse",
"start": [
169,
1
],
"end": [
172,
36
],
"kind": "lemma"
},
{
"full_name": "Submonoid.unitsEquivIsUnitSubmonoid",
"code": "@[to_additive \" The equivalence between the additive subgroup of additive units of\n`S` and the additive submonoid of additive unit elements of `S`. \"]\nnoncomputable def unitsEquivIsUnitSubmonoid (S : Submonoid M) : S.units ≃* IsUnit.submonoid S :=\nS.unitsEquivUnitsType.trans unitsTypeEquivIsUnitSubmonoid",
"start": [
174,
1
],
"end": [
179,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "Subgroup.mem_ofUnits_iff",
"code": "@[to_additive]\nlemma mem_ofUnits_iff (S : Subgroup Mˣ) (x : M) : x ∈ S.ofUnits ↔ ∃ y ∈ S, y = x := Iff.rfl",
"start": [
187,
1
],
"end": [
188,
92
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_ofUnits",
"code": "@[to_additive]\nlemma mem_ofUnits (S : Subgroup Mˣ) {x : M} {y : Mˣ} (h₁ : y ∈ S) (h₂ : y = x) : x ∈ S.ofUnits :=\n ⟨_, h₁, h₂⟩",
"start": [
190,
1
],
"end": [
192,
14
],
"kind": "lemma"
},
{
"full_name": "Subgroup.exists_mem_ofUnits_val_eq",
"code": "@[to_additive]\nlemma exists_mem_ofUnits_val_eq (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :\n ∃ y ∈ S, y = x := h",
"start": [
194,
1
],
"end": [
196,
24
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_of_mem_val_ofUnits",
"code": "@[to_additive]\nlemma mem_of_mem_val_ofUnits (S : Subgroup Mˣ) {y : Mˣ} (hy : (y : M) ∈ S.ofUnits) : y ∈ S :=\n match hy with\n | ⟨_, hm, he⟩ => (Units.ext he) ▸ hm",
"start": [
198,
1
],
"end": [
201,
39
],
"kind": "lemma"
},
{
"full_name": "Subgroup.isUnit_of_mem_ofUnits",
"code": "@[to_additive]\nlemma isUnit_of_mem_ofUnits (S : Subgroup Mˣ) {x : M} (hx : x ∈ S.ofUnits) : IsUnit x :=\n match hx with\n | ⟨_, _, h⟩ => ⟨_, h⟩",
"start": [
203,
1
],
"end": [
206,
24
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unit_of_mem_ofUnits",
"code": "@[to_additive \" Given some `x : M` which is a member of the additive submonoid of additive unit\nelements corresponding to a subgroup of units, produce a unit of `M` whose coercion is equal to\n`x`. \"]\nnoncomputable def unit_of_mem_ofUnits (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) : Mˣ :=\n (Classical.choose h).copy x (Classical.choose_spec h).2.symm _ rfl",
"start": [
208,
1
],
"end": [
214,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "Subgroup.unit_of_mem_ofUnits_spec_eq_of_val_mem",
"code": "@[to_additive]\nlemma unit_of_mem_ofUnits_spec_eq_of_val_mem (S : Subgroup Mˣ) {x : Mˣ} (h : (x : M) ∈ S.ofUnits) :\n S.unit_of_mem_ofUnits h = x := Units.ext rfl",
"start": [
216,
1
],
"end": [
218,
49
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unit_of_mem_ofUnits_spec_val_eq_of_mem",
"code": "@[to_additive]\nlemma unit_of_mem_ofUnits_spec_val_eq_of_mem (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :\n S.unit_of_mem_ofUnits h = x := rfl",
"start": [
220,
1
],
"end": [
222,
39
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unit_of_mem_ofUnits_spec_mem",
"code": "@[to_additive]\nlemma unit_of_mem_ofUnits_spec_mem (S : Subgroup Mˣ) {x : M} {h : x ∈ S.ofUnits} :\n S.unit_of_mem_ofUnits h ∈ S := S.mem_of_mem_val_ofUnits h",
"start": [
224,
1
],
"end": [
226,
62
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unit_eq_unit_of_mem_ofUnits",
"code": "@[to_additive]\nlemma unit_eq_unit_of_mem_ofUnits (S : Subgroup Mˣ) {x : M} (h₁ : IsUnit x)\n (h₂ : x ∈ S.ofUnits) : h₁.unit = S.unit_of_mem_ofUnits h₂ := Units.ext rfl",
"start": [
228,
1
],
"end": [
230,
79
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unit_mem_of_mem_ofUnits",
"code": "@[to_additive]\nlemma unit_mem_of_mem_ofUnits (S : Subgroup Mˣ) {x : M} {h₁ : IsUnit x}\n (h₂ : x ∈ S.ofUnits) : h₁.unit ∈ S :=\n S.unit_eq_unit_of_mem_ofUnits h₁ h₂ ▸ (S.unit_of_mem_ofUnits_spec_mem)",
"start": [
232,
1
],
"end": [
235,
73
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_ofUnits_of_isUnit_of_unit_mem",
"code": "@[to_additive]\nlemma mem_ofUnits_of_isUnit_of_unit_mem (S : Subgroup Mˣ) {x : M} (h₁ : IsUnit x)\n (h₂ : h₁.unit ∈ S) : x ∈ S.ofUnits := S.mem_ofUnits h₂ h₁.unit_spec",
"start": [
237,
1
],
"end": [
239,
72
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_ofUnits_iff_exists_isUnit",
"code": "@[to_additive]\nlemma mem_ofUnits_iff_exists_isUnit (S : Subgroup Mˣ) (x : M) :\n x ∈ S.ofUnits ↔ ∃ h : IsUnit x, h.unit ∈ S :=\n ⟨fun h => ⟨S.isUnit_of_mem_ofUnits h, S.unit_mem_of_mem_ofUnits h⟩,\n fun ⟨hm, he⟩ => S.mem_ofUnits_of_isUnit_of_unit_mem hm he⟩",
"start": [
241,
1
],
"end": [
245,
61
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnitsEquivType",
"code": "@[to_additive \" The equivalence between the coercion of an additive subgroup `S` of\n`Mˣ` to an additive submonoid of `M` and the additive subgroup itself as a type. \"]\nnoncomputable def ofUnitsEquivType (S : Subgroup Mˣ) : S.ofUnits ≃* S where\n toFun := fun x => ⟨S.unit_of_mem_ofUnits x.2, S.unit_of_mem_ofUnits_spec_mem⟩\n invFun := fun x => ⟨x.1, ⟨x.1, x.2, rfl⟩⟩\n left_inv := fun _ => rfl\n right_inv := fun _ => Subtype.ext (Units.ext rfl)\n map_mul' := fun _ _ => Subtype.ext (Units.ext rfl)",
"start": [
247,
1
],
"end": [
256,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "Subgroup.ofUnits_bot",
"code": "@[to_additive (attr := simp)]\nlemma ofUnits_bot : (⊥ : Subgroup Mˣ).ofUnits = ⊥ := ofUnits_units_gc.l_bot",
"start": [
258,
1
],
"end": [
259,
76
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_inf",
"code": "@[to_additive]\nlemma ofUnits_inf (S T : Subgroup Mˣ): (S ⊔ T).ofUnits = S.ofUnits ⊔ T.ofUnits :=\nofUnits_units_gc.l_sup",
"start": [
261,
1
],
"end": [
263,
23
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_sSup",
"code": "@[to_additive]\nlemma ofUnits_sSup (s: Set (Subgroup Mˣ)) : (sSup s).ofUnits = ⨆ S ∈ s, S.ofUnits :=\nofUnits_units_gc.l_sSup",
"start": [
265,
1
],
"end": [
267,
24
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_iSup",
"code": "@[to_additive]\nlemma ofUnits_iSup {ι : Sort*} {f : ι → Subgroup Mˣ} :\n (iSup f).ofUnits = ⨆ (i : ι), (f i).ofUnits := ofUnits_units_gc.l_iSup",
"start": [
269,
1
],
"end": [
271,
75
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_iSup₂",
"code": "@[to_additive]\nlemma ofUnits_iSup₂ {ι : Sort*} {κ : ι → Sort*} (f : (i : ι) → κ i → Subgroup Mˣ) :\n (⨆ (i : ι), ⨆ (j : κ i), f i j).ofUnits = ⨆ (i : ι), ⨆ (j : κ i), (f i j).ofUnits :=\n ofUnits_units_gc.l_iSup₂",
"start": [
273,
1
],
"end": [
276,
27
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_injective",
"code": "@[to_additive]\nlemma ofUnits_injective : Function.Injective (ofUnits (M := M)) :=\n ofUnits_units_gci.l_injective",
"start": [
278,
1
],
"end": [
280,
32
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_sup_units",
"code": "@[to_additive (attr := simp)]\nlemma ofUnits_sup_units (S T : Subgroup Mˣ): (S.ofUnits ⊔ T.ofUnits).units = S ⊔ T :=\n ofUnits_units_gci.u_sup_l _ _",
"start": [
282,
1
],
"end": [
284,
32
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_inf_units",
"code": "@[to_additive (attr := simp)]\nlemma ofUnits_inf_units (S T : Subgroup Mˣ): (S.ofUnits ⊓ T.ofUnits).units = S ⊓ T :=\n ofUnits_units_gci.u_inf_l _ _",
"start": [
286,
1
],
"end": [
288,
32
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_right_inverse",
"code": "@[to_additive]\nlemma ofUnits_right_inverse :\n Function.RightInverse (ofUnits (M := M)) (Submonoid.units (M := M)) :=\n ofUnits_units_gci.u_l_leftInverse",
"start": [
290,
1
],
"end": [
293,
36
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_strictMono",
"code": "@[to_additive]\nlemma ofUnits_strictMono : StrictMono (ofUnits (M := M)) := ofUnits_units_gci.strictMono_l",
"start": [
295,
1
],
"end": [
296,
91
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnits_le_ofUnits_iff",
"code": "lemma ofUnits_le_ofUnits_iff {S T : Subgroup Mˣ} : S.ofUnits ≤ T.ofUnits ↔ S ≤ T :=\n ofUnits_units_gci.l_le_l_iff",
"start": [
298,
1
],
"end": [
299,
31
],
"kind": "lemma"
},
{
"full_name": "Subgroup.ofUnitsTopEquiv",
"code": "@[to_additive \" The equivalence between the additive subgroup of additive units of\n`S` and the additive submonoid of additive unit elements of `S`. \"]\nnoncomputable def ofUnitsTopEquiv : (⊤ : Subgroup Mˣ).ofUnits ≃* Mˣ :=\n (⊤ : Subgroup Mˣ).ofUnitsEquivType.trans topEquiv",
"start": [
301,
1
],
"end": [
306,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "Subgroup.mem_units_iff_val_mem",
"code": "@[to_additive]\nlemma mem_units_iff_val_mem (H : Subgroup G) (x : Gˣ): x ∈ H.units ↔ (x : G) ∈ H := by\n simp_rw [Submonoid.mem_units_iff, mem_toSubmonoid, val_inv_eq_inv_val, inv_mem_iff, and_self]",
"start": [
310,
1
],
"end": [
312,
96
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_ofUnits_iff_toUnits_mem",
"code": "@[to_additive]\nlemma mem_ofUnits_iff_toUnits_mem (H : Subgroup Gˣ) (x : G): x ∈ H.ofUnits ↔ (toUnits x) ∈ H := by\n simp_rw [mem_ofUnits_iff, toUnits.surjective.exists, val_toUnits_apply, exists_eq_right]",
"start": [
314,
1
],
"end": [
316,
91
],
"kind": "lemma"
},
{
"full_name": "Subgroup.mem_iff_toUnits_mem_units",
"code": "@[to_additive (attr := simp)]\nlemma mem_iff_toUnits_mem_units (H : Subgroup G) (x : G) : toUnits x ∈ H.units ↔ x ∈ H := by\n simp_rw [mem_units_iff_val_mem, val_toUnits_apply]",
"start": [
318,
1
],
"end": [
320,
53
],
"kind": "lemma"
},
{
"full_name": "Subgroup.val_mem_ofUnits_iff_mem",
"code": "@[to_additive (attr := simp)]\nlemma val_mem_ofUnits_iff_mem (H : Subgroup Gˣ) (x : Gˣ) : (x : G) ∈ H.ofUnits ↔ x ∈ H := by\n simp_rw [mem_ofUnits_iff_toUnits_mem, toUnits_val_apply]",
"start": [
322,
1
],
"end": [
324,
59
],
"kind": "lemma"
},
{
"full_name": "Subgroup.unitsEquivSelf",
"code": "@[to_additive \" The equivalence between the greatest subgroup of additive units\ncontained within `T` and `T` itself. \"]\ndef unitsEquivSelf (H : Subgroup G) : H.units ≃* H :=\n H.unitsEquivUnitsType.trans toUnits.symm",
"start": [
326,
1
],
"end": [
330,
43
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Sites/Closed.lean | [
"Mathlib/Order/Closure.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Sites/SheafOfTypes.lean"
] | [
{
"full_name": "CategoryTheory.GrothendieckTopology.close",
"code": "@[simps]\ndef close {X : C} (S : Sieve X) : Sieve X where\n arrows _ f := J₁.Covers S f\n downward_closed hS := J₁.arrow_stable _ _ hS",
"start": [
59,
1
],
"end": [
63,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.le_close",
"code": "theorem le_close {X : C} (S : Sieve X) : S ≤ J₁.close S",
"start": [
66,
1
],
"end": [
68,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.IsClosed",
"code": "def IsClosed {X : C} (S : Sieve X) : Prop :=\n ∀ ⦃Y : C⦄ (f : Y ⟶ X), J₁.Covers S f → S f",
"start": [
71,
1
],
"end": [
78,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.covers_iff_mem_of_isClosed",
"code": "theorem covers_iff_mem_of_isClosed {X : C} {S : Sieve X} (h : J₁.IsClosed S) {Y : C} (f : Y ⟶ X) :\n J₁.Covers S f ↔ S f",
"start": [
81,
1
],
"end": [
84,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.isClosed_pullback",
"code": "theorem isClosed_pullback {X Y : C} (f : Y ⟶ X) (S : Sieve X) :\n J₁.IsClosed S → J₁.IsClosed (S.pullback f)",
"start": [
87,
1
],
"end": [
90,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.le_close_of_isClosed",
"code": "theorem le_close_of_isClosed {X : C} {S T : Sieve X} (h : S ≤ T) (hT : J₁.IsClosed T) :\n J₁.close S ≤ T",
"start": [
93,
1
],
"end": [
98,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.close_isClosed",
"code": "theorem close_isClosed {X : C} (S : Sieve X) : J₁.IsClosed (J₁.close S)",
"start": [
101,
1
],
"end": [
103,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.closureOperator",
"code": "@[simps! isClosed]\ndef closureOperator (X : C) : ClosureOperator (Sieve X) :=\n .ofPred J₁.close J₁.IsClosed J₁.le_close J₁.close_isClosed fun _ _ ↦ J₁.le_close_of_isClosed",
"start": [
106,
1
],
"end": [
109,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.isClosed_iff_close_eq_self",
"code": "theorem isClosed_iff_close_eq_self {X : C} (S : Sieve X) : J₁.IsClosed S ↔ J₁.close S = S",
"start": [
114,
1
],
"end": [
116,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.close_eq_self_of_isClosed",
"code": "theorem close_eq_self_of_isClosed {X : C} {S : Sieve X} (hS : J₁.IsClosed S) : J₁.close S = S",
"start": [
119,
1
],
"end": [
120,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.pullback_close",
"code": "theorem pullback_close {X Y : C} (f : Y ⟶ X) (S : Sieve X) :\n J₁.close (S.pullback f) = (J₁.close S).pullback f",
"start": [
123,
1
],
"end": [
132,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.monotone_close",
"code": "@[mono]\ntheorem monotone_close {X : C} : Monotone (J₁.close : Sieve X → Sieve X)",
"start": [
135,
1
],
"end": [
137,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.close_close",
"code": "@[simp]\ntheorem close_close {X : C} (S : Sieve X) : J₁.close (J₁.close S) = J₁.close S",
"start": [
140,
1
],
"end": [
142,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.close_eq_top_iff_mem",
"code": "theorem close_eq_top_iff_mem {X : C} (S : Sieve X) : J₁.close S = ⊤ ↔ S ∈ J₁ X",
"start": [
145,
1
],
"end": [
159,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.closedSieves",
"code": "@[simps]\ndef Functor.closedSieves : Cᵒᵖ ⥤ Type max v u where\n obj X := { S : Sieve X.unop // J₁.IsClosed S }\n map f S := ⟨S.1.pullback f.unop, J₁.isClosed_pullback f.unop _ S.2⟩",
"start": [
164,
1
],
"end": [
171,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.classifier_isSheaf",
"code": "theorem classifier_isSheaf : Presieve.IsSheaf J₁ (Functor.closedSieves J₁)",
"start": [
174,
1
],
"end": [
225,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.le_topology_of_closedSieves_isSheaf",
"code": "theorem le_topology_of_closedSieves_isSheaf {J₁ J₂ : GrothendieckTopology C}\n (h : Presieve.IsSheaf J₁ (Functor.closedSieves J₂)) : J₁ ≤ J₂",
"start": [
228,
1
],
"end": [
248,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.topology_eq_iff_same_sheaves",
"code": "theorem topology_eq_iff_same_sheaves {J₁ J₂ : GrothendieckTopology C} :\n J₁ = J₂ ↔ ∀ P : Cᵒᵖ ⥤ Type max v u, Presieve.IsSheaf J₁ P ↔ Presieve.IsSheaf J₂ P",
"start": [
251,
1
],
"end": [
265,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.topologyOfClosureOperator",
"code": "@[simps]\ndef topologyOfClosureOperator (c : ∀ X : C, ClosureOperator (Sieve X))\n (hc : ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Sieve X), c _ (S.pullback f) = (c _ S).pullback f) :\n GrothendieckTopology C where\n sieves X := { S | c X S = ⊤ }\n top_mem' X := top_unique ((c X).le_closure _)\n pullback_stable' X Y S f hS := by\n rw [Set.mem_setOf_eq] at hS\n rw [Set.mem_setOf_eq, hc, hS, Sieve.pullback_top]\n transitive' X S hS R hR := by\n rw [Set.mem_setOf_eq] at hS\n rw [Set.mem_setOf_eq, ← (c X).idempotent, eq_top_iff, ← hS]\n apply (c X).monotone fun Y f hf => _\n intros Y f hf\n rw [Sieve.pullback_eq_top_iff_mem, ← hc]\n apply hR hf",
"start": [
268,
1
],
"end": [
288,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.topologyOfClosureOperator_self",
"code": "theorem topologyOfClosureOperator_self :\n (topologyOfClosureOperator J₁.closureOperator fun X Y => J₁.pullback_close) = J₁",
"start": [
291,
1
],
"end": [
297,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.topologyOfClosureOperator_close",
"code": "theorem topologyOfClosureOperator_close (c : ∀ X : C, ClosureOperator (Sieve X))\n (pb : ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Sieve X), c Y (S.pullback f) = (c X S).pullback f) (X : C)\n (S : Sieve X) : (topologyOfClosureOperator c pb).close S = c X S",
"start": [
300,
1
],
"end": [
305,
41
],
"kind": "commanddeclaration"
}
] |
Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/NumberTheory/LegendreSymbol/Basic.lean",
"Mathlib/Analysis/Normed/Field/Basic.lean"
] | [
{
"full_name": "ZMod.Ico_map_valMinAbs_natAbs_eq_Ico_map_id",
"code": "theorem Ico_map_valMinAbs_natAbs_eq_Ico_map_id (p : ℕ) [hp : Fact p.Prime] (a : ZMod p)\n (hap : a ≠ 0) : ((Ico 1 (p / 2).succ).1.map fun (x : ℕ) => (a * x).valMinAbs.natAbs) =\n (Ico 1 (p / 2).succ).1.map fun a => a",
"start": [
27,
1
],
"end": [
60,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.gauss_lemma_aux₁",
"code": "private theorem gauss_lemma_aux₁ (p : ℕ) [Fact p.Prime] {a : ℤ}\n (hap : (a : ZMod p) ≠ 0) : (a ^ (p / 2) * (p / 2)! : ZMod p) =\n (-1 : ZMod p) ^ ((Ico 1 (p / 2).succ).filter fun x : ℕ =>\n ¬(a * x : ZMod p).val ≤ p / 2).card * (p / 2)!",
"start": [
63,
1
],
"end": [
92,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.gauss_lemma_aux",
"code": "theorem gauss_lemma_aux (p : ℕ) [hp : Fact p.Prime] {a : ℤ}\n (hap : (a : ZMod p) ≠ 0) : (↑a ^ (p / 2) : ZMod p) =\n ((-1) ^ ((Ico 1 (p / 2).succ).filter fun x : ℕ => p / 2 < (a * x : ZMod p).val).card :)",
"start": [
94,
1
],
"end": [
100,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.gauss_lemma",
"code": "theorem gauss_lemma {p : ℕ} [h : Fact p.Prime] {a : ℤ} (hp : p ≠ 2) (ha0 : (a : ZMod p) ≠ 0) :\n legendreSym p a = (-1) ^ ((Ico 1 (p / 2).succ).filter fun x : ℕ =>\n p / 2 < (a * x : ZMod p).val).card",
"start": [
103,
1
],
"end": [
115,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.eisenstein_lemma_aux₁",
"code": "private theorem eisenstein_lemma_aux₁ (p : ℕ) [Fact p.Prime] [hp2 : Fact (p % 2 = 1)] {a : ℕ}\n (hap : (a : ZMod p) ≠ 0) : ((∑ x ∈ Ico 1 (p / 2).succ, a * x : ℕ) : ZMod 2) =\n ((Ico 1 (p / 2).succ).filter fun x : ℕ => p / 2 < (a * x : ZMod p).val).card +\n ∑ x ∈ Ico 1 (p / 2).succ, x + (∑ x ∈ Ico 1 (p / 2).succ, a * x / p : ℕ)",
"start": [
118,
1
],
"end": [
144,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.eisenstein_lemma_aux",
"code": "theorem eisenstein_lemma_aux (p : ℕ) [Fact p.Prime] [Fact (p % 2 = 1)] {a : ℕ} (ha2 : a % 2 = 1)\n (hap : (a : ZMod p) ≠ 0) :\n ((Ico 1 (p / 2).succ).filter fun x : ℕ => p / 2 < (a * x : ZMod p).val).card ≡\n ∑ x ∈ Ico 1 (p / 2).succ, x * a / p [MOD 2]",
"start": [
146,
1
],
"end": [
154,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.div_eq_filter_card",
"code": "theorem div_eq_filter_card {a b c : ℕ} (hb0 : 0 < b) (hc : a / b ≤ c) :\n a / b = ((Ico 1 c.succ).filter fun x => x * b ≤ a).card",
"start": [
157,
1
],
"end": [
164,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.sum_Ico_eq_card_lt",
"code": "private theorem sum_Ico_eq_card_lt {p q : ℕ} :\n ∑ a ∈ Ico 1 (p / 2).succ, a * q / p =\n ((Ico 1 (p / 2).succ ×ˢ Ico 1 (q / 2).succ).filter fun x : ℕ × ℕ =>\n x.2 * p ≤ x.1 * q).card",
"start": [
167,
1
],
"end": [
188,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.sum_mul_div_add_sum_mul_div_eq_mul",
"code": "theorem sum_mul_div_add_sum_mul_div_eq_mul (p q : ℕ) [hp : Fact p.Prime] (hq0 : (q : ZMod p) ≠ 0) :\n ∑ a ∈ Ico 1 (p / 2).succ, a * q / p + ∑ a ∈ Ico 1 (q / 2).succ, a * p / q =\n p / 2 * (q / 2)",
"start": [
190,
1
],
"end": [
226,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "ZMod.eisenstein_lemma",
"code": "theorem eisenstein_lemma {p : ℕ} [Fact p.Prime] (hp : p ≠ 2) {a : ℕ} (ha1 : a % 2 = 1)\n (ha0 : (a : ZMod p) ≠ 0) : legendreSym p a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p",
"start": [
229,
1
],
"end": [
236,
52
],
"kind": "commanddeclaration"
}
] |
Mathlib/AlgebraicTopology/SimplicialCategory/Basic.lean | [
"Mathlib/CategoryTheory/Enriched/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/AlgebraicTopology/SimplicialSet/Monoidal.lean"
] | [
{
"full_name": "CategoryTheory.SimplicialCategory",
"code": "class SimplicialCategory extends EnrichedCategory SSet.{v} C where\n \n homEquiv (K L : C) : (K ⟶ L) ≃ (𝟙_ SSet.{v} ⟶ EnrichedCategory.Hom K L)\n homEquiv_id (K : C) : homEquiv K K (𝟙 K) = eId SSet K := by aesop_cat\n homEquiv_comp {K L M : C} (f : K ⟶ L) (g : L ⟶ M) :\n homEquiv K M (f ≫ g) = (λ_ _).inv ≫ (homEquiv K L f ⊗ homEquiv L M g) ≫\n eComp SSet K L M := by aesop_cat",
"start": [
42,
1
],
"end": [
51,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHom",
"code": "abbrev sHom (K L : C) : SSet.{v} := EnrichedCategory.Hom K L",
"start": [
59,
1
],
"end": [
60,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomComp",
"code": "abbrev sHomComp (K L M : C) : sHom K L ⊗ sHom L M ⟶ sHom K M := eComp SSet K L M",
"start": [
62,
1
],
"end": [
63,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.homEquiv'",
"code": "def homEquiv' (K L : C) : (K ⟶ L) ≃ sHom K L _[0] :=\n (homEquiv K L).trans (sHom K L).unitHomEquiv",
"start": [
65,
1
],
"end": [
68,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerRight",
"code": "noncomputable def sHomWhiskerRight {K K' : C} (f : K ⟶ K') (L : C) :\n sHom K' L ⟶ sHom K L :=\n (λ_ _).inv ≫ homEquiv K K' f ▷ _ ≫ sHomComp K K' L",
"start": [
70,
1
],
"end": [
73,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerRight_id",
"code": "@[simp]\nlemma sHomWhiskerRight_id (K L : C) : sHomWhiskerRight (𝟙 K) L = 𝟙 _ := by\n simp [sHomWhiskerRight, homEquiv_id]",
"start": [
75,
1
],
"end": [
77,
39
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerRight_comp",
"code": "@[simp, reassoc]\nlemma sHomWhiskerRight_comp {K K' K'' : C} (f : K ⟶ K') (f' : K' ⟶ K'') (L : C) :\n sHomWhiskerRight (f ≫ f') L = sHomWhiskerRight f' L ≫ sHomWhiskerRight f L := by\n dsimp [sHomWhiskerRight]\n simp only [assoc, homEquiv_comp, comp_whiskerRight, leftUnitor_inv_whiskerRight, ← e_assoc']\n rfl",
"start": [
79,
1
],
"end": [
84,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerLeft",
"code": "noncomputable def sHomWhiskerLeft (K : C) {L L' : C} (g : L ⟶ L') :\n sHom K L ⟶ sHom K L' :=\n (ρ_ _).inv ≫ _ ◁ homEquiv L L' g ≫ sHomComp K L L'",
"start": [
86,
1
],
"end": [
89,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerLeft_id",
"code": "@[simp]\nlemma sHomWhiskerLeft_id (K L : C) : sHomWhiskerLeft K (𝟙 L) = 𝟙 _ := by\n simp [sHomWhiskerLeft, homEquiv_id]",
"start": [
91,
1
],
"end": [
93,
38
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomWhiskerLeft_comp",
"code": "@[simp, reassoc]\nlemma sHomWhiskerLeft_comp (K : C) {L L' L'' : C} (g : L ⟶ L') (g' : L' ⟶ L'') :\n sHomWhiskerLeft K (g ≫ g') = sHomWhiskerLeft K g ≫ sHomWhiskerLeft K g' := by\n dsimp [sHomWhiskerLeft]\n simp only [homEquiv_comp, MonoidalCategory.whiskerLeft_comp, assoc, ← e_assoc]\n rfl",
"start": [
95,
1
],
"end": [
100,
6
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHom_whisker_exchange",
"code": "@[reassoc]\nlemma sHom_whisker_exchange {K K' L L' : C} (f : K ⟶ K') (g : L ⟶ L') :\n sHomWhiskerLeft K' g ≫ sHomWhiskerRight f L' =\n sHomWhiskerRight f L ≫ sHomWhiskerLeft K g :=\n ((ρ_ _).inv ≫ _ ◁ homEquiv L L' g ≫ (λ_ _).inv ≫ homEquiv K K' f ▷ _) ≫=\n (e_assoc SSet.{v} K K' L L').symm",
"start": [
102,
1
],
"end": [
107,
38
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.SimplicialCategory.sHomFunctor",
"code": "@[simps]\nnoncomputable def sHomFunctor : Cᵒᵖ ⥤ C ⥤ SSet.{v} where\n obj K :=\n { obj := fun L => sHom K.unop L\n map := fun φ => sHomWhiskerLeft K.unop φ }\n map φ :=\n { app := fun L => sHomWhiskerRight φ.unop L }",
"start": [
112,
1
],
"end": [
119,
50
],
"kind": "commanddeclaration"
}
] |
Mathlib/GroupTheory/GroupAction/Embedding.lean | [
"Mathlib/GroupTheory/GroupAction/Group.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/GroupTheory/GroupAction/Pi.lean"
] | [
{
"full_name": "Function.Embedding.smul",
"code": "@[to_additive]\ninstance smul [Group G] [MulAction G β] : SMul G (α ↪ β) :=\n ⟨fun g f => f.trans (MulAction.toPerm g).toEmbedding⟩",
"start": [
27,
1
],
"end": [
29,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "Function.Embedding.smul_def",
"code": "@[to_additive]\ntheorem smul_def [Group G] [MulAction G β] (g : G) (f : α ↪ β) :\n g • f = f.trans (MulAction.toPerm g).toEmbedding",
"start": [
31,
1
],
"end": [
34,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Function.Embedding.smul_apply",
"code": "@[to_additive (attr := simp)]\ntheorem smul_apply [Group G] [MulAction G β] (g : G) (f : α ↪ β) (a : α) : (g • f) a = g • f a",
"start": [
38,
1
],
"end": [
40,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Function.Embedding.coe_smul",
"code": "@[to_additive]\ntheorem coe_smul [Group G] [MulAction G β] (g : G) (f : α ↪ β) : ⇑(g • f) = g • ⇑f",
"start": [
44,
1
],
"end": [
46,
6
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/FiberedCategory/Cartesian.lean | [
"Mathlib/CategoryTheory/FiberedCategory/HomLift.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "CategoryTheory.Functor.IsCartesian",
"code": "class Functor.IsCartesian {R S : 𝒮} {a b : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) extends\n IsHomLift p f φ : Prop where\n universal_property {a' : 𝒳} (φ' : a' ⟶ b) [IsHomLift p f φ'] :\n ∃! χ : a' ⟶ a, IsHomLift p (𝟙 R) χ ∧ χ ≫ φ = φ'",
"start": [
31,
1
],
"end": [
36,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.map",
"code": "protected noncomputable def map : a' ⟶ a :=\n Classical.choose <| IsCartesian.universal_property (p:=p) (f:=f) (φ:=φ) φ'",
"start": [
46,
1
],
"end": [
50,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.map_isHomLift",
"code": "instance map_isHomLift : IsHomLift p (𝟙 R) (IsCartesian.map p f φ φ') :=\n (Classical.choose_spec <| IsCartesian.universal_property (p:=p) (f:=f) (φ:=φ) φ').1.1",
"start": [
52,
1
],
"end": [
53,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.fac",
"code": "@[reassoc (attr := simp)]\nlemma fac : IsCartesian.map p f φ φ' ≫ φ = φ' :=\n (Classical.choose_spec <| IsCartesian.universal_property (p:=p) (f:=f) (φ:=φ) φ').1.2",
"start": [
55,
1
],
"end": [
57,
88
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.map_uniq",
"code": "lemma map_uniq (ψ : a' ⟶ a) [IsHomLift p (𝟙 R) ψ] (hψ : ψ ≫ φ = φ') :\n ψ = IsCartesian.map p f φ φ' :=\n (Classical.choose_spec <| IsCartesian.universal_property (p:=p) (f:=f) (φ:=φ) φ').2\n ψ ⟨inferInstance, hψ⟩",
"start": [
59,
1
],
"end": [
65,
26
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.eq_of_fac",
"code": "lemma eq_of_fac {ψ ψ' : a' ⟶ a} [IsHomLift p (𝟙 R) ψ]\n [IsHomLift p (𝟙 R) ψ'] (hcomp : ψ ≫ φ = φ') (hcomp' : ψ' ≫ φ = φ') : ψ = ψ' := by\n rw [map_uniq p f φ φ' ψ hcomp, map_uniq p f φ φ' ψ' hcomp']",
"start": [
67,
1
],
"end": [
72,
62
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.map_self",
"code": "@[simp]\nlemma map_self : IsCartesian.map p f φ φ = 𝟙 a := by\n subst_hom_lift p f φ; symm\n apply map_uniq\n simp only [id_comp]",
"start": [
76,
1
],
"end": [
80,
22
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.domainUniqueUpToIso",
"code": "@[simps]\nnoncomputable def domainUniqueUpToIso {a' : 𝒳} (φ' : a' ⟶ b) [IsCartesian p f φ'] : a' ≅ a where\n hom := IsCartesian.map p f φ φ'\n inv := IsCartesian.map p f φ' φ\n hom_inv_id := by\n subst_hom_lift p f φ'\n apply eq_of_fac p (p.map φ') φ' φ' (by simp) (id_comp _)\n inv_hom_id := by\n subst_hom_lift p f φ\n apply eq_of_fac p (p.map φ) φ φ (by simp) (id_comp _)",
"start": [
82,
1
],
"end": [
93,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.of_iso_comp",
"code": "instance of_iso_comp {a' : 𝒳} (φ' : a' ≅ a) [IsHomLift p (𝟙 R) φ'.hom] :\n IsCartesian p f (φ'.hom ≫ φ) where\n universal_property := by\n intro c ψ hψ\n use IsCartesian.map p f φ ψ ≫ φ'.inv\n refine ⟨⟨inferInstance, by simp⟩, ?_⟩\n rintro τ ⟨hτ₁, hτ₂⟩\n rw [Iso.eq_comp_inv]\n apply map_uniq\n simp only [assoc, hτ₂]",
"start": [
95,
1
],
"end": [
105,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Functor.IsCartesian.of_comp_iso",
"code": "instance of_comp_iso {b' : 𝒳} (φ' : b ≅ b') [IsHomLift p (𝟙 S) φ'.hom] :\n IsCartesian p f (φ ≫ φ'.hom) where\n universal_property := by\n intro c ψ hψ\n use IsCartesian.map p f φ (ψ ≫ φ'.inv)\n refine ⟨⟨inferInstance, by simp⟩, ?_⟩\n rintro τ ⟨hτ₁, hτ₂⟩\n apply map_uniq\n simp only [Iso.eq_comp_inv, assoc, hτ₂]",
"start": [
107,
1
],
"end": [
116,
44
],
"kind": "commanddeclaration"
}
] |
Mathlib/Probability/ProbabilityMassFunction/Binomial.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Probability/ProbabilityMassFunction/Constructions.lean",
"Mathlib/Tactic/FinCases.lean"
] | [
{
"full_name": "PMF.binomial",
"code": "noncomputable\ndef binomial (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) : PMF (Fin (n + 1)) :=\n .ofFintype (fun i => p^(i : ℕ) * (1-p)^((Fin.last n - i) : ℕ) * (n.choose i : ℕ)) (by\n convert (add_pow p (1-p) n).symm\n · rw [Finset.sum_fin_eq_sum_range]\n apply Finset.sum_congr rfl\n intro i hi\n rw [Finset.mem_range] at hi\n rw [dif_pos hi, Fin.last]\n · simp [h])",
"start": [
23,
1
],
"end": [
34,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.binomial_apply",
"code": "theorem binomial_apply (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) (i : Fin (n + 1)) :\n binomial p h n i = p^(i : ℕ) * (1-p)^((Fin.last n - i) : ℕ) * (n.choose i : ℕ)",
"start": [
36,
1
],
"end": [
37,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.binomial_apply_zero",
"code": "@[simp]\ntheorem binomial_apply_zero (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :\n binomial p h n 0 = (1-p)^n",
"start": [
39,
1
],
"end": [
42,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.binomial_apply_last",
"code": "@[simp]\ntheorem binomial_apply_last (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :\n binomial p h n (.last n) = p^n",
"start": [
44,
1
],
"end": [
47,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.binomial_apply_self",
"code": "theorem binomial_apply_self (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :\n binomial p h n n = p^n",
"start": [
49,
1
],
"end": [
50,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.binomial_one_eq_bernoulli",
"code": "theorem binomial_one_eq_bernoulli (p : ℝ≥0∞) (h : p ≤ 1) :\n binomial p h 1 = (bernoulli p h).map (cond · 1 0)",
"start": [
52,
1
],
"end": [
55,
58
],
"kind": "commanddeclaration"
}
] |
Mathlib/Probability/Distributions/Gaussian.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/MeasureTheory/Decomposition/Lebesgue.lean",
"Mathlib/Probability/Notation.lean",
"Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean"
] | [
{
"full_name": "ProbabilityTheory.gaussianPDFReal",
"code": "noncomputable\ndef gaussianPDFReal (μ : ℝ) (v : ℝ≥0) (x : ℝ) : ℝ :=\n (√(2 * π * v))⁻¹ * rexp (- (x - μ)^2 / (2 * v))",
"start": [
42,
1
],
"end": [
45,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_def",
"code": "lemma gaussianPDFReal_def (μ : ℝ) (v : ℝ≥0) :\n gaussianPDFReal μ v =\n fun x ↦ (Real.sqrt (2 * π * v))⁻¹ * rexp (- (x - μ)^2 / (2 * v)) := rfl",
"start": [
47,
1
],
"end": [
49,
78
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_zero_var",
"code": "@[simp]\nlemma gaussianPDFReal_zero_var (m : ℝ) : gaussianPDFReal m 0 = 0 := by\n ext1 x\n simp [gaussianPDFReal]",
"start": [
51,
1
],
"end": [
54,
25
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_pos",
"code": "lemma gaussianPDFReal_pos (μ : ℝ) (v : ℝ≥0) (x : ℝ) (hv : v ≠ 0) : 0 < gaussianPDFReal μ v x := by\n rw [gaussianPDFReal]\n positivity",
"start": [
56,
1
],
"end": [
59,
13
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_nonneg",
"code": "lemma gaussianPDFReal_nonneg (μ : ℝ) (v : ℝ≥0) (x : ℝ) : 0 ≤ gaussianPDFReal μ v x := by\n rw [gaussianPDFReal]\n positivity",
"start": [
61,
1
],
"end": [
64,
13
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.measurable_gaussianPDFReal",
"code": "lemma measurable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDFReal μ v) :=\n (((measurable_id.add_const _).pow_const _).neg.div_const _).exp.const_mul _",
"start": [
66,
1
],
"end": [
68,
78
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.stronglyMeasurable_gaussianPDFReal",
"code": "lemma stronglyMeasurable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) :\n StronglyMeasurable (gaussianPDFReal μ v) :=\n (measurable_gaussianPDFReal μ v).stronglyMeasurable",
"start": [
70,
1
],
"end": [
73,
54
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.integrable_gaussianPDFReal",
"code": "lemma integrable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) :\n Integrable (gaussianPDFReal μ v) := by\n rw [gaussianPDFReal_def]\n by_cases hv : v = 0\n · simp [hv]\n let g : ℝ → ℝ := fun x ↦ (√(2 * π * v))⁻¹ * rexp (- x ^ 2 / (2 * v))\n have hg : Integrable g := by\n suffices g = fun x ↦ (√(2 * π * v))⁻¹ * rexp (- (2 * v)⁻¹ * x ^ 2) by\n rw [this]\n refine (integrable_exp_neg_mul_sq ?_).const_mul (√(2 * π * v))⁻¹\n simp [lt_of_le_of_ne (zero_le _) (Ne.symm hv)]\n ext x\n simp only [g, zero_lt_two, mul_nonneg_iff_of_pos_left, NNReal.zero_le_coe, Real.sqrt_mul',\n mul_inv_rev, NNReal.coe_mul, NNReal.coe_inv, NNReal.coe_ofNat, neg_mul, mul_eq_mul_left_iff,\n Real.exp_eq_exp, mul_eq_zero, inv_eq_zero, Real.sqrt_eq_zero, NNReal.coe_eq_zero, hv,\n false_or]\n rw [mul_comm]\n left\n field_simp\n exact Integrable.comp_sub_right hg μ",
"start": [
75,
1
],
"end": [
94,
39
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.lintegral_gaussianPDFReal_eq_one",
"code": "lemma lintegral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (h : v ≠ 0) :\n ∫⁻ x, ENNReal.ofReal (gaussianPDFReal μ v x) = 1 := by\n rw [← ENNReal.toReal_eq_one_iff]\n have hfm : AEStronglyMeasurable (gaussianPDFReal μ v) volume :=\n (stronglyMeasurable_gaussianPDFReal μ v).aestronglyMeasurable\n have hf : 0 ≤ₐₛ gaussianPDFReal μ v := ae_of_all _ (gaussianPDFReal_nonneg μ v)\n rw [← integral_eq_lintegral_of_nonneg_ae hf hfm]\n simp only [gaussianPDFReal, zero_lt_two, mul_nonneg_iff_of_pos_right, one_div,\n Nat.cast_ofNat, integral_mul_left]\n rw [integral_sub_right_eq_self (μ := volume) (fun a ↦ rexp (-a ^ 2 / ((2 : ℝ) * v))) μ]\n simp only [zero_lt_two, mul_nonneg_iff_of_pos_right, div_eq_inv_mul, mul_inv_rev,\n mul_neg]\n simp_rw [← neg_mul]\n rw [neg_mul, integral_gaussian, ← Real.sqrt_inv, ← Real.sqrt_mul]\n · field_simp\n ring\n · positivity",
"start": [
96,
1
],
"end": [
113,
15
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.integral_gaussianPDFReal_eq_one",
"code": "lemma integral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :\n ∫ x, gaussianPDFReal μ v x = 1 := by\n have h := lintegral_gaussianPDFReal_eq_one μ hv\n rw [← ofReal_integral_eq_lintegral_ofReal (integrable_gaussianPDFReal _ _)\n (ae_of_all _ (gaussianPDFReal_nonneg _ _)), ← ENNReal.ofReal_one] at h\n rwa [← ENNReal.ofReal_eq_ofReal_iff (integral_nonneg (gaussianPDFReal_nonneg _ _)) zero_le_one]",
"start": [
115,
1
],
"end": [
121,
98
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_sub",
"code": "lemma gaussianPDFReal_sub {μ : ℝ} {v : ℝ≥0} (x y : ℝ) :\n gaussianPDFReal μ v (x - y) = gaussianPDFReal (μ + y) v x := by\n simp only [gaussianPDFReal]\n rw [sub_add_eq_sub_sub_swap]",
"start": [
123,
1
],
"end": [
126,
31
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_add",
"code": "lemma gaussianPDFReal_add {μ : ℝ} {v : ℝ≥0} (x y : ℝ) :\n gaussianPDFReal μ v (x + y) = gaussianPDFReal (μ - y) v x := by\n rw [sub_eq_add_neg, ← gaussianPDFReal_sub, sub_eq_add_neg, neg_neg]",
"start": [
128,
1
],
"end": [
130,
70
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_inv_mul",
"code": "lemma gaussianPDFReal_inv_mul {μ : ℝ} {v : ℝ≥0} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :\n gaussianPDFReal μ v (c⁻¹ * x) = |c| * gaussianPDFReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) x := by\n simp only [gaussianPDFReal.eq_1, zero_lt_two, mul_nonneg_iff_of_pos_left, NNReal.zero_le_coe,\n Real.sqrt_mul', one_div, mul_inv_rev, NNReal.coe_mul, NNReal.coe_mk, NNReal.coe_pos]\n rw [← mul_assoc]\n refine congr_arg₂ _ ?_ ?_\n · field_simp\n rw [Real.sqrt_sq_eq_abs]\n ring_nf\n calc (Real.sqrt ↑v)⁻¹ * (Real.sqrt 2)⁻¹ * (Real.sqrt π)⁻¹\n = (Real.sqrt ↑v)⁻¹ * (Real.sqrt 2)⁻¹ * (Real.sqrt π)⁻¹ * (|c| * |c|⁻¹) := by\n rw [mul_inv_cancel, mul_one]\n simp only [ne_eq, abs_eq_zero, hc, not_false_eq_true]\n _ = (Real.sqrt ↑v)⁻¹ * (Real.sqrt 2)⁻¹ * (Real.sqrt π)⁻¹ * |c| * |c|⁻¹ := by ring\n · congr 1\n field_simp\n congr 1\n ring",
"start": [
132,
1
],
"end": [
149,
9
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDFReal_mul",
"code": "lemma gaussianPDFReal_mul {μ : ℝ} {v : ℝ≥0} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :\n gaussianPDFReal μ v (c * x)\n = |c⁻¹| * gaussianPDFReal (c⁻¹ * μ) (⟨(c^2)⁻¹, inv_nonneg.mpr (sq_nonneg _)⟩ * v) x := by\n conv_lhs => rw [← inv_inv c, gaussianPDFReal_inv_mul (inv_ne_zero hc)]\n simp",
"start": [
151,
1
],
"end": [
155,
7
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDF",
"code": "noncomputable\ndef gaussianPDF (μ : ℝ) (v : ℝ≥0) (x : ℝ) : ℝ≥0∞ := ENNReal.ofReal (gaussianPDFReal μ v x)",
"start": [
157,
1
],
"end": [
159,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "ProbabilityTheory.gaussianPDF_def",
"code": "lemma gaussianPDF_def (μ : ℝ) (v : ℝ≥0) :\n gaussianPDF μ v = fun x ↦ ENNReal.ofReal (gaussianPDFReal μ v x) := rfl",
"start": [
161,
1
],
"end": [
162,
76
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDF_zero_var",
"code": "@[simp]\nlemma gaussianPDF_zero_var (μ : ℝ) : gaussianPDF μ 0 = 0 := by\n ext\n simp [gaussianPDF]",
"start": [
164,
1
],
"end": [
167,
21
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianPDF_pos",
"code": "lemma gaussianPDF_pos (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (x : ℝ) : 0 < gaussianPDF μ v x := by\n rw [gaussianPDF, ENNReal.ofReal_pos]\n exact gaussianPDFReal_pos _ _ _ hv",
"start": [
169,
1
],
"end": [
171,
37
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.measurable_gaussianPDF",
"code": "@[measurability]\nlemma measurable_gaussianPDF (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDF μ v) :=\n (measurable_gaussianPDFReal _ _).ennreal_ofReal",
"start": [
173,
1
],
"end": [
175,
50
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.lintegral_gaussianPDF_eq_one",
"code": "@[simp]\nlemma lintegral_gaussianPDF_eq_one (μ : ℝ) {v : ℝ≥0} (h : v ≠ 0) :\n ∫⁻ x, gaussianPDF μ v x = 1 :=\n lintegral_gaussianPDFReal_eq_one μ h",
"start": [
177,
1
],
"end": [
180,
39
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal",
"code": "noncomputable\ndef gaussianReal (μ : ℝ) (v : ℝ≥0) : Measure ℝ :=\n if v = 0 then Measure.dirac μ else volume.withDensity (gaussianPDF μ v)",
"start": [
186,
1
],
"end": [
189,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "ProbabilityTheory.gaussianReal_of_var_ne_zero",
"code": "lemma gaussianReal_of_var_ne_zero (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :\n gaussianReal μ v = volume.withDensity (gaussianPDF μ v) := if_neg hv",
"start": [
191,
1
],
"end": [
192,
73
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_zero_var",
"code": "@[simp]\nlemma gaussianReal_zero_var (μ : ℝ) : gaussianReal μ 0 = Measure.dirac μ := if_pos rfl",
"start": [
194,
1
],
"end": [
195,
87
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.instIsProbabilityMeasureGaussianReal",
"code": "instance instIsProbabilityMeasureGaussianReal (μ : ℝ) (v : ℝ≥0) :\n IsProbabilityMeasure (gaussianReal μ v) where\n measure_univ := by by_cases h : v = 0 <;> simp [gaussianReal_of_var_ne_zero, h]",
"start": [
197,
1
],
"end": [
199,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "ProbabilityTheory.gaussianReal_apply",
"code": "lemma gaussianReal_apply (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :\n gaussianReal μ v s = ∫⁻ x in s, gaussianPDF μ v x := by\n rw [gaussianReal_of_var_ne_zero _ hv, withDensity_apply' _ s]",
"start": [
201,
1
],
"end": [
203,
64
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_apply_eq_integral",
"code": "lemma gaussianReal_apply_eq_integral (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :\n gaussianReal μ v s = ENNReal.ofReal (∫ x in s, gaussianPDFReal μ v x) := by\n rw [gaussianReal_apply _ hv s, ofReal_integral_eq_lintegral_ofReal]\n · rfl\n · exact (integrable_gaussianPDFReal _ _).restrict\n · exact ae_of_all _ (gaussianPDFReal_nonneg _ _)",
"start": [
205,
1
],
"end": [
210,
51
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_absolutelyContinuous",
"code": "lemma gaussianReal_absolutelyContinuous (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :\n gaussianReal μ v ≪ volume := by\n rw [gaussianReal_of_var_ne_zero _ hv]\n exact withDensity_absolutelyContinuous _ _",
"start": [
212,
1
],
"end": [
215,
45
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_absolutelyContinuous'",
"code": "lemma gaussianReal_absolutelyContinuous' (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :\n volume ≪ gaussianReal μ v := by\n rw [gaussianReal_of_var_ne_zero _ hv]\n refine withDensity_absolutelyContinuous' ?_ ?_\n · exact (measurable_gaussianPDF _ _).aemeasurable\n · exact ae_of_all _ (fun _ ↦ (gaussianPDF_pos _ hv _).ne')",
"start": [
217,
1
],
"end": [
222,
61
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.rnDeriv_gaussianReal",
"code": "lemma rnDeriv_gaussianReal (μ : ℝ) (v : ℝ≥0) :\n ∂(gaussianReal μ v)/∂volume =ₐₛ gaussianPDF μ v := by\n by_cases hv : v = 0\n · simp only [hv, gaussianReal_zero_var, gaussianPDF_zero_var]\n refine (Measure.eq_rnDeriv measurable_zero (mutuallySingular_dirac μ volume) ?_).symm\n rw [withDensity_zero, add_zero]\n · rw [gaussianReal_of_var_ne_zero _ hv]\n exact Measure.rnDeriv_withDensity _ (measurable_gaussianPDF μ v)",
"start": [
224,
1
],
"end": [
231,
69
],
"kind": "lemma"
},
{
"full_name": "MeasurableEmbedding.gaussianReal_comap_apply",
"code": "lemma _root_.MeasurableEmbedding.gaussianReal_comap_apply (hv : v ≠ 0)\n {f : ℝ → ℝ} (hf : MeasurableEmbedding f)\n {f' : ℝ → ℝ} (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :\n (gaussianReal μ v).comap f s\n = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x)) := by\n rw [gaussianReal_of_var_ne_zero _ hv, gaussianPDF_def]\n exact hf.withDensity_ofReal_comap_apply_eq_integral_abs_deriv_mul' hs h_deriv\n (ae_of_all _ (gaussianPDFReal_nonneg _ _)) (integrable_gaussianPDFReal _ _)",
"start": [
237,
1
],
"end": [
244,
80
],
"kind": "lemma"
},
{
"full_name": "MeasurableEquiv.gaussianReal_map_symm_apply",
"code": "lemma _root_.MeasurableEquiv.gaussianReal_map_symm_apply (hv : v ≠ 0) (f : ℝ ≃ᵐ ℝ) {f' : ℝ → ℝ}\n (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :\n (gaussianReal μ v).map f.symm s\n = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x)) := by\n rw [gaussianReal_of_var_ne_zero _ hv, gaussianPDF_def]\n exact f.withDensity_ofReal_map_symm_apply_eq_integral_abs_deriv_mul' hs h_deriv\n (ae_of_all _ (gaussianPDFReal_nonneg _ _)) (integrable_gaussianPDFReal _ _)",
"start": [
246,
1
],
"end": [
252,
80
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_map_add_const",
"code": "lemma gaussianReal_map_add_const (y : ℝ) :\n (gaussianReal μ v).map (· + y) = gaussianReal (μ + y) v := by\n by_cases hv : v = 0\n · simp only [hv, ne_eq, not_true, gaussianReal_zero_var]\n exact Measure.map_dirac (measurable_id'.add_const _) _\n let e : ℝ ≃ᵐ ℝ := (Homeomorph.addRight y).symm.toMeasurableEquiv\n have he' : ∀ x, HasDerivAt e ((fun _ ↦ 1) x) x := fun _ ↦ (hasDerivAt_id _).sub_const y\n change (gaussianReal μ v).map e.symm = gaussianReal (μ + y) v\n ext s' hs'\n rw [MeasurableEquiv.gaussianReal_map_symm_apply hv e he' hs']\n simp only [abs_neg, abs_one, MeasurableEquiv.coe_mk, Equiv.coe_fn_mk, one_mul, ne_eq]\n rw [gaussianReal_apply_eq_integral _ hv s']\n simp [e, gaussianPDFReal_sub _ y, Homeomorph.addRight, ← sub_eq_add_neg]",
"start": [
254,
1
],
"end": [
267,
75
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_map_const_add",
"code": "lemma gaussianReal_map_const_add (y : ℝ) :\n (gaussianReal μ v).map (y + ·) = gaussianReal (μ + y) v := by\n simp_rw [add_comm y]\n exact gaussianReal_map_add_const y",
"start": [
269,
1
],
"end": [
273,
37
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_map_const_mul",
"code": "lemma gaussianReal_map_const_mul (c : ℝ) :\n (gaussianReal μ v).map (c * ·) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) := by\n by_cases hv : v = 0\n · simp only [hv, mul_zero, ne_eq, not_true, gaussianReal_zero_var]\n exact Measure.map_dirac (measurable_id'.const_mul c) μ\n by_cases hc : c = 0\n · simp only [hc, zero_mul, ne_eq, abs_zero, mul_eq_zero]\n rw [Measure.map_const]\n simp only [ne_eq, measure_univ, one_smul, mul_eq_zero]\n convert (gaussianReal_zero_var 0).symm\n simp only [ne_eq, zero_pow, mul_eq_zero, hv, or_false, not_false_eq_true]\n rfl\n let e : ℝ ≃ᵐ ℝ := (Homeomorph.mulLeft₀ c hc).symm.toMeasurableEquiv\n have he' : ∀ x, HasDerivAt e ((fun _ ↦ c⁻¹) x) x := by\n suffices ∀ x, HasDerivAt (fun x => c⁻¹ * x) (c⁻¹ * 1) x by rwa [mul_one] at this\n exact fun _ ↦ HasDerivAt.const_mul _ (hasDerivAt_id _)\n change (gaussianReal μ v).map e.symm = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)\n ext s' hs'\n rw [MeasurableEquiv.gaussianReal_map_symm_apply hv e he' hs',\n gaussianReal_apply_eq_integral _ _ s']\n swap\n · simp only [ne_eq, mul_eq_zero, hv, or_false]\n rw [← NNReal.coe_inj]\n simp [hc]\n simp only [e, Homeomorph.mulLeft₀, Equiv.toFun_as_coe, Equiv.mulLeft₀_apply, Equiv.invFun_as_coe,\n Equiv.mulLeft₀_symm_apply, Homeomorph.toMeasurableEquiv_coe, Homeomorph.homeomorph_mk_coe_symm,\n Equiv.coe_fn_symm_mk, gaussianPDFReal_inv_mul hc]\n congr with x\n suffices |c⁻¹| * |c| = 1 by rw [← mul_assoc, this, one_mul]\n rw [abs_inv, inv_mul_cancel]\n rwa [ne_eq, abs_eq_zero]",
"start": [
275,
1
],
"end": [
306,
27
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_map_mul_const",
"code": "lemma gaussianReal_map_mul_const (c : ℝ) :\n (gaussianReal μ v).map (· * c) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) := by\n simp_rw [mul_comm _ c]\n exact gaussianReal_map_const_mul c",
"start": [
308,
1
],
"end": [
312,
37
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_add_const",
"code": "lemma gaussianReal_add_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (y : ℝ) :\n Measure.map (fun ω ↦ X ω + y) ℙ = gaussianReal (μ + y) v := by\n have hXm : AEMeasurable X := aemeasurable_of_map_neZero (by rw [hX]; infer_instance)\n change Measure.map ((fun ω ↦ ω + y) ∘ X) ℙ = gaussianReal (μ + y) v\n rw [← AEMeasurable.map_map_of_aemeasurable (measurable_id'.add_const _).aemeasurable hXm, hX,\n gaussianReal_map_add_const y]",
"start": [
316,
1
],
"end": [
323,
34
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_const_add",
"code": "lemma gaussianReal_const_add {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (y : ℝ) :\n Measure.map (fun ω ↦ y + X ω) ℙ = gaussianReal (μ + y) v := by\n simp_rw [add_comm y]\n exact gaussianReal_add_const hX y",
"start": [
325,
1
],
"end": [
330,
36
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_const_mul",
"code": "lemma gaussianReal_const_mul {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :\n Measure.map (fun ω ↦ c * X ω) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) := by\n have hXm : AEMeasurable X := aemeasurable_of_map_neZero (by rw [hX]; infer_instance)\n change Measure.map ((fun ω ↦ c * ω) ∘ X) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)\n rw [← AEMeasurable.map_map_of_aemeasurable (measurable_id'.const_mul c).aemeasurable hXm, hX]\n exact gaussianReal_map_const_mul c",
"start": [
332,
1
],
"end": [
339,
37
],
"kind": "lemma"
},
{
"full_name": "ProbabilityTheory.gaussianReal_mul_const",
"code": "lemma gaussianReal_mul_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :\n Measure.map (fun ω ↦ X ω * c) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) := by\n simp_rw [mul_comm _ c]\n exact gaussianReal_const_mul hX c",
"start": [
341,
1
],
"end": [
346,
36
],
"kind": "lemma"
}
] |
Mathlib/Geometry/Manifold/VectorBundle/Pullback.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Geometry/Manifold/ContMDiffMap.lean",
"Mathlib/Geometry/Manifold/VectorBundle/Basic.lean"
] | [
{
"full_name": "SmoothVectorBundle.pullback",
"code": "instance SmoothVectorBundle.pullback : SmoothVectorBundle F (f *ᵖ E) IB' where\n smoothOn_coordChangeL := by\n rintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩\n refine ((smoothOn_coordChangeL _ e e').comp f.smooth.smoothOn fun b hb => hb).congr ?_\n rintro b (hb : f b ∈ e.baseSet ∩ e'.baseSet); ext v\n show ((e.pullback f).coordChangeL 𝕜 (e'.pullback f) b) v = (e.coordChangeL 𝕜 e' (f b)) v\n rw [e.coordChangeL_apply e' hb, (e.pullback f).coordChangeL_apply' _]\n exacts [rfl, hb]",
"start": [
35,
1
],
"end": [
44,
21
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Products/Associator.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Products/Basic.lean"
] | [
{
"full_name": "CategoryTheory.prod.associator",
"code": "@[simps]\ndef associator : (C × D) × E ⥤ C × D × E where\n obj X := (X.1.1, (X.1.2, X.2))\n map := @fun _ _ f => (f.1.1, (f.1.2, f.2))",
"start": [
24,
1
],
"end": [
29,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.prod.inverseAssociator",
"code": "@[simps]\ndef inverseAssociator : C × D × E ⥤ (C × D) × E where\n obj X := ((X.1, X.2.1), X.2.2)\n map := @fun _ _ f => ((f.1, f.2.1), f.2.2)",
"start": [
32,
1
],
"end": [
37,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.prod.associativity",
"code": "def associativity : (C × D) × E ≌ C × D × E :=\n Equivalence.mk (associator C D E) (inverseAssociator C D E)\n (NatIso.ofComponents fun X => eqToIso (by simp))\n (NatIso.ofComponents fun X => eqToIso (by simp))",
"start": [
40,
1
],
"end": [
45,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.prod.associatorIsEquivalence",
"code": "instance associatorIsEquivalence : (associator C D E).IsEquivalence :=\n (by infer_instance : (associativity C D E).functor.IsEquivalence)",
"start": [
48,
1
],
"end": [
49,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.prod.inverseAssociatorIsEquivalence",
"code": "instance inverseAssociatorIsEquivalence : (inverseAssociator C D E).IsEquivalence :=\n (by infer_instance : (associativity C D E).inverse.IsEquivalence)",
"start": [
52,
1
],
"end": [
53,
68
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/LocallyConvex/AbsConvex.lean | [
"Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/LocallyConvex/WithSeminorms.lean",
"Mathlib/Analysis/Convex/Gauge.lean"
] | [
{
"full_name": "nhds_basis_abs_convex",
"code": "theorem nhds_basis_abs_convex :\n (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ Balanced 𝕜 s ∧ Convex ℝ s) id",
"start": [
52,
1
],
"end": [
60,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "nhds_basis_abs_convex_open",
"code": "theorem nhds_basis_abs_convex_open :\n (𝓝 (0 : E)).HasBasis (fun s => (0 : E) ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s) id",
"start": [
65,
1
],
"end": [
74,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets",
"code": "def AbsConvexOpenSets :=\n { s : Set E // (0 : E) ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s }",
"start": [
85,
1
],
"end": [
87,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.instCoeTC",
"code": "noncomputable instance AbsConvexOpenSets.instCoeTC : CoeTC (AbsConvexOpenSets 𝕜 E) (Set E) :=\n ⟨Subtype.val⟩",
"start": [
90,
1
],
"end": [
91,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.coe_zero_mem",
"code": "theorem coe_zero_mem (s : AbsConvexOpenSets 𝕜 E) : (0 : E) ∈ (s : Set E)",
"start": [
98,
1
],
"end": [
99,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.coe_isOpen",
"code": "theorem coe_isOpen (s : AbsConvexOpenSets 𝕜 E) : IsOpen (s : Set E)",
"start": [
102,
1
],
"end": [
103,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.coe_nhds",
"code": "theorem coe_nhds (s : AbsConvexOpenSets 𝕜 E) : (s : Set E) ∈ 𝓝 (0 : E)",
"start": [
106,
1
],
"end": [
107,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.coe_balanced",
"code": "theorem coe_balanced (s : AbsConvexOpenSets 𝕜 E) : Balanced 𝕜 (s : Set E)",
"start": [
110,
1
],
"end": [
111,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.coe_convex",
"code": "theorem coe_convex (s : AbsConvexOpenSets 𝕜 E) : Convex ℝ (s : Set E)",
"start": [
114,
1
],
"end": [
115,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "AbsConvexOpenSets.instNonempty",
"code": "instance AbsConvexOpenSets.instNonempty : Nonempty (AbsConvexOpenSets 𝕜 E) := by\n rw [← exists_true_iff_nonempty]\n dsimp only [AbsConvexOpenSets]\n rw [Subtype.exists]\n exact ⟨Set.univ, ⟨mem_univ 0, isOpen_univ, balanced_univ, convex_univ⟩, trivial⟩",
"start": [
120,
1
],
"end": [
124,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "gaugeSeminormFamily",
"code": "noncomputable def gaugeSeminormFamily : SeminormFamily 𝕜 E (AbsConvexOpenSets 𝕜 E) := fun s =>\n gaugeSeminorm s.coe_balanced s.coe_convex (absorbent_nhds_zero s.coe_nhds)",
"start": [
134,
1
],
"end": [
136,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "gaugeSeminormFamily_ball",
"code": "theorem gaugeSeminormFamily_ball (s : AbsConvexOpenSets 𝕜 E) :\n (gaugeSeminormFamily 𝕜 E s).ball 0 1 = (s : Set E)",
"start": [
141,
1
],
"end": [
146,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "with_gaugeSeminormFamily",
"code": "theorem with_gaugeSeminormFamily : WithSeminorms (gaugeSeminormFamily 𝕜 E)",
"start": [
152,
1
],
"end": [
173,
32
],
"kind": "commanddeclaration"
}
] |
Mathlib/Geometry/Manifold/VectorBundle/SmoothSection.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Topology/ContinuousFunction/Basic.lean",
"Mathlib/Geometry/Manifold/MFDeriv/Basic.lean",
"Mathlib/Geometry/Manifold/Algebra/LieGroup.lean"
] | [
{
"full_name": "ContMDiffSection",
"code": "structure ContMDiffSection where\n \n protected toFun : ∀ x, V x\n \n protected contMDiff_toFun : ContMDiff I (I.prod 𝓘(𝕜, F)) n fun x ↦\n TotalSpace.mk' F x (toFun x)",
"start": [
43,
1
],
"end": [
49,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SmoothSection",
"code": "abbrev SmoothSection :=\n ContMDiffSection I F ⊤ V",
"start": [
52,
1
],
"end": [
54,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coeFn_mk",
"code": "@[simp]\ntheorem coeFn_mk (s : ∀ x, V x)\n (hs : ContMDiff I (I.prod 𝓘(𝕜, F)) n fun x => TotalSpace.mk x (s x)) :\n (mk s hs : ∀ x, V x) = s",
"start": [
69,
1
],
"end": [
73,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.contMDiff",
"code": "protected theorem contMDiff (s : Cₛ^n⟮I; F, V⟯) :\n ContMDiff I (I.prod 𝓘(𝕜, F)) n fun x => TotalSpace.mk' F x (s x : V x)",
"start": [
76,
1
],
"end": [
78,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.smooth",
"code": "protected theorem smooth (s : Cₛ^∞⟮I; F, V⟯) :\n Smooth I (I.prod 𝓘(𝕜, F)) fun x => TotalSpace.mk' F x (s x : V x)",
"start": [
81,
1
],
"end": [
83,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.mdifferentiable'",
"code": "protected theorem mdifferentiable' (s : Cₛ^n⟮I; F, V⟯) (hn : 1 ≤ n) :\n MDifferentiable I (I.prod 𝓘(𝕜, F)) fun x => TotalSpace.mk' F x (s x : V x)",
"start": [
86,
1
],
"end": [
88,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.mdifferentiable",
"code": "protected theorem mdifferentiable (s : Cₛ^∞⟮I; F, V⟯) :\n MDifferentiable I (I.prod 𝓘(𝕜, F)) fun x => TotalSpace.mk' F x (s x : V x)",
"start": [
91,
1
],
"end": [
93,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.mdifferentiableAt",
"code": "protected theorem mdifferentiableAt (s : Cₛ^∞⟮I; F, V⟯) {x} :\n MDifferentiableAt I (I.prod 𝓘(𝕜, F)) (fun x => TotalSpace.mk' F x (s x : V x)) x",
"start": [
96,
1
],
"end": [
98,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_inj",
"code": "theorem coe_inj ⦃s t : Cₛ^n⟮I; F, V⟯⦄ (h : (s : ∀ x, V x) = t) : s = t",
"start": [
101,
1
],
"end": [
102,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_injective",
"code": "theorem coe_injective : Injective ((↑) : Cₛ^n⟮I; F, V⟯ → ∀ x, V x)",
"start": [
105,
1
],
"end": [
106,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.ext",
"code": "@[ext]\ntheorem ext (h : ∀ x, s x = t x) : s = t",
"start": [
109,
1
],
"end": [
110,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instAdd",
"code": "instance instAdd : Add Cₛ^n⟮I; F, V⟯ := by\n refine ⟨fun s t => ⟨s + t, ?_⟩⟩\n intro x₀\n have hs := s.contMDiff x₀\n have ht := t.contMDiff x₀\n rw [contMDiffAt_section] at hs ht ⊢\n set e := trivializationAt F V x₀\n refine (hs.add ht).congr_of_eventuallyEq ?_\n refine eventually_of_mem (e.open_baseSet.mem_nhds <| mem_baseSet_trivializationAt F V x₀) ?_\n intro x hx\n apply (e.linear 𝕜 hx).1",
"start": [
113,
1
],
"end": [
123,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_add",
"code": "@[simp]\ntheorem coe_add (s t : Cₛ^n⟮I; F, V⟯) : ⇑(s + t) = ⇑s + t",
"start": [
126,
1
],
"end": [
128,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instSub",
"code": "instance instSub : Sub Cₛ^n⟮I; F, V⟯ := by\n refine ⟨fun s t => ⟨s - t, ?_⟩⟩\n intro x₀\n have hs := s.contMDiff x₀\n have ht := t.contMDiff x₀\n rw [contMDiffAt_section] at hs ht ⊢\n set e := trivializationAt F V x₀\n refine (hs.sub ht).congr_of_eventuallyEq ?_\n refine eventually_of_mem (e.open_baseSet.mem_nhds <| mem_baseSet_trivializationAt F V x₀) ?_\n intro x hx\n apply (e.linear 𝕜 hx).map_sub",
"start": [
131,
1
],
"end": [
141,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_sub",
"code": "@[simp]\ntheorem coe_sub (s t : Cₛ^n⟮I; F, V⟯) : ⇑(s - t) = s - t",
"start": [
144,
1
],
"end": [
146,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instZero",
"code": "instance instZero : Zero Cₛ^n⟮I; F, V⟯ :=\n ⟨⟨fun _ => 0, (smooth_zeroSection 𝕜 V).of_le le_top⟩⟩",
"start": [
149,
1
],
"end": [
150,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.inhabited",
"code": "instance inhabited : Inhabited Cₛ^n⟮I; F, V⟯ :=\n ⟨0⟩",
"start": [
153,
1
],
"end": [
154,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_zero",
"code": "@[simp]\ntheorem coe_zero : ⇑(0 : Cₛ^n⟮I; F, V⟯) = 0",
"start": [
157,
1
],
"end": [
159,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instSMul",
"code": "instance instSMul : SMul 𝕜 Cₛ^n⟮I; F, V⟯ := by\n refine ⟨fun c s => ⟨c • ⇑s, ?_⟩⟩\n intro x₀\n have hs := s.contMDiff x₀\n rw [contMDiffAt_section] at hs ⊢\n set e := trivializationAt F V x₀\n refine ((contMDiffAt_const (c := c)).smul hs).congr_of_eventuallyEq ?_\n refine eventually_of_mem (e.open_baseSet.mem_nhds <| mem_baseSet_trivializationAt F V x₀) ?_\n intro x hx\n apply (e.linear 𝕜 hx).2",
"start": [
162,
1
],
"end": [
171,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_smul",
"code": "@[simp]\ntheorem coe_smul (r : 𝕜) (s : Cₛ^n⟮I; F, V⟯) : ⇑(r • s : Cₛ^n⟮I; F, V⟯) = r • ⇑s",
"start": [
174,
1
],
"end": [
176,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instNeg",
"code": "instance instNeg : Neg Cₛ^n⟮I; F, V⟯ := by\n refine ⟨fun s => ⟨-s, ?_⟩⟩\n intro x₀\n have hs := s.contMDiff x₀\n rw [contMDiffAt_section] at hs ⊢\n set e := trivializationAt F V x₀\n refine hs.neg.congr_of_eventuallyEq ?_\n refine eventually_of_mem (e.open_baseSet.mem_nhds <| mem_baseSet_trivializationAt F V x₀) ?_\n intro x hx\n apply (e.linear 𝕜 hx).map_neg",
"start": [
179,
1
],
"end": [
188,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_neg",
"code": "@[simp]\ntheorem coe_neg (s : Cₛ^n⟮I; F, V⟯) : ⇑(-s : Cₛ^n⟮I; F, V⟯) = -s",
"start": [
191,
1
],
"end": [
193,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instNSMul",
"code": "instance instNSMul : SMul ℕ Cₛ^n⟮I; F, V⟯ :=\n ⟨nsmulRec⟩",
"start": [
196,
1
],
"end": [
197,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_nsmul",
"code": "@[simp]\ntheorem coe_nsmul (s : Cₛ^n⟮I; F, V⟯) (k : ℕ) : ⇑(k • s : Cₛ^n⟮I; F, V⟯) = k • ⇑s",
"start": [
200,
1
],
"end": [
204,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instZSMul",
"code": "instance instZSMul : SMul ℤ Cₛ^n⟮I; F, V⟯ :=\n ⟨zsmulRec⟩",
"start": [
207,
1
],
"end": [
208,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coe_zsmul",
"code": "@[simp]\ntheorem coe_zsmul (s : Cₛ^n⟮I; F, V⟯) (z : ℤ) : ⇑(z • s : Cₛ^n⟮I; F, V⟯) = z • ⇑s",
"start": [
211,
1
],
"end": [
217,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instAddCommGroup",
"code": "instance instAddCommGroup : AddCommGroup Cₛ^n⟮I; F, V⟯ :=\n coe_injective.addCommGroup _ coe_zero coe_add coe_neg coe_sub coe_nsmul coe_zsmul",
"start": [
220,
1
],
"end": [
221,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.coeAddHom",
"code": "def coeAddHom : Cₛ^n⟮I; F, V⟯ →+ ∀ x, V x where\n toFun := (↑)\n map_zero' := coe_zero\n map_add' := coe_add",
"start": [
226,
1
],
"end": [
230,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "ContMDiffSection.instModule",
"code": "instance instModule : Module 𝕜 Cₛ^n⟮I; F, V⟯ :=\n coe_injective.module 𝕜 (coeAddHom I F n V) coe_smul",
"start": [
235,
1
],
"end": [
236,
54
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Grothendieck.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Elements.lean",
"Mathlib/CategoryTheory/Category/Cat.lean"
] | [
{
"full_name": "CategoryTheory.Grothendieck",
"code": "structure Grothendieck where\n \n base : C\n \n fiber : F.obj base",
"start": [
46,
1
],
"end": [
60,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.Hom",
"code": "structure Hom (X Y : Grothendieck F) where\n \n base : X.base ⟶ Y.base\n \n fiber : (F.map base).obj X.fiber ⟶ Y.fiber",
"start": [
67,
1
],
"end": [
74,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.ext",
"code": "@[ext]\ntheorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)\n (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g",
"start": [
77,
1
],
"end": [
83,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.id",
"code": "@[simps]\ndef id (X : Grothendieck F) : Hom X X where\n base := 𝟙 X.base\n fiber := eqToHom (by erw [CategoryTheory.Functor.map_id, Functor.id_obj X.fiber])",
"start": [
86,
1
],
"end": [
91,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.comp",
"code": "@[simps]\ndef comp {X Y Z : Grothendieck F} (f : Hom X Y) (g : Hom Y Z) : Hom X Z where\n base := f.base ≫ g.base\n fiber :=\n eqToHom (by erw [Functor.map_comp, Functor.comp_obj]) ≫ (F.map g.base).map f.fiber ≫ g.fiber",
"start": [
97,
1
],
"end": [
103,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.id_fiber'",
"code": "@[simp]\ntheorem id_fiber' (X : Grothendieck F) :\n Hom.fiber (𝟙 X) = eqToHom (by erw [CategoryTheory.Functor.map_id, Functor.id_obj X.fiber])",
"start": [
126,
1
],
"end": [
129,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.congr",
"code": "theorem congr {X Y : Grothendieck F} {f g : X ⟶ Y} (h : f = g) :\n f.fiber = eqToHom (by subst h; rfl) ≫ g.fiber",
"start": [
132,
1
],
"end": [
136,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.forget",
"code": "@[simps!]\ndef forget : Grothendieck F ⥤ C where\n obj X := X.1\n map := @fun X Y f => f.1",
"start": [
143,
1
],
"end": [
147,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.grothendieckTypeToCatFunctor",
"code": "@[simps!]\ndef grothendieckTypeToCatFunctor : Grothendieck (G ⋙ typeToCat) ⥤ G.Elements where\n obj X := ⟨X.1, X.2.as⟩\n map := @fun X Y f => ⟨f.1, f.2.1.1⟩",
"start": [
156,
1
],
"end": [
160,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.grothendieckTypeToCatInverse",
"code": "@[simps! obj_base obj_fiber_as map_base]\ndef grothendieckTypeToCatInverse : G.Elements ⥤ Grothendieck (G ⋙ typeToCat) where\n obj X := ⟨X.1, ⟨X.2⟩⟩\n map f := ⟨f.1, ⟨⟨f.2⟩⟩⟩",
"start": [
164,
1
],
"end": [
172,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Grothendieck.grothendieckTypeToCat",
"code": "@[simps! functor_obj_fst functor_obj_snd functor_map_coe inverse_obj_base inverse_obj_fiber_as\n inverse_map_base unitIso_hom_app_base unitIso_hom_app_fiber unitIso_inv_app_base\n unitIso_inv_app_fiber counitIso_hom_app_coe counitIso_inv_app_coe]\ndef grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements where\n functor := grothendieckTypeToCatFunctor G\n inverse := grothendieckTypeToCatInverse G\n unitIso :=\n NatIso.ofComponents\n (fun X => by\n rcases X with ⟨_, ⟨⟩⟩\n exact Iso.refl _)\n (by\n rintro ⟨_, ⟨⟩⟩ ⟨_, ⟨⟩⟩ ⟨base, ⟨⟨f⟩⟩⟩\n dsimp at *\n simp\n rfl)\n counitIso :=\n NatIso.ofComponents\n (fun X => by\n cases X\n exact Iso.refl _)\n (by\n rintro ⟨⟩ ⟨⟩ ⟨f, e⟩\n dsimp at *\n simp\n rfl)\n functor_unitIso_comp := by\n rintro ⟨_, ⟨⟩⟩\n dsimp\n simp\n rfl",
"start": [
176,
1
],
"end": [
213,
8
],
"kind": "commanddeclaration"
}
] |
Mathlib/AlgebraicGeometry/Morphisms/UniversallyClosed.lean | [
"Mathlib/Topology/LocalAtTarget.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/AlgebraicGeometry/Morphisms/Constructors.lean"
] | [
{
"full_name": "AlgebraicGeometry.UniversallyClosed",
"code": "@[mk_iff]\nclass UniversallyClosed (f : X ⟶ Y) : Prop where\n out : universally (topologically @IsClosedMap) f",
"start": [
37,
1
],
"end": [
42,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosed_eq",
"code": "theorem universallyClosed_eq : @UniversallyClosed = universally (topologically @IsClosedMap)",
"start": [
45,
1
],
"end": [
46,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosed_respectsIso",
"code": "theorem universallyClosed_respectsIso : RespectsIso @UniversallyClosed",
"start": [
49,
1
],
"end": [
50,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosed_stableUnderBaseChange",
"code": "theorem universallyClosed_stableUnderBaseChange : StableUnderBaseChange @UniversallyClosed",
"start": [
53,
1
],
"end": [
54,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.isClosedMap_isStableUnderComposition",
"code": "instance isClosedMap_isStableUnderComposition :\n IsStableUnderComposition (topologically @IsClosedMap) where\n comp_mem f g hf hg := IsClosedMap.comp (f := f.1.base) (g := g.1.base) hg hf",
"start": [
57,
1
],
"end": [
59,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosed_isStableUnderComposition",
"code": "instance universallyClosed_isStableUnderComposition :\n IsStableUnderComposition @UniversallyClosed := by\n rw [universallyClosed_eq]\n infer_instance",
"start": [
61,
1
],
"end": [
64,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosedTypeComp",
"code": "instance universallyClosedTypeComp {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z)\n [hf : UniversallyClosed f] [hg : UniversallyClosed g] : UniversallyClosed (f ≫ g) :=\n comp_mem _ _ _ hf hg",
"start": [
67,
1
],
"end": [
69,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.topologically_isClosedMap_respectsIso",
"code": "theorem topologically_isClosedMap_respectsIso : RespectsIso (topologically @IsClosedMap)",
"start": [
72,
1
],
"end": [
76,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosedFst",
"code": "instance universallyClosedFst {X Y Z : Scheme} (f : X ⟶ Z) (g : Y ⟶ Z) [hg : UniversallyClosed g] :\n UniversallyClosed (pullback.fst : pullback f g ⟶ _) :=\n universallyClosed_stableUnderBaseChange.fst f g hg",
"start": [
78,
1
],
"end": [
80,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosedSnd",
"code": "instance universallyClosedSnd {X Y Z : Scheme} (f : X ⟶ Z) (g : Y ⟶ Z) [hf : UniversallyClosed f] :\n UniversallyClosed (pullback.snd : pullback f g ⟶ _) :=\n universallyClosed_stableUnderBaseChange.snd f g hf",
"start": [
83,
1
],
"end": [
85,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.universallyClosed_isLocalAtTarget",
"code": "theorem universallyClosed_isLocalAtTarget : PropertyIsLocalAtTarget @UniversallyClosed",
"start": [
88,
1
],
"end": [
94,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.UniversallyClosed.openCover_iff",
"code": "theorem UniversallyClosed.openCover_iff {X Y : Scheme.{u}} (f : X ⟶ Y)\n (𝒰 : Scheme.OpenCover.{u} Y) :\n UniversallyClosed f ↔ ∀ i, UniversallyClosed (pullback.snd : pullback f (𝒰.map i) ⟶ _)",
"start": [
97,
1
],
"end": [
100,
54
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Seq/Parallel.lean | [
"Mathlib/Init/Data/Prod.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/Seq/WSeq.lean"
] | [
{
"full_name": "Computation.parallel.aux2",
"code": "def parallel.aux2 : List (Computation α) → Sum α (List (Computation α)) :=\n List.foldr\n (fun c o =>\n match o with\n | Sum.inl a => Sum.inl a\n | Sum.inr ls => rmap (fun c' => c' :: ls) (destruct c))\n (Sum.inr [])",
"start": [
29,
1
],
"end": [
35,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel.aux1",
"code": "def parallel.aux1 :\n List (Computation α) × WSeq (Computation α) →\n Sum α (List (Computation α) × WSeq (Computation α))\n | (l, S) =>\n rmap\n (fun l' =>\n match Seq.destruct S with\n | none => (l', Seq.nil)\n | some (none, S') => (l', S')\n | some (some c, S') => (c :: l', S'))\n (parallel.aux2 l)",
"start": [
38,
1
],
"end": [
48,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel",
"code": "def parallel (S : WSeq (Computation α)) : Computation α :=\n corec parallel.aux1 ([], S)",
"start": [
51,
1
],
"end": [
54,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.terminates_parallel.aux",
"code": "theorem terminates_parallel.aux :\n ∀ {l : List (Computation α)} {S c},\n c ∈ l → Terminates c → Terminates (corec parallel.aux1 (l, S))",
"start": [
57,
1
],
"end": [
119,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.terminates_parallel",
"code": "theorem terminates_parallel {S : WSeq (Computation α)} {c} (h : c ∈ S) [T : Terminates c] :\n Terminates (parallel S)",
"start": [
122,
1
],
"end": [
186,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.exists_of_mem_parallel",
"code": "theorem exists_of_mem_parallel {S : WSeq (Computation α)} {a} (h : a ∈ parallel S) :\n ∃ c ∈ S, a ∈ c",
"start": [
189,
1
],
"end": [
266,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.map_parallel",
"code": "theorem map_parallel (f : α → β) (S) : map f (parallel S) = parallel (S.map (map f))",
"start": [
269,
1
],
"end": [
293,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel_empty",
"code": "theorem parallel_empty (S : WSeq (Computation α)) (h : S.head ~> none) : parallel S = empty _",
"start": [
296,
1
],
"end": [
301,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallelRec",
"code": "def parallelRec {S : WSeq (Computation α)} (C : α → Sort v) (H : ∀ s ∈ S, ∀ a ∈ s, C a) {a}\n (h : a ∈ parallel S) : C a := by\n let T : WSeq (Computation (α × Computation α)) := S.map fun c => c.map fun a => (a, c)\n have : S = T.map (map fun c => c.1) := by\n rw [← WSeq.map_comp]\n refine (WSeq.map_id _).symm.trans (congr_arg (fun f => WSeq.map f S) ?_)\n funext c\n dsimp [id, Function.comp_def]\n rw [← map_comp]\n exact (map_id _).symm\n have pe := congr_arg parallel this\n rw [← map_parallel] at pe\n have h' := h\n rw [pe] at h'\n haveI : Terminates (parallel T) := (terminates_map_iff _ _).1 ⟨⟨_, h'⟩⟩\n induction' e : get (parallel T) with a' c\n have : a ∈ c ∧ c ∈ S := by\n rcases exists_of_mem_map h' with ⟨d, dT, cd⟩\n rw [get_eq_of_mem _ dT] at e\n cases e\n dsimp at cd\n cases cd\n rcases exists_of_mem_parallel dT with ⟨d', dT', ad'⟩\n rcases WSeq.exists_of_mem_map dT' with ⟨c', cs', e'⟩\n rw [← e'] at ad'\n rcases exists_of_mem_map ad' with ⟨a', ac', e'⟩\n injection e' with i1 i2\n constructor\n · rwa [i1, i2] at ac'\n · rwa [i2] at cs'\n cases' this with ac cs\n apply H _ cs _ ac",
"start": [
305,
1
],
"end": [
336,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel_promises",
"code": "theorem parallel_promises {S : WSeq (Computation α)} {a} (H : ∀ s ∈ S, s ~> a) : parallel S ~> a",
"start": [
339,
1
],
"end": [
342,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.mem_parallel",
"code": "theorem mem_parallel {S : WSeq (Computation α)} {a} (H : ∀ s ∈ S, s ~> a) {c} (cs : c ∈ S)\n (ac : a ∈ c) : a ∈ parallel S",
"start": [
345,
1
],
"end": [
349,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel_congr_lem",
"code": "theorem parallel_congr_lem {S T : WSeq (Computation α)} {a} (H : S.LiftRel Equiv T) :\n (∀ s ∈ S, s ~> a) ↔ ∀ t ∈ T, t ~> a",
"start": [
352,
1
],
"end": [
359,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel_congr_left",
"code": "theorem parallel_congr_left {S T : WSeq (Computation α)} {a} (h1 : ∀ s ∈ S, s ~> a)\n (H : S.LiftRel Equiv T) : parallel S ~ parallel T",
"start": [
363,
1
],
"end": [
384,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "Computation.parallel_congr_right",
"code": "theorem parallel_congr_right {S T : WSeq (Computation α)} {a} (h2 : ∀ t ∈ T, t ~> a)\n (H : S.LiftRel Equiv T) : parallel S ~ parallel T",
"start": [
387,
1
],
"end": [
389,
54
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Ring/CentroidHom.lean | [
"Mathlib/Algebra/Module/Hom.lean",
"Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean",
"Mathlib/Algebra/Algebra/Defs.lean",
"Mathlib/Algebra/Ring/Subsemiring/Basic.lean",
"Mathlib/GroupTheory/GroupAction/Ring.lean",
"Mathlib/GroupTheory/GroupAction/Pi.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "CentroidHom",
"code": "structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where\n \n map_mul_left' (a b : α) : toFun (a * b) = a * toFun b\n \n map_mul_right' (a b : α) : toFun (a * b) = toFun a * b",
"start": [
52,
1
],
"end": [
57,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHomClass",
"code": "class CentroidHomClass (F α : Type*) [NonUnitalNonAssocSemiring α] [FunLike F α α] extends\n AddMonoidHomClass F α α : Prop where\n \n map_mul_left (f : F) (a b : α) : f (a * b) = a * f b\n \n map_mul_right (f : F) (a b : α) : f (a * b) = f a * b",
"start": [
62,
1
],
"end": [
70,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toFun_eq_coe",
"code": "theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f",
"start": [
116,
1
],
"end": [
116,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.ext",
"code": "@[ext]\ntheorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g",
"start": [
119,
1
],
"end": [
121,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_toAddMonoidHom",
"code": "@[simp, norm_cast]\ntheorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f",
"start": [
124,
1
],
"end": [
126,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toAddMonoidHom_eq_coe",
"code": "@[simp]\ntheorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f",
"start": [
129,
1
],
"end": [
131,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_toAddMonoidHom_injective",
"code": "theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α)",
"start": [
134,
1
],
"end": [
137,
9
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd",
"code": "def toEnd (f : CentroidHom α) : AddMonoid.End α :=\n (f : α →+ α)",
"start": [
140,
1
],
"end": [
142,
15
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_injective",
"code": "theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α)",
"start": [
145,
1
],
"end": [
146,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.copy",
"code": "protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α :=\n { f.toAddMonoidHom.copy f' <| h with\n toFun := f'\n map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left]\n map_mul_right' := fun a b ↦ by simp_rw [h, map_mul_right] }",
"start": [
149,
1
],
"end": [
155,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_copy",
"code": "@[simp]\ntheorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f'",
"start": [
158,
1
],
"end": [
160,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.copy_eq",
"code": "theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f",
"start": [
163,
1
],
"end": [
164,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.id",
"code": "protected def id : CentroidHom α :=\n { AddMonoidHom.id α with\n map_mul_left' := fun _ _ ↦ rfl\n map_mul_right' := fun _ _ ↦ rfl }",
"start": [
169,
1
],
"end": [
173,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_id",
"code": "@[simp, norm_cast]\ntheorem coe_id : ⇑(CentroidHom.id α) = id",
"start": [
179,
1
],
"end": [
181,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toAddMonoidHom_id",
"code": "@[simp, norm_cast]\ntheorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α",
"start": [
184,
1
],
"end": [
186,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.id_apply",
"code": "@[simp]\ntheorem id_apply (a : α) : CentroidHom.id α a = a",
"start": [
191,
1
],
"end": [
193,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.comp",
"code": "def comp (g f : CentroidHom α) : CentroidHom α :=\n { g.toAddMonoidHom.comp f.toAddMonoidHom with\n map_mul_left' := fun _a _b ↦ (congr_arg g <| f.map_mul_left' _ _).trans <| g.map_mul_left' _ _\n map_mul_right' := fun _a _b ↦\n (congr_arg g <| f.map_mul_right' _ _).trans <| g.map_mul_right' _ _ }",
"start": [
196,
1
],
"end": [
201,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_comp",
"code": "@[simp, norm_cast]\ntheorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f",
"start": [
204,
1
],
"end": [
206,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.comp_apply",
"code": "@[simp]\ntheorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a)",
"start": [
209,
1
],
"end": [
211,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_comp_addMonoidHom",
"code": "@[simp, norm_cast]\ntheorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f",
"start": [
214,
1
],
"end": [
216,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.comp_assoc",
"code": "@[simp]\ntheorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f)",
"start": [
219,
1
],
"end": [
221,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.comp_id",
"code": "@[simp]\ntheorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f",
"start": [
224,
1
],
"end": [
226,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.id_comp",
"code": "@[simp]\ntheorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f",
"start": [
229,
1
],
"end": [
231,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.cancel_right",
"code": "@[simp]\ntheorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) :\n g₁.comp f = g₂.comp f ↔ g₁ = g₂",
"start": [
234,
1
],
"end": [
237,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.cancel_left",
"code": "@[simp]\ntheorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) :\n g.comp f₁ = g.comp f₂ ↔ f₁ = f₂",
"start": [
240,
1
],
"end": [
243,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.instSMul",
"code": "instance instSMul : SMul M (CentroidHom α) where\n smul n f :=\n { (n • f : α →+ α) with\n map_mul_left' := fun a b ↦ by\n change n • f (a * b) = a * n • f b\n rw [map_mul_left f, ← mul_smul_comm]\n map_mul_right' := fun a b ↦ by\n change n • f (a * b) = n • f a * b\n rw [map_mul_right f, ← smul_mul_assoc] }",
"start": [
272,
1
],
"end": [
280,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.isScalarTowerRight",
"code": "instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) where\n smul_assoc _ _ _ := rfl",
"start": [
293,
1
],
"end": [
294,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.hasNPowNat",
"code": "instance hasNPowNat : Pow (CentroidHom α) ℕ :=\n ⟨fun f n ↦\n { toAddMonoidHom := (f.toEnd ^ n : AddMonoid.End α)\n map_mul_left' := fun a b ↦ by\n induction' n with n ih\n · exact rfl\n · rw [pow_succ']\n exact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _)\n map_mul_right' := fun a b ↦ by\n induction' n with n ih\n · exact rfl\n · rw [pow_succ']\n exact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _)\n }⟩",
"start": [
296,
1
],
"end": [
309,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_zero",
"code": "@[simp, norm_cast]\ntheorem coe_zero : ⇑(0 : CentroidHom α) = 0",
"start": [
312,
1
],
"end": [
314,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_one",
"code": "@[simp, norm_cast]\ntheorem coe_one : ⇑(1 : CentroidHom α) = id",
"start": [
317,
1
],
"end": [
319,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_add",
"code": "@[simp, norm_cast]\ntheorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g",
"start": [
322,
1
],
"end": [
324,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_mul",
"code": "@[simp, norm_cast]\ntheorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g",
"start": [
327,
1
],
"end": [
329,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_smul",
"code": "@[simp, norm_cast]\ntheorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f",
"start": [
332,
1
],
"end": [
334,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.zero_apply",
"code": "@[simp]\ntheorem zero_apply (a : α) : (0 : CentroidHom α) a = 0",
"start": [
337,
1
],
"end": [
339,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.one_apply",
"code": "@[simp]\ntheorem one_apply (a : α) : (1 : CentroidHom α) a = a",
"start": [
342,
1
],
"end": [
344,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.add_apply",
"code": "@[simp]\ntheorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a",
"start": [
347,
1
],
"end": [
349,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.mul_apply",
"code": "@[simp]\ntheorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a)",
"start": [
352,
1
],
"end": [
354,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.smul_apply",
"code": "@[simp]\ntheorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a",
"start": [
357,
1
],
"end": [
359,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_zero",
"code": "@[simp]\ntheorem toEnd_zero : (0 : CentroidHom α).toEnd = 0",
"start": [
364,
1
],
"end": [
366,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_add",
"code": "@[simp]\ntheorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd",
"start": [
369,
1
],
"end": [
371,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_smul",
"code": "theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd",
"start": [
374,
1
],
"end": [
375,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_natCast",
"code": "@[simp, norm_cast]\ntheorem coe_natCast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α)",
"start": [
384,
1
],
"end": [
386,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.natCast_apply",
"code": "theorem natCast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m",
"start": [
392,
1
],
"end": [
393,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_one",
"code": "@[simp]\ntheorem toEnd_one : (1 : CentroidHom α).toEnd = 1",
"start": [
399,
1
],
"end": [
401,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_mul",
"code": "@[simp]\ntheorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd",
"start": [
404,
1
],
"end": [
406,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_pow",
"code": "@[simp]\ntheorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n",
"start": [
409,
1
],
"end": [
411,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_natCast",
"code": "@[simp, norm_cast]\ntheorem toEnd_natCast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n",
"start": [
414,
1
],
"end": [
416,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEndRingHom",
"code": "@[simps]\ndef toEndRingHom : CentroidHom α →+* AddMonoid.End α where\n toFun := toEnd\n map_zero' := toEnd_zero\n map_one' := toEnd_one\n map_add' := toEnd_add\n map_mul' := toEnd_mul",
"start": [
428,
1
],
"end": [
435,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.comp_mul_comm",
"code": "theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b)",
"start": [
437,
1
],
"end": [
439,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.applyModule",
"code": "instance applyModule : Module (CentroidHom α) α where\n smul T a := T a\n add_smul _ _ _ := rfl\n zero_smul _ := rfl\n one_smul _ := rfl\n mul_smul _ _ _:= rfl\n smul_zero := map_zero\n smul_add := map_add",
"start": [
453,
1
],
"end": [
463,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.smul_def",
"code": "@[simp]\nlemma smul_def (T : CentroidHom α) (a : α) : T • a = T a := rfl",
"start": [
465,
1
],
"end": [
466,
64
],
"kind": "lemma"
},
{
"full_name": "Module.toCentroidHom",
"code": "@[simps! apply_toFun]\ndef _root_.Module.toCentroidHom : R →+* CentroidHom α := RingHom.smulOneHom",
"start": [
485,
1
],
"end": [
489,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.centroid_eq_centralizer_mulLeftRight",
"code": "lemma centroid_eq_centralizer_mulLeftRight :\n RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) := by\n ext T\n refine ⟨?_, fun h ↦ ?_⟩\n · rintro ⟨f, rfl⟩ S (⟨a, rfl⟩ | ⟨b, rfl⟩)\n · exact AddMonoidHom.ext fun b ↦ (map_mul_left f a b).symm\n · exact AddMonoidHom.ext fun a ↦ (map_mul_right f a b).symm\n · rw [Subsemiring.mem_centralizer_iff] at h\n refine ⟨⟨T, fun a b ↦ ?_, fun a b ↦ ?_⟩, rfl⟩\n · exact congr($(h (L a) (.inl ⟨a, rfl⟩)) b).symm\n · exact congr($(h (R b) (.inr ⟨b, rfl⟩)) a).symm",
"start": [
499,
1
],
"end": [
509,
53
],
"kind": "lemma"
},
{
"full_name": "CentroidHom.centerToCentroid",
"code": "def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α where\n toFun z :=\n { L (z : α) with\n map_mul_left' := ((Set.mem_center_iff _).mp z.prop).left_comm\n map_mul_right' := ((Set.mem_center_iff _).mp z.prop).left_assoc }\n map_zero' := by\n simp only [ZeroMemClass.coe_zero, map_zero]\n exact rfl\n map_add' := fun _ _ => by\n simp only [AddSubmonoid.coe_add, NonUnitalSubsemiring.coe_toAddSubmonoid, map_add]\n exact rfl\n map_mul' := fun z₁ z₂ => by\n ext a\n exact (((Set.mem_center_iff _).mp z₁.prop).left_assoc z₂ a).symm",
"start": [
511,
1
],
"end": [
525,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.centerToCentroid_apply",
"code": "lemma centerToCentroid_apply (z : NonUnitalSubsemiring.center α) (a : α) :\n (centerToCentroid z) a = z * a := rfl",
"start": [
527,
1
],
"end": [
528,
42
],
"kind": "lemma"
},
{
"full_name": "NonUnitalNonAssocSemiring.mem_center_iff",
"code": "lemma _root_.NonUnitalNonAssocSemiring.mem_center_iff (a : α) :\n a ∈ NonUnitalSubsemiring.center α ↔ R a = L a ∧ (L a) ∈ RingHom.rangeS (toEndRingHom α) := by\n constructor\n · exact fun ha ↦ ⟨AddMonoidHom.ext <| fun _ => (IsMulCentral.comm ha _).symm,\n ⟨centerToCentroid ⟨a, ha⟩, rfl⟩⟩\n · rintro ⟨hc, ⟨T, hT⟩⟩\n have e1 (d : α) : T d = a * d := congr($hT d)\n have e2 (d : α) : T d = d * a := congr($(hT.trans hc.symm) d)\n constructor\n case comm => exact (congr($hc.symm ·))\n case left_assoc => simpa [e1] using (map_mul_right T · ·)\n case mid_assoc => exact fun b c ↦ by simpa [e1 c, e2 b] using\n (map_mul_right T b c).symm.trans <| map_mul_left T b c\n case right_assoc => simpa [e2] using (map_mul_left T · ·)",
"start": [
530,
1
],
"end": [
543,
62
],
"kind": "lemma"
},
{
"full_name": "NonUnitalNonAssocCommSemiring.mem_center_iff",
"code": "lemma _root_.NonUnitalNonAssocCommSemiring.mem_center_iff (a : α) :\n a ∈ NonUnitalSubsemiring.center α ↔ ∀ b : α, Commute (L b) (L a) := by\n rw [NonUnitalNonAssocSemiring.mem_center_iff, CentroidHom.centroid_eq_centralizer_mulLeftRight,\n Subsemiring.mem_centralizer_iff, AddMonoid.End.mulRight_eq_mulLeft, Set.union_self]\n aesop",
"start": [
556,
1
],
"end": [
560,
8
],
"kind": "lemma"
},
{
"full_name": "CentroidHom.centerIsoCentroid",
"code": "def centerIsoCentroid : Subsemiring.center α ≃+* CentroidHom α :=\n { centerToCentroid with\n invFun := fun T ↦\n ⟨T 1, by refine ⟨?_, ?_, ?_, ?_⟩; all_goals simp [← map_mul_left, ← map_mul_right]⟩\n left_inv := fun z ↦ Subtype.ext <| by simp [centerToCentroid_apply]\n right_inv := fun T ↦ CentroidHom.ext <| by simp [centerToCentroid_apply, ← map_mul_right] }",
"start": [
568,
1
],
"end": [
574,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_intCast",
"code": "@[simp, norm_cast]\ntheorem coe_intCast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α)",
"start": [
608,
1
],
"end": [
610,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.intCast_apply",
"code": "theorem intCast_apply (z : ℤ) (m : α) : (z : CentroidHom α) m = z • m",
"start": [
616,
1
],
"end": [
617,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_neg",
"code": "@[simp]\ntheorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd",
"start": [
623,
1
],
"end": [
625,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_sub",
"code": "@[simp]\ntheorem toEnd_sub (x y : CentroidHom α) : (x - y).toEnd = x.toEnd - y.toEnd",
"start": [
628,
1
],
"end": [
630,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_neg",
"code": "@[simp, norm_cast]\ntheorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f",
"start": [
639,
1
],
"end": [
641,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.coe_sub",
"code": "@[simp, norm_cast]\ntheorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g",
"start": [
644,
1
],
"end": [
646,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.neg_apply",
"code": "@[simp]\ntheorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a",
"start": [
649,
1
],
"end": [
651,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.sub_apply",
"code": "@[simp]\ntheorem sub_apply (f g : CentroidHom α) (a : α) : (f - g) a = f a - g a",
"start": [
654,
1
],
"end": [
656,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.toEnd_intCast",
"code": "@[simp, norm_cast]\ntheorem toEnd_intCast (z : ℤ) : (z : CentroidHom α).toEnd = ↑z",
"start": [
659,
1
],
"end": [
661,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.instRing",
"code": "instance instRing : Ring (CentroidHom α) :=\n toEnd_injective.ring _ toEnd_zero toEnd_one toEnd_add toEnd_mul toEnd_neg toEnd_sub\n toEnd_smul toEnd_smul toEnd_pow toEnd_natCast toEnd_intCast",
"start": [
667,
1
],
"end": [
669,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CentroidHom.commRing",
"code": "abbrev commRing\n (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) :=\n { CentroidHom.instRing with\n mul_comm := fun f g ↦ by\n ext\n refine sub_eq_zero.1 (or_self_iff.1 <| (h _ _) fun r ↦ ?_)\n rw [mul_assoc, sub_mul, sub_eq_zero, ← map_mul_right, ← map_mul_right, coe_mul, coe_mul,\n comp_mul_comm] }",
"start": [
679,
1
],
"end": [
687,
25
],
"kind": "commanddeclaration"
}
] |
Mathlib/Topology/Connected/Separation.lean | [
"Mathlib/Topology/Separation.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "TotallySeparatedSpace.t2Space",
"code": "instance TotallySeparatedSpace.t2Space [TotallySeparatedSpace X] : T2Space X where\n t2 x y h := by\n obtain ⟨u, v, h₁, h₂, h₃, h₄, _, h₅⟩ := isTotallySeparated_univ trivial trivial h\n exact ⟨u, v, h₁, h₂, h₃, h₄, h₅⟩",
"start": [
22,
1
],
"end": [
26,
37
],
"kind": "commanddeclaration"
}
] |
Mathlib/NumberTheory/ModularForms/Basic.lean | [
"Mathlib/Algebra/DirectSum/Algebra.lean",
"Mathlib/Analysis/Complex/UpperHalfPlane/Manifold.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean",
"Mathlib/Analysis/Complex/UpperHalfPlane/FunctionsBoundedAtInfty.lean",
"Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean"
] | [
{
"full_name": "ModularForm",
"code": "structure ModularForm extends SlashInvariantForm Γ k where\n holo' : MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (toSlashInvariantForm : ℍ → ℂ)\n bdd_at_infty' : ∀ A : SL(2, ℤ), IsBoundedAtImInfty (toSlashInvariantForm ∣[k] A)",
"start": [
43,
1
],
"end": [
46,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm",
"code": "structure CuspForm extends SlashInvariantForm Γ k where\n holo' : MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (toSlashInvariantForm : ℍ → ℂ)\n zero_at_infty' : ∀ A : SL(2, ℤ), IsZeroAtImInfty (toSlashInvariantForm ∣[k] A)",
"start": [
52,
1
],
"end": [
55,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularFormClass",
"code": "class ModularFormClass (F : Type*) (Γ : outParam <| Subgroup (SL(2, ℤ))) (k : outParam ℤ)\n [FunLike F ℍ ℂ] extends SlashInvariantFormClass F Γ k : Prop where\n holo : ∀ f : F, MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (f : ℍ → ℂ)\n bdd_at_infty : ∀ (f : F) (A : SL(2, ℤ)), IsBoundedAtImInfty (f ∣[k] A)",
"start": [
61,
1
],
"end": [
67,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspFormClass",
"code": "class CuspFormClass (F : Type*) (Γ : outParam <| Subgroup (SL(2, ℤ))) (k : outParam ℤ)\n [FunLike F ℍ ℂ] extends SlashInvariantFormClass F Γ k : Prop where\n holo : ∀ f : F, MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (f : ℍ → ℂ)\n zero_at_infty : ∀ (f : F) (A : SL(2, ℤ)), IsZeroAtImInfty (f ∣[k] A)",
"start": [
70,
1
],
"end": [
76,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.funLike",
"code": "instance (priority := 100) ModularForm.funLike :\n FunLike (ModularForm Γ k) ℍ ℂ where\n coe f := f.toFun\n coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h",
"start": [
79,
1
],
"end": [
82,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularFormClass.modularForm",
"code": "instance (priority := 100) ModularFormClass.modularForm :\n ModularFormClass (ModularForm Γ k) Γ k where\n slash_action_eq f := f.slash_action_eq'\n holo := ModularForm.holo'\n bdd_at_infty := ModularForm.bdd_at_infty'",
"start": [
84,
1
],
"end": [
88,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.funLike",
"code": "instance (priority := 100) CuspForm.funLike : FunLike (CuspForm Γ k) ℍ ℂ where\n coe f := f.toFun\n coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h",
"start": [
91,
1
],
"end": [
93,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspFormClass.cuspForm",
"code": "instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm Γ k) Γ k where\n slash_action_eq f := f.slash_action_eq'\n holo := CuspForm.holo'\n zero_at_infty := CuspForm.zero_at_infty'",
"start": [
95,
1
],
"end": [
98,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.toFun_eq_coe",
"code": "theorem ModularForm.toFun_eq_coe (f : ModularForm Γ k) : f.toFun = (f : ℍ → ℂ)",
"start": [
103,
1
],
"end": [
104,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.toSlashInvariantForm_coe",
"code": "@[simp]\ntheorem ModularForm.toSlashInvariantForm_coe (f : ModularForm Γ k) : ⇑f.1 = f",
"start": [
107,
1
],
"end": [
109,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.toFun_eq_coe",
"code": "theorem CuspForm.toFun_eq_coe {f : CuspForm Γ k} : f.toFun = (f : ℍ → ℂ)",
"start": [
111,
1
],
"end": [
112,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.toSlashInvariantForm_coe",
"code": "@[simp]\ntheorem CuspForm.toSlashInvariantForm_coe (f : CuspForm Γ k) : ⇑f.1 = f",
"start": [
115,
1
],
"end": [
116,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.ext",
"code": "@[ext]\ntheorem ModularForm.ext {f g : ModularForm Γ k} (h : ∀ x, f x = g x) : f = g",
"start": [
118,
1
],
"end": [
120,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.ext",
"code": "@[ext]\ntheorem CuspForm.ext {f g : CuspForm Γ k} (h : ∀ x, f x = g x) : f = g",
"start": [
123,
1
],
"end": [
125,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.copy",
"code": "protected def ModularForm.copy (f : ModularForm Γ k) (f' : ℍ → ℂ) (h : f' = ⇑f) :\n ModularForm Γ k where\n toSlashInvariantForm := f.1.copy f' h\n holo' := h.symm ▸ f.holo'\n bdd_at_infty' A := h.symm ▸ f.bdd_at_infty' A",
"start": [
128,
1
],
"end": [
134,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.copy",
"code": "protected def CuspForm.copy (f : CuspForm Γ k) (f' : ℍ → ℂ) (h : f' = ⇑f) : CuspForm Γ k where\n toSlashInvariantForm := f.1.copy f' h\n holo' := h.symm ▸ f.holo'\n zero_at_infty' A := h.symm ▸ f.zero_at_infty' A",
"start": [
137,
1
],
"end": [
142,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.add",
"code": "instance add : Add (ModularForm Γ k) :=\n ⟨fun f g =>\n { toSlashInvariantForm := f + g\n holo' := f.holo'.add g.holo'\n bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).add (g.bdd_at_infty' A) }⟩",
"start": [
153,
1
],
"end": [
157,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_add",
"code": "@[simp]\ntheorem coe_add (f g : ModularForm Γ k) : ⇑(f + g) = f + g",
"start": [
160,
1
],
"end": [
162,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.add_apply",
"code": "@[simp]\ntheorem add_apply (f g : ModularForm Γ k) (z : ℍ) : (f + g) z = f z + g z",
"start": [
165,
1
],
"end": [
167,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instZero",
"code": "instance instZero : Zero (ModularForm Γ k) :=\n ⟨ { toSlashInvariantForm := 0\n holo' := fun _ => mdifferentiableAt_const 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ)\n bdd_at_infty' := fun A => by simpa using zero_form_isBoundedAtImInfty } ⟩",
"start": [
170,
1
],
"end": [
173,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_zero",
"code": "@[simp]\ntheorem coe_zero : ⇑(0 : ModularForm Γ k) = (0 : ℍ → ℂ)",
"start": [
176,
1
],
"end": [
178,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.zero_apply",
"code": "@[simp]\ntheorem zero_apply (z : ℍ) : (0 : ModularForm Γ k) z = 0",
"start": [
181,
1
],
"end": [
183,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instSMul",
"code": "instance instSMul : SMul α (ModularForm Γ k) :=\n ⟨fun c f =>\n { toSlashInvariantForm := c • f.1\n holo' := by simpa using f.holo'.const_smul (c • (1 : ℂ))\n bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).const_smul_left (c • (1 : ℂ)) }⟩",
"start": [
190,
1
],
"end": [
194,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_smul",
"code": "@[simp]\ntheorem coe_smul (f : ModularForm Γ k) (n : α) : ⇑(n • f) = n • ⇑f",
"start": [
197,
1
],
"end": [
199,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.smul_apply",
"code": "@[simp]\ntheorem smul_apply (f : ModularForm Γ k) (n : α) (z : ℍ) : (n • f) z = n • f z",
"start": [
202,
1
],
"end": [
204,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instNeg",
"code": "instance instNeg : Neg (ModularForm Γ k) :=\n ⟨fun f =>\n { toSlashInvariantForm := -f.1\n holo' := f.holo'.neg\n bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).neg }⟩",
"start": [
209,
1
],
"end": [
213,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_neg",
"code": "@[simp]\ntheorem coe_neg (f : ModularForm Γ k) : ⇑(-f) = -f",
"start": [
216,
1
],
"end": [
218,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.neg_apply",
"code": "@[simp]\ntheorem neg_apply (f : ModularForm Γ k) (z : ℍ) : (-f) z = -f z",
"start": [
221,
1
],
"end": [
223,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instSub",
"code": "instance instSub : Sub (ModularForm Γ k) :=\n ⟨fun f g => f + -g⟩",
"start": [
226,
1
],
"end": [
227,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_sub",
"code": "@[simp]\ntheorem coe_sub (f g : ModularForm Γ k) : ⇑(f - g) = f - g",
"start": [
230,
1
],
"end": [
232,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.sub_apply",
"code": "@[simp]\ntheorem sub_apply (f g : ModularForm Γ k) (z : ℍ) : (f - g) z = f z - g z",
"start": [
235,
1
],
"end": [
237,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coeHom",
"code": "@[simps]\ndef coeHom : ModularForm Γ k →+ ℍ → ℂ where\n toFun f := f\n map_zero' := coe_zero\n map_add' _ _ := rfl",
"start": [
243,
1
],
"end": [
248,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.mul",
"code": "def mul {k_1 k_2 : ℤ} {Γ : Subgroup SL(2, ℤ)} (f : ModularForm Γ k_1) (g : ModularForm Γ k_2) :\n ModularForm Γ (k_1 + k_2) where\n toSlashInvariantForm := f.1.mul g.1\n holo' := f.holo'.mul g.holo'\n bdd_at_infty' A := by\n rw [SlashInvariantForm.coe_mul, mul_slash_SL2]\n exact (f.bdd_at_infty' A).mul (g.bdd_at_infty' A)",
"start": [
257,
1
],
"end": [
267,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.mul_coe",
"code": "@[simp]\ntheorem mul_coe {k_1 k_2 : ℤ} {Γ : Subgroup SL(2, ℤ)} (f : ModularForm Γ k_1)\n (g : ModularForm Γ k_2) : (f.mul g : ℍ → ℂ) = f * g",
"start": [
270,
1
],
"end": [
273,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.const",
"code": "@[simps! (config := .asFn) toFun toSlashInvariantForm]\ndef const (x : ℂ) : ModularForm Γ 0 where\n toSlashInvariantForm := .const x\n holo' x := mdifferentiableAt_const 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ)\n bdd_at_infty' A := by\n simpa only [SlashInvariantForm.const_toFun,\n ModularForm.is_invariant_const] using atImInfty.const_boundedAtFilter x",
"start": [
276,
1
],
"end": [
283,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.one_coe_eq_one",
"code": "@[simp]\ntheorem one_coe_eq_one : ⇑(1 : ModularForm Γ 0) = 1",
"start": [
288,
1
],
"end": [
290,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.coe_natCast",
"code": "@[simp, norm_cast]\nlemma coe_natCast (Γ : Subgroup SL(2, ℤ)) (n : ℕ) :\n ⇑(n : ModularForm Γ 0) = n := rfl",
"start": [
296,
1
],
"end": [
298,
38
],
"kind": "lemma"
},
{
"full_name": "ModularForm.toSlashInvariantForm_natCast",
"code": "lemma toSlashInvariantForm_natCast (Γ : Subgroup SL(2, ℤ)) (n : ℕ) :\n (n : ModularForm Γ 0).toSlashInvariantForm = n := rfl",
"start": [
300,
1
],
"end": [
301,
58
],
"kind": "lemma"
},
{
"full_name": "ModularForm.coe_intCast",
"code": "@[simp, norm_cast]\nlemma coe_intCast (Γ : Subgroup SL(2, ℤ)) (z : ℤ) :\n ⇑(z : ModularForm Γ 0) = z := rfl",
"start": [
306,
1
],
"end": [
308,
38
],
"kind": "lemma"
},
{
"full_name": "ModularForm.toSlashInvariantForm_intCast",
"code": "lemma toSlashInvariantForm_intCast (Γ : Subgroup SL(2, ℤ)) (z : ℤ) :\n (z : ModularForm Γ 0).toSlashInvariantForm = z := rfl",
"start": [
310,
1
],
"end": [
311,
58
],
"kind": "lemma"
},
{
"full_name": "CuspForm.hasAdd",
"code": "instance hasAdd : Add (CuspForm Γ k) :=\n ⟨fun f g =>\n { toSlashInvariantForm := f + g\n holo' := f.holo'.add g.holo'\n zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).add (g.zero_at_infty' A) }⟩",
"start": [
321,
1
],
"end": [
325,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coe_add",
"code": "@[simp]\ntheorem coe_add (f g : CuspForm Γ k) : ⇑(f + g) = f + g",
"start": [
328,
1
],
"end": [
330,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.add_apply",
"code": "@[simp]\ntheorem add_apply (f g : CuspForm Γ k) (z : ℍ) : (f + g) z = f z + g z",
"start": [
333,
1
],
"end": [
335,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.instZero",
"code": "instance instZero : Zero (CuspForm Γ k) :=\n ⟨ { toSlashInvariantForm := 0\n holo' := fun _ => mdifferentiableAt_const 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ)\n zero_at_infty' := by simpa using Filter.zero_zeroAtFilter _ } ⟩",
"start": [
338,
1
],
"end": [
341,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coe_zero",
"code": "@[simp]\ntheorem coe_zero : ⇑(0 : CuspForm Γ k) = (0 : ℍ → ℂ)",
"start": [
344,
1
],
"end": [
346,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.zero_apply",
"code": "@[simp]\ntheorem zero_apply (z : ℍ) : (0 : CuspForm Γ k) z = 0",
"start": [
349,
1
],
"end": [
351,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.instSMul",
"code": "instance instSMul : SMul α (CuspForm Γ k) :=\n ⟨fun c f =>\n { toSlashInvariantForm := c • f.1\n holo' := by simpa using f.holo'.const_smul (c • (1 : ℂ))\n zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).smul (c • (1 : ℂ)) }⟩",
"start": [
358,
1
],
"end": [
362,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coe_smul",
"code": "@[simp]\ntheorem coe_smul (f : CuspForm Γ k) (n : α) : ⇑(n • f) = n • ⇑f",
"start": [
365,
1
],
"end": [
367,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.smul_apply",
"code": "@[simp]\ntheorem smul_apply (f : CuspForm Γ k) (n : α) {z : ℍ} : (n • f) z = n • f z",
"start": [
370,
1
],
"end": [
372,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.instNeg",
"code": "instance instNeg : Neg (CuspForm Γ k) :=\n ⟨fun f =>\n { toSlashInvariantForm := -f.1\n holo' := f.holo'.neg\n zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).neg }⟩",
"start": [
377,
1
],
"end": [
381,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coe_neg",
"code": "@[simp]\ntheorem coe_neg (f : CuspForm Γ k) : ⇑(-f) = -f",
"start": [
384,
1
],
"end": [
386,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.neg_apply",
"code": "@[simp]\ntheorem neg_apply (f : CuspForm Γ k) (z : ℍ) : (-f) z = -f z",
"start": [
389,
1
],
"end": [
391,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.instSub",
"code": "instance instSub : Sub (CuspForm Γ k) :=\n ⟨fun f g => f + -g⟩",
"start": [
394,
1
],
"end": [
395,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coe_sub",
"code": "@[simp]\ntheorem coe_sub (f g : CuspForm Γ k) : ⇑(f - g) = f - g",
"start": [
398,
1
],
"end": [
400,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.sub_apply",
"code": "@[simp]\ntheorem sub_apply (f g : CuspForm Γ k) (z : ℍ) : (f - g) z = f z - g z",
"start": [
403,
1
],
"end": [
405,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CuspForm.coeHom",
"code": "@[simps]\ndef coeHom : CuspForm Γ k →+ ℍ → ℂ where\n toFun f := f\n map_zero' := CuspForm.coe_zero\n map_add' _ _ := rfl",
"start": [
411,
1
],
"end": [
416,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.mcast",
"code": "def mcast {a b : ℤ} {Γ : Subgroup SL(2, ℤ)} (h : a = b) (f : ModularForm Γ a) :\n ModularForm Γ b where\n toFun := (f : ℍ → ℂ)\n slash_action_eq' A := h ▸ f.slash_action_eq' A\n holo' := f.holo'\n bdd_at_infty' A := h ▸ f.bdd_at_infty' A",
"start": [
436,
1
],
"end": [
442,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.gradedMonoid_eq_of_cast",
"code": "@[ext]\ntheorem gradedMonoid_eq_of_cast {Γ : Subgroup SL(2, ℤ)} {a b : GradedMonoid (ModularForm Γ)}\n (h : a.fst = b.fst) (h2 : mcast h a.snd = b.snd) : a = b",
"start": [
444,
1
],
"end": [
450,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instGCommRing",
"code": "instance instGCommRing (Γ : Subgroup SL(2, ℤ)) : DirectSum.GCommRing (ModularForm Γ) where\n one_mul a := gradedMonoid_eq_of_cast (zero_add _) (ext fun _ => one_mul _)\n mul_one a := gradedMonoid_eq_of_cast (add_zero _) (ext fun _ => mul_one _)\n mul_assoc a b c := gradedMonoid_eq_of_cast (add_assoc _ _ _) (ext fun _ => mul_assoc _ _ _)\n mul_zero {i j} f := ext fun _ => mul_zero _\n zero_mul {i j} f := ext fun _ => zero_mul _\n mul_add {i j} f g h := ext fun _ => mul_add _ _ _\n add_mul {i j} f g h := ext fun _ => add_mul _ _ _\n mul_comm a b := gradedMonoid_eq_of_cast (add_comm _ _) (ext fun _ => mul_comm _ _)\n natCast := Nat.cast\n natCast_zero := ext fun _ => Nat.cast_zero\n natCast_succ n := ext fun _ => Nat.cast_succ _\n intCast := Int.cast\n intCast_ofNat n := ext fun _ => AddGroupWithOne.intCast_ofNat _\n intCast_negSucc_ofNat n := ext fun _ => AddGroupWithOne.intCast_negSucc _",
"start": [
458,
1
],
"end": [
472,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "ModularForm.instGAlgebra",
"code": "instance instGAlgebra (Γ : Subgroup SL(2, ℤ)) : DirectSum.GAlgebra ℂ (ModularForm Γ) where\n toFun := { toFun := const, map_zero' := rfl, map_add' := fun _ _ => rfl }\n map_one := rfl\n map_mul _x _y := rfl\n commutes _c _x := gradedMonoid_eq_of_cast (add_comm _ _) (ext fun _ => mul_comm _ _)\n smul_def _x _x := gradedMonoid_eq_of_cast (zero_add _).symm (ext fun _ => rfl)",
"start": [
474,
1
],
"end": [
479,
81
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Complex/Angle.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean",
"Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean"
] | [
{
"full_name": "Complex.angle_eq_abs_arg",
"code": "lemma angle_eq_abs_arg (hx : x ≠ 0) (hy : y ≠ 0) : angle x y = |(x / y).arg| := by\n refine Real.arccos_eq_of_eq_cos (abs_nonneg _) (abs_arg_le_pi _) ?_\n rw [Real.cos_abs, Complex.cos_arg (div_ne_zero hx hy)]\n have := (map_ne_zero Complex.abs).2 hx\n have := (map_ne_zero Complex.abs).2 hy\n simp [div_eq_mul_inv, Complex.normSq_eq_norm_sq]\n field_simp\n ring",
"start": [
33,
1
],
"end": [
44,
7
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_one_left",
"code": "lemma angle_one_left (hy : y ≠ 0) : angle 1 y = |y.arg| := by simp [angle_eq_abs_arg, hy]",
"start": [
46,
1
],
"end": [
46,
90
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_one_right",
"code": "lemma angle_one_right (hx : x ≠ 0) : angle x 1 = |x.arg| := by simp [angle_eq_abs_arg, hx]",
"start": [
47,
1
],
"end": [
47,
91
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_mul_left",
"code": "@[simp] lemma angle_mul_left (ha : a ≠ 0) (x y : ℂ) : angle (a * x) (a * y) = angle x y := by\n obtain rfl | hx := eq_or_ne x 0 <;> obtain rfl | hy := eq_or_ne y 0 <;>\n simp [angle_eq_abs_arg, mul_div_mul_left, *]",
"start": [
49,
1
],
"end": [
51,
49
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_mul_right",
"code": "@[simp] lemma angle_mul_right (ha : a ≠ 0) (x y : ℂ) : angle (x * a) (y * a) = angle x y := by\n simp [mul_comm, angle_mul_left ha]",
"start": [
53,
1
],
"end": [
54,
37
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_div_left_eq_angle_mul_right",
"code": "lemma angle_div_left_eq_angle_mul_right (a x y : ℂ) : angle (x / a) y = angle x (y * a) := by\n obtain rfl | ha := eq_or_ne a 0\n · simp\n · rw [← angle_mul_right ha, div_mul_cancel₀ _ ha]",
"start": [
56,
1
],
"end": [
59,
52
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_div_right_eq_angle_mul_left",
"code": "lemma angle_div_right_eq_angle_mul_left (a x y : ℂ) : angle x (y / a) = angle (x * a) y := by\n rw [angle_comm, angle_div_left_eq_angle_mul_right, angle_comm]",
"start": [
61,
1
],
"end": [
62,
65
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_exp_exp",
"code": "lemma angle_exp_exp (x y : ℝ) :\n angle (exp (x * I)) (exp (y * I)) = |toIocMod Real.two_pi_pos (-π) (x - y)| := by\n simp_rw [angle_eq_abs_arg (exp_ne_zero _) (exp_ne_zero _), ← exp_sub, ← sub_mul, ← ofReal_sub,\n arg_exp_mul_I]",
"start": [
64,
1
],
"end": [
67,
19
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_exp_one",
"code": "lemma angle_exp_one (x : ℝ) : angle (exp (x * I)) 1 = |toIocMod Real.two_pi_pos (-π) x| := by\n simpa using angle_exp_exp x 0",
"start": [
69,
1
],
"end": [
70,
32
],
"kind": "lemma"
},
{
"full_name": "Complex.norm_sub_mem_Icc_angle",
"code": "lemma norm_sub_mem_Icc_angle (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) :\n ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y) := by\n clear a\n wlog h : y = 1\n · have := @this (x / y) 1 (by simp only [norm_div, hx, hy, div_one]) norm_one rfl\n rwa [angle_div_left_eq_angle_mul_right, div_sub_one, norm_div, hy, div_one, one_mul]\n at this\n rintro rfl\n simp at hy\n subst y\n rw [norm_eq_abs, abs_eq_one_iff'] at hx\n obtain ⟨θ, hθ, rfl⟩ := hx\n rw [angle_exp_one, exp_mul_I, add_sub_right_comm, (toIocMod_eq_self _).2]\n · norm_cast\n rw [norm_eq_abs, abs_add_mul_I]\n refine ⟨Real.le_sqrt_of_sq_le ?_, ?_⟩\n · rw [mul_pow, ← _root_.abs_pow, abs_sq]\n calc\n _ = 2 * (1 - (1 - 2 / π ^ 2 * θ ^ 2)) := by ring\n _ ≤ 2 * (1 - θ.cos) := by\n gcongr; exact Real.cos_quadratic_upper_bound <| abs_le.2 <| Ioc_subset_Icc_self hθ\n _ = _ := by linear_combination -θ.cos_sq_add_sin_sq\n · rw [Real.sqrt_le_left (by positivity), ← _root_.abs_pow, abs_sq]\n calc\n _ = 2 * (1 - θ.cos) := by linear_combination θ.cos_sq_add_sin_sq\n _ ≤ 2 * (1 - (1 - θ ^ 2 / 2)) := by gcongr; exact Real.one_sub_sq_div_two_le_cos\n _ = _ := by ring\n · convert hθ\n ring",
"start": [
79,
1
],
"end": [
108,
9
],
"kind": "lemma"
},
{
"full_name": "Complex.norm_sub_le_angle",
"code": "lemma norm_sub_le_angle (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : ‖x - y‖ ≤ angle x y :=\n (norm_sub_mem_Icc_angle hx hy).2",
"start": [
110,
1
],
"end": [
112,
35
],
"kind": "lemma"
},
{
"full_name": "Complex.mul_angle_le_norm_sub",
"code": "lemma mul_angle_le_norm_sub (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : 2 / π * angle x y ≤ ‖x - y‖ :=\n (norm_sub_mem_Icc_angle hx hy).1",
"start": [
114,
1
],
"end": [
116,
35
],
"kind": "lemma"
},
{
"full_name": "Complex.angle_le_mul_norm_sub",
"code": "lemma angle_le_mul_norm_sub (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : angle x y ≤ π / 2 * ‖x - y‖ := by\n rw [← div_le_iff' <| by positivity, div_eq_inv_mul, inv_div]; exact mul_angle_le_norm_sub hx hy",
"start": [
118,
1
],
"end": [
120,
98
],
"kind": "lemma"
}
] |
Mathlib/RingTheory/Presentation.lean | [
"Mathlib/RingTheory/Generators.lean",
"Mathlib/RingTheory/FinitePresentation.lean",
"Mathlib/RingTheory/MvPolynomial/Localization.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean",
"Mathlib/RingTheory/TensorProduct/MvPolynomial.lean"
] | [
{
"full_name": "Algebra.Presentation",
"code": "@[nolint checkUnivs]\nstructure Algebra.Presentation extends Algebra.Generators.{w} R S where\n \n rels : Type t\n \n relation : rels → toGenerators.Ring\n \n span_range_relation_eq_ker :\n Ideal.span (Set.range relation) = toGenerators.ker",
"start": [
50,
1
],
"end": [
65,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.aeval_val_relation",
"code": "@[simp]\nlemma aeval_val_relation (i) : aeval P.val (P.relation i) = 0 := by\n rw [← RingHom.mem_ker, ← P.ker_eq_ker_aeval_val, ← P.span_range_relation_eq_ker]\n exact Ideal.subset_span ⟨i, rfl⟩",
"start": [
72,
1
],
"end": [
75,
35
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.Quotient",
"code": "protected abbrev Quotient : Type (max w u) := P.Ring ⧸ P.ker",
"start": [
77,
1
],
"end": [
78,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.quotientEquiv",
"code": "def quotientEquiv : P.Quotient ≃ₐ[P.Ring] S :=\n Ideal.quotientKerAlgEquivOfRightInverse (f := Algebra.ofId P.Ring S) P.aeval_val_σ",
"start": [
80,
1
],
"end": [
82,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.quotientEquiv_mk",
"code": "@[simp]\nlemma quotientEquiv_mk (p : P.Ring) : P.quotientEquiv p = algebraMap P.Ring S p :=\n rfl",
"start": [
84,
1
],
"end": [
86,
6
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.quotientEquiv_symm",
"code": "@[simp]\nlemma quotientEquiv_symm (x : S) : P.quotientEquiv.symm x = P.σ x :=\n rfl",
"start": [
88,
1
],
"end": [
90,
6
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.dimension",
"code": "noncomputable def dimension : ℕ :=\n Nat.card P.vars - Nat.card P.rels",
"start": [
92,
1
],
"end": [
101,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.IsFinite",
"code": "class IsFinite (P : Presentation.{t, w} R S) : Prop where\n finite_vars : Finite P.vars\n finite_rels : Finite P.rels",
"start": [
103,
1
],
"end": [
107,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.ideal_fg_of_isFinite",
"code": "lemma ideal_fg_of_isFinite [P.IsFinite] : P.ker.FG := by\n use (Set.finite_range P.relation).toFinset\n simp [span_range_relation_eq_ker]",
"start": [
111,
1
],
"end": [
113,
36
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.finitePresentation_of_isFinite",
"code": "lemma finitePresentation_of_isFinite [P.IsFinite] :\n FinitePresentation R S :=\n FinitePresentation.equiv (P.quotientEquiv.restrictScalars R)",
"start": [
120,
1
],
"end": [
122,
63
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.span_range_relation_eq_ker_localizationAway",
"code": "private lemma span_range_relation_eq_ker_localizationAway :\n Ideal.span { C r * X () - 1 } =\n RingHom.ker (aeval (S₁ := S) (Generators.localizationAway r).val) := by\n have : aeval (S₁ := S) (Generators.localizationAway r).val =\n (mvPolynomialQuotientEquiv S r).toAlgHom.comp\n (Ideal.Quotient.mkₐ R (Ideal.span {C r * X () - 1})) := by\n ext x\n simp only [Generators.localizationAway_vars, aeval_X, Generators.localizationAway_val,\n AlgEquiv.toAlgHom_eq_coe, AlgHom.coe_comp, AlgHom.coe_coe, Ideal.Quotient.mkₐ_eq_mk,\n Function.comp_apply]\n rw [IsLocalization.Away.mvPolynomialQuotientEquiv_apply, aeval_X]\n rw [this]\n erw [← RingHom.comap_ker]\n simp only [Generators.localizationAway_vars, AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe,\n AlgEquiv.toAlgHom_toRingHom]\n show Ideal.span {C r * X () - 1} = Ideal.comap _ (RingHom.ker (mvPolynomialQuotientEquiv S r))\n simp [RingHom.ker_equiv, ← RingHom.ker_eq_comap_bot]",
"start": [
132,
1
],
"end": [
148,
55
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.localizationAway",
"code": "@[simps relation, simps (config := .lemmasOnly) rels]\nnoncomputable def localizationAway : Presentation R S where\n toGenerators := Generators.localizationAway r\n rels := Unit\n relation _ := C r * X () - 1\n span_range_relation_eq_ker := by\n simp only [Generators.localizationAway_vars, Set.range_const]\n apply span_range_relation_eq_ker_localizationAway r",
"start": [
150,
1
],
"end": [
159,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.localizationAway_isFinite",
"code": "instance localizationAway_isFinite : (localizationAway r (S := S)).IsFinite where\n finite_vars := inferInstanceAs <| Finite Unit\n finite_rels := inferInstanceAs <| Finite Unit",
"start": [
161,
1
],
"end": [
163,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Presentation.localizationAway_dimension_zero",
"code": "@[simp]\nlemma localizationAway_dimension_zero : (localizationAway r (S := S)).dimension = 0 := by\n simp [Presentation.dimension, localizationAway, Generators.localizationAway_vars]",
"start": [
165,
1
],
"end": [
167,
84
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.span_range_relation_eq_ker_baseChange",
"code": "private lemma span_range_relation_eq_ker_baseChange :\n Ideal.span (Set.range fun i ↦ (MvPolynomial.map (algebraMap R T)) (P.relation i)) =\n RingHom.ker (aeval (R := T) (S₁ := T ⊗[R] S) P.baseChange.val) := by\n apply le_antisymm\n · rw [Ideal.span_le]\n intro x ⟨y, hy⟩\n have Z := aeval_val_relation P y\n apply_fun TensorProduct.includeRight (R := R) (A := T) at Z\n rw [map_zero] at Z\n simp only [SetLike.mem_coe, RingHom.mem_ker, ← Z, ← hy, algebraMap_apply,\n TensorProduct.includeRight_apply]\n erw [aeval_map_algebraMap]\n show _ = TensorProduct.includeRight _\n erw [map_aeval, TensorProduct.includeRight.comp_algebraMap]\n rfl\n · intro x hx\n rw [RingHom.mem_ker] at hx\n have H := Algebra.TensorProduct.lTensor_ker (A := T) (IsScalarTower.toAlgHom R P.Ring S)\n P.algebraMap_surjective\n let e := MvPolynomial.algebraTensorAlgEquiv (R := R) (σ := P.vars) (A := T)\n have H' : e.symm x ∈ RingHom.ker (TensorProduct.map (AlgHom.id R T)\n (IsScalarTower.toAlgHom R P.Ring S)) := by\n rw [RingHom.mem_ker, ← hx]\n clear hx\n induction x using MvPolynomial.induction_on with\n | h_C a =>\n simp only [Generators.algebraMap_apply, algHom_C, TensorProduct.algebraMap_apply,\n id.map_eq_id, RingHom.id_apply, e]\n erw [← MvPolynomial.algebraMap_eq, AlgEquiv.commutes]\n simp only [TensorProduct.algebraMap_apply, id.map_eq_id, RingHom.id_apply,\n TensorProduct.map_tmul, AlgHom.coe_id, id_eq, _root_.map_one, algebraMap_eq]\n erw [aeval_C]\n simp\n | h_add p q hp hq => simp only [map_add, hp, hq]\n | h_X p i hp =>\n simp only [_root_.map_mul, algebraTensorAlgEquiv_symm_X, hp, TensorProduct.map_tmul,\n _root_.map_one, IsScalarTower.coe_toAlgHom', Generators.algebraMap_apply, aeval_X, e]\n congr\n erw [aeval_X]\n rw [Generators.baseChange_val]\n erw [H] at H'\n replace H' : e.symm x ∈ Ideal.map TensorProduct.includeRight P.ker := H'\n erw [← P.span_range_relation_eq_ker, ← Ideal.mem_comap, Ideal.comap_symm,\n Ideal.map_map, Ideal.map_span, ← Set.range_comp] at H'\n convert H'\n simp only [AlgHom.toRingHom_eq_coe, RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply,\n TensorProduct.includeRight_apply, TensorProduct.lift_tmul, _root_.map_one, mapAlgHom_apply,\n one_mul]\n rfl",
"start": [
173,
1
],
"end": [
221,
8
],
"kind": "lemma"
},
{
"full_name": "Algebra.Presentation.baseChange",
"code": "@[simps relation, simps (config := .lemmasOnly) rels]\nnoncomputable\ndef baseChange : Presentation T (T ⊗[R] S) where\n __ := Generators.baseChange P.toGenerators\n rels := P.rels\n relation i := MvPolynomial.map (algebraMap R T) (P.relation i)\n span_range_relation_eq_ker := P.span_range_relation_eq_ker_baseChange",
"start": [
223,
1
],
"end": [
231,
72
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Order/Monoid/ToMulBot.lean | [
"Mathlib/Algebra/Group/Equiv/Basic.lean",
"Mathlib/Algebra/Order/Monoid/TypeTags.lean",
"Mathlib/Algebra/Order/Monoid/WithTop.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Order/GroupWithZero/Canonical.lean"
] | [
{
"full_name": "WithZero.toMulBot",
"code": "def toMulBot : WithZero (Multiplicative α) ≃* Multiplicative (WithBot α) :=\n MulEquiv.refl _",
"start": [
27,
1
],
"end": [
30,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_zero",
"code": "@[simp]\ntheorem toMulBot_zero : toMulBot (0 : WithZero (Multiplicative α)) = Multiplicative.ofAdd ⊥",
"start": [
33,
1
],
"end": [
35,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_coe",
"code": "@[simp]\ntheorem toMulBot_coe (x : Multiplicative α) :\n toMulBot ↑x = Multiplicative.ofAdd (↑(Multiplicative.toAdd x) : WithBot α)",
"start": [
38,
1
],
"end": [
41,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_symm_bot",
"code": "@[simp]\ntheorem toMulBot_symm_bot : toMulBot.symm (Multiplicative.ofAdd (⊥ : WithBot α)) = 0",
"start": [
44,
1
],
"end": [
46,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_coe_ofAdd",
"code": "@[simp]\ntheorem toMulBot_coe_ofAdd (x : α) :\n toMulBot.symm (Multiplicative.ofAdd (x : WithBot α)) = Multiplicative.ofAdd x",
"start": [
49,
1
],
"end": [
52,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_strictMono",
"code": "theorem toMulBot_strictMono : StrictMono (@toMulBot α _)",
"start": [
57,
1
],
"end": [
57,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_le",
"code": "@[simp]\ntheorem toMulBot_le : toMulBot a ≤ toMulBot b ↔ a ≤ b",
"start": [
60,
1
],
"end": [
62,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "WithZero.toMulBot_lt",
"code": "@[simp]\ntheorem toMulBot_lt : toMulBot a < toMulBot b ↔ a < b",
"start": [
65,
1
],
"end": [
67,
10
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/List/ToFinsupp.lean | [
"Mathlib/Data/List/GetD.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/Finsupp/Defs.lean"
] | [
{
"full_name": "List.toFinsupp",
"code": "def toFinsupp : ℕ →₀ M where\n toFun i := getD l i 0\n support := (Finset.range l.length).filter fun i => getD l i 0 ≠ 0\n mem_support_toFun n := by\n simp only [Ne, Finset.mem_filter, Finset.mem_range, and_iff_right_iff_imp]\n contrapose!\n exact getD_eq_default _ _",
"start": [
40,
1
],
"end": [
52,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "List.coe_toFinsupp",
"code": "@[norm_cast]\ntheorem coe_toFinsupp : (l.toFinsupp : ℕ → M) = (l.getD · 0)",
"start": [
55,
1
],
"end": [
57,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_apply",
"code": "@[simp, norm_cast]\ntheorem toFinsupp_apply (i : ℕ) : (l.toFinsupp : ℕ → M) i = l.getD i 0",
"start": [
60,
1
],
"end": [
62,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_support",
"code": "theorem toFinsupp_support :\n l.toFinsupp.support = (Finset.range l.length).filter (getD l · 0 ≠ 0)",
"start": [
65,
1
],
"end": [
67,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_apply_lt",
"code": "theorem toFinsupp_apply_lt (hn : n < l.length) : l.toFinsupp n = l.get ⟨n, hn⟩",
"start": [
70,
1
],
"end": [
71,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_apply_fin",
"code": "theorem toFinsupp_apply_fin (n : Fin l.length) : l.toFinsupp n = l.get n",
"start": [
73,
1
],
"end": [
74,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_apply_lt'",
"code": "@[deprecated (since := \"2023-04-10\")]\ntheorem toFinsupp_apply_lt' (hn : n < l.length) : l.toFinsupp n = l.nthLe n hn",
"start": [
77,
1
],
"end": [
79,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_apply_le",
"code": "theorem toFinsupp_apply_le (hn : l.length ≤ n) : l.toFinsupp n = 0",
"start": [
82,
1
],
"end": [
83,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_nil",
"code": "@[simp]\ntheorem toFinsupp_nil [DecidablePred fun i => getD ([] : List M) i 0 ≠ 0] :\n toFinsupp ([] : List M) = 0",
"start": [
86,
1
],
"end": [
90,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_singleton",
"code": "theorem toFinsupp_singleton (x : M) [DecidablePred (getD [x] · 0 ≠ 0)] :\n toFinsupp [x] = Finsupp.single 0 x",
"start": [
93,
1
],
"end": [
95,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_cons_apply_zero",
"code": "@[deprecated \"This lemma is unused, and can be proved by `simp`.\" (since := \"2024-06-12\")]\ntheorem toFinsupp_cons_apply_zero (x : M) (xs : List M)\n [DecidablePred (getD (x::xs) · 0 ≠ 0)] : (x::xs).toFinsupp 0 = x",
"start": [
98,
1
],
"end": [
101,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_cons_apply_succ",
"code": "@[deprecated \"This lemma is unused, and can be proved by `simp`.\" (since := \"2024-06-12\")]\ntheorem toFinsupp_cons_apply_succ (x : M) (xs : List M) (n : ℕ)\n [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :\n (x::xs).toFinsupp n.succ = xs.toFinsupp n",
"start": [
104,
1
],
"end": [
108,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_append",
"code": "theorem toFinsupp_append {R : Type*} [AddZeroClass R] (l₁ l₂ : List R)\n [DecidablePred (getD (l₁ ++ l₂) · 0 ≠ 0)] [DecidablePred (getD l₁ · 0 ≠ 0)]\n [DecidablePred (getD l₂ · 0 ≠ 0)] :\n toFinsupp (l₁ ++ l₂) =\n toFinsupp l₁ + (toFinsupp l₂).embDomain (addLeftEmbedding l₁.length)",
"start": [
111,
1
],
"end": [
126,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_cons_eq_single_add_embDomain",
"code": "theorem toFinsupp_cons_eq_single_add_embDomain {R : Type*} [AddZeroClass R] (x : R) (xs : List R)\n [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :\n toFinsupp (x::xs) =\n Finsupp.single 0 x + (toFinsupp xs).embDomain ⟨Nat.succ, Nat.succ_injective⟩",
"start": [
128,
1
],
"end": [
136,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_concat_eq_toFinsupp_add_single",
"code": "theorem toFinsupp_concat_eq_toFinsupp_add_single {R : Type*} [AddZeroClass R] (x : R) (xs : List R)\n [DecidablePred fun i => getD (xs ++ [x]) i 0 ≠ 0] [DecidablePred fun i => getD xs i 0 ≠ 0] :\n toFinsupp (xs ++ [x]) = toFinsupp xs + Finsupp.single xs.length x",
"start": [
139,
1
],
"end": [
143,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "List.toFinsupp_eq_sum_map_enum_single",
"code": "theorem toFinsupp_eq_sum_map_enum_single {R : Type*} [AddMonoid R] (l : List R)\n [DecidablePred (getD l · 0 ≠ 0)] :\n toFinsupp l = (l.enum.map fun nr : ℕ × R => Finsupp.single nr.1 nr.2).sum",
"start": [
147,
1
],
"end": [
156,
79
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Lie/DirectSum.lean | [
"Mathlib/Algebra/Lie/Submodule.lean",
"Mathlib/Algebra/DirectSum/Module.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Lie/Basic.lean",
"Mathlib/Algebra/Lie/OfAssociative.lean"
] | [
{
"full_name": "DirectSum.lie_module_bracket_apply",
"code": "@[simp]\ntheorem lie_module_bracket_apply (x : L) (m : ⨁ i, M i) (i : ι) : ⁅x, m⁆ i = ⁅x, m i⁆",
"start": [
57,
1
],
"end": [
59,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieModuleOf",
"code": "def lieModuleOf [DecidableEq ι] (j : ι) : M j →ₗ⁅R,L⁆ ⨁ i, M i :=\n { lof R ι M j with\n map_lie' := fun {x m} => by\n refine DFinsupp.ext fun i => ?_ by_cases h : j = i\n · rw [← h]; simp\n · simp only [lof, lsingle, AddHom.toFun_eq_coe, lie_module_bracket_apply]\n erw [AddHom.coe_mk]\n simp [h] }",
"start": [
72,
1
],
"end": [
83,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieModuleComponent",
"code": "def lieModuleComponent (j : ι) : (⨁ i, M i) →ₗ⁅R,L⁆ M j :=\n { component R ι M j with\n map_lie' := fun {x m} => by simp [component, lapply] }",
"start": [
86,
1
],
"end": [
89,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieRing",
"code": "instance lieRing : LieRing (⨁ i, L i) :=\n { (inferInstance : AddCommGroup _) with\n bracket := zipWith (fun i => fun x y => ⁅x, y⁆) fun i => lie_zero 0\n add_lie := fun x y z => by\n refine DFinsupp.ext fun _ => ?_ simp only [zipWith_apply, add_apply, add_lie]\n lie_add := fun x y z => by\n refine DFinsupp.ext fun _ => ?_ simp only [zipWith_apply, add_apply, lie_add]\n lie_self := fun x => by\n refine DFinsupp.ext fun _ => ?_ simp only [zipWith_apply, add_apply, lie_self, zero_apply]\n leibniz_lie := fun x y z => by\n refine DFinsupp.ext fun _ => ?_ simp only [sub_apply, zipWith_apply, add_apply, zero_apply]\n apply leibniz_lie }",
"start": [
102,
1
],
"end": [
117,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.bracket_apply",
"code": "@[simp]\ntheorem bracket_apply (x y : ⨁ i, L i) (i : ι) : ⁅x, y⁆ i = ⁅x i, y i⁆",
"start": [
120,
1
],
"end": [
122,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lie_of_same",
"code": "theorem lie_of_same [DecidableEq ι] {i : ι} (x y : L i) :\n ⁅of L i x, of L i y⁆ = of L i ⁅x, y⁆",
"start": [
125,
1
],
"end": [
127,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lie_of_of_ne",
"code": "theorem lie_of_of_ne [DecidableEq ι] {i j : ι} (hij : i ≠ j) (x : L i) (y : L j) :\n ⁅of L i x, of L j y⁆ = 0",
"start": [
130,
1
],
"end": [
136,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lie_of",
"code": "@[simp]\ntheorem lie_of [DecidableEq ι] {i j : ι} (x : L i) (y : L j) :\n ⁅of L i x, of L j y⁆ = if hij : i = j then of L i ⁅x, hij.symm.recOn y⁆ else 0",
"start": [
139,
1
],
"end": [
144,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieAlgebra",
"code": "instance lieAlgebra : LieAlgebra R (⨁ i, L i) :=\n { (inferInstance : Module R _) with\n lie_smul := fun c x y => by\n refine DFinsupp.ext fun _ => ?_ simp only [zipWith_apply, smul_apply, bracket_apply, lie_smul] }",
"start": [
147,
1
],
"end": [
151,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieAlgebraOf",
"code": "@[simps]\ndef lieAlgebraOf [DecidableEq ι] (j : ι) : L j →ₗ⁅R⁆ ⨁ i, L i :=\n { lof R ι L j with\n toFun := of L j\n map_lie' := fun {x y} => by\n refine DFinsupp.ext fun i => ?_ by_cases h : j = i\n · rw [← h]\n simp only [of, singleAddHom, bracket_apply]\n erw [AddHom.coe_mk, single_apply, single_apply]\n · simp? [h] says simp only [h, ↓reduceDIte, single_apply]\n · intros\n erw [single_add]\n · simp only [of, singleAddHom, bracket_apply]\n erw [AddHom.coe_mk, single_apply, single_apply]\n · simp only [h, dite_false, single_apply, lie_self]\n · intros\n erw [single_add] }",
"start": [
156,
1
],
"end": [
178,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieAlgebraComponent",
"code": "@[simps]\ndef lieAlgebraComponent (j : ι) : (⨁ i, L i) →ₗ⁅R⁆ L j :=\n { component R ι L j with\n toFun := component R ι L j\n map_lie' := fun {x y} => by simp [component, lapply] }",
"start": [
181,
1
],
"end": [
186,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieAlgebra_ext",
"code": "@[ext]\ntheorem lieAlgebra_ext {x y : ⨁ i, L i}\n (h : ∀ i, lieAlgebraComponent R ι L i x = lieAlgebraComponent R ι L i y) : x = y",
"start": [
189,
1
],
"end": [
192,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.toLieAlgebra",
"code": "@[simps]\ndef toLieAlgebra [DecidableEq ι] (L' : Type w₁) [LieRing L'] [LieAlgebra R L']\n (f : ∀ i, L i →ₗ⁅R⁆ L') (hf : Pairwise fun i j => ∀ (x : L i) (y : L j), ⁅f i x, f j y⁆ = 0) :\n (⨁ i, L i) →ₗ⁅R⁆ L' :=\n { toModule R ι L' fun i => (f i : L i →ₗ[R] L') with\n toFun := toModule R ι L' fun i => (f i : L i →ₗ[R] L')\n map_lie' := fun {x y} => by\n let f' i := (f i : L i →ₗ[R] L')\n \n suffices ∀ (i : ι) (y : L i),\n toModule R ι L' f' ⁅x, of L i y⁆ =\n ⁅toModule R ι L' f' x, toModule R ι L' f' (of L i y)⁆ by\n simp only [← LieAlgebra.ad_apply R]\n rw [← LinearMap.comp_apply, ← LinearMap.comp_apply]\n congr; clear y; ext i y; exact this i y\n suffices ∀ (i j) (y : L i) (x : L j),\n toModule R ι L' f' ⁅of L j x, of L i y⁆ =\n ⁅toModule R ι L' f' (of L j x), toModule R ι L' f' (of L i y)⁆ by\n intro i y\n rw [← lie_skew x, ← lie_skew (toModule R ι L' f' x)]\n simp only [LinearMap.map_neg, neg_inj, ← LieAlgebra.ad_apply R]\n rw [← LinearMap.comp_apply, ← LinearMap.comp_apply]\n congr; clear x; ext j x; exact this j i x y\n intro i j y x\n simp only [f', coe_toModule_eq_coe_toAddMonoid, toAddMonoid_of]\n obtain rfl | hij := Decidable.eq_or_ne i j\n · simp_rw [lie_of_same, toAddMonoid_of, LinearMap.toAddMonoidHom_coe, LieHom.coe_toLinearMap,\n LieHom.map_lie]\n · simp_rw [lie_of_of_ne _ hij.symm, map_zero, LinearMap.toAddMonoidHom_coe,\n LieHom.coe_toLinearMap, hf hij.symm x y] }",
"start": [
197,
1
],
"end": [
233,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieRingOfIdeals",
"code": "instance lieRingOfIdeals : LieRing (⨁ i, I i) :=\n DirectSum.lieRing fun i => ↥(I i)",
"start": [
242,
1
],
"end": [
246,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "DirectSum.lieAlgebraOfIdeals",
"code": "instance lieAlgebraOfIdeals : LieAlgebra R (⨁ i, I i) :=\n DirectSum.lieAlgebra fun i => ↥(I i)",
"start": [
249,
1
],
"end": [
251,
39
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/LaurentSeries.lean | [
"Mathlib/RingTheory/HahnSeries/PowerSeries.lean",
"Mathlib/Data/Int/Interval.lean",
"Mathlib/RingTheory/Localization/FractionRing.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/HahnSeries/Summable.lean",
"Mathlib/FieldTheory/RatFunc/AsPolynomial.lean",
"Mathlib/RingTheory/Binomial.lean"
] | [
{
"full_name": "LaurentSeries",
"code": "abbrev LaurentSeries (R : Type u) [Zero R] :=\n HahnSeries ℤ R",
"start": [
40,
1
],
"end": [
42,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.hasseDeriv",
"code": "@[simps]\ndef hasseDeriv (R : Type*) {V : Type*} [AddCommGroup V] [Semiring R] [Module R V] (k : ℕ) :\n LaurentSeries V →ₗ[R] LaurentSeries V where\n toFun f := HahnSeries.ofSuppBddBelow (fun (n : ℤ) => (Ring.choose (n + k) k) • f.coeff (n + k))\n (forallLTEqZero_supp_BddBelow _ (f.order - k : ℤ)\n (fun _ h_lt ↦ by rw [coeff_eq_zero_of_lt_order <| lt_sub_iff_add_lt.mp h_lt, smul_zero]))\n map_add' f g := by\n ext\n simp only [ofSuppBddBelow, add_coeff', Pi.add_apply, smul_add]\n map_smul' r f := by\n ext\n simp only [ofSuppBddBelow, smul_coeff, RingHom.id_apply, smul_comm r]",
"start": [
51,
1
],
"end": [
63,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.hasseDeriv_coeff",
"code": "theorem hasseDeriv_coeff (k : ℕ) (f : LaurentSeries V) (n : ℤ) :\n (hasseDeriv R k f).coeff n = Ring.choose (n + k) k • f.coeff (n + k)",
"start": [
67,
1
],
"end": [
69,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.coeff_coe_powerSeries",
"code": "@[simp]\ntheorem coeff_coe_powerSeries (x : PowerSeries R) (n : ℕ) :\n HahnSeries.coeff (x : LaurentSeries R) n = PowerSeries.coeff R n x",
"start": [
86,
1
],
"end": [
89,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.powerSeriesPart",
"code": "def powerSeriesPart (x : LaurentSeries R) : PowerSeries R :=\n PowerSeries.mk fun n => x.coeff (x.order + n)",
"start": [
92,
1
],
"end": [
96,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.powerSeriesPart_coeff",
"code": "@[simp]\ntheorem powerSeriesPart_coeff (x : LaurentSeries R) (n : ℕ) :\n PowerSeries.coeff R n x.powerSeriesPart = x.coeff (x.order + n)",
"start": [
99,
1
],
"end": [
102,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.powerSeriesPart_zero",
"code": "@[simp]\ntheorem powerSeriesPart_zero : powerSeriesPart (0 : LaurentSeries R) = 0",
"start": [
105,
1
],
"end": [
108,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.powerSeriesPart_eq_zero",
"code": "@[simp]\ntheorem powerSeriesPart_eq_zero (x : LaurentSeries R) : x.powerSeriesPart = 0 ↔ x = 0",
"start": [
111,
1
],
"end": [
121,
9
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.single_order_mul_powerSeriesPart",
"code": "@[simp]\ntheorem single_order_mul_powerSeriesPart (x : LaurentSeries R) :\n (single x.order 1 : LaurentSeries R) * x.powerSeriesPart = x",
"start": [
124,
1
],
"end": [
140,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.ofPowerSeries_powerSeriesPart",
"code": "theorem ofPowerSeries_powerSeriesPart (x : LaurentSeries R) :\n ofPowerSeries ℤ R x.powerSeriesPart = single (-x.order) 1 * x",
"start": [
143,
1
],
"end": [
146,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.coe_algebraMap",
"code": "@[simp]\ntheorem coe_algebraMap [CommSemiring R] :\n ⇑(algebraMap (PowerSeries R) (LaurentSeries R)) = HahnSeries.ofPowerSeries ℤ R",
"start": [
154,
1
],
"end": [
157,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "LaurentSeries.of_powerSeries_localization",
"code": "@[simps (config := { rhsMd := .all, simpRhs := true })]\ninstance of_powerSeries_localization [CommRing R] :\n IsLocalization (Submonoid.powers (PowerSeries.X : PowerSeries R)) (LaurentSeries R) where\n map_units' := by\n rintro ⟨_, n, rfl⟩\n refine ⟨⟨single (n : ℤ) 1, single (-n : ℤ) 1, ?_, ?_⟩, ?_⟩\n · simp\n · simp\n · dsimp; rw [ofPowerSeries_X_pow]\n surj' z := by\n by_cases h : 0 ≤ z.order\n · refine ⟨⟨PowerSeries.X ^ Int.natAbs z.order * powerSeriesPart z, 1⟩, ?_⟩\n simp only [RingHom.map_one, mul_one, RingHom.map_mul, coe_algebraMap, ofPowerSeries_X_pow,\n Submonoid.coe_one]\n rw [Int.natAbs_of_nonneg h, single_order_mul_powerSeriesPart]\n · refine ⟨⟨powerSeriesPart z, PowerSeries.X ^ Int.natAbs z.order, ⟨_, rfl⟩⟩, ?_⟩\n simp only [coe_algebraMap, ofPowerSeries_powerSeriesPart]\n rw [mul_comm _ z]\n refine congr rfl ?_\n rw [ofPowerSeries_X_pow, Int.ofNat_natAbs_of_nonpos]\n exact le_of_not_ge h\n exists_of_eq {x y} := by\n rw [coe_algebraMap, ofPowerSeries_injective.eq_iff]\n rintro rfl\n exact ⟨1, rfl⟩",
"start": [
160,
1
],
"end": [
185,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_zero",
"code": "@[norm_cast] theorem coe_zero : ((0 : PowerSeries R) : LaurentSeries R) = 0",
"start": [
201,
1
],
"end": [
203,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_one",
"code": "@[norm_cast] theorem coe_one : ((1 : PowerSeries R) : LaurentSeries R) = 1",
"start": [
206,
1
],
"end": [
208,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_add",
"code": "@[norm_cast] theorem coe_add : ((f + g : PowerSeries R) : LaurentSeries R) = f + g",
"start": [
211,
1
],
"end": [
213,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_sub",
"code": "@[norm_cast]\ntheorem coe_sub : ((f' - g' : PowerSeries R') : LaurentSeries R') = f' - g'",
"start": [
216,
1
],
"end": [
218,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_neg",
"code": "@[norm_cast]\ntheorem coe_neg : ((-f' : PowerSeries R') : LaurentSeries R') = -f'",
"start": [
221,
1
],
"end": [
223,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_mul",
"code": "@[norm_cast] theorem coe_mul : ((f * g : PowerSeries R) : LaurentSeries R) = f * g",
"start": [
226,
1
],
"end": [
228,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coeff_coe",
"code": "theorem coeff_coe (i : ℤ) :\n ((f : PowerSeries R) : LaurentSeries R).coeff i =\n if i < 0 then 0 else PowerSeries.coeff R i.natAbs f",
"start": [
231,
1
],
"end": [
240,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_C",
"code": "theorem coe_C (r : R) : ((C R r : PowerSeries R) : LaurentSeries R) = HahnSeries.C r",
"start": [
245,
1
],
"end": [
246,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_X",
"code": "theorem coe_X : ((X : PowerSeries R) : LaurentSeries R) = single 1 1",
"start": [
251,
1
],
"end": [
252,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_smul",
"code": "@[simp, norm_cast]\ntheorem coe_smul {S : Type*} [Semiring S] [Module R S] (r : R) (x : PowerSeries S) :\n ((r • x : PowerSeries S) : LaurentSeries S) = r • (ofPowerSeries ℤ S x)",
"start": [
256,
1
],
"end": [
260,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "PowerSeries.coe_pow",
"code": "@[norm_cast]\ntheorem coe_pow (n : ℕ) : ((f ^ n : PowerSeries R) : LaurentSeries R) = (ofPowerSeries ℤ R f) ^ n",
"start": [
267,
1
],
"end": [
269,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coeAlgHom",
"code": "def coeAlgHom (F : Type u) [Field F] : RatFunc F →ₐ[F[X]] LaurentSeries F :=\n liftAlgHom (Algebra.ofId _ _) <|\n nonZeroDivisors_le_comap_nonZeroDivisors_of_injective _ <|\n Polynomial.algebraMap_hahnSeries_injective _",
"start": [
281,
1
],
"end": [
285,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coeToLaurentSeries_fun",
"code": "@[coe]\ndef coeToLaurentSeries_fun {F : Type u} [Field F] : RatFunc F → LaurentSeries F :=\n coeAlgHom F",
"start": [
288,
1
],
"end": [
294,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coeToLaurentSeries",
"code": "instance coeToLaurentSeries : Coe (RatFunc F) (LaurentSeries F) :=\n ⟨coeToLaurentSeries_fun⟩",
"start": [
296,
1
],
"end": [
297,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_def",
"code": "theorem coe_def : (f : LaurentSeries F) = coeAlgHom F f",
"start": [
300,
1
],
"end": [
301,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_num_denom",
"code": "theorem coe_num_denom : (f : LaurentSeries F) = f.num / f.denom",
"start": [
304,
1
],
"end": [
305,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_injective",
"code": "theorem coe_injective : Function.Injective ((↑) : RatFunc F → LaurentSeries F)",
"start": [
308,
1
],
"end": [
309,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_apply",
"code": "@[simp]\ntheorem coe_apply : coeAlgHom F f = f",
"start": [
314,
1
],
"end": [
316,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_coe",
"code": "theorem coe_coe (P : Polynomial F) : (P : LaurentSeries F) = (P : RatFunc F)",
"start": [
319,
1
],
"end": [
320,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_zero",
"code": "@[simp, norm_cast]\ntheorem coe_zero : ((0 : RatFunc F) : LaurentSeries F) = 0",
"start": [
322,
1
],
"end": [
324,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_ne_zero",
"code": "theorem coe_ne_zero {f : Polynomial F} (hf : f ≠ 0) : (↑f : PowerSeries F) ≠ 0",
"start": [
327,
1
],
"end": [
328,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_one",
"code": "@[simp, norm_cast]\ntheorem coe_one : ((1 : RatFunc F) : LaurentSeries F) = 1",
"start": [
330,
1
],
"end": [
332,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_add",
"code": "@[simp, norm_cast]\ntheorem coe_add : ((f + g : RatFunc F) : LaurentSeries F) = f + g",
"start": [
335,
1
],
"end": [
337,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_sub",
"code": "@[simp, norm_cast]\ntheorem coe_sub : ((f - g : RatFunc F) : LaurentSeries F) = f - g",
"start": [
340,
1
],
"end": [
342,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_neg",
"code": "@[simp, norm_cast]\ntheorem coe_neg : ((-f : RatFunc F) : LaurentSeries F) = -f",
"start": [
345,
1
],
"end": [
347,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_mul",
"code": "@[simp, norm_cast]\ntheorem coe_mul : ((f * g : RatFunc F) : LaurentSeries F) = f * g",
"start": [
350,
1
],
"end": [
352,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_pow",
"code": "@[simp, norm_cast]\ntheorem coe_pow (n : ℕ) : ((f ^ n : RatFunc F) : LaurentSeries F) = (f : LaurentSeries F) ^ n",
"start": [
355,
1
],
"end": [
357,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_div",
"code": "@[simp, norm_cast]\ntheorem coe_div :\n ((f / g : RatFunc F) : LaurentSeries F) = (f : LaurentSeries F) / (g : LaurentSeries F)",
"start": [
360,
1
],
"end": [
363,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_C",
"code": "@[simp, norm_cast]\ntheorem coe_C (r : F) : ((RatFunc.C r : RatFunc F) : LaurentSeries F) = HahnSeries.C r",
"start": [
366,
1
],
"end": [
371,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_smul",
"code": "@[simp, norm_cast]\ntheorem coe_smul (r : F) : ((r • f : RatFunc F) : LaurentSeries F) = r • (f : LaurentSeries F)",
"start": [
376,
1
],
"end": [
378,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.coe_X",
"code": "@[simp]\ntheorem coe_X : ((X : RatFunc F) : LaurentSeries F) = single 1 1",
"start": [
383,
1
],
"end": [
388,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.single_one_eq_pow",
"code": "theorem single_one_eq_pow {R : Type _} [Ring R] (n : ℕ) :\n single (n : ℤ) (1 : R) = single (1 : ℤ) 1 ^ n",
"start": [
392,
1
],
"end": [
397,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.single_inv",
"code": "theorem single_inv (d : ℤ) {α : F} (hα : α ≠ 0) :\n single (-d) (α⁻¹ : F) = (single (d : ℤ) (α : F))⁻¹",
"start": [
399,
1
],
"end": [
402,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.single_zpow",
"code": "theorem single_zpow (n : ℤ) :\n single (n : ℤ) (1 : F) = single (1 : ℤ) 1 ^ n",
"start": [
404,
1
],
"end": [
410,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "RatFunc.algebraMap_apply_div",
"code": "theorem algebraMap_apply_div :\n algebraMap (RatFunc F) (LaurentSeries F) (algebraMap _ _ p / algebraMap _ _ q) =\n algebraMap F[X] (LaurentSeries F) p / algebraMap _ _ q",
"start": [
415,
1
],
"end": [
421,
26
],
"kind": "commanddeclaration"
}
] |
Mathlib/Combinatorics/Hindman.lean | [
"Mathlib/Data/Stream/Init.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Topology/StoneCech.lean",
"Mathlib/Topology/Algebra/Semigroup.lean"
] | [
{
"full_name": "Ultrafilter.mul",
"code": "@[to_additive\n \"Addition of ultrafilters given by `∀ᶠ m in U+V, p m ↔ ∀ᶠ m in U, ∀ᶠ m' in V, p (m+m')`.\"]\ndef Ultrafilter.mul {M} [Mul M] : Mul (Ultrafilter M) where mul U V := (· * ·) <$> U <*> V",
"start": [
48,
1
],
"end": [
51,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "Ultrafilter.eventually_mul",
"code": "@[to_additive]\ntheorem Ultrafilter.eventually_mul {M} [Mul M] (U V : Ultrafilter M) (p : M → Prop) :\n (∀ᶠ m in ↑(U * V), p m) ↔ ∀ᶠ m in U, ∀ᶠ m' in V, p (m * m')",
"start": [
59,
1
],
"end": [
62,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "Ultrafilter.semigroup",
"code": "@[to_additive\n \"Additive semigroup structure on `Ultrafilter M` induced by an additive semigroup\n structure on `M`.\"]\ndef Ultrafilter.semigroup {M} [Semigroup M] : Semigroup (Ultrafilter M) :=\n { Ultrafilter.mul with\n mul_assoc := fun U V W =>\n Ultrafilter.coe_inj.mp <|\n Filter.ext' fun p => by simp_rw [Ultrafilter.eventually_mul, mul_assoc] }",
"start": [
66,
1
],
"end": [
75,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "Ultrafilter.continuous_mul_left",
"code": "@[to_additive]\ntheorem Ultrafilter.continuous_mul_left {M} [Semigroup M] (V : Ultrafilter M) :\n Continuous (· * V)",
"start": [
82,
1
],
"end": [
86,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FS",
"code": "inductive FS {M} [AddSemigroup M] : Stream' M → Set M\n | head (a : Stream' M) : FS a a.head\n | tail (a : Stream' M) (m : M) (h : FS a.tail m) : FS a m\n | cons (a : Stream' M) (m : M) (h : FS a.tail m) : FS a (a.head + m)",
"start": [
95,
1
],
"end": [
100,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP",
"code": "@[to_additive FS]\ninductive FP {M} [Semigroup M] : Stream' M → Set M\n | head (a : Stream' M) : FP a a.head\n | tail (a : Stream' M) (m : M) (h : FP a.tail m) : FP a m\n | cons (a : Stream' M) (m : M) (h : FP a.tail m) : FP a (a.head * m)",
"start": [
104,
1
],
"end": [
110,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP.mul",
"code": "@[to_additive\n \"If `m` and `m'` are finite sums in `M`, then so is `m + m'`, provided that `m'`\n is obtained from a subsequence of `M` starting sufficiently late.\"]\ntheorem FP.mul {M} [Semigroup M] {a : Stream' M} {m : M} (hm : m ∈ FP a) :\n ∃ n, ∀ m' ∈ FP (a.drop n), m * m' ∈ FP a",
"start": [
114,
1
],
"end": [
131,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.exists_idempotent_ultrafilter_le_FP",
"code": "@[to_additive exists_idempotent_ultrafilter_le_FS]\ntheorem exists_idempotent_ultrafilter_le_FP {M} [Semigroup M] (a : Stream' M) :\n ∃ U : Ultrafilter M, U * U = U ∧ ∀ᶠ m in U, m ∈ FP a",
"start": [
137,
1
],
"end": [
165,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.exists_FP_of_large",
"code": "@[to_additive exists_FS_of_large]\ntheorem exists_FP_of_large {M} [Semigroup M] (U : Ultrafilter M) (U_idem : U * U = U) (s₀ : Set M)\n (sU : s₀ ∈ U) : ∃ a, FP a ⊆ s₀",
"start": [
171,
1
],
"end": [
203,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP_partition_regular",
"code": "@[to_additive FS_partition_regular\n \"The strong form of **Hindman's theorem**: in any finite cover of\n an FS-set, one the parts contains an FS-set.\"]\ntheorem FP_partition_regular {M} [Semigroup M] (a : Stream' M) (s : Set (Set M)) (sfin : s.Finite)\n (scov : FP a ⊆ ⋃₀ s) : ∃ c ∈ s, ∃ b : Stream' M, FP b ⊆ c",
"start": [
209,
1
],
"end": [
218,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.exists_FP_of_finite_cover",
"code": "@[to_additive exists_FS_of_finite_cover\n \"The weak form of **Hindman's theorem**: in any finite cover\n of a nonempty additive semigroup, one of the parts contains an FS-set.\"]\ntheorem exists_FP_of_finite_cover {M} [Semigroup M] [Nonempty M] (s : Set (Set M)) (sfin : s.Finite)\n (scov : ⊤ ⊆ ⋃₀ s) : ∃ c ∈ s, ∃ a : Stream' M, FP a ⊆ c",
"start": [
224,
1
],
"end": [
234,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP_drop_subset_FP",
"code": "@[to_additive FS_iter_tail_sub_FS]\ntheorem FP_drop_subset_FP {M} [Semigroup M] (a : Stream' M) (n : ℕ) : FP (a.drop n) ⊆ FP a",
"start": [
240,
1
],
"end": [
245,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP.singleton",
"code": "@[to_additive]\ntheorem FP.singleton {M} [Semigroup M] (a : Stream' M) (i : ℕ) : a.get i ∈ FP a",
"start": [
251,
1
],
"end": [
256,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP.mul_two",
"code": "@[to_additive]\ntheorem FP.mul_two {M} [Semigroup M] (a : Stream' M) (i j : ℕ) (ij : i < j) :\n a.get i * a.get j ∈ FP a",
"start": [
262,
1
],
"end": [
274,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Hindman.FP.finset_prod",
"code": "@[to_additive]\ntheorem FP.finset_prod {M} [CommMonoid M] (a : Stream' M) (s : Finset ℕ) (hs : s.Nonempty) :\n (s.prod fun i => a.get i) ∈ FP a",
"start": [
280,
1
],
"end": [
296,
28
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Preadditive/HomOrthogonal.lean | [
"Mathlib/Data/Set/Subsingleton.lean",
"Mathlib/LinearAlgebra/Matrix/InvariantBasisNumber.lean",
"Mathlib/CategoryTheory/Preadditive/Biproducts.lean",
"Mathlib/CategoryTheory/Linear/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "CategoryTheory.HomOrthogonal",
"code": "def HomOrthogonal {ι : Type*} (s : ι → C) : Prop :=\n Pairwise fun i j => Subsingleton (s i ⟶ s j)",
"start": [
50,
1
],
"end": [
55,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.eq_zero",
"code": "theorem eq_zero [HasZeroMorphisms C] (o : HomOrthogonal s) {i j : ι} (w : i ≠ j) (f : s i ⟶ s j) :\n f = 0",
"start": [
62,
1
],
"end": [
64,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.matrixDecomposition",
"code": "@[simps]\nnoncomputable def matrixDecomposition (o : HomOrthogonal s) {α β : Type} [Finite α] [Finite β]\n {f : α → ι} {g : β → ι} :\n ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃\n ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i)) where\n toFun z i j k :=\n eqToHom\n (by\n rcases k with ⟨k, ⟨⟩⟩\n simp) ≫\n biproduct.components z k j ≫\n eqToHom\n (by\n rcases j with ⟨j, ⟨⟩⟩\n simp)\n invFun z :=\n biproduct.matrix fun j k =>\n if h : f j = g k then z (f j) ⟨k, by simp [h]⟩ ⟨j, by simp⟩ ≫ eqToHom (by simp [h]) else 0\n left_inv z := by\n ext j k\n simp only [biproduct.matrix_π, biproduct.ι_desc]\n split_ifs with h\n · simp\n rfl\n · symm\n apply o.eq_zero h\n right_inv z := by\n ext i ⟨j, w⟩ ⟨k, ⟨⟩⟩\n simp only [eqToHom_refl, biproduct.matrix_components, Category.id_comp]\n split_ifs with h\n · simp\n · exfalso\n exact h w.symm",
"start": [
71,
1
],
"end": [
107,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.matrixDecompositionAddEquiv",
"code": "@[simps!]\nnoncomputable def matrixDecompositionAddEquiv (o : HomOrthogonal s) {α β : Type} [Finite α]\n [Finite β] {f : α → ι} {g : β → ι} :\n ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃+\n ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i)) :=\n { o.matrixDecomposition with\n map_add' := fun w z => by\n ext\n dsimp [biproduct.components]\n simp }",
"start": [
116,
1
],
"end": [
126,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.matrixDecomposition_id",
"code": "@[simp]\ntheorem matrixDecomposition_id (o : HomOrthogonal s) {α : Type} [Finite α] {f : α → ι} (i : ι) :\n o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) i = 1",
"start": [
129,
1
],
"end": [
143,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.matrixDecomposition_comp",
"code": "theorem matrixDecomposition_comp (o : HomOrthogonal s) {α β γ : Type} [Finite α] [Fintype β]\n [Finite γ] {f : α → ι} {g : β → ι} {h : γ → ι} (z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b))\n (w : (⨁ fun b => s (g b)) ⟶ ⨁ fun c => s (h c)) (i : ι) :\n o.matrixDecomposition (z ≫ w) i = o.matrixDecomposition w i * o.matrixDecomposition z i",
"start": [
146,
1
],
"end": [
166,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.matrixDecompositionLinearEquiv",
"code": "@[simps]\nnoncomputable def matrixDecompositionLinearEquiv (o : HomOrthogonal s) {α β : Type} [Finite α]\n [Finite β] {f : α → ι} {g : β → ι} :\n ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃ₗ[R]\n ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i)) :=\n { o.matrixDecompositionAddEquiv with\n map_smul' := fun w z => by\n ext\n dsimp [biproduct.components]\n simp }",
"start": [
173,
1
],
"end": [
183,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.HomOrthogonal.equiv_of_iso",
"code": "theorem equiv_of_iso (o : HomOrthogonal s) {α β : Type} [Finite α] [Finite β] {f : α → ι}\n {g : β → ι} (i : (⨁ fun a => s (f a)) ≅ ⨁ fun b => s (g b)) :\n ∃ e : α ≃ β, ∀ a, g (e a) = f a",
"start": [
196,
1
],
"end": [
216,
14
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Monoidal/Internal/Module.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Category/AlgebraCat/Basic.lean",
"Mathlib/CategoryTheory/Monoidal/Mon_.lean",
"Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean"
] | [
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.Ring_of_Mon_",
"code": "instance Ring_of_Mon_ (A : Mon_ (ModuleCat.{u} R)) : Ring A.X :=\n { (inferInstance : AddCommGroup A.X) with\n one := A.one (1 : R)\n mul := fun x y => A.mul (x ⊗ₜ y)\n one_mul := fun x => by\n have := LinearMap.congr_fun A.one_mul ((1 : R) ⊗ₜ x)\n convert this\n rw [MonoidalCategory.leftUnitor_hom_apply, one_smul]\n mul_one := fun x => by\n have := LinearMap.congr_fun A.mul_one (x ⊗ₜ (1 : R))\n convert this\n erw [MonoidalCategory.leftUnitor_hom_apply, one_smul]\n mul_assoc := fun x y z => by\n have := LinearMap.congr_fun A.mul_assoc (x ⊗ₜ y ⊗ₜ z)\n convert this\n left_distrib := fun x y z => by\n have := A.mul.map_add (x ⊗ₜ y) (x ⊗ₜ z)\n convert this\n rw [← TensorProduct.tmul_add]\n rfl\n right_distrib := fun x y z => by\n have := A.mul.map_add (x ⊗ₜ z) (y ⊗ₜ z)\n convert this\n rw [← TensorProduct.add_tmul]\n rfl\n zero_mul := fun x => show A.mul _ = 0 by\n rw [TensorProduct.zero_tmul, map_zero]\n mul_zero := fun x => show A.mul _ = 0 by\n rw [TensorProduct.tmul_zero, map_zero] }",
"start": [
46,
1
],
"end": [
74,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.Algebra_of_Mon_",
"code": "instance Algebra_of_Mon_ (A : Mon_ (ModuleCat.{u} R)) : Algebra R A.X :=\n { A.one with\n map_zero' := A.one.map_zero\n map_one' := rfl\n map_mul' := fun x y => by\n have h := LinearMap.congr_fun A.one_mul.symm (x ⊗ₜ A.one y)\n rwa [MonoidalCategory.leftUnitor_hom_apply, ← A.one.map_smul] at h\n commutes' := fun r a => by\n dsimp\n have h₁ := LinearMap.congr_fun A.one_mul (r ⊗ₜ a)\n have h₂ := LinearMap.congr_fun A.mul_one (a ⊗ₜ r)\n exact h₁.trans h₂.symm\n smul_def' := fun r a => (LinearMap.congr_fun A.one_mul (r ⊗ₜ a)).symm }",
"start": [
76,
1
],
"end": [
88,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.algebraMap",
"code": "@[simp]\ntheorem algebraMap (A : Mon_ (ModuleCat.{u} R)) (r : R) : algebraMap R A.X r = A.one r",
"start": [
90,
1
],
"end": [
92,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.functor",
"code": "@[simps!]\ndef functor : Mon_ (ModuleCat.{u} R) ⥤ AlgebraCat R where\n obj A := AlgebraCat.of R A.X\n map {A B} f :=\n { f.hom.toAddMonoidHom with\n toFun := f.hom\n map_one' := LinearMap.congr_fun f.one_hom (1 : R)\n map_mul' := fun x y => LinearMap.congr_fun f.mul_hom (x ⊗ₜ y)\n commutes' := fun r => LinearMap.congr_fun f.one_hom r }",
"start": [
95,
1
],
"end": [
105,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.inverseObj",
"code": "@[simps]\ndef inverseObj (A : AlgebraCat.{u} R) : Mon_ (ModuleCat.{u} R) where\n X := ModuleCat.of R A\n one := Algebra.linearMap R A\n mul := LinearMap.mul' R A\n one_mul := by\n refine TensorProduct.ext <| LinearMap.ext_ring <| LinearMap.ext fun x => ?_\n erw [compr₂_apply, compr₂_apply, CategoryTheory.comp_apply]\n erw [LinearMap.mul'_apply, MonoidalCategory.leftUnitor_hom_apply, ← Algebra.smul_def]\n erw [id_apply]\n mul_one := by\n refine TensorProduct.ext <| LinearMap.ext fun x => LinearMap.ext_ring ?_\n erw [compr₂_apply, compr₂_apply]\n erw [CategoryTheory.comp_apply]\n erw [LinearMap.mul'_apply, ModuleCat.MonoidalCategory.rightUnitor_hom_apply, ← Algebra.commutes,\n ← Algebra.smul_def]\n erw [id_apply]\n mul_assoc := by\n set_option tactic.skipAssignedInstances false in\n refine TensorProduct.ext <| TensorProduct.ext <| LinearMap.ext fun x => LinearMap.ext fun y =>\n LinearMap.ext fun z => ?_\n dsimp only [AlgebraCat.id_apply, TensorProduct.mk_apply, LinearMap.compr₂_apply,\n Function.comp_apply, ModuleCat.MonoidalCategory.hom_apply, AlgebraCat.coe_comp,\n MonoidalCategory.associator_hom_apply]\n rw [compr₂_apply, compr₂_apply]\n erw [CategoryTheory.comp_apply,\n CategoryTheory.comp_apply, CategoryTheory.comp_apply]\n erw [LinearMap.mul'_apply, LinearMap.mul'_apply]\n erw [id_apply]\n erw [TensorProduct.mk_apply, TensorProduct.mk_apply, mul'_apply, LinearMap.id_apply, mul'_apply]\n simp only [LinearMap.mul'_apply, mul_assoc]",
"start": [
108,
1
],
"end": [
157,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.MonModuleEquivalenceAlgebra.inverse",
"code": "@[simps]\ndef inverse : AlgebraCat.{u} R ⥤ Mon_ (ModuleCat.{u} R) where\n obj := inverseObj\n map f :=\n { hom := f.toLinearMap\n one_hom := LinearMap.ext f.commutes\n mul_hom := TensorProduct.ext <| LinearMap.ext₂ <| f.map_mul }",
"start": [
160,
1
],
"end": [
168,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.monModuleEquivalenceAlgebra",
"code": "def monModuleEquivalenceAlgebra : Mon_ (ModuleCat.{u} R) ≌ AlgebraCat R where\n functor := functor\n inverse := inverse\n unitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom :=\n { hom :=\n { toFun := _root_.id\n map_add' := fun x y => rfl\n map_smul' := fun r a => rfl }\n mul_hom := by\n refine TensorProduct.ext ?_\n dsimp at *\n rfl }\n inv :=\n { hom :=\n { toFun := _root_.id\n map_add' := fun x y => rfl\n map_smul' := fun r a => rfl }\n mul_hom := by\n refine TensorProduct.ext ?_\n dsimp at *\n rfl } })\n counitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom :=\n { toFun := _root_.id\n map_zero' := rfl\n map_add' := fun x y => rfl\n map_one' := (algebraMap R A).map_one\n map_mul' := fun x y => @LinearMap.mul'_apply R _ _ _ _ _ _ x y\n commutes' := fun r => rfl }\n inv :=\n { toFun := _root_.id\n map_zero' := rfl\n map_add' := fun x y => rfl\n map_one' := (algebraMap R A).map_one.symm\n map_mul' := fun x y => (@LinearMap.mul'_apply R _ _ _ _ _ _ x y).symm\n commutes' := fun r => rfl } })",
"start": [
176,
1
],
"end": [
221,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "ModuleCat.monModuleEquivalenceAlgebraForget",
"code": "def monModuleEquivalenceAlgebraForget :\n MonModuleEquivalenceAlgebra.functor ⋙ forget₂ (AlgebraCat.{u} R) (ModuleCat.{u} R) ≅\n Mon_.forget (ModuleCat.{u} R) :=\n NatIso.ofComponents\n (fun A =>\n { hom :=\n { toFun := _root_.id\n map_add' := fun x y => rfl\n map_smul' := fun c x => rfl }\n inv :=\n { toFun := _root_.id\n map_add' := fun x y => rfl\n map_smul' := fun c x => rfl } })",
"start": [
227,
1
],
"end": [
242,
45
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/Etale/Basic.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/Unramified/Basic.lean",
"Mathlib/RingTheory/QuotientNilpotent.lean",
"Mathlib/RingTheory/Smooth/Basic.lean"
] | [
{
"full_name": "Algebra.FormallyEtale",
"code": "@[mk_iff]\nclass FormallyEtale : Prop where\n comp_bijective :\n ∀ ⦃B : Type u⦄ [CommRing B],\n ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥),\n Function.Bijective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I)",
"start": [
42,
1
],
"end": [
51,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.iff_unramified_and_smooth",
"code": "theorem iff_unramified_and_smooth :\n FormallyEtale R A ↔ FormallyUnramified R A ∧ FormallySmooth R A",
"start": [
64,
1
],
"end": [
67,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.to_unramified",
"code": "instance (priority := 100) to_unramified [h : FormallyEtale R A] :\n FormallyUnramified R A :=\n (FormallyEtale.iff_unramified_and_smooth.mp h).1",
"start": [
70,
1
],
"end": [
72,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.to_smooth",
"code": "instance (priority := 100) to_smooth [h : FormallyEtale R A] : FormallySmooth R A :=\n (FormallyEtale.iff_unramified_and_smooth.mp h).2",
"start": [
75,
1
],
"end": [
76,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.of_unramified_and_smooth",
"code": "theorem of_unramified_and_smooth [h₁ : FormallyUnramified R A]\n [h₂ : FormallySmooth R A] : FormallyEtale R A",
"start": [
79,
1
],
"end": [
81,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.of_equiv",
"code": "theorem of_equiv [FormallyEtale R A] (e : A ≃ₐ[R] B) : FormallyEtale R B",
"start": [
91,
1
],
"end": [
93,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.comp",
"code": "theorem comp [FormallyEtale R A] [FormallyEtale A B] : FormallyEtale R B",
"start": [
104,
1
],
"end": [
106,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.base_change",
"code": "instance base_change [FormallyEtale R A] : FormallyEtale B (B ⊗[R] A) :=\n FormallyEtale.iff_unramified_and_smooth.mpr ⟨inferInstance, inferInstance⟩",
"start": [
119,
1
],
"end": [
120,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.of_isLocalization",
"code": "theorem of_isLocalization : FormallyEtale R Rₘ",
"start": [
154,
1
],
"end": [
156,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.localization_base",
"code": "theorem localization_base [FormallyEtale R Sₘ] : FormallyEtale Rₘ Sₘ",
"start": [
159,
1
],
"end": [
161,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.FormallyEtale.localization_map",
"code": "theorem localization_map [FormallyEtale R S] : FormallyEtale Rₘ Sₘ",
"start": [
164,
1
],
"end": [
168,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Etale",
"code": "class Etale : Prop where\n formallyEtale : FormallyEtale R A := by infer_instance\n finitePresentation : FinitePresentation R A := by infer_instance",
"start": [
180,
1
],
"end": [
187,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Etale.of_equiv",
"code": "theorem of_equiv [Etale R A] (e : A ≃ₐ[R] B) : Etale R B where",
"start": [
198,
1
],
"end": [
201,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Etale.comp",
"code": "theorem comp [Algebra A B] [IsScalarTower R A B] [Etale R A] [Etale A B] : Etale R B where",
"start": [
207,
1
],
"end": [
210,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Etale.baseChange",
"code": "instance baseChange [Etale R A] : Etale B (B ⊗[R] A) where",
"start": [
212,
1
],
"end": [
213,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Algebra.Etale.of_isLocalization_Away",
"code": "theorem of_isLocalization_Away (r : R) [IsLocalization.Away r A] : Etale R A where",
"start": [
217,
1
],
"end": [
220,
65
],
"kind": "commanddeclaration"
}
] |
Mathlib/SetTheory/Cardinal/UnivLE.lean | [
"Mathlib/Logic/UnivLE.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/SetTheory/Ordinal/Basic.lean"
] | [
{
"full_name": "univLE_iff_cardinal_le",
"code": "theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1}",
"start": [
19,
1
],
"end": [
27,
15
],
"kind": "commanddeclaration"
},
{
"full_name": "univLE_total",
"code": "theorem univLE_total : UnivLE.{u, v} ∨ UnivLE.{v, u}",
"start": [
29,
1
],
"end": [
31,
51
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Order/Ring/Star.lean | [
"Mathlib/Algebra/Star/Order.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Order/Ring/Defs.lean"
] | [
{
"full_name": "StarOrderedRing.mul_le_mul_of_nonneg_left",
"code": "private lemma mul_le_mul_of_nonneg_left {R : Type*} [CommSemiring R] [PartialOrder R]\n [StarRing R] [StarOrderedRing R] {a b c : R} (hab : a ≤ b) (hc : 0 ≤ c) : c * a ≤ c * b := by\n rw [StarOrderedRing.nonneg_iff] at hc\n induction hc using AddSubmonoid.closure_induction' with\n | mem _ h =>\n obtain ⟨x, rfl⟩ := h\n simp_rw [mul_assoc, mul_comm x, ← mul_assoc]\n exact conjugate_le_conjugate hab x\n | one => simp\n | mul x hx y hy =>\n simp only [← nonneg_iff, add_mul] at hx hy ⊢\n apply add_le_add <;> aesop",
"start": [
35,
1
],
"end": [
46,
31
],
"kind": "lemma"
},
{
"full_name": "StarOrderedRing.toOrderedCommSemiring",
"code": "abbrev toOrderedCommSemiring (R : Type*) [CommSemiring R] [PartialOrder R]\n [StarRing R] [StarOrderedRing R] : OrderedCommSemiring R where\n add_le_add_left _ _ := add_le_add_left\n zero_le_one := by simpa using star_mul_self_nonneg (1 : R)\n mul_comm := mul_comm\n mul_le_mul_of_nonneg_left _ _ _ := mul_le_mul_of_nonneg_left\n mul_le_mul_of_nonneg_right a b c := by simpa only [mul_comm _ c] using mul_le_mul_of_nonneg_left",
"start": [
48,
1
],
"end": [
60,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "StarOrderedRing.toOrderedCommRing",
"code": "abbrev toOrderedCommRing (R : Type*) [CommRing R] [PartialOrder R]\n [StarRing R] [StarOrderedRing R] : OrderedCommRing R where\n add_le_add_left _ _ := add_le_add_left\n zero_le_one := by simpa using star_mul_self_nonneg (1 : R)\n mul_comm := mul_comm\n mul_nonneg _ _ := let _ := toOrderedCommSemiring R; mul_nonneg",
"start": [
62,
1
],
"end": [
73,
65
],
"kind": "commanddeclaration"
}
] |
Mathlib/Computability/TMToPartrec.lean | [
"Mathlib/Computability/Halting.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Computability/TuringMachine.lean",
"Mathlib/Data/Num/Lemmas.lean",
"Mathlib/Tactic/DeriveFintype.lean"
] | [
{
"full_name": "Turing.ToPartrec.Code",
"code": "inductive Code\n | zero'\n | succ\n | tail\n | cons : Code → Code → Code\n | comp : Code → Code → Code\n | case : Code → Code → Code\n | fix : Code → Code\n deriving DecidableEq, Inhabited",
"start": [
73,
1
],
"end": [
83,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.eval",
"code": "def Code.eval : Code → List ℕ →. List ℕ\n | Code.zero' => fun v => pure (0 :: v)\n | Code.succ => fun v => pure [v.headI.succ]\n | Code.tail => fun v => pure v.tail\n | Code.cons f fs => fun v => do\n let n ← Code.eval f v\n let ns ← Code.eval fs v\n pure (n.headI :: ns)\n | Code.comp f g => fun v => g.eval v >>= f.eval\n | Code.case f g => fun v => v.headI.rec (f.eval v.tail) fun y _ => g.eval (y::v.tail)\n | Code.fix f =>\n PFun.fix fun v => (f.eval v).map fun v => if v.headI = 0 then Sum.inl v.tail else Sum.inr v.tail",
"start": [
93,
1
],
"end": [
130,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.zero'_eval",
"code": "@[simp]\ntheorem zero'_eval : zero'.eval = fun v => pure (0 :: v)",
"start": [
139,
1
],
"end": [
140,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.succ_eval",
"code": "@[simp]\ntheorem succ_eval : succ.eval = fun v => pure [v.headI.succ]",
"start": [
142,
1
],
"end": [
143,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.tail_eval",
"code": "@[simp]\ntheorem tail_eval : tail.eval = fun v => pure v.tail",
"start": [
145,
1
],
"end": [
146,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.cons_eval",
"code": "@[simp]\ntheorem cons_eval (f fs) : (cons f fs).eval = fun v => do {\n let n ← Code.eval f v\n let ns ← Code.eval fs v\n pure (n.headI :: ns) }",
"start": [
148,
1
],
"end": [
152,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.comp_eval",
"code": "@[simp]\ntheorem comp_eval (f g) : (comp f g).eval = fun v => g.eval v >>= f.eval",
"start": [
154,
1
],
"end": [
155,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.case_eval",
"code": "@[simp]\ntheorem case_eval (f g) :\n (case f g).eval = fun v => v.headI.rec (f.eval v.tail) fun y _ => g.eval (y::v.tail)",
"start": [
157,
1
],
"end": [
160,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.fix_eval",
"code": "@[simp]\ntheorem fix_eval (f) : (fix f).eval =\n PFun.fix fun v => (f.eval v).map fun v =>\n if v.headI = 0 then Sum.inl v.tail else Sum.inr v.tail",
"start": [
162,
1
],
"end": [
166,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.nil",
"code": "def nil : Code :=\n tail.comp succ",
"start": [
168,
1
],
"end": [
170,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.nil_eval",
"code": "@[simp]\ntheorem nil_eval (v) : nil.eval v = pure []",
"start": [
173,
1
],
"end": [
174,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.id",
"code": "def id : Code :=\n tail.comp zero'",
"start": [
177,
1
],
"end": [
179,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.id_eval",
"code": "@[simp]\ntheorem id_eval (v) : id.eval v = pure v",
"start": [
182,
1
],
"end": [
183,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.head",
"code": "def head : Code :=\n cons id nil",
"start": [
186,
1
],
"end": [
188,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.head_eval",
"code": "@[simp]\ntheorem head_eval (v) : head.eval v = pure [v.headI]",
"start": [
191,
1
],
"end": [
192,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.zero",
"code": "def zero : Code :=\n cons zero' nil",
"start": [
195,
1
],
"end": [
197,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.zero_eval",
"code": "@[simp]\ntheorem zero_eval (v) : zero.eval v = pure [0]",
"start": [
200,
1
],
"end": [
201,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.pred",
"code": "def pred : Code :=\n case zero head",
"start": [
204,
1
],
"end": [
207,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.pred_eval",
"code": "@[simp]\ntheorem pred_eval (v) : pred.eval v = pure [v.headI.pred]",
"start": [
210,
1
],
"end": [
212,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.rfind",
"code": "def rfind (f : Code) : Code :=\n comp pred <| comp (fix <| cons f <| cons succ tail) zero'",
"start": [
215,
1
],
"end": [
227,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.prec",
"code": "def prec (f g : Code) : Code :=\n let G :=\n cons tail <|\n cons succ <|\n cons (comp pred tail) <|\n cons (comp g <| cons id <| comp tail tail) <| comp tail <| comp tail tail\n let F := case id <| comp (comp (comp tail tail) (fix G)) zero'\n cons (comp F (cons head <| cons (comp f tail) tail)) nil",
"start": [
230,
1
],
"end": [
259,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.exists_code.comp",
"code": "theorem exists_code.comp {m n} {f : Vector ℕ n →. ℕ} {g : Fin n → Vector ℕ m →. ℕ}\n (hf : ∃ c : Code, ∀ v : Vector ℕ n, c.eval v.1 = pure <$> f v)\n (hg : ∀ i, ∃ c : Code, ∀ v : Vector ℕ m, c.eval v.1 = pure <$> g i v) :\n ∃ c : Code, ∀ v : Vector ℕ m, c.eval v.1 = pure <$> ((Vector.mOfFn fun i => g i v) >>= f)",
"start": [
264,
1
],
"end": [
282,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.exists_code",
"code": "theorem exists_code {n} {f : Vector ℕ n →. ℕ} (hf : Nat.Partrec' f) :\n ∃ c : Code, ∀ v : Vector ℕ n, c.eval v.1 = pure <$> f v",
"start": [
285,
1
],
"end": [
390,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cont",
"code": "inductive Cont\n | halt\n | cons₁ : Code → List ℕ → Cont → Cont\n | cons₂ : List ℕ → Cont → Cont\n | comp : Code → Cont → Cont\n | fix : Code → Cont → Cont\n deriving Inhabited",
"start": [
432,
1
],
"end": [
439,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cont.eval",
"code": "def Cont.eval : Cont → List ℕ →. List ℕ\n | Cont.halt => pure\n | Cont.cons₁ fs as k => fun v => do\n let ns ← Code.eval fs as\n Cont.eval k (v.headI :: ns)\n | Cont.cons₂ ns k => fun v => Cont.eval k (ns.headI :: v)\n | Cont.comp f k => fun v => Code.eval f v >>= Cont.eval k\n | Cont.fix f k => fun v => if v.headI = 0 then k.eval v.tail else f.fix.eval v.tail >>= k.eval",
"start": [
447,
1
],
"end": [
455,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cfg",
"code": "inductive Cfg\n | halt : List ℕ → Cfg\n | ret : Cont → List ℕ → Cfg\n deriving Inhabited",
"start": [
458,
1
],
"end": [
468,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepNormal",
"code": "def stepNormal : Code → Cont → List ℕ → Cfg\n | Code.zero' => fun k v => Cfg.ret k (0::v)\n | Code.succ => fun k v => Cfg.ret k [v.headI.succ]\n | Code.tail => fun k v => Cfg.ret k v.tail\n | Code.cons f fs => fun k v => stepNormal f (Cont.cons₁ fs v k) v\n | Code.comp f g => fun k v => stepNormal g (Cont.comp f k) v\n | Code.case f g => fun k v =>\n v.headI.rec (stepNormal f k v.tail) fun y _ => stepNormal g k (y::v.tail)\n | Code.fix f => fun k v => stepNormal f (Cont.fix f k) v",
"start": [
473,
1
],
"end": [
498,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepRet",
"code": "def stepRet : Cont → List ℕ → Cfg\n | Cont.halt, v => Cfg.halt v\n | Cont.cons₁ fs as k, v => stepNormal fs (Cont.cons₂ v k) as\n | Cont.cons₂ ns k, v => stepRet k (ns.headI :: v)\n | Cont.comp f k, v => stepNormal f k v\n | Cont.fix f k, v => if v.headI = 0 then stepRet k v.tail else stepNormal f (Cont.fix f k) v.tail",
"start": [
501,
1
],
"end": [
519,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.step",
"code": "def step : Cfg → Option Cfg\n | Cfg.halt _ => none\n | Cfg.ret k v => some (stepRet k v)",
"start": [
522,
1
],
"end": [
527,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cont.then",
"code": "def Cont.then : Cont → Cont → Cont\n | Cont.halt => fun k' => k'\n | Cont.cons₁ fs as k => fun k' => Cont.cons₁ fs as (k.then k')\n | Cont.cons₂ ns k => fun k' => Cont.cons₂ ns (k.then k')\n | Cont.comp f k => fun k' => Cont.comp f (k.then k')\n | Cont.fix f k => fun k' => Cont.fix f (k.then k')",
"start": [
530,
1
],
"end": [
547,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cont.then_eval",
"code": "theorem Cont.then_eval {k k' : Cont} {v} : (k.then k').eval v = k.eval v >>= k'.eval",
"start": [
550,
1
],
"end": [
554,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Cfg.then",
"code": "def Cfg.then : Cfg → Cont → Cfg\n | Cfg.halt v => fun k' => stepRet k' v\n | Cfg.ret k v => fun k' => Cfg.ret (k.then k') v",
"start": [
557,
1
],
"end": [
562,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepNormal_then",
"code": "theorem stepNormal_then (c) (k k' : Cont) (v) :\n stepNormal c (k.then k') v = (stepNormal c k v).then k'",
"start": [
565,
1
],
"end": [
575,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepRet_then",
"code": "theorem stepRet_then {k k' : Cont} {v} : stepRet (k.then k') v = (stepRet k v).then k'",
"start": [
578,
1
],
"end": [
593,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.Ok",
"code": "def Code.Ok (c : Code) :=\n ∀ k v, Turing.eval step (stepNormal c k v) =\n Code.eval c v >>= fun v => Turing.eval step (Cfg.ret k v)",
"start": [
596,
1
],
"end": [
605,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.Code.Ok.zero",
"code": "theorem Code.Ok.zero {c} (h : Code.Ok c) {v} :\n Turing.eval step (stepNormal c Cont.halt v) = Cfg.halt <$> Code.eval c v",
"start": [
608,
1
],
"end": [
611,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepNormal.is_ret",
"code": "theorem stepNormal.is_ret (c k v) : ∃ k' v', stepNormal c k v = Cfg.ret k' v'",
"start": [
614,
1
],
"end": [
623,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.cont_eval_fix",
"code": "theorem cont_eval_fix {f k v} (fok : Code.Ok f) :\n Turing.eval step (stepNormal f (Cont.fix f k) v) =\n f.fix.eval v >>= fun v => Turing.eval step (Cfg.ret k v)",
"start": [
626,
1
],
"end": [
696,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.code_is_ok",
"code": "theorem code_is_ok (c) : Code.Ok c",
"start": [
699,
1
],
"end": [
719,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepNormal_eval",
"code": "theorem stepNormal_eval (c v) : eval step (stepNormal c Cont.halt v) = Cfg.halt <$> c.eval v",
"start": [
722,
1
],
"end": [
723,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.ToPartrec.stepRet_eval",
"code": "theorem stepRet_eval {k v} : eval step (stepRet k v) = Cfg.halt <$> k.eval v",
"start": [
726,
1
],
"end": [
749,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Γ'",
"code": "inductive Γ'\n | consₗ\n | cons\n | bit0\n | bit1\n deriving DecidableEq, Inhabited, Fintype",
"start": [
870,
1
],
"end": [
878,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'",
"code": "inductive K'\n | main\n | rev\n | aux\n | stack\n deriving DecidableEq, Inhabited",
"start": [
885,
1
],
"end": [
894,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Cont'",
"code": "inductive Cont'\n | halt\n | cons₁ : Code → Cont' → Cont'\n | cons₂ : Cont' → Cont'\n | comp : Code → Cont' → Cont'\n | fix : Code → Cont' → Cont'\n deriving DecidableEq, Inhabited",
"start": [
903,
1
],
"end": [
913,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Λ'",
"code": "inductive Λ'\n | move (p : Γ' → Bool) (k₁ k₂ : K') (q : Λ')\n | clear (p : Γ' → Bool) (k : K') (q : Λ')\n | copy (q : Λ')\n | push (k : K') (s : Option Γ' → Option Γ') (q : Λ')\n | read (f : Option Γ' → Λ')\n | succ (q : Λ')\n | pred (q₁ q₂ : Λ')\n | ret (k : Cont')",
"start": [
921,
1
],
"end": [
934,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Λ'.instInhabited",
"code": "instance Λ'.instInhabited : Inhabited Λ' :=\n ⟨Λ'.ret Cont'.halt⟩",
"start": [
951,
1
],
"end": [
952,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Λ'.instDecidableEq",
"code": "instance Λ'.instDecidableEq : DecidableEq Λ' := fun a b => by\n induction a generalizing b <;> cases b <;> first\n | apply Decidable.isFalse; rintro ⟨⟨⟩⟩; done\n | exact decidable_of_iff' _ (by simp [Function.funext_iff]; rfl)",
"start": [
955,
1
],
"end": [
958,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Stmt'",
"code": "def Stmt' :=\n TM2.Stmt (fun _ : K' => Γ') Λ' (Option Γ') deriving Inhabited",
"start": [
961,
1
],
"end": [
963,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Cfg'",
"code": "def Cfg' :=\n TM2.Cfg (fun _ : K' => Γ') Λ' (Option Γ') deriving Inhabited",
"start": [
966,
1
],
"end": [
968,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.natEnd",
"code": "@[simp]\ndef natEnd : Γ' → Bool\n | Γ'.consₗ => true\n | Γ'.cons => true\n | _ => false",
"start": [
973,
1
],
"end": [
979,
15
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.pop'",
"code": "@[simp]\ndef pop' (k : K') : Stmt' → Stmt' :=\n pop k fun _ v => v",
"start": [
982,
1
],
"end": [
985,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.peek'",
"code": "@[simp]\ndef peek' (k : K') : Stmt' → Stmt' :=\n peek k fun _ v => v",
"start": [
988,
1
],
"end": [
991,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.push'",
"code": "@[simp]\ndef push' (k : K') : Stmt' → Stmt' :=\n push k fun x => x.iget",
"start": [
994,
1
],
"end": [
997,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.unrev",
"code": "def unrev :=\n Λ'.move (fun _ => false) rev main",
"start": [
1000,
1
],
"end": [
1002,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.moveExcl",
"code": "def moveExcl (p k₁ k₂ q) :=\n Λ'.move p k₁ k₂ <| Λ'.push k₁ id q",
"start": [
1005,
1
],
"end": [
1007,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.move₂",
"code": "def move₂ (p k₁ k₂ q) :=\n moveExcl p k₁ rev <| Λ'.move (fun _ => false) rev k₂ q",
"start": [
1010,
1
],
"end": [
1013,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.head",
"code": "def head (k : K') (q : Λ') : Λ' :=\n Λ'.move natEnd k rev <|\n (Λ'.push rev fun _ => some Γ'.cons) <|\n Λ'.read fun s =>\n (if s = some Γ'.consₗ then id else Λ'.clear (fun x => x = Γ'.consₗ) k) <| unrev q",
"start": [
1016,
1
],
"end": [
1022,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNormal",
"code": "@[simp]\ndef trNormal : Code → Cont' → Λ'\n | Code.zero', k => (Λ'.push main fun _ => some Γ'.cons) <| Λ'.ret k\n | Code.succ, k => head main <| Λ'.succ <| Λ'.ret k\n | Code.tail, k => Λ'.clear natEnd main <| Λ'.ret k\n | Code.cons f fs, k =>\n (Λ'.push stack fun _ => some Γ'.consₗ) <|\n Λ'.move (fun _ => false) main rev <| Λ'.copy <| trNormal f (Cont'.cons₁ fs k)\n | Code.comp f g, k => trNormal g (Cont'.comp f k)\n | Code.case f g, k => Λ'.pred (trNormal f k) (trNormal g k)\n | Code.fix f, k => trNormal f (Cont'.fix f k)",
"start": [
1025,
1
],
"end": [
1038,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr",
"code": "def tr : Λ' → Stmt'\n | Λ'.move p k₁ k₂ q =>\n pop' k₁ <|\n branch (fun s => s.elim true p) (goto fun _ => q)\n (push' k₂ <| goto fun _ => Λ'.move p k₁ k₂ q)\n | Λ'.push k f q =>\n branch (fun s => (f s).isSome) ((push k fun s => (f s).iget) <| goto fun _ => q)\n (goto fun _ => q)\n | Λ'.read q => goto q\n | Λ'.clear p k q =>\n pop' k <| branch (fun s => s.elim true p) (goto fun _ => q) (goto fun _ => Λ'.clear p k q)\n | Λ'.copy q =>\n pop' rev <|\n branch Option.isSome (push' main <| push' stack <| goto fun _ => Λ'.copy q) (goto fun _ => q)\n | Λ'.succ q =>\n pop' main <|\n branch (fun s => s = some Γ'.bit1) ((push rev fun _ => Γ'.bit0) <| goto fun _ => Λ'.succ q) <|\n branch (fun s => s = some Γ'.cons)\n ((push main fun _ => Γ'.cons) <| (push main fun _ => Γ'.bit1) <| goto fun _ => unrev q)\n ((push main fun _ => Γ'.bit1) <| goto fun _ => unrev q)\n | Λ'.pred q₁ q₂ =>\n pop' main <|\n branch (fun s => s = some Γ'.bit0)\n ((push rev fun _ => Γ'.bit1) <| goto fun _ => Λ'.pred q₁ q₂) <|\n branch (fun s => natEnd s.iget) (goto fun _ => q₁)\n (peek' main <|\n branch (fun s => natEnd s.iget) (goto fun _ => unrev q₂)\n ((push rev fun _ => Γ'.bit0) <| goto fun _ => unrev q₂))\n | Λ'.ret (Cont'.cons₁ fs k) =>\n goto fun _ =>\n move₂ (fun _ => false) main aux <|\n move₂ (fun s => s = Γ'.consₗ) stack main <|\n move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)\n | Λ'.ret (Cont'.cons₂ k) => goto fun _ => head stack <| Λ'.ret k\n | Λ'.ret (Cont'.comp f k) => goto fun _ => trNormal f k\n | Λ'.ret (Cont'.fix f k) =>\n pop' main <|\n goto fun s =>\n cond (natEnd s.iget) (Λ'.ret k) <| Λ'.clear natEnd main <| trNormal f (Cont'.fix f k)\n | Λ'.ret Cont'.halt => (load fun _ => none) <| halt",
"start": [
1041,
1
],
"end": [
1081,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_move",
"code": "theorem tr_move (p k₁ k₂ q) : tr (Λ'.move p k₁ k₂ q) =\n pop' k₁ (branch (fun s => s.elim true p) (goto fun _ => q)\n (push' k₂ <| goto fun _ => Λ'.move p k₁ k₂ q))",
"start": [
1087,
1
],
"end": [
1089,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_push",
"code": "theorem tr_push (k f q) : tr (Λ'.push k f q) = branch (fun s => (f s).isSome)\n ((push k fun s => (f s).iget) <| goto fun _ => q) (goto fun _ => q)",
"start": [
1091,
1
],
"end": [
1092,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_read",
"code": "theorem tr_read (q) : tr (Λ'.read q) = goto q",
"start": [
1094,
1
],
"end": [
1094,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_clear",
"code": "theorem tr_clear (p k q) : tr (Λ'.clear p k q) = pop' k (branch\n (fun s => s.elim true p) (goto fun _ => q) (goto fun _ => Λ'.clear p k q))",
"start": [
1096,
1
],
"end": [
1097,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_copy",
"code": "theorem tr_copy (q) : tr (Λ'.copy q) = pop' rev (branch Option.isSome\n (push' main <| push' stack <| goto fun _ => Λ'.copy q) (goto fun _ => q))",
"start": [
1099,
1
],
"end": [
1100,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_succ",
"code": "theorem tr_succ (q) : tr (Λ'.succ q) = pop' main (branch (fun s => s = some Γ'.bit1)\n ((push rev fun _ => Γ'.bit0) <| goto fun _ => Λ'.succ q) <|\n branch (fun s => s = some Γ'.cons)\n ((push main fun _ => Γ'.cons) <| (push main fun _ => Γ'.bit1) <| goto fun _ => unrev q)\n ((push main fun _ => Γ'.bit1) <| goto fun _ => unrev q))",
"start": [
1102,
1
],
"end": [
1106,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_pred",
"code": "theorem tr_pred (q₁ q₂) : tr (Λ'.pred q₁ q₂) = pop' main (branch (fun s => s = some Γ'.bit0)\n ((push rev fun _ => Γ'.bit1) <| goto fun _ => Λ'.pred q₁ q₂) <|\n branch (fun s => natEnd s.iget) (goto fun _ => q₁)\n (peek' main <|\n branch (fun s => natEnd s.iget) (goto fun _ => unrev q₂)\n ((push rev fun _ => Γ'.bit0) <| goto fun _ => unrev q₂)))",
"start": [
1108,
1
],
"end": [
1113,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_cons₁",
"code": "theorem tr_ret_cons₁ (fs k) : tr (Λ'.ret (Cont'.cons₁ fs k)) = goto fun _ =>\n move₂ (fun _ => false) main aux <|\n move₂ (fun s => s = Γ'.consₗ) stack main <|\n move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)",
"start": [
1115,
1
],
"end": [
1118,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_cons₂",
"code": "theorem tr_ret_cons₂ (k) : tr (Λ'.ret (Cont'.cons₂ k)) =\n goto fun _ => head stack <| Λ'.ret k",
"start": [
1120,
1
],
"end": [
1121,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_comp",
"code": "theorem tr_ret_comp (f k) : tr (Λ'.ret (Cont'.comp f k)) = goto fun _ => trNormal f k",
"start": [
1123,
1
],
"end": [
1123,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_fix",
"code": "theorem tr_ret_fix (f k) : tr (Λ'.ret (Cont'.fix f k)) = pop' main (goto fun s =>\n cond (natEnd s.iget) (Λ'.ret k) <| Λ'.clear natEnd main <| trNormal f (Cont'.fix f k))",
"start": [
1125,
1
],
"end": [
1126,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_halt",
"code": "theorem tr_ret_halt : tr (Λ'.ret Cont'.halt) = (load fun _ => none) halt",
"start": [
1128,
1
],
"end": [
1128,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trCont",
"code": "def trCont : Cont → Cont'\n | Cont.halt => Cont'.halt\n | Cont.cons₁ c _ k => Cont'.cons₁ c (trCont k)\n | Cont.cons₂ _ k => Cont'.cons₂ (trCont k)\n | Cont.comp c k => Cont'.comp c (trCont k)\n | Cont.fix c k => Cont'.fix c (trCont k)",
"start": [
1135,
1
],
"end": [
1142,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trPosNum",
"code": "def trPosNum : PosNum → List Γ'\n | PosNum.one => [Γ'.bit1]\n | PosNum.bit0 n => Γ'.bit0 :: trPosNum n\n | PosNum.bit1 n => Γ'.bit1 :: trPosNum n",
"start": [
1145,
1
],
"end": [
1157,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNum",
"code": "def trNum : Num → List Γ'\n | Num.zero => []\n | Num.pos n => trPosNum n",
"start": [
1160,
1
],
"end": [
1172,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNat",
"code": "def trNat (n : ℕ) : List Γ' :=\n trNum n",
"start": [
1175,
1
],
"end": [
1179,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNat_zero",
"code": "@[simp]\ntheorem trNat_zero : trNat 0 = []",
"start": [
1182,
1
],
"end": [
1183,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNat_default",
"code": "theorem trNat_default : trNat default = []",
"start": [
1186,
1
],
"end": [
1187,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trList",
"code": "@[simp]\ndef trList : List ℕ → List Γ'\n | [] => []\n | n::ns => trNat n ++ Γ'.cons :: trList ns",
"start": [
1190,
1
],
"end": [
1201,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trLList",
"code": "@[simp]\ndef trLList : List (List ℕ) → List Γ'\n | [] => []\n | l::ls => trList l ++ Γ'.consₗ :: trLList ls",
"start": [
1204,
1
],
"end": [
1216,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contStack",
"code": "@[simp]\ndef contStack : Cont → List (List ℕ)\n | Cont.halt => []\n | Cont.cons₁ _ ns k => ns :: contStack k\n | Cont.cons₂ ns k => ns :: contStack k\n | Cont.comp _ k => contStack k\n | Cont.fix _ k => contStack k",
"start": [
1219,
1
],
"end": [
1227,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trContStack",
"code": "def trContStack (k : Cont) :=\n trLList (contStack k)",
"start": [
1230,
1
],
"end": [
1233,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim",
"code": "def K'.elim (a b c d : List Γ') : K' → List Γ'\n | K'.main => a\n | K'.rev => b\n | K'.aux => c\n | K'.stack => d",
"start": [
1236,
1
],
"end": [
1244,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_main",
"code": "theorem K'.elim_main (a b c d) : K'.elim a b c d K'.main = a",
"start": [
1249,
1
],
"end": [
1249,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_rev",
"code": "theorem K'.elim_rev (a b c d) : K'.elim a b c d K'.rev = b",
"start": [
1251,
1
],
"end": [
1251,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_aux",
"code": "theorem K'.elim_aux (a b c d) : K'.elim a b c d K'.aux = c",
"start": [
1253,
1
],
"end": [
1253,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_stack",
"code": "theorem K'.elim_stack (a b c d) : K'.elim a b c d K'.stack = d",
"start": [
1255,
1
],
"end": [
1255,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_update_main",
"code": "@[simp]\ntheorem K'.elim_update_main {a b c d a'} : update (K'.elim a b c d) main a' = K'.elim a' b c d",
"start": [
1259,
1
],
"end": [
1261,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_update_rev",
"code": "@[simp]\ntheorem K'.elim_update_rev {a b c d b'} : update (K'.elim a b c d) rev b' = K'.elim a b' c d",
"start": [
1264,
1
],
"end": [
1266,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_update_aux",
"code": "@[simp]\ntheorem K'.elim_update_aux {a b c d c'} : update (K'.elim a b c d) aux c' = K'.elim a b c' d",
"start": [
1269,
1
],
"end": [
1271,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.K'.elim_update_stack",
"code": "@[simp]\ntheorem K'.elim_update_stack {a b c d d'} :\n update (K'.elim a b c d) stack d' = K'.elim a b c d'",
"start": [
1274,
1
],
"end": [
1276,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.halt",
"code": "def halt (v : List ℕ) : Cfg' :=\n ⟨none, none, K'.elim (trList v) [] [] []⟩",
"start": [
1279,
1
],
"end": [
1281,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.TrCfg",
"code": "def TrCfg : Cfg → Cfg' → Prop\n | Cfg.ret k v, c' =>\n ∃ s, c' = ⟨some (Λ'.ret (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩\n | Cfg.halt v, c' => c' = halt v",
"start": [
1284,
1
],
"end": [
1291,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.splitAtPred",
"code": "def splitAtPred {α} (p : α → Bool) : List α → List α × Option α × List α\n | [] => ([], none, [])\n | a :: as =>\n cond (p a) ([], some a, as) <|\n let ⟨l₁, o, l₂⟩ := splitAtPred p as\n ⟨a::l₁, o, l₂⟩",
"start": [
1294,
1
],
"end": [
1303,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.splitAtPred_eq",
"code": "theorem splitAtPred_eq {α} (p : α → Bool) :\n ∀ L l₁ o l₂,\n (∀ x ∈ l₁, p x = false) →\n Option.elim' (L = l₁ ∧ l₂ = []) (fun a => p a = true ∧ L = l₁ ++ a::l₂) o →\n splitAtPred p L = (l₁, o, l₂)",
"start": [
1306,
1
],
"end": [
1323,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.splitAtPred_false",
"code": "theorem splitAtPred_false {α} (L : List α) : splitAtPred (fun _ => false) L = (L, none, [])",
"start": [
1326,
1
],
"end": [
1327,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.move_ok",
"code": "theorem move_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁ ≠ k₂)\n (e : splitAtPred p (S k₁) = (L₁, o, L₂)) :\n Reaches₁ (TM2.step tr) ⟨some (Λ'.move p k₁ k₂ q), s, S⟩\n ⟨some q, o, update (update S k₁ L₂) k₂ (L₁.reverseAux (S k₂))⟩",
"start": [
1330,
1
],
"end": [
1361,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.unrev_ok",
"code": "theorem unrev_ok {q s} {S : K' → List Γ'} :\n Reaches₁ (TM2.step tr) ⟨some (unrev q), s, S⟩\n ⟨some q, none, update (update S rev []) main (List.reverseAux (S rev) (S main))⟩",
"start": [
1364,
1
],
"end": [
1367,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.move₂_ok",
"code": "theorem move₂_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁ ≠ rev ∧ k₂ ≠ rev ∧ k₁ ≠ k₂)\n (h₂ : S rev = []) (e : splitAtPred p (S k₁) = (L₁, o, L₂)) :\n Reaches₁ (TM2.step tr) ⟨some (move₂ p k₁ k₂ q), s, S⟩\n ⟨some q, none, update (update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂)⟩",
"start": [
1370,
1
],
"end": [
1390,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.clear_ok",
"code": "theorem clear_ok {p k q s L₁ o L₂} {S : K' → List Γ'} (e : splitAtPred p (S k) = (L₁, o, L₂)) :\n Reaches₁ (TM2.step tr) ⟨some (Λ'.clear p k q), s, S⟩ ⟨some q, o, update S k L₂⟩",
"start": [
1393,
1
],
"end": [
1417,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.copy_ok",
"code": "theorem copy_ok (q s a b c d) :\n Reaches₁ (TM2.step tr) ⟨some (Λ'.copy q), s, K'.elim a b c d⟩\n ⟨some q, none, K'.elim (List.reverseAux b a) [] c (List.reverseAux b d)⟩",
"start": [
1420,
1
],
"end": [
1430,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trPosNum_natEnd",
"code": "theorem trPosNum_natEnd : ∀ (n), ∀ x ∈ trPosNum n, natEnd x = false",
"start": [
1433,
1
],
"end": [
1438,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNum_natEnd",
"code": "theorem trNum_natEnd : ∀ (n), ∀ x ∈ trNum n, natEnd x = false",
"start": [
1441,
1
],
"end": [
1442,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNat_natEnd",
"code": "theorem trNat_natEnd (n) : ∀ x ∈ trNat n, natEnd x = false",
"start": [
1445,
1
],
"end": [
1446,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trList_ne_consₗ",
"code": "theorem trList_ne_consₗ : ∀ (l), ∀ x ∈ trList l, x ≠ Γ'.consₗ",
"start": [
1449,
1
],
"end": [
1456,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.head_main_ok",
"code": "theorem head_main_ok {q s L} {c d : List Γ'} :\n Reaches₁ (TM2.step tr) ⟨some (head main q), s, K'.elim (trList L) [] c d⟩\n ⟨some q, none, K'.elim (trList [L.headI]) [] c d⟩",
"start": [
1459,
1
],
"end": [
1473,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.head_stack_ok",
"code": "theorem head_stack_ok {q s L₁ L₂ L₃} :\n Reaches₁ (TM2.step tr)\n ⟨some (head stack q), s, K'.elim (trList L₁) [] [] (trList L₂ ++ Γ'.consₗ :: L₃)⟩\n ⟨some q, none, K'.elim (trList (L₂.headI :: L₁)) [] [] L₃⟩",
"start": [
1476,
1
],
"end": [
1507,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.succ_ok",
"code": "theorem succ_ok {q s n} {c d : List Γ'} :\n Reaches₁ (TM2.step tr) ⟨some (Λ'.succ q), s, K'.elim (trList [n]) [] c d⟩\n ⟨some q, none, K'.elim (trList [n.succ]) [] c d⟩",
"start": [
1510,
1
],
"end": [
1542,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.pred_ok",
"code": "theorem pred_ok (q₁ q₂ s v) (c d : List Γ') : ∃ s',\n Reaches₁ (TM2.step tr) ⟨some (Λ'.pred q₁ q₂), s, K'.elim (trList v) [] c d⟩\n (v.headI.rec ⟨some q₁, s', K'.elim (trList v.tail) [] c d⟩ fun n _ =>\n ⟨some q₂, s', K'.elim (trList (n::v.tail)) [] c d⟩)",
"start": [
1545,
1
],
"end": [
1588,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNormal_respects",
"code": "theorem trNormal_respects (c k v s) :\n ∃ b₂,\n TrCfg (stepNormal c k v) b₂ ∧\n Reaches₁ (TM2.step tr)\n ⟨some (trNormal c (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩ b₂",
"start": [
1591,
1
],
"end": [
1624,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_ret_respects",
"code": "theorem tr_ret_respects (k v s) : ∃ b₂,\n TrCfg (stepRet k v) b₂ ∧\n Reaches₁ (TM2.step tr)\n ⟨some (Λ'.ret (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩ b₂",
"start": [
1627,
1
],
"end": [
1681,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_respects",
"code": "theorem tr_respects : Respects step (TM2.step tr) TrCfg",
"start": [
1684,
1
],
"end": [
1686,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.init",
"code": "def init (c : Code) (v : List ℕ) : Cfg' :=\n ⟨some (trNormal c Cont'.halt), none, K'.elim (trList v) [] [] []⟩",
"start": [
1689,
1
],
"end": [
1691,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_init",
"code": "theorem tr_init (c v) :\n ∃ b, TrCfg (stepNormal c Cont.halt v) b ∧ Reaches₁ (TM2.step tr) (init c v) b",
"start": [
1694,
1
],
"end": [
1696,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_eval",
"code": "theorem tr_eval (c v) : eval (TM2.step tr) (init c v) = halt <$> Code.eval c v",
"start": [
1699,
1
],
"end": [
1713,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trStmts₁",
"code": "def trStmts₁ : Λ' → Finset Λ'\n | Q@(Λ'.move _ _ _ q) => insert Q <| trStmts₁ q\n | Q@(Λ'.push _ _ q) => insert Q <| trStmts₁ q\n | Q@(Λ'.read q) => insert Q <| Finset.univ.biUnion fun s => trStmts₁ (q s)\n | Q@(Λ'.clear _ _ q) => insert Q <| trStmts₁ q\n | Q@(Λ'.copy q) => insert Q <| trStmts₁ q\n | Q@(Λ'.succ q) => insert Q <| insert (unrev q) <| trStmts₁ q\n | Q@(Λ'.pred q₁ q₂) => insert Q <| trStmts₁ q₁ ∪ insert (unrev q₂) (trStmts₁ q₂)\n | Q@(Λ'.ret _) => {Q}",
"start": [
1716,
1
],
"end": [
1725,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trStmts₁_trans",
"code": "theorem trStmts₁_trans {q q'} : q' ∈ trStmts₁ q → trStmts₁ q' ⊆ trStmts₁ q",
"start": [
1728,
1
],
"end": [
1746,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trStmts₁_self",
"code": "theorem trStmts₁_self (q) : q ∈ trStmts₁ q",
"start": [
1749,
1
],
"end": [
1750,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp'",
"code": "def codeSupp' : Code → Cont' → Finset Λ'\n | [email protected]', k => trStmts₁ (trNormal c k)\n | [email protected], k => trStmts₁ (trNormal c k)\n | [email protected], k => trStmts₁ (trNormal c k)\n | c@(Code.cons f fs), k =>\n trStmts₁ (trNormal c k) ∪\n (codeSupp' f (Cont'.cons₁ fs k) ∪\n (trStmts₁\n (move₂ (fun _ => false) main aux <|\n move₂ (fun s => s = Γ'.consₗ) stack main <|\n move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)) ∪\n (codeSupp' fs (Cont'.cons₂ k) ∪ trStmts₁ (head stack <| Λ'.ret k))))\n | c@(Code.comp f g), k =>\n trStmts₁ (trNormal c k) ∪\n (codeSupp' g (Cont'.comp f k) ∪ (trStmts₁ (trNormal f k) ∪ codeSupp' f k))\n | c@(Code.case f g), k => trStmts₁ (trNormal c k) ∪ (codeSupp' f k ∪ codeSupp' g k)\n | c@(Code.fix f), k =>\n trStmts₁ (trNormal c k) ∪\n (codeSupp' f (Cont'.fix f k) ∪\n (trStmts₁ (Λ'.clear natEnd main <| trNormal f (Cont'.fix f k)) ∪ {Λ'.ret k}))",
"start": [
1753,
1
],
"end": [
1775,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp'_self",
"code": "@[simp]\ntheorem codeSupp'_self (c k) : trStmts₁ (trNormal c k) ⊆ codeSupp' c k",
"start": [
1778,
1
],
"end": [
1780,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp",
"code": "def contSupp : Cont' → Finset Λ'\n | Cont'.cons₁ fs k =>\n trStmts₁\n (move₂ (fun _ => false) main aux <|\n move₂ (fun s => s = Γ'.consₗ) stack main <|\n move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)) ∪\n (codeSupp' fs (Cont'.cons₂ k) ∪ (trStmts₁ (head stack <| Λ'.ret k) ∪ contSupp k))\n | Cont'.cons₂ k => trStmts₁ (head stack <| Λ'.ret k) ∪ contSupp k\n | Cont'.comp f k => codeSupp' f k ∪ contSupp k\n | Cont'.fix f k => codeSupp' (Code.fix f) k ∪ contSupp k\n | Cont'.halt => ∅",
"start": [
1783,
1
],
"end": [
1795,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp",
"code": "def codeSupp (c : Code) (k : Cont') : Finset Λ' :=\n codeSupp' c k ∪ contSupp k",
"start": [
1798,
1
],
"end": [
1803,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_self",
"code": "@[simp]\ntheorem codeSupp_self (c k) : trStmts₁ (trNormal c k) ⊆ codeSupp c k",
"start": [
1806,
1
],
"end": [
1808,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_zero",
"code": "@[simp]\ntheorem codeSupp_zero (k) : codeSupp Code.zero' k = trStmts₁ (trNormal Code.zero' k) ∪ contSupp k",
"start": [
1811,
1
],
"end": [
1813,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_succ",
"code": "@[simp]\ntheorem codeSupp_succ (k) : codeSupp Code.succ k = trStmts₁ (trNormal Code.succ k) ∪ contSupp k",
"start": [
1816,
1
],
"end": [
1818,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_tail",
"code": "@[simp]\ntheorem codeSupp_tail (k) : codeSupp Code.tail k = trStmts₁ (trNormal Code.tail k) ∪ contSupp k",
"start": [
1821,
1
],
"end": [
1823,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_cons",
"code": "@[simp]\ntheorem codeSupp_cons (f fs k) :\n codeSupp (Code.cons f fs) k =\n trStmts₁ (trNormal (Code.cons f fs) k) ∪ codeSupp f (Cont'.cons₁ fs k)",
"start": [
1826,
1
],
"end": [
1830,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_comp",
"code": "@[simp]\ntheorem codeSupp_comp (f g k) :\n codeSupp (Code.comp f g) k =\n trStmts₁ (trNormal (Code.comp f g) k) ∪ codeSupp g (Cont'.comp f k)",
"start": [
1833,
1
],
"end": [
1839,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_case",
"code": "@[simp]\ntheorem codeSupp_case (f g k) :\n codeSupp (Code.case f g) k =\n trStmts₁ (trNormal (Code.case f g) k) ∪ (codeSupp f k ∪ codeSupp g k)",
"start": [
1842,
1
],
"end": [
1846,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_fix",
"code": "@[simp]\ntheorem codeSupp_fix (f k) :\n codeSupp (Code.fix f) k = trStmts₁ (trNormal (Code.fix f) k) ∪ codeSupp f (Cont'.fix f k)",
"start": [
1849,
1
],
"end": [
1853,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_cons₁",
"code": "@[simp]\ntheorem contSupp_cons₁ (fs k) :\n contSupp (Cont'.cons₁ fs k) =\n trStmts₁\n (move₂ (fun _ => false) main aux <|\n move₂ (fun s => s = Γ'.consₗ) stack main <|\n move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)) ∪\n codeSupp fs (Cont'.cons₂ k)",
"start": [
1856,
1
],
"end": [
1864,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_cons₂",
"code": "@[simp]\ntheorem contSupp_cons₂ (k) :\n contSupp (Cont'.cons₂ k) = trStmts₁ (head stack <| Λ'.ret k) ∪ contSupp k",
"start": [
1867,
1
],
"end": [
1870,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_comp",
"code": "@[simp]\ntheorem contSupp_comp (f k) : contSupp (Cont'.comp f k) = codeSupp f k",
"start": [
1873,
1
],
"end": [
1875,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_fix",
"code": "theorem contSupp_fix (f k) : contSupp (Cont'.fix f k) = codeSupp f (Cont'.fix f k)",
"start": [
1878,
1
],
"end": [
1880,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_halt",
"code": "@[simp]\ntheorem contSupp_halt : contSupp Cont'.halt = ∅",
"start": [
1883,
1
],
"end": [
1885,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Λ'.Supports",
"code": "def Λ'.Supports (S : Finset Λ') : Λ' → Prop\n | Λ'.move _ _ _ q => Λ'.Supports S q\n | Λ'.push _ _ q => Λ'.Supports S q\n | Λ'.read q => ∀ s, Λ'.Supports S (q s)\n | Λ'.clear _ _ q => Λ'.Supports S q\n | Λ'.copy q => Λ'.Supports S q\n | Λ'.succ q => Λ'.Supports S q\n | Λ'.pred q₁ q₂ => Λ'.Supports S q₁ ∧ Λ'.Supports S q₂\n | Λ'.ret k => contSupp k ⊆ S",
"start": [
1888,
1
],
"end": [
1899,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.Supports",
"code": "def Supports (K S : Finset Λ') :=\n ∀ q ∈ K, TM2.SupportsStmt S (tr q)",
"start": [
1902,
1
],
"end": [
1909,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.supports_insert",
"code": "theorem supports_insert {K S q} :\n Supports (insert q K) S ↔ TM2.SupportsStmt S (tr q) ∧ Supports K S",
"start": [
1912,
1
],
"end": [
1913,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.supports_singleton",
"code": "theorem supports_singleton {S q} : Supports {q} S ↔ TM2.SupportsStmt S (tr q)",
"start": [
1916,
1
],
"end": [
1916,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.supports_union",
"code": "theorem supports_union {K₁ K₂ S} : Supports (K₁ ∪ K₂) S ↔ Supports K₁ S ∧ Supports K₂ S",
"start": [
1919,
1
],
"end": [
1920,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.supports_biUnion",
"code": "theorem supports_biUnion {K : Option Γ' → Finset Λ'} {S} :\n Supports (Finset.univ.biUnion K) S ↔ ∀ a, Supports (K a) S",
"start": [
1923,
1
],
"end": [
1925,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.head_supports",
"code": "theorem head_supports {S k q} (H : (q : Λ').Supports S) : (head k q).Supports S",
"start": [
1928,
1
],
"end": [
1929,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.ret_supports",
"code": "theorem ret_supports {S k} (H₁ : contSupp k ⊆ S) : TM2.SupportsStmt S (tr (Λ'.ret k))",
"start": [
1932,
1
],
"end": [
1944,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trStmts₁_supports",
"code": "theorem trStmts₁_supports {S q} (H₁ : (q : Λ').Supports S) (HS₁ : trStmts₁ q ⊆ S) :\n Supports (trStmts₁ q) S",
"start": [
1947,
1
],
"end": [
1970,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trStmts₁_supports'",
"code": "theorem trStmts₁_supports' {S q K} (H₁ : (q : Λ').Supports S) (H₂ : trStmts₁ q ∪ K ⊆ S)\n (H₃ : K ⊆ S → Supports K S) : Supports (trStmts₁ q ∪ K) S",
"start": [
1973,
1
],
"end": [
1976,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.trNormal_supports",
"code": "theorem trNormal_supports {S c k} (Hk : codeSupp c k ⊆ S) : (trNormal c k).Supports S",
"start": [
1979,
1
],
"end": [
1992,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp'_supports",
"code": "theorem codeSupp'_supports {S c k} (H : codeSupp c k ⊆ S) : Supports (codeSupp' c k) S",
"start": [
1995,
1
],
"end": [
2031,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.contSupp_supports",
"code": "theorem contSupp_supports {S k} (H : contSupp k ⊆ S) : Supports (contSupp k) S",
"start": [
2034,
1
],
"end": [
2051,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.codeSupp_supports",
"code": "theorem codeSupp_supports {S c k} (H : codeSupp c k ⊆ S) : Supports (codeSupp c k) S",
"start": [
2054,
1
],
"end": [
2055,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "Turing.PartrecToTM2.tr_supports",
"code": "theorem tr_supports (c k) : @TM2.Supports _ _ _ _ ⟨trNormal c k⟩ tr (codeSupp c k)",
"start": [
2058,
1
],
"end": [
2064,
93
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Tropical/Lattice.lean | [
"Mathlib/Order/ConditionallyCompleteLattice/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Tropical/Basic.lean"
] | [
{
"full_name": "instSupTropical",
"code": "instance instSupTropical [Sup R] : Sup (Tropical R) where\n sup x y := trop (untrop x ⊔ untrop y)",
"start": [
34,
1
],
"end": [
35,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "instInfTropical",
"code": "instance instInfTropical [Inf R] : Inf (Tropical R) where\n inf x y := trop (untrop x ⊓ untrop y)",
"start": [
37,
1
],
"end": [
38,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "instSemilatticeInfTropical",
"code": "instance instSemilatticeInfTropical [SemilatticeInf R] : SemilatticeInf (Tropical R) :=\n { instInfTropical,\n Tropical.instPartialOrderTropical with\n le_inf := fun _ _ _ ↦ @SemilatticeInf.le_inf R _ _ _ _\n inf_le_left := fun _ _ ↦ inf_le_left\n inf_le_right := fun _ _ ↦ inf_le_right }",
"start": [
40,
1
],
"end": [
45,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "instSemilatticeSupTropical",
"code": "instance instSemilatticeSupTropical [SemilatticeSup R] : SemilatticeSup (Tropical R) :=\n { instSupTropical,\n Tropical.instPartialOrderTropical with\n sup_le := fun _ _ _ ↦ @SemilatticeSup.sup_le R _ _ _ _\n le_sup_left := fun _ _ ↦ le_sup_left\n le_sup_right := fun _ _ ↦ le_sup_right }",
"start": [
47,
1
],
"end": [
52,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "instLatticeTropical",
"code": "instance instLatticeTropical [Lattice R] : Lattice (Tropical R) :=\n { instSemilatticeInfTropical, instSemilatticeSupTropical with }",
"start": [
54,
1
],
"end": [
55,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "instConditionallyCompleteLatticeTropical",
"code": "instance instConditionallyCompleteLatticeTropical [ConditionallyCompleteLattice R] :\n ConditionallyCompleteLattice (Tropical R) :=\n { @instInfTropical R _, @instSupTropical R _,\n instLatticeTropical with\n le_csSup := fun _s _x hs hx ↦\n le_csSup (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)\n csSup_le := fun _s _x hs hx ↦\n csSup_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)\n le_csInf := fun _s _x hs hx ↦\n le_csInf (hs.image untrop) (untrop_monotone.mem_lowerBounds_image hx)\n csInf_le := fun _s _x hs hx ↦\n csInf_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }",
"start": [
61,
1
],
"end": [
72,
84
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Rbtree/Insert.lean | [
"Mathlib/Mathport/Rename.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [] |
Mathlib/CategoryTheory/Sites/IsSheafOneHypercover.lean | [
"Mathlib/CategoryTheory/Sites/OneHypercover.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily",
"code": "abbrev OneHypercoverFamily := ∀ ⦃X : C⦄, OneHypercover.{w} J X → Prop",
"start": [
46,
1
],
"end": [
48,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsGenerating",
"code": "class IsGenerating : Prop where\n le {X : C} (S : Sieve X) (hS : S ∈ J X) :\n ∃ (E : J.OneHypercover X) (_ : H E), E.sieve₀ ≤ S",
"start": [
55,
1
],
"end": [
60,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.exists_oneHypercover",
"code": "lemma exists_oneHypercover {X : C} (S : Sieve X) (hS : S ∈ J X) :\n ∃ (E : J.OneHypercover X) (_ : H E), E.sieve₀ ≤ S :=\n IsGenerating.le _ hS",
"start": [
64,
1
],
"end": [
66,
23
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsSheafIff.hom_ext",
"code": "lemma hom_ext {X : C} (S : Sieve X) (hS : S ∈ J X) {T : A}\n {x y : T ⟶ P.obj (Opposite.op X)}\n (h : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (_ : S f), x ≫ P.map f.op = y ≫ P.map f.op) :\n x = y := by\n obtain ⟨E, hE, le⟩ := H.exists_oneHypercover S hS\n exact Multifork.IsLimit.hom_ext (hP E hE).some (fun j => h _ (le _ (Sieve.ofArrows_mk _ _ _)))",
"start": [
74,
1
],
"end": [
79,
97
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsSheafIff.lift",
"code": "noncomputable def lift : F.pt ⟶ P.obj (Opposite.op X) :=\n Multifork.IsLimit.lift (hP E hE).some\n (fun i => F.ι ⟨_, E.f i, le _ (Sieve.ofArrows_mk _ _ _)⟩)\n (fun ⟨⟨i₁, i₂⟩, j⟩ =>\n F.condition (Cover.Relation.mk { hf := le _ (Sieve.ofArrows_mk _ _ i₁) }\n { hf := le _ (Sieve.ofArrows_mk _ _ i₂) } { w := E.w j} ))",
"start": [
88,
1
],
"end": [
94,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsSheafIff.fac'",
"code": "@[reassoc]\nlemma fac' (i : E.I₀) :\n lift hP hE le F ≫ P.map (E.f i).op =\n F.ι ⟨_, E.f i, le _ (Sieve.ofArrows_mk _ _ _)⟩ :=\n Multifork.IsLimit.fac (hP E hE).some _ _ i",
"start": [
96,
1
],
"end": [
100,
45
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsSheafIff.fac",
"code": "lemma fac {Y : C} (f : Y ⟶ X) (hf : S f) :\n lift hP hE le F ≫ P.map f.op = F.ι ⟨Y, f, hf⟩ := by\n apply hom_ext H P hP _ (J.pullback_stable f E.mem₀)\n intro Z g\n rintro ⟨T, a, b, hb, fac⟩\n cases' hb with i\n rw [assoc, ← P.map_comp, ← op_comp, ← fac,\n op_comp, P.map_comp, fac'_assoc]\n exact F.condition (Cover.Relation.mk { hf := le _ (Sieve.ofArrows_mk _ _ _) }\n { hf := hf } { w := fac })",
"start": [
102,
1
],
"end": [
111,
31
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.IsSheafIff.isLimit",
"code": "noncomputable def isLimit :\n IsLimit (Cover.multifork ⟨S, J.superset_covering le E.mem₀⟩ P) :=\n Multifork.IsLimit.mk _\n (fun F => lift hP hE le F)\n (fun F => by\n rintro ⟨Y, f, hf⟩\n apply fac)\n (fun F m hm => by\n apply hom_ext H P hP S (J.superset_covering le E.mem₀)\n intro Y f hf\n rw [fac _ _ _ _ _ hf]\n exact hm ⟨_, _, hf⟩)",
"start": [
115,
1
],
"end": [
127,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.OneHypercoverFamily.isSheaf_iff",
"code": "lemma isSheaf_iff :\n Presheaf.IsSheaf J P ↔ ∀ ⦃X : C⦄ (E : J.OneHypercover X)\n (_ : H E), Nonempty (IsLimit (E.multifork P)) := by\n constructor\n · intro hP X E _\n exact ⟨E.isLimitMultifork ⟨_, hP⟩⟩\n · intro hP\n rw [Presheaf.isSheaf_iff_multifork]\n rintro X ⟨S, hS⟩\n obtain ⟨E, hE, le⟩ := H.exists_oneHypercover S hS\n exact ⟨IsSheafIff.isLimit hP hE le⟩",
"start": [
131,
1
],
"end": [
141,
40
],
"kind": "lemma"
},
{
"full_name": "CategoryTheory.GrothendieckTopology.IsGeneratedByOneHypercovers",
"code": "abbrev IsGeneratedByOneHypercovers : Prop :=\n OneHypercoverFamily.IsGenerating.{w} (J := J) ⊤",
"start": [
145,
1
],
"end": [
147,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Presheaf.isSheaf_iff_of_isGeneratedByOneHypercovers",
"code": "lemma isSheaf_iff_of_isGeneratedByOneHypercovers\n [GrothendieckTopology.IsGeneratedByOneHypercovers.{w} J] (P : Cᵒᵖ ⥤ A) :\n IsSheaf J P ↔ ∀ ⦃X : C⦄ (E : GrothendieckTopology.OneHypercover.{w} J X),\n Nonempty (IsLimit (E.multifork P)) := by\n simpa using GrothendieckTopology.OneHypercoverFamily.isSheaf_iff.{w} ⊤ P",
"start": [
156,
1
],
"end": [
160,
75
],
"kind": "lemma"
}
] |
Mathlib/Probability/Distributions/Uniform.lean | [
"Mathlib/Probability/ProbabilityMassFunction/Constructions.lean",
"Mathlib/Probability/Density.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Probability/Notation.lean",
"Mathlib/Probability/ConditionalProbability.lean"
] | [
{
"full_name": "MeasureTheory.pdf.IsUniform",
"code": "def IsUniform (X : Ω → E) (s : Set E) (ℙ : Measure Ω) (μ : Measure E := by volume_tac) :=\n map X ℙ = ProbabilityTheory.cond μ s",
"start": [
58,
1
],
"end": [
61,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.aemeasurable",
"code": "theorem aemeasurable {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)\n (hu : IsUniform X s ℙ μ) : AEMeasurable X ℙ",
"start": [
66,
1
],
"end": [
75,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.absolutelyContinuous",
"code": "theorem absolutelyContinuous {X : Ω → E} {s : Set E} (hu : IsUniform X s ℙ μ) : map X ℙ ≪ μ",
"start": [
77,
1
],
"end": [
78,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.measure_preimage",
"code": "theorem measure_preimage {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)\n (hu : IsUniform X s ℙ μ) {A : Set E} (hA : MeasurableSet A) :\n ℙ (X ⁻¹' A) = μ (s ∩ A) / μ s",
"start": [
80,
1
],
"end": [
84,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.isProbabilityMeasure",
"code": "theorem isProbabilityMeasure {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)\n (hu : IsUniform X s ℙ μ) : IsProbabilityMeasure ℙ",
"start": [
87,
1
],
"end": [
92,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.toMeasurable_iff",
"code": "theorem toMeasurable_iff {X : Ω → E} {s : Set E} :\n IsUniform X (toMeasurable μ s) ℙ μ ↔ IsUniform X s ℙ μ",
"start": [
95,
1
],
"end": [
98,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.toMeasurable",
"code": "protected theorem toMeasurable {X : Ω → E} {s : Set E} (hu : IsUniform X s ℙ μ) :\n IsUniform X (toMeasurable μ s) ℙ μ",
"start": [
100,
1
],
"end": [
103,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.hasPDF",
"code": "theorem hasPDF {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)\n (hu : IsUniform X s ℙ μ) : HasPDF X ℙ μ",
"start": [
105,
1
],
"end": [
111,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.pdf_eq_zero_of_measure_eq_zero_or_top",
"code": "theorem pdf_eq_zero_of_measure_eq_zero_or_top {X : Ω → E} {s : Set E}\n (hu : IsUniform X s ℙ μ) (hμs : μ s = 0 ∨ μ s = ∞) : pdf X ℙ μ =ᵐ[μ] 0",
"start": [
114,
1
],
"end": [
121,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.pdf_eq",
"code": "theorem pdf_eq {X : Ω → E} {s : Set E} (hms : MeasurableSet s)\n (hu : IsUniform X s ℙ μ) : pdf X ℙ μ =ᵐ[μ] s.indicator ((μ s)⁻¹ • (1 : E → ℝ≥0∞))",
"start": [
123,
1
],
"end": [
136,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.pdf_toReal_ae_eq",
"code": "theorem pdf_toReal_ae_eq {X : Ω → E} {s : Set E} (hms : MeasurableSet s)\n (hX : IsUniform X s ℙ μ) :\n (fun x => (pdf X ℙ μ x).toReal) =ᵐ[μ] fun x =>\n (s.indicator ((μ s)⁻¹ • (1 : E → ℝ≥0∞)) x).toReal",
"start": [
138,
1
],
"end": [
142,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.mul_pdf_integrable",
"code": "theorem mul_pdf_integrable (hcs : IsCompact s) (huX : IsUniform X s ℙ) :\n Integrable fun x : ℝ => x * (pdf X ℙ volume x).toReal",
"start": [
147,
1
],
"end": [
167,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.integral_eq",
"code": "theorem integral_eq (huX : IsUniform X s ℙ) :\n ∫ x, X x ∂ℙ = (volume s)⁻¹.toReal * ∫ x in s, x",
"start": [
170,
1
],
"end": [
180,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.IsUniform.cond",
"code": "lemma IsUniform.cond {s : Set E} :\n IsUniform (id : E → E) s (ProbabilityTheory.cond μ s) μ := by\n unfold IsUniform\n rw [Measure.map_id]",
"start": [
187,
1
],
"end": [
190,
22
],
"kind": "lemma"
},
{
"full_name": "MeasureTheory.pdf.uniformPDF",
"code": "def uniformPDF (s : Set E) (x : E) (μ : Measure E := by volume_tac) : ℝ≥0∞ :=\n s.indicator ((μ s)⁻¹ • (1 : E → ℝ≥0∞)) x",
"start": [
192,
1
],
"end": [
195,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "MeasureTheory.pdf.uniformPDF_eq_pdf",
"code": "lemma uniformPDF_eq_pdf {s : Set E} (hs : MeasurableSet s) (hu : pdf.IsUniform X s ℙ μ) :\n (fun x ↦ uniformPDF s x μ) =ᵐ[μ] pdf X ℙ μ := by\n unfold uniformPDF\n exact Filter.EventuallyEq.trans (pdf.IsUniform.pdf_eq hs hu).symm (ae_eq_refl _)",
"start": [
197,
1
],
"end": [
201,
83
],
"kind": "lemma"
},
{
"full_name": "MeasureTheory.pdf.uniformPDF_ite",
"code": "lemma uniformPDF_ite {s : Set E} {x : E} :\n uniformPDF s x μ = if x ∈ s then (μ s)⁻¹ else 0 := by\n unfold uniformPDF\n unfold Set.indicator\n simp only [Pi.smul_apply, Pi.one_apply, smul_eq_mul, mul_one]",
"start": [
203,
1
],
"end": [
208,
64
],
"kind": "lemma"
},
{
"full_name": "PMF.uniformOfFinset",
"code": "def uniformOfFinset (s : Finset α) (hs : s.Nonempty) : PMF α := by\n refine ofFinset (fun a => if a ∈ s then s.card⁻¹ else 0) s ?_ ?_\n · simp only [Finset.sum_ite_mem, Finset.inter_self, Finset.sum_const, nsmul_eq_mul]\n have : (s.card : ℝ≥0∞) ≠ 0 := by\n simpa only [Ne, Nat.cast_eq_zero, Finset.card_eq_zero] using\n Finset.nonempty_iff_ne_empty.1 hs\n exact ENNReal.mul_inv_cancel this <| ENNReal.natCast_ne_top s.card\n · exact fun x hx => by simp only [hx, if_false]",
"start": [
224,
1
],
"end": [
232,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.uniformOfFinset_apply",
"code": "@[simp]\ntheorem uniformOfFinset_apply (a : α) :\n uniformOfFinset s hs a = if a ∈ s then (s.card : ℝ≥0∞)⁻¹ else 0",
"start": [
237,
1
],
"end": [
240,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.uniformOfFinset_apply_of_mem",
"code": "theorem uniformOfFinset_apply_of_mem (ha : a ∈ s) : uniformOfFinset s hs a = (s.card : ℝ≥0∞)⁻¹",
"start": [
243,
1
],
"end": [
244,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.uniformOfFinset_apply_of_not_mem",
"code": "theorem uniformOfFinset_apply_of_not_mem (ha : a ∉ s) : uniformOfFinset s hs a = 0",
"start": [
247,
1
],
"end": [
247,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.support_uniformOfFinset",
"code": "@[simp]\ntheorem support_uniformOfFinset : (uniformOfFinset s hs).support = s",
"start": [
250,
1
],
"end": [
255,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.mem_support_uniformOfFinset_iff",
"code": "theorem mem_support_uniformOfFinset_iff (a : α) : a ∈ (uniformOfFinset s hs).support ↔ a ∈ s",
"start": [
258,
1
],
"end": [
259,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toOuterMeasure_uniformOfFinset_apply",
"code": "@[simp]\ntheorem toOuterMeasure_uniformOfFinset_apply :\n (uniformOfFinset s hs).toOuterMeasure t = (s.filter (· ∈ t)).card / s.card",
"start": [
266,
1
],
"end": [
281,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toMeasure_uniformOfFinset_apply",
"code": "@[simp]\ntheorem toMeasure_uniformOfFinset_apply [MeasurableSpace α] (ht : MeasurableSet t) :\n (uniformOfFinset s hs).toMeasure t = (s.filter (· ∈ t)).card / s.card",
"start": [
285,
1
],
"end": [
288,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.uniformOfFintype",
"code": "def uniformOfFintype (α : Type*) [Fintype α] [Nonempty α] : PMF α :=\n uniformOfFinset Finset.univ Finset.univ_nonempty",
"start": [
297,
1
],
"end": [
299,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.uniformOfFintype_apply",
"code": "@[simp]\ntheorem uniformOfFintype_apply (a : α) : uniformOfFintype α a = (Fintype.card α : ℝ≥0∞)⁻¹",
"start": [
304,
1
],
"end": [
306,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.support_uniformOfFintype",
"code": "@[simp]\ntheorem support_uniformOfFintype (α : Type*) [Fintype α] [Nonempty α] :\n (uniformOfFintype α).support = ⊤",
"start": [
309,
1
],
"end": [
312,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.mem_support_uniformOfFintype",
"code": "theorem mem_support_uniformOfFintype (a : α) : a ∈ (uniformOfFintype α).support",
"start": [
315,
1
],
"end": [
315,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toOuterMeasure_uniformOfFintype_apply",
"code": "theorem toOuterMeasure_uniformOfFintype_apply :\n (uniformOfFintype α).toOuterMeasure s = Fintype.card s / Fintype.card α",
"start": [
322,
1
],
"end": [
325,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toMeasure_uniformOfFintype_apply",
"code": "theorem toMeasure_uniformOfFintype_apply [MeasurableSpace α] (hs : MeasurableSet s) :\n (uniformOfFintype α).toMeasure s = Fintype.card s / Fintype.card α",
"start": [
328,
1
],
"end": [
330,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.ofMultiset",
"code": "def ofMultiset (s : Multiset α) (hs : s ≠ 0) : PMF α :=\n ⟨fun a => s.count a / (Multiset.card s),\n ENNReal.summable.hasSum_iff.2\n (calc\n (∑' b : α, (s.count b : ℝ≥0∞) / (Multiset.card s))\n = (Multiset.card s : ℝ≥0∞)⁻¹ * ∑' b, (s.count b : ℝ≥0∞) := by\n simp_rw [ENNReal.div_eq_inv_mul, ENNReal.tsum_mul_left]\n _ = (Multiset.card s : ℝ≥0∞)⁻¹ * ∑ b ∈ s.toFinset, (s.count b : ℝ≥0∞) :=\n (congr_arg (fun x => (Multiset.card s : ℝ≥0∞)⁻¹ * x)\n (tsum_eq_sum fun a ha =>\n Nat.cast_eq_zero.2 <| by rwa [Multiset.count_eq_zero, ← Multiset.mem_toFinset]))\n _ = 1 := by\n rw [← Nat.cast_sum, Multiset.toFinset_sum_count_eq s,\n ENNReal.inv_mul_cancel (Nat.cast_ne_zero.2 (hs ∘ Multiset.card_eq_zero.1))\n (ENNReal.natCast_ne_top _)]\n )⟩",
"start": [
339,
1
],
"end": [
356,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.ofMultiset_apply",
"code": "@[simp]\ntheorem ofMultiset_apply (a : α) : ofMultiset s hs a = s.count a / (Multiset.card s)",
"start": [
361,
1
],
"end": [
363,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.support_ofMultiset",
"code": "@[simp]\ntheorem support_ofMultiset : (ofMultiset s hs).support = s.toFinset",
"start": [
366,
1
],
"end": [
368,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.mem_support_ofMultiset_iff",
"code": "theorem mem_support_ofMultiset_iff (a : α) : a ∈ (ofMultiset s hs).support ↔ a ∈ s.toFinset",
"start": [
371,
1
],
"end": [
372,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.ofMultiset_apply_of_not_mem",
"code": "theorem ofMultiset_apply_of_not_mem {a : α} (ha : a ∉ s) : ofMultiset s hs a = 0",
"start": [
375,
1
],
"end": [
377,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toOuterMeasure_ofMultiset_apply",
"code": "@[simp]\ntheorem toOuterMeasure_ofMultiset_apply :\n (ofMultiset s hs).toOuterMeasure t =\n (∑' x, (s.filter (· ∈ t)).count x : ℝ≥0∞) / (Multiset.card s)",
"start": [
384,
1
],
"end": [
390,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "PMF.toMeasure_ofMultiset_apply",
"code": "@[simp]\ntheorem toMeasure_ofMultiset_apply [MeasurableSpace α] (ht : MeasurableSet t) :\n (ofMultiset s hs).toMeasure t = (∑' x, (s.filter (· ∈ t)).count x : ℝ≥0∞) / (Multiset.card s)",
"start": [
393,
1
],
"end": [
396,
96
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Category/MonCat/Adjunctions.lean | [
"Mathlib/Algebra/FreeMonoid/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Category/Semigrp/Basic.lean",
"Mathlib/Algebra/Category/MonCat/Basic.lean",
"Mathlib/Algebra/Group/WithOne/Basic.lean"
] | [
{
"full_name": "MonCat.adjoinOne",
"code": "@[to_additive (attr := simps) \"The functor of adjoining a neutral element `zero` to a semigroup\"]\ndef adjoinOne : Semigrp.{u} ⥤ MonCat.{u} where\n obj S := MonCat.of (WithOne S)\n map := WithOne.map\n map_id _ := WithOne.map_id\n map_comp := WithOne.map_comp",
"start": [
32,
1
],
"end": [
39,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "MonCat.hasForgetToSemigroup",
"code": "@[to_additive]\ninstance hasForgetToSemigroup : HasForget₂ MonCat Semigrp where\n forget₂ :=\n { obj := fun M => Semigrp.of M\n map := MonoidHom.toMulHom }",
"start": [
43,
1
],
"end": [
47,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "MonCat.adjoinOneAdj",
"code": "@[to_additive \"The `adjoinZero`-forgetful adjunction from `AddSemigrp` to `AddMonCat`\"]\ndef adjoinOneAdj : adjoinOne ⊣ forget₂ MonCat.{u} Semigrp.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun S M => WithOne.lift.symm\n homEquiv_naturality_left_symm := by\n intro S T M f g\n ext x\n simp only [Equiv.symm_symm, adjoinOne_map, coe_comp]\n simp_rw [WithOne.map]\n cases x\n · rfl\n · simp\n rfl }",
"start": [
53,
1
],
"end": [
66,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "MonCat.free",
"code": "def free : Type u ⥤ MonCat.{u} where\n obj α := MonCat.of (FreeMonoid α)\n map := FreeMonoid.map\n map_id _ := FreeMonoid.hom_eq (fun _ => rfl)\n map_comp _ _ := FreeMonoid.hom_eq (fun _ => rfl)",
"start": [
70,
1
],
"end": [
75,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "MonCat.adj",
"code": "def adj : free ⊣ forget MonCat.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun X G => FreeMonoid.lift.symm\n homEquiv_naturality_left_symm := fun _ _ => FreeMonoid.hom_eq (fun _ => rfl) }",
"start": [
78,
1
],
"end": [
82,
85
],
"kind": "commanddeclaration"
}
] |
Mathlib/Topology/Algebra/ProperConstSMul.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Topology/Algebra/ConstMulAction.lean",
"Mathlib/Topology/ProperMap.lean"
] | [
{
"full_name": "ProperConstVAdd",
"code": "class ProperConstVAdd (M X : Type*) [VAdd M X] [TopologicalSpace X] : Prop where\n \n isProperMap_vadd (c : M) : IsProperMap ((c +ᵥ ·) : X → X)",
"start": [
24,
1
],
"end": [
29,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperConstSMul",
"code": "@[to_additive]\nclass ProperConstSMul (M X : Type*) [SMul M X] [TopologicalSpace X] : Prop where\n \n isProperMap_smul (c : M) : IsProperMap ((c • ·) : X → X)",
"start": [
31,
1
],
"end": [
37,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "isProperMap_smul",
"code": "@[to_additive \"`(c +ᵥ ·)` is a proper map.\"]\ntheorem isProperMap_smul {M : Type*} (c : M) (X : Type*) [SMul M X] [TopologicalSpace X]\n [h : ProperConstSMul M X] : IsProperMap ((c • ·) : X → X)",
"start": [
39,
1
],
"end": [
42,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "IsCompact.preimage_smul",
"code": "@[to_additive \"The preimage of a compact set under `(c +ᵥ ·)` is a compact set.\"]\ntheorem IsCompact.preimage_smul {M X : Type*} [SMul M X] [TopologicalSpace X]\n [ProperConstSMul M X] {s : Set X} (hs : IsCompact s) (c : M) : IsCompact ((c • ·) ⁻¹' s)",
"start": [
44,
1
],
"end": [
48,
47
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Nat/Factorization/Root.lean | [
"Mathlib/Algebra/Order/Floor/Div.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/Nat/Factorization/Basic.lean"
] | [
{
"full_name": "Nat.floorRoot",
"code": "def floorRoot (n a : ℕ) : ℕ :=\n if n = 0 ∨ a = 0 then 0 else a.factorization.prod fun p k ↦ p ^ (k / n)",
"start": [
36,
1
],
"end": [
50,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.floorRoot_def",
"code": "lemma floorRoot_def :\n floorRoot n a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌊/⌋ n).prod (· ^ ·) := by\n unfold floorRoot; split_ifs with h <;> simp [Finsupp.floorDiv_def, prod_mapRange_index pow_zero]",
"start": [
52,
1
],
"end": [
56,
99
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_zero_left",
"code": "@[simp] lemma floorRoot_zero_left (a : ℕ) : floorRoot 0 a = 0 := by simp [floorRoot]",
"start": [
58,
1
],
"end": [
58,
85
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_zero_right",
"code": "@[simp] lemma floorRoot_zero_right (n : ℕ) : floorRoot n 0 = 0 := by simp [floorRoot]",
"start": [
59,
1
],
"end": [
59,
86
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_one_left",
"code": "@[simp] lemma floorRoot_one_left (a : ℕ) : floorRoot 1 a = a := by\n simp [floorRoot]; split_ifs <;> simp [*]",
"start": [
60,
1
],
"end": [
61,
43
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_one_right",
"code": "@[simp] lemma floorRoot_one_right (hn : n ≠ 0) : floorRoot n 1 = 1 := by simp [floorRoot, hn]",
"start": [
62,
1
],
"end": [
62,
94
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_pow_self",
"code": "@[simp] lemma floorRoot_pow_self (hn : n ≠ 0) (a : ℕ) : floorRoot n (a ^ n) = a := by\n simp [floorRoot_def, pos_iff_ne_zero.2, hn]; split_ifs <;> simp [*]",
"start": [
64,
1
],
"end": [
65,
70
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_ne_zero",
"code": "lemma floorRoot_ne_zero : floorRoot n a ≠ 0 ↔ n ≠ 0 ∧ a ≠ 0 := by\n simp (config := { contextual := true }) [floorRoot, not_imp_not, not_or]",
"start": [
67,
1
],
"end": [
68,
75
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_eq_zero",
"code": "@[simp] lemma floorRoot_eq_zero : floorRoot n a = 0 ↔ n = 0 ∨ a = 0 :=\n floorRoot_ne_zero.not_right.trans $ by simp only [not_and_or, ne_eq, not_not]",
"start": [
70,
1
],
"end": [
71,
80
],
"kind": "lemma"
},
{
"full_name": "Nat.factorization_floorRoot",
"code": "@[simp] lemma factorization_floorRoot (n a : ℕ) :\n (floorRoot n a).factorization = a.factorization ⌊/⌋ n := by\n rw [floorRoot_def]\n split_ifs with h\n · obtain rfl | rfl := h <;> simp\n refine prod_pow_factorization_eq_self fun p hp ↦ ?_\n have : p.Prime ∧ p ∣ a ∧ ¬a = 0 := by simpa using support_floorDiv_subset hp\n exact this.1",
"start": [
73,
1
],
"end": [
80,
15
],
"kind": "lemma"
},
{
"full_name": "Nat.pow_dvd_iff_dvd_floorRoot",
"code": "lemma pow_dvd_iff_dvd_floorRoot : a ^ n ∣ b ↔ a ∣ floorRoot n b := by\n obtain rfl | hn := eq_or_ne n 0\n · simp\n obtain rfl | hb := eq_or_ne b 0\n · simp\n obtain rfl | ha := eq_or_ne a 0\n · simp [hn]\n rw [← factorization_le_iff_dvd (pow_ne_zero _ ha) hb,\n ← factorization_le_iff_dvd ha (floorRoot_ne_zero.2 ⟨hn, hb⟩), factorization_pow,\n factorization_floorRoot, le_floorDiv_iff_smul_le (β := ℕ →₀ ℕ) (pos_iff_ne_zero.2 hn)]",
"start": [
82,
1
],
"end": [
93,
91
],
"kind": "lemma"
},
{
"full_name": "Nat.floorRoot_pow_dvd",
"code": "lemma floorRoot_pow_dvd : floorRoot n a ^ n ∣ a := pow_dvd_iff_dvd_floorRoot.2 dvd_rfl",
"start": [
95,
1
],
"end": [
95,
87
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot",
"code": "def ceilRoot (n a : ℕ) : ℕ :=\n if n = 0 ∨ a = 0 then 0 else a.factorization.prod fun p k ↦ p ^ ((k + n - 1) / n)",
"start": [
97,
1
],
"end": [
110,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.ceilRoot_def",
"code": "lemma ceilRoot_def :\n ceilRoot n a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌈/⌉ n).prod (· ^ ·) := by\n unfold ceilRoot\n split_ifs with h <;>\n simp [Finsupp.ceilDiv_def, prod_mapRange_index pow_zero, Nat.ceilDiv_eq_add_pred_div]",
"start": [
112,
1
],
"end": [
118,
90
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_zero_left",
"code": "@[simp] lemma ceilRoot_zero_left (a : ℕ) : ceilRoot 0 a = 0 := by simp [ceilRoot]",
"start": [
120,
1
],
"end": [
120,
82
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_zero_right",
"code": "@[simp] lemma ceilRoot_zero_right (n : ℕ) : ceilRoot n 0 = 0 := by simp [ceilRoot]",
"start": [
121,
1
],
"end": [
121,
83
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_one_left",
"code": "@[simp] lemma ceilRoot_one_left (a : ℕ) : ceilRoot 1 a = a := by\n simp [ceilRoot]; split_ifs <;> simp [*]",
"start": [
122,
1
],
"end": [
123,
42
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_one_right",
"code": "@[simp] lemma ceilRoot_one_right (hn : n ≠ 0) : ceilRoot n 1 = 1 := by simp [ceilRoot, hn]",
"start": [
124,
1
],
"end": [
124,
91
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_pow_self",
"code": "@[simp] lemma ceilRoot_pow_self (hn : n ≠ 0) (a : ℕ) : ceilRoot n (a ^ n) = a := by\n simp [ceilRoot_def, pos_iff_ne_zero.2, hn]; split_ifs <;> simp [*]",
"start": [
126,
1
],
"end": [
127,
69
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_ne_zero",
"code": "lemma ceilRoot_ne_zero : ceilRoot n a ≠ 0 ↔ n ≠ 0 ∧ a ≠ 0 := by\n simp (config := { contextual := true }) [ceilRoot_def, not_imp_not, not_or]",
"start": [
129,
1
],
"end": [
130,
78
],
"kind": "lemma"
},
{
"full_name": "Nat.ceilRoot_eq_zero",
"code": "@[simp] lemma ceilRoot_eq_zero : ceilRoot n a = 0 ↔ n = 0 ∨ a = 0 :=\n ceilRoot_ne_zero.not_right.trans $ by simp only [not_and_or, ne_eq, not_not]",
"start": [
132,
1
],
"end": [
133,
79
],
"kind": "lemma"
},
{
"full_name": "Nat.factorization_ceilRoot",
"code": "@[simp] lemma factorization_ceilRoot (n a : ℕ) :\n (ceilRoot n a).factorization = a.factorization ⌈/⌉ n := by\n rw [ceilRoot_def]\n split_ifs with h\n · obtain rfl | rfl := h <;> simp\n refine prod_pow_factorization_eq_self fun p hp ↦ ?_\n have : p.Prime ∧ p ∣ a ∧ ¬a = 0 := by simpa using support_ceilDiv_subset hp\n exact this.1",
"start": [
135,
1
],
"end": [
142,
15
],
"kind": "lemma"
},
{
"full_name": "Nat.dvd_pow_iff_ceilRoot_dvd",
"code": "lemma dvd_pow_iff_ceilRoot_dvd (hn : n ≠ 0) : a ∣ b ^ n ↔ ceilRoot n a ∣ b := by\n obtain rfl | ha := eq_or_ne a 0\n · aesop\n obtain rfl | hb := eq_or_ne b 0\n · simp [hn]\n rw [← factorization_le_iff_dvd ha (pow_ne_zero _ hb),\n ← factorization_le_iff_dvd (ceilRoot_ne_zero.2 ⟨hn, ha⟩) hb, factorization_pow,\n factorization_ceilRoot, ceilDiv_le_iff_le_smul (β := ℕ →₀ ℕ) (pos_iff_ne_zero.2 hn)]",
"start": [
144,
1
],
"end": [
157,
89
],
"kind": "lemma"
},
{
"full_name": "Nat.dvd_ceilRoot_pow",
"code": "lemma dvd_ceilRoot_pow (hn : n ≠ 0) : a ∣ ceilRoot n a ^ n :=\n (dvd_pow_iff_ceilRoot_dvd hn).2 dvd_rfl",
"start": [
159,
1
],
"end": [
160,
42
],
"kind": "lemma"
}
] |
Mathlib/Init/Data/Bool/Basic.lean | [
"Mathlib/Mathport/Rename.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [] |
Mathlib/FieldTheory/IsPerfectClosure.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/FieldTheory/PerfectClosure.lean",
"Mathlib/FieldTheory/PurelyInseparable.lean"
] | [
{
"full_name": "pNilradical",
"code": "def pNilradical (R : Type*) [CommSemiring R] (p : ℕ) : Ideal R := if 1 < p then nilradical R else ⊥",
"start": [
69,
1
],
"end": [
73,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_le_nilradical",
"code": "theorem pNilradical_le_nilradical {R : Type*} [CommSemiring R] {p : ℕ} :\n pNilradical R p ≤ nilradical R",
"start": [
75,
1
],
"end": [
79,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_eq_nilradical",
"code": "theorem pNilradical_eq_nilradical {R : Type*} [CommSemiring R] {p : ℕ} (hp : 1 < p) :\n pNilradical R p = nilradical R",
"start": [
81,
1
],
"end": [
82,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_eq_bot",
"code": "theorem pNilradical_eq_bot {R : Type*} [CommSemiring R] {p : ℕ} (hp : ¬ 1 < p) :\n pNilradical R p = ⊥",
"start": [
84,
1
],
"end": [
85,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_eq_bot'",
"code": "theorem pNilradical_eq_bot' {R : Type*} [CommSemiring R] {p : ℕ} (hp : p ≤ 1) :\n pNilradical R p = ⊥",
"start": [
87,
1
],
"end": [
88,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_prime",
"code": "theorem pNilradical_prime {R : Type*} [CommSemiring R] {p : ℕ} (hp : p.Prime) :\n pNilradical R p = nilradical R",
"start": [
90,
1
],
"end": [
91,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_one",
"code": "theorem pNilradical_one {R : Type*} [CommSemiring R] :\n pNilradical R 1 = ⊥",
"start": [
93,
1
],
"end": [
94,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "mem_pNilradical",
"code": "theorem mem_pNilradical {R : Type*} [CommSemiring R] {p : ℕ} {x : R} :\n x ∈ pNilradical R p ↔ ∃ n : ℕ, x ^ p ^ n = 0",
"start": [
96,
1
],
"end": [
110,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "sub_mem_pNilradical_iff_pow_expChar_pow_eq",
"code": "theorem sub_mem_pNilradical_iff_pow_expChar_pow_eq {R : Type*} [CommRing R] {p : ℕ} [ExpChar R p]\n {x y : R} : x - y ∈ pNilradical R p ↔ ∃ n : ℕ, x ^ p ^ n = y ^ p ^ n",
"start": [
112,
1
],
"end": [
114,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "pow_expChar_pow_inj_of_pNilradical_eq_bot",
"code": "theorem pow_expChar_pow_inj_of_pNilradical_eq_bot (R : Type*) [CommRing R] (p : ℕ) [ExpChar R p]\n (h : pNilradical R p = ⊥) (n : ℕ) : Function.Injective fun x : R ↦ x ^ p ^ n",
"start": [
116,
1
],
"end": [
118,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "pNilradical_eq_bot_of_frobenius_inj",
"code": "theorem pNilradical_eq_bot_of_frobenius_inj (R : Type*) [CommRing R] (p : ℕ) [ExpChar R p]\n (h : Function.Injective (frobenius R p)) : pNilradical R p = ⊥",
"start": [
120,
1
],
"end": [
123,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.pNilradical_eq_bot",
"code": "theorem PerfectRing.pNilradical_eq_bot (R : Type*) [CommRing R] (p : ℕ) [ExpChar R p]\n [PerfectRing R p] : pNilradical R p = ⊥",
"start": [
125,
1
],
"end": [
127,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical",
"code": "@[mk_iff]\nclass IsPRadical : Prop where\n pow_mem' : ∀ x : L, ∃ (n : ℕ) (y : K), i y = x ^ p ^ n\n ker_le' : RingHom.ker i ≤ pNilradical K p",
"start": [
139,
1
],
"end": [
149,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.pow_mem",
"code": "theorem IsPRadical.pow_mem [IsPRadical i p] (x : L) :\n ∃ (n : ℕ) (y : K), i y = x ^ p ^ n",
"start": [
151,
1
],
"end": [
152,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.ker_le",
"code": "theorem IsPRadical.ker_le [IsPRadical i p] :\n RingHom.ker i ≤ pNilradical K p",
"start": [
154,
1
],
"end": [
155,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.comap_pNilradical",
"code": "theorem IsPRadical.comap_pNilradical [IsPRadical i p] :\n (pNilradical L p).comap i = pNilradical K p",
"start": [
157,
1
],
"end": [
165,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.of_id",
"code": "instance IsPRadical.of_id : IsPRadical (RingHom.id K) p where\n pow_mem' x := ⟨0, x, by simp⟩\n ker_le' x h := by convert Ideal.zero_mem _",
"start": [
168,
1
],
"end": [
170,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.trans",
"code": "theorem IsPRadical.trans [IsPRadical i p] [IsPRadical f p] :\n IsPRadical (f.comp i) p where",
"start": [
172,
1
],
"end": [
181,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure",
"code": "@[nolint unusedArguments]\nabbrev IsPerfectClosure [PerfectRing L p] := IsPRadical i p",
"start": [
183,
1
],
"end": [
192,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.pNilradical_le_ker_of_perfectRing",
"code": "theorem RingHom.pNilradical_le_ker_of_perfectRing [PerfectRing L p] :\n pNilradical K p ≤ RingHom.ker i",
"start": [
194,
1
],
"end": [
201,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.ker_eq",
"code": "theorem IsPerfectClosure.ker_eq [PerfectRing L p] [IsPerfectClosure i p] :\n RingHom.ker i = pNilradical K p",
"start": [
203,
1
],
"end": [
205,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_aux",
"code": "theorem lift_aux (x : L) : ∃ y : ℕ × K, i y.2 = x ^ p ^ y.1",
"start": [
214,
1
],
"end": [
216,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux",
"code": "def liftAux (x : L) : M := (iterateFrobeniusEquiv M p (Classical.choose (lift_aux i p x)).1).symm\n (j (Classical.choose (lift_aux i p x)).2)",
"start": [
218,
1
],
"end": [
223,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux_self_apply",
"code": "@[simp]\ntheorem liftAux_self_apply [PerfectRing L p] (x : L) : liftAux i i p x = x",
"start": [
225,
1
],
"end": [
228,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux_self",
"code": "@[simp]\ntheorem liftAux_self [PerfectRing L p] : liftAux i i p = id",
"start": [
230,
1
],
"end": [
231,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux_id_apply",
"code": "@[simp]\ntheorem liftAux_id_apply (x : K) : liftAux (RingHom.id K) j p x = j x",
"start": [
233,
1
],
"end": [
237,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux_id",
"code": "@[simp]\ntheorem liftAux_id : liftAux (RingHom.id K) j p = j",
"start": [
239,
1
],
"end": [
240,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.injective_comp_of_pNilradical_eq_bot",
"code": "theorem injective_comp_of_pNilradical_eq_bot [IsPRadical i p] (h : pNilradical M p = ⊥) :\n Function.Injective fun f : L →+* M ↦ f.comp i",
"start": [
254,
1
],
"end": [
261,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.injective_comp",
"code": "theorem injective_comp [IsPRadical i p] [IsReduced M] :\n Function.Injective fun f : L →+* M ↦ f.comp i",
"start": [
265,
1
],
"end": [
272,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.injective_comp_of_perfect",
"code": "theorem injective_comp_of_perfect [IsPRadical i p] [PerfectRing M p] :\n Function.Injective fun f : L →+* M ↦ f.comp i",
"start": [
274,
1
],
"end": [
279,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftAux_apply",
"code": "theorem liftAux_apply (x : L) (n : ℕ) (y : K) (h : i y = x ^ p ^ n) :\n liftAux i j p x = (iterateFrobeniusEquiv M p n).symm (j y)",
"start": [
287,
1
],
"end": [
304,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift",
"code": "def lift : L →+* M where\n toFun := liftAux i j p\n map_one' := by simp [liftAux_apply i j p 1 0 1 (by rw [one_pow, map_one])]\n map_mul' x1 x2 := by\n obtain ⟨n1, y1, h1⟩ := IsPRadical.pow_mem i p x1\n obtain ⟨n2, y2, h2⟩ := IsPRadical.pow_mem i p x2\n simp only; rw [liftAux_apply i j p _ _ _ h1, liftAux_apply i j p _ _ _ h2,\n liftAux_apply i j p (x1 * x2) (n1 + n2) (y1 ^ p ^ n2 * y2 ^ p ^ n1) (by rw [map_mul,\n map_pow, map_pow, h1, h2, ← pow_mul, ← pow_add, ← pow_mul, ← pow_add,\n add_comm n2, mul_pow]),\n map_mul, map_pow, map_pow, map_mul, ← iterateFrobeniusEquiv_def]\n nth_rw 1 [iterateFrobeniusEquiv_symm_add_apply]\n rw [RingEquiv.symm_apply_apply, add_comm n1, iterateFrobeniusEquiv_symm_add_apply,\n ← iterateFrobeniusEquiv_def, RingEquiv.symm_apply_apply]\n map_zero' := by simp [liftAux_apply i j p 0 0 0 (by rw [pow_zero, pow_one, map_zero])]\n map_add' x1 x2 := by\n obtain ⟨n1, y1, h1⟩ := IsPRadical.pow_mem i p x1\n obtain ⟨n2, y2, h2⟩ := IsPRadical.pow_mem i p x2\n simp only; rw [liftAux_apply i j p _ _ _ h1, liftAux_apply i j p _ _ _ h2,\n liftAux_apply i j p (x1 + x2) (n1 + n2) (y1 ^ p ^ n2 + y2 ^ p ^ n1) (by rw [map_add,\n map_pow, map_pow, h1, h2, ← pow_mul, ← pow_add, ← pow_mul, ← pow_add,\n add_comm n2, add_pow_expChar_pow]),\n map_add, map_pow, map_pow, map_add, ← iterateFrobeniusEquiv_def]\n nth_rw 1 [iterateFrobeniusEquiv_symm_add_apply]\n rw [RingEquiv.symm_apply_apply, add_comm n1, iterateFrobeniusEquiv_symm_add_apply,\n ← iterateFrobeniusEquiv_def, RingEquiv.symm_apply_apply]",
"start": [
306,
1
],
"end": [
334,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_apply",
"code": "theorem lift_apply (x : L) (n : ℕ) (y : K) (h : i y = x ^ p ^ n) :\n lift i j p x = (iterateFrobeniusEquiv M p n).symm (j y)",
"start": [
336,
1
],
"end": [
338,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp_apply",
"code": "@[simp]\ntheorem lift_comp_apply (x : K) : lift i j p (i x) = j x",
"start": [
340,
1
],
"end": [
342,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp",
"code": "@[simp]\ntheorem lift_comp : (lift i j p).comp i = j",
"start": [
344,
1
],
"end": [
345,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_self_apply",
"code": "theorem lift_self_apply [PerfectRing L p] (x : L) : lift i i p x = x",
"start": [
347,
1
],
"end": [
347,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_self",
"code": "@[simp]\ntheorem lift_self [PerfectRing L p] : lift i i p = RingHom.id L",
"start": [
349,
1
],
"end": [
351,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_id_apply",
"code": "theorem lift_id_apply (x : K) : lift (RingHom.id K) j p x = j x",
"start": [
353,
1
],
"end": [
353,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_id",
"code": "@[simp]\ntheorem lift_id : lift (RingHom.id K) j p = j",
"start": [
355,
1
],
"end": [
356,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.comp_lift",
"code": "@[simp]\ntheorem comp_lift : lift i (f.comp i) p = f",
"start": [
358,
1
],
"end": [
360,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.comp_lift_apply",
"code": "theorem comp_lift_apply (x : L) : lift i (f.comp i) p x = f x",
"start": [
362,
1
],
"end": [
362,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv",
"code": "def liftEquiv : (K →+* M) ≃ (L →+* M) where\n toFun j := lift i j p\n invFun f := f.comp i\n left_inv f := lift_comp i f p\n right_inv f := comp_lift i f p",
"start": [
365,
1
],
"end": [
373,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_apply",
"code": "theorem liftEquiv_apply : liftEquiv M i p j = lift i j p",
"start": [
375,
1
],
"end": [
375,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_symm_apply",
"code": "theorem liftEquiv_symm_apply : (liftEquiv M i p).symm f = f.comp i",
"start": [
377,
1
],
"end": [
377,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_id_apply",
"code": "theorem liftEquiv_id_apply : liftEquiv M (RingHom.id K) p j = j",
"start": [
379,
1
],
"end": [
380,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_id",
"code": "@[simp]\ntheorem liftEquiv_id : liftEquiv M (RingHom.id K) p = Equiv.refl _",
"start": [
382,
1
],
"end": [
384,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp_lift",
"code": "@[simp]\ntheorem lift_comp_lift : (lift j k p).comp (lift i j p) = lift i k p",
"start": [
390,
1
],
"end": [
392,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp_lift_apply",
"code": "@[simp]\ntheorem lift_comp_lift_apply (x : L) : lift j k p (lift i j p x) = lift i k p x",
"start": [
394,
1
],
"end": [
396,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp_lift_apply_eq_self",
"code": "theorem lift_comp_lift_apply_eq_self [PerfectRing L p] (x : L) :\n lift j i p (lift i j p x) = x",
"start": [
398,
1
],
"end": [
400,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_comp_lift_eq_id",
"code": "theorem lift_comp_lift_eq_id [PerfectRing L p] :\n (lift j i p).comp (lift i j p) = RingHom.id L",
"start": [
402,
1
],
"end": [
404,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_lift",
"code": "@[simp]\ntheorem lift_lift : lift g (lift i j p) p = lift (g.comp i) j p",
"start": [
412,
1
],
"end": [
415,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.lift_lift_apply",
"code": "theorem lift_lift_apply (x : N) : lift g (lift i j p) p x = lift (g.comp i) j p x",
"start": [
417,
1
],
"end": [
418,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_comp_apply",
"code": "@[simp]\ntheorem liftEquiv_comp_apply :\n liftEquiv M g p (liftEquiv M i p j) = liftEquiv M (g.comp i) p j",
"start": [
420,
1
],
"end": [
422,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectRing.liftEquiv_trans",
"code": "@[simp]\ntheorem liftEquiv_trans :\n (liftEquiv M i p).trans (liftEquiv M g p) = liftEquiv M (g.comp i) p",
"start": [
424,
1
],
"end": [
427,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv",
"code": "def equiv : L ≃+* M where\n __ := PerfectRing.lift i j p\n invFun := PerfectRing.liftAux j i p\n left_inv := PerfectRing.lift_comp_lift_apply_eq_self i j p\n right_inv := PerfectRing.lift_comp_lift_apply_eq_self j i p",
"start": [
437,
1
],
"end": [
443,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_toRingHom",
"code": "theorem equiv_toRingHom : (equiv i j p).toRingHom = PerfectRing.lift i j p",
"start": [
445,
1
],
"end": [
445,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_symm",
"code": "@[simp]\ntheorem equiv_symm : (equiv i j p).symm = equiv j i p",
"start": [
447,
1
],
"end": [
448,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_symm_toRingHom",
"code": "theorem equiv_symm_toRingHom :\n (equiv i j p).symm.toRingHom = PerfectRing.lift j i p",
"start": [
450,
1
],
"end": [
451,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_apply",
"code": "theorem equiv_apply (x : L) (n : ℕ) (y : K) (h : i y = x ^ p ^ n) :\n equiv i j p x = (iterateFrobeniusEquiv M p n).symm (j y)",
"start": [
453,
1
],
"end": [
455,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_symm_apply",
"code": "theorem equiv_symm_apply (x : M) (n : ℕ) (y : K) (h : j y = x ^ p ^ n) :\n (equiv i j p).symm x = (iterateFrobeniusEquiv L p n).symm (i y)",
"start": [
457,
1
],
"end": [
459,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_self_apply",
"code": "theorem equiv_self_apply (x : L) : equiv i i p x = x",
"start": [
461,
1
],
"end": [
462,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_self",
"code": "@[simp]\ntheorem equiv_self : equiv i i p = RingEquiv.refl L",
"start": [
464,
1
],
"end": [
466,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp_apply",
"code": "@[simp]\ntheorem equiv_comp_apply (x : K) : equiv i j p (i x) = j x",
"start": [
468,
1
],
"end": [
470,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp",
"code": "@[simp]\ntheorem equiv_comp : RingHom.comp (equiv i j p) i = j",
"start": [
472,
1
],
"end": [
474,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp_equiv_apply",
"code": "@[simp]\ntheorem equiv_comp_equiv_apply (x : L) :\n equiv j k p (equiv i j p x) = equiv i k p x",
"start": [
480,
1
],
"end": [
483,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp_equiv",
"code": "@[simp]\ntheorem equiv_comp_equiv : (equiv i j p).trans (equiv j k p) = equiv i k p",
"start": [
485,
1
],
"end": [
487,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp_equiv_apply_eq_self",
"code": "theorem equiv_comp_equiv_apply_eq_self (x : L) :\n equiv j i p (equiv i j p x) = x",
"start": [
489,
1
],
"end": [
491,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPerfectClosure.equiv_comp_equiv_eq_id",
"code": "theorem equiv_comp_equiv_eq_id :\n (equiv i j p).trans (equiv j i p) = RingEquiv.refl L",
"start": [
493,
1
],
"end": [
495,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "PerfectClosure.isPRadical",
"code": "instance isPRadical : IsPRadical (PerfectClosure.of K p) p where\n pow_mem' x := PerfectClosure.induction_on x fun x ↦ ⟨x.1, x.2, by\n rw [← iterate_frobenius, iterate_frobenius_mk K p x.1 x.2]⟩\n ker_le' x h := by\n rw [RingHom.mem_ker, of_apply, zero_def, mk_eq_iff] at h\n obtain ⟨n, h⟩ := h\n simp_rw [zero_add, ← coe_iterateFrobenius, map_zero] at h\n exact mem_pNilradical.2 ⟨n, h⟩",
"start": [
508,
1
],
"end": [
518,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPRadical.isPurelyInseparable",
"code": "theorem IsPRadical.isPurelyInseparable [IsPRadical (algebraMap K L) p] :\n IsPurelyInseparable K L",
"start": [
527,
1
],
"end": [
530,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "IsPurelyInseparable.isPRadical",
"code": "instance IsPurelyInseparable.isPRadical [IsPurelyInseparable K L] :\n IsPRadical (algebraMap K L) p where\n pow_mem' := (isPurelyInseparable_iff_pow_mem K p).1 ‹_›\n ker_le' := (RingHom.injective_iff_ker_eq_bot _).1 (algebraMap K L).injective ▸ bot_le",
"start": [
532,
1
],
"end": [
538,
88
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/InnerProductSpace/LinearPMap.lean | [
"Mathlib/Analysis/InnerProductSpace/Adjoint.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Topology/Algebra/Module/Basic.lean"
] | [
{
"full_name": "LinearPMap.IsFormalAdjoint",
"code": "def IsFormalAdjoint (T : E →ₗ.[𝕜] F) (S : F →ₗ.[𝕜] E) : Prop :=\n ∀ (x : T.domain) (y : S.domain), ⟪T x, y⟫ = ⟪(x : E), S y⟫",
"start": [
65,
1
],
"end": [
68,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.IsFormalAdjoint.symm",
"code": "@[symm]\nprotected theorem IsFormalAdjoint.symm (h : T.IsFormalAdjoint S) :\n S.IsFormalAdjoint T",
"start": [
73,
1
],
"end": [
76,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointDomain",
"code": "def adjointDomain : Submodule 𝕜 F where\n carrier := {y | Continuous ((innerₛₗ 𝕜 y).comp T.toFun)}\n zero_mem' := by\n rw [Set.mem_setOf_eq, LinearMap.map_zero, LinearMap.zero_comp]\n exact continuous_zero\n add_mem' hx hy := by rw [Set.mem_setOf_eq, LinearMap.map_add] at *; exact hx.add hy\n smul_mem' a x hx := by\n rw [Set.mem_setOf_eq, LinearMap.map_smulₛₗ] at *\n exact hx.const_smul (conj a)",
"start": [
81,
1
],
"end": [
93,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointDomainMkCLM",
"code": "def adjointDomainMkCLM (y : T.adjointDomain) : T.domain →L[𝕜] 𝕜 :=\n ⟨(innerₛₗ 𝕜 (y : F)).comp T.toFun, y.prop⟩",
"start": [
96,
1
],
"end": [
99,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointDomainMkCLM_apply",
"code": "theorem adjointDomainMkCLM_apply (y : T.adjointDomain) (x : T.domain) :\n adjointDomainMkCLM T y x = ⟪(y : F), T x⟫",
"start": [
102,
1
],
"end": [
104,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointDomainMkCLMExtend",
"code": "def adjointDomainMkCLMExtend (y : T.adjointDomain) : E →L[𝕜] 𝕜 :=\n (T.adjointDomainMkCLM y).extend (Submodule.subtypeL T.domain) hT.denseRange_val\n uniformEmbedding_subtype_val.toUniformInducing",
"start": [
110,
1
],
"end": [
113,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointDomainMkCLMExtend_apply",
"code": "@[simp]\ntheorem adjointDomainMkCLMExtend_apply (y : T.adjointDomain) (x : T.domain) :\n adjointDomainMkCLMExtend hT y (x : E) = ⟪(y : F), T x⟫",
"start": [
116,
1
],
"end": [
119,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointAux",
"code": "def adjointAux : T.adjointDomain →ₗ[𝕜] E where\n toFun y := (InnerProductSpace.toDual 𝕜 E).symm (adjointDomainMkCLMExtend hT y)\n map_add' x y :=\n hT.eq_of_inner_left fun _ => by\n simp only [inner_add_left, Submodule.coe_add, InnerProductSpace.toDual_symm_apply,\n adjointDomainMkCLMExtend_apply]\n map_smul' _ _ :=\n hT.eq_of_inner_left fun _ => by\n simp only [inner_smul_left, Submodule.coe_smul_of_tower, RingHom.id_apply,\n InnerProductSpace.toDual_symm_apply, adjointDomainMkCLMExtend_apply]",
"start": [
124,
1
],
"end": [
137,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointAux_inner",
"code": "theorem adjointAux_inner (y : T.adjointDomain) (x : T.domain) :\n ⟪adjointAux hT y, x⟫ = ⟪(y : F), T x⟫",
"start": [
140,
1
],
"end": [
147,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjointAux_unique",
"code": "theorem adjointAux_unique (y : T.adjointDomain) {x₀ : E}\n (hx₀ : ∀ x : T.domain, ⟪x₀, x⟫ = ⟪(y : F), T x⟫) : adjointAux hT y = x₀",
"start": [
150,
1
],
"end": [
152,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjoint",
"code": "def adjoint : F →ₗ.[𝕜] E where\n domain := T.adjointDomain\n toFun := if hT : Dense (T.domain : Set E) then adjointAux hT else 0",
"start": [
157,
1
],
"end": [
160,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.mem_adjoint_domain_iff",
"code": "theorem mem_adjoint_domain_iff (y : F) : y ∈ T†.domain ↔ Continuous ((innerₛₗ 𝕜 y).comp T.toFun)",
"start": [
165,
1
],
"end": [
166,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.mem_adjoint_domain_of_exists",
"code": "theorem mem_adjoint_domain_of_exists (y : F) (h : ∃ w : E, ∀ x : T.domain, ⟪w, x⟫ = ⟪y, T x⟫) :\n y ∈ T†.domain",
"start": [
171,
1
],
"end": [
177,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjoint_apply_of_not_dense",
"code": "theorem adjoint_apply_of_not_dense (hT : ¬Dense (T.domain : Set E)) (y : T†.domain) : T† y = 0",
"start": [
180,
1
],
"end": [
182,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjoint_apply_of_dense",
"code": "theorem adjoint_apply_of_dense (y : T†.domain) : T† y = adjointAux hT y",
"start": [
185,
1
],
"end": [
187,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjoint_apply_eq",
"code": "theorem adjoint_apply_eq (y : T†.domain) {x₀ : E} (hx₀ : ∀ x : T.domain, ⟪x₀, x⟫ = ⟪(y : F), T x⟫) :\n T† y = x₀",
"start": [
190,
1
],
"end": [
192,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.adjoint_isFormalAdjoint",
"code": "theorem adjoint_isFormalAdjoint : T†.IsFormalAdjoint T",
"start": [
195,
1
],
"end": [
197,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.IsFormalAdjoint.le_adjoint",
"code": "theorem IsFormalAdjoint.le_adjoint (h : T.IsFormalAdjoint S) : S ≤ T†",
"start": [
200,
1
],
"end": [
207,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "ContinuousLinearMap.toPMap_adjoint_eq_adjoint_toPMap_of_dense",
"code": "theorem toPMap_adjoint_eq_adjoint_toPMap_of_dense (hp : Dense (p : Set E)) :\n (A.toPMap p).adjoint = A.adjoint.toPMap ⊤",
"start": [
217,
1
],
"end": [
228,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.instStar",
"code": "instance instStar : Star (E →ₗ.[𝕜] E) where\n star := fun A ↦ A.adjoint",
"start": [
239,
1
],
"end": [
240,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "LinearPMap.isSelfAdjoint_def",
"code": "theorem isSelfAdjoint_def : IsSelfAdjoint A ↔ A† = A",
"start": [
244,
1
],
"end": [
244,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "IsSelfAdjoint.dense_domain",
"code": "theorem _root_.IsSelfAdjoint.dense_domain (hA : IsSelfAdjoint A) : Dense (A.domain : Set E)",
"start": [
246,
1
],
"end": [
261,
17
],
"kind": "commanddeclaration"
}
] |
Mathlib/NumberTheory/Multiplicity.lean | [
"Mathlib/Algebra/Ring/Int.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/GeomSum.lean",
"Mathlib/RingTheory/Ideal/Quotient.lean",
"Mathlib/Algebra/Order/Ring/Basic.lean",
"Mathlib/NumberTheory/Padics/PadicVal.lean"
] | [
{
"full_name": "dvd_geom_sum₂_iff_of_dvd_sub",
"code": "theorem dvd_geom_sum₂_iff_of_dvd_sub {x y p : R} (h : p ∣ x - y) :\n (p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) ↔ p ∣ n * y ^ (n - 1)",
"start": [
39,
1
],
"end": [
43,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "dvd_geom_sum₂_iff_of_dvd_sub'",
"code": "theorem dvd_geom_sum₂_iff_of_dvd_sub' {x y p : R} (h : p ∣ x - y) :\n (p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) ↔ p ∣ n * x ^ (n - 1)",
"start": [
46,
1
],
"end": [
48,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "dvd_geom_sum₂_self",
"code": "theorem dvd_geom_sum₂_self {x y : R} (h : ↑n ∣ x - y) :\n ↑n ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)",
"start": [
51,
1
],
"end": [
53,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "sq_dvd_add_pow_sub_sub",
"code": "theorem sq_dvd_add_pow_sub_sub (p x : R) (n : ℕ) :\n p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * n - x ^ n",
"start": [
56,
1
],
"end": [
71,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "not_dvd_geom_sum₂",
"code": "theorem not_dvd_geom_sum₂ {p : R} (hp : Prime p) (hxy : p ∣ x - y) (hx : ¬p ∣ x) (hn : ¬p ∣ n) :\n ¬p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)",
"start": [
74,
1
],
"end": [
77,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "odd_sq_dvd_geom_sum₂_sub",
"code": "theorem odd_sq_dvd_geom_sum₂_sub (hp : Odd p) :\n (p : R) ^ 2 ∣ (∑ i ∈ range p, (a + p * b) ^ i * a ^ (p - 1 - i)) - p * a ^ (p - 1)",
"start": [
82,
1
],
"end": [
146,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.pow_sub_pow_of_prime",
"code": "theorem pow_sub_pow_of_prime {p : R} (hp : Prime p) {x y : R} (hxy : p ∣ x - y) (hx : ¬p ∣ x)\n {n : ℕ} (hn : ¬p ∣ n) : multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y)",
"start": [
155,
1
],
"end": [
158,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.geom_sum₂_eq_one",
"code": "theorem geom_sum₂_eq_one : multiplicity (↑p) (∑ i ∈ range p, x ^ i * y ^ (p - 1 - i)) = 1",
"start": [
163,
1
],
"end": [
173,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.pow_prime_sub_pow_prime",
"code": "theorem pow_prime_sub_pow_prime :\n multiplicity (↑p) (x ^ p - y ^ p) = multiplicity (↑p) (x - y) + 1",
"start": [
176,
1
],
"end": [
178,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.pow_prime_pow_sub_pow_prime_pow",
"code": "theorem pow_prime_pow_sub_pow_prime_pow (a : ℕ) :\n multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + a",
"start": [
181,
1
],
"end": [
189,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.Int.pow_sub_pow",
"code": "theorem Int.pow_sub_pow {x y : ℤ} (hxy : ↑p ∣ x - y) (hx : ¬↑p ∣ x) (n : ℕ) :\n multiplicity (↑p) (x ^ n - y ^ n) = multiplicity (↑p) (x - y) + multiplicity p n",
"start": [
198,
1
],
"end": [
215,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.Int.pow_add_pow",
"code": "theorem Int.pow_add_pow {x y : ℤ} (hxy : ↑p ∣ x + y) (hx : ¬↑p ∣ x) {n : ℕ} (hn : Odd n) :\n multiplicity (↑p) (x ^ n + y ^ n) = multiplicity (↑p) (x + y) + multiplicity p n",
"start": [
218,
1
],
"end": [
222,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.Nat.pow_sub_pow",
"code": "theorem Nat.pow_sub_pow {x y : ℕ} (hxy : p ∣ x - y) (hx : ¬p ∣ x) (n : ℕ) :\n multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n",
"start": [
225,
1
],
"end": [
236,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "multiplicity.Nat.pow_add_pow",
"code": "theorem Nat.pow_add_pow {x y : ℕ} (hxy : p ∣ x + y) (hx : ¬p ∣ x) {n : ℕ} (hn : Odd n) :\n multiplicity p (x ^ n + y ^ n) = multiplicity p (x + y) + multiplicity p n",
"start": [
239,
1
],
"end": [
244,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "pow_two_pow_sub_pow_two_pow",
"code": "theorem pow_two_pow_sub_pow_two_pow [CommRing R] {x y : R} (n : ℕ) :\n x ^ 2 ^ n - y ^ 2 ^ n = (∏ i ∈ Finset.range n, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)",
"start": [
253,
1
],
"end": [
260,
9
],
"kind": "commanddeclaration"
},
{
"full_name": "Int.sq_mod_four_eq_one_of_odd",
"code": "theorem Int.sq_mod_four_eq_one_of_odd {x : ℤ} : Odd x → x ^ 2 % 4 = 1",
"start": [
264,
1
],
"end": [
270,
9
],
"kind": "commanddeclaration"
},
{
"full_name": "Int.two_pow_two_pow_add_two_pow_two_pow",
"code": "theorem Int.two_pow_two_pow_add_two_pow_two_pow {x y : ℤ} (hx : ¬2 ∣ x) (hxy : 4 ∣ x - y) (i : ℕ) :\n multiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑(1 : ℕ)",
"start": [
273,
1
],
"end": [
295,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "Int.two_pow_two_pow_sub_pow_two_pow",
"code": "theorem Int.two_pow_two_pow_sub_pow_two_pow {x y : ℤ} (n : ℕ) (hxy : 4 ∣ x - y) (hx : ¬2 ∣ x) :\n multiplicity 2 (x ^ 2 ^ n - y ^ 2 ^ n) = multiplicity 2 (x - y) + n",
"start": [
298,
1
],
"end": [
302,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "Int.two_pow_sub_pow'",
"code": "theorem Int.two_pow_sub_pow' {x y : ℤ} (n : ℕ) (hxy : 4 ∣ x - y) (hx : ¬2 ∣ x) :\n multiplicity 2 (x ^ n - y ^ n) = multiplicity 2 (x - y) + multiplicity (2 : ℤ) n",
"start": [
305,
1
],
"end": [
326,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Int.two_pow_sub_pow",
"code": "theorem Int.two_pow_sub_pow {x y : ℤ} {n : ℕ} (hxy : 2 ∣ x - y) (hx : ¬2 ∣ x) (hn : Even n) :\n multiplicity 2 (x ^ n - y ^ n) + 1 =\n multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity (2 : ℤ) n",
"start": [
329,
1
],
"end": [
356,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.two_pow_sub_pow",
"code": "theorem Nat.two_pow_sub_pow {x y : ℕ} (hxy : 2 ∣ x - y) (hx : ¬2 ∣ x) {n : ℕ} (hn : Even n) :\n multiplicity 2 (x ^ n - y ^ n) + 1 =\n multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n",
"start": [
359,
1
],
"end": [
373,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "padicValNat.pow_two_sub_pow",
"code": "theorem pow_two_sub_pow (hyx : y < x) (hxy : 2 ∣ x - y) (hx : ¬2 ∣ x) {n : ℕ} (hn : n ≠ 0)\n (hneven : Even n) :\n padicValNat 2 (x ^ n - y ^ n) + 1 =\n padicValNat 2 (x + y) + padicValNat 2 (x - y) + padicValNat 2 n",
"start": [
380,
1
],
"end": [
390,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "padicValNat.pow_sub_pow",
"code": "theorem pow_sub_pow (hyx : y < x) (hxy : p ∣ x - y) (hx : ¬p ∣ x) {n : ℕ} (hn : n ≠ 0) :\n padicValNat p (x ^ n - y ^ n) = padicValNat p (x - y) + padicValNat p n",
"start": [
395,
1
],
"end": [
402,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "padicValNat.pow_add_pow",
"code": "theorem pow_add_pow (hxy : p ∣ x + y) (hx : ¬p ∣ x) {n : ℕ} (hn : Odd n) :\n padicValNat p (x ^ n + y ^ n) = padicValNat p (x + y) + padicValNat p n",
"start": [
405,
1
],
"end": [
414,
51
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/String/Lemmas.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/String/Defs.lean",
"Mathlib/Init/Data/Nat/Notation.lean",
"Mathlib/Tactic/Basic.lean"
] | [
{
"full_name": "String.congr_append",
"code": "lemma congr_append : ∀ (a b : String), a ++ b = String.mk (a.data ++ b.data)\n | ⟨_⟩, ⟨_⟩ => rfl",
"start": [
12,
1
],
"end": [
13,
20
],
"kind": "lemma"
},
{
"full_name": "String.length_replicate",
"code": "@[simp] lemma length_replicate (n : ℕ) (c : Char) : (replicate n c).length = n := by\n simp only [String.length, String.replicate, List.length_replicate]",
"start": [
15,
1
],
"end": [
16,
69
],
"kind": "lemma"
},
{
"full_name": "String.length_eq_list_length",
"code": "lemma length_eq_list_length (l : List Char) : (String.mk l).length = l.length := by\n simp only [String.length]",
"start": [
18,
1
],
"end": [
19,
28
],
"kind": "lemma"
},
{
"full_name": "String.leftpad_length",
"code": "@[simp] lemma leftpad_length (n : ℕ) (c : Char) :\n ∀ (s : String), (leftpad n c s).length = max n s.length\n | ⟨s⟩ => by simp only [leftpad, String.length, List.leftpad_length]",
"start": [
21,
1
],
"end": [
25,
70
],
"kind": "lemma"
},
{
"full_name": "String.leftpad_prefix",
"code": "lemma leftpad_prefix (n : ℕ) (c : Char) : ∀ s, IsPrefix (replicate (n - length s) c) (leftpad n c s)\n | ⟨l⟩ => by simp only [IsPrefix, replicate, leftpad, String.length, List.leftpad_prefix]",
"start": [
27,
1
],
"end": [
28,
91
],
"kind": "lemma"
},
{
"full_name": "String.leftpad_suffix",
"code": "lemma leftpad_suffix (n : ℕ) (c : Char) : ∀ s, IsSuffix s (leftpad n c s)\n | ⟨l⟩ => by simp only [IsSuffix, replicate, leftpad, String.length, List.leftpad_suffix]",
"start": [
30,
1
],
"end": [
31,
91
],
"kind": "lemma"
}
] |
Mathlib/Analysis/Complex/Schwarz.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/Complex/AbsMax.lean",
"Mathlib/Analysis/Complex/RemovableSingularity.lean"
] | [
{
"full_name": "Complex.schwarz_aux",
"code": "theorem schwarz_aux {f : ℂ → ℂ} (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (hz : z ∈ ball c R₁) :\n ‖dslope f c z‖ ≤ R₂ / R₁",
"start": [
64,
1
],
"end": [
88,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.norm_dslope_le_div_of_mapsTo_ball",
"code": "theorem norm_dslope_le_div_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (hz : z ∈ ball c R₁) :\n ‖dslope f c z‖ ≤ R₂ / R₁",
"start": [
91,
1
],
"end": [
108,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div",
"code": "theorem affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div [CompleteSpace E] [StrictConvexSpace ℝ E]\n (hd : DifferentiableOn ℂ f (ball c R₁)) (h_maps : Set.MapsTo f (ball c R₁) (ball (f c) R₂))\n (h_z₀ : z₀ ∈ ball c R₁) (h_eq : ‖dslope f c z₀‖ = R₂ / R₁) :\n Set.EqOn f (fun z => f c + (z - c) • dslope f c z₀) (ball c R₁)",
"start": [
111,
1
],
"end": [
130,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div'",
"code": "theorem affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div' [CompleteSpace E]\n [StrictConvexSpace ℝ E] (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : Set.MapsTo f (ball c R₁) (ball (f c) R₂))\n (h_z₀ : ∃ z₀ ∈ ball c R₁, ‖dslope f c z₀‖ = R₂ / R₁) :\n ∃ C : E, ‖C‖ = R₂ / R₁ ∧ Set.EqOn f (fun z => f c + (z - c) • C) (ball c R₁)",
"start": [
134,
1
],
"end": [
140,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.norm_deriv_le_div_of_mapsTo_ball",
"code": "theorem norm_deriv_le_div_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (h₀ : 0 < R₁) : ‖deriv f c‖ ≤ R₂ / R₁",
"start": [
143,
1
],
"end": [
148,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.dist_le_div_mul_dist_of_mapsTo_ball",
"code": "theorem dist_le_div_mul_dist_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (hz : z ∈ ball c R₁) :\n dist (f z) (f c) ≤ R₂ / R₁ * dist z c",
"start": [
151,
1
],
"end": [
160,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.abs_deriv_le_div_of_mapsTo_ball",
"code": "theorem abs_deriv_le_div_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))\n (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (h₀ : 0 < R₁) : abs (deriv f c) ≤ R₂ / R₁",
"start": [
167,
1
],
"end": [
172,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.abs_deriv_le_one_of_mapsTo_ball",
"code": "theorem abs_deriv_le_one_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R))\n (h_maps : MapsTo f (ball c R) (ball c R)) (hc : f c = c) (h₀ : 0 < R) : abs (deriv f c) ≤ 1",
"start": [
175,
1
],
"end": [
180,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.dist_le_dist_of_mapsTo_ball_self",
"code": "theorem dist_le_dist_of_mapsTo_ball_self (hd : DifferentiableOn ℂ f (ball c R))\n (h_maps : MapsTo f (ball c R) (ball c R)) (hc : f c = c) (hz : z ∈ ball c R) :\n dist (f z) c ≤ dist z c",
"start": [
183,
1
],
"end": [
191,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Complex.abs_le_abs_of_mapsTo_ball_self",
"code": "theorem abs_le_abs_of_mapsTo_ball_self (hd : DifferentiableOn ℂ f (ball 0 R))\n (h_maps : MapsTo f (ball 0 R) (ball 0 R)) (h₀ : f 0 = 0) (hz : abs z < R) :\n abs (f z) ≤ abs z",
"start": [
194,
1
],
"end": [
200,
86
],
"kind": "commanddeclaration"
}
] |
Mathlib/SetTheory/Game/Domineering.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/SetTheory/Game/State.lean"
] | [
{
"full_name": "SetTheory.PGame.Domineering.shiftUp",
"code": "@[simps!]\ndef shiftUp : ℤ × ℤ ≃ ℤ × ℤ :=\n (Equiv.refl ℤ).prodCongr (Equiv.addRight (1 : ℤ))",
"start": [
32,
1
],
"end": [
35,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.shiftRight",
"code": "@[simps!]\ndef shiftRight : ℤ × ℤ ≃ ℤ × ℤ :=\n (Equiv.addRight (1 : ℤ)).prodCongr (Equiv.refl ℤ)",
"start": [
38,
1
],
"end": [
41,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.Board",
"code": "abbrev Board :=\n Finset (ℤ × ℤ)",
"start": [
44,
1
],
"end": [
48,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.left",
"code": "def left (b : Board) : Finset (ℤ × ℤ) :=\n b ∩ b.map shiftUp",
"start": [
51,
1
],
"end": [
53,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.right",
"code": "def right (b : Board) : Finset (ℤ × ℤ) :=\n b ∩ b.map shiftRight",
"start": [
56,
1
],
"end": [
58,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.mem_left",
"code": "theorem mem_left {b : Board} (x : ℤ × ℤ) : x ∈ left b ↔ x ∈ b ∧ (x.1, x.2 - 1) ∈ b",
"start": [
61,
1
],
"end": [
62,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.mem_right",
"code": "theorem mem_right {b : Board} (x : ℤ × ℤ) : x ∈ right b ↔ x ∈ b ∧ (x.1 - 1, x.2) ∈ b",
"start": [
65,
1
],
"end": [
66,
66
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveLeft",
"code": "def moveLeft (b : Board) (m : ℤ × ℤ) : Board :=\n (b.erase m).erase (m.1, m.2 - 1)",
"start": [
69,
1
],
"end": [
71,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveRight",
"code": "def moveRight (b : Board) (m : ℤ × ℤ) : Board :=\n (b.erase m).erase (m.1 - 1, m.2)",
"start": [
74,
1
],
"end": [
76,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.fst_pred_mem_erase_of_mem_right",
"code": "theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :\n (m.1 - 1, m.2) ∈ b.erase m",
"start": [
79,
1
],
"end": [
83,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.snd_pred_mem_erase_of_mem_left",
"code": "theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :\n (m.1, m.2 - 1) ∈ b.erase m",
"start": [
86,
1
],
"end": [
90,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.card_of_mem_left",
"code": "theorem card_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : 2 ≤ Finset.card b",
"start": [
93,
1
],
"end": [
98,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.card_of_mem_right",
"code": "theorem card_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : 2 ≤ Finset.card b",
"start": [
101,
1
],
"end": [
106,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveLeft_card",
"code": "theorem moveLeft_card {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :\n Finset.card (moveLeft b m) + 2 = Finset.card b",
"start": [
109,
1
],
"end": [
114,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveRight_card",
"code": "theorem moveRight_card {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :\n Finset.card (moveRight b m) + 2 = Finset.card b",
"start": [
117,
1
],
"end": [
122,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveLeft_smaller",
"code": "theorem moveLeft_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :\n Finset.card (moveLeft b m) / 2 < Finset.card b / 2",
"start": [
125,
1
],
"end": [
126,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.moveRight_smaller",
"code": "theorem moveRight_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :\n Finset.card (moveRight b m) / 2 < Finset.card b / 2",
"start": [
129,
1
],
"end": [
130,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.Domineering.state",
"code": "instance state : State Board where\n turnBound s := s.card / 2\n l s := (left s).image (moveLeft s)\n r s := (right s).image (moveRight s)\n left_bound m := by\n simp only [Finset.mem_image, Prod.exists] at m\n rcases m with ⟨_, _, ⟨h, rfl⟩⟩\n exact moveLeft_smaller h\n right_bound m := by\n simp only [Finset.mem_image, Prod.exists] at m\n rcases m with ⟨_, _, ⟨h, rfl⟩⟩\n exact moveRight_smaller h",
"start": [
133,
1
],
"end": [
145,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.domineering",
"code": "def domineering (b : Domineering.Board) : PGame :=\n PGame.ofState b",
"start": [
150,
1
],
"end": [
152,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.shortDomineering",
"code": "instance shortDomineering (b : Domineering.Board) : Short (domineering b) := by\n dsimp [domineering]\n infer_instance",
"start": [
155,
1
],
"end": [
158,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.domineering.one",
"code": "def domineering.one :=\n domineering [(0, 0), (0, 1)].toFinset",
"start": [
161,
1
],
"end": [
163,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.domineering.L",
"code": "def domineering.L :=\n domineering [(0, 2), (0, 1), (0, 0), (1, 0)].toFinset",
"start": [
166,
1
],
"end": [
168,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.shortOne",
"code": "instance shortOne : Short domineering.one := by dsimp [domineering.one]; infer_instance",
"start": [
172,
1
],
"end": [
172,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "SetTheory.PGame.shortL",
"code": "instance shortL : Short domineering.L := by dsimp [domineering.L]; infer_instance",
"start": [
175,
1
],
"end": [
175,
82
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/RingHom/Finite.lean | [
"Mathlib/RingTheory/RingHomProperties.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "RingHom.finite_stableUnderComposition",
"code": "theorem finite_stableUnderComposition : StableUnderComposition @Finite",
"start": [
23,
1
],
"end": [
25,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.finite_respectsIso",
"code": "theorem finite_respectsIso : RespectsIso @Finite",
"start": [
28,
1
],
"end": [
31,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.finite_stableUnderBaseChange",
"code": "theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite",
"start": [
34,
1
],
"end": [
42,
22
],
"kind": "commanddeclaration"
}
] |
Mathlib/Lean/Json.lean | [
"Mathlib/Mathport/Rename.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [] |
Mathlib/Geometry/Manifold/IntegralCurve.lean | [
"Mathlib/Analysis/ODE/PicardLindelof.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/ODE/Gronwall.lean",
"Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean",
"Mathlib/Geometry/Manifold/InteriorBoundary.lean"
] | [
{
"full_name": "IsIntegralCurveOn",
"code": "def IsIntegralCurveOn (γ : ℝ → M) (v : (x : M) → TangentSpace I x) (s : Set ℝ) : Prop :=\n ∀ t ∈ s, HasMFDerivAt 𝓘(ℝ, ℝ) I γ t ((1 : ℝ →L[ℝ] ℝ).smulRight <| v (γ t))",
"start": [
70,
1
],
"end": [
74,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "IsIntegralCurveAt",
"code": "def IsIntegralCurveAt (γ : ℝ → M) (v : (x : M) → TangentSpace I x) (t₀ : ℝ) : Prop :=\n ∀ᶠ t in 𝓝 t₀, HasMFDerivAt 𝓘(ℝ, ℝ) I γ t ((1 : ℝ →L[ℝ] ℝ).smulRight <| v (γ t))",
"start": [
76,
1
],
"end": [
80,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "IsIntegralCurve",
"code": "def IsIntegralCurve (γ : ℝ → M) (v : (x : M) → TangentSpace I x) : Prop :=\n ∀ t : ℝ, HasMFDerivAt 𝓘(ℝ, ℝ) I γ t ((1 : ℝ →L[ℝ] ℝ).smulRight (v (γ t)))",
"start": [
82,
1
],
"end": [
85,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "IsIntegralCurve.isIntegralCurveOn",
"code": "lemma IsIntegralCurve.isIntegralCurveOn (h : IsIntegralCurve γ v) (s : Set ℝ) :\n IsIntegralCurveOn γ v s := fun t _ ↦ h t",
"start": [
89,
1
],
"end": [
90,
45
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurve_iff_isIntegralCurveOn",
"code": "lemma isIntegralCurve_iff_isIntegralCurveOn : IsIntegralCurve γ v ↔ IsIntegralCurveOn γ v univ :=\n ⟨fun h ↦ h.isIntegralCurveOn _, fun h t ↦ h t (mem_univ _)⟩",
"start": [
92,
1
],
"end": [
93,
62
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveAt_iff",
"code": "lemma isIntegralCurveAt_iff :\n IsIntegralCurveAt γ v t₀ ↔ ∃ s ∈ 𝓝 t₀, IsIntegralCurveOn γ v s := by\n simp_rw [IsIntegralCurveOn, ← Filter.eventually_iff_exists_mem, IsIntegralCurveAt]",
"start": [
95,
1
],
"end": [
97,
85
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveAt_iff'",
"code": "lemma isIntegralCurveAt_iff' :\n IsIntegralCurveAt γ v t₀ ↔ ∃ ε > 0, IsIntegralCurveOn γ v (Metric.ball t₀ ε) := by\n simp_rw [IsIntegralCurveOn, ← Metric.eventually_nhds_iff_ball, IsIntegralCurveAt]",
"start": [
99,
1
],
"end": [
103,
84
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurve.isIntegralCurveAt",
"code": "lemma IsIntegralCurve.isIntegralCurveAt (h : IsIntegralCurve γ v) (t : ℝ) :\n IsIntegralCurveAt γ v t := isIntegralCurveAt_iff.mpr ⟨univ, Filter.univ_mem, fun t _ ↦ h t⟩",
"start": [
105,
1
],
"end": [
106,
96
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurve_iff_isIntegralCurveAt",
"code": "lemma isIntegralCurve_iff_isIntegralCurveAt :\n IsIntegralCurve γ v ↔ ∀ t : ℝ, IsIntegralCurveAt γ v t :=\n ⟨fun h ↦ h.isIntegralCurveAt, fun h t ↦ by\n obtain ⟨s, hs, h⟩ := isIntegralCurveAt_iff.mp (h t)\n exact h t (mem_of_mem_nhds hs)⟩",
"start": [
108,
1
],
"end": [
112,
36
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.mono",
"code": "lemma IsIntegralCurveOn.mono (h : IsIntegralCurveOn γ v s) (hs : s' ⊆ s) :\n IsIntegralCurveOn γ v s' := fun t ht ↦ h t (mem_of_mem_of_subset ht hs)",
"start": [
114,
1
],
"end": [
115,
76
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.of_union",
"code": "lemma IsIntegralCurveOn.of_union (h : IsIntegralCurveOn γ v s) (h' : IsIntegralCurveOn γ v s') :\n IsIntegralCurveOn γ v (s ∪ s') := fun _ ↦ fun | .inl ht => h _ ht | .inr ht => h' _ ht",
"start": [
117,
1
],
"end": [
118,
91
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.hasMFDerivAt",
"code": "lemma IsIntegralCurveAt.hasMFDerivAt (h : IsIntegralCurveAt γ v t₀) :\n HasMFDerivAt 𝓘(ℝ, ℝ) I γ t₀ ((1 : ℝ →L[ℝ] ℝ).smulRight (v (γ t₀))) :=\n have ⟨_, hs, h⟩ := isIntegralCurveAt_iff.mp h\n h t₀ (mem_of_mem_nhds hs)",
"start": [
120,
1
],
"end": [
123,
28
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.isIntegralCurveAt",
"code": "lemma IsIntegralCurveOn.isIntegralCurveAt (h : IsIntegralCurveOn γ v s) (hs : s ∈ 𝓝 t₀) :\n IsIntegralCurveAt γ v t₀ := isIntegralCurveAt_iff.mpr ⟨s, hs, h⟩",
"start": [
125,
1
],
"end": [
126,
69
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.isIntegralCurveOn",
"code": "lemma IsIntegralCurveAt.isIntegralCurveOn (h : ∀ t ∈ s, IsIntegralCurveAt γ v t) :\n IsIntegralCurveOn γ v s := by\n intros t ht\n obtain ⟨s, hs, h⟩ := isIntegralCurveAt_iff.mp (h t ht)\n exact h t (mem_of_mem_nhds hs)",
"start": [
128,
1
],
"end": [
133,
33
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveOn_iff_isIntegralCurveAt",
"code": "lemma isIntegralCurveOn_iff_isIntegralCurveAt (hs : IsOpen s) :\n IsIntegralCurveOn γ v s ↔ ∀ t ∈ s, IsIntegralCurveAt γ v t :=\n ⟨fun h _ ht ↦ h.isIntegralCurveAt (hs.mem_nhds ht), IsIntegralCurveAt.isIntegralCurveOn⟩",
"start": [
135,
1
],
"end": [
137,
91
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.continuousAt",
"code": "lemma IsIntegralCurveOn.continuousAt (hγ : IsIntegralCurveOn γ v s) (ht : t₀ ∈ s) :\n ContinuousAt γ t₀ := (hγ t₀ ht).1",
"start": [
139,
1
],
"end": [
140,
38
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.continuousOn",
"code": "lemma IsIntegralCurveOn.continuousOn (hγ : IsIntegralCurveOn γ v s) :\n ContinuousOn γ s := fun t ht ↦ (hγ t ht).1.continuousWithinAt",
"start": [
142,
1
],
"end": [
143,
66
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.continuousAt",
"code": "lemma IsIntegralCurveAt.continuousAt (hγ : IsIntegralCurveAt γ v t₀) :\n ContinuousAt γ t₀ :=\n have ⟨_, hs, hγ⟩ := isIntegralCurveAt_iff.mp hγ\n hγ.continuousAt <| mem_of_mem_nhds hs",
"start": [
145,
1
],
"end": [
148,
40
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurve.continuous",
"code": "lemma IsIntegralCurve.continuous (hγ : IsIntegralCurve γ v) : Continuous γ :=\n continuous_iff_continuousAt.mpr fun _ ↦ (hγ.isIntegralCurveOn univ).continuousAt (mem_univ _)",
"start": [
150,
1
],
"end": [
151,
96
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.hasDerivAt",
"code": "lemma IsIntegralCurveOn.hasDerivAt (hγ : IsIntegralCurveOn γ v s) {t : ℝ} (ht : t ∈ s)\n (hsrc : γ t ∈ (extChartAt I (γ t₀)).source) :\n HasDerivAt ((extChartAt I (γ t₀)) ∘ γ)\n (tangentCoordChange I (γ t) (γ t₀) (γ t) (v (γ t))) t := by\n have hsrc := extChartAt_source I (γ t₀) ▸ hsrc\n rw [hasDerivAt_iff_hasFDerivAt, ← hasMFDerivAt_iff_hasFDerivAt]\n apply (HasMFDerivAt.comp t\n (hasMFDerivAt_extChartAt I hsrc) (hγ _ ht)).congr_mfderiv\n rw [ContinuousLinearMap.ext_iff]\n intro a\n rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.smulRight_apply, map_smul,\n ← ContinuousLinearMap.one_apply (R₁ := ℝ) a, ← ContinuousLinearMap.smulRight_apply,\n mfderiv_chartAt_eq_tangentCoordChange I hsrc]\n rfl",
"start": [
153,
1
],
"end": [
169,
6
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.eventually_hasDerivAt",
"code": "lemma IsIntegralCurveAt.eventually_hasDerivAt (hγ : IsIntegralCurveAt γ v t₀) :\n ∀ᶠ t in 𝓝 t₀, HasDerivAt ((extChartAt I (γ t₀)) ∘ γ)\n (tangentCoordChange I (γ t) (γ t₀) (γ t) (v (γ t))) t := by\n apply eventually_mem_nhds.mpr\n (hγ.continuousAt.preimage_mem_nhds (extChartAt_source_mem_nhds I _)) |>.and hγ |>.mono\n rintro t ⟨ht1, ht2⟩\n have hsrc := mem_of_mem_nhds ht1\n rw [mem_preimage, extChartAt_source I (γ t₀)] at hsrc\n rw [hasDerivAt_iff_hasFDerivAt, ← hasMFDerivAt_iff_hasFDerivAt]\n apply (HasMFDerivAt.comp t (hasMFDerivAt_extChartAt I hsrc) ht2).congr_mfderiv\n rw [ContinuousLinearMap.ext_iff]\n intro a\n rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.smulRight_apply, map_smul,\n ← ContinuousLinearMap.one_apply (R₁ := ℝ) a, ← ContinuousLinearMap.smulRight_apply,\n mfderiv_chartAt_eq_tangentCoordChange I hsrc]\n rfl",
"start": [
171,
1
],
"end": [
186,
6
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.comp_add",
"code": "lemma IsIntegralCurveOn.comp_add (hγ : IsIntegralCurveOn γ v s) (dt : ℝ) :\n IsIntegralCurveOn (γ ∘ (· + dt)) v { t | t + dt ∈ s } := by\n intros t ht\n rw [comp_apply, ← ContinuousLinearMap.comp_id (ContinuousLinearMap.smulRight 1 (v (γ (t + dt))))]\n apply HasMFDerivAt.comp t (hγ (t + dt) ht)\n refine ⟨(continuous_add_right _).continuousAt, ?_⟩\n simp only [mfld_simps, hasFDerivWithinAt_univ]\n exact HasFDerivAt.add_const (hasFDerivAt_id _) _",
"start": [
192,
1
],
"end": [
199,
51
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveOn_comp_add",
"code": "lemma isIntegralCurveOn_comp_add {dt : ℝ} :\n IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· + dt)) v { t | t + dt ∈ s } := by\n refine ⟨fun hγ ↦ hγ.comp_add _, fun hγ ↦ ?_⟩\n convert hγ.comp_add (-dt)\n · ext t\n simp only [Function.comp_apply, neg_add_cancel_right]\n · simp only [mem_setOf_eq, neg_add_cancel_right, setOf_mem_eq]",
"start": [
201,
1
],
"end": [
207,
65
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.comp_add",
"code": "lemma IsIntegralCurveAt.comp_add (hγ : IsIntegralCurveAt γ v t₀) (dt : ℝ) :\n IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt) := by\n rw [isIntegralCurveAt_iff'] at *\n obtain ⟨ε, hε, h⟩ := hγ\n refine ⟨ε, hε, ?_⟩\n convert h.comp_add dt\n ext t\n rw [mem_setOf_eq, Metric.mem_ball, Metric.mem_ball, dist_sub_eq_dist_add_right]",
"start": [
209,
1
],
"end": [
216,
82
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveAt_comp_add",
"code": "lemma isIntegralCurveAt_comp_add {dt : ℝ} :\n IsIntegralCurveAt γ v t₀ ↔ IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt) := by\n refine ⟨fun hγ ↦ hγ.comp_add _, fun hγ ↦ ?_⟩\n convert hγ.comp_add (-dt)\n · ext t\n simp only [Function.comp_apply, neg_add_cancel_right]\n · simp only [sub_neg_eq_add, sub_add_cancel]",
"start": [
218,
1
],
"end": [
224,
47
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurve.comp_add",
"code": "lemma IsIntegralCurve.comp_add (hγ : IsIntegralCurve γ v) (dt : ℝ) :\n IsIntegralCurve (γ ∘ (· + dt)) v := by\n rw [isIntegralCurve_iff_isIntegralCurveOn] at *\n exact hγ.comp_add _",
"start": [
226,
1
],
"end": [
229,
22
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurve_comp_add",
"code": "lemma isIntegralCurve_comp_add {dt : ℝ} :\n IsIntegralCurve γ v ↔ IsIntegralCurve (γ ∘ (· + dt)) v := by\n refine ⟨fun hγ ↦ hγ.comp_add _, fun hγ ↦ ?_⟩\n convert hγ.comp_add (-dt)\n ext t\n simp only [Function.comp_apply, neg_add_cancel_right]",
"start": [
231,
1
],
"end": [
236,
56
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveOn.comp_mul",
"code": "lemma IsIntegralCurveOn.comp_mul (hγ : IsIntegralCurveOn γ v s) (a : ℝ) :\n IsIntegralCurveOn (γ ∘ (· * a)) (a • v) { t | t * a ∈ s } := by\n intros t ht\n rw [comp_apply, Pi.smul_apply, ← ContinuousLinearMap.smulRight_comp]\n refine HasMFDerivAt.comp t (hγ (t * a) ht) ⟨(continuous_mul_right _).continuousAt, ?_⟩\n simp only [mfld_simps, hasFDerivWithinAt_univ]\n exact HasFDerivAt.mul_const' (hasFDerivAt_id _) _",
"start": [
244,
1
],
"end": [
250,
52
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveOn_comp_mul_ne_zero",
"code": "lemma isIntegralCurveOn_comp_mul_ne_zero {a : ℝ} (ha : a ≠ 0) :\n IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· * a)) (a • v) { t | t * a ∈ s } := by\n refine ⟨fun hγ ↦ hγ.comp_mul a, fun hγ ↦ ?_⟩\n convert hγ.comp_mul a⁻¹\n · ext t\n simp only [Function.comp_apply, mul_assoc, inv_mul_eq_div, div_self ha, mul_one]\n · simp only [smul_smul, inv_mul_eq_div, div_self ha, one_smul]\n · simp only [mem_setOf_eq, mul_assoc, inv_mul_eq_div, div_self ha, mul_one, setOf_mem_eq]",
"start": [
252,
1
],
"end": [
259,
92
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurveAt.comp_mul_ne_zero",
"code": "lemma IsIntegralCurveAt.comp_mul_ne_zero (hγ : IsIntegralCurveAt γ v t₀) {a : ℝ} (ha : a ≠ 0) :\n IsIntegralCurveAt (γ ∘ (· * a)) (a • v) (t₀ / a) := by\n rw [isIntegralCurveAt_iff'] at *\n obtain ⟨ε, hε, h⟩ := hγ\n refine ⟨ε / |a|, by positivity, ?_⟩\n convert h.comp_mul a\n ext t\n rw [mem_setOf_eq, Metric.mem_ball, Metric.mem_ball, Real.dist_eq, Real.dist_eq,\n lt_div_iff (abs_pos.mpr ha), ← abs_mul, sub_mul, div_mul_cancel₀ _ ha]",
"start": [
261,
1
],
"end": [
269,
75
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveAt_comp_mul_ne_zero",
"code": "lemma isIntegralCurveAt_comp_mul_ne_zero {a : ℝ} (ha : a ≠ 0) :\n IsIntegralCurveAt γ v t₀ ↔ IsIntegralCurveAt (γ ∘ (· * a)) (a • v) (t₀ / a) := by\n refine ⟨fun hγ ↦ hγ.comp_mul_ne_zero ha, fun hγ ↦ ?_⟩\n convert hγ.comp_mul_ne_zero (inv_ne_zero ha)\n · ext t\n simp only [Function.comp_apply, mul_assoc, inv_mul_eq_div, div_self ha, mul_one]\n · simp only [smul_smul, inv_mul_eq_div, div_self ha, one_smul]\n · simp only [div_inv_eq_mul, div_mul_cancel₀ _ ha]",
"start": [
271,
1
],
"end": [
278,
53
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurve.comp_mul",
"code": "lemma IsIntegralCurve.comp_mul (hγ : IsIntegralCurve γ v) (a : ℝ) :\n IsIntegralCurve (γ ∘ (· * a)) (a • v) := by\n rw [isIntegralCurve_iff_isIntegralCurveOn] at *\n exact hγ.comp_mul _",
"start": [
280,
1
],
"end": [
283,
22
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurve_comp_mul_ne_zero",
"code": "lemma isIntegralCurve_comp_mul_ne_zero {a : ℝ} (ha : a ≠ 0) :\n IsIntegralCurve γ v ↔ IsIntegralCurve (γ ∘ (· * a)) (a • v) := by\n refine ⟨fun hγ ↦ hγ.comp_mul _, fun hγ ↦ ?_⟩\n convert hγ.comp_mul a⁻¹\n · ext t\n simp only [Function.comp_apply, mul_assoc, inv_mul_eq_div, div_self ha, mul_one]\n · simp only [smul_smul, inv_mul_eq_div, div_self ha, one_smul]",
"start": [
285,
1
],
"end": [
291,
65
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurve_const",
"code": "lemma isIntegralCurve_const {x : M} (h : v x = 0) : IsIntegralCurve (fun _ ↦ x) v := by\n intro t\n rw [h, ← ContinuousLinearMap.zero_apply (R₁ := ℝ) (R₂ := ℝ) (1 : ℝ),\n ContinuousLinearMap.smulRight_one_one]\n exact hasMFDerivAt_const ..",
"start": [
293,
1
],
"end": [
299,
30
],
"kind": "lemma"
},
{
"full_name": "exists_isIntegralCurveAt_of_contMDiffAt",
"code": "theorem exists_isIntegralCurveAt_of_contMDiffAt\n (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) x₀)\n (hx : I.IsInteriorPoint x₀) :\n ∃ γ : ℝ → M, γ t₀ = x₀ ∧ IsIntegralCurveAt γ v t₀",
"start": [
309,
1
],
"end": [
361,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "exists_isIntegralCurveAt_of_contMDiffAt_boundaryless",
"code": "lemma exists_isIntegralCurveAt_of_contMDiffAt_boundaryless [BoundarylessManifold I M]\n (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) x₀) :\n ∃ γ : ℝ → M, γ t₀ = x₀ ∧ IsIntegralCurveAt γ v t₀ :=\n exists_isIntegralCurveAt_of_contMDiffAt t₀ hv (BoundarylessManifold.isInteriorPoint I)",
"start": [
363,
1
],
"end": [
368,
89
],
"kind": "lemma"
},
{
"full_name": "isIntegralCurveAt_eventuallyEq_of_contMDiffAt",
"code": "theorem isIntegralCurveAt_eventuallyEq_of_contMDiffAt (hγt₀ : I.IsInteriorPoint (γ t₀))\n (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) (γ t₀))\n (hγ : IsIntegralCurveAt γ v t₀) (hγ' : IsIntegralCurveAt γ' v t₀) (h : γ t₀ = γ' t₀) :\n γ =ᶠ[𝓝 t₀] γ'",
"start": [
372,
1
],
"end": [
419,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "isIntegralCurveAt_eventuallyEq_of_contMDiffAt_boundaryless",
"code": "theorem isIntegralCurveAt_eventuallyEq_of_contMDiffAt_boundaryless [BoundarylessManifold I M]\n (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) (γ t₀))\n (hγ : IsIntegralCurveAt γ v t₀) (hγ' : IsIntegralCurveAt γ' v t₀) (h : γ t₀ = γ' t₀) :\n γ =ᶠ[𝓝 t₀] γ'",
"start": [
421,
1
],
"end": [
425,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "isIntegralCurveOn_Ioo_eqOn_of_contMDiff",
"code": "theorem isIntegralCurveOn_Ioo_eqOn_of_contMDiff (ht₀ : t₀ ∈ Ioo a b)\n (hγt : ∀ t ∈ Ioo a b, I.IsInteriorPoint (γ t))\n (hv : ContMDiff I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)))\n (hγ : IsIntegralCurveOn γ v (Ioo a b)) (hγ' : IsIntegralCurveOn γ' v (Ioo a b))\n (h : γ t₀ = γ' t₀) : EqOn γ γ' (Ioo a b)",
"start": [
429,
1
],
"end": [
469,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "isIntegralCurveOn_Ioo_eqOn_of_contMDiff_boundaryless",
"code": "theorem isIntegralCurveOn_Ioo_eqOn_of_contMDiff_boundaryless [BoundarylessManifold I M]\n (ht₀ : t₀ ∈ Ioo a b)\n (hv : ContMDiff I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)))\n (hγ : IsIntegralCurveOn γ v (Ioo a b)) (hγ' : IsIntegralCurveOn γ' v (Ioo a b))\n (h : γ t₀ = γ' t₀) : EqOn γ γ' (Ioo a b)",
"start": [
471,
1
],
"end": [
477,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "isIntegralCurve_eq_of_contMDiff",
"code": "theorem isIntegralCurve_eq_of_contMDiff (hγt : ∀ t, I.IsInteriorPoint (γ t))\n (hv : ContMDiff I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)))\n (hγ : IsIntegralCurve γ v) (hγ' : IsIntegralCurve γ' v) (h : γ t₀ = γ' t₀) : γ = γ'",
"start": [
479,
1
],
"end": [
495,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "isIntegralCurve_Ioo_eq_of_contMDiff_boundaryless",
"code": "theorem isIntegralCurve_Ioo_eq_of_contMDiff_boundaryless [BoundarylessManifold I M]\n (hv : ContMDiff I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)))\n (hγ : IsIntegralCurve γ v) (hγ' : IsIntegralCurve γ' v) (h : γ t₀ = γ' t₀) : γ = γ'",
"start": [
497,
1
],
"end": [
500,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "IsIntegralCurve.periodic_of_eq",
"code": "lemma IsIntegralCurve.periodic_of_eq [BoundarylessManifold I M]\n (hγ : IsIntegralCurve γ v)\n (hv : ContMDiff I I.tangent 1 (fun x => (⟨x, v x⟩ : TangentBundle I M)))\n (heq : γ a = γ b) : Periodic γ (a - b) := by\n intro t\n apply congrFun <|\n isIntegralCurve_Ioo_eq_of_contMDiff_boundaryless (t₀ := b) hv (hγ.comp_add _) hγ _\n rw [comp_apply, add_sub_cancel, heq]",
"start": [
502,
1
],
"end": [
511,
39
],
"kind": "lemma"
},
{
"full_name": "IsIntegralCurve.periodic_xor_injective",
"code": "lemma IsIntegralCurve.periodic_xor_injective [BoundarylessManifold I M]\n (hγ : IsIntegralCurve γ v)\n (hv : ContMDiff I I.tangent 1 (fun x => (⟨x, v x⟩ : TangentBundle I M))) :\n Xor' (∃ T > 0, Periodic γ T) (Injective γ) := by\n rw [xor_iff_iff_not]\n refine ⟨fun ⟨T, hT, hf⟩ ↦ hf.not_injective (ne_of_gt hT), ?_⟩\n intro h\n rw [Injective] at h\n push_neg at h\n obtain ⟨a, b, heq, hne⟩ := h\n refine ⟨|a - b|, ?_, ?_⟩\n · rw [gt_iff_lt, abs_pos, sub_ne_zero]\n exact hne\n · by_cases hab : a - b < 0\n · rw [abs_of_neg hab, neg_sub]\n exact hγ.periodic_of_eq hv heq.symm\n · rw [not_lt] at hab\n rw [abs_of_nonneg hab]\n exact hγ.periodic_of_eq hv heq",
"start": [
513,
1
],
"end": [
532,
37
],
"kind": "lemma"
}
] |
Mathlib/Data/MLList/Dedup.lean | [
".lake/packages/lean4/src/lean/Init.lean",
".lake/packages/batteries/Batteries/Data/HashMap/Basic.lean",
".lake/packages/batteries/Batteries/Data/MLList/Basic.lean"
] | [
{
"full_name": "MLList.dedupBy",
"code": "def dedupBy (L : MLList m α) (f : α → m β) : MLList m α :=\n ((L.liftM : MLList (StateT (HashMap β Unit) m) α) >>= fun a => do\n let b ← f a\n guard !(← get).contains b\n modify fun s => s.insert b ()\n pure a)\n |>.runState' ∅",
"start": [
21,
1
],
"end": [
29,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "MLList.dedup",
"code": "def dedup (L : MLList m β) : MLList m β :=\n L.dedupBy (fun b => pure b)",
"start": [
31,
1
],
"end": [
33,
30
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ContDiff.lean | [
"Mathlib/Analysis/Calculus/ContDiff/RCLike.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/Calculus/ContDiff/Basic.lean",
"Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean"
] | [
{
"full_name": "ContDiffAt.toPartialHomeomorph",
"code": "def toPartialHomeomorph {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a) (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a)\n (hn : 1 ≤ n) : PartialHomeomorph E F :=\n (hf.hasStrictFDerivAt' hf' hn).toPartialHomeomorph f",
"start": [
25,
1
],
"end": [
29,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.toPartialHomeomorph_coe",
"code": "@[simp]\ntheorem toPartialHomeomorph_coe {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)\n (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :\n (hf.toPartialHomeomorph f hf' hn : E → F) = f",
"start": [
34,
1
],
"end": [
38,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.mem_toPartialHomeomorph_source",
"code": "theorem mem_toPartialHomeomorph_source {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)\n (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :\n a ∈ (hf.toPartialHomeomorph f hf' hn).source",
"start": [
41,
1
],
"end": [
44,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.image_mem_toPartialHomeomorph_target",
"code": "theorem image_mem_toPartialHomeomorph_target {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)\n (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :\n f a ∈ (hf.toPartialHomeomorph f hf' hn).target",
"start": [
47,
1
],
"end": [
50,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.localInverse",
"code": "def localInverse {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a) (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a)\n (hn : 1 ≤ n) : F → E :=\n (hf.hasStrictFDerivAt' hf' hn).localInverse f f' a",
"start": [
53,
1
],
"end": [
57,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.localInverse_apply_image",
"code": "theorem localInverse_apply_image {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)\n (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) : hf.localInverse hf' hn (f a) = a",
"start": [
60,
1
],
"end": [
62,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "ContDiffAt.to_localInverse",
"code": "theorem to_localInverse {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)\n (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :\n ContDiffAt 𝕂 n (hf.localInverse hf' hn) (f a)",
"start": [
65,
1
],
"end": [
75,
15
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/WittVector/Compare.lean | [
"Mathlib/NumberTheory/Padics/RingHoms.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/WittVector/Identities.lean",
"Mathlib/RingTheory/WittVector/Truncated.lean"
] | [
{
"full_name": "TruncatedWittVector.eq_of_le_of_cast_pow_eq_zero",
"code": "theorem eq_of_le_of_cast_pow_eq_zero [CharP R p] (i : ℕ) (hin : i ≤ n)\n (hpi : (p : TruncatedWittVector p n R) ^ i = 0) : i = n",
"start": [
43,
1
],
"end": [
53,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.card_zmod",
"code": "theorem card_zmod : Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n",
"start": [
60,
1
],
"end": [
61,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.charP_zmod",
"code": "theorem charP_zmod : CharP (TruncatedWittVector p n (ZMod p)) (p ^ n)",
"start": [
64,
1
],
"end": [
65,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.zmodEquivTrunc",
"code": "def zmodEquivTrunc : ZMod (p ^ n) ≃+* TruncatedWittVector p n (ZMod p) :=\n ZMod.ringEquiv (TruncatedWittVector p n (ZMod p)) (card_zmod _ _)",
"start": [
70,
1
],
"end": [
76,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.zmodEquivTrunc_apply",
"code": "theorem zmodEquivTrunc_apply {x : ZMod (p ^ n)} :\n zmodEquivTrunc p n x = ZMod.castHom (by rfl) (TruncatedWittVector p n (ZMod p)) x",
"start": [
79,
1
],
"end": [
81,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.commutes",
"code": "theorem commutes {m : ℕ} (hm : n ≤ m) :\n (truncate hm).comp (zmodEquivTrunc p m).toRingHom =\n (zmodEquivTrunc p n).toRingHom.comp (ZMod.castHom (pow_dvd_pow p hm) _)",
"start": [
84,
1
],
"end": [
99,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.commutes'",
"code": "theorem commutes' {m : ℕ} (hm : n ≤ m) (x : ZMod (p ^ m)) :\n truncate hm (zmodEquivTrunc p m x) = zmodEquivTrunc p n (ZMod.castHom (pow_dvd_pow p hm) _ x)",
"start": [
102,
1
],
"end": [
104,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.commutes_symm'",
"code": "theorem commutes_symm' {m : ℕ} (hm : n ≤ m) (x : TruncatedWittVector p m (ZMod p)) :\n (zmodEquivTrunc p n).symm (truncate hm x) =\n ZMod.castHom (pow_dvd_pow p hm) _ ((zmodEquivTrunc p m).symm x)",
"start": [
107,
1
],
"end": [
112,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "TruncatedWittVector.commutes_symm",
"code": "theorem commutes_symm {m : ℕ} (hm : n ≤ m) :\n (zmodEquivTrunc p n).symm.toRingHom.comp (truncate hm) =\n (ZMod.castHom (pow_dvd_pow p hm) _).comp (zmodEquivTrunc p m).symm.toRingHom",
"start": [
115,
1
],
"end": [
130,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.toZModPow",
"code": "def toZModPow (k : ℕ) : 𝕎 (ZMod p) →+* ZMod (p ^ k) :=\n (zmodEquivTrunc p k).symm.toRingHom.comp (truncate k)",
"start": [
143,
1
],
"end": [
146,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.toZModPow_compat",
"code": "theorem toZModPow_compat (m n : ℕ) (h : m ≤ n) :\n (ZMod.castHom (pow_dvd_pow p h) (ZMod (p ^ m))).comp (toZModPow p n) = toZModPow p m",
"start": [
149,
1
],
"end": [
157,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.toPadicInt",
"code": "def toPadicInt : 𝕎 (ZMod p) →+* ℤ_[p] :=\n PadicInt.lift <| toZModPow_compat p",
"start": [
160,
1
],
"end": [
164,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.zmodEquivTrunc_compat",
"code": "theorem zmodEquivTrunc_compat (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂) :\n (TruncatedWittVector.truncate hk).comp\n ((zmodEquivTrunc p k₂).toRingHom.comp (PadicInt.toZModPow k₂)) =\n (zmodEquivTrunc p k₁).toRingHom.comp (PadicInt.toZModPow k₁)",
"start": [
167,
1
],
"end": [
172,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.fromPadicInt",
"code": "def fromPadicInt : ℤ_[p] →+* 𝕎 (ZMod p) :=\n (WittVector.lift fun k => (zmodEquivTrunc p k).toRingHom.comp (PadicInt.toZModPow k)) <|\n zmodEquivTrunc_compat _",
"start": [
175,
1
],
"end": [
180,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.toPadicInt_comp_fromPadicInt",
"code": "theorem toPadicInt_comp_fromPadicInt : (toPadicInt p).comp (fromPadicInt p) = RingHom.id ℤ_[p]",
"start": [
183,
1
],
"end": [
189,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.toPadicInt_comp_fromPadicInt_ext",
"code": "theorem toPadicInt_comp_fromPadicInt_ext (x) :\n (toPadicInt p).comp (fromPadicInt p) x = RingHom.id ℤ_[p] x",
"start": [
192,
1
],
"end": [
194,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.fromPadicInt_comp_toPadicInt",
"code": "theorem fromPadicInt_comp_toPadicInt :\n (fromPadicInt p).comp (toPadicInt p) = RingHom.id (𝕎 (ZMod p))",
"start": [
197,
1
],
"end": [
203,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.fromPadicInt_comp_toPadicInt_ext",
"code": "theorem fromPadicInt_comp_toPadicInt_ext (x) :\n (fromPadicInt p).comp (toPadicInt p) x = RingHom.id (𝕎 (ZMod p)) x",
"start": [
206,
1
],
"end": [
208,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.equiv",
"code": "def equiv : 𝕎 (ZMod p) ≃+* ℤ_[p] where\n toFun := toPadicInt p\n invFun := fromPadicInt p\n left_inv := fromPadicInt_comp_toPadicInt_ext _\n right_inv := toPadicInt_comp_fromPadicInt_ext _\n map_mul' := RingHom.map_mul _\n map_add' := RingHom.map_add _",
"start": [
211,
1
],
"end": [
220,
32
],
"kind": "commanddeclaration"
}
] |
Mathlib/Combinatorics/SetFamily/LYM.lean | [
"Mathlib/Algebra/Order/Field/Rat.lean",
"Mathlib/Algebra/Field/Rat.lean",
"Mathlib/Combinatorics/Enumerative/DoubleCounting.lean",
"Mathlib/Combinatorics/SetFamily/Shadow.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/BigOperators/Ring.lean",
"Mathlib/Algebra/Order/Field/Basic.lean"
] | [
{
"full_name": "Finset.card_mul_le_card_shadow_mul",
"code": "theorem card_mul_le_card_shadow_mul (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :\n 𝒜.card * r ≤ (∂ 𝒜).card * (Fintype.card α - r + 1)",
"start": [
63,
1
],
"end": [
87,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.card_div_choose_le_card_shadow_div_choose",
"code": "theorem card_div_choose_le_card_shadow_div_choose (hr : r ≠ 0)\n (h𝒜 : (𝒜 : Set (Finset α)).Sized r) : (𝒜.card : 𝕜) / (Fintype.card α).choose r\n ≤ (∂ 𝒜).card / (Fintype.card α).choose (r - 1)",
"start": [
90,
1
],
"end": [
110,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.falling",
"code": "def falling : Finset (Finset α) :=\n 𝒜.sup <| powersetCard k",
"start": [
124,
1
],
"end": [
126,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.mem_falling",
"code": "theorem mem_falling : s ∈ falling k 𝒜 ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k",
"start": [
131,
1
],
"end": [
133,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.sized_falling",
"code": "theorem sized_falling : (falling k 𝒜 : Set (Finset α)).Sized k",
"start": [
138,
1
],
"end": [
138,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.slice_subset_falling",
"code": "theorem slice_subset_falling : 𝒜 # k ⊆ falling k 𝒜",
"start": [
141,
1
],
"end": [
142,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.falling_zero_subset",
"code": "theorem falling_zero_subset : falling 0 𝒜 ⊆ {∅}",
"start": [
145,
1
],
"end": [
146,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.slice_union_shadow_falling_succ",
"code": "theorem slice_union_shadow_falling_succ : 𝒜 # k ∪ ∂ (falling (k + 1) 𝒜) = falling k 𝒜",
"start": [
149,
1
],
"end": [
163,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.IsAntichain.disjoint_slice_shadow_falling",
"code": "theorem IsAntichain.disjoint_slice_shadow_falling {m n : ℕ}\n (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) : Disjoint (𝒜 # m) (∂ (falling n 𝒜))",
"start": [
168,
1
],
"end": [
177,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.le_card_falling_div_choose",
"code": "theorem le_card_falling_div_choose [Fintype α] (hk : k ≤ Fintype.card α)\n (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) :\n (∑ r ∈ range (k + 1),\n ((𝒜 # (Fintype.card α - r)).card : 𝕜) / (Fintype.card α).choose (Fintype.card α - r)) ≤\n (falling (Fintype.card α - k) 𝒜).card / (Fintype.card α).choose (Fintype.card α - k)",
"start": [
180,
1
],
"end": [
199,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.sum_card_slice_div_choose_le_one",
"code": "theorem sum_card_slice_div_choose_le_one [Fintype α]\n (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) :\n (∑ r ∈ range (Fintype.card α + 1), ((𝒜 # r).card : 𝕜) / (Fintype.card α).choose r) ≤ 1",
"start": [
206,
1
],
"end": [
218,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.IsAntichain.sperner",
"code": "theorem IsAntichain.sperner [Fintype α] {𝒜 : Finset (Finset α)}\n (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) :\n 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)",
"start": [
226,
1
],
"end": [
245,
33
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/RingHom/Surjective.lean | [
"Mathlib/RingTheory/LocalProperties.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "RingHom.surjective_stableUnderComposition",
"code": "theorem surjective_stableUnderComposition : StableUnderComposition surjective",
"start": [
26,
1
],
"end": [
27,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.surjective_respectsIso",
"code": "theorem surjective_respectsIso : RespectsIso surjective",
"start": [
30,
1
],
"end": [
33,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.surjective_stableUnderBaseChange",
"code": "theorem surjective_stableUnderBaseChange : StableUnderBaseChange surjective",
"start": [
36,
1
],
"end": [
45,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "RingHom.surjective_ofLocalizationSpan",
"code": "theorem surjective_ofLocalizationSpan : OfLocalizationSpan surjective",
"start": [
48,
1
],
"end": [
70,
18
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Convex/Cone/Proper.lean | [
"Mathlib/Analysis/InnerProductSpace/Adjoint.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/Convex/Cone/Closure.lean"
] | [
{
"full_name": "ProperCone",
"code": "structure ProperCone (𝕜 : Type*) (E : Type*) [OrderedSemiring 𝕜] [AddCommMonoid E]\n [TopologicalSpace E] [Module 𝕜 E] extends Submodule {c : 𝕜 // 0 ≤ c} E where\n isClosed' : IsClosed (carrier : Set E)",
"start": [
37,
1
],
"end": [
42,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.toPointedCone",
"code": "abbrev toPointedCone (C : ProperCone 𝕜 E) := C.toSubmodule",
"start": [
51,
1
],
"end": [
53,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.toPointedCone_injective",
"code": "theorem toPointedCone_injective : Function.Injective ((↑) : ProperCone 𝕜 E → PointedCone 𝕜 E)",
"start": [
66,
1
],
"end": [
67,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.ext",
"code": "@[ext]\ntheorem ext {S T : ProperCone 𝕜 E} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T",
"start": [
75,
1
],
"end": [
77,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_coe",
"code": "@[simp]\ntheorem mem_coe {x : E} {K : ProperCone 𝕜 E} : x ∈ (K : PointedCone 𝕜 E) ↔ x ∈ K",
"start": [
80,
1
],
"end": [
82,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.instZero",
"code": "instance instZero (K : ProperCone 𝕜 E) : Zero K := PointedCone.instZero (K.toSubmodule)",
"start": [
85,
1
],
"end": [
85,
88
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.nonempty",
"code": "protected theorem nonempty (K : ProperCone 𝕜 E) : (K : Set E).Nonempty",
"start": [
87,
1
],
"end": [
88,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.isClosed",
"code": "protected theorem isClosed (K : ProperCone 𝕜 E) : IsClosed (K : Set E)",
"start": [
91,
1
],
"end": [
92,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.positive",
"code": "def positive : ProperCone 𝕜 E where\n toSubmodule := PointedCone.positive 𝕜 E\n isClosed' := isClosed_Ici",
"start": [
103,
1
],
"end": [
107,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_positive",
"code": "@[simp]\ntheorem mem_positive {x : E} : x ∈ positive 𝕜 E ↔ 0 ≤ x",
"start": [
109,
1
],
"end": [
111,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.coe_positive",
"code": "@[simp]\ntheorem coe_positive : ↑(positive 𝕜 E) = ConvexCone.positive 𝕜 E",
"start": [
113,
1
],
"end": [
115,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_zero",
"code": "@[simp]\ntheorem mem_zero (x : E) : x ∈ (0 : ProperCone 𝕜 E) ↔ x = 0",
"start": [
131,
1
],
"end": [
133,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.coe_zero",
"code": "@[simp, norm_cast]\ntheorem coe_zero : ↑(0 : ProperCone 𝕜 E) = (0 : ConvexCone 𝕜 E)",
"start": [
136,
1
],
"end": [
138,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.pointed_zero",
"code": "theorem pointed_zero : ((0 : ProperCone 𝕜 E) : ConvexCone 𝕜 E).Pointed",
"start": [
141,
1
],
"end": [
142,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.pointed",
"code": "protected theorem pointed (K : ProperCone ℝ E) : (K : ConvexCone ℝ E).Pointed",
"start": [
153,
1
],
"end": [
154,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.map",
"code": "noncomputable def map (f : E →L[ℝ] F) (K : ProperCone ℝ E) : ProperCone ℝ F where\n toSubmodule := PointedCone.closure (PointedCone.map (f : E →ₗ[ℝ] F) ↑K)\n isClosed' := isClosed_closure",
"start": [
157,
1
],
"end": [
161,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.coe_map",
"code": "@[simp, norm_cast]\ntheorem coe_map (f : E →L[ℝ] F) (K : ProperCone ℝ E) :\n ↑(K.map f) = (PointedCone.map (f : E →ₗ[ℝ] F) ↑K).closure",
"start": [
164,
1
],
"end": [
167,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_map",
"code": "@[simp]\ntheorem mem_map {f : E →L[ℝ] F} {K : ProperCone ℝ E} {y : F} :\n y ∈ K.map f ↔ y ∈ (PointedCone.map (f : E →ₗ[ℝ] F) ↑K).closure",
"start": [
170,
1
],
"end": [
173,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.map_id",
"code": "@[simp]\ntheorem map_id (K : ProperCone ℝ E) : K.map (ContinuousLinearMap.id ℝ E) = K",
"start": [
176,
1
],
"end": [
178,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.dual",
"code": "def dual (K : ProperCone ℝ E) : ProperCone ℝ E where\n toSubmodule := PointedCone.dual (K : PointedCone ℝ E)\n isClosed' := isClosed_innerDualCone _",
"start": [
181,
1
],
"end": [
184,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.coe_dual",
"code": "@[simp, norm_cast]\ntheorem coe_dual (K : ProperCone ℝ E) : K.dual = (K : Set E).innerDualCone",
"start": [
187,
1
],
"end": [
189,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_dual",
"code": "@[simp]\ntheorem mem_dual {K : ProperCone ℝ E} {y : E} : y ∈ dual K ↔ ∀ ⦃x⦄, x ∈ K → 0 ≤ ⟪x, y⟫_ℝ",
"start": [
192,
1
],
"end": [
194,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.comap",
"code": "noncomputable def comap (f : E →L[ℝ] F) (S : ProperCone ℝ F) : ProperCone ℝ E where\n toSubmodule := PointedCone.comap (f : E →ₗ[ℝ] F) S\n isClosed' := by\n rw [PointedCone.comap]\n apply IsClosed.preimage f.2 S.isClosed",
"start": [
197,
1
],
"end": [
202,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.coe_comap",
"code": "@[simp]\ntheorem coe_comap (f : E →L[ℝ] F) (S : ProperCone ℝ F) : (S.comap f : Set E) = f ⁻¹' S",
"start": [
205,
1
],
"end": [
207,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.comap_id",
"code": "@[simp]\ntheorem comap_id (S : ConvexCone ℝ E) : S.comap LinearMap.id = S",
"start": [
210,
1
],
"end": [
212,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.comap_comap",
"code": "theorem comap_comap (g : F →L[ℝ] G) (f : E →L[ℝ] F) (S : ProperCone ℝ G) :\n (S.comap g).comap f = S.comap (g.comp f)",
"start": [
215,
1
],
"end": [
217,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.mem_comap",
"code": "@[simp]\ntheorem mem_comap {f : E →L[ℝ] F} {S : ProperCone ℝ F} {x : E} : x ∈ S.comap f ↔ f x ∈ S",
"start": [
220,
1
],
"end": [
222,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.dual_dual",
"code": "@[simp]\ntheorem dual_dual (K : ProperCone ℝ E) : K.dual.dual = K",
"start": [
232,
1
],
"end": [
236,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.hyperplane_separation",
"code": "theorem hyperplane_separation (K : ProperCone ℝ E) {f : E →L[ℝ] F} {b : F} :\n b ∈ K.map f ↔ ∀ y : F, adjoint f y ∈ K.dual → 0 ≤ ⟪y, b⟫_ℝ",
"start": [
239,
1
],
"end": [
283,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "ProperCone.hyperplane_separation_of_nmem",
"code": "theorem hyperplane_separation_of_nmem (K : ProperCone ℝ E) {f : E →L[ℝ] F} {b : F}\n (disj : b ∉ K.map f) : ∃ y : F, adjoint f y ∈ K.dual ∧ ⟪y, b⟫_ℝ < 0",
"start": [
286,
1
],
"end": [
288,
50
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/SpecialFunctions/Log/ENNReal.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean",
"Mathlib/Topology/Instances/EReal.lean"
] | [
{
"full_name": "ENNReal.log",
"code": "noncomputable def log (x : ℝ≥0∞) : EReal :=\n if x = 0 then ⊥\n else if x = ⊤ then ⊤\n else Real.log (ENNReal.toReal x)",
"start": [
42,
1
],
"end": [
50,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_zero",
"code": "@[simp]\ntheorem log_zero : log 0 = ⊥",
"start": [
52,
1
],
"end": [
53,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_one",
"code": "@[simp]\ntheorem log_one : log 1 = 0",
"start": [
55,
1
],
"end": [
56,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_top",
"code": "@[simp]\ntheorem log_top : log ⊤ = ⊤",
"start": [
58,
1
],
"end": [
59,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_pos_real",
"code": "theorem log_pos_real {x : ℝ≥0∞} (h : x ≠ 0) (h' : x ≠ ⊤) :\n log x = Real.log (ENNReal.toReal x)",
"start": [
61,
1
],
"end": [
62,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_pos_real'",
"code": "theorem log_pos_real' {x : ℝ≥0∞} (h : 0 < x.toReal) :\n log x = Real.log (ENNReal.toReal x)",
"start": [
64,
1
],
"end": [
67,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_of_nnreal",
"code": "theorem log_of_nnreal {x : ℝ≥0} (h : x ≠ 0) :\n log (x : ℝ≥0∞) = Real.log x",
"start": [
69,
1
],
"end": [
70,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_strictMono",
"code": "theorem log_strictMono : StrictMono log",
"start": [
77,
1
],
"end": [
96,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_monotone",
"code": "theorem log_monotone : Monotone log",
"start": [
98,
1
],
"end": [
98,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_injective",
"code": "theorem log_injective : Function.Injective log",
"start": [
100,
1
],
"end": [
100,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_surjective",
"code": "theorem log_surjective : Function.Surjective log",
"start": [
102,
1
],
"end": [
112,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_bijective",
"code": "theorem log_bijective : Function.Bijective log",
"start": [
114,
1
],
"end": [
114,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_orderIso",
"code": "noncomputable def log_orderIso : ℝ≥0∞ ≃o EReal :=\n StrictMono.orderIsoOfSurjective log log_strictMono log_surjective",
"start": [
116,
1
],
"end": [
118,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_orderIso_apply",
"code": "@[simp] lemma log_orderIso_apply (x : ℝ≥0∞) : log_orderIso x = log x := rfl",
"start": [
120,
1
],
"end": [
120,
76
],
"kind": "lemma"
},
{
"full_name": "ENNReal.log_eq_iff",
"code": "@[simp]\ntheorem log_eq_iff {x y : ℝ≥0∞} : log x = log y ↔ x = y",
"start": [
122,
1
],
"end": [
124,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_eq_bot_iff",
"code": "@[simp]\ntheorem log_eq_bot_iff {x : ℝ≥0∞} : log x = ⊥ ↔ x = 0",
"start": [
126,
1
],
"end": [
127,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_eq_one_iff",
"code": "@[simp]\ntheorem log_eq_one_iff {x : ℝ≥0∞} : log x = 0 ↔ x = 1",
"start": [
129,
1
],
"end": [
130,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_eq_top_iff",
"code": "@[simp]\ntheorem log_eq_top_iff {x : ℝ≥0∞} : log x = ⊤ ↔ x = ⊤",
"start": [
132,
1
],
"end": [
133,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_lt_iff_lt",
"code": "@[simp]\ntheorem log_lt_iff_lt {x y : ℝ≥0∞} : log x < log y ↔ x < y",
"start": [
135,
1
],
"end": [
136,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_bot_lt_iff",
"code": "@[simp]\ntheorem log_bot_lt_iff {x : ℝ≥0∞} : ⊥ < log x ↔ 0 < x",
"start": [
138,
1
],
"end": [
139,
87
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_lt_top_iff",
"code": "@[simp]\ntheorem log_lt_top_iff {x : ℝ≥0∞} : log x < ⊤ ↔ x < ⊤",
"start": [
141,
1
],
"end": [
142,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_lt_one_iff",
"code": "@[simp]\ntheorem log_lt_one_iff {x : ℝ≥0∞} : log x < 0 ↔ x < 1",
"start": [
144,
1
],
"end": [
145,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_one_lt_iff",
"code": "@[simp]\ntheorem log_one_lt_iff {x : ℝ≥0∞} : 0 < log x ↔ 1 < x",
"start": [
147,
1
],
"end": [
148,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_le_iff_le",
"code": "@[simp]\ntheorem log_le_iff_le {x y : ℝ≥0∞} : log x ≤ log y ↔ x ≤ y",
"start": [
150,
1
],
"end": [
151,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_le_one_iff",
"code": "@[simp]\ntheorem log_le_one_iff (x : ℝ≥0∞) : log x ≤ 0 ↔ x ≤ 1",
"start": [
153,
1
],
"end": [
154,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_one_le_iff",
"code": "@[simp]\ntheorem log_one_le_iff {x : ℝ≥0∞} : 0 ≤ log x ↔ 1 ≤ x",
"start": [
156,
1
],
"end": [
157,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_mul_add",
"code": "theorem log_mul_add {x y : ℝ≥0∞} : log (x * y) = log x + log y",
"start": [
165,
1
],
"end": [
182,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_pow",
"code": "theorem log_pow {x : ℝ≥0∞} {n : ℕ} : log (x ^ n) = (n : ℝ≥0∞) * log x",
"start": [
184,
1
],
"end": [
195,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_rpow",
"code": "theorem log_rpow {x : ℝ≥0∞} {y : ℝ} : log (x ^ y) = y * log x",
"start": [
197,
1
],
"end": [
219,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_homeomorph",
"code": "noncomputable def log_homeomorph : ℝ≥0∞ ≃ₜ EReal := OrderIso.toHomeomorph log_orderIso",
"start": [
227,
1
],
"end": [
228,
87
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_homeomorph_apply",
"code": "@[simp] theorem log_homeomorph_apply (x : ℝ≥0∞) : log_homeomorph x = log x",
"start": [
230,
1
],
"end": [
230,
82
],
"kind": "commanddeclaration"
},
{
"full_name": "ENNReal.log_continuous",
"code": "@[continuity, fun_prop]\ntheorem log_continuous : Continuous log",
"start": [
232,
1
],
"end": [
233,
80
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/Localization/Finiteness.lean | [
"Mathlib/RingTheory/LocalProperties.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Module/LocalizedModuleIntegers.lean"
] | [
{
"full_name": "Module.Finite.of_isLocalizedModule",
"code": "lemma of_isLocalizedModule [Module.Finite R M] : Module.Finite Rₚ Mₚ := by\n obtain ⟨T, hT⟩ := ‹Module.Finite R M›\n use T.image f\n rw [eq_top_iff]\n rintro x -\n obtain ⟨⟨y, m⟩, (hyx : IsLocalizedModule.mk' f y m = x)⟩ :=\n IsLocalizedModule.mk'_surjective S f x\n have hy : y ∈ Submodule.span R T := by rw [hT]; trivial\n have : f y ∈ Submodule.map f (Submodule.span R T) := Submodule.mem_map_of_mem hy\n rw [Submodule.map_span] at this\n have H : Submodule.span R (f '' T) ≤\n (Submodule.span Rₚ (f '' T)).restrictScalars R := by\n rw [Submodule.span_le]; exact Submodule.subset_span\n convert (Submodule.span Rₚ (f '' T)).smul_mem\n (IsLocalization.mk' Rₚ (1 : R) m) (H this) using 1\n · rw [← hyx, ← IsLocalizedModule.mk'_one S, IsLocalizedModule.mk'_smul_mk']\n simp\n · simp",
"start": [
41,
1
],
"end": [
58,
9
],
"kind": "lemma"
},
{
"full_name": "Module.Finite.of_localizationSpan_finite'",
"code": "theorem of_localizationSpan_finite' (t : Finset R) (ht : Ideal.span (t : Set R) = ⊤)\n {Mₚ : ∀ (_ : t), Type*} [∀ (g : t), AddCommMonoid (Mₚ g)] [∀ (g : t), Module R (Mₚ g)]\n {Rₚ : ∀ (_ : t), Type u} [∀ (g : t), CommRing (Rₚ g)] [∀ (g : t), Algebra R (Rₚ g)]\n [∀ (g : t), IsLocalization.Away g.val (Rₚ g)]\n [∀ (g : t), Module (Rₚ g) (Mₚ g)] [∀ (g : t), IsScalarTower R (Rₚ g) (Mₚ g)]\n (f : ∀ (g : t), M →ₗ[R] Mₚ g) [∀ (g : t), IsLocalizedModule (Submonoid.powers g.val) (f g)]\n (H : ∀ (g : t), Module.Finite (Rₚ g) (Mₚ g)) :\n Module.Finite R M",
"start": [
64,
1
],
"end": [
99,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "Module.Finite.of_localizationSpan'",
"code": "theorem of_localizationSpan' (t : Set R) (ht : Ideal.span t = ⊤)\n {Mₚ : ∀ (_ : t), Type*} [∀ (g : t), AddCommMonoid (Mₚ g)] [∀ (g : t), Module R (Mₚ g)]\n {Rₚ : ∀ (_ : t), Type u} [∀ (g : t), CommRing (Rₚ g)] [∀ (g : t), Algebra R (Rₚ g)]\n [h₁ : ∀ (g : t), IsLocalization.Away g.val (Rₚ g)]\n [∀ (g : t), Module (Rₚ g) (Mₚ g)] [∀ (g : t), IsScalarTower R (Rₚ g) (Mₚ g)]\n (f : ∀ (g : t), M →ₗ[R] Mₚ g) [h₂ : ∀ (g : t), IsLocalizedModule (Submonoid.powers g.val) (f g)]\n (H : ∀ (g : t), Module.Finite (Rₚ g) (Mₚ g)) :\n Module.Finite R M",
"start": [
101,
1
],
"end": [
123,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "Module.Finite.of_localizationSpan_finite",
"code": "theorem of_localizationSpan_finite (t : Finset R) (ht : Ideal.span (t : Set R) = ⊤)\n (H : ∀ (g : t), Module.Finite (Localization.Away g.val)\n (LocalizedModule (Submonoid.powers g.val) M)) :\n Module.Finite R M",
"start": [
125,
1
],
"end": [
137,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "Module.Finite.of_localizationSpan",
"code": "theorem of_localizationSpan (t : Set R) (ht : Ideal.span t = ⊤)\n (H : ∀ (g : t), Module.Finite (Localization.Away g.val)\n (LocalizedModule (Submonoid.powers g.val) M)) :\n Module.Finite R M",
"start": [
139,
1
],
"end": [
147,
32
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Lie/Weights/RootSystem.lean | [
"Mathlib/Algebra/Lie/Weights/Killing.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/LinearAlgebra/RootSystem/Basic.lean"
] | [
{
"full_name": "LieAlgebra.IsKilling.chainLength_aux",
"code": "private lemma chainLength_aux {x} (hx : x ∈ rootSpace H (chainTop α β)) :\n ∃ n : ℕ, n • x = ⁅coroot α, x⁆ := by\n by_cases hx' : x = 0\n · exact ⟨0, by simp [hx']⟩\n obtain ⟨h, e, f, isSl2, he, hf⟩ := exists_isSl2Triple_of_weight_isNonZero hα\n obtain rfl := isSl2.h_eq_coroot hα he hf\n have : isSl2.HasPrimitiveVectorWith x (chainTop α β (coroot α)) :=\n have := lie_mem_weightSpace_of_mem_weightSpace he hx\n ⟨hx', by rw [← lie_eq_smul_of_mem_rootSpace hx]; rfl,\n by rwa [weightSpace_add_chainTop α β hα] at this⟩\n obtain ⟨μ, hμ⟩ := this.exists_nat\n exact ⟨μ, by rw [nsmul_eq_smul_cast K, ← hμ, lie_eq_smul_of_mem_rootSpace hx]⟩",
"start": [
45,
1
],
"end": [
56,
81
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength",
"code": "def chainLength (α β : Weight K H L) : ℕ :=\n letI := Classical.propDecidable\n if hα : α.IsZero then 0 else\n (chainLength_aux α β hα (chainTop α β).exists_ne_zero.choose_spec.1).choose",
"start": [
58,
1
],
"end": [
62,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_of_isZero",
"code": "lemma chainLength_of_isZero (hα : α.IsZero) : chainLength α β = 0 := dif_pos hα",
"start": [
64,
1
],
"end": [
64,
80
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_nsmul",
"code": "lemma chainLength_nsmul {x} (hx : x ∈ rootSpace H (chainTop α β)) :\n chainLength α β • x = ⁅coroot α, x⁆ := by\n by_cases hα : α.IsZero\n · rw [coroot_eq_zero_iff.mpr hα, chainLength_of_isZero _ _ hα, zero_smul, zero_lie]\n let x' := (chainTop α β).exists_ne_zero.choose\n have h : x' ∈ rootSpace H (chainTop α β) ∧ x' ≠ 0 :=\n (chainTop α β).exists_ne_zero.choose_spec\n obtain ⟨k, rfl⟩ : ∃ k : K, k • x' = x := by\n simpa using (finrank_eq_one_iff_of_nonzero' ⟨x', h.1⟩ (by simpa using h.2)).mp\n (finrank_rootSpace_eq_one _ (chainTop_isNonZero α β hα)) ⟨_, hx⟩\n rw [lie_smul, smul_comm, chainLength, dif_neg hα, (chainLength_aux α β hα h.1).choose_spec]",
"start": [
66,
1
],
"end": [
76,
94
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_smul",
"code": "lemma chainLength_smul {x} (hx : x ∈ rootSpace H (chainTop α β)) :\n (chainLength α β : K) • x = ⁅coroot α, x⁆ := by\n rw [← nsmul_eq_smul_cast, chainLength_nsmul _ _ hx]",
"start": [
78,
1
],
"end": [
80,
54
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.apply_coroot_eq_cast'",
"code": "lemma apply_coroot_eq_cast' :\n β (coroot α) = ↑(chainLength α β - 2 * chainTopCoeff α β : ℤ) := by\n by_cases hα : α.IsZero\n · rw [coroot_eq_zero_iff.mpr hα, chainLength, dif_pos hα, hα.eq, chainTopCoeff_zero, map_zero,\n CharP.cast_eq_zero, mul_zero, sub_self, Int.cast_zero]\n obtain ⟨x, hx, x_ne0⟩ := (chainTop α β).exists_ne_zero\n have := chainLength_smul _ _ hx\n rw [lie_eq_smul_of_mem_rootSpace hx, ← sub_eq_zero, ← sub_smul,\n smul_eq_zero_iff_left x_ne0, sub_eq_zero, coe_chainTop', nsmul_eq_mul, Pi.natCast_def,\n Pi.add_apply, Pi.mul_apply, root_apply_coroot hα] at this\n simp only [Int.cast_sub, Int.cast_natCast, Int.cast_mul, Int.cast_ofNat, eq_sub_iff_add_eq',\n this, mul_comm (2 : K)]",
"start": [
82,
1
],
"end": [
93,
28
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_neg_nsmul_add_chainTop_of_le",
"code": "lemma rootSpace_neg_nsmul_add_chainTop_of_le {n : ℕ} (hn : n ≤ chainLength α β) :\n rootSpace H (- (n • α) + chainTop α β) ≠ ⊥ := by\n by_cases hα : α.IsZero\n · simpa only [hα.eq, smul_zero, neg_zero, chainTop_zero, zero_add, ne_eq] using β.2\n obtain ⟨x, hx, x_ne0⟩ := (chainTop α β).exists_ne_zero\n obtain ⟨h, e, f, isSl2, he, hf⟩ := exists_isSl2Triple_of_weight_isNonZero hα\n obtain rfl := isSl2.h_eq_coroot hα he hf\n have prim : isSl2.HasPrimitiveVectorWith x (chainLength α β : K) :=\n have := lie_mem_weightSpace_of_mem_weightSpace he hx\n ⟨x_ne0, (chainLength_smul _ _ hx).symm, by rwa [weightSpace_add_chainTop _ _ hα] at this⟩\n simp only [← smul_neg, ne_eq, LieSubmodule.eq_bot_iff, not_forall]\n exact ⟨_, toEnd_pow_apply_mem hf hx n, prim.pow_toEnd_f_ne_zero_of_eq_nat rfl hn⟩",
"start": [
95,
1
],
"end": [
106,
84
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_neg_nsmul_add_chainTop_of_lt",
"code": "lemma rootSpace_neg_nsmul_add_chainTop_of_lt {n : ℕ} (hn : chainLength α β < n) :\n rootSpace H (- (n • α) + chainTop α β) = ⊥ := by\n by_contra e\n let W : Weight K H L := ⟨_, e⟩\n have hW : (W : H → K) = - (n • α) + chainTop α β := rfl\n have H₁ : 1 + n + chainTopCoeff (-α) W ≤ chainLength (-α) W := by\n have := apply_coroot_eq_cast' (-α) W\n simp only [coroot_neg, map_neg, hW, nsmul_eq_mul, Pi.natCast_def, coe_chainTop, zsmul_eq_mul,\n Int.cast_natCast, Pi.add_apply, Pi.neg_apply, Pi.mul_apply, root_apply_coroot hα, mul_two,\n neg_add_rev, apply_coroot_eq_cast' α β, Int.cast_sub, Int.cast_mul, Int.cast_ofNat,\n mul_comm (2 : K), add_sub_cancel, neg_neg, add_sub, Nat.cast_inj,\n eq_sub_iff_add_eq, ← Nat.cast_add, ← sub_eq_neg_add, sub_eq_iff_eq_add] at this\n linarith [this, hn]\n have H₂ : ((1 + n + chainTopCoeff (-α) W) • α + chainTop (-α) W : H → K) =\n (chainTopCoeff α β + 1) • α + β := by\n simp only [Weight.coe_neg, nsmul_eq_smul_cast ℤ, Nat.cast_add, Nat.cast_one, coe_chainTop,\n smul_neg, ← neg_smul, hW, ← add_assoc, ← add_smul, ← sub_eq_add_neg]\n congr 2\n ring\n have := rootSpace_neg_nsmul_add_chainTop_of_le (-α) W H₁\n rw [Weight.coe_neg, ← smul_neg, neg_neg, ← Weight.coe_neg, H₂] at this\n exact this (weightSpace_chainTopCoeff_add_one_nsmul_add α β hα)",
"start": [
108,
1
],
"end": [
129,
66
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainTopCoeff_le_chainLength",
"code": "lemma chainTopCoeff_le_chainLength : chainTopCoeff α β ≤ chainLength α β := by\n by_cases hα : α.IsZero\n · simp only [hα.eq, chainTopCoeff_zero, zero_le]\n rw [← not_lt, ← Nat.succ_le]\n intro e\n apply weightSpace_nsmul_add_ne_bot_of_le α β\n (Nat.sub_le (chainTopCoeff α β) (chainLength α β).succ)\n rw [nsmul_eq_smul_cast ℤ, Nat.cast_sub e, sub_smul, sub_eq_neg_add,\n add_assoc, ← coe_chainTop, ← nsmul_eq_smul_cast]\n exact rootSpace_neg_nsmul_add_chainTop_of_lt α β hα (Nat.lt_succ_self _)",
"start": [
131,
1
],
"end": [
140,
75
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainBotCoeff_add_chainTopCoeff",
"code": "lemma chainBotCoeff_add_chainTopCoeff :\n chainBotCoeff α β + chainTopCoeff α β = chainLength α β := by\n by_cases hα : α.IsZero\n · rw [hα.eq, chainTopCoeff_zero, chainBotCoeff_zero, zero_add, chainLength_of_isZero α β hα]\n apply le_antisymm\n · rw [← Nat.le_sub_iff_add_le (chainTopCoeff_le_chainLength α β),\n ← not_lt, ← Nat.succ_le, chainBotCoeff, ← Weight.coe_neg]\n intro e\n apply weightSpace_nsmul_add_ne_bot_of_le _ _ e\n rw [nsmul_eq_smul_cast ℤ, Nat.cast_succ, Nat.cast_sub (chainTopCoeff_le_chainLength α β),\n LieModule.Weight.coe_neg, smul_neg, ← neg_smul, neg_add_rev, neg_sub, sub_eq_neg_add,\n ← add_assoc, ← neg_add_rev, add_smul, add_assoc, ← coe_chainTop, neg_smul,\n ← @Nat.cast_one ℤ, ← Nat.cast_add, ← nsmul_eq_smul_cast]\n exact rootSpace_neg_nsmul_add_chainTop_of_lt α β hα (Nat.lt_succ_self _)\n · rw [← not_lt]\n intro e\n apply rootSpace_neg_nsmul_add_chainTop_of_le α β e\n rw [← Nat.succ_add, nsmul_eq_smul_cast ℤ, ← neg_smul, coe_chainTop, ← add_assoc, ← add_smul,\n Nat.cast_add, neg_add, add_assoc, neg_add_self, add_zero, neg_smul, ← smul_neg,\n ← nsmul_eq_smul_cast]\n exact weightSpace_chainTopCoeff_add_one_nsmul_add (-α) β (Weight.IsNonZero.neg hα)",
"start": [
142,
1
],
"end": [
162,
87
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainTopCoeff_add_chainBotCoeff",
"code": "lemma chainTopCoeff_add_chainBotCoeff :\n chainTopCoeff α β + chainBotCoeff α β = chainLength α β := by\n rw [add_comm, chainBotCoeff_add_chainTopCoeff]",
"start": [
164,
1
],
"end": [
166,
49
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainBotCoeff_le_chainLength",
"code": "lemma chainBotCoeff_le_chainLength : chainBotCoeff α β ≤ chainLength α β :=\n (Nat.le_add_left _ _).trans_eq (chainTopCoeff_add_chainBotCoeff α β)",
"start": [
168,
1
],
"end": [
169,
71
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_neg",
"code": "@[simp]\nlemma chainLength_neg :\n chainLength (-α) β = chainLength α β := by\n rw [← chainBotCoeff_add_chainTopCoeff, ← chainBotCoeff_add_chainTopCoeff, add_comm,\n Weight.coe_neg, chainTopCoeff_neg, chainBotCoeff_neg]",
"start": [
171,
1
],
"end": [
175,
58
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_zero",
"code": "@[simp]\nlemma chainLength_zero [Nontrivial L] : chainLength 0 β = 0 := by\n simp [← chainBotCoeff_add_chainTopCoeff]",
"start": [
177,
1
],
"end": [
179,
43
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.apply_coroot_eq_cast",
"code": "lemma apply_coroot_eq_cast :\n β (coroot α) = (chainBotCoeff α β - chainTopCoeff α β : ℤ) := by\n rw [apply_coroot_eq_cast', ← chainTopCoeff_add_chainBotCoeff]; congr 1; omega",
"start": [
181,
1
],
"end": [
185,
80
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.le_chainBotCoeff_of_rootSpace_ne_top",
"code": "lemma le_chainBotCoeff_of_rootSpace_ne_top (n : ℤ) (hn : rootSpace H (-n • α + β) ≠ ⊥) :\n n ≤ chainBotCoeff α β := by\n contrapose! hn\n lift n to ℕ using (Nat.cast_nonneg _).trans hn.le\n rw [Nat.cast_lt, ← @Nat.add_lt_add_iff_right (chainTopCoeff α β),\n chainBotCoeff_add_chainTopCoeff] at hn\n have := rootSpace_neg_nsmul_add_chainTop_of_lt α β hα hn\n rwa [nsmul_eq_smul_cast ℤ, ← neg_smul, coe_chainTop, ← add_assoc,\n ← add_smul, Nat.cast_add, neg_add, add_assoc, neg_add_self, add_zero] at this",
"start": [
187,
1
],
"end": [
195,
82
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_zsmul_add_ne_bot_iff",
"code": "lemma rootSpace_zsmul_add_ne_bot_iff (n : ℤ) :\n rootSpace H (n • α + β) ≠ ⊥ ↔ n ≤ chainTopCoeff α β ∧ -n ≤ chainBotCoeff α β := by\n constructor\n · refine (fun hn ↦ ⟨?_, le_chainBotCoeff_of_rootSpace_ne_top α β hα _ (by rwa [neg_neg])⟩)\n rw [← chainBotCoeff_neg, ← Weight.coe_neg]\n apply le_chainBotCoeff_of_rootSpace_ne_top _ _ hα.neg\n rwa [neg_smul, Weight.coe_neg, smul_neg, neg_neg]\n · rintro ⟨h₁, h₂⟩\n set k := chainTopCoeff α β - n with hk; clear_value k\n lift k to ℕ using (by rw [hk, le_sub_iff_add_le, zero_add]; exact h₁)\n rw [eq_sub_iff_add_eq, ← eq_sub_iff_add_eq'] at hk\n subst hk\n simp only [neg_sub, tsub_le_iff_right, ← Nat.cast_add, Nat.cast_le,\n chainBotCoeff_add_chainTopCoeff] at h₂\n have := rootSpace_neg_nsmul_add_chainTop_of_le α β h₂\n rwa [coe_chainTop, nsmul_eq_smul_cast ℤ, ← neg_smul,\n ← add_assoc, ← add_smul, ← sub_eq_neg_add] at this",
"start": [
197,
1
],
"end": [
214,
57
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_zsmul_add_ne_bot_iff_mem",
"code": "lemma rootSpace_zsmul_add_ne_bot_iff_mem (n : ℤ) :\n rootSpace H (n • α + β) ≠ ⊥ ↔ n ∈ Finset.Icc (-chainBotCoeff α β : ℤ) (chainTopCoeff α β) := by\n rw [rootSpace_zsmul_add_ne_bot_iff α β hα n, Finset.mem_Icc, and_comm, neg_le]",
"start": [
216,
1
],
"end": [
218,
81
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainTopCoeff_of_eq_zsmul_add",
"code": "lemma chainTopCoeff_of_eq_zsmul_add (β' : Weight K H L) (n : ℤ) (hβ' : (β' : H → K) = n • α + β) :\n chainTopCoeff α β' = chainTopCoeff α β - n := by\n apply le_antisymm\n · refine le_sub_iff_add_le.mpr ((rootSpace_zsmul_add_ne_bot_iff α β hα _).mp ?_).1\n rw [add_smul, add_assoc, ← hβ', ← coe_chainTop]\n exact (chainTop α β').2\n · refine ((rootSpace_zsmul_add_ne_bot_iff α β' hα _).mp ?_).1\n rw [hβ', ← add_assoc, ← add_smul, sub_add_cancel, ← coe_chainTop]\n exact (chainTop α β).2",
"start": [
220,
1
],
"end": [
228,
27
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainBotCoeff_of_eq_zsmul_add",
"code": "lemma chainBotCoeff_of_eq_zsmul_add (β' : Weight K H L) (n : ℤ) (hβ' : (β' : H → K) = n • α + β) :\n chainBotCoeff α β' = chainBotCoeff α β + n := by\n have : (β' : H → K) = -n • (-α) + β := by rwa [neg_smul, smul_neg, neg_neg]\n rw [chainBotCoeff, chainBotCoeff, ← Weight.coe_neg,\n chainTopCoeff_of_eq_zsmul_add (-α) β hα.neg β' (-n) this, sub_neg_eq_add]",
"start": [
230,
1
],
"end": [
234,
78
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_of_eq_zsmul_add",
"code": "lemma chainLength_of_eq_zsmul_add (β' : Weight K H L) (n : ℤ) (hβ' : (β' : H → K) = n • α + β) :\n chainLength α β' = chainLength α β := by\n by_cases hα : α.IsZero\n · rw [chainLength_of_isZero _ _ hα, chainLength_of_isZero _ _ hα]\n · apply Nat.cast_injective (R := ℤ)\n rw [← chainTopCoeff_add_chainBotCoeff, ← chainTopCoeff_add_chainBotCoeff,\n Nat.cast_add, Nat.cast_add, chainTopCoeff_of_eq_zsmul_add α β hα β' n hβ',\n chainBotCoeff_of_eq_zsmul_add α β hα β' n hβ', sub_eq_add_neg, add_add_add_comm,\n neg_add_self, add_zero]",
"start": [
236,
1
],
"end": [
244,
30
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainTopCoeff_zero_right",
"code": "lemma chainTopCoeff_zero_right [Nontrivial L] :\n chainTopCoeff α (0 : Weight K H L) = 1 := by\n symm\n apply eq_of_le_of_not_lt\n · rw [Nat.one_le_iff_ne_zero]\n intro e\n exact α.2 (by simpa [e, Weight.coe_zero] using\n weightSpace_chainTopCoeff_add_one_nsmul_add α (0 : Weight K H L) hα)\n obtain ⟨x, hx, x_ne0⟩ := (chainTop α (0 : Weight K H L)).exists_ne_zero\n obtain ⟨h, e, f, isSl2, he, hf⟩ := exists_isSl2Triple_of_weight_isNonZero hα\n obtain rfl := isSl2.h_eq_coroot hα he hf\n have prim : isSl2.HasPrimitiveVectorWith x (chainLength α (0 : Weight K H L) : K) :=\n have := lie_mem_weightSpace_of_mem_weightSpace he hx\n ⟨x_ne0, (chainLength_smul _ _ hx).symm, by rwa [weightSpace_add_chainTop _ _ hα] at this⟩\n obtain ⟨k, hk⟩ : ∃ k : K, k • f =\n (toEnd K L L f ^ (chainTopCoeff α (0 : Weight K H L) + 1)) x := by\n have : (toEnd K L L f ^ (chainTopCoeff α (0 : Weight K H L) + 1)) x ∈ rootSpace H (-α) := by\n convert toEnd_pow_apply_mem hf hx (chainTopCoeff α (0 : Weight K H L) + 1) using 2\n rw [coe_chainTop', Weight.coe_zero, add_zero, succ_nsmul',\n add_assoc, smul_neg, neg_add_self, add_zero]\n simpa using (finrank_eq_one_iff_of_nonzero' ⟨f, hf⟩ (by simpa using isSl2.f_ne_zero)).mp\n (finrank_rootSpace_eq_one _ hα.neg) ⟨_, this⟩\n apply_fun (⁅f, ·⁆) at hk\n simp only [lie_smul, lie_self, smul_zero, prim.lie_f_pow_toEnd_f] at hk\n intro e\n refine prim.pow_toEnd_f_ne_zero_of_eq_nat rfl ?_ hk.symm\n have := (apply_coroot_eq_cast' α 0).symm\n simp only [← @Nat.cast_two ℤ, ← Nat.cast_mul, Weight.zero_apply, Int.cast_eq_zero, sub_eq_zero,\n Nat.cast_inj] at this\n rwa [this, Nat.succ_le, two_mul, add_lt_add_iff_left]",
"start": [
246,
1
],
"end": [
275,
56
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainBotCoeff_zero_right",
"code": "lemma chainBotCoeff_zero_right [Nontrivial L] : chainBotCoeff α (0 : Weight K H L) = 1 :=\n chainTopCoeff_zero_right (-α) hα.neg",
"start": [
277,
1
],
"end": [
278,
39
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.chainLength_zero_right",
"code": "lemma chainLength_zero_right [Nontrivial L] : chainLength α 0 = 2 := by\n rw [← chainBotCoeff_add_chainTopCoeff, chainTopCoeff_zero_right α hα,\n chainBotCoeff_zero_right α hα]",
"start": [
280,
1
],
"end": [
282,
35
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_two_smul",
"code": "lemma rootSpace_two_smul : rootSpace H (2 • α) = ⊥ := by\n cases subsingleton_or_nontrivial L\n · exact IsEmpty.elim inferInstance α\n simpa [chainTopCoeff_zero_right α hα] using\n weightSpace_chainTopCoeff_add_one_nsmul_add α (0 : Weight K H L) hα",
"start": [
284,
1
],
"end": [
288,
72
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSpace_one_div_two_smul",
"code": "lemma rootSpace_one_div_two_smul : rootSpace H ((2⁻¹ : K) • α) = ⊥ := by\n by_contra h\n let W : Weight K H L := ⟨_, h⟩\n have hW : 2 • (W : H → K) = α := by\n show 2 • (2⁻¹ : K) • (α : H → K) = α\n rw [nsmul_eq_smul_cast K, smul_smul]; simp\n apply α.weightSpace_ne_bot\n have := rootSpace_two_smul W (fun (e : (W : H → K) = 0) ↦ hα <| by\n apply_fun (2 • ·) at e; simpa [hW] using e)\n rwa [hW] at this",
"start": [
290,
1
],
"end": [
299,
19
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.eq_neg_one_or_eq_zero_or_eq_one_of_eq_smul",
"code": "lemma eq_neg_one_or_eq_zero_or_eq_one_of_eq_smul (k : K) (h : (β : H → K) = k • α) :\n k = -1 ∨ k = 0 ∨ k = 1 := by\n cases subsingleton_or_nontrivial L\n · exact IsEmpty.elim inferInstance α\n have H := apply_coroot_eq_cast' α β\n rw [h] at H\n simp only [Pi.smul_apply, root_apply_coroot hα] at H\n rcases (chainLength α β).even_or_odd with (⟨n, hn⟩|⟨n, hn⟩)\n · rw [hn, ← two_mul] at H\n simp only [smul_eq_mul, Nat.cast_mul, Nat.cast_ofNat, ← mul_sub, ← mul_comm (2 : K),\n Int.cast_sub, Int.cast_mul, Int.cast_ofNat, Int.cast_natCast,\n mul_eq_mul_left_iff, OfNat.ofNat_ne_zero, or_false] at H\n rw [← Int.cast_natCast, ← Int.cast_natCast (chainTopCoeff α β), ← Int.cast_sub] at H\n have := (rootSpace_zsmul_add_ne_bot_iff_mem α 0 hα (n - chainTopCoeff α β)).mp\n (by rw [zsmul_eq_smul_cast K, ← H, ← h, Weight.coe_zero, add_zero]; exact β.2)\n rw [chainTopCoeff_zero_right α hα, chainBotCoeff_zero_right α hα, Nat.cast_one] at this\n set k' : ℤ := n - chainTopCoeff α β\n subst H\n have : k' ∈ ({-1, 0, 1} : Finset ℤ) := by\n show k' ∈ Finset.Icc (-1 : ℤ) (1 : ℤ)\n exact this\n simpa only [Int.reduceNeg, Finset.mem_insert, Finset.mem_singleton, ← @Int.cast_inj K,\n Int.cast_zero, Int.cast_neg, Int.cast_one] using this\n · apply_fun (· / 2) at H\n rw [hn, smul_eq_mul] at H\n have hk : k = n + 2⁻¹ - chainTopCoeff α β := by simpa [sub_div, add_div] using H\n have := (rootSpace_zsmul_add_ne_bot_iff α β hα (chainTopCoeff α β - n)).mpr ?_\n swap\n · simp only [tsub_le_iff_right, le_add_iff_nonneg_right, Nat.cast_nonneg, neg_sub, true_and]\n rw [← Nat.cast_add, chainBotCoeff_add_chainTopCoeff, hn]\n omega\n rw [h, hk, zsmul_eq_smul_cast K, ← add_smul] at this\n simp only [Int.cast_sub, Int.cast_natCast,\n sub_add_sub_cancel', add_sub_cancel_left, ne_eq] at this\n cases this (rootSpace_one_div_two_smul α hα)",
"start": [
301,
1
],
"end": [
335,
49
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.eq_neg_or_eq_of_eq_smul",
"code": "lemma eq_neg_or_eq_of_eq_smul (hβ : β.IsNonZero) (k : K) (h : (β : H → K) = k • α) :\n β = -α ∨ β = α := by\n by_cases hα : α.IsZero\n · rw [hα, smul_zero] at h; cases hβ h\n rcases eq_neg_one_or_eq_zero_or_eq_one_of_eq_smul α β hα k h with (rfl | rfl | rfl)\n · exact .inl (by ext; rw [h, neg_one_smul]; rfl)\n · cases hβ (by rwa [zero_smul] at h)\n · exact .inr (by ext; rw [h, one_smul])",
"start": [
337,
1
],
"end": [
345,
42
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.reflectRoot",
"code": "def reflectRoot (α β : Weight K H L) : Weight K H L where\n toFun := β - β (coroot α) • α\n weightSpace_ne_bot' := by\n by_cases hα : α.IsZero\n · simpa [hα.eq] using β.weightSpace_ne_bot\n rw [sub_eq_neg_add, apply_coroot_eq_cast α β, ← neg_smul, ← Int.cast_neg, ← zsmul_eq_smul_cast,\n rootSpace_zsmul_add_ne_bot_iff α β hα]\n omega",
"start": [
347,
1
],
"end": [
355,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "LieAlgebra.IsKilling.reflectRoot_isNonZero",
"code": "lemma reflectRoot_isNonZero (α β : Weight K H L) (hβ : β.IsNonZero) :\n (reflectRoot α β).IsNonZero := by\n intro e\n have : β (coroot α) = 0 := by\n by_cases hα : α.IsZero\n · simp [coroot_eq_zero_iff.mpr hα]\n apply add_left_injective (β (coroot α))\n simpa [root_apply_coroot hα, mul_two] using congr_fun (sub_eq_zero.mp e) (coroot α)\n have : reflectRoot α β = β := by ext; simp [reflectRoot, this]\n exact hβ (this ▸ e)",
"start": [
357,
1
],
"end": [
366,
22
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSystem",
"code": "def rootSystem :\n RootSystem {α : Weight K H L // α.IsNonZero} K (Dual K H) H :=\n RootSystem.mk'\n IsReflexive.toPerfectPairingDual\n { toFun := (↑)\n inj' := by\n intro α β h; ext x; simpa using LinearMap.congr_fun h x }\n { toFun := coroot ∘ (↑)\n inj' := by rintro ⟨α, hα⟩ ⟨β, hβ⟩ h; simpa using h }\n (fun α ↦ by simpa using root_apply_coroot α.property)\n (by\n rintro ⟨α, hα⟩ - ⟨⟨β, hβ⟩, rfl⟩\n simp only [Function.Embedding.coeFn_mk, IsReflexive.toPerfectPairingDual_toLin,\n Function.comp_apply, Set.mem_range, Subtype.exists, exists_prop]\n exact ⟨reflectRoot α β, reflectRoot_isNonZero α β hβ, rfl⟩)\n (by convert span_weight_isNonZero_eq_top K L H; ext; simp)",
"start": [
370,
1
],
"end": [
387,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "LieAlgebra.IsKilling.rootSystem_toLin_apply",
"code": "@[simp] lemma rootSystem_toLin_apply (f x) : (rootSystem H).toLin f x = f x := rfl",
"start": [
389,
1
],
"end": [
389,
83
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSystem_pairing_apply",
"code": "@[simp] lemma rootSystem_pairing_apply (α β) : (rootSystem H).pairing β α = β.1 (coroot α.1) := rfl",
"start": [
390,
1
],
"end": [
390,
100
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSystem_root_apply",
"code": "@[simp] lemma rootSystem_root_apply (α) : (rootSystem H).root α = α := rfl",
"start": [
391,
1
],
"end": [
391,
75
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.rootSystem_coroot_apply",
"code": "@[simp] lemma rootSystem_coroot_apply (α) : (rootSystem H).coroot α = coroot α := rfl",
"start": [
392,
1
],
"end": [
392,
86
],
"kind": "lemma"
},
{
"full_name": "LieAlgebra.IsKilling.isCrystallographic_rootSystem",
"code": "theorem isCrystallographic_rootSystem : (rootSystem H).IsCrystallographic",
"start": [
394,
1
],
"end": [
396,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "LieAlgebra.IsKilling.isReduced_rootSystem",
"code": "theorem isReduced_rootSystem : (rootSystem H).IsReduced",
"start": [
398,
1
],
"end": [
406,
57
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/Regular/RegularSequence.lean | [
"Mathlib/RingTheory/Regular/IsSMulRegular.lean",
"Mathlib/Logic/Equiv/TransferInstance.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/Artinian.lean",
"Mathlib/RingTheory/Ideal/LocalRing.lean"
] | [
{
"full_name": "Ideal.ofList",
"code": "abbrev ofList (rs : List R) := span { r | r ∈ rs }",
"start": [
36,
1
],
"end": [
37,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "Ideal.ofList_nil",
"code": "@[simp] lemma ofList_nil : (ofList [] : Ideal R) = ⊥ :=\n have : { r | r ∈ [] } = ∅ := Set.eq_empty_of_forall_not_mem List.not_mem_nil\n Eq.trans (congrArg span this) span_empty",
"start": [
39,
1
],
"end": [
41,
43
],
"kind": "lemma"
},
{
"full_name": "Ideal.ofList_append",
"code": "@[simp] lemma ofList_append (rs₁ rs₂ : List R) :\n ofList (rs₁ ++ rs₂) = ofList rs₁ ⊔ ofList rs₂ :=\n have : { r | r ∈ rs₁ ++ rs₂ } = _ := Set.ext (fun _ => List.mem_append)\n Eq.trans (congrArg span this) (span_union _ _)",
"start": [
43,
1
],
"end": [
46,
49
],
"kind": "lemma"
},
{
"full_name": "Ideal.ofList_singleton",
"code": "@[simp] lemma ofList_singleton (r : R) : ofList [r] = span {r} :=\n congrArg span (Set.ext fun _ => List.mem_singleton)",
"start": [
48,
1
],
"end": [
49,
54
],
"kind": "lemma"
},
{
"full_name": "Ideal.ofList_cons",
"code": "@[simp] lemma ofList_cons (r : R) (rs : List R) :\n ofList (r::rs) = span {r} ⊔ ofList rs :=\n Eq.trans (ofList_append [r] rs) (congrArg (· ⊔ _) (ofList_singleton r))",
"start": [
51,
1
],
"end": [
53,
74
],
"kind": "lemma"
},
{
"full_name": "Ideal.map_ofList",
"code": "@[simp] lemma map_ofList (f : R →+* S) (rs : List R) :\n map f (ofList rs) = ofList (rs.map f) :=\n Eq.trans (map_span f { r | r ∈ rs }) <| congrArg span <|\n Set.ext (fun _ => List.mem_map.symm)",
"start": [
55,
1
],
"end": [
58,
41
],
"kind": "lemma"
},
{
"full_name": "Ideal.ofList_cons_smul",
"code": "lemma ofList_cons_smul {R} [CommSemiring R] (r : R) (rs : List R) {M}\n [AddCommMonoid M] [Module R M] (N : Submodule R M) :\n ofList (r :: rs) • N = r • N ⊔ ofList rs • N := by\n rw [ofList_cons, Submodule.sup_smul, Submodule.ideal_span_singleton_smul]",
"start": [
60,
1
],
"end": [
63,
76
],
"kind": "lemma"
},
{
"full_name": "Submodule.smul_top_le_comap_smul_top",
"code": "lemma smul_top_le_comap_smul_top [CommSemiring R] [AddCommMonoid M]\n [AddCommMonoid M₂] [Module R M] [Module R M₂] (I : Ideal R)\n (f : M →ₗ[R] M₂) : I • ⊤ ≤ comap f (I • ⊤) :=\n map_le_iff_le_comap.mp <| le_of_eq_of_le (map_smul'' _ _ _) <|\n smul_mono_right _ le_top",
"start": [
69,
1
],
"end": [
73,
29
],
"kind": "lemma"
},
{
"full_name": "Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner",
"code": "def quotOfListConsSMulTopEquivQuotSMulTopInner :\n (M ⧸ (Ideal.ofList (r :: rs) • ⊤ : Submodule R M)) ≃ₗ[R]\n QuotSMulTop r M ⧸ (Ideal.ofList rs • ⊤ : Submodule R (QuotSMulTop r M)) :=\n quotEquivOfEq _ _ (Ideal.ofList_cons_smul r rs ⊤) ≪≫ₗ\n (quotientQuotientEquivQuotientSup (r • ⊤) (Ideal.ofList rs • ⊤)).symm ≪≫ₗ\n quotEquivOfEq _ _ (by rw [map_smul'', map_top, range_mkQ])",
"start": [
78,
1
],
"end": [
84,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "Submodule.quotOfListConsSMulTopEquivQuotSMulTopOuter",
"code": "def quotOfListConsSMulTopEquivQuotSMulTopOuter :\n (M ⧸ (Ideal.ofList (r :: rs) • ⊤ : Submodule R M)) ≃ₗ[R]\n QuotSMulTop r (M ⧸ (Ideal.ofList rs • ⊤ : Submodule R M)) :=\n quotEquivOfEq _ _ (Eq.trans (Ideal.ofList_cons_smul r rs ⊤) (sup_comm _ _)) ≪≫ₗ\n (quotientQuotientEquivQuotientSup (Ideal.ofList rs • ⊤) (r • ⊤)).symm ≪≫ₗ\n quotEquivOfEq _ _ (by rw [map_pointwise_smul, map_top, range_mkQ])",
"start": [
86,
1
],
"end": [
92,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "Submodule.quotOfListConsSMulTopEquivQuotSMulTopInner_naturality",
"code": "lemma quotOfListConsSMulTopEquivQuotSMulTopInner_naturality (f : M →ₗ[R] M₂) :\n (quotOfListConsSMulTopEquivQuotSMulTopInner M₂ r rs).toLinearMap ∘ₗ\n mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList (r :: rs)) f) =\n mapQ _ _ _ (smul_top_le_comap_smul_top _ (QuotSMulTop.map r f)) ∘ₗ\n (quotOfListConsSMulTopEquivQuotSMulTopInner M r rs).toLinearMap :=\n quot_hom_ext _ _ _ fun _ => rfl",
"start": [
96,
1
],
"end": [
101,
34
],
"kind": "lemma"
},
{
"full_name": "Submodule.top_eq_ofList_cons_smul_iff",
"code": "lemma top_eq_ofList_cons_smul_iff :\n (⊤ : Submodule R M) = Ideal.ofList (r :: rs) • ⊤ ↔\n (⊤ : Submodule R (QuotSMulTop r M)) = Ideal.ofList rs • ⊤ := by\n conv => congr <;> rw [eq_comm, ← subsingleton_quotient_iff_eq_top]\n exact (quotOfListConsSMulTopEquivQuotSMulTopInner M r rs).toEquiv.subsingleton_congr",
"start": [
103,
1
],
"end": [
107,
87
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular",
"code": "@[mk_iff]\nstructure IsWeaklyRegular (rs : List R) : Prop where\n regular_mod_prev : ∀ i (h : i < rs.length),\n IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]",
"start": [
134,
1
],
"end": [
139,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_iff_Fin",
"code": "lemma isWeaklyRegular_iff_Fin (rs : List R) :\n IsWeaklyRegular M rs ↔ ∀ (i : Fin rs.length),\n IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) (rs.get i) :=\n Iff.trans (isWeaklyRegular_iff M rs) (Iff.symm Fin.forall_iff)",
"start": [
141,
1
],
"end": [
144,
65
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular",
"code": "@[mk_iff]\nstructure IsRegular (rs : List R) extends IsWeaklyRegular M rs : Prop where\n top_ne_smul : (⊤ : Submodule R M) ≠ Ideal.ofList rs • ⊤",
"start": [
146,
1
],
"end": [
149,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "AddHom.map_smul_top_toAddSubgroup_of_surjective",
"code": "private lemma _root_.AddHom.map_smul_top_toAddSubgroup_of_surjective\n {f : M →+ M₂} {as : List R} {bs : List S} (hf : Function.Surjective f)\n (h : List.Forall₂ (fun r s => ∀ x, f (r • x) = s • f x) as bs) :\n (Ideal.ofList as • ⊤ : Submodule R M).toAddSubgroup.map f =\n (Ideal.ofList bs • ⊤ : Submodule S M₂).toAddSubgroup := by\n induction h with\n | nil =>\n convert AddSubgroup.map_bot f using 1 <;>\n rw [Ideal.ofList_nil, bot_smul, bot_toAddSubgroup]\n | @cons r s _ _ h _ ih =>\n conv => congr <;> rw [Ideal.ofList_cons, sup_smul, sup_toAddSubgroup,\n ideal_span_singleton_smul, pointwise_smul_toAddSubgroup,\n top_toAddSubgroup, pointwise_smul_def]\n apply DFunLike.ext (f.comp (toAddMonoidEnd R M r))\n ((toAddMonoidEnd S M₂ s).comp f) at h\n rw [AddSubgroup.map_sup, ih, map_map, h, ← map_map,\n map_top_of_surjective f hf]",
"start": [
160,
1
],
"end": [
176,
34
],
"kind": "lemma"
},
{
"full_name": "AddEquiv.isWeaklyRegular_congr",
"code": "lemma _root_.AddEquiv.isWeaklyRegular_congr {e : M ≃+ M₂} {as bs}\n (h : List.Forall₂ (fun (r : R) (s : S) => ∀ x, e (r • x) = s • e x) as bs) :\n IsWeaklyRegular M as ↔ IsWeaklyRegular M₂ bs := by\n conv => congr <;> rw [isWeaklyRegular_iff_Fin]\n let e' i : (M ⧸ (Ideal.ofList (as.take i) • ⊤ : Submodule R M)) ≃+\n M₂ ⧸ (Ideal.ofList (bs.take i) • ⊤ : Submodule S M₂) :=\n QuotientAddGroup.congr _ _ e <|\n AddHom.map_smul_top_toAddSubgroup_of_surjective e.surjective <|\n List.forall₂_take i h\n refine (finCongr h.length_eq).forall_congr @fun _ => (e' _).isSMulRegular_congr ?_\n exact (mkQ_surjective _).forall.mpr fun _ => congrArg (mkQ _) (h.get _ _ _)",
"start": [
178,
1
],
"end": [
188,
78
],
"kind": "lemma"
},
{
"full_name": "LinearEquiv.isWeaklyRegular_congr'",
"code": "lemma _root_.LinearEquiv.isWeaklyRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) :\n IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ (rs.map σ) :=\n e.toAddEquiv.isWeaklyRegular_congr <| List.forall₂_map_right_iff.mpr <|\n List.forall₂_same.mpr fun r _ x => e.map_smul' r x",
"start": [
190,
1
],
"end": [
193,
55
],
"kind": "lemma"
},
{
"full_name": "LinearEquiv.isWeaklyRegular_congr",
"code": "lemma _root_.LinearEquiv.isWeaklyRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :\n IsWeaklyRegular M rs ↔ IsWeaklyRegular M₂ rs :=\n Iff.trans (e.isWeaklyRegular_congr' rs) <| iff_of_eq <| congrArg _ rs.map_id",
"start": [
195,
1
],
"end": [
197,
79
],
"kind": "lemma"
},
{
"full_name": "AddEquiv.isRegular_congr",
"code": "lemma _root_.AddEquiv.isRegular_congr {e : M ≃+ M₂} {as bs}\n (h : List.Forall₂ (fun (r : R) (s : S) => ∀ x, e (r • x) = s • e x) as bs) :\n IsRegular M as ↔ IsRegular M₂ bs := by\n conv => congr <;> rw [isRegular_iff, ne_eq, eq_comm,\n ← subsingleton_quotient_iff_eq_top]\n let e' := QuotientAddGroup.congr _ _ e <|\n AddHom.map_smul_top_toAddSubgroup_of_surjective e.surjective h\n exact and_congr (e.isWeaklyRegular_congr h) e'.subsingleton_congr.not",
"start": [
199,
1
],
"end": [
206,
72
],
"kind": "lemma"
},
{
"full_name": "LinearEquiv.isRegular_congr'",
"code": "lemma _root_.LinearEquiv.isRegular_congr' (e : M ≃ₛₗ[σ] M₂) (rs : List R) :\n IsRegular M rs ↔ IsRegular M₂ (rs.map σ) :=\n e.toAddEquiv.isRegular_congr <| List.forall₂_map_right_iff.mpr <|\n List.forall₂_same.mpr fun r _ x => e.map_smul' r x",
"start": [
208,
1
],
"end": [
211,
55
],
"kind": "lemma"
},
{
"full_name": "LinearEquiv.isRegular_congr",
"code": "lemma _root_.LinearEquiv.isRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :\n IsRegular M rs ↔ IsRegular M₂ rs :=\n Iff.trans (e.isRegular_congr' rs) <| iff_of_eq <| congrArg _ rs.map_id",
"start": [
213,
1
],
"end": [
215,
73
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_map_algebraMap_iff",
"code": "lemma isWeaklyRegular_map_algebraMap_iff [CommRing R] [CommRing S]\n [Algebra R S] [AddCommGroup M] [Module R M] [Module S M]\n [IsScalarTower R S M] (rs : List R) :\n IsWeaklyRegular M (rs.map (algebraMap R S)) ↔ IsWeaklyRegular M rs :=\n (AddEquiv.refl M).isWeaklyRegular_congr <| List.forall₂_map_left_iff.mpr <|\n List.forall₂_same.mpr fun r _ => algebraMap_smul S r",
"start": [
219,
1
],
"end": [
224,
57
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_cons_iff",
"code": "@[simp]\nlemma isWeaklyRegular_cons_iff (r : R) (rs : List R) :\n IsWeaklyRegular M (r :: rs) ↔\n IsSMulRegular M r ∧ IsWeaklyRegular (QuotSMulTop r M) rs :=\n have := Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤)\n let e i := quotOfListConsSMulTopEquivQuotSMulTopInner M r (rs.take i)\n Iff.trans (isWeaklyRegular_iff_Fin _ _) <| Iff.trans Fin.forall_fin_succ <|\n and_congr ((quotEquivOfEqBot _ this).isSMulRegular_congr r) <|\n Iff.trans (forall_congr' fun i => (e i).isSMulRegular_congr (rs.get i))\n (isWeaklyRegular_iff_Fin _ _).symm",
"start": [
229,
1
],
"end": [
238,
43
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_cons_iff'",
"code": "lemma isWeaklyRegular_cons_iff' (r : R) (rs : List R) :\n IsWeaklyRegular M (r :: rs) ↔\n IsSMulRegular M r ∧\n IsWeaklyRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) :=\n Iff.trans (isWeaklyRegular_cons_iff M r rs) <| and_congr_right' <|\n Iff.symm <| isWeaklyRegular_map_algebraMap_iff (R ⧸ Ideal.span {r}) _ rs",
"start": [
240,
1
],
"end": [
246,
77
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isRegular_cons_iff",
"code": "@[simp]\nlemma isRegular_cons_iff (r : R) (rs : List R) :\n IsRegular M (r :: rs) ↔\n IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M) rs := by\n rw [isRegular_iff, isRegular_iff, isWeaklyRegular_cons_iff M r rs,\n ne_eq, top_eq_ofList_cons_smul_iff, and_assoc]",
"start": [
248,
1
],
"end": [
253,
51
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isRegular_cons_iff'",
"code": "lemma isRegular_cons_iff' (r : R) (rs : List R) :\n IsRegular M (r :: rs) ↔\n IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) := by\n conv => congr <;> rw [isRegular_iff, ne_eq]\n rw [isWeaklyRegular_cons_iff', ← restrictScalars_inj R (R ⧸ _),\n ← Ideal.map_ofList, ← Ideal.Quotient.algebraMap_eq, Ideal.smul_restrictScalars,\n restrictScalars_top, top_eq_ofList_cons_smul_iff, and_assoc]",
"start": [
255,
1
],
"end": [
262,
65
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.nil",
"code": "@[simp] lemma nil : IsWeaklyRegular M ([] : List R) :=\n .mk (False.elim <| Nat.not_lt_zero · ·)",
"start": [
269,
1
],
"end": [
270,
42
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.cons",
"code": "lemma cons {r : R} {rs : List R} (h1 : IsSMulRegular M r)\n (h2 : IsWeaklyRegular (QuotSMulTop r M) rs) : IsWeaklyRegular M (r :: rs) :=\n (isWeaklyRegular_cons_iff M r rs).mpr ⟨h1, h2⟩",
"start": [
272,
1
],
"end": [
274,
49
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.cons'",
"code": "lemma cons' {r : R} {rs : List R} (h1 : IsSMulRegular M r)\n (h2 : IsWeaklyRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) :\n IsWeaklyRegular M (r :: rs) :=\n (isWeaklyRegular_cons_iff' M r rs).mpr ⟨h1, h2⟩",
"start": [
276,
1
],
"end": [
280,
50
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.recIterModByRegular",
"code": "@[induction_eliminator]\ndef recIterModByRegular\n {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) →\n IsWeaklyRegular M rs → Sort*}\n (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → motive M [] (nil R M))\n (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) →\n (rs : List R) → (h1 : IsSMulRegular M r) →\n (h2 : IsWeaklyRegular (QuotSMulTop r M) rs) →\n (ih : motive (QuotSMulTop r M) rs h2) → motive M (r :: rs) (cons h1 h2)) :\n {M : Type v} → [AddCommGroup M] → [Module R M] → {rs : List R} →\n (h : IsWeaklyRegular M rs) → motive M rs h\n | M, _, _, [], _ => nil M\n | M, _, _, r :: rs, h =>\n let ⟨h1, h2⟩ := (isWeaklyRegular_cons_iff M r rs).mp h\n cons r rs h1 h2 (recIterModByRegular nil cons h2)",
"start": [
282,
1
],
"end": [
303,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.ndrecIterModByRegular",
"code": "def ndrecIterModByRegular\n {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*}\n (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → motive M [])\n (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) →\n (rs : List R) → IsSMulRegular M r → IsWeaklyRegular (QuotSMulTop r M) rs →\n motive (QuotSMulTop r M) rs → motive M (r :: rs))\n {M} [AddCommGroup M] [Module R M] {rs} :\n IsWeaklyRegular M rs → motive M rs :=\n recIterModByRegular (motive := fun M _ _ rs _ => motive M rs) nil cons",
"start": [
305,
1
],
"end": [
315,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.recIterModByRegularWithRing",
"code": "def recIterModByRegularWithRing\n {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] →\n [Module R M] → (rs : List R) → IsWeaklyRegular M rs → Sort*}\n (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] →\n [Module R M] → motive R M [] (nil R M))\n (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] →\n [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) →\n (h2 : IsWeaklyRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) →\n (ih : motive (R⧸Ideal.span {r}) (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) h2) →\n motive R M (r :: rs) (cons' h1 h2)) :\n {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] →\n [Module R M] → {rs : List R} → (h : IsWeaklyRegular M rs) → motive R M rs h\n | R, _, M, _, _, [], _ => nil R M\n | R, _, M, _, _, r :: rs, h =>\n let ⟨h1, h2⟩ := (isWeaklyRegular_cons_iff' M r rs).mp h\n cons r rs h1 h2 (recIterModByRegularWithRing nil cons h2)\n termination_by _ _ _ _ _ rs => List.length rs",
"start": [
317,
1
],
"end": [
339,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.ndrecWithRing",
"code": "def ndrecWithRing\n {motive : (R : Type u) → [CommRing R] → (M : Type v) →\n [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*}\n (nil : (R : Type u) → [CommRing R] → (M : Type v) →\n [AddCommGroup M] → [Module R M] → motive R M [])\n (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] →\n [Module R M] → (r : R) → (rs : List R) → IsSMulRegular M r →\n IsWeaklyRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) →\n motive (R⧸Ideal.span {r}) (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) → motive R M (r :: rs))\n {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs} :\n IsWeaklyRegular M rs → motive R M rs :=\n recIterModByRegularWithRing (motive := fun R _ M _ _ rs _ => motive R M rs)\n nil cons",
"start": [
341,
1
],
"end": [
357,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_singleton_iff",
"code": "lemma isWeaklyRegular_singleton_iff (r : R) :\n IsWeaklyRegular M [r] ↔ IsSMulRegular M r :=\n Iff.trans (isWeaklyRegular_cons_iff M r []) (and_iff_left (.nil R _))",
"start": [
365,
1
],
"end": [
367,
72
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_append_iff",
"code": "lemma isWeaklyRegular_append_iff (rs₁ rs₂ : List R) :\n IsWeaklyRegular M (rs₁ ++ rs₂) ↔\n IsWeaklyRegular M rs₁ ∧\n IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M)) rs₂ := by\n induction rs₁ generalizing M with\n | nil =>\n refine Iff.symm <| Iff.trans (and_iff_right (.nil R M)) ?_\n refine (quotEquivOfEqBot _ ?_).isWeaklyRegular_congr rs₂\n rw [Ideal.ofList_nil, bot_smul]\n | cons r rs₁ ih =>\n let e := quotOfListConsSMulTopEquivQuotSMulTopInner M r rs₁\n rw [List.cons_append, isWeaklyRegular_cons_iff, isWeaklyRegular_cons_iff,\n ih, ← and_assoc, ← e.isWeaklyRegular_congr rs₂]",
"start": [
369,
1
],
"end": [
381,
54
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isWeaklyRegular_append_iff'",
"code": "lemma isWeaklyRegular_append_iff' (rs₁ rs₂ : List R) :\n IsWeaklyRegular M (rs₁ ++ rs₂) ↔\n IsWeaklyRegular M rs₁ ∧\n IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M))\n (rs₂.map (Ideal.Quotient.mk (Ideal.ofList rs₁))) :=\n Iff.trans (isWeaklyRegular_append_iff M rs₁ rs₂) <| and_congr_right' <|\n Iff.symm <| isWeaklyRegular_map_algebraMap_iff (R ⧸ Ideal.ofList rs₁) _ rs₂",
"start": [
383,
1
],
"end": [
389,
80
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.nil",
"code": "lemma nil [Nontrivial M] : IsRegular M ([] : List R) where\n toIsWeaklyRegular := IsWeaklyRegular.nil R M\n top_ne_smul h := by\n rw [Ideal.ofList_nil, bot_smul, eq_comm, subsingleton_iff_bot_eq_top] at h\n exact not_subsingleton M ((Submodule.subsingleton_iff _).mp h)",
"start": [
396,
1
],
"end": [
400,
67
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.cons",
"code": "lemma cons {r : R} {rs : List R} (h1 : IsSMulRegular M r)\n (h2 : IsRegular (QuotSMulTop r M) rs) : IsRegular M (r :: rs) :=\n (isRegular_cons_iff M r rs).mpr ⟨h1, h2⟩",
"start": [
402,
1
],
"end": [
404,
43
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.cons'",
"code": "lemma cons' {r : R} {rs : List R} (h1 : IsSMulRegular M r)\n (h2 : IsRegular (QuotSMulTop r M) (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) :\n IsRegular M (r :: rs) :=\n (isRegular_cons_iff' M r rs).mpr ⟨h1, h2⟩",
"start": [
406,
1
],
"end": [
409,
44
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.recIterModByRegular",
"code": "@[induction_eliminator]\ndef recIterModByRegular\n {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) →\n IsRegular M rs → Sort*}\n (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] →\n motive M [] (nil R M))\n (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) →\n (rs : List R) → (h1 : IsSMulRegular M r) → (h2 : IsRegular (QuotSMulTop r M) rs) →\n (ih : motive (QuotSMulTop r M) rs h2) → motive M (r :: rs) (cons h1 h2))\n {M} [AddCommGroup M] [Module R M] {rs} (h : IsRegular M rs) : motive M rs h :=\n h.toIsWeaklyRegular.recIterModByRegular\n (motive := fun N _ _ rs' h' => ∀ h'', motive N rs' ⟨h', h''⟩)\n (fun N _ _ h' =>\n haveI := (nontrivial_iff R).mp (nontrivial_of_ne _ _ h'); nil N)\n (fun r rs' h1 h2 h3 h4 =>\n have ⟨h5, h6⟩ := (isRegular_cons_iff _ _ _).mp ⟨h2.cons h1, h4⟩\n cons r rs' h5 h6 (h3 h6.top_ne_smul))\n h.top_ne_smul",
"start": [
411,
1
],
"end": [
435,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsRegular.ndrecIterModByRegular",
"code": "def ndrecIterModByRegular\n {motive : (M : Type v) → [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*}\n (nil : (M : Type v) → [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive M [])\n (cons : {M : Type v} → [AddCommGroup M] → [Module R M] → (r : R) →\n (rs : List R) → IsSMulRegular M r → IsRegular (QuotSMulTop r M) rs →\n motive (QuotSMulTop r M) rs → motive M (r :: rs))\n {M} [AddCommGroup M] [Module R M] {rs} : IsRegular M rs → motive M rs :=\n recIterModByRegular (motive := fun M _ _ rs _ => motive M rs) nil cons",
"start": [
437,
1
],
"end": [
446,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsRegular.recIterModByRegularWithRing",
"code": "def recIterModByRegularWithRing\n {motive : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] →\n [Module R M] → (rs : List R) → IsRegular M rs → Sort*}\n (nil : (R : Type u) → [CommRing R] → (M : Type v) → [AddCommGroup M] →\n [Module R M] → [Nontrivial M] → motive R M [] (nil R M))\n (cons : {R : Type u} → [CommRing R] → {M : Type v} → [AddCommGroup M] →\n [Module R M] → (r : R) → (rs : List R) → (h1 : IsSMulRegular M r) →\n (h2 : IsRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) →\n (ih : motive (R⧸Ideal.span {r}) (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) h2) →\n motive R M (r :: rs) (cons' h1 h2))\n {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs}\n (h : IsRegular M rs) : motive R M rs h :=\n h.toIsWeaklyRegular.recIterModByRegularWithRing\n (motive := fun R _ N _ _ rs' h' => ∀ h'', motive R N rs' ⟨h', h''⟩)\n (fun R _ N _ _ h' =>\n haveI := (nontrivial_iff R).mp (nontrivial_of_ne _ _ h'); nil R N)\n (fun r rs' h1 h2 h3 h4 =>\n have ⟨h5, h6⟩ := (isRegular_cons_iff' _ _ _).mp ⟨h2.cons' h1, h4⟩\n cons r rs' h5 h6 <| h3 h6.top_ne_smul)\n h.top_ne_smul",
"start": [
448,
1
],
"end": [
473,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsRegular.ndrecIterModByRegularWithRing",
"code": "def ndrecIterModByRegularWithRing\n {motive : (R : Type u) → [CommRing R] → (M : Type v) →\n [AddCommGroup M] → [Module R M] → (rs : List R) → Sort*}\n (nil : (R : Type u) → [CommRing R] → (M : Type v) →\n [AddCommGroup M] → [Module R M] → [Nontrivial M] → motive R M [])\n (cons : {R : Type u} → [CommRing R] → {M : Type v} →\n [AddCommGroup M] → [Module R M] → (r : R) → (rs : List R) →\n IsSMulRegular M r →\n IsRegular (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) →\n motive (R⧸Ideal.span {r}) (QuotSMulTop r M)\n (rs.map (Ideal.Quotient.mk (Ideal.span {r}))) →\n motive R M (r :: rs))\n {R} [CommRing R] {M} [AddCommGroup M] [Module R M] {rs} :\n IsRegular M rs → motive R M rs :=\n recIterModByRegularWithRing (motive := fun R _ M _ _ rs _ => motive R M rs)\n nil cons",
"start": [
475,
1
],
"end": [
493,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "RingTheory.Sequence.IsRegular.quot_ofList_smul_nontrivial",
"code": "lemma quot_ofList_smul_nontrivial {rs : List R} (h : IsRegular M rs)\n (N : Submodule R M) : Nontrivial (M ⧸ Ideal.ofList rs • N) :=\n Submodule.Quotient.nontrivial_of_lt_top _ <|\n lt_of_le_of_lt (smul_mono_right _ le_top) h.top_ne_smul.symm.lt_top",
"start": [
495,
1
],
"end": [
498,
72
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.nontrivial",
"code": "lemma nontrivial {rs : List R} (h : IsRegular M rs) : Nontrivial M :=\n haveI := quot_ofList_smul_nontrivial h ⊤\n (mkQ_surjective (Ideal.ofList rs • ⊤ : Submodule R M)).nontrivial",
"start": [
500,
1
],
"end": [
502,
68
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator",
"code": "lemma isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator\n [Nontrivial M] [Module.Finite R M] {rs : List R}\n (h : ∀ r ∈ rs, r ∈ Ideal.jacobson (Module.annihilator R M)) :\n IsRegular M rs ↔ IsWeaklyRegular M rs :=\n Iff.trans (isRegular_iff M rs) <| and_iff_left <|\n top_ne_ideal_smul_of_le_jacobson_annihilator <| Ideal.span_le.mpr h",
"start": [
506,
1
],
"end": [
511,
72
],
"kind": "lemma"
},
{
"full_name": "LocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal",
"code": "lemma _root_.LocalRing.isRegular_iff_isWeaklyRegular_of_subset_maximalIdeal\n [LocalRing R] [Nontrivial M] [Module.Finite R M] {rs : List R}\n (h : ∀ r ∈ rs, r ∈ LocalRing.maximalIdeal R) :\n IsRegular M rs ↔ IsWeaklyRegular M rs :=\n have H h' := bot_ne_top.symm <| annihilator_eq_top_iff.mp <|\n Eq.trans annihilator_top h'\n isRegular_iff_isWeaklyRegular_of_subset_jacobson_annihilator fun r hr =>\n LocalRing.jacobson_eq_maximalIdeal (Module.annihilator R M) H ▸ h r hr",
"start": [
513,
1
],
"end": [
520,
75
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.eq_nil_of_isRegular_on_artinian",
"code": "lemma eq_nil_of_isRegular_on_artinian [IsArtinian R M] :\n {rs : List R} → IsRegular M rs → rs = []\n | [], _ => rfl\n | r :: rs, h => by\n rw [isRegular_iff, ne_comm, ← lt_top_iff_ne_top, Ideal.ofList_cons,\n sup_smul, ideal_span_singleton_smul, isWeaklyRegular_cons_iff] at h\n refine absurd ?_ (ne_of_lt (lt_of_le_of_lt le_sup_left h.right))\n exact Eq.trans (Submodule.map_top _) <| LinearMap.range_eq_top.mpr <|\n surjective_of_injective_endomorphism (LinearMap.lsmul R M r) h.left.left",
"start": [
523,
1
],
"end": [
531,
79
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.isWeaklyRegular_lTensor",
"code": "lemma IsWeaklyRegular.isWeaklyRegular_lTensor [Module.Flat R M₂]\n {rs : List R} (h : IsWeaklyRegular M rs) :\n IsWeaklyRegular (M₂ ⊗[R] M) rs := by\n induction h with\n | nil N => exact nil R (M₂ ⊗[R] N)\n | @cons N _ _ r rs' h1 _ ih =>\n let e := tensorQuotSMulTopEquivQuotSMulTop r M₂ N\n exact ((e.isWeaklyRegular_congr rs').mp ih).cons (h1.lTensor M₂)",
"start": [
533,
1
],
"end": [
540,
69
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.isWeaklyRegular_rTensor",
"code": "lemma IsWeaklyRegular.isWeaklyRegular_rTensor [Module.Flat R M₂]\n {rs : List R} (h : IsWeaklyRegular M rs) :\n IsWeaklyRegular (M ⊗[R] M₂) rs := by\n induction h with\n | nil N => exact nil R (N ⊗[R] M₂)\n | @cons N _ _ r rs' h1 _ ih =>\n let e := quotSMulTopTensorEquivQuotSMulTop r M₂ N\n exact ((e.isWeaklyRegular_congr rs').mp ih).cons (h1.rTensor M₂)",
"start": [
542,
1
],
"end": [
549,
69
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.map_first_exact_on_four_term_right_exact_of_isSMulRegular_last",
"code": "lemma map_first_exact_on_four_term_right_exact_of_isSMulRegular_last\n {rs : List R} {f₁ : M →ₗ[R] M₂} {f₂ : M₂ →ₗ[R] M₃} {f₃ : M₃ →ₗ[R] M₄}\n (h₁₂ : Exact f₁ f₂) (h₂₃ : Exact f₂ f₃) (h₃ : Surjective f₃)\n (h₄ : IsWeaklyRegular M₄ rs) :\n Exact (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₁))\n (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₂)) := by\n induction' h₄ with _ _ _ N _ _ r rs h₄ _ ih generalizing M M₂ M₃\n · apply (Exact.iff_of_ladder_linearEquiv ?_ ?_).mp h₁₂\n any_goals exact quotEquivOfEqBot _ <|\n Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤)\n all_goals exact quot_hom_ext _ _ _ fun _ => rfl\n · specialize ih\n (map_first_exact_on_four_term_exact_of_isSMulRegular_last h₁₂ h₂₃ h₄)\n (map_exact r h₂₃ h₃) (map_surjective r h₃)\n have H₁ := quotOfListConsSMulTopEquivQuotSMulTopInner_naturality r rs f₁\n have H₂ := quotOfListConsSMulTopEquivQuotSMulTopInner_naturality r rs f₂\n exact (Exact.iff_of_ladder_linearEquiv H₁.symm H₂.symm).mp ih",
"start": [
552,
1
],
"end": [
568,
66
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.swap",
"code": "private lemma IsWeaklyRegular.swap {a b : R} (h1 : IsWeaklyRegular M [a, b])\n (h2 : torsionBy R M b = a • torsionBy R M b → torsionBy R M b = ⊥) :\n IsWeaklyRegular M [b, a] := by\n rw [isWeaklyRegular_cons_iff, isWeaklyRegular_singleton_iff] at h1 ⊢\n obtain ⟨ha, hb⟩ := h1\n rw [← isSMulRegular_iff_torsionBy_eq_bot] at h2\n specialize h2 (le_antisymm ?_ (smul_le_self_of_tower a (torsionBy R M b)))\n · refine le_of_eq_of_le ?_ <| smul_top_inf_eq_smul_of_isSMulRegular_on_quot <|\n ha.of_injective _ <| ker_eq_bot.mp <| ker_liftQ_eq_bot' _ (lsmul R M b) rfl\n rw [← (isSMulRegular_on_quot_iff_lsmul_comap_eq _ _).mp hb]\n exact (inf_eq_right.mpr (ker_le_comap _)).symm\n · rwa [ha.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul, inf_comm, smul_comm,\n ← h2.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul, and_iff_left hb]",
"start": [
575,
1
],
"end": [
587,
76
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.prototype_perm",
"code": "lemma IsWeaklyRegular.prototype_perm {rs : List R} (h : IsWeaklyRegular M rs)\n {rs'} (h'' : rs ~ rs') (h' : ∀ a b rs', (a :: b :: rs') <+~ rs →\n let K := torsionBy R (M ⧸ (Ideal.ofList rs' • ⊤ : Submodule R M)) b\n K = a • K → K = ⊥) : IsWeaklyRegular M rs' :=\n have H := LinearEquiv.isWeaklyRegular_congr <| quotEquivOfEqBot _ <|\n Eq.trans (congrArg (· • ⊤) Ideal.ofList_nil) (bot_smul ⊤)\n (H rs').mp <| (aux [] h'' (.refl rs) (h''.symm.subperm)) <| (H rs).mpr h\n where aux {rs₁ rs₂} (rs₀ : List R)\n (h₁₂ : rs₁ ~ rs₂) (H₁ : rs₀ ++ rs₁ <+~ rs) (H₃ : rs₀ ++ rs₂ <+~ rs)\n (h : IsWeaklyRegular (M ⧸ (Ideal.ofList rs₀ • ⊤ : Submodule R M)) rs₁) :\n IsWeaklyRegular (M ⧸ (Ideal.ofList rs₀ • ⊤ : Submodule R M)) rs₂ := by {\n induction h₁₂ generalizing rs₀ with\n | nil => exact .nil R _\n | cons r _ ih =>\n let e := quotOfListConsSMulTopEquivQuotSMulTopOuter M r rs₀\n rw [isWeaklyRegular_cons_iff, ← e.isWeaklyRegular_congr] at h ⊢\n refine h.imp_right (ih (r :: rs₀) ?_ ?_) <;>\n exact List.perm_middle.subperm_right.mp ‹_›\n | swap a b t =>\n rw [show ∀ x y z, x :: y :: z = [x, y] ++ z from fun _ _ _ => rfl,\n isWeaklyRegular_append_iff] at h ⊢\n have : Ideal.ofList [b, a] = Ideal.ofList [a, b] :=\n congrArg Ideal.span <| Set.ext fun _ => (List.Perm.swap a b []).mem_iff\n rw [(quotEquivOfEq _ _ (congrArg₂ _ this rfl)).isWeaklyRegular_congr] at h\n rw [List.append_cons, List.append_cons, List.append_assoc _ [b] [a]] at H₁\n apply (List.sublist_append_left (rs₀ ++ [b, a]) _).subperm.trans at H₁\n apply List.perm_append_comm.subperm.trans at H₁\n exact h.imp_left (swap · (h' b a rs₀ H₁))\n | trans h₁₂ _ ih₁₂ ih₂₃ =>\n have H₂ := (h₁₂.append_left rs₀).subperm_right.mp H₁\n exact ih₂₃ rs₀ H₂ H₃ (ih₁₂ rs₀ H₁ H₂ h) }",
"start": [
595,
1
],
"end": [
625,
46
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator",
"code": "lemma IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator [IsNoetherian R M]\n {rs rs' : List R} (h1 : IsWeaklyRegular M rs) (h2 : List.Perm rs rs')\n (h3 : ∀ r ∈ rs, r ∈ (Module.annihilator R M).jacobson) :\n IsWeaklyRegular M rs' :=\n h1.prototype_perm h2 fun r _ _ h h' =>\n eq_bot_of_eq_pointwise_smul_of_mem_jacobson_annihilator\n (IsNoetherian.noetherian _) h'\n (Ideal.jacobson_mono\n (le_trans\n (LinearMap.annihilator_le_of_surjective (R := R) _ (mkQ_surjective _))\n (LinearMap.annihilator_le_of_injective _ (injective_subtype _)))\n (h3 r (h.subset (List.mem_cons_self _ _))))",
"start": [
629,
1
],
"end": [
642,
52
],
"kind": "lemma"
},
{
"full_name": "RingTheory.Sequence.IsRegular.of_perm_of_subset_jacobson_annihilator",
"code": "lemma IsRegular.of_perm_of_subset_jacobson_annihilator [IsNoetherian R M]\n {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs')\n (h3 : ∀ r ∈ rs, r ∈ (Module.annihilator R M).jacobson) : IsRegular M rs' :=\n ⟨h1.toIsWeaklyRegular.of_perm_of_subset_jacobson_annihilator h2 h3,\n letI := h1.nontrivial\n top_ne_ideal_smul_of_le_jacobson_annihilator <|\n Ideal.span_le.mpr (h3 · <| h2.mem_iff.mpr ·)⟩",
"start": [
646,
1
],
"end": [
652,
52
],
"kind": "lemma"
},
{
"full_name": "LocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal",
"code": "lemma _root_.LocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal\n [LocalRing R] [IsNoetherian R M] {rs rs' : List R}\n (h1 : IsWeaklyRegular M rs) (h2 : List.Perm rs rs')\n (h3 : ∀ r ∈ rs, r ∈ LocalRing.maximalIdeal R) : IsWeaklyRegular M rs' :=\n IsWeaklyRegular.of_perm_of_subset_jacobson_annihilator h1 h2 fun r hr =>\n LocalRing.maximalIdeal_le_jacobson _ (h3 r hr)",
"start": [
654,
1
],
"end": [
659,
51
],
"kind": "lemma"
},
{
"full_name": "LocalRing.isRegular_of_perm",
"code": "lemma _root_.LocalRing.isRegular_of_perm [LocalRing R] [IsNoetherian R M]\n {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs') :\n IsRegular M rs' := by\n obtain ⟨h3, h4⟩ := h1\n refine ⟨LocalRing.isWeaklyRegular_of_perm_of_subset_maximalIdeal h3 h2 ?_, ?_⟩\n · intro x (h6 : x ∈ { r | r ∈ rs })\n refine LocalRing.le_maximalIdeal ?_ (Ideal.subset_span h6)\n exact h4 ∘ Eq.trans (top_smul _).symm ∘ Eq.symm ∘ congrArg (· • ⊤)\n · refine ne_of_ne_of_eq h4 (congrArg (Ideal.span · • ⊤) ?_)\n exact Set.ext fun _ => h2.mem_iff",
"start": [
661,
1
],
"end": [
670,
38
],
"kind": "lemma"
}
] |
Mathlib/NumberTheory/Liouville/LiouvilleNumber.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/NumberTheory/Liouville/Basic.lean"
] | [
{
"full_name": "liouvilleNumber",
"code": "def liouvilleNumber (m : ℝ) : ℝ :=\n ∑' i : ℕ, 1 / m ^ i !",
"start": [
42,
1
],
"end": [
50,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.partialSum",
"code": "def partialSum (m : ℝ) (k : ℕ) : ℝ :=\n ∑ i ∈ range (k + 1), 1 / m ^ i !",
"start": [
55,
1
],
"end": [
62,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.remainder",
"code": "def remainder (m : ℝ) (k : ℕ) : ℝ :=\n ∑' i, 1 / m ^ (i + (k + 1))!",
"start": [
65,
1
],
"end": [
72,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.summable",
"code": "protected theorem summable {m : ℝ} (hm : 1 < m) : Summable fun i : ℕ => 1 / m ^ i !",
"start": [
80,
1
],
"end": [
81,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.remainder_summable",
"code": "theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :\n Summable fun i : ℕ => 1 / m ^ (i + (k + 1))!",
"start": [
84,
1
],
"end": [
86,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.remainder_pos",
"code": "theorem remainder_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < remainder m k",
"start": [
89,
1
],
"end": [
90,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.partialSum_succ",
"code": "theorem partialSum_succ (m : ℝ) (n : ℕ) :\n partialSum m (n + 1) = partialSum m n + 1 / m ^ (n + 1)!",
"start": [
93,
1
],
"end": [
95,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.partialSum_add_remainder",
"code": "theorem partialSum_add_remainder {m : ℝ} (hm : 1 < m) (k : ℕ) :\n partialSum m k + remainder m k = liouvilleNumber m",
"start": [
98,
1
],
"end": [
101,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.remainder_lt'",
"code": "theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :\n remainder m n < (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!)",
"start": [
107,
1
],
"end": [
134,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.aux_calc",
"code": "theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :\n (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) ≤ 1 / (m ^ n !) ^ n",
"start": [
137,
1
],
"end": [
160,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.remainder_lt",
"code": "theorem remainder_lt (n : ℕ) {m : ℝ} (m2 : 2 ≤ m) : remainder m n < 1 / (m ^ n !) ^ n",
"start": [
163,
1
],
"end": [
167,
71
],
"kind": "commanddeclaration"
},
{
"full_name": "LiouvilleNumber.partialSum_eq_rat",
"code": "theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) :\n ∃ p : ℕ, partialSum m k = p / ((m ^ k ! :) : ℝ)",
"start": [
173,
1
],
"end": [
186,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "liouville_liouvilleNumber",
"code": "theorem liouville_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvilleNumber m)",
"start": [
193,
1
],
"end": [
206,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "transcendental_liouvilleNumber",
"code": "theorem transcendental_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) :\n Transcendental ℤ (liouvilleNumber m)",
"start": [
209,
1
],
"end": [
211,
48
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Convex/Independent.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/Convex/Extreme.lean",
"Mathlib/Analysis/Convex/Combination.lean"
] | [
{
"full_name": "ConvexIndependent",
"code": "def ConvexIndependent (p : ι → E) : Prop :=\n ∀ (s : Set ι) (x : ι), p x ∈ convexHull 𝕜 (p '' s) → x ∈ s",
"start": [
56,
1
],
"end": [
59,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "Subsingleton.convexIndependent",
"code": "theorem Subsingleton.convexIndependent [Subsingleton ι] (p : ι → E) : ConvexIndependent 𝕜 p",
"start": [
64,
1
],
"end": [
69,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.injective",
"code": "protected theorem ConvexIndependent.injective {p : ι → E} (hc : ConvexIndependent 𝕜 p) :\n Function.Injective p",
"start": [
72,
1
],
"end": [
77,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.comp_embedding",
"code": "theorem ConvexIndependent.comp_embedding {ι' : Type*} (f : ι' ↪ ι) {p : ι → E}\n (hc : ConvexIndependent 𝕜 p) : ConvexIndependent 𝕜 (p ∘ f)",
"start": [
80,
1
],
"end": [
86,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.subtype",
"code": "protected theorem ConvexIndependent.subtype {p : ι → E} (hc : ConvexIndependent 𝕜 p) (s : Set ι) :\n ConvexIndependent 𝕜 fun i : s => p i",
"start": [
89,
1
],
"end": [
93,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.range",
"code": "protected theorem ConvexIndependent.range {p : ι → E} (hc : ConvexIndependent 𝕜 p) :\n ConvexIndependent 𝕜 ((↑) : Set.range p → E)",
"start": [
96,
1
],
"end": [
104,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.mono",
"code": "protected theorem ConvexIndependent.mono {s t : Set E} (hc : ConvexIndependent 𝕜 ((↑) : t → E))\n (hs : s ⊆ t) : ConvexIndependent 𝕜 ((↑) : s → E)",
"start": [
107,
1
],
"end": [
110,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "Function.Injective.convexIndependent_iff_set",
"code": "theorem Function.Injective.convexIndependent_iff_set {p : ι → E} (hi : Function.Injective p) :\n ConvexIndependent 𝕜 ((↑) : Set.range p → E) ↔ ConvexIndependent 𝕜 p",
"start": [
113,
1
],
"end": [
120,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "ConvexIndependent.mem_convexHull_iff",
"code": "@[simp]\nprotected theorem ConvexIndependent.mem_convexHull_iff {p : ι → E} (hc : ConvexIndependent 𝕜 p)\n (s : Set ι) (i : ι) : p i ∈ convexHull 𝕜 (p '' s) ↔ i ∈ s",
"start": [
123,
1
],
"end": [
128,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "convexIndependent_iff_not_mem_convexHull_diff",
"code": "theorem convexIndependent_iff_not_mem_convexHull_diff {p : ι → E} :\n ConvexIndependent 𝕜 p ↔ ∀ i s, p i ∉ convexHull 𝕜 (p '' (s \\ {i}))",
"start": [
131,
1
],
"end": [
141,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "convexIndependent_set_iff_inter_convexHull_subset",
"code": "theorem convexIndependent_set_iff_inter_convexHull_subset {s : Set E} :\n ConvexIndependent 𝕜 ((↑) : s → E) ↔ ∀ t, t ⊆ s → s ∩ convexHull 𝕜 t ⊆ t",
"start": [
144,
1
],
"end": [
153,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "convexIndependent_set_iff_not_mem_convexHull_diff",
"code": "theorem convexIndependent_set_iff_not_mem_convexHull_diff {s : Set E} :\n ConvexIndependent 𝕜 ((↑) : s → E) ↔ ∀ x ∈ s, x ∉ convexHull 𝕜 (s \\ {x})",
"start": [
156,
1
],
"end": [
166,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "convexIndependent_iff_finset",
"code": "theorem convexIndependent_iff_finset {p : ι → E} :\n ConvexIndependent 𝕜 p ↔\n ∀ (s : Finset ι) (x : ι), p x ∈ convexHull 𝕜 (s.image p : Set E) → x ∈ s",
"start": [
175,
1
],
"end": [
195,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "Convex.convexIndependent_extremePoints",
"code": "theorem Convex.convexIndependent_extremePoints (hs : Convex 𝕜 s) :\n ConvexIndependent 𝕜 ((↑) : s.extremePoints 𝕜 → E)",
"start": [
201,
1
],
"end": [
207,
28
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Erased.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Logic/Equiv/Defs.lean"
] | [
{
"full_name": "Erased",
"code": "def Erased (α : Sort u) : Sort max 1 u :=\n Σ's : α → Prop, ∃ a, (fun b => a = b) = s",
"start": [
21,
1
],
"end": [
26,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.mk",
"code": "@[inline]\ndef mk {α} (a : α) : Erased α :=\n ⟨fun b => a = b, a, rfl⟩",
"start": [
31,
1
],
"end": [
34,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.out",
"code": "noncomputable def out {α} : Erased α → α\n | ⟨_, h⟩ => Classical.choose h",
"start": [
37,
1
],
"end": [
39,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.OutType",
"code": "abbrev OutType (a : Erased (Sort u)) : Sort u :=\n out a",
"start": [
42,
1
],
"end": [
47,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.out_proof",
"code": "theorem out_proof {p : Prop} (a : Erased p) : p",
"start": [
50,
1
],
"end": [
52,
8
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.out_mk",
"code": "@[simp]\ntheorem out_mk {α} (a : α) : (mk a).out = a",
"start": [
55,
1
],
"end": [
59,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.mk_out",
"code": "@[simp]\ntheorem mk_out {α} : ∀ a : Erased α, mk (out a) = a",
"start": [
62,
1
],
"end": [
64,
70
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.out_inj",
"code": "@[ext]\ntheorem out_inj {α} (a b : Erased α) (h : a.out = b.out) : a = b",
"start": [
67,
1
],
"end": [
68,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.equiv",
"code": "noncomputable def equiv (α) : Erased α ≃ α :=\n ⟨out, mk, mk_out, out_mk⟩",
"start": [
71,
1
],
"end": [
73,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.choice",
"code": "def choice {α} (h : Nonempty α) : Erased α :=\n mk (Classical.choice h)",
"start": [
84,
1
],
"end": [
86,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.nonempty_iff",
"code": "@[simp]\ntheorem nonempty_iff {α} : Nonempty (Erased α) ↔ Nonempty α",
"start": [
89,
1
],
"end": [
91,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.bind",
"code": "def bind {α β} (a : Erased α) (f : α → Erased β) : Erased β :=\n ⟨fun b => (f a.out).1 b, (f a.out).2⟩",
"start": [
97,
1
],
"end": [
103,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.bind_eq_out",
"code": "@[simp]\ntheorem bind_eq_out {α β} (a f) : @bind α β a f = f a.out",
"start": [
106,
1
],
"end": [
107,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.join",
"code": "def join {α} (a : Erased (Erased α)) : Erased α :=\n bind a id",
"start": [
110,
1
],
"end": [
113,
12
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.join_eq_out",
"code": "@[simp]\ntheorem join_eq_out {α} (a) : @join α a = a.out",
"start": [
116,
1
],
"end": [
118,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.map",
"code": "def map {α β} (f : α → β) (a : Erased α) : Erased β :=\n bind a (mk ∘ f)",
"start": [
121,
1
],
"end": [
127,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.map_out",
"code": "@[simp]\ntheorem map_out {α β} {f : α → β} (a : Erased α) : (a.map f).out = f a.out",
"start": [
130,
1
],
"end": [
131,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.Monad",
"code": "protected instance Monad : Monad Erased where\n pure := @mk\n bind := @bind\n map := @map",
"start": [
134,
1
],
"end": [
137,
14
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.pure_def",
"code": "@[simp]\ntheorem pure_def {α} : (pure : α → Erased α) = @mk _",
"start": [
140,
1
],
"end": [
142,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.bind_def",
"code": "@[simp]\ntheorem bind_def {α β} : ((· >>= ·) : Erased α → (α → Erased β) → Erased β) = @bind _ _",
"start": [
145,
1
],
"end": [
147,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.map_def",
"code": "@[simp]\ntheorem map_def {α β} : ((· <$> ·) : (α → β) → Erased α → Erased β) = @map _ _",
"start": [
150,
1
],
"end": [
152,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Erased.instLawfulMonad",
"code": "protected instance instLawfulMonad : LawfulMonad Erased :=\n { id_map := by intros; ext; simp\n map_const := by intros; ext; simp [Functor.mapConst]\n pure_bind := by intros; ext; simp\n bind_assoc := by intros; ext; simp\n bind_pure_comp := by intros; ext; simp\n bind_map := by intros; ext; simp [Seq.seq]\n seqLeft_eq := by intros; ext; simp [Seq.seq, Functor.mapConst, SeqLeft.seqLeft]\n seqRight_eq := by intros; ext; simp [Seq.seq, Functor.mapConst, SeqRight.seqRight]\n pure_seq := by intros; ext; simp [Seq.seq, Functor.mapConst, SeqRight.seqRight] }",
"start": [
156,
1
],
"end": [
165,
86
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Limits/Shapes/DisjointCoproduct.lean | [
"Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean"
] | [
{
"full_name": "CategoryTheory.Limits.CoproductDisjoint",
"code": "class CoproductDisjoint (X₁ X₂ : C) where\n isInitialOfIsPullbackOfIsCoproduct :\n ∀ {X Z} {pX₁ : X₁ ⟶ X} {pX₂ : X₂ ⟶ X} {f : Z ⟶ X₁} {g : Z ⟶ X₂}\n (_cX : IsColimit (BinaryCofan.mk pX₁ pX₂)) {comm : f ≫ pX₁ = g ≫ pX₂},\n IsLimit (PullbackCone.mk _ _ comm) → IsInitial Z\n mono_inl : ∀ (X) (X₁ : X₁ ⟶ X) (X₂ : X₂ ⟶ X) (_cX : IsColimit (BinaryCofan.mk X₁ X₂)), Mono X₁\n mono_inr : ∀ (X) (X₁ : X₁ ⟶ X) (X₂ : X₂ ⟶ X) (_cX : IsColimit (BinaryCofan.mk X₁ X₂)), Mono X₂",
"start": [
38,
1
],
"end": [
53,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.isInitialOfIsPullbackOfIsCoproduct",
"code": "def isInitialOfIsPullbackOfIsCoproduct {Z X₁ X₂ X : C} [CoproductDisjoint X₁ X₂] {pX₁ : X₁ ⟶ X}\n {pX₂ : X₂ ⟶ X} (cX : IsColimit (BinaryCofan.mk pX₁ pX₂)) {f : Z ⟶ X₁} {g : Z ⟶ X₂}\n {comm : f ≫ pX₁ = g ≫ pX₂} (cZ : IsLimit (PullbackCone.mk _ _ comm)) : IsInitial Z :=\n CoproductDisjoint.isInitialOfIsPullbackOfIsCoproduct cX cZ",
"start": [
56,
1
],
"end": [
67,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.isInitialOfIsPullbackOfCoproduct",
"code": "noncomputable def isInitialOfIsPullbackOfCoproduct {Z X₁ X₂ : C} [HasBinaryCoproduct X₁ X₂]\n [CoproductDisjoint X₁ X₂] {f : Z ⟶ X₁} {g : Z ⟶ X₂}\n {comm : f ≫ (coprod.inl : X₁ ⟶ _ ⨿ X₂) = g ≫ coprod.inr}\n (cZ : IsLimit (PullbackCone.mk _ _ comm)) : IsInitial Z :=\n CoproductDisjoint.isInitialOfIsPullbackOfIsCoproduct (coprodIsCoprod _ _) cZ",
"start": [
70,
1
],
"end": [
82,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.isInitialOfPullbackOfIsCoproduct",
"code": "noncomputable def isInitialOfPullbackOfIsCoproduct {X X₁ X₂ : C} [CoproductDisjoint X₁ X₂]\n {pX₁ : X₁ ⟶ X} {pX₂ : X₂ ⟶ X} [HasPullback pX₁ pX₂] (cX : IsColimit (BinaryCofan.mk pX₁ pX₂)) :\n IsInitial (pullback pX₁ pX₂) :=\n CoproductDisjoint.isInitialOfIsPullbackOfIsCoproduct cX (pullbackIsPullback _ _)",
"start": [
85,
1
],
"end": [
95,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.isInitialOfPullbackOfCoproduct",
"code": "noncomputable def isInitialOfPullbackOfCoproduct {X₁ X₂ : C} [HasBinaryCoproduct X₁ X₂]\n [CoproductDisjoint X₁ X₂] [HasPullback (coprod.inl : X₁ ⟶ _ ⨿ X₂) coprod.inr] :\n IsInitial (pullback (coprod.inl : X₁ ⟶ _ ⨿ X₂) coprod.inr) :=\n isInitialOfIsPullbackOfCoproduct (pullbackIsPullback _ _)",
"start": [
98,
1
],
"end": [
104,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.CoproductsDisjoint",
"code": "class CoproductsDisjoint (C : Type u) [Category.{v} C] where\n CoproductDisjoint : ∀ X Y : C, CoproductDisjoint X Y",
"start": [
115,
1
],
"end": [
117,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Limits.initialMonoClass_of_disjoint_coproducts",
"code": "theorem initialMonoClass_of_disjoint_coproducts [CoproductsDisjoint C] : InitialMonoClass C where",
"start": [
122,
1
],
"end": [
132,
59
],
"kind": "commanddeclaration"
}
] |
Mathlib/Combinatorics/Additive/RuzsaCovering.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/SetTheory/Cardinal/Finite.lean",
"Mathlib/Data/Finset/Pointwise.lean"
] | [
{
"full_name": "Finset.exists_subset_mul_div",
"code": "@[to_additive \"**Ruzsa's covering lemma**\"]\ntheorem exists_subset_mul_div (ht : t.Nonempty) :\n ∃ u : Finset α, u.card * t.card ≤ (s * t).card ∧ s ⊆ u * t / t",
"start": [
29,
1
],
"end": [
53,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "Set.exists_subset_mul_div",
"code": "@[to_additive \"**Ruzsa's covering lemma**. Version for sets. For finsets,\nsee `Finset.exists_subset_add_sub`.\"]\nlemma exists_subset_mul_div (hs : s.Finite) (ht' : t.Finite) (ht : t.Nonempty) :\n ∃ u : Set α, Nat.card u * Nat.card t ≤ Nat.card (s * t) ∧ s ⊆ u * t / t ∧ u.Finite := by\n lift s to Finset α using hs\n lift t to Finset α using ht'\n classical\n obtain ⟨u, hu, hsut⟩ := Finset.exists_subset_mul_div s ht\n refine ⟨u, ?_⟩\n rw [← Finset.coe_mul, ← Finset.coe_mul, ← Finset.coe_div]\n norm_cast\n simp [*]",
"start": [
62,
1
],
"end": [
75,
11
],
"kind": "lemma"
}
] |
Mathlib/RingTheory/NormTrace.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/Trace.lean",
"Mathlib/RingTheory/Norm.lean"
] | [
{
"full_name": "Algebra.norm_one_add_smul",
"code": "lemma Algebra.norm_one_add_smul {A B} [CommRing A] [CommRing B] [Algebra A B]\n [Module.Free A B] [Module.Finite A B] (a : A) (x : B) :\n ∃ r : A, Algebra.norm A (1 + a • x) = 1 + Algebra.trace A B x * a + r * a ^ 2 := by\n classical\n let ι := Module.Free.ChooseBasisIndex A B\n let b : Basis ι A B := Module.Free.chooseBasis _ _\n haveI : Fintype ι := inferInstance\n clear_value ι b\n simp_rw [Algebra.norm_eq_matrix_det b, Algebra.trace_eq_matrix_trace b]\n simp only [map_add, map_one, map_smul, Matrix.det_one_add_smul a]\n exact ⟨_, rfl⟩",
"start": [
14,
1
],
"end": [
24,
17
],
"kind": "lemma"
}
] |
Mathlib/Data/Matrix/ColumnRowPartitioned.lean | [
"Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/Matrix/Basic.lean",
"Mathlib/Data/Matrix/Block.lean"
] | [
{
"full_name": "Matrix.fromRows",
"code": "def fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) : Matrix (m₁ ⊕ m₂) n R :=\n of (Sum.elim A₁ A₂)",
"start": [
34,
1
],
"end": [
37,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.fromColumns",
"code": "def fromColumns (B₁ : Matrix m n₁ R) (B₂ : Matrix m n₂ R) : Matrix m (n₁ ⊕ n₂) R :=\n of fun i => Sum.elim (B₁ i) (B₂ i)",
"start": [
39,
1
],
"end": [
42,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.toColumns₁",
"code": "def toColumns₁ (A : Matrix m (n₁ ⊕ n₂) R) : Matrix m n₁ R := of fun i j => (A i (Sum.inl j))",
"start": [
44,
1
],
"end": [
45,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.toColumns₂",
"code": "def toColumns₂ (A : Matrix m (n₁ ⊕ n₂) R) : Matrix m n₂ R := of fun i j => (A i (Sum.inr j))",
"start": [
47,
1
],
"end": [
48,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.toRows₁",
"code": "def toRows₁ (A : Matrix (m₁ ⊕ m₂) n R) : Matrix m₁ n R := of fun i j => (A (Sum.inl i) j)",
"start": [
50,
1
],
"end": [
51,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.toRows₂",
"code": "def toRows₂ (A : Matrix (m₁ ⊕ m₂) n R) : Matrix m₂ n R := of fun i j => (A (Sum.inr i) j)",
"start": [
53,
1
],
"end": [
54,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.fromRows_apply_inl",
"code": "@[simp]\nlemma fromRows_apply_inl (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (i : m₁) (j : n) :\n (fromRows A₁ A₂) (Sum.inl i) j = A₁ i j := rfl",
"start": [
56,
1
],
"end": [
58,
51
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_apply_inr",
"code": "@[simp]\nlemma fromRows_apply_inr (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (i : m₂) (j : n) :\n (fromRows A₁ A₂) (Sum.inr i) j = A₂ i j := rfl",
"start": [
60,
1
],
"end": [
62,
51
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_apply_inl",
"code": "@[simp]\nlemma fromColumns_apply_inl (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) (i : m) (j : n₁) :\n (fromColumns A₁ A₂) i (Sum.inl j) = A₁ i j := rfl",
"start": [
64,
1
],
"end": [
66,
54
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_apply_inr",
"code": "@[simp]\nlemma fromColumns_apply_inr (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) (i : m) (j : n₂) :\n (fromColumns A₁ A₂) i (Sum.inr j) = A₂ i j := rfl",
"start": [
68,
1
],
"end": [
70,
54
],
"kind": "lemma"
},
{
"full_name": "Matrix.toRows₁_apply",
"code": "@[simp]\nlemma toRows₁_apply (A : Matrix (m₁ ⊕ m₂) n R) (i : m₁) (j : n) :\n (toRows₁ A) i j = A (Sum.inl i) j := rfl",
"start": [
72,
1
],
"end": [
74,
45
],
"kind": "lemma"
},
{
"full_name": "Matrix.toRows₂_apply",
"code": "@[simp]\nlemma toRows₂_apply (A : Matrix (m₁ ⊕ m₂) n R) (i : m₂) (j : n) :\n (toRows₂ A) i j = A (Sum.inr i) j := rfl",
"start": [
76,
1
],
"end": [
78,
45
],
"kind": "lemma"
},
{
"full_name": "Matrix.toRows₁_fromRows",
"code": "@[simp]\nlemma toRows₁_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :\n toRows₁ (fromRows A₁ A₂) = A₁ := rfl",
"start": [
80,
1
],
"end": [
82,
41
],
"kind": "lemma"
},
{
"full_name": "Matrix.toRows₂_fromRows",
"code": "@[simp]\nlemma toRows₂_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :\n toRows₂ (fromRows A₁ A₂) = A₂ := rfl",
"start": [
84,
1
],
"end": [
86,
41
],
"kind": "lemma"
},
{
"full_name": "Matrix.toColumns₁_apply",
"code": "@[simp]\nlemma toColumns₁_apply (A : Matrix m (n₁ ⊕ n₂) R) (i : m) (j : n₁) :\n (toColumns₁ A) i j = A i (Sum.inl j) := rfl",
"start": [
88,
1
],
"end": [
90,
48
],
"kind": "lemma"
},
{
"full_name": "Matrix.toColumns₂_apply",
"code": "@[simp]\nlemma toColumns₂_apply (A : Matrix m (n₁ ⊕ n₂) R) (i : m) (j : n₂) :\n (toColumns₂ A) i j = A i (Sum.inr j) := rfl",
"start": [
92,
1
],
"end": [
94,
48
],
"kind": "lemma"
},
{
"full_name": "Matrix.toColumns₁_fromColumns",
"code": "@[simp]\nlemma toColumns₁_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :\n toColumns₁ (fromColumns A₁ A₂) = A₁ := rfl",
"start": [
96,
1
],
"end": [
98,
47
],
"kind": "lemma"
},
{
"full_name": "Matrix.toColumns₂_fromColumns",
"code": "@[simp]\nlemma toColumns₂_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :\n toColumns₂ (fromColumns A₁ A₂) = A₂ := rfl",
"start": [
100,
1
],
"end": [
102,
47
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_toColumns",
"code": "@[simp]\nlemma fromColumns_toColumns (A : Matrix m (n₁ ⊕ n₂) R) :\n fromColumns A.toColumns₁ A.toColumns₂ = A := by\n ext i (j | j) <;> simp",
"start": [
104,
1
],
"end": [
107,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_toRows",
"code": "@[simp]\nlemma fromRows_toRows (A : Matrix (m₁ ⊕ m₂) n R) : fromRows A.toRows₁ A.toRows₂ = A := by\n ext (i | i) j <;> simp",
"start": [
109,
1
],
"end": [
111,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_inj",
"code": "lemma fromRows_inj : Function.Injective2 (@fromRows R m₁ m₂ n) := by\n intros x1 x2 y1 y2\n simp only [Function.funext_iff, ← Matrix.ext_iff]\n aesop",
"start": [
113,
1
],
"end": [
116,
8
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_inj",
"code": "lemma fromColumns_inj : Function.Injective2 (@fromColumns R m n₁ n₂) := by\n intros x1 x2 y1 y2\n simp only [Function.funext_iff, ← Matrix.ext_iff]\n aesop",
"start": [
118,
1
],
"end": [
121,
8
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_ext_iff",
"code": "lemma fromColumns_ext_iff (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) (B₁ : Matrix m n₁ R)\n (B₂ : Matrix m n₂ R) :\n fromColumns A₁ A₂ = fromColumns B₁ B₂ ↔ A₁ = B₁ ∧ A₂ = B₂ := fromColumns_inj.eq_iff",
"start": [
123,
1
],
"end": [
125,
88
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_ext_iff",
"code": "lemma fromRows_ext_iff (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B₁ : Matrix m₁ n R)\n (B₂ : Matrix m₂ n R) :\n fromRows A₁ A₂ = fromRows B₁ B₂ ↔ A₁ = B₁ ∧ A₂ = B₂ := fromRows_inj.eq_iff",
"start": [
127,
1
],
"end": [
129,
79
],
"kind": "lemma"
},
{
"full_name": "Matrix.transpose_fromColumns",
"code": "lemma transpose_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :\n transpose (fromColumns A₁ A₂) = fromRows (transpose A₁) (transpose A₂) := by\n ext (i | i) j <;> simp",
"start": [
131,
1
],
"end": [
135,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.transpose_fromRows",
"code": "lemma transpose_fromRows (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :\n transpose (fromRows A₁ A₂) = fromColumns (transpose A₁) (transpose A₂) := by\n ext i (j | j) <;> simp",
"start": [
137,
1
],
"end": [
141,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_neg",
"code": "@[simp]\nlemma fromRows_neg (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) :\n -fromRows A₁ A₂ = fromRows (-A₁) (-A₂) := by\n ext (i | i) j <;> simp",
"start": [
147,
1
],
"end": [
151,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_neg",
"code": "@[simp]\nlemma fromColumns_neg (A₁ : Matrix n m₁ R) (A₂ : Matrix n m₂ R) :\n -fromColumns A₁ A₂ = fromColumns (-A₁) (-A₂) := by\n ext i (j | j) <;> simp",
"start": [
153,
1
],
"end": [
157,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_mulVec",
"code": "@[simp]\nlemma fromRows_mulVec (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (v : n → R) :\n fromRows A₁ A₂ *ᵥ v = Sum.elim (A₁ *ᵥ v) (A₂ *ᵥ v) := by\n ext (_ | _) <;> rfl",
"start": [
165,
1
],
"end": [
168,
22
],
"kind": "lemma"
},
{
"full_name": "Matrix.vecMul_fromColumns",
"code": "@[simp]\nlemma vecMul_fromColumns (B₁ : Matrix m n₁ R) (B₂ : Matrix m n₂ R) (v : m → R) :\n v ᵥ* fromColumns B₁ B₂ = Sum.elim (v ᵥ* B₁) (v ᵥ* B₂) := by\n ext (_ | _) <;> rfl",
"start": [
170,
1
],
"end": [
173,
22
],
"kind": "lemma"
},
{
"full_name": "Matrix.sum_elim_vecMul_fromRows",
"code": "@[simp]\nlemma sum_elim_vecMul_fromRows (B₁ : Matrix m₁ n R) (B₂ : Matrix m₂ n R)\n (v₁ : m₁ → R) (v₂ : m₂ → R) :\n Sum.elim v₁ v₂ ᵥ* fromRows B₁ B₂ = v₁ ᵥ* B₁ + v₂ ᵥ* B₂ := by\n ext\n simp [Matrix.vecMul, fromRows, dotProduct]",
"start": [
175,
1
],
"end": [
180,
45
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_mulVec_sum_elim",
"code": "@[simp]\nlemma fromColumns_mulVec_sum_elim (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R)\n (v₁ : n₁ → R) (v₂ : n₂ → R) :\n fromColumns A₁ A₂ *ᵥ Sum.elim v₁ v₂ = A₁ *ᵥ v₁ + A₂ *ᵥ v₂ := by\n ext\n simp [Matrix.mulVec, fromColumns]",
"start": [
182,
1
],
"end": [
187,
36
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_mul",
"code": "@[simp]\nlemma fromRows_mul (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B : Matrix n m R) :\n fromRows A₁ A₂ * B = fromRows (A₁ * B) (A₂ * B) := by\n ext (_ | _) _ <;> simp [mul_apply]",
"start": [
189,
1
],
"end": [
192,
37
],
"kind": "lemma"
},
{
"full_name": "Matrix.mul_fromColumns",
"code": "@[simp]\nlemma mul_fromColumns (A : Matrix m n R) (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :\n A * fromColumns B₁ B₂ = fromColumns (A * B₁) (A * B₂) := by\n ext _ (_ | _) <;> simp [mul_apply]",
"start": [
194,
1
],
"end": [
197,
37
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_zero",
"code": "@[simp]\nlemma fromRows_zero : fromRows (0 : Matrix m₁ n R) (0 : Matrix m₂ n R) = 0 := by\n ext (_ | _) _ <;> simp",
"start": [
199,
1
],
"end": [
201,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_zero",
"code": "@[simp]\nlemma fromColumns_zero : fromColumns (0 : Matrix m n₁ R) (0 : Matrix m n₂ R) = 0 := by\n ext _ (_ | _) <;> simp",
"start": [
203,
1
],
"end": [
205,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_fromRows_eq_fromBlocks",
"code": "@[simp]\nlemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)\n (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :\n fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by\n ext (_ | _) (_ | _) <;> simp",
"start": [
207,
1
],
"end": [
211,
31
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_fromColumn_eq_fromBlocks",
"code": "@[simp]\nlemma fromRows_fromColumn_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)\n (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :\n fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ := by\n ext (_ | _) (_ | _) <;> simp",
"start": [
213,
1
],
"end": [
217,
31
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromRows_mul_fromColumns",
"code": "lemma fromRows_mul_fromColumns (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R)\n (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :\n (fromRows A₁ A₂) * (fromColumns B₁ B₂) =\n fromBlocks (A₁ * B₁) (A₁ * B₂) (A₂ * B₁) (A₂ * B₂) := by\n ext (_ | _) (_ | _) <;> simp",
"start": [
219,
1
],
"end": [
224,
31
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_mul_fromRows",
"code": "lemma fromColumns_mul_fromRows (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R)\n (B₁ : Matrix n₁ n R) (B₂ : Matrix n₂ n R) :\n fromColumns A₁ A₂ * fromRows B₁ B₂ = (A₁ * B₁ + A₂ * B₂) := by\n ext\n simp [mul_apply]",
"start": [
226,
1
],
"end": [
232,
19
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_mul_fromBlocks",
"code": "lemma fromColumns_mul_fromBlocks (A₁ : Matrix m m₁ R) (A₂ : Matrix m m₂ R)\n (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R) (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :\n (fromColumns A₁ A₂) * fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ =\n fromColumns (A₁ * B₁₁ + A₂ * B₂₁) (A₁ * B₁₂ + A₂ * B₂₂) := by\n ext _ (_ | _) <;> simp [mul_apply]",
"start": [
234,
1
],
"end": [
239,
37
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromBlocks_mul_fromRows",
"code": "lemma fromBlocks_mul_fromRows (A₁ : Matrix n₁ n R) (A₂ : Matrix n₂ n R)\n (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R) (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :\n fromBlocks B₁₁ B₁₂ B₂₁ B₂₂ * (fromRows A₁ A₂) =\n fromRows (B₁₁ * A₁ + B₁₂ * A₂) (B₂₁ * A₁ + B₂₂ * A₂) := by\n ext (_ | _) _ <;> simp [mul_apply]",
"start": [
241,
1
],
"end": [
246,
37
],
"kind": "lemma"
},
{
"full_name": "Matrix.fromColumns_mul_fromRows_eq_one_comm",
"code": "lemma fromColumns_mul_fromRows_eq_one_comm (e : n ≃ n₁ ⊕ n₂)\n (A₁ : Matrix n n₁ R) (A₂ : Matrix n n₂ R) (B₁ : Matrix n₁ n R) (B₂ : Matrix n₂ n R) :\n fromColumns A₁ A₂ * fromRows B₁ B₂ = 1 ↔ fromRows B₁ B₂ * fromColumns A₁ A₂ = 1 := by\n calc fromColumns A₁ A₂ * fromRows B₁ B₂ = 1\n _ ↔ submatrix (fromColumns A₁ A₂) id e * submatrix (fromRows B₁ B₂) e id = 1 := by\n simp\n _ ↔ submatrix (fromRows B₁ B₂) e id * submatrix (fromColumns A₁ A₂) id e = 1 :=\n mul_eq_one_comm\n _ ↔ reindex e.symm e.symm (fromRows B₁ B₂ * fromColumns A₁ A₂) = reindex e.symm e.symm 1 := by\n simp only [reindex_apply, Equiv.symm_symm, submatrix_one_equiv,\n submatrix_mul (he₂ := Function.bijective_id)]\n _ ↔ fromRows B₁ B₂ * fromColumns A₁ A₂ = 1 :=\n (reindex _ _).injective.eq_iff",
"start": [
254,
1
],
"end": [
271,
35
],
"kind": "lemma"
},
{
"full_name": "Matrix.equiv_compl_fromColumns_mul_fromRows_eq_one_comm",
"code": "lemma equiv_compl_fromColumns_mul_fromRows_eq_one_comm (p : n → Prop)[DecidablePred p]\n (A₁ : Matrix n {i // p i} R) (A₂ : Matrix n {i // ¬p i} R)\n (B₁ : Matrix {i // p i} n R) (B₂ : Matrix {i // ¬p i} n R) :\n fromColumns A₁ A₂ * fromRows B₁ B₂ = 1 ↔ fromRows B₁ B₂ * fromColumns A₁ A₂ = 1 :=\n fromColumns_mul_fromRows_eq_one_comm (id (Equiv.sumCompl p).symm) A₁ A₂ B₁ B₂",
"start": [
273,
1
],
"end": [
279,
80
],
"kind": "lemma"
},
{
"full_name": "Matrix.conjTranspose_fromColumns_eq_fromRows_conjTranspose",
"code": "lemma conjTranspose_fromColumns_eq_fromRows_conjTranspose (A₁ : Matrix m n₁ R)\n (A₂ : Matrix m n₂ R) :\n conjTranspose (fromColumns A₁ A₂) = fromRows (conjTranspose A₁) (conjTranspose A₂) := by\n ext (_ | _) _ <;> simp",
"start": [
286,
1
],
"end": [
291,
25
],
"kind": "lemma"
},
{
"full_name": "Matrix.conjTranspose_fromRows_eq_fromColumns_conjTranspose",
"code": "lemma conjTranspose_fromRows_eq_fromColumns_conjTranspose (A₁ : Matrix m₁ n R)\n (A₂ : Matrix m₂ n R) : conjTranspose (fromRows A₁ A₂) =\n fromColumns (conjTranspose A₁) (conjTranspose A₂) := by\n ext _ (_ | _) <;> simp",
"start": [
293,
1
],
"end": [
298,
25
],
"kind": "lemma"
}
] |
Mathlib/Analysis/Analytic/Polynomial.lean | [
"Mathlib/Algebra/Polynomial/AlgebraMap.lean",
"Mathlib/Algebra/MvPolynomial/Basic.lean",
"Mathlib/Topology/Algebra/Module/FiniteDimension.lean",
"Mathlib/Analysis/Analytic/Constructions.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "AnalyticAt.aeval_polynomial",
"code": "theorem AnalyticAt.aeval_polynomial (hf : AnalyticAt 𝕜 f z) (p : A[X]) :\n AnalyticAt 𝕜 (fun x ↦ aeval (f x) p) z",
"start": [
26,
1
],
"end": [
32,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.aeval_polynomial",
"code": "theorem AnalyticOn.aeval_polynomial (hf : AnalyticOn 𝕜 f s) (p : A[X]) :\n AnalyticOn 𝕜 (fun x ↦ aeval (f x) p) s",
"start": [
34,
1
],
"end": [
35,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_polynomial",
"code": "theorem AnalyticOn.eval_polynomial {A} [NormedCommRing A] [NormedAlgebra 𝕜 A] (p : A[X]) :\n AnalyticOn 𝕜 (eval · p) Set.univ",
"start": [
37,
1
],
"end": [
38,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticAt.aeval_mvPolynomial",
"code": "theorem AnalyticAt.aeval_mvPolynomial (hf : ∀ i, AnalyticAt 𝕜 (f · i) z) (p : MvPolynomial σ A) :\n AnalyticAt 𝕜 (fun x ↦ aeval (f x) p) z",
"start": [
47,
1
],
"end": [
52,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.aeval_mvPolynomial",
"code": "theorem AnalyticOn.aeval_mvPolynomial (hf : ∀ i, AnalyticOn 𝕜 (f · i) s) (p : MvPolynomial σ A) :\n AnalyticOn 𝕜 (fun x ↦ aeval (f x) p) s",
"start": [
54,
1
],
"end": [
55,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_continuousLinearMap",
"code": "theorem AnalyticOn.eval_continuousLinearMap (f : E →L[𝕜] σ → B) (p : MvPolynomial σ B) :\n AnalyticOn 𝕜 (fun x ↦ eval (f x) p) Set.univ",
"start": [
57,
1
],
"end": [
59,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_continuousLinearMap'",
"code": "theorem AnalyticOn.eval_continuousLinearMap' (f : σ → E →L[𝕜] B) (p : MvPolynomial σ B) :\n AnalyticOn 𝕜 (fun x ↦ eval (f · x) p) Set.univ",
"start": [
61,
1
],
"end": [
63,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_linearMap",
"code": "theorem AnalyticOn.eval_linearMap (f : E →ₗ[𝕜] σ → B) (p : MvPolynomial σ B) :\n AnalyticOn 𝕜 (fun x ↦ eval (f x) p) Set.univ",
"start": [
67,
1
],
"end": [
69,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_linearMap'",
"code": "theorem AnalyticOn.eval_linearMap' (f : σ → E →ₗ[𝕜] B) (p : MvPolynomial σ B) :\n AnalyticOn 𝕜 (fun x ↦ eval (f · x) p) Set.univ",
"start": [
71,
1
],
"end": [
72,
90
],
"kind": "commanddeclaration"
},
{
"full_name": "AnalyticOn.eval_mvPolynomial",
"code": "theorem AnalyticOn.eval_mvPolynomial [Fintype σ] (p : MvPolynomial σ 𝕜) :\n AnalyticOn 𝕜 (eval · p) Set.univ",
"start": [
74,
1
],
"end": [
75,
96
],
"kind": "commanddeclaration"
}
] |
Mathlib/AlgebraicGeometry/FunctionField.lean | [
"Mathlib/AlgebraicGeometry/Properties.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "AlgebraicGeometry.Scheme.functionField",
"code": "noncomputable abbrev Scheme.functionField [IrreducibleSpace X] : CommRingCat :=\n X.presheaf.stalk (genericPoint X)",
"start": [
34,
1
],
"end": [
37,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.Scheme.germToFunctionField",
"code": "noncomputable abbrev Scheme.germToFunctionField [IrreducibleSpace X] (U : Opens X)\n [h : Nonempty U] : Γ(X, U) ⟶ X.functionField :=\n X.presheaf.germ\n ⟨genericPoint X,\n ((genericPoint_spec X).mem_open_set_iff U.isOpen).mpr (by simpa using h)⟩",
"start": [
40,
1
],
"end": [
45,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.germ_injective_of_isIntegral",
"code": "theorem germ_injective_of_isIntegral [IsIntegral X] {U : Opens X} (x : U) :\n Function.Injective (X.presheaf.germ x)",
"start": [
67,
1
],
"end": [
75,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.Scheme.germToFunctionField_injective",
"code": "theorem Scheme.germToFunctionField_injective [IsIntegral X] (U : Opens X) [Nonempty U] :\n Function.Injective (X.germToFunctionField U)",
"start": [
78,
1
],
"end": [
80,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.genericPoint_eq_of_isOpenImmersion",
"code": "theorem genericPoint_eq_of_isOpenImmersion {X Y : Scheme} (f : X ⟶ Y) [H : IsOpenImmersion f]\n [hX : IrreducibleSpace X] [IrreducibleSpace Y] :\n f.1.base (genericPoint X) = genericPoint Y",
"start": [
83,
1
],
"end": [
93,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.stalkFunctionFieldAlgebra",
"code": "noncomputable instance stalkFunctionFieldAlgebra [IrreducibleSpace X] (x : X) :\n Algebra (X.presheaf.stalk x) X.functionField := by\n apply RingHom.toAlgebra\n exact X.presheaf.stalkSpecializes ((genericPoint_spec X).specializes trivial)",
"start": [
96,
1
],
"end": [
99,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.functionField_isScalarTower",
"code": "instance functionField_isScalarTower [IrreducibleSpace X] (U : Opens X) (x : U)\n [Nonempty U] : IsScalarTower Γ(X, U) (X.presheaf.stalk x) X.functionField := by\n apply IsScalarTower.of_algebraMap_eq'\n simp_rw [RingHom.algebraMap_toAlgebra]\n change _ = X.presheaf.germ x ≫ _\n rw [X.presheaf.germ_stalkSpecializes]",
"start": [
102,
1
],
"end": [
107,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.genericPoint_eq_bot_of_affine",
"code": "@[simp]\ntheorem genericPoint_eq_bot_of_affine (R : CommRingCat) [IsDomain R] :\n genericPoint (Spec R) = (⊥ : PrimeSpectrum R)",
"start": [
114,
1
],
"end": [
121,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.functionField_isFractionRing_of_affine",
"code": "instance functionField_isFractionRing_of_affine (R : CommRingCat.{u}) [IsDomain R] :\n IsFractionRing R (Spec R).functionField := by\n convert StructureSheaf.IsLocalization.to_stalk R (genericPoint (Spec R))\n delta IsFractionRing IsLocalization.AtPrime\n apply Eq.to_iff\n congr 1\n rw [genericPoint_eq_bot_of_affine]\n ext\n exact mem_nonZeroDivisors_iff_ne_zero",
"start": [
124,
1
],
"end": [
133,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.IsAffineOpen.primeIdealOf_genericPoint",
"code": "theorem IsAffineOpen.primeIdealOf_genericPoint {X : Scheme} [IsIntegral X] {U : Opens X}\n (hU : IsAffineOpen U) [h : Nonempty U] :\n hU.primeIdealOf\n ⟨genericPoint X,\n ((genericPoint_spec X).mem_open_set_iff U.isOpen).mpr (by simpa using h)⟩ =\n genericPoint (Spec Γ(X, U))",
"start": [
141,
1
],
"end": [
154,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "AlgebraicGeometry.functionField_isFractionRing_of_isAffineOpen",
"code": "theorem functionField_isFractionRing_of_isAffineOpen [IsIntegral X] (U : Opens X)\n (hU : IsAffineOpen U) [hU' : Nonempty U] :\n IsFractionRing Γ(X, U) X.functionField",
"start": [
157,
1
],
"end": [
168,
45
],
"kind": "commanddeclaration"
}
] |
Mathlib/Computability/RegularExpressions.lean | [
"Mathlib/Computability/Language.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Tactic/AdaptationNote.lean"
] | [
{
"full_name": "RegularExpression",
"code": "inductive RegularExpression (α : Type u) : Type u\n | zero : RegularExpression α\n | epsilon : RegularExpression α\n | char : α → RegularExpression α\n | plus : RegularExpression α → RegularExpression α → RegularExpression α\n | comp : RegularExpression α → RegularExpression α → RegularExpression α\n | star : RegularExpression α → RegularExpression α",
"start": [
35,
1
],
"end": [
50,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.zero_def",
"code": "@[simp]\ntheorem zero_def : (zero : RegularExpression α) = 0",
"start": [
87,
1
],
"end": [
89,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.one_def",
"code": "@[simp]\ntheorem one_def : (epsilon : RegularExpression α) = 1",
"start": [
92,
1
],
"end": [
94,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.plus_def",
"code": "@[simp]\ntheorem plus_def (P Q : RegularExpression α) : plus P Q = P + Q",
"start": [
97,
1
],
"end": [
99,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.comp_def",
"code": "@[simp]\ntheorem comp_def (P Q : RegularExpression α) : comp P Q = P * Q",
"start": [
102,
1
],
"end": [
104,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'",
"code": "def matches' : RegularExpression α → Language α\n | 0 => 0\n | 1 => 1\n | char a => {[a]}\n | P + Q => P.matches' + Q.matches'\n | comp P Q => P.matches' * Q.matches'\n | star P => P.matches'∗",
"start": [
110,
1
],
"end": [
119,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_zero",
"code": "@[simp]\ntheorem matches'_zero : (0 : RegularExpression α).matches' = 0",
"start": [
122,
1
],
"end": [
124,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_epsilon",
"code": "@[simp]\ntheorem matches'_epsilon : (1 : RegularExpression α).matches' = 1",
"start": [
127,
1
],
"end": [
129,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_char",
"code": "@[simp]\ntheorem matches'_char (a : α) : (char a).matches' = {[a]}",
"start": [
132,
1
],
"end": [
134,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_add",
"code": "@[simp]\ntheorem matches'_add (P Q : RegularExpression α) : (P + Q).matches' = P.matches' + Q.matches'",
"start": [
137,
1
],
"end": [
139,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_mul",
"code": "@[simp]\ntheorem matches'_mul (P Q : RegularExpression α) : (P * Q).matches' = P.matches' * Q.matches'",
"start": [
142,
1
],
"end": [
144,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_pow",
"code": "@[simp]\ntheorem matches'_pow (P : RegularExpression α) : ∀ n : ℕ, (P ^ n).matches' = P.matches' ^ n",
"start": [
147,
1
],
"end": [
152,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_star",
"code": "@[simp]\ntheorem matches'_star (P : RegularExpression α) : P.star.matches' = P.matches'∗",
"start": [
155,
1
],
"end": [
157,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matchEpsilon",
"code": "def matchEpsilon : RegularExpression α → Bool\n | 0 => false\n | 1 => true\n | char _ => false\n | P + Q => P.matchEpsilon || Q.matchEpsilon\n | comp P Q => P.matchEpsilon && Q.matchEpsilon\n | star _P => true",
"start": [
162,
1
],
"end": [
169,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv",
"code": "def deriv : RegularExpression α → α → RegularExpression α\n | 0, _ => 0\n | 1, _ => 0\n | char a₁, a₂ => if a₁ = a₂ then 1 else 0\n | P + Q, a => deriv P a + deriv Q a\n | comp P Q, a => if P.matchEpsilon then deriv P a * Q + deriv Q a else deriv P a * Q\n | star P, a => deriv P a * star P",
"start": [
174,
1
],
"end": [
182,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_zero",
"code": "@[simp]\ntheorem deriv_zero (a : α) : deriv 0 a = 0",
"start": [
185,
1
],
"end": [
187,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_one",
"code": "@[simp]\ntheorem deriv_one (a : α) : deriv 1 a = 0",
"start": [
190,
1
],
"end": [
192,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_char_self",
"code": "@[simp]\ntheorem deriv_char_self (a : α) : deriv (char a) a = 1",
"start": [
195,
1
],
"end": [
197,
13
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_char_of_ne",
"code": "@[simp]\ntheorem deriv_char_of_ne (h : a ≠ b) : deriv (char a) b = 0",
"start": [
200,
1
],
"end": [
202,
11
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_add",
"code": "@[simp]\ntheorem deriv_add (P Q : RegularExpression α) (a : α) : deriv (P + Q) a = deriv P a + deriv Q a",
"start": [
205,
1
],
"end": [
207,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.deriv_star",
"code": "@[simp]\ntheorem deriv_star (P : RegularExpression α) (a : α) : deriv P.star a = deriv P a * star P",
"start": [
210,
1
],
"end": [
212,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.rmatch",
"code": "def rmatch : RegularExpression α → List α → Bool\n | P, [] => matchEpsilon P\n | P, a :: as => rmatch (P.deriv a) as",
"start": [
215,
1
],
"end": [
219,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.zero_rmatch",
"code": "@[simp]\ntheorem zero_rmatch (x : List α) : rmatch 0 x = false",
"start": [
222,
1
],
"end": [
224,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.one_rmatch_iff",
"code": "theorem one_rmatch_iff (x : List α) : rmatch 1 x ↔ x = []",
"start": [
227,
1
],
"end": [
228,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.char_rmatch_iff",
"code": "theorem char_rmatch_iff (a : α) (x : List α) : rmatch (char a) x ↔ x = [a]",
"start": [
231,
1
],
"end": [
242,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.add_rmatch_iff",
"code": "theorem add_rmatch_iff (P Q : RegularExpression α) (x : List α) :\n (P + Q).rmatch x ↔ P.rmatch x ∨ Q.rmatch x",
"start": [
245,
1
],
"end": [
251,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.mul_rmatch_iff",
"code": "theorem mul_rmatch_iff (P Q : RegularExpression α) (x : List α) :\n (P * Q).rmatch x ↔ ∃ t u : List α, x = t ++ u ∧ P.rmatch t ∧ Q.rmatch u",
"start": [
254,
1
],
"end": [
297,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.star_rmatch_iff",
"code": "theorem star_rmatch_iff (P : RegularExpression α) :\n ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x\n = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t",
"start": [
300,
1
],
"end": [
349,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.rmatch_iff_matches'",
"code": "@[simp]\ntheorem rmatch_iff_matches' (P : RegularExpression α) (x : List α) :\n P.rmatch x ↔ x ∈ P.matches'",
"start": [
352,
1
],
"end": [
371,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.map",
"code": "@[simp]\ndef map (f : α → β) : RegularExpression α → RegularExpression β\n | 0 => 0\n | 1 => 1\n | char a => char (f a)\n | R + S => map f R + map f S\n | comp R S => map f R * map f S\n | star R => star (map f R)",
"start": [
379,
1
],
"end": [
387,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.map_pow",
"code": "@[simp]\nprotected theorem map_pow (f : α → β) (P : RegularExpression α) :\n ∀ n : ℕ, map f (P ^ n) = map f P ^ n",
"start": [
390,
1
],
"end": [
394,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.map_id",
"code": "@[simp]\ntheorem map_id : ∀ P : RegularExpression α, P.map id = P",
"start": [
399,
1
],
"end": [
406,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.map_map",
"code": "@[simp]\ntheorem map_map (g : β → γ) (f : α → β) : ∀ P : RegularExpression α, (P.map f).map g = P.map (g ∘ f)",
"start": [
411,
1
],
"end": [
418,
63
],
"kind": "commanddeclaration"
},
{
"full_name": "RegularExpression.matches'_map",
"code": "@[simp]\ntheorem matches'_map (f : α → β) :\n ∀ P : RegularExpression α, (P.map f).matches' = Language.map f P.matches'",
"start": [
424,
1
],
"end": [
440,
28
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/WittVector/Teichmuller.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/RingTheory/WittVector/Basic.lean"
] | [
{
"full_name": "WittVector.teichmullerFun",
"code": "def teichmullerFun (r : R) : 𝕎 R :=\n ⟨fun n => if n = 0 then r else 0⟩",
"start": [
39,
1
],
"end": [
43,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.ghostComponent_teichmullerFun",
"code": "private theorem ghostComponent_teichmullerFun (r : R) (n : ℕ) :\n ghostComponent n (teichmullerFun p r) = r ^ p ^ n",
"start": [
61,
1
],
"end": [
68,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.map_teichmullerFun",
"code": "private theorem map_teichmullerFun (f : R →+* S) (r : R) :\n map f (teichmullerFun p r) = teichmullerFun p (f r)",
"start": [
70,
1
],
"end": [
74,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller_mul_aux₁",
"code": "private theorem teichmuller_mul_aux₁ (x y : MvPolynomial R ℚ) :\n teichmullerFun p (x * y) = teichmullerFun p x * teichmullerFun p y",
"start": [
76,
1
],
"end": [
81,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller_mul_aux₂",
"code": "private theorem teichmuller_mul_aux₂ (x y : MvPolynomial R ℤ) :\n teichmullerFun p (x * y) = teichmullerFun p x * teichmullerFun p y",
"start": [
83,
1
],
"end": [
87,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller",
"code": "def teichmuller : R →* 𝕎 R where\n toFun := teichmullerFun p\n map_one' := by\n ext ⟨⟩\n · rw [one_coeff_zero]; rfl\n · rw [one_coeff_eq_of_pos _ _ _ (Nat.succ_pos _)]; rfl\n map_mul' := by\n intro x y\n rcases counit_surjective R x with ⟨x, rfl⟩\n rcases counit_surjective R y with ⟨y, rfl⟩\n simp only [← map_teichmullerFun, ← RingHom.map_mul, teichmuller_mul_aux₂]",
"start": [
89,
1
],
"end": [
102,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller_coeff_zero",
"code": "@[simp]\ntheorem teichmuller_coeff_zero (r : R) : (teichmuller p r).coeff 0 = r",
"start": [
105,
1
],
"end": [
107,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller_coeff_pos",
"code": "@[simp]\ntheorem teichmuller_coeff_pos (r : R) : ∀ (n : ℕ) (_ : 0 < n), (teichmuller p r).coeff n = 0",
"start": [
110,
1
],
"end": [
112,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.teichmuller_zero",
"code": "@[simp]\ntheorem teichmuller_zero : teichmuller p (0 : R) = 0",
"start": [
115,
1
],
"end": [
117,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.map_teichmuller",
"code": "@[simp]\ntheorem map_teichmuller (f : R →+* S) (r : R) : map f (teichmuller p r) = teichmuller p (f r)",
"start": [
120,
1
],
"end": [
123,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "WittVector.ghostComponent_teichmuller",
"code": "@[simp]\ntheorem ghostComponent_teichmuller (r : R) (n : ℕ) :\n ghostComponent n (teichmuller p r) = r ^ p ^ n",
"start": [
126,
1
],
"end": [
130,
38
],
"kind": "commanddeclaration"
}
] |
Mathlib/MeasureTheory/Integral/Indicator.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/MeasureTheory/Constructions/BorelSpace/Metrizable.lean",
"Mathlib/MeasureTheory/Integral/Lebesgue.lean"
] | [
{
"full_name": "MeasureTheory.tendsto_measure_of_tendsto_indicator",
"code": "lemma tendsto_measure_of_tendsto_indicator [NeBot L] {μ : Measure α}\n (As_mble : ∀ i, MeasurableSet (As i)) {B : Set α} (B_mble : MeasurableSet B)\n (B_finmeas : μ B ≠ ∞) (As_le_B : ∀ᶠ i in L, As i ⊆ B)\n (h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :\n Tendsto (fun i ↦ μ (As i)) L (𝓝 (μ A)) := by\n apply tendsto_measure_of_ae_tendsto_indicator L ?_ As_mble B_mble B_finmeas As_le_B\n (ae_of_all μ h_lim)\n exact measurableSet_of_tendsto_indicator L As_mble h_lim",
"start": [
39,
1
],
"end": [
49,
59
],
"kind": "lemma"
},
{
"full_name": "MeasureTheory.tendsto_measure_of_tendsto_indicator_of_isFiniteMeasure",
"code": "lemma tendsto_measure_of_tendsto_indicator_of_isFiniteMeasure [NeBot L]\n (μ : Measure α) [IsFiniteMeasure μ] (As_mble : ∀ i, MeasurableSet (As i))\n (h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :\n Tendsto (fun i ↦ μ (As i)) L (𝓝 (μ A)) := by\n apply tendsto_measure_of_ae_tendsto_indicator_of_isFiniteMeasure L ?_ As_mble (ae_of_all μ h_lim)\n exact measurableSet_of_tendsto_indicator L As_mble h_lim",
"start": [
51,
1
],
"end": [
58,
59
],
"kind": "lemma"
}
] |
Mathlib/LinearAlgebra/Basis/Flag.lean | [
"Mathlib/Data/Fin/FlagRange.lean",
"Mathlib/LinearAlgebra/Dual.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/LinearAlgebra/Basis.lean"
] | [
{
"full_name": "Basis.flag",
"code": "def flag (b : Basis (Fin n) R M) (k : Fin (n + 1)) : Submodule R M :=\n .span R <| b '' {i | i.castSucc < k}",
"start": [
27,
1
],
"end": [
29,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_zero",
"code": "@[simp]\ntheorem flag_zero (b : Basis (Fin n) R M) : b.flag 0 = ⊥",
"start": [
31,
1
],
"end": [
32,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_last",
"code": "@[simp]\ntheorem flag_last (b : Basis (Fin n) R M) : b.flag (.last n) = ⊤",
"start": [
34,
1
],
"end": [
36,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_le_iff",
"code": "theorem flag_le_iff (b : Basis (Fin n) R M) {k p} :\n b.flag k ≤ p ↔ ∀ i : Fin n, i.castSucc < k → b i ∈ p",
"start": [
38,
1
],
"end": [
40,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_succ",
"code": "theorem flag_succ (b : Basis (Fin n) R M) (k : Fin n) :\n b.flag k.succ = (R ∙ b k) ⊔ b.flag k.castSucc",
"start": [
42,
1
],
"end": [
45,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.self_mem_flag",
"code": "theorem self_mem_flag (b : Basis (Fin n) R M) {i : Fin n} {k : Fin (n + 1)} (h : i.castSucc < k) :\n b i ∈ b.flag k",
"start": [
47,
1
],
"end": [
49,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.self_mem_flag_iff",
"code": "@[simp]\ntheorem self_mem_flag_iff [Nontrivial R] (b : Basis (Fin n) R M) {i : Fin n} {k : Fin (n + 1)} :\n b i ∈ b.flag k ↔ i.castSucc < k",
"start": [
51,
1
],
"end": [
54,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_mono",
"code": "@[mono]\ntheorem flag_mono (b : Basis (Fin n) R M) : Monotone b.flag",
"start": [
56,
1
],
"end": [
58,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.isChain_range_flag",
"code": "theorem isChain_range_flag (b : Basis (Fin n) R M) : IsChain (· ≤ ·) (range b.flag)",
"start": [
60,
1
],
"end": [
61,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_strictMono",
"code": "@[mono]\ntheorem flag_strictMono [Nontrivial R] (b : Basis (Fin n) R M) : StrictMono b.flag",
"start": [
63,
1
],
"end": [
65,
59
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_le_ker_coord_iff",
"code": "@[simp]\ntheorem flag_le_ker_coord_iff [Nontrivial R] (b : Basis (Fin n) R M) {k : Fin (n + 1)} {l : Fin n} :\n b.flag k ≤ LinearMap.ker (b.coord l) ↔ k ≤ l.castSucc",
"start": [
73,
1
],
"end": [
76,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_le_ker_coord",
"code": "theorem flag_le_ker_coord (b : Basis (Fin n) R M) {k : Fin (n + 1)} {l : Fin n}\n (h : k ≤ l.castSucc) : b.flag k ≤ LinearMap.ker (b.coord l)",
"start": [
78,
1
],
"end": [
81,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_le_ker_dual",
"code": "theorem flag_le_ker_dual (b : Basis (Fin n) R M) (k : Fin n) :\n b.flag k.castSucc ≤ LinearMap.ker (b.dualBasis k)",
"start": [
83,
1
],
"end": [
86,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_covBy",
"code": "theorem flag_covBy (b : Basis (Fin n) K V) (i : Fin n) :\n b.flag i.castSucc ⋖ b.flag i.succ",
"start": [
94,
1
],
"end": [
98,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.flag_wcovBy",
"code": "theorem flag_wcovBy (b : Basis (Fin n) K V) (i : Fin n) :\n b.flag i.castSucc ⩿ b.flag i.succ",
"start": [
100,
1
],
"end": [
102,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.toFlag",
"code": "@[simps!]\ndef toFlag (b : Basis (Fin n) K V) : Flag (Submodule K V) :=\n .rangeFin b.flag b.flag_zero b.flag_last b.flag_wcovBy",
"start": [
104,
1
],
"end": [
107,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.mem_toFlag",
"code": "@[simp]\ntheorem mem_toFlag (b : Basis (Fin n) K V) {p : Submodule K V} : p ∈ b.toFlag ↔ ∃ k, b.flag k = p",
"start": [
109,
1
],
"end": [
111,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "Basis.isMaxChain_range_flag",
"code": "theorem isMaxChain_range_flag (b : Basis (Fin n) K V) : IsMaxChain (· ≤ ·) (range b.flag)",
"start": [
113,
1
],
"end": [
114,
20
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean | [
"Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/LinearAlgebra/Isomorphisms.lean"
] | [
{
"full_name": "PiTensorProduct.toDualContinuousMultilinearMap",
"code": "@[simps!]\nnoncomputable def toDualContinuousMultilinearMap : (⨂[𝕜] i, E i) →ₗ[𝕜]\n ContinuousMultilinearMap 𝕜 E F →L[𝕜] F where\n toFun x := LinearMap.mkContinuous\n ((LinearMap.flip (lift (R := 𝕜) (s := E) (E := F)).toLinearMap x) ∘ₗ\n ContinuousMultilinearMap.toMultilinearMapLinear)\n (projectiveSeminorm x)\n (fun _ ↦ by simp only [LinearMap.coe_comp, Function.comp_apply,\n ContinuousMultilinearMap.toMultilinearMapLinear_apply, LinearMap.flip_apply,\n LinearEquiv.coe_coe]\n exact norm_eval_le_projectiveSeminorm _ _ _)\n map_add' x y := by\n ext _\n simp only [map_add, LinearMap.mkContinuous_apply, LinearMap.coe_comp, Function.comp_apply,\n ContinuousMultilinearMap.toMultilinearMapLinear_apply, LinearMap.add_apply,\n LinearMap.flip_apply, LinearEquiv.coe_coe, ContinuousLinearMap.add_apply]\n map_smul' a x := by\n ext _\n simp only [map_smul, LinearMap.mkContinuous_apply, LinearMap.coe_comp, Function.comp_apply,\n ContinuousMultilinearMap.toMultilinearMapLinear_apply, LinearMap.smul_apply,\n LinearMap.flip_apply, LinearEquiv.coe_coe, RingHom.id_apply, ContinuousLinearMap.coe_smul',\n Pi.smul_apply]",
"start": [
90,
1
],
"end": [
114,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.toDualContinuousMultilinearMap_le_projectiveSeminorm",
"code": "theorem toDualContinuousMultilinearMap_le_projectiveSeminorm (x : ⨂[𝕜] i, E i) :\n ‖toDualContinuousMultilinearMap F x‖ ≤ projectiveSeminorm x",
"start": [
116,
1
],
"end": [
119,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.injectiveSeminorm",
"code": "noncomputable irreducible_def injectiveSeminorm : Seminorm 𝕜 (⨂[𝕜] i, E i) :=\n sSup {p | ∃ (G : Type (max uι u𝕜 uE)) (_ : SeminormedAddCommGroup G)\n (_ : NormedSpace 𝕜 G), p = Seminorm.comp (normSeminorm 𝕜 (ContinuousMultilinearMap 𝕜 E G →L[𝕜] G))\n (toDualContinuousMultilinearMap G (𝕜 := 𝕜) (E := E))}",
"start": [
121,
1
],
"end": [
129,
56
],
"kind": "leanelabcommandcommandirreducibledef"
},
{
"full_name": "PiTensorProduct.dualSeminorms_bounded",
"code": "lemma dualSeminorms_bounded : BddAbove {p | ∃ (G : Type (max uι u𝕜 uE))\n (_ : SeminormedAddCommGroup G) (_ : NormedSpace 𝕜 G),\n p = Seminorm.comp (normSeminorm 𝕜 (ContinuousMultilinearMap 𝕜 E G →L[𝕜] G))\n (toDualContinuousMultilinearMap G (𝕜 := 𝕜) (E := E))} := by\n existsi projectiveSeminorm\n rw [mem_upperBounds]\n simp only [Set.mem_setOf_eq, forall_exists_index]\n intro p G _ _ hp\n rw [hp]\n intro x\n simp only [Seminorm.comp_apply, coe_normSeminorm]\n exact toDualContinuousMultilinearMap_le_projectiveSeminorm _",
"start": [
131,
1
],
"end": [
142,
63
],
"kind": "lemma"
},
{
"full_name": "PiTensorProduct.injectiveSeminorm_apply",
"code": "theorem injectiveSeminorm_apply (x : ⨂[𝕜] i, E i) :\n injectiveSeminorm x = ⨆ p : {p | ∃ (G : Type (max uι u𝕜 uE))\n (_ : SeminormedAddCommGroup G) (_ : NormedSpace 𝕜 G), p = Seminorm.comp (normSeminorm 𝕜\n (ContinuousMultilinearMap 𝕜 E G →L[𝕜] G))\n (toDualContinuousMultilinearMap G (𝕜 := 𝕜) (E := E))}, p.1 x",
"start": [
144,
1
],
"end": [
150,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.norm_eval_le_injectiveSeminorm",
"code": "theorem norm_eval_le_injectiveSeminorm (f : ContinuousMultilinearMap 𝕜 E F) (x : ⨂[𝕜] i, E i) :\n ‖lift f.toMultilinearMap x‖ ≤ ‖f‖ * injectiveSeminorm x",
"start": [
152,
1
],
"end": [
202,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.injectiveSeminorm_le_projectiveSeminorm",
"code": "theorem injectiveSeminorm_le_projectiveSeminorm :\n injectiveSeminorm (𝕜 := 𝕜) (E := E) ≤ projectiveSeminorm",
"start": [
204,
1
],
"end": [
219,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.injectiveSeminorm_tprod_le",
"code": "theorem injectiveSeminorm_tprod_le (m : Π (i : ι), E i) :\n injectiveSeminorm (⨂ₜ[𝕜] i, m i) ≤ ∏ i, ‖m i‖",
"start": [
221,
1
],
"end": [
223,
87
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftEquiv",
"code": "@[simps]\nnoncomputable def liftEquiv : ContinuousMultilinearMap 𝕜 E F ≃ₗ[𝕜] (⨂[𝕜] i, E i) →L[𝕜] F where\n toFun f := LinearMap.mkContinuous (lift f.toMultilinearMap) ‖f‖\n (fun x ↦ norm_eval_le_injectiveSeminorm f x)\n map_add' f g := by ext _; simp only [ContinuousMultilinearMap.toMultilinearMap_add, map_add,\n LinearMap.mkContinuous_apply, LinearMap.add_apply, ContinuousLinearMap.add_apply]\n map_smul' a f := by ext _; simp only [ContinuousMultilinearMap.toMultilinearMap_smul, map_smul,\n LinearMap.mkContinuous_apply, LinearMap.smul_apply, RingHom.id_apply,\n ContinuousLinearMap.coe_smul', Pi.smul_apply]\n invFun l := MultilinearMap.mkContinuous (lift.symm l.toLinearMap) ‖l‖ (fun x ↦ by\n simp only [lift_symm, LinearMap.compMultilinearMap_apply, ContinuousLinearMap.coe_coe]\n refine le_trans (ContinuousLinearMap.le_opNorm _ _) (mul_le_mul_of_nonneg_left ?_\n (norm_nonneg l))\n exact injectiveSeminorm_tprod_le x)\n left_inv f := by ext x; simp only [LinearMap.mkContinuous_coe, LinearEquiv.symm_apply_apply,\n MultilinearMap.coe_mkContinuous, ContinuousMultilinearMap.coe_coe]\n right_inv l := by\n rw [← ContinuousLinearMap.coe_inj]\n apply PiTensorProduct.ext; ext m\n simp only [lift_symm, LinearMap.mkContinuous_coe, LinearMap.compMultilinearMap_apply,\n lift.tprod, ContinuousMultilinearMap.coe_coe, MultilinearMap.coe_mkContinuous,\n ContinuousLinearMap.coe_coe]",
"start": [
236,
1
],
"end": [
260,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftIsometry",
"code": "noncomputable def liftIsometry : ContinuousMultilinearMap 𝕜 E F ≃ₗᵢ[𝕜] (⨂[𝕜] i, E i) →L[𝕜] F :=\n { liftEquiv 𝕜 E F with\n norm_map' := by\n intro f\n refine le_antisymm ?_ ?_\n · simp only [liftEquiv, lift_symm, LinearEquiv.coe_mk]\n exact LinearMap.mkContinuous_norm_le _ (norm_nonneg f) _\n · conv_lhs => rw [← (liftEquiv 𝕜 E F).left_inv f]\n simp only [liftEquiv, lift_symm, AddHom.toFun_eq_coe, AddHom.coe_mk,\n LinearEquiv.invFun_eq_symm, LinearEquiv.coe_symm_mk, LinearMap.mkContinuous_coe,\n LinearEquiv.coe_mk]\n exact MultilinearMap.mkContinuous_norm_le _ (norm_nonneg _) _ }",
"start": [
262,
1
],
"end": [
278,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftIsometry_apply_apply",
"code": "@[simp]\ntheorem liftIsometry_apply_apply (f : ContinuousMultilinearMap 𝕜 E F) (x : ⨂[𝕜] i, E i) :\n liftIsometry 𝕜 E F f x = lift f.toMultilinearMap x",
"start": [
282,
1
],
"end": [
286,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.tprodL",
"code": "@[simps!]\nnoncomputable def tprodL : ContinuousMultilinearMap 𝕜 E (⨂[𝕜] i, E i) :=\n (liftIsometry 𝕜 E _).symm (ContinuousLinearMap.id 𝕜 _)",
"start": [
290,
1
],
"end": [
294,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.tprodL_coe",
"code": "@[simp]\ntheorem tprodL_coe : (tprodL 𝕜).toMultilinearMap = tprod 𝕜 (s := E)",
"start": [
298,
1
],
"end": [
301,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftIsometry_symm_apply",
"code": "@[simp]\ntheorem liftIsometry_symm_apply (l : (⨂[𝕜] i, E i) →L[𝕜] F) :\n (liftIsometry 𝕜 E F).symm l = l.compContinuousMultilinearMap (tprodL 𝕜)",
"start": [
303,
1
],
"end": [
310,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftIsometry_tprodL",
"code": "@[simp]\ntheorem liftIsometry_tprodL :\n liftIsometry 𝕜 E _ (tprodL 𝕜) = ContinuousLinearMap.id 𝕜 (⨂[𝕜] i, E i)",
"start": [
312,
1
],
"end": [
317,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL",
"code": "noncomputable def mapL : (⨂[𝕜] i, E i) →L[𝕜] ⨂[𝕜] i, E' i :=\n liftIsometry 𝕜 E _ <| (tprodL 𝕜).compContinuousLinearMap f",
"start": [
328,
1
],
"end": [
335,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_coe",
"code": "@[simp]\ntheorem mapL_coe : (mapL f).toLinearMap = map (fun i ↦ (f i).toLinearMap)",
"start": [
337,
1
],
"end": [
342,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_apply",
"code": "@[simp]\ntheorem mapL_apply (x : ⨂[𝕜] i, E i) : mapL f x = map (fun i ↦ (f i).toLinearMap) x",
"start": [
344,
1
],
"end": [
350,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapLIncl",
"code": "@[simp]\nnoncomputable def mapLIncl (p : Π i, Submodule 𝕜 (E i)) : (⨂[𝕜] i, p i) →L[𝕜] ⨂[𝕜] i, E i :=\n mapL fun (i : ι) ↦ (p i).subtypeL",
"start": [
352,
1
],
"end": [
357,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_comp",
"code": "theorem mapL_comp : mapL (fun (i : ι) ↦ g i ∘L f i) = mapL g ∘L mapL f",
"start": [
359,
1
],
"end": [
363,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.liftIsometry_comp_mapL",
"code": "theorem liftIsometry_comp_mapL (h : ContinuousMultilinearMap 𝕜 E' F) :\n liftIsometry 𝕜 E' F h ∘L mapL f = liftIsometry 𝕜 E F (h.compContinuousLinearMap f)",
"start": [
365,
1
],
"end": [
372,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_id",
"code": "@[simp]\ntheorem mapL_id : mapL (fun i ↦ ContinuousLinearMap.id 𝕜 (E i)) = ContinuousLinearMap.id _ _",
"start": [
374,
1
],
"end": [
379,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_one",
"code": "@[simp]\ntheorem mapL_one : mapL (fun (i : ι) ↦ (1 : E i →L[𝕜] E i)) = 1",
"start": [
381,
1
],
"end": [
383,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_mul",
"code": "theorem mapL_mul (f₁ f₂ : Π i, E i →L[𝕜] E i) :\n mapL (fun i ↦ f₁ i * f₂ i) = mapL f₁ * mapL f₂",
"start": [
385,
1
],
"end": [
387,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapLMonoidHom",
"code": "@[simps]\nnoncomputable def mapLMonoidHom : (Π i, E i →L[𝕜] E i) →* ((⨂[𝕜] i, E i) →L[𝕜] ⨂[𝕜] i, E i) where\n toFun := mapL\n map_one' := mapL_one\n map_mul' := mapL_mul",
"start": [
389,
1
],
"end": [
394,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_pow",
"code": "@[simp]\nprotected theorem mapL_pow (f : Π i, E i →L[𝕜] E i) (n : ℕ) :\n mapL (f ^ n) = mapL f ^ n",
"start": [
396,
1
],
"end": [
398,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_add_smul_aux",
"code": "private theorem mapL_add_smul_aux [DecidableEq ι] (i : ι) (u : E i →L[𝕜] E' i) :\n (fun j ↦ (update f i u j).toLinearMap) =\n update (fun j ↦ (f j).toLinearMap) i u.toLinearMap",
"start": [
401,
1
],
"end": [
408,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_add",
"code": "protected theorem mapL_add [DecidableEq ι] (i : ι) (u v : E i →L[𝕜] E' i) :\n mapL (update f i (u + v)) = mapL (update f i u) + mapL (update f i v)",
"start": [
411,
1
],
"end": [
415,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_smul",
"code": "protected theorem mapL_smul [DecidableEq ι] (i : ι) (c : 𝕜) (u : E i →L[𝕜] E' i) :\n mapL (update f i (c • u)) = c • mapL (update f i u)",
"start": [
418,
1
],
"end": [
422,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapL_opNorm",
"code": "theorem mapL_opNorm : ‖mapL f‖ ≤ ∏ i, ‖f i‖",
"start": [
424,
1
],
"end": [
436,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapLMultilinear",
"code": "@[simps!]\nnoncomputable def mapLMultilinear : ContinuousMultilinearMap 𝕜 (fun (i : ι) ↦ E i →L[𝕜] E' i)\n ((⨂[𝕜] i, E i) →L[𝕜] ⨂[𝕜] i, E' i) :=\n MultilinearMap.mkContinuous\n { toFun := mapL\n map_smul':= fun _ _ _ _ ↦ PiTensorProduct.mapL_smul _ _ _ _\n map_add' := fun _ _ _ _ ↦ PiTensorProduct.mapL_add _ _ _ _ }\n 1 (fun f ↦ by rw [one_mul]; exact mapL_opNorm f)",
"start": [
440,
1
],
"end": [
450,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "PiTensorProduct.mapLMultilinear_opNorm",
"code": "theorem mapLMultilinear_opNorm : ‖mapLMultilinear 𝕜 E E'‖ ≤ 1",
"start": [
454,
1
],
"end": [
455,
54
],
"kind": "commanddeclaration"
}
] |
Mathlib/CategoryTheory/Preadditive/EilenbergMoore.lean | [
"Mathlib/CategoryTheory/Monad/Algebra.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean",
"Mathlib/CategoryTheory/Preadditive/Basic.lean"
] | [
{
"full_name": "CategoryTheory.Monad.algebraPreadditive",
"code": "@[simps]\ninstance Monad.algebraPreadditive : Preadditive (Monad.Algebra T) where\n homGroup F G :=\n { add := fun α β =>\n { f := α.f + β.f\n h := by simp only [Functor.map_add, add_comp, Monad.Algebra.Hom.h, comp_add] }\n zero :=\n { f := 0\n h := by simp only [Functor.map_zero, zero_comp, comp_zero] }\n nsmul := fun n α =>\n { f := n • α.f\n h := by rw [Functor.map_nsmul, nsmul_comp, Monad.Algebra.Hom.h, comp_nsmul] }\n neg := fun α =>\n { f := -α.f\n h := by simp only [Functor.map_neg, neg_comp, Monad.Algebra.Hom.h, comp_neg] }\n sub := fun α β =>\n { f := α.f - β.f\n h := by simp only [Functor.map_sub, sub_comp, Monad.Algebra.Hom.h, comp_sub] }\n zsmul := fun r α =>\n { f := r • α.f\n h := by rw [Functor.map_zsmul, zsmul_comp, Monad.Algebra.Hom.h, comp_zsmul] }\n add_assoc := by\n intros\n ext\n apply add_assoc\n zero_add := by\n intros\n ext\n apply zero_add\n add_zero := by\n intros\n ext\n apply add_zero\n nsmul_zero := by\n intros\n ext\n apply zero_smul\n nsmul_succ := by\n intros\n ext\n apply succ_nsmul\n sub_eq_add_neg := by\n intros\n ext\n apply sub_eq_add_neg\n zsmul_zero' := by\n intros\n ext\n apply zero_smul\n zsmul_succ' := by\n intros\n ext\n dsimp\n simp only [natCast_zsmul, succ_nsmul]\n rfl\n zsmul_neg' := by\n intros\n ext\n simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n add_left_neg := by\n intros\n ext\n apply add_left_neg\n add_comm := by\n intros\n ext\n apply add_comm }\n add_comp := by\n intros\n ext\n apply add_comp\n comp_add := by\n intros\n ext\n apply comp_add",
"start": [
30,
1
],
"end": [
105,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Monad.forget_additive",
"code": "instance Monad.forget_additive : (Monad.forget T).Additive where",
"start": [
108,
1
],
"end": [
108,
65
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Comonad.coalgebraPreadditive",
"code": "@[simps]\ninstance Comonad.coalgebraPreadditive : Preadditive (Comonad.Coalgebra U) where\n homGroup F G :=\n { add := fun α β =>\n { f := α.f + β.f\n h := by simp only [Functor.map_add, comp_add, Comonad.Coalgebra.Hom.h, add_comp] }\n zero :=\n { f := 0\n h := by simp only [Functor.map_zero, comp_zero, zero_comp] }\n nsmul := fun n α =>\n { f := n • α.f\n h := by rw [Functor.map_nsmul, comp_nsmul, Comonad.Coalgebra.Hom.h, nsmul_comp] }\n neg := fun α =>\n { f := -α.f\n h := by simp only [Functor.map_neg, comp_neg, Comonad.Coalgebra.Hom.h, neg_comp] }\n sub := fun α β =>\n { f := α.f - β.f\n h := by simp only [Functor.map_sub, comp_sub, Comonad.Coalgebra.Hom.h, sub_comp] }\n zsmul := fun r α =>\n { f := r • α.f\n h := by rw [Functor.map_zsmul, comp_zsmul, Comonad.Coalgebra.Hom.h, zsmul_comp] }\n add_assoc := by\n intros\n ext\n apply add_assoc\n zero_add := by\n intros\n ext\n apply zero_add\n add_zero := by\n intros\n ext\n apply add_zero\n nsmul_zero := by\n intros\n ext\n apply zero_smul\n nsmul_succ := by\n intros\n ext\n apply succ_nsmul\n sub_eq_add_neg := by\n intros\n ext\n apply sub_eq_add_neg\n zsmul_zero' := by\n intros\n ext\n apply zero_smul\n zsmul_succ' := by\n intros\n ext\n dsimp\n simp only [natCast_zsmul, succ_nsmul]\n rfl\n zsmul_neg' := by\n intros\n ext\n simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n add_left_neg := by\n intros\n ext\n apply add_left_neg\n add_comm := by\n intros\n ext\n apply add_comm }\n add_comp := by\n intros\n ext\n apply add_comp\n comp_add := by\n intros\n ext\n apply comp_add",
"start": [
113,
1
],
"end": [
188,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Comonad.forget_additive",
"code": "instance Comonad.forget_additive : (Comonad.forget U).Additive where",
"start": [
191,
1
],
"end": [
191,
69
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/Polynomial/Opposites.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Polynomial/Degree/Definitions.lean"
] | [
{
"full_name": "Polynomial.opRingEquiv",
"code": "def opRingEquiv (R : Type*) [Semiring R] : R[X]ᵐᵒᵖ ≃+* Rᵐᵒᵖ[X] :=\n ((toFinsuppIso R).op.trans AddMonoidAlgebra.opRingEquiv).trans (toFinsuppIso _).symm",
"start": [
27,
1
],
"end": [
30,
87
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_op_monomial",
"code": "@[simp]\ntheorem opRingEquiv_op_monomial (n : ℕ) (r : R) :\n opRingEquiv R (op (monomial n r : R[X])) = monomial n (op r)",
"start": [
37,
1
],
"end": [
42,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_op_C",
"code": "@[simp]\ntheorem opRingEquiv_op_C (a : R) : opRingEquiv R (op (C a)) = C (op a)",
"start": [
45,
1
],
"end": [
47,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_op_X",
"code": "@[simp]\ntheorem opRingEquiv_op_X : opRingEquiv R (op (X : R[X])) = X",
"start": [
51,
1
],
"end": [
53,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_op_C_mul_X_pow",
"code": "theorem opRingEquiv_op_C_mul_X_pow (r : R) (n : ℕ) :\n opRingEquiv R (op (C r * X ^ n : R[X])) = C (op r) * X ^ n",
"start": [
57,
1
],
"end": [
59,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_symm_monomial",
"code": "@[simp]\ntheorem opRingEquiv_symm_monomial (n : ℕ) (r : Rᵐᵒᵖ) :\n (opRingEquiv R).symm (monomial n r) = op (monomial n (unop r))",
"start": [
67,
1
],
"end": [
70,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_symm_C",
"code": "@[simp]\ntheorem opRingEquiv_symm_C (a : Rᵐᵒᵖ) : (opRingEquiv R).symm (C a) = op (C (unop a))",
"start": [
73,
1
],
"end": [
75,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_symm_X",
"code": "@[simp]\ntheorem opRingEquiv_symm_X : (opRingEquiv R).symm (X : Rᵐᵒᵖ[X]) = op X",
"start": [
79,
1
],
"end": [
81,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.opRingEquiv_symm_C_mul_X_pow",
"code": "theorem opRingEquiv_symm_C_mul_X_pow (r : Rᵐᵒᵖ) (n : ℕ) :\n (opRingEquiv R).symm (C r * X ^ n : Rᵐᵒᵖ[X]) = op (C (unop r) * X ^ n)",
"start": [
85,
1
],
"end": [
87,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.coeff_opRingEquiv",
"code": "@[simp]\ntheorem coeff_opRingEquiv (p : R[X]ᵐᵒᵖ) (n : ℕ) :\n (opRingEquiv R p).coeff n = op ((unop p).coeff n)",
"start": [
94,
1
],
"end": [
99,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.support_opRingEquiv",
"code": "@[simp]\ntheorem support_opRingEquiv (p : R[X]ᵐᵒᵖ) : (opRingEquiv R p).support = (unop p).support",
"start": [
102,
1
],
"end": [
106,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.natDegree_opRingEquiv",
"code": "@[simp]\ntheorem natDegree_opRingEquiv (p : R[X]ᵐᵒᵖ) : (opRingEquiv R p).natDegree = (unop p).natDegree",
"start": [
109,
1
],
"end": [
114,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Polynomial.leadingCoeff_opRingEquiv",
"code": "@[simp]\ntheorem leadingCoeff_opRingEquiv (p : R[X]ᵐᵒᵖ) :\n (opRingEquiv R p).leadingCoeff = op (unop p).leadingCoeff",
"start": [
117,
1
],
"end": [
120,
76
],
"kind": "commanddeclaration"
}
] |
Mathlib/RingTheory/Polynomial/IrreducibleRing.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Polynomial/RingDivision.lean",
"Mathlib/RingTheory/Polynomial/Nilpotent.lean"
] | [
{
"full_name": "Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical",
"code": "theorem Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical\n {R S : Type*} [CommRing R] [(nilradical R).IsPrime] [CommRing S] [IsDomain S]\n (φ : R →+* S) (f : R[X]) (hm : f.Monic) (hi : Irreducible (f.map φ)) : Irreducible f",
"start": [
34,
1
],
"end": [
61,
82
],
"kind": "commanddeclaration"
}
] |
Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean | [
"Mathlib/Combinatorics/SimpleGraph/Connectivity.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "SimpleGraph.Subgraph.Preconnected",
"code": "protected structure Preconnected (H : G.Subgraph) : Prop where\n protected coe : H.coe.Preconnected",
"start": [
25,
1
],
"end": [
29,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.preconnected_iff",
"code": "protected lemma preconnected_iff {H : G.Subgraph} :\n H.Preconnected ↔ H.coe.Preconnected := ⟨fun ⟨h⟩ => h, .mk⟩",
"start": [
36,
1
],
"end": [
37,
63
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected",
"code": "protected structure Connected (H : G.Subgraph) : Prop where\n protected coe : H.coe.Connected",
"start": [
39,
1
],
"end": [
43,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.connected_iff'",
"code": "protected lemma connected_iff' {H : G.Subgraph} :\n H.Connected ↔ H.coe.Connected := ⟨fun ⟨h⟩ => h, .mk⟩",
"start": [
51,
1
],
"end": [
52,
57
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.connected_iff",
"code": "protected lemma connected_iff {H : G.Subgraph} :\n H.Connected ↔ H.Preconnected ∧ H.verts.Nonempty := by\n rw [H.connected_iff', connected_iff, H.preconnected_iff, Set.nonempty_coe_sort]",
"start": [
54,
1
],
"end": [
56,
82
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.preconnected",
"code": "protected lemma Connected.preconnected {H : G.Subgraph} (h : H.Connected) : H.Preconnected := by\n rw [H.connected_iff] at h; exact h.1",
"start": [
58,
1
],
"end": [
59,
39
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.nonempty",
"code": "protected lemma Connected.nonempty {H : G.Subgraph} (h : H.Connected) : H.verts.Nonempty := by\n rw [H.connected_iff] at h; exact h.2",
"start": [
61,
1
],
"end": [
62,
39
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.singletonSubgraph_connected",
"code": "theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected",
"start": [
64,
1
],
"end": [
69,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.subgraphOfAdj_connected",
"code": "@[simp]\ntheorem subgraphOfAdj_connected {v w : V} (hvw : G.Adj v w) : (G.subgraphOfAdj hvw).Connected",
"start": [
72,
1
],
"end": [
78,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.top_induce_pair_connected_of_adj",
"code": "lemma top_induce_pair_connected_of_adj {u v : V} (huv : G.Adj u v) :\n ((⊤ : G.Subgraph).induce {u, v}).Connected := by\n rw [← subgraphOfAdj_eq_induce huv]\n exact subgraphOfAdj_connected huv",
"start": [
81,
1
],
"end": [
84,
36
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.mono",
"code": "@[mono]\nprotected lemma Connected.mono {H H' : G.Subgraph} (hle : H ≤ H') (hv : H.verts = H'.verts)\n (h : H.Connected) : H'.Connected := by\n rw [← Subgraph.copy_eq H' H.verts hv H'.Adj rfl]\n refine ⟨h.coe.mono ?_⟩\n rintro ⟨v, hv⟩ ⟨w, hw⟩ hvw\n exact hle.2 hvw",
"start": [
86,
1
],
"end": [
92,
18
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.mono'",
"code": "protected lemma Connected.mono' {H H' : G.Subgraph}\n (hle : ∀ v w, H.Adj v w → H'.Adj v w) (hv : H.verts = H'.verts)\n (h : H.Connected) : H'.Connected := by\n exact h.mono ⟨hv.le, hle⟩ hv",
"start": [
94,
1
],
"end": [
97,
31
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.sup",
"code": "protected lemma Connected.sup {H K : G.Subgraph}\n (hH : H.Connected) (hK : K.Connected) (hn : (H ⊓ K).verts.Nonempty) :\n (H ⊔ K).Connected := by\n rw [Subgraph.connected_iff', connected_iff_exists_forall_reachable]\n obtain ⟨u, hu, hu'⟩ := hn\n exists ⟨u, Or.inl hu⟩\n rintro ⟨v, (hv|hv)⟩\n · exact Reachable.map (Subgraph.inclusion (le_sup_left : H ≤ H ⊔ K)) (hH ⟨u, hu⟩ ⟨v, hv⟩)\n · exact Reachable.map (Subgraph.inclusion (le_sup_right : K ≤ H ⊔ K)) (hK ⟨u, hu'⟩ ⟨v, hv⟩)",
"start": [
99,
1
],
"end": [
107,
94
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Walk.toSubgraph_connected",
"code": "lemma _root_.SimpleGraph.Walk.toSubgraph_connected {u v : V} (p : G.Walk u v) :\n p.toSubgraph.Connected := by\n induction p with\n | nil => apply singletonSubgraph_connected\n | @cons _ w _ h p ih =>\n apply (subgraphOfAdj_connected h).sup ih\n exists w\n simp",
"start": [
109,
1
],
"end": [
116,
9
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.induce_union_connected",
"code": "lemma induce_union_connected {H : G.Subgraph} {s t : Set V}\n (sconn : (H.induce s).Connected) (tconn : (H.induce t).Connected)\n (sintert : (s ⊓ t).Nonempty) :\n (H.induce (s ∪ t)).Connected := by\n refine (sconn.sup tconn sintert).mono ?_ ?_\n · apply le_induce_union\n · simp",
"start": [
118,
1
],
"end": [
124,
9
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.adj_union",
"code": "lemma Connected.adj_union {H K : G.Subgraph}\n (Hconn : H.Connected) (Kconn : K.Connected) {u v : V} (uH : u ∈ H.verts) (vK : v ∈ K.verts)\n (huv : G.Adj u v) :\n ((⊤ : G.Subgraph).induce {u, v} ⊔ H ⊔ K).Connected := by\n refine ((top_induce_pair_connected_of_adj huv).sup Hconn ?_).sup Kconn ?_\n · exact ⟨u, by simp [uH]⟩\n · exact ⟨v, by simp [vK]⟩",
"start": [
126,
1
],
"end": [
132,
28
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.preconnected_iff_forall_exists_walk_subgraph",
"code": "lemma preconnected_iff_forall_exists_walk_subgraph (H : G.Subgraph) :\n H.Preconnected ↔ ∀ {u v}, u ∈ H.verts → v ∈ H.verts → ∃ p : G.Walk u v, p.toSubgraph ≤ H := by\n constructor\n · intro hc u v hu hv\n refine (hc ⟨_, hu⟩ ⟨_, hv⟩).elim fun p => ?_\n exists p.map (Subgraph.hom _)\n simp [coeSubgraph_le]\n · intro hw\n rw [Subgraph.preconnected_iff]\n rintro ⟨u, hu⟩ ⟨v, hv⟩\n obtain ⟨p, h⟩ := hw hu hv\n exact Reachable.map (Subgraph.inclusion h)\n (p.toSubgraph_connected ⟨_, p.start_mem_verts_toSubgraph⟩ ⟨_, p.end_mem_verts_toSubgraph⟩)",
"start": [
134,
1
],
"end": [
146,
97
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.connected_iff_forall_exists_walk_subgraph",
"code": "lemma connected_iff_forall_exists_walk_subgraph (H : G.Subgraph) :\n H.Connected ↔\n H.verts.Nonempty ∧\n ∀ {u v}, u ∈ H.verts → v ∈ H.verts → ∃ p : G.Walk u v, p.toSubgraph ≤ H := by\n rw [H.connected_iff, preconnected_iff_forall_exists_walk_subgraph, and_comm]",
"start": [
148,
1
],
"end": [
152,
79
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.connected_induce_iff",
"code": "lemma connected_induce_iff {s : Set V} :\n (G.induce s).Connected ↔ ((⊤ : G.Subgraph).induce s).Connected := by\n rw [induce_eq_coe_induce_top, ← Subgraph.connected_iff']",
"start": [
158,
1
],
"end": [
160,
59
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.induce_union_connected",
"code": "lemma induce_union_connected {s t : Set V}\n (sconn : (G.induce s).Connected) (tconn : (G.induce t).Connected)\n (sintert : (s ∩ t).Nonempty) :\n (G.induce (s ∪ t)).Connected := by\n rw [connected_induce_iff] at sconn tconn ⊢\n exact Subgraph.induce_union_connected sconn tconn sintert",
"start": [
162,
1
],
"end": [
167,
60
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.induce_pair_connected_of_adj",
"code": "lemma induce_pair_connected_of_adj {u v : V} (huv : G.Adj u v) :\n (G.induce {u, v}).Connected := by\n rw [connected_induce_iff]\n exact Subgraph.top_induce_pair_connected_of_adj huv",
"start": [
169,
1
],
"end": [
172,
54
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Subgraph.Connected.induce_verts",
"code": "lemma Subgraph.Connected.induce_verts {H : G.Subgraph} (h : H.Connected) :\n (G.induce H.verts).Connected := by\n rw [connected_induce_iff]\n exact h.mono le_induce_top_verts (by exact rfl)",
"start": [
174,
1
],
"end": [
177,
50
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.Walk.connected_induce_support",
"code": "lemma Walk.connected_induce_support {u v : V} (p : G.Walk u v) :\n (G.induce {v | v ∈ p.support}).Connected := by\n rw [← p.verts_toSubgraph]\n exact p.toSubgraph_connected.induce_verts",
"start": [
179,
1
],
"end": [
182,
44
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.induce_connected_adj_union",
"code": "lemma induce_connected_adj_union {v w : V} {s t : Set V}\n (sconn : (G.induce s).Connected) (tconn : (G.induce t).Connected)\n (hv : v ∈ s) (hw : w ∈ t) (ha : G.Adj v w) :\n (G.induce (s ∪ t)).Connected := by\n rw [connected_induce_iff] at sconn tconn ⊢\n apply (sconn.adj_union tconn hv hw ha).mono\n · simp only [Set.mem_singleton_iff, sup_le_iff, Subgraph.le_induce_union_left,\n Subgraph.le_induce_union_right, and_true, ← Subgraph.subgraphOfAdj_eq_induce ha]\n apply subgraphOfAdj_le_of_adj\n simp [hv, hw, ha]\n · simp only [Set.mem_singleton_iff, sup_le_iff, Subgraph.verts_sup, Subgraph.induce_verts]\n rw [Set.union_assoc]\n simp [Set.insert_subset_iff, Set.singleton_subset_iff, hv, hw]",
"start": [
184,
1
],
"end": [
196,
67
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.induce_connected_of_patches",
"code": "lemma induce_connected_of_patches {s : Set V} (u : V) (hu : u ∈ s)\n (patches : ∀ {v}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'),\n (G.induce s').Reachable ⟨u, hu'⟩ ⟨v, hv'⟩) : (G.induce s).Connected := by\n rw [connected_iff_exists_forall_reachable]\n refine ⟨⟨u, hu⟩, ?_⟩\n rintro ⟨v, hv⟩\n obtain ⟨sv, svs, hu', hv', uv⟩ := patches hv\n exact uv.map (induceHomOfLE _ svs).toHom",
"start": [
198,
1
],
"end": [
205,
43
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.induce_sUnion_connected_of_pairwise_not_disjoint",
"code": "lemma induce_sUnion_connected_of_pairwise_not_disjoint {S : Set (Set V)} (Sn : S.Nonempty)\n (Snd : ∀ {s t}, s ∈ S → t ∈ S → (s ∩ t).Nonempty)\n (Sc : ∀ {s}, s ∈ S → (G.induce s).Connected) :\n (G.induce (⋃₀ S)).Connected := by\n obtain ⟨s, sS⟩ := Sn\n obtain ⟨v, vs⟩ := (Sc sS).nonempty\n apply G.induce_connected_of_patches _ (Set.subset_sUnion_of_mem sS vs)\n rintro w hw\n simp only [Set.mem_sUnion, exists_prop] at hw\n obtain ⟨t, tS, wt⟩ := hw\n refine ⟨s ∪ t, Set.union_subset (Set.subset_sUnion_of_mem sS) (Set.subset_sUnion_of_mem tS),\n Or.inl vs, Or.inr wt, induce_union_connected (Sc sS) (Sc tS) (Snd sS tS) _ _⟩",
"start": [
207,
1
],
"end": [
218,
88
],
"kind": "lemma"
},
{
"full_name": "SimpleGraph.extend_finset_to_connected",
"code": "lemma extend_finset_to_connected (Gpc : G.Preconnected) {t : Finset V} (tn : t.Nonempty) :\n ∃ (t' : Finset V), t ⊆ t' ∧ (G.induce (t' : Set V)).Connected := by\n classical\n obtain ⟨u, ut⟩ := tn\n refine ⟨t.biUnion (fun v => (Gpc u v).some.support.toFinset), fun v vt => ?_, ?_⟩\n · simp only [Finset.mem_biUnion, List.mem_toFinset, exists_prop]\n exact ⟨v, vt, Walk.end_mem_support _⟩\n · apply G.induce_connected_of_patches u\n · simp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset, Set.mem_iUnion,\n Set.mem_setOf_eq, Walk.start_mem_support, exists_prop, and_true]\n exact ⟨u, ut⟩\n intros v hv\n simp only [Finset.mem_coe, Finset.mem_biUnion, List.mem_toFinset, exists_prop] at hv\n obtain ⟨w, wt, hw⟩ := hv\n refine ⟨{x | x ∈ (Gpc u w).some.support}, ?_, ?_⟩\n · simp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset]\n exact fun x xw => Set.mem_iUnion₂.mpr ⟨w,wt,xw⟩\n · simp only [Set.mem_setOf_eq, Walk.start_mem_support, exists_true_left]\n refine ⟨hw, Walk.connected_induce_support _ _ _⟩",
"start": [
220,
1
],
"end": [
238,
55
],
"kind": "lemma"
}
] |
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean | [
"Mathlib/Algebra/BigOperators/Intervals.lean",
"Mathlib/Algebra/BigOperators/Ring.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Algebra/Order/BigOperators/Group/Finset.lean",
"Mathlib/Algebra/Order/Field/Basic.lean",
"Mathlib/Data/Finset/Sups.lean",
"Mathlib/Tactic/Positivity/Basic.lean",
"Mathlib/Tactic/Ring.lean",
"Mathlib/Tactic/FieldSimp.lean"
] | [
{
"full_name": "binomial_sum_eq",
"code": "private lemma binomial_sum_eq (h : n < m) :\n ∑ i ∈ range (n + 1), (n.choose i * (m - n) / ((m - i) * m.choose i) : ℚ) = 1 := by\n set f : ℕ → ℚ := fun i ↦ n.choose i * (m.choose i : ℚ)⁻¹ with hf\n suffices ∀ i ∈ range (n + 1), f i - f (i + 1) = n.choose i * (m - n) / ((m - i) * m.choose i) by\n rw [← sum_congr rfl this, sum_range_sub', hf]\n simp [choose_self, choose_zero_right, choose_eq_zero_of_lt h]\n intro i h₁\n rw [mem_range] at h₁\n have h₁ := le_of_lt_succ h₁\n have h₂ := h₁.trans_lt h\n have h₃ := h₂.le\n have hi₄ : (i + 1 : ℚ) ≠ 0 := i.cast_add_one_ne_zero\n have := congr_arg ((↑) : ℕ → ℚ) (choose_succ_right_eq m i)\n push_cast at this\n dsimp [f, hf]\n rw [(eq_mul_inv_iff_mul_eq₀ hi₄).mpr this]\n have := congr_arg ((↑) : ℕ → ℚ) (choose_succ_right_eq n i)\n push_cast at this\n rw [(eq_mul_inv_iff_mul_eq₀ hi₄).mpr this]\n have : (m - i : ℚ) ≠ 0 := sub_ne_zero_of_ne (cast_lt.mpr h₂).ne'\n have : (m.choose i : ℚ) ≠ 0 := cast_ne_zero.2 (choose_pos h₂.le).ne'\n field_simp\n ring",
"start": [
49,
1
],
"end": [
71,
7
],
"kind": "lemma"
},
{
"full_name": "Fintype.sum_div_mul_card_choose_card",
"code": "private lemma Fintype.sum_div_mul_card_choose_card :\n ∑ s : Finset α, (card α / ((card α - s.card) * (card α).choose s.card) : ℚ) =\n card α * ∑ k ∈ range (card α), (↑k)⁻¹ + 1 := by\n rw [← powerset_univ, powerset_card_disjiUnion, sum_disjiUnion]\n have : ∀ {x : ℕ}, ∀ s ∈ powersetCard x (univ : Finset α),\n (card α / ((card α - Finset.card s) * (card α).choose (Finset.card s)) : ℚ) =\n card α / ((card α - x) * (card α).choose x) := by\n intros n s hs\n rw [mem_powersetCard_univ.1 hs]\n simp_rw [sum_congr rfl this, sum_const, card_powersetCard, card_univ, nsmul_eq_mul, mul_div,\n mul_comm, ← mul_div]\n rw [← mul_sum, ← mul_inv_cancel (cast_ne_zero.mpr card_ne_zero : (card α : ℚ) ≠ 0), ← mul_add,\n add_comm _ ((card α)⁻¹ : ℚ), ← sum_insert (f := fun x : ℕ ↦ (x⁻¹ : ℚ)) not_mem_range_self,\n ← range_succ]\n have (n) (hn : n ∈ range (card α + 1)) :\n ((card α).choose n / ((card α - n) * (card α).choose n) : ℚ) = (card α - n : ℚ)⁻¹ := by\n rw [div_mul_cancel_right₀]\n exact cast_ne_zero.2 (choose_pos $ mem_range_succ_iff.1 hn).ne'\n simp only [sum_congr rfl this, mul_eq_mul_left_iff, cast_eq_zero]\n convert Or.inl $ sum_range_reflect _ _ with a ha\n rw [add_tsub_cancel_right, cast_sub (mem_range_succ_iff.mp ha)]",
"start": [
73,
1
],
"end": [
93,
66
],
"kind": "lemma"
},
{
"full_name": "Finset.sup_aux",
"code": "private lemma sup_aux : a ∈ lowerClosure s → (s.filter fun b ↦ a ≤ b).Nonempty :=\n fun ⟨b, hb, hab⟩ ↦ ⟨b, mem_filter.2 ⟨hb, hab⟩⟩",
"start": [
108,
1
],
"end": [
109,
49
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup",
"code": "def truncatedSup (s : Finset α) (a : α) : α :=\n if h : a ∈ lowerClosure s then (s.filter fun b ↦ a ≤ b).sup' (sup_aux h) id else ⊤",
"start": [
111,
1
],
"end": [
113,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.truncatedSup_of_mem",
"code": "lemma truncatedSup_of_mem (h : a ∈ lowerClosure s) :\n truncatedSup s a = (s.filter fun b ↦ a ≤ b).sup' (sup_aux h) id := dif_pos h",
"start": [
115,
1
],
"end": [
116,
81
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_of_not_mem",
"code": "lemma truncatedSup_of_not_mem (h : a ∉ lowerClosure s) : truncatedSup s a = ⊤ := dif_neg h",
"start": [
118,
1
],
"end": [
118,
91
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_empty",
"code": "@[simp] lemma truncatedSup_empty (a : α) : truncatedSup ∅ a = ⊤ := truncatedSup_of_not_mem $ by simp",
"start": [
120,
1
],
"end": [
120,
101
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_singleton",
"code": "@[simp] lemma truncatedSup_singleton (b a : α) : truncatedSup {b} a = if a ≤ b then b else ⊤ := by\n simp [truncatedSup]; split_ifs <;> simp [Finset.filter_true_of_mem, *]",
"start": [
122,
1
],
"end": [
123,
73
],
"kind": "lemma"
},
{
"full_name": "Finset.le_truncatedSup",
"code": "lemma le_truncatedSup : a ≤ truncatedSup s a := by\n rw [truncatedSup]\n split_ifs with h\n · obtain ⟨ℬ, hb, h⟩ := h\n exact h.trans $ le_sup' id $ mem_filter.2 ⟨hb, h⟩\n · exact le_top",
"start": [
125,
1
],
"end": [
130,
17
],
"kind": "lemma"
},
{
"full_name": "Finset.map_truncatedSup",
"code": "lemma map_truncatedSup (e : α ≃o β) (s : Finset α) (a : α) :\n e (truncatedSup s a) = truncatedSup (s.map e.toEquiv.toEmbedding) (e a) := by\n have : e a ∈ lowerClosure (s.map e.toEquiv.toEmbedding : Set β) ↔ a ∈ lowerClosure s := by simp\n simp_rw [truncatedSup, apply_dite e, map_finset_sup', map_top, this]\n congr with h\n simp only [filter_map, Function.comp, Equiv.coe_toEmbedding, RelIso.coe_fn_toEquiv,\n OrderIso.le_iff_le, id]\n rw [sup'_map]\n simp only [sup'_map, Equiv.coe_toEmbedding, RelIso.coe_fn_toEquiv, Function.comp_apply]",
"start": [
132,
1
],
"end": [
141,
90
],
"kind": "lemma"
},
{
"full_name": "Finset.lower_aux",
"code": "private lemma lower_aux : a ∈ lowerClosure ↑(s ∪ t) ↔ a ∈ lowerClosure s ∨ a ∈ lowerClosure t := by\n rw [coe_union, lowerClosure_union, LowerSet.mem_sup_iff]",
"start": [
145,
1
],
"end": [
146,
59
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_union",
"code": "lemma truncatedSup_union (hs : a ∈ lowerClosure s) (ht : a ∈ lowerClosure t) :\n truncatedSup (s ∪ t) a = truncatedSup s a ⊔ truncatedSup t a := by\n simpa only [truncatedSup_of_mem, hs, ht, lower_aux.2 (Or.inl hs), filter_union] using\n sup'_union _ _ _",
"start": [
148,
1
],
"end": [
151,
21
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_union_left",
"code": "lemma truncatedSup_union_left (hs : a ∈ lowerClosure s) (ht : a ∉ lowerClosure t) :\n truncatedSup (s ∪ t) a = truncatedSup s a := by\n simp only [mem_lowerClosure, mem_coe, exists_prop, not_exists, not_and] at ht\n simp only [truncatedSup_of_mem, hs, filter_union, filter_false_of_mem ht, union_empty,\n lower_aux.2 (Or.inl hs), ht]",
"start": [
153,
1
],
"end": [
157,
33
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_union_right",
"code": "lemma truncatedSup_union_right (hs : a ∉ lowerClosure s) (ht : a ∈ lowerClosure t) :\n truncatedSup (s ∪ t) a = truncatedSup t a := by rw [union_comm, truncatedSup_union_left ht hs]",
"start": [
159,
1
],
"end": [
160,
99
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_union_of_not_mem",
"code": "lemma truncatedSup_union_of_not_mem (hs : a ∉ lowerClosure s) (ht : a ∉ lowerClosure t) :\n truncatedSup (s ∪ t) a = ⊤ := truncatedSup_of_not_mem fun h ↦ (lower_aux.1 h).elim hs ht",
"start": [
162,
1
],
"end": [
163,
93
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_of_isAntichain",
"code": "lemma truncatedSup_of_isAntichain (hs : IsAntichain (· ≤ ·) (s : Set α)) (ha : a ∈ s) :\n truncatedSup s a = a := by\n refine le_antisymm ?_ le_truncatedSup\n simp_rw [truncatedSup_of_mem (subset_lowerClosure ha), sup'_le_iff, mem_filter]\n rintro b ⟨hb, hab⟩\n exact (hs.eq ha hb hab).ge",
"start": [
165,
1
],
"end": [
170,
29
],
"kind": "lemma"
},
{
"full_name": "Finset.inf_aux",
"code": "private lemma inf_aux : a ∈ upperClosure s → (s.filter (· ≤ a)).Nonempty :=\n fun ⟨b, hb, hab⟩ ↦ ⟨b, mem_filter.2 ⟨hb, hab⟩⟩",
"start": [
178,
1
],
"end": [
179,
49
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf",
"code": "def truncatedInf (s : Finset α) (a : α) : α :=\n if h : a ∈ upperClosure s then (s.filter (· ≤ a)).inf' (inf_aux h) id else ⊥",
"start": [
181,
1
],
"end": [
183,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.truncatedInf_of_mem",
"code": "lemma truncatedInf_of_mem (h : a ∈ upperClosure s) :\n truncatedInf s a = (s.filter (· ≤ a)).inf' (inf_aux h) id := dif_pos h",
"start": [
185,
1
],
"end": [
186,
75
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_of_not_mem",
"code": "lemma truncatedInf_of_not_mem (h : a ∉ upperClosure s) : truncatedInf s a = ⊥ := dif_neg h",
"start": [
188,
1
],
"end": [
188,
91
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_le",
"code": "lemma truncatedInf_le : truncatedInf s a ≤ a := by\n unfold truncatedInf\n split_ifs with h\n · obtain ⟨b, hb, hba⟩ := h\n exact hba.trans' $ inf'_le id $ mem_filter.2 ⟨hb, ‹_›⟩\n · exact bot_le",
"start": [
190,
1
],
"end": [
195,
17
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_empty",
"code": "@[simp] lemma truncatedInf_empty (a : α) : truncatedInf ∅ a = ⊥ := truncatedInf_of_not_mem $ by simp",
"start": [
197,
1
],
"end": [
197,
101
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_singleton",
"code": "@[simp] lemma truncatedInf_singleton (b a : α) : truncatedInf {b} a = if b ≤ a then b else ⊥ := by\n simp only [truncatedInf, coe_singleton, upperClosure_singleton, UpperSet.mem_Ici_iff,\n filter_congr_decidable, id_eq]\n split_ifs <;> simp [Finset.filter_true_of_mem, *]",
"start": [
199,
1
],
"end": [
202,
52
],
"kind": "lemma"
},
{
"full_name": "Finset.map_truncatedInf",
"code": "lemma map_truncatedInf (e : α ≃o β) (s : Finset α) (a : α) :\n e (truncatedInf s a) = truncatedInf (s.map e.toEquiv.toEmbedding) (e a) := by\n have : e a ∈ upperClosure (s.map e.toEquiv.toEmbedding) ↔ a ∈ upperClosure s := by simp\n simp_rw [truncatedInf, apply_dite e, map_finset_inf', map_bot, this]\n congr with h\n simp only [filter_map, Function.comp, Equiv.coe_toEmbedding, RelIso.coe_fn_toEquiv,\n OrderIso.le_iff_le, id, inf'_map]",
"start": [
204,
1
],
"end": [
210,
38
],
"kind": "lemma"
},
{
"full_name": "Finset.upper_aux",
"code": "private lemma upper_aux : a ∈ upperClosure ↑(s ∪ t) ↔ a ∈ upperClosure s ∨ a ∈ upperClosure t := by\n rw [coe_union, upperClosure_union, UpperSet.mem_inf_iff]",
"start": [
214,
1
],
"end": [
215,
59
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_union",
"code": "lemma truncatedInf_union (hs : a ∈ upperClosure s) (ht : a ∈ upperClosure t) :\n truncatedInf (s ∪ t) a = truncatedInf s a ⊓ truncatedInf t a := by\n simpa only [truncatedInf_of_mem, hs, ht, upper_aux.2 (Or.inl hs), filter_union] using\n inf'_union _ _ _",
"start": [
217,
1
],
"end": [
220,
21
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_union_left",
"code": "lemma truncatedInf_union_left (hs : a ∈ upperClosure s) (ht : a ∉ upperClosure t) :\n truncatedInf (s ∪ t) a = truncatedInf s a := by\n simp only [mem_upperClosure, mem_coe, exists_prop, not_exists, not_and] at ht\n simp only [truncatedInf_of_mem, hs, filter_union, filter_false_of_mem ht, union_empty,\n upper_aux.2 (Or.inl hs), ht]",
"start": [
222,
1
],
"end": [
226,
33
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_union_right",
"code": "lemma truncatedInf_union_right (hs : a ∉ upperClosure s) (ht : a ∈ upperClosure t) :\n truncatedInf (s ∪ t) a = truncatedInf t a := by\n rw [union_comm, truncatedInf_union_left ht hs]",
"start": [
228,
1
],
"end": [
230,
49
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_union_of_not_mem",
"code": "lemma truncatedInf_union_of_not_mem (hs : a ∉ upperClosure s) (ht : a ∉ upperClosure t) :\n truncatedInf (s ∪ t) a = ⊥ :=\n truncatedInf_of_not_mem $ by rw [coe_union, upperClosure_union]; exact fun h ↦ h.elim hs ht",
"start": [
232,
1
],
"end": [
234,
94
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_of_isAntichain",
"code": "lemma truncatedInf_of_isAntichain (hs : IsAntichain (· ≤ ·) (s : Set α)) (ha : a ∈ s) :\n truncatedInf s a = a := by\n refine le_antisymm truncatedInf_le ?_\n simp_rw [truncatedInf_of_mem (subset_upperClosure ha), le_inf'_iff, mem_filter]\n rintro b ⟨hb, hba⟩\n exact (hs.eq hb ha hba).ge",
"start": [
236,
1
],
"end": [
241,
29
],
"kind": "lemma"
},
{
"full_name": "Finset.infs_aux",
"code": "private lemma infs_aux : a ∈ lowerClosure ↑(s ⊼ t) ↔ a ∈ lowerClosure s ∧ a ∈ lowerClosure t := by\n rw [coe_infs, lowerClosure_infs, LowerSet.mem_inf_iff]",
"start": [
249,
1
],
"end": [
250,
57
],
"kind": "lemma"
},
{
"full_name": "Finset.sups_aux",
"code": "private lemma sups_aux : a ∈ upperClosure ↑(s ⊻ t) ↔ a ∈ upperClosure s ∧ a ∈ upperClosure t := by\n rw [coe_sups, upperClosure_sups, UpperSet.mem_sup_iff]",
"start": [
252,
1
],
"end": [
253,
57
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_infs",
"code": "lemma truncatedSup_infs (hs : a ∈ lowerClosure s) (ht : a ∈ lowerClosure t) :\n truncatedSup (s ⊼ t) a = truncatedSup s a ⊓ truncatedSup t a := by\n simp only [truncatedSup_of_mem, hs, ht, infs_aux.2 ⟨hs, ht⟩, sup'_inf_sup', filter_infs_le]\n simp_rw [← image_inf_product]\n rw [sup'_image]\n simp [Function.uncurry_def]",
"start": [
255,
1
],
"end": [
260,
30
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_sups",
"code": "lemma truncatedInf_sups (hs : a ∈ upperClosure s) (ht : a ∈ upperClosure t) :\n truncatedInf (s ⊻ t) a = truncatedInf s a ⊔ truncatedInf t a := by\n simp only [truncatedInf_of_mem, hs, ht, sups_aux.2 ⟨hs, ht⟩, inf'_sup_inf', filter_sups_le]\n simp_rw [← image_sup_product]\n rw [inf'_image]\n simp [Function.uncurry_def]",
"start": [
262,
1
],
"end": [
267,
30
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedSup_infs_of_not_mem",
"code": "lemma truncatedSup_infs_of_not_mem (ha : a ∉ lowerClosure s ⊓ lowerClosure t) :\n truncatedSup (s ⊼ t) a = ⊤ :=\n truncatedSup_of_not_mem $ by rwa [coe_infs, lowerClosure_infs]",
"start": [
269,
1
],
"end": [
271,
65
],
"kind": "lemma"
},
{
"full_name": "Finset.truncatedInf_sups_of_not_mem",
"code": "lemma truncatedInf_sups_of_not_mem (ha : a ∉ upperClosure s ⊔ upperClosure t) :\n truncatedInf (s ⊻ t) a = ⊥ :=\n truncatedInf_of_not_mem $ by rwa [coe_sups, upperClosure_sups]",
"start": [
273,
1
],
"end": [
275,
65
],
"kind": "lemma"
},
{
"full_name": "Finset.compl_truncatedSup",
"code": "@[simp] lemma compl_truncatedSup (s : Finset α) (a : α) :\n (truncatedSup s a)ᶜ = truncatedInf sᶜˢ aᶜ := map_truncatedSup (OrderIso.compl α) _ _",
"start": [
282,
1
],
"end": [
283,
89
],
"kind": "lemma"
},
{
"full_name": "Finset.compl_truncatedInf",
"code": "@[simp] lemma compl_truncatedInf (s : Finset α) (a : α) :\n (truncatedInf s a)ᶜ = truncatedSup sᶜˢ aᶜ := map_truncatedInf (OrderIso.compl α) _ _",
"start": [
285,
1
],
"end": [
286,
89
],
"kind": "lemma"
},
{
"full_name": "Finset.card_truncatedSup_union_add_card_truncatedSup_infs",
"code": "lemma card_truncatedSup_union_add_card_truncatedSup_infs (𝒜 ℬ : Finset (Finset α)) (s : Finset α) :\n (truncatedSup (𝒜 ∪ ℬ) s).card + (truncatedSup (𝒜 ⊼ ℬ) s).card =\n (truncatedSup 𝒜 s).card + (truncatedSup ℬ s).card := by\n by_cases h𝒜 : s ∈ lowerClosure (𝒜 : Set $ Finset α) <;>\n by_cases hℬ : s ∈ lowerClosure (ℬ : Set $ Finset α)\n · rw [truncatedSup_union h𝒜 hℬ, truncatedSup_infs h𝒜 hℬ]\n exact card_union_add_card_inter _ _\n · rw [truncatedSup_union_left h𝒜 hℬ, truncatedSup_of_not_mem hℬ,\n truncatedSup_infs_of_not_mem fun h ↦ hℬ h.2]\n · rw [truncatedSup_union_right h𝒜 hℬ, truncatedSup_of_not_mem h𝒜,\n truncatedSup_infs_of_not_mem fun h ↦ h𝒜 h.1, add_comm]\n · rw [truncatedSup_of_not_mem h𝒜, truncatedSup_of_not_mem hℬ,\n truncatedSup_union_of_not_mem h𝒜 hℬ, truncatedSup_infs_of_not_mem fun h ↦ h𝒜 h.1]",
"start": [
292,
1
],
"end": [
304,
88
],
"kind": "lemma"
},
{
"full_name": "Finset.card_truncatedInf_union_add_card_truncatedInf_sups",
"code": "lemma card_truncatedInf_union_add_card_truncatedInf_sups (𝒜 ℬ : Finset (Finset α)) (s : Finset α) :\n (truncatedInf (𝒜 ∪ ℬ) s).card + (truncatedInf (𝒜 ⊻ ℬ) s).card =\n (truncatedInf 𝒜 s).card + (truncatedInf ℬ s).card := by\n by_cases h𝒜 : s ∈ upperClosure (𝒜 : Set $ Finset α) <;>\n by_cases hℬ : s ∈ upperClosure (ℬ : Set $ Finset α)\n · rw [truncatedInf_union h𝒜 hℬ, truncatedInf_sups h𝒜 hℬ]\n exact card_inter_add_card_union _ _\n · rw [truncatedInf_union_left h𝒜 hℬ, truncatedInf_of_not_mem hℬ,\n truncatedInf_sups_of_not_mem fun h ↦ hℬ h.2]\n · rw [truncatedInf_union_right h𝒜 hℬ, truncatedInf_of_not_mem h𝒜,\n truncatedInf_sups_of_not_mem fun h ↦ h𝒜 h.1, add_comm]\n · rw [truncatedInf_of_not_mem h𝒜, truncatedInf_of_not_mem hℬ,\n truncatedInf_union_of_not_mem h𝒜 hℬ, truncatedInf_sups_of_not_mem fun h ↦ h𝒜 h.1]",
"start": [
306,
1
],
"end": [
318,
88
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.infSum",
"code": "def infSum (𝒜 : Finset (Finset α)) : ℚ :=\n ∑ s, (truncatedInf 𝒜 s).card / (s.card * (card α).choose s.card)",
"start": [
328,
1
],
"end": [
331,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "AhlswedeZhang.supSum",
"code": "def supSum (𝒜 : Finset (Finset α)) : ℚ :=\n ∑ s, (truncatedSup 𝒜 s).card / ((card α - s.card) * (card α).choose s.card)",
"start": [
333,
1
],
"end": [
336,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "AhlswedeZhang.supSum_union_add_supSum_infs",
"code": "lemma supSum_union_add_supSum_infs (𝒜 ℬ : Finset (Finset α)) :\n supSum (𝒜 ∪ ℬ) + supSum (𝒜 ⊼ ℬ) = supSum 𝒜 + supSum ℬ := by\n unfold supSum\n rw [← sum_add_distrib, ← sum_add_distrib, sum_congr rfl fun s _ ↦ _]\n simp_rw [div_add_div_same, ← Nat.cast_add, card_truncatedSup_union_add_card_truncatedSup_infs]\n simp",
"start": [
338,
1
],
"end": [
343,
7
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.infSum_union_add_infSum_sups",
"code": "lemma infSum_union_add_infSum_sups (𝒜 ℬ : Finset (Finset α)) :\n infSum (𝒜 ∪ ℬ) + infSum (𝒜 ⊻ ℬ) = infSum 𝒜 + infSum ℬ := by\n unfold infSum\n rw [← sum_add_distrib, ← sum_add_distrib, sum_congr rfl fun s _ ↦ _]\n simp_rw [div_add_div_same, ← Nat.cast_add, card_truncatedInf_union_add_card_truncatedInf_sups]\n simp",
"start": [
345,
1
],
"end": [
350,
7
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.IsAntichain.le_infSum",
"code": "lemma IsAntichain.le_infSum (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) (h𝒜₀ : ∅ ∉ 𝒜) :\n ∑ s ∈ 𝒜, ((card α).choose s.card : ℚ)⁻¹ ≤ infSum 𝒜 := by\n calc\n _ = ∑ s ∈ 𝒜, (truncatedInf 𝒜 s).card / (s.card * (card α).choose s.card : ℚ) := ?_\n _ ≤ _ := sum_le_univ_sum_of_nonneg fun s ↦ by positivity\n refine sum_congr rfl fun s hs ↦ ?_\n rw [truncatedInf_of_isAntichain h𝒜 hs, div_mul_cancel_left₀]\n have := (nonempty_iff_ne_empty.2 $ ne_of_mem_of_not_mem hs h𝒜₀).card_pos\n positivity",
"start": [
352,
1
],
"end": [
360,
13
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.supSum_singleton",
"code": "@[simp] lemma supSum_singleton (hs : s ≠ univ) :\n supSum ({s} : Finset (Finset α)) = card α * ∑ k ∈ range (card α), (k : ℚ)⁻¹ := by\n have : ∀ t : Finset α,\n (card α - (truncatedSup {s} t).card : ℚ) / ((card α - t.card) * (card α).choose t.card) =\n if t ⊆ s then (card α - s.card : ℚ) / ((card α - t.card) * (card α).choose t.card) else 0 := by\n rintro t\n simp_rw [truncatedSup_singleton, le_iff_subset]\n split_ifs <;> simp [card_univ]\n simp_rw [← sub_eq_of_eq_add (Fintype.sum_div_mul_card_choose_card α), eq_sub_iff_add_eq,\n ← eq_sub_iff_add_eq', supSum, ← sum_sub_distrib, ← sub_div]\n rw [sum_congr rfl fun t _ ↦ this t, sum_ite, sum_const_zero, add_zero, filter_subset_univ,\n sum_powerset, ← binomial_sum_eq ((card_lt_iff_ne_univ _).2 hs), eq_comm]\n refine sum_congr rfl fun n _ ↦ ?_\n rw [mul_div_assoc, ← nsmul_eq_mul]\n exact sum_powersetCard n s fun m ↦ (card α - s.card : ℚ) / ((card α - m) * (card α).choose m)",
"start": [
364,
1
],
"end": [
378,
96
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.infSum_compls_add_supSum",
"code": "lemma infSum_compls_add_supSum (𝒜 : Finset (Finset α)) :\n infSum 𝒜ᶜˢ + supSum 𝒜 = card α * ∑ k ∈ range (card α), (k : ℚ)⁻¹ + 1 := by\n unfold infSum supSum\n rw [← @map_univ_of_surjective (Finset α) _ _ _ ⟨compl, compl_injective⟩ compl_surjective, sum_map]\n simp only [Function.Embedding.coeFn_mk, univ_map_embedding, ← compl_truncatedSup,\n ← sum_add_distrib, card_compl, cast_sub (card_le_univ _), choose_symm (card_le_univ _),\n div_add_div_same, sub_add_cancel, Fintype.sum_div_mul_card_choose_card]",
"start": [
380,
1
],
"end": [
387,
76
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.supSum_of_not_univ_mem",
"code": "lemma supSum_of_not_univ_mem (h𝒜₁ : 𝒜.Nonempty) (h𝒜₂ : univ ∉ 𝒜) :\n supSum 𝒜 = card α * ∑ k ∈ range (card α), (k : ℚ)⁻¹ := by\n set m := 𝒜.card with hm\n clear_value m\n induction' m using Nat.strong_induction_on with m ih generalizing 𝒜\n replace ih := fun 𝒜 h𝒜 h𝒜₁ h𝒜₂ ↦ @ih _ h𝒜 𝒜 h𝒜₁ h𝒜₂ rfl\n obtain ⟨a, rfl⟩ | h𝒜₃ := h𝒜₁.exists_eq_singleton_or_nontrivial\n · refine supSum_singleton ?_\n simpa [eq_comm] using h𝒜₂\n cases m\n · cases h𝒜₁.card_pos.ne hm\n obtain ⟨s, 𝒜, hs, rfl, rfl⟩ := card_eq_succ.1 hm.symm\n have h𝒜 : 𝒜.Nonempty := nonempty_iff_ne_empty.2 (by rintro rfl; simp at h𝒜₃)\n rw [insert_eq, eq_sub_of_add_eq (supSum_union_add_supSum_infs _ _), singleton_infs,\n supSum_singleton (ne_of_mem_of_not_mem (mem_insert_self _ _) h𝒜₂), ih, ih, add_sub_cancel_right]\n · exact card_image_le.trans_lt (lt_add_one _)\n · exact h𝒜.image _\n · simpa using fun _ ↦ ne_of_mem_of_not_mem (mem_insert_self _ _) h𝒜₂\n · exact lt_add_one _\n · exact h𝒜\n · exact fun h ↦ h𝒜₂ (mem_insert_of_mem h)",
"start": [
389,
1
],
"end": [
409,
44
],
"kind": "lemma"
},
{
"full_name": "AhlswedeZhang.infSum_eq_one",
"code": "lemma infSum_eq_one (h𝒜₁ : 𝒜.Nonempty) (h𝒜₀ : ∅ ∉ 𝒜) : infSum 𝒜 = 1 := by\n rw [← compls_compls 𝒜, eq_sub_of_add_eq (infSum_compls_add_supSum _),\n supSum_of_not_univ_mem h𝒜₁.compls, add_sub_cancel_left]\n simpa",
"start": [
411,
1
],
"end": [
415,
8
],
"kind": "lemma"
}
] |
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean | [
"Mathlib/Analysis/SpecificLimits/Basic.lean",
"Mathlib/Topology/Order/MonotoneContinuity.lean",
"Mathlib/Algebra/GroupPower/IterateHom.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Order/SemiconjSup.lean",
"Mathlib/Order/Iterate.lean"
] | [
{
"full_name": "CircleDeg1Lift",
"code": "structure CircleDeg1Lift extends ℝ →o ℝ : Type where\n map_add_one' : ∀ x, toFun (x + 1) = toFun x + 1",
"start": [
129,
1
],
"end": [
131,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_mk",
"code": "@[simp] theorem coe_mk (f h) : ⇑(mk f h) = f",
"start": [
143,
1
],
"end": [
143,
52
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_toOrderHom",
"code": "@[simp] theorem coe_toOrderHom : ⇑f.toOrderHom = f",
"start": [
148,
1
],
"end": [
148,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.monotone",
"code": "protected theorem monotone : Monotone f",
"start": [
150,
1
],
"end": [
150,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.mono",
"code": "@[mono] theorem mono {x y} (h : x ≤ y) : f x ≤ f y",
"start": [
153,
1
],
"end": [
153,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.strictMono_iff_injective",
"code": "theorem strictMono_iff_injective : StrictMono f ↔ Injective f",
"start": [
156,
1
],
"end": [
157,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_add_one",
"code": "@[simp]\ntheorem map_add_one : ∀ x, f (x + 1) = f x + 1",
"start": [
160,
1
],
"end": [
162,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_one_add",
"code": "@[simp]\ntheorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x",
"start": [
165,
1
],
"end": [
166,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.ext",
"code": "@[ext]\ntheorem ext ⦃f g : CircleDeg1Lift⦄ (h : ∀ x, f x = g x) : f = g",
"start": [
171,
1
],
"end": [
173,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.ext_iff",
"code": "theorem ext_iff {f g : CircleDeg1Lift} : f = g ↔ ∀ x, f x = g x",
"start": [
176,
1
],
"end": [
177,
19
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_mul",
"code": "@[simp]\ntheorem coe_mul : ⇑(f * g) = f ∘ g",
"start": [
191,
1
],
"end": [
193,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.mul_apply",
"code": "theorem mul_apply (x) : (f * g) x = f (g x)",
"start": [
196,
1
],
"end": [
197,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_one",
"code": "@[simp]\ntheorem coe_one : ⇑(1 : CircleDeg1Lift) = id",
"start": [
200,
1
],
"end": [
202,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.unitsHasCoeToFun",
"code": "instance unitsHasCoeToFun : CoeFun CircleDeg1Liftˣ fun _ => ℝ → ℝ :=\n ⟨fun f => ⇑(f : CircleDeg1Lift)⟩",
"start": [
205,
1
],
"end": [
206,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.units_inv_apply_apply",
"code": "@[simp]\ntheorem units_inv_apply_apply (f : CircleDeg1Liftˣ) (x : ℝ) :\n (f⁻¹ : CircleDeg1Liftˣ) (f x) = x",
"start": [
211,
1
],
"end": [
213,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.units_apply_inv_apply",
"code": "@[simp]\ntheorem units_apply_inv_apply (f : CircleDeg1Liftˣ) (x : ℝ) :\n f ((f⁻¹ : CircleDeg1Liftˣ) x) = x",
"start": [
216,
1
],
"end": [
218,
92
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.toOrderIso",
"code": "def toOrderIso : CircleDeg1Liftˣ →* ℝ ≃o ℝ where\n toFun f :=\n { toFun := f\n invFun := ⇑f⁻¹\n left_inv := units_inv_apply_apply f\n right_inv := units_apply_inv_apply f\n map_rel_iff' := ⟨fun h => by simpa using mono (↑f⁻¹) h, mono f⟩ }\n map_one' := rfl\n map_mul' f g := rfl",
"start": [
221,
1
],
"end": [
230,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_toOrderIso",
"code": "@[simp]\ntheorem coe_toOrderIso (f : CircleDeg1Liftˣ) : ⇑(toOrderIso f) = f",
"start": [
233,
1
],
"end": [
235,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_toOrderIso_symm",
"code": "@[simp]\ntheorem coe_toOrderIso_symm (f : CircleDeg1Liftˣ) :\n ⇑(toOrderIso f).symm = (f⁻¹ : CircleDeg1Liftˣ)",
"start": [
238,
1
],
"end": [
241,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_toOrderIso_inv",
"code": "@[simp]\ntheorem coe_toOrderIso_inv (f : CircleDeg1Liftˣ) : ⇑(toOrderIso f)⁻¹ = (f⁻¹ : CircleDeg1Liftˣ)",
"start": [
244,
1
],
"end": [
246,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.isUnit_iff_bijective",
"code": "theorem isUnit_iff_bijective {f : CircleDeg1Lift} : IsUnit f ↔ Bijective f",
"start": [
249,
1
],
"end": [
261,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.coe_pow",
"code": "theorem coe_pow : ∀ n : ℕ, ⇑(f ^ n) = f^[n]",
"start": [
264,
1
],
"end": [
268,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.semiconjBy_iff_semiconj",
"code": "theorem semiconjBy_iff_semiconj {f g₁ g₂ : CircleDeg1Lift} :\n SemiconjBy f g₁ g₂ ↔ Semiconj f g₁ g₂",
"start": [
271,
1
],
"end": [
273,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_iff_commute",
"code": "theorem commute_iff_commute {f g : CircleDeg1Lift} : Commute f g ↔ Function.Commute f g",
"start": [
276,
1
],
"end": [
277,
10
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate",
"code": "def translate : Multiplicative ℝ →* CircleDeg1Liftˣ := MonoidHom.toHomUnits <|\n { toFun := fun x =>\n ⟨⟨fun y => Multiplicative.toAdd x + y, fun _ _ h => add_le_add_left h _⟩, fun _ =>\n (add_assoc _ _ _).symm⟩\n map_one' := ext <| zero_add\n map_mul' := fun _ _ => ext <| add_assoc _ _ }",
"start": [
285,
1
],
"end": [
293,
50
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate_apply",
"code": "@[simp]\ntheorem translate_apply (x y : ℝ) : translate (Multiplicative.ofAdd x) y = x + y",
"start": [
296,
1
],
"end": [
298,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate_inv_apply",
"code": "@[simp]\ntheorem translate_inv_apply (x y : ℝ) : (translate <| Multiplicative.ofAdd x)⁻¹ y = -x + y",
"start": [
301,
1
],
"end": [
303,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate_zpow",
"code": "@[simp]\ntheorem translate_zpow (x : ℝ) (n : ℤ) :\n translate (Multiplicative.ofAdd x) ^ n = translate (Multiplicative.ofAdd <| ↑n * x)",
"start": [
306,
1
],
"end": [
309,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate_pow",
"code": "@[simp]\ntheorem translate_pow (x : ℝ) (n : ℕ) :\n translate (Multiplicative.ofAdd x) ^ n = translate (Multiplicative.ofAdd <| ↑n * x)",
"start": [
312,
1
],
"end": [
315,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translate_iterate",
"code": "@[simp]\ntheorem translate_iterate (x : ℝ) (n : ℕ) :\n (translate (Multiplicative.ofAdd x))^[n] = translate (Multiplicative.ofAdd <| ↑n * x)",
"start": [
318,
1
],
"end": [
321,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_nat_add",
"code": "theorem commute_nat_add (n : ℕ) : Function.Commute f (n + ·)",
"start": [
333,
1
],
"end": [
334,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_add_nat",
"code": "theorem commute_add_nat (n : ℕ) : Function.Commute f (· + n)",
"start": [
337,
1
],
"end": [
338,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_sub_nat",
"code": "theorem commute_sub_nat (n : ℕ) : Function.Commute f (· - n)",
"start": [
341,
1
],
"end": [
343,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_add_int",
"code": "theorem commute_add_int : ∀ n : ℤ, Function.Commute f (· + n)",
"start": [
346,
1
],
"end": [
348,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_int_add",
"code": "theorem commute_int_add (n : ℤ) : Function.Commute f (n + ·)",
"start": [
351,
1
],
"end": [
352,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.commute_sub_int",
"code": "theorem commute_sub_int (n : ℤ) : Function.Commute f (· - n)",
"start": [
355,
1
],
"end": [
357,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_int_add",
"code": "@[simp]\ntheorem map_int_add (m : ℤ) (x : ℝ) : f (m + x) = m + f x",
"start": [
360,
1
],
"end": [
362,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_add_int",
"code": "@[simp]\ntheorem map_add_int (x : ℝ) (m : ℤ) : f (x + m) = f x + m",
"start": [
365,
1
],
"end": [
367,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_sub_int",
"code": "@[simp]\ntheorem map_sub_int (x : ℝ) (n : ℤ) : f (x - n) = f x - n",
"start": [
370,
1
],
"end": [
372,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_add_nat",
"code": "@[simp]\ntheorem map_add_nat (x : ℝ) (n : ℕ) : f (x + n) = f x + n",
"start": [
375,
1
],
"end": [
377,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_nat_add",
"code": "@[simp]\ntheorem map_nat_add (n : ℕ) (x : ℝ) : f (n + x) = n + f x",
"start": [
380,
1
],
"end": [
382,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_sub_nat",
"code": "@[simp]\ntheorem map_sub_nat (x : ℝ) (n : ℕ) : f (x - n) = f x - n",
"start": [
385,
1
],
"end": [
387,
20
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_int_of_map_zero",
"code": "theorem map_int_of_map_zero (n : ℤ) : f n = f 0 + n",
"start": [
390,
1
],
"end": [
390,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_fract_sub_fract_eq",
"code": "@[simp]\ntheorem map_fract_sub_fract_eq (x : ℝ) : f (fract x) - fract x = f x - x",
"start": [
393,
1
],
"end": [
395,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.sup_apply",
"code": "@[simp]\ntheorem sup_apply (x : ℝ) : (f ⊔ g) x = max (f x) (g x)",
"start": [
425,
1
],
"end": [
427,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.inf_apply",
"code": "@[simp]\ntheorem inf_apply (x : ℝ) : (f ⊓ g) x = min (f x) (g x)",
"start": [
430,
1
],
"end": [
432,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_monotone",
"code": "theorem iterate_monotone (n : ℕ) : Monotone fun f : CircleDeg1Lift => f^[n]",
"start": [
435,
1
],
"end": [
436,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_mono",
"code": "theorem iterate_mono {f g : CircleDeg1Lift} (h : f ≤ g) (n : ℕ) : f^[n] ≤ g^[n]",
"start": [
439,
1
],
"end": [
440,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.pow_mono",
"code": "theorem pow_mono {f g : CircleDeg1Lift} (h : f ≤ g) (n : ℕ) : f ^ n ≤ g ^ n",
"start": [
443,
1
],
"end": [
444,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.pow_monotone",
"code": "theorem pow_monotone (n : ℕ) : Monotone fun f : CircleDeg1Lift => f ^ n",
"start": [
447,
1
],
"end": [
447,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_le_of_map_zero",
"code": "theorem map_le_of_map_zero (x : ℝ) : f x ≤ f 0 + ⌈x⌉",
"start": [
460,
1
],
"end": [
463,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_map_zero_le",
"code": "theorem map_map_zero_le : f (g 0) ≤ f 0 + ⌈g 0⌉",
"start": [
466,
1
],
"end": [
467,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.floor_map_map_zero_le",
"code": "theorem floor_map_map_zero_le : ⌊f (g 0)⌋ ≤ ⌊f 0⌋ + ⌈g 0⌉",
"start": [
470,
1
],
"end": [
473,
43
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.ceil_map_map_zero_le",
"code": "theorem ceil_map_map_zero_le : ⌈f (g 0)⌉ ≤ ⌈f 0⌉ + ⌈g 0⌉",
"start": [
476,
1
],
"end": [
479,
42
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_map_zero_lt",
"code": "theorem map_map_zero_lt : f (g 0) < f 0 + g 0 + 1",
"start": [
482,
1
],
"end": [
486,
48
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_map_of_map_zero",
"code": "theorem le_map_of_map_zero (x : ℝ) : f 0 + ⌊x⌋ ≤ f x",
"start": [
489,
1
],
"end": [
492,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_map_map_zero",
"code": "theorem le_map_map_zero : f 0 + ⌊g 0⌋ ≤ f (g 0)",
"start": [
495,
1
],
"end": [
496,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_floor_map_map_zero",
"code": "theorem le_floor_map_map_zero : ⌊f 0⌋ + ⌊g 0⌋ ≤ ⌊f (g 0)⌋",
"start": [
499,
1
],
"end": [
502,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_ceil_map_map_zero",
"code": "theorem le_ceil_map_map_zero : ⌈f 0⌉ + ⌊g 0⌋ ≤ ⌈(f * g) 0⌉",
"start": [
505,
1
],
"end": [
508,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.lt_map_map_zero",
"code": "theorem lt_map_map_zero : f 0 + g 0 - 1 < f (g 0)",
"start": [
511,
1
],
"end": [
515,
39
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.dist_map_map_zero_lt",
"code": "theorem dist_map_map_zero_lt : dist (f 0 + g 0) (f (g 0)) < 1",
"start": [
518,
1
],
"end": [
520,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.dist_map_zero_lt_of_semiconj",
"code": "theorem dist_map_zero_lt_of_semiconj {f g₁ g₂ : CircleDeg1Lift} (h : Function.Semiconj f g₁ g₂) :\n dist (g₁ 0) (g₂ 0) < 2",
"start": [
523,
1
],
"end": [
531,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.dist_map_zero_lt_of_semiconjBy",
"code": "theorem dist_map_zero_lt_of_semiconjBy {f g₁ g₂ : CircleDeg1Lift} (h : SemiconjBy f g₁ g₂) :\n dist (g₁ 0) (g₂ 0) < 2",
"start": [
534,
1
],
"end": [
536,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_atBot",
"code": "protected theorem tendsto_atBot : Tendsto f atBot atBot",
"start": [
543,
1
],
"end": [
546,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_atTop",
"code": "protected theorem tendsto_atTop : Tendsto f atTop atTop",
"start": [
549,
1
],
"end": [
552,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.continuous_iff_surjective",
"code": "theorem continuous_iff_surjective : Continuous f ↔ Function.Surjective f",
"start": [
555,
1
],
"end": [
556,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_le_of_map_le_add_int",
"code": "theorem iterate_le_of_map_le_add_int {x : ℝ} {m : ℤ} (h : f x ≤ x + m) (n : ℕ) :\n f^[n] x ≤ x + n * m",
"start": [
570,
1
],
"end": [
573,
94
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_iterate_of_add_int_le_map",
"code": "theorem le_iterate_of_add_int_le_map {x : ℝ} {m : ℤ} (h : x + m ≤ f x) (n : ℕ) :\n x + n * m ≤ f^[n] x",
"start": [
576,
1
],
"end": [
579,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_eq_of_map_eq_add_int",
"code": "theorem iterate_eq_of_map_eq_add_int {x : ℝ} {m : ℤ} (h : f x = x + m) (n : ℕ) :\n f^[n] x = x + n * m",
"start": [
582,
1
],
"end": [
584,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_pos_le_iff",
"code": "theorem iterate_pos_le_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :\n f^[n] x ≤ x + n * m ↔ f x ≤ x + m",
"start": [
587,
1
],
"end": [
590,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_pos_lt_iff",
"code": "theorem iterate_pos_lt_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :\n f^[n] x < x + n * m ↔ f x < x + m",
"start": [
593,
1
],
"end": [
596,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.iterate_pos_eq_iff",
"code": "theorem iterate_pos_eq_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :\n f^[n] x = x + n * m ↔ f x = x + m",
"start": [
599,
1
],
"end": [
602,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_iterate_pos_iff",
"code": "theorem le_iterate_pos_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :\n x + n * m ≤ f^[n] x ↔ x + m ≤ f x",
"start": [
605,
1
],
"end": [
607,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.lt_iterate_pos_iff",
"code": "theorem lt_iterate_pos_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :\n x + n * m < f^[n] x ↔ x + m < f x",
"start": [
610,
1
],
"end": [
612,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.mul_floor_map_zero_le_floor_iterate_zero",
"code": "theorem mul_floor_map_zero_le_floor_iterate_zero (n : ℕ) : ↑n * ⌊f 0⌋ ≤ ⌊f^[n] 0⌋",
"start": [
615,
1
],
"end": [
618,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.transnumAuxSeq",
"code": "def transnumAuxSeq (n : ℕ) : ℝ :=\n (f ^ (2 ^ n : ℕ)) 0 / 2 ^ n",
"start": [
627,
1
],
"end": [
629,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber",
"code": "def translationNumber : ℝ :=\n limUnder atTop f.transnumAuxSeq",
"start": [
632,
1
],
"end": [
636,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.transnumAuxSeq_def",
"code": "theorem transnumAuxSeq_def : f.transnumAuxSeq = fun n : ℕ => (f ^ (2 ^ n : ℕ)) 0 / 2 ^ n",
"start": [
645,
1
],
"end": [
646,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_tendsto_aux",
"code": "theorem translationNumber_eq_of_tendsto_aux {τ' : ℝ} (h : Tendsto f.transnumAuxSeq atTop (𝓝 τ')) :\n τ f = τ'",
"start": [
649,
1
],
"end": [
651,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_tendsto₀",
"code": "theorem translationNumber_eq_of_tendsto₀ {τ' : ℝ}\n (h : Tendsto (fun n : ℕ => f^[n] 0 / n) atTop (𝓝 τ')) : τ f = τ'",
"start": [
654,
1
],
"end": [
658,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_tendsto₀'",
"code": "theorem translationNumber_eq_of_tendsto₀' {τ' : ℝ}\n (h : Tendsto (fun n : ℕ => f^[n + 1] 0 / (n + 1)) atTop (𝓝 τ')) : τ f = τ'",
"start": [
661,
1
],
"end": [
663,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.transnumAuxSeq_zero",
"code": "theorem transnumAuxSeq_zero : f.transnumAuxSeq 0 = f 0",
"start": [
666,
1
],
"end": [
666,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.transnumAuxSeq_dist_lt",
"code": "theorem transnumAuxSeq_dist_lt (n : ℕ) :\n dist (f.transnumAuxSeq n) (f.transnumAuxSeq (n + 1)) < 1 / 2 / 2 ^ n",
"start": [
669,
1
],
"end": [
677,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translationNumber_aux",
"code": "theorem tendsto_translationNumber_aux : Tendsto f.transnumAuxSeq atTop (𝓝 <| τ f)",
"start": [
680,
1
],
"end": [
681,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.dist_map_zero_translationNumber_le",
"code": "theorem dist_map_zero_translationNumber_le : dist (f 0) (τ f) ≤ 1",
"start": [
684,
1
],
"end": [
687,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translationNumber_of_dist_bounded_aux",
"code": "theorem tendsto_translationNumber_of_dist_bounded_aux (x : ℕ → ℝ) (C : ℝ)\n (H : ∀ n : ℕ, dist ((f ^ n) 0) (x n) ≤ C) :\n Tendsto (fun n : ℕ => x (2 ^ n) / 2 ^ n) atTop (𝓝 <| τ f)",
"start": [
690,
1
],
"end": [
700,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_dist_bounded",
"code": "theorem translationNumber_eq_of_dist_bounded {f g : CircleDeg1Lift} (C : ℝ)\n (H : ∀ n : ℕ, dist ((f ^ n) 0) ((g ^ n) 0) ≤ C) : τ f = τ g",
"start": [
703,
1
],
"end": [
706,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_one",
"code": "@[simp]\ntheorem translationNumber_one : τ 1 = 0",
"start": [
709,
1
],
"end": [
711,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_semiconjBy",
"code": "theorem translationNumber_eq_of_semiconjBy {f g₁ g₂ : CircleDeg1Lift} (H : SemiconjBy f g₁ g₂) :\n τ g₁ = τ g₂",
"start": [
714,
1
],
"end": [
717,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_of_semiconj",
"code": "theorem translationNumber_eq_of_semiconj {f g₁ g₂ : CircleDeg1Lift}\n (H : Function.Semiconj f g₁ g₂) : τ g₁ = τ g₂",
"start": [
720,
1
],
"end": [
722,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_mul_of_commute",
"code": "theorem translationNumber_mul_of_commute {f g : CircleDeg1Lift} (h : Commute f g) :\n τ (f * g) = τ f + τ g",
"start": [
725,
1
],
"end": [
733,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_units_inv",
"code": "@[simp]\ntheorem translationNumber_units_inv (f : CircleDeg1Liftˣ) : τ ↑f⁻¹ = -τ f",
"start": [
736,
1
],
"end": [
739,
78
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_pow",
"code": "@[simp]\ntheorem translationNumber_pow : ∀ n : ℕ, τ (f ^ n) = n * τ f",
"start": [
742,
1
],
"end": [
747,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_zpow",
"code": "@[simp]\ntheorem translationNumber_zpow (f : CircleDeg1Liftˣ) : ∀ n : ℤ, τ (f ^ n : Units _) = n * τ f",
"start": [
750,
1
],
"end": [
753,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_conj_eq",
"code": "@[simp]\ntheorem translationNumber_conj_eq (f : CircleDeg1Liftˣ) (g : CircleDeg1Lift) :\n τ (↑f * g * ↑f⁻¹) = τ g",
"start": [
756,
1
],
"end": [
759,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_conj_eq'",
"code": "@[simp]\ntheorem translationNumber_conj_eq' (f : CircleDeg1Liftˣ) (g : CircleDeg1Lift) :\n τ (↑f⁻¹ * g * f) = τ g",
"start": [
762,
1
],
"end": [
765,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.dist_pow_map_zero_mul_translationNumber_le",
"code": "theorem dist_pow_map_zero_mul_translationNumber_le (n : ℕ) :\n dist ((f ^ n) 0) (n * f.translationNumber) ≤ 1",
"start": [
768,
1
],
"end": [
770,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translation_number₀'",
"code": "theorem tendsto_translation_number₀' :\n Tendsto (fun n : ℕ => (f ^ (n + 1) : CircleDeg1Lift) 0 / ((n : ℝ) + 1)) atTop (𝓝 <| τ f)",
"start": [
773,
1
],
"end": [
783,
51
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translation_number₀",
"code": "theorem tendsto_translation_number₀ : Tendsto (fun n : ℕ => (f ^ n) 0 / n) atTop (𝓝 <| τ f)",
"start": [
786,
1
],
"end": [
787,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translationNumber",
"code": "theorem tendsto_translationNumber (x : ℝ) :\n Tendsto (fun n : ℕ => ((f ^ n) x - x) / n) atTop (𝓝 <| τ f)",
"start": [
790,
1
],
"end": [
796,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.tendsto_translation_number'",
"code": "theorem tendsto_translation_number' (x : ℝ) :\n Tendsto (fun n : ℕ => ((f ^ (n + 1) : CircleDeg1Lift) x - x) / (n + 1)) atTop (𝓝 <| τ f)",
"start": [
799,
1
],
"end": [
801,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_mono",
"code": "theorem translationNumber_mono : Monotone τ",
"start": [
804,
1
],
"end": [
806,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_translate",
"code": "theorem translationNumber_translate (x : ℝ) : τ (translate <| Multiplicative.ofAdd x) = x",
"start": [
809,
1
],
"end": [
812,
89
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_le_of_le_add",
"code": "theorem translationNumber_le_of_le_add {z : ℝ} (hz : ∀ x, f x ≤ x + z) : τ f ≤ z",
"start": [
815,
1
],
"end": [
816,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_translationNumber_of_add_le",
"code": "theorem le_translationNumber_of_add_le {z : ℝ} (hz : ∀ x, x + z ≤ f x) : z ≤ τ f",
"start": [
819,
1
],
"end": [
820,
97
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_le_of_le_add_int",
"code": "theorem translationNumber_le_of_le_add_int {x : ℝ} {m : ℤ} (h : f x ≤ x + m) : τ f ≤ m",
"start": [
823,
1
],
"end": [
826,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_le_of_le_add_nat",
"code": "theorem translationNumber_le_of_le_add_nat {x : ℝ} {m : ℕ} (h : f x ≤ x + m) : τ f ≤ m",
"start": [
829,
1
],
"end": [
830,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_translationNumber_of_add_int_le",
"code": "theorem le_translationNumber_of_add_int_le {x : ℝ} {m : ℤ} (h : x + m ≤ f x) : ↑m ≤ τ f",
"start": [
833,
1
],
"end": [
836,
98
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.le_translationNumber_of_add_nat_le",
"code": "theorem le_translationNumber_of_add_nat_le {x : ℝ} {m : ℕ} (h : x + m ≤ f x) : ↑m ≤ τ f",
"start": [
839,
1
],
"end": [
840,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_of_eq_add_int",
"code": "theorem translationNumber_of_eq_add_int {x : ℝ} {m : ℤ} (h : f x = x + m) : τ f = m",
"start": [
843,
1
],
"end": [
847,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.floor_sub_le_translationNumber",
"code": "theorem floor_sub_le_translationNumber (x : ℝ) : ↑⌊f x - x⌋ ≤ τ f",
"start": [
850,
1
],
"end": [
851,
85
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_le_ceil_sub",
"code": "theorem translationNumber_le_ceil_sub (x : ℝ) : τ f ≤ ⌈f x - x⌉",
"start": [
854,
1
],
"end": [
855,
84
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_lt_of_translationNumber_lt_int",
"code": "theorem map_lt_of_translationNumber_lt_int {n : ℤ} (h : τ f < n) (x : ℝ) : f x < x + n",
"start": [
858,
1
],
"end": [
859,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_lt_of_translationNumber_lt_nat",
"code": "theorem map_lt_of_translationNumber_lt_nat {n : ℕ} (h : τ f < n) (x : ℝ) : f x < x + n",
"start": [
862,
1
],
"end": [
863,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_lt_add_floor_translationNumber_add_one",
"code": "theorem map_lt_add_floor_translationNumber_add_one (x : ℝ) : f x < x + ⌊τ f⌋ + 1",
"start": [
866,
1
],
"end": [
871,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.map_lt_add_translationNumber_add_one",
"code": "theorem map_lt_add_translationNumber_add_one (x : ℝ) : f x < x + τ f + 1",
"start": [
874,
1
],
"end": [
877,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.lt_map_of_int_lt_translationNumber",
"code": "theorem lt_map_of_int_lt_translationNumber {n : ℤ} (h : ↑n < τ f) (x : ℝ) : x + n < f x",
"start": [
880,
1
],
"end": [
881,
68
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.lt_map_of_nat_lt_translationNumber",
"code": "theorem lt_map_of_nat_lt_translationNumber {n : ℕ} (h : ↑n < τ f) (x : ℝ) : x + n < f x",
"start": [
884,
1
],
"end": [
885,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_of_map_pow_eq_add_int",
"code": "theorem translationNumber_of_map_pow_eq_add_int {x : ℝ} {n : ℕ} {m : ℤ} (h : (f ^ n) x = x + m)\n (hn : 0 < n) : τ f = m / n",
"start": [
888,
1
],
"end": [
895,
41
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.forall_map_sub_of_Icc",
"code": "theorem forall_map_sub_of_Icc (P : ℝ → Prop) (h : ∀ x ∈ Icc (0 : ℝ) 1, P (f x - x)) (x : ℝ) :\n P (f x - x)",
"start": [
898,
1
],
"end": [
902,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_lt_of_forall_lt_add",
"code": "theorem translationNumber_lt_of_forall_lt_add (hf : Continuous f) {z : ℝ} (hz : ∀ x, f x < x + z) :\n τ f < z",
"start": [
905,
1
],
"end": [
913,
58
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.lt_translationNumber_of_forall_add_lt",
"code": "theorem lt_translationNumber_of_forall_add_lt (hf : Continuous f) {z : ℝ} (hz : ∀ x, x + z < f x) :\n z < τ f",
"start": [
916,
1
],
"end": [
923,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.exists_eq_add_translationNumber",
"code": "theorem exists_eq_add_translationNumber (hf : Continuous f) : ∃ x, f x = x + τ f",
"start": [
926,
1
],
"end": [
935,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_int_iff",
"code": "theorem translationNumber_eq_int_iff (hf : Continuous f) {m : ℤ} :\n τ f = m ↔ ∃ x : ℝ, f x = x + m",
"start": [
938,
1
],
"end": [
945,
47
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.continuous_pow",
"code": "theorem continuous_pow (hf : Continuous f) (n : ℕ) : Continuous (f ^ n : CircleDeg1Lift)",
"start": [
948,
1
],
"end": [
950,
21
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.translationNumber_eq_rat_iff",
"code": "theorem translationNumber_eq_rat_iff (hf : Continuous f) {m : ℤ} {n : ℕ} (hn : 0 < n) :\n τ f = m / n ↔ ∃ x, (f ^ n) x = x + m",
"start": [
953,
1
],
"end": [
956,
69
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.semiconj_of_group_action_of_forall_translationNumber_eq",
"code": "theorem semiconj_of_group_action_of_forall_translationNumber_eq {G : Type*} [Group G]\n (f₁ f₂ : G →* CircleDeg1Lift) (h : ∀ g, τ (f₁ g) = τ (f₂ g)) :\n ∃ F : CircleDeg1Lift, ∀ g, Semiconj F (f₁ g) (f₂ g)",
"start": [
959,
1
],
"end": [
997,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.units_semiconj_of_translationNumber_eq",
"code": "theorem units_semiconj_of_translationNumber_eq {f₁ f₂ : CircleDeg1Liftˣ} (h : τ f₁ = τ f₂) :\n ∃ F : CircleDeg1Lift, Semiconj F f₁ f₂",
"start": [
1000,
1
],
"end": [
1010,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.semiconj_of_isUnit_of_translationNumber_eq",
"code": "theorem semiconj_of_isUnit_of_translationNumber_eq {f₁ f₂ : CircleDeg1Lift} (h₁ : IsUnit f₁)\n (h₂ : IsUnit f₂) (h : τ f₁ = τ f₂) : ∃ F : CircleDeg1Lift, Semiconj F f₁ f₂",
"start": [
1013,
1
],
"end": [
1019,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "CircleDeg1Lift.semiconj_of_bijective_of_translationNumber_eq",
"code": "theorem semiconj_of_bijective_of_translationNumber_eq {f₁ f₂ : CircleDeg1Lift} (h₁ : Bijective f₁)\n (h₂ : Bijective f₂) (h : τ f₁ = τ f₂) : ∃ F : CircleDeg1Lift, Semiconj F f₁ f₂",
"start": [
1022,
1
],
"end": [
1028,
6
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Finset/PImage.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/PFun.lean",
"Mathlib/Data/Finset/Option.lean",
"Mathlib/Data/Part.lean"
] | [
{
"full_name": "Part.toFinset",
"code": "def toFinset (o : Part α) [Decidable o.Dom] : Finset α :=\n o.toOption.toFinset",
"start": [
28,
1
],
"end": [
30,
22
],
"kind": "commanddeclaration"
},
{
"full_name": "Part.mem_toFinset",
"code": "@[simp]\ntheorem mem_toFinset {o : Part α} [Decidable o.Dom] {x : α} : x ∈ o.toFinset ↔ x ∈ o",
"start": [
33,
1
],
"end": [
35,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Part.toFinset_none",
"code": "@[simp]\ntheorem toFinset_none [Decidable (none : Part α).Dom] : none.toFinset = (∅ : Finset α)",
"start": [
38,
1
],
"end": [
40,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Part.toFinset_some",
"code": "@[simp]\ntheorem toFinset_some {a : α} [Decidable (some a).Dom] : (some a).toFinset = {a}",
"start": [
43,
1
],
"end": [
45,
18
],
"kind": "commanddeclaration"
},
{
"full_name": "Part.coe_toFinset",
"code": "@[simp]\ntheorem coe_toFinset (o : Part α) [Decidable o.Dom] : (o.toFinset : Set α) = { x | x ∈ o }",
"start": [
48,
1
],
"end": [
50,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage",
"code": "def pimage (f : α →. β) [∀ x, Decidable (f x).Dom] (s : Finset α) : Finset β :=\n s.biUnion fun x => (f x).toFinset",
"start": [
60,
1
],
"end": [
62,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.mem_pimage",
"code": "@[simp]\ntheorem mem_pimage : b ∈ s.pimage f ↔ ∃ a ∈ s, b ∈ f a",
"start": [
65,
1
],
"end": [
67,
16
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.coe_pimage",
"code": "@[simp, norm_cast]\ntheorem coe_pimage : (s.pimage f : Set β) = f.image s",
"start": [
70,
1
],
"end": [
72,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_some",
"code": "@[simp]\ntheorem pimage_some (s : Finset α) (f : α → β) [∀ x, Decidable (Part.some <| f x).Dom] :\n (s.pimage fun x => Part.some (f x)) = s.image f",
"start": [
75,
1
],
"end": [
79,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_congr",
"code": "theorem pimage_congr (h₁ : s = t) (h₂ : ∀ x ∈ t, f x = g x) : s.pimage f = t.pimage g",
"start": [
82,
1
],
"end": [
86,
79
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_eq_image_filter",
"code": "theorem pimage_eq_image_filter : s.pimage f =\n (filter (fun x => (f x).Dom) s).attach.image\n fun x : { x // x ∈ filter (fun x => (f x).Dom) s } =>\n (f x).get (mem_filter.mp x.coe_prop).2",
"start": [
89,
1
],
"end": [
97,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_union",
"code": "theorem pimage_union [DecidableEq α] : (s ∪ t).pimage f = s.pimage f ∪ t.pimage f",
"start": [
100,
1
],
"end": [
102,
56
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_empty",
"code": "@[simp]\ntheorem pimage_empty : pimage f ∅ = ∅",
"start": [
105,
1
],
"end": [
108,
7
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_subset",
"code": "theorem pimage_subset {t : Finset β} : s.pimage f ⊆ t ↔ ∀ x ∈ s, ∀ y ∈ f x, y ∈ t",
"start": [
111,
1
],
"end": [
112,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_mono",
"code": "@[mono]\ntheorem pimage_mono (h : s ⊆ t) : s.pimage f ⊆ t.pimage f",
"start": [
115,
1
],
"end": [
117,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "Finset.pimage_inter",
"code": "theorem pimage_inter [DecidableEq α] : (s ∩ t).pimage f ⊆ s.pimage f ∩ t.pimage f",
"start": [
120,
1
],
"end": [
121,
68
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Nat/Fib/Zeckendorf.lean | [
"Mathlib/Data/Nat/Fib/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "List.IsZeckendorfRep",
"code": "def IsZeckendorfRep (l : List ℕ) : Prop := (l ++ [0]).Chain' (fun a b ↦ b + 2 ≤ a)",
"start": [
42,
1
],
"end": [
48,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "List.IsZeckendorfRep_nil",
"code": "@[simp]\nlemma IsZeckendorfRep_nil : IsZeckendorfRep [] := by simp [IsZeckendorfRep]",
"start": [
50,
1
],
"end": [
51,
76
],
"kind": "lemma"
},
{
"full_name": "List.IsZeckendorfRep.sum_fib_lt",
"code": "lemma IsZeckendorfRep.sum_fib_lt : ∀ {n l}, IsZeckendorfRep l → (∀ a ∈ (l ++ [0]).head?, a < n) →\n (l.map fib).sum < fib n\n | n, [], _, hn => fib_pos.2 <| hn _ rfl\n | n, a :: l, hl, hn => by\n simp only [IsZeckendorfRep, cons_append, chain'_iff_pairwise, pairwise_cons] at hl\n have : ∀ b, b ∈ head? (l ++ [0]) → b < a - 1 :=\n fun b hb ↦ lt_tsub_iff_right.2 <| hl.1 _ <| mem_of_mem_head? hb\n simp only [mem_append, mem_singleton, ← chain'_iff_pairwise, or_imp, forall_and, forall_eq,\n zero_add] at hl\n simp only [map, List.sum_cons]\n refine (add_lt_add_left (sum_fib_lt hl.2 this) _).trans_le ?_\n rw [add_comm, ← fib_add_one (hl.1.2.trans_lt' zero_lt_two).ne']\n exact fib_mono (hn _ rfl)",
"start": [
53,
1
],
"end": [
65,
30
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib",
"code": "def greatestFib (n : ℕ) : ℕ := (n + 1).findGreatest (fun k ↦ fib k ≤ n)",
"start": [
72,
1
],
"end": [
73,
72
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.fib_greatestFib_le",
"code": "lemma fib_greatestFib_le (n : ℕ) : fib (greatestFib n) ≤ n :=\n findGreatest_spec (P := (fun k ↦ fib k ≤ n)) (zero_le _) <| zero_le _",
"start": [
75,
1
],
"end": [
76,
72
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_mono",
"code": "lemma greatestFib_mono : Monotone greatestFib :=\n fun _a _b hab ↦ findGreatest_mono (fun _k ↦ hab.trans') <| add_le_add_right hab _",
"start": [
78,
1
],
"end": [
79,
84
],
"kind": "lemma"
},
{
"full_name": "Nat.le_greatestFib",
"code": "@[simp] lemma le_greatestFib : m ≤ greatestFib n ↔ fib m ≤ n :=\n ⟨fun h ↦ (fib_mono h).trans <| fib_greatestFib_le _,\n fun h ↦ le_findGreatest (m.le_fib_add_one.trans <| add_le_add_right h _) h⟩",
"start": [
81,
1
],
"end": [
83,
80
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_lt",
"code": "@[simp] lemma greatestFib_lt : greatestFib m < n ↔ m < fib n :=\n lt_iff_lt_of_le_iff_le le_greatestFib",
"start": [
85,
1
],
"end": [
86,
40
],
"kind": "lemma"
},
{
"full_name": "Nat.lt_fib_greatestFib_add_one",
"code": "lemma lt_fib_greatestFib_add_one (n : ℕ) : n < fib (greatestFib n + 1) :=\n greatestFib_lt.1 <| lt_succ_self _",
"start": [
88,
1
],
"end": [
89,
37
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_fib",
"code": "@[simp] lemma greatestFib_fib : ∀ {n}, n ≠ 1 → greatestFib (fib n) = n\n | 0, _ => rfl\n | _n + 2, _ => findGreatest_eq_iff.2\n ⟨le_fib_add_one _, fun _ ↦ le_rfl, fun _m hnm _ ↦ ((fib_lt_fib le_add_self).2 hnm).not_le⟩",
"start": [
91,
1
],
"end": [
94,
95
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_eq_zero",
"code": "@[simp] lemma greatestFib_eq_zero : greatestFib n = 0 ↔ n = 0 :=\n ⟨fun h ↦ by simpa using findGreatest_eq_zero_iff.1 h zero_lt_one le_add_self, by rintro rfl; rfl⟩",
"start": [
96,
1
],
"end": [
97,
100
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_ne_zero",
"code": "lemma greatestFib_ne_zero : greatestFib n ≠ 0 ↔ n ≠ 0 := greatestFib_eq_zero.not",
"start": [
99,
1
],
"end": [
99,
81
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_pos",
"code": "@[simp] lemma greatestFib_pos : 0 < greatestFib n ↔ 0 < n := by simp [pos_iff_ne_zero]",
"start": [
101,
1
],
"end": [
101,
87
],
"kind": "lemma"
},
{
"full_name": "Nat.greatestFib_sub_fib_greatestFib_le_greatestFib",
"code": "lemma greatestFib_sub_fib_greatestFib_le_greatestFib (hn : n ≠ 0) :\n greatestFib (n - fib (greatestFib n)) ≤ greatestFib n - 2 := by\n rw [← Nat.lt_succ_iff, greatestFib_lt, tsub_lt_iff_right n.fib_greatestFib_le, Nat.sub_succ,\n succ_pred, ← fib_add_one]\n · exact n.lt_fib_greatestFib_add_one\n · simpa\n · simpa [← succ_le_iff, tsub_eq_zero_iff_le] using hn.bot_lt",
"start": [
103,
1
],
"end": [
109,
63
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorf_aux",
"code": "private lemma zeckendorf_aux (hm : 0 < m) : m - fib (greatestFib m) < m :=\ntsub_lt_self hm <| fib_pos.2 <| findGreatest_pos.2 ⟨1, zero_lt_one, le_add_self, hm⟩",
"start": [
111,
1
],
"end": [
112,
85
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorf",
"code": "def zeckendorf : ℕ → List ℕ\n | 0 => []\n | m@(_ + 1) =>\n let a := greatestFib m\n a :: zeckendorf (m - fib a)\ndecreasing_by simp_wf; subst_vars; apply zeckendorf_aux (zero_lt_succ _)",
"start": [
114,
1
],
"end": [
123,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "Nat.zeckendorf_zero",
"code": "@[simp] lemma zeckendorf_zero : zeckendorf 0 = [] := zeckendorf.eq_1 ..",
"start": [
126,
1
],
"end": [
126,
72
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorf_succ",
"code": "@[simp] lemma zeckendorf_succ (n : ℕ) :\n zeckendorf (n + 1) = greatestFib (n + 1) :: zeckendorf (n + 1 - fib (greatestFib (n + 1))) :=\n zeckendorf.eq_2 ..",
"start": [
128,
1
],
"end": [
130,
21
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorf_of_pos",
"code": "@[simp] lemma zeckendorf_of_pos : ∀ {n}, 0 < n →\n zeckendorf n = greatestFib n :: zeckendorf (n - fib (greatestFib n))\n | _n + 1, _ => zeckendorf_succ _",
"start": [
132,
1
],
"end": [
134,
35
],
"kind": "lemma"
},
{
"full_name": "Nat.isZeckendorfRep_zeckendorf",
"code": "lemma isZeckendorfRep_zeckendorf : ∀ n, (zeckendorf n).IsZeckendorfRep\n | 0 => by simp only [zeckendorf_zero, IsZeckendorfRep_nil]\n | n + 1 => by\n rw [zeckendorf_succ, IsZeckendorfRep, List.cons_append]\n refine (isZeckendorfRep_zeckendorf _).cons' (fun a ha ↦ ?_)\n obtain h | h := eq_zero_or_pos (n + 1 - fib (greatestFib (n + 1)))\n · simp only [h, zeckendorf_zero, nil_append, head?_cons, Option.mem_some_iff] at ha\n subst ha\n exact le_greatestFib.2 le_add_self\n rw [zeckendorf_of_pos h, cons_append, head?_cons, Option.mem_some_iff] at ha\n subst a\n exact add_le_of_le_tsub_right_of_le (le_greatestFib.2 le_add_self)\n (greatestFib_sub_fib_greatestFib_le_greatestFib n.succ_ne_zero)",
"start": [
136,
1
],
"end": [
148,
70
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorf_sum_fib",
"code": "lemma zeckendorf_sum_fib : ∀ {l}, IsZeckendorfRep l → zeckendorf (l.map fib).sum = l\n | [], _ => by simp only [map_nil, List.sum_nil, zeckendorf_zero]\n | a :: l, hl => by\n have hl' := hl\n simp only [IsZeckendorfRep, cons_append, chain'_iff_pairwise, pairwise_cons, mem_append,\n mem_singleton, or_imp, forall_and, forall_eq, zero_add] at hl\n rw [← chain'_iff_pairwise] at hl\n have ha : 0 < a := hl.1.2.trans_lt' zero_lt_two\n suffices h : greatestFib (fib a + sum (map fib l)) = a by\n simp only [map, List.sum_cons, add_pos_iff, fib_pos.2 ha, true_or, zeckendorf_of_pos, h,\n add_tsub_cancel_left, zeckendorf_sum_fib hl.2]\n simp only [add_comm, add_assoc, greatestFib, findGreatest_eq_iff, ne_eq, ha.ne',\n not_false_eq_true, le_add_iff_nonneg_left, _root_.zero_le, forall_true_left, not_le, true_and]\n refine ⟨le_add_of_le_right <| le_fib_add_one _, fun n hn _ ↦ ?_⟩\n rw [add_comm, ← List.sum_cons, ← map_cons]\n exact hl'.sum_fib_lt (by simpa)",
"start": [
150,
1
],
"end": [
165,
36
],
"kind": "lemma"
},
{
"full_name": "Nat.sum_zeckendorf_fib",
"code": "@[simp] lemma sum_zeckendorf_fib (n : ℕ) : (n.zeckendorf.map fib).sum = n := by\n induction n using zeckendorf.induct <;> simp_all [fib_greatestFib_le]",
"start": [
167,
1
],
"end": [
168,
72
],
"kind": "lemma"
},
{
"full_name": "Nat.zeckendorfEquiv",
"code": "def zeckendorfEquiv : ℕ ≃ {l // IsZeckendorfRep l} where\n toFun n := ⟨zeckendorf n, isZeckendorfRep_zeckendorf _⟩\n invFun l := (map fib l).sum\n left_inv := sum_zeckendorf_fib\n right_inv l := Subtype.ext <| zeckendorf_sum_fib l.2",
"start": [
170,
1
],
"end": [
177,
55
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/NormedSpace/Star/Multiplier.lean | [
"Mathlib/Analysis/NormedSpace/Star/Unitization.lean",
"Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean"
] | [
{
"full_name": "DoubleCentralizer",
"code": "structure DoubleCentralizer (𝕜 : Type u) (A : Type v) [NontriviallyNormedField 𝕜]\n [NonUnitalNormedRing A] [NormedSpace 𝕜 A] [SMulCommClass 𝕜 A A] [IsScalarTower 𝕜 A A] extends\n (A →L[𝕜] A) × (A →L[𝕜] A) where\n \n central : ∀ x y : A, snd x * y = x * fst y",
"start": [
62,
1
],
"end": [
70,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.ext",
"code": "@[ext]\nlemma DoubleCentralizer.ext (𝕜 : Type u) (A : Type v) [NontriviallyNormedField 𝕜]\n [NonUnitalNormedRing A] [NormedSpace 𝕜 A] [SMulCommClass 𝕜 A A] [IsScalarTower 𝕜 A A]\n (a b : 𝓜(𝕜, A)) (h : a.toProd = b.toProd) : a = b := by\n cases a\n cases b\n simpa using h",
"start": [
79,
1
],
"end": [
85,
16
],
"kind": "lemma"
},
{
"full_name": "DoubleCentralizer.range_toProd",
"code": "theorem range_toProd :\n Set.range toProd = { lr : (A →L[𝕜] A) × (A →L[𝕜] A) | ∀ x y, lr.2 x * y = x * lr.1 y }",
"start": [
104,
1
],
"end": [
109,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instAdd",
"code": "instance instAdd : Add 𝓜(𝕜, A) where\n add a b :=\n { toProd := a.toProd + b.toProd\n central := fun x y =>\n show (a.snd + b.snd) x * y = x * (a.fst + b.fst) y by\n simp only [ContinuousLinearMap.add_apply, mul_add, add_mul, central] }",
"start": [
112,
1
],
"end": [
117,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instZero",
"code": "instance instZero : Zero 𝓜(𝕜, A) where\n zero :=\n { toProd := 0\n central := fun x y => (zero_mul y).trans (mul_zero x).symm }",
"start": [
119,
1
],
"end": [
122,
67
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instNeg",
"code": "instance instNeg : Neg 𝓜(𝕜, A) where\n neg a :=\n { toProd := -a.toProd\n central := fun x y =>\n show -a.snd x * y = x * -a.fst y by\n simp only [ContinuousLinearMap.neg_apply, neg_mul, mul_neg, central] }",
"start": [
124,
1
],
"end": [
129,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instSub",
"code": "instance instSub : Sub 𝓜(𝕜, A) where\n sub a b :=\n { toProd := a.toProd - b.toProd\n central := fun x y =>\n show (a.snd - b.snd) x * y = x * (a.fst - b.fst) y by\n simp only [ContinuousLinearMap.sub_apply, _root_.sub_mul, _root_.mul_sub, central] }",
"start": [
131,
1
],
"end": [
136,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instSMul",
"code": "instance instSMul : SMul S 𝓜(𝕜, A) where\n smul s a :=\n { toProd := s • a.toProd\n central := fun x y =>\n show (s • a.snd) x * y = x * (s • a.fst) y by\n simp only [ContinuousLinearMap.smul_apply, mul_smul_comm, smul_mul_assoc, central] }",
"start": [
143,
1
],
"end": [
148,
95
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.smul_toProd",
"code": "@[simp]\ntheorem smul_toProd (s : S) (a : 𝓜(𝕜, A)) : (s • a).toProd = s • a.toProd",
"start": [
150,
1
],
"end": [
152,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.smul_fst",
"code": "theorem smul_fst (s : S) (a : 𝓜(𝕜, A)) : (s • a).fst = s • a.fst",
"start": [
155,
1
],
"end": [
156,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.smul_snd",
"code": "theorem smul_snd (s : S) (a : 𝓜(𝕜, A)) : (s • a).snd = s • a.snd",
"start": [
159,
1
],
"end": [
160,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instIsScalarTower",
"code": "instance instIsScalarTower [SMul S T] [IsScalarTower S T A] : IsScalarTower S T 𝓜(𝕜, A) where\n smul_assoc _ _ a := ext (𝕜 := 𝕜) (A := A) _ _ <| smul_assoc _ _ a.toProd",
"start": [
166,
1
],
"end": [
167,
75
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instSMulCommClass",
"code": "instance instSMulCommClass [SMulCommClass S T A] : SMulCommClass S T 𝓜(𝕜, A) where\n smul_comm _ _ a := ext (𝕜 := 𝕜) (A := A) _ _ <| smul_comm _ _ a.toProd",
"start": [
169,
1
],
"end": [
170,
73
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instIsCentralScalar",
"code": "instance instIsCentralScalar {R : Type*} [Semiring R] [Module R A] [SMulCommClass 𝕜 R A]\n [ContinuousConstSMul R A] [IsScalarTower R A A] [SMulCommClass R A A] [Module Rᵐᵒᵖ A]\n [IsCentralScalar R A] : IsCentralScalar R 𝓜(𝕜, A) where\n op_smul_eq_smul _ a := ext (𝕜 := 𝕜) (A := A) _ _ <| op_smul_eq_smul _ a.toProd",
"start": [
172,
1
],
"end": [
175,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instOne",
"code": "instance instOne : One 𝓜(𝕜, A) :=\n ⟨⟨1, fun _x _y => rfl⟩⟩",
"start": [
179,
1
],
"end": [
180,
26
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instMul",
"code": "instance instMul : Mul 𝓜(𝕜, A) where\n mul a b :=\n { toProd := (a.fst.comp b.fst, b.snd.comp a.snd)\n central := fun x y => show b.snd (a.snd x) * y = x * a.fst (b.fst y) by simp only [central] }",
"start": [
182,
1
],
"end": [
185,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instNatCast",
"code": "instance instNatCast : NatCast 𝓜(𝕜, A) where\n natCast n :=\n ⟨n, fun x y => by\n rw [Prod.snd_natCast, Prod.fst_natCast]\n simp only [← Nat.smul_one_eq_cast, smul_apply, one_apply, mul_smul_comm, smul_mul_assoc]⟩",
"start": [
187,
1
],
"end": [
191,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instIntCast",
"code": "instance instIntCast : IntCast 𝓜(𝕜, A) where\n intCast n :=\n ⟨n, fun x y => by\n rw [Prod.snd_intCast, Prod.fst_intCast]\n simp only [← Int.smul_one_eq_cast, smul_apply, one_apply, mul_smul_comm, smul_mul_assoc]⟩",
"start": [
193,
1
],
"end": [
197,
96
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instPow",
"code": "instance instPow : Pow 𝓜(𝕜, A) ℕ where\n pow a n :=\n ⟨a.toProd ^ n, fun x y => by\n induction' n with k hk generalizing x y\n · rfl\n · rw [Prod.pow_snd, Prod.pow_fst] at hk ⊢\n rw [pow_succ' a.snd, mul_apply, a.central, hk, pow_succ a.fst, mul_apply]⟩",
"start": [
199,
1
],
"end": [
205,
83
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instInhabited",
"code": "instance instInhabited : Inhabited 𝓜(𝕜, A) :=\n ⟨0⟩",
"start": [
207,
1
],
"end": [
208,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.add_toProd",
"code": "@[simp]\ntheorem add_toProd (a b : 𝓜(𝕜, A)) : (a + b).toProd = a.toProd + b.toProd",
"start": [
210,
1
],
"end": [
212,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.zero_toProd",
"code": "@[simp]\ntheorem zero_toProd : (0 : 𝓜(𝕜, A)).toProd = 0",
"start": [
215,
1
],
"end": [
217,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.neg_toProd",
"code": "@[simp]\ntheorem neg_toProd (a : 𝓜(𝕜, A)) : (-a).toProd = -a.toProd",
"start": [
220,
1
],
"end": [
222,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.sub_toProd",
"code": "@[simp]\ntheorem sub_toProd (a b : 𝓜(𝕜, A)) : (a - b).toProd = a.toProd - b.toProd",
"start": [
225,
1
],
"end": [
227,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.one_toProd",
"code": "@[simp]\ntheorem one_toProd : (1 : 𝓜(𝕜, A)).toProd = 1",
"start": [
230,
1
],
"end": [
232,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.natCast_toProd",
"code": "@[simp]\ntheorem natCast_toProd (n : ℕ) : (n : 𝓜(𝕜, A)).toProd = n",
"start": [
235,
1
],
"end": [
237,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.intCast_toProd",
"code": "@[simp]\ntheorem intCast_toProd (n : ℤ) : (n : 𝓜(𝕜, A)).toProd = n",
"start": [
243,
1
],
"end": [
245,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.pow_toProd",
"code": "@[simp]\ntheorem pow_toProd (n : ℕ) (a : 𝓜(𝕜, A)) : (a ^ n).toProd = a.toProd ^ n",
"start": [
251,
1
],
"end": [
253,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.add_fst",
"code": "theorem add_fst (a b : 𝓜(𝕜, A)) : (a + b).fst = a.fst + b.fst",
"start": [
256,
1
],
"end": [
257,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.add_snd",
"code": "theorem add_snd (a b : 𝓜(𝕜, A)) : (a + b).snd = a.snd + b.snd",
"start": [
260,
1
],
"end": [
261,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.zero_fst",
"code": "theorem zero_fst : (0 : 𝓜(𝕜, A)).fst = 0",
"start": [
264,
1
],
"end": [
265,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.zero_snd",
"code": "theorem zero_snd : (0 : 𝓜(𝕜, A)).snd = 0",
"start": [
268,
1
],
"end": [
269,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.neg_fst",
"code": "theorem neg_fst (a : 𝓜(𝕜, A)) : (-a).fst = -a.fst",
"start": [
272,
1
],
"end": [
273,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.neg_snd",
"code": "theorem neg_snd (a : 𝓜(𝕜, A)) : (-a).snd = -a.snd",
"start": [
276,
1
],
"end": [
277,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.sub_fst",
"code": "theorem sub_fst (a b : 𝓜(𝕜, A)) : (a - b).fst = a.fst - b.fst",
"start": [
280,
1
],
"end": [
281,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.sub_snd",
"code": "theorem sub_snd (a b : 𝓜(𝕜, A)) : (a - b).snd = a.snd - b.snd",
"start": [
284,
1
],
"end": [
285,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.one_fst",
"code": "theorem one_fst : (1 : 𝓜(𝕜, A)).fst = 1",
"start": [
288,
1
],
"end": [
289,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.one_snd",
"code": "theorem one_snd : (1 : 𝓜(𝕜, A)).snd = 1",
"start": [
292,
1
],
"end": [
293,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.mul_fst",
"code": "@[simp]\ntheorem mul_fst (a b : 𝓜(𝕜, A)) : (a * b).fst = a.fst * b.fst",
"start": [
296,
1
],
"end": [
298,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.mul_snd",
"code": "@[simp]\ntheorem mul_snd (a b : 𝓜(𝕜, A)) : (a * b).snd = b.snd * a.snd",
"start": [
301,
1
],
"end": [
303,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.natCast_fst",
"code": "theorem natCast_fst (n : ℕ) : (n : 𝓜(𝕜, A)).fst = n",
"start": [
306,
1
],
"end": [
307,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.natCast_snd",
"code": "theorem natCast_snd (n : ℕ) : (n : 𝓜(𝕜, A)).snd = n",
"start": [
313,
1
],
"end": [
314,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.intCast_fst",
"code": "theorem intCast_fst (n : ℤ) : (n : 𝓜(𝕜, A)).fst = n",
"start": [
320,
1
],
"end": [
321,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.intCast_snd",
"code": "theorem intCast_snd (n : ℤ) : (n : 𝓜(𝕜, A)).snd = n",
"start": [
327,
1
],
"end": [
328,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.pow_fst",
"code": "theorem pow_fst (n : ℕ) (a : 𝓜(𝕜, A)) : (a ^ n).fst = a.fst ^ n",
"start": [
334,
1
],
"end": [
335,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.pow_snd",
"code": "theorem pow_snd (n : ℕ) (a : 𝓜(𝕜, A)) : (a ^ n).snd = a.snd ^ n",
"start": [
338,
1
],
"end": [
339,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.toProdMulOpposite",
"code": "def toProdMulOpposite : 𝓜(𝕜, A) → (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ := fun a =>\n (a.fst, MulOpposite.op a.snd)",
"start": [
342,
1
],
"end": [
345,
32
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.toProdMulOpposite_injective",
"code": "theorem toProdMulOpposite_injective :\n Function.Injective (toProdMulOpposite : 𝓜(𝕜, A) → (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ)",
"start": [
348,
1
],
"end": [
352,
80
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.range_toProdMulOpposite",
"code": "theorem range_toProdMulOpposite :\n Set.range toProdMulOpposite =\n { lr : (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ | ∀ x y, unop lr.2 x * y = x * lr.1 y }",
"start": [
355,
1
],
"end": [
361,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instRing",
"code": "instance instRing : Ring 𝓜(𝕜, A) :=\n toProdMulOpposite_injective.ring _ rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl)\n (fun _ _ => rfl) (fun _x _n => Prod.ext rfl <| MulOpposite.op_smul _ _)\n (fun _x _n => Prod.ext rfl <| MulOpposite.op_smul _ _)\n (fun _x _n => Prod.ext rfl <| MulOpposite.op_pow _ _) (fun _ => rfl) fun _ => rfl",
"start": [
364,
1
],
"end": [
370,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.toProdHom",
"code": "@[simps]\ndef toProdHom : 𝓜(𝕜, A) →+ (A →L[𝕜] A) × (A →L[𝕜] A) where\n toFun := toProd\n map_zero' := rfl\n map_add' _x _y := rfl",
"start": [
372,
1
],
"end": [
377,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.toProdMulOppositeHom",
"code": "@[simps]\ndef toProdMulOppositeHom : 𝓜(𝕜, A) →+* (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ where\n toFun := toProdMulOpposite\n map_zero' := rfl\n map_one' := rfl\n map_add' _x _y := rfl\n map_mul' _x _y := rfl",
"start": [
380,
1
],
"end": [
387,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instModule",
"code": "instance instModule {S : Type*} [Semiring S] [Module S A] [SMulCommClass 𝕜 S A]\n [ContinuousConstSMul S A] [IsScalarTower S A A] [SMulCommClass S A A] : Module S 𝓜(𝕜, A) :=\n Function.Injective.module S toProdHom (ext (𝕜 := 𝕜) (A := A)) fun _x _y => rfl",
"start": [
390,
1
],
"end": [
394,
81
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instAlgebra",
"code": "instance instAlgebra : Algebra 𝕜 𝓜(𝕜, A) where\n toFun k :=\n { toProd := algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A)) k\n central := fun x y => by\n simp_rw [Prod.algebraMap_apply, Algebra.algebraMap_eq_smul_one, smul_apply, one_apply,\n mul_smul_comm, smul_mul_assoc] }\n map_one' := ext (𝕜 := 𝕜) (A := A) _ _ <| map_one <| algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A))\n map_mul' k₁ k₂ :=\n ext (𝕜 := 𝕜) (A := A) _ _ <|\n Prod.ext (map_mul (algebraMap 𝕜 (A →L[𝕜] A)) _ _)\n ((map_mul (algebraMap 𝕜 (A →L[𝕜] A)) _ _).trans (Algebra.commutes _ _))\n map_zero' := ext (𝕜 := 𝕜) (A := A) _ _ <| map_zero <| algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A))\n map_add' _ _ := ext (𝕜 := 𝕜) (A := A) _ _ <|\n map_add (algebraMap 𝕜 ((A →L[𝕜] A) × (A →L[𝕜] A))) _ _\n commutes' _ _ := ext (𝕜 := 𝕜) (A := A) _ _ <|\n Prod.ext (Algebra.commutes _ _) (Algebra.commutes _ _).symm\n smul_def' _ _ := ext (𝕜 := 𝕜) (A := A) _ _ <|\n Prod.ext (Algebra.smul_def _ _) ((Algebra.smul_def _ _).trans <| Algebra.commutes _ _)",
"start": [
397,
1
],
"end": [
414,
91
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.algebraMap_toProd",
"code": "@[simp]\ntheorem algebraMap_toProd (k : 𝕜) : (algebraMap 𝕜 𝓜(𝕜, A) k).toProd = algebraMap 𝕜 _ k",
"start": [
416,
1
],
"end": [
418,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.algebraMap_fst",
"code": "theorem algebraMap_fst (k : 𝕜) : (algebraMap 𝕜 𝓜(𝕜, A) k).fst = algebraMap 𝕜 _ k",
"start": [
421,
1
],
"end": [
422,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.algebraMap_snd",
"code": "theorem algebraMap_snd (k : 𝕜) : (algebraMap 𝕜 𝓜(𝕜, A) k).snd = algebraMap 𝕜 _ k",
"start": [
425,
1
],
"end": [
426,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instStar",
"code": "instance instStar : Star 𝓜(𝕜, A) where\n star a :=\n { fst :=\n (((starₗᵢ 𝕜 : A ≃ₗᵢ⋆[𝕜] A) : A →L⋆[𝕜] A).comp a.snd).comp\n ((starₗᵢ 𝕜 : A ≃ₗᵢ⋆[𝕜] A) : A →L⋆[𝕜] A)\n snd :=\n (((starₗᵢ 𝕜 : A ≃ₗᵢ⋆[𝕜] A) : A →L⋆[𝕜] A).comp a.fst).comp\n ((starₗᵢ 𝕜 : A ≃ₗᵢ⋆[𝕜] A) : A →L⋆[𝕜] A)\n central := fun x y => by\n simpa only [star_mul, star_star] using (congr_arg star (a.central (star y) (star x))).symm }",
"start": [
438,
1
],
"end": [
449,
101
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.star_fst",
"code": "@[simp]\ntheorem star_fst (a : 𝓜(𝕜, A)) (b : A) : (star a).fst b = star (a.snd (star b))",
"start": [
451,
1
],
"end": [
453,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.star_snd",
"code": "@[simp]\ntheorem star_snd (a : 𝓜(𝕜, A)) (b : A) : (star a).snd b = star (a.fst (star b))",
"start": [
456,
1
],
"end": [
458,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instStarAddMonoid",
"code": "instance instStarAddMonoid : StarAddMonoid 𝓜(𝕜, A) :=\n { DoubleCentralizer.instStar with\n star_involutive := fun x => by ext <;> simp only [star_fst, star_snd, star_star]\n star_add := fun x y => by\n ext <;>\n simp only [star_fst, star_snd, add_fst, add_snd, ContinuousLinearMap.add_apply, star_add] }",
"start": [
461,
1
],
"end": [
466,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instStarRing",
"code": "instance instStarRing : StarRing 𝓜(𝕜, A) :=\n { DoubleCentralizer.instStarAddMonoid with\n star_mul := fun a b => by\n ext <;>\n simp only [star_fst, star_snd, mul_fst, mul_snd, star_star, ContinuousLinearMap.coe_mul,\n Function.comp_apply] }",
"start": [
468,
1
],
"end": [
473,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instStarModule",
"code": "instance instStarModule : StarModule 𝕜 𝓜(𝕜, A) :=\n { DoubleCentralizer.instStarAddMonoid (𝕜 := 𝕜) (A := A) with\n star_smul := fun k a => by ext <;> exact star_smul _ _ }",
"start": [
475,
1
],
"end": [
477,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.coe",
"code": "@[coe]\nprotected noncomputable def coe (a : A) : 𝓜(𝕜, A) :=\n { fst := ContinuousLinearMap.mul 𝕜 A a\n snd := (ContinuousLinearMap.mul 𝕜 A).flip a\n central := fun _x _y => mul_assoc _ _ _ }",
"start": [
487,
1
],
"end": [
498,
46
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.coe_fst",
"code": "@[simp, norm_cast]\ntheorem coe_fst (a : A) : (a : 𝓜(𝕜, A)).fst = ContinuousLinearMap.mul 𝕜 A a",
"start": [
511,
1
],
"end": [
513,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.coe_snd",
"code": "@[simp, norm_cast]\ntheorem coe_snd (a : A) : (a : 𝓜(𝕜, A)).snd = (ContinuousLinearMap.mul 𝕜 A).flip a",
"start": [
516,
1
],
"end": [
518,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.coe_eq_algebraMap",
"code": "theorem coe_eq_algebraMap : (DoubleCentralizer.coe 𝕜 : 𝕜 → 𝓜(𝕜, 𝕜)) = algebraMap 𝕜 𝓜(𝕜, 𝕜)",
"start": [
521,
1
],
"end": [
525,
23
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.coeHom",
"code": "@[simps]\nnoncomputable def coeHom [StarRing 𝕜] [StarRing A] [StarModule 𝕜 A] [NormedStarGroup A] :\n A →⋆ₙₐ[𝕜] 𝓜(𝕜, A) where\n toFun a := a\n map_smul' _ _ := ext _ _ _ _ <| Prod.ext (map_smul _ _ _) (map_smul _ _ _)\n map_zero' := ext _ _ _ _ <| Prod.ext (map_zero _) (map_zero _)\n map_add' _ _ := ext _ _ _ _ <| Prod.ext (map_add _ _ _) (map_add _ _ _)\n map_mul' _ _ := ext _ _ _ _ <| Prod.ext\n (ContinuousLinearMap.ext fun _ => (mul_assoc _ _ _))\n (ContinuousLinearMap.ext fun _ => (mul_assoc _ _ _).symm)\n map_star' _ := ext _ _ _ _ <| Prod.ext\n (ContinuousLinearMap.ext fun _ => (star_star_mul _ _).symm)\n (ContinuousLinearMap.ext fun _ => (star_mul_star _ _).symm)",
"start": [
528,
1
],
"end": [
542,
64
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.norm_def",
"code": "theorem norm_def (a : 𝓜(𝕜, A)) : ‖a‖ = ‖toProdHom a‖",
"start": [
565,
1
],
"end": [
566,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.nnnorm_def",
"code": "theorem nnnorm_def (a : 𝓜(𝕜, A)) : ‖a‖₊ = ‖toProdHom a‖₊",
"start": [
569,
1
],
"end": [
570,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.norm_def'",
"code": "theorem norm_def' (a : 𝓜(𝕜, A)) : ‖a‖ = ‖toProdMulOppositeHom a‖",
"start": [
573,
1
],
"end": [
574,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.nnnorm_def'",
"code": "theorem nnnorm_def' (a : 𝓜(𝕜, A)) : ‖a‖₊ = ‖toProdMulOppositeHom a‖₊",
"start": [
577,
1
],
"end": [
578,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instNormedSpace",
"code": "instance instNormedSpace : NormedSpace 𝕜 𝓜(𝕜, A) :=\n { DoubleCentralizer.instModule with\n norm_smul_le := fun k a => (norm_smul_le k a.toProdMulOpposite : _) }",
"start": [
581,
1
],
"end": [
583,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instNormedAlgebra",
"code": "instance instNormedAlgebra : NormedAlgebra 𝕜 𝓜(𝕜, A) :=\n { DoubleCentralizer.instAlgebra, DoubleCentralizer.instNormedSpace with }",
"start": [
585,
1
],
"end": [
586,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.uniformEmbedding_toProdMulOpposite",
"code": "theorem uniformEmbedding_toProdMulOpposite : UniformEmbedding (@toProdMulOpposite 𝕜 A _ _ _ _ _)",
"start": [
588,
1
],
"end": [
589,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.norm_fst_eq_snd",
"code": "theorem norm_fst_eq_snd (a : 𝓜(𝕜, A)) : ‖a.fst‖ = ‖a.snd‖",
"start": [
604,
1
],
"end": [
640,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.nnnorm_fst_eq_snd",
"code": "theorem nnnorm_fst_eq_snd (a : 𝓜(𝕜, A)) : ‖a.fst‖₊ = ‖a.snd‖₊",
"start": [
643,
1
],
"end": [
644,
35
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.norm_fst",
"code": "@[simp]\ntheorem norm_fst (a : 𝓜(𝕜, A)) : ‖a.fst‖ = ‖a‖",
"start": [
647,
1
],
"end": [
649,
93
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.norm_snd",
"code": "@[simp]\ntheorem norm_snd (a : 𝓜(𝕜, A)) : ‖a.snd‖ = ‖a‖",
"start": [
653,
1
],
"end": [
654,
86
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.nnnorm_fst",
"code": "@[simp]\ntheorem nnnorm_fst (a : 𝓜(𝕜, A)) : ‖a.fst‖₊ = ‖a‖₊",
"start": [
657,
1
],
"end": [
659,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.nnnorm_snd",
"code": "@[simp]\ntheorem nnnorm_snd (a : 𝓜(𝕜, A)) : ‖a.snd‖₊ = ‖a‖₊",
"start": [
662,
1
],
"end": [
664,
27
],
"kind": "commanddeclaration"
},
{
"full_name": "DoubleCentralizer.instCstarRing",
"code": "instance instCstarRing : CstarRing 𝓜(𝕜, A) where\n norm_star_mul_self := @fun (a : 𝓜(𝕜, A)) => congr_arg ((↑) : ℝ≥0 → ℝ) <|\n show ‖star a * a‖₊ = ‖a‖₊ * ‖a‖₊ by\n \n have hball : (Metric.closedBall (0 : A) 1).Nonempty :=\n Metric.nonempty_closedBall.2 zero_le_one\n have key :\n ∀ x y, ‖x‖₊ ≤ 1 → ‖y‖₊ ≤ 1 → ‖a.snd (star (a.fst (star x))) * y‖₊ ≤ ‖a‖₊ * ‖a‖₊ := by\n intro x y hx hy\n rw [a.central]\n calc\n ‖star (a.fst (star x)) * a.fst y‖₊ ≤ ‖a.fst (star x)‖₊ * ‖a.fst y‖₊ :=\n nnnorm_star (a.fst (star x)) ▸ nnnorm_mul_le _ _\n _ ≤ ‖a.fst‖₊ * 1 * (‖a.fst‖₊ * 1) :=\n (mul_le_mul' (a.fst.le_opNorm_of_le ((nnnorm_star x).trans_le hx))\n (a.fst.le_opNorm_of_le hy))\n _ ≤ ‖a‖₊ * ‖a‖₊ := by simp only [mul_one, nnnorm_fst, le_rfl]\n rw [← nnnorm_snd]\n simp only [mul_snd, ← sSup_closed_unit_ball_eq_nnnorm, star_snd, mul_apply]\n simp only [← @opNNNorm_mul_apply 𝕜 _ A]\n simp only [← sSup_closed_unit_ball_eq_nnnorm, mul_apply']\n refine csSup_eq_of_forall_le_of_forall_lt_exists_gt (hball.image _) ?_ fun r hr => ?_\n · rintro - ⟨x, hx, rfl⟩\n refine csSup_le (hball.image _) ?_\n rintro - ⟨y, hy, rfl⟩\n exact key x y (mem_closedBall_zero_iff.1 hx) (mem_closedBall_zero_iff.1 hy)\n · simp only [Set.mem_image, Set.mem_setOf_eq, exists_prop, exists_exists_and_eq_and]\n have hr' : NNReal.sqrt r < ‖a‖₊ := ‖a‖₊.sqrt_mul_self ▸ NNReal.sqrt_lt_sqrt.2 hr\n simp_rw [← nnnorm_fst, ← sSup_closed_unit_ball_eq_nnnorm] at hr'\n obtain ⟨_, ⟨x, hx, rfl⟩, hxr⟩ := exists_lt_of_lt_csSup (hball.image _) hr'\n have hx' : ‖x‖₊ ≤ 1 := mem_closedBall_zero_iff.1 hx\n refine ⟨star x, mem_closedBall_zero_iff.2 ((nnnorm_star x).trans_le hx'), ?_⟩\n refine lt_csSup_of_lt ?_ ⟨x, hx, rfl⟩ ?_\n · refine ⟨‖a‖₊ * ‖a‖₊, ?_⟩\n rintro - ⟨y, hy, rfl⟩\n exact key (star x) y ((nnnorm_star x).trans_le hx') (mem_closedBall_zero_iff.1 hy)\n · simpa only [a.central, star_star, CstarRing.nnnorm_star_mul_self, NNReal.sq_sqrt, ← sq]\n using pow_lt_pow_left hxr zero_le' two_ne_zero",
"start": [
675,
1
],
"end": [
721,
59
],
"kind": "commanddeclaration"
}
] |
Mathlib/Analysis/Convex/StoneSeparation.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Analysis/Convex/Combination.lean",
"Mathlib/Analysis/Convex/Join.lean"
] | [
{
"full_name": "not_disjoint_segment_convexHull_triple",
"code": "theorem not_disjoint_segment_convexHull_triple {p q u v x y z : E} (hz : z ∈ segment 𝕜 x y)\n (hu : u ∈ segment 𝕜 x p) (hv : v ∈ segment 𝕜 y q) :\n ¬Disjoint (segment 𝕜 u v) (convexHull 𝕜 {p, q, z})",
"start": [
27,
1
],
"end": [
77,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "exists_convex_convex_compl_subset",
"code": "theorem exists_convex_convex_compl_subset (hs : Convex 𝕜 s) (ht : Convex 𝕜 t) (hst : Disjoint s t) :\n ∃ C : Set E, Convex 𝕜 C ∧ Convex 𝕜 Cᶜ ∧ s ⊆ C ∧ t ⊆ Cᶜ",
"start": [
80,
1
],
"end": [
109,
29
],
"kind": "commanddeclaration"
}
] |
Mathlib/Combinatorics/SimpleGraph/Matching.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean",
"Mathlib/Combinatorics/SimpleGraph/Subgraph.lean"
] | [
{
"full_name": "SimpleGraph.Subgraph.IsMatching",
"code": "def IsMatching : Prop := ∀ ⦃v⦄, v ∈ M.verts → ∃! w, M.Adj v w",
"start": [
51,
1
],
"end": [
55,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.toEdge",
"code": "noncomputable def IsMatching.toEdge {M : Subgraph G} (h : M.IsMatching) (v : M.verts) : M.edgeSet :=\n ⟨s(v, (h v.property).choose), (h v.property).choose_spec.1⟩",
"start": [
58,
1
],
"end": [
60,
62
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.toEdge_eq_of_adj",
"code": "theorem IsMatching.toEdge_eq_of_adj {M : Subgraph G} (h : M.IsMatching) {v w : V} (hv : v ∈ M.verts)\n (hvw : M.Adj v w) : h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
"start": [
63,
1
],
"end": [
67,
57
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.toEdge.surjective",
"code": "theorem IsMatching.toEdge.surjective {M : Subgraph G} (h : M.IsMatching) :\n Function.Surjective h.toEdge",
"start": [
70,
1
],
"end": [
74,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.toEdge_eq_toEdge_of_adj",
"code": "theorem IsMatching.toEdge_eq_toEdge_of_adj {M : Subgraph G} {v w : V} (h : M.IsMatching)\n (hv : v ∈ M.verts) (hw : w ∈ M.verts) (ha : M.Adj v w) :\n h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩",
"start": [
77,
1
],
"end": [
80,
99
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsPerfectMatching",
"code": "def IsPerfectMatching : Prop := M.IsMatching ∧ M.IsSpanning",
"start": [
83,
1
],
"end": [
87,
60
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.support_eq_verts",
"code": "theorem IsMatching.support_eq_verts {M : Subgraph G} (h : M.IsMatching) : M.support = M.verts",
"start": [
90,
1
],
"end": [
93,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.isMatching_iff_forall_degree",
"code": "theorem isMatching_iff_forall_degree {M : Subgraph G} [∀ v : V, Fintype (M.neighborSet v)] :\n M.IsMatching ↔ ∀ v : V, v ∈ M.verts → M.degree v = 1",
"start": [
96,
1
],
"end": [
98,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsMatching.even_card",
"code": "theorem IsMatching.even_card {M : Subgraph G} [Fintype M.verts] (h : M.IsMatching) :\n Even M.verts.toFinset.card",
"start": [
101,
1
],
"end": [
111,
29
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.isPerfectMatching_iff",
"code": "theorem isPerfectMatching_iff : M.IsPerfectMatching ↔ ∀ v, ∃! w, M.Adj v w",
"start": [
114,
1
],
"end": [
119,
25
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.isPerfectMatching_iff_forall_degree",
"code": "theorem isPerfectMatching_iff_forall_degree {M : Subgraph G} [∀ v, Fintype (M.neighborSet v)] :\n M.IsPerfectMatching ↔ ∀ v, M.degree v = 1",
"start": [
122,
1
],
"end": [
124,
61
],
"kind": "commanddeclaration"
},
{
"full_name": "SimpleGraph.Subgraph.IsPerfectMatching.even_card",
"code": "theorem IsPerfectMatching.even_card {M : Subgraph G} [Fintype V] (h : M.IsPerfectMatching) :\n Even (Fintype.card V)",
"start": [
127,
1
],
"end": [
130,
61
],
"kind": "commanddeclaration"
}
] |
Mathlib/Algebra/Module/Bimodule.lean | [
"Mathlib/RingTheory/TensorProduct/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean"
] | [
{
"full_name": "Subbimodule.mk",
"code": "@[simps]\ndef mk (p : AddSubmonoid M) (hA : ∀ (a : A) {m : M}, m ∈ p → a • m ∈ p)\n (hB : ∀ (b : B) {m : M}, m ∈ p → b • m ∈ p) : Submodule (A ⊗[R] B) M :=\n { p with\n carrier := p\n smul_mem' := fun ab m =>\n TensorProduct.induction_on ab (fun _ => by simpa only [zero_smul] using p.zero_mem)\n (fun a b hm => by simpa only [TensorProduct.Algebra.smul_def] using hA a (hB b hm))\n fun z w hz hw hm => by simpa only [add_smul] using p.add_mem (hz hm) (hw hm) }",
"start": [
74,
1
],
"end": [
87,
87
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.smul_mem",
"code": "theorem smul_mem (p : Submodule (A ⊗[R] B) M) (a : A) {m : M} (hm : m ∈ p) : a • m ∈ p",
"start": [
90,
1
],
"end": [
92,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.smul_mem'",
"code": "theorem smul_mem' (p : Submodule (A ⊗[R] B) M) (b : B) {m : M} (hm : m ∈ p) : b • m ∈ p",
"start": [
95,
1
],
"end": [
97,
40
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.baseChange",
"code": "@[simps!]\ndef baseChange (S : Type*) [CommSemiring S] [Module S M] [Algebra S A] [Algebra S B]\n [IsScalarTower S A M] [IsScalarTower S B M] (p : Submodule (A ⊗[R] B) M) :\n Submodule (A ⊗[S] B) M :=\n mk p.toAddSubmonoid (smul_mem p) (smul_mem' p)",
"start": [
100,
1
],
"end": [
106,
49
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.toSubmodule",
"code": "@[simps]\ndef toSubmodule (p : Submodule (A ⊗[R] B) M) : Submodule A M :=\n { p with\n carrier := p\n smul_mem' := smul_mem p }",
"start": [
109,
1
],
"end": [
114,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.toSubmodule'",
"code": "@[simps]\ndef toSubmodule' (p : Submodule (A ⊗[R] B) M) : Submodule B M :=\n { p with\n carrier := p\n smul_mem' := smul_mem' p }",
"start": [
117,
1
],
"end": [
122,
31
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.toSubbimoduleInt",
"code": "@[simps!]\ndef toSubbimoduleInt (p : Submodule (R ⊗[ℕ] S) M) : Submodule (R ⊗[ℤ] S) M :=\n baseChange ℤ p",
"start": [
132,
1
],
"end": [
136,
17
],
"kind": "commanddeclaration"
},
{
"full_name": "Subbimodule.toSubbimoduleNat",
"code": "@[simps!]\ndef toSubbimoduleNat (p : Submodule (R ⊗[ℤ] S) M) : Submodule (R ⊗[ℕ] S) M :=\n baseChange ℕ p",
"start": [
139,
1
],
"end": [
143,
17
],
"kind": "commanddeclaration"
}
] |
Mathlib/Order/SuccPred/IntervalSucc.lean | [
"Mathlib/Order/SuccPred/Basic.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/Data/Set/Lattice.lean",
"Mathlib/Data/Set/Pairwise/Basic.lean"
] | [
{
"full_name": "Monotone.biUnion_Ico_Ioc_map_succ",
"code": "theorem biUnion_Ico_Ioc_map_succ [SuccOrder α] [IsSuccArchimedean α] [LinearOrder β] {f : α → β}\n (hf : Monotone f) (m n : α) : ⋃ i ∈ Ico m n, Ioc (f i) (f (succ i)) = Ioc (f m) (f n)",
"start": [
35,
1
],
"end": [
48,
74
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ioc_succ",
"code": "theorem pairwise_disjoint_on_Ioc_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ioc (f n) (f (succ n)))",
"start": [
51,
1
],
"end": [
57,
55
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ico_succ",
"code": "theorem pairwise_disjoint_on_Ico_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ico (f n) (f (succ n)))",
"start": [
60,
1
],
"end": [
66,
54
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ioo_succ",
"code": "theorem pairwise_disjoint_on_Ioo_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ioo (f n) (f (succ n)))",
"start": [
69,
1
],
"end": [
73,
100
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ioc_pred",
"code": "theorem pairwise_disjoint_on_Ioc_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ioc (f (pred n)) (f n))",
"start": [
76,
1
],
"end": [
80,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ico_pred",
"code": "theorem pairwise_disjoint_on_Ico_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ico (f (pred n)) (f n))",
"start": [
83,
1
],
"end": [
87,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "Monotone.pairwise_disjoint_on_Ioo_pred",
"code": "theorem pairwise_disjoint_on_Ioo_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :\n Pairwise (Disjoint on fun n => Ioo (f (pred n)) (f n))",
"start": [
90,
1
],
"end": [
94,
77
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ioc_succ",
"code": "theorem pairwise_disjoint_on_Ioc_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ioc (f (succ n)) (f n))",
"start": [
101,
1
],
"end": [
105,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ico_succ",
"code": "theorem pairwise_disjoint_on_Ico_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ico (f (succ n)) (f n))",
"start": [
108,
1
],
"end": [
112,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ioo_succ",
"code": "theorem pairwise_disjoint_on_Ioo_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ioo (f (succ n)) (f n))",
"start": [
115,
1
],
"end": [
119,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ioc_pred",
"code": "theorem pairwise_disjoint_on_Ioc_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ioc (f n) (f (pred n)))",
"start": [
122,
1
],
"end": [
126,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ico_pred",
"code": "theorem pairwise_disjoint_on_Ico_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ico (f n) (f (pred n)))",
"start": [
129,
1
],
"end": [
133,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "Antitone.pairwise_disjoint_on_Ioo_pred",
"code": "theorem pairwise_disjoint_on_Ioo_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :\n Pairwise (Disjoint on fun n => Ioo (f n) (f (pred n)))",
"start": [
136,
1
],
"end": [
140,
45
],
"kind": "commanddeclaration"
}
] |
Mathlib/Data/Matrix/Hadamard.lean | [
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/LinearAlgebra/Matrix/Trace.lean"
] | [
{
"full_name": "Matrix.hadamard",
"code": "def hadamard [Mul α] (A : Matrix m n α) (B : Matrix m n α) : Matrix m n α :=\n of fun i j => A i j * B i j",
"start": [
42,
1
],
"end": [
45,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_apply",
"code": "@[simp]\ntheorem hadamard_apply [Mul α] (A : Matrix m n α) (B : Matrix m n α) (i j) :\n hadamard A B i j = A i j * B i j",
"start": [
49,
1
],
"end": [
52,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_comm",
"code": "theorem hadamard_comm [CommSemigroup α] : A ⊙ B = B ⊙ A",
"start": [
62,
1
],
"end": [
63,
30
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_assoc",
"code": "theorem hadamard_assoc [Semigroup α] : A ⊙ B ⊙ C = A ⊙ (B ⊙ C)",
"start": [
67,
1
],
"end": [
68,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_add",
"code": "theorem hadamard_add [Distrib α] : A ⊙ (B + C) = A ⊙ B + A ⊙ C",
"start": [
72,
1
],
"end": [
73,
36
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.add_hadamard",
"code": "theorem add_hadamard [Distrib α] : (B + C) ⊙ A = B ⊙ A + C ⊙ A",
"start": [
76,
1
],
"end": [
77,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.smul_hadamard",
"code": "@[simp]\ntheorem smul_hadamard [Mul α] [SMul R α] [IsScalarTower R α α] (k : R) : (k • A) ⊙ B = k • A ⊙ B",
"start": [
83,
1
],
"end": [
85,
38
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_smul",
"code": "@[simp]\ntheorem hadamard_smul [Mul α] [SMul R α] [SMulCommClass R α α] (k : R) : A ⊙ (k • B) = k • A ⊙ B",
"start": [
88,
1
],
"end": [
90,
37
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_zero",
"code": "@[simp]\ntheorem hadamard_zero : A ⊙ (0 : Matrix m n α) = 0",
"start": [
99,
1
],
"end": [
101,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.zero_hadamard",
"code": "@[simp]\ntheorem zero_hadamard : (0 : Matrix m n α) ⊙ A = 0",
"start": [
104,
1
],
"end": [
106,
28
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.hadamard_one",
"code": "theorem hadamard_one : M ⊙ (1 : Matrix n n α) = diagonal fun i => M i i",
"start": [
116,
1
],
"end": [
118,
33
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.one_hadamard",
"code": "theorem one_hadamard : (1 : Matrix n n α) ⊙ M = diagonal fun i => M i i",
"start": [
121,
1
],
"end": [
123,
34
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.diagonal_hadamard_diagonal",
"code": "theorem diagonal_hadamard_diagonal (v : n → α) (w : n → α) :\n diagonal v ⊙ diagonal w = diagonal (v * w)",
"start": [
132,
1
],
"end": [
134,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.sum_hadamard_eq",
"code": "theorem sum_hadamard_eq : (∑ i : m, ∑ j : n, (A ⊙ B) i j) = trace (A * Bᵀ)",
"start": [
144,
1
],
"end": [
145,
6
],
"kind": "commanddeclaration"
},
{
"full_name": "Matrix.dotProduct_vecMul_hadamard",
"code": "theorem dotProduct_vecMul_hadamard [DecidableEq m] [DecidableEq n] (v : m → α) (w : n → α) :\n dotProduct (v ᵥ* (A ⊙ B)) w = trace (diagonal v * A * (B * diagonal w)ᵀ)",
"start": [
148,
1
],
"end": [
151,
55
],
"kind": "commanddeclaration"
}
] |
Mathlib/AlgebraicTopology/DoldKan/Equivalence.lean | [
"Mathlib/AlgebraicTopology/DoldKan/Normalized.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/AlgebraicTopology/DoldKan/EquivalencePseudoabelian.lean"
] | [
{
"full_name": "CategoryTheory.Abelian.DoldKan.N",
"code": "def N : SimplicialObject A ⥤ ChainComplex A ℕ :=\n AlgebraicTopology.normalizedMooreComplex A",
"start": [
139,
1
],
"end": [
141,
45
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Abelian.DoldKan.Γ",
"code": "def Γ : ChainComplex A ℕ ⥤ SimplicialObject A :=\n Idempotents.DoldKan.Γ",
"start": [
145,
1
],
"end": [
147,
24
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Abelian.DoldKan.comparisonN",
"code": "@[simps!]\ndef comparisonN : (N : SimplicialObject A ⥤ _) ≅ Idempotents.DoldKan.N :=\n calc\n N ≅ N ⋙ 𝟭 _ := Functor.leftUnitor N\n _ ≅ N ⋙ (toKaroubiEquivalence _).functor ⋙ (toKaroubiEquivalence _).inverse :=\n isoWhiskerLeft _ (toKaroubiEquivalence _).unitIso\n _ ≅ (N ⋙ (toKaroubiEquivalence _).functor) ⋙ (toKaroubiEquivalence _).inverse :=\n Iso.refl _\n _ ≅ N₁ ⋙ (toKaroubiEquivalence _).inverse :=\n isoWhiskerRight (N₁_iso_normalizedMooreComplex_comp_toKaroubi A).symm _\n _ ≅ Idempotents.DoldKan.N := Iso.refl _",
"start": [
150,
1
],
"end": [
162,
44
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Abelian.DoldKan.equivalence",
"code": "@[simps! functor]\ndef equivalence : SimplicialObject A ≌ ChainComplex A ℕ :=\n (Idempotents.DoldKan.equivalence (C := A)).changeFunctor comparisonN.symm",
"start": [
166,
1
],
"end": [
169,
76
],
"kind": "commanddeclaration"
},
{
"full_name": "CategoryTheory.Abelian.DoldKan.equivalence_inverse",
"code": "theorem equivalence_inverse : (equivalence : SimplicialObject A ≌ _).inverse = Γ",
"start": [
172,
1
],
"end": [
173,
6
],
"kind": "commanddeclaration"
}
] |
Mathlib/NumberTheory/Harmonic/Int.lean | [
"Mathlib/NumberTheory/Padics/PadicNumbers.lean",
".lake/packages/lean4/src/lean/Init.lean",
"Mathlib/NumberTheory/Harmonic/Defs.lean"
] | [
{
"full_name": "padicValRat_two_harmonic",
"code": "theorem padicValRat_two_harmonic (n : ℕ) : padicValRat 2 (harmonic n) = -Nat.log 2 n",
"start": [
19,
1
],
"end": [
33,
53
],
"kind": "commanddeclaration"
},
{
"full_name": "padicNorm_two_harmonic",
"code": "lemma padicNorm_two_harmonic {n : ℕ} (hn : n ≠ 0) :\n ‖(harmonic n : ℚ_[2])‖ = 2 ^ (Nat.log 2 n) := by\n rw [padicNormE.eq_padicNorm, padicNorm.eq_zpow_of_nonzero (harmonic_pos hn).ne',\n padicValRat_two_harmonic, neg_neg, zpow_natCast, Rat.cast_pow, Rat.cast_natCast, Nat.cast_ofNat]",
"start": [
35,
1
],
"end": [
39,
101
],
"kind": "lemma"
},
{
"full_name": "harmonic_not_int",
"code": "theorem harmonic_not_int {n : ℕ} (h : 2 ≤ n) : ¬ (harmonic n).isInt",
"start": [
41,
1
],
"end": [
46,
61
],
"kind": "commanddeclaration"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.