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) 2019 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.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import ...
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
947
952
theorem iteratedFDeriv_clm_apply_const_apply {n : โ„•โˆž} {c : E โ†’ F โ†’L[๐•œ] G} (hc : ContDiff ๐•œ n c) {i : โ„•} (hi : i โ‰ค n) {x : E} {u : F} {m : Fin i โ†’ E} : (iteratedFDeriv ๐•œ i (fun y โ†ฆ (c y) u) x) m = (iteratedFDeriv ๐•œ i c x) m u := by
simp only [โ† iteratedFDerivWithin_univ] exact iteratedFDerivWithin_clm_apply_const_apply uniqueDiffOn_univ hc.contDiffOn hi (mem_univ _)
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.BigOperators.Group.List import Mathlib.Algebra.Group.InjSurj import Mathlib.Data.List.FinRange import Mathlib.Algebra.Group.Action.Defs import Mathli...
Mathlib/Algebra/GradedMonoid.lean
461
464
theorem GradedMonoid.list_prod_ofFn_eq_dProd {n : โ„•} (f : Fin n โ†’ GradedMonoid A) : (List.ofFn f).prod = GradedMonoid.mk _ ((List.finRange n).dProd (fun i => (f i).1) fun i => (f i).2) := by
rw [List.ofFn_eq_map, GradedMonoid.list_prod_map_eq_dProd]
/- 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.Algebra.Group.Indicator import Mathlib.Data.Finset.Piecewise import Mathlib.Data.Finset.Preimage #align_import algebra.big_operators.basic from "leanp...
Mathlib/Algebra/BigOperators/Group/Finset.lean
2,147
2,149
theorem prod_erase_eq_div {a : ฮฑ} (h : a โˆˆ s) : โˆ x โˆˆ s.erase a, f x = (โˆ x โˆˆ s, f x) / f a := by
rw [eq_div_iff_mul_eq', prod_erase_mul _ _ h]
/- 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
201
209
theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) : 0 < index (K : Set G) V := by
unfold index; rw [Nat.sInf_def, Nat.find_pos, mem_image] ยท rintro โŸจt, h1t, h2tโŸฉ; rw [Finset.card_eq_zero] at h2t; subst h2t obtain โŸจg, hgโŸฉ := K.interior_nonempty show g โˆˆ (โˆ… : Set G) convert h1t (interior_subset hg); symm simp only [Finset.not_mem_empty, iUnion_of_empty, iUnion_empty] ยท exact ind...
/- Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Init.Order.Defs #align_import init.algebra.functions from "leanprover-community/lean"@"c2bcdbcbe741ed37c361a30d38e179182b989f...
Mathlib/Init/Order/LinearOrder.lean
54
58
theorem le_max_left (a b : ฮฑ) : a โ‰ค max a b := by
-- Porting note: no `min_tac` tactic if h : a โ‰ค b then simp [max_def, if_pos h]; exact h else simp [max_def, if_neg h, le_refl]
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.LinearAlgebra.TensorProduct.Graded.Internal import Mathlib.LinearAlgebra.QuadraticForm.Prod /-! # Cliff...
Mathlib/LinearAlgebra/CliffordAlgebra/Prod.lean
101
104
theorem map_mul_map_eq_neg_of_isOrtho_of_mem_evenOdd_one (hmโ‚ : mโ‚ โˆˆ evenOdd Qโ‚ 1) (hmโ‚‚ : mโ‚‚ โˆˆ evenOdd Qโ‚‚ 1) : map fโ‚ mโ‚ * map fโ‚‚ mโ‚‚ = - map fโ‚‚ mโ‚‚ * map fโ‚ mโ‚ := by
simp [map_mul_map_of_isOrtho_of_mem_evenOdd _ _ hf _ _ hmโ‚ hmโ‚‚]
/- Copyright (c) 2021 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Subgraph import Mathlib.Data.List.Rotate #align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"...
Mathlib/Combinatorics/SimpleGraph/Connectivity.lean
592
592
theorem start_mem_support {u v : V} (p : G.Walk u v) : u โˆˆ p.support := by
cases p <;> simp
/- 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.Upcrossing import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.MeasureTheory.Constructions.Polish #align_import pr...
Mathlib/Probability/Martingale/Convergence.lean
186
190
theorem Submartingale.upcrossings_ae_lt_top [IsFiniteMeasure ฮผ] (hf : Submartingale f โ„ฑ ฮผ) (hbdd : โˆ€ n, snorm (f n) 1 ฮผ โ‰ค R) : โˆ€แต ฯ‰ โˆ‚ฮผ, โˆ€ a b : โ„š, a < b โ†’ upcrossings a b f ฯ‰ < โˆž := by
simp only [ae_all_iff, eventually_imp_distrib_left] rintro a b hab exact hf.upcrossings_ae_lt_top' hbdd (Rat.cast_lt.2 hab)
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kevin Buzzard -/ import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.GeomSum import Mathlib.Data.Fintype.BigOperators import Mathlib.RingTheory.P...
Mathlib/NumberTheory/Bernoulli.lean
78
80
theorem bernoulli'_def (n : โ„•) : bernoulli' n = 1 - โˆ‘ k โˆˆ range n, n.choose k / (n - k + 1) * bernoulli' k := by
rw [bernoulli'_def', โ† Fin.sum_univ_eq_sum_range]
/- 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.Constructions.Prod.Basic import Mathlib.MeasureTheory.Group.Measure import Mathlib.Topology.Constructions #align_import measure_theo...
Mathlib/MeasureTheory/Constructions/Pi.lean
278
284
theorem pi'_pi [โˆ€ i, SigmaFinite (ฮผ i)] (s : โˆ€ i, Set (ฮฑ i)) : pi' ฮผ (pi univ s) = โˆ i, ฮผ i (s i) := by
rw [pi'] rw [โ† MeasurableEquiv.piMeasurableEquivTProd_symm_apply, MeasurableEquiv.map_apply, MeasurableEquiv.piMeasurableEquivTProd_symm_apply, elim_preimage_pi, tprod_tprod _ ฮผ, โ† List.prod_toFinset, sortedUniv_toFinset] <;> exact sortedUniv_nodup ฮน
/- Copyright (c) 2021 Alex Kontorovich and Heather Macbeth and Marc Masdeu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Kontorovich, Heather Macbeth, Marc Masdeu -/ import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.GeneralLinearG...
Mathlib/NumberTheory/Modular.lean
258
276
theorem tendsto_abs_re_smul {p : Fin 2 โ†’ โ„ค} (hp : IsCoprime (p 0) (p 1)) : Tendsto (fun g : { g : SL(2, โ„ค) // (โ†‘โ‚˜g) 1 = p } => |((g : SL(2, โ„ค)) โ€ข z).re|) cofinite atTop := by
suffices Tendsto (fun g : (fun g : SL(2, โ„ค) => (โ†‘โ‚˜g) 1) โปยน' {p} => ((g : SL(2, โ„ค)) โ€ข z).re) cofinite (cocompact โ„) by exact tendsto_norm_cocompact_atTop.comp this have : ((p 0 : โ„) ^ 2 + (p 1 : โ„) ^ 2)โปยน โ‰  0 := by apply inv_ne_zero exact mod_cast hp.sq_add_sq_ne_zero let f := Homeomorph.mul...
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yaรซl Dillies, Moritz Doll -/ import Mathlib.Data.Real.Pointwise import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Data.Real.Sqrt #al...
Mathlib/Analysis/Seminorm.lean
783
787
theorem ball_add_ball_subset (p : Seminorm ๐•œ E) (rโ‚ rโ‚‚ : โ„) (xโ‚ xโ‚‚ : E) : p.ball (xโ‚ : E) rโ‚ + p.ball (xโ‚‚ : E) rโ‚‚ โІ p.ball (xโ‚ + xโ‚‚) (rโ‚ + rโ‚‚) := by
rintro x โŸจyโ‚, hyโ‚, yโ‚‚, hyโ‚‚, rflโŸฉ rw [mem_ball, add_sub_add_comm] exact (map_add_le_add p _ _).trans_lt (add_lt_add hyโ‚ hyโ‚‚)
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic #align_import data.qpf.multivariate.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e31...
Mathlib/Data/QPF/Multivariate/Basic.lean
164
177
theorem mem_supp {ฮฑ : TypeVec n} (x : F ฮฑ) (i) (u : ฮฑ i) : u โˆˆ supp x i โ†” โˆ€ a f, abs โŸจa, fโŸฉ = x โ†’ u โˆˆ f i '' univ := by
rw [supp]; dsimp; constructor ยท intro h a f haf have : LiftP (fun i u => u โˆˆ f i '' univ) x := by rw [liftP_iff] refine โŸจa, f, haf.symm, ?_โŸฉ intro i u exact mem_image_of_mem _ (mem_univ _) exact h this intro h p; rw [liftP_iff] rintro โŸจa, f, xeq, h'โŸฉ rcases h a f xeq.symm with...
/- Copyright (c) 2023 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.LinearAlgebra.Matrix.Gershgorin import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody import Mathlib.NumberTheory.NumberField.Units.Basic...
Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean
100
106
theorem mult_log_place_eq_zero {x : (๐“ž K)หฃ} {w : InfinitePlace K} : mult w * Real.log (w x) = 0 โ†” w x = 1 := by
rw [mul_eq_zero, or_iff_right, Real.log_eq_zero, or_iff_right, or_iff_left] ยท linarith [(apply_nonneg _ _ : 0 โ‰ค w x)] ยท simp only [ne_eq, map_eq_zero, coe_ne_zero x, not_false_eq_true] ยท refine (ne_of_gt ?_) rw [mult]; split_ifs <;> norm_num
/- 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
476
477
theorem degree_X_pow_le (n : โ„•) : degree (X ^ n : R[X]) โ‰ค n := by
simpa only [C_1, one_mul] using degree_C_mul_X_pow_le n (1 : R)
/- 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.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Data.Finset.Fold import Mathlib.Data.Finset.Option import Mathlib.Data.Finset.Pi import Mathlib.Data....
Mathlib/Data/Finset/Lattice.lean
1,609
1,611
theorem map_ofDual_min (s : Finset ฮฑแต’แตˆ) : s.min.map ofDual = (s.image ofDual).max := by
rw [max_eq_sup_withBot, sup_image] exact congr_fun Option.map_id _
/- Copyright (c) 2018 Sรฉbastien Gouรซzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sรฉbastien Gouรซzel, Johannes Hรถlzl, Rรฉmy Degenne -/ import Mathlib.Order.Filter.Cofinite import Mathlib.Order.Hom.CompleteLattice #align_import order.liminf_limsup from "leanprover-...
Mathlib/Order/LiminfLimsup.lean
1,107
1,108
theorem blimsup_or_eq_sup : (blimsup u f fun x => p x โˆจ q x) = blimsup u f p โŠ” blimsup u f q := by
simp only [blimsup_eq_limsup, โ† limsup_sup_filter, โ† inf_sup_left, sup_principal, setOf_or]
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Patrick Massot, Yury Kudryashov -/ import Mathlib.Topology.Connected.Basic /-! # Totally disconnected and totally separated topological spaces ## Main definitions We define the...
Mathlib/Topology/Connected/TotallyDisconnected.lean
123
128
theorem totallyDisconnectedSpace_iff_connectedComponent_singleton : TotallyDisconnectedSpace ฮฑ โ†” โˆ€ x : ฮฑ, connectedComponent x = {x} := by
rw [totallyDisconnectedSpace_iff_connectedComponent_subsingleton] refine forall_congr' fun x => ?_ rw [subsingleton_iff_singleton] exact mem_connectedComponent
/- 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.Data.Set.Lattice import Mathlib.Logic.Small.Basic import Mathlib.Logic.Function.OfArity import Mathlib.Order.WellFounded #align_import set_theory.zfc....
Mathlib/SetTheory/ZFC/Basic.lean
1,068
1,070
theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (โ‹‚โ‚€ x).toSet = โ‹‚โ‚€ (toSet '' x.toSet) := by
ext simp [mem_sInter h]
/- Copyright (c) 2021 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaรซl Dillies, Bhavik Mehta -/ import Mathlib.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68a...
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
156
158
theorem mem_compression : a โˆˆ ๐“’ u v s โ†” a โˆˆ s โˆง compress u v a โˆˆ s โˆจ a โˆ‰ s โˆง โˆƒ b โˆˆ s, compress u v b = a := by
simp_rw [compression, mem_union, mem_filter, mem_image, and_comm]
/- Copyright (c) 2022 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Xavier Roblot -/ import Mathlib.Analysis.Complex.Polynomial import Mathlib.NumberTheory.NumberField.Norm import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingT...
Mathlib/NumberTheory/NumberField/Embeddings.lean
378
382
theorem isReal_iff {w : InfinitePlace K} : IsReal w โ†” ComplexEmbedding.IsReal (embedding w) := by
refine โŸจ?_, fun h => โŸจembedding w, h, mk_embedding wโŸฉโŸฉ rintro โŸจฯ†, โŸจhฯ†, rflโŸฉโŸฉ rwa [embedding_mk_eq_of_isReal hฯ†]
/- 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
104
107
theorem diff_mem_nhdsWithin_diff {x : ฮฑ} {s t : Set ฮฑ} (hs : s โˆˆ ๐“[t] x) (t' : Set ฮฑ) : s \ t' โˆˆ ๐“[t \ t'] x := by
rw [nhdsWithin, diff_eq, diff_eq, โ† inf_principal, โ† inf_assoc] exact inter_mem_inf hs (mem_principal_self _)
/- 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.Algebra.Lie.Submodule #align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" /-! # Ideal...
Mathlib/Algebra/Lie/IdealOperations.lean
319
322
theorem map_comap_bracket_eq {Jโ‚ Jโ‚‚ : LieIdeal R L'} (h : f.IsIdealMorphism) : map f โ…comap f Jโ‚, comap f Jโ‚‚โ† = โ…f.idealRange โŠ“ Jโ‚, f.idealRange โŠ“ Jโ‚‚โ† := by
rw [โ† map_sup_ker_eq_map, โ† comap_bracket_eq h, map_comap_eq h, inf_eq_right] exact le_trans (LieSubmodule.lie_le_left _ _) inf_le_left
/- 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.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "lean...
Mathlib/Analysis/Convex/Side.lean
326
330
theorem wSameSide_smul_vsub_vadd_left {s : AffineSubspace R P} {pโ‚ pโ‚‚ : P} (x : P) (hpโ‚ : pโ‚ โˆˆ s) (hpโ‚‚ : pโ‚‚ โˆˆ s) {t : R} (ht : 0 โ‰ค t) : s.WSameSide (t โ€ข (x -แตฅ pโ‚) +แตฅ pโ‚‚) x := by
refine โŸจpโ‚‚, hpโ‚‚, pโ‚, hpโ‚, ?_โŸฉ rw [vadd_vsub] exact SameRay.sameRay_nonneg_smul_left _ ht
/- Copyright (c) 2022 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.MonoidAlgebra.Support #align_import algebra.monoid_algebra.degree from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"...
Mathlib/Algebra/MonoidAlgebra/Degree.lean
149
153
theorem sup_support_pow_le (degb0 : degb 0 โ‰ค 0) (degbm : โˆ€ a b, degb (a + b) โ‰ค degb a + degb b) (n : โ„•) (f : R[A]) : (f ^ n).support.sup degb โ‰ค n โ€ข f.support.sup degb := by
rw [โ† List.prod_replicate, โ† List.sum_replicate] refine (sup_support_list_prod_le degb0 degbm _).trans_eq ?_ rw [List.map_replicate]
/- 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, Floris van Doorn -/ import Mathlib.Data.Finsupp.Multiset import Mathlib.Order.Bounded import Mathlib.SetTheory.Cardinal.PartENat import Mathlib.SetTheor...
Mathlib/SetTheory/Cardinal/Ordinal.lean
813
814
theorem add_eq_right_iff {a b : Cardinal} : a + b = b โ†” max โ„ตโ‚€ a โ‰ค b โˆจ a = 0 := by
rw [add_comm, add_eq_left_iff]
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Alexey Soloyev, Junyan Xu, Kamila Szewczyk -/ import Mathlib.Data.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathl...
Mathlib/Data/Real/GoldenRatio.lean
129
131
theorem neg_one_lt_goldConj : -1 < ฯˆ := by
rw [neg_lt, โ† inv_gold] exact inv_lt_one one_lt_gold
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Sรฉbastien Gouรซzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics #align_import analysis.ca...
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
600
603
theorem norm_fderiv_le_of_lipschitzOn {f : E โ†’ F} {xโ‚€ : E} {s : Set E} (hs : s โˆˆ ๐“ xโ‚€) {C : โ„โ‰ฅ0} (hlip : LipschitzOnWith C f s) : โ€–fderiv ๐•œ f xโ‚€โ€– โ‰ค C := by
refine norm_fderiv_le_of_lip' ๐•œ C.coe_nonneg ?_ filter_upwards [hs] with x hx using hlip.norm_sub_le hx (mem_of_mem_nhds hs)
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro -/ import Mathlib.Algebra.Module.Submodule.Bilinear import Mathlib.GroupTheory.Congruence.Basic import Mathlib.LinearAlgebra.Basic import Mathlib.Tactic.SuppressCo...
Mathlib/LinearAlgebra/TensorProduct/Basic.lean
1,350
1,352
theorem lTensor_comp_rTensor (f : M โ†’โ‚—[R] P) (g : N โ†’โ‚—[R] Q) : (g.lTensor P).comp (f.rTensor N) = map f g := by
simp only [lTensor, rTensor, โ† map_comp, id_comp, comp_id]
/- 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, Sรฉbastien Gouรซzel, Rรฉmy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analys...
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
108
109
theorem rpow_inv_rpow_self {y : โ„} (hy : y โ‰  0) (x : โ„โ‰ฅ0) : (x ^ y) ^ (1 / y) = x := by
field_simp [โ† rpow_mul]
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree import Mat...
Mathlib/NumberTheory/ArithmeticFunction.lean
544
546
theorem ppow_apply {f : ArithmeticFunction R} {k x : โ„•} (kpos : 0 < k) : f.ppow k x = f x ^ k := by
rw [ppow, dif_neg (Nat.ne_of_gt kpos)] rfl
/- Copyright (c) 2022 Yaรซl Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaรซl Dillies -/ import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
258
261
theorem erase_mem_compression_of_mem_compression : s โˆˆ ๐““ a ๐’œ โ†’ s.erase a โˆˆ ๐““ a ๐’œ := by
simp_rw [mem_compression, erase_idem] refine Or.imp (fun h => โŸจh.2, h.2โŸฉ) fun h => ?_ rwa [erase_eq_of_not_mem (insert_ne_self.1 <| ne_of_mem_of_not_mem h.2 h.1)]
/- 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.Algebra.Ring.Divisibility.Basic import Mathlib.Init.Data.Ordering.Lemmas import Mathlib.SetTheory.Ordinal.Principal import Mathlib.Tactic.NormNum #ali...
Mathlib/SetTheory/Ordinal/Notation.lean
372
378
theorem NF.of_dvd_omega_opow {b e n a} (h : NF (ONote.oadd e n a)) (d : ฯ‰ ^ b โˆฃ repr (ONote.oadd e n a)) : b โ‰ค repr e โˆง ฯ‰ ^ b โˆฃ repr a := by
have := mt repr_inj.1 (fun h => by injection h : ONote.oadd e n a โ‰  0) have L := le_of_not_lt fun l => not_le_of_lt (h.below_of_lt l).repr_lt (le_of_dvd this d) simp only [repr] at d exact โŸจL, (dvd_add_iff <| (opow_dvd_opow _ L).mul_right _).1 dโŸฉ
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.Convolution import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup i...
Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
247
249
theorem GammaSeq_eq_betaIntegral_of_re_pos {s : โ„‚} (hs : 0 < re s) (n : โ„•) : GammaSeq s n = (n : โ„‚) ^ s * betaIntegral s (n + 1) := by
rw [GammaSeq, betaIntegral_eval_nat_add_one_right hs n, โ† mul_div_assoc]
/- 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, Yury Kudryashov -/ import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.NAry import Mathlib.Order.Directed #align_import order.bounds.basic from "leanprover...
Mathlib/Order/Bounds/Basic.lean
988
990
theorem lowerBounds_insert (a : ฮฑ) (s : Set ฮฑ) : lowerBounds (insert a s) = Iic a โˆฉ lowerBounds s := by
rw [insert_eq, lowerBounds_union, lowerBounds_singleton]
/- Copyright (c) 2020 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Johan Commelin -/ import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Sets.Opens import Mathlib.D...
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
493
497
theorem le_iff_mem_closure (x y : ProjectiveSpectrum ๐’œ) : x โ‰ค y โ†” y โˆˆ closure ({x} : Set (ProjectiveSpectrum ๐’œ)) := by
rw [โ† as_ideal_le_as_ideal, โ† zeroLocus_vanishingIdeal_eq_closure, mem_zeroLocus, vanishingIdeal_singleton] simp only [as_ideal_le_as_ideal, coe_subset_coe]
/- Copyright (c) 2022 David Kurniadi Angdinata. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Kurniadi Angdinata -/ import Mathlib.Algebra.Polynomial.Splits #align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4...
Mathlib/Algebra/CubicDiscriminant.lean
391
392
theorem natDegree_of_a_eq_zero (ha : P.a = 0) : P.toPoly.natDegree โ‰ค 2 := by
simpa only [of_a_eq_zero ha] using natDegree_quadratic_le
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernรกndez Palacios -/ import Mathlib.SetTheory.Ordinal.Arithmetic #align_import set_theory.ordinal.exponential from "leanprover-community/mat...
Mathlib/SetTheory/Ordinal/Exponential.lean
266
267
theorem log_def {b : Ordinal} (h : 1 < b) (x : Ordinal) : log b x = pred (sInf { o | x < b ^ o }) := by
simp only [log, dif_pos h]
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" /-! # Noncomputable...
Mathlib/Data/Set/Card.lean
888
890
theorem le_ncard_diff (s t : Set ฮฑ) (hs : s.Finite := by
toFinite_tac) : t.ncard - s.ncard โ‰ค (t \ s).ncard := tsub_le_iff_left.mpr (by rw [add_comm]; apply ncard_le_ncard_diff_add_ncard _ _ hs)
/- Copyright (c) 2022 Sebastian Monnet. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sebastian Monnet -/ import Mathlib.FieldTheory.Galois import Mathlib.Topology.Algebra.FilterBasis import Mathlib.Topology.Algebra.OpenSubgroup import Mathlib.Tactic.ByContra #align_...
Mathlib/FieldTheory/KrullTopology.lean
203
209
theorem IntermediateField.fixingSubgroup_isOpen {K L : Type*} [Field K] [Field L] [Algebra K L] (E : IntermediateField K L) [FiniteDimensional K E] : IsOpen (E.fixingSubgroup : Set (L โ‰ƒโ‚[K] L)) := by
have h_basis : E.fixingSubgroup.carrier โˆˆ galGroupBasis K L := โŸจE.fixingSubgroup, โŸจE, โ€น_โ€บ, rflโŸฉ, rflโŸฉ have h_nhd := GroupFilterBasis.mem_nhds_one (galGroupBasis K L) h_basis exact Subgroup.isOpen_of_mem_nhds _ h_nhd
/- 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
148
155
theorem range_inl : range (inl R M Mโ‚‚) = ker (snd R M Mโ‚‚) := by
ext x simp only [mem_ker, mem_range] constructor ยท rintro โŸจy, rflโŸฉ rfl ยท intro h exact โŸจx.fst, Prod.ext rfl h.symmโŸฉ
/- 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, Alexander Bentkamp -/ import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators i...
Mathlib/LinearAlgebra/Basis.lean
1,458
1,467
theorem Basis.mem_span_iff_repr_mem (m : M) : m โˆˆ span R (Set.range b) โ†” โˆ€ i, b.repr m i โˆˆ Set.range (algebraMap R S) := by
refine โŸจfun hm i => โŸจ(b.restrictScalars R).repr โŸจm, hmโŸฉ i, b.restrictScalars_repr_apply R โŸจm, hmโŸฉ iโŸฉ, fun h => ?_โŸฉ rw [โ† b.total_repr m, Finsupp.total_apply S _] refine sum_mem fun i _ => ?_ obtain โŸจ_, hโŸฉ := h i simp_rw [โ† h, algebraMap_smul] exact smul_mem _ _ (subset_span (Set.mem_range_self i)...
/- 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.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Analysis.Convex.Segment import Mathlib.LinearAlgebra.AffineSpace.Fi...
Mathlib/Analysis/Convex/Between.lean
571
574
theorem Wbtw.sameRay_vsub_right {x y z : P} (h : Wbtw R x y z) : SameRay R (z -แตฅ x) (z -แตฅ y) := by
rcases h with โŸจt, โŸจ_, ht1โŸฉ, rflโŸฉ simpa [lineMap_apply, vsub_vadd_eq_vsub_sub, sub_smul] using SameRay.sameRay_nonneg_smul_right (z -แตฅ x) (sub_nonneg.2 ht1)
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sรฉbastien Gouรซzel, Frรฉdรฉric Dupuis -/ import Mathlib.Algebra.DirectSum.Module import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Convex.Uniform import Mathlib....
Mathlib/Analysis/InnerProductSpace/Basic.lean
828
830
theorem Orthonormal.inner_finsupp_eq_sum_right {v : ฮน โ†’ E} (hv : Orthonormal ๐•œ v) (lโ‚ lโ‚‚ : ฮน โ†’โ‚€ ๐•œ) : โŸชFinsupp.total ฮน E ๐•œ v lโ‚, Finsupp.total ฮน E ๐•œ v lโ‚‚โŸซ = lโ‚‚.sum fun i y => conj (lโ‚ i) * y := by
simp only [lโ‚‚.total_apply _, Finsupp.inner_sum, hv.inner_left_finsupp, mul_comm, smul_eq_mul]
/- 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
225
229
theorem contDiffAt_finsum {s : Set E} (f : SmoothPartitionOfUnity ฮน ๐“˜(โ„, E) E s) {xโ‚€ : E} {g : ฮน โ†’ E โ†’ F} (hฯ† : โˆ€ i, xโ‚€ โˆˆ tsupport (f i) โ†’ ContDiffAt โ„ n (g i) xโ‚€) : ContDiffAt โ„ n (fun x โ†ฆ โˆ‘แถ  i, f i x โ€ข g i x) xโ‚€ := by
simp only [โ† contMDiffAt_iff_contDiffAt] at * exact f.contMDiffAt_finsum hฯ†
/- 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.Data.Fintype.Basic import Mathlib.Data.Finset.Card import Mathlib.Data.List.NodupEquivFin import Mathlib.Data.Set.Image #align_import data.fintype.car...
Mathlib/Data/Fintype/Card.lean
334
337
theorem Fin.cast_eq_cast' {n m : โ„•} (h : Fin n = Fin m) : _root_.cast h = Fin.cast (fin_injective h) := by
cases fin_injective h 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.Data.Fin.VecNotation import Mathlib.Logic.Embedding.Set #align_import logic.equiv.fin from "leanprover-community/mathlib"@"bd835ef554f37ef9b804f0903089211f89cb3...
Mathlib/Logic/Equiv/Fin.lean
364
365
theorem finAddFlip_apply_natAdd (k : Fin n) (m : โ„•) : finAddFlip (Fin.natAdd m k) = Fin.castAdd m k := by
simp [finAddFlip]
/- Copyright (c) 2023 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Heather Macbeth -/ import Mathlib.MeasureTheory.Constructions.Pi import Mathlib.MeasureTheory.Integral.Lebesgue /-! # Marginals of multivariate functions In this ...
Mathlib/MeasureTheory/Integral/Marginal.lean
202
212
theorem lmarginal_image [DecidableEq ฮด'] {e : ฮด' โ†’ ฮด} (he : Injective e) (s : Finset ฮด') {f : (โˆ€ i, ฯ€ (e i)) โ†’ โ„โ‰ฅ0โˆž} (hf : Measurable f) (x : โˆ€ i, ฯ€ i) : (โˆซโ‹ฏโˆซโป_s.image e, f โˆ˜ (ยท โˆ˜' e) โˆ‚ฮผ) x = (โˆซโ‹ฏโˆซโป_s, f โˆ‚ฮผ โˆ˜' e) (x โˆ˜' e) := by
have h : Measurable ((ยท โˆ˜' e) : (โˆ€ i, ฯ€ i) โ†’ _) := measurable_pi_iff.mpr <| fun i โ†ฆ measurable_pi_apply (e i) induction s using Finset.induction generalizing x with | empty => simp | insert hi ih => rw [image_insert, lmarginal_insert _ (hf.comp h) (he.mem_finset_image.not.mpr hi), lmarginal_inser...
/- 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
816
817
theorem one_div_le_of_neg (ha : a < 0) (hb : b < 0) : 1 / a โ‰ค b โ†” 1 / b โ‰ค a := by
simpa using inv_le_of_neg ha hb
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Kappelmann -/ import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Algebra.Group.Int import Mathlib.Data.Int.Lemm...
Mathlib/Algebra/Order/Floor.lean
1,485
1,488
theorem round_sub_int (x : ฮฑ) (y : โ„ค) : round (x - y) = round x - y := by
rw [sub_eq_add_neg] norm_cast rw [round_add_int, sub_eq_add_neg]
/- Copyright (c) 2017 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tim Baumann, Stephen Morgan, Scott Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.CategoryTheory.FullSubcategory import Mathlib.Catego...
Mathlib/CategoryTheory/Equivalence.lean
424
427
theorem cancel_counitInv_right_assoc' {W X X' Y Y' Z : D} (f : W โŸถ X) (g : X โŸถ Y) (h : Y โŸถ Z) (f' : W โŸถ X') (g' : X' โŸถ Y') (h' : Y' โŸถ Z) : f โ‰ซ g โ‰ซ h โ‰ซ e.counitInv.app Z = f' โ‰ซ g' โ‰ซ h' โ‰ซ e.counitInv.app Z โ†” f โ‰ซ g โ‰ซ h = f' โ‰ซ g' โ‰ซ h' := by
simp only [โ† Category.assoc, cancel_mono]
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Wrenna Robson -/ import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebr...
Mathlib/LinearAlgebra/Lagrange.lean
559
561
theorem nodal_eq_mul_nodal_erase [DecidableEq ฮน] {i : ฮน} (hi : i โˆˆ s) : nodal s v = (X - C (v i)) * nodal (s.erase i) v := by
simp_rw [nodal, Finset.mul_prod_erase _ (fun x => X - C (v x)) hi]
/- 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.TFAE import Mathlib.Topology.Order.Monotone #align_import set_theory.ordina...
Mathlib/SetTheory/Ordinal/Topology.lean
208
234
theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (ยท < ยท)) : IsNormal (enumOrd s) โ†” IsClosed s := by
have Hs := enumOrd_strictMono hs refine โŸจfun h => isClosed_iff_sup.2 fun {ฮน} hฮน f hf => ?_, fun h => (isNormal_iff_strictMono_limit _).2 โŸจHs, fun a ha o H => ?_โŸฉโŸฉ ยท let g : ฮน โ†’ Ordinal.{u} := fun i => (enumOrdOrderIso hs).symm โŸจ_, hf iโŸฉ suffices enumOrd s (sup.{u, u} g) = sup.{u, u} f by rw [...
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic import Mathlib.Data.PFunctor.Univariate.M #align_import data.pfunctor.multivariate.M from ...
Mathlib/Data/PFunctor/Multivariate/M.lean
195
198
theorem M.dest'_eq_dest' {ฮฑ : TypeVec n} {x : P.last.M} {aโ‚ : P.A} {fโ‚ : P.last.B aโ‚ โ†’ P.last.M} (hโ‚ : PFunctor.M.dest x = โŸจaโ‚, fโ‚โŸฉ) {aโ‚‚ : P.A} {fโ‚‚ : P.last.B aโ‚‚ โ†’ P.last.M} (hโ‚‚ : PFunctor.M.dest x = โŸจaโ‚‚, fโ‚‚โŸฉ) (f' : M.Path P x โŸน ฮฑ) : M.dest' P hโ‚ f' = M.dest' P hโ‚‚ f' := by
cases hโ‚.symm.trans hโ‚‚; rfl
/- 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 -/ import Mathlib.Data.Set.Subsingleton import Mathlib.Order.WithBot #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc429200506...
Mathlib/Data/Set/Image.lean
1,527
1,532
theorem preimage_injective : Injective (preimage f) โ†” Surjective f := by
refine โŸจfun h y => ?_, Surjective.preimage_injectiveโŸฉ obtain โŸจx, hxโŸฉ : (f โปยน' {y}).Nonempty := by rw [h.nonempty_apply_iff preimage_empty] apply singleton_nonempty exact โŸจx, hxโŸฉ
/- Copyright (c) 2021 Alex J. Best. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Yaรซl Dillies -/ import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc import Mathlib.Data.Set.Pointwise.SMul #a...
Mathlib/Algebra/Order/Pointwise.lean
167
169
theorem csInf_div (hsโ‚€ : s.Nonempty) (hsโ‚ : BddBelow s) (htโ‚€ : t.Nonempty) (htโ‚ : BddAbove t) : sInf (s / t) = sInf s / sSup t := by
rw [div_eq_mul_inv, csInf_mul hsโ‚€ hsโ‚ htโ‚€.inv htโ‚.inv, csInf_inv htโ‚€ htโ‚, div_eq_mul_inv]
/- 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.Maps import Mathlib.Topology.NhdsSet #align_import topology.constructions from "leanprover-community/mathlib"...
Mathlib/Topology/Constructions.lean
549
552
theorem nhds_prod_eq {x : X} {y : Y} : ๐“ (x, y) = ๐“ x ร—หข ๐“ y := by
dsimp only [SProd.sprod] rw [Filter.prod, instTopologicalSpaceProd, nhds_inf (tโ‚ := TopologicalSpace.induced Prod.fst _) (tโ‚‚ := TopologicalSpace.induced Prod.snd _), nhds_induced, nhds_induced]
/- 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.Polynomial.Eval #align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"7...
Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
448
451
theorem degree_mul_leadingCoeff_inv (p : K[X]) {q : K[X]} (h : q โ‰  0) : degree (p * C (leadingCoeff q)โปยน) = degree p := by
have hโ‚ : (leadingCoeff q)โปยน โ‰  0 := inv_ne_zero (mt leadingCoeff_eq_zero.1 h) rw [degree_mul_C hโ‚]
/- Copyright (c) 2021 Kalle Kytรถlรค. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytรถlรค -/ import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e...
Mathlib/Topology/MetricSpace/Thickening.lean
536
539
theorem cthickening_eq_iInter_thickening'' (ฮด : โ„) (E : Set ฮฑ) : cthickening ฮด E = โ‹‚ (ฮต : โ„) (_ : max 0 ฮด < ฮต), thickening ฮต E := by
rw [โ† cthickening_max_zero, cthickening_eq_iInter_thickening] exact le_max_left _ _
/- Copyright (c) 2020 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Scott Morrison, Jakob von Raumer -/ import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.CategoryTheory.Monoid...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
179
190
theorem rightUnitor_naturality {M N : ModuleCat R} (f : M โŸถ N) : tensorHom f (๐Ÿ™ (ModuleCat.of R R)) โ‰ซ (rightUnitor N).hom = (rightUnitor M).hom โ‰ซ f := by
-- Porting note (#11041): broken ext apply TensorProduct.ext apply LinearMap.ext; intro x apply LinearMap.ext_ring -- Porting note (#10934): used to be dsimp change ((rightUnitor N).hom) ((tensorHom f (๐Ÿ™ (of R R))) (x โŠ—โ‚œ[R] (1 : R))) = f (((rightUnitor M).hom) (x โŠ—โ‚œ[R] 1)) erw [TensorProduct.rid_tmu...
/- 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 -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.simple_func from "leanprover-community/mathlib"@"bf...
Mathlib/MeasureTheory/Function/SimpleFunc.lean
758
758
theorem restrict_univ (f : ฮฑ โ†’โ‚› ฮฒ) : restrict f univ = f := by
simp [restrict]
/- 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
279
280
theorem natDegree_natCast (n : โ„•) : natDegree (n : R[X]) = 0 := by
simp only [โ† C_eq_natCast, natDegree_C]
/- Copyright (c) 2020 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Utensil Song -/ import Mathlib.Algebra.RingQuot import Mathlib.LinearAlgebra.TensorAlgebra.Basic import Mathlib.LinearAlgebra.QuadraticForm.Isometry import Mathlib.LinearAlge...
Mathlib/LinearAlgebra/CliffordAlgebra/Basic.lean
299
301
theorem ฮน_range_map_lift (f : M โ†’โ‚—[R] A) (cond : โˆ€ m, f m * f m = algebraMap _ _ (Q m)) : (ฮน Q).range.map (lift Q โŸจf, condโŸฉ).toLinearMap = LinearMap.range f := by
rw [โ† LinearMap.range_comp, ฮน_comp_lift]
/- 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.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Instances.Irrational #align_impo...
Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
99
110
theorem frequently_lt_rpow_neg (h : LiouvilleWith p x) (hlt : q < p) : โˆƒแถ  n : โ„• in atTop, โˆƒ m : โ„ค, x โ‰  m / n โˆง |x - m / n| < n ^ (-q) := by
rcases h.exists_pos with โŸจC, _hCโ‚€, hCโŸฉ have : โˆ€แถ  n : โ„• in atTop, C < n ^ (p - q) := by simpa only [(ยท โˆ˜ ยท), neg_sub, one_div] using ((tendsto_rpow_atTop (sub_pos.2 hlt)).comp tendsto_natCast_atTop_atTop).eventually (eventually_gt_atTop C) refine (this.and_frequently hC).mono ?_ rintro n โŸจhnC,...
/- 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 Batteries.Control.ForInStep.Lemmas import Batteries.Data.List.Basic import Batteries.Ta...
.lake/packages/batteries/Batteries/Data/List/Lemmas.lean
1,405
1,406
theorem mem_iota {m n : Nat} : m โˆˆ iota n โ†” 1 โ‰ค m โˆง m โ‰ค n := by
simp [iota_eq_reverse_range', Nat.add_comm, Nat.lt_succ]
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro -/ import Mathlib.Logic.Equiv.Nat import Mathlib.Data.PNat.Basic import Mathlib.Order.Directed import Mathlib.Data.Countable.Defs import Mathli...
Mathlib/Logic/Encodable/Basic.lean
522
523
theorem up_down {a : ฮฑ} : (down a).up = a := by
simp [up, down,Equiv.left_inv _ _, Equiv.symm_apply_apply]
/- 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.Sites.Sheaf #align_import category_theory.sites.plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" /-! # The...
Mathlib/CategoryTheory/Sites/Plus.lean
243
270
theorem plusMap_toPlus : J.plusMap (J.toPlus P) = J.toPlus (J.plusObj P) := by
ext X : 2 refine colimit.hom_ext (fun S => ?_) dsimp only [plusMap, toPlus] let e : S.unop โŸถ โŠค := homOfLE (OrderTop.le_top _) rw [ฮน_colimMap, โ† colimit.w _ e.op, โ† Category.assoc, โ† Category.assoc] congr 1 refine Multiequalizer.hom_ext _ _ _ (fun I => ?_) erw [Multiequalizer.lift_ฮน] simp only [unop_o...
/- Copyright (c) 2020 Frรฉdรฉric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frรฉdรฉric Dupuis, Eric Wieser -/ import Mathlib.GroupTheory.Congruence.Basic import Mathlib.LinearAlgebra.Basic import Mathlib.LinearAlgebra.Multilinear.TensorProduct import Mathlib.Ta...
Mathlib/LinearAlgebra/PiTensorProduct.lean
454
460
theorem liftAux.smul {ฯ† : MultilinearMap R s E} (r : R) (x : โจ‚[R] i, s i) : liftAux ฯ† (r โ€ข x) = r โ€ข liftAux ฯ† x := by
refine PiTensorProduct.induction_on' x ?_ ?_ ยท intro z f rw [smul_tprodCoeff' r z f, liftAux_tprodCoeff, liftAux_tprodCoeff, smul_assoc] ยท intro z y ihz ihy rw [smul_add, (liftAux ฯ†).map_add, ihz, ihy, (liftAux ฯ†).map_add, smul_add]
/- 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.CategoryTheory.Sites.Sheaf import Mathlib.CategoryTheory.Sites.CoverLifting import Mathlib.CategoryTheory.Adjunction.FullyFaithful #align_import category_th...
Mathlib/CategoryTheory/Sites/DenseSubsite.lean
245
248
theorem appHom_valid_glue {X : D} {Y : C} (f : op X โŸถ op (G.obj Y)) : appHom ฮฑ X โ‰ซ โ„ฑ'.val.map f = โ„ฑ.map f โ‰ซ ฮฑ.app (op Y) := by
ext apply appHom_restrict
/- Copyright (c) 2021 Yaรซl Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaรซl Dillies -/ import Mathlib.Data.Sigma.Lex import Mathlib.Order.BoundedOrder import Mathlib.Mathport.Notation import Mathlib.Data.Sigma.Basic #align_import data.sigma.order from "lea...
Mathlib/Data/Sigma/Order.lean
89
96
theorem lt_def [โˆ€ i, LT (ฮฑ i)] {a b : ฮฃi, ฮฑ i} : a < b โ†” โˆƒ h : a.1 = b.1, h.rec a.2 < b.2 := by
constructor ยท rintro โŸจi, a, b, hโŸฉ exact โŸจrfl, hโŸฉ ยท obtain โŸจi, aโŸฉ := a obtain โŸจj, bโŸฉ := b rintro โŸจrfl : i = j, hโŸฉ exact lt.fiber _ _ _ h
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.concrete from ...
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
58
70
theorem formPerm_disjoint_iff (hl : Nodup l) (hl' : Nodup l') (hn : 2 โ‰ค l.length) (hn' : 2 โ‰ค l'.length) : Perm.Disjoint (formPerm l) (formPerm l') โ†” l.Disjoint l' := by
rw [disjoint_iff_eq_or_eq, List.Disjoint] constructor ยท rintro h x hx hx' specialize h x rw [formPerm_apply_mem_eq_self_iff _ hl _ hx, formPerm_apply_mem_eq_self_iff _ hl' _ hx'] at h omega ยท intro h x by_cases hx : x โˆˆ l on_goal 1 => by_cases hx' : x โˆˆ l' ยท exact (h hx hx').elim al...
/- 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.MeasureTheory.Measure.MeasureSpace /-! # Restricting a measure to a subset or a subtype Given a measure `ฮผ` on a type `ฮฑ` and a subse...
Mathlib/MeasureTheory/Measure/Restrict.lean
1,093
1,101
theorem ae_eq_restrict_iff_indicator_ae_eq {g : ฮฑ โ†’ ฮฒ} (hs : MeasurableSet s) : f =แต[ฮผ.restrict s] g โ†” s.indicator f =แต[ฮผ] s.indicator g := by
rw [Filter.EventuallyEq, ae_restrict_iff' hs] refine โŸจfun h => ?_, fun h => ?_โŸฉ <;> filter_upwards [h] with x hx ยท by_cases hxs : x โˆˆ s ยท simp [hxs, hx hxs] ยท simp [hxs] ยท intro hxs simpa [hxs] using hx
/- Copyright (c) 2022 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.Algebra.IsPrimePow import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import number_theory.von_mango...
Mathlib/NumberTheory/VonMangoldt.lean
79
79
theorem vonMangoldt_apply_one : ฮ› 1 = 0 := by
simp [vonMangoldt_apply]
/- 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 -/ import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort import Mathlib.Data.Set.Subsingle...
Mathlib/Combinatorics/Enumerative/Composition.lean
686
691
theorem length_pos_of_mem_splitWrtComposition {l l' : List ฮฑ} {c : Composition l.length} (h : l' โˆˆ l.splitWrtComposition c) : 0 < length l' := by
have : l'.length โˆˆ (l.splitWrtComposition c).map List.length := List.mem_map_of_mem List.length h rw [map_length_splitWrtComposition] at this exact c.blocks_pos this
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace ...
Mathlib/Analysis/MellinTransform.lean
480
485
theorem hasMellin_cpow_Ioc (a : โ„‚) {s : โ„‚} (hs : 0 < re s + re a) : HasMellin (indicator (Ioc 0 1) (fun t => โ†‘t ^ a : โ„ โ†’ โ„‚)) s (1 / (s + a)) := by
have := hasMellin_one_Ioc (by rwa [add_re] : 0 < (s + a).re) simp_rw [HasMellin, โ† MellinConvergent.cpow_smul, โ† mellin_cpow_smul, โ† indicator_smul, smul_eq_mul, mul_one] at this exact this
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" /-! # Noncomputable...
Mathlib/Data/Set/Card.lean
675
678
theorem ncard_preimage_of_injective_subset_range {s : Set ฮฒ} (H : f.Injective) (hs : s โІ Set.range f) : (f โปยน' s).ncard = s.ncard := by
rw [โ† ncard_image_of_injective _ H, image_preimage_eq_iff.mpr hs]
/- Copyright (c) 2019 Calle Sรถnne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle Sรถnne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
530
533
theorem toReal_coe_eq_self_iff {ฮธ : โ„} : (ฮธ : Angle).toReal = ฮธ โ†” -ฯ€ < ฮธ โˆง ฮธ โ‰ค ฯ€ := by
rw [toReal_coe, toIocMod_eq_self two_pi_pos] ring_nf rfl
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow -/ import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.LinearAlgebra.Basic import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.BilinearMap #ali...
Mathlib/LinearAlgebra/SesquilinearForm.lean
744
748
theorem IsRefl.nondegenerate_of_separatingLeft {B : M โ†’โ‚—[R] M โ†’โ‚—[R] Mโ‚} (hB : B.IsRefl) (hB' : B.SeparatingLeft) : B.Nondegenerate := by
refine โŸจhB', ?_โŸฉ rw [separatingRight_iff_flip_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mp] rwa [โ† separatingLeft_iff_ker_eq_bot]
/- 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.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Analysis.Convex.Segment import Mathlib.LinearAlgebra.AffineSpace.Fi...
Mathlib/Analysis/Convex/Between.lean
133
135
theorem mem_vsub_const_affineSegment {x y z : P} (p : P) : z -แตฅ p โˆˆ affineSegment R (x -แตฅ p) (y -แตฅ p) โ†” z โˆˆ affineSegment R x y := by
rw [โ† affineSegment_vsub_const_image, (vsub_left_injective p).mem_set_image]
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat...
Mathlib/Data/Nat/Multiplicity.lean
61
77
theorem multiplicity_eq_card_pow_dvd {m n b : โ„•} (hm : m โ‰  1) (hn : 0 < n) (hb : log m n < b) : multiplicity m n = โ†‘((Finset.Ico 1 b).filter fun i => m ^ i โˆฃ n).card := calc multiplicity m n = โ†‘(Ico 1 <| (multiplicity m n).get (finite_nat_iff.2 โŸจhm, hnโŸฉ) + 1).card := by
simp _ = โ†‘((Finset.Ico 1 b).filter fun i => m ^ i โˆฃ n).card := congr_arg _ <| congr_arg card <| Finset.ext fun i => by rw [mem_filter, mem_Ico, mem_Ico, Nat.lt_succ_iff, โ† @PartENat.coe_le_coe i, PartENat.natCast_get, โ† pow_dvd_iff_le_multiplicity, and_right_...
/- Copyright (c) 2022 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Analysis.Complex.AbsMax import Mathlib.Analysis.Complex.RemovableSingularity #align_import analysis.complex.schwarz from "leanprover-community...
Mathlib/Analysis/Complex/Schwarz.lean
65
88
theorem schwarz_aux {f : โ„‚ โ†’ โ„‚} (hd : DifferentiableOn โ„‚ f (ball c Rโ‚)) (h_maps : MapsTo f (ball c Rโ‚) (ball (f c) Rโ‚‚)) (hz : z โˆˆ ball c Rโ‚) : โ€–dslope f c zโ€– โ‰ค Rโ‚‚ / Rโ‚ := by
have hRโ‚ : 0 < Rโ‚ := nonempty_ball.1 โŸจz, hzโŸฉ suffices โˆ€แถ  r in ๐“[<] Rโ‚, โ€–dslope f c zโ€– โ‰ค Rโ‚‚ / r by refine ge_of_tendsto ?_ this exact (tendsto_const_nhds.div tendsto_id hRโ‚.ne').mono_left nhdsWithin_le_nhds rw [mem_ball] at hz filter_upwards [Ioo_mem_nhdsWithin_Iio โŸจhz, le_rflโŸฉ] with r hr have hrโ‚€ : ...
/- Copyright (c) 2024 Etienne Marion. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Etienne Marion -/ import Mathlib.MeasureTheory.SetSemiring /-! # Algebra of sets in this file we define the notion of algebra of sets ang give its basic properties. An algebra of set...
Mathlib/MeasureTheory/SetAlgebra.lean
122
134
theorem generateFrom_generateSetAlgebra_eq : generateFrom (generateSetAlgebra ๐’œ) = generateFrom ๐’œ := by
refine le_antisymm (fun s ms โ†ฆ ?_) (generateFrom_mono self_subset_generateSetAlgebra) refine @generateFrom_induction _ _ (generateSetAlgebra ๐’œ) (fun t ht โ†ฆ ?_) (@MeasurableSet.empty _ (generateFrom ๐’œ)) (fun t โ†ฆ MeasurableSet.compl) (fun f hf โ†ฆ MeasurableSet.iUnion hf) s ms induction ht with |...
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Joey van Langen, Casper Putz -/ import Mathlib.FieldTheory.Separable import Mathlib.RingTheory.IntegralDomain import Mathlib.Algebra.CharP.Reduced import Mathlib.Tactic.App...
Mathlib/FieldTheory/Finite/Basic.lean
387
393
theorem expand_card (f : K[X]) : expand K q f = f ^ q := by
cases' CharP.exists K with p hp letI := hp rcases FiniteField.card K p with โŸจโŸจn, nposโŸฉ, โŸจhp, hnโŸฉโŸฉ haveI : Fact p.Prime := โŸจhpโŸฉ dsimp at hn rw [hn, โ† map_expand_pow_char, frobenius_pow hn, RingHom.one_def, map_id]
/- Copyright (c) 2020 Aaron Anderson, Jalex Stark. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jalex Stark -/ import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Laurent import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic import...
Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
260
276
theorem matPolyEquiv_eq_X_pow_sub_C {K : Type*} (k : โ„•) [Field K] (M : Matrix n n K) : matPolyEquiv ((expand K k : K[X] โ†’+* K[X]).mapMatrix (charmatrix (M ^ k))) = X ^ k - C (M ^ k) := by
-- Porting note: `i` and `j` are used later on, but were not mentioned in mathlib3 ext m i j rw [coeff_sub, coeff_C, matPolyEquiv_coeff_apply, RingHom.mapMatrix_apply, Matrix.map_apply, AlgHom.coe_toRingHom, DMatrix.sub_apply, coeff_X_pow] by_cases hij : i = j ยท rw [hij, charmatrix_apply_eq, AlgHom.map_s...
/- 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.Maps import Mathlib.Topology.NhdsSet #align_import topology.constructions from "leanprover-community/mathlib"...
Mathlib/Topology/Constructions.lean
1,131
1,133
theorem Subtype.dense_iff {s : Set X} {t : Set s} : Dense t โ†” s โІ closure ((โ†‘) '' t) := by
rw [inducing_subtype_val.dense_iff, SetCoe.forall] rfl
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kenny Lau -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Basic import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.MvPower...
Mathlib/RingTheory/PowerSeries/Basic.lean
703
704
theorem rescale_neg_one_X : rescale (-1 : A) X = -X := by
rw [rescale_X, map_neg, map_one, neg_one_mul]
/- 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
2,765
2,768
theorem length_eq_length_filter_add {l : List (ฮฑ)} (f : ฮฑ โ†’ Bool) : l.length = (l.filter f).length + (l.filter (! f ยท)).length := by
simp_rw [โ† List.countP_eq_length_filter, l.length_eq_countP_add_countP f, Bool.not_eq_true, Bool.decide_eq_false]
/- Copyright (c) 2022 Sรฉbastien Gouรซzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sรฉbastien Gouรซzel -/ import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.C...
Mathlib/Analysis/BoundedVariation.lean
164
174
theorem eq_zero_iff (f : ฮฑ โ†’ E) {s : Set ฮฑ} : eVariationOn f s = 0 โ†” โˆ€ x โˆˆ s, โˆ€ y โˆˆ s, edist (f x) (f y) = 0 := by
constructor ยท rintro h x xs y ys rw [โ† le_zero_iff, โ† h] exact edist_le f xs ys ยท rintro h dsimp only [eVariationOn] rw [ENNReal.iSup_eq_zero] rintro โŸจn, u, um, usโŸฉ exact Finset.sum_eq_zero fun i _ => h _ (us i.succ) _ (us i)
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Sรฉbastien Gouรซzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics #align_import analysis.ca...
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
411
413
theorem hasFDerivWithinAt_of_mem_nhds (h : s โˆˆ ๐“ x) : HasFDerivWithinAt f f' s x โ†” HasFDerivAt f f' x := by
rw [HasFDerivAt, HasFDerivWithinAt, nhdsWithin_eq_nhds.mpr h]
/- Copyright (c) 2020 Nicolรฒ Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolรฒ Cavalleri, Yury Kudryashov -/ import Mathlib.Geometry.Manifold.ContMDiffMap import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential #align_import geometry.manifold.diffeo...
Mathlib/Geometry/Manifold/Diffeomorph.lean
322
331
theorem contMDiffWithinAt_comp_diffeomorph_iff {m} (h : M โ‰ƒโ‚˜^nโŸฎI, JโŸฏ N) {f : N โ†’ M'} {s x} (hm : m โ‰ค n) : ContMDiffWithinAt I I' m (f โˆ˜ h) s x โ†” ContMDiffWithinAt J I' m f (h.symm โปยน' s) (h x) := by
constructor ยท intro Hfh rw [โ† h.symm_apply_apply x] at Hfh simpa only [(ยท โˆ˜ ยท), h.apply_symm_apply] using Hfh.comp (h x) (h.symm.contMDiffWithinAt.of_le hm) (mapsTo_preimage _ _) ยท rw [โ† h.image_eq_preimage] exact fun hf => hf.comp x (h.contMDiffWithinAt.of_le hm) (mapsTo_image _ _)
/- Copyright (c) 2020 Nicolรฒ Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolรฒ Cavalleri -/ import Mathlib.Geometry.Manifold.ContMDiffMap #align_import geometry.manifold.algebra.monoid from "leanprover-community/mathlib"@"e354e865255654389cc46e603216023...
Mathlib/Geometry/Manifold/Algebra/Monoid.lean
354
357
theorem ContMDiffAt.prod (h : โˆ€ i โˆˆ t, ContMDiffAt I' I n (f i) xโ‚€) : ContMDiffAt I' I n (fun x โ†ฆ โˆ i โˆˆ t, f i x) xโ‚€ := by
simp only [โ† contMDiffWithinAt_univ] at * exact ContMDiffWithinAt.prod h
/- 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.Defs.Induced import Mathlib.Topology.Basic #align_import topology.order from "leanprover-community/mathlib"@"bcfa726826abd575...
Mathlib/Topology/Order.lean
129
138
theorem nhds_mkOfNhds_single [DecidableEq ฮฑ] {aโ‚€ : ฮฑ} {l : Filter ฮฑ} (h : pure aโ‚€ โ‰ค l) (b : ฮฑ) : @nhds ฮฑ (TopologicalSpace.mkOfNhds (update pure aโ‚€ l)) b = (update pure aโ‚€ l : ฮฑ โ†’ Filter ฮฑ) b := by
refine nhds_mkOfNhds _ _ (le_update_iff.mpr โŸจh, fun _ _ => le_rflโŸฉ) fun a s hs => ?_ rcases eq_or_ne a aโ‚€ with (rfl | ha) ยท filter_upwards [hs] with b hb rcases eq_or_ne b a with (rfl | hb) ยท exact hs ยท rwa [update_noteq hb] ยท simpa only [update_noteq ha, mem_pure, eventually_pure] using hs
/- Copyright (c) 2022 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis #align_import ring_theory.is_adjoin...
Mathlib/RingTheory/IsAdjoinRoot.lean
750
759
theorem Algebra.adjoin.powerBasis'_minpoly_gen [IsDomain R] [IsDomain S] [NoZeroSMulDivisors R S] [IsIntegrallyClosed R] {x : S} (hx' : IsIntegral R x) : minpoly R x = minpoly R (Algebra.adjoin.powerBasis' hx').gen := by
haveI := isDomain_of_prime (prime_of_isIntegrallyClosed hx') haveI := noZeroSMulDivisors_of_prime_of_degree_ne_zero (prime_of_isIntegrallyClosed hx') (ne_of_lt (degree_pos hx')).symm rw [โ† minpolyGen_eq, adjoin.powerBasis', minpolyGen_map, minpolyGen_eq, AdjoinRoot.powerBasis'_gen, โ† isAdjoinRootMo...
/- 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.Applicative import Mathlib.Control.Traversable.Basic #align_import control.traversable.lemmas from "leanprover-community/mathlib"@"3342d1b2178381196...
Mathlib/Control/Traversable/Lemmas.lean
76
80
theorem traverse_map (f : ฮฒ โ†’ F ฮณ) (g : ฮฑ โ†’ ฮฒ) (x : t ฮฑ) : traverse f (g <$> x) = traverse (f โˆ˜ g) x := by
rw [@map_eq_traverse_id t _ _ _ _ g] refine (comp_traverse (G := Id) f (pure โˆ˜ g) x).symm.trans ?_ congr; apply Comp.applicative_id_comp
/- 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
461
470
theorem chaar_mono {Kโ‚€ : PositiveCompacts G} {Kโ‚ Kโ‚‚ : Compacts G} (h : (Kโ‚ : Set G) โІ Kโ‚‚) : chaar Kโ‚€ Kโ‚ โ‰ค chaar Kโ‚€ Kโ‚‚ := by
let eval : (Compacts G โ†’ โ„) โ†’ โ„ := fun f => f Kโ‚‚ - f Kโ‚ have : Continuous eval := (continuous_apply Kโ‚‚).sub (continuous_apply Kโ‚) rw [โ† sub_nonneg]; show chaar Kโ‚€ โˆˆ eval โปยน' Ici (0 : โ„) apply mem_of_subset_of_mem _ (chaar_mem_clPrehaar Kโ‚€ โŠค) unfold clPrehaar; rw [IsClosed.closure_subset_iff] ยท rintro _ โŸจU,...
/- 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
1,385
1,391
theorem Icc_union_Ici' (hโ‚ : c โ‰ค b) : Icc a b โˆช Ici c = Ici (min a c) := by
ext1 x simp_rw [mem_union, mem_Icc, mem_Ici, min_le_iff] by_cases hc : c โ‰ค x ยท simp only [hc, or_true] -- Porting note: restore `tauto` ยท have hxb : x โ‰ค b := (le_of_not_ge hc).trans hโ‚ simp only [hxb, and_true] -- Porting note: restore `tauto`
/- 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
410
413
theorem FiniteDimensional.finrank_pos_iff_exists_ne_zero [NoZeroSMulDivisors R M] : 0 < finrank R M โ†” โˆƒ x : M, x โ‰  0 := by
rw [โ† @rank_pos_iff_exists_ne_zero R M, โ† finrank_eq_rank] norm_cast
/- Copyright (c) 2023 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.Polynomial.Eval #align_import data.mv_polynomial.polynomial from "leanprover-community/mathlib"@"0b8...
Mathlib/Algebra/MvPolynomial/Polynomial.lean
30
40
theorem eval_polynomial_eval_finSuccEquiv {n : โ„•} {x : Fin n โ†’ R} [CommSemiring R] (f : MvPolynomial (Fin (n + 1)) R) (q : MvPolynomial (Fin n) R) : (eval x) (Polynomial.eval q (finSuccEquiv R n f)) = eval (Fin.cases (eval x q) x) f := by
simp only [finSuccEquiv_apply, coe_evalโ‚‚Hom, polynomial_eval_evalโ‚‚, eval_evalโ‚‚] conv in RingHom.comp _ _ => refine @RingHom.ext _ _ _ _ _ (RingHom.id _) fun r => ?_ simp simp only [evalโ‚‚_id] congr funext i refine Fin.cases (by simp) (by simp) i
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adjunction.Evaluation import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory...
Mathlib/CategoryTheory/Sites/Subsheaf.lean
168
173
theorem Subpresheaf.family_of_elements_compatible {U : Cแต’แต–} (s : F.obj U) : (G.familyOfElementsOfSection s).Compatible := by
intro Yโ‚ Yโ‚‚ Z gโ‚ gโ‚‚ fโ‚ fโ‚‚ hโ‚ hโ‚‚ e refine Subtype.ext ?_ -- Porting note: `ext1` does not work here change F.map gโ‚.op (F.map fโ‚.op s) = F.map gโ‚‚.op (F.map fโ‚‚.op s) rw [โ† FunctorToTypes.map_comp_apply, โ† FunctorToTypes.map_comp_apply, โ† op_comp, โ† op_comp, e]
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johan Commelin -/ import Mathlib.RingTheory.IntegralClosure #align_import field_theory.minpoly.basic from "leanprover-community/mathlib"@"df0098f0db291900600f32070f6abb3e1...
Mathlib/FieldTheory/Minpoly/Basic.lean
67
70
theorem algHom_eq (f : B โ†’โ‚[A] B') (hf : Function.Injective f) (x : B) : minpoly A (f x) = minpoly A x := by
refine dif_ctx_congr (isIntegral_algHom_iff _ hf) (fun _ => ?_) fun _ => rfl simp_rw [โ† Polynomial.aeval_def, aeval_algHom, AlgHom.comp_apply, _root_.map_eq_zero_iff f hf]