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) 2023 Dagur Asgeirsson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dagur Asgeirsson, Junyan Xu, Sophie Morel -/ import Mathlib.CategoryTheory.Limits.Creates import Mathlib.CategoryTheory.Limits.Types.Limits import Mathlib.CategoryTheory.Limits.Types...
Mathlib/CategoryTheory/Limits/Preserves/Ulift.lean
101
107
/- 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.CharP.Lemmas import Mathlib.GroupTheory.OrderOfElement /-! # Lemmas about rings of characteristic two This file contains results about `CharP R 2`,...
cast_eq_zero_iff n := by
Mathlib/Algebra/CharP/Two.lean
33
33
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Function.ConvergenceInMeasure import Mathlib.MeasureTheory.Function.L1Space.Integrable /-! # Uniform integrability This file contains the def...
theorem unifIntegrable_finite [Finite ι] (hp_one : 1 ≤ p) (hp_top : p ≠ ∞) {f : ι → α → β} (hf : ∀ i, MemLp (f i) p μ) : UnifIntegrable f p μ := by obtain ⟨n, hn⟩ := Finite.exists_equiv_fin ι intro ε hε let g : Fin n → α → β := f ∘ hn.some.symm have hg : ∀ i, MemLp (g i) p μ := fun _ => hf _ obtain ⟨δ, hδ...
Mathlib/MeasureTheory/Function/UniformIntegrable.lean
451
461
/- Copyright (c) 2023 Scott Carnahan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Carnahan -/ import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Eval.SMul /-! # Scalar-multiple polynomial ev...
theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl
Mathlib/Algebra/Polynomial/Smeval.lean
65
67
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Devon Tuma, Oliver Nash -/ import Mathlib.Algebra.Group.Action.Opposite import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.GroupWithZero.Associated import M...
theorem eq_zero_of_ne_zero_of_mul_right_eq_zero (hx : x ≠ 0) (hxy : y * x = 0) : y = 0 := Or.resolve_right (eq_zero_or_eq_zero_of_mul_eq_zero hxy) hx
Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
164
166
/- 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...
theorem cg_iff_countable [Countable (Σ l, L.Functions l)] : CG L M ↔ Countable M := by rw [cg_def, Substructure.cg_iff_countable, topEquiv.toEquiv.countable_iff] theorem cg_of_countable [Countable M] : CG L M := by simp only [cg_def, Substructure.cg_of_countable, topEquiv.toEquiv.countable_iff] theorem FG.cg (h ...
Mathlib/ModelTheory/FinitelyGenerated.lean
267
274
/- 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.MeasureTheory.Measure.GiryMonad import Mathlib.MeasureTheory.Measure.Stieltjes import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.MeasureTheory.Fu...
variable {f : α → ℚ → ℝ} /-- `a : α` is a Stieltjes point for `f : α → ℚ → ℝ` if `f a` is monotone with limit 0 at -∞ and 1 at +∞ and satisfies a continuity property. -/
Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean
66
70
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Yury Kudryashov -/ import Mathlib.Analysis.Normed.Group.Submodule import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic import Mathlib.LinearAlgebra.AffineSpace.Mid...
dist_self x := by simp dist_comm x y := by simp only [← neg_vsub_eq_vsub_rev y x, norm_neg] dist_triangle x y z := by rw [← vsub_add_vsub_cancel]
Mathlib/Analysis/Normed/Group/AddTorsor.lean
179
182
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.InnerProductSpace.Sy...
/- TODO: Move to another file? -/ open Submodule variable {K} {x y : E} theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 := by have : (⟪x, ·⟫) = 0 := (continuous_const.inner continuous_id).ext_on hK continuous_const (Subtype.forall.1 h) simpa using congr_fun this x th...
Mathlib/Analysis/InnerProductSpace/Projection.lean
921
944
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.AffineMap import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Mul import ...
instance (priority := 100) : PathConnectedSpace 𝕜 := by letI : RCLike 𝕜 := IsRCLikeNormedField.rclike 𝕜 infer_instance /-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C`, then
Mathlib/Analysis/Calculus/MeanValue.lean
413
418
/- Copyright (c) 2018 Michael Jendrusch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Jendrusch, Kim Morrison, Bhavik Mehta, Jakob von Raumer -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Functor.Trifunctor import Mathlib.CategoryTheo...
Mathlib/CategoryTheory/Monoidal/Category.lean
1,047
1,050
/- Copyright (c) 2020 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.Fin.Tuple.Basic /-! # Matrix and vector notation This file defines notation for vectors and matrices. Given `a b c d : α`, the notation a...
| Matrix.vecCons _ n x xs => do let (elems, n', tail) ← matchVecConsPrefix n xs return (x :: elems, n', tail)
Mathlib/Data/Fin/VecNotation.lean
146
148
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Jujian Zhang, Yongle Hu -/ import Mathlib.Algebra.Colimit.TensorProduct import Mathlib.Algebra.DirectSum.Finsupp import Mathlib.Algebra.DirectSum.Module import Mathlib....
let se := (Shrink.linearEquiv.{_, u} P R).symm have := Module.Finite.equiv se rw [rTensor_injective_iff_subtype (fun _ _ ↦ (Subtype.ext <| hf <| Subtype.ext_iff.mp ·)) se] exact (flat_iff R M).mp ‹_› _ (Finite.iff_fg.mp inferInstance) /-- If `M` is a flat module, then `𝟙 M ⊗ f` is injective for all injective ...
Mathlib/RingTheory/Flat/Basic.lean
123
139
/- 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, Wen Yang -/ import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mat...
theorem blockTriangular_stdBasisMatrix' {i j : m} (hij : b j ≤ b i) (c : R) : BlockTriangular (stdBasisMatrix i j c) (toDual ∘ b) := blockTriangular_stdBasisMatrix (by exact toDual_le_toDual.mpr hij) _ end Zero variable [CommRing R] [DecidableEq m]
Mathlib/LinearAlgebra/Matrix/Block.lean
152
159
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Michael Stoll -/ import Mathlib.NumberTheory.LegendreSymbol.Basic import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum /-! # Quadratic reciprocity. ## Main r...
rcases eq_or_ne p q with h | h · subst p rw [(eq_zero_iff q q).mpr (mod_cast natCast_self q), mul_zero] · have qr := congr_arg (· * legendreSym p q) (quadratic_reciprocity hp hq h) have : ((q : ℤ) : ZMod p) ≠ 0 := mod_cast prime_ne_zero p q h simpa only [mul_assoc, ← pow_two, sq_one p this, mul_one] u...
Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean
121
133
/- Copyright (c) 2021 Alena Gusakov, Bhavik Mehta, Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alena Gusakov, Bhavik Mehta, Kyle Miller -/ import Mathlib.Data.Fintype.Basic import Mathlib.Data.Fintype.Powerset import Mathlib.Data.Set.Finite.Basic /-! #...
exact ⟨isEmptyElim, isEmptyElim, isEmptyElim⟩ · have ih' : ∀ (ι' : Type u) [Fintype ι'] (t' : ι' → Finset α), Fintype.card ι' ≤ n → (∀ s' : Finset ι', #s' ≤ #(s'.biUnion t')) → ∃ f : ι' → α, Function.Injective f ∧ ∀ x, f x ∈ t' x := by intro ι' _ _ hι' ht' exact ih _ (Nat.lt_succ_of_le...
Mathlib/Combinatorics/Hall/Finite.lean
226
243
/- Copyright (c) 2021 Aaron Anderson, Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Kevin Buzzard, Yaël Dillies, Eric Wieser -/ import Mathlib.Data.Finset.Lattice.Union import Mathlib.Data.Finset.Pairwise import Mathlib.Data.Finset.Prod i...
theorem iSupIndep_def' : iSupIndep t ↔ ∀ i, Disjoint (t i) (sSup (t '' { j | j ≠ i })) := by simp_rw [sSup_image] rfl @[deprecated (since := "2024-11-24")] alias CompleteLattice.independent_def' := iSupIndep_def'
Mathlib/Order/SupIndep.lean
328
332
/- Copyright (c) 2022 Jakob von Raumer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jakob von Raumer, Kevin Klinge, Andrew Yang -/ import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Math...
universalHom f fS hf (r /ₒ s) = ((fS s)⁻¹ : Units T) * f r := rfl theorem universalHom_commutes {r : R} : universalHom f fS hf (numeratorHom r) = f r := by simp [numeratorHom_apply, universalHom_apply] theorem universalHom_unique (φ : R[S⁻¹] →+* T) (huniv : ∀ r : R, φ (numeratorHom r) = f r) : φ = univers...
Mathlib/RingTheory/OreLocalization/Ring.lean
166
173
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.NormedSpace.Multilinear.Curry /-! # Formal multilinear series In this file we define `FormalMultilinearSeries 𝕜 E F` to be a family o...
congr with ⟨i, hi⟩ exact h2 i hi hi lemma congr_zero (p : FormalMultilinearSeries 𝕜 E F) {k l : ℕ} (h : k = l) (h' : p k = 0) : p l = 0 := by subst h; exact h'
Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
124
129
/- 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.Order.Filter.SmallSets import Mathlib.Topology.UniformSpace.Defs import Mathlib.Topology.ContinuousOn /-! # Basic resu...
end Constructions /-! ### Expressing continuity properties in uniform spaces We reformulate the various continuity properties of functions taking values in a uniform space in terms of the uniformity in the target. Since the same lemmas (essentially with the same names) also exist for metric spaces and emetric spaces...
Mathlib/Topology/UniformSpace/Basic.lean
892
900
/- 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...
coe_le_iff.2 <| by rintro b rfl apply NNReal.inv_le_of_le_mul rwa [← coe_mul, ← coe_one, coe_le_coe] at hb @[simp, norm_cast]
Mathlib/Data/ENNReal/Inv.lean
54
59
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Eric Wieser -/ import Mathlib.Algebra.Group.Submonoid.Finsupp import Mathlib.Order.Filter.AtTopBot.Defs import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.Gra...
map_one' := val_one map_mul' := val_mul
Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
449
450
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Joey van Langen, Casper Putz -/ import Mathlib.Algebra.CharP.Algebra import Mathlib.Algebra.CharP.Reduced import Mathlib.Algebra.Field.ZMod import Mathlib.Data.Nat.Prime.In...
theorem card_cast_subgroup_card_ne_zero [Ring K] [NoZeroDivisors K] [Nontrivial K] (G : Subgroup Kˣ) [Fintype G] : (Fintype.card G : K) ≠ 0 := by let n := Fintype.card G intro nzero have ⟨p, char_p⟩ := CharP.exists K have hd : p ∣ n := (CharP.cast_eq_zero_iff K p n).mp nzero cases CharP.char_is_prime_or_z...
Mathlib/FieldTheory/Finite/Basic.lean
114
138
/- 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, Mario Carneiro, Johan Commelin -/ import Mathlib.NumberTheory.Padics.PadicNumbers import Mathlib.RingTheory.DiscreteValuationRing.Basic /-! # p-adic integers This f...
· refine ⟨x'.lim, fun n => ?_⟩ have : (0 : ℝ) < (p : ℝ) ^ (-n : ℤ) := zpow_pos (mod_cast hp.out.pos) _
Mathlib/NumberTheory/Padics/PadicIntegers.lean
472
473
/- Copyright (c) 2024 Raghuram Sundararajan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Raghuram Sundararajan -/ import Mathlib.Algebra.Ring.Defs import Mathlib.Algebra.Group.Ext /-! # Extensionality lemmas for rings and similar structures In this file we prove e...
rintro ⟨⟩ ⟨⟩ _; congr @[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalNonAssocCommRing R⦄ (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) : inst₁ = inst₂ :=
Mathlib/Algebra/Ring/Ext.lean
387
392
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl, Yuyang Zhao -/ import Mathlib.Algebra.Order.Monoid.Unbundled.Basic /-! # Ordered monoids This file provides the defin...
@[to_additive (attr := simp)] theorem one_lt_mul_self_iff : 1 < a * a ↔ 1 < a :=
Mathlib/Algebra/Order/Monoid/Defs.lean
172
173
/- 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...
theorem encard_mono {α : Type*} : Monotone (encard : Set α → ℕ∞) := fun _ _ ↦ encard_le_encard theorem encard_diff_add_encard_of_subset (h : s ⊆ t) : (t \ s).encard + s.encard = t.encard := by
Mathlib/Data/Set/Card.lean
169
172
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.HomCongr /-! # Restricting adjunctions `Adjunction.restrictFullyFaithful` shows that an adj...
@[simp, reassoc] lemma map_restrictFullyFaithful_counit_app (X : D) : iD.map ((adj.restrictFullyFaithful hiC hiD comm1 comm2).counit.app X) = comm1.inv.app (R.obj X) ≫ L'.map (comm2.inv.app X) ≫ adj.counit.app (iD.obj X) := by dsimp [restrictFullyFaithful]
Mathlib/CategoryTheory/Adjunction/Restrict.lean
62
67
/- 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, Floris van Doorn, Amelia Livingston, Yury Kudryashov, Neil Strickland, Aaron Anderson -/ import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algeb...
variable (hu : IsUnit x)
Mathlib/Algebra/Divisibility/Units.lean
180
182
/- 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...
W.ψ (m + 2) * W.ψ m ^ 3 - W.ψ (m - 1) * W.ψ (m + 1) ^ 3 := normEDS_odd .. lemma Affine.CoordinateRing.mk_ψ (n : ℤ) : mk W (W.ψ n) = mk W (W.Ψ n) := by
Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
484
487
/- Copyright (c) 2024 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.Cardinal.Arithmetic import Mathlib.SetTheory.Ordinal.Principal /-! # Ordinal arithmetic with cardinals This file co...
Mathlib/SetTheory/Cardinal/Ordinal.lean
347
349
/- Copyright (c) 2023 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Fangming Li, Joachim Breitner -/ import Mathlib.Algebra.Order.Group.Int import Mathlib.Algebra.Order.SuccPred.WithBot import Mathlib.Data.ENat.Lattice import Mathlib.Data....
variable {α β : Type*} variable [Preorder α] [Preorder β] @[simp] lemma height_toDual (x : α) : height (OrderDual.toDual x) = coheight x := rfl
Mathlib/Order/KrullDimension.lean
109
114
/- 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.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.RelIso.Set import Mathlib.Order.WellQuasiOrder import Mathlib.Tactic.TFAE /-! # Well-...
@[simp]
Mathlib/Order/WellFoundedSet.lean
449
450
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.InnerProductSpace.Defs impor...
Mathlib/Analysis/InnerProductSpace/Basic.lean
2,094
2,116
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow -/ import Mathlib.LinearAlgebra.Basis.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.LinearIndependent.Lemmas /-! # Sesquilinear maps ...
rwa [← separatingRight_iff_flip_ker_eq_bot] lemma disjoint_ker_of_nondegenerate_restrict {B : M →ₗ[R] M →ₗ[R] M₁} {W : Submodule R M}
Mathlib/LinearAlgebra/SesquilinearForm.lean
719
721
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Unbundled.Rat import Mathlib.Data.Rat.Lemmas import Mathlib.Data.Int.Sqrt /-!...
end Rat
Mathlib/Data/Rat/Sqrt.lean
51
52
/- Copyright (c) 2023 Alex Keizer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Keizer -/ import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc /-! This file establishes a set of normalization lemmas for `map`/`mapAccumr` operations on vectors -/ ...
use fun (s₁, s₂) s => s₂ = s ∧ s₁ = s simp_all /-- If `f` takes a pair of states, but always returns the same value for both elements of the pair, then we can simplify to just a single element of state. -/ @[simp] theorem mapAccumr₂_redundant_pair (f : α → β → (σ × σ) → (σ × σ) × γ)
Mathlib/Data/Vector/MapLemmas.lean
320
327
/- 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.Cardinal.Arithmetic import Mathlib.SetTheory.Ordinal.FixedPoint /-! # Cofinality This file co...
Mathlib/SetTheory/Cardinal/Cofinality.lean
1,174
1,180
/- 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...
simp_rw [h_eq, measureReal_def] rw [← ENNReal.tsum_toReal_eq (fun _ ↦ measure_ne_top _ _)] congr rw [iUnion_prod_const, measure_iUnion] · exact hf_disj.mono fun _ _ h ↦ h.set_prod_left _ _ · exact fun i ↦ (hf i).prod hs lemma setLIntegral_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν] (a : α)...
Mathlib/Probability/Kernel/Disintegration/Density.lean
567
605
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Kevin Buzzard, Kim Morrison, Johan Commelin, Chris Hughes, Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.Notation.Pi imp...
f ∘ g⁻¹ = (f ∘ g)⁻¹ := by ext; simp /-- Group homomorphisms preserve division. -/ @[to_additive "Additive group homomorphisms preserve subtraction."]
Mathlib/Algebra/Group/Hom/Defs.lean
431
434
/- Copyright (c) 2018 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Rémy Degenne -/ import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Order.Filter.IsBounded import Mathlib.Order.Hom.CompleteL...
csInf_le hf h theorem le_limsInf_of_le {f : Filter α} {a} (hf : f.IsCobounded (· ≥ ·) := by isBoundedDefault)
Mathlib/Order/LiminfLimsup.lean
129
132
/- Copyright (c) 2023 Alex Keizer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Keizer -/ import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc /-! This file establishes a set of normalization lemmas for `map`/`mapAccumr` operations on vectors -/ ...
let r₂ := f₂ x y s₂ let r₁ := f₁ x r₂.snd s₁ ((r₁.fst, r₂.fst), r₁.snd) ) xs ys (s₁, s₂) (m.fst.fst, m.snd) := by induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all @[simp] theorem mapAccumr₂_mapAccumr₂_right_rig...
Mathlib/Data/Vector/MapLemmas.lean
145
154
/- Copyright (c) 2021 Alex Kontorovich and Heather Macbeth and Marc Masdeu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Kontorovich, Heather Macbeth, Marc Masdeu -/ import Mathlib.Analysis.Complex.Basic import Mathlib.Data.Fintype.Parity import Mathlib.LinearAl...
Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
527
528
/- 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 -/ import Mathlib.Data.Set.Operations import Mathlib.Order.Basic import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Tauto import Mathlib.Tactic.B...
Mathlib/Data/Set/Basic.lean
2,267
2,268
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Kappelmann -/ import Mathlib.Algebra.Order.Floor.Defs import Mathlib.Algebra.Order.Floor.Ring import Mathlib.Algebra.Order.Floor.Semiring deprecated_module (sinc...
Mathlib/Algebra/Order/Floor.lean
1,610
1,617
/- Copyright (c) 2022 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic /-! # Conditional expectation of indicator functions This file proves some results about the conditi...
theorem condExp_restrict_ae_eq_restrict (hm : m ≤ m0) [SigmaFinite (μ.trim hm)] (hs_m : MeasurableSet[m] s) (hf_int : Integrable f μ) : (μ.restrict s)[f|m] =ᵐ[μ.restrict s] μ[f|m] := by have : SigmaFinite ((μ.restrict s).trim hm) := by rw [← restrict_trim hm _ hs_m]; infer_instance rw [ae_eq_restrict_iff_i...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Indicator.lean
115
140
/- Copyright (c) 2022 Rémy Degenne, Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Kexing Ying -/ import Mathlib.MeasureTheory.Function.Egorov import Mathlib.MeasureTheory.Function.LpSpace.Complete /-! # Convergence in measure We define con...
refine strictMono_nat_of_lt_succ fun n => ?_ rw [seqTendstoAeSeq_succ] exact lt_of_lt_of_le (lt_add_one <| seqTendstoAeSeq hfg n) (le_max_right _ _) end ExistsSeqTendstoAe /-- If `f` is a sequence of functions which converges in measure to `g`, then there exists a subsequence of `f` which converges a.e. to `g`....
Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean
189
234
/- 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
496
497
/- 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, Bryan Gin-ge Chen -/ import Mathlib.Order.Heyting.Basic /-! # (Generalized) Boolean algebras A Boolean algebra is a bounded distributive lattice with a complement ope...
theorem sdiff_sdiff_left' : (x \ y) \ z = x \ y ⊓ x \ z := by rw [sdiff_sdiff_left, sdiff_sup] theorem sdiff_sdiff_sup_sdiff : z \ (x \ y ⊔ y \ x) = z ⊓ (z \ x ⊔ y) ⊓ (z \ y ⊔ x) := calc z \ (x \ y ⊔ y \ x) = (z \ x ⊔ z ⊓ x ⊓ y) ⊓ (z \ y ⊔ z ⊓ y ⊓ x) := by
Mathlib/Order/BooleanAlgebra.lean
371
375
/- Copyright (c) 2019 Rohan Mitta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.Fixed...
gcongr; exacts [hf.one_sub_K_pos.le, hf.toLipschitzWith.dist_iterate_succ_le_geometric x n] theorem tendsto_iterate_fixedPoint (x) : Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| fixedPoint f hf) := by convert tendsto_iterate_efixedPoint hf (edist_ne_top x _) refine (fixedPoint_unique _ ?_).symm apply efixedP...
Mathlib/Topology/MetricSpace/Contracting.lean
293
299
/- Copyright (c) 2024 Judith Ludwig, Christian Merten. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Judith Ludwig, Christian Merten -/ import Mathlib.RingTheory.AdicCompletion.Basic import Mathlib.RingTheory.AdicCompletion.Algebra import Mathlib.Algebra.DirectSum.Bas...
simp theorem map_comp_apply (f : M →ₗ[R] N) (g : N →ₗ[R] P) (x : AdicCompletion I M) : map I g (map I f x) = map I (g ∘ₗ f) x := by
Mathlib/RingTheory/AdicCompletion/Functoriality.lean
178
181
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Johan Commelin, Andrew Yang, Joël Riou -/ import Mathlib.Algebra.Group.Basic import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero import Mathlib.CategoryTheory.Monoid...
isoWhiskerLeft _ (shiftFunctorAdd C a₂ a₃) := by ext X simpa [shiftFunctorAdd'_eq_shiftFunctorAdd] using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_assoc C a₁ a₂ a₃ _ _ _ rfl rfl rfl)) X variable {C} lemma shiftFunctorAdd'_zero_add_hom_app (a : A) (X : C) : (shiftFunctorAdd' C 0 a...
Mathlib/CategoryTheory/Shift/Basic.lean
261
277
/- 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,049
1,052
/- Copyright (c) 2022 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Bicategory.Basic /-! # Strict bicategories A bicategory is called `Strict` if the left unitors, the ri...
Mathlib/CategoryTheory/Bicategory/Strict.lean
85
88
/- Copyright (c) 2024 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.OfAssociative import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition /-! # The Lie algebra `...
lemma lie_lie_smul_f (t : IsSl2Triple h e f) : ⁅h, f⁆ = -((2 : R) • f) := by simp [t.lie_h_f_nsmul, two_smul]
Mathlib/Algebra/Lie/Sl2.lean
59
60
/- 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.MeasureTheory.MeasurableSpace.CountablyGenerated import Mathlib.Probability.Process.Filtration /-! # Filtration built from the finite partitions of a coun...
lemma iSup_partitionFiltration (ht : ∀ n, MeasurableSet (t n)) (ht_range : generateFrom (Set.range t) = m) : ⨆ n, partitionFiltration ht n = m := by rw [iSup_partitionFiltration_eq_generateFrom_range ht, ht_range]
Mathlib/Probability/Process/PartitionFiltration.lean
91
94
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex /-! # The `arctan` function. Inequalit...
rw [arccos, eq_comm] refine arctan_eq_of_tan_eq ?_ ⟨?_, ?_⟩ · rw_mod_cast [tan_pi_div_two_sub, tan_arcsin, inv_div]
Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean
187
189
/- Copyright (c) 2022 Yaël Dillies, Sara Rousta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Sara Rousta -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.Interval.Set.OrderEmbedding import Mathlib.Order.SetNotation /-! # Properties of unbundled ...
Mathlib/Order/UpperLower/Basic.lean
1,316
1,318
/- 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....
exact LinearMap.range_eq_bot.2 rfl instance : FunLike (twoCoboundaries A) (G × G) A := ⟨Subtype.val, Subtype.val_injective⟩
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
405
407
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.C...
Mathlib/FieldTheory/RatFunc/Basic.lean
1,013
1,018
/- 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.Algebra.Group.Indicator import Mathlib.Data.Int.Cast.Pi import Mathlib.Data.Nat.Cast.Basic import Mathlib.MeasureTheory.MeasurableSpace...
Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
1,075
1,079
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
Mathlib/Data/Set/Lattice.lean
1,659
1,660
/- 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.Algebra.Algebra.Basic import Mathlib.Algebra.Module.Submodule.Pointwise import Mathlib.Topology.Algebra.FilterBasis import Mathlib.Topology.Algebra.Non...
use i suffices h : { b : A | b - a ∈ B i } = (fun y => a + y) '' ↑(B i) by rw [h] assumption simp only [image_add_left, neg_add_eq_sub] ext b simp · rintro ⟨i, hi⟩ use B i constructor · use i · rw [image_subset_iff] rintro b b_in ...
Mathlib/Topology/Algebra/Nonarchimedean/Bases.lean
153
175
/- 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.Atlas import Mathlib.Geometry.Manifold.VectorBundle.Basic /-! # Unique derivative sets in manifolds ...
(hf : MDifferentiableOn I I' f s) (hd : ∀ x ∈ s, DenseRange (mfderivWithin I I' f s x)) : UniqueMDiffOn I' (f '' s) := hs.image_denseRange' (fun x hx ↦ (hf x hx).hasMFDerivWithinAt) hd protected theorem UniqueMDiffWithinAt.preimage_partialHomeomorph (hs : UniqueMDiffWithinAt I s x) {e : PartialHomeomorph...
Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
67
73
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Composition import Mathlib.Data.Matrix.ConjTranspose /-!...
ext fun _ _ => rfl section Zero variable [Zero α] [Zero β]
Mathlib/Data/Matrix/Block.lean
474
479
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq /-! # P...
lemma rpow_one_sub' (hx : 0 ≤ x) (h : 1 - y ≠ 0) : x ^ (1 - y) = x / x ^ y := by
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
445
446
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov -/ import Mathlib.Algebra.Algebra.Rat import Mathlib.Data.Nat.Prime.Int import Mathlib.Data.Rat.Sqrt imp...
Irrational (√z) ↔ ¬IsSquare z := by rw [← Rat.isSquare_intCast_iff, ← irrational_sqrt_ratCast_iff_of_nonneg (mod_cast hz), Rat.cast_intCast] theorem irrational_sqrt_intCast_iff {z : ℤ} : Irrational (√z) ↔ ¬IsSquare z ∧ 0 ≤ z := by
Mathlib/Data/Real/Irrational.lean
113
118
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Johan Commelin, Mario Carneiro -/ import Mathlib.Data.Finsupp.Lex import Mathlib.Algebra.MvPolynomial.Degrees /-! # Variables of polynomials This file establishes man...
variable [CommSemiring S]
Mathlib/Algebra/MvPolynomial/Variables.lean
222
223
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Module.Submodule.Map import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.RingTheory.Ideal.Quotient.Defs /-! # modular equivalence for submodule -...
theorem map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f] := (Submodule.Quotient.eq _).2 <| f.map_sub x y ▸ mem_map_of_mem <| (Submodule.Quotient.eq _).1 hxy theorem comap {f : M →ₗ[R] N} (hxy : f x ≡ f y [SMOD V]) : x ≡ y [SMOD V.comap f] := (Submodule.Quotient.eq _).2 <| show f (x - y) ∈ ...
Mathlib/LinearAlgebra/SModEq.lean
112
117
/- 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 ppow (f : ArithmeticFunction R) (k : ℕ) : ArithmeticFunction R := if h0 : k = 0 then ζ else ⟨fun x ↦ f x ^ k, by simp_rw [map_zero, zero_pow h0]⟩ @[simp] theorem ppow_zero {f : ArithmeticFunction R} : f.ppow 0 = ζ := by rw [ppow, dif_pos rfl] @[simp] theorem ppow_apply {f : ArithmeticFunction R} {k x : ℕ} (kpos...
Mathlib/NumberTheory/ArithmeticFunction.lean
468
475
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl, Damiano Testa, Yuyang Zhao -/ import Mathlib.Algebra.Order.Monoid.Unbundled.Defs import Mathlib.Data.Ordering.Basic imp...
a * b ≤ b ↔ a ≤ 1 := Iff.trans (by rw [one_mul]) (mul_le_mul_iff_right b) end LE
Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
474
477
/- Copyright (c) 2022 Jon Eugster. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jon Eugster -/ import Mathlib.Algebra.CharP.LocalRing import Mathlib.RingTheory.Ideal.Quotient.Basic import Mathlib.Tactic.FieldSimp /-! # Equal and mixed characteristic In commutative ...
rcases g with ⟨I, ⟨hI_not_top, _⟩⟩ -- Krull's Thm: There exists a prime ideal `M` such that `I ≤ M`. rcases Ideal.exists_le_maximal I hI_not_top with ⟨M, ⟨hM_max, hM_ge⟩⟩ use M constructor · exact hM_max · cases CharP.exists (R ⧸ M) with | intro r hr => convert hr have ...
Mathlib/Algebra/CharP/MixedCharZero.lean
112
133
/- Copyright (c) 2020 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.Fin.Tuple.Basic /-! # Matrix and vector notation This file defines notation for vectors and matrices. Given `a b c d : α`, the notation a...
@[simp] theorem empty_vecAppend (v : Fin n → α) : vecAppend n.zero_add.symm ![] v = v := by ext simp [vecAppend_eq_ite] @[simp] theorem cons_vecAppend (ho : o + 1 = m + 1 + n) (x : α) (u : Fin m → α) (v : Fin n → α) : vecAppend ho (vecCons x u) v = vecCons x (vecAppend (by omega) u v) := by ext i simp_rw ...
Mathlib/Data/Fin/VecNotation.lean
308
320
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson -/ import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset /-! # Nondeterministic Finite Automata This file contains the definition of a Nondeterministic Finite...
rw [mem_accepts, DFA.mem_accepts] constructor <;> · exact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩
Mathlib/Computability/NFA.lean
107
108
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kenny Lau -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Basic import Mathlib.RingTheory.MvPowerSer...
Mathlib/RingTheory/PowerSeries/Basic.lean
245
245
/- 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...
haveI := Fintype.ofFinite β simp only [Nat.card_eq_fintype_card, Fintype.card_sum] theorem card_image_le {s : Set α} [Finite s] (f : α → β) : Nat.card (f '' s) ≤ Nat.card s := card_le_of_surjective _ Set.surjective_onto_image theorem card_range_le [Finite α] (f : α → β) : Nat.card (Set.range f) ≤ Nat.card α := ...
Mathlib/Data/Finite/Card.lean
145
152
/- 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...
variable [CommMonoid α]
Mathlib/RingTheory/Multiplicity.lean
524
526
/- Copyright (c) 2020 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning, Junyan Xu -/ import Mathlib.Data.Fintype.Order import Mathlib.FieldTheory.IntermediateField.Adjoin.Basic /-! # Extension of field embeddings `IntermediateField.exis...
((hτ i).2 ⟨x, hx⟩).trans ((hσ i).2 ⟨x, hx⟩).symm⟩ /-- `σ : L →ₐ[F] K` is an extendible lift ("extendible pair" in [Isaacs1980]) if for every intermediate field `M` that is finite-dimensional over `L`, `σ` extends to some `M →ₐ[F] K`.
Mathlib/FieldTheory/Extension.lean
92
95
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen, Antoine Labelle -/ import Mathlib.LinearAlgebra.Contraction import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib....
trace R (M × N) (prodMap f g) = trace R M f + trace R N g := by have h := LinearMap.ext_iff.1 (trace_prodMap R M N) (f, g) simp only [coe_comp, Function.comp_apply, prodMap_apply, coprod_apply, id_coe, id, prodMapLinear_apply] at h exact h variable (R M N P) open TensorProduct Function theorem trace_te...
Mathlib/LinearAlgebra/Trace.lean
207
221
/- Copyright (c) 2021 Julian Kuelshammer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Kuelshammer -/ import Mathlib.Algebra.CharP.Algebra import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.CharP.Lemmas import Mathlib.Algebra.EuclideanDomain.Field ...
(dickson 1 (1 : R) m).comp (dickson 1 1 n) = (dickson 1 1 n).comp (dickson 1 1 m) := by rw [← dickson_one_one_mul, mul_comm, dickson_one_one_mul] theorem dickson_one_one_zmod_p (p : ℕ) [Fact p.Prime] : dickson 1 (1 : ZMod p) p = X ^ p := by -- Recall that `dickson_one_one_eval_add_inv` characterises `dickson 1...
Mathlib/RingTheory/Polynomial/Dickson.lean
196
262
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Tape import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.PFun import M...
Mathlib/Computability/TuringMachine.lean
1,804
1,820
/- Copyright (c) 2024 Mitchell Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mitchell Lee, Óscar Álvarez -/ import Mathlib.GroupTheory.Coxeter.Length import Mathlib.Data.List.GetD import Mathlib.Tactic.Group /-! # Reflections, inversions, and inversion sequences...
theorem leftInvSeq_concat (ω : List B) (i : B) : lis (ω.concat i) = (lis ω).concat ((π ω) * (s i) * (π ω)⁻¹) := by
Mathlib/GroupTheory/Coxeter/Inversion.lean
227
229
/- 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.Single import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex /-! # The homology of single complexes The main definition in this file ...
@[reassoc (attr := simp)] lemma homologyπ_singleObjHomologySelfIso_hom : ((single C c j).obj A).homologyπ j ≫ (singleObjHomologySelfIso _ _ _).hom = (singleObjCyclesSelfIso _ _ _).hom := by simp [singleObjCyclesSelfIso, singleObjHomologySelfIso]
Mathlib/Algebra/Homology/SingleHomology.lean
70
74
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq /-! # P...
theorem exp_mul (x y : ℝ) : exp (x * y) = exp x ^ y := by rw [rpow_def_of_pos (exp_pos _), log_exp] @[simp, norm_cast] theorem rpow_intCast (x : ℝ) (n : ℤ) : x ^ (n : ℝ) = x ^ n := by simp only [rpow_def, ← Complex.ofReal_zpow, Complex.cpow_intCast, Complex.ofReal_intCast,
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
49
53
/- Copyright (c) 2020 Bryan Gin-ge Chen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Gin-ge Chen, Kevin Lacker -/ import Mathlib.Tactic.Ring /-! # Identities This file contains some "named" commutative ring identities. -/ variable {R : Type*} [CommRing R] ...
ring /-- Brahmagupta's identity, see <https://en.wikipedia.org/wiki/Brahmagupta%27s_identity>
Mathlib/Algebra/Ring/Identities.lean
24
26
/- Copyright (c) 2014 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Cast.Order.Basic import Math...
add_zero := add_zero add_assoc := by transfer
Mathlib/Data/Num/Lemmas.lean
342
343
/- 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 -/ import Batteries.Data.Nat.Gcd import Mathlib.Algebra.BigOperators.Group.Finset.Defs /-! # Lemmas about coprimality with big products. These lemmas ...
Coprime k l.prod ↔ ∀ n ∈ l, Coprime k n := by simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff]
Mathlib/Data/Nat/GCD/BigOperators.lean
24
26
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathli...
theorem coe_image_subset_range : ↑(s.image f) ⊆ Set.range f := calc ↑(s.image f) = f '' ↑s := coe_image _ ⊆ Set.range f := Set.image_subset_range f ↑s
Mathlib/Data/Finset/Image.lean
392
395
/- Copyright (c) 2021 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Adjoint of operators on Hilbert spaces Given ...
lemma _root_.LinearIsometryEquiv.adjoint_eq_symm (e : H ≃ₗᵢ[𝕜] K) : adjoint (e : H →L[𝕜] K) = e.symm := let e' := (e : H →L[𝕜] K) calc adjoint e' = adjoint e' ∘L (e' ∘L e.symm) := by
Mathlib/Analysis/InnerProductSpace/Adjoint.lean
476
480
/- 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 -/ import Batteries.Data.Nat.Gcd import Mathlib.Algebra.Group.Nat.Units import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.GroupWi...
theorem Coprime.eq_of_mul_eq_zero {m n : ℕ} (h : m.Coprime n) (hmn : m * n = 0) :
Mathlib/Data/Nat/GCD/Basic.lean
212
213
/- 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...
section Order variable {G'' G' : Type*} [NormedAddCommGroup G'] [PartialOrder G'] [IsOrderedAddMonoid G'] [NormedSpace ℝ G'] [NormedAddCommGroup G''] [PartialOrder G''] [IsOrderedAddMonoid G''] [NormedSpace ℝ G''] {T : Set α → G'' →L[ℝ] G'}
Mathlib/MeasureTheory/Integral/SetToL1.lean
223
228
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Order.Bounds.Defs import Mathlib.Order.Directed import Mathlib.Order.BoundedOrder.Monotone import Mathlib.Order.Interval.Set.Basic /-...
end PartialOrder
Mathlib/Order/Bounds/Basic.lean
888
889
/- Copyright (c) 2022 Yaël Dillies, Sara Rousta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Sara Rousta -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.Interval.Set.OrderEmbedding import Mathlib.Order.SetNotation /-! # Properties of unbundled ...
Mathlib/Order/UpperLower/Basic.lean
915
916
/- 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.LinearAlgebra.AffineSpace.Independent import Mathlib.LinearAlgebra.AffineSpace.Pointwise import Mathlib.LinearAlgebra.Basis.SMul /-! # Affine bases and bary...
/-- TODO: generalize to include `SMul (P ≃ᵃ[k] P) (AffineBasis ι k P)`, which acts on `P` with a `VAdd` version of a `DistribMulAction`. -/ instance [SMul G G'] [IsScalarTower G G' V] : IsScalarTower G G' (AffineBasis ι k V) where smul_assoc _g _g' _b := DFunLike.ext _ _ fun _ => smul_assoc _ _ _
Mathlib/LinearAlgebra/AffineSpace/Basis.lean
297
301
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.MeasureTheory.Measure.Typeclasses.Finite import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms import Mathlib.MeasureTheory.Measure....
Mathlib/MeasureTheory/Measure/Typeclasses.lean
307
309
/- 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.Data.Finite.Sum import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.Finiteness.Ideal import Mathlib.RingTheory.Ideal.Quotient.Operations imp...
/-- Induction principle for finitely presented ring homomorphisms. For a property to hold for all finitely presented ring homs, it suffices for it to hold for
Mathlib/RingTheory/FinitePresentation.lean
451
454
/- 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.Group.Conj import Mathlib.Algebra.Group.Subgroup.Lattice import Mathlib.Algebra.Group.Submonoid.BigOperators import Mathlib.Data.Finset.Fin import ...
refine Or.inl ⟨l.mem_cons_self, ?_⟩ rw [prodExtendRight_apply_eq] · refine Or.inr ⟨fun h => not_or_intro ha' not_mem_l ((List.mem_cons).mp h), ?_⟩ rw [prodExtendRight_apply_ne _ ha'] section congr variable [DecidableEq β] [Fintype β] @[simp] theorem sign_prodExtendRight (a : α) (σ : Perm β) : sign (pro...
Mathlib/GroupTheory/Perm/Sign.lean
526
545
/- 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.Trim import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated /-! # Almost everywhere measurable functions A funct...
rw [uIoc_eq_union, aemeasurable_union_iff] theorem aemeasurable_iff_measurable [μ.IsComplete] : AEMeasurable f μ ↔ Measurable f := ⟨fun h => h.nullMeasurable.measurable_of_complete, fun h => h.aemeasurable⟩ theorem MeasurableEmbedding.aemeasurable_map_iff {g : β → γ} (hf : MeasurableEmbedding f) : AEMeasurabl...
Mathlib/MeasureTheory/Measure/AEMeasurable.lean
232
239
/- 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.Order.Compact import Mathlib.Topology.MetricSpace.ProperSpace import M...
tendsto_iff_comap.2 (comap_dist_right_atTop c).ge theorem tendsto_dist_left_cobounded_atTop (c : α) : Tendsto (dist c) (cobounded α) atTop :=
Mathlib/Topology/MetricSpace/Bounded.lean
137
139
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.Convex.Deriv /-! # The function `x ↦ ...
not_continuousAt_of_tendsto tendsto_deriv_mul_log_nhdsWithin_zero nhdsWithin_le_nhds (by simp) lemma deriv2_mul_log (x : ℝ) : deriv^[2] (fun x ↦ x * log x) x = x⁻¹ := by
Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
109
111