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 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Chris Hughes, Daniel Weber -/ import Batteries.Data.Nat.Gcd import Mathlib.Algebra.GroupWithZero.Associated import Mathlib.Algebra.Ring.Divisibility.Basic import Math...
simpa [multiplicity, WithTop.untopD_eq_iff, h] using h₂ theorem emultiplicity_eq_zero_iff_multiplicity_eq_zero :
Mathlib/RingTheory/Multiplicity.lean
118
120
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.FreeAlgebra import Mathlib.RingTheory.Adjoin.Polynomial import Mathlib.RingTheory.Adjoin.Tower import Mathlib.RingTheory.Ideal.Quotient.Operati...
· rcases ihf with ⟨P, rfl⟩ rcases ihg with ⟨Q, rfl⟩ exact ⟨P + Q, map_add _ _ _⟩ · rcases ih with ⟨P, rfl⟩ exact ⟨r • P, map_smul _ _ _⟩
Mathlib/RingTheory/FiniteType.lean
422
427
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.BigOperators.Group.Finset.Indicator import Mathlib.Algebra.Module.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic import...
theorem affineCombination_map (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P) : (s₂.map e).affineCombination k p w = s₂.affineCombination k (p ∘ e) (w ∘ e) := by simp_rw [affineCombination_apply, weightedVSubOfPoint_map]
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
464
466
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Shing Tak Lam, Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Da...
let em ← expr.of_nat q( ℕ ) m let ( _ , pe ) ← norm_num.derive q( ( $ ( er ) + $ ( eb ) * $ ( em ) : ℕ ) ) let ( ic , el , p ) ← eval_aux em m ic return ( ic , q( @ List.cons ℕ...
Mathlib/Data/Nat/Digits.lean
866
873
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.CharP.Reduced import Mathlib.RingTheory.IntegralDomain -- TODO: remove Mathlib.Algebra.CharP.Reduced and move the last two lemmas to Lemmas /-...
Mathlib/RingTheory/RootsOfUnity/Basic.lean
372
381
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Yaël Dillies -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Closure /-! # Convex hull This file defines the convex hull of a set `s` in a module. `con...
theorem convexHull_zero : convexHull 𝕜 (0 : Set E) = 0 := convexHull_singleton 0
Mathlib/Analysis/Convex/Hull.lean
104
106
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Data.Set.Countable import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Tactic.FunProp.Attr import Mathlib.Tactic.Mea...
theorem measurableSet_insert {a : α} {s : Set α} : MeasurableSet (insert a s) ↔ MeasurableSet s := by
Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
247
248
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Data.Finset.Lattice.Prod import Mathlib.Data.Finite.Prod import Mathlib.Data.Set.Lattice.Image /-! # N-ary images of finsets This file defines `Finset.im...
@[simp] theorem image₂_mk_eq_product [DecidableEq α] [DecidableEq β] (s : Finset α) (t : Finset β) : image₂ Prod.mk s t = s ×ˢ t := by ext; simp [Prod.ext_iff]
Mathlib/Data/Finset/NAry.lean
275
278
/- Copyright (c) 2020 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap import Mathlib.MeasureTheory.Integral.Bochner.FundThmCalculus import Mathlib.MeasureT...
Mathlib/MeasureTheory/Integral/SetIntegral.lean
1,587
1,603
/- 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.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle /-! # Oriented angles in right-angled triangles. T...
/-- An angle in a right-angled triangle expressed using `arcsin`. -/ theorem oangle_right_eq_arcsin_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : ∡ p₂ p₃ p₁ = Real.arcsin (dist p₁ p₂ / dist p₁ p₃) := by have hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
542
545
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Andrew Yang -/ import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf import Mathlib.AlgebraicGeometry.GammaSpecAdjunction import Mathlib.RingTheory.GradedAlgeb...
⟨toSpec_injective 𝒜 f_deg hm, toSpec_surjective 𝒜 f_deg hm⟩ end fromSpecToSpec namespace toSpec
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
519
524
/- 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...
(h : (Monotone fun s : { s : Set α // s.Nonempty } => m s) ∨ Surjective f) : comap f (boundedBy m) = boundedBy fun s => m (f '' s) := by refine (comap_ofFunction _ ?_).trans ?_ · refine h.imp (fun H s t hst => iSup_le fun hs => ?_) id have ht : t.Nonempty := hs.mono hst exact (@H ⟨s, hs⟩ ⟨t, ht⟩ hst...
Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
302
311
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Module.LocalizedModule.Submodule import Mathlib.LinearAlgebra.Dimension.DivisionRing import Mathlib.RingTheory.IsTensorProduct import Mathlib.RingThe...
variable {p} {T : Type uT} [CommRing T] [NoZeroDivisors T] [Algebra R T] [FaithfulSMul R T] {P : Type uP} [AddCommGroup P] [Module R P] [Module T P] [IsScalarTower R T P] {g : M →ₗ[R] P} (bc : IsBaseChange T g) include bc
Mathlib/LinearAlgebra/Dimension/Localization.lean
145
150
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Algebra.Order.Group.Pointwise.Bounds import Mathlib.Data.Real.Basic import Mathlib.Ord...
let s := {x : ℝ | const abs x < f} have lb : ∃ x, x ∈ s := exists_lt f have ub' : ∀ x, f < const abs x → ∀ y ∈ s, y ≤ x := fun x h y yS => le_of_lt <| const_lt.1 <| CauSeq.lt_trans yS h
Mathlib/Data/Real/Archimedean.lean
302
305
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Group.Action.Pi import Mathlib.Algebra.Order.AbsoluteValue.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.Mi...
variable [DivisionRing β] {abv : β → α} [IsAbsoluteValue abv] theorem inv_aux {f : CauSeq β abv} (hf : ¬LimZero f) :
Mathlib/Algebra/Order/CauSeq/Basic.lean
528
531
/- Copyright (c) 2023 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.RingTheory.Algebraic.Basic import Mathlib.Data.Fintype.Pigeonhole import Mathlib.ModelTheory.Algebra.Field.IsAlgClosed import Mathlib.ModelTheory.Algebra....
The first order theory of algebraically closed fields, along with the Lefschetz Principle and the Ax-Grothendieck Theorem were first formalized in Lean 3 by Joseph Hua [here](https://github.com/Jlh18/ModelTheoryInLean8) with the master's thesis [here](https://github.com/Jlh18/ModelTheory8Report) -/ noncomputable sec...
Mathlib/FieldTheory/AxGrothendieck.lean
33
66
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Kontorovich, David Loeffler, Heather Macbeth, Sébastien Gouëzel -/ import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.Analysis.Calculus.ContDiff.CPolynomial import...
theorem iteratedDeriv_fourierIntegral {f : ℝ → E} {N : ℕ∞} {n : ℕ} (hf : ∀ (n : ℕ), n ≤ N → Integrable (fun x ↦ x ^ n • f x)) (hn : n ≤ N) : iteratedDeriv n (𝓕 f) = 𝓕 (fun x : ℝ ↦ (-2 * π * I * x) ^ n • f x) := by ext x : 1 have A (n : ℕ) (hn : n ≤ N) : Integrable (fun v ↦ ‖v‖ ^ n * ‖f v‖) := by conv...
Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
799
810
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.FinMeasAdditive /-! # Extension of a linear function from indicators to L1 Give...
Mathlib/MeasureTheory/Integral/SetToL1.lean
1,391
1,393
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot, Yury Kudryashov, Rémy Degenne -/ import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set /-! # Lemmas about images of inte...
{ @Equiv.subtypeUnivEquiv α (Ici (⊥ : α)) fun _ => bot_le with map_rel_iff' := @fun x y => by rfl }
Mathlib/Order/Interval/Set/OrderIso.lean
98
99
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Data.Nat.Cast.Commute import Mathlib.Data.Nat.Cast.Order.Ring /-! # Bernoulli's inequality -/ variable {R : Type*} section OrderedSemiring variabl...
have : -2 ≤ a - 1 := by rwa [← one_add_one_eq_two, neg_add, ← sub_eq_add_neg, sub_le_sub_iff_right] simpa only [add_sub_cancel] using one_add_mul_le_pow this n end LinearOrderedRing
Mathlib/Algebra/Order/Ring/Pow.lean
48
52
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree imp...
def sigma (k : ℕ) : ArithmeticFunction ℕ := ⟨fun n => ∑ d ∈ divisors n, d ^ k, by simp⟩ @[inherit_doc] scoped[ArithmeticFunction] notation "σ" => ArithmeticFunction.sigma @[inherit_doc] scoped[ArithmeticFunction.sigma] notation "σ" => ArithmeticFunction.sigma theorem sigma_apply {k n : ℕ} : σ k n = ∑ d ∈ divisors ...
Mathlib/NumberTheory/ArithmeticFunction.lean
798
811
/- 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...
@[to_additive] theorem HasProd.nat_mul_neg {f : ℤ → M} (hf : HasProd f m) : HasProd (fun n : ℕ ↦ f n * f (-n)) (m * f 0) := by -- Note this is much easier to prove if you assume more about the target space, but we have to -- work hard to prove it under the very minimal assumptions here. apply (hf.mul (hasPro...
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
418
456
/- Copyright (c) 2018 Sean Leather. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sean Leather, Mario Carneiro -/ import Mathlib.Data.List.AList import Mathlib.Data.Finset.Sigma import Mathlib.Data.Part /-! # Finite maps over `Multiset` -/ universe u v w open List ...
Mathlib/Data/Finmap.lean
674
676
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Patrick Massot, Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus deprecated_module (since := "2025-04-06")
Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
468
476
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree imp...
@[simp] theorem prodPrimeFactors_apply [CommMonoidWithZero R] {f : ℕ → R} {n : ℕ} (hn : n ≠ 0) : ∏ᵖ p ∣ n, f p = ∏ p ∈ n.primeFactors, f p :=
Mathlib/NumberTheory/ArithmeticFunction.lean
525
527
/- Copyright (c) 2024 Yaël Dillies, Kin Yau James Wong. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Kin Yau James Wong, Rémy Degenne -/ import Mathlib.MeasureTheory.Function.AEEqOfLIntegral import Mathlib.Probability.Kernel.Composition.MeasureCompProd ...
Mathlib/Probability/Kernel/Disintegration/Basic.lean
511
520
/- 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.Analysis.InnerProductSpace.Convex import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Combinatorics.Additive.AP.Three...
exact sum_sq_le_of_mem_box hx · rw [card_range, _root_.nsmul_eq_mul, mul_div_assoc', cast_add_one, mul_div_cancel_left₀, card_box] exact (cast_add_one_pos _).ne' theorem exists_large_sphere (n d : ℕ) : ∃ k, ((d ^ n :) / (n * d ^ 2 :) : ℝ) ≤ #(sphere n d k) := by obtain ⟨k, -, hk⟩ := exists_large_...
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
236
251
/- Copyright (c) 2020 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri, Yury Kudryashov -/ import Mathlib.Geometry.Manifold.ContMDiffMap import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential /-! # Diffeomorphisms This file implem...
IsManifold (I.transDiffeomorph e) n M := by refine isManifold_of_contDiffOn (I.transDiffeomorph e) n M fun e₁ e₂ h₁ h₂ => ?_ refine e.contDiff.comp_contDiffOn (((contDiffGroupoid n I).compatible h₁ h₂).1.comp e.symm.contDiff.contDiffOn ?_)
Mathlib/Geometry/Manifold/Diffeomorph.lean
447
450
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.Order.Floor.Semiring import Mathlib.Data.Nat.Log /-! # Integer logarithms in a field with respect to a natural base This file defines two `ℤ`-value...
exact Nat.clog_mono_right _ (Nat.ceil_mono <| inv_anti₀ h₀ h) · rw [log_of_right_le_one _ h₁, log_of_one_le_right _ h₂] exact (neg_nonpos.mpr (Int.natCast_nonneg _)).trans (Int.natCast_nonneg _) · obtain rfl := le_antisymm h (h₂.trans h₁) rfl · rw [log_of_one_le_right _ h₁, log_of_one_le_right _ h₂, I...
Mathlib/Data/Int/Log.lean
149
158
/- 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 areaForm'_apply (x : E) : o.areaForm' x = LinearMap.toContinuousLinearMap (o.areaForm x) := rfl
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
126
128
/- 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.Analysis.Complex.AbsMax import Mathlib.Analysis.Asymptotics.SuperpolynomialDecay /-! # Phragmen-Lindelöf principle In this file we prove several ve...
· rcases hB with ⟨c, hc, B, hO⟩ refine ⟨c, hc, B, ?_⟩ have : Tendsto (· * -I) (comap (|re ·|) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)) (comap (|im ·|) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)) := by refine (tendsto_comap_iff.2 ?_).inf H.tendsto simpa [Function.comp_def] using tendsto_comap simpa [Function.comp...
Mathlib/Analysis/Complex/PhragmenLindelof.lean
279
296
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.Algebra.Module.Prod import Mathlib.Tactic.Abel import Mathlib.Algebra.Module.LinearMap.Defs /-! # Addition and subtraction are linear maps fr...
· intro x y simp [add_comm, add_assoc, add_left_comm, sub_eq_add_neg] · intro x y simp [smul_sub] end IsLinearMap
Mathlib/Algebra/Module/LinearMap/Prod.lean
37
45
/- 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...
obtain ⟨n, rfl⟩ := lt_omega0.1 h exact natCast_add_omega0 n @[simp]
Mathlib/SetTheory/Ordinal/Arithmetic.lean
1,149
1,152
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Data.Complex.ExponentialBounds import Mathlib.NumberTheory.Harmonic.Defs import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.Analysis.SpecialF...
lemma eulerMascheroniSeq'_six_lt_two_thirds : eulerMascheroniSeq' 6 < 2 / 3 := by have h1 : eulerMascheroniSeq' 6 = 49 / 20 - log 6 := by rw [eulerMascheroniSeq'] norm_num rw [h1, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add', lt_log_iff_exp_lt (by positivity)] norm_num have := rpow_lt_rpow (exp_pos _).le exp...
Mathlib/NumberTheory/Harmonic/EulerMascheroni.lean
97
109
/- Copyright (c) 2022 Rishikesh Vaishnav. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rishikesh Vaishnav -/ import Mathlib.MeasureTheory.Measure.Typeclasses.Probability /-! # Conditional Probability This file defines conditional probability and includes basic resu...
is a probability measure. -/ theorem cond_isProbabilityMeasure_of_finite (hcs : μ s ≠ 0) (hs : μ s ≠ ∞) :
Mathlib/Probability/ConditionalProbability.lean
147
148
/- 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
1,201
1,204
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Yury Kudryashov -/ import Mathlib.Topology.Algebra.Module.Equiv import Mathlib.Topology.Algebra.Module.UniformConvergence import Mathlib.Topology.Algebra.Separation...
theorem topologicalSpace_eq [UniformSpace F] [IsUniformAddGroup F] (𝔖 : Set (Set E)) : instTopologicalSpace σ F 𝔖 = TopologicalSpace.induced (UniformOnFun.ofFun 𝔖 ∘ DFunLike.coe) (UniformOnFun.topologicalSpace E F 𝔖) := by rw [instTopologicalSpace] congr exact IsUniformAddGroup.toUniformSpace_eq
Mathlib/Topology/Algebra/Module/StrongTopology.lean
96
101
/- 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...
map f (OuterMeasure.ofFunction m m_empty) = OuterMeasure.ofFunction (fun s => m (f ⁻¹' s)) m_empty := by refine (map_ofFunction_le _).antisymm fun s => ?_ simp only [ofFunction_apply, map_apply, le_iInf_iff] intro t ht refine iInf_le_of_le (fun n => (range f)ᶜ ∪ f '' t n) (iInf_le_of_le ?_ ?_) · rw ...
Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
209
215
/- Copyright (c) 2021 Junyan Xu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junyan Xu -/ import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective /-! # Adjunction between `Γ` and ...
Spec.preimage (f ≫ g) = Spec.preimage g ≫ Spec.preimage f := Spec.map_injective (by simp)
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
560
562
/- 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,438
1,438
/- Copyright (c) 2023 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta, Doga Can Sertbas -/ import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.ModEq import Mathlib.Data.Nat.Prime.Defs import Mathlib.Data.Real.Archimedea...
/-- The Schnirelmann density is unaffected by adding `0`. -/ @[simp] lemma schnirelmannDensity_insert_zero [DecidablePred (· ∈ insert 0 A)] : schnirelmannDensity (insert 0 A) = schnirelmannDensity A := schnirelmannDensity_congr' (by aesop)
Mathlib/Combinatorics/Schnirelmann.lean
158
161
/- 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 Batteries.Tactic.Init import Mathlib.Logic.Function.Defs /-! # Binary map of options This file defines the binary map of `Option`. This is mostly useful to defin...
theorem map_map₂_distrib_left {g : γ → δ} {f' : α' → β → δ} {g' : α → α'} (h_distrib : ∀ a b, g (f a b) = f' (g' a) b) : (map₂ f a b).map g = map₂ f' (a.map g') b := by cases a <;> cases b <;> simp [h_distrib]
Mathlib/Data/Option/NAry.lean
140
143
/- 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...
theorem cosh_log {x : ℝ} (hx : 0 < x) : cosh (log x) = (x + x⁻¹) / 2 := by
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
118
119
/- 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.Topology.MetricSpace.Pseudo.Constructions import Mathlib.Topology.Order.Densely...
/-- Special case of the sandwich lemma; see `tendsto_of_tendsto_of_tendsto_of_le_of_le` and `tendsto_of_tendsto_of_tendsto_of_le_of_le'` for the general case. -/ lemma squeeze_zero {α} {f g : α → ℝ} {t₀ : Filter α} (hf : ∀ t, 0 ≤ f t) (hft : ∀ t, f t ≤ g t) (g0 : Tendsto g t₀ (𝓝 0)) : Tendsto f t₀ (𝓝 0) :=
Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean
32
35
/- 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.AlgebraicGeometry.Cover.Open import Mathlib.AlgebraicGeometry.GammaSpecAdjunction import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Lim...
@[simps! apply_coe_coe] def _root_.AlgebraicGeometry.affineOpensRestrict {X : Scheme.{u}} (U : X.Opens) : U.toScheme.affineOpens ≃ { V : X.affineOpens // V ≤ U } := (IsOpenImmersion.affineOpensEquiv U.ι).trans (Equiv.subtypeEquivProp (by simp)) @[simp] lemma _root_.AlgebraicGeometry.affineOpensRestrict_symm_appl...
Mathlib/AlgebraicGeometry/AffineScheme.lean
479
491
/- Copyright (c) 2024 David Kurniadi Angdinata. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Kurniadi Angdinata -/ import Mathlib.AlgebraicGeometry.EllipticCurve.Group import Mathlib.NumberTheory.EllipticDivisibilitySequence /-! # Division polynomials of Weier...
@[simp] lemma φ_one : W.φ 1 = C X := by
Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
506
508
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.FreeAlgebra import Mathlib.RingTheory.Adjoin.Polynomial import Mathlib.RingTheory.Adjoin.Tower import Mathlib.RingTheory.Ideal.Quotient.Operati...
theorem trans [Algebra S A] [IsScalarTower R S A] (hRS : FiniteType R S) (hSA : FiniteType S A) : FiniteType R A := ⟨fg_trans' hRS.1 hSA.1⟩
Mathlib/RingTheory/FiniteType.lean
114
117
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecialFunctions.ExpDeriv /-! # Grönwall's inequality The main technical result of this file is the Grönwall-like inequality `norm_le_gron...
simp apply ODE_solution_unique_of_mem_Icc_right hv' (hf.comp continuousOn_neg hmt1) _ (fun _ ht ↦ hfs _ (hmt2 ht)) (hg.comp continuousOn_neg hmt1) _ (fun _ ht ↦ hgs _ (hmt2 ht)) (by simp [hb]) · intros t ht convert HasFDerivWithinAt.comp_hasDerivWithinAt t (hf' (-t) (hmt2 ht)) (hasDerivAt_neg ...
Mathlib/Analysis/ODE/Gronwall.lean
263
295
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Option.NAry import Mathlib.Data.Seq.Computation import Mathlib.Tactic.ApplyFun import Mathlib.Data.List.Basic /-! # Possibly infinite lists This...
@[simp] theorem get?_mem {s : Seq α} {n : ℕ} {x : α} (h : s.get? n = .some x) : x ∈ s := ⟨n, h.symm⟩ /-- Destructor for a sequence, resulting in either `none` (for `nil`) or `some (a, s)` (for `cons a s`). -/
Mathlib/Data/Seq/Seq.lean
174
178
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kim Morrison -/ import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal /-! # Surreal numbers The basic theory of surreal numbers, built on top ...
(∀ j, Numeric (x.moveRight j)) → Numeric x := Numeric.mk isEmptyElim isEmptyElim theorem numeric_of_isEmpty_rightMoves (x : PGame) [IsEmpty x.RightMoves] (H : ∀ i, Numeric (x.moveLeft i)) : Numeric x := Numeric.mk (fun _ => isEmptyElim) H isEmptyElim theorem numeric_zero : Numeric 0 :=
Mathlib/SetTheory/Surreal/Basic.lean
172
179
/- Copyright (c) 2019 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.Topology.UniformSpace.UniformEmbedding import Mathlib.Topology.UniformSpace.Equiv /-! # Abstract theory of Hausdorff completions of uniform spaces Th...
the preimage in `α` of `𝓝 a` tends to `𝓝 (f.extend a : β)`, then the comparison map between `pkg` and `pkg'` composed with the extension of `f` to `pkg`` coincides with the extension of `f` to `pkg'`. The situation is described in the following diagram, where the two diagonal arrows are the extensions of `f` to the t...
Mathlib/Topology/UniformSpace/AbstractCompletion.lean
258
264
/- 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.SetTheory.Cardinal.Finite /-! # Cardinality of finite types The cardinality of a finite type `α` is given by `Nat.card α`. This function has the "junk val...
theorem one_lt_card_iff_nontrivial [Finite α] : 1 < Nat.card α ↔ Nontrivial α := by haveI := Fintype.ofFinite α simp only [Nat.card_eq_fintype_card, Fintype.one_lt_card_iff_nontrivial]
Mathlib/Data/Finite/Card.lean
72
75
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation /-! # Recursive computation rules for the Clifford algebra This file provides API for a special case `CliffordAlg...
end Foldl
Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean
121
122
/- Copyright (c) 2021 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yury Kudryashov -/ import Mathlib.Order.UpperLower.Closure import Mathlib.Order.UpperLower.Fibration import Mathlib.Tactic.TFAE import Mathlib.Topology.ContinuousOn import Ma...
### Separation quotient In this section we define the quotient of a topological space by the `Inseparable` relation. -/
Mathlib/Topology/Inseparable.lean
524
527
/- 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.Homotopy import Mathlib.Algebra.Ring.NegOnePow import Mathlib.Algebra.Category.Grp.Preadditive import Mathlib.Tactic.Linarith import Mathlib.Cat...
Cochain.mk (fun p q hpq => ψ p ≫ eqToHom (by rw [← hpq, add_zero])) @[simp] lemma ofHoms_v (ψ : ∀ (p : ℤ), F.X p ⟶ G.X p) (p : ℤ) :
Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
133
136
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.NumberTheory.LSeries.AbstractFuncEq import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds import Mathlib.NumberTheory.LSeries.MellinEqDirichlet i...
lemma oddKernel_def' (a x : ℝ) : ↑(oddKernel ↑a x) = cexp (-π * a ^ 2 * x) * (jacobiTheta₂' (a * I * x) (I * x) / (2 * π * I) + a * jacobiTheta₂ (a * I * x) (I * x)) := by
Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
112
114
/- 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...
· rw [log_of_left_le_one hb, log_of_left_le_one hb] theorem log_le_self (b x : Ordinal) : log b x ≤ x := by obtain rfl | hx := eq_or_ne x 0 · rw [log_zero_right]
Mathlib/SetTheory/Ordinal/Exponential.lean
407
411
/- Copyright (c) 2022 Benjamin Davidson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Benjamin Davidson, Devon Tuma, Eric Rodriguez, Oliver Nash -/ import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.Order.Filter.AtTopBot.Field import Mathlib.Topolog...
@[deprecated (since := "2024-12-22")] alias inv_nhdsWithin_Ioi_zero := inv_nhdsGT_zero @[simp] lemma inv_nhdsLT_zero : (𝓝[<] (0 : 𝕜))⁻¹ = atBot := by
Mathlib/Topology/Algebra/Order/Field.lean
144
147
/- 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...
end Orientation namespace Complex attribute [local instance] Complex.finrank_real_complex_fact
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
509
513
/- 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.MFDeriv.Defs import Mathlib.Geometry.Manifold.ContMDiff.Defs /-! # Basic properties of the manifold Fréchet ...
(extChartAt I x x) := by simp only [MDifferentiableWithinAt, liftPropWithinAt_iff'] exact and_congr_right fun hc => differentiableWithinAt_congr_nhds <| hc.nhdsWithin_extChartAt_symm_preimage_inter_range
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
204
208
/- 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.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mat...
linarith [angle_add_angle_eq_pi_of_angle_eq_pi p₁ hbpd, angle_comm p₄ p₅ p₁, angle_add_angle_eq_pi_of_angle_eq_pi p₄ hapc, angle_comm p₄ p₅ p₃] /-- If ∠ABC = π then dist A B ≠ 0. -/
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
178
181
/- 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.SpecialFunctions.Log.Deriv import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus /-! # Non integrable functions In this f...
(hg : deriv f =O[𝓝[[[a, b]] \ {c}] c] g) : ¬IntervalIntegrable g volume a b := by obtain ⟨l, hl, hl', hle, hmem⟩ : ∃ l : Filter ℝ, TendstoIxxClass Icc l l ∧ l.NeBot ∧ l ≤ 𝓝 c ∧ [[a, b]] \ {c} ∈ l := by rcases (min_lt_max.2 hne).lt_or_lt c with hlt | hlt · refine ⟨𝓝[<] c, inferInstance, inferInstanc...
Mathlib/Analysis/SpecialFunctions/NonIntegrable.lean
140
157
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lattice import Batteries.Data.List.Pairwise /-! # Erasure of duplicates in a list This file proves basic res...
· rw [dedup_cons_of_mem h, dedup_cons_of_mem (mem_map_of_mem h), ih] · rw [dedup_cons_of_not_mem h, dedup_cons_of_not_mem <| (mem_map_of_injective hf).not.mpr h, ih, map_cons] /-- Note that the weaker `List.Subset.dedup_append_left` is proved later. -/ theorem Subset.dedup_append_right {xs ys : List α}...
Mathlib/Data/List/Dedup.lean
126
132
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Data.ENNReal.Operations /-! # Results about division in extended non-negative reals This file establishes basic properties related t...
· simp_all · simp [← mul_assoc, ENNReal.mul_inv_cancel, *]
Mathlib/Data/ENNReal/Inv.lean
116
117
/- 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.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul /-! # Theory of monic polynomials We give se...
lemma Monic.comp_X_sub_C {p : R[X]} (hp : p.Monic) (r : R) : (p.comp (X - C r)).Monic := by simpa using hp.comp_X_add_C (-r) theorem Monic.sub_of_left {p q : R[X]} (hp : Monic p) (hpq : degree q < degree p) : Monic (p - q) := by rw [sub_eq_add_neg] apply hp.add_of_left
Mathlib/Algebra/Polynomial/Monic.lean
449
456
/- Copyright (c) 2023 Hanneke Wiersema. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Hanneke Wiersema, Andrew Yang -/ import Mathlib.Algebra.Ring.Aut import Mathlib.NumberTheory.Padics.RingHoms import Mathlib.RingTheory.RootsOfUnity.EnoughRootsOfUnity ...
ZMod.val_intCast, ← Subgroup.coe_zpow] exact Units.ext_iff.1 <| SetCoe.ext_iff.2 <| zpow_eq_zpow_emod _ pow_card_eq_one (G := rootsOfUnity n L) theorem toFun_spec' (g : L ≃+* L) {n : ℕ} [NeZero n] {t : Lˣ} (ht : t ∈ rootsOfUnity n L) : g t = t ^ (χ₀ n g).val := toFun_spec g ⟨t, ht⟩ theorem toFun_spec'...
Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean
130
138
/- Copyright (c) 2021 Martin Dvorak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Martin Dvorak, Kyle Miller, Eric Wieser -/ import Mathlib.Algebra.Lie.Basic import Mathlib.Data.Matrix.Notation import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Lin...
section LeibnizProperties
Mathlib/LinearAlgebra/CrossProduct.lean
114
115
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq /-! # Relation between mono/epi and pullback/pushout squares In this file, monomorphisms and epimorphisms are char...
lemma epi_iff_isIso_inl (hc : IsColimit c) : Epi f ↔ IsIso c.inl := by rw [epi_iff_inl_eq_inr hc] constructor · intro h obtain ⟨φ, hφ₁, hφ₂⟩ := PushoutCocone.IsColimit.desc' hc (𝟙 Y) (𝟙 Y) (by simp) refine ⟨φ, hφ₁, PushoutCocone.IsColimit.hom_ext hc ?_ ?_⟩ · dsimp simp only [comp_id, reassoc_o...
Mathlib/CategoryTheory/Limits/EpiMono.lean
92
106
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Prod import Ma...
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
831
836
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot, Yury Kudryashov, Rémy Degenne -/ import Mathlib.Data.Set.Subsingleton import Mathlib.Order.Interval.Set.Defs /-! # Intervals In any pr...
Mathlib/Order/Interval/Set/Basic.lean
1,124
1,124
/- 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 ...
induction hy using adjoin_induction with | mem z hz => induction hx using adjoin_induction with | mem _ h => exact mem_mem _ _ h hz
Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
643
646
/- Copyright (c) 2020 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead /-! # Reverse of a univariate polynomial The main definition is `r...
Mathlib/Algebra/Polynomial/Reverse.lean
408
409
/- 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.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle /-! # Closure, interior, and frontier of preimages under `re`...
@[simp]
Mathlib/Analysis/Complex/ReImTopology.lean
119
120
/- Copyright (c) 2023 Andrew Yang, Patrick Lutz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots import Mathlib.FieldTheory.Galois.Basic import Mathlib.FieldTheory.KummerPolynomial import Mathlib.Linea...
/-- The natural embedding of the roots of unity of `K` into `Gal(K[ⁿ√a]/K)`, by sending `η ↦ (ⁿ√a ↦ η • ⁿ√a)`. This is an isomorphism when `K` contains a primitive root of unity. See `autAdjoinRootXPowSubCEquiv`. -/ noncomputable def autAdjoinRootXPowSubC : rootsOfUnity n K →* (K[n√a] ≃ₐ[K] K[n√a]) := (AlgEquiv....
Mathlib/FieldTheory/KummerExtension.lean
198
217
/- Copyright (c) 2022 María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández -/ import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Algebra.DirectSum.Decomposition import Mathlib.Algeb...
(x : DirectSum M fun i : M => ↥(weightedHomogeneousSubmodule R w i)) : (DirectSum.coeAddMonoidHom fun i : M => weightedHomogeneousSubmodule R w i) x = DFinsupp.sum x (fun _ x => ↑x) := DirectSum.coeLinearMap_eq_dfinsuppSum R w x theorem DirectSum.coeLinearMap_eq_finsum [DecidableEq M] (x : DirectSu...
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
466
479
/- Copyright (c) 2023 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis -/ import Mathlib.Computability.AkraBazzi.GrowsPolynomially import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.SpecialFunctions.Pow.Deriv /-! # Divid...
_ ≤ b i * n + ‖r i n - b i * n‖ := by gcongr; exact Real.le_norm_self _ _ ≤ b i * n + n / log n ^ 2 := by gcongr; exact hn i
Mathlib/Computability/AkraBazzi/AkraBazzi.lean
171
173
/- 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...
@[simp] theorem integral_log : ∫ s in a..b, log s = b * log b - a * log a - b + a := by rw [← intervalIntegral.integral_add_adjacent_intervals (b := 0)] · rw [intervalIntegral.integral_symm, integral_log_from_zero, integral_log_from_zero] ring all_goals exact intervalIntegrable_log' @[deprecated (since := "2...
Mathlib/Analysis/SpecialFunctions/Integrals.lean
507
515
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.DirectSum.Basic /-! # Additively-graded multiplicative structures on `⨁ i, A i` This module provides a set of h...
/-- A family of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul` describes a `RingHom`s on `⨁ i, A i`. This is a stronger version of `DirectSum.toMonoid`.
Mathlib/Algebra/DirectSum/Ring.lean
529
530
/- Copyright (c) 2020 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Algebra.Group.Conj import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Group.Subgroup.Ker /-! # Basic results on subgroups We prove basic results...
Mathlib/Algebra/Group/Subgroup/Basic.lean
1,952
1,956
/- 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.Algebra.Basic import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Eval.Algebra impo...
cases n · simp · refine ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.add_one_pos _ end Semiring section StrictOrderedSemiring variable {S : Type*} [Semiring S] [PartialOrder S] [IsStrictOrderedRing S]
Mathlib/RingTheory/Polynomial/Pochhammer.lean
178
187
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.FieldTheory.Finiteness import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas /-! # Finite-dimensional subsp...
collinear with the set if and only if it is collinear with `p₂` and `p₃`. -/ theorem Collinear.collinear_insert_iff_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ p₃ : P} (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₃ : p₂ ≠ p₃) : Collinear k (insert p₁ s) ↔ Collinear k ({p₁, p₂, p₃} : Set P) := by
Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
556
559
/- 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.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel /-! # Chain homotopies We define chain...
dsimp [prevD] simp only [assoc, g.comm] theorem dNext_nat (C D : ChainComplex V ℕ) (i : ℕ) (f : ∀ i j, C.X i ⟶ D.X j) :
Mathlib/Algebra/Homology/Homotopy.lean
96
99
/- Copyright (c) 2021 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Eric Wieser -/ import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise impor...
end Mul
Mathlib/Data/Real/Pointwise.lean
132
133
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Logic.Function.Defs import Mathlib.Logic.Function.Iterate import Aesop import Mathlib.Tactic.Inhabit /-! # Extra facts about `Prod` This file proves ...
⟨hf.1.prodMap hg.1, hf.2.prodMap hg.2⟩
Mathlib/Data/Prod/Basic.lean
228
229
/- 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.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor /-! # Preadditive monoidal categories A monoidal category is `M...
@[ext] theorem leftDistributor_ext₂_right {J : Type} [Finite J] {X Y Z : C} {f : J → C} {g h : X ⟶ Y ⊗ (Z ⊗ ⨁ f)} (w : ∀ j, g ≫ (Y ◁ (Z ◁ biproduct.π f j)) = h ≫ (Y ◁ (Z ◁ biproduct.π f j))) : g = h := by apply (cancel_mono (α_ _ _ _).inv).mp ext simp [w] @[ext]
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
327
336
/- 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
1,180
1,182
/- 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
3,043
3,047
/- 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 -/ import Mathlib.LinearAlgebra.Basis.Submodule import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.LinearAlgebra.Matrix...
theorem basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix [Fintype κ'] [DecidableEq ι] [DecidableEq ι'] : c.toMatrix c' * LinearMap.toMatrix b' c' f * b'.toMatrix b = LinearMap.toMatrix b c f := by cases nonempty_fintype κ rw [basis_toMatrix_mul_linearMap_toMatrix, linearMap_toMatrix_mul_basis_toMatr...
Mathlib/LinearAlgebra/Matrix/Basis.lean
204
208
/- 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,414
1,416
/- 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.Regularity.Chunk import Mathlib.Combinatorics.SimpleGraph.Regularity.Energy /-! # Increment partitio...
(mul_le_mul_left' (pow_le_pow_left' (by norm_num) _) _).trans hPα have hPpos : 0 < stepBound #P.parts := stepBound_pos (nonempty_of_not_uniform hPG).card_pos rw [increment, card_bind] simp_rw [chunk, apply_dite Finpartition.parts, apply_dite card, sum_dite] rw [sum_const_nat, sum_const_nat, univ_eq_attach, ...
Mathlib/Combinatorics/SimpleGraph/Regularity/Increment.lean
65
77
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Patrick Massot, Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalcul...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
349
351
/- Copyright (c) 2022 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.Algebra.Module.ZLattice.Basic import Mathlib.Analysis.InnerProductSpace.ProdL2 import Mathlib.MeasureTheory.Measure.Haar.Unique import Mathlib.NumberTheo...
conj (x φ) = x (ComplexEmbedding.conjugate φ) := by refine Submodule.span_induction ?_ ?_ (fun _ _ _ _ hx hy => ?_) (fun a _ _ hx => ?_) hx · rintro _ ⟨x, rfl⟩ rw [apply_at, apply_at, ComplexEmbedding.conjugate_coe_eq] · rw [Pi.zero_apply, Pi.zero_apply, map_zero] · rw [Pi.add_apply, Pi.add_apply, map_a...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
61
70
/- 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.SetLike.Basic import Mathlib.ModelTheory.Semantics /-! # Definable Sets This file defines what it means for a set over a first-order structure t...
rw [Definable, Equiv.exists_congr_left (LEquiv.addEmptyConstants L (∅ : Set M)).onFormula] simp theorem definable_iff_empty_definable_with_params :
Mathlib/ModelTheory/Definability.lean
75
78
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
theorem eq_cons_of_mem_head? {x : α} : ∀ {l : List α}, x ∈ l.head? → l = x :: tail l | [], h => (Option.not_mem_none _ h).elim
Mathlib/Data/List/Basic.lean
418
420
/- Copyright (c) 2022 Alex J. Best. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Yaël Dillies -/ import Mathlib.Algebra.Order.Archimedean.Hom import Mathlib.Algebra.Order.Group.Pointwise.CompleteLattice /-! # Conditionally complete linear ordered field...
rw [← Rat.cast_zero, coe_mem_cutMap_iff, Rat.cast_zero] exact mul_self_pos.2 ha.ne' obtain ⟨q, hq, hbq, hqa⟩ := exists_rat_pow_btwn two_ne_zero hba (hb.trans_lt hba) rw [← cast_pow] at hbq refine ⟨(q ^ 2 : ℚ), coe_mem_cutMap_iff.2 ?_, hbq⟩
Mathlib/Algebra/Order/CompleteField.lean
248
252
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kim Morrison -/ import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal /-! # Surreal numbers The basic theory of surreal numbers, built on top ...
· exact ox.add (oy.moveLeft iy) · rintro (jx | jy) · apply (ox.moveRight jx).add oy · apply ox.add (oy.moveRight jy)⟩ termination_by x y => (x, y) -- Porting note: Added `termination_by` theorem sub {x y : PGame} (ox : Numeric x) (oy : Numeric y) : Numeric (x - y) := ox.add oy.neg end ...
Mathlib/SetTheory/Surreal/Basic.lean
236
253
/- Copyright (c) 2022 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Category.ModuleCat.Abelian import Mathlib.CategoryTheory.Limits.Shapes.Images /-! # The category of R-modules has images. Note that we don't need...
Mathlib/Algebra/Category/ModuleCat/Images.lean
117
119
/- 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.Algebra.Algebra.Tower import Mathlib.Algebra.Field.IsField import Mathlib.Algebra.GroupWithZero.N...
Mathlib/RingTheory/Localization/Basic.lean
841
861
/- Copyright (c) 2023 Sophie Morel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sophie Morel -/ import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Analytic.CPolynomialDef /-! # Properties of continuously polynomial functions We expand the API a...
Mathlib/Analysis/Analytic/CPolynomial.lean
435
470
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jalex Stark -/ import Mathlib.Algebra.Polynomial.Monic /-! # Lemmas for the interaction between polynomials and `∑` and `∏`. Recall that `∑` and `∏` are notation for ...
· rw [ih] · exact h simp only [ne_eq, not_false_eq_true] apply right_ne_zero_of_mul h /-- The leading coefficient of a product of polynomials is equal to the product of the leading coefficients, provided that this product is nonzero. See `Polynomial.leadingCoeff_prod` (without the `'`) for a version for...
Mathlib/Algebra/Polynomial/BigOperators.lean
145
156