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) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad -/ import Mathlib.Data.Finset.Basic import Mathlib.Data.Finset.Image /-! # Cardinality of a finite set This defines the cardinality of a `Fins...
@[simp] theorem card_disjUnion (s t : Finset α) (h) : #(s.disjUnion t h) = #s + #t := Multiset.card_add _ _
Mathlib/Data/Finset/Card.lean
468
472
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.Algebra.BigOperators.Expect import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.Convex.Jensen import M...
calc _ = ∑ i ∈ s, w i ^ (1 - p⁻¹) * (w i ^ p⁻¹ * f i) := ?_ _ ≤ (∑ i ∈ s, (w i ^ (1 - p⁻¹)) ^ (1 - p⁻¹)⁻¹) ^ (1 / (1 - p⁻¹)⁻¹) * (∑ i ∈ s, (w i ^ p⁻¹ * f i) ^ p) ^ (1 / p) := inner_le_Lp_mul_Lq _ _ _ (.symm <| Real.holderConjugate_iff.mpr ⟨hp, by simp⟩) _ = _ := ?_ · congr with i r...
Mathlib/Analysis/MeanInequalities.lean
525
537
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.MeasureTheory.Measure.Comap import Mathlib.MeasureTheory.Measure.QuasiMeasurePreserving /-! # Restricting a measure to a subset or a s...
| iUnion f hfd hfm ihf => simp only [← restrict_apply (hfm _), ← restrict_apply (MeasurableSet.iUnion hfm)] at ihf ⊢ simp only [measure_iUnion hfd hfm, ihf]
Mathlib/MeasureTheory/Measure/Restrict.lean
437
439
/- Copyright (c) 2022 George Peter Banyard, Yaël Dillies, Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: George Peter Banyard, Yaël Dillies, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Path import Mathlib.Combinatorics.SimpleGraph.Metric /-! #...
classical -- The case `(G □ H).edist x y = ⊤` is used twice, so better to factor it out. have top_case : (G □ H).edist x y = ⊤ ↔ G.edist x.1 y.1 = ⊤ ∨ H.edist x.2 y.2 = ⊤ := by simp_rw [← not_ne_iff, edist_ne_top_iff_reachable, boxProd_reachable, not_and_or] by_cases h : (G □ H).edist x y = ⊤
Mathlib/Combinatorics/SimpleGraph/Prod.lean
244
248
/- 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.ExactSequence import Mathlib.Algebra.Homology.ShortComplex.Limits import Mathlib.CategoryTheory.Abelian.Refinements /-! # The snake lemma The ...
@[reassoc (attr := simp)] lemma w₁₃_τ₂ : S.v₁₂.τ₂ ≫ S.v₂₃.τ₂ = 0 := by rw [← comp_τ₂, S.w₁₃, zero_τ₂]
Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
126
127
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Yury Kudryashov -/ import Mathlib.MeasureTheory.OuterMeasure.Basic /-! # The “almost everywhere” filter of co-null sets. If `μ` is an outer measure or a measure on `α...
theorem ae_eq_set_union {s' t' : Set α} (h : s =ᵐ[μ] t) (h' : s' =ᵐ[μ] t') : (s ∪ s' : Set α) =ᵐ[μ] (t ∪ t' : Set α) :=
Mathlib/MeasureTheory/OuterMeasure/AE.lean
184
185
/- Copyright (c) 2023 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.NoZeroSMulDivisors.Basic import Mathlib.Data.Int.ModEq import Mathlib.GroupTheory.QuotientGroup.Defs import Math...
variable [Field α] {a b c p : α}
Mathlib/Algebra/ModEq.lean
287
287
/- Copyright (c) 2020 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Antoine Labelle -/ import Mathlib.LinearAlgebra.Dual.Lemmas import Mathlib.LinearAlgebra.Matrix.ToLin /-! # Contractions Given modules $M, N$ over a commutative ring $R$, t...
provides this equivalence in return for a basis of `M`. -/ -- We manually create simp-lemmas because `@[simps]` generates a malformed lemma noncomputable def dualTensorHomEquivOfBasis : Module.Dual R M ⊗[R] N ≃ₗ[R] M →ₗ[R] N := LinearEquiv.ofLinear (dualTensorHom R M N) (∑ i, TensorProduct.mk R _ N (b.dualBasis i...
Mathlib/LinearAlgebra/Contraction.lean
133
140
/- 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.Topology.ContinuousMap.Bounded.ArzelaAscoli import Mathlib.Topology.ContinuousMap.Bounded.Normed import Mathlib.Topology.MetricSpace.Gluing impor...
gcongr · apply le_max_left · apply le_max_right _ = 2 * maxVar X Y * max (dist x z) (dist y t) := by rw [dist_comm t y] ring _ = 2 * maxVar X Y * dist (x, y) (z, t) := rfl /-- Candidates are Lipschitz -/ private theorem candidates_lipschitz (fA : f ∈ candidates X Y) : Lipschit...
Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
180
195
/- Copyright (c) 2021 Benjamin Davidson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog import Mathlib.Analysis.SpecialFunctions.NonIntegrable import Mathlib.Analysis.SpecialFunctions.Pow.Deriv...
(∫ x in a..b, cos x ^ (n + 2)) = ∫ x in a..b, cos x ^ (n + 1) * cos x := by simp only [_root_.pow_succ] _ = C + (n + 1) * ∫ x in a..b, sin x ^ 2 * cos x ^ n := by simp [C, H, h, sq, -neg_add_rev]
Mathlib/Analysis/SpecialFunctions/Integrals.lean
705
707
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Functor.Hom import Mathlib.CategoryTheory.Products.Basic import Mathlib.Data.ULift import Mathlib.Logic.Function.ULift /-! # The Yoneda emb...
lemma isIso_of_yoneda_map_bijective {X Y : C} (f : X ⟶ Y) (hf : ∀ (T : C), Function.Bijective (fun (x : T ⟶ X) => x ≫ f)) : IsIso f := by obtain ⟨g, hg : g ≫ f = 𝟙 Y⟩ := (hf Y).2 (𝟙 Y) exact ⟨g, (hf _).1 (by aesop_cat), hg⟩
Mathlib/CategoryTheory/Yoneda.lean
632
637
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Joey van Langen, Casper Putz -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Group.Fin.Basic import Mathlib.Algebra.Group.ULift import Mathlib.Data.Int.ModEq import M...
lemma charP_iff_prime_eq_zero [Nontrivial R] {p : ℕ} (hp : p.Prime) : CharP R p ↔ (p : R) = 0 := ⟨fun _ => cast_eq_zero R p, fun hp0 => (ringChar_of_prime_eq_zero hp hp0) ▸ inferInstance⟩
Mathlib/Algebra/CharP/Basic.lean
98
101
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Segment import...
@[simp]
Mathlib/Analysis/Convex/Between.lean
378
379
/- 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.Combinatorics.SimpleGraph.Prod import Mathlib.Data.Fin.SuccPred import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Relation import Mathlib.Tact...
theorem pathGraph_two_eq_top : pathGraph 2 = ⊤ := by ext u v fin_cases u <;> fin_cases v <;> simp [pathGraph, ← Fin.coe_covBy_iff, covBy_iff_add_one_eq]
Mathlib/Combinatorics/SimpleGraph/Hasse.lean
108
111
/- 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, Eric Wieser -/ import Mathlib.Algebra.Group.Fin.Tuple import Mathlib.Algebra.BigOperators.GroupWithZero.Action import Ma...
theorem ker_single (i : ι) : ker (single R φ i) = ⊥ := ker_eq_bot_of_injective <| Pi.single_injective _ _ theorem proj_comp_single (i j : ι) : (proj i).comp (single R φ j) = diag j i := by
Mathlib/LinearAlgebra/Pi.lean
317
320
/- 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, Yury Kudryashov, David Loeffler -/ import Mathlib.Analysis.Convex.Slope import Mathlib.Analysis.Calculus.Deriv.MeanValue /-! # Convexity of functions and derivat...
/-- If a function `f` is continuous on a convex set `D ⊆ ℝ` and `f''` is strictly positive on the interior, then `f` is strictly convex on `D`. Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly positive, except at at most one point. -/ theore...
Mathlib/Analysis/Convex/Deriv.lean
259
273
/- 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.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Combinatorics.Enumerative.DoubleCounting import ...
(G.map f).EdgeDisjointTriangles := by
Mathlib/Combinatorics/SimpleGraph/Triangle/Basic.lean
62
62
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.Group.Pointwise.Set.Basic import Mathlib.Algebra.G...
map_prod_eq_map_prod s t hsA htA hs ht h := by rw [Pi.inv_def, prod_map_inv, prod_map_inv, hf.map_prod_eq_map_prod hsA htA hs ht h] @[to_additive] lemma IsMulFreimanHom.div {β : Type*} [DivisionCommMonoid β] {B₁ B₂ : Set β} {f₁ f₂ : α → β} (h₁ : IsMulFreimanHom n A B₁ f₁) (h₂ : IsMulFreimanHom n A B₂ f₂) : ...
Mathlib/Combinatorics/Additive/FreimanHom.lean
332
350
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
Mathlib/Data/Set/Lattice.lean
2,154
2,154
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Data.Set.Piecewise import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Core import Mathlib.Tactic.Attr.Core /-! # Partial equivalences This f...
Mathlib/Logic/Equiv/PartialEquiv.lean
1,156
1,158
/- 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...
Mathlib/Data/Fin/Tuple/Basic.lean
1,192
1,197
/- 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
834
849
/- 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
395
396
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.Data.List.Basic /-! # Double universal quantification on a list This file provides an API for `List.Forall₂` (definition in `Data.Lis...
exact match f a, g b, hfg h₁ with | _, _, Option.Rel.none => rel_filterMap (@hfg) h₂ | _, _, Option.Rel.some h => Forall₂.cons h (rel_filterMap (@hfg) h₂)
Mathlib/Data/List/Forall2.lean
262
266
/- Copyright (c) 2021 Yourong Zang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yourong Zang, Yury Kudryashov -/ import Mathlib.Data.Fintype.Option import Mathlib.Topology.Homeomorph.Lemmas import Mathlib.Topology.Sets.Opens /-! # The OnePoint Compactification We ...
[T2Space Y] [Infinite X] : C(OnePoint X, Y) ≃ { f : X → Y // ∃ L, Tendsto (fun x : X ↦ f x) cofinite (𝓝 L) } where toFun f := ⟨(f ·), ⟨f ∞, continuous_iff_from_discrete _ |>.mp (map_continuous f)⟩⟩ invFun f :=
Mathlib/Topology/Compactification/OnePoint.lean
412
415
/- Copyright (c) 2019 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann, Kyle Miller, Mario Carneiro -/ import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Nat.GCD.Basic import Mathlib.Data.Nat.BinaryRec import Mathlib.Logic.F...
theorem fib_succ_eq_succ_sum (n : ℕ) : fib (n + 1) = (∑ k ∈ Finset.range n, fib k) + 1 := by induction' n with n ih · simp · calc fib (n + 2) = fib n + fib (n + 1) := fib_add_two _ = (fib n + ∑ k ∈ Finset.range n, fib k) + 1 := by rw [ih, add_assoc] _ = (∑ k ∈ Finset.range (n + 1), fib k) + 1 :=...
Mathlib/Data/Nat/Fib/Basic.lean
249
258
/- 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...
`S`. -/ def idealProdEquiv : Ideal (R × S) ≃o Ideal R × Ideal S where toFun I := ⟨map (RingHom.fst R S) I, map (RingHom.snd R S) I⟩ invFun I := prod I.1 I.2 left_inv I := (ideal_prod_eq I).symm right_inv := fun ⟨I, J⟩ => by simp map_rel_iff' {I J} := by
Mathlib/RingTheory/Ideal/Prod.lean
72
78
/- Copyright (c) 2021 Christopher Hoskin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Hoskin, Yaël Dillies -/ import Mathlib.Algebra.Order.Group.Unbundled.Abs import Mathlib.Algebra.Notation /-! # Positive & negative parts Mathematical structures posse...
oneLePart_div_leOnePart, leOnePart_eq_inv_inf_one, inv_inv]
Mathlib/Algebra/Order/Group/PosPart.lean
168
169
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yakov Pechersky -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix import Mathlib.Data.Quot /-! # List rotation This file proves basic results about `List.r...
induction' n with n hn IH generalizing l · simp · rcases l with - | ⟨hd, tl⟩ · simp · simp [hn]
Mathlib/Data/List/Rotate.lean
327
332
/- 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.Fourier.AddCircle import Mathlib.Analysis.Fourier.FourierTransform import Mathlib.Analysis.PSeries import Mathlib.Analysis.Distribution.Fourie...
Mathlib/Analysis/Fourier/PoissonSummation.lean
232
237
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen, Antoine Labelle -/ import Mathlib.LinearAlgebra.Contraction import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib....
curry_apply, coe_comp, coe_restrictScalars, coe_inr, Function.comp_apply, prodMap_apply, map_zero, prodMapLinear_apply, zero_prodMap_dualTensorHom, trace_eq_contract_apply, contractLeft_apply, coe_snd, coprod_apply, id_coe, id_eq, zero_add, e] variable {R M N P}
Mathlib/LinearAlgebra/Trace.lean
200
204
/- Copyright (c) 2021 Hunter Monroe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hunter Monroe, Kyle Miller, Alena Gusakov -/ import Mathlib.Combinatorics.SimpleGraph.DeleteEdges import Mathlib.Data.Fintype.Powerset /-! # Subgraphs of a simple graph A subgraph of ...
simp theorem singletonSubgraph_snd_le_subgraphOfAdj {u v : V} {h : G.Adj u v} : G.singletonSubgraph v ≤ G.subgraphOfAdj h := by
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
951
954
/- Copyright (c) 2014 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Yaël Dillies, Patrick Stevens -/ import Mathlib.Algebra.CharZero.Defs import Mathlib.Data.Nat.Cast.Basic import Mathlib.Tactic.Common import Mathlib.Algebra.Field.Defs ...
obtain ⟨k, rfl⟩ := hnm have : n ≠ 0 := by rintro rfl; simp at hn rw [Nat.mul_div_cancel_left _ <| zero_lt_of_ne_zero this, mul_comm n, cast_mul, mul_div_cancel_right₀ _ hn]
Mathlib/Data/Nat/Cast/Field.lean
29
33
/- 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.Ring.Divisibility.Lemmas import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Engel import Mathlib.LinearAlgebra.Eigenspace.Pi import Math...
simp_rw [← iInf_lowerCentralSeries_eq_posFittingComp, hl₁, hl₂, hl₃, LieSubmodule.lowerCentralSeries_map_eq_lcs, ← LieSubmodule.lcs_sup, lowerCentralSeries, h.eq_top] lemma genWeightSpace_genWeightSpaceOf_map_incl (x : L) (χ : L → R) : (genWeightSpace (genWeightSpaceOf M (χ x) x) χ).map (genWeightSpaceOf...
Mathlib/Algebra/Lie/Weights/Basic.lean
575
606
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.InnerProductSpace.Defs impor...
/-- The inner product of a nonzero vector with a nonzero multiple of itself, divided by the product of their norms, has absolute value
Mathlib/Analysis/InnerProductSpace/Basic.lean
641
642
/- Copyright (c) 2014 Microsoft Corporation. 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.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Cast.Order.Basic import Math...
le_total := by intro a b transfer_rw apply le_total toDecidableLT := by infer_instance
Mathlib/Data/Num/Lemmas.lean
559
563
/- 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.Algebra.Notation.Prod import Mathlib.Data.Nat.Sqrt import Mathlib.Data.Set.Lattice.Image /-! # Naturals pairing function Th...
theorem unpair_pair (a b : ℕ) : unpair (pair a b) = (a, b) := by dsimp only [pair]; split_ifs with h
Mathlib/Data/Nat/Pairing.lean
57
58
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jeremy Avigad -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Notation.Pi import Mathlib.Data.Set.Lattice import Mathlib.Order.Filter.Defs /-! # Theory of...
Mathlib/Order/Filter/Basic.lean
2,150
2,151
/- 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, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, Amelia Livingston, Yury Kudryashov -/ import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Group.Submo...
end IsUnit namespace MonoidHom open Submonoid /-- Let `s` be a subset of a monoid `M` such that the closure of `s` is the whole monoid.
Mathlib/Algebra/Group/Submonoid/Basic.lean
356
363
/- 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.Algebra.RestrictScalars import Mathlib.Algebra.Lie.TensorProduct import Mathlib.LinearAlgebra.TensorProduct.Tower import Mathlib.RingTheory.TensorPro...
refine x.induction_on ?_ ?_ ?_ · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply] · intro a₁ l₁ refine y.induction_on ?_ ?_ ?_ · simp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply] · intro a₂ l₂ refine z.induction_on ?_ ?_ ?_ · simp only [LinearMap.map_zero, add_ze...
Mathlib/Algebra/Lie/BaseChange.lean
85
107
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel -/ import Mathlib.Data.ENNReal.Real import Mathlib.Tactic.Bound.Attribute import Mathlib.Topology...
apply le_trans (dist_triangle4 a d e f) apply add_le_add_right (add_le_add_right _ (dist d e)) (dist e f) exact dist_triangle4 a b c d theorem swap_dist : Function.swap (@dist α _) = dist := by funext x y; exact dist_comm _ _ theorem abs_dist_sub_le (x y z : α) : |dist x z - dist y z| ≤ dist x y := abs_sub_le...
Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
216
225
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.NatIso import Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms import Mathlib.CategoryTheory.ObjectProperty.FullSubcategory /-...
end EssSurj variable {J C D : Type*} [Category J] [Category C] [Category D]
Mathlib/CategoryTheory/EssentialImage.lean
169
172
/- Copyright (c) 2021 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies -/ import Mathlib.Data.Finset.Grade import Mathlib.Data.Finset.Sups import Mathlib.Logic.Function.Iterate /-! # Shadows This file defines shad...
aesop /-- `s ∈ ∂ 𝒜` iff `s` is exactly one element less than something from `𝒜`. See also `Finset.mem_shadow_iff_exists_sdiff`. -/
Mathlib/Combinatorics/SetFamily/Shadow.lean
106
110
/- Copyright (c) 2019 Reid Barton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Kim Morrison -/ import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits /-! # Filtered categories A category is filtered if every finite diagram admits a cocone. We give a...
to `s`, making the resulting squares commute. -/ theorem tulip {j₁ j₂ j₃ k₁ k₂ l : C} (f₁ : j₁ ⟶ k₁) (f₂ : j₂ ⟶ k₁) (f₃ : j₂ ⟶ k₂) (f₄ : j₃ ⟶ k₂) (g₁ : j₁ ⟶ l) (g₂ : j₃ ⟶ l) : ∃ (s : C) (α : k₁ ⟶ s) (β : l ⟶ s) (γ : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β := by obtain ⟨l', k₁l, k₂l,...
Mathlib/CategoryTheory/Filtered/Basic.lean
466
472
/- 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 -/ import Mathlib.Data.Finset.Basic import Mathlib.Data.Finset.Image /-! # Cardinality of a finite set This defines the cardinality of a `Fins...
Mathlib/Data/Finset/Card.lean
865
883
/- Copyright (c) 2023 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.Normal....
rw [finSepDegree_eq_of_equiv _ _ _ (botEquiv F E), finSepDegree_self]
Mathlib/FieldTheory/SeparableDegree.lean
179
180
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Andrew Zipperer, Haitao Zhang, Minchao Wu, Yury Kudryashov -/ import Mathlib.Data.Set.Prod import Mathlib.Data.Set.Restrict /-! # Functions over sets This file contains...
hy ▸ ⟨fa x, h x⟩ theorem surjOn_image (h : Semiconj f fa fb) (ha : SurjOn fa s t) : SurjOn fb (f '' s) (f '' t) := by
Mathlib/Data/Set/Function.lean
1,098
1,100
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro -/ import Mathlib.Data.Subtype import Mathlib.Order.Defs.LinearOrder import Mathlib.Order.Notation import Mathlib.Tactic.GCongr.Core import Mathlib.Tactic....
ext x y; exact H x y lemma PartialOrder.ext {A B : PartialOrder α} (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B := by ext x y; exact H x y lemma PartialOrder.ext_lt {A B : PartialOrder α} (H : ∀ x y : α, (haveI := A; x < y) ↔ x < y) : A = B := by ext x y; rw [le_iff_lt_or_eq, @le_iff_lt_or_eq _ A, H...
Mathlib/Order/Basic.lean
612
638
/- 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.Order.SuccPred.Archimedean import Mathlib.Order.BoundedOrder.Lattice /-! # Successor and predecessor limits We define the pre...
simp [h.le_iff_forall_le]
Mathlib/Order/SuccPred/Limit.lean
283
284
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Oliver Nash -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Finset.Union /-! # Finsets in product types This file defines finset constru...
((s ×ˢ t).filter fun x : α × β => p x.1 ∧ q x.2) = s.filter p ×ˢ t.filter q := by ext ⟨a, b⟩ simp [mem_filter, mem_product, decide_eq_true_eq, and_comm, and_left_comm, and_assoc] theorem filter_product_left (p : α → Prop) [DecidablePred p] :
Mathlib/Data/Finset/Prod.lean
147
151
/- Copyright (c) 2019 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, Yury Kudryashov -/ import Mathlib.Algebra.Group.Action.Defs import Mathlib.Algebra.Group.Units.Defs import Mathlib.Algebra.BigOperators.Group.List.Basic import Mathlib.Algebr...
section Mem variable {m : α}
Mathlib/Algebra/FreeMonoid/Basic.lean
199
201
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.Algebra.Order.Pi import Mathlib.MeasureTheory.Constructions.BorelSpace.Order /-! # Simple functions A function `f` from a measurable ...
{g : α → E} (hg : Measurable g) (f : SimpleFunc α E) : Measurable (g + (f : α → E)) := by classical induction f using SimpleFunc.induction with
Mathlib/MeasureTheory/Function/SimpleFunc.lean
1,230
1,233
/- 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 Batteries.WF import Mathlib.Data.Part import Mathlib.Data.Rel import Mathlib.Tactic.GeneralizeProofs /-! # Partial functions This...
-- Porting note: the explicit motive required because `simp` does not apply `Part.get_eq_of_mem` refine Eq.rec (motive := fun x e => Sum.casesOn (motive := fun y => (f a).get (dom_of_mem_fix h) = y → C a) x ?_ ?_ (Eq.trans (Part.get_eq_of_mem fa (dom_of_mem_fix h)) e) = _) ?_ (Part.get_eq_of_mem fa ...
Mathlib/Data/PFun.lean
338
344
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms import Mathlib.MeasureTheory.Measure.Typeclasse...
theorem measure_Ioi_pos [NoMaxOrder X] (a : X) : 0 < μ (Ioi a) := isOpen_Ioi.measure_pos μ nonempty_Ioi theorem measure_Iio_pos [NoMinOrder X] (a : X) : 0 < μ (Iio a) := isOpen_Iio.measure_pos μ nonempty_Iio theorem measure_Ioo_pos [DenselyOrdered X] {a b : X} : 0 < μ (Ioo a b) ↔ a < b :=
Mathlib/MeasureTheory/Measure/OpenPos.lean
156
162
/- 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.Algebra.Group.TypeTags.Finite import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.RingTheory.SimpleMod...
instance [AddGroup G] : IsSemisimpleRing (AddMonoidAlgebra k G) := haveI : NeZero (Fintype.card (Multiplicative G) : k) := by rwa [Fintype.card_congr Multiplicative.toAdd]
Mathlib/RepresentationTheory/Maschke.lean
166
169
/- Copyright (c) 2021 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Ralf Stephan -/ import Mathlib.Data.Nat.Prime.Nth import Mathlib.Data.Nat.Totient import Mathlib.NumberTheory.SmoothNumbers import Mathlib.Order.Filter.AtTopBot.Basic /-...
convert surjective_primeCounting' ext exact primeCounting_sub_one _ open Filter theorem tendsto_primeCounting' : Tendsto π' atTop atTop := by apply tendsto_atTop_atTop_of_monotone' monotone_primeCounting' simp [Set.range_eq_univ.mpr surjective_primeCounting'] theorem tensto_primeCounting : Tendsto π atTop ...
Mathlib/NumberTheory/PrimeCounting.lean
83
102
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Scott Carnahan -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Finset.MulAntidiagonal import Mathlib...
simp only [← of_symm_smul_of_eq_mul] exact HahnModule.smul_add x y z right_distrib := fun x y z => by simp only [← of_symm_smul_of_eq_mul] refine HahnModule.add_smul ?_ simp only [smul_eq_mul] exact add_mul }
Mathlib/RingTheory/HahnSeries/Multiplication.lean
430
436
/- Copyright (c) 2014 Microsoft Corporation. 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.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Cast.Order.Basic import Math...
Mathlib/Data/Num/Lemmas.lean
1,473
1,477
/- 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.AlgebraicTopology.SimplicialObject.Basic import Mathlib.CategoryTheory.Abelian.Basic /-! ## Moore compl...
← Fin.castSucc_zero, ← X.δ_comp_δ (Fin.zero_le (0 : Fin (n + 3))), ← factorThru_arrow _ _ (finset_inf_arrow_factors Finset.univ _ (0 : Fin (n + 3)) (by simp)), Category.assoc, kernelSubobject_arrow_comp_assoc, zero_comp, comp_zero] /-- The normalized Moore complex functor, on objects. -/ @[simp...
Mathlib/AlgebraicTopology/MooreComplex.lean
100
111
/- 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.Countable.Defs import Mathlib.Data.Fin.Basic import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Equiv import Mathlib....
(@decode (α × β) _ n : Option (α × β)) = (decode n.unpair.1).bind fun a => (decode n.unpair.2).map <| Prod.mk a := by simp only [decode_ofEquiv, Equiv.symm_symm, decode_sigma_val] cases (decode n.unpair.1 : Option α) <;> cases (decode n.unpair.2 : Option β) <;> rfl @[simp] theorem encode_prod_val (a b)...
Mathlib/Logic/Encodable/Basic.lean
325
334
/- 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.Polynomial.Module.Basic import Mathlib.RingTheory.Finiteness.Nakayama import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic import Mathlib.RingTheor...
rintro _ ⟨m, hm, rfl⟩ refine Submodule.smul_induction_on hm (fun r hr m' hm' => ?_) (fun x y hx hy => ?_) · rw [add_comm, ← monomial_smul_single] exact F'.smul_mem
Mathlib/RingTheory/Filtration.lean
318
321
/- Copyright (c) 2018 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.RingTheory.Valuation.Basic import Mathlib.NumberTheory.Padics.PadicNorm import Mathlib.Analysis.Normed.Field.Lemmas import Mathlib.Tactic.Peel import...
intro ε hε obtain ⟨ε', hε'⟩ := exists_rat_btwn hε norm_cast at hε' obtain ⟨N, hN⟩ := hq ε' hε'.1 exists N intro i hi have h := hN i hi change norm (f i - q) < ε refine lt_trans ?_ hε'.2 dsimp [norm] exact mod_cast h theorem padicNormE_lim_le {f : CauSeq ℚ_[p] norm} {a : ℝ} (...
Mathlib/NumberTheory/Padics/PadicNumbers.lean
894
909
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Topology.UniformSpace.Cauchy /-! # Uniform convergence A sequence of functions `Fₙ` (with values in a metric space) converges uniformly on a se...
simp only [cauchy_map_iff, hp, true_and] intro u hu rw [mem_map] filter_upwards [hf u hu] with p hp using hp x hx /-- If a sequence of functions is uniformly Cauchy on a set, then the values at each point form
Mathlib/Topology/UniformSpace/UniformConvergence.lean
494
499
/- 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, Sébastien Gouëzel -/ import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathlib.MeasureTheory.Constructions.BorelSpace.Metric import Mathlib.MeasureTheory...
simp only [LinearEquiv.coe_coe, Function.comp_apply, LinearMap.coe_comp, LinearEquiv.symm_apply_apply, hg] simp only [fg, LinearEquiv.coe_coe, LinearMap.coe_comp] have Ce : Continuous e := (e : E →ₗ[ℝ] ι → ℝ).continuous_of_finiteDimensional have Cg : Continuous g := LinearMap.continuous_of_finiteDimensi...
Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean
242
267
/- 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.RingTheory.Ideal.AssociatedPrime.Basic import Mathlib.Tactic.Linter.DeprecatedModule deprecated_module (since := "2025-04-20")
Mathlib/RingTheory/Ideal/AssociatedPrime.lean
118
120
/- 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
156
158
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.Composition.IntegralCompProd import Mathlib.Probability.Kernel.Disintegration.StandardBorel /-! # Lebesgue and Bochner integrals of con...
section Integral variable {ρ : Measure (β × Ω)} [IsFiniteMeasure ρ]
Mathlib/Probability/Kernel/Disintegration/Integral.lean
182
185
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.MeasureTheory.Measure.Decomposition.Exhaustion import Mathlib.Probability.ConditionalProbability /-! # s-fin...
Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
170
177
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Kenny Lau -/ import Mathlib.Data.DFinsupp.Submonoid import Mathlib.Data.Finsupp.ToDFinsupp import Mathlib.LinearAlgebra.Finsupp.SumProd import Mathlib.LinearAlgebra.LinearIn...
@[simps! apply] def mapRange.linearMap (f : ∀ i, β₁ i →ₗ[R] β₂ i) : (Π₀ i, β₁ i) →ₗ[R] Π₀ i, β₂ i := { mapRange.addMonoidHom fun i => (f i).toAddMonoidHom with toFun := mapRange (fun i x => f i x) fun i => (f i).map_zero
Mathlib/LinearAlgebra/DFinsupp.lean
206
209
/- Copyright (c) 2022 Pierre-Alexandre Bazin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Pierre-Alexandre Bazin -/ import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.ZMod import Mathlib.GroupTheory.Torsion import Mathlib.LinearAlgebra.Isomorphism...
ext : 1 exact (torsionBySet_span_singleton_eq _).symm exact fun i hi j hj ij => (Ideal.sup_eq_top_iff_isCoprime _ _).mpr (hq hi hj ij) theorem supIndep_torsionBy (hq : (S : Set ι).Pairwise <| (IsCoprime on q)) : S.SupIndep fun i => torsionBy R M <| q i := by convert supIndep_torsionBySet_ideal (M := M)...
Mathlib/Algebra/Module/Torsion.lean
439
447
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.ChartedSpace /-! # Local properties invariant under a groupoid We study properties of a triple `(g, s, x)` ...
theorem liftProp_of_locally_liftPropOn (h : ∀ x, ∃ u, IsOpen u ∧ x ∈ u ∧ LiftPropOn P g u) : LiftProp P g := by rw [← liftPropOn_univ] refine hG.liftPropOn_of_locally_liftPropOn fun x _ ↦ ?_ simp [h x]
Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
364
369
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne -/ import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Analysis.NormedSpac...
rw [← Finsupp.log_prod, ← Nat.cast_finsuppProd, Nat.factorization_prod_pow_eq_self hn] intro p hp rw [pow_eq_zero (Nat.cast_eq_zero.1 hp), Nat.factorization_zero_right] theorem tendsto_pow_log_div_mul_add_atTop (a b : ℝ) (n : ℕ) (ha : a ≠ 0) : Tendsto (fun x => log x ^ n / (a * x + b)) atTop (𝓝 0) :=
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
385
390
/- 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, Kim Morrison -/ import Mathlib.Algebra.BigOperators.Finsupp.Basic import Mathlib.Algebra.BigOperators.Group.Finset.Preimage import Mathlib.Algebra.Module.Defs import Ma...
simp only [AddMonoidHom.coe_comp, Finsupp.mapRange_single, Finsupp.mapDomain.addMonoidHom_apply, Finsupp.singleAddHom_apply, eq_self_iff_true, Function.comp_apply, Finsupp.mapDomain_single, Finsupp.mapRange.addMonoidHom_apply] /-- When `g` preserves addition, `mapRange` and `mapDomain` commute. -/ theorem ma...
Mathlib/Data/Finsupp/Basic.lean
559
570
/- Copyright (c) 2022 Eric Rodriguez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Rodriguez -/ import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.FieldTheory.PolynomialGaloisGroup /-! # Galois group of cyclotomic extensions In this file, we ...
apply_fun Units.val at hfg simp only [IsPrimitiveRoot.coe_autToPow_apply] at hfg generalize_proofs hn₀ hf' hg' at hfg have hf := hf'.choose_spec have hg := hg'.choose_spec generalize_proofs hζ at hf hg suffices f (hμ.toRootsOfUnity : Lˣ) = g (hμ.toRootsOfUnity : Lˣ) by apply AlgEquiv.coe_algHom_inject...
Mathlib/NumberTheory/Cyclotomic/Gal.lean
55
76
/- 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.GammaCompN import Mathlib.AlgebraicTopology.DoldKan.NReflectsIso /-! The unit isomorphism of the Dold-Kan equivalence In order to con...
PInfty.f n ≫ X.map i.op = 0 := by induction' Δ' using SimplexCategory.rec with m obtain ⟨k, hk⟩ := Nat.exists_eq_add_of_lt (len_lt_of_mono i fun h => by rw [← h] at h₁ exact h₁ rfl) simp only [len_mk] at hk rcases k with _|k · change n = m + 1 at hk subst hk obtain ⟨j, rfl⟩ := eq_δ...
Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean
38
78
/- 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
1,410
1,422
/- 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.OuterMeasure.Operations import Mathlib.Analysis.SpecificLimits.Basic /-! # Outer measures from functions Given an arbit...
@[simp] theorem boundedBy_eq_self (m : OuterMeasure α) : boundedBy m = m := ext fun _ => boundedBy_eq _ measure_empty (fun _ ht => measure_mono ht) measure_iUnion_le
Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
270
272
/- 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.MeasureSpace import Mathlib.MeasureTheory.Measure.Regular import Mathlib.Topology.Sets.Compacts /-! # Contents In this file...
Mathlib/MeasureTheory/Measure/Content.lean
438
448
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.MeasureTheory.Measure.Decomposition.Exhaustion import Mathlib.Probability.ConditionalProbability /-! # s-fin...
Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
212
221
/- 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.Trigonometric.Basic import Mathlib.Topology.Order.ProjIcc /-!...
theorem arccos_neg (x : ℝ) : arccos (-x) = π - arccos x := by rw [← add_halves π, arccos, arcsin_neg, arccos, add_sub_assoc, sub_sub_self, sub_neg_eq_add]
Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
353
354
/- 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.ComplexShape import Mathlib.Algebra.Ring.NegOnePow import Mathlib.CategoryTheory.GradedObject.Trifunctor /-! Signs in constructions on homologi...
TensorSigns.ε'_succ p q hpq
Mathlib/Algebra/Homology/ComplexShapeSigns.lean
138
139
/- 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.SimplicialObject.Split import Mathlib.AlgebraicTopology.DoldKan.Degeneracies import Mathlib.AlgebraicTopology.DoldKan.FunctorN /-! # Split si...
cofan_inj_πSummand_eq_zero] rw [ne_comm] change ¬(A.epiComp (SimplexCategory.σ i).op).EqId rw [IndexSet.eqId_iff_len_eq] have h := SimplexCategory.len_le_of_epi (inferInstance : Epi A.e) dsimp at h ⊢ omega /-- If a simplicial object `X` in an additive category is split, then `PInfty` vanishes on all th...
Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean
73
85
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Algebra.Order.Nonneg.Field import Mathlib.Data.Rat.Cast.Defs import Mathlib.Tactic.Positivity.Basic /-! # Some exiled lemmas about cas...
theorem cast_zpow_of_ne_zero {K} [DivisionSemiring K] (q : ℚ≥0) (z : ℤ) (hq : (q.num : K) ≠ 0) : NNRat.cast (q ^ z) = (NNRat.cast q : K) ^ z := by obtain ⟨n, rfl | rfl⟩ := z.eq_nat_or_neg · simp · simp_rw [zpow_neg, zpow_natCast, ← inv_pow, NNRat.cast_pow] congr rw [cast_inv_of_ne_zero hq]
Mathlib/Data/Rat/Cast/Lemmas.lean
69
75
/- Copyright (c) 2020 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth, Yury Kudryashov, Frédéric Dupuis -/ import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Module.Equiv /-! # Infinite sums in top...
protected theorem ContinuousLinearEquiv.summable {f : ι → M} (e : M ≃SL[σ] M₂) : (Summable fun b : ι ↦ e (f b)) ↔ Summable f := ⟨fun hf ↦ (e.hasSum.1 hf.hasSum).summable, (e : M →SL[σ] M₂).summable⟩
Mathlib/Topology/Algebra/InfiniteSum/Module.lean
150
153
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.ContMDiff.Constructions import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod /-! ## Equivalence of smoothne...
theorem ContDiffWithinAt.comp_contMDiffWithinAt {g : F → F'} {f : M → F} {s : Set M} {t : Set F} {x : M} (hg : ContDiffWithinAt 𝕜 n g t (f x)) (hf : ContMDiffWithinAt I 𝓘(𝕜, F) n f s x)
Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
63
65
/- 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 mul_rotate' (a b c : G) : a * (b * c) = b * (c * a) := by
Mathlib/Algebra/Group/Basic.lean
128
130
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov, Kexing Ying -/ import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lat...
refine ⟨fun b ↦ ⨆ i, (hf i).mk (f i) b, .iSup (fun i ↦ (hf i).measurable_mk), ?_⟩ filter_upwards [ae_all_iff.2 (fun i ↦ (hf i).ae_eq_mk)] with b hb using by simp [hb] @[measurability, fun_prop] protected theorem Measurable.iInf {ι} [Countable ι] {f : ι → δ → α} (hf : ∀ i, Measurable (f i)) : Measurable fun b =...
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
782
787
/- 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...
have b_ne_zero : b ≠ 0 := by linarith have b_ne_minus_one : b ≠ -1 := by linarith
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
119
120
/- 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.Complex import Qq /-! # P...
on_goal 1 => refine rpow_le_rpow ?_ hxy (neg_nonneg.2 hz) all_goals positivity theorem rpow_lt_rpow_iff (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z < y ^ z ↔ x < y := ⟨lt_imp_lt_of_le_imp_le fun h => rpow_le_rpow hy h (le_of_lt hz), fun h => rpow_lt_rpow hx h hz⟩
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
543
548
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yakov Pechersky -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix import Mathlib.Data.Quot /-! # List rotation This file proves basic results about `List.r...
@[simp] theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l := by rw [head?_eq_head, head_cyclicPermutations]
Mathlib/Data/List/Rotate.lean
537
541
/- 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.Primrec import Mathlib.Data.Nat.PSub import Mathlib.Data.PFun /-! # The partial recursive functions The partial recursive functions are...
hf namespace Computable
Mathlib/Computability/Partrec.lean
257
260
/- 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...
Mathlib/Data/List/Basic.lean
1,826
1,832
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.CategoryTheory.Functor.ReflectsIso.Basic /-! # Half braidings and the Drinfeld center of a monoidal c...
instance : (forget C).ReflectsIsomorphisms where reflects f i := by dsimp at i; change IsIso (isoMk f).hom; infer_instance
Mathlib/CategoryTheory/Monoidal/Center.lean
323
325
/- Copyright (c) 2014 Microsoft Corporation. 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.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Cast.Order.Basic import Math...
add_comm := by transfer instance commMonoid : CommMonoid PosNum where mul := (· * ·) one := (1 : PosNum) npow := @npowRec PosNum ⟨1⟩ ⟨(· * ·)⟩ mul_assoc := by transfer one_mul := by transfer mul_one := by transfer mul_comm := by transfer
Mathlib/Data/Num/Lemmas.lean
526
536
/- Copyright (c) 2022 Antoine Labelle, Rémi Bottinelli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Labelle, Rémi Bottinelli -/ import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path /-! # Rewriting arrows and paths along vertex...
e.cast hu hv = e' ↔ HEq e e' := by rw [Hom.cast_eq_cast] exact _root_.cast_eq_iff_heq
Mathlib/Combinatorics/Quiver/Cast.lean
57
60
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, Patrick Massot, Yury Kudryashov -/ import Mathlib.Algebra.Group.Equiv.Defs import Mathlib.Algebra.Group.Hom.Basic import Mathlib.Algebra.Group.Opposite import Mathlib.Alg...
f.comp (fst M N) * g.comp (snd M N) @[to_additive (attr := simp)]
Mathlib/Algebra/Group/Prod.lean
447
449
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.C...
refine ⟨x.denom * y.denom, mul_ne_zero (denom_ne_zero x) (denom_ne_zero y), ?_⟩ rw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, num_div_denom, num_div_denom] theorem denom_mul_dvd (x y : RatFunc K) : denom (x * y) ∣ denom x * denom y := by
Mathlib/FieldTheory/RatFunc/Basic.lean
956
959
/- Copyright (c) 2023 Xavier Généreux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Généreux -/ import Mathlib.Analysis.SpecialFunctions.Pow.Deriv import Mathlib.Analysis.Complex.PhragmenLindelof /-! # Hadamard three-lines Theorem In this file we present a ...
· intro h obtain ⟨z, hz₁, hz₂⟩ := h use ↑l + z * (↑u - ↑l) simp [hz₁, hz₂] · intro h obtain ⟨z, hz₁, hz₂⟩ := h use ((z - l) / (u - l)) constructor · norm_cast rw [Complex.div_re, Complex.normSq_ofReal, Complex.ofReal_re] simp[hz₁] · rw [div_mul_com...
Mathlib/Analysis/Complex/Hadamard.lean
370
416
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl, Sander Dahmen, Kim Morrison, Chris Hughes, Anne Baanen, Junyan Xu -/ import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.LinearAlgebra.Dimensi...
⇑(basisOfTopLeSpanOfCardEqFinrank b le_span card_eq) = b := Basis.coe_mk _ _
Mathlib/LinearAlgebra/Dimension/DivisionRing.lean
196
198
/- Copyright (c) 2021 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Data.ENat.Lattice import Mathlib.Data.Nat.Lattice import Mathlib.Data.Setoid.Partition imp...
theorem chromaticNumber [Fintype ι] (f : ∀ (i : ι), V i) : (completeMultipartiteGraph V).chromaticNumber = Fintype.card ι := by apply le_antisymm (colorable V).chromaticNumber_le by_contra! h exact not_cliqueFree_of_le_card V f le_rfl <| cliqueFree_of_chromaticNumber_lt h theorem colorable_of_cliqueFree (f :...
Mathlib/Combinatorics/SimpleGraph/Coloring.lean
467
473