Context
stringlengths
295
65.3k
file_name
stringlengths
21
74
start
int64
14
1.41k
end
int64
20
1.41k
theorem
stringlengths
27
1.42k
proof
stringlengths
0
4.57k
/- Copyright (c) 2017 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Mario Carneiro -/ import Mathlib.Algebra.Ring.CharZero import Mathlib.Algebra.Star.Basic import Mathlib.Data.Real.Basic import Mathlib.Order.Interval.Set.UnorderedInterva...
Mathlib/Data/Complex/Basic.lean
608
609
theorem I_sq : I ^ 2 = -1 := by
rw [sq, I_mul_I]
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Data.Complex.Norm /-! # The partial order on the complex numbers This order is defined by `z ≀ w ↔ z.re ≀ w.re ∧ z.im = w.im`. This is a natural order o...
Mathlib/Data/Complex/Order.lean
87
88
theorem not_lt_iff {z w : β„‚} : Β¬z < w ↔ w.re ≀ z.re ∨ z.im β‰  w.im := by
rw [lt_def, not_and_or, not_lt]
/- Copyright (c) 2022 JoΓ«l Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: JoΓ«l Riou -/ import Mathlib.CategoryTheory.Idempotents.Basic import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Equivalence /-! # The Karoubi envelope ...
Mathlib/CategoryTheory/Idempotents/Karoubi.lean
85
85
theorem p_comm {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f ≫ Q.p := by
rw [p_comp, comp_p]
/- Copyright (c) 2019 Neil Strickland. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Neil Strickland -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Order....
Mathlib/Algebra/GeomSum.lean
162
166
theorem geom_sumβ‚‚_mul_of_ge [CommSemiring R] [PartialOrder R] [AddLeftReflectLE R] [AddLeftMono R] [ExistsAddOfLE R] [Sub R] [OrderedSub R] {x y : R} (hxy : y ≀ x) (n : β„•) : (βˆ‘ i ∈ range n, x ^ i * y ^ (n - 1 - i)) * (x - y) = x ^ n - y ^ n := by
apply eq_tsub_of_add_eq simpa only [tsub_add_cancel_of_le hxy] using geom_sumβ‚‚_mul_add (x - y) y n
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau, Kim Morrison, Alex Keizer -/ import Mathlib.Data.List.OfFn import Batteries.Data.List.Perm import Mathlib.Data.List.Nodup /-! # Lists of elements of `Fin n`...
Mathlib/Data/List/FinRange.lean
44
47
theorem pairwise_lt_finRange (n : β„•) : Pairwise (Β· < Β·) (finRange n) := by
rw [finRange_eq_pmap_range] exact List.pairwise_lt_range.pmap (by simp) (by simp)
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Manuel Candales -/ import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mat...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
213
217
theorem dist_eq_abs_sub_dist_iff_angle_eq_zero {p₁ pβ‚‚ p₃ : P} (hp₁pβ‚‚ : p₁ β‰  pβ‚‚) (hp₃pβ‚‚ : p₃ β‰  pβ‚‚) : dist p₁ p₃ = |dist p₁ pβ‚‚ - dist p₃ pβ‚‚| ↔ ∠ p₁ pβ‚‚ p₃ = 0 := by
rw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← vsub_sub_vsub_cancel_right] exact norm_sub_eq_abs_sub_norm_iff_angle_eq_zero (fun he => hp₁pβ‚‚ (vsub_eq_zero_iff_eq.1 he))
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YaΓ«l Dillies, Vladimir Goryachev, Kyle Miller, Kim Morrison, Eric Rodriguez -/ import Mathlib.Algebra.Group.Nat.Range import Mathlib.Data.Set.Finite.Basic /-! # Counting on β„• Thi...
Mathlib/Data/Nat/Count.lean
86
88
theorem count_one : count p 1 = if p 0 then 1 else 0 := by
simp [count_succ] theorem count_succ' (n : β„•) :
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.List.FinRange import Mathlib.Data.List.Perm.Basic import Mathlib.Data.List.Lex import Mathlib.Data.List.Induc...
Mathlib/Data/List/Sublists.lean
169
173
theorem length_sublists (l : List Ξ±) : length (sublists l) = 2 ^ length l := by
simp only [sublists_eq_sublists', length_map, length_sublists', length_reverse] theorem map_pure_sublist_sublists (l : List Ξ±) : map pure l <+ sublists l := by induction' l using reverseRecOn with l a ih <;> simp only [map, map_append, sublists_concat]
/- 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.Pi import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingT...
Mathlib/LinearAlgebra/Lagrange.lean
569
571
theorem nodalWeight_ne_zero (hvs : Set.InjOn v s) (hi : i ∈ s) : nodalWeight s v i β‰  0 := by
rw [nodalWeight, prod_ne_zero_iff] intro j hj
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Analysis.Asymptotics.Theta /-! # Asymptotic equivalence In this file, we define the relation `IsEquivalent l u v`, which means that `u-v` is litt...
Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
133
136
theorem IsEquivalent.tendsto_const {c : Ξ²} (hu : u ~[l] const _ c) : Tendsto u l (𝓝 c) := by
rcases em <| c = 0 with rfl | h Β· exact (tendsto_congr' <| isEquivalent_zero_iff_eventually_zero.mp hu).mpr tendsto_const_nhds Β· exact (isEquivalent_const_iff_tendsto h).mp hu
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Lemmas import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Data.Li...
Mathlib/Data/List/Permutation.lean
244
246
theorem permutations_append (is ts : List Ξ±) : permutations (is ++ ts) = (permutations is).map (Β· ++ ts) ++ permutationsAux ts is.reverse := by
simp [permutations, permutationsAux_append]
/- 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.MeasureTheory.Measure.FiniteMeasure import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Measure.Prod /-! # Probability measures Th...
Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
305
311
theorem tendsto_iff_forall_lintegral_tendsto {Ξ³ : Type*} {F : Filter Ξ³} {ΞΌs : Ξ³ β†’ ProbabilityMeasure Ξ©} {ΞΌ : ProbabilityMeasure Ξ©} : Tendsto ΞΌs F (𝓝 ΞΌ) ↔ βˆ€ f : Ξ© →ᡇ ℝβ‰₯0, Tendsto (fun i ↦ ∫⁻ Ο‰, f Ο‰ βˆ‚(ΞΌs i : Measure Ξ©)) F (𝓝 (∫⁻ Ο‰, f Ο‰ βˆ‚(ΞΌ : Measure Ξ©))) := by
rw [tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds] exact FiniteMeasure.tendsto_iff_forall_lintegral_tendsto
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Manuel Candales -/ import Mathlib.Analysis.InnerProductSpace.Subspace import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse /-! # Angles between vectors This fil...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
49
54
theorem angle_smul_smul {c : ℝ} (hc : c β‰  0) (x y : V) : angle (c β€’ x) (c β€’ y) = angle x y := by
have : c * c β‰  0 := mul_ne_zero hc hc rw [angle, angle, real_inner_smul_left, inner_smul_right, norm_smul, norm_smul, Real.norm_eq_abs, mul_mul_mul_comm _ β€–xβ€–, abs_mul_abs_self, ← mul_assoc c c, mul_div_mul_left _ _ this] @[simp]
/- 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.Analysis.Calculus.FDeriv.Pi import Mathlib.Analysis.Calculus.Deriv.Basic /-! # One-dimensional derivatives on pi-types. -/ varia...
Mathlib/Analysis/Calculus/Deriv/Pi.lean
15
22
theorem hasDerivAt_update (x : ΞΉ β†’ π•œ) (i : ΞΉ) (y : π•œ) : HasDerivAt (Function.update x i) (Pi.single i (1 : π•œ)) y := by
convert (hasFDerivAt_update x y).hasDerivAt ext z j rw [Pi.single, Function.update_apply] split_ifs with h Β· simp [h] Β· simp [Pi.single_eq_of_ne h]
/- Copyright (c) 2020 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann -/ import Mathlib.Algebra.ContinuedFractions.Computation.Approximations import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.D...
Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
101
103
theorem exists_rat_eq_nth_num : βˆƒ q : β„š, (of v).nums n = (q : K) := by
rcases exists_gcf_pair_rat_eq_nth_conts v n with ⟨⟨a, _⟩, nth_cont_eq⟩ use a
/- 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.Normed.Group.AddTorsor import Mathlib.Analysis.Normed.Module.Convex /-! # Sides of affine subspaces This ...
Mathlib/Analysis/Convex/Side.lean
431
433
theorem sOppSide_iff_exists_left {s : AffineSubspace R P} {x y p₁ : P} (h : p₁ ∈ s) : s.SOppSide x y ↔ x βˆ‰ s ∧ y βˆ‰ s ∧ βˆƒ pβ‚‚ ∈ s, SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) := by
rw [SOppSide, and_comm, wOppSide_iff_exists_left h, and_assoc, and_congr_right_iff]
/- Copyright (c) 2024 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.NumberTheory.NumberField.Embeddings /-! # Cyclotomic extensions of `β„š` are totally complex nu...
Mathlib/NumberTheory/Cyclotomic/Embeddings.lean
41
60
theorem nrComplexPlaces_eq_totient_div_two [h : IsCyclotomicExtension {n} β„š K] : haveI := IsCyclotomicExtension.numberField {n} β„š K nrComplexPlaces K = Ο† n / 2 := by
have := IsCyclotomicExtension.numberField {n} β„š K by_cases hn : 2 < n Β· obtain ⟨k, hk : Ο† n = k + k⟩ := totient_even hn have key := card_add_two_mul_card_eq_rank K rw [nrRealPlaces_eq_zero K hn, zero_add, IsCyclotomicExtension.finrank (n := n) K (cyclotomic.irreducible_rat n.pos), hk, ← two_mul, Nat.m...
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Nat.Find import Mathlib.Data.Stream.Init import Mathlib.Tactic.Common /-! # Coinductive formalization of unbounded computations. This fil...
Mathlib/Data/Seq/Computation.lean
735
743
theorem map_think' {Ξ± Ξ²} : βˆ€ (f : Ξ± β†’ Ξ²) (s), f <$> think s = think (f <$> s) := map_think theorem mem_map (f : Ξ± β†’ Ξ²) {a} {s : Computation Ξ±} (m : a ∈ s) : f a ∈ map f s := by
rw [← bind_pure]; apply mem_bind m; apply ret_mem theorem exists_of_mem_map {f : Ξ± β†’ Ξ²} {b : Ξ²} {s : Computation Ξ±} (h : b ∈ map f s) : βˆƒ a, a ∈ s ∧ f a = b := by rw [← bind_pure] at h
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle SΓΆnne -/ import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Analysis.NormedSpac...
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
343
344
theorem continuousOn_log : ContinuousOn log {0}ᢜ := by
simp +unfoldPartialApp only [continuousOn_iff_continuous_restrict,
/- Copyright (c) 2021 YaΓ«l Dillies, 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.Analysis.Convex.Topology import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.Seminorm import Mathlib.Analysis...
Mathlib/Analysis/Convex/Gauge.lean
325
331
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_lt _).comap _).mem_iff.1 this with ⟨r, hrβ‚€, hr⟩ exact hr (by simpa [hβ‚€]) rfl
/- Copyright (c) 2018 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Jens Wagemaker, Anne Baanen -/ import Mathlib.Algebra.BigOperators.Finsupp.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.GroupWithZero....
Mathlib/Algebra/BigOperators/Associated.lean
159
168
theorem finset_prod_mk {p : Finset Ξ²} {f : Ξ² β†’ Ξ±} : (∏ i ∈ p, Associates.mk (f i)) = Associates.mk (∏ i ∈ p, f i) := by
rw [Finset.prod_eq_multiset_prod, ← Function.comp_def, ← Multiset.map_map, prod_mk, ← Finset.prod_eq_multiset_prod] theorem rel_associated_iff_map_eq_map {p q : Multiset Ξ±} : Multiset.Rel Associated p q ↔ p.map Associates.mk = q.map Associates.mk := by rw [← Multiset.rel_eq, Multiset.rel_map] simp only [mk...
/- Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: SΓ©bastien GouΓ«zel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.MFDeriv.FDeriv /-! # Differentiability of specific functions In this file, we establish differentiability r...
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
157
160
theorem tangentMap_id : tangentMap I I (id : M β†’ M) = id := by
ext1 ⟨x, v⟩; simp [tangentMap] theorem tangentMapWithin_id {p : TangentBundle I M} (hs : UniqueMDiffWithinAt I s p.proj) : tangentMapWithin I I (id : M β†’ M) s p = p := by
/- Copyright (c) 2021 Eric Rodriguez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Rodriguez -/ import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.Tactic.ByContra import Mathlib.Topology.Algebra.Polynomial import Mathlib.NumberTheory.Padics.Pad...
Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
41
44
theorem evalβ‚‚_one_cyclotomic_prime_pow {R S : Type*} [CommRing R] [Semiring S] (f : R β†’+* S) {p : β„•} (k : β„•) [Fact p.Prime] : evalβ‚‚ f 1 (cyclotomic (p ^ (k + 1)) R) = p := by
simp private theorem cyclotomic_neg_one_pos {n : β„•} (hn : 2 < n) {R}
/- Copyright (c) 2024 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.NumberTheory.NumberField.Embeddings /-! # Cyclotomic extensions of `β„š` are totally complex nu...
Mathlib/NumberTheory/Cyclotomic/Embeddings.lean
30
35
theorem nrRealPlaces_eq_zero [IsCyclotomicExtension {n} β„š K] (hn : 2 < n) : haveI := IsCyclotomicExtension.numberField {n} β„š K nrRealPlaces K = 0 := by
have := IsCyclotomicExtension.numberField {n} β„š K apply (IsCyclotomicExtension.zeta_spec n β„š K).nrRealPlaces_eq_zero_of_two_lt hn
/- 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, Devon Tuma -/ import Mathlib.Probability.ProbabilityMassFunction.Monad import Mathlib.Control.ULiftable /-! # Specific Constructions of Probability Mass Functions Thi...
Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
172
173
theorem mem_support_ofFinset_iff (a : Ξ±) : a ∈ (ofFinset f s h h').support ↔ a ∈ s ∧ f a β‰  0 := by
simp
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes HΓΆlzl, Patrick Massot -/ import Mathlib.Data.Set.Image import Mathlib.Data.SProd /-! # Sets in product and pi types This file proves basic properties of prod...
Mathlib/Data/Set/Prod.lean
889
892
theorem univ_pi_ite (s : Set ΞΉ) [DecidablePred (Β· ∈ s)] (t : βˆ€ i, Set (Ξ± i)) : (pi univ fun i => if i ∈ s then t i else univ) = s.pi t := by
ext simp_rw [mem_univ_pi]
/- 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, Yury Kudryashov -/ import Mathlib.Order.Minimal import Mathlib.Order.Zorn import Mathlib.Topology.ContinuousOn /-! # Irreducibility in topological space...
Mathlib/Topology/Irreducible.lean
202
217
theorem Subtype.irreducibleSpace (h : IsIrreducible s) : IrreducibleSpace s where isPreirreducible_univ := (Subtype.preirreducibleSpace h.isPreirreducible).isPreirreducible_univ toNonempty := h.nonempty.to_subtype /-- An infinite type with cofinite topology is an irreducible topological space. -/ instance (pri...
haveI : Infinite (CofiniteTopology X) := β€Ή_β€Ί simp only [CofiniteTopology.isOpen_iff, univ_inter] intro hu hv hu' hv' simpa only [compl_union, compl_compl] using ((hu hu').union (hv hv')).infinite_compl.nonempty toNonempty := (inferInstance : Nonempty X) theorem irreducibleComponents_eq_singleton [Irreduc...
/- 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 /-! # Power function...
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
821
824
theorem rpow_lt_one {x : ℝβ‰₯0∞} {z : ℝ} (hx : x < 1) (hz : 0 < z) : x ^ z < 1 := by
lift x to ℝβ‰₯0 using ne_of_lt (lt_of_lt_of_le hx le_top) simp only [coe_lt_one_iff] at hx simp [← coe_rpow_of_nonneg _ (le_of_lt hz), NNReal.rpow_lt_one hx hz]
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Edward Ayers -/ import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback import Mathlib.Data.Set.BooleanAlgebra /-! # Theory of sieves - For an object `X` of a ca...
Mathlib/CategoryTheory/Sites/Sieves.lean
246
254
theorem functorPushforward_comp (R : Presieve X) : R.functorPushforward (F β‹™ G) = (R.functorPushforward F).functorPushforward G := by
funext x ext f constructor Β· rintro ⟨X, f₁, g₁, h₁, rfl⟩ exact ⟨F.obj X, F.map f₁, g₁, ⟨X, f₁, πŸ™ _, h₁, by simp⟩, rfl⟩ Β· rintro ⟨X, f₁, g₁, ⟨X', fβ‚‚, gβ‚‚, h₁, rfl⟩, rfl⟩ exact ⟨X', fβ‚‚, g₁ ≫ G.map gβ‚‚, h₁, by simp⟩
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.CharP.Frobenius import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.RingTheory.Polynomial.Basic /...
Mathlib/Algebra/Polynomial/Expand.lean
127
128
theorem expand_eq_C {p : β„•} (hp : 0 < p) {f : R[X]} {r : R} : expand R p f = C r ↔ f = C r := by
rw [← expand_C, expand_inj hp, expand_C]
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Topology.Order.MonotoneContinuity import M...
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
743
747
theorem map_lt_add_floor_translationNumber_add_one (x : ℝ) : f x < x + βŒŠΟ„ fβŒ‹ + 1 := by
rw [add_assoc] norm_cast refine map_lt_of_translationNumber_lt_int _ ?_ _ push_cast
/- Copyright (c) 2024 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker, Devon Tuma, Kexing Ying -/ import Mathlib.Probability.Notation import Mathlib.Probability.Density import Mathlib.Probability.ConditionalProbability import Mathlib.Probabili...
Mathlib/Probability/Distributions/Uniform.lean
305
306
theorem toOuterMeasure_uniformOfFintype_apply [Fintype s] : (uniformOfFintype Ξ±).toOuterMeasure s = Fintype.card s / Fintype.card Ξ± := by
/- Copyright (c) 2020 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.GroupTheory.Complement /-! # Semidirect product This file defines semidirect products of groups, and the canonical maps in and out of the semidirect prod...
Mathlib/GroupTheory/SemidirectProduct.lean
205
207
theorem lift_inl (n : N) : lift fn fg h (inl n) = fn n := by
simp [lift] @[simp]
/- Copyright (c) 2020 Paul van Wamelen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul van Wamelen -/ import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.FieldSimp /-! # Pythagorean Triples Th...
Mathlib/NumberTheory/PythagoreanTriples.lean
218
225
theorem isPrimitiveClassified_of_coprime_of_zero_left (hc : Int.gcd x y = 1) (hx : x = 0) : h.IsPrimitiveClassified := by
subst x change Nat.gcd 0 (Int.natAbs y) = 1 at hc rw [Nat.gcd_zero_left (Int.natAbs y)] at hc rcases Int.natAbs_eq y with hy | hy Β· use 1, 0 rw [hy, hc, Int.gcd_zero_right]
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.TwoDim import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic /-! # Oriented angles. This file defines orie...
Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
471
474
theorem oangle_add_cyc3 {x y z : V} (hx : x β‰  0) (hy : y β‰  0) (hz : z β‰  0) : o.oangle x y + o.oangle y z + o.oangle z x = 0 := by
simp [hx, hy, hz] /-- Given three nonzero vectors, adding the angles between them in cyclic order, with the first
/- Copyright (c) 2021 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Mathlib.Algebra.Algebra.Spectrum.Basic import Mathlib.FieldTheory.IsAlgClosed.Basic /-! # Spectrum mapping theorem This file develops proves the spectral mappi...
Mathlib/FieldTheory/IsAlgClosed/Spectrum.lean
143
145
theorem nonempty_of_isAlgClosed_of_finiteDimensional [IsAlgClosed π•œ] [Nontrivial A] [I : FiniteDimensional π•œ A] (a : A) : (Οƒ a).Nonempty := by
obtain ⟨p, ⟨h_mon, h_eval_p⟩⟩ := isIntegral_of_noetherian (IsNoetherian.iff_fg.2 I) a
/- Copyright (c) 2023 RΓ©my Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: RΓ©my Degenne, Peter Pfaffelhuber, YaΓ«l Dillies, Kin Yau James Wong -/ import Mathlib.MeasureTheory.MeasurableSpace.Constructions import Mathlib.MeasureTheory.PiSystem import Mathlib.Topo...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
237
244
theorem disjoint_cylinder_iff [Nonempty (βˆ€ i, Ξ± i)] {s t : Finset ΞΉ} {S : Set (βˆ€ i : s, Ξ± i)} {T : Set (βˆ€ i : t, Ξ± i)} [DecidableEq ΞΉ] : Disjoint (cylinder s S) (cylinder t T) ↔ Disjoint (Finset.restrictβ‚‚ Finset.subset_union_left ⁻¹' S) (Finset.restrictβ‚‚ Finset.subset_union_right ⁻¹' T) :=...
simp_rw [Set.disjoint_iff, subset_empty_iff, inter_cylinder, cylinder_eq_empty_iff]
/- 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, Johan Commelin, Mario Carneiro -/ import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.MvPolynomial.Rename /-! # Degrees of polynomials This file establ...
Mathlib/Algebra/MvPolynomial/Degrees.lean
144
146
theorem le_degrees_add_left (h : Disjoint p.degrees q.degrees) : p.degrees ≀ (p + q).degrees := by
classical apply Finset.sup_le
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Kexing Ying, Eric Wieser -/ import Mathlib.Data.Finset.Sym import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathlib.Linea...
Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
107
108
theorem polar_neg (f : M β†’ N) (x y : M) : polar (-f) x y = -polar f x y := by
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
/- Copyright (c) 2023 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker -/ import Mathlib.Topology.Bases import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Compactness.SigmaCompact /-! # LindelΓΆf sets and LindelΓΆf spaces ## Mai...
Mathlib/Topology/Compactness/Lindelof.lean
196
206
theorem IsLindelof.disjoint_nhdsSet_left {l : Filter X} [CountableInterFilter l] (hs : IsLindelof s) : Disjoint (𝓝˒ s) l ↔ βˆ€ x ∈ s, Disjoint (𝓝 x) l := by
refine ⟨fun h x hx ↦ h.mono_left <| nhds_le_nhdsSet hx, fun H ↦ ?_⟩ choose! U hxU hUl using fun x hx ↦ (nhds_basis_opens x).disjoint_iff_left.1 (H x hx) choose hxU hUo using hxU rcases hs.elim_nhds_subcover U fun x hx ↦ (hUo x hx).mem_nhds (hxU x hx) with ⟨t, htc, hts, hst⟩ refine (hasBasis_nhdsSet _).disjoint_...
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle /-! # Closure, interior, and frontier of preimages under `re`...
Mathlib/Analysis/Complex/ReImTopology.lean
164
165
theorem frontier_setOf_le_re_and_im_le (a b : ℝ) : frontier { z | a ≀ re z ∧ im z ≀ b } = { z | a ≀ re z ∧ im z = b ∨ re z = a ∧ im z ≀ b } := by
/- 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.ConditionallyCompleteLattice.Indexed import Mathlib.Order.Filter.IsBounded import Mathlib.Order.Hom.CompleteL...
Mathlib/Order/LiminfLimsup.lean
911
921
theorem liminf_le_iff' [DenselyOrdered Ξ²] {x : Ξ²} (h₁ : f.IsCoboundedUnder (Β· β‰₯ Β·) u := by
isBoundedDefault) (hβ‚‚ : f.IsBoundedUnder (Β· β‰₯ Β·) u := by isBoundedDefault) : liminf u f ≀ x ↔ βˆ€ y > x, βˆƒαΆ  a in f, u a ≀ y := le_limsup_iff' (Ξ² := Ξ²α΅’α΅ˆ) h₁ hβ‚‚ lemma liminf_le_limsup_of_frequently_le {v : Ξ± β†’ Ξ²} (h : βˆƒαΆ  x in f, u x ≀ v x) (h₁ : f.IsBoundedUnder (Β· β‰₯ Β·) u := by isBoundedDefault) (hβ‚‚ : f.Is...
/- Copyright (c) 2021 Hunter Monroe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hunter Monroe, Kyle Miller, Alena Gusakov -/ import Mathlib.Combinatorics.SimpleGraph.DeleteEdges import Mathlib.Data.Fintype.Powerset /-! # Subgraphs of a simple graph A subgraph of ...
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
533
534
theorem edgeSet_sSup (s : Set G.Subgraph) : (sSup s).edgeSet = ⋃ G' ∈ s, edgeSet G' := by
ext e
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Subobject.Limits /-! # Image-to-kernel comparison maps Whenever `f : A ⟢ B` and `g : B ⟢ C` satisfy `w : f ≫ g = 0`, we have `image_le_ker...
Mathlib/Algebra/Homology/ImageToKernel.lean
127
132
theorem imageToKernel_comp_hom_inv_comp [HasEqualizers V] [HasImages V] {Z : V} {i : B β‰… Z} (w) : imageToKernel (f ≫ i.hom) (i.inv ≫ g) w = (imageSubobjectCompIso _ _).hom ≫ imageToKernel f g (by simpa using w) ≫ (kernelSubobjectIsoComp i.inv g).inv := by
ext simp
/- 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, YaΓ«l Dillies -/ import Mathlib.Data.Set.Image /-! # Directed indexed families and sets This file defines directed indexed families and directed sets. An indexed famil...
Mathlib/Order/Directed.lean
58
60
theorem directedOn_range {f : ΞΉ β†’ Ξ±} : Directed r f ↔ DirectedOn r (Set.range f) := by
simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff]
/- Copyright (c) 2023 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker -/ import Mathlib.Topology.Bases import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Compactness.SigmaCompact /-! # LindelΓΆf sets and LindelΓΆf spaces ## Mai...
Mathlib/Topology/Compactness/Lindelof.lean
382
406
theorem isLindelof_open_iff_eq_countable_iUnion_of_isTopologicalBasis (b : ΞΉ β†’ Set X) (hb : IsTopologicalBasis (Set.range b)) (hb' : βˆ€ i, IsLindelof (b i)) (U : Set X) : IsLindelof U ∧ IsOpen U ↔ βˆƒ s : Set ΞΉ, s.Countable ∧ U = ⋃ i ∈ s, b i := by
constructor Β· rintro ⟨h₁, hβ‚‚βŸ© obtain ⟨Y, f, rfl, hf⟩ := hb.open_eq_iUnion hβ‚‚ choose f' hf' using hf have : b ∘ f' = f := funext hf' subst this obtain ⟨t, ht⟩ := h₁.elim_countable_subcover (b ∘ f') (fun i => hb.isOpen (Set.mem_range_self _)) Subset.rfl refine ⟨t.image f', Countable.image ...
/- 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, Floris van Doorn, Yury Kudryashov, Neil Strickland -/ import Mathlib.Algebra.Ring.InjSurj import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra...
Mathlib/Algebra/Ring/Units.lean
77
78
theorem divp_sub (a b : Ξ±) (u : Ξ±Λ£) : a /β‚š u - b = (a - b * u) /β‚š u := by
simp only [divp, sub_mul, sub_right_inj]
/- 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.Basic import Mathlib.Analysis.Convex.Segment import...
Mathlib/Analysis/Convex/Between.lean
219
222
theorem sbtw_const_vsub_iff {x y z : P} (p : P) : Sbtw R (p -α΅₯ x) (p -α΅₯ y) (p -α΅₯ z) ↔ Sbtw R x y z := by
rw [Sbtw, Sbtw, wbtw_const_vsub_iff, (vsub_right_injective p).ne_iff, (vsub_right_injective p).ne_iff]
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.ContinuousMap.Bounded.Normed import Mathlib.Topology.UrysohnsBounded /-! # Tietze extension theore...
Mathlib/Topology/TietzeExtension.lean
220
262
theorem exists_extension_norm_eq_of_isClosedEmbedding' (f : X →ᡇ ℝ) (e : C(X, Y)) (he : IsClosedEmbedding e) : βˆƒ g : Y →ᡇ ℝ, β€–gβ€– = β€–fβ€– ∧ g.compContinuous e = f := by
/- For the proof, we iterate `tietze_extension_step`. Each time we apply it to the difference between the previous approximation and `f`. -/ choose F hF_norm hF_dist using fun f : X →ᡇ ℝ => tietze_extension_step f e he set g : β„• β†’ Y →ᡇ ℝ := fun n => (fun g => g + F (f - g.compContinuous e))^[n] 0 have g0 : g ...
/- 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, Patrick Massot, Yury Kudryashov -/ import Mathlib.Tactic.ApplyFun import Mathlib.Topology.Separation.Regular import Mathlib.Topology.UniformSpace.Basic /-! # Hausdorff...
Mathlib/Topology/UniformSpace/Separation.lean
142
146
theorem t0Space_iff_uniformity' : T0Space Ξ± ↔ Pairwise fun x y ↦ βˆƒ r ∈ 𝓀 Ξ±, (x, y) βˆ‰ r := by
simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity] theorem t0Space_iff_ker_uniformity : T0Space Ξ± ↔ (𝓀 Ξ±).ker = diagonal Ξ± := by
/- 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.Data.Set.Function import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Says /-! # Equivalences and sets In this file we pr...
Mathlib/Logic/Equiv/Set.lean
143
145
theorem prod_assoc_image {Ξ± Ξ² Ξ³} {s : Set Ξ±} {t : Set Ξ²} {u : Set Ξ³} : Equiv.prodAssoc Ξ± Ξ² Ξ³ '' (s Γ—Λ’ t) Γ—Λ’ u = s Γ—Λ’ t Γ—Λ’ u := by
simpa only [Equiv.image_eq_preimage] using prod_assoc_symm_preimage
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Birkhoff sums In this file we define `birkhoffSum f g n x` ...
Mathlib/Dynamics/BirkhoffSum/Basic.lean
55
57
theorem Function.IsFixedPt.birkhoffSum_eq {f : Ξ± β†’ Ξ±} {x : Ξ±} (h : IsFixedPt f x) (g : Ξ± β†’ M) (n : β„•) : birkhoffSum f g n x = n β€’ g x := by
simp [birkhoffSum, (h.iterate _).eq]
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Ken Lee, Chris Hughes -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic /-...
Mathlib/RingTheory/Coprime/Lemmas.lean
213
216
theorem IsRelPrime.prod_left : (βˆ€ i ∈ t, IsRelPrime (s i) x) β†’ IsRelPrime (∏ i ∈ t, s i) x := by
classical refine Finset.induction_on t (fun _ ↦ isRelPrime_one_left) fun b t hbt ih H ↦ ?_ rw [Finset.prod_insert hbt]
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, YaΓ«l Dillies -/ import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap /-! # Integral average of a function In this file we define `MeasureTheory.average...
Mathlib/MeasureTheory/Integral/Average.lean
149
150
theorem laverage_lt_top (hf : ∫⁻ x, f x βˆ‚ΞΌ β‰  ∞) : ⨍⁻ x, f x βˆ‚ΞΌ < ∞ := by
obtain rfl | hΞΌ := eq_or_ne ΞΌ 0
/- 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 import Mathlib.Data.Set.Finite.Powerset /-! # Noncomputable Set Cardinality We define the cardinality of set `s` as a term `Set...
Mathlib/Data/Set/Card.lean
693
697
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) 2022 Devon Tuma. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Devon Tuma -/ import Mathlib.Data.Vector.Basic /-! # Theorems about membership of elements in vectors This file contains theorems for membership in a `v.toList` for a vector `v`. Having ...
Mathlib/Data/Vector/Mem.lean
38
41
theorem not_mem_zero (v : Vector Ξ± 0) : a βˆ‰ v.toList := (Vector.eq_nil v).symm β–Έ not_mem_nil a theorem mem_cons_iff (v : Vector Ξ± n) : a' ∈ (a ::α΅₯ v).toList ↔ a' = a ∨ a' ∈ v.toList := by
/- 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.NNReal /-! # Limits and a...
Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean
303
307
theorem isLittleO_zpow_exp_pos_mul_atTop (k : β„€) {b : ℝ} (hb : 0 < b) : (fun x : ℝ => x ^ k) =o[atTop] fun x => exp (b * x) := by
simpa only [Real.rpow_intCast] using isLittleO_rpow_exp_pos_mul_atTop k hb /-- `x ^ k = o(exp(b * x))` as `x β†’ ∞` for any natural `k` and positive `b`. -/
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Size import Batteries.Data.Int /-! # Bitwise operations on integers Possi...
Mathlib/Data/Int/Bitwise.lean
159
167
theorem div2_val : βˆ€ n, div2 n = n / 2 | (n : β„•) => congr_arg ofNat n.div2_val | -[n+1] => congr_arg negSucc n.div2_val theorem bit_val (b n) : bit b n = 2 * n + cond b 1 0 := by
cases b Β· apply (add_zero _).symm Β· rfl
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Floris van Doorn -/ import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Basic /-! # Explicit least witnesses to existentials on positive natural numbers Implement...
Mathlib/Data/PNat/Find.lean
91
92
theorem one_le_find : 1 < PNat.find h ↔ Β¬p 1 := by
simp
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.BigOperators.Group.Finset.Indicator import Mathlib.Algebra.Module.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic import...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
464
466
theorem affineCombination_map (e : ΞΉβ‚‚ β†ͺ ΞΉ) (w : ΞΉ β†’ k) (p : ΞΉ β†’ P) : (sβ‚‚.map e).affineCombination k p w = sβ‚‚.affineCombination k (p ∘ e) (w ∘ e) := by
simp_rw [affineCombination_apply, weightedVSubOfPoint_map]
/- 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.Data.Set.Countable import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Tactic.FunProp.Attr import Mathlib.Tactic.Mea...
Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
247
248
theorem measurableSet_insert {a : Ξ±} {s : Set Ξ±} : MeasurableSet (insert a s) ↔ MeasurableSet s := by
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Yury Kudryashov -/ import Mathlib.Topology.Algebra.Module.Equiv import Mathlib.Topology.Algebra.Module.UniformConvergence import Mathlib.Topology.Algebra.Separation...
Mathlib/Topology/Algebra/Module/StrongTopology.lean
96
101
theorem topologicalSpace_eq [UniformSpace F] [IsUniformAddGroup F] (𝔖 : Set (Set E)) : instTopologicalSpace Οƒ F 𝔖 = TopologicalSpace.induced (UniformOnFun.ofFun 𝔖 ∘ DFunLike.coe) (UniformOnFun.topologicalSpace E F 𝔖) := by
rw [instTopologicalSpace] congr exact IsUniformAddGroup.toUniformSpace_eq
/- 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 Batteries.Tactic.Init import Mathlib.Logic.Function.Defs /-! # Binary map of options This file defines the binary map of `Option`. This is mostly useful to defin...
Mathlib/Data/Option/NAry.lean
140
143
theorem map_mapβ‚‚_distrib_left {g : Ξ³ β†’ Ξ΄} {f' : Ξ±' β†’ Ξ² β†’ Ξ΄} {g' : Ξ± β†’ Ξ±'} (h_distrib : βˆ€ a b, g (f a b) = f' (g' a) b) : (mapβ‚‚ f a b).map g = mapβ‚‚ f' (a.map g') b := by
cases a <;> cases b <;> simp [h_distrib]
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.SetTheory.Cardinal.Finite /-! # Cardinality of finite types The cardinality of a finite type `Ξ±` is given by `Nat.card Ξ±`. This function has the "junk val...
Mathlib/Data/Finite/Card.lean
72
75
theorem one_lt_card_iff_nontrivial [Finite Ξ±] : 1 < Nat.card Ξ± ↔ Nontrivial Ξ± := by
haveI := Fintype.ofFinite Ξ± simp only [Nat.card_eq_fintype_card, Fintype.one_lt_card_iff_nontrivial]
/- Copyright (c) 2019 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Patrick Massot, Casper Putz, Anne Baanen -/ import Mathlib.LinearAlgebra.Basis.Submodule import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.LinearAlgebra.Matrix...
Mathlib/LinearAlgebra/Matrix/Basis.lean
204
208
theorem basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix [Fintype ΞΊ'] [DecidableEq ΞΉ] [DecidableEq ΞΉ'] : c.toMatrix c' * LinearMap.toMatrix b' c' f * b'.toMatrix b = LinearMap.toMatrix b c f := by
cases nonempty_fintype ΞΊ rw [basis_toMatrix_mul_linearMap_toMatrix, linearMap_toMatrix_mul_basis_toMatrix]
/- 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 import Mathlib.Tactic.IntervalCases /-! # Cubics and discriminants This file defines cubic polynomials ...
Mathlib/Algebra/CubicDiscriminant.lean
137
138
theorem of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly = C P.d := by
rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add]
/- Copyright (c) 2020 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.Algebra.Module.Opposite /-! # Conjugations This file defines the grade reversal and grade involution f...
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
308
310
theorem involute_eq_of_mem_odd {x : CliffordAlgebra Q} (h : x ∈ evenOdd Q 1) : involute x = -x := by
induction x, h using odd_induction with | ΞΉ m => exact involute_ΞΉ _
/- Copyright (c) 2014 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Jeremy Avigad -/ import Mathlib.Algebra.Order.Group.Nat import Mathlib.Algebra.Order.Ring.Canonical /-! # Distance function on β„• This file defines a simple dista...
Mathlib/Data/Nat/Dist.lean
92
96
theorem dist_pos_of_ne {i j : Nat} (h : i β‰  j) : 0 < dist i j := by
cases h.lt_or_lt with | inl h => rw [dist_eq_sub_of_le h.le]; apply tsub_pos_of_lt h | inr h => rw [dist_eq_sub_of_le_right h.le]; apply tsub_pos_of_lt h
/- 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.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp /-! # Additive operations on derivative...
Mathlib/Analysis/Calculus/FDeriv/Add.lean
593
595
theorem hasStrictFDerivAt_sub_const_iff (c : F) : HasStrictFDerivAt (f Β· - c) f' x ↔ HasStrictFDerivAt f f' x := by
simp only [sub_eq_add_neg, hasStrictFDerivAt_add_const_iff]
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Ken Lee, Chris Hughes -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic /-...
Mathlib/RingTheory/Coprime/Lemmas.lean
281
289
theorem pow (H : IsRelPrime x y) : IsRelPrime (x ^ m) (y ^ n) := H.pow_left.pow_right theorem pow_left_iff (hm : 0 < m) : IsRelPrime (x ^ m) y ↔ IsRelPrime x y := by
refine ⟨fun h ↦ ?_, IsRelPrime.pow_left⟩ rw [← Finset.card_range m, ← Finset.prod_const] at h exact h.of_prod_left 0 (Finset.mem_range.mpr hm) theorem pow_right_iff (hm : 0 < m) : IsRelPrime x (y ^ m) ↔ IsRelPrime x y :=
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Moritz Doll -/ import Mathlib.LinearAlgebra.Prod /-! # Partially defined linear maps A `LinearPMap R E F` or `E β†’β‚—.[R] F` is a linear map from a submodule of `E` to...
Mathlib/LinearAlgebra/LinearPMap.lean
772
775
theorem mem_domain_iff {f : E β†’β‚—.[R] F} {x : E} : x ∈ f.domain ↔ βˆƒ y : F, (x, y) ∈ f.graph := by
constructor <;> intro h · use f ⟨x, h⟩ exact f.mem_graph ⟨x, h⟩
/- 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.Integral.Lebesgue.Countable import Mathlib.MeasureTheory.Measure.Decomposition.Exhaustion import Mathlib.MeasureTheory.Me...
Mathlib/MeasureTheory/Measure/WithDensity.lean
651
658
theorem prod_withDensity_rightβ‚€ {g : Ξ² β†’ ℝβ‰₯0∞} (hg : AEMeasurable g Ξ½) : ΞΌ.prod (Ξ½.withDensity g) = (ΞΌ.prod Ξ½).withDensity (fun z ↦ g z.2) := by
refine ext_of_lintegral _ fun Ο† hΟ† ↦ ?_ rw [lintegral_prod _ hΟ†.aemeasurable, lintegral_withDensity_eq_lintegral_mulβ‚€ _ hΟ†.aemeasurable, lintegral_prod] Β· refine lintegral_congr (fun x ↦ ?_) rw [lintegral_withDensity_eq_lintegral_mulβ‚€ hg (by fun_prop)] simp
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yury Kudryashov -/ import Mathlib.Data.Set.Lattice.Image import Mathlib.Order.Interval.Set.LinearOrder /-! # Extra lemmas about intervals This file contains lemma...
Mathlib/Order/Interval/Set/Disjoint.lean
143
145
theorem eq_of_Ico_disjoint {x₁ xβ‚‚ y₁ yβ‚‚ : Ξ±} (h : Disjoint (Ico x₁ xβ‚‚) (Ico y₁ yβ‚‚)) (hx : x₁ < xβ‚‚) (h2 : xβ‚‚ ∈ Ico y₁ yβ‚‚) : y₁ = xβ‚‚ := by
rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YaΓ«l Dillies, Vladimir Goryachev, Kyle Miller, Kim Morrison, Eric Rodriguez -/ import Mathlib.Algebra.Group.Nat.Range import Mathlib.Data.Set.Finite.Basic /-! # Counting on β„• Thi...
Mathlib/Data/Nat/Count.lean
120
122
theorem count_le_card (hp : (setOf p).Finite) (n : β„•) : count p n ≀ #hp.toFinset := by
rw [count_eq_card_filter_range] exact Finset.card_mono fun x hx ↦ hp.mem_toFinset.2 (mem_filter.1 hx).2
/- 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.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp /-! # Additive operations on derivative...
Mathlib/Analysis/Calculus/FDeriv/Add.lean
464
465
theorem HasStrictFDerivAt.sub (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x) : HasStrictFDerivAt (fun x => f x - g x) (f' - g') x := by
/- Copyright (c) 2018 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Julian Kuelshammer -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Algebra.Group.Pointwise.Set.Finite import Mathlib.Alge...
Mathlib/GroupTheory/OrderOfElement.lean
279
280
theorem exists_pow_eq_self_of_coprime (h : n.Coprime (orderOf x)) : βˆƒ m : β„•, (x ^ n) ^ m = x := by
by_cases h0 : orderOf x = 0
/- Copyright (c) 2023 Scott Carnahan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Carnahan -/ import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Eval.SMul /-! # Scalar-multiple polynomial ev...
Mathlib/Algebra/Polynomial/Smeval.lean
83
85
theorem smeval_one : (1 : R[X]).smeval x = 1 β€’ x ^ 0 := by
rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul]
/- 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, Yury Kudryashov -/ import Mathlib.Order.Filter.Interval import Mathlib.Order.Interval.Set.Pi import Mathlib.Tactic.TFAE import Mathlib.Tactic.NormNum im...
Mathlib/Topology/Order/Basic.lean
407
410
theorem exists_Icc_mem_subset_of_mem_nhdsLE [OrderTopology Ξ±] {a : Ξ±} {s : Set Ξ±} (hs : s ∈ 𝓝[≀] a) : βˆƒ b ≀ a, Icc b a ∈ 𝓝[≀] a ∧ Icc b a βŠ† s := by
simpa only [Icc_toDual, toDual.surjective.exists] using exists_Icc_mem_subset_of_mem_nhdsGE (Ξ± := Ξ±α΅’α΅ˆ) (a := toDual a) hs
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Morenikeji Neri -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.EuclideanDomain.Field import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.RingTheor...
Mathlib/RingTheory/PrincipalIdealDomain.lean
129
130
theorem associated_generator_span_self [IsPrincipalIdealRing R] [IsDomain R] (r : R) : Associated (generator <| Ideal.span {r}) r := by
/- Copyright (c) 2019 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Patrick Massot, Casper Putz, Anne Baanen -/ import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.GeneralLinearGroup import Mathlib.L...
Mathlib/LinearAlgebra/Determinant.lean
411
413
theorem LinearEquiv.det_mul_det_symm {A : Type*} [CommRing A] [Module A M] (f : M ≃ₗ[A] M) : LinearMap.det (f : M β†’β‚—[A] M) * LinearMap.det (f.symm : M β†’β‚—[A] M) = 1 := by
simp [← LinearMap.det_comp]
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Yury Kudryashov -/ import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Strict import Mathlib.Topology.Algebra.Affine import Mathlib.Topology....
Mathlib/Analysis/Convex/Topology.lean
296
301
theorem Convex.interior_closure_eq_interior_of_nonempty_interior {s : Set E} (hs : Convex π•œ s) (hs' : (interior s).Nonempty) : interior (closure s) = interior s := by
refine subset_antisymm ?_ (interior_mono subset_closure) intro y hy rcases hs' with ⟨x, hx⟩ have h := AffineMap.lineMap_apply_one (k := π•œ) x y
/- 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 -/ import Mathlib.Analysis.Analytic.Within import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries /-! # Higher d...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
559
605
theorem ContDiffOn.congr_mono (hf : ContDiffOn π•œ n f s) (h₁ : βˆ€ x ∈ s₁, f₁ x = f x) (hs : s₁ βŠ† s) : ContDiffOn π•œ n f₁ s₁ := (hf.mono hs).congr h₁ /-- If a function is `C^n` on a set with `n β‰₯ 1`, then it is differentiable there. -/ theorem ContDiffOn.differentiableOn (h : ContDiffOn π•œ n f s) (hn : 1 ≀ n) : ...
intro x xs rcases h x xs with ⟨u, u_open, xu, hu⟩ apply (contDiffWithinAt_inter _).1 (hu x ⟨xs, xu⟩) exact IsOpen.mem_nhds u_open xu /-- A function is `C^(n + 1)` on a domain iff locally, it has a derivative which is `C^n`. -/ theorem contDiffOn_succ_iff_hasFDerivWithinAt (hn : n β‰  ∞) : ContDiffOn π•œ (n + 1)...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Sean Leather -/ import Batteries.Data.List.Perm import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lookmap import Mathlib.Data.Si...
Mathlib/Data/List/Sigma.lean
311
315
theorem dlookup_append (l₁ lβ‚‚ : List (Sigma Ξ²)) (a : Ξ±) : (l₁ ++ lβ‚‚).dlookup a = (l₁.dlookup a).or (lβ‚‚.dlookup a) := by
induction l₁ with | nil => rfl | cons x l₁ IH =>
/- Copyright (c) 2022 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.Integral.Bochner.Basic import Mathlib.MeasureTheory.Group.Measure /-! # Bochner Integration on Groups We develop properties of inte...
Mathlib/MeasureTheory/Group/Integral.lean
150
154
theorem integrable_comp_div_left (f : G β†’ F) [IsInvInvariant ΞΌ] [IsMulLeftInvariant ΞΌ] (g : G) : Integrable (fun t => f (g / t)) ΞΌ ↔ Integrable f ΞΌ := by
refine ⟨fun h => ?_, fun h => h.comp_div_left g⟩ convert h.comp_inv.comp_mul_left g⁻¹ simp_rw [div_inv_eq_mul, mul_inv_cancel_left]
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes HΓΆlzl, YaΓ«l Dillies -/ import Mathlib.Analysis.Normed.Group.Seminorm import Mathlib.Data.NNReal.Basic import Mathlib.Topology.Algebra.Support import Mathlib.To...
Mathlib/Analysis/Normed/Group/Basic.lean
407
412
theorem inseparable_one_iff_norm {a : E} : Inseparable a 1 ↔ β€–aβ€– = 0 := by
rw [Metric.inseparable_iff, dist_one_right] @[to_additive] lemma dist_one_left (a : E) : dist 1 a = β€–aβ€– := by rw [dist_comm, dist_one_right]
/- 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.Comap import Mathlib.MeasureTheory.Measure.QuasiMeasurePreserving /-! # Restricting a measure to a subset or a s...
Mathlib/MeasureTheory/Measure/Restrict.lean
221
222
theorem restrict_inter_add_diffβ‚€ (s : Set Ξ±) (ht : NullMeasurableSet t ΞΌ) : ΞΌ.restrict (s ∩ t) + ΞΌ.restrict (s \ t) = ΞΌ.restrict s := by
/- Copyright (c) 2024 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.MeasureTheory.Integral.PeakFunction import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform /-! # Fourier inversion formula In a fin...
Mathlib/Analysis/Fourier/Inversion.lean
177
181
theorem MeasureTheory.Integrable.fourier_inversion_inv (hf : Integrable f) (h'f : Integrable (𝓕 f)) {v : V} (hv : ContinuousAt f v) : 𝓕 (𝓕⁻ f) v = f v := by
rw [fourierIntegralInv_comm] exact fourier_inversion hf h'f hv
/- 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, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Field.IsField import Mathlib.Algebra.Polynomial.Inductions import Mathlib.Algebra.Polynomial.Monic im...
Mathlib/Algebra/Polynomial/Div.lean
424
430
theorem sum_modByMonic_coeff (hq : q.Monic) {n : β„•} (hn : q.degree ≀ n) : (βˆ‘ i : Fin n, monomial i ((p %β‚˜ q).coeff i)) = p %β‚˜ q := by
nontriviality R exact (sum_fin (fun i c => monomial i c) (by simp) ((degree_modByMonic_lt _ hq).trans_le hn)).trans (sum_monomial_eq _)
/- 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.List.Sublists import Mathlib.Data.List.Zip import Mathlib.Data.Multiset.Bind import Mathlib.Data.Multiset.Range /-! # The powerset of a multiset ...
Mathlib/Data/Multiset/Powerset.lean
154
158
theorem powersetCardAux_eq_map_coe {n} {l : List Ξ±} : powersetCardAux n l = (sublistsLen n l).map (↑) := by
rw [powersetCardAux, sublistsLenAux_eq, append_nil] @[simp]
/- 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.Card import Mathlib.Data.Finset.Lattice.Fold /-! # Down-compressions This file defines down-compression. Down-compressing `π’œ : Finset (Fins...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
56
57
theorem mem_memberSubfamily : s ∈ π’œ.memberSubfamily a ↔ insert a s ∈ π’œ ∧ a βˆ‰ s := by
simp_rw [memberSubfamily, mem_image, mem_filter]
/- Copyright (c) 2018 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Julian Kuelshammer -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Algebra.Group.Pointwise.Set.Finite import Mathlib.Alge...
Mathlib/GroupTheory/OrderOfElement.lean
641
648
theorem orderOf_dvd_of_mem_zpowers (h : y ∈ Subgroup.zpowers x) : orderOf y ∣ orderOf x := by
obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp h rw [orderOf_dvd_iff_pow_eq_one] exact zpow_pow_orderOf theorem smul_eq_self_of_mem_zpowers {Ξ± : Type*} [MulAction G Ξ±] (hx : x ∈ Subgroup.zpowers y) {a : Ξ±} (hs : y β€’ a = a) : x β€’ a = a := by obtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hx
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathlib.Data.Finset.Erase import Mat...
Mathlib/Data/Finset/Basic.lean
581
583
theorem empty_toList {s : Finset Ξ±} : s.toList.isEmpty ↔ s = βˆ… := by
simp @[simp]
/- 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, Kim Morrison, Jens Wagemaker, Andrew Yang, Yuyang Zhao -/ import Mathlib.Algebra.Polynomial.Monic import Mathlib.RingTheory.Polynomial.ScaleRoots /-! # The...
Mathlib/RingTheory/Polynomial/IntegralNormalization.lean
44
45
theorem integralNormalization_C {x : R} (hx : x β‰  0) : integralNormalization (C x) = 1 := by
simp [integralNormalization, sum_def, support_C hx, degree_C hx]
/- Copyright (c) 2022 YaΓ«l Dillies, 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.Analysis.InnerProductSpace.Convex import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Combinatorics.Additive.AP.Three...
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
193
202
theorem sum_sq_le_of_mem_box (hx : x ∈ box n d) : βˆ‘ i : Fin n, x i ^ 2 ≀ n * (d - 1) ^ 2 := by
rw [mem_box] at hx have : βˆ€ i, x i ^ 2 ≀ (d - 1) ^ 2 := fun i => Nat.pow_le_pow_left (Nat.le_sub_one_of_lt (hx i)) _ exact (sum_le_card_nsmul univ _ _ fun i _ => this i).trans (by rw [card_fin, smul_eq_mul]) theorem sum_eq : (βˆ‘ i : Fin n, d * (2 * d + 1) ^ (i : β„•)) = ((2 * d + 1) ^ n - 1) / 2 := by refine (N...
/- Copyright (c) 2021 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.NatIso /-! # Bicategories In this file we define typeclass for bicategories. A bicategory `B` consists of * objects `a : B`, * 1-morphisms ...
Mathlib/CategoryTheory/Bicategory/Basic.lean
296
299
theorem associator_naturality_left {f f' : a ⟢ b} (Ξ· : f ⟢ f') (g : b ⟢ c) (h : c ⟢ d) : Ξ· β–· g β–· h ≫ (Ξ±_ f' g h).hom = (Ξ±_ f g h).hom ≫ Ξ· β–· (g ≫ h) := by
simp @[reassoc]
/- Copyright (c) 2024 Emilie Burgun. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Emilie Burgun -/ import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Dynamics.PeriodicPts.Defs import Mathlib.GroupTheory.G...
Mathlib/GroupTheory/GroupAction/FixedPoints.lean
82
87
theorem fixedBy_subset_fixedBy_zpow (g : G) (j : β„€) : fixedBy Ξ± g βŠ† fixedBy Ξ± (g ^ j) := by
intro a a_in_fixedBy rw [mem_fixedBy, zpow_smul_eq_iff_minimalPeriod_dvd, minimalPeriod_eq_one_iff_fixedBy.mpr a_in_fixedBy, Int.natCast_one] exact one_dvd j
/- 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, Yury Kudryashov -/ import Mathlib.Data.Finset.Fin import Mathlib.Order.Interval.Finset.Nat import Mathlib.Order.Interval.Set.Fin /-! # Finite intervals in `Fin n` This fi...
Mathlib/Order/Interval/Finset/Fin.lean
161
163
theorem finsetImage_val_Ioi : (Ioi a).image val = Ioo (a : β„•) n := by
simp [← coe_inj] @[simp]
/- 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.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs /-! # Finite intervals of positive naturals This file proves that `β„•+` is a `LocallyFiniteOrder` ...
Mathlib/Data/PNat/Interval.lean
67
72
theorem card_Ioo : #(Ioo a b) = b - a - 1 := by
rw [← Nat.card_Ioo, ← map_subtype_embedding_Ioo, card_map] @[simp] theorem card_uIcc : #(uIcc a b) = (b - a : β„€).natAbs + 1 := by rw [← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Thomas Read, Andrew Yang, Dagur Asgeirsson, JoΓ«l Riou -/ import Mathlib.CategoryTheory.Adjunction.Mates /-! # Uniqueness of adjoints This file shows that adjoints are uni...
Mathlib/CategoryTheory/Adjunction/Unique.lean
64
66
theorem leftAdjointUniq_hom_app_counit {F F' : C β₯€ D} {G : D β₯€ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G) (x : D) : (leftAdjointUniq adj1 adj2).hom.app (G.obj x) ≫ adj2.counit.app x = adj1.counit.app x := by
/- 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.Order.PropInstances import Mathlib.Order.GaloisConnection.Defs /-! # Heyting algebras This file defines Heyting, co-Heyting and bi-Heyting algebras. A H...
Mathlib/Order/Heyting/Basic.lean
641
642
theorem le_compl_iff_disjoint_right : a ≀ bᢜ ↔ Disjoint a b := by
rw [← himp_bot, le_himp_iff, disjoint_iff_inf_le]