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) 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 ...
congr_arg ((↑) : List (Multiset α) → Multiset (Multiset α)) powersetCardAux_eq_map_coe @[simp] theorem powersetCard_zero_left (s : Multiset α) : powersetCard 0 s = {0} := Quotient.inductionOn s fun l => by simp [powersetCard_coe'] theorem powersetCard_zero_right (n : ℕ) : @powersetCard α (n + 1) 0 = 0 := rfl @...
Mathlib/Data/Multiset/Powerset.lean
211
227
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Group.Subgroup.Map import Mathlib.Algebra.Module.Submodule....
end AddCommGroup end Submodule
Mathlib/Algebra/Module/Submodule/Map.lean
494
496
/- 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...
rw [← geom_sum₂_mul, emultiplicity_mul hp, emultiplicity_geom_sum₂_eq_one hp hp1 hxy hx, add_comm] @[deprecated (since := "2024-11-30")]
Mathlib/NumberTheory/Multiplicity.lean
176
178
/- 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, Bryan Gin-ge Chen -/ import Mathlib.Order.Heyting.Basic /-! # (Generalized) Boolean algebras A Boolean algebra is a bounded distributive lattice with a complement ope...
theorem sdiff_lt_sdiff_right (h : x < y) (hz : z ≤ x) : x \ z < y \ z := (sdiff_le_sdiff_right h.le).lt_of_not_le fun h' => h.not_le <| le_sdiff_sup.trans <| sup_le_of_le_sdiff_right h' hz theorem sup_inf_inf_sdiff : x ⊓ y ⊓ z ⊔ y \ z = x ⊓ y ⊔ y \ z :=
Mathlib/Order/BooleanAlgebra.lean
308
312
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly /-! ## The Verschiebung operator ## References * [Hazewinkel, *Witt Vectors*...
theorem verschiebung_coeff_zero (x : 𝕎 R) : (verschiebung x).coeff 0 = 0 := rfl -- simp_nf complains if this is simp theorem verschiebung_coeff_add_one (x : 𝕎 R) (n : ℕ) :
Mathlib/RingTheory/WittVector/Verschiebung.lean
139
143
/- 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.AsPolynomial import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Poly...
@[simp] theorem intDegree_polynomial {p : K[X]} : intDegree (algebraMap K[X] (RatFunc K) p) = natDegree p := by
Mathlib/FieldTheory/RatFunc/Degree.lean
59
61
/- Copyright (c) 2023 Sidharth Hariharan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Sidharth Hariharan -/ import Mathlib.Algebra.Polynomial.Div import Mathlib.Logic.Function.Basic import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.RingTheory.Lo...
∃ q r₁ r₂ : R[X], r₁.degree < g₁.degree ∧ r₂.degree < g₂.degree ∧ (f : K) / (↑g₁ * ↑g₂) = ↑q + ↑r₁ / ↑g₁ + ↑r₂ / ↑g₂ := by rcases hcoprime with ⟨c, d, hcd⟩ refine ⟨f * d /ₘ g₁ + f * c /ₘ g₂, f * d %ₘ g₁, f * c %ₘ g₂, degree_modByMonic_lt _ hg₁, degree_modByMonic_lt _ hg₂, ?_⟩ have hg₁'...
Mathlib/Algebra/Polynomial/PartialFractions.lean
60
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.Analysis.Convex.Hull /-! # Convex join This file defines the convex join of two sets. The convex join of `s` and `t` is the union of the segments with on...
@[simp] theorem convexJoin_union_left (s₁ s₂ t : Set E) :
Mathlib/Analysis/Convex/Join.lean
65
66
/- 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 -/ import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Cardinal import Mathlib.SetTheory.Cardi...
cases h' : f n · simp [h']
Mathlib/Data/Real/Cardinality.lean
69
70
/- 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.AlgebraicTopology.DoldKan.Decomposition import Mathlib.Tactic.FinCases /-! # Behaviour of P_infty with respect to degeneracies For any `X : SimplicialObject C...
theorem σ_comp_PInfty (X : SimplicialObject C) {n : ℕ} (i : Fin (n + 1)) : X.σ i ≫ PInfty.f (n + 1) = 0 := by rw [PInfty_f, σ_comp_P_eq_zero X i] simp only [le_add_iff_nonneg_left, zero_le]
Mathlib/AlgebraicTopology/DoldKan/Degeneracies.lean
120
123
/- Copyright (c) 2023 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis -/ import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Algebra.Order.ToIntervalMod import Mathli...
protected lemma GrowsPolynomially.add {f g : ℝ → ℝ} (hf : GrowsPolynomially f) (hg : GrowsPolynomially g) (hf' : 0 ≤ᶠ[atTop] f) (hg' : 0 ≤ᶠ[atTop] g) : GrowsPolynomially fun x => f x + g x := by intro b hb have hf := hf b hb have hg := hg b hb obtain ⟨c₁, hc₁_mem, c₂, hc₂_mem, hf⟩ := hf obtain ⟨c₃, hc...
Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean
361
399
/- 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...
lemma _root_.CategoryTheory.Iso.inv_hom_id_triangle_hom₁ {A B : Triangle C} (e : A ≅ B) : e.inv.hom₁ ≫ e.hom.hom₁ = 𝟙 _ := by rw [← comp_hom₁, e.inv_hom_id, id_hom₁] @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Triangulated/Basic.lean
217
219
/- 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.Constructions import Mathlib.Order.Filter.AtTopBot.CountablyGenerated import Mathlib.Topology.Constructions import Mathlib.Top...
(hb.isOpen hs).mem_nhds ha theorem IsTopologicalBasis.exists_subset_of_mem_open {b : Set (Set α)} (hb : IsTopologicalBasis b) {a : α} {u : Set α} (au : a ∈ u) (ou : IsOpen u) : ∃ v ∈ b, a ∈ v ∧ v ⊆ u :=
Mathlib/Topology/Bases.lean
165
168
/- 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, Johan Commelin -/ import Mathlib.Algebra.Ring.Int.Parity import Mathlib.Algebra.Ring.Int.Units import Mathlib.Data.ZMod.IntUnitsPower /-! # Integer powers of (-1) This file def...
lemma negOnePow_succ (n : ℤ) : (n + 1).negOnePow = - n.negOnePow := by rw [negOnePow_add, negOnePow_one, mul_neg, mul_one]
Mathlib/Algebra/Ring/NegOnePow.lean
39
41
/- Copyright (c) 2021 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator /-! # Types that are empty In this file we define a typeclass `IsEmpty`, which expresses that a...
theorem isEmpty_subtype (p : α → Prop) : IsEmpty (Subtype p) ↔ ∀ x, ¬p x := by
Mathlib/Logic/IsEmpty.lean
163
164
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn -/ import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno import Mathlib.Analysis.Calculus.FDeriv.Ad...
/-- `x ↦ fderiv 𝕜 (f x) (g x)` is smooth at `x₀`. -/ protected theorem ContDiffAt.fderiv {f : E → F → G} {g : E → F} (hf : ContDiffAt 𝕜 n (Function.uncurry f) (x₀, g x₀)) (hg : ContDiffAt 𝕜 m g x₀) (hmn : m + 1 ≤ n) : ContDiffAt 𝕜 m (fun x => fderiv 𝕜 (f x) (g x)) x₀ := by simp_rw [← fderivWithin_univ]
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
1,163
1,167
/- Copyright (c) 2019 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Bryan Gin-ge Chen -/ import Mathlib.Logic.Relation import Mathlib.Order.CompleteLattice.Basic import Mathlib.Order.GaloisConnection.Defs /-! # Equivalence relati...
/-- The supremum of a set S of equivalence relations is the equivalence closure of the binary relation `there exists r ∈ S relating x and y`. -/ theorem sSup_eq_eqvGen (S : Set (Setoid α)) : sSup S = EqvGen.setoid fun x y => ∃ r : Setoid α, r ∈ S ∧ r x y := by rw [eqvGen_eq] apply congr_arg sInf
Mathlib/Data/Setoid/Basic.lean
246
252
/- 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, Sébastien Gouëzel, Chris Hughes -/ import Mathlib.Data.Fin.Rev import Mathlib.Data.Nat.Find /-! # Operation on tuples We interpret maps `∀ i : Fi...
dif_pos _ @[simp] theorem snoc_comp_cast_add {n m : ℕ} {α : Sort*} (f : Fin (n + m) → α) (a : α) :
Mathlib/Data/Fin/Tuple/Basic.lean
537
540
/- 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.SmallSets import Mathlib.Topology.ContinuousOn /-! ### Locally finite families of sets We say that a family of sets in a topological s...
/-- Let `f : ℕ → Π a, β a` be a sequence of (dependent) functions on a topological space. Suppose that the family of sets `s n = {x | f (n + 1) x ≠ f n x}` is locally finite. Then there exists a function `F : Π a, β a` such that for any `x`, we have `f n x = F x` on the product of an infinite
Mathlib/Topology/LocallyFinite.lean
129
131
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace /-! # Open immersions of structured spaces We say that a m...
@[simp, reassoc] theorem app_invApp (U : Opens Y) : f.c.app (op U) ≫ H.invApp _ ((Opens.map f.base).obj U) = Y.presheaf.map ((homOfLE (Set.image_preimage_subset f.base U.1)).op : op U ⟶ op (opensFunctor f |>.obj ((Opens.map f.base).obj U))) := by erw [← Category.assoc]; rw [IsIso.comp_inv_...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
196
203
/- 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....
@[to_additive] theorem div_mul_div_comm : a / b * (c / d) = a * c / (b * d) := by simp
Mathlib/Algebra/Group/Basic.lean
604
606
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib...
This is $\bar \lambda_B$ from [bourbaki2007][] $9 Proposition 3. -/ @[simps apply] def changeFormEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q' := { changeForm h with toFun := changeForm h invFun := changeForm (changeForm.neg_proof h) left_inv := fun x => by exact (changeForm_changeForm _ _ x)....
Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
323
331
/- 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, Johan Commelin -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Div import Mathlib.RingTheory...
Mathlib/Algebra/Polynomial/RingDivision.lean
654
667
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Ring.Associated import Mathlib.Algebra.Star.Unitary import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Tactic.Ring import Mathlib.Al...
| ⟨-[x+1], (y + 1 : Nat)⟩, (xy : SqLe _ _ _ _), (yx : SqLe _ _ _ _) => by let t := le_antisymm xy yx rw [one_mul] at t exact absurd t (not_divides_sq _ _) theorem le_antisymm {a b : ℤ√d} (ab : a ≤ b) (ba : b ≤ a) : a = b := eq_of_sub_eq_zero <| nonneg_antisymm ba (by rwa [neg_sub]) instance linearOrde...
Mathlib/NumberTheory/Zsqrtd/Basic.lean
793
803
/- 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.Tendsto import Mathlib.Data.Set.Accumulate import Mathlib.Topology.Bornology.Basic import Mathlib.Topolog...
∃ b', b' ⊆ b ∧ Set.Finite b' ∧ s ⊆ ⋃ i ∈ b', c i := by simp only [Subtype.forall', biUnion_eq_iUnion] at hc₁ hc₂ rcases hs.elim_finite_subcover (fun i => c i : b → Set X) hc₁ hc₂ with ⟨d, hd⟩ refine ⟨Subtype.val '' d.toSet, ?_, d.finite_toSet.image _, ?_⟩ · simp · rwa [biUnion_image]
Mathlib/Topology/Compactness/Compact.lean
312
317
/- 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.Homology import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Preadditive.Opposite /-! # Homolo...
@[simp] lemma leftHomologyMap'_sub : leftHomologyMap' (φ - φ') h₁ h₂ = leftHomologyMap' φ h₁ h₂ - leftHomologyMap' φ' h₁ h₂ := by simp only [sub_eq_add_neg, leftHomologyMap'_add, leftHomologyMap'_neg]
Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
126
130
/- 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.Polynomial.Degree.Domain import Mathlib.Algebra.Ring.NonZeroDivisors import Mathlib.RingTheory.Localization.FractionRing /-! # The field of rational...
rw [mk_def_of_ne _ hq, Localization.mk_eq_mk'] theorem mk_one' (p : K[X]) : RatFunc.mk p 1 = ofFractionRing (algebraMap _ _ p) := by
Mathlib/FieldTheory/RatFunc/Defs.lean
162
165
/- 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.Polynomial.Expand import Mathlib.Algebra.Polynomial.Splits import Mathlib.Algebra.Squarefree.Basic import Mathlib.FieldTheory.IntermediateField.Basic imp...
theorem separable_C (r : R) : (C r).Separable ↔ IsUnit r := by rw [separable_def, derivative_C, isCoprime_zero_right, isUnit_C]
Mathlib/FieldTheory/Separable.lean
76
78
/- Copyright (c) 2018 . All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Thomas Browning -/ import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.SpecificGroups.Cyclic /-! # p-groups This file contains a proof that if `G` is a `p`-group ac...
/-- A group of order `p ^ 2` is commutative. See also `IsPGroup.commGroupOfCardEqPrimeSq` for the `CommGroup` instance. -/ theorem commutative_of_card_eq_prime_sq (hG : Nat.card G = p ^ 2) : ∀ a b : G, a * b = b * a := (commGroupOfCardEqPrimeSq hG).mul_comm
Mathlib/GroupTheory/PGroup.lean
368
373
/- 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.MonoidAlgebra.Degree import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Polynomial.Basi...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
1,378
1,381
/- Copyright (c) 2023 Dagur Asgeirsson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dagur Asgeirsson -/ import Mathlib.Topology.Category.Profinite.Nobeling.Basic import Mathlib.Topology.Category.Profinite.Nobeling.Induction import Mathlib.Topology.Category.Profinite...
Mathlib/Topology/Category/Profinite/Nobeling.lean
1,396
1,400
/- Copyright (c) 2017 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Keeley Hoek -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Int.DivMod import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic....
Mathlib/Data/Fin/Basic.lean
1,528
1,529
/- 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.Order.Group.Pointwise.Interval import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Prod import Ma...
/-- Decomposition of an affine map in the special case when the point space and vector space
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
564
565
/- Copyright (c) 2020 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Data.Stream.Init import Mathlib.Tactic.ApplyFun import Mathlib.Control.Fix import Mathlib.Order.OmegaCompletePartialOrder /-! # Lawful fixed point operators...
exists 0 intro b' h' simp only [mem_iff f] at h'
Mathlib/Control/LawfulFix.lean
94
96
/- 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.Probability.Independence.Kernel import Mathlib.MeasureTheory.Constructions.Pi /-! # Independence of sets of sets and measure spaces (σ-algebras) * A fami...
have h₀ {s : Set β} {t : Set β'} (hs : MeasurableSet s) (ht : MeasurableSet t) : μ (f ⁻¹' s) * μ (g ⁻¹' t) = μ.map f s * μ.map g t ∧ μ (f ⁻¹' s ∩ g ⁻¹' t) = μ.map (fun ω ↦ (f ω, g ω)) (s ×ˢ t) := ⟨by rw [Measure.map_apply_of_aemeasurable hf hs, Measure.map_apply_of_aemeasurable hg ht], (Measure....
Mathlib/Probability/Independence/Basic.lean
607
613
/- Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.SetTheory.Ordinal.Family import Mathlib.Tactic.Abel /-! # Natural operations on ordinals The goal of this file is to define n...
· exact le_max_of_le_right ((h hi).trans <| Ordinal.le_iSup (fun x : Iio b ↦ _) ⟨x, hx⟩) all_goals apply csSup_le_csSup' (bddAbove_of_small _) rintro _ ⟨⟨c, hc⟩, rfl⟩
Mathlib/SetTheory/Ordinal/NaturalOps.lean
259
262
/- 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, Yaël Dillies -/ import Mathlib.Algebra.Order.Group.DenselyOrdered import Mathlib.Data.Real.Archimedean import Mathlib.Order.LiminfLimsu...
/-- A continuous antitone function between (conditionally) complete linear ordered spaces sends a `Filter.limsup` to the `Filter.liminf` of the images (if the filter is bounded from above and frequently bounded from below). -/ theorem Antitone.map_limsup_of_continuousAt {f : R → S} (f_decr : Antitone f) (a : ι → R) ...
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
339
385
/- Copyright (c) 2024 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic /-! # Angle between complex numbers This file rel...
simpa using angle_exp_exp x 0
Mathlib/Analysis/Complex/Angle.lean
69
70
/- 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...
⟨c, hac, hc_nhds, hcs⟩ refine ⟨b, c, ⟨hba, hac⟩, ?_⟩ rw [← Icc_union_Icc_eq_Icc hba hac, ← nhdsLE_sup_nhdsGE] exact ⟨union_mem_sup hb_nhds hc_nhds, union_subset hbs hcs⟩ theorem IsOpen.exists_Ioo_subset [OrderTopology α] [Nontrivial α] {s : Set α} (hs : IsOpen s) (h : s.Nonempty) : ∃ a b, a < b ∧ Ioo a b...
Mathlib/Topology/Order/Basic.lean
420
430
/- 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...
section Sup
Mathlib/Order/Interval/Set/Basic.lean
917
918
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic /-! # Quadratic characters on ℤ/nℤ This file defines some quadr...
exact help _ (Nat.mod_lt n (by omega)) <| (Nat.mod_mod_of_dvd n (by omega : 2 ∣ 4)).trans hn /-- If `n % 4 = 1`, then `χ₄ n = 1`. -/ theorem χ₄_nat_one_mod_four {n : ℕ} (hn : n % 4 = 1) : χ₄ n = 1 := by rw [χ₄_nat_mod_four, hn] rfl /-- If `n % 4 = 3`, then `χ₄ n = -1`. -/ theorem χ₄_nat_three_mod_four {n : ℕ} (...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
82
90
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Fintype.Basic /-! # Cardinalities of finite types This file defines the cardinality `Fintype.card α` as the numb...
Mathlib/Data/Fintype/Card.lean
575
587
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Chris Hughes -/ import Mathlib.Data.List.Nodup /-! # List duplicates ## Main definitions * `List.Duplicate x l : Prop` is an inductive property that holds when `x`...
theorem Duplicate.elim_singleton {y : α} (h : x ∈+ [y]) : False := not_duplicate_singleton x y h
Mathlib/Data/List/Duplicate.lean
70
73
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Data.List.Sym /-! # Unordered tuples of elements of a multiset Defines `Multiset.sym` and the specialized `Multiset.sym2` for computing multisets of all un...
m.inductionOn (fun _ h => List.Nodup.sym2 h) h open scoped List in @[simp, mono]
Mathlib/Data/Multiset/Sym.lean
70
73
/- 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.Logic.Function.Basic import Mathlib.Tactic.AdaptationNote import Mathlib.Tactic.Simps.Basic /-! # Subtypes This file provides basic API for subtypes,...
Setoid.trans h₁ h₂
Mathlib/Data/Subtype.lean
197
198
/- 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 /...
noncomputable def contract (p : ℕ) (f : R[X]) : R[X] := ∑ n ∈ range (f.natDegree + 1), monomial n (f.coeff (n * p))
Mathlib/Algebra/Polynomial/Expand.lean
179
180
/- 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.Order.Hom.Ring import Mathlib.Data.ENat.Basic import Mathlib.SetTheory.Cardinal.Basic /-! # Conversion between `Cardinal` and `ℕ∞` In this ...
@[simp] theorem toENat_lift {a : Cardinal.{v}} : toENat (lift.{u} a) = toENat a := by
Mathlib/SetTheory/Cardinal/ENat.lean
263
264
/- 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.Topology.Order.IsLUB /-! # Order topology on a densely ordered set -/ open Set Filter TopologicalSpace Topology Func...
@[simp] theorem interior_Ioc [NoMaxOrder α] {a b : α} : interior (Ioc a b) = Ioo a b := by rw [← Ioi_inter_Iic, interior_inter, interior_Ioi, interior_Iic, Ioi_inter_Iio]
Mathlib/Topology/Order/DenselyOrdered.lean
106
108
/- 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.Data.List.Lattice import Mathlib.Data.Bool.Basic import Mathlib.Order.Lattice /-! # Intervals in ℕ This file defines intervals of naturals. `List.Ico m n...
exact h₂ · left simp only [Ico.mem, not_and, not_lt] at * exact h₂ h₁ end Ico
Mathlib/Data/List/Intervals.lean
198
203
/- 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.Logic.Equiv.Set import Mathlib.Order.CompleteLattice.Lemmas import Mathlib.Order.Directed import Mathlib.Order.GaloisConnection.Basic /-...
lemma sup_iInf₂_eq {f : ∀ i, κ i → α} (a : α) : (a ⊔ ⨅ i, ⨅ j, f i j) = ⨅ i, ⨅ j, a ⊔ f i j := by
Mathlib/Order/CompleteBooleanAlgebra.lean
189
190
/- 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.ULift import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.Tactic.Ring /-! # The characteristic predicate of tensor product ## Main ...
variable [Module A N] [IsScalarTower S A N] [IsScalarTower R A N] /-- If `N` is the base change of `M` to `A`, then `N ⊗[R] P` is the base change of `M ⊗[R] P` to `A`. This is simply the isomorphism `A ⊗[S] (M ⊗[R] P) ≃ₗ[A] (A ⊗[S] M) ⊗[R] P`. -/ lemma isBaseChange_tensorProduct_map {f : M →ₗ[S] N} (hf : IsBaseChange ...
Mathlib/RingTheory/IsTensorProduct.lean
249
280
/- 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.Group.Basic import Mathlib.Tactic.Commo...
Mathlib/Algebra/Divisibility/Basic.lean
225
229
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Contraction /-! # Results about inverses in Clifford algebras This contains some basic results about the inversion of vectors...
letI := invertibleιOfInvertible Q m exact isUnit_of_invertible (ι Q m) /-- $aba^{-1}$ is a vector. -/
Mathlib/LinearAlgebra/CliffordAlgebra/Inversion.lean
37
40
/- 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.Basic /-! # Maps between real and extended non-negative real numbers This file focuses on the functions `ENNReal.toReal...
theorem toReal_mul_top (a : ℝ≥0∞) : ENNReal.toReal (a * ∞) = 0 := by rw [toReal_mul, toReal_top, mul_zero]
Mathlib/Data/ENNReal/Real.lean
329
330
/- Copyright (c) 2021 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Order.Lattice /-! # Ordered Subtraction This file proves l...
rw [tsub_le_iff_left, add_assoc] exact add_le_add_left le_add_tsub _
Mathlib/Algebra/Order/Sub/Defs.lean
160
162
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.RingTheory.Ideal.Maps /-! # Ideals in product rings For commutative rings `R` and `S` and ideals `I ≤ R`, `J ≤ S`, we define `Ideal.prod I J` as the pr...
rw [← map_prodComm_prod] -- Note: couldn't synthesize the right instances without the `R` and `S` hints exact map_isPrime_of_equiv (RingEquiv.prodComm (R := R) (S := S)) theorem isPrime_ideal_prod_top {I : Ideal R} [h : I.IsPrime] : (prod I (⊤ : Ideal S)).IsPrime := by constructor · rcases h with ⟨h, -⟩ ...
Mathlib/RingTheory/Ideal/Prod.lean
108
118
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Kim Morrison -/ import Mathlib.CategoryTheory.Subobject.Basic import Mathlib.CategoryTheory.Preadditive.Basic /-! # Factoring through subobjects The predicate `h : P.Fact...
⟨u ≫ ((MonoOver.forget _).map e.inv).left, by simp [hu]⟩⟩ /-- `P.factorThru f h` provides a factorisation of `f : X ⟶ Y` through some `P : MonoOver Y`, given the evidence `h : P.Factors f` that such a factorisation exists. -/
Mathlib/CategoryTheory/Subobject/FactorThru.lean
41
44
/- 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...
wlog hxy : x ≤ y · convert this y x z hz (le_of_not_le hxy) using 2 <;> simp only [mul_comm, and_comm, or_comm] rcases eq_or_ne x 0 with (rfl | hx0) · induction y <;> rcases hz with hz | hz <;> simp [*, hz.not_lt] rcases eq_or_ne y 0 with (rfl | hy0)
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
642
646
/- 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, Heather Macbeth -/ import Mathlib.Analysis.Convex.Slope import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Tactic.LinearCombination ...
_ < log (a • -x + b • -y) := strictConcaveOn_log_Ioi.2 hx' hy' hxy' ha hb hab _ = log (-(a • x + b • y)) := by congr 1; simp only [Algebra.id.smul_eq_mul]; ring _ = _ := by rw [log_neg_eq_log] namespace Real lemma exp_mul_le_cosh_add_mul_sinh {t : ℝ} (ht : |t| ≤ 1) (x : ℝ) : exp (t * x) ≤ cosh x + t *...
Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean
212
222
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.DirectSum.LinearMap import Mathlib.Algebra.Lie.InvariantForm import Mathlib.Algebra.Lie.Weights.Cartan import Mathlib.Algebra.Lie.Weights.Linear impo...
LieAlgebra.InvariantForm.orthogonal (killingForm R L) (LieModule.traceForm_lieInvariant R L L) I @[simp] lemma toSubmodule_killingCompl : LieSubmodule.toSubmodule I.killingCompl = (killingForm R L).orthogonal I.toSubmodule :=
Mathlib/Algebra/Lie/TraceForm.lean
361
364
/- 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.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.I...
Mathlib/Algebra/Ring/Defs.lean
327
327
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.InnerProductSpace.Sy...
@[simp] theorem ker_orthogonalProjection : LinearMap.ker K.orthogonalProjection = Kᗮ := by ext; exact orthogonalProjection_eq_zero_iff
Mathlib/Analysis/InnerProductSpace/Projection.lean
550
552
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Eric Wieser -/ import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Dual.Lemmas import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathlib.Li...
variable [Fintype n] [Fintype o] section CommRing variable [CommRing R] /-- The rank of a matrix is the rank of its image. -/ noncomputable def rank (A : Matrix m n R) : ℕ := finrank R <| LinearMap.range A.mulVecLin
Mathlib/Data/Matrix/Rank.lean
102
111
/- Copyright (c) 2024 Yaël Dillies, Kin Yau James Wong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Kin Yau James Wong, Rémy Degenne -/ import Mathlib.MeasureTheory.Function.AEEqOfLIntegral import Mathlib.Probability.Kernel.Composition.MeasureCompProd ...
Mathlib/Probability/Kernel/Disintegration/Basic.lean
303
324
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Option.NAry import Mathlib.Data.Seq.Computation import Mathlib.Tactic.ApplyFun import Mathlib.Data.List.Basic /-! # Possibly infinite lists This...
@[simp]
Mathlib/Data/Seq/Seq.lean
452
453
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Mathlib/Data/Matrix/Basic.lean
2,130
2,132
/- Copyright (c) 2022 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib...
theorem logb_neg_of_base_lt_one (h1 : 1 < x) : logb b x < 0 :=
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
308
309
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq import Ma...
subst this refine PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit ?_) nth_rw 1 [← Category.id_comp (c.ι.app i)] convert IsPullback.paste_vert _ (isPullback_of_cofan_isVanKampen hc i.as i.as) swap · exact (eqToHom (if_pos rfl).symm) · simp · exact IsPullback.of_vert_isIso ⟨by simp⟩ end FiniteCo...
Mathlib/CategoryTheory/Limits/VanKampen.lean
757
768
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Data.Ordering.Lemmas import Mathlib.Data.PNat.Basic import Mathlib.SetTheory.Ordinal.Principal import Ma...
theorem repr_mul (a b) : repr (a * b) = repr a * repr b := ONote.repr_mul a.1 b.1
Mathlib/SetTheory/Ordinal/Notation.lean
1,241
1,243
/- Copyright (c) 2020 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.Algebra.Algebra.Spectrum.Basic import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathl...
(n : ℕ) : (f ^ n) v = μ ^ n • v := by induction n <;> simp [*, pow_succ f, hv.apply_eq_smul, smul_smul, pow_succ' μ]
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
185
187
/- 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.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall import Mathlib.Analy...
refine (contDiffAt_sqrt h.ne').comp y ?_ exact contDiffAt_const.sub (contDiff_norm_sq ℝ).contDiffAt theorem Homeomorph.contDiff_unitBall : ContDiff ℝ n fun x : E => (unitBall x : E) := PartialHomeomorph.contDiff_univUnitBall
Mathlib/Analysis/InnerProductSpace/Calculus.lean
340
344
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Chris Hughes, Kevin Buzzard -/ import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Group.Units.Basic /-! # Monoid homomorphisms and units This file allows to...
@[to_additive (attr := simp)] theorem mul_liftRight_inv (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) : f x * ↑(IsUnit.liftRight f h x)⁻¹ = 1 := Units.mul_liftRight_inv (by intro; rfl) x
Mathlib/Algebra/Group/Units/Hom.lean
204
206
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Eric Wieser -/ import Mathlib.Topology.Algebra.InfiniteSum.Basic import Mathlib.Topology.Algebra.Ring.Basic import Mathlib.Topology.Algebra.Star import Mathlib.LinearAlgebra....
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l] {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) : Continuous fun x => blockDiagonal' (A x) := continuous_matrix fun ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ => by dsimp only [blockDiagonal'_apply'] split_ifs with h
Mathlib/Topology/Instances/Matrix.lean
243
248
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot -/ import Mathlib.Algebra.Group.TypeTags.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Data.Finset.Piecewise import Mathlib.Or...
Mathlib/Topology/Constructions.lean
1,351
1,354
/- 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.Sum import Mathlib.Data.Sum.Order import Mathlib.Order.Interval.Finset.Defs /-! # Finite intervals in a disjoint union This file provides the...
Mathlib/Data/Sum/Interval.lean
426
428
/- 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.Clique import Mathlib.Combinatorics.SimpleGraph.Regularity.Uniform import Mathlib.Data.Real.Basic imp...
private lemma card_badVertices_le (dst : 2 * ε ≤ G.edgeDensity s t) (hst : G.IsUniform ε s t) : #(badVertices G ε s t) ≤ #s * ε := by have hε : ε ≤ 1 := (le_rfl.trans <| le_mul_of_one_le_left hst.pos.le (by norm_num)).trans (dst.trans <| by exact_mod_cast edgeDensity_le_one _ _ _) by_contra! h have : |(G....
Mathlib/Combinatorics/SimpleGraph/Triangle/Counting.lean
51
59
/- 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 -/ import Mathlib.Data.Fintype.Lattice import Mathlib.Data.Fintype.Sum import Mathlib.Topology.Homeomorph.Lemmas import Mathlib.Topology.MetricSpace.Antilipschitz ...
isComplete_image_iff e.isometry.isUniformInducing] protected theorem completeSpace [CompleteSpace β] (e : α ≃ᵢ β) : CompleteSpace α :=
Mathlib/Topology/MetricSpace/Isometry.lean
489
491
/- Copyright (c) 2014 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ord...
Mathlib/Algebra/Order/Field/Basic.lean
809
809
/- 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.Logic.Function.Defs import Mathlib.Order.Defs.Unbundled /-! # Lexicographic order on a sigma type This defines the lexicographical order of two arbitrary...
· exact Lex.right _ _ (hs _ _ _ hab) theorem Lex.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) {a b : Σ i, α i} (h : Lex r₁ s a b) : Lex r₂ s a b := h.mono hr fun _ _ _ => id
Mathlib/Data/Sigma/Lex.lean
63
67
/- 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, Kexing Ying -/ import Mathlib.Probability.Notation import Mathlib.Probability.Process.Stopping /-! # Martingales A family of functions `f : ι → Ω → E` is a martingale wit...
@[deprecated (since := "2025-01-21")] alias submartingale_iff_condexp_sub_nonneg := submartingale_iff_condExp_sub_nonneg end Submartingale namespace Supermartingale theorem sub_submartingale [Preorder E] [AddLeftMono E] (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ := by ...
Mathlib/Probability/Martingale/Basic.lean
297
312
/- Copyright (c) 2022 Daniel Roca González. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Daniel Roca González -/ import Mathlib.Analysis.InnerProductSpace.Dual /-! # The Lax-Milgram Theorem We consider a Hilbert space `V` over `ℝ` equipped with a bounded bilinear f...
refine ⟨C, C_ge_0, ?_⟩ intro v by_cases h : 0 < ‖v‖ · refine (mul_le_mul_right h).mp ?_ calc C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v · have : v = 0 := by simpa using h simp ...
Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean
51
62
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Group.Multiset.Basic /-! # Bind operation for multisets This file defines a few basic operations on `Multiset`, notably the mona...
Mathlib/Data/Multiset/Bind.lean
163
163
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Topology.UniformSpace.Equicontinuity import Mathlib.Topology.MetricSpace.Pseudo.Lemmas /-! # Equicontinuity in metric spaces This files contains ...
rw [equicontinuousAt_iff_pair] constructor <;> intro H · intro ε hε exact H _ (dist_mem_uniformity hε) · intro U hU rcases mem_uniformity_dist.mp hU with ⟨ε, hε, hεU⟩ refine Exists.imp (fun V => And.imp_right fun h => ?_) (H _ hε) exact fun x hx x' hx' i => hεU (h _ hx _ hx' i) /-- Characteriza...
Mathlib/Topology/MetricSpace/Equicontinuity.lean
58
69
/- Copyright (c) 2020 Devon Tuma. 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.Basic /-! # Monad Operations for Probability Mass Functions This file constructs two operations on `PMF` ...
end BindOnSupport end PMF
Mathlib/Probability/ProbabilityMassFunction/Monad.lean
310
323
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Group.Conj import Mathlib.Algebra.Group.Subgroup.Lattice import Mathlib.Algebra.Group.Submonoid.BigOperators import Mathlib.Data.Finset.Fin import ...
have lt : 1 < a₁ := le.trans_lt ha₁ have h01 : Equiv.swap (0 : Fin (n + 2)) 1 1 = 0 := by simp only [swap_apply_right] rcases le.eq_or_lt with (rfl | lt') · rw [swap_apply_of_ne_of_ne H.ne' lt.ne', h01, if_neg H.not_le] · rw [swap_apply_of_ne_of_ne (ne_of_gt H) (ne_of_gt lt), swa...
Mathlib/GroupTheory/Perm/Sign.lean
267
289
/- Copyright (c) 2020 James Arthur. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: James Arthur, Chris Hughes, Shing Tak Lam -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.Log.Basic /-! # Inverse of the sinh fu...
/-- `sinh` is surjective, `∀ b, ∃ a, sinh a = b`. In this case, we use `a = arsinh b`. -/
Mathlib/Analysis/SpecialFunctions/Arsinh.lean
78
79
/- 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...
_ ≤ n := Nat.lt_succ_iff.mp i.2) theorem cycleRange_of_lt {n : ℕ} [NeZero n] {i j : Fin n} (h : j < i) : cycleRange i j = j + 1 := by rw [cycleRange_of_le h.le, if_neg h.ne] theorem coe_cycleRange_of_lt {n : ℕ} {i j : Fin n} (h : j < i) : (cycleRange i j : ℕ) = j + 1 := by rw [coe_cycleRange_of_le h.le,...
Mathlib/GroupTheory/Perm/Fin.lean
175
190
/- Copyright (c) 2022 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Yaël Dillies -/ import Mathlib.Analysis.Convex.Cone.Extension import Mathlib.Analysis.Convex.Gauge import Mathlib.Topology.Algebra.Module.FiniteDimension import Mathlib.Top...
(ht₁ : Convex ℝ t) (ht₂ : IsClosed t) (disj : Disjoint s t) : ∃ (f : E →L[ℝ] ℝ) (u v : ℝ), (∀ a ∈ s, f a < u) ∧ u < v ∧ ∀ b ∈ t, v < f b := by obtain rfl | hs := s.eq_empty_or_nonempty · exact ⟨0, -2, -1, by simp, by norm_num, fun b _hb => by norm_num⟩ obtain rfl | _ht := t.eq_empty_or_nonempty · exact ...
Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
153
168
/- 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...
· rw [← Real.cos_neg] refine cos_neg_of_pi_div_two_lt_of_lt (by linarith) ?_
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
613
614
/- 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.BigOperators.Option import Mathlib.Analysis.BoxIntegral.Box.Basic import Mathlib.Data.Set.Pairwise.Lattice /-! # Partitions of rectangular b...
· exact π.le_of_mem (π.biUnionIndex_mem hJ) · rw [biUnionIndex, dif_neg hJ]
Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
326
328
/- 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.Probability.Independence.Kernel import Mathlib.MeasureTheory.Constructions.Pi /-! # Independence of sets of sets and measure spaces (σ-algebras) * A fami...
lemma iIndepFun_iff_iIndep {β : ι → Type*} (m : ∀ x : ι, MeasurableSpace (β x)) (f : ∀ x : ι, Ω → β x) (μ : Measure Ω) : iIndepFun f μ ↔ iIndep (fun x ↦ (m x).comap (f x)) μ := by
Mathlib/Probability/Independence/Basic.lean
212
215
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.Geometry.RingedSpace.Basic import Mathlib.Geometry.RingedSpace.Stalks import Mathlib.RingTheory.Nilp...
obtain ⟨n, hn⟩ := hf cases n.eq_zero_or_pos with | inr h => rw [← X.toRingedSpace.basicOpen_pow f n h, hn] simp [basicOpen_zero] | inl h => rw [h, pow_zero] at hn simp [eq_zero_of_zero_eq_one hn.symm f, basicOpen_zero] instance component_nontrivial (X : LocallyRingedSpace.{u}) (U : Opens X.car...
Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
302
315
/- Copyright (c) 2023 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.Discriminant import Mathlib.RingTheory.DedekindDomain.IntegralClosure import Mathlib.NumberTheory.K...
end FractionalIdeal variable (B) variable [IsIntegrallyClosed A] [IsDedekindDomain B] /-- The different ideal of an extension of integral domains `B/A` is the inverse of the dual of `A` as an ideal of `B`. See `coeIdeal_differentIdeal` and `coeSubmodule_differentIdeal`. -/ def differentIdeal [NoZeroSMulDivisors A B]...
Mathlib/RingTheory/DedekindDomain/Different.lean
388
412
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.Subalgebra import Mathlib.LinearAlgebra.Finsupp.Span /-! # Lie submodules of a Lie algebra In this file we define Lie submodules, we construct ...
Mathlib/Algebra/Lie/Submodule.lean
1,169
1,171
/- 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_zsmul_add [AddCommGroup G] [AddGroup H] [AddConstMapClass F G H a b] (f : F) (n : ℤ) (x : G) : f (n • a + x) = f x + n • b := by
Mathlib/Algebra/AddConstMap/Basic.lean
218
220
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.NumberTheory.ModularForms.JacobiTheta.TwoVariable /-! # Asymptotic bounds for Jacobi theta functions The goal of this file is to establish some tech...
lemma isBigO_atTop_F_nat_zero_sub {a : ℝ} (ha : 0 ≤ a) : ∃ p, 0 < p ∧ (fun t ↦ F_nat 0 a t - (if a = 0 then 1 else 0)) =O[atTop] fun t ↦ exp (-p * t) := by split_ifs with h · rw [h] have : (fun t ↦ F_nat 0 0 t - 1) =O[atTop] fun t ↦ rexp (-π * t) / (1 - rexp (-π * t)) := by apply Eventually.isBigO ...
Mathlib/NumberTheory/ModularForms/JacobiTheta/Bounds.lean
130
146
/- Copyright (c) 2021 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth, Frédéric Dupuis -/ import Mathlib.Analysis.InnerProductSpace.Calculus import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Adjoint...
simpa [← norm_eq_zero, Ne] exact hasEigenvalue_of_hasEigenvector (T'.prop.hasEigenvector_of_isMaxOn hx₀_ne this) /-- The infimum of the Rayleigh quotient of a symmetric operator `T` on a nontrivial finite-dimensional vector space is an eigenvalue for that operator. -/ theorem hasEigenvalue_iInf_of_finiteDimensio...
Mathlib/Analysis/InnerProductSpace/Rayleigh.lean
242
257
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Alexey Soloyev, Junyan Xu, Kamila Szewczyk -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.LinearRecurrence import Mathlib.Data.Fin.VecNotati...
end Fibrec /-- Binet's formula as a function equality. -/
Mathlib/Data/Real/GoldenRatio.lean
178
181
/- 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.Typeclasses.Finite import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms import Mathlib.MeasureTheory.Measure....
Mathlib/MeasureTheory/Measure/Typeclasses.lean
1,320
1,322
/- 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...
@[deprecated (since := "2025-01-28")]
Mathlib/GroupTheory/Perm/Fin.lean
213
214