Context
stringlengths
227
76.5k
target
stringlengths
0
11.6k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
16
3.69k
/- 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, Amelia Livingston, Yury Kudryashov, Neil Strickland, Aaron Anderson -/ import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathli...
variable [CommMonoidWithZero α]
Mathlib/Algebra/GroupWithZero/Divisibility.lean
56
58
/- 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
940
940
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Group.Pi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheor...
def Pi.ι (b : β) : f b ⟶ ∏ᶜ f := Pi.lift (Function.update (fun _ ↦ 0) b (𝟙 _)) @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
624
627
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, François Dupuis -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Filter.Extr import Mathlib.Tactic.NormNum /-! # Convex and concave functions This...
section AddCancelCommMonoid variable [AddCancelCommMonoid E] [AddCommMonoid β] [PartialOrder β] [Module 𝕜 E] [SMul 𝕜 β] {s : Set E} {f : E → β} /-- Right translation preserves strict convexity. -/ theorem StrictConvexOn.translate_right (hf : StrictConvexOn 𝕜 s f) (c : E) : StrictConvexOn 𝕜 ((fun z => c + ...
Mathlib/Analysis/Convex/Function.lean
860
871
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Jakob von Raumer -/ import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts import Mathlib.CategoryTheory.Limits.Shapes.Kernels /-! # Biproducts and binary biproducts ...
instance Bicone.category : Category (Bicone F) where Hom A B := BiconeMorphism A B
Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
92
93
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.CategoryTheory.Preadditive.Basic import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Preadditive structure on functor categories If `C` and ...
Mathlib/CategoryTheory/Preadditive/FunctorCategory.lean
127
129
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jeremy Avigad -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Notation.Pi import Mathlib.Data.Set.Lattice import Mathlib.Order.Filter.Defs /-! # Theory of...
Mathlib/Order/Filter/Basic.lean
2,597
2,601
/- 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.Algebra.Order.Module.Defs import Mathlib.Data.DFinsupp.Module /-! # Pointwise order on finitely supported dependent functions This file lifts order struc...
/-- This is called `tsub` for truncated subtraction, to distinguish it with subtraction in an additive group. -/
Mathlib/Data/DFinsupp/Order.lean
226
227
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl, Damiano Testa, Yuyang Zhao -/ import Mathlib.Algebra.Order.Monoid.Unbundled.Defs import Mathlib.Data.Ordering.Basic imp...
[MulLeftStrictMono α] [MulRightStrictMono α] (h : a * b = c * d) : (a = c ∧ b = d) ∨ a < c ∨ b < d := by obtain hac | rfl | hca := lt_trichotomy a c · right; left; exact hac · left; simpa using mul_right_inj_of_comparable (LinearOrder.le_total d b)|>.1 h · obtain hbd | rfl | hdb := lt_trichotomy b d
Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
319
324
/- Copyright (c) 2022 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.MeasureTheory.Measure.Typeclasses.Probability /-! # Ergodic maps and measures Let `f : α → α` be measure ...
(HasSubset.Subset.eventuallyLE (subset_preimage_image f s)).trans (hf.quasiMeasurePreserving.preimage_mono_ae hs') exact ae_empty_or_univ_of_ae_le_preimage' hf hs hs' h_fin /-- If a measurable equivalence is ergodic, then so is the inverse map. -/ theorem symm {e : α ≃ᵐ α} (he : Ergodic e μ) : Ergodic e.sy...
Mathlib/Dynamics/Ergodic/Ergodic.lean
171
176
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.SetTheory.Cardinal.Finite import Mathlib.Topology.Algebra.InfiniteSum.Basic import Mathlib.Topology.UniformSpace.Cauchy import Mathlib.Topology.Algebra...
@[to_additive] theorem Multipliable.of_inv (hf : Multipliable fun b ↦ (f b)⁻¹) : Multipliable f := by
Mathlib/Topology/Algebra/InfiniteSum/Group.lean
40
41
/- 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 -/ import Mathlib.Logic.Relator import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw import Mathlib.Logic.Basic import Mathl...
EqvGen p a b := by induction h with | rel a b h => exact EqvGen.rel _ _ (hrp _ _ h) | refl => exact EqvGen.refl _
Mathlib/Logic/Relation.lean
622
625
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.IsPrimePow import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Int import Mathlib.Algebra.Ring.CharZero im...
@[simp] theorem map_swap_divisorsAntidiagonal : (divisorsAntidiagonal n).map (Equiv.prodComm _ _).toEmbedding = divisorsAntidiagonal n := by rw [← coe_inj, coe_map, Equiv.coe_toEmbedding, Equiv.coe_prodComm, Set.image_swap_eq_preimage_swap] ext
Mathlib/NumberTheory/Divisors.lean
333
339
/- 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.Basic import Mathlib.MeasureTheory.Integral.Lebesgue.Countable import Mathlib.MeasureTheory.Integral.Le...
Mathlib/MeasureTheory/Integral/Lebesgue.lean
440
454
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Group.Defs /-! # Invertible elements This file defines a typeclass `Invertible a` for elements `a` with a two-sided multiplicative inverse. The in...
simp [mul_assoc] example {G} [Group G] (a b : G) : a * b⁻¹ * b = a := inv_mul_cancel_right a b
Mathlib/Algebra/Group/Invertible/Defs.lean
125
126
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
theorem disjoint_iUnion_right {ι : Sort*} {s : ι → Set α} : Disjoint t (⋃ i, s i) ↔ ∀ i, Disjoint t (s i) :=
Mathlib/Data/Set/Lattice.lean
1,205
1,206
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Yury Kudryashov, Yaël Dillies -/ import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpac...
∃ a b : 𝕜, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x := by constructor · rintro ⟨a, b, ha, hb, hab, rfl⟩ use a, b, ha, hb rw [hab, div_one, div_one] · rintro ⟨a, b, ha, hb, rfl⟩ have hab : 0 < a + b := add_pos' ha hb refine ⟨a / (a + b), b / (a + b), by positivity, by positivi...
Mathlib/Analysis/Convex/Segment.lean
350
358
/- Copyright (c) 2022 John Nicol. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: John Nicol -/ import Mathlib.FieldTheory.Finite.Basic /-! # Wilson's theorem. This file contains a proof of Wilson's theorem. The heavy lifting is mostly done by the previous `wilsons_l...
rw [← prod_natCast, Finset.prod_Ico_id_eq_factorial, wilsons_lemma] end ZMod namespace Nat variable {n : ℕ}
Mathlib/NumberTheory/Wilson.lean
73
79
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.FieldTheory.PurelyInseparable.Basic import Mathlib.FieldTheory.PerfectClosure /-! # `IsPerfectClosure` predicate This file contains `IsPerfectClosure` which asserts...
theorem pow_expChar_pow_inj_of_pNilradical_eq_bot (R : Type*) [CommRing R] (p : ℕ) [ExpChar R p] (h : pNilradical R p = ⊥) (n : ℕ) : Function.Injective fun x : R ↦ x ^ p ^ n := fun _ _ H ↦
Mathlib/FieldTheory/IsPerfectClosure.lean
112
114
/- 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
434
434
/- 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.Algebra.Order.Ring.Defs import Mathlib.Algebra.Ring.Invertible import Mathlib.Data.Nat.Cast.Order.Ring /-! # Lemmas about `invOf` in ordered (semi)r...
@[simp] theorem invOf_lt_zero [Invertible a] : ⅟ a < 0 ↔ a < 0 := by simp only [← not_le, invOf_nonneg]
Mathlib/Algebra/Order/Invertible.lean
29
31
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot, Yury Kudryashov, Rémy Degenne -/ import Mathlib.Data.Set.Subsingleton import Mathlib.Order.Interval.Set.Defs /-! # Intervals In any pr...
theorem Ici_inter_Ici {a b : α} : Ici a ∩ Ici b = Ici (a ⊔ b) := by ext x
Mathlib/Order/Interval/Set/Basic.lean
922
923
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Sébastien Gouëzel -/ import Mathlib.Analysis.Calculus.Deriv.ZPow import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.SpecialFunctions.Log.Deriv impo...
convert (((hasDerivAt_log hx.ne').const_add 2).div ((hasDerivAt_sqrt hx.ne').const_mul 2) <| mul_ne_zero two_ne_zero h₀).deriv using 1 nth_rw 3 [← mul_self_sqrt hx.le] generalize √x = sqx at h₀ -- else field_simp rewrites sqrt x * sqrt x back to x field_simp ring theorem strictConcaveOn_sqrt_...
Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean
137
151
/- 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 -/ import Mathlib.Order.Filter.Prod import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.Filter.Finite import Mathlib.Order.Filter.Bases.Basic /...
exact hf.exists_iff fun t₁ t₂ ht H => gm ht H /-- If `(p : ι → Prop, s : ι → Set α)` is a basis of a filter `f`, `g` is a monotone function `Set α → Filter γ`, and for each `i`, `(pg : β i → Prop, sg : β i → Set α)` is a basis of the filter `g (s i)`, then `(fun (i : ι) (x : β i) ↦ p i ∧ pg i x, fun (i : ι) (x : β...
Mathlib/Order/Filter/Lift.lean
45
53
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.C...
x.num * y.denom + x.denom * y.num ≠ 0 := by intro h_zero have h := num_denom_add x y rw [h_zero, zero_mul] at h exact (mul_ne_zero (num_ne_zero hxy) (mul_ne_zero x.denom_ne_zero y.denom_ne_zero)) h end NumDenom end RatFunc
Mathlib/FieldTheory/RatFunc/Basic.lean
998
1,010
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Minor.Restrict /-! # Some constructions of matroids This file defines some very elementary examples of matroids, namely those with at most o...
/-- The `Matroid α` with ground set `E` whose only base is `E`. -/
Mathlib/Data/Matroid/Constructions.lean
138
139
/- Copyright (c) 2021 Henry Swanson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Henry Swanson, Patrick Massot -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.SpecialFunctions.Exponential import Mathlib.Combinatorics.Derangements.Finite import M...
Tendsto (fun n => (numDerangements n : ℝ) / n.factorial) atTop (𝓝 (Real.exp (-1))) := by -- we show that d(n)/n! is the partial sum of exp(-1), but offset by 1. -- this isn't entirely obvious, since we have to ensure that asc_factorial and -- factorial interact in the right way, e.g., that k ≤ n always let...
Mathlib/Combinatorics/Derangements/Exponential.lean
24
52
/- Copyright (c) 2019 Calle Sönne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle Sönne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
@[simp] theorem toReal_inj {θ ψ : Angle} : θ.toReal = ψ.toReal ↔ θ = ψ :=
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
449
451
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Data.ENNReal.Operations /-! # Results about division in extended non-negative reals This file establishes basic properties related t...
protected lemma mul_div_cancel_right' (hb₀ : b = 0 → a = 0) (hb : b = ∞ → a = 0) :
Mathlib/Data/ENNReal/Inv.lean
150
150
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yaël Dillies -/ import Mathlib.Data.List.Iterate import Mathlib.GroupTheory.Perm.Cycle.Basic import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.Tactic.Group /-! # ...
cycleOf f ((f ^ n) x) = cycleOf f x := SameCycle.rfl.pow_left.cycleOf_eq @[simp] theorem cycleOf_self_apply_zpow (f : Perm α) [DecidableRel f.SameCycle] (n : ℤ) (x : α) : cycleOf f ((f ^ n) x) = cycleOf f x :=
Mathlib/GroupTheory/Perm/Cycle/Factors.lean
134
139
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
Mathlib/Data/Set/Lattice.lean
1,829
1,832
/- Copyright (c) 2020 Kexing Ying and Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying, Kevin Buzzard, Yury Kudryashov -/ import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.Gro...
Mathlib/Algebra/BigOperators/Finprod.lean
1,286
1,292
/- 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.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.TypeTags.Basic /-! # `List.count` as a bundled homomorphism In this file we define `FreeMonoi...
map_zero' := countP'_zero p map_add' := countP'_add p
Mathlib/Algebra/FreeMonoid/Count.lean
67
68
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.HomologySequence import Mathlib.Algebra.Homology.QuasiIso import Mathlib.CategoryTheory.Abelian.DiagramLemmas.Four /-! # Consequences of the ho...
lemma epi_homologyMap_τ₃ (i : ι) (h₁ : Epi (homologyMap φ.τ₂ i)) (h₂ : ∀ j, c.Rel i j → Epi (homologyMap φ.τ₁ j)) (h₃ : ∀ j, c.Rel i j → Mono (homologyMap φ.τ₂ j)) : Epi (homologyMap φ.τ₃ i) := by by_cases hi : ∃ j, c.Rel i j · obtain ⟨j, hij⟩ := hi apply epi_of_epi_of_epi_of_mono ((δ₀Func...
Mathlib/Algebra/Homology/HomologySequenceLemmas.lean
128
147
/- Copyright (c) 2022 Tian Chen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tian Chen, Mantas Bakšys -/ import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Int.Parity import Mathlib.Data.Nat.Choose.Sum import Mathlib.D...
exact dvd_geom_sum₂_self hxy rw [dvd_iff_dvd_of_dvd_sub hxy] at hx obtain ⟨k, hk⟩ := hxy rw [one_add_one_eq_two, eq_add_of_sub_eq' hk] refine mt (dvd_iff_dvd_of_dvd_sub (@odd_sq_dvd_geom_sum₂_sub _ _ y k _ hp1)).mp ?_ rw [pow_two, mul_dvd_mul_iff_left hp.ne_zero] exact mt hp.dvd_of_dvd_pow hx @[depreca...
Mathlib/NumberTheory/Multiplicity.lean
163
173
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Logic.Encodable.Pi import Mathlib.Logic.Function.Iterate /-! # The primitive recursive functions The primitive ...
Mathlib/Computability/Primrec.lean
1,527
1,529
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Yury Kudryashov -/ import Mathlib.Algebra.CharP.Lemmas import Mathlib.FieldTheory.Perfect /-! # The perfect closure of a characteristic `p` ring ## Main definitions - `Perfec...
· simp only [zero_add, iterate_zero_apply] rw [ih, Nat.succ_add, iterate_succ'] apply Quot.sound apply R.intro instance instAddCommGroup : AddCommGroup (PerfectClosure K p) := { (inferInstance : Add (PerfectClosure K p)), (inferInstance : Neg (PerfectClosure K p)) with
Mathlib/FieldTheory/PerfectClosure.lean
247
254
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.Option import Mathlib.Logic.Equiv.Fin.Rotate import Mathlib.Logic.Equiv.Fintype /-! # Permutatio...
simpa theorem cycleRange_of_le {n : ℕ} [NeZero n] {i j : Fin n} (h : j ≤ i) :
Mathlib/GroupTheory/Perm/Fin.lean
146
148
/- 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...
case cos => rw [isBigO_iff] exact ⟨1, Eventually.of_forall fun x => by simp [Real.abs_cos_le_one]⟩ case inr.inl => -- b = 0 refine Tendsto.mono_right ?_ (Iff.mpr pure_le_nhds_iff rfl) rw [tendsto_pure] filter_upwards [eventually_ne_atTop 0] with _ hx simp [hx] case inr.inr => -- b > ...
Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean
56
79
/- 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.Filter.Prod /-! # N-ary maps of filter This file defines the binary and ternary maps of filters. This is mostly useful to define pointwise operatio...
rintro s ⟨t₁, ⟨u, hu, w₁, hw₁, ht₁⟩, t₂, ⟨v, hv, w₂, hw₂, ht₂⟩, hs⟩ refine ⟨_, image2_mem_map₂ hu hv, w₁ ∩ w₂, inter_mem hw₁ hw₂, ?_⟩ refine (image2_distrib_subset_right h_distrib).trans ((image2_subset ?_ ?_).trans hs) · exact (image2_subset_left inter_subset_left).trans ht₁
Mathlib/Order/Filter/NAry.lean
230
233
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Analysis.InnerProductSpace.Continuous import Mathlib.Analysis.Normed.Module.Dual import Mathlib.MeasureTheory.Function.AEEqOfLIntegral import Mathlib.Measu...
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
626
635
/- 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...
/-- The angle between two nonnegative multiples of the same vector is 0. -/
Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
285
286
/- 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...
(hf : ∀ i ∈ s, (f i).totalDegree ≤ d) : (s.sum f).totalDegree ≤ d := (totalDegree_finset_sum ..).trans <| Finset.sup_le hf lemma degreeOf_le_totalDegree (f : MvPolynomial σ R) (i : σ) : f.degreeOf i ≤ f.totalDegree := degreeOf_le_iff.mpr fun d hd ↦ (eq_or_ne (d i) 0).elim (·.trans_le zero_le') fun h ↦ (Fin...
Mathlib/Algebra/MvPolynomial/Degrees.lean
474
479
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Data.Int.AbsoluteValue import Mathlib.LinearAlgebra.Matrix.Determinant.Basic /-! # Absolute values and...
theorem det_le {A : Matrix n n R} {abv : AbsoluteValue R S} {x : S} (hx : ∀ i j, abv (A i j) ≤ x) : abv A.det ≤ Nat.factorial (Fintype.card n) • x ^ Fintype.card n := calc abv A.det = abv (∑ σ : Perm n, Perm.sign σ • ∏ i, A (σ i) i) := congr_arg abv (det_apply _) _ ≤ ∑ σ : Perm n, abv (Perm.sign σ • ∏ i, ...
Mathlib/LinearAlgebra/Matrix/AbsoluteValue.lean
37
49
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov, Kexing Ying -/ import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lat...
section Lattice
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
473
475
/- 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.Analysis.BoxIntegral.Partition.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Analysis.Oscillation import Mathlib.Data.B...
theorem integral_sub (hf : Integrable I l f vol) (hg : Integrable I l g vol) : integral I l (f - g) vol = integral I l f vol - integral I l g vol :=
Mathlib/Analysis/BoxIntegral/Basic.lean
277
278
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.Disintegration.Unique import Mathlib.Probability.Notation /-! # Regular conditional probability distribution We define the regular con...
(hY : Measurable Y) (x : β) (hX : μ.map X {x} ≠ 0) (s : Set Ω) : condDistrib Y X μ x s = (μ.map X {x})⁻¹ * μ.map (fun a => (X a, Y a)) ({x} ×ˢ s) := by rw [condDistrib, Measure.condKernel_apply_of_ne_zero _ s] · rw [Measure.fst_map_prodMk hY] · rwa [Measure.fst_map_prodMk hY] lemma compProd_map_condDistr...
Mathlib/Probability/Kernel/CondDistrib.lean
72
79
/- 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.Data.List.Basic /-! # Double universal quantification on a list This file provides an API for `List.Forall₂` (definition in `Data.Lis...
| nil {l} : SublistForall₂ R [] l | cons {a₁ a₂ l₁ l₂} : R a₁ a₂ → SublistForall₂ R l₁ l₂ → SublistForall₂ R (a₁ :: l₁) (a₂ :: l₂) | cons_right {a l₁ l₂} : SublistForall₂ R l₁ l₂ → SublistForall₂ R l₁ (a :: l₂) theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} : SublistForall₂ R l₁ l₂ ↔ ∃ l, Forall₂ R l...
Mathlib/Data/List/Forall2.lean
270
275
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.MeasureTheory.Measure.MeasureSpaceDef /-! # Almost everywhere disjoint sets We say that sets `s` and `t` are `μ`-a.e. disjoint (see `MeasureTheory....
theorem union_right_iff : AEDisjoint μ s (t ∪ u) ↔ AEDisjoint μ s t ∧ AEDisjoint μ s u := by simp [union_eq_iUnion, and_comm]
Mathlib/MeasureTheory/Measure/AEDisjoint.lean
94
96
/- Copyright (c) 2022 Jiale Miao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiale Miao, Kevin Buzzard, Alexander Bentkamp -/ import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.Block /-! # Gram-Schmidt Orthogonalization and Orthonor...
theorem gramSchmidt_def'' (f : ι → E) (n : ι) : f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, (⟪gramSchmidt 𝕜 f i, f n⟫ / (‖gramSchmidt 𝕜 f i‖ : 𝕜) ^ 2) • gramSchmidt 𝕜 f i := by
Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
63
65
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Module.Torsion import Mathlib.Algebra.Ring.Idempotent import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition import Mathlib.LinearAlgebra....
lemma comap_cotangentIdeal (I : Ideal R) : I.cotangentIdeal.comap (Quotient.mk (I ^ 2)) = I := Ideal.ext fun _ ↦ mk_mem_cotangentIdeal theorem range_cotangentToQuotientSquare :
Mathlib/RingTheory/Ideal/Cotangent.lean
131
135
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.QuasiIso import Mathlib.CategoryTheory.Limits.Preserves.Finite import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels /-! ...
infer_instance lemma quasiIso_map_iff_of_preservesLeftHomology [F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂] [F.ReflectsIsomorphisms] : QuasiIso (F.mapShortComplex.map φ) ↔ QuasiIso φ := by have γ : LeftHomologyMapData φ S₁.leftHomologyData S₂.leftHomologyData := default rw [γ.quasiIs...
Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
764
774
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tim Baumann, Stephen Morgan, Kim Morrison, Floris van Doorn -/ import Mathlib.Tactic.CategoryTheory.Reassoc /-! # Isomorphisms This file defines isomorphisms between objects of a categ...
theorem IsIso.inv_eq_inv {f g : X ⟶ Y} [IsIso f] [IsIso g] : inv f = inv g ↔ f = g := Iso.inv_eq_inv (asIso f) (asIso g)
Mathlib/CategoryTheory/Iso.lean
417
419
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
Mathlib/Data/Set/Lattice.lean
1,930
1,931
/- Copyright (c) 2021 Alex Kontorovich and Heather Macbeth and Marc Masdeu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Kontorovich, Heather Macbeth, Marc Masdeu -/ import Mathlib.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.GeneralLinearG...
ring theorem tendsto_abs_re_smul {p : Fin 2 → ℤ} (hp : IsCoprime (p 0) (p 1)) : Tendsto (fun g : { g : SL(2, ℤ) // g 1 = p } => |((g : SL(2, ℤ)) • z).re|) cofinite atTop := by suffices Tendsto (fun g : (fun g : SL(2, ℤ) => g 1) ⁻¹' {p} => ((g : SL(2, ℤ)) • z).re) cofinite (cocompact ℝ) by e...
Mathlib/NumberTheory/Modular.lean
242
255
/- Copyright (c) 2023 Antoine Chambert-Loir and María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Eric Wieser, Bhavik Mehta, Yaël Dillies -/ import Mathlib.Algebra.Order.Antidiag.Pi i...
Mathlib/Algebra/Order/Antidiag/Finsupp.lean
218
223
/- 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.Algebra.Group.Submonoid.BigOperators import Mathlib.Algebra.Ring.Action.Subobjects import Mathlib.Algebra.Ring.Equiv import Mathlib.Algebra.Ring.Prod...
Mathlib/Algebra/Ring/Subsemiring/Basic.lean
1,030
1,031
/- 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, Bhavik Mehta -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Finset.Fold import Mathlib.Data.Multiset.Sum /-! # Disjoint sum of finsets This file defines the disjo...
@[simp] theorem map_inl_disjUnion_map_inr : (s.map Embedding.inl).disjUnion (t.map Embedding.inr) (disjoint_map_inl_map_inr _ _) =
Mathlib/Data/Finset/Sum.lean
54
56
/- Copyright (c) 2021 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri -/ import Mathlib.Data.Set.Basic /-! # Bundle Basic data structure to implement fiber bundles, vector bundles (maybe fibrations?), etc. This file should contain all...
theorem TotalSpace.mk_injective (b : B) : Injective (mk b : E b → TotalSpace F E) := fun _ _ ↦
Mathlib/Data/Bundle.lean
74
75
/- 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.Computability.PartrecCode import Mathlib.Data.Set.Subsingleton /-! # Computability theory and the halting problem A universal partial recursive funct...
obtain ⟨f, hf, rfl⟩ := computable_iff.1 hp unfold REPred dsimp only [] refine (Partrec.cond hf (Decidable.Partrec.const' (Part.some ())) Partrec.none).of_eq fun n => Part.ext fun a => ?_ cases a; cases f n <;> simp
Mathlib/Computability/Halting.lean
191
198
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.MeasureTheory.Integral.Bochner.L1 import Mathlib.Me...
Mathlib/MeasureTheory/Integral/Bochner.lean
1,026
1,032
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Group.Action.Pi import Mathlib.Algebra.Group.End import Mathlib.Algebra.Module.NatInt import Mathlib.Algebra.Order.Archimedean.Basic /-! # M...
@[scoped simp] theorem map_const_add [AddCommMagma G] [Add H] [AddConstMapClass F G H a b] (f : F) (x : G) : f (a + x) = f x + b := by
Mathlib/Algebra/AddConstMap/Basic.lean
130
132
/- Copyright (c) 2023 Michael Rothgang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Rothgang -/ import Mathlib.Geometry.Manifold.Diffeomorph import Mathlib.Topology.IsLocalHomeomorph /-! # Local diffeomorphisms between manifolds In this file, we define `C...
/-- An arbitrary choice of local inverse of `f` near `x`. -/ noncomputable def localInverse (hf : IsLocalDiffeomorphAt I J n f x) :
Mathlib/Geometry/Manifold/LocalDiffeomorph.lean
150
151
/- Copyright (c) 2023 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.MeasureTheory.Constructions.Pi import Mathlib.MeasureTheory.Integral.Prod /-! # Integration with respect to a finite product of measures On a finite pr...
/-- On a finite product space in `n` variables, for a natural number `n`, a product of integrable functions depending on each coordinate is integrable. -/ theorem fin_nat_prod {n : ℕ} {E : Fin n → Type*} [∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))] {f : (i : Fin n) → E i → 𝕜} (hf : ∀ i...
Mathlib/MeasureTheory/Integral/Pi.lean
26
41
/- Copyright (c) 2024 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ import Mathlib.Data.Int.Interval import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Count import Mathlib.Data.Rat.Floor import Mathlib.Order.Interval.Finset.Nat /-! # Cou...
lemma Ico_filter_modEq_eq (v : ℤ) : {x ∈ Ico a b | x ≡ v [ZMOD r]} = {x ∈ Ico (a - v) (b - v) | r ∣ x}.map ⟨(· + v), add_left_injective v⟩ := by ext x simp_rw [mem_map, mem_filter, mem_Ico, Function.Embedding.coeFn_mk, ← eq_sub_iff_add_eq,
Mathlib/Data/Int/CardIntervalMod.lean
27
32
/- Copyright (c) 2022 Yaël Dillies, Sara Rousta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Sara Rousta -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.Interval.Set.OrderEmbedding import Mathlib.Order.SetNotation /-! # Properties of unbundled ...
Mathlib/Order/UpperLower/Basic.lean
989
990
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Simon Hudon, Mario Carneiro -/ import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Init import Mathlib.Data.Int.Init import Mathlib....
| 0 => by ext; simp [Int.pow_zero]
Mathlib/Algebra/Group/Basic.lean
880
880
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Yury Kudryashov, Patrick Massot -/ import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.AtTopBot.Archimedean import Mathlib.Order.Iterate impor...
theorem tendsto_nat_ceil_mul_div_atTop {a : R} (ha : 0 ≤ a) : Tendsto (fun x ↦ (⌈a * x⌉₊ : R) / x) atTop (𝓝 a) := by have A : Tendsto (fun x : R ↦ a + x⁻¹) atTop (𝓝 (a + 0)) := tendsto_const_nhds.add tendsto_inv_atTop_zero rw [add_zero] at A apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_cons...
Mathlib/Analysis/SpecificLimits/Basic.lean
695
706
/- Copyright (c) 2022 Antoine Labelle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Labelle -/ import Mathlib.RepresentationTheory.Basic import Mathlib.RepresentationTheory.FDRep /-! # Subspace of invariants a group representation This file introduces the s...
simp only [mul_one, Finset.mul_sum, Algebra.mul_smul_comm, average, MonoidAlgebra.of_apply, Finset.sum_congr, MonoidAlgebra.single_mul_single] set f : G → MonoidAlgebra k G := fun x => Finsupp.single x 1 show ⅟ (Fintype.card G : k) • ∑ x : G, f (g * x) = ⅟ (Fintype.card G : k) • ∑ x : G, f x rw [Function.Bi...
Mathlib/RepresentationTheory/Invariants.lean
43
48
/- Copyright (c) 2021 Luke Kershaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luke Kershaw -/ import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.BinaryBiproduct...
e.hom.hom₂ ≫ e.inv.hom₂ = 𝟙 _ := by rw [← comp_hom₂, e.hom_inv_id, id_hom₂] @[reassoc (attr := simp)] lemma _root_.CategoryTheory.Iso.hom_inv_id_triangle_hom₃ {A B : Triangle C} (e : A ≅ B) : e.hom.hom₃ ≫ e.inv.hom₃ = 𝟙 _ := by rw [← comp_hom₃, e.hom_inv_id, id_hom₃]
Mathlib/CategoryTheory/Triangulated/Basic.lean
211
215
/- Copyright (c) 2024 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.Normed.Ring.InfiniteSum import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.NumberTheo...
lemma ArithmeticFunction.coe_mul {R : Type*} [Semiring R] (f g : ArithmeticFunction R) : f ⍟ g = ⇑(f * g) := by simp [convolution] namespace LSeries
Mathlib/NumberTheory/LSeries/Convolution.lean
71
75
/- Copyright (c) 2021 Bryan Gin-ge Chen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Bryan Gin-ge Chen, Yaël Dillies -/ import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic /-! # Symmetric difference and bi-implication This file defines...
exact ((symmDiff_right_involutive a).toPerm _).apply_eq_iff_eq_symm_apply.trans eq_comm end GeneralizedBooleanAlgebra section BooleanAlgebra variable [BooleanAlgebra α] (a b c d : α)
Mathlib/Order/SymmDiff.lean
470
476
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms import Mathlib.MeasureTheory.Measure.Typeclasse...
theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) : F =ᵐ[μ] univ ↔ F = univ := by
Mathlib/MeasureTheory/Measure/OpenPos.lean
84
86
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree imp...
· simp [x0] have h : {(x, 1)} ⊆ divisorsAntidiagonal x := by simp [x0] rw [← sum_subset h] · simp intro ⟨y₁, y₂⟩ ymem ynmem have y2ne : y₂ ≠ 1 := by
Mathlib/NumberTheory/ArithmeticFunction.lean
317
322
/- 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 ...
theorem wOppSide_smul_vsub_vadd_right {s : AffineSubspace R P} {p₁ p₂ : P} (x : P) (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : t ≤ 0) : s.WOppSide x (t • (x -ᵥ p₁) +ᵥ p₂) := (wOppSide_smul_vsub_vadd_left x hp₁ hp₂ ht).symm theorem wOppSide_lineMap_left {s : AffineSubspace R P} {x : P} (y : P) (h : x ∈ s) {t : R}...
Mathlib/Analysis/Convex/Side.lean
299
308
/- 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.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibili...
Mathlib/Algebra/MvPolynomial/Basic.lean
1,165
1,167
/- 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, Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Nat.GCD.Basic import Mathlib.Data.Nat.Prime.Basic import Ma...
obtain ⟨a, rfl⟩ := h exact primeFactorsList_sublist_right (right_ne_zero_of_mul h') theorem primeFactorsList_subset_right {n k : ℕ} (h : k ≠ 0) : n.primeFactorsList ⊆ (n * k).primeFactorsList := (primeFactorsList_sublist_right h).subset
Mathlib/Data/Nat/Factors.lean
215
221
/- 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.Order.Filter.Lift import Mathlib.Order.Interval.Set.Monotone import Mathlib.Topology.Separation.Basic /-! # Topology on the set of filters on a type...
simp only [(nhds_basis_opens x).nhds.eq_biInf, iInf_and, @iInf_comm _ (_ ∈ _)]
Mathlib/Topology/Filter.lean
184
185
/- 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...
| monomial n a => rw [smul_monomial, smeval_monomial, smeval_monomial, smul_assoc] /-- `Polynomial.smeval` as a linear map. -/ def smeval.linearMap : R[X] →ₗ[R] S where toFun f := f.smeval x map_add' f g := by simp only [smeval_add]
Mathlib/Algebra/Polynomial/Smeval.lean
120
125
/- 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 ...
`id_whiskerRight f g : 𝟙 f ▷ g = 𝟙 (f ≫ g)`. -/
Mathlib/CategoryTheory/Bicategory/Basic.lean
359
360
/- Copyright (c) 2021 Noam Atar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Noam Atar -/ import Mathlib.Order.Ideal import Mathlib.Order.PFilter /-! # Prime ideals ## Main definitions Throughout this file, `P` is at least a preorder, but some sections require mo...
/-- A filter `F` is prime if its complement is an ideal. -/ @[mk_iff] class IsPrime (F : PFilter P) : Prop where compl_ideal : IsIdeal (F : Set P)ᶜ
Mathlib/Order/PrimeIdeal.lean
186
191
/- Copyright (c) 2022 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedd...
refine ⟨fun hx => ?_, fun h => h.elim⟩ rw [Set.mem_setOf] at hx linarith [convexBodySumFun_nonneg x] · suffices convexBodySum K B = { 0 } by rw [this, measure_singleton] ext rw [convexBodySum, Set.mem_setOf_eq, Set.mem_singleton_iff, hB, ← convexBodySumFun_eq_zero_iff] exact (convexBodySumFun_...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
326
333
/- Copyright (c) 2022 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Analysis.Normed.Group.Basic /-! # Hamming spaces The Hamming metric counts the number of places two members of a (finite) Pi type differ. The Hamming n...
@[simp] theorem hamming_zero_eq_dist {x y : ∀ i, β i} : 0 = hammingDist x y ↔ x = y := by rw [eq_comm, hammingDist_eq_zero]
Mathlib/InformationTheory/Hamming.lean
92
94
/- Copyright (c) 2023 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.GradedObject.Bifunctor import Mathlib.CategoryTheory.Functor.Trifunctor /-! # The action of trifunctors on graded objects Given a trifunctor `F. ...
mapTrifunctorMapObj F p X₁ X₂ X₃ ⟶ mapTrifunctorMapObj F p Y₁ Y₂ Y₃ := GradedObject.mapMap ((((mapTrifunctor F I₁ I₂ I₃).map f₁).app X₂).app X₃ ≫ (((mapTrifunctor F I₁ I₂ I₃).obj Y₁).map f₂).app X₃ ≫ (((mapTrifunctor F I₁ I₂ I₃).obj Y₁).obj Y₂).map f₃) p @[reassoc (attr := simp)] lemma ι_mapTrifunctorMap...
Mathlib/CategoryTheory/GradedObject/Trifunctor.lean
139
154
/- Copyright (c) 2023 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.NoZeroSMulDivisors.Basic import Mathlib.Data.Int.ModEq import Mathlib.GroupTheory.QuotientGroup.Defs import Math...
modEq_rfl.sub_right_cancel end ModEq
Mathlib/Algebra/ModEq.lean
206
208
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Module.Torsion import Mathlib.Algebra.Ring.Idempotent import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition import Mathlib.LinearAlgebra....
lemma CotangentSpace.span_image_eq_top_iff [IsNoetherianRing R] {s : Set (maximalIdeal R)} : Submodule.span (ResidueField R) ((maximalIdeal R).toCotangent '' s) = ⊤ ↔
Mathlib/RingTheory/Ideal/Cotangent.lean
263
265
/- 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.Data.Set.Piecewise import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Core import Mathlib.Tactic.Attr.Core /-! # Partial equivalences This f...
theorem trans_transPartialEquiv (e : α ≃ β) (e' : β ≃ γ) (f'' : PartialEquiv γ δ) : (e.trans e').transPartialEquiv f'' = e.transPartialEquiv (e'.transPartialEquiv f'') := by simp only [transPartialEquiv_eq_trans, PartialEquiv.trans_assoc, trans_toPartialEquiv]
Mathlib/Logic/Equiv/PartialEquiv.lean
943
946
/- 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.IntegrableOn /-! # Locally integrable functions A function is called *locally integrable* (`MeasureTheory.LocallyIntegrabl...
(hf : LocallyIntegrable f (μ.restrict s)) : LocallyIntegrableOn f s μ := by intro x _
Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
184
185
/- 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.Algebra.Group.Submonoid.BigOperators import Mathlib.Algebra.Ring.Action.Subobjects import Mathlib.Algebra.Ring.Equiv import Mathlib.Algebra.Ring.Prod...
instance smul [SMul R' α] (S : Subsemiring R') : SMul S α := inferInstance theorem smul_def [SMul R' α] {S : Subsemiring R'} (g : S) (m : α) : g • m = (g : R') • m := rfl instance smulCommClass_left [SMul R' β] [SMul α β] [SMulCommClass R' α β] (S : Subsemiring R') : SMulCommClass S α β := inferInstance in...
Mathlib/Algebra/Ring/Subsemiring/Basic.lean
869
882
/- Copyright (c) 2018 Sean Leather. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sean Leather, Mario Carneiro -/ import Mathlib.Data.List.AList import Mathlib.Data.Finset.Sigma import Mathlib.Data.Part /-! # Finite maps over `Multiset` -/ universe u v w open List ...
@[simp] theorem mem_insert {a a' : α} {b' : β a'} {s : Finmap β} : a ∈ insert a' b' s ↔ a = a' ∨ a ∈ s :=
Mathlib/Data/Finmap.lean
434
435
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.MeasureTheory.Measure.Content import Mathlib.MeasureTheory.Group.Prod import Mathlib.Topology.Algebra.Group.Compact /-! # Haar measure In this fi...
/-- The variant of `chaar_self` for `haarContent` -/ @[to_additive "The variant of `addCHaar_self` for `addHaarContent`."] theorem haarContent_self {K₀ : PositiveCompacts G} : haarContent K₀ K₀.toCompacts = 1 := by simp_rw [← ENNReal.coe_one, haarContent_apply, ENNReal.coe_inj, chaar_self]; rfl /-- The variant of `i...
Mathlib/MeasureTheory/Measure/Haar/Basic.lean
475
485
/- Copyright (c) 2024 David Kurniadi Angdinata. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Kurniadi Angdinata -/ import Mathlib.AlgebraicGeometry.EllipticCurve.Group import Mathlib.NumberTheory.EllipticDivisibilitySequence /-! # Division polynomials of Weier...
end φ section Map
Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
538
540
/- 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...
theorem restrict_union_le (s s' : Set α) : μ.restrict (s ∪ s') ≤ μ.restrict s + μ.restrict s' := le_iff.2 fun t ht ↦ by simpa [ht, inter_union_distrib_left] using measure_union_le (t ∩ s) (t ∩ s')
Mathlib/MeasureTheory/Measure/Restrict.lean
266
268
/- Copyright (c) 2023 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying, Rémy Degenne -/ import Mathlib.Probability.Kernel.Disintegration.Integral /-! # Uniqueness of the conditional kernel We prove that the conditional kernels `ProbabilityTheor...
theorem eq_condKernel_of_measure_eq_compProd' (κ : Kernel α Ω) [IsSFiniteKernel κ] (hκ : ρ = ρ.fst ⊗ₘ κ) {s : Set Ω} (hs : MeasurableSet s) : ∀ᵐ x ∂ρ.fst, κ x s = ρ.condKernel x s := by refine ae_eq_of_forall_setLIntegral_eq_of_sigmaFinite (Kernel.measurable_coe κ hs) (Kernel.measurable_coe ρ.condKernel h...
Mathlib/Probability/Kernel/Disintegration/Unique.lean
47
56
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.ModelTheory.Ultraproducts import Mathlib.ModelTheory.Bundled import Mathlib.ModelTheory.Skolem import Mathlib.Order.Filter.AtTopBot.Basic /-! # First-...
Mathlib/ModelTheory/Satisfiability.lean
627
629
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Topology.UniformSpace.Cauchy /-! # Uniform convergence A sequence of functions `Fₙ` (with values in a metric space) converges uniformly on a se...
Mathlib/Topology/UniformSpace/UniformConvergence.lean
640
642
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
mem_iInter₂.2 h
Mathlib/Data/Set/Lattice.lean
72
73
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.Squarefree.Basic import Mathlib.Data.Nat.Factorization.PrimePow import Mathlib.RingTheory.UniqueFactorizationDomain.Nat /-! # Lemmas about squ...
lemma prod_primeFactors_of_squarefree (hn : Squarefree n) : ∏ p ∈ n.primeFactors, p = n := by rw [← toFinset_factors, List.prod_toFinset _ hn.nodup_primeFactorsList, List.map_id', Nat.prod_primeFactorsList hn.ne_zero] lemma primeFactors_prod (hs : ∀ p ∈ s, p.Prime) : primeFactors (∏ p ∈ s, p) = s := by
Mathlib/Data/Nat/Squarefree.lean
363
367
/- 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.Combinatorics.SimpleGraph.Path import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise import M...
refine ⟨s.preimage f f.injective.injOn, ⟨?_, by rw [← card_map f, hs']⟩, hs'⟩ rw [coe_preimage] exact fun a ha b hb hab => map_adj_apply.1 (hs ha hb <| f.injective.ne hab) · rintro ⟨s, hs, rfl⟩ exact hs.map
Mathlib/Combinatorics/SimpleGraph/Clique.lean
598
603
/- 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 -/ import Mathlib.Order.Filter.Prod import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.Filter.Finite import Mathlib.Order.Filter.Bases.Basic /...
le_principal_iff.mp <| show f.lift g ≤ 𝓟 s from iInf_le_of_le t <| iInf_le_of_le ht <| le_principal_iff.mpr hs
Mathlib/Order/Filter/Lift.lean
73
75