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) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.ChartedSpace /-! # Local properties invariant under a groupoid We study properties of a triple `(g, s, x)` ...
[TopologicalSpace H₃] [ChartedSpace H₁ H₂] [ChartedSpace H₂ H₃] {G₁ : StructureGroupoid H₁} [HasGroupoid H₂ G₁] [ClosedUnderRestriction G₁] (G₂ : StructureGroupoid H₂) [HasGroupoid H₃ G₂] theorem HasGroupoid.comp (H : ∀ e ∈ G₂, LiftPropOn (IsLocalStructomorphWithinAt G₁) (e : H₂ → H₂) e.source) : @HasGroup...
Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
648
666
/- 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.Finite.Defs import Mathlib.Data.Finset.BooleanAlgebra import Mathlib.Data.Finset.Image import Mathlib.Data.Fintype.Defs import Mathlib.Data.Fintyp...
Mathlib/Data/Fintype/Basic.lean
763
766
/- Copyright (c) 2021 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.MeasureTheory.Measure.FiniteMeasure import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Measure.Prod /-! # Probability measures Th...
theorem normalize_testAgainstNN (nonzero : μ ≠ 0) (f : Ω →ᵇ ℝ≥0) : μ.normalize.toFiniteMeasure.testAgainstNN f = μ.mass⁻¹ * μ.testAgainstNN f := by
Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
443
445
/- 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...
LeftInvOn (fun x ↦ (g₁ x.1, g₂ x.2)) (fun x ↦ (f₁ x.1, f₂ x.2)) (s₁ ×ˢ s₂) := fun _x hx ↦ Prod.ext (h₁ hx.1) (h₂ hx.2) lemma RightInvOn.prodMap (h₁ : RightInvOn g₁ f₁ t₁) (h₂ : RightInvOn g₂ f₂ t₂) : RightInvOn (fun x ↦ (g₁ x.1, g₂ x.2)) (fun x ↦ (f₁ x.1, f₂ x.2)) (t₁ ×ˢ t₂) :=
Mathlib/Data/Set/Function.lean
1,220
1,224
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stephen Morgan, Kim Morrison, Johannes Hölzl, Reid Barton -/ import Mathlib.CategoryTheory.Category.Init import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Tactic.PPWithUniv import...
subst h; exact mono_of_mono f g theorem epi_of_epi {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [Epi (f ≫ g)] : Epi g := ⟨fun _ _ w => (cancel_epi (f ≫ g)).1 <| by simp only [Category.assoc, w]⟩ theorem epi_of_epi_fac {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} {h : X ⟶ Z} [Epi h]
Mathlib/CategoryTheory/Category/Basic.lean
325
330
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Sébastien Gouëzel, Patrick Massot -/ import Mathlib.Topology.UniformSpace.Cauchy import Mathlib.Topology.UniformSpace.Separation import Mathlib.Topology.DenseEmbedding ...
theorem IsUniformInducing.of_comp_iff {g : β → γ} (hg : IsUniformInducing g) {f : α → β} : IsUniformInducing (g ∘ f) ↔ IsUniformInducing f := by
Mathlib/Topology/UniformSpace/UniformEmbedding.lean
67
68
/- 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.Analysis.SpecialFunctions.Complex.Log import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots /-! # Complex roots of unity In this file we show that th...
· rintro ⟨i, -, hi, rfl⟩; exact isPrimitiveRoot_exp_of_coprime i n hn hi intro h have : NeZero n := ⟨hn⟩ obtain ⟨i, hi, rfl⟩ := (isPrimitiveRoot_exp n hn).eq_pow_of_pow_eq_one h.pow_eq_one refine ⟨i, hi, ((isPrimitiveRoot_exp n hn).pow_iff_coprime (Nat.pos_of_ne_zero hn) i).mp h, ?_⟩ rw [← exp_nat_mul] ...
Mathlib/RingTheory/RootsOfUnity/Complex.lean
58
69
/- 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.Basic import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor /-! Sequences of functors from a category equipped with a shift Let `F : C...
(shiftIso F m a' a'' ha'').hom.app X := by simp [F.shiftIso_add n m a a' a'' ha' ha''] lemma shiftIso_add_inv_app (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') (X : C) : (F.shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha''])).inv.app X = (shiftIso F m a' a'' ha'').inv.app X ≫
Mathlib/CategoryTheory/Shift/ShiftSequence.lean
148
153
/- 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...
top_le_sup_compl a := a.or_not_self.ge
Mathlib/Order/BooleanAlgebra.lean
741
742
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, David Kurniadi Angdinata -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.CubicDiscriminant import Mathlib.RingTheory.Nilpotent.Defs import Mathlib.Tactic.Fiel...
lemma j_eq_zero (h : W.c₄ = 0) : W.j = 0 := by rw [j_eq_zero_iff', h, zero_pow three_ne_zero]
Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
384
387
/- Copyright (c) 2021 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.GroupTheory.Coset.Basic /-! # Double cosets This file defines double cosets for two subgroups `H K` o...
rw [rel_iff, QuotientGroup.rightRel_apply] constructor · rintro ⟨b, hb, a, rfl : a = 1, rfl⟩ rwa [mul_one, mul_inv_cancel_right] · rintro (h : b * a⁻¹ ∈ H) exact ⟨b * a⁻¹, h, 1, rfl, by rw [mul_one, inv_mul_cancel_right]⟩ /-- Create a doset out of an element of `H \ G / K` -/ def quotToDoset (H K : Sub...
Mathlib/GroupTheory/DoubleCoset.lean
93
102
/- 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.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Size import Batteries.Data.Int /-! # Bitwise operations on integers Possi...
simp only [negSucc_eq, ← Int.natCast_succ, bodd_neg, bodd_coe, Nat.bodd_mul] theorem bodd_add_div2 : ∀ n, cond (bodd n) 1 0 + 2 * div2 n = n | (n : ℕ) => by rw [show (cond (bodd n) 1 0 : ℤ) = (cond (bodd n) 1 0 : ℕ) by cases bodd n <;> rfl]
Mathlib/Data/Int/Bitwise.lean
145
149
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, Amelia Livingston, Yury Kudryashov -/ import Mathlib.Algebra.Group.Action.Faithful import Mathlib.Algebra.Grou...
Mathlib/Algebra/Group/Submonoid/Operations.lean
1,164
1,166
/- 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.Algebra.BigOperators.Group.Finset.Sigma import Mathlib.Algebra.Order.Interval.Finset.Basic import Mathlib.Order.Interval.Finset.Nat import Mathlib.Tact...
rw [Icc_eq_cons_Ico h, prod_cons] @[to_additive]
Mathlib/Algebra/BigOperators/Intervals.lean
30
32
/- 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.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Orde...
apply Set.mem_range_self apply h (Set.range a) · use a 37 apply Set.mem_range_self · rintro x ⟨m, hm⟩ y ⟨n, hn⟩ use m ⊔ n rw [← hm, ← hn] apply RelHomClass.map_sup a theorem isSupFiniteCompact_iff_all_elements_compact : IsSupFiniteCompact α ↔ ∀ k : α, IsCompactElement k :=...
Mathlib/Order/CompactlyGenerated/Basic.lean
227
245
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic /-! # Extending an alternating map to the exterior algebra ## Main de...
invFun F i := F.compAlternatingMap (ιMulti R i) left_inv _ := funext fun _ => liftAlternating_comp_ιMulti _ right_inv F := (liftAlternating_comp _ _).trans <| by rw [liftAlternating_ιMulti, LinearMap.comp_id] /-- To show that two linear maps from the exterior algebra agree, it suffices to show they agree on ...
Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean
138
147
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Data.Complex.Basic import Mathlib.Data.Nat.Prime.Basic import Mathlib.Data.Real.Archimedean import Mathlib.NumberTheory.Zsqrtd.Basic /-! # Gaussian intege...
theorem to_real_re (x : ℤ[i]) : ((x.re : ℤ) : ℝ) = (x : ℂ).re := by simp [toComplex_def]
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
81
81
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Data.Set.SymmDiff import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Irreducible /-! # Connected subsets ...
⟨range_nonempty f, isPreconnected_range h⟩ theorem Function.Surjective.connectedSpace [ConnectedSpace α] [TopologicalSpace β] {f : α → β} (hf : Surjective f) (hf' : Continuous f) : ConnectedSpace β := by rw [connectedSpace_iff_univ, ← hf.range_eq] exact isConnected_range hf' instance Quotient.instConnectedS...
Mathlib/Topology/Connected/Basic.lean
641
652
/- Copyright (c) 2023 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.Normal....
have hx := congr_arg (Polynomial.aeval x) h.symm rw [minpoly.aeval, map_sub, map_pow, aeval_X, aeval_C, sub_eq_zero, eq_comm] at hx use n rw [h, Polynomial.map_sub, Polynomial.map_pow, map_X, map_C, hx, map_pow,
Mathlib/FieldTheory/SeparableDegree.lean
668
671
/- Copyright (c) 2021 Lu-Ming Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lu-Ming Zhang -/ import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker /-! # Diagonal matrices This file co...
intro i j h simp [ha h] @[simp]
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
92
95
/- 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 ...
· interval_cases n <;> simp only [Nat.succ_eq_add_one] <;> ring_nf <;> try simp only [coeffs] · rw [coeff_eq_zero hn, (degree_le_iff_coeff_zero (f : R[X]) 3).mp f.2] simpa using hn
Mathlib/Algebra/CubicDiscriminant.lean
250
252
/- 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.Set.Function import Mathlib.Logic.Pairwise import Mathlib.Logic.Relation /-! # Relations holding pairwise This file develops pairwise relations ...
forall_mem_image.2 fun _x hx ↦ forall_mem_image.2 fun _y hy hne ↦ h hx hy <| ne_of_apply_ne _ hne
Mathlib/Data/Set/Pairwise/Basic.lean
193
193
/- 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...
@[simp] theorem replicateRow_eq_zero [Zero α] [Nonempty ι] (v : n → α) : replicateRow ι v = 0 ↔ v = 0 := replicateRow_inj
Mathlib/Data/Matrix/RowCol.lean
112
114
/- Copyright (c) 2022 Niels Voss. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Niels Voss -/ import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.FieldTheory.Finite.Basic import Mathlib.Order.Filter.Cofinite /-! # Fermat Pseudoprimes In this file we define...
Mathlib/NumberTheory/FermatPsp.lean
371
375
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.ContinuousMap.Bounded.Normed import Mathlib.Topology.UrysohnsBounded /-! # Tietze extension theore...
such that the distance between `g ∘ e` and `f` is at most `(2 / 3) * ‖f‖`. -/ theorem tietze_extension_step (f : X →ᵇ ℝ) (e : C(X, Y)) (he : IsClosedEmbedding e) : ∃ g : Y →ᵇ ℝ, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (g.compContinuous e) f ≤ 2 / 3 * ‖f‖ := by have h3 : (0 : ℝ) < 3 := by norm_num1 have h23 : 0 < (2 / 3 : ℝ) := by...
Mathlib/Topology/TietzeExtension.lean
169
213
/- 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...
Mathlib/Data/Complex/Exponential.lean
858
859
/- Copyright (c) 2022 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Heather Macbeth -/ import Mathlib.Data.Nat.Cast.WithTop import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.RingTheory.WittVector.DiscreteValuationRing /-! #...
simpa only [Ne, map_zero] using (IsFractionRing.injective (𝕎 k) (FractionRing (𝕎 k))).ne hq''' rw [zpow_sub₀ (FractionRing.p_nonzero p k)] field_simp [FractionRing.p_nonzero p k] convert congr_arg (fun x => algebraMap (𝕎 k) (FractionRing (𝕎 k)) x) key using 1 · simp only [RingHom.map_mul, RingHom....
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
241
267
/- 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
88
89
/- Copyright (c) 2023 Shogo Saito. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shogo Saito. Adapted for mathlib by Hunter Monroe -/ import Mathlib.Data.Nat.ModEq import Mathlib.Data.Nat.ChineseRemainder import Mathlib.Data.Nat.Prime.Defs import Mathlib.Data.Nat.Pai...
-/ namespace Nat lemma coprime_mul_succ {n m a} (ha : m - n ∣ a) : Coprime (n * a + 1) (m * a + 1) := Nat.coprime_of_dvd fun p pp hn hm => by have : p ∣ (m - n) * a := by simpa [Nat.succ_sub_succ, ← Nat.mul_sub_right_distrib] using Nat.dvd_sub hm hn have : p ∣ a := by rcases (Nat.Prime.d...
Mathlib/Logic/Godel/GodelBetaFunction.lean
45
55
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic /-! # Extending an alternating map to the exterior algebra ## Main de...
ext v dsimp induction v using CliffordAlgebra.left_induction with | algebraMap => rw [liftAlternating_algebraMap, ιMulti_zero_apply, Algebra.algebraMap_eq_smul_one] | add _ _ hx hy => rw [map_add, hx, hy] | ι_mul _ _ hx => simp_rw [liftAlternating_ι_mul, ιMulti_succ_curryLeft, liftAlternating_comp, Li...
Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean
124
134
/- Copyright (c) 2022 Benjamin Davidson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Benjamin Davidson, Devon Tuma, Eric Rodriguez, Oliver Nash -/ import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.Order.Filter.AtTopBot.Field import Mathlib.Topolog...
(hB : ∀ᶠ x in l, f x ≤ B) (hg : Tendsto g l (𝓝 0)) : Tendsto (fun x ↦ f x * g x) l (𝓝 0) := by set C := max |b| |B| have hbC : -C ≤ b := neg_le.mpr (le_max_of_le_left (neg_le_abs b)) have hBC : B ≤ C := le_max_of_le_right (le_abs_self B) apply bdd_le_mul_tendsto_zero' C _ hg
Mathlib/Topology/Algebra/Order/Field.lean
228
233
/- 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...
sup_inf_sdiff s t
Mathlib/Data/Set/Basic.lean
1,124
1,125
/- 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.Data.Finset.NatAntidiagonal import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Big operators for `NatAntidiagonal` This file contains theor...
(∑ p ∈ antidiagonal (n + 1), f p) = f (n + 1, 0) + ∑ p ∈ antidiagonal n, f (p.1, p.2 + 1) := @prod_antidiagonal_succ' (Multiplicative N) _ _ _ @[to_additive]
Mathlib/Algebra/BigOperators/NatAntidiagonal.lean
42
45
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Jens Wagemaker -/ import Mathlib.Algebra.Ring.Associated import Mathlib.Algebra.Ring.Regular /-! # Monoids with normalization functions, `gcd`, and `lcm` This file de...
toFun := Associates.out invFun := Associates.mk left_inv := Associates.mk_out right_inv _ := (Associates.out_mk _).trans <| normalize_eq _ map_mul' := Associates.out_mul end UniqueUnit section IsDomain variable [CommRing α] [IsDomain α] [NormalizedGCDMonoid α] theorem gcd_eq_of_dvd_sub_right {a b c : α} (...
Mathlib/Algebra/GCDMonoid/Basic.lean
863
875
/- 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.Ordmap.Invariants /-! # Verification of `Ordnode` This file uses the invariants defined in `Mathlib.Data.Ordmap.Invariants` to construct `Ordset...
· rw [splitMin_eq] · obtain ⟨v, e⟩ := Valid'.eraseMin_aux hr
Mathlib/Data/Ordmap/Ordset.lean
419
420
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yury Kudryashov, Sébastien Gouëzel, Chris Hughes -/ import Mathlib.Data.Fin.Rev import Mathlib.Data.Nat.Find /-! # Operation on tuples We interpret maps `∀ i : Fi...
exact h ⟨j, hj⟩ hpj · exact Option.not_mem_none _ hi · rw [h] at hi dsimp at hi obtain rfl := Option.some_inj.1 hi exact find_min h (show (⟨j, lt_trans hj k.2⟩ : Fin n) < k from hj) hpj theorem find_min' {p : Fin n → Prop} [DecidablePred p] {i : Fin n} (h : i ∈ Fin.find p) {j : Fin ...
Mathlib/Data/Fin/Tuple/Basic.lean
1,049
1,064
/- Copyright (c) 2023 Andrew Yang, Patrick Lutz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots import Mathlib.FieldTheory.Galois.Basic import Mathlib.FieldTheory.KummerPolynomial import Mathlib.Linea...
Irreducible (X ^ n - C a) ↔ (∀ p : ℕ, p.Prime → p ∣ n → ∀ b : K, b ^ p ≠ a) := ⟨fun e _ hp hpn ↦ pow_ne_of_irreducible_X_pow_sub_C e hpn hp.ne_one, X_pow_sub_C_irreducible_of_odd hn⟩ theorem X_pow_sub_C_irreducible_iff_of_odd {n : ℕ} (hn : Odd n) {a : K} : Irreducible (X ^ n - C a) ↔ (∀ d, d ∣ n → d ≠ 1 ...
Mathlib/FieldTheory/KummerExtension.lean
122
128
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.CategoryTheory.Abelian.Exact import Mathlib.CategoryTheory.Comma.Over.Basic import Mathlib.Algebra.Category.ModuleCat.EpiMono /-! # Pseudoelements in ab...
-/ section
Mathlib/CategoryTheory/Abelian/Pseudoelements.lean
193
197
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Data.Finset.NAry import Mathlib.Data.Finset.Slice import Mathlib.Data.Set.Sups /-! # Set family operations This file defines a few binary operations on `...
exact fun ⟨_, _, _, b, hb, _⟩ => ⟨b, hb⟩ @[simp] theorem disjSups_empty_left : ∅ ○ t = ∅ := by simp [disjSups] @[simp] theorem disjSups_empty_right : s ○ ∅ = ∅ := by simp [disjSups]
Mathlib/Data/Finset/Sups.lean
444
450
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Order.Antidiag.Prod import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.Multiset.NatAntidiagonal /-! # Antidiagonals in ℕ × ℕ as finset...
(Embedding.prodMap ⟨Nat.succ, Nat.succ_injective⟩ (Embedding.refl _))) (by simp) := by apply eq_of_veq rw [cons_val, map_val] apply Multiset.Nat.antidiagonal_succ theorem antidiagonal_succ' (n : ℕ) : antidiagonal (n + 1) = cons (n + 1, 0)
Mathlib/Data/Finset/NatAntidiagonal.lean
67
75
/- 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.InnerProductSpace.Orientation import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar /-! # Volume forms and measures on inner product spa...
theorem PiLp.volume_preserving_equiv_symm : MeasurePreserving (WithLp.equiv 2 (ι → ℝ)).symm := (EuclideanSpace.volume_preserving_measurableEquiv ι).symm lemma volume_euclideanSpace_eq_dirac [IsEmpty ι] : (volume : Measure (EuclideanSpace ℝ ι)) = Measure.dirac 0 := by rw [← ((EuclideanSpace.volume_preserving_me...
Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean
138
143
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.TensorProduct.Graded.External import Mathlib.RingTheory.GradedAlgebra.Basic /-! # Graded tensor products over graded algebras The graded tens...
((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B)) := by rw [tmul_coe_mul_coe_tmul, mul_zero, uzpow_zero, one_smul] theorem tmul_one_mul_coe_tmul {i₂ : ι} (a₁ : A) (a₂ : 𝒜 i₂) (b₂ : B) :
Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
207
210
/- Copyright (c) 2020 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri, Andrew Yang -/ import Mathlib.RingTheory.Derivation.ToSquareZero import Mathlib.RingTheory.Ideal.Cotangent import Mathlib.RingTheory.IsTensorProduct import Mathlib....
KaehlerDifferential.derivationQuotKerTotal R S x = 1𝖣x := rfl theorem KaehlerDifferential.derivationQuotKerTotal_lift_comp_linearCombination : (KaehlerDifferential.derivationQuotKerTotal R S).liftKaehlerDifferential.comp (Finsupp.linearCombination S (KaehlerDifferential.D R S)) = Submodule.mkQ...
Mathlib/RingTheory/Kaehler/Basic.lean
556
563
/- 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 [← encard_union_eq disjoint_compl_right, union_compl_self] end Lattice
Mathlib/Data/Set/Card.lean
243
245
/- 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.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine /-! # Oriented an...
theorem _root_.Sbtw.oangle_sign_eq_left {p₁ p₂ p₃ : P} (p₄ : P) (h : Sbtw ℝ p₁ p₂ p₃) : (∡ p₁ p₄ p₂).sign = (∡ p₁ p₄ p₃).sign := h.wbtw.oangle_sign_eq_of_ne_left _ h.left_ne /-- Given three points in weak order on the same line, with the second not equal to the third, and a fourth point, the angles at the fourth...
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
687
763
/- Copyright (c) 2020 Zhangir Azerbayev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Zhangir Azerbayev -/ import Mathlib.GroupTheory.Perm.Sign import Mathlib.LinearAlgebra.LinearIndependent.Defs import Mathlib.LinearAlgebra.Multilinear.Basis /-! # Alte...
right_inv f := AlternatingMap.ext fun _ => f.congr_arg <| funext fun _ => e.apply_symm_apply _ @[simp]
Mathlib/LinearAlgebra/Alternating/Basic.lean
558
560
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen -/ import Mathlib.Algebra.Algebra.Subalgebra.Tower import Mathlib.Data.Finite.Sum import Mathlib.Data.Matrix.Block import Mathl...
theorem LinearMap.toMatrix_basis_equiv [Fintype l] [DecidableEq l] (b : Basis l R M₁) (b' : Basis l R M₂) : LinearMap.toMatrix b' b (b'.equiv b (Equiv.refl l) : M₂ →ₗ[R] M₁) = 1 := by
Mathlib/LinearAlgebra/Matrix/ToLin.lean
582
584
/- 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, Yuyang Zhao -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calcu...
by_cases hsx : UniqueDiffWithinAt 𝕜 s x · exact (hl.hasFDerivWithinAt.comp_hasDerivWithinAt x hf.hasDerivWithinAt hs).derivWithin hsx · simp [derivWithin_zero_of_not_uniqueDiffWithinAt hsx]
Mathlib/Analysis/Calculus/Deriv/Comp.lean
382
385
/- 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...
Mathlib/Data/Set/Function.lean
1,906
1,915
/- Copyright (c) 2021 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.Module.Algebra import Mathlib.Algebra.Ring.Subring.Units import Mathlib.LinearAlgebra.LinearIndepende...
theorem exists_nonneg_left (h : SameRay R x y) (hx : x ≠ 0) : ∃ r : R, 0 ≤ r ∧ r • x = y := by obtain rfl | hy := eq_or_ne y 0 · exact ⟨0, le_rfl, zero_smul _ _⟩
Mathlib/LinearAlgebra/Ray.lean
577
579
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.MonoidAlgebra.Defs import Mathlib.Algebra.Order.Mon...
rintro p ⟨n, a, rfl⟩
Mathlib/Algebra/Polynomial/Basic.lean
731
731
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.Exact import Mathlib.CategoryTheory.ComposableArrows /-! # Exact sequences A sequence of `n` composable arrows `S : ComposableArr...
two consecutive arrows are zero. -/ structure IsComplex : Prop where /-- the composition of two consecutive arrows is zero -/ zero (i : ℕ) (hi : i + 2 ≤ n := by omega) :
Mathlib/Algebra/Homology/ExactSequence.lean
72
75
/- Copyright (c) 2019 Jan-David Salchow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo -/ import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear /-! # Operator norm: Cartesian products Interaction of operator norm wit...
/-- The operator norm of the second projection `E × F → F` is at most 1. (It is 0 if `F` is zero, so the inequality cannot be improved without further assumptions.) -/ lemma norm_snd_le : ‖snd 𝕜 E F‖ ≤ 1 := opNorm_le_bound _ zero_le_one (fun ⟨e, f⟩ ↦ by simpa only [one_mul] using le_max_right ‖e‖ ‖f‖)
Mathlib/Analysis/NormedSpace/OperatorNorm/Prod.lean
34
37
/- Copyright (c) 2021 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Eric Rodriguez -/ import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Nat.Cast.Order.Basic import Mathlib.Data.Nat.Choose.Basic /-...
/-- This lemma was changed on 2024/08/29, the old statement is available in `Nat.choose_le_pow_div`. -/ lemma choose_le_pow (n k : ℕ) : n.choose k ≤ n ^ k := (choose_le_descFactorial n k).trans (descFactorial_le_pow n k) -- horrific casting is due to ℕ-subtraction
Mathlib/Data/Nat/Choose/Bounds.lean
41
46
/- 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 -/ ...
map f xs = (mapAccumr (fun x (_ : Unit) ↦ ((), f x)) xs ()).snd := by induction xs using Vector.revInductionOn <;> simp_all /-- If there is a set of states that is closed under `f`, and such that `f` produces that same output for all states in this set, then the state is not actually needed. Hence, then we can r...
Mathlib/Data/Vector/MapLemmas.lean
234
241
/- 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, Yury Kudryashov -/ import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.OrderDual import Mathlib.Tactic.Lift...
| 0, hn => (hn rfl).elim | 1, _ => by simpa | Nat.succ <| Nat.succ n, _ => by simpa only [pow_succ] using (hf.pow_const n.succ_ne_zero).mul' hf
Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
136
140
/- Copyright (c) 2019 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot, Wen Yang, Johan Commelin -/ import Mathlib.Data.Set.Finite.Range import Mathlib.Order.Partition.Finpartition /-! # Equivalenc...
instance Partition.le : LE (Subtype (@IsPartition α)) := ⟨fun x y => mkClasses x.1 x.2.2 ≤ mkClasses y.1 y.2.2⟩ /-- Defining a partial order on partitions as the partial order on their induced equivalence relations. -/ instance Partition.partialOrder : PartialOrder (Subtype (@IsPartition α)) where le := (· ≤ ·...
Mathlib/Data/Setoid/Partition.lean
237
243
/- 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 x - expNear m x 0| ≤ |x| ^ m / m.factorial * ((m + 1) / m) := by simp only [expNear, mul_zero, add_zero]
Mathlib/Data/Complex/Exponential.lean
575
576
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Kim Morrison, Jakob von Raumer -/ import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic /-! # The symmetric monoid...
@[simp] theorem hexagon_forward (X Y Z : ModuleCat.{u} R) : (α_ X Y Z).hom ≫ (braiding X _).hom ≫ (α_ Y Z X).hom = (braiding X Y).hom ▷ Z ≫ (α_ Y X Z).hom ≫ Y ◁ (braiding X Z).hom := by
Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean
49
52
/- 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....
Mathlib/Data/Fin/Basic.lean
1,741
1,747
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.Cast.Order.Basic import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Order.Nat import Mathli...
(castOrderEmbedding (α := ℤ)).image_Icc (by simp [ordConnected_Ici]) a b
Mathlib/Data/Nat/Cast/SetInterval.lean
28
29
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Robert Y. Lewis -/ import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs /-! # Witt vecto...
toFun := ghostFun invFun x := mk p fun n => aeval x (xInTermsOfW p R n)
Mathlib/RingTheory/WittVector/Basic.lean
207
208
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yaël Dillies, Moritz Doll -/ import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Data.Real.Pointwise /...
p.closedBall (x₁ : E) r₁ + p.closedBall (x₂ : E) r₂ ⊆ p.closedBall (x₁ + x₂) (r₁ + r₂) := by rintro x ⟨y₁, hy₁, y₂, hy₂, rfl⟩
Mathlib/Analysis/Seminorm.lean
707
708
/- Copyright (c) 2022 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth -/ import Mathlib.MeasureTheory.Function.L1Space.AEEqFun import Mathlib.MeasureTheory.Function.LpSpace.Complete import Mathlib.MeasureThe...
rcases hf η ηpos.ne' int_ff'.1 with ⟨g, hg, Pg⟩ rcases hf' η ηpos.ne' int_ff'.2 with ⟨g', hg', Pg'⟩ refine ⟨g + g', ?_, h1P g g' Pg Pg'⟩ convert (hη _ _ (f.aestronglyMeasurable.sub (h2P g Pg)) (f'.aestronglyMeasurable.sub (h2P g' Pg')) hg hg').le using 2 rw [SimpleFunc.coe_add] abel s...
Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
911
921
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Johan Commelin, Mario Carneiro -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibili...
In particular, this version only requires us to show that `motive` is closed under addition of nontrivial monomials not present in the support. -/
Mathlib/Algebra/MvPolynomial/Basic.lean
379
381
/- Copyright (c) 2014 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad -/ import Mathlib.Logic.Basic import Mathlib.Logic.Function.Defs import Mathlib.Order.Defs.LinearOrder /-! # Booleans This file proves various...
theorem lt_iff : ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true := by decide
Mathlib/Data/Bool/Basic.lean
158
159
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Module.ULift import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.Tactic.Ring /-! # The characteristic predicate of tensor product ## Main ...
LinearMap.ext (h.lift_eq g) end
Mathlib/RingTheory/IsTensorProduct.lean
175
177
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Michael Howes, Antoine Chambert-Loir -/ import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Commutator.Basic import Mathlib.GroupTheory.Coset.Basic import Mathlib.GroupThe...
variable {G} in
Mathlib/GroupTheory/Abelianization.lean
53
54
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro -/ import Mathlib.Data.Countable.Defs import Mathlib.Data.Fin.Basic import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Equiv import Mathlib....
⟨ofInj f hf⟩ @[simp] theorem nonempty_encodable : Nonempty (Encodable α) ↔ Countable α := ⟨fun ⟨h⟩ => @Encodable.countable α h, fun h => ⟨@ofCountable _ h⟩⟩
Mathlib/Logic/Encodable/Basic.lean
384
389
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Johan Commelin, Mario Carneiro -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibili...
Mathlib/Algebra/MvPolynomial/Basic.lean
1,434
1,436
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Floris van Doorn -/ import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Basic /-! # Explicit least witnesses to existentials on positive natural numbers Implement...
PNat.find h = PNat.find h₂ + 1 := by
Mathlib/Data/PNat/Find.lean
101
101
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Floris van Doorn -/ import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset import Mathlib.Dat...
Mathlib/SetTheory/Cardinal/Basic.lean
1,931
1,937
/- Copyright (c) 2021 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.MeasureTheory.Measure.FiniteMeasure import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Measure.Prod /-! # Probability measures Th...
exact h s s_mble theorem eq_of_forall_apply_eq (μ ν : ProbabilityMeasure Ω) (h : ∀ s : Set Ω, MeasurableSet s → μ s = ν s) : μ = ν := by ext1 s s_mble simpa [ennreal_coeFn_eq_coeFn_toMeasure] using congr_arg ((↑) : ℝ≥0 → ℝ≥0∞) (h s s_mble)
Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
207
212
/- Copyright (c) 2022 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Mohanad Ahmed -/ import Mathlib.LinearAlgebra.Matrix.Spectrum import Mathlib.LinearAlgebra.QuadraticForm.Basic /-! # Positive Definite Matrices This file defi...
simp_rw [← star_mulVec, hv', mul_add, ← RCLike.real_smul_eq_coe_mul, ← smul_dotProduct] congr 2 with i simp only [Pi.star_apply, Pi.smul_apply, RCLike.real_smul_eq_coe_mul, star_mul', RCLike.star_def, RCLike.conj_ofReal]
Mathlib/LinearAlgebra/Matrix/PosDef.lean
239
242
/- 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...
/-- Lift an algebra homomorphism that maps polynomials `φ : K[X] →ₐ[S] R[X]`
Mathlib/FieldTheory/RatFunc/Basic.lean
607
608
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Julian Kuelshammer, Heather Macbeth, Mitchell Lee -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Ri...
Int.negOnePow_add, Int.negOnePow_one, Units.val_neg, Int.cast_neg, neg_mul, neg_neg, ih2, Int.negOnePow_def 2] norm_cast
Mathlib/RingTheory/Polynomial/Chebyshev.lean
149
151
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Order.Hom.Ring import Mathlib.Data.ENat.Basic import Mathlib.SetTheory.Cardinal.Basic /-! # Conversion between `Cardinal` and `ℕ∞` In this ...
rw [← lift_ofENat.{u, v}, lift_inj] @[simp] lemma range_ofENat : range ofENat = Iic ℵ₀ := by refine (range_subset_iff.2 ofENat_le_aleph0).antisymm fun x (hx : x ≤ ℵ₀) ↦ ?_ rcases hx.lt_or_eq with hlt | rfl · lift x to ℕ using hlt
Mathlib/SetTheory/Cardinal/ENat.lean
142
148
/- Copyright (c) 2021 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.Independence.Kernel import Mathlib.MeasureTheory.Constructions.Pi /-! # Independence of sets of sets and measure spaces (σ-algebras) * A fami...
iIndep m μ ↔ iIndepSets (fun x ↦ {s | MeasurableSet[m x] s}) μ := by simp only [iIndep, iIndepSets, Kernel.iIndep]
Mathlib/Probability/Independence/Basic.lean
161
162
/- 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.CategoryTheory.Sites.Coherent.ExtensiveTopology import Mathlib.CategoryTheory.Sites.Coherent.SheafComparison import Mathlib.CategoryTheory.Sites.Lo...
extensiveTopology.presheafIsLocallySurjective_iff _ f.val attribute [local instance] Types.instFunLike Types.instConcreteCategory in lemma regularTopology.isLocallySurjective_sheaf_of_types [Preregular C] [FinitaryPreExtensive C] {F G : Cᵒᵖ ⥤ Type w} (f : F ⟶ G) [PreservesFiniteProducts F] [PreservesFiniteProduc...
Mathlib/CategoryTheory/Sites/Coherent/LocallySurjective.lean
108
138
/- 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.Complex.Log /-! # Power funct...
-- let icα ← mk_instance_cache α -- let icβ ← mk_instance_cache β
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
263
264
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Gabin Kolly -/ import Mathlib.Data.Fintype.Order import Mathlib.Order.Closure import Mathlib.ModelTheory.Semantics import Mathlib.ModelTheory.Encoding /-! # First-Orde...
Mathlib/ModelTheory/Substructures.lean
987
989
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Neil Strickland -/ import Mathlib.Data.Nat.Prime.Defs import Mathlib.Data.PNat.Basic /-! # Primality and GCD on pnat This file extends the theory of `ℕ+` with ...
apply Coprime.gcd_mul_right_cancel a apply Coprime.coprime_dvd_left bn cop.symm theorem Coprime.factor_eq_gcd_right {a b m n : ℕ+} (cop : m.Coprime n) (am : a ∣ m) (bn : b ∣ n) :
Mathlib/Data/PNat/Prime.lean
238
241
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension import Mathlib.Geometry.Manifold.ContMDiff.Atlas import Mathlib.Geometry.Manifold.ContMDiff.NormedSpac...
theorem support_subset_source : support f ⊆ (chartAt H c).source := by rw [f.support_eq_inter_preimage, ← extChartAt_source I]; exact inter_subset_left
Mathlib/Geometry/Manifold/BumpFunction.lean
131
132
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Functor.KanExtension.Basic import Mathlib.CategoryTheory.Localization.Predicate /-! # Right derived functors In this file, given a functor `F : ...
lemma isRightDerivedFunctor_iff_of_iso (α' : F ⟶ L ⋙ RF') (W : MorphismProperty C) [L.IsLocalization W] (e : RF ≅ RF') (comm : α ≫ whiskerLeft L e.hom = α') : RF.IsRightDerivedFunctor α W ↔ RF'.IsRightDerivedFunctor α' W := by simp only [isRightDerivedFunctor_iff_isLeftKanExtension] exact isLeftKanExtension...
Mathlib/CategoryTheory/Functor/Derived/RightDerived.lean
66
70
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Primrec import Mathlib.Data.Nat.PSub import Mathlib.Data.PFun /-! # The partial recursive functions The partial recursive functions are...
a ∈ rfindOpt f ↔ ∃ n, a ∈ f n := ⟨rfindOpt_spec, fun ⟨n, h⟩ => by have h' := rfindOpt_dom.2 ⟨_, _, h⟩ obtain ⟨k, hk⟩ := rfindOpt_spec ⟨h', rfl⟩ have := (H (le_max_left _ _) h).symm.trans (H (le_max_right _ _) hk) simp at this; simp [this, get_mem]⟩
Mathlib/Computability/Partrec.lean
144
150
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Reduced import Mathlib.FieldTheory.KummerPolynomial import Mathlib.FieldTheory.Separable /-! # Perfect fie...
theorem rootsExpandToRoots_apply (x) : (rootsExpandToRoots p f x : R) = x ^ p := rfl open scoped Classical in /-- If `f` is a polynomial over an integral domain `R` of characteristic `p`, then there is
Mathlib/FieldTheory/Perfect.lean
339
342
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Alexey Soloyev, Junyan Xu, Kamila Szewczyk -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.LinearRecurrence import Mathlib.Data.Fin.VecNotati...
Mathlib/Data/Real/GoldenRatio.lean
238
243
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Data.Nat.Totient import Mathlib.Data.ZMod.Aut import Mathlib.Data.ZMod.QuotientGroup import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.Sub...
contrapose! hm₂ exact mem_erase_of_ne_of_mem hm₂ hm₁ simp [this, h0] _ ≤ ∑ m ∈ c.divisors.erase d, φ m := by refine sum_le_sum fun m hm => ?_ have hmc : m ∣ c := by simp only [mem_erase, mem_divisors] at hm
Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
501
507
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.NumberTheory.LSeries.AbstractFuncEq import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds import Mathlib.NumberTheory.LSeries.MellinEqDirichlet i...
HasSum (fun n : ℤ ↦ Gammaℝ (s + 1) * (-I) * Int.sign n * cexp (2 * π * I * a * n) / (↑|n| : ℂ) ^ s / 2) (completedSinZeta a s) := by let c (n : ℤ) : ℂ := -I * cexp (2 * π * I * a * n) / 2 have hc (n : ℤ) : ‖c n‖ = 1 / 2 := by
Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
387
390
/- Copyright (c) 2020 David Wärn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Wärn -/ import Mathlib.Data.Finset.Lattice.Fold import Mathlib.Logic.Encodable.Basic import Mathlib.Order.Atoms import Mathlib.Order.Cofinal import Mathlib.Order.UpperLower.Principal...
theorem coe_top : ((⊤ : Ideal P) : Set P) = univ := rfl theorem isProper_of_ne_top (ne_top : I ≠ ⊤) : IsProper I := ⟨fun h ↦ ne_top <| ext h⟩
Mathlib/Order/Ideal.lean
191
195
/- 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 ncard_le_ncard_insert (a : α) (s : Set α) : s.ncard ≤ (insert a s).ncard := by classical
Mathlib/Data/Set/Card.lean
616
618
/- Copyright (c) 2022 Jake Levinson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jake Levinson -/ import Mathlib.Data.Finset.Preimage import Mathlib.Data.Finset.Prod import Mathlib.Data.SetLike.Basic import Mathlib.Order.UpperLower.Basic /-! # Young diagrams A You...
theorem mk_mem_col_iff {μ : YoungDiagram} {i j : ℕ} : (i, j) ∈ μ.col j ↔ (i, j) ∈ μ := by simp [col] protected theorem exists_not_mem_col (μ : YoungDiagram) (j : ℕ) : ∃ i, (i, j) ∉ μ.cells := by
Mathlib/Combinatorics/Young/YoungDiagram.lean
307
310
/- Copyright (c) 2021 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.RingTheory.AlgebraTower import Mathli...
/-- A rank `n` free module has a basis indexed by `Fin n`. -/ noncomputable def finBasisOfFinrankEq [Module.Finite R M] {n : ℕ} (hn : finrank R M = n) : Basis (Fin n) R M := (finBasis R M).reindex (finCongr hn) variable {R M}
Mathlib/LinearAlgebra/Dimension/Free.lean
202
206
/- Copyright (c) 2022 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.AlgebraicTopology.AlternatingFaceMapComplex import Mathlib.AlgebraicTopology.SimplicialSet.StdSimplex import Mathlib.AlgebraicTopology.CechNerve import Mathlib.A...
@[simp] theorem shiftFun_zero {n : ℕ} {X : Type*} [Zero X] (f : Fin n → X) : shiftFun f 0 = 0 := rfl @[deprecated (since := "2025-04-19")] alias shiftFun_0 := shiftFun_zero
Mathlib/AlgebraicTopology/ExtraDegeneracy.lean
160
166
/- 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.IsManifold.ExtChartAt import Mathlib.Geometry.Manifold.LocalInvariantProperties /-! # `C^n` functions betwee...
⟨(extChartAt I x).map_source (mem_extChartAt_source _), by rwa [extChartAt_to_inv], by rw [extChartAt_to_inv]; apply mem_extChartAt_source⟩ rw [insert_eq_of_mem hxs'] at hmem hsub -- Then `(extChartAt I x).symm '' v` is the neighborhood we are looking for. refine ⟨(extChartAt I x).symm '' v, ?_, ?_⟩ ·...
Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
796
804
/- Copyright (c) 2019 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Anatole Dedecker, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add ...
· simp [hu] rw [derivWithin_zero_of_not_differentiableWithinAt hv, zero_mul,
Mathlib/Analysis/Calculus/Deriv/Mul.lean
254
255
/- 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....
-- Note the `'` swapped around due to a move to std4.
Mathlib/Data/Fin/Basic.lean
458
459
/- 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.Control.Combinators import Mathlib.Data.Option.Defs import Mathlib.Logic.IsEmpty import Mathlib.Logic.Relator import Mathlib.Util.CompileInductive impo...
open Function in @[simp]
Mathlib/Data/Option/Basic.lean
330
332
/- 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.Data.Set.Finite.Lattice /-! # Partitions based on membership of a sequence of sets Let `f : ℕ → Set α` be a sequence of sets. For `n : ℕ`, we can form th...
(hs : s ∈ memPartition f n) : memPartitionSet f n a = s ↔ a ∈ s := by refine ⟨fun h ↦ h ▸ mem_memPartitionSet f n a, fun h ↦ ?_⟩ by_contra h_ne have h_disj : Disjoint s (memPartitionSet f n a) := disjoint_memPartition f n hs (memPartitionSet_mem f n a) (Ne.symm h_ne) refine absurd h_disj ?_ rw [no...
Mathlib/Data/Set/MemPartition.lean
141
150
/- 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.Order.Interval.Set.Basic import Mathlib.Data.Set.Lattice.Image import Mathlib.Data.SetLike.Basic /-! # Order intervals This file defines (nonempty) close...
toProd
Mathlib/Order/Interval/Basic.lean
47
48