Context
stringlengths
57
85k
file_name
stringlengths
21
79
start
int64
14
2.42k
end
int64
18
2.43k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
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
78
80
theorem encard_eq_coe_toFinset_card (s : Set Ξ±) [Fintype s] : encard s = s.toFinset.card := by
have h := toFinite s rw [h.encard_eq_coe_toFinset_card, toFinite_toFinset]
import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.GroupAction.Basic namespace MulAction universe u v variable {Ξ± : Type v} variable {G : Type u} [Group G] [MulAction G Ξ±] variable {M : Type u} [Monoid M] [MulAction M Ξ±] @[to_additive "If the action is periodic, t...
Mathlib/GroupTheory/GroupAction/Period.lean
117
120
theorem period_bounded_of_exponent_pos (exp_pos : 0 < Monoid.exponent M) (m : M) : BddAbove (Set.range (fun a : Ξ± => period m a)) := by
use Monoid.exponent M simpa [upperBounds] using period_le_exponent exp_pos _
import Mathlib.Algebra.Star.Basic import Mathlib.Data.Set.Finite import Mathlib.Data.Set.Pointwise.Basic #align_import algebra.star.pointwise from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" namespace Set open Pointwise local postfix:max "⋆" => star variable {Ξ± : Type*} {s t : Set...
Mathlib/Algebra/Star/Pointwise.lean
115
117
theorem star_singleton {Ξ² : Type*} [InvolutiveStar Ξ²] (x : Ξ²) : ({x} : Set Ξ²)⋆ = {x⋆} := by
ext1 y rw [mem_star, mem_singleton_iff, mem_singleton_iff, star_eq_iff_star_eq, eq_comm]
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : ...
Mathlib/MeasureTheory/Group/Convolution.lean
65
67
theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by
unfold mconv simp
import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Order.Sub.WithTop import Mathlib.Data.Real.NNReal import Mathlib.Order.Interval.Set.WithBotTop #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Function Set NNReal variable {Ξ± : Typ...
Mathlib/Data/ENNReal/Basic.lean
718
719
theorem iInter_Ici_coe_nat : β‹‚ n : β„•, Ici (n : ℝβ‰₯0∞) = {∞} := by
simp only [← compl_Iio, ← compl_iUnion, iUnion_Iio_coe_nat, compl_compl]
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.Topology.MetricSpace.Contracting #align_import analysis.ODE.picard_lindelof from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Function Set Metric TopologicalSpace intervalIntegral MeasureTheory open MeasureTh...
Mathlib/Analysis/ODE/PicardLindelof.lean
329
333
theorem dist_iterate_next_le (f₁ fβ‚‚ : FunSpace v) (n : β„•) : dist (next^[n] f₁) (next^[n] fβ‚‚) ≀ (v.L * v.tDist) ^ n / n ! * dist f₁ fβ‚‚ := by
refine dist_le_of_forall fun t => (dist_iterate_next_apply_le _ _ _ _).trans ?_ have : |(t - v.tβ‚€ : ℝ)| ≀ v.tDist := v.dist_tβ‚€_le t gcongr
import Mathlib.Data.Set.Finite import Mathlib.Order.Partition.Finpartition #align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" namespace Setoid variable {Ξ± : Type*} theorem eq_of_mem_eqv_class {c : Set (Set Ξ±)} (H : βˆ€ a, βˆƒ! b ∈ c, a ∈ b) {x b b'} ...
Mathlib/Data/Setoid/Partition.lean
67
71
theorem classes_ker_subset_fiber_set {Ξ² : Type*} (f : Ξ± β†’ Ξ²) : (Setoid.ker f).classes βŠ† Set.range fun y => { x | f x = y } := by
rintro s ⟨x, rfl⟩ rw [Set.mem_range] exact ⟨f x, rfl⟩
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" section open CategoryTheory Opposite namespace CategoryTheory.Limits -- attribute [local tid...
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
1,114
1,117
theorem coequalizer.isoTargetOfSelf_hom : (coequalizer.isoTargetOfSelf f).hom = coequalizer.desc (πŸ™ Y) (by simp) := by
ext simp [coequalizer.isoTargetOfSelf]
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
118
118
theorem cgf_zero_fun : cgf 0 ΞΌ t = log (ΞΌ Set.univ).toReal := by
simp only [cgf, mgf_zero_fun]
import Mathlib.Analysis.Convolution import Mathlib.Analysis.Calculus.BumpFunction.Normed import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Covering.Differentiation import Mathlib.MeasureTheory.Covering.BesicovitchVectorSpace import Mathlib.MeasureTheory.Measure.Haar.Unique #align_import analy...
Mathlib/Analysis/Calculus/BumpFunction/Convolution.lean
110
139
theorem ae_convolution_tendsto_right_of_locallyIntegrable {ΞΉ} {Ο† : ΞΉ β†’ ContDiffBump (0 : G)} {l : Filter ΞΉ} {K : ℝ} (hΟ† : Tendsto (fun i ↦ (Ο† i).rOut) l (𝓝 0)) (h'Ο† : βˆ€αΆ  i in l, (Ο† i).rOut ≀ K * (Ο† i).rIn) (hg : LocallyIntegrable g ΞΌ) : βˆ€α΅ xβ‚€ βˆ‚ΞΌ, Tendsto (fun i ↦ ((Ο† i).normed ΞΌ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€) ...
have : IsAddHaarMeasure μ := ⟨⟩ -- By Lebesgue differentiation theorem, the average of `g` on a small ball converges -- almost everywhere to the value of `g` as the radius shrinks to zero. -- We will see that this set of points satisfies the desired conclusion. filter_upwards [(Besicovitch.vitaliFamily μ).ae...
import Mathlib.Combinatorics.SimpleGraph.Subgraph import Mathlib.Data.List.Rotate #align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4" open Function universe u v w namespace SimpleGraph variable {V : Type u} {V' : Type v} {V'' : Typ...
Mathlib/Combinatorics/SimpleGraph/Connectivity.lean
624
629
theorem mem_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w) : t ∈ (p.append p').support ↔ t ∈ p.support ∨ t ∈ p'.support := by
simp only [mem_support_iff, mem_tail_support_append_iff] obtain rfl | h := eq_or_ne t v <;> obtain rfl | h' := eq_or_ne t u <;> -- this `have` triggers the unusedHavesSuffices linter: (try have := h'.symm) <;> simp [*]
import Mathlib.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Order.Zorn import Mathlib.Data.Finset.Order import Mathlib.Order.Interval.Set.OrderIso import Mathlib.Data.Finite.Set import Mathlib.Tactic.TFAE #alig...
Mathlib/Order/CompactlyGenerated/Basic.lean
215
224
theorem IsSupFiniteCompact.isSupClosedCompact (h : IsSupFiniteCompact Ξ±) : IsSupClosedCompact Ξ± := by
intro s hne hsc; obtain ⟨t, ht₁, htβ‚‚βŸ© := h s; clear h rcases t.eq_empty_or_nonempty with h | h Β· subst h rw [Finset.sup_empty] at htβ‚‚ rw [htβ‚‚] simp [eq_singleton_bot_of_sSup_eq_bot_of_nonempty htβ‚‚ hne] Β· rw [htβ‚‚] exact hsc.finsetSup_mem h ht₁
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
934
943
theorem eq_iff_prime_padicValNat_eq (a b : β„•) (ha : a β‰  0) (hb : b β‰  0) : a = b ↔ βˆ€ p : β„•, p.Prime β†’ padicValNat p a = padicValNat p b := by
constructor Β· rintro rfl simp Β· intro h refine eq_of_factorization_eq ha hb fun p => ?_ by_cases pp : p.Prime Β· simp [factorization_def, pp, h p pp] Β· simp [factorization_eq_zero_of_non_prime, pp]
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Finsupp #align_import algebra.big_operators.associated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} -- the same local notation used in `Algebra.Associated` local infixl:50 " ~α΅€ " => ...
Mathlib/Algebra/BigOperators/Associated.lean
145
150
theorem prod_le_prod {p q : Multiset (Associates Ξ±)} (h : p ≀ q) : p.prod ≀ q.prod := by
haveI := Classical.decEq (Associates Ξ±) haveI := Classical.decEq Ξ± suffices p.prod ≀ (p + (q - p)).prod by rwa [add_tsub_cancel_of_le h] at this suffices p.prod * 1 ≀ p.prod * (q - p).prod by simpa exact mul_mono (le_refl p.prod) one_le
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option lin...
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
490
504
theorem AffineTargetMorphismProperty.diagonal_respectsIso (P : AffineTargetMorphismProperty) (hP : P.toProperty.RespectsIso) : P.diagonal.toProperty.RespectsIso := by
delta AffineTargetMorphismProperty.diagonal apply AffineTargetMorphismProperty.respectsIso_mk Β· introv H _ _ rw [pullback.mapDesc_comp, affine_cancel_left_isIso hP, affine_cancel_right_isIso hP] -- Porting note: add the following two instances have i1 : IsOpenImmersion (f₁ ≫ e.hom) := PresheafedSpace...
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
245
247
theorem Ico_subset_Icc_self : Ico a b βŠ† Icc a b := by
rw [← coe_subset, coe_Ico, coe_Icc] exact Set.Ico_subset_Icc_self
import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Sets.Opens import Mathlib.Data.Set.Subsingleton #align_import algebraic_geometry.projective_spectrum.topology from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" ...
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
264
266
theorem zeroLocus_bUnion (s : Set (Set A)) : zeroLocus π’œ (⋃ s' ∈ s, s' : Set A) = β‹‚ s' ∈ s, zeroLocus π’œ s' := by
simp only [zeroLocus_iUnion]
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section WithDivisionRing variable {K : Type*}...
Mathlib/Algebra/ContinuedFractions/Translations.lean
116
117
theorem exists_conts_b_of_denom {B : K} (nth_denom_eq : g.denominators n = B) : βˆƒ conts, g.continuants n = conts ∧ conts.b = B := by
simpa
import Mathlib.Analysis.Calculus.LocalExtr.Rolle import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Topology.Algebra.Polynomial #align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" namespace Polynomial theorem card_roots_toFinset_...
Mathlib/Analysis/Calculus/LocalExtr/Polynomial.lean
91
94
theorem card_rootSet_le_derivative {F : Type*} [CommRing F] [Algebra F ℝ] (p : F[X]) : Fintype.card (p.rootSet ℝ) ≀ Fintype.card (p.derivative.rootSet ℝ) + 1 := by
simpa only [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe, derivative_map] using card_roots_toFinset_le_derivative (p.map (algebraMap F ℝ))
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Fin import Mathlib.GroupTheory.GroupAction.Pi import Mathlib.Logic.Equiv.Fin #align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013" open Fins...
Mathlib/Algebra/BigOperators/Fin.lean
200
203
theorem prod_congr' {M : Type*} [CommMonoid M] {a b : β„•} (f : Fin b β†’ M) (h : a = b) : (∏ i : Fin a, f (cast h i)) = ∏ i : Fin b, f i := by
subst h congr
import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace #align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal ...
Mathlib/Analysis/Calculus/Deriv/Basic.lean
540
543
theorem deriv_mem_iff {f : π•œ β†’ F} {s : Set F} {x : π•œ} : deriv f x ∈ s ↔ DifferentiableAt π•œ f x ∧ deriv f x ∈ s ∨ Β¬DifferentiableAt π•œ f x ∧ (0 : F) ∈ s := by
by_cases hx : DifferentiableAt π•œ f x <;> simp [deriv_zero_of_not_differentiableAt, *]
import Mathlib.MeasureTheory.OuterMeasure.Basic open Filter Set open scoped ENNReal namespace MeasureTheory variable {Ξ± Ξ² F : Type*} [FunLike F (Set Ξ±) ℝβ‰₯0∞] [OuterMeasureClass F Ξ±] {ΞΌ : F} {s t : Set Ξ±} def ae (ΞΌ : F) : Filter Ξ± := .ofCountableUnion (ΞΌ Β· = 0) (fun _S hSc ↦ (measure_sUnion_null_iff hSc).2) fu...
Mathlib/MeasureTheory/OuterMeasure/AE.lean
178
179
theorem ae_eq_set {s t : Set Ξ±} : s =ᡐ[ΞΌ] t ↔ ΞΌ (s \ t) = 0 ∧ ΞΌ (t \ s) = 0 := by
simp [eventuallyLE_antisymm_iff, ae_le_set]
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
262
266
theorem eq_pow_of_factorization_eq_single {n p k : β„•} (hn : n β‰  0) (h : n.factorization = Finsupp.single p k) : n = p ^ k := by
-- Porting note: explicitly added `Finsupp.prod_single_index` rw [← Nat.factorization_prod_pow_eq_self hn, h, Finsupp.prod_single_index] simp
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
1,315
1,316
theorem tan_periodic : Function.Periodic tan Ο€ := by
simpa only [tan_eq_sin_div_cos] using sin_antiperiodic.div cos_antiperiodic
import Mathlib.Topology.GDelta #align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a" noncomputable section open scoped Topology open Filter Set TopologicalSpace variable {X Ξ± : Type*} {ΞΉ : Sort*} section BaireTheorem variable [TopologicalSpace...
Mathlib/Topology/Baire/Lemmas.lean
151
156
theorem IsGΞ΄.dense_biUnion_interior_of_closed {t : Set Ξ±} {s : Set X} (hs : IsGΞ΄ s) (hd : Dense s) (ht : t.Countable) {f : Ξ± β†’ Set X} (hc : βˆ€ i ∈ t, IsClosed (f i)) (hU : s βŠ† ⋃ i ∈ t, f i) : Dense (⋃ i ∈ t, interior (f i)) := by
haveI := ht.to_subtype simp only [biUnion_eq_iUnion, SetCoe.forall'] at * exact hs.dense_iUnion_interior_of_closed hd hc hU
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
48
49
theorem expand_eq_sum {f : R[X]} : expand R p f = f.sum fun e a => C a * (X ^ p) ^ e := by
simp [expand, evalβ‚‚]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Topology.Order.ProjIcc #align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter open S...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
406
407
theorem arccos_eq_pi {x} : arccos x = Ο€ ↔ x ≀ -1 := by
rw [arccos, sub_eq_iff_eq_add, ← sub_eq_iff_eq_add', div_two_sub_self, neg_pi_div_two_eq_arcsin]
import Mathlib.Algebra.MonoidAlgebra.Basic #align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {k G : Type*} [Semiring k] namespace AddMonoidAlgebra section variable [AddCancelCommMonoid G] noncomputable def divOf (x : k[G]) (g...
Mathlib/Algebra/MonoidAlgebra/Division.lean
77
79
theorem divOf_zero (x : k[G]) : x /α΅’αΆ  0 = x := by
refine Finsupp.ext fun _ => ?_ -- Porting note: `ext` doesn't work simp only [AddMonoidAlgebra.divOf_apply, zero_add]
import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.Tactic.FieldSimp #align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open AffineMap variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE] def ...
Mathlib/LinearAlgebra/AffineSpace/Slope.lean
62
63
theorem sub_smul_slope_vadd (f : k β†’ PE) (a b : k) : (b - a) β€’ slope f a b +α΅₯ f a = f b := by
rw [sub_smul_slope, vsub_vadd]
import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set #align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set namespace OrderIso section Preorder variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²] @[simp] theorem preimage_I...
Mathlib/Order/Interval/Set/OrderIso.lean
58
59
theorem preimage_Ioc (e : Ξ± ≃o Ξ²) (a b : Ξ²) : e ⁻¹' Ioc a b = Ioc (e.symm a) (e.symm b) := by
simp [← Ioi_inter_Iic]
import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.Bicategory.Coherence namespace CategoryTheory namespace Bicategory open Category open scoped Bicategory open Mathlib.Tactic.BicategoryCoherence (bicategoricalComp bicategoricalIsoComp) universe w v u variable {B : Type u} [Bicategory...
Mathlib/CategoryTheory/Bicategory/Adjunction.lean
205
206
theorem rightZigzagIso_inv : (rightZigzagIso Ξ· Ξ΅).inv = leftZigzag Ξ΅.inv Ξ·.inv := by
simp [bicategoricalComp, bicategoricalIsoComp]
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b...
Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
217
231
theorem isBoundedLinearMap_prod_multilinear {E : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (E i)] [βˆ€ i, NormedSpace π•œ (E i)] : IsBoundedLinearMap π•œ fun p : ContinuousMultilinearMap π•œ E F Γ— ContinuousMultilinearMap π•œ E G => p.1.prod p.2 where map_add p₁ pβ‚‚ := by
ext : 1; rfl map_smul c p := by ext : 1; rfl bound := by refine ⟨1, zero_lt_one, fun p ↦ ?_⟩ rw [one_mul] apply ContinuousMultilinearMap.opNorm_le_bound _ (norm_nonneg _) _ intro m rw [ContinuousMultilinearMap.prod_apply, norm_prod_le_iff] constructor Β· exact (p.1.le_opNorm m).trans (mu...
import Mathlib.Algebra.CharP.Defs import Mathlib.RingTheory.Multiplicity import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Polynomial open Finset (antidiagonal mem_anti...
Mathlib/RingTheory/PowerSeries/Order.lean
250
259
theorem coeff_mul_prod_one_sub_of_lt_order {R ΞΉ : Type*} [CommRing R] (k : β„•) (s : Finset ΞΉ) (Ο† : R⟦X⟧) (f : ΞΉ β†’ R⟦X⟧) : (βˆ€ i ∈ s, ↑k < (f i).order) β†’ coeff R k (Ο† * ∏ i ∈ s, (1 - f i)) = coeff R k Ο† := by
classical induction' s using Finset.induction_on with a s ha ih t Β· simp Β· intro t simp only [Finset.mem_insert, forall_eq_or_imp] at t rw [Finset.prod_insert ha, ← mul_assoc, mul_right_comm, coeff_mul_one_sub_of_lt_order _ t.1] exact ih t.2
import Mathlib.AlgebraicGeometry.OpenImmersion import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact import Mathlib.CategoryTheory.MorphismProperty.Composition import Mathlib.RingTheory.LocalProperties universe v u open CategoryTheory namespace AlgebraicGeometry class IsClosedImmersion {X Y : Scheme} (f : X ⟢...
Mathlib/AlgebraicGeometry/Morphisms/ClosedImmersion.lean
79
89
theorem spec_of_surjective {R S : CommRingCat} (f : R ⟢ S) (h : Function.Surjective f) : IsClosedImmersion (Scheme.specMap f) where base_closed := PrimeSpectrum.closedEmbedding_comap_of_surjective _ _ h surj_on_stalks x := by
erw [← localRingHom_comp_stalkIso, CommRingCat.coe_comp, CommRingCat.coe_comp] apply Function.Surjective.comp (Function.Surjective.comp _ _) _ Β· exact (ConcreteCategory.bijective_of_isIso (StructureSheaf.stalkIso S x).inv).2 Β· exact surjective_localRingHom_of_surjective f h x.asIdeal Β· let g := (St...
import Mathlib.FieldTheory.PrimitiveElement import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.G...
Mathlib/RingTheory/Norm.lean
118
121
theorem PowerBasis.norm_gen_eq_coeff_zero_minpoly (pb : PowerBasis R S) : norm R pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0 := by
rw [norm_eq_matrix_det pb.basis, det_eq_sign_charpoly_coeff, charpoly_leftMulMatrix, Fintype.card_fin]
import Batteries.Data.RBMap.Basic import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename import Mathlib.Tactic.TypeStar import Mathlib.Util.CompileInductive #align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8" inductive Tree.{u} (Ξ± : Type u) : Type ...
Mathlib/Data/Tree/Basic.lean
94
96
theorem numLeaves_pos (x : Tree Ξ±) : 0 < x.numLeaves := by
rw [numLeaves_eq_numNodes_succ] exact x.numNodes.zero_lt_succ
import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.projective_space.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" variable (K V : Type*) [DivisionRing K] [AddCommGroup V] [Module K V] def projectivizationSetoid : Setoid { v : V // v β‰  0 } := (MulA...
Mathlib/LinearAlgebra/Projectivization/Basic.lean
228
233
theorem map_comp {F U : Type*} [Field F] [AddCommGroup U] [Module F U] {Οƒ : K β†’+* L} {Ο„ : L β†’+* F} {Ξ³ : K β†’+* F} [RingHomCompTriple Οƒ Ο„ Ξ³] (f : V β†’β‚›β‚—[Οƒ] W) (hf : Function.Injective f) (g : W β†’β‚›β‚—[Ο„] U) (hg : Function.Injective g) : map (g.comp f) (hg.comp hf) = map g hg ∘ map f hf := by
ext ⟨v⟩ rfl
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
87
89
theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by
simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal import Mathlib.AlgebraicGeometry.PrimeSpectrum.Noetherian import Mathlib.RingTheory.ChainOfDivisors import Mathlib.RingTheory.DedekindDomain.Basic import Mathlib.RingTheory.FractionalIdeal.Operations #align_impo...
Mathlib/RingTheory/DedekindDomain/Ideal.lean
1,381
1,388
theorem IsDedekindDomain.exists_representative_mod_finset {ΞΉ : Type*} {s : Finset ΞΉ} (P : ΞΉ β†’ Ideal R) (e : ΞΉ β†’ β„•) (prime : βˆ€ i ∈ s, Prime (P i)) (coprime : βˆ€α΅‰ (i ∈ s) (j ∈ s), i β‰  j β†’ P i β‰  P j) (x : βˆ€ i : s, R β§Έ P i ^ e i) : βˆƒ y, βˆ€ (i) (hi : i ∈ s), Ideal.Quotient.mk (P i ^ e i) y = x ⟨i, hi⟩ := by
let f := IsDedekindDomain.quotientEquivPiOfFinsetProdEq _ P e prime coprime rfl obtain ⟨y, rfl⟩ := f.surjective x obtain ⟨z, rfl⟩ := Ideal.Quotient.mk_surjective y exact ⟨z, fun i _hi => rfl⟩
import Mathlib.Data.Set.Lattice #align_import data.set.accumulate from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" variable {Ξ± Ξ² Ξ³ : Type*} {s : Ξ± β†’ Set Ξ²} {t : Ξ± β†’ Set Ξ³} namespace Set def Accumulate [LE Ξ±] (s : Ξ± β†’ Set Ξ²) (x : Ξ±) : Set Ξ² := ⋃ y ≀ x, s y #align set.accumulate S...
Mathlib/Data/Set/Accumulate.lean
56
61
theorem iUnion_accumulate [Preorder Ξ±] : ⋃ x, Accumulate s x = ⋃ x, s x := by
apply Subset.antisymm · simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate] intro z x x' ⟨_, hz⟩ exact ⟨x', hz⟩ · exact iUnion_mono fun i => subset_accumulate
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Finiteness import Mathlib.GroupTheory.GroupAction.Quotient #align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" namespace Subgroup open Ca...
Mathlib/GroupTheory/Index.lean
326
328
theorem index_map {G' : Type*} [Group G'] (f : G β†’* G') : (H.map f).index = (H βŠ” f.ker).index * f.range.index := by
rw [← comap_map_eq, index_comap, relindex_mul_index (H.map_le_range f)]
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.Tactic.PPWithUniv import Mathlib.Data.Set.Defs #align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace CategoryTheory -- morphism levels be...
Mathlib/CategoryTheory/Types.lean
170
172
theorem eqToHom_map_comp_apply (p : X = Y) (q : Y = Z) (x : F.obj X) : F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom <| p.trans q) x := by
aesop_cat
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps #align_import combinatorics.simple_graph.subgraph from "leanprover-community/mathlib"@"c6ef6387ede9983aee397d442974e61f89dfd87b" universe u v namespace SimpleGraph @[ext] structure Subgraph {V : Type u} (G : SimpleGra...
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
661
673
theorem map_sup {G : SimpleGraph V} {G' : SimpleGraph W} (f : G β†’g G') {H H' : G.Subgraph} : (H βŠ” H').map f = H.map f βŠ” H'.map f := by
ext1 · simp only [Set.image_union, map_verts, verts_sup] · ext simp only [Relation.Map, map_adj, sup_adj] constructor · rintro ⟨a, b, h | h, rfl, rfl⟩ · exact Or.inl ⟨_, _, h, rfl, rfl⟩ · exact Or.inr ⟨_, _, h, rfl, rfl⟩ · rintro (⟨a, b, h, rfl, rfl⟩ | ⟨a, b, h, rfl, rfl⟩) · exa...
import Mathlib.Algebra.Algebra.Spectrum import Mathlib.LinearAlgebra.GeneralLinearGroup import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.RingTheory.Nilpotent.Basic #align_import linear_algebra.eigenspace.basic from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1" universe u v...
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
225
227
theorem mem_maxGenEigenspace (f : End R M) (ΞΌ : R) (m : M) : m ∈ f.maxGenEigenspace ΞΌ ↔ βˆƒ k : β„•, ((f - ΞΌ β€’ (1 : End R M)) ^ k) m = 0 := by
simp only [maxGenEigenspace, ← mem_genEigenspace, Submodule.mem_iSup_of_chain]
import Mathlib.Data.Matrix.Basis import Mathlib.RingTheory.TensorProduct.Basic #align_import ring_theory.matrix_algebra from "leanprover-community/mathlib"@"6c351a8fb9b06e5a542fdf427bfb9f46724f9453" suppress_compilation universe u v w open TensorProduct open TensorProduct open Algebra.TensorProduct open Matri...
Mathlib/RingTheory/MatrixAlgebra.lean
113
121
theorem right_inv (M : Matrix n n A) : (toFunAlgHom R A n) (invFun R A n M) = M := by
simp only [invFun, AlgHom.map_sum, stdBasisMatrix, apply_ite ↑(algebraMap R A), smul_eq_mul, mul_boole, toFunAlgHom_apply, RingHom.map_zero, RingHom.map_one, Matrix.map_apply, Pi.smul_def] convert Finset.sum_product (Ξ² := Matrix n n A) conv_lhs => rw [matrix_eq_sum_std_basis M] refine Finset.sum_congr ...
import Mathlib.Tactic.Linarith.Datatypes import Mathlib.Tactic.Zify import Mathlib.Tactic.CancelDenoms.Core import Batteries.Data.RBMap.Basic import Mathlib.Data.HashMap import Mathlib.Control.Basic set_option autoImplicit true namespace Linarith open Lean hiding Rat open Elab Tactic Meta open Qq partial def ...
Mathlib/Tactic/Linarith/Preprocessing.lean
273
273
theorem without_one_mul [MulOneClass M] {a b : M} (h : 1 * a = b) : a = b := by
rwa [one_mul] at h
import Mathlib.Topology.Algebra.Nonarchimedean.Bases import Mathlib.Topology.Algebra.UniformFilterBasis import Mathlib.RingTheory.Valuation.ValuationSubring #align_import topology.algebra.valuation from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open Topology u...
Mathlib/Topology/Algebra/Valuation.lean
37
81
theorem subgroups_basis : RingSubgroupsBasis fun Ξ³ : Ξ“β‚€Λ£ => (v.ltAddSubgroup Ξ³ : AddSubgroup R) := { inter := by
rintro Ξ³β‚€ γ₁ use min Ξ³β‚€ γ₁ simp only [ltAddSubgroup, ge_iff_le, Units.min_val, Units.val_le_val, lt_min_iff, AddSubgroup.mk_le_mk, setOf_subset_setOf, le_inf_iff, and_imp, imp_self, implies_true, forall_const, and_true] tauto mul := by rintro Ξ³ cases' exists_squa...
import Mathlib.Order.Filter.Cofinite import Mathlib.Order.Filter.CountableInter import Mathlib.Order.Filter.CardinalInter import Mathlib.SetTheory.Cardinal.Ordinal import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.Order.Filter.Bases open Set Filter Cardinal universe u variable {ΞΉ : Type u} {Ξ± Ξ² : Type u}...
Mathlib/Order/Filter/Cocardinal.lean
70
72
theorem frequently_cocardinal {p : Ξ± β†’ Prop} : (βˆƒαΆ  x in cocardinal Ξ± hreg, p x) ↔ c ≀ # { x | p x } := by
simp only [Filter.Frequently, eventually_cocardinal, not_not,coe_setOf, not_lt]
import Batteries.Data.Char import Batteries.Data.List.Lemmas import Batteries.Data.String.Basic import Batteries.Tactic.Lint.Misc import Batteries.Tactic.SeqFocus namespace String attribute [ext] ext theorem lt_trans {s₁ sβ‚‚ s₃ : String} : s₁ < sβ‚‚ β†’ sβ‚‚ < s₃ β†’ s₁ < s₃ := List.lt_trans' (Ξ± := Char) Nat.lt_trans ...
.lake/packages/batteries/Batteries/Data/String/Lemmas.lean
134
143
theorem utf8GetAux_add_right_cancel (s : List Char) (i p n : Nat) : utf8GetAux s ⟨i + n⟩ ⟨p + n⟩ = utf8GetAux s ⟨i⟩ ⟨p⟩ := by
apply utf8InductionOn s ⟨i⟩ ⟨p⟩ (motive := fun s i => utf8GetAux s ⟨i.byteIdx + n⟩ ⟨p + n⟩ = utf8GetAux s i ⟨p⟩) <;> simp [utf8GetAux] intro c cs ⟨i⟩ h ih simp [Pos.ext_iff, Pos.addChar_eq] at h ⊒ simp [Nat.add_right_cancel_iff, h] rw [Nat.add_right_comm] exact ih
import Batteries.Data.Array.Lemmas namespace ByteArray @[ext] theorem ext : {a b : ByteArray} β†’ a.data = b.data β†’ a = b | ⟨_⟩, ⟨_⟩, rfl => rfl theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data[i] := rfl @[simp] theorem uset_eq_set (a : ByteArray) {i : USize} (h : i.toNat < a.size...
.lake/packages/batteries/Batteries/Data/ByteArray.lean
84
87
theorem get_append_right {a b : ByteArray} (hle : a.size ≀ i) (h : i < (a ++ b).size) (h' : i - a.size < b.size := Nat.sub_lt_left_of_lt_add hle (size_append .. β–Έ h)) : (a ++ b)[i] = b[i - a.size] := by
simp [getElem_eq_data_getElem]; exact Array.get_append_right hle
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace #align_import algebraic_geometry.open_immersion.basic from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" -- Porting note: due to `PresheafedSpace`, `SheafedSpace` and `Locally...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
133
141
theorem isoRestrict_hom_ofRestrict : H.isoRestrict.hom ≫ Y.ofRestrict _ = f := by
-- Porting note: `ext` did not pick up `NatTrans.ext` refine PresheafedSpace.Hom.ext _ _ rfl <| NatTrans.ext _ _ <| funext fun x => ?_ simp only [isoRestrict_hom_c_app, NatTrans.comp_app, eqToHom_refl, ofRestrict_c_app, Category.assoc, whiskerRight_id'] erw [Category.comp_id, comp_c_app, f.c.naturality_ass...
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.Analysis.NormedSpace.HahnBanach.SeparatingDual #align_import analysis.calculus.parametric_integral from "leanprover-community/mathlib"@"8f9fea08977f7e4...
Mathlib/Analysis/Calculus/ParametricIntegral.lean
258
284
theorem hasDerivAt_integral_of_dominated_loc_of_lip {F' : Ξ± β†’ E} (Ξ΅_pos : 0 < Ξ΅) (hF_meas : βˆ€αΆ  x in 𝓝 xβ‚€, AEStronglyMeasurable (F x) ΞΌ) (hF_int : Integrable (F xβ‚€) ΞΌ) (hF'_meas : AEStronglyMeasurable F' ΞΌ) (h_lipsch : βˆ€α΅ a βˆ‚ΞΌ, LipschitzOnWith (Real.nnabs <| bound a) (F Β· a) (ball xβ‚€ Ξ΅)) (bound_integrab...
set L : E β†’L[π•œ] π•œ β†’L[π•œ] E := ContinuousLinearMap.smulRightL π•œ π•œ E 1 replace h_diff : βˆ€α΅ a βˆ‚ΞΌ, HasFDerivAt (F Β· a) (L (F' a)) xβ‚€ := h_diff.mono fun x hx ↦ hx.hasFDerivAt have hm : AEStronglyMeasurable (L ∘ F') ΞΌ := L.continuous.comp_aestronglyMeasurable hF'_meas cases' hasFDerivAt_integral_of_domin...
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Integral.Pi import Mathlib.Analysis.Fourier.FourierTransform open Real Set MeasureTheory Filter Asymptotics intervalIntegral open scoped Real Topology FourierTransform Re...
Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
307
315
theorem integral_cexp_neg_sum_mul_add {ΞΉ : Type*} [Fintype ΞΉ] {b : ΞΉ β†’ β„‚} (hb : βˆ€ i, 0 < (b i).re) (c : ΞΉ β†’ β„‚) : ∫ v : ΞΉ β†’ ℝ, cexp (- βˆ‘ i, b i * (v i : β„‚) ^ 2 + βˆ‘ i, c i * v i) = ∏ i, (Ο€ / b i) ^ (1 / 2 : β„‚) * cexp (c i ^ 2 / (4 * b i)) := by
simp_rw [← Finset.sum_neg_distrib, ← Finset.sum_add_distrib, Complex.exp_sum, ← neg_mul] rw [integral_fintype_prod_eq_prod (f := fun i (v : ℝ) ↦ cexp (-b i * v ^ 2 + c i * v))] congr with i have : (-b i).re < 0 := by simpa using hb i convert integral_cexp_quadratic this (c i) 0 using 1 <;> simp [div_neg]
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
131
132
theorem log_conj (x : β„‚) (h : x.arg β‰  Ο€) : log (conj x) = conj (log x) := by
rw [log_conj_eq_ite, if_neg h]
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic import Mathlib.CategoryTheory.Monoidal.Functorial import Mathlib.CategoryTheory.Monoidal.Types.Basic import Mathlib.LinearAlgebra.DirectSum.Finsupp import Mathlib.CategoryTheory.Linear.LinearFunctor #align_import algebra.category.Module.adjunctions from "leanpr...
Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean
112
129
theorem left_unitality (X : Type u) : (Ξ»_ ((free R).obj X)).hom = (Ξ΅ R βŠ— πŸ™ ((free R).obj X)) ≫ (ΞΌ R (πŸ™_ (Type u)) X).hom ≫ map (free R).obj (Ξ»_ X).hom := by
-- Porting note (#11041): broken ext apply TensorProduct.ext apply LinearMap.ext_ring apply Finsupp.lhom_ext' intro x apply LinearMap.ext_ring apply Finsupp.ext intro x' -- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ] let q : X β†’β‚€ R := ((Ξ»_ (of R (X β†’β‚€ R))).hom) (1 βŠ—β‚œ[R] Finsupp.single x 1) cha...
import Mathlib.Algebra.MvPolynomial.Basic #align_import data.mv_polynomial.rename from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra variable {Οƒ Ο„ Ξ± R S : Type*} [CommSemiring R] [CommSemiring S] namespace MvPolynomial...
Mathlib/Algebra/MvPolynomial/Rename.lean
199
203
theorem rename_evalβ‚‚ (g : Ο„ β†’ MvPolynomial Οƒ R) : rename k (p.evalβ‚‚ C (g ∘ k)) = (rename k p).evalβ‚‚ C (rename k ∘ g) := by
apply MvPolynomial.induction_on p <;> Β· intros simp [*]
import Mathlib.Data.List.Chain #align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" variable {Ξ± : Type*} (l : List Ξ±) (R : Ξ± β†’ Ξ± β†’ Prop) [DecidableRel R] {a b : Ξ±} namespace List @[simp] theorem destutter'_nil : destutter' R a [] = [a] := rfl #align ...
Mathlib/Data/List/Destutter.lean
64
70
theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l := by
induction' l with b l hl generalizing a Β· simp rw [destutter'] split_ifs Β· exact Sublist.consβ‚‚ a (hl b) Β· exact (hl a).trans ((l.sublist_cons b).cons_cons a)
import Mathlib.Analysis.RCLike.Basic import Mathlib.Dynamics.BirkhoffSum.Average open Function Set Filter open scoped Topology ENNReal Uniformity section variable {Ξ± E : Type*} theorem Function.IsFixedPt.tendsto_birkhoffAverage (R : Type*) [DivisionSemiring R] [CharZero R] [AddCommMonoid E] [Topological...
Mathlib/Dynamics/BirkhoffSum/NormedSpace.lean
42
44
theorem dist_birkhoffSum_apply_birkhoffSum (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ E) (n : β„•) (x : Ξ±) : dist (birkhoffSum f g n (f x)) (birkhoffSum f g n x) = dist (g (f^[n] x)) (g x) := by
simp only [dist_eq_norm, birkhoffSum_apply_sub_birkhoffSum]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Data.ENat.Basic #align_import data.polynomial.degree.trailing_degree from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" noncomputable section open Function Polynomial Finsupp Finset open scoped Polynomial namespace ...
Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
447
458
theorem natTrailingDegree_mul' (h : p.trailingCoeff * q.trailingCoeff β‰  0) : (p * q).natTrailingDegree = p.natTrailingDegree + q.natTrailingDegree := by
have hp : p β‰  0 := fun hp => h (by rw [hp, trailingCoeff_zero, zero_mul]) have hq : q β‰  0 := fun hq => h (by rw [hq, trailingCoeff_zero, mul_zero]) -- Porting note: Needed to account for different coercion behaviour & add the lemmas below have aux1 : βˆ€ n, Nat.cast n = WithTop.some (n) := fun n ↦ rfl have aux...
import Mathlib.GroupTheory.Submonoid.Inverses import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.inv_submonoid from "leanprover-community/mathlib"@"6e7ca692c98bbf8a64868f61a67fb9c33b10770d" variable {R : Type*} [CommRing R] (M : Submonoid R) (S...
Mathlib/RingTheory/Localization/InvSubmonoid.lean
87
91
theorem surj'' (z : S) : βˆƒ (r : R) (m : M), z = r β€’ (toInvSubmonoid M S m : S) := by
rcases IsLocalization.surj M z with ⟨⟨r, m⟩, e : z * _ = algebraMap R S r⟩ refine ⟨r, m, ?_⟩ rw [Algebra.smul_def, ← e, mul_assoc] simp
import Mathlib.Algebra.CharP.Two import Mathlib.Algebra.CharP.Reduced import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.GroupTheory.SpecificGroups.Cyclic import Mathlib.NumberTheory.Divisors import Mathlib.RingTheory.IntegralDomain import Mathlib.Tactic.Zify #align_import rin...
Mathlib/RingTheory/RootsOfUnity/Basic.lean
131
133
theorem rootsOfUnity.coe_pow [CommMonoid R] (ΞΆ : rootsOfUnity k R) (m : β„•) : (((ΞΆ ^ m :) : RΛ£) : R) = ((ΞΆ : RΛ£) : R) ^ m := by
rw [Subgroup.coe_pow, Units.val_pow_eq_pow_val]
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
350
352
theorem modifyNth_eq_take_cons_drop (f : Ξ± β†’ Ξ±) {n l} (h) : modifyNth f n l = take n l ++ f (get l ⟨n, h⟩) :: drop (n + 1) l := by
rw [modifyNth_eq_take_drop, drop_eq_get_cons h]; rfl
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
219
227
theorem factorization_prod {Ξ± : Type*} {S : Finset Ξ±} {g : Ξ± β†’ β„•} (hS : βˆ€ x ∈ S, g x β‰  0) : (S.prod g).factorization = S.sum fun x => (g x).factorization := by
classical ext p refine Finset.induction_on' S ?_ ?_ Β· simp Β· intro x T hxS hTS hxT IH have hT : T.prod g β‰  0 := prod_ne_zero_iff.mpr fun x hx => hS x (hTS hx) simp [prod_insert hxT, sum_insert hxT, ← IH, factorization_mul (hS x hxS) hT]
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMa...
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
391
410
theorem HasStrictFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by
replace hg := hg.prod_map' hg replace hfg := hfg.prod_mk_nhds hfg have : (fun p : F Γ— F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p : F Γ— F => f' (g p.1 - g p.2) - (p.1 - p.2) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine th...
import Mathlib.Data.List.Basic #align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" -- Make sure we don't import algebra assert_not_exists Monoid variable {Ξ± Ξ² : Type*} namespace List attribute [simp] join -- Porting note (#10618): simp can prove this -- @...
Mathlib/Data/List/Join.lean
105
109
theorem take_sum_join' (L : List (List Ξ±)) (i : β„•) : L.join.take (Nat.sum ((L.map length).take i)) = (L.take i).join := by
induction L generalizing i Β· simp Β· cases i <;> simp [take_append, *]
import Mathlib.Analysis.Normed.Group.Basic import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.AffineSpace.Midpoint #align_import analysis.normed.group.add_torsor from "leanprover-community/mathlib"@"837f72de63ad6cd96519cde5f1ffd5ed8d280ad0" noncomputable section open NNReal Topo...
Mathlib/Analysis/Normed/Group/AddTorsor.lean
197
201
theorem edist_vsub_vsub_le (p₁ pβ‚‚ p₃ pβ‚„ : P) : edist (p₁ -α΅₯ pβ‚‚) (p₃ -α΅₯ pβ‚„) ≀ edist p₁ p₃ + edist pβ‚‚ pβ‚„ := by
simp only [edist_nndist] norm_cast -- Porting note: was apply_mod_cast apply dist_vsub_vsub_le
import Mathlib.Data.Set.Image import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Clopen import Mathlib.Topology.Irreducible #align_import topology.connected from "leanprover-community/mathlib"@"d101e93197bb5f6ea89bd7ba386b7f7dff1f3903" open Set Function Topology TopologicalSpace Relation open scoped C...
Mathlib/Topology/Connected/Basic.lean
503
508
theorem isConnected_univ_pi [βˆ€ i, TopologicalSpace (Ο€ i)] {s : βˆ€ i, Set (Ο€ i)} : IsConnected (pi univ s) ↔ βˆ€ i, IsConnected (s i) := by
simp only [IsConnected, ← univ_pi_nonempty_iff, forall_and, and_congr_right_iff] refine fun hne => ⟨fun hc i => ?_, isPreconnected_univ_pi⟩ rw [← eval_image_univ_pi hne] exact hc.image _ (continuous_apply _).continuousOn
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-...
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
606
608
theorem le_iterate_pos_iff {x : ℝ} {m : β„€} {n : β„•} (hn : 0 < n) : x + n * m ≀ f^[n] x ↔ x + m ≀ f x := by
simpa only [not_lt] using not_congr (f.iterate_pos_lt_iff hn)
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mathlib.Analysis.NormedSpace.AffineIsometry #align_import geometry.euclidean.angle.unoriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
268
275
theorem angle_left_midpoint_eq_pi_div_two_of_dist_eq {p1 p2 p3 : P} (h : dist p3 p1 = dist p3 p2) : ∠ p3 (midpoint ℝ p1 p2) p1 = Ο€ / 2 := by
let m : P := midpoint ℝ p1 p2 have h1 : p3 -α΅₯ p1 = p3 -α΅₯ m - (p1 -α΅₯ m) := (vsub_sub_vsub_cancel_right p3 p1 m).symm have h2 : p3 -α΅₯ p2 = p3 -α΅₯ m + (p1 -α΅₯ m) := by rw [left_vsub_midpoint, ← midpoint_vsub_right, vsub_add_vsub_cancel] rw [dist_eq_norm_vsub V p3 p1, dist_eq_norm_vsub V p3 p2, h1, h2] at h ex...
import Mathlib.Data.Nat.Defs import Mathlib.Logic.IsEmpty import Mathlib.Logic.Relation import Mathlib.Order.Basic #align_import order.rel_classes from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" universe u v variable {Ξ± : Type u} {Ξ² : Type v} {r : Ξ± β†’ Ξ± β†’ Prop} {s : Ξ² β†’ Ξ² β†’ Prop} ...
Mathlib/Order/RelClasses.lean
552
553
theorem not_bounded_iff {r : Ξ± β†’ Ξ± β†’ Prop} (s : Set Ξ±) : Β¬Bounded r s ↔ Unbounded r s := by
simp only [Bounded, Unbounded, not_forall, not_exists, exists_prop, not_and, not_not]
import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.Nat.Prime #align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u variable (R : Type u) section Semiring variable [Semiring R] class inductive Ex...
Mathlib/Algebra/CharP/ExpChar.lean
82
83
theorem ringExpChar.eq_one (R : Type*) [NonAssocSemiring R] [CharZero R] : ringExpChar R = 1 := by
rw [ringExpChar, ringChar.eq_zero, max_eq_right zero_le_one]
import Mathlib.SetTheory.Game.Basic import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834" universe u open SetTheory PGame open scoped NaturalOps PGame namespace Ordinal noncomputable def toPGame : Ordin...
Mathlib/SetTheory/Game/Ordinal.lean
58
59
theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty := by
rw [toPGame, RightMoves]
import Mathlib.Algebra.Module.Submodule.EqLocus import Mathlib.Algebra.Module.Submodule.RestrictScalars import Mathlib.Algebra.Ring.Idempotents import Mathlib.Data.Set.Pointwise.SMul import Mathlib.LinearAlgebra.Basic import Mathlib.Order.CompactlyGenerated.Basic import Mathlib.Order.OmegaCompletePartialOrder #align_...
Mathlib/LinearAlgebra/Span.lean
627
640
theorem span_singleton_eq_span_singleton {R M : Type*} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {x y : M} : ((R βˆ™ x) = R βˆ™ y) ↔ βˆƒ z : RΛ£, z β€’ x = y := by
constructor Β· simp only [le_antisymm_iff, span_singleton_le_iff_mem, mem_span_singleton] rintro ⟨⟨a, rfl⟩, b, hb⟩ rcases eq_or_ne y 0 with rfl | hy; Β· simp refine ⟨⟨b, a, ?_, ?_⟩, hb⟩ Β· apply smul_left_injective R hy simpa only [mul_smul, one_smul] Β· rw [← hb] at hy apply smul_left_...
import Mathlib.Order.ConditionallyCompleteLattice.Finset import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54" assert_not_exists MonoidWithZero open Set namespace Nat open scoped Classical noncomputable instance : ...
Mathlib/Data/Nat/Lattice.lean
59
62
theorem sInf_empty : sInf βˆ… = 0 := by
rw [sInf_eq_zero] right rfl
import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Data.Set.Constructions #align_import topology.category.Compactum from "leanprov...
Mathlib/Topology/Category/Compactum.lean
369
376
theorem cl_eq_closure {X : Compactum} (A : Set X) : cl A = closure A := by
ext rw [mem_closure_iff_ultrafilter] constructor · rintro ⟨F, h1, h2⟩ exact ⟨F, h1, le_nhds_of_str_eq _ _ h2⟩ · rintro ⟨F, h1, h2⟩ exact ⟨F, h1, str_eq_of_le_nhds _ _ h2⟩
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
109
110
theorem projIcc_eq_right (h : a < b) : projIcc a b h.le x = ⟨b, right_mem_Icc.2 h.le⟩ ↔ b ≀ x := by
simp [projIcc, Subtype.ext_iff, max_min_distrib_left, h.le, h.not_le]
import Mathlib.Data.Stream.Defs import Mathlib.Logic.Function.Basic import Mathlib.Init.Data.List.Basic import Mathlib.Data.List.Basic #align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" set_option autoImplicit true open Nat Function Option namespace Stre...
Mathlib/Data/Stream/Init.lean
94
94
theorem head_drop (a : Stream' Ξ±) (n : β„•) : (a.drop n).head = a.get n := by
simp
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" namespace Nat theorem gcd_greatest {a b d : β„•} (hda : d ∣ a) (hdb : d ∣ b) (hd ...
Mathlib/Data/Nat/GCD/Basic.lean
211
212
theorem coprime_add_mul_left_left (m n k : β„•) : Coprime (m + n * k) n ↔ Coprime m n := by
rw [Coprime, Coprime, gcd_add_mul_left_left]
import Mathlib.Algebra.CharP.ExpChar import Mathlib.Algebra.GeomSum import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.RingTheory.Polynomial.Content import Mathlib.RingTheory.UniqueFactorizationDomain #align_import ring_theory.polynomial.basic from "leanprover-commun...
Mathlib/RingTheory/Polynomial/Basic.lean
186
191
theorem degreeLT_succ_eq_degreeLE {n : β„•} : degreeLT R (n + 1) = degreeLE R n := by
ext x by_cases x_zero : x = 0 Β· simp_rw [x_zero, Submodule.zero_mem] Β· rw [mem_degreeLT, mem_degreeLE, ← natDegree_lt_iff_degree_lt (by rwa [ne_eq]), ← natDegree_le_iff_degree_le, Nat.lt_succ]
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
504
508
theorem sum_smul_vsub_eq_affineCombination_vsub (w : ΞΉ β†’ k) (p₁ pβ‚‚ : ΞΉ β†’ P) : (βˆ‘ i ∈ s, w i β€’ (p₁ i -α΅₯ pβ‚‚ i)) = s.affineCombination k p₁ w -α΅₯ s.affineCombination k pβ‚‚ w := by
simp_rw [affineCombination_apply, vadd_vsub_vadd_cancel_right] exact s.sum_smul_vsub_eq_weightedVSubOfPoint_sub _ _ _ _
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Ring.Int #align_import data.int.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" namespace Int open Nat variable {Ξ± : Type*} @[norm_cast] theorem cast_neg_natCast {R} [DivisionRing R] (n : β„•) : ((-n : β„€) : R) = -...
Mathlib/Data/Int/Cast/Field.lean
38
42
theorem cast_div [DivisionRing Ξ±] {m n : β„€} (n_dvd : n ∣ m) (hn : (n : Ξ±) β‰  0) : ((m / n : β„€) : Ξ±) = m / n := by
rcases n_dvd with ⟨k, rfl⟩ have : n β‰  0 := by rintro rfl; simp at hn rw [Int.mul_ediv_cancel_left _ this, mul_comm n, Int.cast_mul, mul_div_cancel_rightβ‚€ _ hn]
import Mathlib.Probability.Process.Filtration import Mathlib.Topology.Instances.Discrete #align_import probability.process.adapted from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Order TopologicalSpace open scoped Classical MeasureTheory NNReal ENNReal Topology namespa...
Mathlib/Probability/Process/Adapted.lean
99
105
theorem Filtration.adapted_natural [MetrizableSpace Ξ²] [mΞ² : MeasurableSpace Ξ²] [BorelSpace Ξ²] {u : ΞΉ β†’ Ξ© β†’ Ξ²} (hum : βˆ€ i, StronglyMeasurable[m] (u i)) : Adapted (Filtration.natural u hum) u := by
intro i refine StronglyMeasurable.mono ?_ (le_iSupβ‚‚_of_le i (le_refl i) le_rfl) rw [stronglyMeasurable_iff_measurable_separable] exact ⟨measurable_iff_comap_le.2 le_rfl, (hum i).isSeparable_range⟩
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Module.Defs #align_import group_theory.subgroup.saturated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" namespace Subgroup variable {G : Type*} [Group G] @[to_additive "An additive subgroup `H` of `G` is *...
Mathlib/GroupTheory/Subgroup/Saturated.lean
42
56
theorem saturated_iff_zpow {H : Subgroup G} : Saturated H ↔ βˆ€ (n : β„€) (g : G), g ^ n ∈ H β†’ n = 0 ∨ g ∈ H := by
constructor · intros hH n g hgn induction' n with n n · simp only [Int.natCast_eq_zero, Int.ofNat_eq_coe, zpow_natCast] at hgn ⊒ exact hH hgn · suffices g ^ (n + 1) ∈ H by refine (hH this).imp ?_ id simp only [IsEmpty.forall_iff, Nat.succ_ne_zero] simpa only [inv_mem_iff, zp...
import Mathlib.Algebra.Module.Submodule.EqLocus import Mathlib.Algebra.Module.Submodule.RestrictScalars import Mathlib.Algebra.Ring.Idempotents import Mathlib.Data.Set.Pointwise.SMul import Mathlib.LinearAlgebra.Basic import Mathlib.Order.CompactlyGenerated.Basic import Mathlib.Order.OmegaCompletePartialOrder #align_...
Mathlib/LinearAlgebra/Span.lean
510
512
theorem span_zero_singleton : (R βˆ™ (0 : M)) = βŠ₯ := by
ext simp [mem_span_singleton, eq_comm]
import Mathlib.Data.Nat.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.List.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Init.Data.List.Instances import Mathlib.Init.Data.List.Lemmas import Mathlib.Logic.Unique import Mathlib.Order.Basic import Mathlib.Tactic.Common #align_import data.list.basic...
Mathlib/Data/List/Basic.lean
490
490
theorem mem_pure (x y : Ξ±) : x ∈ (pure y : List Ξ±) ↔ x = y := by
simp
import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.Seminorm import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Analysis.RCLike.Basic #align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d" ...
Mathlib/Analysis/Convex/Gauge.lean
358
364
theorem gauge_eq_zero (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) : gauge s x = 0 ↔ x = 0 := by
refine ⟨fun hβ‚€ ↦ by_contra fun (hne : x β‰  0) ↦ ?_, fun h ↦ h.symm β–Έ gauge_zero⟩ have : {x}ᢜ ∈ comap (gauge s) (𝓝 0) := comap_gauge_nhds_zero_le hs hb (isOpen_compl_singleton.mem_nhds hne.symm) rcases ((nhds_basis_zero_abs_sub_lt _).comap _).mem_iff.1 this with ⟨r, hrβ‚€, hr⟩ exact hr (by simpa [hβ‚€]) rfl
import Mathlib.Data.Set.Function import Mathlib.Logic.Relation import Mathlib.Logic.Pairwise #align_import data.set.pairwise.basic from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Order Set variable {Ξ± Ξ² Ξ³ ΞΉ ΞΉ' : Type*} {r p q : Ξ± β†’ Ξ± β†’ Prop} section Pairwise variabl...
Mathlib/Data/Set/Pairwise/Basic.lean
41
42
theorem pairwise_on_bool (hr : Symmetric r) {a b : Ξ±} : Pairwise (r on fun c => cond c a b) ↔ r a b := by
simpa [Pairwise, Function.onFun] using @hr a b
import Mathlib.Analysis.Normed.Group.Basic #align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" section HammingDistNorm open Finset Function variable {Ξ± ΞΉ : Type*} {Ξ² : ΞΉ β†’ Type*} [Fintype ΞΉ] [βˆ€ i, DecidableEq (Ξ² i)] variable {Ξ³ : ΞΉ β†’ Type*} [βˆ€ ...
Mathlib/InformationTheory/Hamming.lean
122
123
theorem hammingDist_lt_one {x y : βˆ€ i, Ξ² i} : hammingDist x y < 1 ↔ x = y := by
rw [Nat.lt_one_iff, hammingDist_eq_zero]
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {Ξ± : Type*} section support v...
Mathlib/GroupTheory/Perm/Support.lean
316
316
theorem support_one : (1 : Perm Ξ±).support = βˆ… := by
rw [support_eq_empty_iff]
import Mathlib.Combinatorics.SimpleGraph.Subgraph import Mathlib.Data.List.Rotate #align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4" open Function universe u v w namespace SimpleGraph variable {V : Type u} {V' : Type v} {V'' : Typ...
Mathlib/Combinatorics/SimpleGraph/Connectivity.lean
793
794
theorem length_darts {u v : V} (p : G.Walk u v) : p.darts.length = p.length := by
induction p <;> simp [*]
import Mathlib.Combinatorics.Hall.Finite import Mathlib.CategoryTheory.CofilteredSystem import Mathlib.Data.Rel #align_import combinatorics.hall.basic from "leanprover-community/mathlib"@"8195826f5c428fc283510bc67303dd4472d78498" open Finset CategoryTheory universe u v def hallMatchingsOn {ΞΉ : Type u} {Ξ± : Typ...
Mathlib/Combinatorics/Hall/Basic.lean
123
163
theorem Finset.all_card_le_biUnion_card_iff_exists_injective {ΞΉ : Type u} {Ξ± : Type v} [DecidableEq Ξ±] (t : ΞΉ β†’ Finset Ξ±) : (βˆ€ s : Finset ΞΉ, s.card ≀ (s.biUnion t).card) ↔ βˆƒ f : ΞΉ β†’ Ξ±, Function.Injective f ∧ βˆ€ x, f x ∈ t x := by
constructor Β· intro h -- Set up the functor haveI : βˆ€ ΞΉ' : (Finset ΞΉ)α΅’α΅–, Nonempty ((hallMatchingsFunctor t).obj ΞΉ') := fun ΞΉ' => hallMatchingsOn.nonempty t h ΞΉ'.unop classical haveI : βˆ€ ΞΉ' : (Finset ΞΉ)α΅’α΅–, Finite ((hallMatchingsFunctor t).obj ΞΉ') := by intro ΞΉ' rw [hallMatchi...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis #align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" open scoped Polynomial open Polynomial noncomputable sec...
Mathlib/RingTheory/IsAdjoinRoot.lean
253
257
theorem apply_eq_lift (h : IsAdjoinRoot S f) (g : S β†’+* T) (hmap : βˆ€ a, g (algebraMap R S a) = i a) (hroot : g h.root = x) (a : S) : g a = h.lift i x hx a := by
rw [← h.map_repr a, Polynomial.as_sum_range_C_mul_X_pow (h.repr a)] simp only [map_sum, map_mul, map_pow, h.map_X, hroot, ← h.algebraMap_apply, hmap, lift_root, lift_algebraMap]
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
193
197
theorem volume_le_diam (s : Set ℝ) : volume s ≀ EMetric.diam s := by
by_cases hs : Bornology.IsBounded s Β· rw [Real.ediam_eq hs, ← volume_Icc] exact volume.mono hs.subset_Icc_sInf_sSup Β· rw [Metric.ediam_of_unbounded hs]; exact le_top
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace #align_import algebraic_geometry.open_immersion.basic from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" -- Porting note: due to `PresheafedSpace`, `SheafedSpace` and `Locally...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
200
211
theorem inv_naturality {U V : (Opens X)α΅’α΅–} (i : U ⟢ V) : X.presheaf.map i ≫ H.invApp (unop V) = H.invApp (unop U) ≫ Y.presheaf.map (H.openFunctor.op.map i) := by
simp only [invApp, ← Category.assoc] rw [IsIso.comp_inv_eq] -- Porting note: `simp` can't pick up `f.c.naturality` -- See https://github.com/leanprover-community/mathlib4/issues/5026 simp only [Category.assoc, ← X.presheaf.map_comp] erw [f.c.naturality] simp only [IsIso.inv_hom_id_assoc, ← X.presheaf.map...
import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" noncomputable section open MvPolynomial Function variable...
Mathlib/RingTheory/WittVector/Basic.lean
123
123
theorem zsmul (z : β„€) (x : WittVector p R) : mapFun f (z β€’ x) = z β€’ mapFun f x := by
map_fun_tac
import Mathlib.Combinatorics.SimpleGraph.Subgraph import Mathlib.Data.List.Rotate #align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4" open Function universe u v w namespace SimpleGraph variable {V : Type u} {V' : Type v} {V'' : Typ...
Mathlib/Combinatorics/SimpleGraph/Connectivity.lean
618
620
theorem end_mem_tail_support_of_ne {u v : V} (h : u β‰  v) (p : G.Walk u v) : v ∈ p.support.tail := by
obtain ⟨_, _, _, rfl⟩ := exists_eq_cons_of_ne h p simp
import Mathlib.CategoryTheory.NatIso #align_import category_theory.bicategory.basic from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" namespace CategoryTheory universe w v u open Category Iso -- intended to be used with explicit universe parameters @[nolint checkUnivs] class Bicate...
Mathlib/CategoryTheory/Bicategory/Basic.lean
274
277
theorem pentagon_hom_inv_inv_inv_inv (f : a ⟢ b) (g : b ⟢ c) (h : c ⟢ d) (i : d ⟢ e) : f ◁ (Ξ±_ g h i).hom ≫ (Ξ±_ f g (h ≫ i)).inv ≫ (Ξ±_ (f ≫ g) h i).inv = (Ξ±_ f (g ≫ h) i).inv ≫ (Ξ±_ f g h).inv β–· i := by
simp [← cancel_epi (f ◁ (Ξ±_ g h i).inv)]
import Mathlib.Combinatorics.Young.YoungDiagram #align_import combinatorics.young.semistandard_tableau from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" structure SemistandardYoungTableau (ΞΌ : YoungDiagram) where entry : β„• β†’ β„• β†’ β„• row_weak' : βˆ€ {i j1 j2 : β„•}, j1 < j2 β†’ (i, ...
Mathlib/Combinatorics/Young/SemistandardTableau.lean
129
133
theorem row_weak_of_le {ΞΌ : YoungDiagram} (T : SemistandardYoungTableau ΞΌ) {i j1 j2 : β„•} (hj : j1 ≀ j2) (cell : (i, j2) ∈ ΞΌ) : T i j1 ≀ T i j2 := by
cases' eq_or_lt_of_le hj with h h Β· rw [h] Β· exact T.row_weak h cell
import Mathlib.Topology.Maps import Mathlib.Topology.NhdsSet #align_import topology.constructions from "leanprover-community/mathlib"@"f7ebde7ee0d1505dfccac8644ae12371aa3c1c9f" noncomputable section open scoped Classical open Topology TopologicalSpace Set Filter Function universe u v variable {X : Type u} {Y :...
Mathlib/Topology/Constructions.lean
1,717
1,720
theorem openEmbedding_sigma_map {f₁ : ΞΉ β†’ ΞΊ} {fβ‚‚ : βˆ€ i, Οƒ i β†’ Ο„ (f₁ i)} (h : Injective f₁) : OpenEmbedding (Sigma.map f₁ fβ‚‚) ↔ βˆ€ i, OpenEmbedding (fβ‚‚ i) := by
simp only [openEmbedding_iff_embedding_open, isOpenMap_sigma_map, embedding_sigma_map h, forall_and]
import Mathlib.Logic.Pairwise import Mathlib.Order.CompleteBooleanAlgebra import Mathlib.Order.Directed import Mathlib.Order.GaloisConnection #align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd" open Function Set universe u variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ ΞΉ' ΞΉ...
Mathlib/Data/Set/Lattice.lean
963
964
theorem biUnion_insert (a : Ξ±) (s : Set Ξ±) (t : Ξ± β†’ Set Ξ²) : ⋃ x ∈ insert a s, t x = t a βˆͺ ⋃ x ∈ s, t x := by
simp