Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.Complement open Monoid Coprod Multiplicative Subgroup Function def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) : Con (G ∗ Multiplicative ℤ) := conGen (fun x y => ∃ (a : A), x = inr (ofAdd 1) * inl (a : G) ∧ ...
Mathlib/GroupTheory/HNNExtension.lean
102
104
theorem lift_of (f : G →* H) (x : H) (hx : ∀ a : A, x * f ↑a = f (φ a : G) * x) (g : G) : lift f x hx (of g) = f g := by
delta HNNExtension; simp [lift, of]
[ " Group (HNNExtension G A B φ)", " Group (HNNExtension.con G A B φ).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(φ.symm b)", " of ↑b * t = of ↑(φ (φ.symm ...
[ " Group (HNNExtension G A B φ)", " Group (HNNExtension.con G A B φ).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(φ.symm b)", " of ↑b * t = of ↑(φ (φ.symm ...
import Mathlib.Topology.Sheaves.Presheaf import Mathlib.CategoryTheory.Adjunction.FullyFaithful #align_import algebraic_geometry.presheafed_space from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" open Opposite CategoryTheory CategoryTheory.Category CategoryTheory.Functor TopCat Topolo...
Mathlib/Geometry/RingedSpace/PresheafedSpace.lean
126
130
theorem hext {X Y : PresheafedSpace C} (α β : Hom X Y) (w : α.base = β.base) (h : HEq α.c β.c) : α = β := by
cases α cases β congr
[ " (Opens.map α.base).op = (Opens.map β.base).op", " α = β", " { base := base, c := c } = β", " { base := base, c := c } = { base := base', c := c' }", " { base := base, c := c } = { base := base, c := c' }", " { base := base, c := c } = { base := base, c := c }", " { base := base✝, c := c✝ } = β", " {...
[ " (Opens.map α.base).op = (Opens.map β.base).op", " α = β", " { base := base, c := c } = β", " { base := base, c := c } = { base := base', c := c' }", " { base := base, c := c } = { base := base, c := c' }", " { base := base, c := c } = { base := base, c := c }" ]
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.Analysis.SumIntegralComparisons import Mathlib.NumberTheory.Harmonic.Defs theorem log_add_one_le_harmonic (n : ℕ) : Real.log ↑(n+1) ≤ harmonic n := by calc _ = ∫ x in (1:ℕ)..↑(n+1), x⁻¹ := ?_ _ ≤ ∑ d ∈ Finset.Icc 1 n, (d:ℝ)⁻¹ := ?_ ...
Mathlib/NumberTheory/Harmonic/Bounds.lean
52
62
theorem log_le_harmonic_floor (y : ℝ) (hy : 0 ≤ y) : Real.log y ≤ harmonic ⌊y⌋₊ := by
by_cases h0 : y = 0 · simp [h0] · calc _ ≤ Real.log ↑(Nat.floor y + 1) := ?_ _ ≤ _ := log_add_one_le_harmonic _ gcongr apply (Nat.le_ceil y).trans norm_cast exact Nat.ceil_le_floor_add_one y
[ " (↑(n + 1)).log ≤ ↑(harmonic n)", " (↑(n + 1)).log = ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹", " 0 ∉ Set.uIcc 1 ↑(n + 1)", " ¬1 ≤ 0", " ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹ ≤ ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹", " 0 < ↑1", " ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹ = ↑(harmonic n)", " ↑(harmonic n) ≤ 1 + (↑n).log", " ∑ x ∈ Finse...
[ " (↑(n + 1)).log ≤ ↑(harmonic n)", " (↑(n + 1)).log = ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹", " 0 ∉ Set.uIcc 1 ↑(n + 1)", " ¬1 ≤ 0", " ∫ (x : ℝ) in ↑1 ..↑(n + 1), x⁻¹ ≤ ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹", " 0 < ↑1", " ∑ d ∈ Finset.Icc 1 n, (↑d)⁻¹ = ↑(harmonic n)", " ↑(harmonic n) ≤ 1 + (↑n).log", " ∑ x ∈ Finse...
import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f" noncomputable section open scoped Classical open Topology ENNReal MeasureTheory NNReal open Set Filter TopologicalSpace ENNReal EMetric Meas...
Mathlib/MeasureTheory/Function/L1Space.lean
83
83
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by
simp
[ " ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ", " ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ", " ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ", " ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist...
[ " ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ", " ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ", " ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ", " ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist...
import Mathlib.CategoryTheory.Abelian.Basic #align_import category_theory.idempotents.basic from "leanprover-community/mathlib"@"3a061790136d13594ec10c7c90d202335ac5d854" open CategoryTheory open CategoryTheory.Category open CategoryTheory.Limits open CategoryTheory.Preadditive open Opposite namespace Catego...
Mathlib/CategoryTheory/Idempotents/Basic.lean
107
117
theorem isIdempotentComplete_iff_idempotents_have_kernels [Preadditive C] : IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p := by
rw [isIdempotentComplete_iff_hasEqualizer_of_id_and_idempotent] constructor · intro h X p hp haveI : HasEqualizer (𝟙 X) (𝟙 X - p) := h X (𝟙 _ - p) (idem_of_id_sub_idem p hp) convert hasKernel_of_hasEqualizer (𝟙 X) (𝟙 X - p) rw [sub_sub_cancel] · intro h X p hp haveI : HasKernel (𝟙 _ - p) ...
[ " IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " HasEqualizer (𝟙 X) p", " i ≫ 𝟙 X = i ≫ p", " IsLimit (Fork.ofι i ⋯)",...
[ " IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " HasEqualizer (𝟙 X) p", " i ≫ 𝟙 X = i ≫ p", " IsLimit (Fork.ofι i ⋯)",...
import Mathlib.Data.Multiset.Bind import Mathlib.Control.Traversable.Lemmas import Mathlib.Control.Traversable.Instances #align_import data.multiset.functor from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" universe u namespace Multiset open List instance functor : Functor Multiset...
Mathlib/Data/Multiset/Functor.lean
97
99
theorem map_comp_coe {α β} (h : α → β) : Functor.map h ∘ Coe.coe = (Coe.coe ∘ Functor.map h : List α → Multiset β) := by
funext; simp only [Function.comp_apply, Coe.coe, fmap_def, map_coe, List.map_eq_map]
[ " ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x", " ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x", " Multiset α' → F (Multiset β')", " ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t...
[ " ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x", " ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x", " Multiset α' → F (Multiset β')", " ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t...
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u...
Mathlib/Analysis/MeanInequalities.lean
113
134
theorem geom_mean_le_arith_mean_weighted (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) : ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i := by
-- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : ∃ i ∈ s, z i = 0 ∧ w i ≠ 0 · rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] · exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) · rw [hzi] exact zero_rpow hwi -- I...
[ " ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i", " 0 ≤ ∑ i ∈ s, w i * z i", " z i ^ w i = 0", " 0 ^ w i = 0", " ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)", " ∑ i ∈ s, w i * z i = ∑ x ∈ s, w x * rexp (z x).log", " ∀ x ∈ s, z x ^ w x = rexp ((z x).log * w x)", " ∀ x ∈ s, w x * z x = w x * rexp (z ...
[]
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
123
124
theorem degree_of_subsingleton [Subsingleton R] : degree p = ⊥ := by
rw [Subsingleton.elim p 0, degree_zero]
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = ⊥" ]
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)" ]
import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.Nat.Prime #align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u variable (R : Type u) section Semiring variable [Semiring R] class inductive Ex...
Mathlib/Algebra/CharP/ExpChar.lean
74
79
theorem ringExpChar.eq (q : ℕ) [h : ExpChar R q] : ringExpChar R = q := by
cases' h with _ _ h _ · haveI := CharP.ofCharZero R rw [ringExpChar, ringChar.eq R 0]; rfl rw [ringExpChar, ringChar.eq R q] exact Nat.max_eq_left h.one_lt.le
[ " ExpChar (R × S) p", " ExpChar (R × S) 1", " p = q", " 1 = q", " ringExpChar R = q", " ringExpChar R = 1", " max 0 1 = 1", " max q 1 = q" ]
[ " ExpChar (R × S) p", " ExpChar (R × S) 1", " p = q", " 1 = q" ]
import Mathlib.FieldTheory.Minpoly.Field #align_import ring_theory.power_basis from "leanprover-community/mathlib"@"d1d69e99ed34c95266668af4e288fc1c598b9a7f" open Polynomial open Polynomial variable {R S T : Type*} [CommRing R] [Ring S] [Algebra R S] variable {A B : Type*} [CommRing A] [CommRing B] [IsDomain B]...
Mathlib/RingTheory/PowerBasis.lean
154
159
theorem aeval_minpolyGen (pb : PowerBasis A S) : aeval pb.gen (minpolyGen pb) = 0 := by
simp_rw [minpolyGen, AlgHom.map_sub, AlgHom.map_sum, AlgHom.map_mul, AlgHom.map_pow, aeval_C, ← Algebra.smul_def, aeval_X] refine sub_eq_zero.mpr ((pb.basis.total_repr (pb.gen ^ pb.dim)).symm.trans ?_) rw [Finsupp.total_apply, Finsupp.sum_fintype] <;> simp only [pb.coe_basis, zero_smul, eq_self_iff_true,...
[ " FiniteDimensional.finrank R S = pb.dim", " y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f", " (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)", " (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)", " (∃ y, x ^ ↑y = n) ↔...
[ " FiniteDimensional.finrank R S = pb.dim", " y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f", " (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)", " (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)", " (∃ y, x ^ ↑y = n) ↔...
import Mathlib.Algebra.Polynomial.Basic #align_import data.polynomial.monomial from "leanprover-community/mathlib"@"220f71ba506c8958c9b41bd82226b3d06b0991e8" noncomputable section namespace Polynomial open Polynomial universe u variable {R : Type u} {a b : R} {m n : ℕ} variable [Semiring R] {p q r : R[X]} th...
Mathlib/Algebra/Polynomial/Monomial.lean
59
80
theorem ringHom_ext {S} [Semiring S] {f g : R[X] →+* S} (h₁ : ∀ a, f (C a) = g (C a)) (h₂ : f X = g X) : f = g := by
set f' := f.comp (toFinsuppIso R).symm.toRingHom with hf' set g' := g.comp (toFinsuppIso R).symm.toRingHom with hg' have A : f' = g' := by -- Porting note: Was `ext; simp [..]; simpa [..] using h₂`. ext : 1 · ext simp [f', g', h₁, RingEquiv.toRingHom_eq_coe] · refine MonoidHom.ext_mnat ?_ ...
[ " (monomial i) 1 = (monomial j) 1 ↔ i = j", " Finsupp.single i 1 = Finsupp.single j 1 ↔ i = j", " m = n", " f.support.card ≤ 1 ↔ ∃ n a, f = (monomial n) a", " f.support.card ≤ 1 → ∃ n a, f = (monomial n) a", " ∃ n a, f = (monomial n) a", " f = (monomial n) (f.coeff n)", " f.coeff i = ((monomial n) (f....
[ " (monomial i) 1 = (monomial j) 1 ↔ i = j", " Finsupp.single i 1 = Finsupp.single j 1 ↔ i = j", " m = n", " f.support.card ≤ 1 ↔ ∃ n a, f = (monomial n) a", " f.support.card ≤ 1 → ∃ n a, f = (monomial n) a", " ∃ n a, f = (monomial n) a", " f = (monomial n) (f.coeff n)", " f.coeff i = ((monomial n) (f....
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Galois universe u v w open scoped Classical Polynomial open Polynomial variable (k : Type u) [Field k] (K : Type v) [Field K] class IsSepClosed : Prop where splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom....
Mathlib/FieldTheory/IsSepClosed.lean
78
80
theorem IsSepClosed.splits_codomain [IsSepClosed K] {f : k →+* K} (p : k[X]) (h : p.Separable) : p.Splits f := by
convert IsSepClosed.splits_of_separable (p.map f) (Separable.map h); simp [splits_map_iff]
[ " Splits f p", " Splits f p ↔ Splits (RingHom.id K) (map f p)" ]
[]
import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.Function #align_import data.set.intervals.surj_on from "leanprover-community/mathlib"@"a59dad53320b73ef180174aae867addd707ef00e" variable {α : Type*} {β : Type*} [LinearOrder α] [PartialOrder β] {f : α → β} open Set Function open OrderDual (toDual)...
Mathlib/Order/Interval/Set/SurjOn.lean
63
67
theorem surjOn_Ioi_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f) (a : α) : SurjOn f (Ioi a) (Ioi (f a)) := by
rw [← compl_Iic, ← compl_compl (Ioi (f a))] refine MapsTo.surjOn_compl ?_ h_surj exact fun x hx => (h_mono hx).not_lt
[ " SurjOn f (Ioo a b) (Ioo (f a) (f b))", " p ∈ f '' Ioo a b", " f x ∈ f '' Ioo a b", " a < x ∧ x < b", " f x ∉ Ioo (f a) (f b)", " SurjOn f (Ico a b) (Ico (f a) (f b))", " p ∈ f '' Ico a b", " f a ∈ f '' Ico a b", " SurjOn f (Ico a b) ∅", " SurjOn f (Ioc a b) (Ioc (f a) (f b))", " SurjOn f (Icc ...
[ " SurjOn f (Ioo a b) (Ioo (f a) (f b))", " p ∈ f '' Ioo a b", " f x ∈ f '' Ioo a b", " a < x ∧ x < b", " f x ∉ Ioo (f a) (f b)", " SurjOn f (Ico a b) (Ico (f a) (f b))", " p ∈ f '' Ico a b", " f a ∈ f '' Ico a b", " SurjOn f (Ico a b) ∅", " SurjOn f (Ioc a b) (Ioc (f a) (f b))", " SurjOn f (Icc ...
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.Tactic.ByContra import Mathlib.Topology.Algebra.Polynomial import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Analysis.Complex.Arg #align_import ring_theory.polynomial.cyclotomic.eval from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf16...
Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
48
49
theorem eval₂_one_cyclotomic_prime_pow {R S : Type*} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ} (k : ℕ) [Fact p.Prime] : eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = p := by
simp
[ " eval 1 (cyclotomic p R) = ↑p", " eval₂ f 1 (cyclotomic p R) = ↑p", " eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p", " eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = ↑p" ]
[ " eval 1 (cyclotomic p R) = ↑p", " eval₂ f 1 (cyclotomic p R) = ↑p", " eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p" ]
import Mathlib.Combinatorics.Quiver.Path import Mathlib.Combinatorics.Quiver.Push #align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" universe v u w v' namespace Quiver -- Porting note: no hasNonemptyInstance linter yet def Symmetrify (V : ...
Mathlib/Combinatorics/Quiver/Symmetric.lean
197
204
theorem lift_reverse [h : HasInvolutiveReverse V'] (φ : Prefunctor V V') {X Y : Symmetrify V} (f : X ⟶ Y) : (Symmetrify.lift φ).map (Quiver.reverse f) = Quiver.reverse ((Symmetrify.lift φ).map f) := by
dsimp [Symmetrify.lift]; cases f · simp only rfl · simp only [reverse_reverse] rfl
[ " reverse (reverse f) = f", " reverse f = reverse g ↔ f = g", " reverse f = reverse g → f = g", " f = g", " f = g → reverse f = reverse g", " reverse f = reverse g", " f = reverse g ↔ reverse f = g", " of ⋙q lift φ = φ", " ∀ (X : V), (of ⋙q lift φ).obj X = φ.obj X", " (of ⋙q lift φ).obj X = φ.obj ...
[ " reverse (reverse f) = f", " reverse f = reverse g ↔ f = g", " reverse f = reverse g → f = g", " f = g", " f = g → reverse f = reverse g", " reverse f = reverse g", " f = reverse g ↔ reverse f = g", " of ⋙q lift φ = φ", " ∀ (X : V), (of ⋙q lift φ).obj X = φ.obj X", " (of ⋙q lift φ).obj X = φ.obj ...
import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.MulOpposite import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Finset.NoncommProd import Mathlib.Data.Int.Order.Lemmas #align_import group_theory.submonoid.membership fro...
Mathlib/Algebra/Group/Submonoid/Membership.lean
219
222
theorem mem_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty) (hS : DirectedOn (· ≤ ·) S) {x : M} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s := by
haveI : Nonempty S := Sne.to_subtype simp [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, SetCoe.exists, Subtype.coe_mk]
[ " x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i", " x ∈ ⨆ i, S i → ∃ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i", " ∃ i, 1 ∈ S i", " ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i", " ∃ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s" ]
[ " x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i", " x ∈ ⨆ i, S i → ∃ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i", " ∃ i, 1 ∈ S i", " ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i", " ∃ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)" ]
import Mathlib.FieldTheory.Minpoly.Field import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.Algebra.Polynomial.Module.AEval open Polynomial variable {R K M A : Type*} {a : A} namespace Module.AEval
Mathlib/Algebra/Polynomial/Module/FiniteDimensional.lean
29
34
theorem isTorsion_of_aeval_eq_zero [CommSemiring R] [NoZeroDivisors R] [Semiring A] [Algebra R A] [AddCommMonoid M] [Module A M] [Module R M] [IsScalarTower R A M] {p : R[X]} (h : aeval a p = 0) (h' : p ≠ 0) : IsTorsion R[X] (AEval R M a) := by
have hp : p ∈ nonZeroDivisors R[X] := fun q hq ↦ Or.resolve_right (mul_eq_zero.mp hq) h' exact fun x ↦ ⟨⟨p, hp⟩, (of R M a).symm.injective <| by simp [h]⟩
[ " IsTorsion R[X] (AEval R M a)", " (of R M a).symm (⟨p, hp⟩ • x) = (of R M a).symm 0" ]
[]
import Mathlib.Data.PFunctor.Multivariate.Basic #align_import data.pfunctor.multivariate.W from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v namespace MvPFunctor open TypeVec open MvFunctor variable {n : ℕ} (P : MvPFunctor.{u} (n + 1)) inductive WPath : P.last.W → F...
Mathlib/Data/PFunctor/Multivariate/W.lean
115
118
theorem comp_wPathCasesOn {α β : TypeVec n} (h : α ⟹ β) {a : P.A} {f : P.last.B a → P.last.W} (g' : P.drop.B a ⟹ α) (g : ∀ j : P.last.B a, P.WPath (f j) ⟹ α) : h ⊚ P.wPathCasesOn g' g = P.wPathCasesOn (h ⊚ g') fun i => h ⊚ g i := by
ext i x; cases x <;> rfl
[ " P.WPath (WType.mk a f) ⟹ α", " α i", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) = h", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i x = h i x", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i (WPath.root a (fun j => f j) i c✝) =\n h i (WPath.root a (fun j => f j...
[ " P.WPath (WType.mk a f) ⟹ α", " α i", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) = h", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i x = h i x", " P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i (WPath.root a (fun j => f j) i c✝) =\n h i (WPath.root a (fun j => f j...
import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.Topology.Separation #align_import dynamics.fixed_points.topology from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46" variable {α : Type*} [TopologicalSpace α] [T2Space α] {f : α → α} open Function Filter open Topology
Mathlib/Dynamics/FixedPoints/Topology.lean
33
37
theorem isFixedPt_of_tendsto_iterate {x y : α} (hy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)) (hf : ContinuousAt f y) : IsFixedPt f y := by
refine tendsto_nhds_unique ((tendsto_add_atTop_iff_nat 1).1 ?_) hy simp only [iterate_succ' f] exact hf.tendsto.comp hy
[ " IsFixedPt f y", " Tendsto (fun n => f^[n + 1] x) atTop (𝓝 (f y))", " Tendsto (fun n => (f ∘ f^[n]) x) atTop (𝓝 (f y))" ]
[]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable...
Mathlib/Analysis/Calculus/Deriv/Add.lean
131
133
theorem derivWithin_const_add (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) : derivWithin (fun y => c + f y) s x = derivWithin f s x := by
simp only [derivWithin, fderivWithin_const_add hxs]
[ " HasDerivAtFilter (fun y => f y + g y) (f' + g') x L", " HasStrictDerivAt (fun y => f y + g y) (f' + g') x", " derivWithin (fun y => f y + c) s x = derivWithin f s x", " deriv (fun y => f y + c) x = deriv f x", " derivWithin (fun y => c + f y) s x = derivWithin f s x" ]
[ " HasDerivAtFilter (fun y => f y + g y) (f' + g') x L", " HasStrictDerivAt (fun y => f y + g y) (f' + g') x", " derivWithin (fun y => f y + c) s x = derivWithin f s x", " deriv (fun y => f y + c) x = deriv f x" ]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
40
40
theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1 := by
rw [← div_self h, add_div]
[ " (a + b) / c = a / c + b / c", " (b + a) / b = 1 + a / b", " (a + b) / b = a / b + 1" ]
[ " (a + b) / c = a / c + b / c", " (b + a) / b = 1 + a / b" ]
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.Algebra.Module.Torsion #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v v' u₁' w w' variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}...
Mathlib/LinearAlgebra/Dimension/Constructions.lean
375
376
theorem FiniteDimensional.finrank_tensorProduct : finrank S (M ⊗[S] M') = finrank S M * finrank S M' := by
simp [finrank]
[ " Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)", " Module.rank R (ι →₀ M) = #ι * Module.rank R M", " Module.rank R (ι →₀ R) = lift.{u, w} #ι", " Module.rank R (ι →₀ R) = #ι", " Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)", " Module.rank R (Matrix m n R) = l...
[ " Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)", " Module.rank R (ι →₀ M) = #ι * Module.rank R M", " Module.rank R (ι →₀ R) = lift.{u, w} #ι", " Module.rank R (ι →₀ R) = #ι", " Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)", " Module.rank R (Matrix m n R) = l...
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero #align_import category_theory.limits.shapes.kernels from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d" noncomputable section universe v v₂ u u' u₂ open CategoryTheory open CategoryTheory.Limits.WalkingParallelPair namespace...
Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
86
87
theorem KernelFork.condition (s : KernelFork f) : Fork.ι s ≫ f = 0 := by
erw [Fork.condition, HasZeroMorphisms.comp_zero]
[ " Fork.ι s ≫ f = 0" ]
[]
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
71
75
theorem id_map {α : Type _} (x : F α) : id <$> x = x := by
rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl
[ " id <$> x = x", " id <$> abs (repr x) = abs (repr x)", " id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩" ]
[]
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993" noncomputable section open scoped Classical open Topology Filter open TopologicalSpace Set Metric Filter Function attribute [local simp...
Mathlib/Topology/MetricSpace/PiNat.lean
168
172
theorem cylinder_eq_cylinder_of_le_firstDiff (x y : ∀ n, E n) {n : ℕ} (hn : n ≤ firstDiff x y) : cylinder x n = cylinder y n := by
rw [← mem_cylinder_iff_eq] intro i hi exact apply_eq_of_lt_firstDiff (hi.trans_le hn)
[ " x (firstDiff x y) ≠ y (firstDiff x y)", " x (Nat.find ⋯) ≠ y (Nat.find ⋯)", " x n = y n", " x n = y n ↔ ¬x n ≠ y n", " firstDiff x y = firstDiff y x", " min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z", " False", " x (firstDiff x z) = z (firstDiff x z)", " cylinder x n = (↑(Finset.range n)).pi...
[ " x (firstDiff x y) ≠ y (firstDiff x y)", " x (Nat.find ⋯) ≠ y (Nat.find ⋯)", " x n = y n", " x n = y n ↔ ¬x n ≠ y n", " firstDiff x y = firstDiff y x", " min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z", " False", " x (firstDiff x z) = z (firstDiff x z)", " cylinder x n = (↑(Finset.range n)).pi...
import Mathlib.Probability.ProbabilityMassFunction.Basic #align_import probability.probability_mass_function.monad from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" noncomputable section variable {α β γ : Type*} open scoped Classical open NNReal ENNReal open MeasureTheory namespac...
Mathlib/Probability/ProbabilityMassFunction/Monad.lean
126
128
theorem mem_support_bind_iff (b : β) : b ∈ (p.bind f).support ↔ ∃ a ∈ p.support, b ∈ (f a).support := by
simp only [support_bind, Set.mem_iUnion, Set.mem_setOf_eq, exists_prop]
[ " a' ∈ (pure a).support ↔ a' ∈ {a}", " a' ∈ (pure a).support ↔ a' = a", " ∑' (b : α) (a : β), p b * (f b) a = 1", " b ∈ (p.bind f).support ↔ b ∈ ⋃ a ∈ p.support, (f a).support", " b ∈ (p.bind f).support ↔ ∃ a ∈ p.support, b ∈ (f a).support" ]
[ " a' ∈ (pure a).support ↔ a' ∈ {a}", " a' ∈ (pure a).support ↔ a' = a", " ∑' (b : α) (a : β), p b * (f b) a = 1", " b ∈ (p.bind f).support ↔ b ∈ ⋃ a ∈ p.support, (f a).support" ]
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
133
136
theorem rank_reindex [Fintype m] (e₁ e₂ : m ≃ n) (A : Matrix m m R) : rank (reindex e₁ e₂ A) = rank A := by
rw [rank, rank, mulVecLin_reindex, LinearMap.range_comp, LinearMap.range_comp, LinearEquiv.range, Submodule.map_top, LinearEquiv.finrank_map_eq]
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≤ Fintype.card n", " (A * B).rank ≤ A.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)", " (A * B).rank ≤ B.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(Li...
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≤ Fintype.card n", " (A * B).rank ≤ A.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)", " (A * B).rank ≤ B.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(Li...
import Mathlib.AlgebraicTopology.SplitSimplicialObject import Mathlib.AlgebraicTopology.DoldKan.PInfty #align_import algebraic_topology.dold_kan.functor_gamma from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" noncomputable section open CategoryTheory CategoryTheory.Category CategoryT...
Mathlib/AlgebraicTopology/DoldKan/FunctorGamma.lean
105
107
theorem mapMono_id : mapMono K (𝟙 Δ) = 𝟙 _ := by
unfold mapMono simp only [eq_self_iff_true, eqToHom_refl, dite_eq_ite, if_true]
[ " K.X Δ.len ⟶ K.X Δ'.len", " K.X Δ.len = K.X Δ'.len", " mapMono K (𝟙 Δ) = 𝟙 (K.X Δ.len)", " (if h : Δ = Δ then eqToHom ⋯ else if h : Isδ₀ (𝟙 Δ) then K.d Δ.len Δ.len else 0) = 𝟙 (K.X Δ.len)" ]
[ " K.X Δ.len ⟶ K.X Δ'.len", " K.X Δ.len = K.X Δ'.len" ]
import Mathlib.RingTheory.IsTensorProduct import Mathlib.RingTheory.Localization.Module variable {R : Type*} [CommSemiring R] (S : Submonoid R) (A : Type*) [CommRing A] [Algebra R A] [IsLocalization S A] {M : Type*} [AddCommMonoid M] [Module R M] [Module A M] [IsScalarTower R A M] {M' : Type*} [AddCommMonoid ...
Mathlib/RingTheory/Localization/BaseChange.lean
41
49
theorem isLocalizedModule_iff_isBaseChange : IsLocalizedModule S f ↔ IsBaseChange A f := by
refine ⟨fun _ ↦ IsLocalizedModule.isBaseChange S A f, fun h ↦ ?_⟩ have : IsBaseChange A (LocalizedModule.mkLinearMap S M) := IsLocalizedModule.isBaseChange S A _ let e := (this.equiv.symm.trans h.equiv).restrictScalars R convert IsLocalizedModule.of_linearEquiv S (LocalizedModule.mkLinearMap S M) e ext rw ...
[ " ∃! g', ↑R g' ∘ₗ f = g", " IsUnit ((algebraMap R (Module.End R Q)) ↑s)", " IsUnit ((Algebra.lsmul R R Q) ((algebraMap R A) ↑s))", " ∃! g', ↑R g' ∘ₗ f = ℓ ∘ₗ f", " (fun g' => ↑R g' ∘ₗ f = ℓ ∘ₗ f) (LinearMap.extendScalarsOfIsLocalization S A ℓ)", " g'' = LinearMap.extendScalarsOfIsLocalization S A ℓ", " ...
[ " ∃! g', ↑R g' ∘ₗ f = g", " IsUnit ((algebraMap R (Module.End R Q)) ↑s)", " IsUnit ((Algebra.lsmul R R Q) ((algebraMap R A) ↑s))", " ∃! g', ↑R g' ∘ₗ f = ℓ ∘ₗ f", " (fun g' => ↑R g' ∘ₗ f = ℓ ∘ₗ f) (LinearMap.extendScalarsOfIsLocalization S A ℓ)", " g'' = LinearMap.extendScalarsOfIsLocalization S A ℓ", " ...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finset.Sym import Mathlib.Data.Fintype.Sum import Mathlib.Data.Fintype.Prod #align_import data.sym.card from "leanprover-community/mathlib"@"0bd2ea37bcba5769e14866170f251c9bc64e35d7" open Finset Fintype Function Sum Nat variable {α β : Type*} ...
Mathlib/Data/Sym/Card.lean
110
115
theorem card_sym_eq_multichoose (α : Type*) (k : ℕ) [Fintype α] [Fintype (Sym α k)] : card (Sym α k) = multichoose (card α) k := by
rw [← card_sym_fin_eq_multichoose] -- FIXME: Without the `Fintype` namespace, why does it complain about `Finset.card_congr` being -- deprecated? exact Fintype.card_congr (equivCongr (equivFin α))
[ " (fun s => ⟨0 ::ₛ s, ⋯⟩) ((fun s => (↑s).erase 0 ⋯) s) = s", " (fun s => (↑s).erase 0 ⋯) ((fun s => ⟨0 ::ₛ s, ⋯⟩) s) = s", " (fun s => ⟨map (Fin.succAbove 0) s, ⋯⟩) ((fun s => map (Fin.predAbove 0) ↑s) s) = s", " ↑((fun s => ⟨map (Fin.succAbove 0) s, ⋯⟩) ((fun s => map (Fin.predAbove 0) ↑s) s)) = ↑s", " ma...
[ " (fun s => ⟨0 ::ₛ s, ⋯⟩) ((fun s => (↑s).erase 0 ⋯) s) = s", " (fun s => (↑s).erase 0 ⋯) ((fun s => ⟨0 ::ₛ s, ⋯⟩) s) = s", " (fun s => ⟨map (Fin.succAbove 0) s, ⋯⟩) ((fun s => map (Fin.predAbove 0) ↑s) s) = s", " ↑((fun s => ⟨map (Fin.succAbove 0) s, ⋯⟩) ((fun s => map (Fin.predAbove 0) ↑s) s)) = ↑s", " ma...
import Mathlib.Data.Fintype.Basic import Mathlib.GroupTheory.Perm.Sign import Mathlib.Logic.Equiv.Defs #align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f" namespace Equiv variable {α β : Type*} [Finite α] noncomputable def toCompl {p q : α → Prop} (e ...
Mathlib/Logic/Equiv/Fintype.lean
145
148
theorem extendSubtype_not_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : ¬p x) : ¬q (e.extendSubtype x) := by
convert (e.toCompl ⟨x, hx⟩).2 rw [e.extendSubtype_apply_of_not_mem _ hx]
[ " { x // ¬p x } ≃ { x // ¬q x }", " Nonempty ({ x // ¬p x } ≃ { x // ¬q x })", " e.extendSubtype x = ↑(e ⟨x, hx⟩)", " (e.subtypeCongr e.toCompl) x = ↑(e ⟨x, hx⟩)", " (sumCompl fun x => q x) (Sum.map (⇑e) (⇑e.toCompl) ((sumCompl fun x => p x).symm x)) = ↑(e ⟨x, hx⟩)", " q (e.extendSubtype x)", " e.extend...
[ " { x // ¬p x } ≃ { x // ¬q x }", " Nonempty ({ x // ¬p x } ≃ { x // ¬q x })", " e.extendSubtype x = ↑(e ⟨x, hx⟩)", " (e.subtypeCongr e.toCompl) x = ↑(e ⟨x, hx⟩)", " (sumCompl fun x => q x) (Sum.map (⇑e) (⇑e.toCompl) ((sumCompl fun x => p x).symm x)) = ↑(e ⟨x, hx⟩)", " q (e.extendSubtype x)", " e.extend...
import Mathlib.CategoryTheory.Limits.Creates import Mathlib.CategoryTheory.Sites.Sheafification import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts #align_import category_theory.sites.limits from "leanprover-community/mathlib"@"95e83ced9542828815f53a1096a4d373c1b08a77" namespace CategoryTheory namespace S...
Mathlib/CategoryTheory/Sites/Limits.lean
138
142
theorem isSheaf_of_isLimit (F : K ⥤ Sheaf J D) (E : Cone (F ⋙ sheafToPresheaf J D)) (hE : IsLimit E) : Presheaf.IsSheaf J E.pt := by
rw [Presheaf.isSheaf_iff_multifork] intro X S exact ⟨isLimitMultiforkOfIsLimit _ _ hE _ _⟩
[ " ∀ (b : (W.index (F.obj k).val).R),\n (fun i => S.ι i ≫ (E.π.app k).app { unop := i.Y }) ((W.index (F.obj k).val).fstTo b) ≫\n (W.index (F.obj k).val).fst b =\n (fun i => S.ι i ≫ (E.π.app k).app { unop := i.Y }) ((W.index (F.obj k).val).sndTo b) ≫\n (W.index (F.obj k).val).snd b", " (fun i ...
[ " ∀ (b : (W.index (F.obj k).val).R),\n (fun i => S.ι i ≫ (E.π.app k).app { unop := i.Y }) ((W.index (F.obj k).val).fstTo b) ≫\n (W.index (F.obj k).val).fst b =\n (fun i => S.ι i ≫ (E.π.app k).app { unop := i.Y }) ((W.index (F.obj k).val).sndTo b) ≫\n (W.index (F.obj k).val).snd b", " (fun i ...
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ι : Type _} {α : ι → Type _} section cylinder def cylinder (s : Finset ι) (S : Set (∀ i : s, α...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
193
195
theorem inter_cylinder_same (s : Finset ι) (S₁ : Set (∀ i : s, α i)) (S₂ : Set (∀ i : s, α i)) : cylinder s S₁ ∩ cylinder s S₂ = cylinder s (S₁ ∩ S₂) := by
classical rw [inter_cylinder]; rfl
[ " cylinder s ∅ = ∅", " cylinder s univ = univ", " cylinder s S = ∅ ↔ S = ∅", " cylinder s S = ∅", " S = ∅", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder s₂ S₂ = cylinder (s₁ ∪ s₂) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₁ ∩ (fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₂)", " f ∈ cylind...
[ " cylinder s ∅ = ∅", " cylinder s univ = univ", " cylinder s S = ∅ ↔ S = ∅", " cylinder s S = ∅", " S = ∅", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder s₂ S₂ = cylinder (s₁ ∪ s₂) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₁ ∩ (fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₂)", " f ∈ cylind...
import Mathlib.CategoryTheory.GlueData import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Topology.Category.TopCat.Opens import Mathlib.Tactic.Generalize import Mathlib.CategoryTheory.Elementwise #align_import topology.gluing from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d...
Mathlib/Topology/Gluing.lean
132
158
theorem rel_equiv : Equivalence D.Rel := ⟨fun x => Or.inl (refl x), by rintro a b (⟨⟨⟩⟩ | ⟨x, e₁, e₂⟩) exacts [Or.inl rfl, Or.inr ⟨D.t _ _ x, e₂, by erw [← e₁, D.t_inv_apply]⟩], by -- previous line now `erw` after #13170 rintro ⟨i, a⟩ ⟨j, b⟩ ⟨k, c⟩ (⟨⟨⟩⟩ | ⟨x, e₁, e₂⟩) · exact id rintro (⟨⟨⟩⟩...
dsimp only [coe_of, z] erw [pullbackIsoProdSubtype_inv_fst_apply, D.t_inv_apply]-- now `erw` after #13170 have eq₂ : (pullback.snd : _ ⟶ D.V _) z = y := pullbackIsoProdSubtype_inv_snd_apply _ _ _ clear_value z right use (pullback.fst : _ ⟶ D.V (i, k)) (D.t' _ _ _ z) dsimp only at * ...
[ " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(D.ι i) ⁻¹' U)", " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(Multicoequalizer.π D.diagram i) ⁻¹' U)", " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(Sigma.ι D.diagram.right i ≫ Multicoequalizer.sigmaπ D.diagram) ⁻¹' U)", " IsOpen (⇑(homeoOfIso (Multicoequalizer.isoCoequalizer D.diagram).symm) ...
[ " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(D.ι i) ⁻¹' U)", " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(Multicoequalizer.π D.diagram i) ⁻¹' U)", " IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(Sigma.ι D.diagram.right i ≫ Multicoequalizer.sigmaπ D.diagram) ⁻¹' U)", " IsOpen (⇑(homeoOfIso (Multicoequalizer.isoCoequalizer D.diagram).symm) ...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds #align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973" -- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals. open scoped Real namespace Real theorem ...
Mathlib/Data/Real/Pi/Bounds.lean
139
147
theorem sqrtTwoAddSeries_step_down (a b : ℕ) {c d n : ℕ} {z : ℝ} (hz : z ≤ sqrtTwoAddSeries (a / b) n) (hb : 0 < b) (hd : 0 < d) (h : a ^ 2 * d ≤ (2 * d + c) * b ^ 2) : z ≤ sqrtTwoAddSeries (c / d) (n + 1) := by
apply le_trans hz; rw [sqrtTwoAddSeries_succ]; apply sqrtTwoAddSeries_monotone_left apply le_sqrt_of_sq_le have hb' : 0 < (b : ℝ) := Nat.cast_pos.2 hb have hd' : 0 < (d : ℝ) := Nat.cast_pos.2 hd rw [div_pow, add_div_eq_mul_add_div _ _ (ne_of_gt hd'), div_le_div_iff (pow_pos hb' _) hd'] exact mod_cast h
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π", " 0 < 2 ^ (n + 2)", " (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)", " 0 < π / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 ≠ ...
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π", " 0 < 2 ^ (n + 2)", " (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)", " 0 < π / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 ≠ ...
import Mathlib.Algebra.Regular.Basic import Mathlib.GroupTheory.GroupAction.Hom #align_import algebra.regular.smul from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11" variable {R S : Type*} (M : Type*) {a b : R} {s : S} def IsSMulRegular [SMul R M] (c : R) := Function.Injective ((c ...
Mathlib/Algebra/Regular/SMul.lean
116
122
theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] : IsSMulRegular M (a * b) ∧ IsSMulRegular M (b * a) ↔ IsSMulRegular M a ∧ IsSMulRegular M b := by
refine ⟨?_, ?_⟩ · rintro ⟨ab, ba⟩ exact ⟨ba.of_mul, ab.of_mul⟩ · rintro ⟨ha, hb⟩ exact ⟨ha.mul hb, hb.mul ha⟩
[ " c = d", " IsSMulRegular M b", " IsSMulRegular M (a * b) ∧ IsSMulRegular M (b * a) ↔ IsSMulRegular M a ∧ IsSMulRegular M b", " IsSMulRegular M (a * b) ∧ IsSMulRegular M (b * a) → IsSMulRegular M a ∧ IsSMulRegular M b", " IsSMulRegular M a ∧ IsSMulRegular M b", " IsSMulRegular M a ∧ IsSMulRegular M b → Is...
[ " c = d", " IsSMulRegular M b" ]
import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.RingTheory.Int.Basic import Mathlib.RingTheory.Localization.Integral import Mathlib.RingTheory.IntegrallyClosed #align_import ring_theory.polynomial.gauss_lemma from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" open...
Mathlib/RingTheory/Polynomial/GaussLemma.lean
77
102
theorem IsIntegrallyClosed.eq_map_mul_C_of_dvd [IsIntegrallyClosed R] {f : R[X]} (hf : f.Monic) {g : K[X]} (hg : g ∣ f.map (algebraMap R K)) : ∃ g' : R[X], g'.map (algebraMap R K) * (C <| leadingCoeff g) = g := by
have g_ne_0 : g ≠ 0 := ne_zero_of_dvd_ne_zero (Monic.ne_zero <| hf.map (algebraMap R K)) hg suffices lem : ∃ g' : R[X], g'.map (algebraMap R K) = g * C g.leadingCoeff⁻¹ by obtain ⟨g', hg'⟩ := lem use g' rw [hg', mul_assoc, ← C_mul, inv_mul_cancel (leadingCoeff_ne_zero.mpr g_ne_0), C_1, mul_one] have ...
[ " g ∈ lifts (algebraMap (↥(integralClosure R K)) K)", " g.coeff n ∈ Set.range ⇑(algebraMap (↥(integralClosure R K)) K)", " g.coeff n ∈ ↑(integralClosure R K).toSubring", " eval₂ (algebraMap R K) (g.coeff n) p = 0", " eval (g.coeff n) (map (algebraMap R K) p) = 0", " Function.Injective ⇑(algebraMap K g.Spl...
[ " g ∈ lifts (algebraMap (↥(integralClosure R K)) K)", " g.coeff n ∈ Set.range ⇑(algebraMap (↥(integralClosure R K)) K)", " g.coeff n ∈ ↑(integralClosure R K).toSubring", " eval₂ (algebraMap R K) (g.coeff n) p = 0", " eval (g.coeff n) (map (algebraMap R K) p) = 0", " Function.Injective ⇑(algebraMap K g.Spl...
import Mathlib.Algebra.Polynomial.Eval import Mathlib.RingTheory.Ideal.Quotient #align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24" open Submodule open Polynomial variable {R : Type*} [Ring R] variable {A : Type*} [CommRing A] variable {M : Type*} [...
Mathlib/LinearAlgebra/SModEq.lean
97
100
theorem mul {I : Ideal A} {x₁ x₂ y₁ y₂ : A} (hxy₁ : x₁ ≡ y₁ [SMOD I]) (hxy₂ : x₂ ≡ y₂ [SMOD I]) : x₁ * x₂ ≡ y₁ * y₂ [SMOD I] := by
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_mul] at hxy₁ hxy₂ ⊢ rw [hxy₁, hxy₂]
[ " x ≡ y [SMOD U] ↔ x - y ∈ U", " x ≡ y [SMOD ⊥] ↔ x = y", " x₁ + x₂ ≡ y₁ + y₂ [SMOD U]", " Submodule.Quotient.mk (x₁ + x₂) = Submodule.Quotient.mk (y₁ + y₂)", " c • x ≡ c • y [SMOD U]", " Submodule.Quotient.mk (c • x) = Submodule.Quotient.mk (c • y)", " x₁ * x₂ ≡ y₁ * y₂ [SMOD I]", " (Ideal.Quotient.m...
[ " x ≡ y [SMOD U] ↔ x - y ∈ U", " x ≡ y [SMOD ⊥] ↔ x = y", " x₁ + x₂ ≡ y₁ + y₂ [SMOD U]", " Submodule.Quotient.mk (x₁ + x₂) = Submodule.Quotient.mk (y₁ + y₂)", " c • x ≡ c • y [SMOD U]", " Submodule.Quotient.mk (c • x) = Submodule.Quotient.mk (c • y)" ]
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}
Mathlib/Data/ENNReal/Real.lean
37
40
theorem toReal_add (ha : a ≠ ∞) (hb : b ≠ ∞) : (a + b).toReal = a.toReal + b.toReal := by
lift a to ℝ≥0 using ha lift b to ℝ≥0 using hb rfl
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal" ]
[]
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv noncomputable section open scoped Manifold open Bundle Set Topology section SpecificFunctions variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H)...
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
277
281
theorem mfderivWithin_fst {s : Set (M × M')} {x : M × M'} (hxs : UniqueMDiffWithinAt (I.prod I') s x) : mfderivWithin (I.prod I') I Prod.fst s x = ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2) := by
rw [MDifferentiable.mfderivWithin (mdifferentiableAt_fst I I') hxs]; exact mfderiv_fst I I'
[ " HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))", " HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x...
[ " HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))", " HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x...
import Mathlib.Geometry.Euclidean.Circumcenter #align_import geometry.euclidean.monge_point from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0" noncomputable section open scoped Classical open scoped RealInnerProductSpace namespace Affine namespace Simplex open Finset AffineSubspac...
Mathlib/Geometry/Euclidean/MongePoint.lean
130
154
theorem mongePoint_eq_affineCombination_of_pointsWithCircumcenter {n : ℕ} (s : Simplex ℝ P (n + 2)) : s.mongePoint = (univ : Finset (PointsWithCircumcenterIndex (n + 2))).affineCombination ℝ s.pointsWithCircumcenter (mongePointWeightsWithCircumcenter n) := by
rw [mongePoint_eq_smul_vsub_vadd_circumcenter, centroid_eq_affineCombination_of_pointsWithCircumcenter, circumcenter_eq_affineCombination_of_pointsWithCircumcenter, affineCombination_vsub, ← LinearMap.map_smul, weightedVSub_vadd_affineCombination] congr with i rw [Pi.add_apply, Pi.smul_apply, smul_eq...
[ " s₁.mongePoint = s₂.mongePoint", " ∑ i : PointsWithCircumcenterIndex (n + 2), mongePointWeightsWithCircumcenter n i = 1", " ↑(n + 2 + 1) * (↑(n + 1))⁻¹ + -2 / ↑(n + 1) = 1", " ↑n + 2 + 1 + -2 = ↑n + 1", " s.mongePoint = (affineCombination ℝ univ s.pointsWithCircumcenter) (mongePointWeightsWithCircumcenter ...
[ " s₁.mongePoint = s₂.mongePoint", " ∑ i : PointsWithCircumcenterIndex (n + 2), mongePointWeightsWithCircumcenter n i = 1", " ↑(n + 2 + 1) * (↑(n + 1))⁻¹ + -2 / ↑(n + 1) = 1", " ↑n + 2 + 1 + -2 = ↑n + 1" ]
import Mathlib.Analysis.SpecialFunctions.Integrals #align_import data.real.pi.wallis from "leanprover-community/mathlib"@"980755c33b9168bc82f774f665eaa27878140fac" open scoped Real Topology Nat open Filter Finset intervalIntegral namespace Real namespace Wallis set_option linter.uppercaseLean3 false noncomp...
Mathlib/Data/Real/Pi/Wallis.lean
91
98
theorem le_W (k : ℕ) : ((2 : ℝ) * k + 1) / (2 * k + 2) * (π / 2) ≤ W k := by
rw [← le_div_iff pi_div_two_pos, div_eq_inv_mul (W k) _] rw [W_eq_integral_sin_pow_div_integral_sin_pow, le_div_iff (integral_sin_pow_pos _)] convert integral_sin_pow_succ_le (2 * k + 1) rw [integral_sin_pow (2 * k)] simp only [sin_zero, ne_eq, add_eq_zero, and_false, not_false_eq_true, zero_pow, cos_zero, ...
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3", " W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)...
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3", " W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)...
import Mathlib.Init.Core import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0" noncomputable section open Affine section DivisionRin...
Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
782
786
theorem finrank_vectorSpan_insert_le_set (s : Set P) (p : P) : finrank k (vectorSpan k (insert p s)) ≤ finrank k (vectorSpan k s) + 1 := by
rw [← direction_affineSpan, ← affineSpan_insert_affineSpan, direction_affineSpan] refine (finrank_vectorSpan_insert_le _ _).trans (add_le_add_right ?_ _) rw [direction_affineSpan]
[ " finrank k ↥(vectorSpan k (insert p ↑s)) ≤ finrank k ↥s.direction + 1", " ¬FiniteDimensional k ↥(vectorSpan k (insert p ↑s))", " False", " s.direction ≤ vectorSpan k (insert p ↑s)", "k : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : Aff...
[ " finrank k ↥(vectorSpan k (insert p ↑s)) ≤ finrank k ↥s.direction + 1", " ¬FiniteDimensional k ↥(vectorSpan k (insert p ↑s))", " False", " s.direction ≤ vectorSpan k (insert p ↑s)", "k : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : Aff...
import Mathlib.FieldTheory.SeparableDegree import Mathlib.FieldTheory.IsSepClosed open scoped Classical Polynomial open FiniteDimensional Polynomial IntermediateField Field noncomputable section universe u v w variable (F : Type u) (E : Type v) [Field F] [Field E] [Algebra F E] variable (K : Type w) [Field K] [...
Mathlib/FieldTheory/SeparableClosure.lean
100
103
theorem separableClosure.comap_eq_of_algHom (i : E →ₐ[F] K) : (separableClosure F K).comap i = separableClosure F E := by
ext x exact map_mem_separableClosure_iff i
[ " i x ∈ separableClosure F K ↔ x ∈ separableClosure F E", " comap i (separableClosure F K) = separableClosure F E", " x ∈ comap i (separableClosure F K) ↔ x ∈ separableClosure F E" ]
[ " i x ∈ separableClosure F K ↔ x ∈ separableClosure F E" ]
import Mathlib.Data.TypeMax import Mathlib.Logic.UnivLE import Mathlib.CategoryTheory.Limits.Shapes.Images #align_import category_theory.limits.types from "leanprover-community/mathlib"@"4aa2a2e17940311e47007f087c9df229e7f12942" open CategoryTheory CategoryTheory.Limits universe v u w namespace CategoryTheory.L...
Mathlib/CategoryTheory/Limits/Types.lean
62
65
theorem isLimit_iff_bijective_sectionOfCone (c : Cone F) : Nonempty (IsLimit c) ↔ (Types.sectionOfCone c).Bijective := by
simp_rw [isLimit_iff, Function.bijective_iff_existsUnique, Subtype.forall, F.sections_ext_iff, sectionOfCone]
[ " ((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j = (fun j x => s j) i ≫ F.map f", " (((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j) a✝ = ((fun j x => s j) i ≫ F.map f) a✝", " Nonempty (IsLimit c) ↔ ∀ s ∈ F.sections, ∃! x, ∀ (j : J), c.π.app j x = s j", " ∃! x, ∀ (j : J), c...
[ " ((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j = (fun j x => s j) i ≫ F.map f", " (((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j) a✝ = ((fun j x => s j) i ≫ F.map f) a✝", " Nonempty (IsLimit c) ↔ ∀ s ∈ F.sections, ∃! x, ∀ (j : J), c.π.app j x = s j", " ∃! x, ∀ (j : J), c...
import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.BilinearForm.Basic import Mathlib.LinearAlgebra.Basis import Mathlib.Algebra.Algebra.Bilinear open LinearMap (BilinForm) universe u v w variable {R : Type*} {M : Type*} [CommSemiring R] [AddCommMonoid M] [Module R M] variable {R₁ : Type*} {M₁ :...
Mathlib/LinearAlgebra/BilinearForm/Hom.lean
90
92
theorem sum_apply {α} (t : Finset α) (B : α → BilinForm R M) (v w : M) : (∑ i ∈ t, B i) v w = ∑ i ∈ t, B i v w := by
simp only [coeFn_sum, Finset.sum_apply]
[ " ((∑ i ∈ t, B i) v) w = ∑ i ∈ t, ((B i) v) w" ]
[]
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
66
77
theorem degree_list_sum_le (l : List S[X]) : degree l.sum ≤ (l.map natDegree).maximum := by
by_cases h : l.sum = 0 · simp [h] · rw [degree_eq_natDegree h] suffices (l.map natDegree).maximum = ((l.map natDegree).foldr max 0 : ℕ) by rw [this] simpa using natDegree_list_sum_le l rw [← List.foldr_max_of_ne_nil] · congr contrapose! h rw [List.map_eq_nil] at h simp [h]
[ " natDegree 0 ≤ 0", " ∀ (a : List S[X]), (Multiset.sum ⟦a⟧).natDegree ≤ foldr max ⋯ 0 (Multiset.map natDegree ⟦a⟧)", " (∑ i ∈ s, f i).natDegree ≤ Finset.fold max 0 (natDegree ∘ f) s", " 0 ≤ n ∧ ∀ x ∈ s, (natDegree ∘ f) x ≤ n", " l.sum.degree ≤ (List.map natDegree l).maximum", " ↑l.sum.natDegree ≤ (List.ma...
[ " natDegree 0 ≤ 0", " ∀ (a : List S[X]), (Multiset.sum ⟦a⟧).natDegree ≤ foldr max ⋯ 0 (Multiset.map natDegree ⟦a⟧)", " (∑ i ∈ s, f i).natDegree ≤ Finset.fold max 0 (natDegree ∘ f) s", " 0 ≤ n ∧ ∀ x ∈ s, (natDegree ∘ f) x ≤ n" ]
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Algebra.Group.Units #align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open scoped Int variable {M G : Type*} namespace Sem...
Mathlib/Algebra/Group/Semiconj/Units.lean
48
51
theorem units_inv_right {a : M} {x y : Mˣ} (h : SemiconjBy a x y) : SemiconjBy a ↑x⁻¹ ↑y⁻¹ := calc a * ↑x⁻¹ = ↑y⁻¹ * (y * a) * ↑x⁻¹ := by
rw [Units.inv_mul_cancel_left] _ = ↑y⁻¹ * a := by rw [← h.eq, mul_assoc, Units.mul_inv_cancel_right]
[ " a * ↑x⁻¹ = ↑y⁻¹ * (↑y * a) * ↑x⁻¹", " ↑y⁻¹ * (↑y * a) * ↑x⁻¹ = ↑y⁻¹ * a" ]
[]
import Mathlib.Data.List.Duplicate import Mathlib.Data.List.Sort #align_import data.list.nodup_equiv_fin from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace List variable {α : Type*} section Sublist theorem sublist_of_orderEmbedding_get?_eq {l l' : List α} (f : ℕ ↪o ℕ) ...
Mathlib/Data/List/NodupEquivFin.lean
168
205
theorem sublist_iff_exists_fin_orderEmbedding_get_eq {l l' : List α} : l <+ l' ↔ ∃ f : Fin l.length ↪o Fin l'.length, ∀ ix : Fin l.length, l.get ix = l'.get (f ix) := by
rw [sublist_iff_exists_orderEmbedding_get?_eq] constructor · rintro ⟨f, hf⟩ have h : ∀ {i : ℕ}, i < l.length → f i < l'.length := by intro i hi specialize hf i rw [get?_eq_get hi, eq_comm, get?_eq_some] at hf obtain ⟨h, -⟩ := hf exact h refine ⟨OrderEmbedding.ofMapLEIff (fun...
[ " l <+ l'", " [] <+ l'", " hd :: tl <+ l'", " (fun i => f (i + 1) - (f 0 + 1)) a ≤ (fun i => f (i + 1) - (f 0 + 1)) b ↔ a ≤ b", " f (a + 1) - (f 0 + 1) ≤ f (b + 1) - (f 0 + 1) ↔ a ≤ b", " f 0 + 1 ≤ f (b + 1)", " 0 < b + 1", " ∀ (ix : ℕ), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)", " tl.get? ix =...
[ " l <+ l'", " [] <+ l'", " hd :: tl <+ l'", " (fun i => f (i + 1) - (f 0 + 1)) a ≤ (fun i => f (i + 1) - (f 0 + 1)) b ↔ a ≤ b", " f (a + 1) - (f 0 + 1) ≤ f (b + 1) - (f 0 + 1) ↔ a ≤ b", " f 0 + 1 ≤ f (b + 1)", " 0 < b + 1", " ∀ (ix : ℕ), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)", " tl.get? ix =...
import Mathlib.Order.RelClasses #align_import data.sigma.lex from "leanprover-community/mathlib"@"41cf0cc2f528dd40a8f2db167ea4fb37b8fde7f3" namespace PSigma variable {ι : Sort*} {α : ι → Sort*} {r r₁ r₂ : ι → ι → Prop} {s s₁ s₂ : ∀ i, α i → α i → Prop}
Mathlib/Data/Sigma/Lex.lean
151
162
theorem lex_iff {a b : Σ' i, α i} : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2 := by
constructor · rintro (⟨a, b, hij⟩ | ⟨i, hab⟩) · exact Or.inl hij · exact Or.inr ⟨rfl, hab⟩ · obtain ⟨i, a⟩ := a obtain ⟨j, b⟩ := b dsimp only rintro (h | ⟨rfl, h⟩) · exact Lex.left _ _ h · exact Lex.right _ h
[ " Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd", " Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd", " r ⟨a₁✝, a⟩.fst ⟨a₂✝, b⟩.fst ∨ ∃ h, s ⟨a₂✝, b⟩.fst (h ▸ ⟨a₁✝, a⟩.snd) ⟨a₂✝, b⟩.snd", " r ⟨i, b₁✝⟩.fst ⟨i, b₂✝⟩.fst ∨ ∃ h, s ⟨i, b₂✝⟩.fst (h ▸ ⟨i, b₁✝⟩.snd) ⟨i, b₂✝⟩.snd", " (r a...
[]
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c...
Mathlib/Order/Interval/Set/Disjoint.lean
60
61
theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by
rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff]
[ " Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b" ]
[]
import Mathlib.Analysis.Calculus.LineDeriv.Measurable import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.Analysis.BoundedVariation import Mathlib.MeasureTheory.Group.Integral import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff import Mathlib....
Mathlib/Analysis/Calculus/Rademacher.lean
119
160
theorem integral_inv_smul_sub_mul_tendsto_integral_lineDeriv_mul' (hf : LipschitzWith C f) (h'f : HasCompactSupport f) (hg : Continuous g) (v : E) : Tendsto (fun (t : ℝ) ↦ ∫ x, (t⁻¹ • (f (x + t • v) - f x)) * g x ∂μ) (𝓝[>] 0) (𝓝 (∫ x, lineDeriv ℝ f x v * g x ∂μ)) := by
let K := cthickening (‖v‖) (tsupport f) have K_compact : IsCompact K := IsCompact.cthickening h'f apply tendsto_integral_filter_of_dominated_convergence (K.indicator (fun x ↦ (C * ‖v‖) * ‖g x‖)) · filter_upwards with t apply AEStronglyMeasurable.mul ?_ hg.aestronglyMeasurable apply aestronglyMeas...
[ " ∀ᵐ (p : E) ∂μ, LineDifferentiableAt ℝ f p v", " ∀ (p : E), ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v", " ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v", " LineDifferentiableAt ℝ f (p + s • v) v", " DifferentiableAt ℝ (fun t => f (p + t • v)) (s + 0)", " DifferentiableAt ℝ (fun t => f (p + ...
[ " ∀ᵐ (p : E) ∂μ, LineDifferentiableAt ℝ f p v", " ∀ (p : E), ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v", " ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v", " LineDifferentiableAt ℝ f (p + s • v) v", " DifferentiableAt ℝ (fun t => f (p + t • v)) (s + 0)", " DifferentiableAt ℝ (fun t => f (p + ...
import Mathlib.Analysis.Convex.Between import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Measure.Lebesgue.Basic import Mathlib.Topology.MetricSpace.Holder import Mathlib.Topology.MetricSpace.MetricSeparated #align_import measure_theory.measure.hausdorff from "leanprover-communit...
Mathlib/MeasureTheory/Measure/Hausdorff.lean
300
304
theorem eq_iSup_nat (m : Set X → ℝ≥0∞) : mkMetric' m = ⨆ n : ℕ, mkMetric'.pre m n⁻¹ := by
ext1 s rw [iSup_apply] refine tendsto_nhds_unique (mkMetric'.tendsto_pre_nat m s) (tendsto_atTop_iSup fun k l hkl => mkMetric'.mono_pre_nat m hkl s)
[ " μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s", " (↑l)⁻¹ ≤ (↑k)⁻¹", " Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))", " Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))", " Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))", ...
[ " μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s", " (↑l)⁻¹ ≤ (↑k)⁻¹", " Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))", " Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))", " Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))", ...
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] ...
Mathlib/CategoryTheory/Comma/Arrow.lean
162
163
theorem hom.congr_left {f g : Arrow T} {φ₁ φ₂ : f ⟶ g} (h : φ₁ = φ₂) : φ₁.left = φ₂.left := by
rw [h]
[ " mk f.hom = f", " mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }", " f = g", " f = f", " ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g", " (𝟭 T).map (inv ff.left) ≫ f.hom = g.hom ≫ (𝟭 T).map (inv ff.right)", " ff ≫ inverse = 𝟙 f ∧ inverse ≫ ff = �...
[ " mk f.hom = f", " mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }", " f = g", " f = f", " ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g", " (𝟭 T).map (inv ff.left) ≫ f.hom = g.hom ≫ (𝟭 T).map (inv ff.right)", " ff ≫ inverse = 𝟙 f ∧ inverse ≫ ff = �...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9" namespace Set variable {M : Type*} ...
Mathlib/Algebra/Order/Interval/Set/Monoid.lean
65
69
theorem Ico_add_bij : BijOn (· + d) (Ico a b) (Ico (a + d) (b + d)) := by
rw [← Ici_inter_Iio, ← Ici_inter_Iio] exact (Ici_add_bij a d).inter_mapsTo (fun x hx => add_lt_add_right hx _) fun x hx => lt_of_add_lt_add_right hx.2
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics #align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" noncomputable section open scoped Classical open Real Topology NNReal ENNReal Filter ComplexConjugate open Filter Finset...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
74
78
theorem continuousAt_const_cpow' {a b : ℂ} (h : b ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
by_cases ha : a = 0 · rw [ha, continuousAt_congr (zero_cpow_eq_nhds h)] exact continuousAt_const · exact continuousAt_const_cpow ha
[ " (fun x => 0 ^ x) =ᶠ[𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0", " (fun x => x ^ b) =ᶠ[𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0", " (fun x =>...
[ " (fun x => 0 ^ x) =ᶠ[𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0", " (fun x => x ^ b) =ᶠ[𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0", " (fun x =>...
import Mathlib.MeasureTheory.Integral.Asymptotics import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.MeasureTheory.Integral.IntegralEqImproper #align_import measure_theory.integral.exp_decay from "leanprover-community/mathlib"@"d4817f8867c368d6c5571f7379b3888aaec1d95a" noncomputable section op...
Mathlib/MeasureTheory/Integral/ExpDecay.lean
30
36
theorem exp_neg_integrableOn_Ioi (a : ℝ) {b : ℝ} (h : 0 < b) : IntegrableOn (fun x : ℝ => exp (-b * x)) (Ioi a) := by
have : Tendsto (fun x => -exp (-b * x) / b) atTop (𝓝 (-0 / b)) := by refine Tendsto.div_const (Tendsto.neg ?_) _ exact tendsto_exp_atBot.comp (tendsto_id.const_mul_atTop_of_neg (neg_neg_iff_pos.2 h)) refine integrableOn_Ioi_deriv_of_nonneg' (fun x _ => ?_) (fun x _ => (exp_pos _).le) this simpa [h.ne'] ...
[ " IntegrableOn (fun x => rexp (-b * x)) (Ioi a) volume", " Tendsto (fun x => -rexp (-b * x) / b) atTop (𝓝 (-0 / b))", " Tendsto (fun x => rexp (-b * x)) atTop (𝓝 0)", " HasDerivAt (fun x => -rexp (-b * x) / b) (rexp (-b * x)) x" ]
[]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort import Mathlib.Data.Set.Subsingleton #align_import combinatorics.composition from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open List variable {n : ℕ} ...
Mathlib/Combinatorics/Enumerative/Composition.lean
223
226
theorem sizeUpTo_succ {i : ℕ} (h : i < c.length) : c.sizeUpTo (i + 1) = c.sizeUpTo i + c.blocks.get ⟨i, h⟩ := by
simp only [sizeUpTo] rw [sum_take_succ _ _ h]
[ " ∑ i : Fin c.length, c.blocksFun i = n", "n : ℕ c : Composition n | n", " c.length ≤ n", " c.length ≤ c.blocks.sum", " 0 < c.length", " 0 < c.blocks.sum", " c.blocks.sum = n", " c.sizeUpTo 0 = 0", " c.sizeUpTo i = n", " (take i c.blocks).sum = n", " take i c.blocks = c.blocks", " c.sizeUpTo i...
[ " ∑ i : Fin c.length, c.blocksFun i = n", "n : ℕ c : Composition n | n", " c.length ≤ n", " c.length ≤ c.blocks.sum", " 0 < c.length", " 0 < c.blocks.sum", " c.blocks.sum = n", " c.sizeUpTo 0 = 0", " c.sizeUpTo i = n", " (take i c.blocks).sum = n", " take i c.blocks = c.blocks", " c.sizeUpTo i...
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Group.Measure import Mathlib.Topology.Constructions #align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open Function Set MeasureTheory...
Mathlib/MeasureTheory/Constructions/Pi.lean
132
135
theorem generateFrom_eq_pi [h : ∀ i, MeasurableSpace (α i)] {C : ∀ i, Set (Set (α i))} (hC : ∀ i, generateFrom (C i) = h i) (h2C : ∀ i, IsCountablySpanning (C i)) : generateFrom (pi univ '' pi univ C) = MeasurableSpace.pi := by
simp only [← funext hC, generateFrom_pi_eq h2C]
[ " IsPiSystem (univ.pi '' univ.pi C)", " univ.pi s₁ ∩ univ.pi s₂ ∈ univ.pi '' univ.pi C", " (univ.pi fun i => s₁ i ∩ s₂ i) ∈ univ.pi '' univ.pi C", " IsCountablySpanning (univ.pi '' univ.pi C)", " ⋃ n, (fun n => univ.pi fun i => s i (e n i)) n = univ", " MeasurableSpace.pi = generateFrom (univ.pi '' univ.p...
[ " IsPiSystem (univ.pi '' univ.pi C)", " univ.pi s₁ ∩ univ.pi s₂ ∈ univ.pi '' univ.pi C", " (univ.pi fun i => s₁ i ∩ s₂ i) ∈ univ.pi '' univ.pi C", " IsCountablySpanning (univ.pi '' univ.pi C)", " ⋃ n, (fun n => univ.pi fun i => s i (e n i)) n = univ", " MeasurableSpace.pi = generateFrom (univ.pi '' univ.p...
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
69
72
theorem factor_dvd_of_not_isUnit {f : K[X]} (hf1 : ¬IsUnit f) : factor f ∣ f := by
by_cases hf2 : f = 0; · rw [hf2]; exact dvd_zero _ rw [factor, dif_pos (WfDvdMonoid.exists_irreducible_factor hf1 hf2)] exact (Classical.choose_spec <| WfDvdMonoid.exists_irreducible_factor hf1 hf2).2
[ " Irreducible f.factor", " Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)", " Irreducible (Classical.choose H)", " Irreducible X", " f.factor ∣ f", " factor 0 ∣ 0", " Classical.choose ⋯ ∣ f" ]
[ " Irreducible f.factor", " Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)", " Irreducible (Classical.choose H)", " Irreducible X" ]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ι M : Type*} [DecidableEq ι] theorem List.support_sum_subset [Add...
Mathlib/Data/Finsupp/BigOperators.lean
99
111
theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M)) (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) : s.sum.support = (s.map Finsupp.support).sup := by
induction' s using Quot.inductionOn with a obtain ⟨l, hl, hd⟩ := hs suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by convert List.support_sum_eq a this · simp only [Multiset.quot_mk_to_coe'', Multiset.sum_coe] · dsimp only [Function.comp_def] simp only [quot_mk_to_coe'', map_coe, sup...
[ " l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l", " [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []", " (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " hd.support ⊆ hd.support",...
[ " l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l", " [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []", " (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " hd.support ⊆ hd.support",...
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SumOverResidueClass #align_import analysis.p_series from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" def SuccDiffBounded (C : ℕ) (u : ℕ → ℕ) : Prop :=...
Mathlib/Analysis/PSeries.lean
100
104
theorem sum_condensed_le' (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (n : ℕ) : (∑ k ∈ range n, 2 ^ k • f (2 ^ (k + 1))) ≤ ∑ k ∈ Ico 2 (2 ^ n + 1), f k := by
convert sum_schlomilch_le' hf (fun n => pow_pos zero_lt_two n) (fun m n hm => pow_le_pow_right one_le_two hm) n using 2 simp [pow_succ, mul_two, two_mul]
[ " ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)", " ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈...
[ " ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)", " ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈...
import Mathlib.FieldTheory.Galois #align_import field_theory.polynomial_galois_group from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Polynomial open FiniteDimensional namespace Polynomial variable {F : Type*} [Field F] (p q : F[X]) (E : Type*) [...
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
271
278
theorem restrictDvd_surjective (hpq : p ∣ q) (hq : q ≠ 0) : Function.Surjective (restrictDvd hpq) := by
classical -- Porting note: was `simp only [restrictDvd_def, dif_neg hq, restrict_surjective]` haveI := Fact.mk <| splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q) hpq simp only [restrictDvd_def, dif_neg hq] exact restrict_surjective _ _
[ " σ = τ", " (↑σ).equalizer ↑τ = ⊤", " f x = default x", " f ((algebraMap F p.SplittingField) y) = default ((algebraMap F p.SplittingField) y)", " restrictDvd hpq = if hq : q = 0 then 1 else restrict p q.SplittingField", " (if hq : q = 0 then 1 else restrict p q.SplittingField) = if hq : q = 0 then 1 else ...
[ " σ = τ", " (↑σ).equalizer ↑τ = ⊤", " f x = default x", " f ((algebraMap F p.SplittingField) y) = default ((algebraMap F p.SplittingField) y)", " restrictDvd hpq = if hq : q = 0 then 1 else restrict p q.SplittingField", " (if hq : q = 0 then 1 else restrict p q.SplittingField) = if hq : q = 0 then 1 else ...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.Prod import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.LinearCombination import Mathlib.Lean.Expr.ExtraRecognizers import Mathlib.Data.Set.Subsingleton #align_import lin...
Mathlib/LinearAlgebra/LinearIndependent.lean
131
151
theorem linearIndependent_iff' : LinearIndependent R v ↔ ∀ s : Finset ι, ∀ g : ι → R, ∑ i ∈ s, g i • v i = 0 → ∀ i ∈ s, g i = 0 := linearIndependent_iff.trans ⟨fun hf s g hg i his => have h := hf (∑ i ∈ s, Finsupp.single i (g i)) <| by simpa only [map_sum, Finsupp.total_single] u...
{ rw [Finsupp.lapply_apply, Finsupp.single_eq_same] } _ = ∑ j ∈ s, (Finsupp.lapply i : (ι →₀ R) →ₗ[R] R) (Finsupp.single j (g j)) := Eq.symm <| Finset.sum_eq_single i (fun j _hjs hji => by rw [Finsupp.lapply_apply, Finsupp.single_eq_of_ne hji]) fun hn...
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0", " (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0", " g i = (Finsupp.lapply i) (Finsupp.single i (g i))", " (Finsupp.lapply i) (Finsupp.single j (g j)) = 0" ]
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0" ]
import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax #align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" section variable {α : Type*} [Group α] [LinearOrder α] [CovariantClass α α (· * ·) (· ≤ ·)] -- TODO...
Mathlib/Algebra/Order/Group/MinMax.lean
57
58
theorem min_div_div_right' (a b c : α) : min (a / c) (b / c) = min a b / c := by
simpa only [div_eq_mul_inv] using min_mul_mul_right a b c⁻¹
[ " max a 1 / max a⁻¹ 1 = a", " max a⁻¹ 1 = a⁻¹ * max a 1", " min (a / c) (b / c) = min a b / c" ]
[ " max a 1 / max a⁻¹ 1 = a", " max a⁻¹ 1 = a⁻¹ * max a 1" ]
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Fintype.Vector import Mathlib.Data.Multiset.Sym #align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c" namespace Finset variable {α : Type*} @[simps] protected def sym2 (s : Finset α) : Finset (Sym2 α) :...
Mathlib/Data/Finset/Sym.lean
77
80
theorem injective_sym2 : Function.Injective (Finset.sym2 : Finset α → _) := by
intro s t h ext x simpa using congr(s(x, x) ∈ $h)
[ " s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s", " m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s", " (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s", " x ∈ univ.sym2", " ∀ a ∈ x, a ∈ univ", " univ.sym2 = univ", " a✝ ∈ univ.sym2 ↔ a✝ ∈ univ", " s.sym2 ⊆ t.sym2", " s.val.sym2 ≤ t.val.sym2", " s.val ≤ t.val", " Function.Injective Finset...
[ " s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s", " m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s", " (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s", " x ∈ univ.sym2", " ∀ a ∈ x, a ∈ univ", " univ.sym2 = univ", " a✝ ∈ univ.sym2 ↔ a✝ ∈ univ", " s.sym2 ⊆ t.sym2", " s.val.sym2 ≤ t.val.sym2", " s.val ≤ t.val" ]
import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Lattice #align_import data.fintype.lattice from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" open Function open Nat universe u v variable {ι α β : Type*} open Finset Function theorem Finite.exists_max [Finite α] [Nonempt...
Mathlib/Data/Fintype/Lattice.lean
68
71
theorem Finite.exists_min [Finite α] [Nonempty α] [LinearOrder β] (f : α → β) : ∃ x₀ : α, ∀ x, f x₀ ≤ f x := by
cases nonempty_fintype α simpa using exists_min_image univ f univ_nonempty
[ " ∃ x₀, ∀ (x : α), f x ≤ f x₀", " ∃ x₀, ∀ (x : α), f x₀ ≤ f x" ]
[ " ∃ x₀, ∀ (x : α), f x ≤ f x₀" ]
import Mathlib.Data.List.Basic #align_import data.bool.all_any from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" variable {α : Type*} {p : α → Prop} [DecidablePred p] {l : List α} {a : α} namespace List -- Porting note: in Batteries #align list.all_nil List.all_nil #align list.all_...
Mathlib/Data/Bool/AllAny.lean
27
30
theorem all_iff_forall {p : α → Bool} : all l p ↔ ∀ a ∈ l, p a := by
induction' l with a l ih · exact iff_of_true rfl (forall_mem_nil _) simp only [all_cons, Bool.and_eq_true_iff, ih, forall_mem_cons]
[ " l.all p = true ↔ ∀ (a : α), a ∈ l → p a = true", " [].all p = true ↔ ∀ (a : α), a ∈ [] → p a = true", " (a :: l).all p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true" ]
[]
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
123
135
theorem weightedVSubOfPoint_vadd_eq_of_sum_eq_one (w : ι → k) (p : ι → P) (h : ∑ i ∈ s, w i = 1) (b₁ b₂ : P) : s.weightedVSubOfPoint p b₁ w +ᵥ b₁ = s.weightedVSubOfPoint p b₂ w +ᵥ b₂ := by
erw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply, ← @vsub_eq_zero_iff_eq V, vadd_vsub_assoc, vsub_vadd_eq_vsub_sub, ← add_sub_assoc, add_comm, add_sub_assoc, ← sum_sub_distrib] conv_lhs => congr · skip · congr · skip · ext rw [← smul_sub, vsub_sub_vsub_cancel_left] ...
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)", " (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)", " (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf...
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)", " (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)", " (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf...
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
107
108
theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff 𝕜 n f := by
rw [Subsingleton.elim f fun _ => 0]; exact contDiff_const
[ " iteratedFDerivWithin 𝕜 i (fun x => 0) s x = 0", " iteratedFDerivWithin 𝕜 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin 𝕜 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin 𝕜 (fun ...
[ " iteratedFDerivWithin 𝕜 i (fun x => 0) s x = 0", " iteratedFDerivWithin 𝕜 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin 𝕜 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin 𝕜 (fun ...
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Group.Instances import Mathlib.LinearAlgebra.AffineSpace.Slope import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.Tactic.FieldSimp #align_import li...
Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
62
64
theorem lineMap_mono_right (hb : b ≤ b') (hr : 0 ≤ r) : lineMap a b r ≤ lineMap a b' r := by
simp only [lineMap_apply_module] exact add_le_add_left (smul_le_smul_of_nonneg_left hb hr) _
[ " (lineMap a b) r ≤ (lineMap a' b) r", " (1 - r) • a + r • b ≤ (1 - r) • a' + r • b", " (lineMap a b) r < (lineMap a' b) r", " (1 - r) • a + r • b < (1 - r) • a' + r • b", " (lineMap a b) r ≤ (lineMap a b') r", " (1 - r) • a + r • b ≤ (1 - r) • a + r • b'" ]
[ " (lineMap a b) r ≤ (lineMap a' b) r", " (1 - r) • a + r • b ≤ (1 - r) • a' + r • b", " (lineMap a b) r < (lineMap a' b) r", " (1 - r) • a + r • b < (1 - r) • a' + r • b" ]
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace α] [MeasurableSpace β] {s : Set α} noncomputable section namespace MeasureTheory.Measure def count : Measure α := sum dirac #align measure_theory.measure.count MeasureTheo...
Mathlib/MeasureTheory/Measure/Count.lean
48
53
theorem count_apply_finset' {s : Finset α} (s_mble : MeasurableSet (s : Set α)) : count (↑s : Set α) = s.card := calc count (↑s : Set α) = ∑' i : (↑s : Set α), 1 := count_apply s_mble _ = ∑ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by
simp
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0", " ∑ i ∈ s, 1 = ↑s.card" ]
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0" ]
import Mathlib.Topology.Instances.Real import Mathlib.Order.Filter.Archimedean #align_import analysis.subadditive from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Set Filter Topology def Subadditive (u : ℕ → ℝ) : Prop := ∀ m n, u (m + n) ≤ u m + u n #al...
Mathlib/Analysis/Subadditive.lean
85
95
theorem tendsto_lim (hbdd : BddBelow (range fun n => u n / n)) : Tendsto (fun n => u n / n) atTop (𝓝 h.lim) := by
refine tendsto_order.2 ⟨fun l hl => ?_, fun L hL => ?_⟩ · refine eventually_atTop.2 ⟨1, fun n hn => hl.trans_le (h.lim_le_div hbdd (zero_lt_one.trans_le hn).ne')⟩ · obtain ⟨n, npos, hn⟩ : ∃ n : ℕ, 0 < n ∧ u n / n < L := by rw [Subadditive.lim] at hL rcases exists_lt_of_csInf_lt (by simp) hL wit...
[ " h.lim ≤ u n / ↑n", " sInf ((fun n => u n / ↑n) '' Ici 1) ≤ u n / ↑n", " u (k * n + r) ≤ ↑k * u n + u r", " u (0 * n + r) ≤ ↑0 * u n + u r", " u r ≤ u r", " u ((k + 1) * n + r) ≤ ↑(k + 1) * u n + u r", " u ((k + 1) * n + r) = u (n + (k * n + r))", " (k + 1) * n + r = n + (k * n + r)", " u n + (↑k *...
[ " h.lim ≤ u n / ↑n", " sInf ((fun n => u n / ↑n) '' Ici 1) ≤ u n / ↑n", " u (k * n + r) ≤ ↑k * u n + u r", " u (0 * n + r) ≤ ↑0 * u n + u r", " u r ≤ u r", " u ((k + 1) * n + r) ≤ ↑(k + 1) * u n + u r", " u ((k + 1) * n + r) = u (n + (k * n + r))", " (k + 1) * n + r = n + (k * n + r)", " u n + (↑k *...
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
139
141
theorem modOf_apply_of_exists_add (x : k[G]) (g : G) (g' : G) (h : ∃ d, g' = g + d) : (x %ᵒᶠ g) g' = 0 := by
classical exact Finsupp.filter_apply_neg _ _ <| by rwa [Classical.not_not]
[ " x /ᵒᶠ 0 = x", " (x /ᵒᶠ 0) x✝ = x x✝", " x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b", " (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝", " of' k G a * x /ᵒᶠ a = x", " (of' k G a * x /ᵒᶠ a) x✝ = x x✝", " ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝", " a + c = a + x✝ ↔ c = x✝", " x * of' k G a /ᵒᶠ a = x", " (x * of' k G ...
[ " x /ᵒᶠ 0 = x", " (x /ᵒᶠ 0) x✝ = x x✝", " x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b", " (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝", " of' k G a * x /ᵒᶠ a = x", " (of' k G a * x /ᵒᶠ a) x✝ = x x✝", " ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝", " a + c = a + x✝ ↔ c = x✝", " x * of' k G a /ᵒᶠ a = x", " (x * of' k G ...
import Mathlib.Order.SuccPred.Basic import Mathlib.Topology.Order.Basic import Mathlib.Topology.Metrizable.Uniformity #align_import topology.instances.discrete from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Order Set TopologicalSpace Filter variable {α : Type*} [TopologicalSp...
Mathlib/Topology/Instances/Discrete.lean
51
63
theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α] [PredOrder α] [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] : (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } := by
refine (eq_bot_of_singletons_open fun a => ?_).symm have h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a) := by suffices h_singleton_eq_inter' : {a} = Iic a ∩ Ici a by rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ] rw [inter_comm, Ici_inter_Iic, Icc_self a] rw [h_singleton_eq_inter] l...
[ " ∀ (a : α), (nhds a).IsCountablyGenerated", " ∀ (a : α), (pure a).IsCountablyGenerated", " instTopologicalSpaceSubtype = generateFrom {univ}", " ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}", " IsOpen {a}", " {a} = Iio (succ a) ∩ Ioi (pred a)", " {a} = Iic a ∩ Ici a", " IsOpen (Iio (succ a) ∩ Io...
[ " ∀ (a : α), (nhds a).IsCountablyGenerated", " ∀ (a : α), (pure a).IsCountablyGenerated", " instTopologicalSpaceSubtype = generateFrom {univ}" ]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.Prod import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.LinearCombination import Mathlib.Lean.Expr.ExtraRecognizers import Mathlib.Data.Set.Subsingleton #align_import lin...
Mathlib/LinearAlgebra/LinearIndependent.lean
174
181
theorem Fintype.linearIndependent_iff [Fintype ι] : LinearIndependent R v ↔ ∀ g : ι → R, ∑ i, g i • v i = 0 → ∀ i, g i = 0 := by
refine ⟨fun H g => by simpa using linearIndependent_iff'.1 H Finset.univ g, fun H => linearIndependent_iff''.2 fun s g hg hs i => H _ ?_ _⟩ rw [← hs] refine (Finset.sum_subset (Finset.subset_univ _) fun i _ hi => ?_).symm rw [hg i hi, zero_smul]
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0", " (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0", " g i = (Finsupp.lapply i) (Finsupp.single i (g i))", " (Finsupp.lapply i) (Finsupp.single j (g j)) = 0", " LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)...
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0", " (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0", " g i = (Finsupp.lapply i) (Finsupp.single i (g i))", " (Finsupp.lapply i) (Finsupp.single j (g j)) = 0", " LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)...
import Mathlib.Analysis.NormedSpace.AddTorsorBases #align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open AffineSubspace Set open scoped Pointwise variable {𝕜 V W Q P : Type*} section AddTorsor variable (𝕜) [Ring 𝕜] [AddCommGroup V] [Modu...
Mathlib/Analysis/Convex/Intrinsic.lean
157
161
theorem intrinsicClosure_mono (h : s ⊆ t) : intrinsicClosure 𝕜 s ⊆ intrinsicClosure 𝕜 t := by
refine image_subset_iff.2 fun x hx => ?_ refine ⟨Set.inclusion (affineSpan_mono _ h) x, ?_, rfl⟩ refine (continuous_inclusion (affineSpan_mono _ h)).closure_preimage_subset _ (closure_mono ?_ hx) exact fun y hy => h hy
[ " intrinsicInterior 𝕜 ∅ = ∅", " intrinsicFrontier 𝕜 ∅ = ∅", " intrinsicClosure 𝕜 ∅ = ∅", " (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty", " intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅", " False", " intrinsicInterior 𝕜 {x} = {x}", " intrinsicFrontier 𝕜 {x} = ∅", " intrinsicClosure 𝕜 {x} = {x}", " intr...
[ " intrinsicInterior 𝕜 ∅ = ∅", " intrinsicFrontier 𝕜 ∅ = ∅", " intrinsicClosure 𝕜 ∅ = ∅", " (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty", " intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅", " False", " intrinsicInterior 𝕜 {x} = {x}", " intrinsicFrontier 𝕜 {x} = ∅", " intrinsicClosure 𝕜 {x} = {x}" ]
import Mathlib.Order.Interval.Set.ProjIcc import Mathlib.Topology.Algebra.Order.Field import Mathlib.Topology.Bornology.Hom import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.lipschitz from "leanprove...
Mathlib/Topology/MetricSpace/Lipschitz.lean
371
378
theorem continuousAt_of_locally_lipschitz {x : α} {r : ℝ} (hr : 0 < r) (K : ℝ) (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) : ContinuousAt f x := by
-- We use `h` to squeeze `dist (f y) (f x)` between `0` and `K * dist y x` refine tendsto_iff_dist_tendsto_zero.2 (squeeze_zero' (eventually_of_forall fun _ => dist_nonneg) (mem_of_superset (ball_mem_nhds _ hr) h) ?_) -- Then show that `K * dist y x` tends to zero as `y → x` refine (continuous_const.mul (c...
[ " LipschitzWith K f ↔ ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y", " (∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)) ↔ ∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)", " LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y", " (∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → ...
[ " LipschitzWith K f ↔ ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y", " (∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)) ↔ ∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)", " LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y", " (∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → ...
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [Mu...
Mathlib/Algebra/Polynomial/Smeval.lean
54
54
theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by
rw [smeval_def]
[ " p.smeval x = p.sum (smul_pow x)" ]
[]
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
113
113
theorem log_neg_one : log (-1) = π * I := by
simp [log]
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -π < x.log.im", " x.log.im ≤ π", " cexp x.log = x", " x ∈ Set.range cexp → x ∈ {0}ᶜ", " cexp x ∈ {0}ᶜ", " (cexp x).log = x", " x = y", " (↑x.log).re = (↑x).log.re", " (↑x.log).im = (↑x).log.im", " (↑x).log.re = x.log", " (↑r * x).log = ↑r.log...
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -π < x.log.im", " x.log.im ≤ π", " cexp x.log = x", " x ∈ Set.range cexp → x ∈ {0}ᶜ", " cexp x ∈ {0}ᶜ", " (cexp x).log = x", " x = y", " (↑x.log).re = (↑x).log.re", " (↑x.log).im = (↑x).log.im", " (↑x).log.re = x.log", " (↑r * x).log = ↑r.log...
import Mathlib.Algebra.Group.ConjFinite import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.GroupAction.Quotient import Mathlib.GroupTheory.Index import Mathlib.GroupTheory.SpecificGroups.Dihedral import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Line...
Mathlib/GroupTheory/CommutingProbability.lean
54
60
theorem commProb_pi {α : Type*} (i : α → Type*) [Fintype α] [∀ a, Mul (i a)] : commProb (∀ a, i a) = ∏ a, commProb (i a) := by
simp_rw [commProb_def, Finset.prod_div_distrib, Finset.prod_pow, ← Nat.cast_prod, ← Nat.card_pi, Commute, SemiconjBy, Function.funext_iff] congr 2 exact Nat.card_congr ⟨fun x a => ⟨⟨x.1.1 a, x.1.2 a⟩, x.2 a⟩, fun x => ⟨⟨fun a => (x a).1.1, fun a => (x a).1.2⟩, fun a => (x a).2⟩, fun x => rfl, fun x => rf...
[ " commProb (M × M') = commProb M * commProb M'", " ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ...
[ " commProb (M × M') = commProb M * commProb M'", " ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ...
import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.RowCol import Mathlib.Data.Fin.VecNotation import Mathlib.Tactic.FinCases #align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matrix universe u uₘ uₙ uₒ variable {α : Type u} {o n m...
Mathlib/Data/Matrix/Notation.lean
323
326
theorem cons_mulVec [Fintype n'] (v : n' → α) (A : Fin m → n' → α) (w : n' → α) : (of <| vecCons v A) *ᵥ w = vecCons (dotProduct v w) (of A *ᵥ w) := by
ext i refine Fin.cases ?_ ?_ i <;> simp [mulVec]
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ", " of (vecCons v A) *ᵥ w = vecCons (v ⬝ᵥ w) (of A *ᵥ w)", " (of (vecCons v A) *ᵥ w) i = vecCons (v ⬝ᵥ w) (of A *ᵥ w) i"...
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ" ]
import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory.QuotientGroup #align_import group_theory.torsion from "leanprover-community/mathlib"@"1f4705ccdfe1e557fc54a0ce081a05e33d2e6240" ...
Mathlib/GroupTheory/Torsion.lean
63
64
theorem not_isTorsion_iff : ¬IsTorsion G ↔ ∃ g : G, ¬IsOfFinOrder g := by
rw [IsTorsion, not_forall]
[ " ¬IsTorsion G ↔ ∃ g, ¬IsOfFinOrder g" ]
[]
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.lpSpace import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.l2_space from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" open RCLike Submodule Filter open scop...
Mathlib/Analysis/InnerProductSpace/l2Space.lean
174
175
theorem inner_single_right (i : ι) (a : G i) (f : lp G 2) : ⟪f, lp.single 2 i a⟫ = ⟪f i, a⟫ := by
simpa [inner_conj_symm] using congr_arg conj (@inner_single_left _ 𝕜 _ _ _ _ i a f)
[ " Summable fun i => ⟪↑f i, ↑g i⟫_𝕜", " (ENNReal.toReal 2).IsConjExponent (ENNReal.toReal 2)", " 1 < ENNReal.toReal 2 ∧ (ENNReal.toReal 2)⁻¹ + (ENNReal.toReal 2)⁻¹ = 1", " ∀ (i : ι), ‖⟪↑f i, ↑g i⟫_𝕜‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i", " ‖⟪↑f i, ↑g i⟫_𝕜‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i", " ‖f‖ ^ 2 = re ⟪f, ...
[ " Summable fun i => ⟪↑f i, ↑g i⟫_𝕜", " (ENNReal.toReal 2).IsConjExponent (ENNReal.toReal 2)", " 1 < ENNReal.toReal 2 ∧ (ENNReal.toReal 2)⁻¹ + (ENNReal.toReal 2)⁻¹ = 1", " ∀ (i : ι), ‖⟪↑f i, ↑g i⟫_𝕜‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i", " ‖⟪↑f i, ↑g i⟫_𝕜‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i", " ‖f‖ ^ 2 = re ⟪f, ...
import Mathlib.Algebra.Squarefree.Basic import Mathlib.Data.ZMod.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.zmod from "leanprover-community/mathlib"@"00d163e35035c3577c1c79fa53b68de17781ffc1" theorem ZMod.ker_intCastRingHom (n : ℕ) : RingHom.ker (Int.castRingHom (ZMod n)) =...
Mathlib/RingTheory/ZMod.lean
33
37
theorem ZMod.ringHom_eq_of_ker_eq {n : ℕ} {R : Type*} [CommRing R] (f g : R →+* ZMod n) (h : RingHom.ker f = RingHom.ker g) : f = g := by
have := f.liftOfRightInverse_comp _ (ZMod.ringHom_rightInverse f) ⟨g, le_of_eq h⟩ rw [Subtype.coe_mk] at this rw [← this, RingHom.ext_zmod (f.liftOfRightInverse _ _ ⟨g, _⟩) _, RingHom.id_comp]
[ " RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {↑n}", " x✝ ∈ RingHom.ker (Int.castRingHom (ZMod n)) ↔ x✝ ∈ Ideal.span {↑n}", " f = g" ]
[ " RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {↑n}", " x✝ ∈ RingHom.ker (Int.castRingHom (ZMod n)) ↔ x✝ ∈ Ideal.span {↑n}" ]
import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.RingTheory.Ideal.Basic #align_import algebra.monoid_algebra.ideal from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {k A G : Type*}
Mathlib/Algebra/MonoidAlgebra/Ideal.lean
23
58
theorem MonoidAlgebra.mem_ideal_span_of_image [Monoid G] [Semiring k] {s : Set G} {x : MonoidAlgebra k G} : x ∈ Ideal.span (MonoidAlgebra.of k G '' s) ↔ ∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d * m' := by
let RHS : Ideal (MonoidAlgebra k G) := { carrier := { p | ∀ m : G, m ∈ p.support → ∃ m' ∈ s, ∃ d, m = d * m' } add_mem' := fun {x y} hx hy m hm => by classical exact (Finset.mem_union.1 <| Finsupp.support_add hm).elim (hx m) (hy m) zero_mem' := fun m hm => by cases hm smul_mem' := fun x...
[ " x ∈ Ideal.span (⇑(of k G) '' s) ↔ ∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d * m'", " ∃ m' ∈ s, ∃ d, m = d * m'", " ∃ m' ∈ s, ∃ d, xm * ym = d * m'", " (∃ d, ym = d * sm) → ∃ d, xm * ym = d * sm", " ∃ d_1, xm * (d * sm) = d_1 * sm", " x ∈ Ideal.span (⇑(of k G) '' s) ↔ x ∈ RHS", " x ∈ Ideal.span (⇑(of k G) ...
[]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.floor from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set section FloorRing variable {α R : Type*} [MeasurableSpace α] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R] ...
Mathlib/MeasureTheory/Function/Floor.lean
59
62
theorem MeasurableSet.image_fract [BorelSpace R] {s : Set R} (hs : MeasurableSet s) : MeasurableSet (Int.fract '' s) := by
simp only [Int.image_fract, sub_eq_add_neg, image_add_right'] exact MeasurableSet.iUnion fun m => (measurable_add_const _ hs).inter measurableSet_Ico
[ " MeasurableSet (floor ⁻¹' {⌊x⌋})", " MeasurableSet (ceil ⁻¹' {⌈x⌉})", " Measurable Int.fract", " MeasurableSet (Int.fract ⁻¹' s)", " MeasurableSet (⋃ m, (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1))", " MeasurableSet (Int.fract '' s)", " MeasurableSet (⋃ m, (fun x => x + ↑m) ⁻¹' s ∩ Ico 0 1)" ]
[ " MeasurableSet (floor ⁻¹' {⌊x⌋})", " MeasurableSet (ceil ⁻¹' {⌈x⌉})", " Measurable Int.fract", " MeasurableSet (Int.fract ⁻¹' s)", " MeasurableSet (⋃ m, (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1))" ]
import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Sum import Mathlib.SetTheory.Cardinal.Finite #align_import data.fintype.units from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" variable {α : Type*} instance UnitsInt.fintype : Fintype ℤˣ := ⟨{1, -1}, fun x ↦ by cases Int...
Mathlib/Data/Fintype/Units.lean
36
40
theorem Fintype.card_eq_card_units_add_one [GroupWithZero α] [Fintype α] [DecidableEq α] : Fintype.card α = Fintype.card αˣ + 1 := by
rw [eq_comm, Fintype.card_congr unitsEquivNeZero] have := Fintype.card_congr (Equiv.sumCompl (· = (0 : α))) rwa [Fintype.card_sum, add_comm, Fintype.card_subtype_eq] at this
[ " x ∈ {1, -1}", " card α = card αˣ + 1", " card { a // a ≠ 0 } + 1 = card α" ]
[ " x ∈ {1, -1}" ]
import Mathlib.MeasureTheory.Integral.FundThmCalculus import Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv import Mathlib.Analysis.SpecialFunctions.NonIntegrable import Mathlib.Analysis.SpecialFunctions.Pow.Deriv #align_import analysis.special_functions.integrals from "leanprover-community/mathlib"@"011...
Mathlib/Analysis/SpecialFunctions/Integrals.lean
73
95
theorem intervalIntegrable_rpow' {r : ℝ} (h : -1 < r) : IntervalIntegrable (fun x => x ^ r) volume a b := by
suffices ∀ c : ℝ, IntervalIntegrable (fun x => x ^ r) volume 0 c by exact IntervalIntegrable.trans (this a).symm (this b) have : ∀ c : ℝ, 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c := by intro c hc rw [intervalIntegrable_iff, uIoc_of_le hc] have hderiv : ∀ x ∈ Ioo 0 c, HasDerivAt (fun x...
[ " IntervalIntegrable (fun x => x ^ r) volume a b", " ∀ (c : ℝ), IntervalIntegrable (fun x => x ^ r) volume 0 c", " ∀ (c : ℝ), 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntegrableOn (fun x => x ^ r) (Set.Ioc 0 c) volume", " ∀ x ∈ Set.Ioo 0...
[]
import Mathlib.Geometry.Manifold.MFDeriv.Basic noncomputable section open scoped Manifold variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {f : E → E'} {s : Set E} {x : E} section MFDerivFderiv t...
Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean
36
37
theorem uniqueMDiffOn_iff_uniqueDiffOn : UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s := by
simp [UniqueMDiffOn, UniqueDiffOn, uniqueMDiffWithinAt_iff_uniqueDiffWithinAt]
[ " UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x", " UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s" ]
[ " UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x" ]
import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.Factors import Mathlib.Order.Interval.Finset.Nat #align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped Classical open Finset namespace Nat variable (n : ℕ) d...
Mathlib/NumberTheory/Divisors.lean
109
112
theorem dvd_of_mem_divisors {m : ℕ} (h : n ∈ divisors m) : n ∣ m := by
cases m · apply dvd_zero · simp [mem_divisors.1 h]
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
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 variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
73
73
theorem rpow_natCast (x : ℝ) (n : ℕ) : x ^ (n : ℝ) = x ^ n := by
simpa using rpow_intCast x n
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal import Mathlib.AlgebraicGeometry.PrimeSpectrum.Noetherian import Mathlib.RingTheory.ChainOfDivisors import Mathlib.RingTheory.DedekindDomain.Basic import Mathlib.RingTheory.FractionalIdeal.Operations #align_impo...
Mathlib/RingTheory/DedekindDomain/Ideal.lean
76
78
theorem coe_inv_of_nonzero {J : FractionalIdeal R₁⁰ K} (h : J ≠ 0) : (↑J⁻¹ : Submodule R₁ K) = IsLocalization.coeSubmodule K ⊤ / (J : Submodule R₁ K) := by
simp_rw [inv_nonzero _ h, coe_one, coe_mk, IsLocalization.coeSubmodule_top]
[ " ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J" ]
[]
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Sym.Sym2 namespace List variable {α : Type*} section Sym2 protected def sym2 : List α → List (Sym2 α) | [] => [] | x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2 theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} : z ∈ (x :: xs)...
Mathlib/Data/List/Sym.lean
49
61
theorem left_mem_of_mk_mem_sym2 {xs : List α} {a b : α} (h : s(a, b) ∈ xs.sym2) : a ∈ xs := by
induction xs with | nil => exact (not_mem_nil _ h).elim | cons x xs ih => rw [mem_cons] rw [mem_sym2_cons_iff] at h obtain (h | ⟨c, hc, h⟩ | h) := h · rw [Sym2.eq_iff, ← and_or_left] at h exact .inl h.1 · rw [Sym2.eq_iff] at h obtain (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩) := h <;> simp [hc] ...
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []", " a ∈ xs", ...
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []" ]
import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content noncomputable section universe u variable {K : Type u} namespace RatFunc section IntDegree open Polynomial variable [Field...
Mathlib/FieldTheory/RatFunc/Degree.lean
110
121
theorem intDegree_add_le {x y : RatFunc K} (hy : y ≠ 0) (hxy : x + y ≠ 0) : intDegree (x + y) ≤ max (intDegree x) (intDegree y) := by
by_cases hx : x = 0 · simp only [hx, zero_add, ne_eq] at hxy simp [hx, hxy] rw [intDegree_add hxy, ← natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hx y.denom_ne_zero, mul_comm y.denom, ← natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hy x.denom_ne_zero, ...
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0", " X.intDegree = 1", " ((algebraMap K[X] (RatFunc K)) p).intDegree = ↑p.natDegree", " (x * y).intDegree = x.intDegree + y.intDegree", " ↑(x * y).num.natDegree + (↑x.denom.natDegree + ↑y.denom.natDegree) =\n ↑x.num.natDegree + ↑y.num.natDe...
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0", " X.intDegree = 1", " ((algebraMap K[X] (RatFunc K)) p).intDegree = ↑p.natDegree", " (x * y).intDegree = x.intDegree + y.intDegree", " ↑(x * y).num.natDegree + (↑x.denom.natDegree + ↑y.denom.natDegree) =\n ↑x.num.natDegree + ↑y.num.natDe...
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Sort import Mathlib.Data.List.FinRange import Mathlib.LinearAlgebra.Pi import Mathlib.Logic.Equiv.Fintype #align_import linear_algebra.multilinear.basic from ...
Mathlib/LinearAlgebra/Multilinear/Basic.lean
171
174
theorem map_coord_zero {m : ∀ i, M₁ i} (i : ι) (h : m i = 0) : f m = 0 := by
classical have : (0 : R) • (0 : M₁ i) = 0 := by simp rw [← update_eq_self i m, h, ← this, f.map_smul, zero_smul R (M := M₂)]
[ " f = g", " { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g", " { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }", " { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\...
[ " f = g", " { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g", " { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }", " { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\...
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Splits import Mathlib.Algebra.Squarefree.Basic import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.PowerBasis #align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" ...
Mathlib/FieldTheory/Separable.lean
92
94
theorem Separable.of_mul_right {f g : R[X]} (h : (f * g).Separable) : g.Separable := by
rw [mul_comm] at h exact h.of_mul_left
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1", " X.Separable", " IsCoprime X 1", " (C r).Separable ↔ IsUnit r", " g.Separable" ]
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1", " X.Separable", " IsCoprime X 1", " (C r).Separable ↔ IsUnit r" ]
import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.FieldDivision #align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3" namespace Po...
Mathlib/RingTheory/Polynomial/Content.lean
177
182
theorem normUnit_content {p : R[X]} : normUnit (content p) = 1 := by
by_cases hp0 : p.content = 0 · simp [hp0] · ext apply mul_left_cancel₀ hp0 erw [← normalize_apply, normalize_content, mul_one]
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.Calculus.Deriv.Basic open Topology InnerProductSpace Set noncomputable section variable {𝕜 F : Type*} [RCLike 𝕜] variable [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [CompleteSpace F] variabl...
Mathlib/Analysis/Calculus/Gradient/Basic.lean
304
305
theorem hasGradientAtFilter_const : HasGradientAtFilter (fun _ => c) 0 x L := by
rw [HasGradientAtFilter, map_zero]; apply hasFDerivAtFilter_const c x L
[ " HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x", " HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x", " ∇ f x = 0", " HasGradientAt f (∇ f x) x", " HasFDerivAt f (fderiv 𝕜 f x) x", " HasGradientWithinAt f (gradientWithin f s x) s x", "...
[ " HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x", " HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x", " ∇ f x = 0", " HasGradientAt f (∇ f x) x", " HasFDerivAt f (fderiv 𝕜 f x) x", " HasGradientWithinAt f (gradientWithin f s x) s x", "...
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
495
499
theorem HasDerivAt.clm_apply (hc : HasDerivAt c c' x) (hu : HasDerivAt u u' x) : HasDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by
have := (hc.hasFDerivAt.clm_apply hu.hasFDerivAt).hasDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
[ " HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x", " HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (...
[ " HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x", " HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (...