Context stringlengths 285 157k | 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 |
|---|---|---|---|---|---|
/-
Copyright (c) 2022 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
import Mathlib.Data.Finsupp.Defs
#align_import data.list.to_finsupp from "leanprover-community/mathlib"@"06a655b5fcfbda03502f9158bbf6c0f1400886f9"
/-!
# Lists as... | Mathlib/Data/List/ToFinsupp.lean | 128 | 136 | theorem toFinsupp_cons_eq_single_add_embDomain {R : Type*} [AddZeroClass R] (x : R) (xs : List R)
[DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :
toFinsupp (x::xs) =
Finsupp.single 0 x + (toFinsupp xs).embDomain ⟨Nat.succ, Nat.succ_injective⟩ := by |
classical
convert toFinsupp_append [x] xs using 3
· exact (toFinsupp_singleton x).symm
· ext n
exact add_comm n 1
|
/-
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Algebra.FreeMonoid.Basic
#align_import algebra.free_monoid.count from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f"
/-!... | Mathlib/Algebra/FreeMonoid/Count.lean | 43 | 45 | theorem count_of [DecidableEq α] (x y : α) : count x (of y) = (Pi.single x 1 : α → ℕ) y := by |
simp [Pi.single, Function.update, count, countP, List.countP, List.countP.go,
Bool.beq_eq_decide_eq]
|
/-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Jeremy Avigad, Yury Kudryashov
-/
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Order.Filter.Pi
#align_import order.filter.cofinite from "leanprover-community/ma... | Mathlib/Order/Filter/Cofinite.lean | 63 | 65 | theorem frequently_cofinite_iff_infinite {p : α → Prop} :
(∃ᶠ x in cofinite, p x) ↔ Set.Infinite { x | p x } := by |
simp only [Filter.Frequently, eventually_cofinite, not_not, Set.Infinite]
|
/-
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad, Mario Carneiro
-/
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Nat.Prime
import Mathlib.Data.List.Prime
import Mathlib.Dat... | Mathlib/Data/Nat/Factors.lean | 166 | 170 | theorem le_of_mem_factors {n p : ℕ} (h : p ∈ n.factors) : p ≤ n := by |
rcases n.eq_zero_or_pos with (rfl | hn)
· rw [factors_zero] at h
cases h
· exact le_of_dvd hn (dvd_of_mem_factors h)
|
/-
Copyright (c) 2023 Xavier Roblot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Xavier Roblot
-/
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.MeasureTheory.Group.FundamentalDomain
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.Rin... | Mathlib/Algebra/Module/Zlattice/Basic.lean | 596 | 597 | theorem Basis.ofZlatticeBasis_apply (i : ι) :
b.ofZlatticeBasis K L i = b i := by | simp [Basis.ofZlatticeBasis]
|
/-
Copyright (c) 2022 Markus Himmel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel
-/
import Mathlib.CategoryTheory.Balanced
import Mathlib.CategoryTheory.Limits.EssentiallySmall
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.CategoryTheor... | Mathlib/CategoryTheory/Generator.lean | 628 | 637 | theorem isDetector_iff_reflectsIsomorphisms_coyoneda_obj (G : C) :
IsDetector G ↔ (coyoneda.obj (op G)).ReflectsIsomorphisms := by |
refine
⟨fun hG => ⟨fun f hf => hG.def _ fun h => ?_⟩, fun h =>
(isDetector_def _).2 fun X Y f hf => ?_⟩
· rw [isIso_iff_bijective, Function.bijective_iff_existsUnique] at hf
exact hf h
· suffices IsIso ((coyoneda.obj (op G)).map f) by
exact @isIso_of_reflects_iso _ _ _ _ _ _ _ (coyoneda.obj (... |
/-
Copyright (c) 2021 Stuart Presnell. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Stuart Presnell
-/
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Data.Nat.GCD.BigOperators
import Mathlib.Data.Nat.PrimeFin
import Mathlib.NumberTheory.Padics.PadicVal
import Ma... | Mathlib/Data/Nat/Factorization/Basic.lean | 422 | 427 | theorem factorization_prime_le_iff_dvd {d n : ℕ} (hd : d ≠ 0) (hn : n ≠ 0) :
(∀ p : ℕ, p.Prime → d.factorization p ≤ n.factorization p) ↔ d ∣ n := by |
rw [← factorization_le_iff_dvd hd hn]
refine ⟨fun h p => (em p.Prime).elim (h p) fun hp => ?_, fun h p _ => h p⟩
simp_rw [factorization_eq_zero_of_non_prime _ hp]
rfl
|
/-
Copyright (c) 2022 Moritz Doll. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Doll, Anatole Dedecker
-/
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 329 | 331 | theorem WithSeminorms.isOpen_iff_mem_balls (hp : WithSeminorms p) (U : Set E) :
IsOpen U ↔ ∀ x ∈ U, ∃ s : Finset ι, ∃ r > 0, (s.sup p).ball x r ⊆ U := by |
simp_rw [← WithSeminorms.mem_nhds_iff hp _ U, isOpen_iff_mem_nhds]
|
/-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "lean... | Mathlib/Analysis/Calculus/ContDiff/Defs.lean | 1,644 | 1,657 | theorem iteratedFDerivWithin_of_isOpen (n : ℕ) (hs : IsOpen s) :
EqOn (iteratedFDerivWithin 𝕜 n f s) (iteratedFDeriv 𝕜 n f) s := by |
induction' n with n IH
· intro x _
ext1
simp only [Nat.zero_eq, iteratedFDerivWithin_zero_apply, iteratedFDeriv_zero_apply]
· intro x hx
rw [iteratedFDeriv_succ_eq_comp_left, iteratedFDerivWithin_succ_eq_comp_left]
dsimp
congr 1
rw [fderivWithin_of_isOpen hs hx]
apply Filter.Eventuall... |
/-
Copyright (c) 2022 Antoine Labelle. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Antoine Labelle
-/
import Mathlib.RepresentationTheory.FdRep
import Mathlib.LinearAlgebra.Trace
import Mathlib.RepresentationTheory.Invariants
#align_import representation_theory.cha... | Mathlib/RepresentationTheory/Character.lean | 59 | 60 | theorem char_one (V : FdRep k G) : V.character 1 = FiniteDimensional.finrank k V := by |
simp only [character, map_one, trace_one]
|
/-
Copyright (c) 2021 Bryan Gin-ge Chen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Adam Topaz, Bryan Gin-ge Chen, Yaël Dillies
-/
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib... | Mathlib/Order/SymmDiff.lean | 739 | 740 | theorem compl_symmDiff : (a ∆ b)ᶜ = a ⇔ b := by |
simp_rw [symmDiff, compl_sup_distrib, compl_sdiff, bihimp, inf_comm]
|
/-
Copyright (c) 2018 Patrick Massot. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Patrick Massot, Johannes Hölzl
-/
import Mathlib.Topology.UniformSpace.UniformConvergence
import Mathlib.Topology.UniformSpace.UniformEmbedding
import Mathlib.Topology.UniformSpace.Com... | Mathlib/Topology/Algebra/UniformGroup.lean | 89 | 92 | theorem UniformContinuous.inv [UniformSpace β] {f : β → α} (hf : UniformContinuous f) :
UniformContinuous fun x => (f x)⁻¹ := by |
have : UniformContinuous fun x => 1 / f x := uniformContinuous_const.div hf
simp_all
|
/-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Yury Kudryashov
-/
import Mathlib.Algebra.BigOperators.WithTop
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.ENNReal.Basic
#align_import data.r... | Mathlib/Data/ENNReal/Operations.lean | 193 | 197 | theorem toNNReal_add {r₁ r₂ : ℝ≥0∞} (h₁ : r₁ ≠ ∞) (h₂ : r₂ ≠ ∞) :
(r₁ + r₂).toNNReal = r₁.toNNReal + r₂.toNNReal := by |
lift r₁ to ℝ≥0 using h₁
lift r₂ to ℝ≥0 using h₂
rfl
|
/-
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, Scott Morrison, Jens Wagemaker
-/
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.Data.Finset.So... | Mathlib/Algebra/Polynomial/Basic.lean | 546 | 546 | theorem C_bit1 : C (bit1 a) = bit1 (C a) := by | simp [bit1, C_bit0]
|
/-
Copyright (c) 2022 Joseph Myers. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Myers, Heather Macbeth
-/
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic
#align_import geometry.euclidean.angle.or... | Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean | 338 | 345 | theorem oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (hy : y ≠ 0)
(θ : Real.Angle) : o.oangle x y = θ ↔ ∃ r : ℝ, 0 < r ∧ y = r • o.rotation θ x := by |
constructor
· intro h
rw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h
exact ⟨‖y‖ / ‖x‖, div_pos (norm_pos_iff.2 hy) (norm_pos_iff.2 hx), h⟩
· rintro ⟨r, hr, rfl⟩
rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
|
/-
Copyright (c) 2020 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa, Alex Meiburg
-/
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-communi... | Mathlib/Algebra/Polynomial/EraseLead.lean | 182 | 190 | theorem eraseLead_add_of_natDegree_lt_left {p q : R[X]} (pq : q.natDegree < p.natDegree) :
(p + q).eraseLead = p.eraseLead + q := by |
ext n
by_cases nd : n = p.natDegree
· rw [nd, eraseLead_coeff, if_pos (natDegree_add_eq_left_of_natDegree_lt pq).symm]
simpa using (coeff_eq_zero_of_natDegree_lt pq).symm
· rw [eraseLead_coeff, coeff_add, coeff_add, eraseLead_coeff, if_neg, if_neg nd]
rintro rfl
exact nd (natDegree_add_eq_left_of_n... |
/-
Copyright (c) 2022 Wrenna Robson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Wrenna Robson
-/
import Mathlib.Topology.MetricSpace.Basic
#align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b"
/-... | Mathlib/Topology/MetricSpace/Infsep.lean | 182 | 184 | theorem Finset.coe_einfsep [DecidableEq α] {s : Finset α} :
(s : Set α).einfsep = s.offDiag.inf (uncurry edist) := by |
simp_rw [einfsep_of_fintype, ← Finset.coe_offDiag, Finset.toFinset_coe]
|
/-
Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8e... | Mathlib/Algebra/Polynomial/Expand.lean | 263 | 268 | theorem expand_char (f : R[X]) : map (frobenius R p) (expand R p f) = f ^ p := by |
refine f.induction_on' (fun a b ha hb => ?_) fun n a => ?_
· rw [AlgHom.map_add, Polynomial.map_add, ha, hb, add_pow_expChar]
· rw [expand_monomial, map_monomial, ← C_mul_X_pow_eq_monomial, ← C_mul_X_pow_eq_monomial,
mul_pow, ← C.map_pow, frobenius_def]
ring
|
/-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Mario Carneiro
-/
import Mathlib.Data.Countable.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Order.Disjointed
import Mathlib.MeasureTheory.OuterMeasure.Defs... | Mathlib/MeasureTheory/OuterMeasure/Basic.lean | 93 | 94 | theorem measure_le_inter_add_diff (μ : F) (s t : Set α) : μ s ≤ μ (s ∩ t) + μ (s \ t) := by |
simpa using measure_union_le (s ∩ t) (s \ t)
|
/-
Copyright (c) 2020 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon
-/
import Mathlib.Control.Monad.Basic
import Mathlib.Data.Part
import Mathlib.Order.Chain
import Mathlib.Order.Hom.Order
import Mathlib.Algebra.Order.Ring.Nat
#align_import o... | Mathlib/Order/OmegaCompletePartialOrder.lean | 542 | 545 | theorem sup_continuous {f g : α →o β} (hf : Continuous f) (hg : Continuous g) :
Continuous (f ⊔ g) := by |
rw [← sSup_pair]; apply sSup_continuous
rintro f (rfl | rfl | _) <;> assumption
|
/-
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, Scott Morrison, Jens Wagemaker
-/
import Mathlib.Algebra.Polynomial.Reverse
import Mathlib.Algebra.Regular.SMul
#align_import data.polynomial.monic from "l... | Mathlib/Algebra/Polynomial/Monic.lean | 203 | 207 | theorem not_dvd_of_natDegree_lt (hp : Monic p) (h0 : q ≠ 0) (hl : natDegree q < natDegree p) :
¬p ∣ q := by |
rintro ⟨r, rfl⟩
rw [hp.natDegree_mul' <| right_ne_zero_of_mul h0] at hl
exact hl.not_le (Nat.le_add_right _ _)
|
/-
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, Aaron Anderson
-/
import Mathlib.Algebra.BigOperators.Associated
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Finsupp.Multiset
import Math... | Mathlib/RingTheory/UniqueFactorizationDomain.lean | 1,075 | 1,090 | theorem prime_pow_coprime_prod_of_coprime_insert [DecidableEq α] {s : Finset α} (i : α → ℕ) (p : α)
(hps : p ∉ s) (is_prime : ∀ q ∈ insert p s, Prime q)
(is_coprime : ∀ᵉ (q ∈ insert p s) (q' ∈ insert p s), q ∣ q' → q = q') :
IsRelPrime (p ^ i p) (∏ p' ∈ s, p' ^ i p') := by |
have hp := is_prime _ (Finset.mem_insert_self _ _)
refine (isRelPrime_iff_no_prime_factors <| pow_ne_zero _ hp.ne_zero).mpr ?_
intro d hdp hdprod hd
apply hps
replace hdp := hd.dvd_of_dvd_pow hdp
obtain ⟨q, q_mem', hdq⟩ := hd.exists_mem_multiset_dvd hdprod
obtain ⟨q, q_mem, rfl⟩ := Multiset.mem_map.mp q_... |
/-
Copyright (c) 2024 Jiecheng Zhao. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jiecheng Zhao
-/
/-!
# Lemmas about `Array.extract`
Some useful lemmas about Array.extract
-/
set_option autoImplicit true
namespace Array
@[simp]
theorem extract_eq_nil_of_start_eq_... | Mathlib/Data/Array/ExtractLemmas.lean | 21 | 27 | theorem extract_append_left {a b : Array α} {i j : Nat} (h : j ≤ a.size) :
(a ++ b).extract i j = a.extract i j := by |
apply ext
· simp only [size_extract, size_append]
omega
· intro h1 h2 h3
rw [get_extract, get_append_left, get_extract]
|
/-
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
import Mathlib.LinearAlgebra.Alternating.Basic
import Mathlib.LinearAlgebra.Multilinear.TensorProduct
import Mathlib.GroupTheory.GroupAction.Quotient
/-!
# Exterior product... | Mathlib/LinearAlgebra/Alternating/DomCoprod.lean | 212 | 222 | theorem MultilinearMap.domCoprod_alternization_coe [DecidableEq ιa] [DecidableEq ιb]
(a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :
MultilinearMap.domCoprod (MultilinearMap.alternatization a)
(MultilinearMap.alternatization b) =
∑ σa : Perm ιa, ∑ σb : P... |
simp_rw [← MultilinearMap.domCoprod'_apply, MultilinearMap.alternatization_coe]
simp_rw [TensorProduct.sum_tmul, TensorProduct.tmul_sum, _root_.map_sum,
← TensorProduct.smul_tmul', TensorProduct.tmul_smul]
rfl
|
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory... | Mathlib/GroupTheory/Perm/Sign.lean | 524 | 548 | theorem prod_prodExtendRight {α : Type*} [DecidableEq α] (σ : α → Perm β) {l : List α}
(hl : l.Nodup) (mem_l : ∀ a, a ∈ l) :
(l.map fun a => prodExtendRight a (σ a)).prod = prodCongrRight σ := by |
ext ⟨a, b⟩ : 1
-- We'll use induction on the list of elements,
-- but we have to keep track of whether we already passed `a` in the list.
suffices a ∈ l ∧ (l.map fun a => prodExtendRight a (σ a)).prod (a, b) = (a, σ a b) ∨
a ∉ l ∧ (l.map fun a => prodExtendRight a (σ a)).prod (a, b) = (a, b) by
obtai... |
/-
Copyright (c) 2020 Aaron Anderson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Aaron Anderson
-/
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Module.BigOperators
import Mathlib.NumberTheory.Divisors
import Mathlib.Data.Nat.Squarefree
import Mat... | Mathlib/NumberTheory/ArithmeticFunction.lean | 1,191 | 1,192 | theorem coe_zeta_mul_moebius : (ζ * μ : ArithmeticFunction ℤ) = 1 := by |
rw [mul_comm, moebius_mul_coe_zeta]
|
/-
Copyright (c) 2018 Guy Leroy. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sangwoo Jo (aka Jason), Guy Leroy, Johannes Hölzl, Mario Carneiro
-/
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semicon... | Mathlib/Data/Int/GCD.lean | 418 | 420 | theorem lcm_zero_right (i : ℤ) : lcm i 0 = 0 := by |
rw [Int.lcm]
apply Nat.lcm_zero_right
|
/-
Copyright (c) 2020 Yury Kudryashov, Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov, Anne Baanen
-/
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Fin
import Mathlib.GroupTheo... | Mathlib/Algebra/BigOperators/Fin.lean | 167 | 170 | theorem prod_univ_eight [CommMonoid β] (f : Fin 8 → β) :
∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7 := by |
rw [prod_univ_castSucc, prod_univ_seven]
rfl
|
/-
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, Aaron Anderson
-/
import Mathlib.Algebra.BigOperators.Associated
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Finsupp.Multiset
import Math... | Mathlib/RingTheory/UniqueFactorizationDomain.lean | 602 | 610 | theorem normalizedFactors_prod {a : α} (ane0 : a ≠ 0) :
Associated (normalizedFactors a).prod a := by |
rw [normalizedFactors, factors, dif_neg ane0]
refine Associated.trans ?_ (Classical.choose_spec (exists_prime_factors a ane0)).2
rw [← Associates.mk_eq_mk_iff_associated, ← Associates.prod_mk, ← Associates.prod_mk,
Multiset.map_map]
congr 2
ext
rw [Function.comp_apply, Associates.mk_normalize]
|
/-
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.Order.Filter.Basic
import Mathlib.Topology.Bases
import Mathlib.Data.Set.Accumulate
import Mathlib.Topology.Bornology.... | Mathlib/Topology/Compactness/Compact.lean | 765 | 774 | theorem prod_nhdsSet_le_of_disjoint_cocompact {f : Filter X} (ht : IsCompact t)
(hf : Disjoint f (Filter.cocompact X)) :
f ×ˢ 𝓝ˢ t ≤ 𝓝ˢ (Set.univ ×ˢ t) := by |
obtain ⟨K, hKf, hK⟩ := (disjoint_cocompact_right f).mp hf
calc
f ×ˢ 𝓝ˢ t
_ ≤ (𝓟 K) ×ˢ 𝓝ˢ t := Filter.prod_mono_left _ (Filter.le_principal_iff.mpr hKf)
_ ≤ 𝓝ˢ K ×ˢ 𝓝ˢ t := Filter.prod_mono_left _ principal_le_nhdsSet
_ = 𝓝ˢ (K ×ˢ t) := (hK.nhdsSet_prod_eq ht).symm
_ ≤ �... |
/-
Copyright (c) 2021 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Data.List.Rotate
#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"... | Mathlib/Combinatorics/SimpleGraph/Connectivity.lean | 2,296 | 2,299 | theorem connectedComponentEquiv_symm (φ : G ≃g G') :
φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm := by |
ext ⟨_⟩
rfl
|
/-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathli... | Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 198 | 220 | theorem LipschitzOnWith.extend_finite_dimension {α : Type*} [PseudoMetricSpace α] {E' : Type*}
[NormedAddCommGroup E'] [NormedSpace ℝ E'] [FiniteDimensional ℝ E'] {s : Set α} {f : α → E'}
{K : ℝ≥0} (hf : LipschitzOnWith K f s) :
∃ g : α → E', LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s ... |
/- This result is already known for spaces `ι → ℝ`. We use a continuous linear equiv between
`E'` and such a space to transfer the result to `E'`. -/
let ι : Type _ := Basis.ofVectorSpaceIndex ℝ E'
let A := (Basis.ofVectorSpace ℝ E').equivFun.toContinuousLinearEquiv
have LA : LipschitzWith ‖A.toContinuousL... |
/-
Copyright (c) 2019 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Floris van Doorn
-/
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Group.Units.Hom
import Mathlib.Algebra.Opposites
import Mathlib.Algebra.Order.GroupW... | Mathlib/Data/Set/Pointwise/Basic.lean | 1,167 | 1,168 | theorem one_mem_div_iff : (1 : α) ∈ s / t ↔ ¬Disjoint s t := by |
simp [not_disjoint_iff_nonempty_inter, mem_div, div_eq_one, Set.Nonempty]
|
/-
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.Image
import Mathlib.Order.SuccPred.Relation
import Mathlib.Topology.Clopen
import Mathlib.Topology.Irreducib... | Mathlib/Topology/Connected/Basic.lean | 1,311 | 1,313 | theorem connectedComponents_preimage_image (U : Set α) :
(↑) ⁻¹' ((↑) '' U : Set (ConnectedComponents α)) = ⋃ x ∈ U, connectedComponent x := by |
simp only [connectedComponents_preimage_singleton, preimage_iUnion₂, image_eq_iUnion]
|
/-
Copyright (c) 2021 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import Mathlib.RingTheory.FiniteType
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Localization... | Mathlib/RingTheory/LocalProperties.lean | 166 | 176 | theorem RingHom.ofLocalizationSpanTarget_iff_finite :
RingHom.OfLocalizationSpanTarget @P ↔ RingHom.OfLocalizationFiniteSpanTarget @P := by |
delta RingHom.OfLocalizationSpanTarget RingHom.OfLocalizationFiniteSpanTarget
apply forall₅_congr
-- TODO: Using `refine` here breaks `resetI`.
intros
constructor
· intro h s; exact h s
· intro h s hs hs'
obtain ⟨s', h₁, h₂⟩ := (Ideal.span_eq_top_iff_finite s).mp hs
exact h s' h₂ fun x => hs' ⟨_,... |
/-
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprove... | Mathlib/Analysis/Complex/ReImTopology.lean | 149 | 150 | theorem frontier_setOf_le_im (a : ℝ) : frontier { z : ℂ | a ≤ z.im } = { z | z.im = a } := by |
simpa only [frontier_Ici] using frontier_preimage_im (Ici a)
|
/-
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, Scott Morrison, Jens Wagemaker
-/
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.Data.Finset.So... | Mathlib/Algebra/Polynomial/Basic.lean | 690 | 690 | theorem toFinsupp_apply (f : R[X]) (i) : f.toFinsupp i = f.coeff i := by | cases f; rfl
|
/-
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Reid Barton, Mario Carneiro, Scott Morrison, Floris van Doorn
-/
import Mathlib.CategoryTheory.Limits.IsLimit
import Mathlib.CategoryTheory.Category.ULift
import Mathlib.CategoryTheory... | Mathlib/CategoryTheory/Limits/HasLimits.lean | 1,127 | 1,130 | theorem colimit.map_desc (c : Cocone G) :
colimMap α ≫ colimit.desc G c = colimit.desc F ((Cocones.precompose α).obj c) := by |
ext j
simp [← assoc, colimit.ι_map, assoc, colimit.ι_desc, colimit.ι_desc]
|
/-
Copyright (c) 2022 Anatole Dedecker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anatole Dedecker
-/
import Mathlib.Topology.UniformSpace.UniformConvergenceTopology
#align_import topology.uniform_space.equicontinuity from "leanprover-community/mathlib"@"f2ce6086... | Mathlib/Topology/UniformSpace/Equicontinuity.lean | 709 | 715 | theorem Filter.HasBasis.uniformEquicontinuousOn_iff_right {p : κ → Prop}
{s : κ → Set (α × α)} {F : ι → β → α} {S : Set β} (hα : (𝓤 α).HasBasis p s) :
UniformEquicontinuousOn F S ↔
∀ k, p k → ∀ᶠ xy : β × β in 𝓤 β ⊓ 𝓟 (S ×ˢ S), ∀ i, (F i xy.1, F i xy.2) ∈ s k := by |
rw [uniformEquicontinuousOn_iff_uniformContinuousOn, UniformContinuousOn,
(UniformFun.hasBasis_uniformity_of_basis ι α hα).tendsto_right_iff]
rfl
|
/-
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.Init.Algebra.Classes
import Mathlib.Data.FunLike.Basic
import Mathlib.Logic.Embedding.Basic
import Mathlib.Order.RelClasses
#align_import order.rel_is... | Mathlib/Order/RelIso/Basic.lean | 438 | 447 | theorem acc_lift₂_iff [Setoid α] {r : α → α → Prop}
{H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂} {a} :
Acc (Quotient.lift₂ r H) ⟦a⟧ ↔ Acc r a := by |
constructor
· exact RelHomClass.acc (Quotient.mkRelHom H) a
· intro ac
induction' ac with _ _ IH
refine ⟨_, fun q h => ?_⟩
obtain ⟨a', rfl⟩ := q.exists_rep
exact IH a' h
|
/-
Copyright (c) 2021 Frédéric Dupuis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Frédéric Dupuis, Heather Macbeth
-/
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.adjoint f... | Mathlib/Analysis/InnerProductSpace/Adjoint.lean | 484 | 486 | theorem isSymmetric_adjoint_mul_self (T : E →ₗ[𝕜] E) : IsSymmetric (LinearMap.adjoint T * T) := by |
intro x y
simp only [mul_apply, adjoint_inner_left, adjoint_inner_right]
|
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne
-/
import Mathlib.Analysis.SpecialFunctions.Exp
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Analysis.NormedSpa... | Mathlib/Analysis/SpecialFunctions/Log/Basic.lean | 309 | 312 | theorem log_zpow (x : ℝ) (n : ℤ) : log (x ^ n) = n * log x := by |
induction n
· rw [Int.ofNat_eq_coe, zpow_natCast, log_pow, Int.cast_natCast]
rw [zpow_negSucc, log_inv, log_pow, Int.cast_negSucc, Nat.cast_add_one, neg_mul_eq_neg_mul]
|
/-
Copyright (c) 2021 Benjamin Davidson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Benjamin Davidson
-/
import Mathlib.MeasureTheory.Integral.FundThmCalculus
import Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv
import Mathlib.Analysis.SpecialFunction... | Mathlib/Analysis/SpecialFunctions/Integrals.lean | 269 | 271 | theorem intervalIntegrable_inv_one_add_sq :
IntervalIntegrable (fun x : ℝ => (↑1 + x ^ 2)⁻¹) μ a b := by |
field_simp; exact mod_cast intervalIntegrable_one_div_one_add_sq
|
/-
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
-/
import Mathlib.Data.Finsupp.Encodable
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Span
import Mathlib.Data.Set.Countable
#align_import linear_algebr... | Mathlib/LinearAlgebra/Finsupp.lean | 1,261 | 1,264 | theorem Span.finsupp_total_repr {w : Set M} (x : span R w) :
Finsupp.total w M R (↑) (Span.repr R w x) = x := by |
rw [Span.repr_def]
exact ((Finsupp.mem_span_iff_total _ _ _).mp x.2).choose_spec
|
/-
Copyright (c) 2019 Abhimanyu Pallavi Sudhir. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Abhimanyu Pallavi Sudhir
-/
import Mathlib.Order.Filter.FilterProduct
import Mathlib.Analysis.SpecificLimits.Basic
#align_import data.real.hyperreal from "leanprover-communi... | Mathlib/Data/Real/Hyperreal.lean | 842 | 845 | theorem infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg {x y : ℝ*} :
InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y) := by |
rw [← infinitePos_neg, ← neg_pos, neg_mul_eq_mul_neg, ← infinitesimal_neg]
exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos
|
/-
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.Pairwise.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.Data.SetLike.Basic
#align_import order.chain from "leanprover-community/mathlib... | Mathlib/Order/Chain.lean | 210 | 212 | theorem chainClosure_empty : ChainClosure r ∅ := by |
have : ChainClosure r (⋃₀∅) := ChainClosure.union fun a h => False.rec h
simpa using this
|
/-
Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Johan Commelin
-/
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.TensorProduct.Tower
import Mathlib.RingTheory.Adjoin.Basic
import Mathlib.... | Mathlib/RingTheory/TensorProduct/Basic.lean | 387 | 389 | theorem algebraMap_apply' (r : R) :
algebraMap R (A ⊗[R] B) r = 1 ⊗ₜ algebraMap R B r := by |
rw [algebraMap_apply, Algebra.algebraMap_eq_smul_one, Algebra.algebraMap_eq_smul_one, smul_tmul]
|
/-
Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Eric Wieser
-/
import Mathlib.Algebra.Algebra.Defs
import Mathlib.GroupTheory.GroupAction.BigOperators
import Mathlib.LinearAlgebra.Prod
#align_import algebra.triv_sq_zero_ext f... | Mathlib/Algebra/TrivSqZeroExt.lean | 1,102 | 1,105 | theorem map_comp_map (f : M →ₗ[R'] N) (g : N →ₗ[R'] P) :
map (g.comp f) = (map g).comp (map f) := by |
apply algHom_ext
simp only [map_inr, LinearMap.coe_comp, Function.comp_apply, AlgHom.coe_comp, forall_const]
|
/-
Copyright (c) 2019 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Yury Kudryashov
-/
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Analysis.Normed.MulAction
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mat... | Mathlib/Analysis/Asymptotics/Asymptotics.lean | 1,347 | 1,348 | theorem isBigOWith_const_one (c : E) (l : Filter α) :
IsBigOWith ‖c‖ l (fun _x : α => c) fun _x => (1 : F) := by | simp [isBigOWith_iff]
|
/-
Copyright (c) 2022 Moritz Doll. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Doll, Anatole Dedecker
-/
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 79 | 81 | theorem basisSets_iff {U : Set E} :
U ∈ p.basisSets ↔ ∃ (i : Finset ι) (r : ℝ), 0 < r ∧ U = ball (i.sup p) 0 r := by |
simp only [basisSets, mem_iUnion, exists_prop, mem_singleton_iff]
|
/-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl, Sander Dahmen, Scott Morrison
-/
import Mathlib.Algebra.Module.Torsion
import Mathlib.SetTheory.Cardinal.Cofinality
import Mathlib.LinearAlgebra.FreeMod... | Mathlib/LinearAlgebra/Dimension/Finite.lean | 283 | 292 | theorem CompleteLattice.Independent.subtype_ne_bot_le_finrank_aux
{p : ι → Submodule R M} (hp : CompleteLattice.Independent p) :
#{ i // p i ≠ ⊥ } ≤ (finrank R M : Cardinal.{w}) := by |
suffices Cardinal.lift.{v} #{ i // p i ≠ ⊥ } ≤ Cardinal.lift.{v} (finrank R M : Cardinal.{w}) by
rwa [Cardinal.lift_le] at this
calc
Cardinal.lift.{v} #{ i // p i ≠ ⊥ } ≤ Cardinal.lift.{w} (Module.rank R M) :=
hp.subtype_ne_bot_le_rank
_ = Cardinal.lift.{w} (finrank R M : Cardinal.{v}) := by rw [... |
/-
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Group.Nat
import Mathlib.Algebra.Order.Sub.Canonical
import Mathlib.Data.List.Perm
import Mathlib.Data.Set.List
import Mathlib.Init.Quot... | Mathlib/Data/Multiset/Basic.lean | 2,505 | 2,506 | theorem one_le_count_iff_mem {a : α} {s : Multiset α} : 1 ≤ count a s ↔ a ∈ s := by |
rw [succ_le_iff, count_pos]
|
/-
Copyright (c) 2020 Kenji Nakagawa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenji Nakagawa, Anne Baanen, Filippo A. E. Nuccio
-/
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal
import Mathlib.Algebraic... | Mathlib/RingTheory/DedekindDomain/Ideal.lean | 1,276 | 1,282 | theorem Ideal.prod_le_prime {ι : Type*} {s : Finset ι} {f : ι → Ideal R} {P : Ideal R}
[hP : P.IsPrime] : ∏ i ∈ s, f i ≤ P ↔ ∃ i ∈ s, f i ≤ P := by |
by_cases hP0 : P = ⊥
· simp only [hP0, le_bot_iff]
rw [← Ideal.zero_eq_bot, Finset.prod_eq_zero_iff]
simp only [← Ideal.dvd_iff_le]
exact ((Ideal.prime_iff_isPrime hP0).mpr hP).dvd_finset_prod_iff _
|
/-
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Mario Carneiro, Yaël Dillies
-/
import Mathlib.Logic.Function.Iterate
import Mathlib.Init.Data.Int.Order
import Mathlib.Order.Compare
import Mathlib.Order.Max
import Math... | Mathlib/Order/Monotone/Basic.lean | 930 | 934 | theorem Antitone.eq_of_le_of_le {a₁ a₂ : α} (h_anti : Antitone f) (h_fa : f a₁ = f a₂) {i : α}
(h₁ : a₁ ≤ i) (h₂ : i ≤ a₂) : f i = f a₁ := by |
apply le_antisymm
· exact h_anti h₁
· rw [h_fa]; exact h_anti h₂
|
/-
Copyright (c) 2021 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace
#align_import algebraic_geometry.open_immersion.basic from ... | Mathlib/Geometry/RingedSpace/OpenImmersion.lean | 233 | 243 | theorem invApp_app (U : Opens X) :
H.invApp U ≫ f.c.app (op (H.openFunctor.obj U)) =
X.presheaf.map (eqToHom (by
-- Porting note: was just `simp [opens.map, Set.preimage_image_eq _ H.base_open.inj]`
-- See https://github.com/leanprover-community/mathlib4/issues/5026
-- I think this is ... |
rw [invApp, Category.assoc, IsIso.inv_hom_id, Category.comp_id]
|
/-
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, Aaron Anderson
-/
import Mathlib.Algebra.BigOperators.Associated
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Finsupp.Multiset
import Math... | Mathlib/RingTheory/UniqueFactorizationDomain.lean | 812 | 816 | theorem mem_normalizedFactors_eq_of_associated {a b c : α} (ha : a ∈ normalizedFactors c)
(hb : b ∈ normalizedFactors c) (h : Associated a b) : a = b := by |
rw [← normalize_normalized_factor a ha, ← normalize_normalized_factor b hb,
normalize_eq_normalize_iff]
exact Associated.dvd_dvd h
|
/-
Copyright (c) 2021 Kexing Ying. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kexing Ying
-/
import Mathlib.MeasureTheory.Measure.Typeclasses
import Mathlib.Analysis.Complex.Basic
#align_import measure_theory.measure.vector_measure from "leanprover-community/mathl... | Mathlib/MeasureTheory/Measure/VectorMeasure.lean | 1,079 | 1,082 | theorem neg_left {M : Type*} [AddCommGroup M] [TopologicalSpace M] [TopologicalAddGroup M]
{v : VectorMeasure α M} {w : VectorMeasure α N} (h : v ≪ᵥ w) : -v ≪ᵥ w := by |
intro s hs
rw [neg_apply, h hs, neg_zero]
|
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Bhavik Mehta, Stuart Presnell
-/
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Order.Monotone.Basic
#align_import data.nat.choose.basic from "leanprover-community... | Mathlib/Data/Nat/Choose/Basic.lean | 145 | 161 | theorem choose_mul {n k s : ℕ} (hkn : k ≤ n) (hsk : s ≤ k) :
n.choose k * k.choose s = n.choose s * (n - s).choose (k - s) :=
have h : 0 < (n - k)! * (k - s)! * s ! := by | apply_rules [factorial_pos, Nat.mul_pos]
Nat.mul_right_cancel h <|
calc
n.choose k * k.choose s * ((n - k)! * (k - s)! * s !) =
n.choose k * (k.choose s * s ! * (k - s)!) * (n - k)! := by
rw [Nat.mul_assoc, Nat.mul_assoc, Nat.mul_assoc, Nat.mul_assoc _ s !, Nat.mul_assoc,
Nat.mul_comm (n ... |
/-
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprove... | Mathlib/Analysis/Complex/ReImTopology.lean | 119 | 120 | theorem closure_setOf_im_lt (a : ℝ) : closure { z : ℂ | z.im < a } = { z | z.im ≤ a } := by |
simpa only [closure_Iio] using closure_preimage_im (Iio a)
|
/-
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro
-/
import Mathlib.Data.Finset.Attr
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Logic.Equiv.Set
import Math... | Mathlib/Data/Finset/Basic.lean | 3,269 | 3,270 | theorem toFinset_eq_iff_perm_dedup : l.toFinset = l'.toFinset ↔ l.dedup ~ l'.dedup := by |
simp [Finset.ext_iff, perm_ext_iff_of_nodup (nodup_dedup _) (nodup_dedup _)]
|
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel,
Rémy Degenne, David Loeffler
-/
import Mathlib.Analysis.SpecialFunctions.Pow.Real
#align_import analys... | Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean | 847 | 852 | theorem one_le_rpow_of_pos_of_le_one_of_neg {x : ℝ≥0∞} {z : ℝ} (hx1 : 0 < x) (hx2 : x ≤ 1)
(hz : z < 0) : 1 ≤ x ^ z := by |
lift x to ℝ≥0 using ne_of_lt (lt_of_le_of_lt hx2 coe_lt_top)
simp only [coe_le_one_iff, coe_pos] at hx1 hx2 ⊢
simp [coe_rpow_of_ne_zero (ne_of_gt hx1),
NNReal.one_le_rpow_of_pos_of_le_one_of_nonpos hx1 hx2 (le_of_lt hz)]
|
/-
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Eric Wieser
-/
import Mathlib.Algebra.DirectSum.Internal
import Mathlib.Algebra.GradedMonoid
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolyn... | Mathlib/RingTheory/MvPolynomial/Homogeneous.lean | 290 | 296 | theorem rename_isHomogeneous_iff {f : σ → τ} (hf : f.Injective) :
(rename f φ).IsHomogeneous n ↔ φ.IsHomogeneous n := by |
refine ⟨fun h d hd ↦ ?_, rename_isHomogeneous⟩
convert ← @h (d.mapDomain f) _
· simp only [weightedDegree_apply, Pi.one_apply, smul_eq_mul, mul_one]
exact Finsupp.sum_mapDomain_index_inj (h := fun _ ↦ id) hf
· rwa [coeff_rename_mapDomain f hf]
|
/-
Copyright (c) 2021 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Data.Set... | Mathlib/Analysis/NormedSpace/lpSpace.lean | 99 | 103 | theorem memℓp_gen_iff (hp : 0 < p.toReal) {f : ∀ i, E i} :
Memℓp f p ↔ Summable fun i => ‖f i‖ ^ p.toReal := by |
rw [ENNReal.toReal_pos_iff] at hp
dsimp [Memℓp]
rw [if_neg hp.1.ne', if_neg hp.2.ne]
|
/-
Copyright (c) 2019 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne
-/
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Mul
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
imp... | Mathlib/Analysis/MeanInequalitiesPow.lean | 281 | 285 | theorem rpow_arith_mean_le_arith_mean2_rpow (w₁ w₂ z₁ z₂ : ℝ≥0∞) (hw' : w₁ + w₂ = 1) {p : ℝ}
(hp : 1 ≤ p) : (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p := by |
have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp
· simpa [Fin.sum_univ_succ] using h
· simp [hw', Fin.sum_univ_succ]
|
/-
Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel
-/
import Mathlib.Topology.EMetricSpace.Basic
import Mathlib.Topology.Bornology.Constructions
imp... | Mathlib/Topology/MetricSpace/PseudoMetric.lean | 1,218 | 1,220 | theorem Metric.emetric_closedBall {x : α} {ε : ℝ} (h : 0 ≤ ε) :
EMetric.closedBall x (ENNReal.ofReal ε) = closedBall x ε := by |
ext y; simp [edist_le_ofReal h]
|
/-
Copyright (c) 2023 David Loeffler. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Loeffler
-/
import Mathlib.Analysis.Convolution
import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd
import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup
i... | Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean | 252 | 262 | theorem GammaSeq_add_one_left (s : ℂ) {n : ℕ} (hn : n ≠ 0) :
GammaSeq (s + 1) n / s = n / (n + 1 + s) * GammaSeq s n := by |
conv_lhs => rw [GammaSeq, Finset.prod_range_succ, div_div]
conv_rhs =>
rw [GammaSeq, Finset.prod_range_succ', Nat.cast_zero, add_zero, div_mul_div_comm, ← mul_assoc,
← mul_assoc, mul_comm _ (Finset.prod _ _)]
congr 3
· rw [cpow_add _ _ (Nat.cast_ne_zero.mpr hn), cpow_one, mul_comm]
· refine Finset.... |
/-
Copyright (c) 2020 Aaron Anderson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Aaron Anderson
-/
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.Fi... | Mathlib/RingTheory/Polynomial/Content.lean | 287 | 288 | theorem IsPrimitive.primPart_eq {p : R[X]} (hp : p.IsPrimitive) : p.primPart = p := by |
rw [← one_mul p.primPart, ← C_1, ← hp.content_eq_one, ← p.eq_C_content_mul_primPart]
|
/-
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Ring.Cast
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Data.Nat.Bitwise
import Mathlib.Data.Nat.PSub
import Mathlib.Data.Nat... | Mathlib/Data/Num/Lemmas.lean | 343 | 344 | theorem le_to_nat {m n : Num} : (m : ℕ) ≤ n ↔ m ≤ n := by |
rw [← not_lt]; exact not_congr lt_to_nat
|
/-
Copyright (c) 2021 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import Mathlib.Topology.Gluing
import Mathlib.Geometry.RingedSpace.OpenImmersion
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace.HasColimits
#align_import algebraic... | Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean | 186 | 232 | theorem snd_invApp_t_app' (i j k : D.J) (U : Opens (pullback (D.f i j) (D.f i k)).carrier) :
∃ eq,
(π₂⁻¹ i, j, k) U ≫ (D.t k i).c.app _ ≫ (D.V (k, i)).presheaf.map (eqToHom eq) =
(D.t' k i j).c.app _ ≫ (π₁⁻¹ k, j, i) (unop _) := by |
fconstructor
-- Porting note: I don't know what the magic was in Lean3 proof, it just skipped the proof of `eq`
· delta IsOpenImmersion.openFunctor
dsimp only [Functor.op, Opens.map, IsOpenMap.functor, unop_op, Opens.coe_mk]
congr
have := (𝖣.t_fac k i j).symm
rw [← IsIso.inv_comp_eq] at this
... |
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Data.ENat.Lattice
import Mathlib.Data.Part
import Mathlib.Tactic.NormNum
#align_import data.nat.part_enat from "l... | Mathlib/Data/Nat/PartENat.lean | 339 | 342 | theorem coe_lt_iff (n : ℕ) (x : PartENat) : (n : PartENat) < x ↔ ∀ h : x.Dom, n < x.get h := by |
rw [← some_eq_natCast]
simp only [lt_def, exists_prop_of_true, dom_some, forall_true_iff]
rfl
|
/-
Copyright (c) 2023 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.Complement
/-!
## HNN Extensions of Groups
This file defines the HNN extension of a group `G`, `HNN... | Mathlib/GroupTheory/HNNExtension.lean | 678 | 684 | theorem toList_eq_nil_of_mem_of_range (w : ReducedWord G A B)
(hw : w.prod φ ∈ (of.range : Subgroup (HNNExtension G A B φ))) :
w.toList = [] := by |
rcases hw with ⟨g, hg⟩
let w' : ReducedWord G A B := { ReducedWord.empty G A B with head := g }
have : w.prod φ = w'.prod φ := by simp [ReducedWord.prod, hg]
simpa using (map_fst_eq_and_of_prod_eq φ this).1
|
/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Aaron Anderson, Yakov Pechersky
-/
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_th... | Mathlib/GroupTheory/Perm/Support.lean | 183 | 188 | theorem Disjoint.mul_apply_eq_iff {σ τ : Perm α} (hστ : Disjoint σ τ) {a : α} :
(σ * τ) a = a ↔ σ a = a ∧ τ a = a := by |
refine ⟨fun h => ?_, fun h => by rw [mul_apply, h.2, h.1]⟩
cases' hστ a with hσ hτ
· exact ⟨hσ, σ.injective (h.trans hσ.symm)⟩
· exact ⟨(congr_arg σ hτ).symm.trans h, hτ⟩
|
/-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Aurélien Saue, Anne Baanen
-/
import Mathlib.Algebra.Order.Ring.Rat
import Mathlib.Tactic.NormNum.Inv
import Mathlib.Tactic.NormNum.Pow
import Mathlib.Util.AtomM
/-!
#... | Mathlib/Tactic/Ring/Basic.lean | 872 | 872 | theorem atom_pf (a : R) : a = a ^ (nat_lit 1).rawCast * (nat_lit 1).rawCast + 0 := by | simp
|
/-
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.Tower
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Regular.Pow
import Mathl... | Mathlib/Algebra/MvPolynomial/Basic.lean | 1,743 | 1,766 | theorem eval₂_mem {f : R →+* S} {p : MvPolynomial σ R} {s : subS}
(hs : ∀ i ∈ p.support, f (p.coeff i) ∈ s) {v : σ → S} (hv : ∀ i, v i ∈ s) :
MvPolynomial.eval₂ f v p ∈ s := by |
classical
replace hs : ∀ i, f (p.coeff i) ∈ s := by
intro i
by_cases hi : i ∈ p.support
· exact hs i hi
· rw [MvPolynomial.not_mem_support_iff.1 hi, f.map_zero]
exact zero_mem s
induction' p using MvPolynomial.induction_on''' with a a b f ha _ ih
· simpa using hs 0
rw [eval₂_add, eval₂_... |
/-
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.BoxIntegral.Partition.SubboxInduction
import Mathlib.Analysis.BoxIntegral.Partition.Split
#align_import analysis.box_integral.partition.fil... | Mathlib/Analysis/BoxIntegral/Partition/Filter.lean | 280 | 280 | theorem henstock_le_mcShane : Henstock ≤ McShane := by | trivial
|
/-
Copyright (c) 2020 Kexing Ying. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kexing Ying
-/
import Mathlib.Algebra.Group.Conj
import Mathlib.Algebra.Group.Pi.Lemmas
import Mathlib.Algebra.Group.Subsemigroup.Operations
import Mathlib.Algebra.Group.Submonoid.Operati... | Mathlib/Algebra/Group/Subgroup/Basic.lean | 334 | 336 | theorem coe_inclusion {H K : S} {h : H ≤ K} (a : H) : (inclusion h a : G) = a := by |
cases a
simp only [inclusion, MonoidHom.mk'_apply]
|
/-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.RingTheory.Ideal.Operations
#align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"
/-!
# Map... | Mathlib/RingTheory/Ideal/Maps.lean | 551 | 553 | theorem comap_radical : comap f (radical K) = radical (comap f K) := by |
ext
simp [radical]
|
/-
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, Scott Morrison, Jens Wagemaker, Johan Commelin
-/
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib... | Mathlib/Algebra/Polynomial/RingDivision.lean | 319 | 320 | theorem root_mul : IsRoot (p * q) a ↔ IsRoot p a ∨ IsRoot q a := by |
simp_rw [IsRoot, eval_mul, mul_eq_zero]
|
/-
Copyright (c) 2023 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov, Joseph Myers
-/
import Mathlib.Analysis.InnerProductSpace.Orthogonal
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import geometry.euclidean.basic from "lean... | Mathlib/Geometry/Euclidean/PerpBisector.lean | 140 | 142 | theorem Isometry.preimage_perpBisector {f : P → P'} (h : Isometry f) (p₁ p₂ : P) :
f ⁻¹' (perpBisector (f p₁) (f p₂)) = perpBisector p₁ p₂ := by |
ext x; simp [mem_perpBisector_iff_dist_eq, h.dist_eq]
|
/-
Copyright (c) 2020 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anatole Dedecker, Sébastien Gouëzel, Yury G. Kudryashov, Dylan MacKenzie, Patrick Massot
-/
import Mathlib.Algebra.BigOperators.Module
import Mathlib.Algebra.Order.Field.Basic
impor... | Mathlib/Analysis/SpecificLimits/Normed.lean | 764 | 775 | theorem Monotone.alternating_series_le_tendsto
(hfl : Tendsto (fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i) atTop (𝓝 l))
(hfm : Monotone f) (k : ℕ) : ∑ i ∈ range (2 * k + 1), (-1) ^ i * f i ≤ l := by |
have hm : Monotone (fun n ↦ ∑ i ∈ range (2 * n + 1), (-1) ^ i * f i) := by
refine monotone_nat_of_le_succ (fun n ↦ ?_)
rw [show 2 * (n + 1) = 2 * n + 1 + 1 by ring,
sum_range_succ _ (2 * n + 1 + 1), sum_range_succ _ (2 * n + 1)]
simp_rw [_root_.pow_succ', show (-1 : E) ^ (2 * n) = 1 by simp, neg_on... |
/-
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.Data.Fintype.Perm
import Mathlib.LinearAlgebra.Multilinear.Basis
#align_import linear_algebra.... | Mathlib/LinearAlgebra/Alternating/Basic.lean | 696 | 703 | theorem map_perm [DecidableEq ι] [Fintype ι] (v : ι → M) (σ : Equiv.Perm ι) :
g (v ∘ σ) = Equiv.Perm.sign σ • g v := by |
-- Porting note: `apply` → `induction'`
induction' σ using Equiv.Perm.swap_induction_on' with s x y hxy hI
· simp
· -- Porting note: `← Function.comp.assoc` & `-Equiv.Perm.sign_swap'` are required.
simpa [← Function.comp.assoc, g.map_swap (v ∘ s) hxy,
Equiv.Perm.sign_swap hxy, -Equiv.Perm.sign_swap']... |
/-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Sean Leather
-/
import Mathlib.Data.List.Range
import Mathlib.Data.List.Perm
#align_import data.list.sigma from "leanprover-community/mathlib"@"f808feb6c18afddb25e66a7... | Mathlib/Data/List/Sigma.lean | 326 | 327 | theorem lookupAll_nodup (a : α) {l : List (Sigma β)} (h : l.NodupKeys) : (lookupAll a l).Nodup := by |
(rw [lookupAll_eq_dlookup a h]; apply Option.toList_nodup)
|
/-
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.Topology.Separation
import Mathlib.Topology.NoetherianSpace
#align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e4891068... | Mathlib/Topology/QuasiSeparated.lean | 99 | 103 | theorem isQuasiSeparated_iff_quasiSeparatedSpace (s : Set α) (hs : IsOpen s) :
IsQuasiSeparated s ↔ QuasiSeparatedSpace s := by |
rw [← isQuasiSeparated_univ_iff]
convert (hs.openEmbedding_subtype_val.isQuasiSeparated_iff (s := Set.univ)).symm
simp
|
/-
Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
-/
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
#align_import linear_algebra.matrix.reindex from "leanprover-communit... | Mathlib/LinearAlgebra/Matrix/Reindex.lean | 66 | 70 | theorem reindexLinearEquiv_trans (e₁ : m ≃ m') (e₂ : n ≃ n') (e₁' : m' ≃ m'') (e₂' : n' ≃ n'') :
(reindexLinearEquiv R A e₁ e₂).trans (reindexLinearEquiv R A e₁' e₂') =
(reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂') : _ ≃ₗ[R] _) := by |
ext
rfl
|
/-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov
-/
import Mathlib.Data.Rat.Sqrt
import Mathlib.Data.Real.Sqrt
import Mathlib.RingTheory.Algebraic
import... | Mathlib/Data/Real/Irrational.lean | 230 | 232 | theorem int_add (h : Irrational x) (m : ℤ) : Irrational (m + x) := by |
rw [← cast_intCast]
exact h.rat_add m
|
/-
Copyright (c) 2019 Kevin Kappelmann. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann, Kyle Miller, Mario Carneiro
-/
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import ... | Mathlib/Data/Nat/Fib/Basic.lean | 94 | 94 | theorem fib_le_fib_succ {n : ℕ} : fib n ≤ fib (n + 1) := by | cases n <;> simp [fib_add_two]
|
/-
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.Order.CauSeq.BigOperators
import Mathlib.Data.Complex.Abs
import Mathlib.Data.Complex.BigOperators
import Mathlib.Data.Na... | Mathlib/Data/Complex/Exponential.lean | 882 | 882 | theorem cos_zero : cos 0 = 1 := by | simp [cos]
|
/-
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.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
/-! ## Equivalence of smoothness wit... | Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 63 | 65 | theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x := by |
rw [← contMDiffWithinAt_univ, contMDiffWithinAt_iff_contDiffWithinAt, contDiffWithinAt_univ]
|
/-
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.Init.Function
import Mathlib.Init.Order.Defs
#align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216... | Mathlib/Data/Bool/Basic.lean | 224 | 224 | theorem and_le_right : ∀ x y : Bool, (x && y) ≤ y := by | decide
|
/-
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, Scott Morrison, Jens Wagemaker
-/
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.Polynomial.Coeff
import Mathlib.Algebra.Polynomial.Mono... | Mathlib/Algebra/Polynomial/Degree/Definitions.lean | 1,462 | 1,464 | theorem degree_sub_eq_left_of_degree_lt (h : degree q < degree p) : degree (p - q) = degree p := by |
rw [← degree_neg q] at h
rw [sub_eq_add_neg, degree_add_eq_left_of_degree_lt h]
|
/-
Copyright (c) 2021 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.RingTheory.Polynomial.Bernstein
import Mathlib.Topology.ContinuousFunction.Polynomial
import Mathlib.Topol... | Mathlib/Analysis/SpecialFunctions/Bernstein.lean | 109 | 114 | theorem probability (n : ℕ) (x : I) : (∑ k : Fin (n + 1), bernstein n k x) = 1 := by |
have := bernsteinPolynomial.sum ℝ n
apply_fun fun p => Polynomial.aeval (x : ℝ) p at this
simp? [AlgHom.map_sum, Finset.sum_range] at this says
simp only [Finset.sum_range, map_sum, Polynomial.coe_aeval_eq_eval, map_one] at this
exact this
|
/-
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
import Mathlib.Order.Filter.Basic
import Mathlib.Data.Set.Countable
#align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe10... | Mathlib/Order/Filter/CountableInter.lean | 71 | 75 | theorem eventually_countable_ball {ι : Type*} {S : Set ι} (hS : S.Countable)
{p : α → ∀ i ∈ S, Prop} :
(∀ᶠ x in l, ∀ i hi, p x i hi) ↔ ∀ i hi, ∀ᶠ x in l, p x i hi := by |
simpa only [Filter.Eventually, setOf_forall] using
@countable_bInter_mem _ l _ _ _ hS fun i hi => { x | p x i hi }
|
/-
Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Alex J. Best
-/
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Quotient
#align_import linear_algebra.quotient_pi from "leanprover-community/mathlib"@"398f60f60... | Mathlib/LinearAlgebra/QuotientPi.lean | 50 | 60 | theorem piQuotientLift_single [Fintype ι] [DecidableEq ι] (p : ∀ i, Submodule R (Ms i))
(q : Submodule R N) (f : ∀ i, Ms i →ₗ[R] N) (hf : ∀ i, p i ≤ q.comap (f i)) (i)
(x : Ms i ⧸ p i) : piQuotientLift p q f hf (Pi.single i x) = mapQ _ _ (f i) (hf i) x := by |
simp_rw [piQuotientLift, lsum_apply, sum_apply, comp_apply, proj_apply]
rw [Finset.sum_eq_single i]
· rw [Pi.single_eq_same]
· rintro j - hj
rw [Pi.single_eq_of_ne hj, _root_.map_zero]
· intros
have := Finset.mem_univ i
contradiction
|
/-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.Algebra.DirectSum.Basic
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.Basis
#align_import algebra.direct_sum.module from "leanprover-commun... | Mathlib/Algebra/DirectSum/Module.lean | 320 | 323 | theorem IsInternal.ofBijective_coeLinearMap_same (h : IsInternal A)
{i : ι} (x : A i) :
(LinearEquiv.ofBijective (coeLinearMap A) h).symm x i = x := by |
rw [← coeLinearMap_of, LinearEquiv.ofBijective_symm_apply_apply, of_eq_same]
|
/-
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov, Patrick Massot
-/
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
i... | Mathlib/Data/Set/Pointwise/Interval.lean | 548 | 550 | theorem image_const_sub_uIcc : (fun x => a - x) '' [[b, c]] = [[a - b, a - c]] := by |
have := image_comp (fun x => a + x) fun x => -x; dsimp [Function.comp_def] at this
simp [sub_eq_add_neg, this, add_comm]
|
/-
Copyright (c) 2023 Adam Topaz. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Adam Topaz, Dagur Asgeirsson
-/
import Mathlib.CategoryTheory.Sites.Coherent.Comparison
import Mathlib.Topology.Category.CompHaus.Limits
/-!
# Effective epimorphisms and finite effective ... | Mathlib/Topology/Category/CompHaus/EffectiveEpi.lean | 102 | 142 | theorem effectiveEpiFamily_tfae
{α : Type} [Finite α] {B : CompHaus.{u}}
(X : α → CompHaus.{u}) (π : (a : α) → (X a ⟶ B)) :
TFAE
[ EffectiveEpiFamily X π
, Epi (Sigma.desc π)
, ∀ b : B, ∃ (a : α) (x : X a), π a x = b
] := by |
tfae_have 2 → 1
· intro
simpa [← effectiveEpi_desc_iff_effectiveEpiFamily, (effectiveEpi_tfae (Sigma.desc π)).out 0 1]
tfae_have 1 → 2
· intro; infer_instance
tfae_have 3 → 2
· intro e
rw [epi_iff_surjective]
intro b
obtain ⟨t, x, h⟩ := e b
refine ⟨Sigma.ι X t x, ?_⟩
change (Sigma.ι... |
/-
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
#align_import geometry.manifold.local_invariant_properties from "leanprover-community/mathlib"@... | Mathlib/Geometry/Manifold/LocalInvariantProperties.lean | 448 | 454 | theorem liftPropWithinAt_mono_of_mem
(mono_of_mem : ∀ ⦃s x t⦄ ⦃f : H → H'⦄, s ∈ 𝓝[t] x → P f s x → P f t x)
(h : LiftPropWithinAt P g s x) (hst : s ∈ 𝓝[t] x) : LiftPropWithinAt P g t x := by |
simp only [liftPropWithinAt_iff'] at h ⊢
refine ⟨h.1.mono_of_mem hst, mono_of_mem ?_ h.2⟩
simp_rw [← mem_map, (chartAt H x).symm.map_nhdsWithin_preimage_eq (mem_chart_target H x),
(chartAt H x).left_inv (mem_chart_source H x), hst]
|
/-
Copyright (c) 2024 Ira Fesefeldt. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ira Fesefeldt
-/
import Mathlib.SetTheory.Ordinal.Arithmetic
/-!
# Ordinal Approximants for the Fixed points on complete lattices
This file sets up the ordinal approximation theory o... | Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean | 116 | 133 | theorem lfpApprox_eq_of_mem_fixedPoints {a b : Ordinal} (h_init : x ≤ f x) (h_ab : a ≤ b)
(h: lfpApprox f x a ∈ fixedPoints f) : lfpApprox f x b = lfpApprox f x a := by |
rw [mem_fixedPoints_iff] at h
induction b using Ordinal.induction with | h b IH =>
apply le_antisymm
· conv => left; unfold lfpApprox
apply sSup_le
simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq,
forall_eq_or_imp, forall_exists_index, and_imp, forall_apply_eq_im... |
/-
Copyright (c) 2021 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Oliver Nash
-/
import Mathlib.Algebra.Lie.Abelian
import Mathlib.Algebra.Lie.Solvable
import Mathlib.LinearAlgebra.Dual
#align_import algebra.lie.character from "leanprover-community/mat... | Mathlib/Algebra/Lie/Character.lean | 49 | 50 | theorem lieCharacter_apply_lie' (χ : LieCharacter R L) (x y : L) : ⁅χ x, χ y⁆ = 0 := by |
rw [LieRing.of_associative_ring_bracket, mul_comm, sub_self]
|
/-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl
-/
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.MeasureTheory.Function.SimpleFunc
import Mathlib.MeasureTheory.Measure.MutuallySingul... | Mathlib/MeasureTheory/Integral/Lebesgue.lean | 1,611 | 1,613 | theorem lintegral_finset [MeasurableSingletonClass α] (s : Finset α) (f : α → ℝ≥0∞) :
∫⁻ x in s, f x ∂μ = ∑ x ∈ s, f x * μ {x} := by |
simp only [lintegral_countable _ s.countable_toSet, ← Finset.tsum_subtype']
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.