Context
stringlengths
57
92.3k
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
import Mathlib.Algebra.Group.Hom.Defs #align_import data.matrix.dmatrix from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" universe u u' v w z def DMatrix (m : Type u) (n : Type u') (Ξ± : m β†’ n β†’ Type v) : Type max u u' v := βˆ€ i j, Ξ± i j #align dmatrix DMatrix variable {l m n o : T...
Mathlib/Data/Matrix/DMatrix.lean
57
59
theorem map_map {M : DMatrix m n Ξ±} {Ξ² : m β†’ n β†’ Type w} {Ξ³ : m β†’ n β†’ Type z} {f : βˆ€ ⦃i j⦄, Ξ± i j β†’ Ξ² i j} {g : βˆ€ ⦃i j⦄, Ξ² i j β†’ Ξ³ i j} : (M.map f).map g = M.map fun i j x => g (f x) := by
ext; simp
import Mathlib.Data.PFunctor.Multivariate.W import Mathlib.Data.QPF.Multivariate.Basic #align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" universe u v namespace MvQPF open TypeVec open MvFunctor (LiftP LiftR) open MvFunctor var...
Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean
139
143
theorem wrepr_wMk {Ξ± : TypeVec n} (a : q.P.A) (f' : q.P.drop.B a ⟹ Ξ±) (f : q.P.last.B a β†’ q.P.W Ξ±) : wrepr (q.P.wMk a f' f) = q.P.wMk' (repr (abs (appendFun id wrepr <$$> ⟨a, q.P.appendContents f' f⟩))) := by
rw [wrepr, recF_eq', q.P.wDest'_wMk]; rfl
import Mathlib.Data.Setoid.Partition import Mathlib.GroupTheory.GroupAction.Basic import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.GroupTheory.GroupAction.SubMulAction open scoped BigOperators Pointwise namespace MulAction section Group variable {G : Type*} [Group G] {X : Type*} [MulAction G X] ...
Mathlib/GroupTheory/GroupAction/Blocks.lean
264
277
theorem IsBlock.inter {B₁ Bβ‚‚ : Set X} (h₁ : IsBlock G B₁) (hβ‚‚ : IsBlock G Bβ‚‚) : IsBlock G (B₁ ∩ Bβ‚‚) := by
rw [IsBlock.def_one] intro g rw [Set.smul_set_inter] cases' h₁.smul_eq_or_disjoint g with h₁ h₁ Β· cases' hβ‚‚.smul_eq_or_disjoint g with hβ‚‚ hβ‚‚ Β· left; rw [h₁, hβ‚‚] right apply Disjoint.inter_left'; apply Disjoint.inter_right' exact hβ‚‚ Β· right apply Disjoint.inter_left; apply Disjoint.inter...
import Mathlib.Data.List.Range import Mathlib.Data.List.Perm #align_import data.list.sigma from "leanprover-community/mathlib"@"f808feb6c18afddb25e66a71d317643cf7fb5fbb" universe u v namespace List variable {Ξ± : Type u} {Ξ² : Ξ± β†’ Type v} {l l₁ lβ‚‚ : List (Sigma Ξ²)} def keys : List (Sigma Ξ²) β†’ List Ξ± := map ...
Mathlib/Data/List/Sigma.lean
212
216
theorem mem_dlookup {a} {b : β a} {l : List (Sigma β)} (nd : l.NodupKeys) (h : Sigma.mk a b ∈ l) : b ∈ dlookup a l := by
cases' Option.isSome_iff_exists.mp (dlookup_isSome.mpr (mem_keys_of_mem h)) with b' h' cases nd.eq_of_mk_mem h (of_mem_dlookup h') exact h'
import Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts #align_import category_theory.limits.shapes.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070" noncomputable section open CategoryTheory universe w v₁ vβ‚‚ v u...
Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean
429
430
theorem cospanExt_inv_app_left : (cospanExt iX iY iZ wf wg).inv.app WalkingCospan.left = iX.inv := by
dsimp [cospanExt]
import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8" open Function (update) open Relation namespa...
Mathlib/Computability/TMToPartrec.lean
201
201
theorem zero_eval (v) : zero.eval v = pure [0] := by
simp [zero]
import Mathlib.Algebra.Module.Hom import Mathlib.Algebra.Module.LinearMap.End #align_import algebra.module.equiv from "leanprover-community/mathlib"@"ea94d7cd54ad9ca6b7710032868abb7c6a104c9c" open Function universe u u' v w x y z variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {k : Type*} {K...
Mathlib/Algebra/Module/Equiv.lean
454
458
theorem toLinearMap_symm_comp_eq (f : M₃ β†’β‚›β‚—[σ₃₁] M₁) (g : M₃ β†’β‚›β‚—[σ₃₂] Mβ‚‚) : e₁₂.symm.toLinearMap.comp g = f ↔ g = e₁₂.toLinearMap.comp f := by
constructor <;> intro H <;> ext Β· simp [← H, ← e₁₂.toEquiv.symm_comp_eq f g] Β· simp [H, e₁₂.toEquiv.symm_comp_eq f g]
import Mathlib.Topology.Instances.Irrational import Mathlib.Topology.Instances.Rat import Mathlib.Topology.Compactification.OnePoint #align_import topology.instances.rat_lemmas from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Set Metric Filter TopologicalSpace open Topology One...
Mathlib/Topology/Instances/RatLemmas.lean
56
62
theorem not_countably_generated_cocompact : Β¬IsCountablyGenerated (cocompact β„š) := by
intro H rcases exists_seq_tendsto (cocompact β„š βŠ“ 𝓝 0) with ⟨x, hx⟩ rw [tendsto_inf] at hx; rcases hx with ⟨hxc, hx0⟩ obtain ⟨n, hn⟩ : βˆƒ n : β„•, x n βˆ‰ insert (0 : β„š) (range x) := (hxc.eventually hx0.isCompact_insert_range.compl_mem_cocompact).exists exact hn (Or.inr ⟨n, rfl⟩)
import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Analysis.Convex.Star import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace #align_import analysis.convex.basic from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" variable {π•œ E F Ξ² : Type*} open LinearMap Set open scope...
Mathlib/Analysis/Convex/Basic.lean
513
515
theorem Convex.mapsTo_lineMap (h : Convex π•œ s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) : MapsTo (AffineMap.lineMap x y) (Icc (0 : π•œ) 1) s := by
simpa only [mapsTo', segment_eq_image_lineMap] using h.segment_subset hx hy
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] sectio...
Mathlib/Analysis/NormedSpace/Pointwise.lean
217
223
theorem disjoint_ball_ball_iff (hΞ΄ : 0 < Ξ΄) (hΞ΅ : 0 < Ξ΅) : Disjoint (ball x Ξ΄) (ball y Ξ΅) ↔ Ξ΄ + Ξ΅ ≀ dist x y := by
refine ⟨fun h => le_of_not_lt fun hxy => ?_, ball_disjoint_ball⟩ rw [add_comm] at hxy obtain ⟨z, hxz, hzy⟩ := exists_dist_lt_lt hδ hΡ hxy rw [dist_comm] at hxz exact h.le_bot ⟨hxz, hzy⟩
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Sym.Card open Finset Function namespace SimpleGraph variable {V : Type*} (G : SimpleGraph V) {e : Sym2 V} theorem edgeFinset_deleteEdges [DecidableEq V] [Fintype G.edgeSet] (s : Finset (Sym2 V)) [Fintyp...
Mathlib/Combinatorics/SimpleGraph/Finite.lean
455
457
theorem card_commonNeighbors_le_degree_right [DecidableRel G.Adj] (v w : V) : Fintype.card (G.commonNeighbors v w) ≀ G.degree w := by
simp_rw [commonNeighbors_symm _ v w, card_commonNeighbors_le_degree_left]
import Mathlib.Algebra.Group.Conj import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Group.Subsemigroup.Operations import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.Order.Group.Abs import Mathlib.Data.Set.Image import Mathlib.Order.Atoms import Mathlib.Tactic.ApplyFun #align_import g...
Mathlib/Algebra/Group/Subgroup/Basic.lean
2,509
2,509
theorem range_eq_map (f : G β†’* N) : f.range = (⊀ : Subgroup G).map f := by
ext; simp
import Aesop import Mathlib.Order.BoundedOrder #align_import order.disjoint from "leanprover-community/mathlib"@"22c4d2ff43714b6ff724b2745ccfdc0f236a4a76" open Function variable {Ξ± : Type*} section Disjoint section Codisjoint section IsCompl structure IsCompl [PartialOrder Ξ±] [BoundedOrder Ξ±] (x y : Ξ±) : Pro...
Mathlib/Order/Disjoint.lean
819
820
theorem isCompl_coe : IsCompl (a : Ξ±) b ↔ IsCompl a b := by
simp_rw [isCompl_iff, disjoint_coe, codisjoint_coe]
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
585
587
theorem continuousOn_prod_of_discrete_right [DiscreteTopology Ξ²] {f : Ξ± Γ— Ξ² β†’ Ξ³} {s : Set (Ξ± Γ— Ξ²)} : ContinuousOn f s ↔ βˆ€ b, ContinuousOn (f ⟨·, b⟩) {a | (a, b) ∈ s} := by
simp_rw [ContinuousOn, Prod.forall, continuousWithinAt_prod_of_discrete_right]; apply forall_swap
import Mathlib.RingTheory.WittVector.InitTail #align_import ring_theory.witt_vector.truncated from "leanprover-community/mathlib"@"acbe099ced8be9c9754d62860110295cde0d7181" open Function (Injective Surjective) noncomputable section variable {p : β„•} [hp : Fact p.Prime] (n : β„•) (R : Type*) local notation "π•Ž" =>...
Mathlib/RingTheory/WittVector/Truncated.lean
346
350
theorem mem_ker_truncate (x : π•Ž R) : x ∈ RingHom.ker (@truncate p _ n R _) ↔ βˆ€ i < n, x.coeff i = 0 := by
simp only [RingHom.mem_ker, truncate, truncateFun, RingHom.coe_mk, TruncatedWittVector.ext_iff, TruncatedWittVector.coeff_mk, coeff_zero] exact Fin.forall_iff
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Regular.Pow import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Data.Finsupp.Antidiagonal import Mathlib.Order.SymmDiff import Mathlib.RingTheory.Adjoin.Basic #align_import data.mv_polynomial.basic fr...
Mathlib/Algebra/MvPolynomial/Basic.lean
1,574
1,575
theorem evalβ‚‚Hom_zero (f : R β†’+* Sβ‚‚) : evalβ‚‚Hom f (0 : Οƒ β†’ Sβ‚‚) = f.comp constantCoeff := by
ext <;> simp
import Mathlib.CategoryTheory.Sites.Whiskering import Mathlib.CategoryTheory.Sites.Plus #align_import category_theory.sites.compatible_plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace CategoryTheory.GrothendieckTopology open CategoryTheory Limits...
Mathlib/CategoryTheory/Sites/CompatiblePlus.lean
221
224
theorem plusCompIso_inv_eq_plusLift (hP : Presheaf.IsSheaf J (J.plusObj P β‹™ F)) : (J.plusCompIso F P).inv = J.plusLift (whiskerRight (J.toPlus _) _) hP := by
apply J.plusLift_unique simp [Iso.comp_inv_eq]
import Mathlib.CategoryTheory.Equivalence #align_import category_theory.opposites from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a" universe v₁ vβ‚‚ u₁ uβ‚‚ -- morphism levels before object levels. See note [CategoryTheory universes]. open Opposite variable {C : Type u₁} namespace Categ...
Mathlib/CategoryTheory/Opposites.lean
168
170
theorem unop_inv {X Y : Cα΅’α΅–} (f : X ⟢ Y) [IsIso f] : (inv f).unop = inv f.unop := by
apply IsIso.eq_inv_of_hom_inv_id rw [← unop_comp, IsIso.inv_hom_id, unop_id]
import Mathlib.Data.Real.Basic import Mathlib.Data.ENNReal.Real import Mathlib.Data.Sign #align_import data.real.ereal from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open Function ENNReal NNReal Set noncomputable section def EReal := WithBot (WithTop ℝ) deriving Bot, Zero, One,...
Mathlib/Data/Real/EReal.lean
1,269
1,269
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x := by
cases x <;> rfl
import Mathlib.Algebra.Ring.Int import Mathlib.RingTheory.DedekindDomain.IntegralClosure #align_import number_theory.number_field.basic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" class NumberField (K : Type*) [Field K] : Prop where [to_charZero : CharZero K] [to_finiteDime...
Mathlib/NumberTheory/NumberField/Basic.lean
225
229
theorem not_isField : Β¬IsField (π“ž K) := by
have h_inj : Function.Injective (algebraMap β„€ (π“ž K)) := RingHom.injective_int (algebraMap β„€ (π“ž K)) intro hf exact Int.not_isField (((IsIntegralClosure.isIntegral_algebra β„€ K).isField_iff_isField h_inj).mpr hf)
import Mathlib.Algebra.Category.GroupCat.EquivalenceGroupAddGroup import Mathlib.GroupTheory.QuotientGroup #align_import algebra.category.Group.epi_mono from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open scoped Pointwise universe u v section open Category...
Mathlib/Algebra/Category/GroupCat/EpiMono.lean
444
445
theorem epi_iff_surjective : Epi f ↔ Function.Surjective f := by
rw [epi_iff_range_eq_top, MonoidHom.range_top_iff_surjective]
import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Function.LocallyIntegrable import Mathlib.MeasureTheory.Group.Integral import Mathlib.Topology.Metrizable.Urysohn import Mathlib.Topology.UrysohnsLemma import Mathlib.MeasureTheory.Measure.Haar.Basic import Mathlib.MeasureTheory.Meas...
Mathlib/MeasureTheory/Measure/Haar/Unique.lean
615
638
theorem measure_isMulInvariant_eq_smul_of_isCompact_closure [LocallyCompactSpace G] (ΞΌ' ΞΌ : Measure G) [IsHaarMeasure ΞΌ] [IsFiniteMeasureOnCompacts ΞΌ'] [IsMulLeftInvariant ΞΌ'] {s : Set G} (h's : IsCompact (closure s)) : ΞΌ' s = haarScalarFactor ΞΌ' ΞΌ β€’ ΞΌ s := by
let Ξ½ := haarScalarFactor ΞΌ' ΞΌ β€’ ΞΌ apply le_antisymm Β· calc ΞΌ' s ≀ ΞΌ' ((toMeasurable Ξ½ s) ∩ (closure s)) := measure_mono <| subset_inter (subset_toMeasurable Ξ½ s) subset_closure _ = Ξ½ ((toMeasurable Ξ½ s) ∩ (closure s)) := by apply measure_isMulInvariant_eq_smul_of_isCompact_closure_of_measura...
import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" assert_not_exists MonoidWithZero assert_not_exists Finset.sum open Function OrderDual open FinsetInterval variable {ΞΉ Ξ± : T...
Mathlib/Order/Interval/Finset/Basic.lean
746
747
theorem card_Iio_eq_card_Iic_sub_one (a : Ξ±) : (Iio a).card = (Iic a).card - 1 := by
rw [Iic_eq_cons_Iio, card_cons, Nat.add_sub_cancel_right]
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 Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
690
697
theorem IsWF.min_union (hs : s.IsWF) (hsn : s.Nonempty) (ht : t.IsWF) (htn : t.Nonempty) : (hs.union ht).min (union_nonempty.2 (Or.intro_left _ hsn)) = Min.min (hs.min hsn) (ht.min htn) := by
refine le_antisymm (le_min (IsWF.min_le_min_of_subset subset_union_left) (IsWF.min_le_min_of_subset subset_union_right)) ?_ rw [min_le_iff] exact ((mem_union _ _ _).1 ((hs.union ht).min_mem (union_nonempty.2 (.inl hsn)))).imp (hs.min_le _) (ht.min_le _)
import Mathlib.CategoryTheory.MorphismProperty.Composition import Mathlib.CategoryTheory.MorphismProperty.IsInvertedBy import Mathlib.CategoryTheory.Category.Quiv #align_import category_theory.localization.construction from "leanprover-community/mathlib"@"1a5e56f2166e4e9d0964c71f4273b1d39227678d" noncomputable se...
Mathlib/CategoryTheory/Localization/Construction.lean
310
315
theorem natTrans_hcomp_injective {F G : W.Localization β₯€ D} {τ₁ Ο„β‚‚ : F ⟢ G} (h : πŸ™ W.Q β—« τ₁ = πŸ™ W.Q β—« Ο„β‚‚) : τ₁ = Ο„β‚‚ := by
ext X have eq := (objEquiv W).right_inv X simp only [objEquiv] at eq rw [← eq, ← NatTrans.id_hcomp_app, ← NatTrans.id_hcomp_app, h]
import Mathlib.Algebra.Group.Nat import Mathlib.Algebra.Order.Sub.Canonical import Mathlib.Data.List.Perm import Mathlib.Data.Set.List import Mathlib.Init.Quot import Mathlib.Order.Hom.Basic #align_import data.multiset.basic from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" universe v ...
Mathlib/Data/Multiset/Basic.lean
726
731
theorem mem_of_mem_nsmul {a : Ξ±} {s : Multiset Ξ±} {n : β„•} (h : a ∈ n β€’ s) : a ∈ s := by
induction' n with n ih Β· rw [zero_nsmul] at h exact absurd h (not_mem_zero _) Β· rw [succ_nsmul, mem_add] at h exact h.elim ih id
import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" namespace Set variable {Ξ± Ξ² : Type*} {s t : Set Ξ±} noncomputable def encard (s : Set Ξ±) : β„•βˆž := PartENat.withTopEquiv (PartENat.card s) @[simp] theorem encard_uni...
Mathlib/Data/Set/Card.lean
628
635
theorem pred_ncard_le_ncard_diff_singleton (s : Set Ξ±) (a : Ξ±) : s.ncard - 1 ≀ (s \ {a}).ncard := by
cases' s.finite_or_infinite with hs hs · by_cases h : a ∈ s · rw [ncard_diff_singleton_of_mem h hs] rw [diff_singleton_eq_self h] apply Nat.pred_le convert Nat.zero_le _ rw [hs.ncard]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1 #align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" open TopologicalSpace MeasureTheory.Lp Filter open scoped ENNReal Topology MeasureTheory names...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
152
155
theorem condexp_ae_eq_condexpL1CLM (hm : m ≀ m0) [SigmaFinite (ΞΌ.trim hm)] (hf : Integrable f ΞΌ) : ΞΌ[f|m] =ᡐ[ΞΌ] condexpL1CLM F' hm ΞΌ (hf.toL1 f) := by
refine (condexp_ae_eq_condexpL1 hm f).trans (eventually_of_forall fun x => ?_) rw [condexpL1_eq hf]
import Mathlib.Algebra.Group.Indicator import Mathlib.Data.Finset.Piecewise import Mathlib.Data.Finset.Preimage #align_import algebra.big_operators.basic from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" -- TODO -- assert_not_exists AddCommMonoidWithOne assert_not_exists MonoidWithZero...
Mathlib/Algebra/BigOperators/Group/Finset.lean
2,140
2,142
theorem prod_sdiff_div_prod_sdiff : (∏ x ∈ sβ‚‚ \ s₁, f x) / ∏ x ∈ s₁ \ sβ‚‚, f x = (∏ x ∈ sβ‚‚, f x) / ∏ x ∈ s₁, f x := by
simp [← Finset.prod_sdiff (@inf_le_left _ _ s₁ sβ‚‚), ← Finset.prod_sdiff (@inf_le_right _ _ s₁ sβ‚‚)]
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Algebra.Group.FiniteSupport import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Set.Subsingleton #align_import algebra.big_operators.finprod from "leanprover-community/mathlib"@"d6fad0e5bf...
Mathlib/Algebra/BigOperators/Finprod.lean
716
720
theorem MonoidHom.map_finprod_mem' {f : Ξ± β†’ M} (g : M β†’* N) (hβ‚€ : (s ∩ mulSupport f).Finite) : g (∏ᢠ j ∈ s, f j) = ∏ᢠ i ∈ s, g (f i) := by
rw [g.map_finprod] Β· simp only [g.map_finprod_Prop] Β· simpa only [finprod_eq_mulIndicator_apply, mulSupport_mulIndicator]
import Mathlib.Order.MinMax import Mathlib.Data.Set.Subsingleton import Mathlib.Tactic.Says #align_import data.set.intervals.basic from "leanprover-community/mathlib"@"3ba15165bd6927679be7c22d6091a87337e3cd0c" open Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² : Type*} namespace Set theorem Icc_bot_top...
Mathlib/Order/Interval/Set/Basic.lean
1,700
1,709
theorem Icc_union_Icc' (h₁ : c ≀ b) (hβ‚‚ : a ≀ d) : Icc a b βˆͺ Icc c d = Icc (min a c) (max b d) := by
ext1 x simp_rw [mem_union, mem_Icc, min_le_iff, le_max_iff] by_cases hc : c ≀ x <;> by_cases hd : x ≀ d Β· simp only [hc, hd, and_self, or_true] -- Porting note: restore `tauto` Β· have hax : a ≀ x := hβ‚‚.trans (le_of_not_ge hd) simp only [hax, true_and, hc, or_self] -- Porting note: restore `tauto` Β· hav...
import Mathlib.FieldTheory.Separable import Mathlib.RingTheory.IntegralDomain import Mathlib.Algebra.CharP.Reduced import Mathlib.Tactic.ApplyFun #align_import field_theory.finite.basic from "leanprover-community/mathlib"@"12a85fac627bea918960da036049d611b1a3ee43" variable {K : Type*} {R : Type*} local notation ...
Mathlib/FieldTheory/Finite/Basic.lean
608
613
theorem pow_dichotomy (hF : ringChar F β‰  2) {a : F} (ha : a β‰  0) : a ^ (Fintype.card F / 2) = 1 ∨ a ^ (Fintype.card F / 2) = -1 := by
have h₁ := FiniteField.pow_card_sub_one_eq_one a ha rw [← Nat.two_mul_odd_div_two (FiniteField.odd_card_of_char_ne_two hF), mul_comm, pow_mul, pow_two] at h₁ exact mul_self_eq_one_iff.mp h₁
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) ...
Mathlib/Data/Option/NAry.lean
146
149
theorem map_mapβ‚‚_distrib {g : Ξ³ β†’ Ξ΄} {f' : Ξ±' β†’ Ξ²' β†’ Ξ΄} {g₁ : Ξ± β†’ Ξ±'} {gβ‚‚ : Ξ² β†’ Ξ²'} (h_distrib : βˆ€ a b, g (f a b) = f' (g₁ a) (gβ‚‚ b)) : (mapβ‚‚ f a b).map g = mapβ‚‚ f' (a.map g₁) (b.map gβ‚‚) := by
cases a <;> cases b <;> simp [h_distrib]
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
901
905
theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt π•œ s x) (m : Fin 1 β†’ E) : iteratedFDerivWithin π•œ 1 f s x m = fderivWithin π•œ f s x (m 0) := by
simp only [iteratedFDerivWithin_succ_apply_left, iteratedFDerivWithin_zero_eq_comp, (continuousMultilinearCurryFin0 π•œ E F).symm.comp_fderivWithin h] rfl
import Mathlib.Control.Functor.Multivariate import Mathlib.Data.PFunctor.Univariate.Basic #align_import data.pfunctor.multivariate.basic from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" universe u v open MvFunctor @[pp_with_univ] structure MvPFunctor (n : β„•) where A : Type u ...
Mathlib/Data/PFunctor/Multivariate/Basic.lean
116
119
theorem const.mk_get (x : const n A Ξ±) : const.mk n (const.get x) = x := by
cases x dsimp [const.get, const.mk] congr with (_⟨⟩)
import Mathlib.RingTheory.Ideal.IsPrimary import Mathlib.RingTheory.Ideal.Quotient import Mathlib.RingTheory.Polynomial.Quotient #align_import ring_theory.jacobson_ideal from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" universe u v namespace Ideal variable {R : Type u} {S : Type v}...
Mathlib/RingTheory/JacobsonIdeal.lean
322
340
theorem jacobson_bot_polynomial_le_sInf_map_maximal : jacobson (βŠ₯ : Ideal R[X]) ≀ sInf (map (C : R β†’+* R[X]) '' { J : Ideal R | J.IsMaximal }) := by
refine le_sInf fun J => exists_imp.2 fun j hj => ?_ haveI : j.IsMaximal := hj.1 refine Trans.trans (jacobson_mono bot_le) (le_of_eq ?_ : J.jacobson ≀ J) suffices t : (βŠ₯ : Ideal (Polynomial (R β§Έ j))).jacobson = βŠ₯ by rw [← hj.2, jacobson_eq_iff_jacobson_quotient_eq_bot] replace t := congr_arg (map (polyn...
import Mathlib.Data.Set.Lattice import Mathlib.Logic.Small.Basic import Mathlib.Logic.Function.OfArity import Mathlib.Order.WellFounded #align_import set_theory.zfc.basic from "leanprover-community/mathlib"@"f0b3759a8ef0bd8239ecdaa5e1089add5feebe1a" -- Porting note: Lean 3 uses `Set` for `ZFSet`. set_option linter...
Mathlib/SetTheory/ZFC/Basic.lean
1,492
1,500
theorem mem_wf : @WellFounded Class.{u} (Β· ∈ Β·) := ⟨by have H : βˆ€ x : ZFSet.{u}, @Acc Class.{u} (Β· ∈ Β·) ↑x := by
refine fun a => ZFSet.inductionOn a fun x IH => ⟨_, ?_⟩ rintro A ⟨z, rfl, hz⟩ exact IH z hz refine fun A => ⟨A, ?_⟩ rintro B ⟨x, rfl, _⟩ exact H x⟩
import Mathlib.Analysis.Normed.Group.Seminorm import Mathlib.Order.LiminfLimsup import Mathlib.Topology.Instances.Rat import Mathlib.Topology.MetricSpace.Algebra import Mathlib.Topology.MetricSpace.IsometricSMul import Mathlib.Topology.Sequences #align_import analysis.normed.group.basic from "leanprover-community/mat...
Mathlib/Analysis/Normed/Group/Basic.lean
2,040
2,051
theorem mul_lipschitzWith (hf : AntilipschitzWith Kf f) (hg : LipschitzWith Kg g) (hK : Kg < Kf⁻¹) : AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ fun x => f x * g x := by
letI : PseudoMetricSpace Ξ± := PseudoEMetricSpace.toPseudoMetricSpace hf.edist_ne_top refine AntilipschitzWith.of_le_mul_dist fun x y => ?_ rw [NNReal.coe_inv, ← _root_.div_eq_inv_mul] rw [le_div_iff (NNReal.coe_pos.2 <| tsub_pos_iff_lt.2 hK)] rw [mul_comm, NNReal.coe_sub hK.le, _root_.sub_mul] -- Porting n...
import Mathlib.Algebra.Module.Torsion import Mathlib.RingTheory.DedekindDomain.Ideal #align_import algebra.module.dedekind_domain from "leanprover-community/mathlib"@"cdc34484a07418af43daf8198beaf5c00324bca8" universe u v variable {R : Type u} [CommRing R] [IsDomain R] {M : Type v} [AddCommGroup M] [Module R M] ...
Mathlib/Algebra/Module/DedekindDomain.lean
65
72
theorem isInternal_prime_power_torsion [Module.Finite R M] (hM : Module.IsTorsion R M) : DirectSum.IsInternal fun p : (factors (⊀ : Submodule R M).annihilator).toFinset => torsionBySet R M (p ^ (factors (⊀ : Submodule R M).annihilator).count ↑p : Ideal R) := by
have hM' := Module.isTorsionBySet_annihilator_top R M have hI := Submodule.annihilator_top_inter_nonZeroDivisors hM refine isInternal_prime_power_torsion_of_is_torsion_by_ideal ?_ hM' rw [← Set.nonempty_iff_ne_empty] at hI; rw [Submodule.ne_bot_iff] obtain ⟨x, H, hx⟩ := hI; exact ⟨x, H, nonZeroDivisors.ne_ze...
import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator import Mathlib.Init.Data.Quot import Mathlib.Tactic.Cases import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw #align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a...
Mathlib/Logic/Relation.lean
436
439
theorem trans_right (hab : ReflTransGen r a b) (hbc : TransGen r b c) : TransGen r a c := by
induction hbc with | single hbc => exact tail' hab hbc | tail _ hcd hac => exact hac.tail hcd
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology.Instances.Sign #align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
444
446
theorem cos_sq_add_sin_sq (ΞΈ : Real.Angle) : cos ΞΈ ^ 2 + sin ΞΈ ^ 2 = 1 := by
induction ΞΈ using Real.Angle.induction_on exact Real.cos_sq_add_sin_sq _
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.IsometricSMul #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Pointwise Bornology u...
Mathlib/Topology/MetricSpace/HausdorffDistance.lean
180
181
theorem mem_iff_infEdist_zero_of_closed (h : IsClosed s) : x ∈ s ↔ infEdist x s = 0 := by
rw [← mem_closure_iff_infEdist_zero, h.closure_eq]
import Mathlib.Algebra.Group.Subgroup.MulOpposite import Mathlib.Algebra.Group.Submonoid.Pointwise import Mathlib.GroupTheory.GroupAction.ConjAct #align_import group_theory.subgroup.pointwise from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802" open Set open Pointwise variable {Ξ± G A S...
Mathlib/Algebra/Group/Subgroup/Pointwise.lean
366
372
theorem conj_smul_subgroupOf {P H : Subgroup G} (hP : P ≀ H) (h : H) : MulAut.conj h β€’ P.subgroupOf H = (MulAut.conj (h : G) β€’ P).subgroupOf H := by
refine le_antisymm ?_ ?_ · rintro - ⟨g, hg, rfl⟩ exact ⟨g, hg, rfl⟩ · rintro p ⟨g, hg, hp⟩ exact ⟨⟨g, hP hg⟩, hg, Subtype.ext hp⟩
import Mathlib.Topology.UniformSpace.Cauchy import Mathlib.Topology.UniformSpace.Separation import Mathlib.Topology.DenseEmbedding #align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c" open Filter Function Set Uniformity Topology sec...
Mathlib/Topology/UniformSpace/UniformEmbedding.lean
473
475
theorem uniformly_extend_spec [CompleteSpace Ξ³] (a : Ξ±) : Tendsto f (comap e (𝓝 a)) (𝓝 (ψ a)) := by
simpa only [DenseInducing.extend] using tendsto_nhds_limUnder (uniformly_extend_exists h_e β€Ή_β€Ί h_f _)
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
276
277
theorem nhdsWithin_singleton (a : Ξ±) : 𝓝[{a}] a = pure a := by
rw [nhdsWithin, principal_singleton, inf_eq_right.2 (pure_le_nhds a)]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from ...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
487
491
theorem affineCombination_indicator_subset (w : ΞΉ β†’ k) (p : ΞΉ β†’ P) {s₁ sβ‚‚ : Finset ΞΉ} (h : s₁ βŠ† sβ‚‚) : s₁.affineCombination k p w = sβ‚‚.affineCombination k p (Set.indicator (↑s₁) w) := by
rw [affineCombination_apply, affineCombination_apply, weightedVSubOfPoint_indicator_subset _ _ _ h]
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Laurent import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.RingTheory.Polynomial.Nilpotent #align_import linear_algebra.matrix.charpoly.coeff from "leanprover-community/mathlib"@"9745b...
Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
61
78
theorem charpoly_sub_diagonal_degree_lt : (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1) := by
rw [charpoly, det_apply', ← insert_erase (mem_univ (Equiv.refl n)), sum_insert (not_mem_erase (Equiv.refl n) univ), add_comm] simp only [charmatrix_apply_eq, one_mul, Equiv.Perm.sign_refl, id, Int.cast_one, Units.val_one, add_sub_cancel_right, Equiv.coe_refl] rw [← mem_degreeLT] apply Submodule.sum_mem...
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic #align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
742
744
theorem integral_comp_mul_left (hc : c β‰  0) : (∫ x in a..b, f (c * x)) = c⁻¹ β€’ ∫ x in c * a..c * b, f x := by
simpa only [mul_comm c] using integral_comp_mul_right f hc
import Mathlib.Data.Finset.Attr import Mathlib.Data.Multiset.FinsetOps import Mathlib.Logic.Equiv.Set import Mathlib.Order.Directed import Mathlib.Order.Interval.Set.Basic #align_import data.finset.basic from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" -- Assert that we define `Finset...
Mathlib/Data/Finset/Basic.lean
1,581
1,590
theorem induction_on_union (P : Finset Ξ± β†’ Finset Ξ± β†’ Prop) (symm : βˆ€ {a b}, P a b β†’ P b a) (empty_right : βˆ€ {a}, P a βˆ…) (singletons : βˆ€ {a b}, P {a} {b}) (union_of : βˆ€ {a b c}, P a c β†’ P b c β†’ P (a βˆͺ b) c) : βˆ€ a b, P a b := by
intro a b refine Finset.induction_on b empty_right fun x s _xs hi => symm ?_ rw [Finset.insert_eq] apply union_of _ (symm hi) refine Finset.induction_on a empty_right fun a t _ta hi => symm ?_ rw [Finset.insert_eq] exact union_of singletons (symm hi)
import Mathlib.FieldTheory.Galois #align_import field_theory.polynomial_galois_group from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Polynomial open FiniteDimensional namespace Polynomial variable {F : Type*} [Field F] (p q : F[X]) (E : Type*) [...
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
74
79
theorem ext {Οƒ Ο„ : p.Gal} (h : βˆ€ x ∈ p.rootSet p.SplittingField, Οƒ x = Ο„ x) : Οƒ = Ο„ := by
refine AlgEquiv.ext fun x => (AlgHom.mem_equalizer Οƒ.toAlgHom Ο„.toAlgHom x).mp ((SetLike.ext_iff.mp ?_ x).mpr Algebra.mem_top) rwa [eq_top_iff, ← SplittingField.adjoin_rootSet, Algebra.adjoin_le_iff]
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.MeasureTheory.Function.SimpleFunc import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.Measure.Count import Mathlib.Topology.IndicatorConstPointwise import Mathlib.MeasureTheory.Constructions.BorelSpace.Real #align_import m...
Mathlib/MeasureTheory/Integral/Lebesgue.lean
708
720
theorem lintegral_const_mul' (r : ℝβ‰₯0∞) (f : Ξ± β†’ ℝβ‰₯0∞) (hr : r β‰  ∞) : ∫⁻ a, r * f a βˆ‚ΞΌ = r * ∫⁻ a, f a βˆ‚ΞΌ := by
by_cases h : r = 0 · simp [h] apply le_antisymm _ (lintegral_const_mul_le r f) have rinv : r * r⁻¹ = 1 := ENNReal.mul_inv_cancel h hr have rinv' : r⁻¹ * r = 1 := by rw [mul_comm] exact rinv have := lintegral_const_mul_le (μ := μ) r⁻¹ fun x => r * f x simp? [(mul_assoc _ _ _).symm, rinv'] at this ...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Function.LocallyIntegrable import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Group.Prod import Mathlib.Measure...
Mathlib/Analysis/Convolution.lean
1,380
1,385
theorem contDiffOn_convolution_left_with_param [ΞΌ.IsAddLeftInvariant] [ΞΌ.IsNegInvariant] (L : E' β†’L[π•œ] E β†’L[π•œ] F) {f : G β†’ E} {n : β„•βˆž} {g : P β†’ G β†’ E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k) (hgs : βˆ€ p, βˆ€ x, p ∈ s β†’ x βˆ‰ k β†’ g p x = 0) (hf : LocallyIntegrable f ΞΌ) (hg : ContDiffOn π•œ n ...
simpa only [convolution_flip] using contDiffOn_convolution_right_with_param L.flip hs hk hgs hf hg
import Mathlib.Topology.Order.ProjIcc import Mathlib.Topology.CompactOpen import Mathlib.Topology.UnitInterval #align_import topology.path_connected from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter unitInterval Set Fun...
Mathlib/Topology/Connected/PathConnected.lean
436
438
theorem map_id (Ξ³ : Path x y) : Ξ³.map continuous_id = Ξ³ := by
ext rfl
import Mathlib.Data.Set.Card import Mathlib.Order.Minimal import Mathlib.Data.Matroid.Init set_option autoImplicit true open Set def Matroid.ExchangeProperty {Ξ± : Type _} (P : Set Ξ± β†’ Prop) : Prop := βˆ€ X Y, P X β†’ P Y β†’ βˆ€ a ∈ X \ Y, βˆƒ b ∈ Y \ X, P (insert b (X \ {a})) def Matroid.ExistsMaximalSubsetProperty {...
Mathlib/Data/Matroid/Basic.lean
427
428
theorem not_finiteRk (M : Matroid Ξ±) [InfiniteRk M] : Β¬ FiniteRk M := by
intro h; obtain ⟨B,hB⟩ := M.exists_base; exact hB.infinite hB.finite
import Mathlib.Algebra.Regular.Basic import Mathlib.LinearAlgebra.Matrix.MvPolynomial import Mathlib.LinearAlgebra.Matrix.Polynomial import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matr...
Mathlib/LinearAlgebra/Matrix/Adjugate.lean
160
170
theorem sum_cramer_apply {Ξ²} (s : Finset Ξ²) (f : n β†’ Ξ² β†’ Ξ±) (i : n) : (βˆ‘ x ∈ s, cramer A (fun j => f j x) i) = cramer A (fun j : n => βˆ‘ x ∈ s, f j x) i := calc (βˆ‘ x ∈ s, cramer A (fun j => f j x) i) = (βˆ‘ x ∈ s, cramer A fun j => f j x) i := (Finset.sum_apply i s _).symm _ = cramer A (fun j : n => βˆ‘ ...
rw [sum_cramer, cramer_apply, cramer_apply] simp only [updateColumn] congr with j congr apply Finset.sum_apply
import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic #align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" noncomputable section open FiniteDimensional Complex open scoped ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
365
373
theorem oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero {x y : V} (ΞΈ : Real.Angle) : o.oangle x y = ΞΈ ↔ (x β‰  0 ∧ y β‰  0 ∧ βˆƒ r : ℝ, 0 < r ∧ y = r β€’ o.rotation ΞΈ x) ∨ ΞΈ = 0 ∧ (x = 0 ∨ y = 0) := by
by_cases hx : x = 0 Β· simp [hx, eq_comm] Β· by_cases hy : y = 0 Β· simp [hy, eq_comm] Β· rw [o.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero hx hy] simp [hx, hy]
import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.LinearAlgebra.Ray import Mathlib.Tactic.GCongr #align_import analysis.convex.segment from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963" ...
Mathlib/Analysis/Convex/Segment.lean
595
608
theorem Convex.mem_Ico (h : x < y) : z ∈ Ico x y ↔ βˆƒ a b, 0 < a ∧ 0 ≀ b ∧ a + b = 1 ∧ a * x + b * y = z := by
refine ⟨fun hz => ?_, ?_⟩ · obtain ⟨a, b, ha, hb, hab, rfl⟩ := (Convex.mem_Icc h.le).1 (Ico_subset_Icc_self hz) obtain rfl | ha' := ha.eq_or_lt · rw [zero_add] at hab rw [hab, one_mul, zero_mul, zero_add] at hz exact (hz.2.ne rfl).elim · exact ⟨a, b, ha', hb, hab, rfl⟩ · rintro ⟨a, b, ha,...
import Mathlib.LinearAlgebra.FreeModule.PID import Mathlib.MeasureTheory.Group.FundamentalDomain import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.RingTheory.Localization.Module #align_import algebra.module.zlattice from "leanprover-community/mathlib"@"a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3" n...
Mathlib/Algebra/Module/Zlattice/Basic.lean
419
452
theorem Zlattice.FG [hs : IsZlattice K L] : AddSubgroup.FG L := by
suffices (AddSubgroup.toIntSubmodule L).FG by exact (fg_iff_add_subgroup_fg _).mp this obtain ⟨s, ⟨h_incl, ⟨h_span, h_lind⟩⟩⟩ := exists_linearIndependent K (L : Set E) -- Let `s` be a maximal `K`-linear independent family of elements of `L`. We show that -- `L` is finitely generated (as a β„€-module) because it ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
404
408
theorem fderivWithin.comp_derivWithin_of_eq {t : Set F} (hl : DifferentiableWithinAt π•œ l t y) (hf : DifferentiableWithinAt π•œ f s x) (hs : MapsTo f s t) (hxs : UniqueDiffWithinAt π•œ s x) (hy : y = f x) : derivWithin (l ∘ f) s x = (fderivWithin π•œ l t (f x) : F β†’ E) (derivWithin f s x) := by
rw [hy] at hl; exact fderivWithin.comp_derivWithin x hl hf hs hxs
import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.Limits.Cones #align_import category_theory.limits.is_limit from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Functor Opposite ...
Mathlib/CategoryTheory/Limits/IsLimit.lean
309
311
theorem conePointsIsoOfNatIso_hom_comp {F G : J β₯€ C} {s : Cone F} {t : Cone G} (P : IsLimit s) (Q : IsLimit t) (w : F β‰… G) (j : J) : (conePointsIsoOfNatIso P Q w).hom ≫ t.Ο€.app j = s.Ο€.app j ≫ w.hom.app j := by
simp
import Mathlib.Logic.Nonempty import Mathlib.Init.Set import Mathlib.Logic.Basic #align_import logic.function.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Function universe u v w namespace Function section variable {Ξ± Ξ² Ξ³ : Sort*} {f : Ξ± β†’ Ξ²} @[reducible, simp] de...
Mathlib/Logic/Function/Basic.lean
691
694
theorem update_idem {Ξ±} [DecidableEq Ξ±] {Ξ² : Ξ± β†’ Sort*} {a : Ξ±} (v w : Ξ² a) (f : βˆ€ a, Ξ² a) : update (update f a v) a w = update f a w := by
funext b by_cases h : b = a <;> simp [update, h]
import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f" noncomputable section open scoped Classical open Topology ENNReal MeasureTheory NNReal open Set Filter TopologicalSpace ENNReal EMetric Meas...
Mathlib/MeasureTheory/Function/L1Space.lean
604
608
theorem integrable_map_measure {f : Ξ± β†’ Ξ΄} {g : Ξ΄ β†’ Ξ²} (hg : AEStronglyMeasurable g (Measure.map f ΞΌ)) (hf : AEMeasurable f ΞΌ) : Integrable g (Measure.map f ΞΌ) ↔ Integrable (g ∘ f) ΞΌ := by
simp_rw [← memβ„’p_one_iff_integrable] exact memβ„’p_map_measure_iff hg hf
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
506
508
theorem measurableSet_graph (hf : Measurable f) : MeasurableSet { p : Ξ± Γ— ℝ | p.snd = f p.fst } := by
simpa using measurableSet_region_between_cc hf hf MeasurableSet.univ
import Mathlib.Data.List.Nodup import Mathlib.Data.List.Zip import Mathlib.Data.Nat.Defs import Mathlib.Data.List.Infix #align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" universe u variable {Ξ± : Type u} open Nat Function namespace List theorem rotate...
Mathlib/Data/List/Rotate.lean
572
573
theorem length_cyclicPermutations_cons (x : Ξ±) (l : List Ξ±) : length (cyclicPermutations (x :: l)) = length l + 1 := by
simp [cyclicPermutations_cons]
import Mathlib.Geometry.Manifold.MFDeriv.Defs #align_import geometry.manifold.mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Topology Manifold open Set Bundle section DerivativesProperties variable {π•œ : Type*} [NontriviallyNormedFiel...
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
704
708
theorem HasMFDerivAt.comp_hasMFDerivWithinAt (hg : HasMFDerivAt I' I'' g (f x) g') (hf : HasMFDerivWithinAt I I' f s x f') : HasMFDerivWithinAt I I'' (g ∘ f) s x (g'.comp f') := by
rw [← hasMFDerivWithinAt_univ] at * exact HasMFDerivWithinAt.comp x (hg.mono (subset_univ _)) hf subset_preimage_univ
import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.Subgroup.Simple import Mathlib.Tactic.Group import Mathlib.GroupTheory.Exponent #align_import group_theory.specific_groups.cyclic from "leanprover-community/mathli...
Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
606
626
theorem prime_card [Fintype Ξ±] : (Fintype.card Ξ±).Prime := by
have h0 : 0 < Fintype.card α := Fintype.card_pos_iff.2 (by infer_instance) obtain ⟨g, hg⟩ := IsCyclic.exists_generator (α := α) rw [Nat.prime_def_lt''] refine ⟨Fintype.one_lt_card_iff_nontrivial.2 inferInstance, fun n hn => ?_⟩ refine (IsSimpleOrder.eq_bot_or_eq_top (Subgroup.zpowers (g ^ n))).symm.imp ?_ ?_...
import Mathlib.Logic.Function.Iterate import Mathlib.Init.Data.Int.Order import Mathlib.Order.Compare import Mathlib.Order.Max import Mathlib.Order.RelClasses import Mathlib.Tactic.Choose #align_import order.monotone.basic from "leanprover-community/mathlib"@"554bb38de8ded0dafe93b7f18f0bfee6ef77dc5d" open Functio...
Mathlib/Order/Monotone/Basic.lean
1,014
1,018
theorem Nat.rel_of_forall_rel_succ_of_le_of_lt (r : Ξ² β†’ Ξ² β†’ Prop) [IsTrans Ξ² r] {f : β„• β†’ Ξ²} {a : β„•} (h : βˆ€ n, a ≀ n β†’ r (f n) (f (n + 1))) ⦃b c : ℕ⦄ (hab : a ≀ b) (hbc : b < c) : r (f b) (f c) := by
induction' hbc with k b_lt_k r_b_k exacts [h _ hab, _root_.trans r_b_k (h _ (hab.trans_lt b_lt_k).le)]
import Mathlib.NumberTheory.Cyclotomic.Discriminant import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral import Mathlib.RingTheory.Ideal.Norm #align_import number_theory.cyclotomic.rat from "leanprover-community/mathlib"@"b353176c24d96c23f0ce1cc63efc3f55019702d9" universe u open Algebra IsCyclotomicExtensio...
Mathlib/NumberTheory/Cyclotomic/Rat.lean
429
464
theorem not_exists_int_prime_dvd_sub_of_prime_pow_ne_two [hcycl : IsCyclotomicExtension {p ^ (k + 1)} β„š K] (hΞΆ : IsPrimitiveRoot ΞΆ ↑(p ^ (k + 1))) (htwo : p ^ (k + 1) β‰  2) : Β¬(βˆƒ n : β„€, (p : π“ž K) ∣ (hΞΆ.toInteger - n : π“ž K)) := by
intro ⟨n, x, h⟩ -- Let `pB` be the power basis of `π“ž K` given by powers of `ΞΆ`. let pB := hΞΆ.integralPowerBasis have hdim : pB.dim = ↑p ^ k * (↑p - 1) := by simp [integralPowerBasis_dim, pB, Nat.totient_prime_pow hp.1 (Nat.zero_lt_succ k)] replace hdim : 1 < pB.dim := by rw [Nat.one_lt_iff_ne_zero_a...
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Projection import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.RingTheory.I...
Mathlib/LinearAlgebra/Dual.lean
1,844
1,846
theorem dualDistribInvOfBasis_apply (b : Basis ΞΉ R M) (c : Basis ΞΊ R N) (f : Dual R (M βŠ—[R] N)) : dualDistribInvOfBasis b c f = βˆ‘ i, βˆ‘ j, f (b i βŠ—β‚œ c j) β€’ b.dualBasis i βŠ—β‚œ c.dualBasis j := by
simp [dualDistribInvOfBasis]
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal va...
Mathlib/MeasureTheory/Decomposition/Jordan.lean
196
212
theorem exists_compl_positive_negative : βˆƒ S : Set Ξ±, MeasurableSet S ∧ j.toSignedMeasure ≀[S] 0 ∧ 0 ≀[Sᢜ] j.toSignedMeasure ∧ j.posPart S = 0 ∧ j.negPart Sᢜ = 0 := by
obtain ⟨S, hS₁, hSβ‚‚, hSβ‚ƒβŸ© := j.mutuallySingular refine ⟨S, hS₁, ?_, ?_, hSβ‚‚, hSβ‚ƒβŸ© Β· refine restrict_le_restrict_of_subset_le _ _ fun A hA hA₁ => ?_ rw [toSignedMeasure, toSignedMeasure_sub_apply hA, show j.posPart A = 0 from nonpos_iff_eq_zero.1 (hSβ‚‚ β–Έ measure_mono hA₁), ENNReal.zero_toReal, zero...
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Polynomial.Eval import Mathlib.GroupTheory.GroupAction.Ring #align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" noncomputable section open Finset open Polynomial namespace Pol...
Mathlib/Algebra/Polynomial/Derivative.lean
659
661
theorem derivative_X_sub_C_pow (c : R) (m : β„•) : derivative ((X - C c) ^ m) = C (m : R) * (X - C c) ^ (m - 1) := by
rw [derivative_pow, derivative_X_sub_C, mul_one]
import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Dimension.Constructions open Cardinal Submodule Set FiniteDimensional universe u v namespace Subalgebra variable {F E : Type*} [CommRing F] [StrongRankCondition F] [Ring E] [Algebra F E] {S : Subalgebra F E} theorem eq_bot_of_rank_le_o...
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
277
280
theorem eq_bot_of_finrank_one (h : finrank F S = 1) [Module.Free F S] : S = βŠ₯ := by
refine Subalgebra.eq_bot_of_rank_le_one ?_ rw [finrank, toNat_eq_one] at h rw [h]
import Mathlib.Topology.Category.TopCat.OpenNhds import Mathlib.Topology.Sheaves.Presheaf import Mathlib.Topology.Sheaves.SheafCondition.UniqueGluing import Mathlib.CategoryTheory.Adjunction.Evaluation import Mathlib.CategoryTheory.Limits.Types import Mathlib.CategoryTheory.Limits.Preserves.Filtered import Mathlib.Cat...
Mathlib/Topology/Sheaves/Stalks.lean
354
358
theorem stalkSpecializes_stalkFunctor_map {F G : X.Presheaf C} (f : F ⟢ G) {x y : X} (h : x β€³ y) : F.stalkSpecializes h ≫ (stalkFunctor C x).map f = (stalkFunctor C y).map f ≫ G.stalkSpecializes h := by
change (_ : colimit _ ⟢ _) = (_ : colimit _ ⟢ _) ext; delta stalkFunctor; simpa [stalkSpecializes] using by rfl
import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise #align_import combinatorics.simple_graph.clique from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" open Finset Fintype Function SimpleGraph.Walk...
Mathlib/Combinatorics/SimpleGraph/Clique.lean
523
528
theorem cliqueSet_map_of_equiv (G : SimpleGraph Ξ±) (e : Ξ± ≃ Ξ²) (n : β„•) : (G.map e.toEmbedding).cliqueSet n = map e.toEmbedding '' G.cliqueSet n := by
obtain rfl | hn := eq_or_ne n 1 Β· ext simp [e.exists_congr_left] Β· exact cliqueSet_map hn _ _
import Mathlib.MeasureTheory.Integral.Lebesgue import Mathlib.Analysis.MeanInequalities import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic #align_import measure_theory.integral.mean_inequalities from "leanprover-community/mathlib"@"13bf7613c96a9fd66a81b9020a82cad9...
Mathlib/MeasureTheory/Integral/MeanInequalities.lean
141
147
theorem lintegral_mul_eq_zero_of_lintegral_rpow_eq_zero {p : ℝ} (hp0 : 0 ≀ p) {f g : Ξ± β†’ ℝβ‰₯0∞} (hf : AEMeasurable f ΞΌ) (hf_zero : ∫⁻ a, f a ^ p βˆ‚ΞΌ = 0) : (∫⁻ a, (f * g) a βˆ‚ΞΌ) = 0 := by
rw [← @lintegral_zero_fun Ξ± _ ΞΌ] refine lintegral_congr_ae ?_ suffices h_mul_zero : f * g =ᡐ[ΞΌ] 0 * g by rwa [zero_mul] at h_mul_zero have hf_eq_zero : f =ᡐ[ΞΌ] 0 := ae_eq_zero_of_lintegral_rpow_eq_zero hp0 hf hf_zero exact hf_eq_zero.mul (ae_eq_refl g)
import Mathlib.Analysis.Calculus.Deriv.AffineMap import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.LocalExtr.Rolle import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.RCLike.Basic #align_import...
Mathlib/Analysis/Calculus/MeanValue.lean
1,100
1,118
theorem hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hder : βˆ€αΆ  y in 𝓝 x, HasFDerivAt f (f' y) y) (hcont : ContinuousAt f' x) : HasStrictFDerivAt f (f' x) x := by
-- turn little-o definition of strict_fderiv into an epsilon-delta statement refine isLittleO_iff.mpr fun c hc => Metric.eventually_nhds_iff_ball.mpr ?_ -- the correct Ρ is the modulus of continuity of f' rcases Metric.mem_nhds_iff.mp (inter_mem hder (hcont <| ball_mem_nhds _ hc)) with ⟨Ρ, Ρ0, hΡ⟩ refine ⟨Ρ,...
import Mathlib.Init.Algebra.Classes import Mathlib.Logic.Nontrivial.Basic import Mathlib.Order.BoundedOrder import Mathlib.Data.Option.NAry import Mathlib.Tactic.Lift import Mathlib.Data.Option.Basic #align_import order.with_bot from "leanprover-community/mathlib"@"0111834459f5d7400215223ea95ae38a1265a907" variabl...
Mathlib/Order/WithBot.lean
276
280
theorem unbot'_le_iff {a : WithBot Ξ±} {b c : Ξ±} (h : a = βŠ₯ β†’ b ≀ c) : a.unbot' b ≀ c ↔ a ≀ c := by
induction a Β· simpa using h rfl Β· simp
import Mathlib.Topology.Category.TopCat.Limits.Products #align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open TopologicalSpace open Cat...
Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
406
421
theorem pullback_snd_image_fst_preimage (f : X ⟢ Z) (g : Y ⟢ Z) (U : Set X) : (pullback.snd : pullback f g ⟢ _) '' ((pullback.fst : pullback f g ⟢ _) ⁻¹' U) = g ⁻¹' (f '' U) := by
ext x constructor · rintro ⟨(y : (forget TopCat).obj _), hy, rfl⟩ exact ⟨(pullback.fst : pullback f g ⟢ _) y, hy, ConcreteCategory.congr_hom pullback.condition y⟩ · rintro ⟨y, hy, eq⟩ -- next 5 lines were -- `exact ⟨(TopCat.pullbackIsoProdSubtype f g).inv ⟨⟨_, _⟩, eq⟩, by simpa, by simp⟩` before ...
import Mathlib.Order.Filter.Basic import Mathlib.Topology.Bases import Mathlib.Data.Set.Accumulate import Mathlib.Topology.Bornology.Basic import Mathlib.Topology.LocallyFinite open Set Filter Topology TopologicalSpace Classical Function universe u v variable {X : Type u} {Y : Type v} {ΞΉ : Type*} variable [Topolog...
Mathlib/Topology/Compactness/Compact.lean
1,010
1,013
theorem Inducing.isCompact_preimage {f : X β†’ Y} (hf : Inducing f) (hf' : IsClosed (range f)) {K : Set Y} (hK : IsCompact K) : IsCompact (f ⁻¹' K) := by
replace hK := hK.inter_right hf' rwa [hf.isCompact_iff, image_preimage_eq_inter_range]
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Pullbacks #align_import category_theory.limits.constructions.epi_mono from "leanprover-community/mathlib"@"f7baecbb54bd0f24f228576f97b1752fc3c9b318" ...
Mathlib/CategoryTheory/Limits/Constructions/EpiMono.lean
58
62
theorem preserves_epi_of_preservesColimit {X Y : C} (f : X ⟢ Y) [PreservesColimit (span f f) F] [Epi f] : Epi (F.map f) := by
have := isColimitPushoutCoconeMapOfIsColimit F _ (PushoutCocone.isColimitMkIdId f) simp_rw [F.map_id] at this apply PushoutCocone.epi_of_isColimitMkIdId _ this
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheor...
Mathlib/CategoryTheory/Abelian/Opposite.lean
181
183
theorem factorThruImage_comp_imageUnopOp_inv : factorThruImage g ≫ (imageUnopOp g).inv = (image.ΞΉ g.unop).op := by
rw [Iso.comp_inv_eq, image_ΞΉ_op_comp_imageUnopOp_hom]
import Mathlib.Algebra.Algebra.Bilinear import Mathlib.RingTheory.Localization.Basic #align_import algebra.module.localized_module from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86" namespace LocalizedModule universe u v variable {R : Type u} [CommSemiring R] (S : Submonoid R) variab...
Mathlib/Algebra/Module/LocalizedModule.lean
339
345
theorem mk'_smul_mk (r : R) (m : M) (s s' : S) : IsLocalization.mk' T r s β€’ mk m s' = mk (r β€’ m) (s * s') := by
rw [smul_def, mk_eq] obtain ⟨c, hc⟩ := IsLocalization.eq.mp <| IsLocalization.mk'_sec T (IsLocalization.mk' T r s) use c simp_rw [← mul_smul, Submonoid.smul_def, Submonoid.coe_mul, ← mul_smul, ← mul_assoc, mul_comm _ (s':R), mul_assoc, hc]
import Mathlib.Data.Set.Function import Mathlib.Analysis.BoundedVariation #align_import analysis.constant_speed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped NNReal ENNReal open Set MeasureTheory Classical variable {Ξ± : Type*} [LinearOrder Ξ±] {E : Type*} [PseudoEMetr...
Mathlib/Analysis/ConstantSpeed.lean
176
190
theorem HasConstantSpeedOnWith.ratio {l' : ℝβ‰₯0} (hl' : l' β‰  0) {Ο† : ℝ β†’ ℝ} (Ο†m : MonotoneOn Ο† s) (hfΟ† : HasConstantSpeedOnWith (f ∘ Ο†) s l) (hf : HasConstantSpeedOnWith f (Ο† '' s) l') ⦃x : ℝ⦄ (xs : x ∈ s) : EqOn Ο† (fun y => l / l' * (y - x) + Ο† x) s := by
rintro y ys rw [← sub_eq_iff_eq_add, mul_comm, ← mul_div_assoc, eq_div_iff (NNReal.coe_ne_zero.mpr hl')] rw [hasConstantSpeedOnWith_iff_variationOnFromTo_eq] at hf rw [hasConstantSpeedOnWith_iff_variationOnFromTo_eq] at hfΟ† symm calc (y - x) * l = l * (y - x) := by rw [mul_comm] _ = variationOnFrom...
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.MeasureTheory.Decomposition.RadonNikodym #align_import measure_theory.function.conditional_expectation.real from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean
230
256
theorem condexp_stronglyMeasurable_simpleFunc_mul (hm : m ≀ m0) (f : @SimpleFunc Ξ± m ℝ) {g : Ξ± β†’ ℝ} (hg : Integrable g ΞΌ) : ΞΌ[(f * g : Ξ± β†’ ℝ)|m] =ᡐ[ΞΌ] f * ΞΌ[g|m] := by
have : βˆ€ (s c) (f : Ξ± β†’ ℝ), Set.indicator s (Function.const Ξ± c) * f = s.indicator (c β€’ f) := by intro s c f ext1 x by_cases hx : x ∈ s Β· simp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul, Function.const_apply] Β· simp only [hx, Pi.mul_apply, Set.indi...
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.SuccPred import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Topology.Instances.Discrete import Mathlib.Topology.MetricSpace.Bounded import Mathlib.Order.Filter.Archimedean #align_import topology.instances.int from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/Int.lean
84
85
theorem cofinite_eq : (cofinite : Filter β„€) = atBot βŠ” atTop := by
rw [← cocompact_eq_cofinite, cocompact_eq_atBot_atTop]
import Mathlib.AlgebraicTopology.DoldKan.PInfty #align_import algebraic_topology.dold_kan.decomposition from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Preadditive Opposite Simplicial noncomputable section namespace Alge...
Mathlib/AlgebraicTopology/DoldKan/Decomposition.lean
120
124
theorem id_Ο† : (id X n).Ο† = πŸ™ _ := by
simp only [← P_add_Q_f (n + 1) (n + 1), Ο†] congr 1 Β· simp only [id, PInfty_f, P_f_idem] Β· exact Eq.trans (by congr; simp) (decomposition_Q n (n + 1)).symm
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Perm import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {...
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
1,047
1,061
theorem product_self_eq_disjiUnion_perm_aux (hf : f.IsCycleOn s) : (range s.card : Set β„•).PairwiseDisjoint fun k => s.map ⟨fun i => (i, (f ^ k) i), fun i j => congr_arg Prod.fst⟩ := by
obtain hs | _ := (s : Set Ξ±).subsingleton_or_nontrivial Β· refine Set.Subsingleton.pairwise ?_ _ simp_rw [Set.Subsingleton, mem_coe, ← card_le_one] at hs ⊒ rwa [card_range] classical rintro m hm n hn hmn simp only [disjoint_left, Function.onFun, mem_map, Function.Embedding.coeFn_mk, exists_prop, ...
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular import Mathlib.Topology.Category.CompHaus.EffectiveEpi import Mathlib.Topology.Category.Stonean.Limits import Mathlib.Topology.Category.CompHaus.EffectiveEpi universe u open CategoryTheory Limits namespace Stonean noncomputable def struct {B X : St...
Mathlib/Topology/Category/Stonean/EffectiveEpi.lean
103
121
theorem effectiveEpiFamily_tfae {Ξ± : Type} [Finite Ξ±] {B : Stonean.{u}} (X : Ξ± β†’ Stonean.{u}) (Ο€ : (a : Ξ±) β†’ (X a ⟢ B)) : TFAE [ EffectiveEpiFamily X Ο€ , Epi (Sigma.desc Ο€) , βˆ€ b : B, βˆƒ (a : Ξ±) (x : X a), Ο€ a x = b ] := by
tfae_have 2 β†’ 1 Β· intro simpa [← effectiveEpi_desc_iff_effectiveEpiFamily, (effectiveEpi_tfae (Sigma.desc Ο€)).out 0 1] tfae_have 1 β†’ 2 Β· intro; infer_instance tfae_have 3 ↔ 1 Β· erw [((CompHaus.effectiveEpiFamily_tfae (fun a ↦ Stonean.toCompHaus.obj (X a)) (fun a ↦ Stonean.toCompHaus.map (Ο€ a))).o...
import Batteries.Control.ForInStep.Lemmas import Batteries.Data.List.Basic import Batteries.Tactic.Init import Batteries.Tactic.Alias namespace List open Nat @[simp] theorem mem_toArray {a : Ξ±} {l : List Ξ±} : a ∈ l.toArray ↔ a ∈ l := by simp [Array.mem_def] @[simp] theorem drop_one : βˆ€ l : List Ξ±, drop 1 l =...
.lake/packages/batteries/Batteries/Data/List/Lemmas.lean
1,344
1,345
theorem range'_concat (s n : Nat) : range' s (n + 1) step = range' s n step ++ [s + step * n] := by
rw [Nat.add_comm n 1]; exact (range'_append s n 1 step).symm
import Mathlib.Data.Prod.PProd import Mathlib.Data.Set.Countable import Mathlib.Order.Filter.Prod import Mathlib.Order.Filter.Ker #align_import order.filter.bases from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207" set_option autoImplicit true open Set Filter open scoped Classical ope...
Mathlib/Order/Filter/Bases.lean
770
771
theorem HasBasis.eq_iInf (h : l.HasBasis (fun _ => True) s) : l = β¨… i, π“Ÿ (s i) := by
simpa only [iInf_true] using h.eq_biInf
import Mathlib.Probability.Variance #align_import probability.moments from "leanprover-community/mathlib"@"85453a2a14be8da64caf15ca50930cf4c6e5d8de" open MeasureTheory Filter Finset Real noncomputable section open scoped MeasureTheory ProbabilityTheory ENNReal NNReal namespace ProbabilityTheory variable {Ξ© ΞΉ ...
Mathlib/Probability/Moments.lean
73
77
theorem centralMoment_one' [IsFiniteMeasure ΞΌ] (h_int : Integrable X ΞΌ) : centralMoment X 1 ΞΌ = (1 - (ΞΌ Set.univ).toReal) * ΞΌ[X] := by
simp only [centralMoment, Pi.sub_apply, pow_one] rw [integral_sub h_int (integrable_const _)] simp only [sub_mul, integral_const, smul_eq_mul, one_mul]
import Mathlib.Algebra.Homology.ImageToKernel #align_import algebra.homology.exact from "leanprover-community/mathlib"@"3feb151caefe53df080ca6ca67a0c6685cfd1b82" universe v vβ‚‚ u uβ‚‚ open CategoryTheory CategoryTheory.Limits variable {V : Type u} [Category.{v} V] variable [HasImages V] namespace CategoryTheory ...
Mathlib/Algebra/Homology/Exact.lean
189
193
theorem exact_epi_comp (hgh : Exact g h) [Epi f] : Exact (f ≫ g) h := by
refine ⟨by simp [hgh.w], ?_⟩ rw [imageToKernel_comp_left] · haveI := hgh.epi infer_instance
import Mathlib.Data.Nat.Choose.Factorization import Mathlib.NumberTheory.Primorial import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.Convex.SpecificFunctions.Deriv import Mathlib.Tactic.NormNum.Prime #align_import number_theory.bertrand from "leanprover-community/mathlib"@"a16665637b37837...
Mathlib/NumberTheory/Bertrand.lean
208
212
theorem exists_prime_lt_and_le_two_mul_succ {n} (q) {p : β„•} (prime_p : Nat.Prime p) (covering : p ≀ 2 * q) (H : n < q β†’ βˆƒ p : β„•, p.Prime ∧ n < p ∧ p ≀ 2 * n) (hn : n < p) : βˆƒ p : β„•, p.Prime ∧ n < p ∧ p ≀ 2 * n := by
by_cases h : p ≀ 2 * n; Β· exact ⟨p, prime_p, hn, h⟩ exact H (lt_of_mul_lt_mul_left' (lt_of_lt_of_le (not_le.1 h) covering))
import Mathlib.CategoryTheory.Sites.Sieves #align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe w v₁ vβ‚‚ u₁ uβ‚‚ namespace CategoryTheory open Opposite CategoryTheory Category Limits Sieve namespace Presieve variable {C : Type ...
Mathlib/CategoryTheory/Sites/IsSheafFor.lean
246
252
theorem extend_restrict {x : FamilyOfElements P (generate R)} (t : x.Compatible) : (x.restrict (le_generate R)).sieveExtend = x := by
rw [compatible_iff_sieveCompatible] at t funext _ _ h apply (t _ _ _).symm.trans congr exact h.choose_spec.choose_spec.choose_spec.2
import Mathlib.Analysis.Convolution import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup import Mathlib.Analysis.Analytic.IsolatedZeros import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.special_functions.gamma.beta from "l...
Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
450
468
theorem Gamma_ne_zero {s : β„‚} (hs : βˆ€ m : β„•, s β‰  -m) : Gamma s β‰  0 := by
by_cases h_im : s.im = 0 Β· have : s = ↑s.re := by conv_lhs => rw [← Complex.re_add_im s] rw [h_im, ofReal_zero, zero_mul, add_zero] rw [this, Gamma_ofReal, ofReal_ne_zero] refine Real.Gamma_ne_zero fun n => ?_ specialize hs n contrapose! hs rwa [this, ← ofReal_natCast, ← ofReal_neg,...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Log import Mathlib.Data.List.Indexes import Mathlib.Data.List.Palindrome import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith impo...
Mathlib/Data/Nat/Digits.lean
63
67
theorem digitsAux_def (b : β„•) (h : 2 ≀ b) (n : β„•) (w : 0 < n) : digitsAux b h n = (n % b) :: digitsAux b h (n / b) := by
cases n Β· cases w Β· rw [digitsAux]
import Mathlib.Algebra.Module.MinimalAxioms import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Topolo...
Mathlib/Topology/ContinuousFunction/Bounded.lean
1,467
1,471
theorem NNReal.upper_bound {Ξ± : Type*} [TopologicalSpace Ξ±] (f : Ξ± →ᡇ ℝβ‰₯0) (x : Ξ±) : f x ≀ nndist f 0 := by
have key : nndist (f x) ((0 : Ξ± →ᡇ ℝβ‰₯0) x) ≀ nndist f 0 := @dist_coe_le_dist Ξ± ℝβ‰₯0 _ _ f 0 x simp only [coe_zero, Pi.zero_apply] at key rwa [NNReal.nndist_zero_eq_val' (f x)] at key
import Mathlib.Data.Finsupp.Multiset import Mathlib.Order.Bounded import Mathlib.SetTheory.Cardinal.PartENat import Mathlib.SetTheory.Ordinal.Principal import Mathlib.Tactic.Linarith #align_import set_theory.cardinal.ordinal from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f" noncomputa...
Mathlib/SetTheory/Cardinal/Ordinal.lean
269
270
theorem aleph_succ {o : Ordinal} : aleph (succ o) = succ (aleph o) := by
rw [aleph, add_succ, aleph'_succ, aleph]
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
100
103
theorem lcm_congr {f g : Ξ² β†’ Ξ±} (hs : s₁ = sβ‚‚) (hfg : βˆ€ a ∈ sβ‚‚, f a = g a) : s₁.lcm f = sβ‚‚.lcm g := by
subst hs exact Finset.fold_congr hfg
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.List.Perm import Mathlib.Data.List.Range #align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6" universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Nat namespace List @[simp] theo...
Mathlib/Data/List/Sublists.lean
422
428
theorem sublists_perm_sublists' (l : List Ξ±) : sublists l ~ sublists' l := by
rw [← finRange_map_get l, sublists_map, sublists'_map] apply Perm.map apply (perm_ext_iff_of_nodup _ _).mpr Β· simp Β· exact nodup_sublists.mpr (nodup_finRange _) Β· exact (nodup_sublists'.mpr (nodup_finRange _))