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) 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...
/-- If `f` is a family of mutually independent random variables (`iIndepFun m f μ`) and `S, T` are two disjoint finite index sets, then the tuple formed by `f i` for `i ∈ S` is independent of the
Mathlib/Probability/Independence/Basic.lean
684
685
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Algebra.Order.Group.Pointwise.Bounds import Mathlib.Data.Real.Basic import Mathlib.Ord...
obtain ⟨k, hk⟩ := exists_int_gt U refine fun d => ⟨k * d, fun z h => ?_⟩ rcases h with ⟨y, yS, hy⟩ refine Int.cast_le.1 (hy.trans ?_) push_cast exact mul_le_mul_of_nonneg_right ((hU yS).trans hk.le) d.cast_nonneg choose f hf using fun d : ℕ => Int.exists_greatest_of_bdd (this d) ⟨⌊L * d⌋, ...
Mathlib/Data/Real/Archimedean.lean
58
106
/- 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...
open Int in /-- "Generalized" `nonneg`. `nonnegg c d x y` means `a √c + b √d ≥ 0`; we are interested in the case `c = 1` but this is more symmetric -/ def Nonnegg (c d : ℕ) : ℤ → ℤ → Prop | (a : ℕ), (b : ℕ) => True | (a : ℕ), -[b+1] => SqLe (b + 1) c a d | -[a+1], (b : ℕ) => SqLe (a + 1) d b c
Mathlib/NumberTheory/Zsqrtd/Basic.lean
395
401
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
theorem getElem_map_rev (f : α → β) {l} {n : Nat} {h : n < l.length} : f l[n] = (map f l)[n]'((l.length_map f).symm ▸ h) := Eq.symm (getElem_map _)
Mathlib/Data/List/Basic.lean
602
604
/- 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 -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Composition import Mathlib.Data.Matrix.ConjTranspose /-!...
Mathlib/Data/Matrix/Block.lean
943
949
/- 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` ...
exact ite_eq_right_iff.2 fun hb => ite_eq_right_iff.2 fun h => (ha <| h ▸ hb).elim variable [MeasurableSpace α] open scoped Classical in /-- The measure of a set under `pure a` is `1` for sets containing `a` and `0` otherwise. -/
Mathlib/Probability/ProbabilityMassFunction/Monad.lean
74
80
/- 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.Order.Group.Unbundled.Int import Mathlib.Algebra.Ring.Nat import Mathlib.Data.Int.GCD /-! # Congruences modulo a natural number This file def...
rw [add_sub_add_comm] at h₂ convert Int.dvd_sub h₂ h₁ using 1 rw [add_sub_cancel_left] protected theorem add_left_cancel' (c : ℕ) (h : c + a ≡ c + b [MOD n]) : a ≡ b [MOD n] := ModEq.rfl.add_left_cancel h
Mathlib/Data/Nat/ModEq.lean
137
142
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon -/ import Mathlib.Algebra.Notation.Defs import Mathlib.Data.Set.Subsingleton import Mathlib.Logic.Equiv.Defs /-! # Partial values of a type ...
Part.ext' (ofOption_dom o) fun h₁ h₂ => by cases o · simp at h₂ · rfl
Mathlib/Data/Part.lean
292
296
/- Copyright (c) 2024 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.NumberTheory.ModularForms.Basic import Mathlib.NumberTheory.ModularForms.EisensteinSeries.IsBoundedAtImInfty import Mathlib.NumberTheory.ModularForms....
Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean
92
100
/- Copyright (c) 2022 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Data.Finsupp.Defs /-! # Locus of unequal values of finitely supported functions Let `α N` be two Types, assume that `N` has a `0` and let `f g : α →₀ N...
theorem zipWith_neLocus_eq_right [DecidableEq M] [Zero M] [DecidableEq P] [Zero P] [Zero N] {F : M → N → P} (F0 : F 0 0 = 0) (f₁ f₂ : α →₀ M) (g : α →₀ N) (hF : ∀ g, Function.Injective fun f => F f g) :
Mathlib/Data/Finsupp/NeLocus.lean
88
90
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen -/ import Mathlib.Algebra.BigOperators.Finsupp.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.GroupWithZero....
refine (b_prime.dvd_or_dvd b_div_n).resolve_left fun b_div_a => ?_ have assoc := b_prime.associated_of_dvd a_prime b_div_a have := uniq a rw [Multiset.countP_cons_of_pos _ (Associated.refl _), Nat.succ_le_succ_iff, ← not_lt,
Mathlib/Algebra/BigOperators/Associated.lean
133
136
/- Copyright (c) 2020 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, Ira Fesefeldt -/ import Mathlib.Control.Monad.Basic import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.Order.CompleteLattice.Basic import Mathlib.Order.Iterate import M...
| 0 => a | _ => b monotone' _ _ _ := by aesop @[simp] lemma pair_zero (a b : α) (hab) : pair a b hab 0 = a := rfl
Mathlib/Order/OmegaCompletePartialOrder.lean
138
142
/- Copyright (c) 2022 Justin Thomas. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Justin Thomas -/ import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Algebra.Polynomial.Module.AEval /-! # Annihilating Ideal Given ...
Mathlib/LinearAlgebra/AnnihilatingPolynomial.lean
179
182
/- 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 ...
(fst.comp <| nat_iterate (encode_iff.2 hf) (pair hg hf) <|
Mathlib/Computability/Primrec.lean
753
754
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathli...
(image_mono f).map_inf_le s t
Mathlib/Data/Finset/Image.lean
414
415
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Initial...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
2,031
2,032
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Joël Riou -/ import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.ConeCategory /-! ...
⟨_, IsColimit.ofPreservesCoconeInitial I.multicoforkEquivSigmaCofork.inverse (colimit.isColimit _)⟩ /-- The canonical projection `∐ I.right ⟶ multicoequalizer I`. -/ def sigmaπ : ∐ I.right ⟶ multicoequalizer I := coequalizer.π I.fstSigmaMap I.sndSigmaMap ≫ (isoCoequalizer I).inv
Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
885
891
/- 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...
theorem neg_coe_pi : -(π : Angle) = π := by rw [← coe_neg, angle_eq_iff_two_pi_dvd_sub]
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
112
113
/- Copyright (c) 2022 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Group.Equiv.Opposite import Mathlib.Algebra.Group.TypeTags.Basic /-! # Squares and even elements This ...
lemma isSquare_iff_exists_sq (a : α) : IsSquare a ↔ ∃ r, a = r ^ 2 := by simp [IsSquare, pow_two]
Mathlib/Algebra/Group/Even.lean
112
113
/- Copyright (c) 2023 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Richard M. Hill -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Polynomial.Module.AEval import Mathlib...
@[simp] theorem C_smul_derivation_apply (D : Derivation R R[X] A) (a : R) (f : R[X]) : C a • D f = a • D f := by have : C a • D f = D (C a * f) := by simp
Mathlib/Algebra/Polynomial/Derivation.lean
43
46
/- 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...
simp [filter_lt n m (n + 1), r] @[simp] theorem filter_le_of_bot {n m : ℕ} (hnm : n < m) : ((Ico n m).filter fun x => x ≤ n) = [n] := by rw [← filter_lt_of_succ_bot hnm]
Mathlib/Data/List/Intervals.lean
178
182
/- Copyright (c) 2020 Yury Kudryashov, Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Anne Baanen -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Group.Action.Pi import Mathlib.Data.Fintype.BigOperators import Mat...
theorem prod_cons (x : M) (f : Fin n → M) : (∏ i : Fin n.succ, (cons x f : Fin n.succ → M) i) = x * ∏ i : Fin n, f i := by simp_rw [prod_univ_succ, cons_zero, cons_succ]
Mathlib/Algebra/BigOperators/Fin.lean
106
108
/- 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 [AddZeroClass G] [Add H] [AddConstMapClass F G H a b] (f : F) : f a = f 0 + b := by
Mathlib/Algebra/AddConstMap/Basic.lean
99
101
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.Convolution import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup i...
swap; · rw [add_re, one_re]; positivity rw [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, Nat.cast_zero, add_zero, ← mul_div_assoc, ← div_div] congr 3 with j : 1 push_cast; abel end Complex end BetaIntegral section LimitFormula /-! ## The Euler limit formula -/
Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
213
227
/- Copyright (c) 2018 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Rémy Degenne -/ import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Order.Filter.IsBounded import Mathlib.Order.Hom.CompleteL...
rw [← Finset.sup'_eq_sup s_nemp fun i ↦ limsup (F i) f, ← limsup_finset_sup' s_nemp h₁ h₂] congr
Mathlib/Order/LiminfLimsup.lean
1,179
1,180
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.GeomSum import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.P...
apply sum_mem rintro ⟨i, j⟩ e obtain rfl : i + j = k := mem_antidiagonal.mp e apply Ideal.pow_le_pow_right add_tsub_add_le_tsub_add_tsub rw [pow_add] exact Ideal.mul_mem_mul (h _ (Finset.mem_insert.mpr <| Or.inl rfl) _) (hs (fun i hi k => h _ (Finset.mem_insert.mpr ...
Mathlib/RingTheory/Polynomial/Basic.lean
607
628
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.Fintype.EquivFin import Mathlib.Data.Fintype.Inv /-! # Equivalence between fintypes This file contains some basic results on equivalences wher...
Mathlib/Logic/Equiv/Fintype.lean
145
148
/- Copyright (c) 2022 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic /-! # The layer cake formula / Cavalieri's principle / tail probability formula In this file we prove the f...
· exact integral_eq_lintegral_of_nonneg_ae f_nn f_intble.aestronglyMeasurable · have aux := @integral_eq_lintegral_of_nonneg_ae _ _ ((volume : Measure ℝ).restrict (Set.Ioi 0)) (fun t ↦ μ.real {a : α | t < f a}) ?_ ?_ · rw [aux] congr 1 apply setLIntegral_congr_fun measurableSet_Ioi (Eventually...
Mathlib/MeasureTheory/Integral/Layercake.lean
524
543
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Moritz Doll -/ import Mathlib.LinearAlgebra.Prod /-! # Partially defined linear maps A `LinearPMap R E F` or `E →ₗ.[R] F` is a linear map from a submodule of `E` to...
Helper definition for `LinearPMap`. -/ noncomputable def toLinearPMapAux (g : Submodule R (E × F)) (hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) : g.map (LinearMap.fst R E F) →ₗ[R] F where
Mathlib/LinearAlgebra/LinearPMap.lean
883
886
/- 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 ...
`decide ∘ p : α → β → Bool` is primitive recursive. -/ def PrimrecRel {α β} [Primcodable α] [Primcodable β] (s : α → β → Prop) [∀ a b, Decidable (s a b)] := Primrec₂ fun a b => decide (s a b) namespace Primrec₂ variable {α : Type*} {β : Type*} {σ : Type*} variable [Primcodable α] [Primcodable β] [Primcodable ...
Mathlib/Computability/Primrec.lean
341
349
/- 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 ...
theorem mapsTo_emetric_closedBall (hf : Isometry f) (x : α) (r : ℝ≥0∞) : MapsTo f (EMetric.closedBall x r) (EMetric.closedBall (f x) r) := (hf.preimage_emetric_closedBall x r).ge
Mathlib/Topology/MetricSpace/Isometry.lean
144
147
/- Copyright (c) 2022 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Gabin Kolly -/ import Mathlib.Data.Finite.Sum import Mathlib.Data.Fintype.Order import Mathlib.ModelTheory.FinitelyGenerated import Mathlib.ModelTheory.Quotients import...
Mathlib/ModelTheory/DirectLimit.lean
494
495
/- 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...
Mathlib/Order/Interval/Set/Basic.lean
1,903
1,904
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Topology.Sheaves.LocalPredicate import Mathlib.Topology.Sheaves.Stalks /-! # Sheafification of `Type` valued presheaves We construct the sheafification o...
rcases hU ⟨x, U.2⟩ with ⟨U', mU, iU, gU, wU⟩ rcases hV ⟨x, V.2⟩ with ⟨V', mV, iV, gV, wV⟩ have wUx := wU ⟨x, mU⟩ dsimp at wUx; rw [wUx] at e; clear wUx have wVx := wV ⟨x, mV⟩ dsimp at wVx; rw [wVx] at e; clear wVx rcases F.germ_eq x mU mV gU gV e with ⟨W, mW, iU', iV', (e' : F.map iU'.op gU = F.map iV'.op...
Mathlib/Topology/Sheaves/Sheafify.lean
100
121
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Topology.Instances.Int /-! # ℤ as a normed group -/ open NNReal variable {...
end
Mathlib/Analysis/Normed/Group/Int.lean
57
58
/- Copyright (c) 2023 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Polynomial.Degree.Lemmas /-! # `compute_degree` and `monicity`: tactics for explicit polynomials This file defines two related tactics: `comp...
natDegree p = deg := by subst coeff_eq deg_eq_deg coeff_eq_deg exact natDegree_eq_of_le_of_coeff_ne_zero ‹_› ‹_› theorem degree_eq_of_le_of_coeff_ne_zero' {deg m o : WithBot ℕ} {c : R} {p : R[X]} (h_deg_le : degree p ≤ m) (coeff_eq : coeff p (WithBot.unbotD 0 deg) = c)
Mathlib/Tactic/ComputeDegree.lean
150
155
/- 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.HomologicalComplexLimits import Mathlib.Algebra.Homology.Additive /-! Binary biproducts of homological complexes In this file, it is shown tha...
@[reassoc (attr := simp)] lemma inl_biprodXIso_inv (i : ι) : biprod.inl ≫ (biprodXIso K L i).inv = (biprod.inl : K ⟶ K ⊞ L).f i := by simp [biprodXIso]
Mathlib/Algebra/Homology/HomologicalComplexBiprod.lean
45
48
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Integral.PeakFunction /-! # Euler's infinite product for the sine function This file...
nth_rw 2 [← mul_one (2 : ℂ)] rw [← mul_add, mul_pow, ← div_div] ring · push_cast; ring · push_cast; ring /-- Relate the integral `cos x ^ n` over `[0, π/2]` to the integral of `sin x ^ n` over `[0, π]`, which is studied in `Data.Real.Pi.Wallis` and other places. -/ theorem integral_cos_pow_eq (n : ℕ) :...
Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean
165
176
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Data.Set.Finite.Lattice import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Order.Interval.Finset.Nat import Mathlib.Order.SuccPred.Ba...
@[simp] lemma disjoint_partialSups_left {f : ι → α} {i : ι} {x : α} :
Mathlib/Order/PartialSups.lean
179
180
/- Copyright (c) 2022 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.ModelTheory.ElementaryMaps /-! # Elementary Substructures ## Main Definitions - A `FirstOrder.Language.ElementarySubstructure` is a substructure whe...
(theory_model_iff S T).2 h
Mathlib/ModelTheory/ElementarySubstructures.lean
111
112
/- 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.CategoryTheory.Shift.CommShift import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor /-! Shifted morphisms Given a category `C` endowed with a shift by an ...
@[simp] lemma mk₀_zero (m₀ : M) (hm₀ : m₀ = 0) : mk₀ m₀ hm₀ (0 : X ⟶ Y) = 0 := by simp [mk₀]
Mathlib/CategoryTheory/Shift/ShiftedHom.lean
118
120
/- 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.Set.Lattice import Mathlib.Order.ConditionallyCompleteLattice.Defs /-! # Theory of conditionally complete lattices A conditionally complet...
obtain ⟨x, hxs, hxa⟩ := h a ha exact csInf_le_of_le (ht.mono (image_subset _ hst)) ⟨x, hxs, rfl⟩ (hf (hst hxs) ha hxa)
Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
797
798
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.DifferentialObject /-! # Homological complexes are differential graded objects. We veri...
variable {β : Type*} [AddCommGroup β] (b : β) variable (V : Type*) [Category V] [HasZeroMorphisms V]
Mathlib/Algebra/Homology/DifferentialObject.lean
61
62
/- 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...
Mathlib/SetTheory/Ordinal/Notation.lean
1,322
1,327
/- Copyright (c) 2023 Shogo Saito. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shogo Saito. Adapted for mathlib by Hunter Monroe -/ import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Nat.ModEq import Mathlib.Data.Nat.GCD.BigOperators /-! # Chinese Re...
theorem chineseRemainderOfList_lt_prod (l : List ι) (co : l.Pairwise (Coprime on s)) (hs : ∀ i ∈ l, s i ≠ 0) : chineseRemainderOfList a s l co < (l.map s).prod := by cases l with | nil => simp | cons i l => simp only [chineseRemainderOfList, List.map_cons, List.prod_cons] have : Coprime (s i) (l....
Mathlib/Data/Nat/ChineseRemainder.lean
75
91
/- 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...
variable [HasZeroMorphisms D] instance : HasZeroMorphisms (C ⥤ D) where
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
140
142
/- 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, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.SpecialFunctions.Pow.Complex /-! ...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
282
285
/- 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.Calculus.BumpFunction.FiniteDimension import Mathlib.Geometry.Manifold.ContMDiff.Atlas import Mathlib.Geometry.Manifold.ContMDiff.NormedSpac...
theorem support_eq_symm_image : support f = (extChartAt I c).symm '' (ball (extChartAt I c c) f.rOut ∩ range I) := by rw [f.support_eq_inter_preimage, ← extChartAt_source I, ← (extChartAt I c).symm_image_target_inter_eq', inter_comm,
Mathlib/Geometry/Manifold/BumpFunction.lean
124
128
/- 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 -/ import Mathlib.Algebra.Group.Subgroup.Lattice import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra...
{S T : Submodule R' M'} {s t : M'} (hs : s ∈ S) (ht : t ∈ T) : s - t ∈ S ⊔ T := by rw [sub_eq_add_neg] exact add_mem_sup hs (neg_mem ht)
Mathlib/Algebra/Module/Submodule/Lattice.lean
267
269
/- Copyright (c) 2021 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.Algebra.Group.Subgroup.Defs import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Star.Pi import Mathlib.Algebra.Star.Rat /-! # Self-adjoint, sk...
(star_smul _ _).trans <| (congr_arg₂ _ hr ha).trans <| neg_smul _ _ /-- Scalar multiplication of a skew-adjoint element by a skew-adjoint element produces a
Mathlib/Algebra/Star/SelfAdjoint.lean
554
556
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro -/ import Mathlib.Data.Set.Function import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Says /-! # Equivalences and sets In this file we pr...
theorem Equiv.swap_bijOn_self (hs : a ∈ s ↔ b ∈ s) : BijOn (Equiv.swap a b) s s := by refine ⟨fun x hx ↦ ?_, (Equiv.injective _).injOn, fun x hx ↦ ?_⟩ · obtain (rfl | hxa) := eq_or_ne x a · rwa [swap_apply_left, ← hs]
Mathlib/Logic/Equiv/Set.lean
629
633
/- 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.CharP.Basic import Mathlib.Algebra.Module.End import Mathlib.Algebra.Ring.Prod import Mathlib.Data.Fintype.Units import Mathlib.GroupTheory.GroupAc...
def inv : ∀ n : ℕ, ZMod n → ZMod n | 0, i => Int.sign i | n + 1, i => Nat.gcdA i.val (n + 1)
Mathlib/Data/ZMod/Basic.lean
691
693
/- Copyright (c) 2022 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Junyan Xu, Jack McKoen -/ import Mathlib.RingTheory.Valuation.ValuationRing import Mathlib.RingTheory.Localization.AsSubring import Mathlib.Algebra.Ring.Subring.Pointwise impor...
instance : Top (ValuationSubring K) := Top.mk <| { (⊤ : Subring K) with mem_or_inv_mem' := fun _ => Or.inl trivial }
Mathlib/RingTheory/Valuation/ValuationSubring.lean
87
88
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Johan Commelin -/ import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Logic.Equiv.Functor import Mathlib.RingTheory.FreeRing /-...
⟨s ∪ t, hfs.union hft, isSupported_mul (isSupported_upwards hxs Set.subset_union_left) (isSupported_upwards hxt Set.subset_union_right)⟩
Mathlib/RingTheory/FreeCommRing.lean
295
297
/- 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...
/-- Define the first primitive quadratic character on `ZMod 8`, `χ₈`. It corresponds to the extension `ℚ(√2)/ℚ`. -/ @[simps]
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
112
114
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.Limits.Filtered import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts import Mathlib.CategoryTheory.Limits.Shapes.Ker...
@[reassoc (attr := simp)] lemma snd_opProdIsoCoprod_hom : prod.snd.op ≫ (opProdIsoCoprod A B).hom = coprod.inr := by rw [opProdIsoCoprod, ← op_comp, prod.lift_snd, Quiver.Hom.op_unop]
Mathlib/CategoryTheory/Limits/Opposites.lean
776
779
/- Copyright (c) 2022 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.Process.Stopping import Mathlib.Tactic.AdaptationNote /-! # Hitting time Given a stochastic process, the hitting time provides th...
rw [Set.Icc_eq_empty_of_lt (not_le.mp h)] at h_exists simp at h_exists theorem hitting_mem_Icc {m : ι} (hnm : n ≤ m) (ω : Ω) : hitting u s n m ω ∈ Set.Icc n m := ⟨le_hitting hnm ω, hitting_le ω⟩
Mathlib/Probability/Process/HittingTime.lean
123
128
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kim Morrison -/ import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Alge...
{ X := X d := fun i j => if h : i = j + 1 then eqToHom (by rw [h]) ≫ d j else 0 shape := fun i j w => by dsimp
Mathlib/Algebra/Homology/HomologicalComplex.lean
615
618
/- 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.Group.Units.Basic import Mathlib.Algebra.GroupWithZero.Basic import Mathlib.Data.Int.Basic import Mathlib.Lean.Meta.CongrTheorems import Mathli...
rw [mul_comm, mul_div_cancel_of_imp h] lemma mul_div_cancel_of_imp' (h : b = 0 → a = 0) : b * (a / b) = a := by rw [mul_comm, div_mul_cancel_of_imp h]
Mathlib/Algebra/GroupWithZero/Units/Basic.lean
411
414
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Sean Leather -/ import Batteries.Data.List.Perm import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lookmap import Mathlib.Data.Si...
· simp only [keys_cons, mem_cons] at h rcases h with h | h
Mathlib/Data/List/Sigma.lean
412
413
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Continuity import Mathlib.Topology.Algebra.IsUniformGroup.Basic import Mathlib.Topology.MetricSpace...
variable [SeminormedCommGroup E] [SeminormedCommGroup F] {a₁ a₂ b₁ b₂ : E} {r₁ r₂ : ℝ} @[to_additive]
Mathlib/Analysis/Normed/Group/Uniform.lean
180
182
/- 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.SpecialFunctions.Pow.NNReal import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SumOverResidueClass /-! # Conve...
rw [ENNReal.tsum_eq_iSup_nat' hu.tendsto_atTop] refine iSup_le fun n => (Finset.le_sum_schlomilch hf h_pos hu.monotone n).trans (add_le_add_left ?_ _) have (k : ℕ) : (u (k + 1) - u k : ℝ≥0∞) = (u (k + 1) - (u k : ℕ) : ℕ) := by simp [NNReal.coe_sub (Nat.cast_le (α := ℝ≥0).mpr <| (hu k.lt_succ_self).le)] ...
Mathlib/Analysis/PSeries.lean
142
151
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Ines Wright, Joachim Breitner -/ import Mathlib.GroupTheory.Solvable import Mathlib.GroupTheory.Sylow import Mathlib.Algebra.Group.Subgroup.Order import Mathlib.GroupTheo...
theorem nilpotencyClass_le_of_surjective {G' : Type*} [Group G'] (f : G →* G') (hf : Function.Surjective f) [h : IsNilpotent G] : Group.nilpotencyClass (hG := nilpotent_of_surjective _ hf) ≤ Group.nilpotencyClass G := by classical apply Nat.find_mono intro n hn rw [eq_top_iff] calc ⊤ = f.range := sy...
Mathlib/GroupTheory/Nilpotent.lean
538
547
/- 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, Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic...
split_ifs
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
120
120
/- Copyright (c) 2023 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Mathlib.Algebra.Algebra.NonUnitalHom import Mathlib.Data.Set.UnionLift import Mathlib.LinearAlgebra.Span.Basic import Mathlib.RingTheory.NonUnitalSubring.Basic ...
@[simp] theorem top_toNonUnitalSubsemiring : (⊤ : NonUnitalSubalgebra R A).toNonUnitalSubsemiring = ⊤ := rfl
Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
712
714
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.IsometricSMul /-! # Hausdorff distance The Hausdorff distance on subsets of a...
/-- Two sets are at zero Hausdorff distance if and only if they have the same closures. -/ theorem hausdorffDist_zero_iff_closure_eq_closure (fin : hausdorffEdist s t ≠ ⊤) : hausdorffDist s t = 0 ↔ closure s = closure t := by simp [← hausdorffEdist_zero_iff_closure_eq_closure, hausdorffDist, ENNReal.toReal_eq...
Mathlib/Topology/MetricSpace/HausdorffDistance.lean
784
792
/- 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 ...
Primrec fun a => (f a).foldr (fun b s => h a (b, s)) (g a) := (list_foldl (list_reverse.comp hf) hg <| to₂ <| hh.comp fst <| (pair snd fst).comp snd).of_eq fun a => by simp [List.foldl_reverse] theorem list_head? : Primrec (@List.head? α) := (list_casesOn .id (const none) (option_some_iff.2 <| fst.comp snd...
Mathlib/Computability/Primrec.lean
877
888
/- 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, Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic...
exact norm_ne_zero_iff.mpr <| slitPlane_ne_zero h · have h_cont_mul : Continuous fun x : ℂ => x * I := continuous_id'.mul continuous_const refine h_cont_mul.continuousAt.comp (continuous_ofReal.continuousAt.comp ?_) exact continuousAt_arg h
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
220
223
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Alex Keizer -/ import Mathlib.Algebra.Group.Nat.Even import Mathlib.Algebra.NeZero import Mathlib.Algebra.Ring.Nat import Mathlib.Data.List.GetD import Mathlib.Data.Nat.B...
Mathlib/Data/Nat/Bitwise.lean
391
392
/- 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...
have h : ((A.submatrix r id).submatrix id c).cRank ≤ (A.submatrix r id).cRank := Submodule.rank_mono <| span_mono <| by rintro _ ⟨x, rfl⟩; exact ⟨c x, rfl⟩ refine (Cardinal.lift_monotone h).trans ?_
Mathlib/Data/Matrix/Rank.lean
49
51
/- 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.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Algebra.Notation.Prod import Mathlib.Data.Set.Image /-! # Support of a func...
end Function namespace Set
Mathlib/Algebra/Group/Support.lean
243
245
/- Copyright (c) 2018 Reid Barton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton -/ import Mathlib.Topology.Hom.ContinuousEval import Mathlib.Topology.ContinuousMap.Basic import Mathlib.Topology.Separation.Regular /-! # The compact-open topology In this ...
@[norm_cast] lemma inseparable_coe {f g : C(X, Y)} : Inseparable (f : X → Y) g ↔ Inseparable f g := by simp only [inseparable_iff_specializes_and, specializes_coe] instance [T0Space Y] : T0Space C(X, Y) := t0Space_of_injective_of_continuous DFunLike.coe_injective continuous_coeFun
Mathlib/Topology/CompactOpen.lean
215
220
/- Copyright (c) 2022 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.C...
Mathlib/Analysis/BoundedVariation.lean
645
646
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Order.Filter.Interval import Mathlib.Order.Interval.Set.Pi import Mathlib.Tactic.TFAE import Mathlib.Tactic.NormNum im...
Mathlib/Topology/Order/Basic.lean
767
769
/- 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.Data.Finsupp.Basic import Mathlib.Data.List.AList /-! # Connections between `Finsupp` and `AList` ## Main definitions * `Fin...
theorem lookupFinsupp_support [DecidableEq α] [DecidableEq M] (l : AList fun _x : α => M) : l.lookupFinsupp.support = (l.1.filter fun x => Sigma.snd x ≠ 0).keys.toFinset := by dsimp only [lookupFinsupp]
Mathlib/Data/Finsupp/AList.lean
76
78
/- 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.Finite.Defs import Mathlib.Data.Finset.BooleanAlgebra import Mathlib.Data.Finset.Image import Mathlib.Data.Fintype.Defs import Mathlib.Data.Fintyp...
simp
Mathlib/Data/Fintype/Basic.lean
104
105
/- 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.Algebra.BigOperators.Fin import Mathlib.Logic.Encodable.Pi import Mathlib.MeasureTheory.Group.Measure import Mathlib.MeasureTheory.MeasurableSpace....
rw [e_meas.measurableEmbedding.map_apply]
Mathlib/MeasureTheory/Constructions/Pi.lean
402
402
/- 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_inv_cancel_left (ha₀ : a ≠ 0) (ha : a ≠ ∞) : a * (a⁻¹ * b) = b := ENNReal.mul_inv_cancel_left' (by simp [ha₀]) (by simp [ha])
Mathlib/Data/ENNReal/Inv.lean
120
121
/- 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.SpecialFunctions.Pow.NNReal import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SumOverResidueClass /-! # Conve...
(∑ k ∈ range n, 2 ^ k • f (2 ^ (k + 1))) ≤ ∑ k ∈ Ico 2 (2 ^ n + 1), f k := by convert sum_schlomilch_le' hf (fun n => pow_pos zero_lt_two n) (fun m n hm => pow_right_mono₀ one_le_two hm) n using 2 simp [pow_succ, mul_two, two_mul]
Mathlib/Analysis/PSeries.lean
100
104
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll -/ import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Analysis.LocallyConvex.BalancedCoreHull import Mathlib.Analysis....
theorem image_isVonNBounded_iff {α : Type*} {f : α → E} {s : Set α} : Bornology.IsVonNBounded 𝕜 (f '' s) ↔ ∃ r : ℝ, ∀ x ∈ s, ‖f x‖ ≤ r := by simp_rw [isVonNBounded_iff', Set.forall_mem_image] /-- In a normed space, the von Neumann bornology (`Bornology.vonNBornology`) is equal to the metric bornology. -/ theor...
Mathlib/Analysis/LocallyConvex/Bounded.lean
472
479
/- Copyright (c) 2020 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann -/ import Mathlib.Algebra.ContinuedFractions.Translations /-! # Stabilisation of gcf Computations Under Termination ## Summary We show that the continuants and co...
g.nums m = g.nums n := by simp only [num_eq_conts_a, conts_stable_of_terminated n_le_m terminatedAt_n] theorem dens_stable_of_terminated (n_le_m : n ≤ m) (terminatedAt_n : g.TerminatedAt n) :
Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean
69
72
/- 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.CharP.Pi import Mathlib.Algebra.CharP.Quotient import Mathlib.Algebra.CharP.Subring import Mathlib.Analysis.Specia...
open Perfection open scoped Classical in
Mathlib/RingTheory/Perfection.lean
462
465
/- 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...
refine zero_lt_one.trans_le ?_ rw [Content.outerMeasure_eq_iInf] refine le_iInf₂ fun U hU => le_iInf fun hK₀ => le_trans ?_ <| le_iSup₂ K₀.toCompacts hK₀ exact haarContent_self.ge @[to_additive] theorem haarContent_outerMeasure_closure_pos (K₀ : PositiveCompacts G) : 0 < (haarContent K₀).outerMeasure (clos...
Mathlib/MeasureTheory/Measure/Haar/Basic.lean
490
521
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Order.SuccPred import Mathlib.Data.Sum.Order import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.PPWithUniv /-! # ...
instance inhabited : Inhabited WellOrder := ⟨⟨PEmpty, _, inferInstanceAs (IsWellOrder PEmpty EmptyRelation)⟩⟩ end WellOrder
Mathlib/SetTheory/Ordinal/Basic.lean
85
90
/- 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 verschiebungFun_coeff_zero (x : 𝕎 R) : (verschiebungFun x).coeff 0 = 0 := by rw [verschiebungFun_coeff, if_pos rfl]
Mathlib/RingTheory/WittVector/Verschiebung.lean
42
44
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yaël Dillies, Moritz Doll -/ import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Data.Real.Pointwise /...
end normSeminorm
Mathlib/Analysis/Seminorm.lean
1,355
1,366
/- 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,258
1,262
/- 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, Sébastien Gouëzel -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.MeasureTheory.Function.SimpleFuncDense /-! # Strongly measurable and finitely strongly meas...
hf.comp_measurable measurable_swap protected theorem fst {_ : MeasurableSpace α} [mβ : MeasurableSpace β] [TopologicalSpace γ] {f : α → γ} (hf : StronglyMeasurable f) :
Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
367
370
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon -/ import Mathlib.Algebra.Notation.Defs import Mathlib.Data.Set.Subsingleton import Mathlib.Logic.Equiv.Defs /-! # Partial values of a type ...
@[simp] theorem map_eq_map {α β} (f : α → β) (o : Part α) : f <$> o = map f o :=
Mathlib/Data/Part.lean
517
518
/- Copyright (c) 2021 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory deprecated_module (since := "2025-04-06")
Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean
203
223
/- 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.Tape import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.PFun import M...
Mathlib/Computability/TuringMachine.lean
2,257
2,269
/- Copyright (c) 2019 Minchao Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Minchao Wu, Chris Hughes, Mantas Bakšys -/ import Mathlib.Data.List.Basic import Mathlib.Order.BoundedOrder.Lattice import Mathlib.Data.List.Induction import Mathlib.Order.MinMax import Ma...
@[simp] theorem argmin_eq_none : l.argmin f = none ↔ l = [] := @argmax_eq_none _ βᵒᵈ _ _ _ _
Mathlib/Data/List/MinMax.lean
151
153
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kim Morrison, Ainsley Pahljina -/ import Mathlib.RingTheory.Fintype import Mathlib.Tactic.NormNum import Mathlib.Tactic.Ring import Mathlib.Tactic.Zify /-! # The Lucas-L...
replace h := congr_arg (fun n : ℤ => (n : X (q (p' + 2)))) h
Mathlib/NumberTheory/LucasLehmer.lean
385
385
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Filippo A. E. Nuccio -/ import Mathlib.RingTheory.Localization.Integer import Mathlib.RingTheory.Localization.Submodule /-! # Fractional ideals This file defines fractional...
/-- Copy of a `FractionalIdeal` with a new underlying set equal to the old one. Useful to fix definitional equalities. -/ protected def copy (p : FractionalIdeal S P) (s : Set P) (hs : s = ↑p) : FractionalIdeal S P := ⟨Submodule.copy p s hs, by convert p.isFractional ext
Mathlib/RingTheory/FractionalIdeal/Basic.lean
166
172
/- 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.Group.Submonoid.Operations import Mathlib.Algebra.MonoidAlgebra.Defs import Mathlib.Algebra.Order.Mon...
theorem sum_add_index {S : Type*} [AddCommMonoid S] (p q : R[X]) (f : ℕ → R → S) (hf : ∀ i, f i 0 = 0) (h_add : ∀ a b₁ b₂, f a (b₁ + b₂) = f a b₁ + f a b₂) :
Mathlib/Algebra/Polynomial/Basic.lean
875
877
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl -/ import Mathlib.Algebra.Field.Subfield.Defs import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.Analysis.Normed.Ring.Basic /-! # Norm...
Mathlib/Analysis/Normed/Field/Basic.lean
1,090
1,096
/- 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, Sabbir Rahman -/ import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Pow import Mathlib.Algeb...
try let _a ← synthInstanceQ q(Semifield $α) let _a ← synthInstanceQ q(LinearOrder $α) let _a ← synthInstanceQ q(IsStrictOrderedRing $α) haveI' : $e =Q $a ^ $b := ⟨⟩
Mathlib/Algebra/Order/Field/Power.lean
155
159
/- 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.Fin.Fin2 import Mathlib.Data.PFun import Mathlib.Data.Vector3 import Mathlib.NumberTheory.PellMatiyasevic /-! # Diophantine functions and Matiyas...
theorem diophPFun_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f} (df : DiophPFun f) : Dioph {v : α → ℕ | ∃ h : f.Dom v, f.fn v h ::ₒ v ∈ S} := ext (ex1_dioph (d.inter df)) fun v => ⟨fun ⟨x, hS, (h : Exists _)⟩ => by rw [show (x ::ₒ v) ∘ some = v from funext fun s => rfl] at h obtain ⟨hf, h⟩ := ...
Mathlib/NumberTheory/Dioph.lean
411
426
/- 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 Mathlib.Algebra.Notation.Defs import Mathlib.Data.Int.Notation import Mathlib.Data.Nat.BinaryRec import Mathlib.L...
Mathlib/Algebra/Group/Defs.lean
1,256
1,257
/- 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,015
1,022