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) 2017 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Keeley Hoek -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Int.DivMod import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic....
lemma succAbove_pred_of_lt (p i : Fin (n + 1)) (h : p < i)
Mathlib/Data/Fin/Basic.lean
966
967
/- Copyright (c) 2019 Neil Strickland. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Neil Strickland -/ import Mathlib.Algebra.BigOperators.Group.Multiset.Basic import Mathlib.Data.PNat.Prime import Mathlib.Data.Nat.Factors import Mathlib.Data.Multiset.OrderedMonoid i...
theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).prod : ℕ) = l.prod := by
Mathlib/Data/PNat/Factors.lean
166
167
/- 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.PreservesHomology import Mathlib.Algebra.Homology.ShortComplex.Abelian import Mathlib.Algebra.Homology.ShortComplex.QuasiIso import...
have := s.isSplitEpi_g infer_instance
Mathlib/Algebra/Homology/ShortComplex/Exact.lean
509
511
/- Copyright (c) 2022 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Patrick Stevens, Thomas Browning -/ import Mathlib.Data.Nat.Choose.Central import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Multiplicity /-! # Factori...
· simp [h] have hp : p.Prime := Not.imp_symm (choose n k).factorization_eq_zero_of_non_prime h have hkn : k ≤ n := by refine le_of_not_lt fun hnk => h ?_ simp [choose_eq_zero_of_lt hnk] rw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)] rw [← Nat.cast_le (α := ℕ∞), ← FiniteMultipl...
Mathlib/Data/Nat/Choose/Factorization.lean
36
45
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies -/ import Mathlib.Algebra.GeomSum import Mathlib.Data.Finset.Slice import Mathlib.Data.Nat.BitIndices import Mathlib.Order.SupClosed import Math...
lemma erase_le_erase (ha : a ∈ s) (hb : b ∈ s) : toColex (s.erase a) ≤ toColex (s.erase b) ↔ b ≤ a := by obtain rfl | hab := eq_or_ne a b · simp
Mathlib/Combinatorics/Colex.lean
273
276
/- Copyright (c) 2023 Newell Jensen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Newell Jensen -/ import Mathlib.GroupTheory.SpecificGroups.Cyclic import Mathlib.GroupTheory.SpecificGroups.Dihedral /-! # Klein Four Group The Klein (Vierergruppe) four-group is a no...
@[to_additive] lemma eq_mul_of_ne_all {x y z : G} (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) (hz : z ≠ 1) (hzx : z ≠ x) (hzy : z ≠ y) : z = x * y := by classical let _ := Fintype.ofFinite G apply eq_of_mem_insert_of_not_mem <| (eq_finset_univ hx hy hxy).symm ▸ mem_univ _ simpa only [mem_singleton, mem_insert, ...
Mathlib/GroupTheory/SpecificGroups/KleinFour.lean
118
124
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yakov Pechersky -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix import Mathlib.Data.Quot /-! # List rotation This file proves basic results about `List.r...
· simp · simp [rotate_cons_succ, hn]
Mathlib/Data/List/Rotate.lean
167
168
/- Copyright (c) 2022 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Data.Set.Finite.Lemmas import Mathlib.ModelTheory.Substructures /-! # Finitely Generated First-Order Structures This file defines what it means for a...
let ⟨S, finite_S, closure_S⟩ := fg_iff.1 h let g : (M →[L] N) → (S → N) := fun f ↦ f ∘ (↑) have g_inj : Function.Injective g := by intro f f' h
Mathlib/ModelTheory/FinitelyGenerated.lean
219
223
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Bhavik Mehta, Daniel Weber, Stefan Kebekus -/ import Mathlib.Tactic.TautoSet import Mathlib.Topology.Constructions import Mathlib.Data.Set.Subset import Mathlib.Topology.Sepa...
section codiscrete_filter variable [TopologicalSpace X] /-- Criterion for a subset `S ⊆ X` to be closed and discrete in terms of the punctured neighbourhood filter at an arbitrary point of `X`. (Compare `discreteTopology_subtype_iff`.) -/ theorem isClosed_and_discrete_iff {S : Set X} : IsClosed S ∧ DiscreteTopol...
Mathlib/Topology/DiscreteSubset.lean
83
92
/- 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 ...
theorem moveRight {x : PGame} (o : Numeric x) (j : x.RightMoves) : Numeric (x.moveRight j) := by
Mathlib/SetTheory/Surreal/Basic.lean
80
81
/- 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.Algebra.BigOperators.Finsupp.Basic import Mathlib.Data.Finsupp.Indicator import Mathlib.Data.Fintype.BigOperators import Mathlib.Algebra.Group.Pointwise.Fi...
refine mem_map.trans ⟨?_, ?_⟩ · rintro ⟨f, hf, rfl⟩ refine ⟨support_indicator_subset _ _, fun i hi => ?_⟩ convert mem_pi.1 hf i hi exact indicator_of_mem hi _ · refine fun h => ⟨fun i _ => f i, mem_pi.2 h.2, ?_⟩ ext i exact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1 ...
Mathlib/Data/Finset/Finsupp.lean
48
57
/- 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.Algebra.Category.Grp.Basic /-! The cohomology of a sheaf of groups in degree 1 In this file, we shall define the cohomology in degree 1 of a sheaf of groups (T...
lemma ev_symm (γ : OneCocycle G U) (i j : I) ⦃T : C⦄ (a : T ⟶ U i) (b : T ⟶ U j) : γ.ev i j a b = (γ.ev j i b a)⁻¹ := by rw [← mul_left_inj (γ.ev j i b a), γ.ev_trans i j i a b a, ev_refl, inv_mul_cancel]
Mathlib/CategoryTheory/Sites/NonabelianCohomology/H1.lean
136
139
/- Copyright (c) 2022 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.Calculus.ContDiff.Operations import Mathlib.Analysis.Calculus.UniformLimitsDeriv import Mathlib.Topology.Algebra.InfiniteSum.Module impo...
exact (hasFDerivAt_tsum hu hf hf' hf0 x).differentiableAt · push_neg at h have : (fun x => ∑' n, f n x) = 0 := by ext1 x; exact tsum_eq_zero_of_not_summable (h x) rw [this] exact differentiable_const 0 /-- Consider a series of functions `∑' n, f n x`. If all functions in the series are differentiable...
Mathlib/Analysis/Calculus/SmoothSeries.lean
145
154
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Data.List.Prime import Mathlib.RingTheory.Polynomial.Tower /-! # S...
p.degree = Multiset.card (p.map i).roots := by rw [degree_eq_natDegree p_ne_zero, natDegree_eq_card_roots hsplit] theorem roots_map {f : K[X]} (hf : f.Splits <| RingHom.id K) : (f.map i).roots = f.roots.map i := (roots_map_of_injective_of_card_eq_natDegree i.injective <| by
Mathlib/Algebra/Polynomial/Splits.lean
345
349
/- 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.Order.Filter.Tendsto import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Algebra.Order.Group.Defs import Mathlib.Data.Finset.Lat...
Mathlib/Order/Filter/Extr.lean
670
673
/- 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...
lemma Ψ_odd (m : ℤ) : W.Ψ (2 * m + 1) = W.Ψ (m + 2) * W.Ψ m ^ 3 - W.Ψ (m - 1) * W.Ψ (m + 1) ^ 3 + W.toAffine.polynomial * (16 * W.toAffine.polynomial - 8 * W.ψ₂ ^ 2) * C (if Even m then W.preΨ (m + 2) * W.preΨ m ^ 3
Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
367
370
/- 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 -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Algebra.Order.Star.Basic import Mathlib.Data.C...
exp_strictMono.monotone
Mathlib/Data/Complex/Exponential.lean
298
299
/- Copyright (c) 2015 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis -/ import Mathlib.Algebra.Group.Torsion import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Monoid.Unbundled.Pow /-! # Lemmas about the ...
variable (α)
Mathlib/Algebra/Order/Group/Basic.lean
74
76
/- 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.MeasureTheory.Constructions.BorelSpace.Order import Mathlib.MeasureTheory.MeasurableSpace.Prod import Mathlib.MeasureTheory.Measure.Ty...
· exact measurable_of_measurable_real h_top_left private lemma measurable_const_mul (c : EReal) : Measurable fun (x : EReal) ↦ c * x := by refine measurable_of_measurable_real ?_ have h1 : (fun (p : ℝ) ↦ (⊥ : EReal) * p) = fun p ↦ if p = 0 then (0 : EReal) else (if p < 0 then ⊤ else ⊥) := by ext p
Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
497
503
/- 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.Data.Bool.Basic import Mathlib.Order.Monotone.Basic import Mathlib.Order.ULift import Mathlib.Tactic.GCongr.CoreAttrs /-! # (Semi-)lattices Semilatti...
theorem lt_sup_iff : a < b ⊔ c ↔ a < b ∨ a < c := by
Mathlib/Order/Lattice.lean
672
672
/- 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.Nat.Lattice import Mathlib.Logic.Denumerable import Mathlib.Logic.Function.Iterate import Mathlib.Order.Hom.Basic import Mathlib.Data.Set.Subsing...
theorem not_wellFounded_of_decreasing_seq (f : ((· > ·) : ℕ → ℕ → Prop) ↪r r) : ¬WellFounded r := by rw [wellFounded_iff_no_descending_seq, not_isEmpty_iff] exact ⟨f⟩ end RelEmbedding
Mathlib/Order/OrderIsoNat.lean
90
96
/- 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...
theorem dist_div_tan_oangle_left_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : dist p₃ p₂ / Real.Angle.tan (∡ p₃ p₁ p₂) = dist p₁ p₂ := by have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two] rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, ...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
718
722
/- Copyright (c) 2021 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Algebra.Group.End import Mathlib.Data.Finset.Sort import Mathlib.Data.Fintype.Sum import Mathlib.Data.Prod.Lex import Mathlib.Order.Interval.Finset.Fin /-! ...
entries. -/ theorem antitone_pair_of_not_sorted (h : f ≠ f ∘ sort f) : ∃ i j, i < j ∧ f j < f i := antitone_pair_of_not_sorted' (id h : f ∘ Equiv.refl _ ≠ _)
Mathlib/Data/Fin/Tuple/Sort.lean
198
200
/- 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.Algebra.Ring.Parity import Mathlib.Combinatorics.SimpleGraph.Path /-! # Trails and Eulerian trails This module contains additional theory about trails, in...
change Multiset.card _ = _ congr 1 convert_to _ = (ht.isTrail.edgesFinset.filter (x ∈ ·)).val have : Fintype G.edgeSet := fintypeEdgeSet ht
Mathlib/Combinatorics/SimpleGraph/Trails.lean
128
131
/- Copyright (c) 2020 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis -/ import Mathlib.Algebra.Algebra.Field import Mathlib.Algebra.BigOperators.Balance import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star....
obtain rfl | hx := eq_or_ne x 0
Mathlib/Analysis/RCLike/Basic.lean
481
481
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Algebra.Group.Int.Defs import Mathlib.Algebra.Order.Monoid.Defs /-! # The integers form a linear ordered group This file contains the instance necessar...
Mathlib/Algebra/Order/Group/Int.lean
136
137
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Seminorm import Mathlib.Data.NNReal.Basic import Mathlib.Topology.Algebra.Support import Mathlib.To...
(𝓤 E).HasBasis (fun ε : ℝ => 0 < ε) fun ε => { p : E × E | ‖p.fst / p.snd‖ < ε } := by
Mathlib/Analysis/Normed/Group/Basic.lean
674
674
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lorenzo Luccioli, Rémy Degenne, Alexander Bentkamp -/ import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Probability.Moments.ComplexMGF /-! # Gaussian dis...
· exact ae_of_all _ (gaussianPDFReal_nonneg _ _) lemma gaussianReal_absolutelyContinuous (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) : gaussianReal μ v ≪ volume := by rw [gaussianReal_of_var_ne_zero _ hv] exact withDensity_absolutelyContinuous _ _
Mathlib/Probability/Distributions/Gaussian.lean
217
222
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ import Mathlib.Algebra.Category.Grp.EquivalenceGroupAddGroup import Mathlib.CategoryTheory.ConcreteCategory.EpiMono import Mathlib.CategoryTheory.Limits.Constructions.Epi...
exact hb (inv_inv b ▸ Subgroup.inv_mem _ r) instance : DecidableEq X' := Classical.decEq _ /-- Let `τ` be the permutation on `X'` exchanging `f.hom.range` and the point at infinity.
Mathlib/Algebra/Category/Grp/EpiMono.lean
139
144
/- Copyright (c) 2020 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth, Yury Kudryashov, Frédéric Dupuis -/ import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Module.Equiv /-! # Infinite sums in top...
use a change ∑' a : α, g (π (a • b)) • f (a • b) = g (π b) • ∑' a : α, f (a • b) simp_rw [H₁] exact tsum_const_smul'' _ /-- Automorphization of a function into an `R`-`Module` distributes, that is, commutes with the `R`-scalar multiplication. -/ lemma AddAction.automorphize_smul_left [AddGroup α] [AddAction ...
Mathlib/Topology/Algebra/InfiniteSum/Module.lean
214
231
/- 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 ...
theorem disjoint_union_right (x y z : Finmap β) : Disjoint x (y ∪ z) ↔ Disjoint x y ∧ Disjoint x z := by rw [Disjoint.symm_iff, disjoint_union_left, Disjoint.symm_iff _ x, Disjoint.symm_iff _ x] theorem union_comm_of_disjoint {s₁ s₂ : Finmap β} : Disjoint s₁ s₂ → s₁ ∪ s₂ = s₂ ∪ s₁ :=
Mathlib/Data/Finmap.lean
591
595
/- 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.Data.Nat.EvenOddRec import Mathlib.Tactic.Linarith import Mathlib.Tactic.LinearCombination /-! # Elliptic divisibility sequences ...
lemma preNormEDS'_four : preNormEDS' b c d 4 = d := by rw [preNormEDS']
Mathlib/NumberTheory/EllipticDivisibilitySequence.lean
183
185
/- 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.CategoryTheory.Shift.Adjunction import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor /-! # The pullback of a shift by a monoid morphism Given a shift by a...
infer_instance instance [Preadditive C] (a : A) [(shiftFunctor C (φ a)).Additive] : (shiftFunctor (PullbackShift C φ) a).Additive := by change (shiftFunctor C (φ a)).Additive infer_instance
Mathlib/CategoryTheory/Shift/Pullback.lean
62
68
/- Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.SetTheory.Ordinal.Family import Mathlib.Tactic.Abel /-! # Natural operations on ordinals The goal of this file is to define n...
end Ordinal
Mathlib/SetTheory/Ordinal/NaturalOps.lean
321
321
/- Copyright (c) 2024 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker -/ import Mathlib.Order.Filter.Tendsto import Mathlib.Order.Filter.Finite import Mathlib.Order.Filter.CountableInter import Mathlib.SetTheory.Cardinal.Regular import Mathlib...
theorem eventually_cardinal_forall {p : α → ι → Prop} (hic : #ι < c) : (∀ᶠ x in l, ∀ i, p x i) ↔ ∀ i, ∀ᶠ x in l, p x i := by simp only [Filter.Eventually, setOf_forall]
Mathlib/Order/Filter/CardinalInter.lean
102
105
/- Copyright (c) 2022 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho import Mathlib.LinearAlgebra.Matrix.PosDef /-! # LDL decomposition This file proves the LDL-decom...
ext i j by_cases hij : i = j · simp only [diag, diagEntries, EuclideanSpace.inner_piLp_equiv_symm, star_star, hij, diagonal_apply_eq, Matrix.mul_assoc, dotProduct_comm] rfl
Mathlib/LinearAlgebra/Matrix/LDL.lean
93
97
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calc...
exact iso.comp_fderivWithin uniqueDiffWithinAt_univ lemma _root_.fderivWithin_continuousLinearEquiv_comp (L : G ≃L[𝕜] G') (f : E → (F →L[𝕜] G))
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
140
142
/- 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 /-! # The W construction as a multivariate polynomial functor. W types are well-founded tree-like structu...
/-! First, describe operations on `W` as a polynomial functor. -/
Mathlib/Data/PFunctor/Multivariate/W.lean
115
118
/- Copyright (c) 2022 Jiale Miao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiale Miao, Kevin Buzzard, Alexander Bentkamp -/ import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.Block /-! # Gram-Schmidt Orthogonalization and Orthonor...
Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
395
399
/- Copyright (c) 2020 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Utensil Song -/ import Mathlib.Algebra.RingQuot import Mathlib.LinearAlgebra.TensorAlgebra.Basic import Mathlib.LinearAlgebra.QuadraticForm.Isometry import Mathlib.LinearAlge...
(fun r ↦ ⟨algebraMap R (CliffordAlgebra Q₁) r, by simp only [AlgHom.commutes]⟩) (fun y ↦ let ⟨x, hx⟩ := hf y; ⟨CliffordAlgebra.ι Q₁ x, by simp only [map_apply_ι, hx]⟩)
Mathlib/LinearAlgebra/CliffordAlgebra/Basic.lean
333
334
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yury Kudryashov -/ import Mathlib.Data.Set.Lattice.Image import Mathlib.Order.Interval.Set.LinearOrder /-! # Extra lemmas about intervals This file contains lemma...
⋃ x ∈ s, Ici x = Ici a := by refine (iUnion₂_subset fun x hx => ?_).antisymm fun x hx => ?_ · exact Ici_subset_Ici.mpr (mem_lowerBounds.mp a_glb.1 x hx) · exact mem_iUnion₂.mpr ⟨a, a_mem, hx⟩
Mathlib/Order/Interval/Set/Disjoint.lean
201
205
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.Calculus.SmoothSeries import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod import Mathlib.Analysis.SpecialFunctions.Gaussian.PoissonSummation...
lemma norm_jacobiTheta₂_term (n : ℤ) (z τ : ℂ) : ‖jacobiTheta₂_term n z τ‖ = rexp (-π * n ^ 2 * τ.im - 2 * π * n * z.im) := by rw [jacobiTheta₂_term, Complex.norm_exp, (by push_cast; ring : (2 * π : ℂ) * I * n * z + π * I * n ^ 2 * τ = (π * (2 * n):) * z * I + (π * n ^ 2 :) * τ * I), add_re, mul_I_re, im...
Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean
70
75
/- 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.Algebra.Homology.HomotopyCategory.Shift import Mathlib.Algebra.Homology.TotalComplex /-! # Behaviour of the total complex with respect to shifts There are two ...
@[reassoc] lemma D₂_totalShift₂XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + y = n₀') (h₁ : n₁ + y = n₁') : ((shiftFunctor₂ C y).obj K).D₂ (up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom = y.negOnePow • ((K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₂ (up ℤ) n₀' n₁') := by by_cases h : (up ℤ).Rel n₀ n₁ · apply t...
Mathlib/Algebra/Homology/TotalComplexShift.lean
269
292
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.WSeq.Basic import Mathlib.Data.WSeq.Defs import Mathlib.Data.WSeq.Productive import Mathlib.Data.WSeq.Relation deprecated_module (since :=...
Mathlib/Data/Seq/WSeq.lean
924
931
/- Copyright (c) 2022 David Kurniadi Angdinata. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Kurniadi Angdinata -/ import Mathlib.Algebra.Polynomial.Splits import Mathlib.Tactic.IntervalCases /-! # Cubics and discriminants This file defines cubic polynomials ...
@[simp] theorem degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.degree = 2 := by rw [of_a_eq_zero ha, degree_quadratic hb]
Mathlib/Algebra/CubicDiscriminant.lean
268
270
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jeremy Avigad -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Notation.Pi import Mathlib.Data.Set.Lattice import Mathlib.Order.Filter.Defs /-! # Theory of...
Mathlib/Order/Filter/Basic.lean
1,372
1,373
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov, Kexing Ying -/ import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lat...
intro b hb apply le_antisymm (A b hb (g x)) (A x hx (g b)) have : g = s.piecewise (fun _y ↦ g x) g' := by ext b
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
562
565
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic /-! # Independence in Projective Space In this file we define independence and dependence of families of elements ...
exact (iSupIndep_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine h.linearIndependent (Projectivization.submodule ∘ f) (fun i => ?_) fun i => ?_ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) @[dep...
Mathlib/LinearAlgebra/Projectivization/Independence.lean
63
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...
Mathlib/Order/Interval/Finset/Basic.lean
596
596
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.Homology import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Preadditive.Opposite /-! # Homolo...
@[simp] lemma leftHomologyMap'_neg : leftHomologyMap' (-φ) h₁ h₂ = -leftHomologyMap' φ h₁ h₂ := by have γ : LeftHomologyMapData φ h₁ h₂ := default simp only [γ.leftHomologyMap'_eq, γ.neg.leftHomologyMap'_eq, LeftHomologyMapData.neg_φH]
Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
96
100
/- Copyright (c) 2022 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Data.Nat.Cast.Field import Mathlib.NumberTheory.ArithmeticFunction /-! # The von Mangoldt Function In ...
have : (m : ℝ) ≠ 0 := by rw [cast_ne_zero]
Mathlib/NumberTheory/VonMangoldt.lean
135
136
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Analysis.Normed.Group.Uniform import Mathlib.Topology.Algebra.GroupCompletion import Mathlib.Topology.MetricSpace.Completion /-! # Completion of a nor...
@[simp] lemma enorm_coe {E} [SeminormedAddCommGroup E] (x : E) : ‖(x : Completion E)‖ₑ = ‖x‖ₑ := by
Mathlib/Analysis/Normed/Group/Completion.lean
47
48
/- 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, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Analysis.SpecialFunctions.ExpDeriv ...
(IccExtend_eq_self zero_le_one smoothTransition (fun x hx => ?_) fun x hx => ?_) x · rw [smoothTransition.zero, zero_of_nonpos hx.le]
Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean
162
163
/- Copyright (c) 2021 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion /-! # Completion of normed group homs Given two (semi) normed groups `G` an...
rw [NormedAddGroupHom.coe_comp, NormedAddGroupHom.completion_def, NormedAddGroupHom.completion_coe_to_fun, NormedAddGroupHom.completion_coe_to_fun, Completion.map_comp g.uniformContinuous f.uniformContinuous] rfl
Mathlib/Analysis/Normed/Group/HomCompletion.lean
100
104
/- Copyright (c) 2023 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory....
ext x simp only [LinearMap.mem_ker, mem_invariants, ← @sub_eq_zero _ _ _ x, funext_iff] rfl
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
100
103
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Simon Hudon, Mario Carneiro -/ import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Init import Mathlib.Data.Int.Init import Mathlib....
Mathlib/Algebra/Group/Basic.lean
1,295
1,295
/- 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...
emultiplicity (a : ℤ) (b : ℤ) = emultiplicity a b := by unfold emultiplicity FiniteMultiplicity
Mathlib/RingTheory/Multiplicity.lean
215
216
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Malo Jaffré -/ import Mathlib.Analysis.Convex.Function import Mathlib.Tactic.AdaptationNote import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Linarith /-! # Slop...
rw [segment_eq_Icc (hxy.le.trans hu.2)] exact ⟨hxy.le, hu.2⟩ · rw [openSegment_eq_Ioo (hu2.trans huv)] exact ⟨hu2, huv⟩
Mathlib/Analysis/Convex/Slope.lean
334
340
/- 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.Data.Fintype.Card import Mathlib.Algebra.Order.BigOperators.Group.Multiset import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.Multiset.OrderedM...
simp only [mem_insert, not_or] at h'x exact hle x hx h'x.2 @[to_additive single_lt_sum] theorem single_lt_prod' {i j : ι} (hij : j ≠ i) (hi : i ∈ s) (hj : j ∈ s) (hlt : 1 < f j) (hle : ∀ k ∈ s, k ≠ i → 1 ≤ f k) : f i < ∏ k ∈ s, f k := calc f i = ∏ k ∈ {i}, f k := by rw [prod_singleton] _ ...
Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
425
435
/- 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.Nat.ModEq import Mathlib.Data.Nat.Prime.Basic import Mathlib.NumberTheory.Zsqrtd.Basic /-! # Pell's equation and Matiyasevic's theorem This file...
theorem xn_modEq_x4n_add (n j) : xn a1 (4 * n + j) ≡ xn a1 j [MOD xn a1 n] := ModEq.add_right_cancel' (xn a1 (2 * n + j)) <| by refine @ModEq.trans _ _ 0 _ ?_ (by rw [add_comm]; exact (xn_modEq_x2n_add _ _ _).symm) rw [show 4 * n = 2 * n + 2 * n from right_distrib 2 2 n, add_assoc] apply xn_modEq_x2n_add ...
Mathlib/NumberTheory/PellMatiyasevic.lean
543
549
/- Copyright (c) 2019 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston -/ import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Data.Setoid.Basic import Mathlib.GroupTheory.Congruence.Hom /-! # Congruence relations This f...
Mathlib/GroupTheory/Congruence/Basic.lean
433
435
/- 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...
section Nodal variable {R : Type*} [CommRing R] {ι : Type*} variable {s : Finset ι} {v : ι → R} open Finset Polynomial /-- `nodal s v` is the unique monic polynomial whose roots are the nodes defined by `v` and `s`. That is, the roots of `nodal s v` are exactly the image of `v` on `s`, with appropriate multiplicity...
Mathlib/LinearAlgebra/Lagrange.lean
443
477
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Sites.Grothendieck import Mathlib.CategoryTheory.Sites.Pretopology import Mathlib.CategoryTheory.Limits.Lattice import Mathlib.Topology.Sets...
rcases hR x hx with ⟨U, f, ⟨V, g₁, g₂, hg₂, _⟩, hU⟩ exact ⟨V, g₂, hg₂, g₁.le hU⟩ · intro X R hR x hx rcases hR x hx with ⟨U, f, hf, hU⟩ exact ⟨U, f, Sieve.le_generate R U hf, hU⟩ /-- The pretopology associated to a space induces the Grothendieck topology associated to the space. -/ @[simp]
Mathlib/CategoryTheory/Sites/Spaces.lean
78
86
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl, Patrick Massot -/ import Mathlib.Data.Set.Image import Mathlib.Data.SProd /-! # Sets in product and pi types This file proves basic properties of prod...
rw [update_of_ne] exact fun h => hi (h ▸ hj)
Mathlib/Data/Set/Prod.lean
761
762
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Data.List.Prime import Mathlib.RingTheory.Polynomial.Tower /-! # S...
theorem Splits.dvd_iff_roots_le_roots {p q : K[X]} (hp : p.Splits (RingHom.id _)) (hp0 : p ≠ 0) (hq0 : q ≠ 0) : p ∣ q ↔ p.roots ≤ q.roots := ⟨Polynomial.roots.le_of_dvd hq0, hp.dvd_of_roots_le_roots hp0⟩ theorem aeval_eq_prod_aroots_sub_of_splits [Algebra K L] {p : K[X]} (hsplit : Splits (algebraMap K L...
Mathlib/Algebra/Polynomial/Splits.lean
389
403
/- Copyright (c) 2019 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Eric Wieser -/ import Mathlib.Data.Matrix.ConjTranspose /-! # Row and column matrices This file provides results about row and column matrices. ## Main definitions * `Mat...
@[deprecated (since := "2024-12-11")] alias updateColumn_self := updateCol_self @[simp] theorem updateRow_ne [DecidableEq m] {i' : m} (i_ne : i' ≠ i) : updateRow M i b i' = M i' := Function.update_of_ne (β := fun _ => (n → α)) i_ne b M
Mathlib/Data/Matrix/RowCol.lean
248
252
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.PowerBasis import Mathlib.LinearAlgebra.Matrix.Basis /-! # Power basis for `Algebra.adjoin R {x}` This fi...
RingHom.id_apply, Finsupp.coe_smul, Pi.smul_apply, id.smul_eq_mul] refine (hy _).mul ((hx _).mul ?_) simp only [coe_basis, ← pow_add] exact repr_gen_pow_isIntegral hB hmin _ _ /-- Let `B : PowerBasis S A` be such that `IsIntegral R B.gen`, and let `x : A` be an element with integral coordinates in the base `...
Mathlib/RingTheory/Adjoin/PowerBasis.lean
130
142
/- 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...
refine ⟨fun h => ?_, norm_sub_eq_abs_sub_norm_of_angle_eq_zero⟩ rw [← inner_eq_mul_norm_iff_angle_eq_zero hx hy] have h1 : ‖x - y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2 := by rw [h] exact sq_abs (‖x‖ - ‖y‖)
Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
288
292
/- 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.Degree.Domain import Mathlib.Algebra.Polynomial.Degree.Support import Mathlib.Algebra.Poly...
@[simp] theorem derivative_monomial_succ (a : R) (n : ℕ) : derivative (monomial (n + 1) a) = monomial n (a * (n + 1)) := by rw [derivative_monomial, add_tsub_cancel_right, Nat.cast_add, Nat.cast_one]
Mathlib/Algebra/Polynomial/Derivative.lean
86
89
/- Copyright (c) 2019 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard -/ import Mathlib.Data.EReal.Basic deprecated_module (since := "2025-04-13")
Mathlib/Data/Real/EReal.lean
1,503
1,508
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Andrew Zipperer, Haitao Zhang, Minchao Wu, Yury Kudryashov -/ import Mathlib.Data.Set.Prod import Mathlib.Data.Set.Restrict /-! # Functions over sets This file contains...
theorem mono (hf : LeftInvOn f' f s) (ht : s₁ ⊆ s) : LeftInvOn f' f s₁ := fun _ hx => hf (ht hx)
Mathlib/Data/Set/Function.lean
779
781
/- Copyright (c) 2021 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Tactic.AdaptationNote import Mathlib.Algeb...
set s := ‖a.c i‖ have spos : 0 < s := zero_lt_two.trans hi set d := (s / ‖a.c j‖) • a.c j with hd have I : ‖a.c j - a.c i‖ ≤ ‖a.c j‖ - s + ‖d - a.c i‖ := calc ‖a.c j - a.c i‖ ≤ ‖a.c j - d‖ + ‖d - a.c i‖ := by simp [← dist_eq_norm, dist_triangle] _ = ‖a.c j‖ - ‖a.c i‖ + ‖d - a.c i‖ := by ...
Mathlib/MeasureTheory/Covering/BesicovitchVectorSpace.lean
412
466
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Mathlib/Data/Matrix/Basic.lean
2,871
2,873
/- Copyright (c) 2022 Richard M. Hill. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Richard M. Hill -/ import Mathlib.Algebra.Module.Submodule.Invariant import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.LinearAlgebra.DFinsupp import Mathlib.RingTheory.Finit...
lemma X_smul_of (m : M) : (X : R[X]) • (of R M a m) = of R M a (a • m) := by rw [← of_aeval_smul, aeval_X]
Mathlib/Algebra/Polynomial/Module/AEval.lean
73
75
/- 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.Geometry.Euclidean.Altitude import Mathlib.Geometry.Euclidean.Circumcenter /-! # Monge point and orthocenter This file defines the orthocenter of a trian...
(Set.mem_image_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_singleton _))))] exact t.dist_circumcenter_eq_circumradius _ · use t.circumcenter, t.circumcenter_mem_affineSpan intro p₁ hp₁ rw [hs] at hp₁ rcases hp₁ with ⟨i, rfl⟩ exact t.dist_circumcenter_eq_circumradius _
Mathlib/Geometry/Euclidean/MongePoint.lean
551
557
/- Copyright (c) 2020 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.MeanInequalities import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic import Mathlib.MeasureTh...
theorem lintegral_mul_le_Lp_mul_Lq_of_ne_zero_of_ne_top {p q : ℝ} (hpq : p.HolderConjugate q) {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ) (hf_nontop : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) (hg_nontop : (∫⁻ a, g a ^ q ∂μ) ≠ ⊤) (hf_nonzero : (∫⁻ a, f a ^ p ∂μ) ≠ 0) (hg_nonzero : (∫⁻ a, g a ^ q ∂μ) ≠ 0) : (∫⁻ a, (f * g) a ...
Mathlib/MeasureTheory/Integral/MeanInequalities.lean
101
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, Kevin Buzzard, Yury Kudryashov -/ import Mathlib.Algebra.Group.Subgroup.Lattice import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra...
rw [iff_not_comm, not_nontrivial_iff_subsingleton, subsingleton_iff_eq_bot] /-! ## Top element of a submodule
Mathlib/Algebra/Module/Submodule/Lattice.lean
123
126
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tim Baumann, Stephen Morgan, Kim Morrison, Floris van Doorn -/ import Mathlib.Tactic.CategoryTheory.Reassoc /-! # Isomorphisms This file defines isomorphisms between objects of a categ...
f.inv ≫ g = f.inv ≫ g' ↔ g = g' := by simp only [cancel_epi] @[simp] theorem cancel_iso_hom_right {X Y Z : C} (f f' : X ⟶ Y) (g : Y ≅ Z) :
Mathlib/CategoryTheory/Iso.lean
472
476
/- 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.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs /-! # One-dimensional iterated derivatives We define the `n`-th de...
(iteratedDerivWithin n f s) s x : 𝕜 → F) 1) : (Fin n → 𝕜) → F) fun _ : Fin n => 1) = (fderivWithin 𝕜 (iteratedDerivWithin n f s) s x : 𝕜 → F) 1 simp · simp [derivWithin_zero_of_not_accPt hxs, iteratedDerivWithin, iteratedFDerivWithin, fderivWithin_zero_of_not_accPt hxs] /-- The `n`-th itera...
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
184
191
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Topology.Coherent import Mathlib.Topology.UniformSpace.Equiv import Mathlib.Topology.UniformSpace.Pi import Mathlib.Topology.UniformSpace.UniformAp...
More precisely, if `f : γ → β` is uniform inducing, then `(f ∘ ·) : (α →ᵤ γ) → (α →ᵤ β)` is uniform inducing. -/ lemma postcomp_isUniformInducing [UniformSpace γ] {f : γ → β} (hf : IsUniformInducing f) : IsUniformInducing (ofFun ∘ (f ∘ ·) ∘ toFun : (α →ᵤ γ) → α →ᵤ β) := ⟨((UniformFun.hasBasis_uniformity _ _).coma...
Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
368
374
/- Copyright (c) 2022 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup /-! # Congruence subgroups This defines congruence subgroups of `SL(2, ℤ)` such as `Γ(N)`, `Γ₀(N)` and `Γ₁(N)...
have hA : A ∈ Gamma0 N := by simp [ha.right.right, Gamma0_mem] have HA : (⟨A, hA⟩ : Gamma0 N) ∈ Gamma1' N := by simp only [Gamma1_to_Gamma0_mem, Subgroup.coe_mk, coe_matrix_coe, Int.coe_castRingHom, map_apply] exact ha refine ⟨(⟨(⟨A, hA⟩ : Gamma0 N), HA⟩ : (Gamma1' N : Subgroup (Gamma0 N...
Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean
156
172
/- 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 Aesop import Mathlib.Order.BoundedOrder.Lattice /-! # Disjointness and complements This file defines `Disjoint`, `Codisjoint`, and the `IsCompl` predicate. ...
end DistribLattice
Mathlib/Order/Disjoint.lean
395
396
/- 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.Complex.Asymptotics import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Data.Complex.Trig...
have hyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖ := by rw [pow_two] exact mul_le_mul hyx.le le_rfl (norm_nonneg _) hr_nonneg have h_sq : ∀ z, ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2 := by intro z hz have : ‖exp (x + z) - exp x - z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2 := exp_bound_sq x ...
Mathlib/Analysis/SpecialFunctions/Exp.lean
45
61
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.SetTheory.Cardinal.Finite import Mathlib.Data.Set.Finite.Powerset /-! # Noncomputable Set Cardinality We define the cardinality of set `s` as a term `Set...
rw [tsub_le_iff_left, add_comm]; apply encard_le_encard_diff_add_encard
Mathlib/Data/Set/Card.lean
240
241
/- Copyright (c) 2019 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Sébastien Gouëzel, Yury Kudryashov, Anatole Dedecker -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add /-! # One-dimensional de...
derivWithin (fun y => f y - g y) s x = derivWithin f s x - derivWithin g s x := by simp only [sub_eq_add_neg, derivWithin_add hf hg.neg, derivWithin.neg]
Mathlib/Analysis/Calculus/Deriv/Add.lean
312
314
/- 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...
refine ⟨fun h => ?_, fun h => List.length_eq_one_iff.2 ⟨n, primeFactorsList_prime h⟩⟩
Mathlib/NumberTheory/ArithmeticFunction.lean
888
888
/- 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.UpperHalfPlane.Topology import Mathlib.Analysis.SpecialFunctions.Arsinh import Mathlib.Geometry.Euclidean.Inversion.Basic /-! # Met...
protected theorem dist_comm (z w : ℍ) : dist z w = dist w z := by simp only [dist_eq, dist_comm (z : ℂ), mul_comm] theorem dist_le_iff_le_sinh : dist z w ≤ r ↔ dist (z : ℂ) w / (2 * √(z.im * w.im)) ≤ sinh (r / 2) := by rw [← div_le_div_iff_of_pos_right (zero_lt_two' ℝ), ← sinh_le_sinh, sinh_half_dist] theore...
Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
76
84
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow, Kexing Ying -/ import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.LinearAlgebra.BilinearForm.Properties /-! # Bilinear form This file defines ort...
nondegenerate if `Disjoint W (B.orthogonal W)`. -/ theorem nondegenerate_restrict_of_disjoint_orthogonal (B : BilinForm R₁ M₁) (b : B.IsRefl) {W : Submodule R₁ M₁} (hW : Disjoint W (B.orthogonal W)) : (B.restrict W).Nondegenerate := by rintro ⟨x, hx⟩ b₁
Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
203
206
/- Copyright (c) 2024 Dagur Asgeirsson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dagur Asgeirsson -/ import Mathlib.Topology.Category.CompHausLike.Limits import Mathlib.Topology.Category.LightProfinite.Basic /-! # Explicit limits and colimits This file applies ...
Mathlib/Topology/Category/LightProfinite/Limits.lean
168
173
/- 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.AlgebraicGeometry.Cover.Open import Mathlib.AlgebraicGeometry.Over /-! # Restriction of Schemes and Morphisms ## Main definition - `AlgebraicGeometry.Schem...
X.presheaf.map (eqToHom e).op = U.toScheme.presheaf.map (eqToHom <| U.isOpenEmbedding.functor_obj_injective e).op := rfl @[simp] lemma nonempty_iff : Nonempty U.toScheme ↔ (U : Set X).Nonempty := by simp only [toScheme_carrier, SetLike.coe_sort_coe, nonempty_subtype]
Mathlib/AlgebraicGeometry/Restrict.lean
120
125
/- 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.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedd...
ext simp [convexBodySumFun_nonneg] /-- The fudge factor that appears in the formula for the volume of `convexBodyLt`. -/ noncomputable abbrev convexBodySumFactor : ℝ≥0 :=
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
362
366
/- Copyright (c) 2020 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.Reverse /-! # "Mirror" of a univariate polynomial In this file we define `Po...
rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, add_comm, add_tsub_cancel_right] exact natTrailingDegree_le_of_ne_zero hp · change p.mirror.coeff _ ≠ 0 rwa [coeff_mirror, revAt_invol] · exact fun n _ _ => p.coeff_mirror n theorem mirror_mirror : p.mirror.mirror = ...
Mathlib/Algebra/Polynomial/Mirror.lean
101
120
/- Copyright (c) 2023 Mohanad ahmed. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mohanad Ahmed -/ import Mathlib.Data.Matrix.Block import Mathlib.LinearAlgebra.Matrix.SemiringInverse /-! # Block Matrices from Rows and Columns This file provides the basic definiti...
@[simp] lemma vecMul_fromCols [Fintype m] (B₁ : Matrix m n₁ R) (B₂ : Matrix m n₂ R) (v : m → R) : v ᵥ* fromCols B₁ B₂ = Sum.elim (v ᵥ* B₁) (v ᵥ* B₂) := by ext (_ | _) <;> rfl
Mathlib/Data/Matrix/ColumnRowPartitioned.lean
207
211
/- 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.LinearAlgebra.Dimension.Constructions import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Isomorphisms import Mathlib.Logic.Equiv.Fin....
exact ⟨x, hx.comp _ (finRotate _).injective⟩ /-- Given a nonzero vector in a space of dimension `> 1`, one may find another vector linearly independent of the first one. -/ theorem exists_linearIndependent_pair_of_one_lt_rank [StrongRankCondition R] [NoZeroSMulDivisors R M] (h : 1 < Module.rank R M) {x : M} (hx ...
Mathlib/LinearAlgebra/Dimension/RankNullity.lean
136
142
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.Composition.MapComap import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Process.PartitionFiltration /-! # Ker...
suffices ∫ x in A, density κ ν a x s ∂(ν a) = limsup (fun i ↦ ∫ x in A, densityProcess κ ν i a x s ∂(ν a)) atTop by rw [this, ← limsup_const (α := ℕ) (f := atTop) (∫ x in A, densityProcess κ ν n a x s ∂(ν a)), limsup_congr] simp only [eventually_atTop] refine ⟨n, fun m hnm ↦ ?_⟩ rw [setInt...
Mathlib/Probability/Kernel/Disintegration/Density.lean
518
524
/- 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.Extreme import Mathlib.Analysis.Convex.Function import Mathlib.Topology.Algebra.Module.LinearMap import Mathlib...
/-- For nontrivial `𝕜`, if `B` is an exposed subset of `A`, then `B` is the intersection of `A` with some closed half-space. The converse is *not* true. It would require that the corresponding open half-space doesn't intersect `A`. -/ theorem eq_inter_halfSpace [IsOrderedRing 𝕜] [Nontrivial 𝕜] {A B : Set E} (hAB : I...
Mathlib/Analysis/Convex/Exposed.lean
107
111
/- 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.Probability.Notation import Mathlib.Probability.Independence.Basic import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic /-! # Probabilistic p...
by_cases hfint : Integrable f μ swap; · rw [condExp_of_not_integrable hfint, integral_undef hfint]; rfl refine (ae_eq_condExp_of_forall_setIntegral_eq hle₂ hfint (fun s _ hs => integrableOn_const.2 (Or.inr hs)) (fun s hms hs => ?_) stronglyMeasurable_const.aestronglyMeasurable).symm rw [setIntegral_co...
Mathlib/Probability/ConditionalExpectation.lean
40
77
/- 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.Algebra.Order.Archimedean.IndicatorCard import Mathlib.Probability.Martingale.Centering import Mathlib.Probability.Martingale.Convergence import Mathlib.Prob...
open BorelCantelli /-- An a.e. monotone adapted process `f` with uniformly bounded differences converges to `+∞` if and only if its predictable part also converges to `+∞`. -/ theorem tendsto_sum_indicator_atTop_iff [IsFiniteMeasure μ]
Mathlib/Probability/Martingale/BorelCantelli.lean
303
308
/- Copyright (c) 2022 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Analysis.Normed.Group.Basic /-! # Hamming spaces The Hamming metric counts the number of places two members of a (finite) Pi type differ. The Hamming n...
theorem hammingDist_nonneg {x y : ∀ i, β i} : 0 ≤ hammingDist x y := zero_le _
Mathlib/InformationTheory/Hamming.lean
46
48
/- 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.Bound import Mathlib.Combinatorics.SimpleGraph.Regularity.Equitabilise import Mathlib.Comb...
simp only [SimpleGraph.edgeDensity_def, sum_div, Rat.cast_div, div_div] conv_lhs => rw [SimpleGraph.edgeDensity_def, SimpleGraph.interedges, ← sup_eq_biUnion, ← sup_eq_biUnion, Rel.card_interedges_finpartition _ (ofSubset _ hA rfl) (ofSubset _ hB rfl), ofSubset_parts, ofSubset_parts] simp only...
Mathlib/Combinatorics/SimpleGraph/Regularity/Chunk.lean
256
292