Context
stringlengths
57
92.3k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
18
3.69k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
import Mathlib.LinearAlgebra.FreeModule.PID import Mathlib.MeasureTheory.Group.FundamentalDomain import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.RingTheory.Localization.Module #align_import algebra.module.zlattice from "leanprover-community/mathlib"@"a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3" n...
Mathlib/Algebra/Module/Zlattice/Basic.lean
145
146
theorem repr_fract_apply (m : E) (i : ΞΉ) : b.repr (fract b m) i = Int.fract (b.repr m i) := by
rw [fract, map_sub, Finsupp.coe_sub, Pi.sub_apply, repr_floor_apply, Int.fract]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from ...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
464
466
theorem affineCombination_eq_linear_combination (s : Finset ΞΉ) (p : ΞΉ β†’ V) (w : ΞΉ β†’ k) (hw : βˆ‘ i ∈ s, w i = 1) : s.affineCombination k p w = βˆ‘ i ∈ s, w i β€’ p i := by
simp [s.affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one w p hw 0]
import Mathlib.Algebra.Polynomial.Cardinal import Mathlib.RingTheory.Algebraic #align_import algebra.algebraic_card from "leanprover-community/mathlib"@"40494fe75ecbd6d2ec61711baa630cf0a7b7d064" universe u v open Cardinal Polynomial Set open Cardinal Polynomial namespace Algebraic theorem infinite_of_charZero...
Mathlib/Algebra/AlgebraicCard.lean
45
54
theorem cardinal_mk_lift_le_mul : Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≀ Cardinal.lift.{v} #R[X] * β„΅β‚€ := by
rw [← mk_uLift, ← mk_uLift] choose g hg₁ hgβ‚‚ using fun x : { x : A | IsAlgebraic R x } => x.coe_prop refine lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g fun f => ?_ rw [lift_le_aleph0, le_aleph0_iff_set_countable] suffices MapsTo (↑) (g ⁻¹' {f}) (f.rootSet A) from this.countable_of_injOn Subtype.coe_i...
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputab...
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
1,163
1,167
theorem ContDiff.contDiff_fderiv_apply {f : E β†’ F} (hf : ContDiff π•œ n f) (hmn : m + 1 ≀ n) : ContDiff π•œ m fun p : E Γ— E => (fderiv π•œ f p.1 : E β†’L[π•œ] F) p.2 := by
rw [← contDiffOn_univ] at hf ⊒ rw [← fderivWithin_univ, ← univ_prod_univ] exact contDiffOn_fderivWithin_apply hf uniqueDiffOn_univ hmn
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.List.AList #align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" namespace AList variable {Ξ± M : Type*} [Zero M] open List noncomputable def lookupFinsupp (l : AList fun _x : Ξ± => M) : Ξ± β†’β‚€ M where ...
Mathlib/Data/Finsupp/AList.lean
124
132
theorem _root_.Finsupp.toAList_lookupFinsupp (f : Ξ± β†’β‚€ M) : f.toAList.lookupFinsupp = f := by
ext a classical by_cases h : f a = 0 Β· suffices f.toAList.lookup a = none by simp [h, this] simp [lookup_eq_none, h] Β· suffices f.toAList.lookup a = some (f a) by simp [h, this] apply mem_lookup_iff.2 simpa using h
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.MvPolynomial.Rename import Mathlib.Algebra.Order.BigOperators.Ring.Finset #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp Ad...
Mathlib/Algebra/MvPolynomial/Degrees.lean
219
225
theorem degrees_rename_of_injective {p : MvPolynomial Οƒ R} {f : Οƒ β†’ Ο„} (h : Function.Injective f) : degrees (rename f p) = (degrees p).map f := by
classical simp only [degrees, Multiset.map_finset_sup p.support Finsupp.toMultiset f h, support_rename_of_injective h, Finset.sup_image] refine Finset.sup_congr rfl fun x _ => ?_ exact (Finsupp.toMultiset_map _ _).symm
import Mathlib.Algebra.Lie.Submodule import Mathlib.Algebra.Lie.OfAssociative import Mathlib.LinearAlgebra.Isomorphisms #align_import algebra.lie.quotient from "leanprover-community/mathlib"@"3d7987cda72abc473c7cdbbb075170e9ac620042" universe u v w w₁ wβ‚‚ namespace LieSubmodule variable {R : Type u} {L : Type v}...
Mathlib/Algebra/Lie/Quotient.lean
210
211
theorem map_mk'_eq_bot_le : map (mk' N) N' = βŠ₯ ↔ N' ≀ N := by
rw [← LieModuleHom.le_ker_iff_map, mk'_ker]
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.CategoryTheory.Monoidal.Discrete import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas import Mathlib.CategoryTheory.Limits.Shapes.Terminal import Mathlib.Algebra.PUnitInstances #align_import category_theory.monoidal.Mon_ from "leanprover-community/...
Mathlib/CategoryTheory/Monoidal/Mon_.lean
522
524
theorem whiskerRight_hom (X : Mon_ C) {Y Z : Mon_ C} (f : Y ⟢ Z) : (X ◁ f).hom = X.X ◁ f.hom := by
rw [← id_tensorHom]; rfl
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
389
391
theorem HasDerivAt.div_const (hc : HasDerivAt c c' x) (d : π•œ') : HasDerivAt (fun x => c x / d) (c' / d) x := by
simpa only [div_eq_mul_inv] using hc.mul_const d⁻¹
import Mathlib.LinearAlgebra.Matrix.DotProduct import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal #align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7" open Matrix namespace Matrix open FiniteDimensional variable {l m n ...
Mathlib/Data/Matrix/Rank.lean
217
220
theorem ker_mulVecLin_conjTranspose_mul_self (A : Matrix m n R) : LinearMap.ker (Aα΄΄ * A).mulVecLin = LinearMap.ker (mulVecLin A) := by
ext x simp only [LinearMap.mem_ker, mulVecLin_apply, conjTranspose_mul_self_mulVec_eq_zero]
import Mathlib.Algebra.EuclideanDomain.Instances import Mathlib.RingTheory.Ideal.Colon import Mathlib.RingTheory.UniqueFactorizationDomain #align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940" universe u v variable {R : Type u} {M : Type v...
Mathlib/RingTheory/PrincipalIdealDomain.lean
434
436
theorem gcd_dvd_iff_exists (a b : R) {z} : gcd a b ∣ z ↔ βˆƒ x y, z = a * x + b * y := by
simp_rw [mul_comm a, mul_comm b, @eq_comm _ z, ← Ideal.mem_span_pair, ← span_gcd, Ideal.mem_span_singleton]
import Mathlib.Algebra.Algebra.Operations import Mathlib.Data.Fintype.Lattice import Mathlib.RingTheory.Coprime.Lemmas #align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74" assert_not_exists Basis -- See `RingTheory.Ideal.Basis` assert_not_exists ...
Mathlib/RingTheory/Ideal/Operations.lean
649
656
theorem multiset_prod_le_inf {s : Multiset (Ideal R)} : s.prod ≀ s.inf := by
classical refine s.induction_on ?_ ?_ Β· rw [Multiset.inf_zero] exact le_top intro a s ih rw [Multiset.prod_cons, Multiset.inf_cons] exact le_trans mul_le_inf (inf_le_inf le_rfl ih)
import Mathlib.Topology.MetricSpace.PiNat import Mathlib.Topology.MetricSpace.Isometry import Mathlib.Topology.MetricSpace.Gluing import Mathlib.Topology.Sets.Opens import Mathlib.Analysis.Normed.Field.Basic #align_import topology.metric_space.polish from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78...
Mathlib/Topology/MetricSpace/Polish.lean
409
423
theorem IsClopenable.iUnion [t : TopologicalSpace Ξ±] [PolishSpace Ξ±] {s : β„• β†’ Set Ξ±} (hs : βˆ€ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) := by
choose m mt m_polish _ m_open using hs obtain ⟨t', t'm, -, t'_polish⟩ : βˆƒ t' : TopologicalSpace Ξ±, (βˆ€ n : β„•, t' ≀ m n) ∧ t' ≀ t ∧ @PolishSpace Ξ± t' := exists_polishSpace_forall_le m mt m_polish have A : IsOpen[t'] (⋃ n, s n) := by apply isOpen_iUnion intro n apply t'm n exact m_open n ...
import Mathlib.Algebra.Algebra.Hom #align_import algebra.algebra.equiv from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" universe u v w u₁ v₁ structure AlgEquiv (R : Type u) (A : Type v) (B : Type w) [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B] extends A ≃...
Mathlib/Algebra/Algebra/Equiv.lean
655
657
theorem toLinearEquiv_ofLinearEquiv : toLinearEquiv (ofLinearEquiv l map_one map_mul) = l := by
ext rfl
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polyn...
Mathlib/Algebra/Polynomial/Eval.lean
680
680
theorem bit0_comp : comp (bit0 p : R[X]) q = bit0 (p.comp q) := by
simp only [bit0, add_comp]
import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.MvPolynomial.Tower import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.finite_presentation from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" set_option autoImplicit true open Function (Surjective) ...
Mathlib/RingTheory/FinitePresentation.lean
150
158
theorem iff : FinitePresentation R A ↔ βˆƒ (n : _) (I : Ideal (MvPolynomial (Fin n) R)) (_ : (_ β§Έ I) ≃ₐ[R] A), I.FG := by
constructor · rintro ⟨n, f, hf⟩ exact ⟨n, RingHom.ker f.toRingHom, Ideal.quotientKerAlgEquivOfSurjective hf.1, hf.2⟩ · rintro ⟨n, I, e, hfg⟩ letI := (FinitePresentation.mvPolynomial R _).quotient hfg exact equiv e
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Set.Finite #align_import order.filter.basic from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" set_option autoImplicit true open Function Set Order open scoped Classical universe u v w x y structure Filter (Ξ± : Type*) where...
Mathlib/Order/Filter/Basic.lean
853
856
theorem mem_biInf_of_directed {f : Ξ² β†’ Filter Ξ±} {s : Set Ξ²} (h : DirectedOn (f ⁻¹'o (Β· β‰₯ Β·)) s) (ne : s.Nonempty) {t : Set Ξ±} : (t ∈ β¨… i ∈ s, f i) ↔ βˆƒ i ∈ s, t ∈ f i := by
haveI := ne.to_subtype simp_rw [iInf_subtype', mem_iInf_of_directed h.directed_val, Subtype.exists, exists_prop]
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
320
326
theorem cos_oangle_sub_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(Ο€ / 2)) : Real.Angle.cos (o.oangle y (y - x)) = β€–yβ€– / β€–y - xβ€– := by
have hs : (o.oangle y (y - x)).sign = 1 := by rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two] rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe, InnerProductGeometry.cos_angle_sub_of_inner_eq_zero (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)]
import Mathlib.CategoryTheory.Limits.HasLimits import Mathlib.CategoryTheory.Products.Basic import Mathlib.CategoryTheory.Functor.Currying import Mathlib.CategoryTheory.Products.Bifunctor #align_import category_theory.limits.fubini from "leanprover-community/mathlib"@"59382264386afdbaf1727e617f5fdda511992eb9" uni...
Mathlib/CategoryTheory/Limits/Fubini.lean
423
429
theorem colimitFlipCompColimIsoColimitCompColim_ΞΉ_ΞΉ_inv (k) (j) : colimit.ΞΉ (F.obj j) k ≫ colimit.ΞΉ (F β‹™ colim) j ≫ (colimitFlipCompColimIsoColimitCompColim F).inv = (colimit.ΞΉ _ j ≫ colimit.ΞΉ (F.flip β‹™ colim) k : _ ⟢ colimit (F.flip β‹™ colim)) := by
dsimp [colimitFlipCompColimIsoColimitCompColim] slice_lhs 1 3 => simp only [] simp
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic import Mathlib.MeasureTheory.Integral.MeanInequalities #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" open Filter open scoped ENNReal Topology namespace MeasureTheory variable ...
Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean
140
142
theorem snorm_sub_le' {f g : Ξ± β†’ E} (hf : AEStronglyMeasurable f ΞΌ) (hg : AEStronglyMeasurable g ΞΌ) (p : ℝβ‰₯0∞) : snorm (f - g) p ΞΌ ≀ LpAddConst p * (snorm f p ΞΌ + snorm g p ΞΌ) := by
simpa only [sub_eq_add_neg, snorm_neg] using snorm_add_le' hf hg.neg p
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ vβ‚‚ u u₁ uβ‚‚ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
63
66
theorem Hom.cast_eq_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟢ v) (e' : u' ⟢ v') : e.cast hu hv = e' ↔ HEq e e' := by
rw [Hom.cast_eq_cast] exact _root_.cast_eq_iff_heq
import Mathlib.Topology.Algebra.Ring.Basic import Mathlib.Topology.Algebra.MulAction import Mathlib.Topology.Algebra.UniformGroup import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.UniformSpace.UniformEmbedding import Mathlib.Algebra.Algebra.Defs import Mathlib.LinearAlgebra.Projection import Mat...
Mathlib/Topology/Algebra/Module/Basic.lean
61
72
theorem Submodule.eq_top_of_nonempty_interior' [NeBot (𝓝[{ x : R | IsUnit x }] 0)] (s : Submodule R M) (hs : (interior (s : Set M)).Nonempty) : s = ⊀ := by
rcases hs with ⟨y, hy⟩ refine Submodule.eq_top_iff'.2 fun x => ?_ rw [mem_interior_iff_mem_nhds] at hy have : Tendsto (fun c : R => y + c β€’ x) (𝓝[{ x : R | IsUnit x }] 0) (𝓝 (y + (0 : R) β€’ x)) := tendsto_const_nhds.add ((tendsto_nhdsWithin_of_tendsto_nhds tendsto_id).smul tendsto_const_nhds) rw [zero_s...
import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Algebra.Polynomial.Basic import Mathlib.Algebra.Regular.Basic import Mathlib.Data.Nat.Choose.Sum #align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c" set_option linter.uppercaseLean3 false no...
Mathlib/Algebra/Polynomial/Coeff.lean
233
240
theorem support_trinomial {k m n : β„•} (hkm : k < m) (hmn : m < n) {x y z : R} (hx : x β‰  0) (hy : y β‰  0) (hz : z β‰  0) : support (C x * X ^ k + C y * X ^ m + C z * X ^ n) = {k, m, n} := by
apply subset_antisymm (support_trinomial' k m n x y z) simp_rw [insert_subset_iff, singleton_subset_iff, mem_support_iff, coeff_add, coeff_C_mul, coeff_X_pow_self, mul_one, coeff_X_pow, if_neg hkm.ne, if_neg hkm.ne', if_neg hmn.ne, if_neg hmn.ne', if_neg (hkm.trans hmn).ne, if_neg (hkm.trans hmn).ne', mul_...
import Mathlib.MeasureTheory.Measure.Regular import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.Topology.Instances.EReal #align_import measure_theory.integral.vitali_caratheodory from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" open sc...
Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean
231
260
theorem exists_lt_lowerSemicontinuous_lintegral_ge_of_aemeasurable [SigmaFinite ΞΌ] (f : Ξ± β†’ ℝβ‰₯0) (fmeas : AEMeasurable f ΞΌ) {Ξ΅ : ℝβ‰₯0∞} (Ξ΅0 : Ξ΅ β‰  0) : βˆƒ g : Ξ± β†’ ℝβ‰₯0∞, (βˆ€ x, (f x : ℝβ‰₯0∞) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ x, g x βˆ‚ΞΌ) ≀ (∫⁻ x, f x βˆ‚ΞΌ) + Ξ΅ := by
have : Ξ΅ / 2 β‰  0 := (ENNReal.half_pos Ξ΅0).ne' rcases exists_lt_lowerSemicontinuous_lintegral_ge ΞΌ (fmeas.mk f) fmeas.measurable_mk this with ⟨g0, f_lt_g0, g0_cont, g0_int⟩ rcases exists_measurable_superset_of_null fmeas.ae_eq_mk with ⟨s, hs, smeas, ΞΌs⟩ rcases exists_le_lowerSemicontinuous_lintegral_ge ΞΌ (s...
import Mathlib.Algebra.Module.Submodule.Map #align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" open Function open Pointwise variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {K : Type*} variable {M : Type*} {M₁ : Type*} {Mβ‚‚ : Type*...
Mathlib/Algebra/Module/Submodule/Ker.lean
107
109
theorem disjoint_ker {f : F} {p : Submodule R M} : Disjoint p (ker f) ↔ βˆ€ x ∈ p, f x = 0 β†’ x = 0 := by
simp [disjoint_def]
import Mathlib.Data.Fin.Fin2 import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Common #align_import data.typevec from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" universe u v w @[pp_with_univ] def TypeVec (n : β„•) := Fin2 n β†’ Type* #align typevec TypeVec instance {n} : Inh...
Mathlib/Data/TypeVec.lean
789
793
theorem subtypeVal_toSubtype {α : TypeVec n} (p : α ⟹ «repeat» n Prop) : subtypeVal p ⊚ toSubtype p = fun _ => Subtype.val := by
ext i x induction i <;> dsimp only [toSubtype, comp, subtypeVal] at * simp [*]
import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.Vector.Basic import Mathlib.Data.PFun import Mathlib.Logic.Function.Iterate import Mathlib.Order.Basic import Mathlib.Tactic.ApplyFun #align_import computability.turing_machine from "leanprover-commu...
Mathlib/Computability/TuringMachine.lean
435
437
theorem proj_map_nth {ΞΉ : Type*} {Ξ“ : ΞΉ β†’ Type*} [βˆ€ i, Inhabited (Ξ“ i)] (i : ΞΉ) (L n) : (ListBlank.map (@proj ΞΉ Ξ“ _ i) L).nth n = L.nth n i := by
rw [ListBlank.nth_map]; rfl
import Mathlib.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.LinearAlgebra.StdBasis import Mathlib.RingTheory.AlgebraTower import Mathlib.Algebra.Algebra.Subalgebra.Tower #align_import linear_algebra.matrix.to_lin from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6" ...
Mathlib/LinearAlgebra/Matrix/ToLin.lean
827
830
theorem LinearMap.toMatrixAlgEquiv_comp (f g : M₁ β†’β‚—[R] M₁) : LinearMap.toMatrixAlgEquiv v₁ (f.comp g) = LinearMap.toMatrixAlgEquiv v₁ f * LinearMap.toMatrixAlgEquiv v₁ g := by
simp [LinearMap.toMatrixAlgEquiv, LinearMap.toMatrix_comp v₁ v₁ v₁ f g]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.Analytic.Linear import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Geometry.Manifold.ChartedSpace import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.Analysis.Calculus.ContDiff.Basic ...
Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
1,394
1,396
theorem isOpen_extChartAt_target [I.Boundaryless] (x : M) : IsOpen (extChartAt I x).target := by
simp_rw [extChartAt_target, I.range_eq_univ, inter_univ] exact (PartialHomeomorph.open_target _).preimage I.continuous_symm
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
171
193
theorem NormedAddGroupHom.ker_completion {f : NormedAddGroupHom G H} {C : ℝ} (h : f.SurjectiveOnWith f.range C) : (f.completion.ker : Set <| Completion G) = closure (toCompl.comp <| incl f.ker).range := by
refine le_antisymm ?_ (closure_minimal f.ker_le_ker_completion f.completion.isClosed_ker) rintro hatg (hatg_in : f.completion hatg = 0) rw [SeminormedAddCommGroup.mem_closure_iff] intro Ξ΅ Ξ΅_pos rcases h.exists_pos with ⟨C', C'_pos, hC'⟩ rcases exists_pos_mul_lt Ξ΅_pos (1 + C' * β€–fβ€–) with ⟨δ, Ξ΄_pos, hδ⟩ ob...
import Mathlib.Data.Set.Prod import Mathlib.Logic.Equiv.Fin import Mathlib.ModelTheory.LanguageMap #align_import model_theory.syntax from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable (L : Language.{u, v}) {L' : L...
Mathlib/ModelTheory/Syntax.lean
630
638
theorem relabel_sum_inl (Ο† : L.BoundedFormula Ξ± n) : (Ο†.relabel Sum.inl : L.BoundedFormula Ξ± (0 + n)) = Ο†.castLE (ge_of_eq (zero_add n)) := by
simp only [relabel, relabelAux_sum_inl] induction' Ο† with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3 Β· rfl Β· simp [Fin.natAdd_zero, castLE_of_eq, mapTermRel] Β· simp [Fin.natAdd_zero, castLE_of_eq, mapTermRel]; rfl Β· simp [mapTermRel, ih1, ih2] Β· simp [mapTermRel, ih3, castLE]
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n Ξ± : Type*} namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
202
215
theorem inv_fromBlocks_zero₂₁_of_isUnit_iff (A : Matrix m m Ξ±) (B : Matrix m n Ξ±) (D : Matrix n n Ξ±) (hAD : IsUnit A ↔ IsUnit D) : (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹ := by
by_cases hA : IsUnit A Β· have hD := hAD.mp hA cases hA.nonempty_invertible cases hD.nonempty_invertible letI := fromBlocksZero₂₁Invertible A B D simp_rw [← invOf_eq_nonsing_inv, invOf_fromBlocks_zero₂₁_eq] Β· have hD := hAD.not.mp hA have : Β¬IsUnit (fromBlocks A B 0 D) := isUnit_fromBloc...
import Mathlib.Algebra.Group.Opposite import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Control.Traversable.Instances import Mathlib.Control.Traversable.Lemmas import Mathlib.CategoryTheory.Endomorphism import Mathlib.CategoryTheory.Types import Mathlib.CategoryTheory.Category.KleisliCat import Mathlib.Tactic.Ada...
Mathlib/Control/Fold.lean
334
349
theorem toList_spec (xs : t Ξ±) : toList xs = FreeMonoid.toList (foldMap FreeMonoid.of xs) := Eq.symm <| calc FreeMonoid.toList (foldMap FreeMonoid.of xs) = FreeMonoid.toList (foldMap FreeMonoid.of xs).reverse.reverse := by
simp only [List.reverse_reverse] _ = FreeMonoid.toList (List.foldr cons [] (foldMap FreeMonoid.of xs).reverse).reverse := by simp only [List.foldr_eta] _ = (unop (Foldl.ofFreeMonoid (flip cons) (foldMap FreeMonoid.of xs)) []).reverse := by #adaptation_note /-- nightly-2024-0...
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Algebra.Group.FiniteSupport import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Set.Subsingleton #align_import algebra.big_operators.finprod from "leanprover-community/mathlib"@"d6fad0e5bf...
Mathlib/Algebra/BigOperators/Finprod.lean
1,286
1,292
theorem finprod_curry₃ {Ξ³ : Type*} (f : Ξ± Γ— Ξ² Γ— Ξ³ β†’ M) (h : (mulSupport f).Finite) : ∏ᢠ abc, f abc = ∏ᢠ (a) (b) (c), f (a, b, c) := by
rw [finprod_curry f h] congr ext a rw [finprod_curry] simp [h]
import Mathlib.Algebra.Homology.ExactSequence import Mathlib.CategoryTheory.Abelian.Refinements #align_import category_theory.abelian.diagram_lemmas.four from "leanprover-community/mathlib"@"d34cbcf6c94953e965448c933cd9cc485115ebbd" namespace CategoryTheory open Category Limits Preadditive namespace Abelian va...
Mathlib/CategoryTheory/Abelian/DiagramLemmas/Four.lean
62
83
theorem mono_of_epi_of_mono_of_mono' (hR₁ : R₁.map' 0 2 = 0) (hR₁' : (mkβ‚‚ (R₁.map' 1 2) (R₁.map' 2 3)).Exact) (hRβ‚‚ : (mkβ‚‚ (Rβ‚‚.map' 0 1) (Rβ‚‚.map' 1 2)).Exact) (hβ‚€ : Epi (app' Ο† 0)) (h₁ : Mono (app' Ο† 1)) (h₃ : Mono (app' Ο† 3)) : Mono (app' Ο† 2) := by
apply mono_of_cancel_zero intro A fβ‚‚ h₁ have hβ‚‚ : fβ‚‚ ≫ R₁.map' 2 3 = 0 := by rw [← cancel_mono (app' Ο† 3 _), assoc, NatTrans.naturality, reassoc_of% h₁, zero_comp, zero_comp] obtain ⟨A₁, π₁, _, f₁, hfβ‚βŸ© := (hR₁'.exact 0).exact_up_to_refinements fβ‚‚ hβ‚‚ dsimp at hf₁ have h₃ : (f₁ ≫ app' Ο† 1) ≫ Rβ‚‚.ma...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Logic.Unique #align_import algebra.group_with_zero.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" assert_not_exists DenselyOrdered open scoped Classical open Function variable {Ξ± M...
Mathlib/Algebra/GroupWithZero/Basic.lean
411
411
theorem inv_eq_zero {a : Gβ‚€} : a⁻¹ = 0 ↔ a = 0 := by
rw [inv_eq_iff_eq_inv, inv_zero]
import Mathlib.LinearAlgebra.Contraction import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff #align_import linear_algebra.trace from "leanprover-community/mathlib"@"4cf7ca0e69e048b006674cf4499e5c7d296a89e0" noncomputable section universe u v w namespace LinearMap open Matrix open FiniteDimensional open Tensor...
Mathlib/LinearAlgebra/Trace.lean
278
282
theorem trace_comp_comm' (f : M β†’β‚—[R] N) (g : N β†’β‚—[R] M) : trace R M (g βˆ˜β‚— f) = trace R N (f βˆ˜β‚— g) := by
have h := ext_iff.1 (ext_iff.1 (trace_comp_comm R M N) g) f simp only [llcomp_apply', comprβ‚‚_apply, flip_apply] at h exact h
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef #align_import measure_theory.measure.ae_disjoint from "leanprover-community/mathlib"@"bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e" open Set Function namespace MeasureTheory variable {ΞΉ Ξ± : Type*} {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) def AEDisjoint (s t : Se...
Mathlib/MeasureTheory/Measure/AEDisjoint.lean
100
102
theorem iUnion_right_iff [Countable ΞΉ] {t : ΞΉ β†’ Set Ξ±} : AEDisjoint ΞΌ s (⋃ i, t i) ↔ βˆ€ i, AEDisjoint ΞΌ s (t i) := by
simp only [AEDisjoint, inter_iUnion, measure_iUnion_null_iff]
import Mathlib.Data.ENNReal.Real import Mathlib.Order.Interval.Finset.Nat import Mathlib.Topology.UniformSpace.Pi import Mathlib.Topology.UniformSpace.UniformConvergence import Mathlib.Topology.UniformSpace.UniformEmbedding #align_import topology.metric_space.emetric_space from "leanprover-community/mathlib"@"c8f3055...
Mathlib/Topology/EMetricSpace/Basic.lean
118
124
theorem edist_congr_right {x y z : Ξ±} (h : edist x y = 0) : edist x z = edist y z := by
apply le_antisymm Β· rw [← zero_add (edist y z), ← h] apply edist_triangle Β· rw [edist_comm] at h rw [← zero_add (edist x z), ← h] apply edist_triangle
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Perm import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {...
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
914
924
theorem IsCycleOn.exists_pow_eq {s : Finset Ξ±} (hf : f.IsCycleOn s) (ha : a ∈ s) (hb : b ∈ s) : βˆƒ n < s.card, (f ^ n) a = b := by
classical obtain ⟨n, rfl⟩ := hf.2 ha hb obtain ⟨k, hk⟩ := (Int.mod_modEq n s.card).symm.dvd refine ⟨n.natMod s.card, Int.natMod_lt (Nonempty.card_pos ⟨a, ha⟩).ne', ?_⟩ rw [← zpow_natCast, Int.natMod, Int.toNat_of_nonneg (Int.emod_nonneg _ <| Nat.cast_ne_zero.2 (Nonempty.card_pos ⟨a, ha⟩...
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284...
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
514
526
theorem AEFinStronglyMeasurable.ae_eq_of_forall_setIntegral_eq {f g : Ξ± β†’ E} (hf_int_finite : βˆ€ s, MeasurableSet s β†’ ΞΌ s < ∞ β†’ IntegrableOn f s ΞΌ) (hg_int_finite : βˆ€ s, MeasurableSet s β†’ ΞΌ s < ∞ β†’ IntegrableOn g s ΞΌ) (hfg_eq : βˆ€ s : Set Ξ±, MeasurableSet s β†’ ΞΌ s < ∞ β†’ ∫ x in s, f x βˆ‚ΞΌ = ∫ x in s, g x βˆ‚ΞΌ) ...
rw [← sub_ae_eq_zero] have hfg : βˆ€ s : Set Ξ±, MeasurableSet s β†’ ΞΌ s < ∞ β†’ (∫ x in s, (f - g) x βˆ‚ΞΌ) = 0 := by intro s hs hΞΌs rw [integral_sub' (hf_int_finite s hs hΞΌs) (hg_int_finite s hs hΞΌs), sub_eq_zero.mpr (hfg_eq s hs hΞΌs)] have hfg_int : βˆ€ s, MeasurableSet s β†’ ΞΌ s < ∞ β†’ IntegrableOn (f - g) s ...
import Mathlib.Data.Finset.Attr import Mathlib.Data.Multiset.FinsetOps import Mathlib.Logic.Equiv.Set import Mathlib.Order.Directed import Mathlib.Order.Interval.Set.Basic #align_import data.finset.basic from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" -- Assert that we define `Finset...
Mathlib/Data/Finset/Basic.lean
1,680
1,681
theorem inter_union_self (s t : Finset Ξ±) : s ∩ (t βˆͺ s) = s := by
rw [inter_comm, union_inter_cancel_right]
import Mathlib.LinearAlgebra.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.Algebra.Star.Unitary #align_import linear_algebra.unitary_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" universe u ...
Mathlib/LinearAlgebra/UnitaryGroup.lean
66
68
theorem mem_unitaryGroup_iff : A ∈ Matrix.unitaryGroup n Ξ± ↔ A * star A = 1 := by
refine ⟨And.right, fun hA => ⟨?_, hA⟩⟩ simpa only [mul_eq_one_comm] using hA
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) ...
Mathlib/Data/Option/NAry.lean
170
172
theorem mapβ‚‚_map_left_comm {f : Ξ±' β†’ Ξ² β†’ Ξ³} {g : Ξ± β†’ Ξ±'} {f' : Ξ± β†’ Ξ² β†’ Ξ΄} {g' : Ξ΄ β†’ Ξ³} (h_left_comm : βˆ€ a b, f (g a) b = g' (f' a b)) : mapβ‚‚ f (a.map g) b = (mapβ‚‚ f' a b).map g' := by
cases a <;> cases b <;> simp [h_left_comm]
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.MeasureTheory.Function.Egorov import Mathlib.MeasureTheory.Function.LpSpace #align_import measure_theory.function.convergence_in_measure from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open TopologicalSpace Filter ope...
Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean
107
124
theorem tendstoInMeasure_of_tendsto_ae_of_stronglyMeasurable [IsFiniteMeasure ΞΌ] (hf : βˆ€ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hfg : βˆ€α΅ x βˆ‚ΞΌ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) : TendstoInMeasure ΞΌ f atTop g := by
refine fun Ξ΅ hΞ΅ => ENNReal.tendsto_atTop_zero.mpr fun Ξ΄ hΞ΄ => ?_ by_cases hΞ΄i : Ξ΄ = ∞ Β· simp only [hΞ΄i, imp_true_iff, le_top, exists_const] lift Ξ΄ to ℝβ‰₯0 using hΞ΄i rw [gt_iff_lt, ENNReal.coe_pos, ← NNReal.coe_pos] at hΞ΄ obtain ⟨t, _, ht, hunif⟩ := tendstoUniformlyOn_of_ae_tendsto' hf hg hfg hΞ΄ rw [ENNRea...
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (...
Mathlib/Data/QPF/Univariate/Basic.lean
348
357
theorem Fix.ind (p : Fix F β†’ Prop) (h : βˆ€ x : F (Fix F), Liftp p x β†’ p (Fix.mk x)) : βˆ€ x, p x := by
apply Quot.ind intro x induction' x with a f ih change p ⟦⟨a, f⟩⟧ rw [← Fix.ind_aux a f] apply h rw [liftp_iff] refine ⟨_, _, rfl, ?_⟩ convert ih
import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.ContinuousFunction.Compact import Mathlib.Topology.UrysohnsLemma import Mathlib.Analysis.RCLike.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Topology.Algebra.Module.CharacterSpace #align_import topology.continuous_function.ideals from "...
Mathlib/Topology/ContinuousFunction/Ideals.lean
154
156
theorem mem_idealOfSet_compl_singleton (x : X) (f : C(X, R)) : f ∈ idealOfSet R ({x}ᢜ : Set X) ↔ f x = 0 := by
simp only [mem_idealOfSet, compl_compl, Set.mem_singleton_iff, forall_eq]
import Mathlib.Analysis.Convex.Basic import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Order.Basic #align_import analysis.convex.strict from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Set open Convex Pointwise variable {π•œ 𝕝 E F Ξ² : Type*} open Function Se...
Mathlib/Analysis/Convex/Strict.lean
366
371
theorem StrictConvex.affine_preimage {s : Set F} (hs : StrictConvex π•œ s) {f : E →ᡃ[π•œ] F} (hf : Continuous f) (hfinj : Injective f) : StrictConvex π•œ (f ⁻¹' s) := by
intro x hx y hy hxy a b ha hb hab refine preimage_interior_subset_interior_preimage hf ?_ rw [mem_preimage, Convex.combo_affine_apply hab] exact hs hx hy (hfinj.ne hxy) ha hb hab
import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.Vector.Basic import Mathlib.Data.PFun import Mathlib.Logic.Function.Iterate import Mathlib.Order.Basic import Mathlib.Tactic.ApplyFun #align_import computability.turing_machine from "leanprover-commu...
Mathlib/Computability/TuringMachine.lean
397
400
theorem ListBlank.head_map {Ξ“ Ξ“'} [Inhabited Ξ“] [Inhabited Ξ“'] (f : PointedMap Ξ“ Ξ“') (l : ListBlank Ξ“) : (l.map f).head = f l.head := by
conv => lhs; rw [← ListBlank.cons_head_tail l] exact Quotient.inductionOn' l fun a ↦ rfl
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.SesquilinearForm import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845" universe u v w variable {S T : ...
Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
222
227
theorem map_add_add_add_map (x y z : M) : Q (x + y + z) + (Q x + Q y + Q z) = Q (x + y) + Q (y + z) + Q (z + x) := by
obtain ⟨B, h⟩ := Q.exists_companion rw [add_comm z x] simp only [h, map_add, LinearMap.add_apply] abel
import Mathlib.Analysis.InnerProductSpace.TwoDim import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic #align_import geometry.euclidean.angle.oriented.basic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" noncomputable section open FiniteDimensional Complex open scoped Real Rea...
Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
306
308
theorem oangle_smul_left_of_neg (x y : V) {r : ℝ} (hr : r < 0) : o.oangle (r β€’ x) y = o.oangle (-x) y := by
rw [← neg_neg r, neg_smul, ← smul_neg, o.oangle_smul_left_of_pos _ _ (neg_pos_of_neg hr)]
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Order.Group.Instances import Mathlib.GroupTheory.GroupAction.Pi open Function Set structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where protected...
Mathlib/Algebra/AddConstMap/Basic.lean
191
193
theorem map_zsmul_const [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b] (f : F) (n : β„€) : f (n β€’ a) = f 0 + n β€’ b := by
simpa using map_add_zsmul f 0 n
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Ideal.Maps import Mathlib.Tactic.TFAE #align_import ring_theory.valuation.basic from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open scoped Classical open Function Ideal nonco...
Mathlib/RingTheory/Valuation/Basic.lean
386
393
theorem map {v' : Valuation R Ξ“β‚€} (f : Ξ“β‚€ β†’*β‚€ Ξ“'β‚€) (hf : Monotone f) (inf : Injective f) (h : v.IsEquiv v') : (v.map f hf).IsEquiv (v'.map f hf) := let H : StrictMono f := hf.strictMono_of_injective inf fun r s => calc f (v r) ≀ f (v s) ↔ v r ≀ v s := by
rw [H.le_iff_le] _ ↔ v' r ≀ v' s := h r s _ ↔ f (v' r) ≀ f (v' s) := by rw [H.le_iff_le]
import Mathlib.Analysis.InnerProductSpace.Calculus import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.euclidean_dist from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057" open scoped Topology open Set variable {E : Type*} [AddCommGroup E] [Topologi...
Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean
117
119
theorem nhds_basis_ball {x : E} : (𝓝 x).HasBasis (fun r : ℝ => 0 < r) (ball x) := by
rw [toEuclidean.toHomeomorph.nhds_eq_comap x] exact Metric.nhds_basis_ball.comap _
import Mathlib.Analysis.Normed.Group.Basic import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.AffineSpace.Midpoint #align_import analysis.normed.group.add_torsor from "leanprover-community/mathlib"@"837f72de63ad6cd96519cde5f1ffd5ed8d280ad0" noncomputable section open NNReal Topo...
Mathlib/Analysis/Normed/Group/AddTorsor.lean
190
194
theorem edist_vadd_vadd_le (v v' : V) (p p' : P) : edist (v +α΅₯ p) (v' +α΅₯ p') ≀ edist v v' + edist p p' := by
simp only [edist_nndist] norm_cast -- Porting note: was apply_mod_cast apply dist_vadd_vadd_le
import Mathlib.Analysis.BoxIntegral.Partition.Basic #align_import analysis.box_integral.partition.tagged from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" noncomputable section open scoped Classical open ENNReal NNReal open Set Function namespace BoxIntegral variable {ΞΉ : Type*} ...
Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
384
390
theorem IsSubordinate.disjUnion [Fintype ΞΉ] (h₁ : IsSubordinate π₁ r) (hβ‚‚ : IsSubordinate Ο€β‚‚ r) (h : Disjoint π₁.iUnion Ο€β‚‚.iUnion) : IsSubordinate (π₁.disjUnion Ο€β‚‚ h) r := by
refine fun J hJ => (Finset.mem_union.1 hJ).elim (fun hJ => ?_) fun hJ => ?_ Β· rw [disjUnion_tag_of_mem_left _ hJ] exact h₁ _ hJ Β· rw [disjUnion_tag_of_mem_right _ hJ] exact hβ‚‚ _ hJ
import Mathlib.Algebra.Lie.CartanSubalgebra import Mathlib.Algebra.Lie.Weights.Basic suppress_compilation open Set variable {R L : Type*} [CommRing R] [LieRing L] [LieAlgebra R L] (H : LieSubalgebra R L) [LieAlgebra.IsNilpotent R H] {M : Type*} [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L ...
Mathlib/Algebra/Lie/Weights/Cartan.lean
239
242
theorem is_cartan_of_zeroRootSubalgebra_eq (h : zeroRootSubalgebra R L H = H) : H.IsCartanSubalgebra := { nilpotent := inferInstance self_normalizing := by
rw [← h]; exact zeroRootSubalgebra_normalizer_eq_self R L H }
import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Trace import Mathlib.RingTheory.Norm #align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" universe u v w z open scoped Matrix open Matrix FiniteDimensional Fintype Polynomial Fin...
Mathlib/RingTheory/Discriminant.lean
321
329
theorem discr_eq_discr [Fintype ΞΉ] (b : Basis ΞΉ β„€ A) (b' : Basis ΞΉ β„€ A) : Algebra.discr β„€ b = Algebra.discr β„€ b' := by
convert Algebra.discr_of_matrix_vecMul b' (b'.toMatrix b) Β· rw [Basis.toMatrix_map_vecMul] Β· suffices IsUnit (b'.toMatrix b).det by rw [Int.isUnit_iff, ← sq_eq_one_iff] at this rw [this, one_mul] rw [← LinearMap.toMatrix_id_eq_basis_toMatrix b b'] exact LinearEquiv.isUnit_det (LinearEquiv.ref...
import Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts #align_import category_theory.limits.shapes.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070" noncomputable section open CategoryTheory universe w v₁ vβ‚‚ v u...
Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean
1,608
1,609
theorem inl_comp_pushoutSymmetry_inv [HasPushout f g] : pushout.inl ≫ (pushoutSymmetry f g).inv = pushout.inr := by
simp [Iso.comp_inv_eq]
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import probability.conditional_probability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open ENNReal MeasureTheory MeasureTheory.Measure MeasurableSpace Set variable {Ξ© Ξ©' Ξ± : Type*} {m : MeasurableSpa...
Mathlib/Probability/ConditionalProbability.lean
134
135
theorem cond_univ [IsProbabilityMeasure ΞΌ] : ΞΌ[|Set.univ] = ΞΌ := by
simp [cond, measure_univ, Measure.restrict_univ]
import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f" universe u v w x variable {Ξ± : ...
Mathlib/Algebra/Ring/Defs.lean
156
157
theorem add_one_mul [RightDistribClass Ξ±] (a b : Ξ±) : (a + 1) * b = a * b + b := by
rw [add_mul, one_mul]
import Mathlib.Order.Interval.Set.Image import Mathlib.Order.CompleteLatticeIntervals import Mathlib.Topology.Order.DenselyOrdered import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.intermediate_value from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filt...
Mathlib/Topology/Order/IntermediateValue.lean
312
321
theorem setOf_isPreconnected_subset_of_ordered : { s : Set Ξ± | IsPreconnected s } βŠ† -- bounded intervals (range (uncurry Icc) βˆͺ range (uncurry Ico) βˆͺ range (uncurry Ioc) βˆͺ range (uncurry Ioo)) βˆͺ -- unbounded intervals and `univ` (range Ici βˆͺ range Ioi βˆͺ range Iic βˆͺ range Iio βˆͺ {univ, βˆ…}) := ...
intro s hs rcases hs.mem_intervals with (hs | hs | hs | hs | hs | hs | hs | hs | hs | hs) <;> rw [hs] <;> simp only [union_insert, union_singleton, mem_insert_iff, mem_union, mem_range, Prod.exists, uncurry_apply_pair, exists_apply_eq_apply, true_or, or_true, exists_apply_eq_apply2]
import Mathlib.Data.Set.Lattice import Mathlib.Order.Directed #align_import data.set.Union_lift from "leanprover-community/mathlib"@"5a4ea8453f128345f73cc656e80a49de2a54f481" variable {Ξ± : Type*} {ΞΉ Ξ² : Sort _} namespace Set section UnionLift @[nolint unusedArguments] noncomputable def iUnionLift (S : ΞΉ β†’ Set...
Mathlib/Data/Set/UnionLift.lean
79
90
theorem preimage_iUnionLift (t : Set Ξ²) : iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' (⋃ i, inclusion (subset_iUnion S i) '' (f i ⁻¹' t)) := by
ext x simp only [mem_preimage, mem_iUnion, mem_image] constructor · rcases mem_iUnion.1 (hT x.prop) with ⟨i, hi⟩ refine fun h => ⟨i, ⟨x, hi⟩, ?_, rfl⟩ rwa [iUnionLift_of_mem x hi] at h · rintro ⟨i, ⟨y, hi⟩, h, hxy⟩ obtain rfl : y = x := congr_arg Subtype.val hxy rwa [iUnionLift_of_mem x hi]
import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.adjoin.fg from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" universe u v w open Subsemiring Ring Submodule open Pointwise na...
Mathlib/RingTheory/Adjoin/FG.lean
170
179
theorem induction_on_adjoin [IsNoetherian R A] (P : Subalgebra R A β†’ Prop) (base : P βŠ₯) (ih : βˆ€ (S : Subalgebra R A) (x : A), P S β†’ P (Algebra.adjoin R (insert x S))) (S : Subalgebra R A) : P S := by
classical obtain ⟨t, rfl⟩ := S.fg_of_noetherian refine Finset.induction_on t ?_ ?_ · simpa using base intro x t _ h rw [Finset.coe_insert] simpa only [Algebra.adjoin_insert_adjoin] using ih _ x h
import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Data.Nat.SuccPred #align_import set_theory.ordinal.arithmetic from "leanprover-community/mathlib"@"31b269b60935483943542d547a6dd83a66b37dc7" assert_not_exists Field assert_not_exists Module noncomputable section open Function Cardinal Set Equiv Order open sc...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
1,401
1,407
theorem iSup_ord {ΞΉ} {f : ΞΉ β†’ Cardinal} (hf : BddAbove (range f)) : (iSup f).ord = ⨆ i, (f i).ord := by
unfold iSup convert sSup_ord hf -- Porting note: `change` is required. conv_lhs => change range (ord ∘ f) rw [range_comp]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL2 #align_import measure_theory.function.conditional_expectation.condexp_L1 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" noncomputable section open TopologicalSpace MeasureTheory.Lp Filter ContinuousLinearMap o...
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
92
102
theorem condexpIndL1Fin_add (hs : MeasurableSet s) (hΞΌs : ΞΌ s β‰  ∞) (x y : G) : condexpIndL1Fin hm hs hΞΌs (x + y) = condexpIndL1Fin hm hs hΞΌs x + condexpIndL1Fin hm hs hΞΌs y := by
ext1 refine (Memβ„’p.coeFn_toLp q).trans ?_ refine EventuallyEq.trans ?_ (Lp.coeFn_add _ _).symm refine EventuallyEq.trans ?_ (EventuallyEq.add (Memβ„’p.coeFn_toLp q).symm (Memβ„’p.coeFn_toLp q).symm) rw [condexpIndSMul_add] refine (Lp.coeFn_add _ _).trans (eventually_of_forall fun a => ?_) rfl
import Mathlib.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : βˆ€ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
144
145
theorem size_eq_zero {n : β„•} : size n = 0 ↔ n = 0 := by
simpa [Nat.pos_iff_ne_zero, not_iff_not] using size_pos
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
256
258
theorem nhdsWithin_inter (a : Ξ±) (s t : Set Ξ±) : 𝓝[s ∩ t] a = 𝓝[s] a βŠ“ 𝓝[t] a := by
delta nhdsWithin rw [inf_left_comm, inf_assoc, inf_principal, ← inf_assoc, inf_idem]
import Mathlib.GroupTheory.FreeGroup.Basic import Mathlib.GroupTheory.QuotientGroup #align_import group_theory.presented_group from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46" variable {Ξ± : Type*} def PresentedGroup (rels : Set (FreeGroup Ξ±)) := FreeGroup Ξ± β§Έ Subgroup.normalClosu...
Mathlib/GroupTheory/PresentedGroup.lean
101
104
theorem ext {Ο† ψ : PresentedGroup rels β†’* G} (hx : βˆ€ (x : Ξ±), Ο† (.of x) = ψ (.of x)) : Ο† = ψ := by
unfold PresentedGroup ext apply hx
import Mathlib.CategoryTheory.CommSq import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.CategoryTheory.Limits.Shapes.Biproducts import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts import Mathlib.CategoryTheory.Limits.Constructions.ZeroO...
Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean
829
832
theorem of_is_bilimit' {b : BinaryBicone X Y} (h : b.IsBilimit) : IsPushout b.fst b.snd (0 : X ⟢ 0) (0 : Y ⟢ 0) := by
refine IsPushout.of_right ?_ (by simp) (IsPushout.inl_snd' h) simp
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Monomial import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Nat.WithBot import Mathlib.Data.Nat.Cast.WithTop import Mathlib.Data.Nat.SuccPred #align_import data.polynomial.degree.definitions...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
316
317
theorem degree_C_mul_X_le (a : R) : degree (C a * X) ≀ 1 := by
simpa only [pow_one] using degree_C_mul_X_pow_le 1 a
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Deprecated.Submonoid #align_import deprecated.subgroup from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" open Set Function variable {G : Type*} {H : Type*} {A : Type*} {a a₁ aβ‚‚ b c : G} structure IsNormalAddSubgroup [AddGro...
Mathlib/Deprecated/Subgroup.lean
274
287
theorem center_normal : IsNormalSubgroup (center G) := { one_mem := by
simp [center] mul_mem := fun ha hb g => by rw [← mul_assoc, mem_center.2 ha g, mul_assoc, mem_center.2 hb g, ← mul_assoc] inv_mem := fun {a} ha g => calc g * a⁻¹ = a⁻¹ * (g * a) * a⁻¹ := by simp [ha g] _ = a⁻¹ * g := by rw [← mul_assoc, mul_assoc]; simp normal := fun n ha g h =>...
import Mathlib.Algebra.Polynomial.Basic import Mathlib.SetTheory.Cardinal.Ordinal #align_import data.polynomial.cardinal from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c" universe u open Cardinal Polynomial open Cardinal namespace Polynomial @[simp] theorem cardinal_mk_eq_max {R :...
Mathlib/Algebra/Polynomial/Cardinal.lean
34
37
theorem cardinal_mk_le_max {R : Type u} [Semiring R] : #(R[X]) ≀ max #R β„΅β‚€ := by
cases subsingleton_or_nontrivial R Β· exact (mk_eq_one _).trans_le (le_max_of_le_right one_le_aleph0) Β· exact cardinal_mk_eq_max.le
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variab...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
508
510
theorem pow_rpow_inv_natCast (hx : 0 ≀ x) (hn : n β‰  0) : (x ^ n) ^ (n⁻¹ : ℝ) = x := by
have hn0 : (n : ℝ) β‰  0 := Nat.cast_ne_zero.2 hn rw [← rpow_natCast, ← rpow_mul hx, mul_inv_cancel hn0, rpow_one]
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
123
125
theorem lcm_eq_zero_iff [Nontrivial Ξ±] : s.lcm f = 0 ↔ 0 ∈ f '' s := by
simp only [Multiset.mem_map, lcm_def, Multiset.lcm_eq_zero_iff, Set.mem_image, mem_coe, ← Finset.mem_def]
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Choose.Sum import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f" namespace PowerS...
Mathlib/RingTheory/PowerSeries/WellKnown.lean
52
55
theorem invUnitsSub_mul_X (u : RΛ£) : invUnitsSub u * X = invUnitsSub u * C R u - 1 := by
ext (_ | n) Β· simp Β· simp [n.succ_ne_zero, pow_succ']
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75f7ac6204d142debc840" noncomputable section open Affine open Set section variable (k : Type*) {V : Type*} {P : Type*} [Ring k] [AddCommGroup V]...
Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
815
818
theorem card_pos_of_affineSpan_eq_top {ΞΉ : Type*} [Fintype ΞΉ] {p : ΞΉ β†’ P} (h : affineSpan k (range p) = ⊀) : 0 < Fintype.card ΞΉ := by
obtain ⟨-, ⟨i, -⟩⟩ := nonempty_of_affineSpan_eq_top k V P h exact Fintype.card_pos_iff.mpr ⟨i⟩
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f ...
Mathlib/Data/ENNReal/Real.lean
556
561
theorem toNNReal_iSup (hf : βˆ€ i, f i β‰  ∞) : (iSup f).toNNReal = ⨆ i, (f i).toNNReal := by
lift f to ΞΉ β†’ ℝβ‰₯0 using hf simp_rw [toNNReal_coe] by_cases h : BddAbove (range f) Β· rw [← coe_iSup h, toNNReal_coe] Β· rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal]
import Mathlib.Combinatorics.SimpleGraph.DegreeSum import Mathlib.Combinatorics.SimpleGraph.Subgraph #align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508" universe u namespace SimpleGraph variable {V : Type u} {G : SimpleGraph V} (M : Su...
Mathlib/Combinatorics/SimpleGraph/Matching.lean
77
80
theorem IsMatching.toEdge_eq_toEdge_of_adj {M : Subgraph G} {v w : V} (h : M.IsMatching) (hv : v ∈ M.verts) (hw : w ∈ M.verts) (ha : M.Adj v w) : h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩ := by
rw [h.toEdge_eq_of_adj hv ha, h.toEdge_eq_of_adj hw (M.symm ha), Subtype.mk_eq_mk, Sym2.eq_swap]
import Mathlib.SetTheory.Ordinal.Arithmetic import Mathlib.SetTheory.Ordinal.Exponential #align_import set_theory.ordinal.cantor_normal_form from "leanprover-community/mathlib"@"991ff3b5269848f6dd942ae8e9dd3c946035dc8b" noncomputable section universe u open List namespace Ordinal @[elab_as_elim] noncomputabl...
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
108
109
theorem CNF_of_lt {b o : Ordinal} (ho : o β‰  0) (hb : o < b) : CNF b o = [⟨0, o⟩] := by
simp only [CNF_ne_zero ho, log_eq_zero hb, opow_zero, div_one, mod_one, CNF_zero]
import Mathlib.LinearAlgebra.Isomorphisms import Mathlib.LinearAlgebra.Projection import Mathlib.Order.JordanHolder import Mathlib.Order.CompactlyGenerated.Intervals import Mathlib.LinearAlgebra.FiniteDimensional #align_import ring_theory.simple_module from "leanprover-community/mathlib"@"cce7f68a7eaadadf74c82bbac207...
Mathlib/RingTheory/SimpleModule.lean
193
195
theorem sSup_simples_le (N : Submodule R M) : sSup { m : Submodule R M | IsSimpleModule R m ∧ m ≀ N } = N := by
simpa only [isSimpleModule_iff_isAtom] using sSup_atoms_le_eq _
import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.ldl from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" variable {π•œ : Type*} [RCLike π•œ] variable {n : Type*} [LinearOrder n] [IsWellOrder n (Β· < Β·)...
Mathlib/LinearAlgebra/Matrix/LDL.lean
123
127
theorem LDL.lower_conj_diag : LDL.lower hS * LDL.diag hS * (LDL.lower hS)α΄΄ = S := by
rw [LDL.lower, conjTranspose_nonsing_inv, Matrix.mul_assoc, Matrix.inv_mul_eq_iff_eq_mul_of_invertible (LDL.lowerInv hS), Matrix.mul_inv_eq_iff_eq_mul_of_invertible] exact LDL.diag_eq_lowerInv_conj hS
import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.ldl from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" variable {π•œ : Type*} [RCLike π•œ] variable {n : Type*} [LinearOrder n] [IsWellOrder n (Β· < Β·)...
Mathlib/LinearAlgebra/Matrix/LDL.lean
57
66
theorem LDL.lowerInv_eq_gramSchmidtBasis : LDL.lowerInv hS = ((Pi.basisFun π•œ n).toMatrix (@gramSchmidtBasis π•œ (n β†’ π•œ) _ (_ : _) (InnerProductSpace.ofMatrix hS.transpose) n _ _ _ (Pi.basisFun π•œ n)))α΅€ := by
letI := NormedAddCommGroup.ofMatrix hS.transpose letI := InnerProductSpace.ofMatrix hS.transpose ext i j rw [LDL.lowerInv, Basis.coePiBasisFun.toMatrix_eq_transpose, coe_gramSchmidtBasis] rfl
import Mathlib.Data.Complex.Basic import Mathlib.MeasureTheory.Integral.CircleIntegral #align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" open Set MeasureTheory Metric Filter Function open scoped Interval Real noncomputable secti...
Mathlib/MeasureTheory/Integral/CircleTransform.lean
48
55
theorem circleTransformDeriv_periodic (f : β„‚ β†’ E) : Periodic (circleTransformDeriv R z w f) (2 * Ο€) := by
have := periodic_circleMap simp_rw [Periodic] at * intro x simp_rw [circleTransformDeriv, this] congr 2 simp [this]
import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Nat.Prime import Mathlib.Data.List.Prime import Mathlib.Data.List.Sort import Mathlib.Data.List.Chain #align_import data.nat.factors from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" open Bool Subtype open Nat namespac...
Mathlib/Data/Nat/Factors.lean
45
45
theorem factors_zero : factors 0 = [] := by
rw [factors]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology.Instances.Sign #align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
501
504
theorem abs_cos_eq_of_two_zsmul_eq {ΞΈ ψ : Angle} (h : (2 : β„€) β€’ ΞΈ = (2 : β„€) β€’ ψ) : |cos ΞΈ| = |cos ψ| := by
simp_rw [two_zsmul, ← two_nsmul] at h exact abs_cos_eq_of_two_nsmul_eq h
import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analysis.special_functions.pow.nnreal from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real NNReal ENNReal ComplexConjugate open Finset Function Set namespace NNReal var...
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
112
113
theorem rpow_self_rpow_inv {y : ℝ} (hy : y β‰  0) (x : ℝβ‰₯0) : (x ^ (1 / y)) ^ y = x := by
field_simp [← rpow_mul]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.Order.BigOperators.Group.Multiset import Mathlib.Tactic.NormNum.Basic import Mathlib.Tactic.Positivity.Core #align_import algebra.big_operators.order from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" open Function ...
Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
281
287
theorem card_le_mul_card_image_of_maps_to {f : Ξ± β†’ Ξ²} {s : Finset Ξ±} {t : Finset Ξ²} (Hf : βˆ€ a ∈ s, f a ∈ t) (n : β„•) (hn : βˆ€ a ∈ t, (s.filter fun x ↦ f x = a).card ≀ n) : s.card ≀ n * t.card := calc s.card = βˆ‘ a ∈ t, (s.filter fun x ↦ f x = a).card := card_eq_sum_card_fiberwise Hf _ ≀ βˆ‘ _a ∈ t, n := su...
simp [mul_comm]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
509
510
theorem toNNReal_div (a b : ℝβ‰₯0∞) : (a / b).toNNReal = a.toNNReal / b.toNNReal := by
rw [div_eq_mul_inv, toNNReal_mul, toNNReal_inv, div_eq_mul_inv]
import Mathlib.Algebra.Polynomial.Monic #align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722" open Finset open Multiset open Polynomial universe u w variable {R : Type u} {ΞΉ : Type w} namespace Polynomial variable (s : Finset ΞΉ) sectio...
Mathlib/Algebra/Polynomial/BigOperators.lean
145
156
theorem leadingCoeff_multiset_prod' (h : (t.map leadingCoeff).prod β‰  0) : t.prod.leadingCoeff = (t.map leadingCoeff).prod := by
induction' t using Multiset.induction_on with a t ih; · simp simp only [Multiset.map_cons, Multiset.prod_cons] at h ⊒ rw [Polynomial.leadingCoeff_mul'] · rw [ih] simp only [ne_eq] apply right_ne_zero_of_mul h · rw [ih] · exact h simp only [ne_eq, not_false_eq_true] apply right_ne_zero_of_...
import Mathlib.Algebra.MonoidAlgebra.Basic #align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {k G : Type*} [Semiring k] namespace AddMonoidAlgebra section variable [AddCancelCommMonoid G] noncomputable def divOf (x : k[G]) (g...
Mathlib/Algebra/MonoidAlgebra/Division.lean
105
109
theorem of'_mul_divOf (a : G) (x : k[G]) : of' k G a * x /α΅’αΆ  a = x := by
refine Finsupp.ext fun _ => ?_ -- Porting note: `ext` doesn't work rw [AddMonoidAlgebra.divOf_apply, of'_apply, single_mul_apply_aux, one_mul] intro c exact add_right_inj _
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiber...
Mathlib/Analysis/Complex/ReImTopology.lean
164
165
theorem frontier_setOf_lt_re (a : ℝ) : frontier { z : β„‚ | a < z.re } = { z | z.re = a } := by
simpa only [frontier_Ioi] using frontier_preimage_re (Ioi a)
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Int.ModEq import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Index import Mathlib.Order.Interval.Finset.Nat import Mat...
Mathlib/GroupTheory/OrderOfElement.lean
227
228
theorem IsOfFinOrder.mono [Monoid β] {y : β} (hx : IsOfFinOrder x) (h : orderOf y ∣ orderOf x) : IsOfFinOrder y := by
rw [← orderOf_pos_iff] at hx ⊒; exact Nat.pos_of_dvd_of_pos h hx
import Mathlib.Algebra.MvPolynomial.Rename import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.monad from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section namespace MvPolynomial open Finsupp variable {Οƒ : Type*} {Ο„ : Type*} variable {R S...
Mathlib/Algebra/MvPolynomial/Monad.lean
339
342
theorem bindβ‚‚_monomial (f : R β†’+* MvPolynomial Οƒ S) (d : Οƒ β†’β‚€ β„•) (r : R) : bindβ‚‚ f (monomial d r) = f r * monomial d 1 := by
simp only [monomial_eq, RingHom.map_mul, bindβ‚‚_C_right, Finsupp.prod, map_prod, map_pow, bindβ‚‚_X_right, C_1, one_mul]
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp #align_import measure_theory.integral.set_to_l1 from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical Topology NNReal ENNReal MeasureTheory Pointwise open Set Filter TopologicalSpace ENNR...
Mathlib/MeasureTheory/Integral/SetToL1.lean
1,198
1,207
theorem norm_setToL1_le_norm_setToL1SCLM (hT : DominatedFinMeasAdditive ΞΌ T C) : β€–setToL1 hTβ€– ≀ β€–setToL1SCLM Ξ± E ΞΌ hTβ€– := calc β€–setToL1 hTβ€– ≀ (1 : ℝβ‰₯0) * β€–setToL1SCLM Ξ± E ΞΌ hTβ€– := by
refine ContinuousLinearMap.opNorm_extend_le (setToL1SCLM Ξ± E ΞΌ hT) (coeToLp Ξ± E ℝ) (simpleFunc.denseRange one_ne_top) fun x => le_of_eq ?_ rw [NNReal.coe_one, one_mul] rfl _ = β€–setToL1SCLM Ξ± E ΞΌ hTβ€– := by rw [NNReal.coe_one, one_mul]
import Mathlib.MeasureTheory.Group.Action import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Group.Pointwise #align_import measure_theory.group.fundamental_domain from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f" open scoped ENNReal Pointwise Topology NNRea...
Mathlib/MeasureTheory/Group/FundamentalDomain.lean
656
658
theorem fundamentalInterior_smul [Group H] [MulAction H Ξ±] [SMulCommClass H G Ξ±] (g : H) : fundamentalInterior G (g β€’ s) = g β€’ fundamentalInterior G s := by
simp_rw [fundamentalInterior, smul_set_sdiff, smul_set_iUnion, smul_comm g (_ : G) (_ : Set Ξ±)]
import Mathlib.Tactic.FinCases import Mathlib.Data.Nat.Choose.Sum import Mathlib.LinearAlgebra.Finsupp import Mathlib.Algebra.Field.IsField #align_import ring_theory.ideal.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v w variable {Ξ± : Type u} {Ξ² : Type v} open ...
Mathlib/RingTheory/Ideal/Basic.lean
274
280
theorem not_isPrime_iff {I : Ideal Ξ±} : Β¬I.IsPrime ↔ I = ⊀ ∨ βˆƒ (x : Ξ±) (_hx : x βˆ‰ I) (y : Ξ±) (_hy : y βˆ‰ I), x * y ∈ I := by
simp_rw [Ideal.isPrime_iff, not_and_or, Ne, Classical.not_not, not_forall, not_or] exact or_congr Iff.rfl ⟨fun ⟨x, y, hxy, hx, hy⟩ => ⟨x, hx, y, hy, hxy⟩, fun ⟨x, hx, y, hy, hxy⟩ => ⟨x, y, hxy, hx, hy⟩⟩
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
425
426
theorem thickening_closure : thickening Ξ΄ (closure s) = thickening Ξ΄ s := by
simp_rw [thickening, infEdist_closure]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
466
471
theorem sin_angle_mul_dist_of_angle_eq_pi_div_two {p₁ pβ‚‚ p₃ : P} (h : ∠ p₁ pβ‚‚ p₃ = Ο€ / 2) : Real.sin (∠ pβ‚‚ p₃ p₁) * dist p₁ p₃ = dist p₁ pβ‚‚ := by
rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left, neg_vsub_eq_vsub_rev] at h rw [angle, dist_eq_norm_vsub V p₁ pβ‚‚, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ pβ‚‚ p₃, add_comm, sin_angle_add_mul_norm_of_inner_eq_zero h]
import Mathlib.Data.Real.Pi.Bounds import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody -- TODO. Rewrite some of the FLT results on the disciminant using the definitions and results of -- this file namespace NumberField open FiniteDimensional NumberField NumberField.InfinitePlace Matrix open sco...
Mathlib/NumberTheory/NumberField/Discriminant.lean
46
48
theorem discr_ne_zero : discr K β‰  0 := by
rw [← (Int.cast_injective (Ξ± := β„š)).ne_iff, coe_discr] exact Algebra.discr_not_zero_of_basis β„š (integralBasis K)