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
221
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {...
Mathlib/ModelTheory/Semantics.lean
147
154
theorem realize_restrictVarLeft [DecidableEq α] {γ : Type*} {t : L.Term (Sum α γ)} {s : Set α} (h : ↑t.varFinsetLeft ⊆ s) {v : α → M} {xs : γ → M} : (t.restrictVarLeft (Set.inclusion h)).realize (Sum.elim (v ∘ (↑)) xs) = t.realize (Sum.elim v xs) := by
induction' t with a _ _ _ ih · cases a <;> rfl · simp_rw [varFinsetLeft, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i)))
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)", " realize v (f.apply₁ t) = funMap f ![realize v t]", " (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]", " real...
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)", " realize v (f.apply₁ t) = funMap f ![realize v t]", " (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]", " real...
import Mathlib.Analysis.RCLike.Lemmas import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad" set_option linter.uppercaseLean3 false...
Mathlib/MeasureTheory/Function/L2Space.lean
118
121
theorem snorm_rpow_two_norm_lt_top (f : Lp F 2 μ) : snorm (fun x => ‖f x‖ ^ (2 : ℝ)) 1 μ < ∞ := by
have h_two : ENNReal.ofReal (2 : ℝ) = 2 := by simp [zero_le_one] rw [snorm_norm_rpow f zero_lt_two, one_mul, h_two] exact ENNReal.rpow_lt_top_of_nonneg zero_le_two (Lp.snorm_ne_top f)
[ " Integrable (fun x => f x ^ 2) μ", " Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ", " Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ", " ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2", " 1 = 2 / 2", " Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ", " f x✝ ^ 2 = ‖f x✝‖ ^ 2", " snorm (fun x => ‖↑↑f x‖ ^ 2) 1...
[ " Integrable (fun x => f x ^ 2) μ", " Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ", " Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ", " ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2", " 1 = 2 / 2", " Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ", " f x✝ ^ 2 = ‖f x✝‖ ^ 2", " snorm (fun x => ‖↑↑f x‖ ^ 2) 1...
import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker #align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99" namespace Matrix variable {α β R n m : Type*} open Function...
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
104
107
theorem IsDiag.smul [Monoid R] [AddMonoid α] [DistribMulAction R α] (k : R) {A : Matrix n n α} (ha : A.IsDiag) : (k • A).IsDiag := by
intro i j h simp [ha h]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag", " (A - B) i j = 0", " (k • A).IsDiag", " (k • A) i j = 0" ]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag", " (A - B) i j = 0", " (k • A).IsDiag" ]
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
122
129
theorem toPGame_birthday (o : Ordinal) : o.toPGame.birthday = o := by
induction' o using Ordinal.induction with o IH rw [toPGame_def, PGame.birthday] simp only [lsub_empty, max_zero_right] -- Porting note: was `nth_rw 1 [← lsub_typein o]` conv_rhs => rw [← lsub_typein o] congr with x exact IH _ (typein_lt_self x)
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
import Mathlib.Analysis.Convex.Basic import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Order.Basic #align_import analysis.convex.strict from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Set open Convex Pointwise variable {𝕜 𝕝 E F β : Type*} open Function Se...
Mathlib/Analysis/Convex/Strict.lean
85
92
theorem Directed.strictConvex_iUnion {ι : Sort*} {s : ι → Set E} (hdir : Directed (· ⊆ ·) s) (hs : ∀ ⦃i : ι⦄, StrictConvex 𝕜 (s i)) : StrictConvex 𝕜 (⋃ i, s i) := by
rintro x hx y hy hxy a b ha hb hab rw [mem_iUnion] at hx hy obtain ⟨i, hx⟩ := hx obtain ⟨j, hy⟩ := hy obtain ⟨k, hik, hjk⟩ := hdir i j exact interior_mono (subset_iUnion s k) (hs (hik hx) (hjk hy) hxy ha hb hab)
[ " StrictConvex 𝕜 univ", " a • x + b • y ∈ interior univ", " a • x + b • y ∈ univ", " StrictConvex 𝕜 (s ∩ t)", " a • x + b • y ∈ interior (s ∩ t)", " a • x + b • y ∈ interior s ∩ interior t", " StrictConvex 𝕜 (⋃ i, s i)", " a • x + b • y ∈ interior (⋃ i, s i)" ]
[ " StrictConvex 𝕜 univ", " a • x + b • y ∈ interior univ", " a • x + b • y ∈ univ", " StrictConvex 𝕜 (s ∩ t)", " a • x + b • y ∈ interior (s ∩ t)", " a • x + b • y ∈ interior s ∩ interior t", " StrictConvex 𝕜 (⋃ i, s i)" ]
import Mathlib.Algebra.Group.Equiv.TypeTags import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.LinearAlgebra.Dual import Mathlib.LinearAlgebra.Contraction import Mathlib.RingTheory.TensorProduct.Basic #align_import representation_...
Mathlib/RepresentationTheory/Basic.lean
238
245
theorem ofModule_asModule_act (g : G) (x : RestrictScalars k (MonoidAlgebra k G) ρ.asModule) : ofModule (k := k) (G := G) ρ.asModule g x = -- Porting note: more help with implicit (RestrictScalars.addEquiv _ _ _).symm (ρ.asModuleEquiv.symm (ρ g (ρ.asModuleEquiv (RestrictScalars.addEquiv _ _ _ x)))) :=...
apply_fun RestrictScalars.addEquiv _ _ ρ.asModule using (RestrictScalars.addEquiv _ _ ρ.asModule).injective dsimp [ofModule, RestrictScalars.lsmul_apply_apply] simp
[ " ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g", " ρ.asAlgebraHom (Finsupp.single g 1) = ρ g", " ρ.asAlgebraHom ((of k G) g) = ρ g", " ρ.asModuleEquiv.symm (r • x) = (algebraMap k (MonoidAlgebra k G)) r • ρ.asModuleEquiv.symm x", " ρ.asModuleEquiv (ρ.asModuleEquiv.symm (r • x)) =\n ρ.asModuleEquiv ((alg...
[ " ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g", " ρ.asAlgebraHom (Finsupp.single g 1) = ρ g", " ρ.asAlgebraHom ((of k G) g) = ρ g", " ρ.asModuleEquiv.symm (r • x) = (algebraMap k (MonoidAlgebra k G)) r • ρ.asModuleEquiv.symm x", " ρ.asModuleEquiv (ρ.asModuleEquiv.symm (r • x)) =\n ρ.asModuleEquiv ((alg...
import Mathlib.RingTheory.Polynomial.Cyclotomic.Eval #align_import number_theory.primes_congruent_one from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" namespace Nat open Polynomial Nat Filter open scoped Nat theorem exists_prime_gt_modEq_one {k : ℕ} (n : ℕ) (hk0 : k ≠ 0) : ∃ ...
Mathlib/NumberTheory/PrimesCongruentOne.lean
60
64
theorem frequently_atTop_modEq_one {k : ℕ} (hk0 : k ≠ 0) : ∃ᶠ p in atTop, Nat.Prime p ∧ p ≡ 1 [MOD k] := by
refine frequently_atTop.2 fun n => ?_ obtain ⟨p, hp⟩ := exists_prime_gt_modEq_one n hk0 exact ⟨p, ⟨hp.2.1.le, hp.1, hp.2.2⟩⟩
[ " ∃ p, p.Prime ∧ n < p ∧ p ≡ 1 [MOD k]", " ∃ p, p.Prime ∧ n < p ∧ p ≡ 1 [MOD 1]", " 1 < (eval (↑b) (cyclotomic k ℤ)).natAbs", " 1 < (eval (↑b) (cyclotomic (k + 1) ℤ)).natAbs", " (cyclotomic k (ZMod p)).IsRoot ((castRingHom (ZMod p)) b)", " ↑↑b = (Int.castRingHom (ZMod p)) ↑b", " ↑p ∣ eval (↑b) (cyclotom...
[ " ∃ p, p.Prime ∧ n < p ∧ p ≡ 1 [MOD k]", " ∃ p, p.Prime ∧ n < p ∧ p ≡ 1 [MOD 1]", " 1 < (eval (↑b) (cyclotomic k ℤ)).natAbs", " 1 < (eval (↑b) (cyclotomic (k + 1) ℤ)).natAbs", " (cyclotomic k (ZMod p)).IsRoot ((castRingHom (ZMod p)) b)", " ↑↑b = (Int.castRingHom (ZMod p)) ↑b", " ↑p ∣ eval (↑b) (cyclotom...
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
140
141
theorem volume_interval {a b : ℝ} : volume (uIcc a b) = ofReal |b - a| := by
rw [← Icc_min_max, volume_Icc, max_sub_min_eq_abs]
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
import Mathlib.Topology.Separation open Topology Filter Set TopologicalSpace section Basic variable {α : Type*} [TopologicalSpace α] {C : Set α} theorem AccPt.nhds_inter {x : α} {U : Set α} (h_acc : AccPt x (𝓟 C)) (hU : U ∈ 𝓝 x) : AccPt x (𝓟 (U ∩ C)) := by have : 𝓝[≠] x ≤ 𝓟 U := by rw [le_princ...
Mathlib/Topology/Perfect.lean
222
233
theorem exists_perfect_nonempty_of_isClosed_of_not_countable [SecondCountableTopology α] (hclosed : IsClosed C) (hunc : ¬C.Countable) : ∃ D : Set α, Perfect D ∧ D.Nonempty ∧ D ⊆ C := by
rcases exists_countable_union_perfect_of_isClosed hclosed with ⟨V, D, Vct, Dperf, VD⟩ refine ⟨D, ⟨Dperf, ?_⟩⟩ constructor · rw [nonempty_iff_ne_empty] by_contra h rw [h, union_empty] at VD rw [VD] at hunc contradiction rw [VD] exact subset_union_right
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot", " Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x", " ∃ V D, V.Countable ∧ Perfect D ∧ C = V ∪ D", " (V ∩ C).Countable", " (⋃ i ∈ v, i ∩ C).Countable", " v.Countable", " ∀ a ∈ v, (a ∩ C).Countable", " I...
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot", " Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x", " ∃ V D, V.Countable ∧ Perfect D ∧ C = V ∪ D", " (V ∩ C).Countable", " (⋃ i ∈ v, i ∩ C).Countable", " v.Countable", " ∀ a ∈ v, (a ∩ C).Countable", " I...
import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm import Mathlib.Analysis.NormedSpace.Span suppress_compilation open Bornology open Filter hiding map_smul open scoped Classical NNReal Topology Uniformity -- the `ₗ` subscript variables are for special...
Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean
114
117
theorem norm_id [Nontrivial E] : ‖id 𝕜 E‖ = 1 := by
refine norm_id_of_nontrivial_seminorm ?_ obtain ⟨x, hx⟩ := exists_ne (0 : E) exact ⟨x, ne_of_gt (norm_pos_iff.2 hx)⟩
[ " ‖f‖ * ‖x‖ = 0", " f = 0 → ‖f‖ = 0", " ‖0‖ = 0", " ‖id 𝕜 E‖ = 1", " ∃ x, ‖x‖ ≠ 0" ]
[ " ‖f‖ * ‖x‖ = 0", " f = 0 → ‖f‖ = 0", " ‖0‖ = 0", " ‖id 𝕜 E‖ = 1" ]
import Mathlib.CategoryTheory.Sites.Subsheaf import Mathlib.CategoryTheory.Sites.CompatibleSheafification import Mathlib.CategoryTheory.Sites.LocallyInjective #align_import category_theory.sites.surjective from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe v u w v' u' w' open ...
Mathlib/CategoryTheory/Sites/LocallySurjective.lean
108
110
theorem isLocallySurjective_iff_imagePresheaf_sheafify_eq_top' {F G : Cᵒᵖ ⥤ Type w} (f : F ⟶ G) : IsLocallySurjective J f ↔ (imagePresheaf f).sheafify J = ⊤ := by
apply isLocallySurjective_iff_imagePresheaf_sheafify_eq_top
[ " ∀ {Y Z : C} {f_1 : Y ⟶ U},\n (fun V i => ∃ t, (f.app { unop := V }) t = (G.map i.op) s) Y f_1 →\n ∀ (g : Z ⟶ Y), (fun V i => ∃ t, (f.app { unop := V }) t = (G.map i.op) s) Z (g ≫ f_1)", " ∃ t, (f.app { unop := W }) t = (G.map (j ≫ i).op) s", " (f.app { unop := W }) ((F.map j.op) t) = (G.map (j ≫ i).op...
[ " ∀ {Y Z : C} {f_1 : Y ⟶ U},\n (fun V i => ∃ t, (f.app { unop := V }) t = (G.map i.op) s) Y f_1 →\n ∀ (g : Z ⟶ Y), (fun V i => ∃ t, (f.app { unop := V }) t = (G.map i.op) s) Z (g ≫ f_1)", " ∃ t, (f.app { unop := W }) t = (G.map (j ≫ i).op) s", " (f.app { unop := W }) ((F.map j.op) t) = (G.map (j ≫ i).op...
import Mathlib.Data.Rat.Sqrt import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Algebraic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.IntervalCases #align_import data.real.irrational from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Rat Real multiplicity def ...
Mathlib/Data/Real/Irrational.lean
38
40
theorem Transcendental.irrational {r : ℝ} (tr : Transcendental ℚ r) : Irrational r := by
rintro ⟨a, rfl⟩ exact tr (isAlgebraic_algebraMap a)
[ " Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b", " Irrational r", " False" ]
[ " Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b", " Irrational r" ]
import Mathlib.CategoryTheory.Sites.Sieves import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Category.Preorder import Mathlib.Order.Copy import Mathlib.Data.Set.Subsingleton #align_import category_theory.sites.grothendieck fr...
Mathlib/CategoryTheory/Sites/Grothendieck.lean
187
187
theorem covering_iff_covers_id (S : Sieve X) : S ∈ J X ↔ J.Covers S (𝟙 X) := by
simp [covers_iff]
[ " J₁ = J₂", " { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂", " { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback...
[ " J₁ = J₂", " { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂", " { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback...
import Mathlib.Order.Filter.Basic #align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Set open Filter namespace Filter variable {α β γ δ : Type*} {ι : Sort*} section Prod variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β} protected ...
Mathlib/Order/Filter/Prod.lean
126
128
theorem prod_sup (f : Filter α) (g₁ g₂ : Filter β) : f ×ˢ (g₁ ⊔ g₂) = (f ×ˢ g₁) ⊔ (f ×ˢ g₂) := by
dsimp only [SProd.sprod] rw [Filter.prod, comap_sup, inf_sup_left, ← Filter.prod, ← Filter.prod]
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lattice import Mathlib.Topology.Order.Lattice import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.constructions.borel_space.basic from "leanprover-c...
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
54
74
theorem borel_eq_generateFrom_Iio : borel α = .generateFrom (range Iio) := by
refine le_antisymm ?_ (generateFrom_le ?_) · rw [borel_eq_generateFrom_of_subbasis (@OrderTopology.topology_eq_generate_intervals α _ _ _)] letI : MeasurableSpace α := MeasurableSpace.generateFrom (range Iio) have H : ∀ a : α, MeasurableSet (Iio a) := fun a => GenerateMeasurable.basic _ ⟨_, rfl⟩ refine...
[ " borel α = MeasurableSpace.generateFrom (range Iio)", " borel α ≤ MeasurableSpace.generateFrom (range Iio)", " MeasurableSpace.generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} ≤ MeasurableSpace.generateFrom (range Iio)", " ∀ t ∈ {s | ∃ a, s = Ioi a ∨ s = Iio a}, MeasurableSet t", " MeasurableSet (Ioi a)", "...
[ " borel α = MeasurableSpace.generateFrom (range Iio)" ]
import Mathlib.Algebra.Module.Equiv import Mathlib.Algebra.Module.Hom import Mathlib.Algebra.Module.Prod import Mathlib.Algebra.Module.Submodule.Range import Mathlib.Data.Set.Finite import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Tactic.Abel #align_import linear_algebra.basic from "leanprover-c...
Mathlib/LinearAlgebra/Basic.lean
73
80
theorem isLinearMap_add [Semiring R] [AddCommMonoid M] [Module R M] : IsLinearMap R fun x : M × M => x.1 + x.2 := by
apply IsLinearMap.mk · intro x y simp only [Prod.fst_add, Prod.snd_add] abel -- Porting Note: was cc · intro x y simp [smul_add]
[ " IsLinearMap R fun x => x.1 + x.2", " ∀ (x y : M × M), (x + y).1 + (x + y).2 = x.1 + x.2 + (y.1 + y.2)", " (x + y).1 + (x + y).2 = x.1 + x.2 + (y.1 + y.2)", " x.1 + y.1 + (x.2 + y.2) = x.1 + x.2 + (y.1 + y.2)", " ∀ (c : R) (x : M × M), (c • x).1 + (c • x).2 = c • (x.1 + x.2)", " (x • y).1 + (x • y).2 = x...
[ " IsLinearMap R fun x => x.1 + x.2" ]
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib.RingTheory.GradedAlgebra.Basic #align_import linear_algebra.exterior_algebra.grading from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0" namespace ExteriorAlgebra variable {R M : Type*} [CommRing R] [AddCommGroup M] [Modu...
Mathlib/LinearAlgebra/ExteriorAlgebra/Grading.lean
52
54
theorem GradedAlgebra.ι_sq_zero (m : M) : GradedAlgebra.ι R M m * GradedAlgebra.ι R M m = 0 := by
rw [GradedAlgebra.ι_apply, DirectSum.of_mul_of] exact DFinsupp.single_eq_zero.mpr (Subtype.ext <| ExteriorAlgebra.ι_sq_zero _)
[ " (ι R) m ∈ ⋀[R]^1 M", " (GradedAlgebra.ι R M) m * (GradedAlgebra.ι R M) m = 0", " (DirectSum.of (fun i => ↥(⋀[R]^i M)) (1 + 1)) (GradedMonoid.GMul.mul ⟨(ι R) m, ⋯⟩ ⟨(ι R) m, ⋯⟩) = 0" ]
[ " (ι R) m ∈ ⋀[R]^1 M", " (GradedAlgebra.ι R M) m * (GradedAlgebra.ι R M) m = 0" ]
import Mathlib.Algebra.Polynomial.Div import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87" set_option linter.uppercaseLean3 false open Polynomial ...
Mathlib/RingTheory/Polynomial/Quotient.lean
212
223
theorem eval₂_C_mk_eq_zero {I : Ideal R} {a : MvPolynomial σ R} (ha : a ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))) : eval₂Hom (C.comp (Ideal.Quotient.mk I)) X a = 0 := by
rw [as_sum a] rw [coe_eval₂Hom, eval₂_sum] refine Finset.sum_eq_zero fun n _ => ?_ simp only [eval₂_monomial, Function.comp_apply, RingHom.coe_comp] refine mul_eq_zero_of_left ?_ _ suffices coeff n a ∈ I by rw [← @Ideal.mk_ker R _ I, RingHom.mem_ker] at this simp only [this, C_0] exact mem_map_C_...
[ " ((Ideal.Quotient.mk (Ideal.map C I)).comp C) i = 0", " C i ∈ Ideal.map C I", " (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) a = 0", " (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) (∑ v ∈ a.support, (monomial v) (coeff v a)) = 0", " ∑ x ∈ a.support, eval₂ (C.comp (Ideal.Quotient.mk I)) X ((monomial x) (coeff ...
[ " ((Ideal.Quotient.mk (Ideal.map C I)).comp C) i = 0", " C i ∈ Ideal.map C I", " (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) a = 0" ]
import Mathlib.Algebra.Group.Commutator import Mathlib.Algebra.Group.Subgroup.Finite import Mathlib.Data.Bracket import Mathlib.GroupTheory.Subgroup.Centralizer import Mathlib.Tactic.Group #align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef" variable...
Mathlib/GroupTheory/Commutator.lean
31
32
theorem commutatorElement_eq_one_iff_mul_comm : ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁ := by
rw [commutatorElement_def, mul_inv_eq_one, mul_inv_eq_iff_eq_mul]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁" ]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁" ]
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
92
92
theorem normalize_lcm : normalize (s.lcm f) = s.lcm f := by
simp [lcm_def]
[ " s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a", " (∀ b ∈ Multiset.map f s.val, b ∣ a) ↔ ∀ b ∈ s, f b ∣ a", " (∀ (b : α), ∀ x ∈ s.val, f x = b → b ∣ a) ↔ ∀ b ∈ s, f b ∣ a", " (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)", " normalize (s.lcm f) = s.lcm f" ]
[ " s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a", " (∀ b ∈ Multiset.map f s.val, b ∣ a) ↔ ∀ b ∈ s, f b ∣ a", " (∀ (b : α), ∀ x ∈ s.val, f x = b → b ∣ a) ↔ ∀ b ∈ s, f b ∣ a", " (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)", " normalize (s.lcm f) = s.lcm f" ]
import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic #align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" noncomputable section open FiniteDimensional Complex open scoped ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
151
151
theorem rotation_pi_apply (x : V) : o.rotation π x = -x := by
simp
[ " ∀ (x y : V),\n ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n ⟪x, y⟫_ℝ", " ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.r...
[ " ∀ (x y : V),\n ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n ⟪x, y⟫_ℝ", " ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.r...
import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" noncomputable section open MvPolynomial Function variable...
Mathlib/RingTheory/WittVector/Basic.lean
73
76
theorem injective (f : α → β) (hf : Injective f) : Injective (mapFun f : 𝕎 α → 𝕎 β) := by
intros _ _ h ext p exact hf (congr_arg (fun x => coeff x p) h : _)
[ " Injective (mapFun f)", " a₁✝ = a₂✝", " a₁✝.coeff p = a₂✝.coeff p" ]
[ " Injective (mapFun f)" ]
import Mathlib.Topology.ContinuousOn #align_import topology.algebra.order.left_right from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Set Filter Topology section PartialOrder variable {α β : Type*} [TopologicalSpace α] [PartialOrder α] [TopologicalSpace β]
Mathlib/Topology/Order/LeftRight.lean
95
97
theorem continuousWithinAt_Ioi_iff_Ici {a : α} {f : α → β} : ContinuousWithinAt f (Ioi a) a ↔ ContinuousWithinAt f (Ici a) a := by
simp only [← Ici_diff_left, continuousWithinAt_diff_self]
[ " ContinuousWithinAt f (Ioi a) a ↔ ContinuousWithinAt f (Ici a) a" ]
[ " ContinuousWithinAt f (Ioi a) a ↔ ContinuousWithinAt f (Ici a) a" ]
import Mathlib.Topology.GDelta #align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a" noncomputable section open scoped Topology open Filter Set TopologicalSpace variable {X α : Type*} {ι : Sort*} section BaireTheorem variable [TopologicalSpace...
Mathlib/Topology/Baire/Lemmas.lean
85
88
theorem eventually_residual {p : X → Prop} : (∀ᶠ x in residual X, p x) ↔ ∃ t : Set X, IsGδ t ∧ Dense t ∧ ∀ x ∈ t, p x := by
simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq] tauto
[ " Dense (⋂₀ S)", " Dense (⋂₀ range f)", " Dense (⋂ s ∈ S, f s)", " Dense (⋂₀ ((fun s => f s) '' S))", " ∀ s ∈ (fun s => f s) '' S, IsOpen s", " ∀ s ∈ (fun s => f s) '' S, Dense s", " s ∈ residual X ↔ ∃ t ⊆ s, IsGδ t ∧ Dense t", " s ∈ residual X → ∃ t ⊆ s, IsGδ t ∧ Dense t", " (∃ S, (∀ t ∈ S, IsOpen ...
[ " Dense (⋂₀ S)", " Dense (⋂₀ range f)", " Dense (⋂ s ∈ S, f s)", " Dense (⋂₀ ((fun s => f s) '' S))", " ∀ s ∈ (fun s => f s) '' S, IsOpen s", " ∀ s ∈ (fun s => f s) '' S, Dense s", " s ∈ residual X ↔ ∃ t ⊆ s, IsGδ t ∧ Dense t", " s ∈ residual X → ∃ t ⊆ s, IsGδ t ∧ Dense t", " (∃ S, (∀ t ∈ S, IsOpen ...
import Mathlib.RingTheory.Noetherian import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.DirectSum.Finsupp import Mathlib.Algebra.Module.Projective import Mathlib.Algebra.Module.Injective import Mathlib.Algebra.Module.CharacterModule import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Linear...
Mathlib/RingTheory/Flat/Basic.lean
117
119
theorem iff_lTensor_injective' : Module.Flat R M ↔ ∀ (I : Ideal R), Function.Injective (lTensor M I.subtype) := by
simpa [← comm_comp_rTensor_comp_comm_eq] using Module.Flat.iff_rTensor_injective' R M
[ " ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I))", " Function.Injective ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I))", " Function.Injective (⇑(lift (lsmul R R ∘ₗ Submodule.subtype I)) ∘ ⇑(TensorProduct.rid R ↥I).symm.toEquiv)", " ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I)) ...
[ " ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I))", " Function.Injective ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I))", " Function.Injective (⇑(lift (lsmul R R ∘ₗ Submodule.subtype I)) ∘ ⇑(TensorProduct.rid R ↥I).symm.toEquiv)", " ⇑(lift (lsmul R R ∘ₗ Submodule.subtype I)) ...
import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Cases import Mathlib.Algebra.NeZero import Mathlib.Logic.Function.Basic #align_import algebra.char_zero.defs from "leanprover-community/mathlib"@"d6aae1bcbd04b8de2022b9b83a5b5b10e10c777d" class CharZero (R) [AddMonoidWithOne R] : Prop where cast_injecti...
Mathlib/Algebra/CharZero/Defs.lean
92
92
theorem cast_eq_one {n : ℕ} : (n : R) = 1 ↔ n = 1 := by
rw [← cast_one, cast_inj]
[ " m = n", " 0 = n", " ↑n = 0", " m + 1 = n", " m + 1 = 0", " ↑(m + 1) = 0", " m + 1 = n + 1", " ↑n = 0 ↔ n = 0", " ↑n = 1 ↔ n = 1" ]
[ " m = n", " 0 = n", " ↑n = 0", " m + 1 = n", " m + 1 = 0", " ↑(m + 1) = 0", " m + 1 = n + 1", " ↑n = 0 ↔ n = 0", " ↑n = 1 ↔ n = 1" ]
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.HasLimits #align_import category_theory.limits.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" section open CategoryTheory Opposite namespace CategoryTheory.Limits -- attribute [local tid...
Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
126
127
theorem WalkingParallelPairHom.id.sizeOf_spec' (X : WalkingParallelPair) : (WalkingParallelPairHom._sizeOf_inst X X).sizeOf (𝟙 X) = 1 + sizeOf X := by
cases X <;> rfl
[ " f.comp (id Y) = f", " left.comp (id one) = left", " right.comp (id one) = right", " (id X).comp (id X) = id X", " (f.comp g).comp h = f.comp (g.comp h)", " (left.comp g).comp h = left.comp (g.comp h)", " (right.comp g).comp h = right.comp (g.comp h)", " ((id X).comp g).comp h = (id X).comp (g.comp h...
[ " f.comp (id Y) = f", " left.comp (id one) = left", " right.comp (id one) = right", " (id X).comp (id X) = id X", " (f.comp g).comp h = f.comp (g.comp h)", " (left.comp g).comp h = left.comp (g.comp h)", " (right.comp g).comp h = right.comp (g.comp h)", " ((id X).comp g).comp h = (id X).comp (g.comp h...
import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic #align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904" open Function OrderDual variable {ι α β : Type*} {π : ι → Type*} def symmDiff [Sup α] [SDiff α] (a b : α) : α := a \ b ⊔ b \ a #ali...
Mathlib/Order/SymmDiff.lean
375
375
theorem bot_bihimp : ⊥ ⇔ a = aᶜ := by
simp [bihimp]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ⇔ ⊥ = aᶜ", " ⊥ ⇔ a = aᶜ" ]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ⇔ ⊥ = aᶜ", " ⊥ ⇔ a = aᶜ" ]
import Mathlib.Probability.IdentDistrib import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.Analysis.SpecificLimits.FloorPow import Mathlib.Analysis.PSeries import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce60867...
Mathlib/Probability/StrongLaw.lean
82
85
theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f μ) {A : ℝ} : AEStronglyMeasurable (truncation f A) μ := by
apply AEStronglyMeasurable.comp_aemeasurable _ hf.aemeasurable exact (stronglyMeasurable_id.indicator measurableSet_Ioc).aestronglyMeasurable
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ", " AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)" ]
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ" ]
import Mathlib.Algebra.Group.Opposite import Mathlib.Algebra.Group.Units.Hom #align_import algebra.group.prod from "leanprover-community/mathlib"@"cd391184c85986113f8c00844cfe6dda1d34be3d" assert_not_exists MonoidWithZero -- TODO: -- assert_not_exists AddMonoidWithOne assert_not_exists DenselyOrdered variable {A ...
Mathlib/Algebra/Group/Prod.lean
79
81
theorem one_mk_mul_one_mk [Monoid M] [Mul N] (b₁ b₂ : N) : ((1 : M), b₁) * (1, b₂) = (1, b₁ * b₂) := by
rw [mk_mul_mk, mul_one]
[ " (1, b₁) * (1, b₂) = (1, b₁ * b₂)" ]
[ " (1, b₁) * (1, b₂) = (1, b₁ * b₂)" ]
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
456
463
theorem measurableSet_regionBetween (hf : Measurable f) (hg : Measurable g) (hs : MeasurableSet s) : MeasurableSet (regionBetween f g s) := by
dsimp only [regionBetween, Ioo, mem_setOf_eq, setOf_and] refine MeasurableSet.inter ?_ ((measurableSet_lt (hf.comp measurable_fst) measurable_snd).inter (measurableSet_lt measurable_snd (hg.comp measurable_fst))) exact measurable_fst hs
[ " regionBetween f g s ⊆ s ×ˢ univ", " MeasurableSet (regionBetween f g s)", " MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 < g a.1}})", " MeasurableSet {a | a.1 ∈ s}" ]
[ " regionBetween f g s ⊆ s ×ˢ univ", " MeasurableSet (regionBetween f g s)" ]
import Mathlib.Algebra.CharP.ExpChar import Mathlib.RingTheory.Nilpotent.Defs #align_import algebra.char_p.basic from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47" open Finset section variable (R : Type*) [CommRing R] [IsReduced R] (p n : ℕ) [ExpChar R p] theorem iterateFrobenius_in...
Mathlib/Algebra/CharP/Reduced.lean
46
50
theorem ExpChar.pow_prime_pow_mul_eq_one_iff (p k m : ℕ) [ExpChar R p] (x : R) : x ^ (p ^ k * m) = 1 ↔ x ^ m = 1 := by
rw [pow_mul'] convert ← (iterateFrobenius_inj R p k).eq_iff apply map_one
[ " x = y", " x - y = 0", " IsSquare a", " x ^ (p ^ k * m) = 1 ↔ x ^ m = 1", " (x ^ m) ^ p ^ k = 1 ↔ x ^ m = 1", " (iterateFrobenius R p k) 1 = 1" ]
[ " x = y", " x - y = 0", " IsSquare a", " x ^ (p ^ k * m) = 1 ↔ x ^ m = 1" ]
import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {α : Type*} namespace WithTop @[simp] theorem preimage_coe_top : (some : α → WithTop α) ⁻¹' {⊤} =...
Mathlib/Order/Interval/Set/WithBotTop.lean
85
86
theorem preimage_coe_Ioo_top : (some : α → WithTop α) ⁻¹' Ioo a ⊤ = Ioi a := by
simp [← Ioi_inter_Iio]
[ " range some = Iio ⊤", " x ∈ range some ↔ x ∈ Iio ⊤", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊤ = univ", " some ⁻¹' Ico ↑a ⊤ = Ici a", " some ⁻¹' Ioo ↑a ⊤ = Ioi a" ]
[ " range some = Iio ⊤", " x ∈ range some ↔ x ∈ Iio ⊤", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊤ = univ", " some ⁻¹' Ico ↑a ⊤ = Ici a", " some ⁻¹' Ioo ↑a ⊤ = Ioi a" ]
import Mathlib.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Order.Zorn import Mathlib.Data.Finset.Order import Mathlib.Order.Interval.Set.OrderIso import Mathlib.Data.Finite.Set import Mathlib.Tactic.TFAE #alig...
Mathlib/Order/CompactlyGenerated/Basic.lean
152
169
theorem IsCompactElement.exists_finset_of_le_iSup {k : α} (hk : IsCompactElement k) {ι : Type*} (f : ι → α) (h : k ≤ ⨆ i, f i) : ∃ s : Finset ι, k ≤ ⨆ i ∈ s, f i := by
classical let g : Finset ι → α := fun s => ⨆ i ∈ s, f i have h1 : DirectedOn (· ≤ ·) (Set.range g) := by rintro - ⟨s, rfl⟩ - ⟨t, rfl⟩ exact ⟨g (s ∪ t), ⟨s ∪ t, rfl⟩, iSup_le_iSup_of_subset Finset.subset_union_left, iSup_le_iSup_of_subset Finset.subset_union_right⟩ have h2 : ...
[ " IsCompactElement k ↔ ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s", " IsCompactElement k → ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s", " ∃ t, k ≤ t.sup s", " t.sup id ≤ (Finset.image f Finset.univ).sup s", " ∀ b ∈ t, id b ≤ (Finset.image f Finset.univ).sup s", " id b ≤ (Fins...
[ " IsCompactElement k ↔ ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s", " IsCompactElement k → ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s", " ∃ t, k ≤ t.sup s", " t.sup id ≤ (Finset.image f Finset.univ).sup s", " ∀ b ∈ t, id b ≤ (Finset.image f Finset.univ).sup s", " id b ≤ (Fins...
import Mathlib.Topology.MetricSpace.PseudoMetric #align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" open Set Filter Bornology open scoped NNReal Uniformity universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricS...
Mathlib/Topology/MetricSpace/Basic.lean
121
126
theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
rcases hr.lt_or_eq with (hr | rfl) · rw [closedBall_eq_empty.2 hr] exact subsingleton_empty · rw [closedBall_zero] exact subsingleton_singleton
[ " m = m'", " mk eq_of_dist_eq_zero✝ = m'", " mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝", " toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝", " PseudoMetricSpace.toDist = PseudoMetricSpace.toDist", " 0 = dist x y ↔ x = y", " dist x y ≠ 0 ↔ x ≠ y", " dist x y ≤ 0 ↔ x = y", " 0 < dist x y ↔ x ≠ y",...
[ " m = m'", " mk eq_of_dist_eq_zero✝ = m'", " mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝", " toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝", " PseudoMetricSpace.toDist = PseudoMetricSpace.toDist", " 0 = dist x y ↔ x = y", " dist x y ≠ 0 ↔ x ≠ y", " dist x y ≤ 0 ↔ x = y", " 0 < dist x y ↔ x ≠ y",...
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Complex.Arg #align_import analysis.complex.arg from "leanprover-community/mathlib"@"45a46f4f03f8ae41491bf3605e8e0e363ba192fd" variable {x y : ℂ} namespace Complex
Mathlib/Analysis/Complex/Arg.lean
31
38
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
rcases eq_or_ne x 0 with (rfl | hx) · simp rcases eq_or_ne y 0 with (rfl | hy) · simp simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy] field_simp [hx, hy] rw [mul_comm, eq_comm]
[ " SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg", " SameRay ℝ 0 y ↔ 0 = 0 ∨ y = 0 ∨ arg 0 = y.arg", " SameRay ℝ x 0 ↔ x = 0 ∨ 0 = 0 ∨ x.arg = arg 0", " ‖x‖ • y = ‖y‖ • x ↔ ↑(abs y) / ↑(abs x) * x = y", " ↑(abs x) * y = ↑(abs y) * x ↔ ↑(abs y) * x = y * ↑(abs x)" ]
[ " SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg" ]
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
231
235
theorem cylinder_eq_cylinder_union [DecidableEq ι] (I : Finset ι) (S : Set (∀ i : I, α i)) (J : Finset ι) : cylinder I S = cylinder (I ∪ J) ((fun f ↦ fun j : I ↦ f ⟨j, Finset.mem_union_left J j.prop⟩) ⁻¹' S) := by
ext1 f; simp only [mem_cylinder, mem_preimage]
[ " 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.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
71
76
theorem le_sum_schlomilch (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n) (hu : Monotone u) (n : ℕ) : (∑ k ∈ range (u n), f k) ≤ ∑ k ∈ range (u 0), f k + ∑ k ∈ range n, (u (k + 1) - u k) • f (u k) := by
convert add_le_add_left (le_sum_schlomilch' hf h_pos hu n) (∑ k ∈ range (u 0), f k) rw [← sum_range_add_sum_Ico _ (hu n.zero_le)]
[ " ∑ 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.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
843
846
theorem compositionAsSet_card (n : ℕ) : Fintype.card (CompositionAsSet n) = 2 ^ (n - 1) := by
have : Fintype.card (Finset (Fin (n - 1))) = 2 ^ (n - 1) := by simp rw [← this] exact Fintype.card_congr (compositionAsSetEquiv n)
[ " 1 + ↑i < n.succ", " 1 + (n - 1) ≤ n.succ", " n - 1 + 1 ≤ n + 1", " 0 ∈ {i | i = 0 ∨ i = Fin.last n ∨ ∃ j, ∃ (_ : j ∈ s), ↑i = ↑j + 1}.toFinset", " Fin.last n ∈ {i | i = 0 ∨ i = Fin.last n ∨ ∃ j, ∃ (_ : j ∈ s), ↑i = ↑j + 1}.toFinset", " Function.LeftInverse\n (fun s =>\n { boundaries := {i | i = ...
[ " 1 + ↑i < n.succ", " 1 + (n - 1) ≤ n.succ", " n - 1 + 1 ≤ n + 1", " 0 ∈ {i | i = 0 ∨ i = Fin.last n ∨ ∃ j, ∃ (_ : j ∈ s), ↑i = ↑j + 1}.toFinset", " Fin.last n ∈ {i | i = 0 ∨ i = Fin.last n ∨ ∃ j, ∃ (_ : j ∈ s), ↑i = ↑j + 1}.toFinset", " Function.LeftInverse\n (fun s =>\n { boundaries := {i | i = ...
import Mathlib.Order.Cover import Mathlib.Order.LatticeIntervals import Mathlib.Order.GaloisConnection #align_import order.modular_lattice from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Set variable {α : Type*} class IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop ...
Mathlib/Order/ModularLattice.lean
103
105
theorem covBy_sup_of_inf_covBy_of_inf_covBy_right : a ⊓ b ⋖ a → a ⊓ b ⋖ b → b ⋖ a ⊔ b := by
rw [inf_comm, sup_comm] exact fun ha hb => covBy_sup_of_inf_covBy_of_inf_covBy_left hb ha
[ " a ⊓ b ⋖ a → a ⊓ b ⋖ b → b ⋖ a ⊔ b", " b ⊓ a ⋖ a → b ⊓ a ⋖ b → b ⋖ b ⊔ a" ]
[ " a ⊓ b ⋖ a → a ⊓ b ⋖ b → b ⋖ a ⊔ b" ]
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
127
131
theorem DifferentiableWithinAt.hasGradientWithinAt (h : DifferentiableWithinAt 𝕜 f s x) : HasGradientWithinAt f (gradientWithin f s x) s x := by
rw [hasGradientWithinAt_iff_hasFDerivWithinAt, gradientWithin, (toDual 𝕜 F).apply_symm_apply (fderivWithin 𝕜 f s x)] exact h.hasFDerivWithinAt
[ " 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.Algebra.FreeNonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.UniversalEnveloping import Mathlib.GroupTheory.GroupAction.Ring #align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4" universe ...
Mathlib/Algebra/Lie/Free.lean
91
92
theorem Rel.neg {a b : lib R X} (h : Rel R X a b) : Rel R X (-a) (-b) := by
simpa only [neg_one_smul] using h.smul (-1)
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)" ]
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)" ]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Denumerable import Mathlib.Data.Set.Pointwise.Interval import Mathlib.SetTheory.Cardinal.Continuum #align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Nat Set open Cardinal no...
Mathlib/Data/Real/Cardinality.lean
105
110
theorem cantorFunction_le (h1 : 0 ≤ c) (h2 : c < 1) (h3 : ∀ n, f n → g n) : cantorFunction c f ≤ cantorFunction c g := by
apply tsum_le_tsum _ (summable_cantor_function f h1 h2) (summable_cantor_function g h1 h2) intro n; cases h : f n · simp [h, cantorFunctionAux_nonneg h1] replace h3 : g n = true := h3 n h; simp [h, h3]
[ " cantorFunctionAux c f n = c ^ n", " cantorFunctionAux c f n = 0", " 0 ≤ cantorFunctionAux c f n", " 0 ≤ c ^ n", " cantorFunctionAux c f n = cantorFunctionAux c g n", " cantorFunctionAux c f 0 = bif f 0 then 1 else 0", " cantorFunctionAux c f 0 = bif false then 1 else 0", " cantorFunctionAux c f 0 = ...
[ " cantorFunctionAux c f n = c ^ n", " cantorFunctionAux c f n = 0", " 0 ≤ cantorFunctionAux c f n", " 0 ≤ c ^ n", " cantorFunctionAux c f n = cantorFunctionAux c g n", " cantorFunctionAux c f 0 = bif f 0 then 1 else 0", " cantorFunctionAux c f 0 = bif false then 1 else 0", " cantorFunctionAux c f 0 = ...
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Group.Int import Mathlib.Data.Nat.Dist import Mathlib.Data.Ordmap.Ordnode import Mathlib.Tactic.Abel import Mathlib.Tactic.Linarith #align_import data.ordmap.ordset from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69" variable...
Mathlib/Data/Ordmap/Ordset.lean
196
197
theorem balancedSz_zero {l : ℕ} : BalancedSz l 0 ↔ l ≤ 1 := by
simp (config := { contextual := true }) [BalancedSz]
[ " 0 < delta", " a ≤ delta * (delta * a)", " 1 ≤ delta * delta", " node s l x r = l.node' x r", " C t", " C nil", " C (node size✝ l✝ x✝ r✝)", " C (l✝.node' x✝ r✝)", " (node s l x r).size = (node s l x r).realSize", " (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s...
[ " 0 < delta", " a ≤ delta * (delta * a)", " 1 ≤ delta * delta", " node s l x r = l.node' x r", " C t", " C nil", " C (node size✝ l✝ x✝ r✝)", " C (l✝.node' x✝ r✝)", " (node s l x r).size = (node s l x r).realSize", " (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s...
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
84
84
theorem volume_Icc {a b : ℝ} : volume (Icc a b) = ofReal (b - a) := by
simp [volume_val]
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Algebra.Opposites import Mathlib.Algebra.Ring.Defs #align_import algebra.ring.basic from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c" variable {R : Type*}...
Mathlib/Algebra/Ring/Basic.lean
130
134
theorem vieta_formula_quadratic {b c x : α} (h : x * x - b * x + c = 0) : ∃ y : α, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c := by
have : c = x * (b - x) := (eq_neg_of_add_eq_zero_right h).trans (by simp [mul_sub, mul_comm]) refine ⟨b - x, ?_, by simp, by rw [this]⟩ rw [this, sub_add, ← sub_mul, sub_self]
[ " ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c", " -(x * x - b * x) = x * (b - x)", " x + (b - x) = b", " x * (b - x) = c", " (b - x) * (b - x) - b * (b - x) + c = 0" ]
[ " ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c" ]
import Mathlib.Data.Finsupp.Encodable import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Span import Mathlib.Data.Set.Countable #align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" noncomputable section open Set LinearMap Submodule namespa...
Mathlib/LinearAlgebra/Finsupp.lean
63
69
theorem sum_smul_index_linearMap' [Semiring R] [AddCommMonoid M] [Module R M] [AddCommMonoid M₂] [Module R M₂] {v : α →₀ M} {c : R} {h : α → M →ₗ[R] M₂} : ((c • v).sum fun a => h a) = c • v.sum fun a => h a := by
rw [Finsupp.sum_smul_index', Finsupp.smul_sum] · simp only [map_smul] · intro i exact (h i).map_zero
[ " ((c • v).sum fun a => ⇑(h a)) = c • v.sum fun a => ⇑(h a)", " (v.sum fun i c_1 => (h i) (c • c_1)) = v.sum fun a b => c • (h a) b", " ∀ (i : α), (h i) 0 = 0", " (h i) 0 = 0" ]
[ " ((c • v).sum fun a => ⇑(h a)) = c • v.sum fun a => ⇑(h a)" ]
import Mathlib.CategoryTheory.Sites.Sheaf #align_import category_theory.sites.plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace CategoryTheory.GrothendieckTopology open CategoryTheory open CategoryTheory.Limits open Opposite universe w v u variable {C : Type u} [Ca...
Mathlib/CategoryTheory/Sites/Plus.lean
90
95
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) : J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X := by
ext : 2 refine Multiequalizer.hom_ext _ _ _ (fun i => ?_) dsimp simp
[ " ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n...
[ " ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n...
import Mathlib.Probability.ProbabilityMassFunction.Monad #align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" universe u namespace PMF noncomputable section variable {α β γ : Type*} open scoped Classical open NNReal ENN...
Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
52
52
theorem map_apply : (map f p) b = ∑' a, if b = f a then p a else 0 := by
simp [map]
[ " (map f p) b = ∑' (a : α), if b = f a then p a else 0" ]
[ " (map f p) b = ∑' (a : α), if b = f a then p a else 0" ]
import Mathlib.Control.EquivFunctor import Mathlib.Data.Option.Basic import Mathlib.Data.Subtype import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Cases #align_import logic.equiv.option from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u namespace Equiv open Option vari...
Mathlib/Logic/Equiv/Option.lean
89
91
theorem removeNone_aux_some {x : α} (h : ∃ x', e (some x) = some x') : some (removeNone_aux e x) = e (some x) := by
simp [removeNone_aux, Option.isSome_iff_exists.mpr h]
[ " (e none).isSome = true", " e none ≠ none", " False", " some (e.removeNone_aux x) = e (some x)" ]
[ " (e none).isSome = true", " e none ≠ none", " False", " some (e.removeNone_aux x) = e (some x)" ]
import Mathlib.LinearAlgebra.LinearPMap import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.module.linear_pmap from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Topology variable {R E F : Type*} variable [CommRing R] [AddCommGroup E] [AddCommGroup F] vari...
Mathlib/Topology/Algebra/Module/LinearPMap.lean
136
138
theorem IsClosable.closure_isClosed {f : E →ₗ.[R] F} (hf : f.IsClosable) : f.closure.IsClosed := by
rw [IsClosed, ← hf.graph_closure_eq_closure_graph] exact f.graph.isClosed_topologicalClosure
[ " g.IsClosable", " g.graph.topologicalClosure ≤ f'.graph", " g.graph.topologicalClosure ≤ f.graph.topologicalClosure", " g.graph.topologicalClosure = g.graph.topologicalClosure.toLinearPMap.graph", " ∀ x ∈ g.graph.topologicalClosure, x.1 = 0 → x.2 = 0", " ∃! f', f.graph.topologicalClosure = f'.graph", "...
[ " g.IsClosable", " g.graph.topologicalClosure ≤ f'.graph", " g.graph.topologicalClosure ≤ f.graph.topologicalClosure", " g.graph.topologicalClosure = g.graph.topologicalClosure.toLinearPMap.graph", " ∀ x ∈ g.graph.topologicalClosure, x.1 = 0 → x.2 = 0", " ∃! f', f.graph.topologicalClosure = f'.graph", "...
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Normed.Field.InfiniteSum import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Finset.NoncommProd import Mathlib.Topology.Algebra.Algebra #align_import analysis.normed_space.exponential from "leanprover-community/ma...
Mathlib/Analysis/NormedSpace/Exponential.lean
150
151
theorem exp_op [T2Space 𝔸] (x : 𝔸) : exp 𝕂 (MulOpposite.op x) = MulOpposite.op (exp 𝕂 x) := by
simp_rw [exp, expSeries_sum_eq, ← MulOpposite.op_pow, ← MulOpposite.op_smul, tsum_op]
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ • 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ • 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ • 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1", " exp 𝕂 (MulOpposite.op x) = MulOpposite...
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ • 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ • 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ • 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1", " exp 𝕂 (MulOpposite.op x) = MulOpposite...
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Binary variable (xs : Vector α n) (ys : Vector β n) @[simp] theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) : (mapAccumr₂ f₁ (mapAccumr f₂...
Mathlib/Data/Vector/MapLemmas.lean
133
142
theorem mapAccumr₂_mapAccumr₂_right_left (f₁ : α → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) : (mapAccumr₂ f₁ xs (mapAccumr₂ f₂ xs ys s₂).snd s₁) = let m := mapAccumr₂ (fun x y (s₁, s₂) => let r₂ := f₂ x y s₂ let r₁ := f₁ x r₂.snd s₁ ((r₁.fst, r₂.fst), r₁.snd) ...
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
[ " mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)", " mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ...
[ " mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)", " mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ...
import Mathlib.Topology.Category.TopCat.Adjunctions #align_import topology.category.Top.epi_mono from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u open CategoryTheory open TopCat namespace TopCat
Mathlib/Topology/Category/TopCat/EpiMono.lean
27
34
theorem epi_iff_surjective {X Y : TopCat.{u}} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f := by
suffices Epi f ↔ Epi ((forget TopCat).map f) by rw [this, CategoryTheory.epi_iff_surjective] rfl constructor · intro infer_instance · apply Functor.epi_of_epi_map
[ " Epi f ↔ Function.Surjective ⇑f", " Function.Surjective ((forget TopCat).map f) ↔ Function.Surjective ⇑f", " Epi f ↔ Epi ((forget TopCat).map f)", " Epi f → Epi ((forget TopCat).map f)", " Epi ((forget TopCat).map f)", " Epi ((forget TopCat).map f) → Epi f" ]
[ " Epi f ↔ Function.Surjective ⇑f" ]
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {α : Type u} {β : Type v} {ι : Type*} {π : ι → Type*} [TopologicalSpace α] {s t u v : Set α} section LocallyConnectedSpace class LocallyConnectedSpace (α : Type*) [TopologicalSpace α] : Prop where open_connected_basis : ∀ x,...
Mathlib/Topology/Connected/LocallyConnected.lean
104
115
theorem locallyConnectedSpace_iff_connected_subsets : LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ∈ 𝓝 x, IsPreconnected V ∧ V ⊆ U := by
constructor · rw [locallyConnectedSpace_iff_open_connected_subsets] intro h x U hxU rcases h x U hxU with ⟨V, hVU, hV₁, hxV, hV₂⟩ exact ⟨V, hV₁.mem_nhds hxV, hV₂.isPreconnected, hVU⟩ · rw [locallyConnectedSpace_iff_connectedComponentIn_open] refine fun h U hU x _ => isOpen_iff_mem_nhds.mpr fun y ...
[ " LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V", " (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V", " (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i...
[ " LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V", " (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V", " (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Function.LocallyIntegrable import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Group.Prod import Mathlib.Measure...
Mathlib/Analysis/Convolution.lean
239
246
theorem ConvolutionExistsAt.ofNorm' {x₀ : G} (h : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ) μ) (hmf : AEStronglyMeasurable f μ) (hmg : AEStronglyMeasurable g <| map (fun t => x₀ - t) μ) : ConvolutionExistsAt f g x₀ L μ := by
refine (h.const_mul ‖L‖).mono' (hmf.convolution_integrand_snd' L hmg) (eventually_of_forall fun x => ?_) rw [mul_apply', ← mul_assoc] apply L.le_opNorm₂
[ " ConvolutionExistsAt f g x₀ L μ", " Integrable (fun t => (L (f t)) (g (x₀ - t))) μ", " IntegrableOn (fun t => (L (f t)) (g (x₀ - t))) s μ", " ∀ᵐ (t : G) ∂μ.restrict s, ‖(L (f t)) (g (x₀ - t))‖ ≤ s.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g ↑i‖) t", " ∀ (a : G), ‖(L (f a)) (g (x₀ - a))‖ ≤ s.indicator (fun t ...
[ " ConvolutionExistsAt f g x₀ L μ", " Integrable (fun t => (L (f t)) (g (x₀ - t))) μ", " IntegrableOn (fun t => (L (f t)) (g (x₀ - t))) s μ", " ∀ᵐ (t : G) ∂μ.restrict s, ‖(L (f t)) (g (x₀ - t))‖ ≤ s.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g ↑i‖) t", " ∀ (a : G), ‖(L (f a)) (g (x₀ - a))‖ ≤ s.indicator (fun t ...
import Mathlib.Analysis.NormedSpace.ConformalLinearMap import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.conformal.normed_space from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" noncomputable section variable {X Y Z : Type*} [NormedAddCommGroup X] [NormedAdd...
Mathlib/Analysis/Calculus/Conformal/NormedSpace.lean
98
102
theorem comp {f : X → Y} {g : Y → Z} (x : X) (hg : ConformalAt g (f x)) (hf : ConformalAt f x) : ConformalAt (g ∘ f) x := by
rcases hf with ⟨f', hf₁, cf⟩ rcases hg with ⟨g', hg₁, cg⟩ exact ⟨g'.comp f', hg₁.comp x hf₁, cg.comp cf⟩
[ " ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x)", " ConformalAt f x → IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x) → ConformalAt f x", " ConformalAt f x", " ConformalAt (g ∘ f) x" ]
[ " ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x)", " ConformalAt f x → IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x) → ConformalAt f x", " ConformalAt f x", " ConformalAt (g ∘ f) x" ]
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Topology.Algebra.InfiniteSum.Order import Mathlib.Topology.Instances.Real import Mathlib.Topology.Instances.ENNReal #align_import topology.algebra.infinite_sum.real from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filte...
Mathlib/Topology/Algebra/InfiniteSum/Real.lean
60
62
theorem dist_le_tsum_dist_of_tendsto₀ (h : Summable fun n ↦ dist (f n) (f n.succ)) (ha : Tendsto f atTop (𝓝 a)) : dist (f 0) a ≤ ∑' n, dist (f n) (f n.succ) := by
simpa only [zero_add] using dist_le_tsum_dist_of_tendsto h ha 0
[ " CauchySeq f", " ∀ (n : ℕ), edist (f n) (f n.succ) ≤ ↑(d n)", " Summable d", " dist (f n) a ≤ ∑' (m : ℕ), d (n + m)", " dist (f n) (f m) ≤ ∑' (m : ℕ), d (n + m)", " ∑ i ∈ Ico n m, d i ≤ ∑' (m : ℕ), d (n + m)", " ∑ k ∈ range (m - n), d (n + k) ≤ ∑' (m : ℕ), d (n + m)", " Summable fun k => d (n + k)", ...
[ " CauchySeq f", " ∀ (n : ℕ), edist (f n) (f n.succ) ≤ ↑(d n)", " Summable d", " dist (f n) a ≤ ∑' (m : ℕ), d (n + m)", " dist (f n) (f m) ≤ ∑' (m : ℕ), d (n + m)", " ∑ i ∈ Ico n m, d i ≤ ∑' (m : ℕ), d (n + m)", " ∑ k ∈ range (m - n), d (n + k) ≤ ∑' (m : ℕ), d (n + m)", " Summable fun k => d (n + k)", ...
import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Quotient import Mathlib.Combinatorics.Quiver.Path #align_import category_theory.path_category from "leanprover-community/mathlib"@"c6dd521ebdce53bb372c527569dd7c25de53a08b" universe v₁ v₂ u₁ u₂ namespace CategoryTheory section def Paths (V : ...
Mathlib/CategoryTheory/PathCategory.lean
93
100
theorem lift_spec {C} [Category C] (φ : V ⥤q C) : of ⋙q (lift φ).toPrefunctor = φ := by
fapply Prefunctor.ext · rintro X rfl · rintro X Y f rcases φ with ⟨φo, φm⟩ dsimp [lift, Quiver.Hom.toPath] simp only [Category.id_comp]
[ " { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec...
[ " { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec...
import Mathlib.Combinatorics.SimpleGraph.Subgraph import Mathlib.Data.List.Rotate #align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4" open Function universe u v w namespace SimpleGraph variable {V : Type u} {V' : Type v} {V'' : Typ...
Mathlib/Combinatorics/SimpleGraph/Connectivity.lean
133
137
theorem copy_copy {u v u' v' u'' v''} (p : G.Walk u v) (hu : u = u') (hv : v = v') (hu' : u' = u'') (hv' : v' = v'') : (p.copy hu hv).copy hu' hv' = p.copy (hu.trans hu') (hv.trans hv') := by
subst_vars rfl
[ " (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯", " (p.copy ⋯ ⋯).copy ⋯ ⋯ = p.copy ⋯ ⋯" ]
[ " (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯" ]
import Mathlib.CategoryTheory.Iso import Mathlib.CategoryTheory.EssentialImage import Mathlib.CategoryTheory.Types import Mathlib.CategoryTheory.Opposites import Mathlib.Data.Rel #align_import category_theory.category.Rel from "leanprover-community/mathlib"@"afad8e438d03f9d89da2914aa06cb4964ba87a18" namespace Cate...
Mathlib/CategoryTheory/Category/RelCat.lean
62
63
theorem rel_id_apply₂ (X : RelCat) (x y : X) : (𝟙 X) x y ↔ x = y := by
rw [RelCat.Hom.rel_id]
[ " Inhabited RelCat", " Inhabited (Type ?u.6)", " 𝟙 X x y ↔ x = y" ]
[ " Inhabited RelCat", " Inhabited (Type ?u.6)", " 𝟙 X x y ↔ x = y" ]
import Mathlib.Algebra.Group.Support import Mathlib.Algebra.Order.Monoid.WithTop import Mathlib.Data.Nat.Cast.Field #align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" open Function Set section AddMonoidWithOne variable {α M : Type*} [AddMonoidWith...
Mathlib/Algebra/CharZero/Lemmas.lean
100
102
theorem zero_eq_bit0 {a : R} : 0 = bit0 a ↔ a = 0 := by
rw [eq_comm] exact bit0_eq_zero
[ " 2 ≠ 0", " a + a = 0 ↔ a = 0", " 0 = bit0 a ↔ a = 0", " bit0 a = 0 ↔ a = 0" ]
[ " 2 ≠ 0", " a + a = 0 ↔ a = 0", " 0 = bit0 a ↔ a = 0" ]
import Batteries.Data.List.Basic import Batteries.Data.List.Lemmas open Nat namespace List section countP variable (p q : α → Bool) @[simp] theorem countP_nil : countP p [] = 0 := rfl protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by induction l generalizing n with | nil...
.lake/packages/batteries/Batteries/Data/List/Count.lean
78
79
theorem countP_eq_zero : countP p l = 0 ↔ ∀ a ∈ l, ¬p a := by
simp only [countP_eq_length_filter, length_eq_zero, filter_eq_nil]
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
import Mathlib.Algebra.Category.GroupCat.Colimits import Mathlib.Algebra.Category.GroupCat.FilteredColimits import Mathlib.Algebra.Category.GroupCat.Kernels import Mathlib.Algebra.Category.GroupCat.Limits import Mathlib.Algebra.Category.GroupCat.ZModuleEquivalence import Mathlib.Algebra.Category.ModuleCat.Abelian impo...
Mathlib/Algebra/Category/GroupCat/Abelian.lean
51
57
theorem exact_iff : Exact f g ↔ f.range = g.ker := by
rw [Abelian.exact_iff' f g (kernelIsLimit _) (cokernelIsColimit _)] exact ⟨fun h => ((AddMonoidHom.range_le_ker_iff _ _).mpr h.left).antisymm ((QuotientAddGroup.ker_le_range_iff _ _).mpr h.right), fun h => ⟨(AddMonoidHom.range_le_ker_iff _ _).mp h.le, (QuotientAddGroup.ker_le_range_iff ...
[ " Exact f g ↔ AddMonoidHom.range f = AddMonoidHom.ker g", " f ≫ g = 0 ∧ Fork.ι (kernelCone g) ≫ Cofork.π (cokernelCocone f) = 0 ↔ AddMonoidHom.range f = AddMonoidHom.ker g" ]
[ " Exact f g ↔ AddMonoidHom.range f = AddMonoidHom.ker g" ]
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
218
220
theorem sizeUpTo_le (i : ℕ) : c.sizeUpTo i ≤ n := by
conv_rhs => rw [← c.blocks_sum, ← sum_take_add_sum_drop _ i] exact Nat.le_add_right _ _
[ " ∑ 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.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Polynomial.Module.AEval import Mathlib.RingTheory.Derivation.Basic noncomputable section namespace Polynomial section CommSemiring variable {R A : Type*} [CommSemiring R] @[simps] def derivative' : D...
Mathlib/Algebra/Polynomial/Derivation.lean
67
67
theorem mkDerivation_X (a : A) : mkDerivation R a X = a := by
simp [mkDerivation_apply]
[ " { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } (f * g) =\n f • { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } g +\n g • { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } f", " C a • D f = a • D f", " C a • D f = D (C a * f)", " f ∈ ↑(Algebra.adjoin R {X})", " (fun a => (Lin...
[ " { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } (f * g) =\n f • { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } g +\n g • { toFun := ⇑derivative, map_add' := ⋯, map_smul' := ⋯ } f", " C a • D f = a • D f", " C a • D f = D (C a * f)", " f ∈ ↑(Algebra.adjoin R {X})", " (fun a => (Lin...
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.UrysohnsLemma import Mathlib.Topology.ContinuousFunction.Bounded import Mathlib.Topology.Metrizable.Basic #align_import topology.metric_space.metrizable from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter...
Mathlib/Topology/Metrizable/Urysohn.lean
37
106
theorem exists_inducing_l_infty : ∃ f : X → ℕ →ᵇ ℝ, Inducing f := by
-- Choose a countable basis, and consider the set `s` of pairs of set `(U, V)` such that `U ∈ B`, -- `V ∈ B`, and `closure U ⊆ V`. rcases exists_countable_basis X with ⟨B, hBc, -, hB⟩ let s : Set (Set X × Set X) := { UV ∈ B ×ˢ B | closure UV.1 ⊆ UV.2 } -- `s` is a countable set. haveI : Encodable s := ((hB...
[ " ∃ f, Inducing f", " ∃ ε, (∀ (UV : ↑s), ε UV ∈ Ioc 0 1) ∧ Tendsto ε cofinite (𝓝 0)", " ε UV ≤ 1", " ∀ (UV : ↑s), ∃ f, EqOn (⇑f) 0 (↑UV).1 ∧ EqOn (⇑f) (fun x => ε UV) (↑UV).2ᶜ ∧ ∀ (x : X), f x ∈ Icc 0 (ε UV)", " ∃ f, EqOn (⇑f) 0 (↑UV).1 ∧ EqOn (⇑f) (fun x => ε UV) (↑UV).2ᶜ ∧ ∀ (x : X), f x ∈ Icc 0 (ε UV)",...
[ " ∃ f, Inducing f" ]
import Mathlib.Algebra.Group.Center import Mathlib.Data.Int.Cast.Lemmas #align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353" variable {M : Type*} namespace Set variable (M) @[simp] theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) :...
Mathlib/Algebra/Ring/Center.lean
46
67
theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M where comm _ := by
rw [Int.commute_cast] left_assoc _ _ := match n with | (n : ℕ) => by rw [Int.cast_natCast, (natCast_mem_center _ n).left_assoc _ _] | Int.negSucc n => by rw [Int.cast_negSucc, Nat.cast_add, Nat.cast_one, neg_add_rev, add_mul, add_mul, add_mul, neg_mul, one_mul, neg_mul 1, one_mul, ← neg_mul, ad...
[ " ↑n * x✝ = x✝ * ↑n", " ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝", " ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝", " ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝", " x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)", " x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)", " x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)", " x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)", " ...
[ " ↑n * x✝ = x✝ * ↑n", " ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝", " ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝", " ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝", " x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)", " x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)", " x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)", " x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)", " ...
import Mathlib.SetTheory.Ordinal.Arithmetic namespace OrdinalApprox universe u variable {α : Type u} variable [CompleteLattice α] (f : α →o α) (x : α) open Function fixedPoints Cardinal Order OrderHom set_option linter.unusedVariables false in def lfpApprox (a : Ordinal.{u}) : α := sSup ({ f (lfpApprox b) | ...
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
87
90
theorem le_lfpApprox {a : Ordinal} : x ≤ lfpApprox f x a := by
unfold lfpApprox apply le_sSup simp only [exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, true_or]
[ " (invImage (fun x => x) Ordinal.wellFoundedRelation).1 b a", " Monotone (lfpApprox f x)", " ∀ ⦃a b : Ordinal.{u}⦄, a ≤ b → lfpApprox f x a ≤ lfpApprox f x b", " lfpApprox f x a ≤ lfpApprox f x b", " sSup ({x_1 | ∃ b, ∃ (_ : b < a), f (lfpApprox f x b) = x_1} ∪ {x}) ≤\n sSup ({x_1 | ∃ b_1, ∃ (_ : b_1 < b...
[ " (invImage (fun x => x) Ordinal.wellFoundedRelation).1 b a", " Monotone (lfpApprox f x)", " ∀ ⦃a b : Ordinal.{u}⦄, a ≤ b → lfpApprox f x a ≤ lfpApprox f x b", " lfpApprox f x a ≤ lfpApprox f x b", " sSup ({x_1 | ∃ b, ∃ (_ : b < a), f (lfpApprox f x b) = x_1} ∪ {x}) ≤\n sSup ({x_1 | ∃ b_1, ∃ (_ : b_1 < b...
import Mathlib.Algebra.Module.Torsion import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" ...
Mathlib/LinearAlgebra/Dimension/Finite.lean
70
73
theorem rank_zero_iff_forall_zero : Module.rank R M = 0 ↔ ∀ x : M, x = 0 := by
simp_rw [rank_eq_zero_iff, smul_eq_zero, and_or_left, not_and_self_iff, false_or, exists_and_right, and_iff_right (exists_ne (0 : R))]
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n", " Module.rank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " Module.rank R M = 0 → ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " (∃ x, ∀ (a : R), a ≠ 0 → a • x ≠...
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n", " Module.rank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " Module.rank R M = 0 → ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " (∃ x, ∀ (a : R), a ≠ 0 → a • x ≠...
import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Shapes.RegularMono import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms #align_import category_theory.limits.mono_coprod from "leanprover-community/mathli...
Mathlib/CategoryTheory/Limits/MonoCoprod.lean
63
69
theorem binaryCofan_inr {A B : C} [MonoCoprod C] (c : BinaryCofan A B) (hc : IsColimit c) : Mono c.inr := by
haveI hc' : IsColimit (BinaryCofan.mk c.inr c.inl) := BinaryCofan.IsColimit.mk _ (fun f₁ f₂ => hc.desc (BinaryCofan.mk f₂ f₁)) (by aesop_cat) (by aesop_cat) (fun f₁ f₂ m h₁ h₂ => BinaryCofan.IsColimit.hom_ext hc (by aesop_cat) (by aesop_cat)) exact binaryCofan_inl _ hc'
[ " Mono c.inl", " Mono c.inr", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ T) (g : (pair A B).obj { as := WalkingPair.left } ⟶ T),\n (BinaryCofan.mk c.inr c.inl).inl ≫ (fun {T} f₁ f₂ => hc.desc (BinaryCofan.mk f₂ f₁)) f g = f", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ ...
[ " Mono c.inl", " Mono c.inr" ]
import Mathlib.Algebra.CharP.Two import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Periodic import Mathlib.Data.ZMod.Basic import Mathlib.Tactic.Monotonicity #align_import data.nat.totient from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8" open Finset namespace Nat ...
Mathlib/Data/Nat/Totient.lean
84
109
theorem Ico_filter_coprime_le {a : ℕ} (k n : ℕ) (a_pos : 0 < a) : ((Ico k (k + n)).filter (Coprime a)).card ≤ totient a * (n / a + 1) := by
conv_lhs => rw [← Nat.mod_add_div n a] induction' n / a with i ih · rw [← filter_coprime_Ico_eq_totient a k] simp only [add_zero, mul_one, mul_zero, le_of_lt (mod_lt n a_pos), Nat.zero_eq, zero_add] -- Porting note: below line was `mono` refine Finset.card_mono ?_ refine monotone_filter_lef...
[ " φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}", " ↑m ∈ filter n.Coprime (range n)", " ↑m ∈ {m | m < n ∧ n.Coprime m}", " (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m", " 0 ∈ range n ∧ ¬n.Coprime 0", " φ 0 = 0 ↔ 0 = 0", " (n + 1).gcd (1 % (n + 1)) = 1", " φ (n + 1) = 0 ↔ n + 1 = 0", " 0 < φ n ↔ 0 < n"...
[ " φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}", " ↑m ∈ filter n.Coprime (range n)", " ↑m ∈ {m | m < n ∧ n.Coprime m}", " (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m", " 0 ∈ range n ∧ ¬n.Coprime 0", " φ 0 = 0 ↔ 0 = 0", " (n + 1).gcd (1 % (n + 1)) = 1", " φ (n + 1) = 0 ↔ n + 1 = 0", " 0 < φ n ↔ 0 < n"...
import Batteries.Data.List.Basic import Batteries.Data.List.Lemmas open Nat namespace List section countP variable (p q : α → Bool) @[simp] theorem countP_nil : countP p [] = 0 := rfl protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by induction l generalizing n with | nil...
.lake/packages/batteries/Batteries/Data/List/Count.lean
84
86
theorem Sublist.countP_le (s : l₁ <+ l₂) : countP p l₁ ≤ countP p l₂ := by
simp only [countP_eq_length_filter] apply s.filter _ |>.length_le
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
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
62
65
theorem sym2_univ [Fintype α] (inst : Fintype (Sym2 α) := Sym2.instFintype) : (univ : Finset α).sym2 = univ := by
ext simp only [mem_sym2_iff, mem_univ, implies_true]
[ " 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(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" ]
import Mathlib.Data.List.Basic #align_import data.list.lattice from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" open Nat namespace List variable {α : Type*} {l l₁ l₂ : List α} {p : α → Prop} {a : α} variable [DecidableEq α] section Inter @[simp] theorem inter_nil (l : L...
Mathlib/Data/List/Lattice.lean
147
147
theorem mem_of_mem_inter_right (h : a ∈ l₁ ∩ l₂) : a ∈ l₂ := by
simpa using of_mem_filter h
[ " (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂", " (a :: l₁) ∩ l₂ = l₁ ∩ l₂", " a ∈ l₂" ]
[ " (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂", " (a :: l₁) ∩ l₂ = l₁ ∩ l₂", " a ∈ l₂" ]
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import data.nat.choose.central from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Nat def centralBinom (n : ℕ) := (2 * n).choose n #alig...
Mathlib/Data/Nat/Choose/Central.lean
72
81
theorem succ_mul_centralBinom_succ (n : ℕ) : (n + 1) * centralBinom (n + 1) = 2 * (2 * n + 1) * centralBinom n := calc (n + 1) * (2 * (n + 1)).choose (n + 1) = (2 * n + 2).choose (n + 1) * (n + 1) := mul_comm _ _ _ = (2 * n + 1).choose n * (2 * n + 2) := by
rw [choose_succ_right_eq, choose_mul_succ_eq] _ = 2 * ((2 * n + 1).choose n * (n + 1)) := by ring _ = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n)) := by rw [two_mul n, add_assoc, Nat.add_sub_cancel_left] _ = 2 * ((2 * n).choose n * (2 * n + 1))...
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)", " (2 * n + 1).choose n * (2 * n + 2) = 2 * ((2 * n + 1).choose n * (n + 1))", " 2 * ((2 * n + 1).choose n * (n + 1)) = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n))", " 2 * ((2 * n ...
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)" ]
import Mathlib.Topology.Algebra.InfiniteSum.Basic import Mathlib.Topology.Algebra.UniformGroup noncomputable section open Filter Finset Function open scoped Topology variable {α β γ δ : Type*} section TopologicalGroup variable [CommGroup α] [TopologicalSpace α] [TopologicalGroup α] variable {f g : β → α} {a a₁...
Mathlib/Topology/Algebra/InfiniteSum/Group.lean
40
41
theorem Multipliable.of_inv (hf : Multipliable fun b ↦ (f b)⁻¹) : Multipliable f := by
simpa only [inv_inv] using hf.inv
[ " HasProd (fun b => (f b)⁻¹) a⁻¹", " Multipliable f" ]
[ " HasProd (fun b => (f b)⁻¹) a⁻¹", " Multipliable f" ]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.lagrange from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open Polynomial section PolynomialDetermination namespace Poly...
Mathlib/LinearAlgebra/Lagrange.lean
44
52
theorem eq_zero_of_degree_lt_of_eval_finset_eq_zero (degree_f_lt : f.degree < s.card) (eval_f : ∀ x ∈ s, f.eval x = 0) : f = 0 := by
rw [← mem_degreeLT] at degree_f_lt simp_rw [eval_eq_sum_degreeLTEquiv degree_f_lt] at eval_f rw [← degreeLTEquiv_eq_zero_iff_eq_zero degree_f_lt] exact Matrix.eq_zero_of_forall_index_sum_mul_pow_eq_zero (Injective.comp (Embedding.subtype _).inj' (equivFinOfCardEq (card_coe _)).symm.injective) f...
[ " f = 0", " (degreeLTEquiv R s.card) ⟨f, degree_f_lt⟩ = 0" ]
[ " f = 0" ]
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic #align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
401
404
theorem MonotoneOn.intervalIntegrable {u : ℝ → E} {a b : ℝ} (hu : MonotoneOn u (uIcc a b)) : IntervalIntegrable u μ a b := by
rw [intervalIntegrable_iff] exact (hu.integrableOn_isCompact isCompact_uIcc).mono_set Ioc_subset_Icc_self
[ " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f [[a, b]] μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Icc a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ico a b) μ", " Interva...
[ " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f [[a, b]] μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Icc a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ico a b) μ", " Interva...
import Mathlib.Control.Bitraversable.Basic #align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a" universe u variable {t : Type u → Type u → Type u} [Bitraversable t] variable {β : Type u} namespace Bitraversable open Functor LawfulApplicative ...
Mathlib/Control/Bitraversable/Lemmas.lean
72
75
theorem comp_tfst {α₀ α₁ α₂ β} (f : α₀ → F α₁) (f' : α₁ → G α₂) (x : t α₀ β) : Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk ∘ map f' ∘ f) x := by
rw [← comp_bitraverse] simp only [Function.comp, tfst, map_pure, Pure.pure]
[ " Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk ∘ map f' ∘ f) x", " bitraverse (Comp.mk ∘ map f' ∘ f) (Comp.mk ∘ map pure ∘ pure) x = tfst (Comp.mk ∘ map f' ∘ f) x" ]
[ " Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk ∘ map f' ∘ f) x" ]
import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.ContinuousFunction.Compact import Mathlib.Topology.UrysohnsLemma import Mathlib.Analysis.RCLike.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Topology.Algebra.Module.CharacterSpace #align_import topology.continuous_function.ideals from "...
Mathlib/Topology/ContinuousFunction/Ideals.lean
103
105
theorem mem_idealOfSet {s : Set X} {f : C(X, R)} : f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0 := by
convert Iff.rfl
[ " (f + g) x = 0", " IsClosed ↑(idealOfSet R s)", " IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }", " f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0" ]
[ " (f + g) x = 0", " IsClosed ↑(idealOfSet R s)", " IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }", " f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0" ]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Denumerable import Mathlib.Data.Set.Pointwise.Interval import Mathlib.SetTheory.Cardinal.Continuum #align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Nat Set open Cardinal no...
Mathlib/Data/Real/Cardinality.lean
78
79
theorem cantorFunctionAux_eq (h : f n = g n) : cantorFunctionAux c f n = cantorFunctionAux c g n := by
simp [cantorFunctionAux, h]
[ " cantorFunctionAux c f n = c ^ n", " cantorFunctionAux c f n = 0", " 0 ≤ cantorFunctionAux c f n", " 0 ≤ c ^ n", " cantorFunctionAux c f n = cantorFunctionAux c g n" ]
[ " cantorFunctionAux c f n = c ^ n", " cantorFunctionAux c f n = 0", " 0 ≤ cantorFunctionAux c f n", " 0 ≤ c ^ n", " cantorFunctionAux c f n = cantorFunctionAux c g n" ]
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 LinearOrder variable [LinearOrder α] ...
Mathlib/Order/Interval/Set/Disjoint.lean
170
172
theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} : ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by
simp [← Ici_inter_Iio, ← iUnion_inter, subset_def]
[ " Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " Disjoint (Ioo a₁ a₂) (Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " y₁ = x₂", " x₂ ≤ y₁", " ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x" ]
[ " Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " Disjoint (Ioo a₁ a₂) (Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁", " y₁ = x₂", " x₂ ≤ y₁", " ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x" ]
import Mathlib.GroupTheory.Perm.Cycle.Basic #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {ι α β : Type*} namespace Equiv.Perm section Generation variable [Finite β] open Subgroup theorem closure...
Mathlib/GroupTheory/Perm/Closure.lean
111
122
theorem closure_prime_cycle_swap {σ τ : Perm α} (h0 : (Fintype.card α).Prime) (h1 : IsCycle σ) (h2 : σ.support = Finset.univ) (h3 : IsSwap τ) : closure ({σ, τ} : Set (Perm α)) = ⊤ := by
obtain ⟨x, y, h4, h5⟩ := h3 obtain ⟨i, hi⟩ := h1.exists_pow_eq (mem_support.mp ((Finset.ext_iff.mp h2 x).mpr (Finset.mem_univ x))) (mem_support.mp ((Finset.ext_iff.mp h2 y).mpr (Finset.mem_univ y))) rw [h5, ← hi] refine closure_cycle_coprime_swap (Nat.Coprime.symm (h0.coprime_iff_not_dvd.mpr fun ...
[ " closure {σ | σ.IsCycle} = ⊤", " closure {σ, swap x (σ x)} = ⊤", " ∀ (n : ℕ), swap ((σ ^ n) x) ((σ ^ (n + 1)) x) ∈ H", " swap ((σ ^ n) x) ((σ ^ (n + 1)) x) ∈ H", " swap ((σ ^ 0) x) ((σ ^ (0 + 1)) x) ∈ H", " swap ((σ ^ (n + 1)) x) ((σ ^ (n + 1 + 1)) x) ∈ H", " swap ((σ ^ (n + 1)) x) ((σ ^ (n + 1 + 1)) x...
[ " closure {σ | σ.IsCycle} = ⊤", " closure {σ, swap x (σ x)} = ⊤", " ∀ (n : ℕ), swap ((σ ^ n) x) ((σ ^ (n + 1)) x) ∈ H", " swap ((σ ^ n) x) ((σ ^ (n + 1)) x) ∈ H", " swap ((σ ^ 0) x) ((σ ^ (0 + 1)) x) ∈ H", " swap ((σ ^ (n + 1)) x) ((σ ^ (n + 1 + 1)) x) ∈ H", " swap ((σ ^ (n + 1)) x) ((σ ^ (n + 1 + 1)) x...
import Mathlib.Algebra.Quotient import Mathlib.Algebra.Group.Subgroup.Actions import Mathlib.Algebra.Group.Subgroup.MulOpposite import Mathlib.GroupTheory.GroupAction.Basic import Mathlib.SetTheory.Cardinal.Finite #align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4...
Mathlib/GroupTheory/Coset.lean
105
106
theorem leftCoset_assoc (s : Set α) (a b : α) : a • (b • s) = (a * b) • s := by
simp [← image_smul, (image_comp _ _ _).symm, Function.comp, mul_assoc]
[ " a • b • s = (a * b) • s" ]
[ " a • b • s = (a * b) • s" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {α β γ : Type*} section ConditionallyCompleteLinearOrder variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] [ConditionallyCompleteLinearOrder β] [Top...
Mathlib/Topology/Order/Monotone.lean
230
232
theorem Monotone.map_ciSup_of_continuousAt {f : α → β} {g : γ → α} (Cf : ContinuousAt f (⨆ i, g i)) (Mf : Monotone f) (H : BddAbove (range g)) : f (⨆ i, g i) = ⨆ i, f (g i) := by
rw [iSup, Mf.map_csSup_of_continuousAt Cf (range_nonempty _) H, ← range_comp, iSup]; rfl
[ " f (sSup s) = sSup (f '' s)", " IsLUB (f '' s) (f (sSup s))", " Tendsto f (𝓝[s] sSup s) (𝓝 (f (sSup s)))", " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ fun i => g i)) = sSup (range fun i => f (g i))" ]
[ " f (sSup s) = sSup (f '' s)", " IsLUB (f '' s) (f (sSup s))", " Tendsto f (𝓝[s] sSup s) (𝓝 (f (sSup s)))", " f (⨆ i, g i) = ⨆ i, f (g i)" ]
import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b" namespace Nat def dist (n m : ℕ) := n - m + (m - n) #align nat.dist Nat.dist -- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr...
Mathlib/Data/Nat/Dist.lean
63
63
theorem dist_tri_right' (n m : ℕ) : n ≤ m + dist n m := by
rw [dist_comm]; apply dist_tri_right
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≤ n + n.dist m", " m ≤ n.dist m + n", " n ≤ n.dist m + m", " n ≤ m.dist n + m", " n ≤ m + n.dist m", " n ≤ m + m.dist n" ]
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≤ n + n.dist m", " m ≤ n.dist m + n", " n ≤ n.dist m + m", " n ≤ m.dist n + m", " n ≤ m + n.dist m" ]
import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Data.Nat.Lattice #align_import combinatorics.simple_graph.metric from "leanprover-community/mathlib"@"352ecfe114946c903338006dd3287cb5a9955ff2" namespace SimpleGraph variable {V : Type*} (G : SimpleGraph V) noncomputable def dist (u v : V)...
Mathlib/Combinatorics/SimpleGraph/Metric.lean
74
74
theorem dist_self {v : V} : dist G v v = 0 := by
simp
[ " G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v", " G.dist v v = 0" ]
[ " G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v", " G.dist v v = 0" ]
import Mathlib.Order.Filter.Prod #align_import order.filter.n_ary from "leanprover-community/mathlib"@"78f647f8517f021d839a7553d5dc97e79b508dea" open Function Set open Filter namespace Filter variable {α α' β β' γ γ' δ δ' ε ε' : Type*} {m : α → β → γ} {f f₁ f₂ : Filter α} {g g₁ g₂ : Filter β} {h h₁ h₂ : Filt...
Mathlib/Order/Filter/NAry.lean
64
65
theorem map₂_mk_eq_prod (f : Filter α) (g : Filter β) : map₂ Prod.mk f g = f ×ˢ g := by
simp only [← map_prod_eq_map₂, map_id']
[ " x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s} ↔ x✝ ∈ map (uncurry m) (f ×ˢ g)", " x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, ∀ x ∈ u, ∀ y ∈ v, m x y ∈ s} ↔\n ∃ t₁ ∈ f, ∃ t₂ ∈ g, ∀ x ∈ t₁, ∀ y ∈ t₂, (x, y) ∈ uncurry m ⁻¹' x✝", " map (fun p => m p.1 p.2) (f ×ˢ g) = map₂ m f g", " map₂ Prod.mk f g = f ×ˢ g" ]
[ " x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s} ↔ x✝ ∈ map (uncurry m) (f ×ˢ g)", " x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, ∀ x ∈ u, ∀ y ∈ v, m x y ∈ s} ↔\n ∃ t₁ ∈ f, ∃ t₂ ∈ g, ∀ x ∈ t₁, ∀ y ∈ t₂, (x, y) ∈ uncurry m ⁻¹' x✝", " map (fun p => m p.1 p.2) (f ×ˢ g) = map₂ m f g", " map₂ Prod.mk f g = f ×ˢ g" ]
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def χ₄ : MulChar (ZMod 4) ℤ...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
56
56
theorem χ₄_nat_mod_four (n : ℕ) : χ₄ n = χ₄ (n % 4 : ℕ) := by
rw [← ZMod.natCast_mod n 4]
[ " ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y", " ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0", " χ₄.IsQua...
[ " ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y", " ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0", " χ₄.IsQua...
import Mathlib.Analysis.BoxIntegral.Partition.Basic #align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" noncomputable section open scoped Classical open Filter open Function Set Filter namespace BoxIntegral variable {ι M : Type*} {...
Mathlib/Analysis/BoxIntegral/Partition/Split.lean
120
122
theorem splitUpper_eq_bot {i x} : I.splitUpper i x = ⊥ ↔ I.upper i ≤ x := by
rw [splitUpper, mk'_eq_bot, exists_update_iff I.lower fun j y => I.upper j ≤ y] simp [(I.lower_lt_upper _).not_le]
[ " ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}", " (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}", " (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}", " ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧...
[ " ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}", " (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}", " (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}", " ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧...
import Mathlib.Order.Filter.CountableInter set_option autoImplicit true open Function Set Filter class HasCountableSeparatingOn (α : Type*) (p : Set α → Prop) (t : Set α) : Prop where exists_countable_separating : ∃ S : Set (Set α), S.Countable ∧ (∀ s ∈ S, p s) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) ...
Mathlib/Order/Filter/CountableSeparatingOn.lean
118
126
theorem HasCountableSeparatingOn.of_subtype {α : Type*} {p : Set α → Prop} {t : Set α} {q : Set t → Prop} [h : HasCountableSeparatingOn t q univ] (hpq : ∀ U, q U → ∃ V, p V ∧ (↑) ⁻¹' V = U) : HasCountableSeparatingOn α p t := by
rcases h.1 with ⟨S, hSc, hSq, hS⟩ choose! V hpV hV using fun s hs ↦ hpq s (hSq s hs) refine ⟨⟨V '' S, hSc.image _, forall_mem_image.2 hpV, fun x hx y hy h ↦ ?_⟩⟩ refine congr_arg Subtype.val (hS ⟨x, hx⟩ trivial ⟨y, hy⟩ trivial fun U hU ↦ ?_) rw [← hV U hU] exact h _ (mem_image_of_mem _ hU)
[ " ∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y", " (∀ (n : ℕ), p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y", " HasCountableSeparatingOn α p t", " x = y", " ⟨x, hx⟩ ∈ U ↔ ⟨y, hy⟩ ∈ U", " ⟨x, hx⟩ ∈ Subtype.val ⁻¹' V U ↔ ⟨y, hy⟩ ∈ Subtype.val ⁻¹...
[ " ∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y", " (∀ (n : ℕ), p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y", " HasCountableSeparatingOn α p t" ]
import Mathlib.Order.Filter.Bases #align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Set Function open scoped Classical open Filter namespace Filter variable {ι : Type*} {α : ι → Type*} {f f₁ f₂ : (i : ι) → Filter (α i)} {s : (i : ι) → Set (α i)} ...
Mathlib/Order/Filter/Pi.lean
284
290
theorem map_pi_map_coprodᵢ_le : map (fun k : ∀ i, α i => fun i => m i (k i)) (Filter.coprodᵢ f) ≤ Filter.coprodᵢ fun i => map (m i) (f i) := by
simp only [le_def, mem_map, mem_coprodᵢ_iff] intro s h i obtain ⟨t, H, hH⟩ := h i exact ⟨{ x : α i | m i x ∈ t }, H, fun x hx => hH hx⟩
[ " s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s", " sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i", " (Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot", " (Filter.coprodᵢ f).NeBot ↔ ∃ d, (f d).NeBot", " Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥"...
[ " s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s", " sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i", " (Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot", " (Filter.coprodᵢ f).NeBot ↔ ∃ d, (f d).NeBot", " Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥"...
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n α : Type*} namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
52
59
theorem fromBlocks_eq_of_invertible₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix l m α) (D : Matrix l n α) [Invertible A] : fromBlocks A B C D = fromBlocks 1 0 (C * ⅟ A) 1 * fromBlocks A 0 0 (D - C * ⅟ A * B) * fromBlocks 1 (⅟ A * B) 0 1 := by
simp only [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, add_zero, zero_add, Matrix.one_mul, Matrix.mul_one, invOf_mul_self, Matrix.mul_invOf_self_assoc, Matrix.mul_invOf_mul_self_cancel, Matrix.mul_assoc, add_sub_cancel]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1" ]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1" ]
import Mathlib.Algebra.Algebra.Hom import Mathlib.RingTheory.Ideal.Quotient #align_import algebra.ring_quot from "leanprover-community/mathlib"@"e5820f6c8fcf1b75bcd7738ae4da1c5896191f72" universe uR uS uT uA u₄ variable {R : Type uR} [Semiring R] variable {S : Type uS} [CommSemiring S] variable {T : Type uT} vari...
Mathlib/Algebra/RingQuot.lean
121
141
theorem eqvGen_rel_eq (r : R → R → Prop) : EqvGen (Rel r) = RingConGen.Rel r := by
ext x₁ x₂ constructor · intro h induction h with | rel _ _ h => induction h with | of => exact RingConGen.Rel.of _ _ ‹_› | add_left _ h => exact h.add (RingConGen.Rel.refl _) | mul_left _ h => exact h.mul (RingConGen.Rel.refl _) | mul_right _ h => exact (RingConGen.Rel.refl _).mul...
[ " Rel r (a + b) (a + c)", " Rel r (b + a) (c + a)", " Rel r (-a) (-b)", " Rel r (a - c) (b - c)", " Rel r (a - b) (a - c)", " Rel r (k • a) (k • b)", " Setoid.r (a * c) (b * d)", " Setoid.r (x✝ * c) (y✝ * d)", " EqvGen (Rel r) (y✝ * c) (y✝ * d)", " EqvGen (Rel r) (y✝¹ * x✝) (y✝¹ * y✝)", " EqvGen...
[ " Rel r (a + b) (a + c)", " Rel r (b + a) (c + a)", " Rel r (-a) (-b)", " Rel r (a - c) (b - c)", " Rel r (a - b) (a - c)", " Rel r (k • a) (k • b)", " Setoid.r (a * c) (b * d)", " Setoid.r (x✝ * c) (y✝ * d)", " EqvGen (Rel r) (y✝ * c) (y✝ * d)", " EqvGen (Rel r) (y✝¹ * x✝) (y✝¹ * y✝)", " EqvGen...
import Mathlib.FieldTheory.Finite.Basic #align_import field_theory.chevalley_warning from "leanprover-community/mathlib"@"e001509c11c4d0f549d91d89da95b4a0b43c714f" universe u v section FiniteField open MvPolynomial open Function hiding eval open Finset FiniteField variable {K σ ι : Type*} [Fintype K] [Field ...
Mathlib/FieldTheory/ChevalleyWarning.lean
107
160
theorem char_dvd_card_solutions_of_sum_lt {s : Finset ι} {f : ι → MvPolynomial σ K} (h : (∑ i ∈ s, (f i).totalDegree) < Fintype.card σ) : p ∣ Fintype.card { x : σ → K // ∀ i ∈ s, eval x (f i) = 0 } := by
have hq : 0 < q - 1 := by rw [← Fintype.card_units, Fintype.card_pos_iff]; exact ⟨1⟩ let S : Finset (σ → K) := { x ∈ univ | ∀ i ∈ s, eval x (f i) = 0 }.toFinset have hS : ∀ x : σ → K, x ∈ S ↔ ∀ i : ι, i ∈ s → eval x (f i) = 0 := by intro x simp only [S, Set.toFinset_setOf, mem_univ, true_and, mem_filter]...
[ " ∑ x : σ → K, (eval x) f = 0", " ∑ x : σ → K, (eval x) f = ∑ x : σ → K, ∑ d ∈ f.support, coeff d f * ∏ i : σ, x i ^ d i", " ∀ x ∈ f.support, ∑ x_1 : σ → K, coeff x f * ∏ i : σ, x_1 i ^ x i = 0", " ∑ x : σ → K, coeff d f * ∏ i : σ, x i ^ d i = 0", " ∑ x : σ → K, ∏ i : σ, x i ^ d i = 0", " ∀ (a : { j // j ...
[ " ∑ x : σ → K, (eval x) f = 0", " ∑ x : σ → K, (eval x) f = ∑ x : σ → K, ∑ d ∈ f.support, coeff d f * ∏ i : σ, x i ^ d i", " ∀ x ∈ f.support, ∑ x_1 : σ → K, coeff x f * ∏ i : σ, x_1 i ^ x i = 0", " ∑ x : σ → K, coeff d f * ∏ i : σ, x i ^ d i = 0", " ∑ x : σ → K, ∏ i : σ, x i ^ d i = 0", " ∀ (a : { j // j ...
import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.weighted_homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Fins...
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
81
85
theorem weightedTotalDegree'_eq_bot_iff (w : σ → M) (p : MvPolynomial σ R) : weightedTotalDegree' w p = ⊥ ↔ p = 0 := by
simp only [weightedTotalDegree', Finset.sup_eq_bot_iff, mem_support_iff, WithBot.coe_ne_bot, MvPolynomial.eq_zero_iff] exact forall_congr' fun _ => Classical.not_not
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0", " (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0" ]
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0" ]
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {𝕜 : Typ...
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
106
113
theorem iter_deriv_zpow' (m : ℤ) (k : ℕ) : (deriv^[k] fun x : 𝕜 => x ^ m) = fun x => (∏ i ∈ Finset.range k, ((m : 𝕜) - i)) * x ^ (m - k) := by
induction' k with k ihk · simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero, Function.iterate_zero] · simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow', Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCas...
[ " HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x", " HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x", " HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x", " x ^ (↑m - 1) = x ^ (m - 1)", " 1 ≤ m", " x ^ (-m) ≠ 0", " ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹", ...
[ " HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x", " HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x", " HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x", " x ^ (↑m - 1) = x ^ (m - 1)", " 1 ≤ m", " x ^ (-m) ≠ 0", " ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹", ...
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ι : Type*} {f : X → Y} {g : Y → Z} section OpenMap variable [Topo...
Mathlib/Topology/Maps.lean
478
482
theorem of_nonempty (h : ∀ s, IsClosed s → s.Nonempty → IsClosed (f '' s)) : IsClosedMap f := by
intro s hs; rcases eq_empty_or_nonempty s with h2s | h2s · simp_rw [h2s, image_empty, isClosed_empty] · exact h s hs h2s
[ " IsClosed (id '' s)", " IsClosedMap (g ∘ f)", " IsClosed (g ∘ f '' s)", " IsClosed (g '' (f '' s))", " IsClosed (f '' s)", " IsClosed (f' ⁻¹' s)", " IsClosedMap f" ]
[ " IsClosed (id '' s)", " IsClosedMap (g ∘ f)", " IsClosed (g ∘ f '' s)", " IsClosed (g '' (f '' s))", " IsClosed (f '' s)", " IsClosed (f' ⁻¹' s)", " IsClosedMap f" ]
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.SesquilinearForm import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845" universe u v w variable {S T : ...
Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
111
112
theorem polar_comm (f : M → R) (x y : M) : polar f x y = polar f y x := by
rw [polar, polar, add_comm, sub_sub, sub_sub, add_comm (f x) (f y)]
[ " polar (f + g) x y = polar f x y + polar g x y", " f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)", " polar (-f) x y = -polar f x y", " polar (s • f) x y = s • polar f x y", " polar f x y = polar f y x" ]
[ " polar (f + g) x y = polar f x y + polar g x y", " f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)", " polar (-f) x y = -polar f x y", " polar (s • f) x y = s • polar f x y", " polar f x y = polar f y x" ]