Context
stringlengths
285
157k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
18
3.69k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75...
Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
295
303
theorem coe_direction_eq_vsub_set_left {s : AffineSubspace k P} {p : P} (hp : p ∈ s) : (s.direction : Set V) = (p -ᵥ ·) '' s := by
ext v rw [SetLike.mem_coe, ← Submodule.neg_mem_iff, ← SetLike.mem_coe, coe_direction_eq_vsub_set_right hp, Set.mem_image, Set.mem_image] conv_lhs => congr ext rw [← neg_vsub_eq_vsub_rev, neg_inj]
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.MeasureTheory.Measure.MeasureSpace import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.measure.open_pos from "l...
Mathlib/MeasureTheory/Measure/OpenPos.lean
156
162
theorem _root_.Continuous.isOpenPosMeasure_map [OpensMeasurableSpace X] {Z : Type*} [TopologicalSpace Z] [MeasurableSpace Z] [BorelSpace Z] {f : X → Z} (hf : Continuous f) (hf_surj : Function.Surjective f) : (Measure.map f μ).IsOpenPosMeasure := by
refine ⟨fun U hUo hUne => ?_⟩ rw [Measure.map_apply hf.measurable hUo.measurableSet] exact (hUo.preimage hf).measure_ne_zero μ (hf_surj.nonempty_preimage.mpr hUne)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot, Yury Kudryashov, Rémy Degenne -/ import Mathlib.Order.MinMax import Mathlib.Data.Set.Subsingleton import Mathlib.Tactic.Says #align_imp...
Mathlib/Order/Interval/Set/Basic.lean
927
928
theorem Ioo_insert_right (h : a < b) : insert b (Ioo a b) = Ioc a b := by
rw [insert_eq, union_comm, Ioo_union_right h]
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
162
170
theorem cos_angle_add_mul_norm_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) : Real.cos (angle x (x + y)) * ‖x + y‖ = ‖x‖ := by
rw [cos_angle_add_of_inner_eq_zero h] by_cases hxy : ‖x + y‖ = 0 · have h' := norm_add_sq_eq_norm_sq_add_norm_sq_real h rw [hxy, zero_mul, eq_comm, add_eq_zero_iff' (mul_self_nonneg ‖x‖) (mul_self_nonneg ‖y‖), mul_self_eq_zero] at h' simp [h'.1] · exact div_mul_cancel₀ _ hxy
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Constructions import Mathlib.Topology.ContinuousOn #align_import topology.bases from "leanprover-community/mathlib"@"bcfa7268...
Mathlib/Topology/Bases.lean
991
996
theorem _root_.QuotientMap.secondCountableTopology [SecondCountableTopology X] (h' : QuotientMap π) (h : IsOpenMap π) : SecondCountableTopology Y where is_open_generated_countable := by
obtain ⟨V, V_countable, -, V_generates⟩ := exists_countable_basis X exact ⟨Set.image π '' V, V_countable.image (Set.image π), (V_generates.quotientMap h' h).eq_generateFrom⟩
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.MeasureTheory.Measure.Content import Mathlib.MeasureTheory.Group.Prod import Mathlib.Topology.Algebra.Group.Compact #align_import measure_theory.m...
Mathlib/MeasureTheory/Measure/Haar/Basic.lean
643
649
theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1 := by
haveI : LocallyCompactSpace G := K₀.locallyCompactSpace_of_group simp only [haarMeasure, coe_smul, Pi.smul_apply, smul_eq_mul] rw [← OuterRegular.measure_closure_eq_of_isCompact K₀.isCompact, Content.measure_apply _ isClosed_closure.measurableSet, ENNReal.inv_mul_cancel] · exact (haarContent_outerMeasure_c...
/- Copyright (c) 2021 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Order.Lattice #align_import algebra.order.sub.defs from "le...
Mathlib/Algebra/Order/Sub/Defs.lean
188
190
theorem add_tsub_add_le_tsub_right : a + c - (b + c) ≤ a - b := by
rw [tsub_le_iff_left, add_right_comm] exact add_le_add_right le_add_tsub c
/- Copyright (c) 2021 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Geometry.Manifold.Algebra.Structures import Mathlib.Geometry.Manifold.BumpFunction import Mathlib.Topology.MetricSpace.PartitionOfUnity import ...
Mathlib/Geometry/Manifold/PartitionOfUnity.lean
641
644
theorem exists_isSubordinate_chartAt_source : ∃ f : SmoothPartitionOfUnity M I M univ, f.IsSubordinate (fun x ↦ (chartAt H x).source) := by
apply exists_isSubordinate _ isClosed_univ _ (fun i ↦ (chartAt H _).open_source) (fun x _ ↦ ?_) exact mem_iUnion_of_mem x (mem_chart_source H x)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Thomas Browning -/ import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.SetLike.Fintype import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory...
Mathlib/GroupTheory/Sylow.lean
271
272
theorem Sylow.smul_eq_of_normal {g : G} {P : Sylow p G} [h : (P : Subgroup G).Normal] : g • P = P := by
simp only [Sylow.smul_eq_iff_mem_normalizer, normalizer_eq_top.mpr h, mem_top]
/- Copyright (c) 2022 Jiale Miao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiale Miao, Kevin Buzzard, Alexander Bentkamp -/ import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.Block #align_import analysis.inner_product_space.gram_s...
Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
308
318
theorem span_gramSchmidtNormed (f : ι → E) (s : Set ι) : span 𝕜 (gramSchmidtNormed 𝕜 f '' s) = span 𝕜 (gramSchmidt 𝕜 f '' s) := by
refine span_eq_span (Set.image_subset_iff.2 fun i hi => smul_mem _ _ <| subset_span <| mem_image_of_mem _ hi) (Set.image_subset_iff.2 fun i hi => span_mono (image_subset _ <| singleton_subset_set_iff.2 hi) ?_) simp only [coe_singleton, Set.image_singleton] by_cases h : gramSchmidt 𝕜 f i = 0 · si...
/- Copyright (c) 2015 Nathaniel Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathaniel Thomas, Jeremy Avigad, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.GroupTheory.GroupAction.SubMulAction #align_impor...
Mathlib/Algebra/Module/Submodule/Basic.lean
462
463
theorem sub_mem_iff_right (hx : x ∈ p) : x - y ∈ p ↔ y ∈ p := by
rw [sub_eq_add_neg, p.add_mem_iff_right hx, p.neg_mem_iff]
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.InnerProductSpace.Sy...
Mathlib/Analysis/InnerProductSpace/Projection.lean
1,138
1,142
theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K : Submodule 𝕜 E) : finrank 𝕜 K + finrank 𝕜 Kᗮ = finrank 𝕜 E := by
convert Submodule.finrank_add_inf_finrank_orthogonal (le_top : K ≤ ⊤) using 1 · rw [inf_top_eq] · simp
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou -/ import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a...
Mathlib/MeasureTheory/Function/L1Space.lean
968
974
theorem integrable_withDensity_iff_integrable_smul' {f : α → ℝ≥0∞} (hf : Measurable f) (hflt : ∀ᵐ x ∂μ, f x < ∞) {g : α → E} : Integrable g (μ.withDensity f) ↔ Integrable (fun x => (f x).toReal • g x) μ := by
rw [← withDensity_congr_ae (coe_toNNReal_ae_eq hflt), integrable_withDensity_iff_integrable_smul] · simp_rw [NNReal.smul_def, ENNReal.toReal] · exact hf.ennreal_toNNReal
/- Copyright (c) 2017 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Scott Morrison, Mario Carneiro, Andrew Yang -/ import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.CategoryTheory.Filtered.Basic #align_import topology...
Mathlib/Topology/Category/TopCat/Limits/Cofiltered.lean
43
122
theorem isTopologicalBasis_cofiltered_limit (T : ∀ j, Set (Set (F.obj j))) (hT : ∀ j, IsTopologicalBasis (T j)) (univ : ∀ i : J, Set.univ ∈ T i) (inter : ∀ (i) (U1 U2 : Set (F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i) (compat : ∀ (i j : J) (f : i ⟶ j) (V : Set (F.obj j)) (_hV : V ∈ T j), F.map f ⁻¹' V ∈...
classical -- The limit cone for `F` whose topology is defined as an infimum. let D := limitConeInfi F -- The isomorphism between the cone point of `C` and the cone point of `D`. let E : C.pt ≅ D.pt := hC.conePointUniqueUpToIso (limitConeInfiIsLimit _) have hE : Inducing E.hom := (TopCat.homeoOfIso E).induc...
/- Copyright (c) 2021 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca, Johan Commelin, Scott Morrison -/ import Mathlib.Analysis.Normed.Group.SemiNormedGroupCat import Mathlib.Analysis.Normed.Group.Quotient import Mathlib.CategoryTheory.L...
Mathlib/Analysis/Normed/Group/SemiNormedGroupCat/Kernels.lean
387
389
theorem explicitCokernelIso_inv_π {X Y : SemiNormedGroupCat.{u}} (f : X ⟶ Y) : cokernel.π f ≫ (explicitCokernelIso f).inv = explicitCokernelπ f := by
simp [explicitCokernelπ, explicitCokernelIso]
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne -/ import Mathlib.Analysis.Complex.Asymptotics import Mathlib.Analysis.SpecificLimits.Normed #align_import analysis.special_...
Mathlib/Analysis/SpecialFunctions/Exp.lean
364
365
theorem comap_exp_nhdsWithin_Ioi_zero : comap exp (𝓝[>] 0) = atBot := by
rw [← map_exp_atBot, comap_map exp_injective]
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jeremy Avigad -/ import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Set.Finite #align_import order.filter.basic from "leanprover-community/mathlib"@"d4f691b9e5...
Mathlib/Order/Filter/Basic.lean
2,054
2,055
theorem mem_comap_iff_compl : s ∈ comap f l ↔ (f '' sᶜ)ᶜ ∈ l := by
simp only [mem_comap'', kernImage_eq_compl]
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Yaël Dillies -/ import Mathlib.Analysis.SpecialFunctions.Exponential #align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
68
71
theorem Complex.hasSum_cos (z : ℂ) : HasSum (fun n : ℕ => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) (Complex.cos z) := by
convert Complex.hasSum_cos' z using 1 simp_rw [mul_pow, pow_mul, Complex.I_sq, mul_comm]
/- Copyright (c) 2022 Floris van Doorn, Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Heather Macbeth -/ import Mathlib.Geometry.Manifold.ContMDiff.Atlas import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear import Mathlib.To...
Mathlib/Geometry/Manifold/VectorBundle/Basic.lean
208
211
theorem contMDiffAt_section (s : ∀ x, E x) (x₀ : B) : ContMDiffAt IB (IB.prod 𝓘(𝕜, F)) n (fun x => TotalSpace.mk' F x (s x)) x₀ ↔ ContMDiffAt IB 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E x₀ ⟨x, s x⟩).2) x₀ := by
simp_rw [contMDiffAt_totalSpace, and_iff_right_iff_imp]; intro; exact contMDiffAt_id
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Data.Finset.Attr import Mathlib.Data.Multiset.FinsetOps import Mathlib.Logic.Equiv.Set import Math...
Mathlib/Data/Finset/Basic.lean
3,191
3,193
theorem toFinset_filter (s : Multiset α) (p : α → Prop) [DecidablePred p] : Multiset.toFinset (s.filter p) = s.toFinset.filter p := by
ext; simp
/- Copyright (c) 2022 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.AlgebraicTopology.DoldKan.Projections import Mathlib.CategoryTheory.Idempotents.FunctorCategories import Mathlib.CategoryTheory.Idempotents.FunctorExtension #al...
Mathlib/AlgebraicTopology/DoldKan/PInfty.lean
205
238
theorem karoubi_PInfty_f {Y : Karoubi (SimplicialObject C)} (n : ℕ) : ((PInfty : K[(karoubiFunctorCategoryEmbedding _ _).obj Y] ⟶ _).f n).f = Y.p.app (op [n]) ≫ (PInfty : K[Y.X] ⟶ _).f n := by
-- We introduce P_infty endomorphisms P₁, P₂, P₃, P₄ on various objects Y₁, Y₂, Y₃, Y₄. let Y₁ := (karoubiFunctorCategoryEmbedding _ _).obj Y let Y₂ := Y.X let Y₃ := ((whiskering _ _).obj (toKaroubi C)).obj Y.X let Y₄ := (karoubiFunctorCategoryEmbedding _ _).obj ((toKaroubi _).obj Y.X) let P₁ : K[Y₁] ⟶ _ :...
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Geometry.Euclidean.Sphere.Basic import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional import Mathlib.Tactic.DeriveFintype #align_import geometry.eucl...
Mathlib/Geometry/Euclidean/Circumcenter.lean
435
445
theorem dist_sq_eq_dist_orthogonalProjection_sq_add_dist_orthogonalProjection_sq {n : ℕ} (s : Simplex ℝ P n) {p1 : P} (p2 : P) (hp1 : p1 ∈ affineSpan ℝ (Set.range s.points)) : dist p1 p2 * dist p1 p2 = dist p1 (s.orthogonalProjectionSpan p2) * dist p1 (s.orthogonalProjectionSpan p2) + dist p2 (s.o...
rw [PseudoMetricSpace.dist_comm p2 _, dist_eq_norm_vsub V p1 _, dist_eq_norm_vsub V p1 _, dist_eq_norm_vsub V _ p2, ← vsub_add_vsub_cancel p1 (s.orthogonalProjectionSpan p2) p2, norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero] exact Submodule.inner_right_of_mem_orthogonal (vsub_orthogonalProj...
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Logic.Unique #align_import algebra.group_with_zero.basic from "leanprov...
Mathlib/Algebra/GroupWithZero/Basic.lean
422
424
theorem div_div_self (a : G₀) : a / (a / a) = a := by
rw [div_div_eq_mul_div] exact mul_self_div_self a
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Function.ConvergenceInMeasure import Mathlib.MeasureTheory.Function.L1Space #align_import measure_theory.function.uniform_integrable from "lea...
Mathlib/MeasureTheory/Function/UniformIntegrable.lean
389
399
theorem Memℒp.snorm_indicator_le (hp_one : 1 ≤ p) (hp_top : p ≠ ∞) (hf : Memℒp f p μ) {ε : ℝ} (hε : 0 < ε) : ∃ (δ : ℝ) (hδ : 0 < δ), ∀ s, MeasurableSet s → μ s ≤ ENNReal.ofReal δ → snorm (s.indicator f) p μ ≤ ENNReal.ofReal ε := by
have hℒp := hf obtain ⟨⟨f', hf', heq⟩, _⟩ := hf obtain ⟨δ, hδpos, hδ⟩ := (hℒp.ae_eq heq).snorm_indicator_le_of_meas hp_one hp_top hf' hε refine ⟨δ, hδpos, fun s hs hμs => ?_⟩ convert hδ s hs hμs using 1 rw [snorm_indicator_eq_snorm_restrict hs, snorm_indicator_eq_snorm_restrict hs] exact snorm_congr_ae h...
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker -/ import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Mono...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
960
992
theorem coeff_mul_degree_add_degree (p q : R[X]) : coeff (p * q) (natDegree p + natDegree q) = leadingCoeff p * leadingCoeff q := calc coeff (p * q) (natDegree p + natDegree q) = ∑ x ∈ antidiagonal (natDegree p + natDegree q), coeff p x.1 * coeff q x.2 := coeff_mul _ _ _ _ = coeff p (natDegr...
refine Finset.sum_eq_single (natDegree p, natDegree q) ?_ ?_ · rintro ⟨i, j⟩ h₁ h₂ rw [mem_antidiagonal] at h₁ by_cases H : natDegree p < i · rw [coeff_eq_zero_of_degree_lt (lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 H)), zero_mul] · r...
/- Copyright (c) 2021 David Wärn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Wärn, Joachim Breitner -/ import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.GroupTheory.Congruence.Basic import Mathlib.GroupTh...
Mathlib/GroupTheory/CoprodI.lean
203
207
theorem mrange_eq_iSup {N} [Monoid N] (f : ∀ i, M i →* N) : MonoidHom.mrange (lift f) = ⨆ i, MonoidHom.mrange (f i) := by
rw [lift, Equiv.coe_fn_mk, Con.lift_range, FreeMonoid.mrange_lift, range_sigma_eq_iUnion_range, Submonoid.closure_iUnion] simp only [MonoidHom.mclosure_range]
/- Copyright (c) 2019 Reid Barton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" /-! # Neig...
Mathlib/Topology/ContinuousOn.lean
299
300
theorem nhdsWithin_compl_singleton_sup_pure (a : α) : 𝓝[≠] a ⊔ pure a = 𝓝 a := by
rw [← nhdsWithin_singleton, ← nhdsWithin_union, compl_union_self, nhdsWithin_univ]
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic #align_import linear_algebra.exterior_algebra.of_alternating from "lea...
Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean
103
115
theorem liftAlternating_apply_ιMulti {n : ℕ} (f : ∀ i, M [⋀^Fin i]→ₗ[R] N) (v : Fin n → M) : liftAlternating (R := R) (M := M) (N := N) f (ιMulti R n v) = f n v := by
rw [ιMulti_apply] -- Porting note: `v` is generalized automatically so it was removed from the next line induction' n with n ih generalizing f · -- Porting note: Lean does not automatically synthesize the instance -- `[Subsingleton (Fin 0 → M)]` which is needed for `Subsingleton.elim 0 v` on line 114. ...
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.MeasureTheory.Measure.Content import Mathlib.MeasureTheory.Group.Prod import Mathlib.Topology.Algebra.Group.Compact #align_import measure_theory.m...
Mathlib/MeasureTheory/Measure/Haar/Basic.lean
788
790
theorem regular_of_isMulLeftInvariant {μ : Measure G} [SigmaFinite μ] [IsMulLeftInvariant μ] {K : Set G} (hK : IsCompact K) (h2K : (interior K).Nonempty) (hμK : μ K ≠ ∞) : Regular μ := by
rw [haarMeasure_unique μ ⟨⟨K, hK⟩, h2K⟩]; exact Regular.smul hμK
/- Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning, Patrick Lutz -/ import Mathlib.Algebra.Algebra.Subalgebra.Directed import Mathlib.FieldTheory.IntermediateField import Mathlib.FieldTheory.Separable imp...
Mathlib/FieldTheory/Adjoin.lean
1,224
1,233
theorem isAlgebraic_iSup {ι : Type*} {t : ι → IntermediateField K L} (h : ∀ i, Algebra.IsAlgebraic K (t i)) : Algebra.IsAlgebraic K (⨆ i, t i : IntermediateField K L) := by
constructor rintro ⟨x, hx⟩ obtain ⟨s, hx⟩ := exists_finset_of_mem_supr' hx rw [isAlgebraic_iff, Subtype.coe_mk, ← Subtype.coe_mk (p := (· ∈ _)) x hx, ← isAlgebraic_iff] haveI : ∀ i : Σ i, t i, FiniteDimensional K K⟮(i.2 : L)⟯ := fun ⟨i, x⟩ ↦ adjoin.finiteDimensional (isIntegral_iff.1 (Algebra.IsIntegral....
/- Copyright (c) 2020 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann -/ import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence import Mathlib.Algebra.ContinuedFractions.TerminatedStable import Mathlib.Tactic.FieldSimp import ...
Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
263
328
theorem succ_nth_convergent_eq_squashGCF_nth_convergent [Field K] (nth_part_denom_ne_zero : ∀ {b : K}, g.partialDenominators.get? n = some b → b ≠ 0) : g.convergents (n + 1) = (squashGCF g n).convergents n := by
cases' Decidable.em (g.TerminatedAt n) with terminated_at_n not_terminated_at_n · have : squashGCF g n = g := squashGCF_eq_self_of_terminated terminated_at_n simp only [this, convergents_stable_of_terminated n.le_succ terminated_at_n] · obtain ⟨⟨a, b⟩, s_nth_eq⟩ : ∃ gp_n, g.s.get? n = some gp_n := Opti...
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.ConeCategory #align_import c...
Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
357
360
theorem app_right_eq_ι_comp_snd (b) : K.π.app (WalkingMulticospan.right b) = K.ι (I.sndTo b) ≫ I.snd b := by
rw [← K.w (WalkingMulticospan.Hom.snd b)] rfl
/- Copyright (c) 2019 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@...
Mathlib/Data/List/Intervals.lean
80
82
theorem map_sub (n m k : ℕ) (h₁ : k ≤ n) : ((Ico n m).map fun x => x - k) = Ico (n - k) (m - k) := by
rw [Ico, Ico, Nat.sub_sub_sub_cancel_right h₁, map_sub_range' _ _ _ h₁]
/- Copyright (c) 2021 Stuart Presnell. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stuart Presnell -/ import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Ma...
Mathlib/Data/Nat/Factorization/Basic.lean
139
140
theorem factorization_eq_zero_of_non_prime (n : ℕ) {p : ℕ} (hp : ¬p.Prime) : n.factorization p = 0 := by
simp [factorization_eq_zero_iff, hp]
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Kenny Lau -/ import Mathlib.Data.Finsupp.ToDFinsupp import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent #align_import linear_algebra.dfinsup...
Mathlib/LinearAlgebra/DFinsupp.lean
274
276
theorem coprodMap_apply_single (f : ∀ i : ι, M i →ₗ[R] N) (i : ι) (x : M i) : coprodMap f (single i x) = f i x := by
simp [coprodMap]
/- Copyright (c) 2020 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann -/ import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence import Mathlib.Algebra.ContinuedFractions.TerminatedStable import Mathlib.Tactic.FieldSimp import ...
Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
224
232
theorem succ_nth_convergent'_eq_squashGCF_nth_convergent' : g.convergents' (n + 1) = (squashGCF g n).convergents' n := by
cases n with | zero => cases g_s_head_eq : g.s.get? 0 <;> simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head] | succ => simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents', squashGCF]
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.LinearAlgebra.AffineSpace.Independent import Mathlib.LinearAlgebra.Basis #align_import linear_algebra.affine_space.basis from "leanprover-community/mathlib"...
Mathlib/LinearAlgebra/AffineSpace/Basis.lean
213
221
theorem affineCombination_coord_eq_self [Fintype ι] (q : P) : (Finset.univ.affineCombination k b fun i => b.coord i q) = q := by
have hq : q ∈ affineSpan k (range b) := by rw [b.tot] exact AffineSubspace.mem_top k V q obtain ⟨w, hw, rfl⟩ := eq_affineCombination_of_mem_affineSpan_of_fintype hq congr ext i exact b.coord_apply_combination_of_mem (Finset.mem_univ i) hw
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker, Johan Commelin -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib...
Mathlib/Algebra/Polynomial/RingDivision.lean
578
580
theorem degree_eq_degree_of_associated (h : Associated p q) : degree p = degree q := by
let ⟨u, hu⟩ := h simp [hu.symm]
/- Copyright (c) 2021 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.preadditive from "lea...
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
63
64
theorem add_tensor {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z) : (f + g) ⊗ h = f ⊗ h + g ⊗ h := by
simp [tensorHom_def]
/- Copyright (c) 2022 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" /-...
Mathlib/Topology/MetricSpace/Infsep.lean
50
52
theorem le_einfsep_iff {d} : d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y := by
simp_rw [einfsep, le_iInf_iff]
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Control.Traversable.Equiv import Mathlib.Control.Traversable.Instances import Batteries.Data.LazyList import Mathlib.Lean.Thunk #align_import data.lazy_list...
Mathlib/Data/LazyList/Basic.lean
232
233
theorem mem_nil {α} (x : α) : x ∈ @LazyList.nil α ↔ False := by
simp [Membership.mem, LazyList.Mem]
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.DirectSum.Basic import Mathlib.LinearAlgebra.DFinsupp import Mathlib.LinearAlgebra.Basis #align_import algebra.direct_sum.module from "leanprover-commun...
Mathlib/Algebra/DirectSum/Module.lean
326
329
theorem IsInternal.ofBijective_coeLinearMap_of_ne (h : IsInternal A) {i j : ι} (hij : i ≠ j) (x : A i) : (LinearEquiv.ofBijective (coeLinearMap A) h).symm x j = 0 := by
rw [← coeLinearMap_of, LinearEquiv.ofBijective_symm_apply_apply, of_eq_of_ne _ i j _ hij]
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Jireh Loreaux -/ import Mathlib.Algebra.Group.Commute.Units import Mathlib.Algebra.Group.Invertible.Basic import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Data...
Mathlib/Algebra/Group/Center.lean
228
231
theorem div_mem_center [Group M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) : a / b ∈ Set.center M := by
rw [div_eq_mul_inv] exact mul_mem_center ha (inv_mem_center hb)
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Yury Kudryashov -/ import Mathlib.Algebra.Algebra.Hom #align_import algebra.algebra.equiv from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" /-! # I...
Mathlib/Algebra/Algebra/Equiv.lean
221
222
theorem map_smul (r : R) (x : A₁) : e (r • x) = r • e x := by
simp only [Algebra.smul_def, map_mul, commutes]
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Algebra.Bilinear import Mathlib.Algebra.Algebra.Equiv import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import...
Mathlib/Algebra/Algebra/Operations.lean
129
133
theorem map_op_one : map (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) (1 : Submodule R A) = 1 := by
ext x induction x using MulOpposite.rec' simp
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Simon Hudon, Mario Carneiro -/ import Mathlib.Init.Data.Int.Basic import Mathlib.Init.ZeroOne import Mathlib.Tactic.Lemma import Mathlib.Tactic.TypeSta...
Mathlib/Algebra/Group/Defs.lean
1,250
1,251
theorem inv_mul_cancel_left (a b : G) : a⁻¹ * (a * b) = b := by
rw [← mul_assoc, mul_left_inv, one_mul]
/- Copyright (c) 2023 Sophie Morel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sophie Morel -/ import Mathlib.Analysis.Analytic.Basic /-! We specialize the theory fo analytic functions to the case of functions that admit a development given by a *finite* formal mu...
Mathlib/Analysis/Analytic/CPolynomial.lean
199
202
theorem HasFiniteFPowerSeriesAt.sub (hf : HasFiniteFPowerSeriesAt f pf x n) (hg : HasFiniteFPowerSeriesAt g pg x m) : HasFiniteFPowerSeriesAt (f - g) (pf - pg) x (max n m) := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.MeasurableIntegral #align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7c...
Mathlib/Probability/Kernel/Composition.lean
285
296
theorem ae_kernel_lt_top (a : α) (h2s : (κ ⊗ₖ η) a s ≠ ∞) : ∀ᵐ b ∂κ a, η (a, b) (Prod.mk b ⁻¹' s) < ∞ := by
let t := toMeasurable ((κ ⊗ₖ η) a) s have : ∀ b : β, η (a, b) (Prod.mk b ⁻¹' s) ≤ η (a, b) (Prod.mk b ⁻¹' t) := fun b => measure_mono (Set.preimage_mono (subset_toMeasurable _ _)) have ht : MeasurableSet t := measurableSet_toMeasurable _ _ have h2t : (κ ⊗ₖ η) a t ≠ ∞ := by rwa [measure_toMeasurable] have...
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Geometry.Euclidean.Sphere.Basic #align_import geometry.euclidean.sphere.second_inter from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6d...
Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
62
63
theorem Sphere.secondInter_zero (s : Sphere P) (p : P) : s.secondInter p (0 : V) = p := by
simp [Sphere.secondInter]
/- Copyright (c) 2018 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Mario Carneiro, Scott Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.Limits.IsLimit import Mathlib.CategoryTheory.Category.ULift import Mathlib.CategoryTheory...
Mathlib/CategoryTheory/Limits/HasLimits.lean
449
451
theorem limit.post_π (j : J) : limit.post F G ≫ limit.π (F ⋙ G) j = G.map (limit.π F j) := by
erw [IsLimit.fac] rfl
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Batteries.Data.RBMap.Basic import Batteries.Tactic.SeqFocus /-! # Lemmas for Red-black trees The main theorem in this file is `WF_def`, which shows that the ...
.lake/packages/batteries/Batteries/Data/RBMap/WF.lean
262
266
theorem Balanced.insert {t : RBNode α} (h : t.Balanced c n) : ∃ c' n', (insert cmp t v).Balanced c' n' := by
unfold insert; match ins cmp v t, h.ins cmp v with | _, .balanced h => split <;> [exact ⟨_, h.setBlack⟩; exact ⟨_, _, h⟩] | _, .redred _ ha hb => have .node red .. := t; exact ⟨_, _, .black ha hb⟩
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.MFDeriv.Defs #align_import geometry.manifold.mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f6856...
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
698
701
theorem HasMFDerivAt.comp (hg : HasMFDerivAt I' I'' g (f x) g') (hf : HasMFDerivAt I I' f x f') : HasMFDerivAt I I'' (g ∘ f) x (g'.comp f') := by
rw [← hasMFDerivWithinAt_univ] at * exact HasMFDerivWithinAt.comp x (hg.mono (subset_univ _)) hf subset_preimage_univ
/- Copyright (c) 2020 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov, Patrick Massot -/ import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-co...
Mathlib/Order/Interval/Set/ProjIcc.lean
105
106
theorem projIcc_eq_left (h : a < b) : projIcc a b h.le x = ⟨a, left_mem_Icc.mpr h.le⟩ ↔ x ≤ a := by
simp [projIcc, Subtype.ext_iff, h.not_le]
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin -/ import Mathlib.Data.Matrix.Basic #align_import data.matrix.block from "leanprover-community/mathlib"@"c060baa79af5ca...
Mathlib/Data/Matrix/Block.lean
97
100
theorem fromBlocks_toBlocks (M : Matrix (Sum n o) (Sum l m) α) : fromBlocks M.toBlocks₁₁ M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocks₂₂ = M := by
ext i j rcases i with ⟨⟩ <;> rcases j with ⟨⟩ <;> rfl
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Algebra.Operations import Mathlib.Data.Fintype.Lattice import Mathlib.RingTheory.Coprime.Lemmas #align_import ring_theory.ideal.operations from "leanpro...
Mathlib/RingTheory/Ideal/Operations.lean
537
545
theorem span_singleton_mul_le_iff {x : R} {I J : Ideal R} : span {x} * I ≤ J ↔ ∀ z ∈ I, x * z ∈ J := by
simp only [mul_le, mem_span_singleton_mul, mem_span_singleton] constructor · intro h zI hzI exact h x (dvd_refl x) zI hzI · rintro h _ ⟨z, rfl⟩ zI hzI rw [mul_comm x z, mul_assoc] exact J.mul_mem_left _ (h zI hzI)
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.Nat.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.List.Defs im...
Mathlib/Data/List/Basic.lean
1,204
1,209
theorem indexOf_append_of_not_mem {a : α} (h : a ∉ l₁) : indexOf a (l₁ ++ l₂) = l₁.length + indexOf a l₂ := by
induction' l₁ with d₁ t₁ ih · rw [List.nil_append, List.length, Nat.zero_add] rw [List.cons_append, indexOf_cons_ne _ (ne_of_not_mem_cons h).symm, List.length, ih (not_mem_of_not_mem_cons h), Nat.succ_add]
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Yury G. Kudryashov, Patrick Massot -/ import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Math...
Mathlib/Analysis/SpecificLimits/Basic.lean
208
211
theorem le_geom {u : ℕ → ℝ} {c : ℝ} (hc : 0 ≤ c) (n : ℕ) (h : ∀ k < n, u (k + 1) ≤ c * u k) : u n ≤ c ^ n * u 0 := by
apply (monotone_mul_left_of_nonneg hc).seq_le_seq n _ h _ <;> simp [_root_.pow_succ', mul_assoc, le_refl]
/- Copyright (c) 2020 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.Data.Finset.Basic import Mathlib.Data.Set.Lattice #align_import data.set.constructions from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c4944...
Mathlib/Data/Set/Constructions.lean
54
63
theorem finiteInter_mem (cond : FiniteInter S) (F : Finset (Set α)) : ↑F ⊆ S → ⋂₀ (↑F : Set (Set α)) ∈ S := by
classical refine Finset.induction_on F (fun _ => ?_) ?_ · simp [cond.univ_mem] · intro a s _ h1 h2 suffices a ∩ ⋂₀ ↑s ∈ S by simpa exact cond.inter_mem (h2 (Finset.mem_insert_self a s)) (h1 fun x hx => h2 <| Finset.mem_insert_of_mem hx)
/- Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning, Patrick Lutz -/ import Mathlib.Algebra.Algebra.Subalgebra.Directed import Mathlib.FieldTheory.IntermediateField import Mathlib.FieldTheory.Separable imp...
Mathlib/FieldTheory/Adjoin.lean
1,165
1,189
theorem adjoin_minpoly_coeff_of_exists_primitive_element [FiniteDimensional F E] (hprim : adjoin F {α} = ⊤) (K : IntermediateField F E) : adjoin F ((minpoly K α).map (algebraMap K E)).coeffs = K := by
set g := (minpoly K α).map (algebraMap K E) set K' : IntermediateField F E := adjoin F g.coeffs have hsub : K' ≤ K := by refine adjoin_le_iff.mpr fun x ↦ ?_ rw [Finset.mem_coe, mem_coeffs_iff] rintro ⟨n, -, rfl⟩ rw [coeff_map] apply Subtype.mem have dvd_g : minpoly K' α ∣ g.toSubring K'.toS...
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot -/ import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c73...
Mathlib/Topology/Maps.lean
499
503
theorem Inducing.isClosedMap (hf : Inducing f) (h : IsClosed (range f)) : IsClosedMap f := by
intro s hs rcases hf.isClosed_iff.1 hs with ⟨t, ht, rfl⟩ rw [image_preimage_eq_inter_range] exact ht.inter h
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho import Mathlib.LinearAlgebra.Orientation #align_import analysis.inner_product_space.orientati...
Mathlib/Analysis/InnerProductSpace/Orientation.lean
315
328
theorem volumeForm_map {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] [Fact (finrank ℝ F = n)] (φ : E ≃ₗᵢ[ℝ] F) (x : Fin n → F) : (Orientation.map (Fin n) φ.toLinearEquiv o).volumeForm x = o.volumeForm (φ.symm ∘ x) := by
cases' n with n · refine o.eq_or_eq_neg_of_isEmpty.elim ?_ ?_ <;> rintro rfl <;> simp let e : OrthonormalBasis (Fin n.succ) ℝ E := o.finOrthonormalBasis n.succ_pos Fact.out have he : e.toBasis.orientation = o := o.finOrthonormalBasis_orientation n.succ_pos Fact.out have heφ : (e.map φ).toBasis.orientatio...
/- Copyright (c) 2020 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import comp...
Mathlib/Computability/TMToPartrec.lean
146
146
theorem tail_eval : tail.eval = fun v => pure v.tail := by
simp [eval]
/- Copyright (c) 2021 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.CategoryTheory.Monoidal.Free.Basic import Mathlib.CategoryTheory.Groupoid import Mathlib.CategoryTheory.DiscreteCategory #align_import category_theory.m...
Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean
271
283
theorem normalizeObj_congr (n : NormalMonoidalObject C) {X Y : F C} (f : X ⟶ Y) : normalizeObj X n = normalizeObj Y n := by
rcases f with ⟨f'⟩ apply @congr_fun _ _ fun n => normalizeObj X n clear n f induction f' with | comp _ _ _ _ => apply Eq.trans <;> assumption | whiskerLeft _ _ ih => funext; apply congr_fun ih | whiskerRight _ _ ih => funext; apply congr_arg₂ _ rfl (congr_fun ih _) | @tensor W X Y Z _ _ ih₁ ih₂ => ...
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.NumberTheory.LegendreSymbol.AddCharacter import Mathlib.NumberTheory.LegendreSymbol.ZModChar import Mathlib.Algebra.CharP.CharAndCard #align_import numb...
Mathlib/NumberTheory/GaussSum.lean
171
178
theorem MulChar.IsQuadratic.gaussSum_frob_iter (n : ℕ) (hp : IsUnit (p : R)) {χ : MulChar R R'} (hχ : IsQuadratic χ) (ψ : AddChar R R') : gaussSum χ ψ ^ p ^ n = χ ((p : R) ^ n) * gaussSum χ ψ := by
induction' n with n ih · rw [pow_zero, pow_one, pow_zero, MulChar.map_one, one_mul] · rw [pow_succ, pow_mul, ih, mul_pow, hχ.gaussSum_frob _ hp, ← mul_assoc, pow_succ, map_mul, ← pow_apply' χ fp.1.ne_zero ((p : R) ^ n), hχ.pow_char p]
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ import Mathlib.Algebra.Category.GroupCat.EquivalenceGroupAddGroup import Mathlib.GroupTheory.QuotientGroup #align_import algebra.category.Group.epi_mono from "leanprover...
Mathlib/Algebra/Category/GroupCat/EpiMono.lean
320
329
theorem g_ne_h (x : B) (hx : x ∉ f.range) : g ≠ h := by
intro r replace r := DFunLike.congr_fun (DFunLike.congr_fun r x) (fromCoset ⟨f.range, ⟨1, one_leftCoset _⟩⟩) change _ = ((τ).symm.trans (g x)).trans τ _ at r rw [g_apply_fromCoset, MonoidHom.coe_mk] at r simp only [MonoidHom.coe_range, Subtype.coe_mk, Equiv.symm_swap, Equiv.toFun_as_coe, Equiv.coe_tr...
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Martingale.OptionalStopping import Mathlib.Probability.Martingale.Centering #align_import prob...
Mathlib/Probability/Martingale/BorelCantelli.lean
235
260
theorem Martingale.bddAbove_range_iff_bddBelow_range [IsFiniteMeasure μ] (hf : Martingale f ℱ μ) (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) : ∀ᵐ ω ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω) := by
have hbdd' : ∀ᵐ ω ∂μ, ∀ i, |(-f) (i + 1) ω - (-f) i ω| ≤ R := by filter_upwards [hbdd] with ω hω i erw [← abs_neg, neg_sub, sub_neg_eq_add, neg_add_eq_sub] exact hω i have hup := hf.submartingale.bddAbove_iff_exists_tendsto hbdd have hdown := hf.neg.submartingale.bddAbove_iff_exists_tendsto hbdd' f...
/- Copyright (c) 2020 Pim Spelier, Daan van Gent. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Pim Spelier, Daan van Gent -/ import Mathlib.Data.Fintype.Basic import Mathlib.Data.Num.Lemmas import Mathlib.Data.Option.Basic import Mathlib.SetTheory.Cardinal.Basic #al...
Mathlib/Computability/Encoding.lean
152
155
theorem decode_encodeNat : ∀ n, decodeNat (encodeNat n) = n := by
intro n conv_rhs => rw [← Num.to_of_nat n] exact congr_arg ((↑) : Num → ℕ) (decode_encodeNum n)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Data.Bool.Set import Mathlib.Data.Nat.Set import Mathlib.Data.Set.Prod import Mathlib.Data.ULift import Mathlib.Order.Bounds.Basic import Mathlib.Order...
Mathlib/Order/CompleteLattice.lean
1,356
1,358
theorem OrderIso.map_sSup_eq_sSup_symm_preimage [CompleteLattice β] (f : α ≃o β) (s : Set α) : f (sSup s) = sSup (f.symm ⁻¹' s) := by
rw [map_sSup, ← sSup_image, f.image_eq_preimage]
/- Copyright (c) 2018 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Markus Himmel -/ import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "lean...
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
929
932
theorem equalizer.isoSourceOfSelf_inv : (equalizer.isoSourceOfSelf f).inv = equalizer.lift (𝟙 X) (by simp) := by
ext simp [equalizer.isoSourceOfSelf]
/- Copyright (c) 2019 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Yaël Dillies -/ import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a...
Mathlib/Order/Interval/Finset/Basic.lean
88
89
theorem Ioc_eq_empty_iff : Ioc a b = ∅ ↔ ¬a < b := by
rw [← coe_eq_empty, coe_Ioc, Set.Ioc_eq_empty_iff]
/- Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.SetTheory.Ordinal.Arithmetic import Mathlib.Tactic.Abel #align_import set_theory.ordinal.natural_ops from "leanprover-communit...
Mathlib/SetTheory/Ordinal/NaturalOps.lean
513
514
theorem nmul_def (a b : Ordinal) : a ⨳ b = sInf {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} := by
rw [nmul]
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Data.Set.Pointwise.Interval import Mathlib.LinearAlgebra.AffineSpace.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import ...
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
677
685
theorem image_uIcc {k : Type*} [LinearOrderedField k] (f : k →ᵃ[k] k) (a b : k) : f '' Set.uIcc a b = Set.uIcc (f a) (f b) := by
have : ⇑f = (fun x => x + f 0) ∘ fun x => x * (f 1 - f 0) := by ext x change f x = x • (f 1 -ᵥ f 0) +ᵥ f 0 rw [← f.linearMap_vsub, ← f.linear.map_smul, ← f.map_vadd] simp only [vsub_eq_sub, add_zero, mul_one, vadd_eq_add, sub_zero, smul_eq_mul] rw [this, Set.image_comp] simp only [Set.image_add_c...
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov, Eric Wieser -/ import Mathlib.Algebra.Algebra.Prod import Mathlib.LinearAlgebra.Basic import Mathlib.LinearAlgebra.Span ...
Mathlib/LinearAlgebra/Prod.lean
564
564
theorem comap_snd : q.comap (snd R M M₂) = prod ⊤ q := by
ext ⟨x, y⟩; simp
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Data.Set.Pointwise.Interval import Mathlib.LinearAlgebra.AffineSpace.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import ...
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
901
903
theorem homothety_zero (c : P1) : homothety c (0 : k) = const k P1 c := by
ext p simp [homothety_apply]
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Compactness.SigmaCompact import Mathlib.Topology.Connected.TotallyDisconnected import Mathlib.Topology.Inseparable #align_imp...
Mathlib/Topology/Separation.lean
2,530
2,540
theorem compact_t2_tot_disc_iff_tot_sep : TotallyDisconnectedSpace X ↔ TotallySeparatedSpace X := by
refine ⟨fun h => ⟨fun x _ y _ => ?_⟩, @TotallySeparatedSpace.totallyDisconnectedSpace _ _⟩ contrapose! intro hyp suffices x ∈ connectedComponent y by simpa [totallyDisconnectedSpace_iff_connectedComponent_singleton.1 h y, mem_singleton_iff] rw [connectedComponent_eq_iInter_isClopen, mem_iInter] rintro ...
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yaël Dillies -/ import Mathlib.Data.Set.Pointwise.SMul import Mathlib.Order.Filter.NAry import Mathlib.Order.Filter.Ultrafilter #align_import order.filter.pointwise from...
Mathlib/Order/Filter/Pointwise.lean
894
898
theorem NeBot.one_le_div (h : f.NeBot) : 1 ≤ f / f := by
rintro s ⟨t₁, h₁, t₂, h₂, hs⟩ obtain ⟨a, ha₁, ha₂⟩ := Set.not_disjoint_iff.1 (h.not_disjoint h₁ h₂) rw [mem_one, ← div_self' a] exact hs (Set.div_mem_div ha₁ ha₂)
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, E. W. Ayers -/ import Mathlib.CategoryTheory.Comma.Over import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Yoneda import Mathlib.Data.Set.L...
Mathlib/CategoryTheory/Sites/Sieves.lean
246
254
theorem functorPushforward_comp (R : Presieve X) : R.functorPushforward (F ⋙ G) = (R.functorPushforward F).functorPushforward G := by
funext x ext f constructor · rintro ⟨X, f₁, g₁, h₁, rfl⟩ exact ⟨F.obj X, F.map f₁, g₁, ⟨X, f₁, 𝟙 _, h₁, by simp⟩, rfl⟩ · rintro ⟨X, f₁, g₁, ⟨X', f₂, g₂, h₁, rfl⟩, rfl⟩ exact ⟨X', f₂, g₁ ≫ G.map g₂, h₁, by simp⟩
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Limits.Constructions.EpiMono impor...
Mathlib/CategoryTheory/GlueData.lean
354
359
theorem ι_gluedIso_hom (i : D.J) : F.map (D.ι i) ≫ (D.gluedIso F).hom = (D.mapGlueData F).ι i := by
haveI : HasColimit (MultispanIndex.multispan (diagram (mapGlueData D F))) := inferInstance erw [ι_preservesColimitsIso_hom_assoc] rw [HasColimit.isoOfNatIso_ι_hom] erw [Category.id_comp] rfl
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou -/ import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a...
Mathlib/MeasureTheory/Function/L1Space.lean
761
764
theorem Integrable.sup {β} [NormedLatticeAddCommGroup β] {f g : α → β} (hf : Integrable f μ) (hg : Integrable g μ) : Integrable (f ⊔ g) μ := by
rw [← memℒp_one_iff_integrable] at hf hg ⊢ exact hf.sup hg
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.SetTheory.Cardinal.ENat #align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" /-! # ...
Mathlib/SetTheory/Cardinal/ToNat.lean
126
126
theorem mk_toNat_of_infinite [h : Infinite α] : toNat #α = 0 := by
simp
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.Multiset.Dedup #align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dea...
Mathlib/Data/Multiset/Bind.lean
95
98
theorem rel_join {r : α → β → Prop} {s t} (h : Rel (Rel r) s t) : Rel r s.join t.join := by
induction h with | zero => simp | cons hab hst ih => simpa using hab.add ih
/- Copyright (c) 2021 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Geometry.Manifold.Algebra.Structures import Mathlib.Geometry.Manifold.BumpFunction import Mathlib.Topology.MetricSpace.PartitionOfUnity import ...
Mathlib/Geometry/Manifold/PartitionOfUnity.lean
656
666
theorem exists_contMDiffOn_forall_mem_convex_of_local (ht : ∀ x, Convex ℝ (t x)) (Hloc : ∀ x : M, ∃ U ∈ 𝓝 x, ∃ g : M → F, ContMDiffOn I 𝓘(ℝ, F) n g U ∧ ∀ y ∈ U, g y ∈ t y) : ∃ g : C^n⟮I, M; 𝓘(ℝ, F), F⟯, ∀ x, g x ∈ t x := by
choose U hU g hgs hgt using Hloc obtain ⟨f, hf⟩ := SmoothPartitionOfUnity.exists_isSubordinate I isClosed_univ (fun x => interior (U x)) (fun x => isOpen_interior) fun x _ => mem_iUnion.2 ⟨x, mem_interior_iff_mem_nhds.2 (hU x)⟩ refine ⟨⟨fun x => ∑ᶠ i, f i x • g i x, hf.contMDiff_finsum_smul (fun ...
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75...
Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
1,808
1,812
theorem Parallel.symm {s₁ s₂ : AffineSubspace k P} (h : s₁ ∥ s₂) : s₂ ∥ s₁ := by
rcases h with ⟨v, rfl⟩ refine ⟨-v, ?_⟩ rw [map_map, ← coe_trans_to_affineMap, ← constVAdd_add, neg_add_self, constVAdd_zero, coe_refl_to_affineMap, map_id]
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import M...
Mathlib/Order/WellFoundedSet.lean
112
113
theorem wellFoundedOn_image {s : Set β} : (f '' s).WellFoundedOn r ↔ s.WellFoundedOn (r on f) := by
rw [image_eq_range]; exact wellFoundedOn_range
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Algebra.Order.Archimedean import Mathlib.Order.Filter.AtTopBot import Mathlib.Tactic.GCongr #align_import order.filter.archimedean fr...
Mathlib/Order/Filter/Archimedean.lean
212
224
theorem Tendsto.atTop_mul_const' (hr : 0 < r) (hf : Tendsto f l atTop) : Tendsto (fun x => f x * r) l atTop := by
refine tendsto_atTop.2 fun b => ?_ obtain ⟨n : ℕ, hn : 1 ≤ n • r⟩ := Archimedean.arch 1 hr have hn' : 1 ≤ (n : R) * r := by rwa [nsmul_eq_mul] at hn filter_upwards [tendsto_atTop.1 hf (max b 0 * n)] with x hx calc b ≤ max b 0 * 1 := by { rw [mul_one] exact le_max_left _ _ } _ ≤ max b 0 * (n...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl, Sander Dahmen, Scott Morrison -/ import Mathlib.Algebra.Module.Torsion import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.LinearAlgebra.FreeMod...
Mathlib/LinearAlgebra/Dimension/Finite.lean
147
150
theorem Basis.nonempty_fintype_index_of_rank_lt_aleph0 {ι : Type*} (b : Basis ι R M) (h : Module.rank R M < ℵ₀) : Nonempty (Fintype ι) := by
rwa [← Cardinal.lift_lt, ← b.mk_eq_rank, Cardinal.lift_aleph0, Cardinal.lift_lt_aleph0, Cardinal.lt_aleph0_iff_fintype] at h
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Seminorm import Mathlib.Order.LiminfLimsup import Mathlib.Topology.Instances.Rat import Mathlib.Top...
Mathlib/Analysis/Normed/Group/Basic.lean
1,400
1,402
theorem SeminormedCommGroup.mem_closure_iff : a ∈ closure s ↔ ∀ ε, 0 < ε → ∃ b ∈ s, ‖a / b‖ < ε := by
simp [Metric.mem_closure_iff, dist_eq_norm_div]
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Basic /-! # insertNth Proves various lemmas about `List.insertNth`....
Mathlib/Data/List/InsertNth.lean
177
185
theorem get_insertNth_add_succ (l : List α) (x : α) (n k : ℕ) (hk' : n + k < l.length) (hk : n + k + 1 < (insertNth n x l).length := (by rwa [length_insertNth _ _ (by omega), Nat.succ_lt_succ_iff])): (insertNth n x l).get ⟨n + k + 1, hk⟩ = get l ⟨n + k, hk'⟩ := by
induction' l with hd tl IH generalizing n k · simp at hk' · cases n · simp · simpa [Nat.add_right_comm] using IH _ _ _
/- Copyright (c) 2022 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.Bin...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
89
91
theorem prodZeroIso_iso_inv_snd (X : C) : (prodZeroIso X).inv ≫ prod.fst = 𝟙 X := by
dsimp [prodZeroIso, binaryFanZeroRight] simp
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro -/ /-! # Definitions and properties of `coprime` -/ namespace Nat /-! ### `coprime` See also `nat.coprime_of_dvd` and `nat.coprime_o...
.lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
39
44
theorem Coprime.gcd_mul_left_cancel (m : Nat) (H : Coprime k n) : gcd (k * m) n = gcd m n := have H1 : Coprime (gcd (k * m) n) k := by
rw [Coprime, Nat.gcd_assoc, H.symm.gcd_eq_one, gcd_one_right] Nat.dvd_antisymm (dvd_gcd (H1.dvd_of_dvd_mul_left (gcd_dvd_left _ _)) (gcd_dvd_right _ _)) (gcd_dvd_gcd_mul_left _ _ _)
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-comm...
Mathlib/Probability/Kernel/IntegralCompProd.lean
78
82
theorem _root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left {δ : Type*} [TopologicalSpace δ] {f : β × γ → δ} (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) : ∀ᵐ x ∂κ a, AEStronglyMeasurable (fun y => f (x, y)) (η (a, x)) := by
filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with x hx using ⟨fun y => hf.mk f (x, y), hf.stronglyMeasurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Martingale.OptionalStopping import Mathlib.Probability.Martingale.Centering #align_import prob...
Mathlib/Probability/Martingale/BorelCantelli.lean
363
376
theorem tendsto_sum_indicator_atTop_iff' [IsFiniteMeasure μ] {s : ℕ → Set Ω} (hs : ∀ n, MeasurableSet[ℱ n] (s n)) : ∀ᵐ ω ∂μ, Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ω → ℝ) ω) atTop atTop ↔ Tendsto (fun n => ∑ k ∈ Finset.range n, (μ[(s (k + 1)).indicator (1 : Ω → ℝ)|ℱ k...
have := tendsto_sum_indicator_atTop_iff (eventually_of_forall fun ω n => ?_) (adapted_process hs) (integrable_process μ hs) (eventually_of_forall <| process_difference_le s) swap · rw [process, process, ← sub_nonneg, Finset.sum_apply, Finset.sum_apply, Finset.sum_range_succ_sub_sum] exact Set.indic...
/- Copyright (c) 2014 Robert Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Fiel...
Mathlib/Algebra/Order/Field/Basic.lean
775
778
theorem inv_antitoneOn_Icc_left (hb : b < 0) : AntitoneOn (fun x:α ↦ x⁻¹) (Set.Icc a b) := by
convert sub_inv_antitoneOn_Icc_left hb exact (sub_zero _).symm
/- Copyright (c) 2021 Jakob von Raumer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jakob von Raumer -/ import Mathlib.CategoryTheory.Monoidal.Free.Coherence import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.Closed.Monoidal import Mathlib....
Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean
222
231
theorem leftAdjointMate_comp {X Y Z : C} [HasLeftDual X] [HasLeftDual Y] {f : X ⟶ Y} {g : (ᘁX) ⟶ Z} : (ᘁf) ≫ g = (λ_ _).inv ≫ η_ (ᘁX) X ▷ _ ≫ (g ⊗ f) ▷ _ ≫ (α_ _ _ _).hom ≫ _ ◁ ε_ _ _ ≫ (ρ_ _).hom := calc _ = 𝟙 _ ⊗≫ η_ (ᘁX) X ▷ (ᘁY) ⊗≫ (ᘁX) ◁ f ▷ (ᘁY) ⊗≫ ((ᘁX) ◁ ε_ (ᘁY) Y ≫ g ▷ 𝟙_ C) ⊗≫ 𝟙...
dsimp only [leftAdjointMate]; coherence _ = _ := by rw [whisker_exchange, tensorHom_def']; coherence
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, James Gallicchio -/ import Batteries.Data.List.Count import Batteries.Data.Fin.Lemmas /-! # Pairwise relations on a list This file provides basic results about `List....
.lake/packages/batteries/Batteries/Data/List/Pairwise.lean
298
307
theorem pwFilter_eq_self [DecidableRel (α := α) R] {l : List α} : pwFilter R l = l ↔ Pairwise R l := by
refine ⟨fun e => e ▸ pairwise_pwFilter l, fun p => ?_⟩ induction l with | nil => rfl | cons x l IH => let ⟨al, p⟩ := pairwise_cons.1 p rw [pwFilter_cons_of_pos fun b hb => ?_, IH p] rw [IH p] at hb exact al _ hb
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Logic.Equiv.List import Mathlib.Logic.Function.Iterate #align_import computability.primrec from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3b...
Mathlib/Computability/Primrec.lean
1,467
1,479
theorem to_prim {n f} (pf : @Nat.Primrec' n f) : Primrec f := by
induction pf with | zero => exact .const 0 | succ => exact _root_.Primrec.succ.comp .vector_head | get i => exact Primrec.vector_get.comp .id (.const i) | comp _ _ _ hf hg => exact hf.comp (.vector_ofFn fun i => hg i) | @prec n f g _ _ hf hg => exact .nat_rec' .vector_head (hf.comp Primrec.vector...
/- Copyright (c) 2019 Minchao Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Minchao Wu, Chris Hughes, Mantas Bakšys -/ import Mathlib.Data.List.Basic import Mathlib.Order.MinMax import Mathlib.Order.WithBot #align_import data.list.min_max from "leanprover-communi...
Mathlib/Data/List/MinMax.lean
399
403
theorem maximum_eq_coe_iff : maximum l = m ↔ m ∈ l ∧ ∀ a ∈ l, a ≤ m := by
rw [maximum, ← WithBot.some_eq_coe, argmax_eq_some_iff] simp only [id_eq, and_congr_right_iff, and_iff_left_iff_imp] intro _ h a hal hma rw [_root_.le_antisymm hma (h a hal)]
/- Copyright (c) 2022 María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: María Inés de Frutos-Fernández -/ import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.Valuation.ExtendToLocalization import Mathlib.RingTheory.Valu...
Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
108
110
theorem int_valuation_zero_le (x : nonZeroDivisors R) : 0 < v.intValuationDef x := by
rw [v.intValuationDef_if_neg (nonZeroDivisors.coe_ne_zero x)] exact WithZero.zero_lt_coe _
/- Copyright (c) 2022 Alex J. Best. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ import Mathlib.Algebra.Squarefree.Basic import Mathlib.Data.ZMod.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.zmod from "leanprover-com...
Mathlib/RingTheory/ZMod.lean
25
29
theorem ZMod.ker_intCastRingHom (n : ℕ) : RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span ({(n : ℤ)} : Set ℤ) := by
ext rw [Ideal.mem_span_singleton, RingHom.mem_ker, Int.coe_castRingHom, ZMod.intCast_zmod_eq_zero_iff_dvd]
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Batteries.Data.RBMap.Alter import Batteries.Data.List.Lemmas /-! # Additional lemmas for Red-black trees -/ namespace Batteries namespace RBNode open RBColor...
.lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean
1,035
1,040
theorem lowerBoundP?_exists {t : RBSet α cmp} [TransCmp cmp] [IsCut cmp cut] : (∃ x, t.lowerBoundP? cut = some x) ↔ ∃ x ∈ t, cut x ≠ .lt := by
simp [lowerBoundP?, t.2.out.1.lowerBound?_exists, mem_toList, mem_iff_mem_toList] exact ⟨ fun ⟨x, h1, h2⟩ => ⟨x, ⟨x, h1, OrientedCmp.cmp_refl⟩, h2⟩, fun ⟨x, ⟨y, h1, h2⟩, eq⟩ => ⟨y, h1, IsCut.congr (cut := cut) h2 ▸ eq⟩⟩