Context
stringlengths
227
76.5k
target
stringlengths
0
11.6k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
16
3.69k
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Localization.AtPrime import Mathlib.RingTheory.Localization.Basic import Mathlib.RingT...
intro x hx rw [mem_nonZeroDivisors_iff_ne_zero] intro hx' apply @zero_ne_one S rw [← (algebraMap R S).map_one, ← @mk'_one R _ M, @comm _ Eq, mk'_eq_zero_iff] exact ⟨⟨x, hx⟩, by simp [hx']⟩ instance {R : Type*} [CommRing R] [IsDomain R] (p : Ideal R) [p.IsPrime] : IsFractionRing (Localization.AtPrime p)...
Mathlib/RingTheory/Localization/LocalizationLocalization.lean
281
292
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Bhavik Mehta, Yaël Dillies -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Hull import Mathlib.Analysis.Normed.Module.Basic import Mathlib.Topology.Bornology.A...
theorem Balanced.sub (hs : Balanced 𝕜 s) (ht : Balanced 𝕜 t) : Balanced 𝕜 (s - t) := by simp_rw [sub_eq_add_neg]
Mathlib/Analysis/LocallyConvex/Basic.lean
138
140
/- 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.Order.Bounds.Defs import Mathlib.Order.Directed import Mathlib.Order.BoundedOrder.Monotone import Mathlib.Order.Interval.Set.Basic /-...
theorem isLeast_Ici : IsLeast (Ici a) a := ⟨left_mem_Ici, fun _ => id⟩
Mathlib/Order/Bounds/Basic.lean
392
394
/- Copyright (c) 2019 Jan-David Salchow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo -/ import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm import Mathlib.Ana...
Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean
387
435
/- 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.Order.Bounds.Image import Mathlib.Order.Hom.Set /-! # Order isomorphisms and bounds. -/ open Set namespace OrderIso variable {α β ...
theorem isGLB_preimage' {s : Set β} {x : β} : IsGLB (f ⁻¹' s) (f.symm x) ↔ IsGLB s x :=
Mathlib/Order/Bounds/OrderIso.lean
53
54
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.Cast.Order.Basic import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Order.Nat import Mathli...
rw [← Ico_bot, image_cast_int_Ico]; rfl
Mathlib/Data/Nat/Cast/SetInterval.lean
43
44
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.BigOperators.Expect import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical import Mathlib.Algebra.O...
Mathlib/Data/NNReal/Basic.lean
540
541
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Patrick Stevens -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.BigOperators.Ring.Finset import ...
lemma sum_range_add_choose (n k : ℕ) : ∑ i ∈ Finset.range (n + 1), (i + k).choose k = (n + k + 1).choose (k + 1) := by rw [← sum_Icc_choose, range_eq_Ico] convert (sum_map _ (addRightEmbedding k) (·.choose k)).symm using 2 rw [map_add_right_Ico, zero_add, add_right_comm, Nat.Ico_succ_right] end Nat
Mathlib/Data/Nat/Choose/Sum.lean
143
150
/- 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...
· show (Iic i).inf (p ∘ f) ↔ _ simp [Finset.inf_eq_iInf] · intro x y rw [hp]
Mathlib/Order/PartialSups.lean
63
66
/- 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, Jeremy Avigad -/ import Mathlib.Data.Set.Finite.Basic import Mathlib.Data.Set.Finite.Range import Mathlib.Data.Set.Lattice import Mathlib.Topology.Defs....
Mathlib/Topology/Basic.lean
1,136
1,138
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.CategoryTheory.GlueData import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Topology.Category.TopCat.Opens import Mathlib.Tactic.Generali...
Mathlib/Topology/Gluing.lean
534
545
/- 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.Real /-! # Properties of addition, multiplication and subtraction on extended non-negative real numbers In this file we...
/-- This is a special case of `WithTop.sub_top` in the `ENNReal` namespace -/ theorem sub_top : a - ∞ = 0 := WithTop.sub_top @[simp] theorem sub_eq_top_iff : a - b = ∞ ↔ a = ∞ ∧ b ≠ ∞ := WithTop.sub_eq_top_iff lemma sub_ne_top_iff : a - b ≠ ∞ ↔ a ≠ ∞ ∨ b = ∞ := WithTop.sub_ne_top_iff -- This is unsafe because we coul...
Mathlib/Data/ENNReal/Operations.lean
300
306
/- 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, Floris van Doorn -/ import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset import Mathlib.Dat...
Mathlib/SetTheory/Cardinal/Basic.lean
2,160
2,165
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Manuel Candales -/ import Mathlib.Analysis.InnerProductSpace.Subspace import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse /-! # Angles between vectors This fil...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
371
374
/- 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.Topology.MetricSpace.Lipschitz import Mathlib.Analysis.SpecialFunctions.Pow.Continuity /-! # Hölder continuous functions In this file we define Höl...
theorem dist_le (hf : HolderOnWith C r f s) (hx : x ∈ s) (hy : y ∈ s) : dist (f x) (f y) ≤ C * dist x y ^ (r : ℝ) := hf.dist_le_of_le hx hy le_rfl end HolderOnWith
Mathlib/Topology/MetricSpace/Holder.lean
237
242
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Data.ULift import Mathlib.Data.ZMod.Defs import Mathlib.SetTheory.Cardinal.ToNat import Mathlib.SetTheory.Cardinal.ENat /-! # Finite Cardinality Funct...
@[simp] lemma card_eq_top : card α = ⊤ ↔ Infinite α := by simp [card, aleph0_le_mk_iff] @[simp] theorem card_lt_top_of_finite [Finite α] : card α < ⊤ := by simp [card]
Mathlib/SetTheory/Cardinal/Finite.lean
279
281
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Path import Mathlib.Data.Fintype.Order import Mathlib.SetTheory.Cardinal.Finite import Mathlib.Tactic.Linarith /-! # Acyclic grap...
choose f hf hf' using (hG.existsUnique_path · default) refine Eq.symm <| Finset.card_bij (fun w hw => ((f w).firstDart <| ?notNil).edge) (fun a ha => ?memEdges) ?inj ?surj case notNil => exact not_nil_of_ne (by simpa using hw) case memEdges => simp case inj => intros a ha b hb h wl...
Mathlib/Combinatorics/SimpleGraph/Acyclic.lean
160
207
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
Mathlib/Data/Set/Lattice.lean
1,922
1,923
/- Copyright (c) 2022 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Riccardo Brasca, Eric Rodriguez -/ import Mathlib.Data.PNat.Prime import Mathlib.NumberTheory.Cyclotomic.Basic import Mathlib.RingTheory.Adjoin.PowerBasis import Mathlib...
replace hζ : IsPrimitiveRoot ζ (2 ^ k : ℕ+) := by simp [hζ] obtain ⟨k₁, hk₁⟩ := exists_eq_succ_of_ne_zero (lt_of_lt_of_le zero_lt_two hk).ne.symm simpa [hk₁, show ((2 : ℕ+) : ℕ) = 2 from rfl] using sub_one_norm_eq_eval_cyclotomic hζ this hirr /-- If `Irreducible (cyclotomic (p ^ (k + 1)) K)` (in particular for `...
Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
504
519
/- 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.BigOperators.Group.Finset.Piecewise import Mathlib.Algebra.Group.Ext import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Ma...
(i : IsColimit c) : BinaryBicone X c.pt where pt := Y
Mathlib/CategoryTheory/Preadditive/Biproducts.lean
475
476
/- Copyright (c) 2022 Kevin H. Wilson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin H. Wilson -/ import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.NormedSpace.RCLike import Mathlib.Order.Filter.Curry /-! # Swapping limits and derivatives via u...
Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
555
563
/- Copyright (c) 2021 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.MeasureTheory.Measure.FiniteMeasure import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Measure.Prod /-! # Probability measures Th...
(mass_lim : Tendsto (fun i ↦ (μs i).mass) F (𝓝 μ.mass)) : Tendsto μs F (𝓝 μ) := by rw [tendsto_iff_forall_testAgainstNN_tendsto] exact fun f ↦ tendsto_testAgainstNN_of_tendsto_normalize_testAgainstNN_of_tendsto_mass μs_lim mass_lim f /-- If finite measures themselves converge weakly to a nonzero limit me...
Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
498
503
/- 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.MeasureTheory.Measure.AEMeasurable /-! # Typeclasses for measurability of operations In this file we define classes `MeasurableMul` etc and prove d...
@[to_additive] instance Pi.measurableInv {ι : Type*} {α : ι → Type*} [∀ i, Inv (α i)] [∀ i, MeasurableSpace (α i)] [∀ i, MeasurableInv (α i)] : MeasurableInv (∀ i, α i) := ⟨measurable_pi_iff.mpr fun i => (measurable_pi_apply i).inv⟩ @[to_additive] theorem MeasurableSet.inv {s : Set G} (hs : MeasurableSet s) : Me...
Mathlib/MeasureTheory/Group/Arithmetic.lean
407
416
/- Copyright (c) 2024 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll -/ import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Topology.ContinuousMap.CocompactMap import Mathlib.Topology.MetricSpace.Bounded /-! # Cocompact maps in normed g...
theorem CocompactMapClass.norm_le [ProperSpace F] [FunLike 𝓕 E F] [CocompactMapClass 𝓕 E F] (ε : ℝ) : ∃ r : ℝ, ∀ x : E, r < ‖x‖ → ε < ‖f x‖ := by have h := cocompact_tendsto f rw [tendsto_def] at h specialize h (Metric.closedBall 0 ε)ᶜ (mem_cocompact_of_closedBall_compl_subset 0 ⟨ε, rfl.subset⟩) rcases cl...
Mathlib/Analysis/Normed/Group/CocompactMap.lean
30
40
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Chris Hughes, Mario Carneiro -/ import Mathlib.Algebra.Field.IsField import Mathlib.Data.Fin.VecNotation import Mathlib.Data.Nat.Choose.Sum import Mathlib.LinearAlgebra.Finsupp.L...
I.add_pow_add_pred_mem_of_pow_mem_of_commute ha hb (Commute.all ..) theorem pow_multiset_sum_mem_span_pow [DecidableEq α] (s : Multiset α) (n : ℕ) : s.sum ^ (Multiset.card s * n + 1) ∈ span ((s.map fun (x : α) ↦ x ^ (n + 1)).toFinset : Set α) := by
Mathlib/RingTheory/Ideal/Basic.lean
107
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, Patrick Massot -/ import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Order.Filter.Bases.Finit...
Mathlib/Topology/Algebra/Group/Basic.lean
1,772
1,779
/- Copyright (c) 2024 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker, Devon Tuma, Kexing Ying -/ import Mathlib.Probability.Notation import Mathlib.Probability.Density import Mathlib.Probability.ConditionalProbability import Mathlib.Probabili...
simp_rw [div_eq_mul_inv, ← ENNReal.tsum_mul_right, toOuterMeasure_apply] refine tsum_congr fun x => ?_
Mathlib/Probability/Distributions/Uniform.lean
371
372
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Logic.Encodable.Lattice import Mathlib.Order.Filter.AtTopBot.Finset import Mathlib.Topology.Algebra.InfiniteSum.Group /-! # Infinite sums and product...
section IsUniformGroup variable [UniformSpace G] [IsUniformGroup G] @[to_additive] theorem cauchySeq_finset_iff_nat_tprod_vanishing {f : ℕ → G} : (CauchySeq fun s : Finset ℕ ↦ ∏ n ∈ s, f n) ↔ ∀ e ∈ 𝓝 (1 : G), ∃ N : ℕ, ∀ t ⊆ {n | N ≤ n}, (∏' n : t, f n) ∈ e := by refine cauchySeq_finset_iff_tprod_vanishi...
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
273
285
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Mario Carneiro, Sean Leather -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Finset.Union /-! # Finite sets in `Option α` In this file we define * `Option.t...
theorem some_mem_insertNone {s : Finset α} {a : α} : some a ∈ insertNone s ↔ a ∈ s := by simp lemma none_mem_insertNone {s : Finset α} : none ∈ insertNone s := by simp
Mathlib/Data/Finset/Option.lean
70
72
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Yaël Dillies -/ import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs /-! # Intervals as finsets This file provides basic results about all the `Finset.Ixx...
variable [DistribLattice α] [LocallyFiniteOrder α] {a b c : α}
Mathlib/Order/Interval/Finset/Basic.lean
1,015
1,016
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.Group.Support import Mathlib.Algebra.Order.Monoid.Unbundled.WithTop import Mathlib.Order.WellFoundedSet /-! # Hahn Series If `Γ` is ordered an...
{g : Γ} (h : x.coeff g ≠ 0) : x.orderTop ≤ g := by rw [orderTop_of_ne (ne_zero_of_coeff_ne_zero h), WithTop.coe_le_coe] exact Set.IsWF.min_le _ _ ((mem_support _ _).2 h) @[simp] theorem orderTop_single (h : r ≠ 0) : (single a r).orderTop = a := (orderTop_of_ne (single_ne_zero h)).trans (WithTop.coe_inj.m...
Mathlib/RingTheory/HahnSeries/Basic.lean
283
290
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.Probability.Martingale.Upcrossing /-! # Mar...
theorem Submartingale.exists_ae_tendsto_of_bdd [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ) (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) : ∀ᵐ ω ∂μ, ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c) := by filter_upwards [hf.upcrossings_ae_lt_top hbdd, ae_bdd_liminf_atTop_of_eLpNorm_bdd one_ne_zero (fun n => (hf.stronglyMeas...
Mathlib/Probability/Martingale/Convergence.lean
186
190
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.Exact import Mathlib.CategoryTheory.ComposableArrows /-! # Exact sequences A sequence of `n` composable arrows `S : ComposableArr...
S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where hom := sc'Map e.hom h₁ h₂ i j k inv := sc'Map e.inv h₂ h₁ i j k hom_inv_id := by ext <;> dsimp <;> simp
Mathlib/Algebra/Homology/ExactSequence.lean
159
162
/- 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.Data.Set.SymmDiff import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Irreducible /-! # Connected subsets ...
Mathlib/Topology/Connected/Basic.lean
1,013
1,023
/- Copyright (c) 2020 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype import Mathlib.Comp...
/-- Continuations as in `ToPartrec.Cont` but with the data removed. This is done because we want
Mathlib/Computability/TMToPartrec.lean
174
174
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, María Inés de Frutos-Fernández, Filippo A. E. Nuccio -/ import Mathlib.FieldTheory.RatFunc.Basic import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.DedekindD...
/-- `eval` is an additive homomorphism except when a denominator evaluates to `0`.
Mathlib/FieldTheory/RatFunc/AsPolynomial.lean
135
135
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Yury Kudryashov -/ import Mathlib.Data.Option.Basic import Mathlib.Topology.Separation.Regular /-! # Paracompact topological spaces A topological space `X` is said to b...
-- For technical reasons we prepend two empty sets to the sequence `CompactExhaustion.choice X` set K' : CompactExhaustion X := CompactExhaustion.choice X set K : CompactExhaustion X := K'.shiftr.shiftr set Kdiff := fun n ↦ K (n + 1) \ interior (K n) -- Now we restate some properties of `CompactExha...
Mathlib/Topology/Compactness/Paracompact.lean
196
244
/- 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...
p := π c₂ c₃ c₂₃ q := π c₁ c₂₃ c hpq := fun ⟨i₁, i₂, i₃⟩ ↦ (assoc c₁ c₂ c₃ c₁₂ c₂₃ c i₁ i₂ i₃).symm
Mathlib/Algebra/Homology/ComplexShapeSigns.lean
254
256
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Topology.ContinuousMap.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.Sh...
/-- The tsupport of a partition of unity at a point `x₀` as a `Finset`. This is the set of `i : ι` such that `x₀ ∈ tsupport f i`. -/ def fintsupport (x₀ : X) : Finset ι := (ρ.finite_tsupport x₀).toFinset
Mathlib/Topology/PartitionOfUnity.lean
229
234
/- 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.BigOperators.Ring.Finset import Mathlib.Combinatorics.SimpleGraph.Density import Mathlib.Data.Nat.Cast.Order.Field impo...
rw [nonuniformWitnesses, dif_pos h] exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.2.1 theorem nonuniformWitnesses_spec (h : ¬G.IsUniform ε s t) :
Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
142
145
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl -/ import Mathlib.Algebra.Order.Group.Unbundled.Basic import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Or...
Mathlib/Algebra/Order/Group/Defs.lean
721
722
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Fintype.Basic /-! # Cardinalities of finite types This file defines the cardinality `Fintype.card α` as the numb...
namespace Finite
Mathlib/Data/Fintype/Card.lean
296
298
/- 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.Algebra.Bilinear import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Group.Pointwise.Finset.Basic import Mathlib.Algebra.Group.Pointwise.Set.B...
map_zero' := span_empty map_one' := one_eq_span.symm map_add' := span_union map_mul' s t := by simp_rw [SetSemiring.down_mul, span_mul_span]
Mathlib/Algebra/Algebra/Operations.lean
689
693
/- 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.Pi.Lemmas import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Topology.Algebra.Monoid /-! # Topological group with zero I...
variable {X : Type*} [TopologicalSpace X] {a : X} {s : Set X} {f : X → G₀} @[fun_prop] nonrec theorem ContinuousAt.zpow₀ (hf : ContinuousAt f a) (m : ℤ) (h : f a ≠ 0 ∨ 0 ≤ m) : ContinuousAt (fun x => f x ^ m) a := hf.zpow₀ m h
Mathlib/Topology/Algebra/GroupWithZero.lean
328
334
/- Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.SetTheory.Ordinal.Enum import Mathlib.Tactic.TFAE import Mathlib.Topology.Order.Monotone /-! ### Topology of ordinals We prov...
apply ((mem_closure_tfae a s).out 0 5).trans simp_rw [exists_prop] theorem mem_iff_iSup_of_isClosed (hs : IsClosed s) :
Mathlib/SetTheory/Ordinal/Topology.lean
132
135
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.Convex.Deriv /-! # The function `x ↦ ...
by_cases hx : x = 0 · rw [hx, inv_zero] exact deriv_zero_of_not_differentiableAt (fun h ↦ not_continuousAt_deriv_mul_log_zero h.continuousAt)
Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
113
116
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible impo...
(div_sub_div_same _ _ _).symm /-- See `inv_sub_inv` for the more convenient version when `K` is commutative. -/ theorem inv_sub_inv' {a b : K} (ha : a ≠ 0) (hb : b ≠ 0) : a⁻¹ - b⁻¹ = a⁻¹ * (b - a) * b⁻¹ := let _ := invertibleOfNonzero ha; let _ := invertibleOfNonzero hb; invOf_sub_invOf a b
Mathlib/Algebra/Field/Basic.lean
109
114
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.BoxIntegral.Partition.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Analysis.Oscillation import Mathlib.Data.B...
open MeasureTheory
Mathlib/Analysis/BoxIntegral/Basic.lean
328
329
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Vladimir Goryachev, Kyle Miller, Kim Morrison, Eric Rodriguez -/ import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.SuccPred import M...
· exact nth_mem a h' · simp only [not_forall, not_lt] at h' have h'b : ∃ hf : (setOf p).Finite, #hf.toFinset ≤ b := by rcases h' with ⟨hf, ha⟩ exact ⟨hf, ha.trans hab⟩ have ha0 : nth p a = 0 := by simp [nth_eq_zero, h'] have hb0 : nth p b = 0 := by simp [nth_eq_zero, h'b]
Mathlib/Data/Nat/Nth.lean
269
275
/- Copyright (c) 2014 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ord...
| .positive pa, .positive pb => pure (.positive q(div_pos $pa $pb)) | .positive pa, .nonnegative pb => pure (.nonnegative q(div_nonneg_of_pos_of_nonneg $pa $pb))
Mathlib/Algebra/Order/Field/Basic.lean
712
713
/- 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
444
446
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Yury Kudryashov -/ import Mathlib.Logic.Function.Basic import Mathlib.Tactic.MkIffOfInductiveProp /-! # Additional lemmas about sum types Most of the former contents ...
variable {r : α → γ → Prop} {s : β → δ → Prop} {x : α ⊕ β} {y : γ ⊕ δ} {a : α} {b : β} {c : γ} {d : δ}
Mathlib/Data/Sum/Basic.lean
166
168
/- 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.Ring.Defs import Mathlib.Algebra.Order.Ring.Unbundled.Rat /-! # The rational numbers form a linear ordered field This f...
Mathlib/Algebra/Order/Ring/Rat.lean
50
59
/- 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...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
897
898
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace /-! # Open immersions of structured spaces We say that a m...
(Set.image_preimage_eq_inter_range (f := f.base) (t := U.1)).symm ▸ Set.subset_inter_iff.mpr ⟨fun _ h => h, hU⟩).op := PresheafedSpace.IsOpenImmersion.app_invApp f U instance ofRestrict {X : TopCat} (Y : SheafedSpace C) {f : X ⟶ Y.carrier} (hf : IsOpenEmbedding f) : IsOpenImmersion ...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
809
822
/- Copyright (c) 2021 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.Seminorm import Mathlib.Analysis...
gauge s x < ε := by have : ε⁻¹ • x ∈ s := by rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne'] have h_gauge_lt := gauge_lt_one_of_mem_of_isOpen hs₂ this
Mathlib/Analysis/Convex/Gauge.lean
366
368
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Mathlib/Data/Matrix/Basic.lean
814
814
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Logic.Relator import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw import Mathlib.Logic.Basic import Mathl...
P h := by induction h with | single h => exact base h | tail hab hbc h_ih => exact ih hab (single hbc) h_ih (base hbc) theorem trans_right (hab : ReflTransGen r a b) (hbc : TransGen r b c) : TransGen r a c := by induction hbc with | single hbc => exact tail' hab hbc | tail _ hcd hac => exact hac.tail h...
Mathlib/Logic/Relation.lean
415
423
/- 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...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
932
933
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Group.Subgroup.Ker import Mathlib.Algebra.Module.Submodule....
/-! ### Linear equivalences -/
Mathlib/Algebra/Module/Submodule/Ker.lean
275
276
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Combinatorics.SimpleGraph.Path import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise import M...
simp only [isNClique_iff, card_eq_one, and_iff_right_iff_imp]; rintro ⟨a, rfl⟩; simp
Mathlib/Combinatorics/SimpleGraph/Clique.lean
240
241
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic /-! # Multivariate quotients of polynomial functors. Basic definition of multivariate QPF. QPFs form a co...
rw [liftP_iff] refine ⟨a, f, haf.symm, ?_⟩ intro i u exact mem_image_of_mem _ (mem_univ _) exact h this intro h p; rw [liftP_iff] rintro ⟨a, f, xeq, h'⟩ rcases h a f xeq.symm with ⟨i, _, hi⟩ rw [← hi]; apply h' theorem supp_eq {α : TypeVec n} {i} (x : F α) : supp x i = { u | ∀ a...
Mathlib/Data/QPF/Multivariate/Basic.lean
160
173
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Heather Macbeth -/ import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic /-! # Rotations by oriented angles. This...
theorem oangle_rotation_self_left {x : V} (hx : x ≠ 0) (θ : Real.Angle) : o.oangle (o.rotation θ x) x = -θ := by simp [hx] /-- A vector has an angle of `θ` from the rotation of that vector by `θ`. -/ @[simp]
Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
217
221
/- 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.Algebra.BigOperators.Group.Finset.Powerset import Mathlib.Algebra.NoZeroSMulDivisors.Pi import Mathlib.Data.Finset.Sort import Mathlib.Data.Finty...
/-- When `ι` is finite, multilinear maps on `R^ι` with values in `M₂` are in bijection with `M₂`, as such a multilinear map is completely determined by its value on the constant vector made of ones. We register this bijection as a linear equivalence in `MultilinearMap.piRingEquiv`. -/ protected def piRingEquiv [Fintyp...
Mathlib/LinearAlgebra/Multilinear/Basic.lean
1,351
1,370
/- Copyright (c) 2022 Jakob von Raumer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jakob von Raumer, Kevin Klinge, Andrew Yang -/ import Mathlib.Algebra.Group.Submonoid.DistribMulAction import Mathlib.GroupTheory.OreLocalization.Basic import Mathlib.Algebra.GroupWi...
Mathlib/RingTheory/OreLocalization/Basic.lean
550
551
/- 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...
simp only [LinearMap.prodMap_apply, LinearMap.id_coe, id, LinearMap.neg_apply, Prod.mk_inj] at h rw [mem_graph_iff] at hx' ⊢ rcases hx' with ⟨y, hy, hx'⟩ use y rw [← h.1, ← h.2] simp [hy, hx']
Mathlib/LinearAlgebra/LinearPMap.lean
744
750
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Sébastien Gouëzel, Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.Normed.Lp.PiLp import Mathlib.LinearAlgebra.FiniteDimensi...
‖EuclideanSpace.single i (a : 𝕜)‖₊ = ‖a‖₊ := PiLp.nnnorm_equiv_symm_single 2 (fun _ => 𝕜) i a
Mathlib/Analysis/InnerProductSpace/PiL2.lean
282
283
/- 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, Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Dia...
· rw [Measure.restrict_prod_eq_prod_univ] exact (Measure.restrict_eq_self _ (regionBetween_subset f g s)).symm · rw [Measure.restrict_prod_eq_prod_univ] exact (Measure.restrict_eq_self _ (regionBetween_subset (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)).symm /-- The region between two ...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
533
557
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Wrenna Robson -/ import Mathlib.Algebra.BigOperators.Group.Finset.Pi import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingT...
map_smul' c f := funext <| by simp invFun r := ⟨interpolate s v fun x => if hx : x ∈ s then r ⟨x, hx⟩ else 0, mem_degreeLT.2 <| degree_interpolate_lt _ hvs⟩
Mathlib/LinearAlgebra/Lagrange.lean
376
379
/- 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, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real /-! # Properties of pointwise scalar multiplication of se...
variable [NormedField 𝕜]
Mathlib/Analysis/NormedSpace/Pointwise.lean
69
72
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Johan Commelin, Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Finsupp.Fin import Mathlib.Algebra.MvPolynomial.Degrees import Mathlib.Algebra.MvPolynomial.Rename...
coeff n f := by induction' f using MvPolynomial.induction_on' with j r p q hp hq generalizing n
Mathlib/Algebra/MvPolynomial/Equiv.lean
377
378
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Module.NatInt import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.FreeGroup.Basic /-! # Free abelian groups The free abelian group on ...
protected theorem unique (g : FreeAbelianGroup α →+ β) (hg : ∀ x, g (of x) = f x) {x} : g x = lift f x := DFunLike.congr_fun (lift.symm_apply_eq.mp (funext hg : g ∘ of = f)) _ /-- See note [partially-applied ext lemmas]. -/ @[ext high] protected theorem ext (g h : FreeAbelianGroup α →+ β) (H : ∀ x, g (of x) = h ...
Mathlib/GroupTheory/FreeAbelianGroup.lean
129
135
/- Copyright (c) 2024 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir -/ import Mathlib.Algebra.Pointwise.Stabilizer import Mathlib.Data.Setoid.Partition import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.GroupTh...
alias ⟨IsBlock.smul_eq_smul_or_disjoint, _⟩ := isBlock_iff_smul_eq_smul_or_disjoint /-- A fixed block is a block. -/ @[to_additive "A fixed block is a block."]
Mathlib/GroupTheory/GroupAction/Blocks.lean
211
214
/- Copyright (c) 2020 Google LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Wong -/ import Mathlib.Data.List.Induction /-! # Palindromes This module defines *palindromes*, lists which are equal to their reverse. The main result is the `Palindrome` inducti...
theorem of_reverse_eq {l : List α} : reverse l = l → Palindrome l := by refine bidirectionalRecOn l (fun _ => Palindrome.nil) (fun a _ => Palindrome.singleton a) ?_
Mathlib/Data/List/Palindrome.lean
50
52
/- Copyright (c) 2020 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller, Yury Kudryashov -/ import Mathlib.Algebra.Module.BigOperators import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.Nat.ModEq /-! # Pigeonhole principles Given pigeons ...
if the total weight of a finite set of pigeons is less than `n • b`, and they are sorted into `n` pigeonholes, then for some pigeonhole, the total weight of the pigeons in this pigeonhole is less than `b`. -/
Mathlib/Combinatorics/Pigeonhole.lean
115
117
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Power function...
theorem rpow_inv_lt_iff {x y : ℝ≥0∞} {z : ℝ} (hz : 0 < z) : x ^ z⁻¹ < y ↔ x < y ^ z := by simp only [← not_le, le_rpow_inv_iff hz] theorem lt_rpow_inv_iff {x y : ℝ≥0∞} {z : ℝ} (hz : 0 < z) : x < y ^ z⁻¹ ↔ x ^ z < y := by nth_rw 1 [← rpow_one x]
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
749
754
/- 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...
· linarith [pi_pos, arg_le_pi x] lemma cpow_inv_two_im_eq_neg_sqrt {x : ℂ} (hx : x.im < 0) : (x ^ (2⁻¹ : ℂ)).im = -sqrt ((‖x‖ - x.re) / 2) := by
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
1,009
1,012
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll, Kalle Kytölä -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.Topology.Algebra.Module.WeakBilin /-! # Polar set I...
/-- The polar set is closed in the weak topology induced by `B.flip`. -/ theorem polar_weak_closed (s : Set E) : IsClosed[WeakBilin.instTopologicalSpace B.flip] (B.polar s) := by rw [polar_eq_iInter] refine isClosed_iInter fun x => isClosed_iInter fun _ => ?_
Mathlib/Analysis/LocallyConvex/Polar.lean
123
127
/- Copyright (c) 2024 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yaël Dillies -/ import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Sums in `WithTop` This file proves results about ...
lemma sum_ne_top : ∑ i ∈ s, f i ≠ ⊤ ↔ ∀ i ∈ s, f i ≠ ⊤ := by simp variable [LT α]
Mathlib/Algebra/BigOperators/WithTop.lean
31
33
/- 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_toSubmodule : (⊤ : NonUnitalSubalgebra R A).toSubmodule = ⊤ := rfl
Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
708
710
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Robert Y. Lewis -/ import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs /-! # Witt vecto...
exact hf (congr_arg (fun x => coeff x p) h :) theorem surjective (f : α → β) (hf : Surjective f) : Surjective (mapFun f : 𝕎 α → 𝕎 β) := fun x => ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n,
Mathlib/RingTheory/WittVector/Basic.lean
73
76
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Frédéric Dupuis -/ import Mathlib.Analysis.Convex.Hull /-! # Convex cones In a `𝕜`-module `E`, we define a convex cone as a set `s` such that `a • x + b • y ∈ s` w...
Mathlib/Analysis/Convex/Cone/Basic.lean
641
642
/- Copyright (c) 2022 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.Data.Complex.FiniteDimensional import Mathlib.Da...
theorem inner_comp_rightAngleRotation (x y : E) : ⟪J x, J y⟫ = ⟪x, y⟫ := LinearIsometryEquiv.inner_map_map J x y
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
263
265
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Antoine Chambert-Loir, María Inés de Frutos-Fernández -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower import Mathlib.Topology.Alge...
theorem continuous_algebraMap_iff_smul [ContinuousMul A] : Continuous (algebraMap R A) ↔ Continuous fun p : R × A => p.1 • p.2 := by refine ⟨fun h => ?_, fun h => have : ContinuousSMul R A := ⟨h⟩; continuous_algebraMap _ _⟩ simp only [Algebra.smul_def] exact (h.comp continuous_fst).mul continuous_snd
Mathlib/Topology/Algebra/Algebra.lean
47
51
/- 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.Analysis.Seminorm import Mathlib.GroupTheory.GroupAction.Pointwise /-! # The Minkowski functional, normed field version In this file we define `(eg...
refine le_antisymm ?_ (le_egauge_smul_left _ _ _) rw [ENNReal.le_div_iff_mul_le (by simp [*]) (by simp)] calc egauge 𝕜 (c • s) x * ‖c‖ₑ = egauge 𝕜 (c • s) x / ‖c⁻¹‖ₑ := by rw [enorm_inv (by simpa), div_eq_mul_inv, inv_inv] _ ≤ egauge 𝕜 (c⁻¹ • c • s) x := le_egauge_smul_left _ _ _ _ = egauge �...
Mathlib/Analysis/Convex/EGauge.lean
165
171
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.CharP.Frobenius import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.RingTheory.Polynomial.Basic /...
rw [← eq, mul_comm, mul_add] · rw [coeff_expand hp.bot_lt, if_neg h, mul_zero]
Mathlib/Algebra/Polynomial/Expand.lean
224
226
/- 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...
/-- Given `f : β → ℝ`, if `f` sends `{i | p i}` to a set of positive numbers
Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
662
663
/- 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...
sending `⟨i, x⟩` to `x`. -/ def sigmaToiUnion (x : Σi, t i) : ⋃ i, t i := ⟨x.2, mem_iUnion.2 ⟨x.1, x.2.2⟩⟩
Mathlib/Data/Set/Lattice.lean
1,293
1,295
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Control.Traversable.Lemmas import Mathlib.Logic.Equiv.Defs /-! # Transferring `Traversable` instances along isomorphisms This file allows to transfer `Trav...
protected theorem naturality (f : α → F β) (x : t' α) : η (Equiv.traverse eqv f x) = Equiv.traverse eqv (@η _ ∘ f) x := by
Mathlib/Control/Traversable/Equiv.lean
129
130
/- Copyright (c) 2017 Mario Carneiro. 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.SetTheory.Ordinal.Family /-! # Ordinal exponential In this file we define the power function and the lo...
See `opow_le_iff_le_log` for a variant assuming `x ≠ 0` rather than `c ≠ 0`. See also
Mathlib/SetTheory/Ordinal/Exponential.lean
343
344
/- Copyright (c) 2020 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Logic.IsEmpty import Mathlib.Order.Basic import Mathlib.Tactic.MkIffOfInductiveProp import Batteries.WF /-! # Unbundled...
Mathlib/Order/RelClasses.lean
611
611
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Measure.Tilted /-! # Log-likelihood Ratio The likelihood ratio between two measures `μ` and `ν` is their Radon-Nikodym derivative `μ.rnDeri...
filter_upwards [hμν.ae_le (exp_llr μ ν), Measure.rnDeriv_pos hμν] with x hx_eq hx_pos rw [hx_eq, if_neg hx_pos.ne'] lemma exp_llr_of_ac' (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :
Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
52
55
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.Subalgebra import Mathlib.LinearAlgebra.Finsupp.Span /-! # Lie submodules of a Lie algebra In this file we define Lie submodules, we construct ...
Mathlib/Algebra/Lie/Submodule.lean
1,288
1,294
/- 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.Util.Notation3 import Mathlib.Tactic.TypeStar /-! # Alternate definition of `Vector` in terms of `Fin2` This file provid...
theorem vectorAllP_cons (p : α → Prop) (x : α) (v : Vector3 α n) : VectorAllP p (x :: v) ↔ p x ∧ VectorAllP p v :=
Mathlib/Data/Vector3.lean
236
237
/- 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...
@[ext]
Mathlib/Algebra/Polynomial/Basic.lean
714
714
/- 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,707
2,725
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Order.Bounds.Basic /-! # Intervals in Lattices In this file, we provide instances of lattice structures on intervals within lattices. Some of them de...
refine ⟨fun h b hb ↦ ?_, fun h ↦ ⟨fun ⟨x, hx⟩ ↦ ?_⟩⟩ · obtain ⟨⟨c, hc₁⟩, hc⟩ := exists_isCompl (⟨b, hb⟩ : Iic a) obtain ⟨hc₂, hc₃⟩ := Set.Iic.isCompl_iff.mp hc
Mathlib/Order/LatticeIntervals.lean
131
133
/- 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 Batteries.Data.Rat.Lemmas import Mathlib.Algebra.Group.Defs import Mathlib.Data.Rat.Init import Mathlib.Order.Basic import Mathlib.Tactic.Commo...
instance addLeftCancelSemigroup : AddLeftCancelSemigroup ℚ := by infer_instance
Mathlib/Data/Rat/Defs.lean
307
307
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Topology.DiscreteQuotient import Mathlib.Topology.Category.TopCa...
have hj : ∀ a, j a ∈ (Finset.univ.image j : Finset J) := by intro a simp only [Finset.mem_image, Finset.mem_univ, true_and, exists_apply_eq_apply] let fs : ∀ a : α, j0 ⟶ j a := fun a => (hj0 (hj a)).some let gg : α → LocallyConstant (F.obj j0) (Fin 2) := fun a => (g a).comap (F.map (fs _)).hom let ggg :...
Mathlib/Topology/Category/Profinite/CofilteredLimit.lean
130
161
/- 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...
· rintro - ⟨x, hx, m, hm, rfl⟩ exact ⟨1 ⊗ₜ x, tmul_mem_baseChange_of_mem 1 hx, 1 ⊗ₜ m, tmul_mem_baseChange_of_mem 1 hm, by simp⟩ · rintro - ⟨x, hx, m, hm, rfl⟩ revert m apply Submodule.span_induction (p := fun x' _ ↦ ∀ m' ∈ N.baseChange A, ⁅x', m'⁆ ∈ Submodule.span A s) (hx := hx) ·...
Mathlib/Algebra/Lie/BaseChange.lean
218
251