Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace #align_import linear_algebra.affine_space.restrict from "leanprover-community/mathlib"@"09258fb7f75d741b7eda9fa18d5c869e2135d9f1" variable {k V₁ P₁ V₂ P₂ : Type*} [Ring k] [AddCommGroup V₁] [AddCommGroup V₂] [Module k V₁] [Module k V₂] [AddTorsor V₁ P₁] [A...
Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
33
36
theorem AffineSubspace.nonempty_map {E : AffineSubspace k P₁} [Ene : Nonempty E] {φ : P₁ →ᵃ[k] P₂} : Nonempty (E.map φ) := by
obtain ⟨x, hx⟩ := id Ene exact ⟨⟨φ x, AffineSubspace.mem_map.mpr ⟨x, hx, rfl⟩⟩⟩
[ " Nonempty ↥(map φ E)" ]
[]
import Mathlib.NumberTheory.ZetaValues import Mathlib.NumberTheory.LSeries.RiemannZeta open Complex Real Set open scoped Nat open HurwitzZeta
Mathlib/NumberTheory/LSeries/HurwitzZetaValues.lean
211
217
theorem riemannZeta_two_mul_nat {k : ℕ} (hk : k ≠ 0) : riemannZeta (2 * k) = (-1) ^ (k + 1) * (2 : ℂ) ^ (2 * k - 1) * (π : ℂ) ^ (2 * k) * bernoulli (2 * k) / (2 * k)! := by
convert congr_arg ((↑) : ℝ → ℂ) (hasSum_zeta_nat hk).tsum_eq · rw [← Nat.cast_two, ← Nat.cast_mul, zeta_nat_eq_tsum_of_gt_one (by omega)] simp only [push_cast] · norm_cast
[ " riemannZeta (2 * ↑k) = (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * ↑π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)!", " riemannZeta (2 * ↑k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k))", " 1 < 2 * k", " ∑' (n : ℕ), 1 / ↑n ^ (2 * k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k))", " (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * ↑π ^ (2 * k) * ↑(bern...
[]
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
204
204
theorem sizeUpTo_zero : c.sizeUpTo 0 = 0 := by
simp [sizeUpTo]
[ " ∑ 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" ]
[ " ∑ 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" ]
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
138
140
theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by
simp only [laverage_eq', restrict_apply_univ]
[ " ⨍⁻ (_x : α), 0 ∂μ = 0", " ⨍⁻ (x : α), f x ∂0 = 0", " ⨍⁻ (x : α), f x ∂μ = (∫⁻ (x : α), f x ∂μ) / μ univ", " ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ", " μ univ * ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ", " ⨍⁻ (x : α) in s, f x ∂μ = (∫⁻ (x : α) in s, f x ∂μ) / μ s", " ⨍⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α...
[ " ⨍⁻ (_x : α), 0 ∂μ = 0", " ⨍⁻ (x : α), f x ∂0 = 0", " ⨍⁻ (x : α), f x ∂μ = (∫⁻ (x : α), f x ∂μ) / μ univ", " ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ", " μ univ * ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ", " ⨍⁻ (x : α) in s, f x ∂μ = (∫⁻ (x : α) in s, f x ∂μ) / μ s" ]
import Mathlib.FieldTheory.Separable import Mathlib.RingTheory.IntegralDomain import Mathlib.Algebra.CharP.Reduced import Mathlib.Tactic.ApplyFun #align_import field_theory.finite.basic from "leanprover-community/mathlib"@"12a85fac627bea918960da036049d611b1a3ee43" variable {K : Type*} {R : Type*} local notation ...
Mathlib/FieldTheory/Finite/Basic.lean
76
98
theorem exists_root_sum_quadratic [Fintype R] {f g : R[X]} (hf2 : degree f = 2) (hg2 : degree g = 2) (hR : Fintype.card R % 2 = 1) : ∃ a b, f.eval a + g.eval b = 0 := letI := Classical.decEq R suffices ¬Disjoint (univ.image fun x : R => eval x f) (univ.image fun x : R => eval x (-g)) by simp only [disjo...
rw [card_union_of_disjoint hd]; simp [natDegree_eq_of_degree_eq_some hf2, natDegree_eq_of_degree_eq_some hg2, mul_add]
[ " filter (fun x => eval x p = a) univ = (p - C a).roots.toFinset", " 0 < f.degree", " 0 < 2", " ¬Fintype.card R % 2 = f.natDegree * (image (fun x => eval x f) univ).card % 2", " 0 < (-g).degree", " f.natDegree * (image (fun x => eval x f) univ).card + (-g).natDegree * (image (fun x => eval x (-g)) univ).c...
[ " filter (fun x => eval x p = a) univ = (p - C a).roots.toFinset" ]
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {α β δ : Type*} [MeasurableSpace α] [MeasurableSpace β] {s : Set α} ...
Mathlib/MeasureTheory/Measure/Dirac.lean
97
98
theorem sum_smul_dirac [Countable α] [MeasurableSingletonClass α] (μ : Measure α) : (sum fun a => μ {a} • dirac a) = μ := by
simpa using (map_eq_sum μ id measurable_id).symm
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ", " (dirac a) s = s.indicator 1 a", " (dirac a) s ≤ 0", " (dirac a) {a}ᶜ = 0", " (map f (dirac a)) s = (dirac (f a)) s", " map (fun x => c) μ = μ univ • dirac c", ...
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ", " (dirac a) s = s.indicator 1 a", " (dirac a) s ≤ 0", " (dirac a) {a}ᶜ = 0", " (map f (dirac a)) s = (dirac (f a)) s", " map (fun x => c) μ = μ univ • dirac c", ...
import Mathlib.Algebra.Ring.Equiv #align_import algebra.ring.comp_typeclasses from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" variable {R₁ : Type*} {R₂ : Type*} {R₃ : Type*} variable [Semiring R₁] [Semiring R₂] [Semiring R₃] -- This at first seems not very useful. However we need ...
Mathlib/Algebra/Ring/CompTypeclasses.lean
106
108
theorem comp_apply_eq₂ {x : R₂} : σ (σ' x) = x := by
rw [← RingHom.comp_apply, comp_eq₂] simp
[ " σ' (σ x) = x", " (RingHom.id R₁) x = x", " σ (σ' x) = x", " (RingHom.id R₂) x = x" ]
[ " σ' (σ x) = x", " (RingHom.id R₁) x = x" ]
import Mathlib.Topology.Instances.Irrational import Mathlib.Topology.Instances.Rat import Mathlib.Topology.Compactification.OnePoint #align_import topology.instances.rat_lemmas from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Set Metric Filter TopologicalSpace open Topology One...
Mathlib/Topology/Instances/RatLemmas.lean
65
69
theorem not_countably_generated_nhds_infty_opc : ¬IsCountablyGenerated (𝓝 (∞ : ℚ∞)) := by
intro have : IsCountablyGenerated (comap (OnePoint.some : ℚ → ℚ∞) (𝓝 ∞)) := by infer_instance rw [OnePoint.comap_coe_nhds_infty, coclosedCompact_eq_cocompact] at this exact not_countably_generated_cocompact this
[ " (cocompact ℚ ⊓ 𝓝 p).NeBot", " ∀ {i : Set ℚ × Set ℚ}, IsCompact i.1 ∧ p ∈ i.2 ∧ IsOpen i.2 → (i.1ᶜ ∩ i.2).Nonempty", " ((s, o).1ᶜ ∩ (s, o).2).Nonempty", " ((s, o).2 ∩ (s, o).1ᶜ).Nonempty", " ¬(cocompact ℚ).IsCountablyGenerated", " False", " ¬(𝓝 ∞).IsCountablyGenerated", " (comap OnePoint.some (𝓝 ∞...
[ " (cocompact ℚ ⊓ 𝓝 p).NeBot", " ∀ {i : Set ℚ × Set ℚ}, IsCompact i.1 ∧ p ∈ i.2 ∧ IsOpen i.2 → (i.1ᶜ ∩ i.2).Nonempty", " ((s, o).1ᶜ ∩ (s, o).2).Nonempty", " ((s, o).2 ∩ (s, o).1ᶜ).Nonempty", " ¬(cocompact ℚ).IsCountablyGenerated", " False" ]
import Mathlib.CategoryTheory.Subobject.Lattice #align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d" universe v u noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite var...
Mathlib/CategoryTheory/Subobject/Limits.lean
314
315
theorem imageSubobject_arrow' : (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f := by
simp [imageSubobjectIso]
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow", " (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f" ]
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow" ]
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
143
145
theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by
simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt]
[ " Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁" ]
[]
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv #align_import linear_algebra.quadratic_form.prod from "leanprover-community/mathlib"@"9b2755b951bc323c962bd072cd447b375cf58101" universe u v w variable {ι : Type*} {R : Type*} {M₁ M₂ N₁ N₂ : Type*} {Mᵢ Nᵢ : ι → Type*} namespace QuadraticForm section Pro...
Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
313
325
theorem anisotropic_of_pi [Fintype ι] {R} [OrderedCommRing R] [∀ i, Module R (Mᵢ i)] {Q : ∀ i, QuadraticForm R (Mᵢ i)} (h : (pi Q).Anisotropic) : ∀ i, (Q i).Anisotropic := by
simp_rw [Anisotropic, pi_apply, Function.funext_iff, Pi.zero_apply] at h intro i x hx classical have := h (Pi.single i x) ?_ i · rw [Pi.single_eq_same] at this exact this apply Finset.sum_eq_zero intro j _ by_cases hji : j = i · subst hji; rw [Pi.single_eq_same, hx] · rw [Pi.single_eq_of_ne hji...
[ " (pi Q) (Pi.single i m) = (Q i) m", " (Q j) (Pi.single i m j) = 0", " (QuadraticForm.pi Q') ((↑(LinearEquiv.piCongrRight fun i => (e i).toLinearEquiv)).toFun x) = (QuadraticForm.pi Q) x", " Q ((LinearMap.proj i).toFun m) = (pi (Pi.single i Q)) m", " Q (m i) = (pi (Pi.single i Q)) m", " (Pi.single i Q j) ...
[ " (pi Q) (Pi.single i m) = (Q i) m", " (Q j) (Pi.single i m j) = 0", " (QuadraticForm.pi Q') ((↑(LinearEquiv.piCongrRight fun i => (e i).toLinearEquiv)).toFun x) = (QuadraticForm.pi Q) x", " Q ((LinearMap.proj i).toFun m) = (pi (Pi.single i Q)) m", " Q (m i) = (pi (Pi.single i Q)) m", " (Pi.single i Q j) ...
import Mathlib.LinearAlgebra.Span import Mathlib.RingTheory.Ideal.IsPrimary import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.RingTheory.Noetherian #align_import ring_theory.ideal.associated_prime from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" variable {R : Type*} [...
Mathlib/RingTheory/Ideal/AssociatedPrime.lean
132
142
theorem biUnion_associatedPrimes_eq_zero_divisors [IsNoetherianRing R] : ⋃ p ∈ associatedPrimes R M, p = { r : R | ∃ x : M, x ≠ 0 ∧ r • x = 0 } := by
simp_rw [← Submodule.mem_annihilator_span_singleton] refine subset_antisymm (Set.iUnion₂_subset ?_) ?_ · rintro _ ⟨h, x, ⟨⟩⟩ r h' refine ⟨x, ne_of_eq_of_ne (one_smul R x).symm ?_, h'⟩ refine mt (Submodule.mem_annihilator_span_singleton _ _).mpr ?_ exact (Ideal.ne_top_iff_one _).mp h.ne_top · intro ...
[ " IsAssociatedPrime I M'", " IsAssociatedPrime (Submodule.span R {x}).annihilator M'", " (Submodule.span R {x}).annihilator = (Submodule.span R {f x}).annihilator", " r ∈ (Submodule.span R {x}).annihilator ↔ r ∈ (Submodule.span R {f x}).annihilator", " ¬IsAssociatedPrime I M", " False", " I = ⊤", " ∃ ...
[ " IsAssociatedPrime I M'", " IsAssociatedPrime (Submodule.span R {x}).annihilator M'", " (Submodule.span R {x}).annihilator = (Submodule.span R {f x}).annihilator", " r ∈ (Submodule.span R {x}).annihilator ↔ r ∈ (Submodule.span R {f x}).annihilator", " ¬IsAssociatedPrime I M", " False", " I = ⊤", " ∃ ...
import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Algebra.Polynomial.Splits import Mathlib.RingTheory.RootsOfUnity.Complex import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.RingTheory.RootsOfUnity.Basic import Mathlib.FieldTh...
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
72
73
theorem cyclotomic'_zero (R : Type*) [CommRing R] [IsDomain R] : cyclotomic' 0 R = 1 := by
simp only [cyclotomic', Finset.prod_empty, primitiveRoots_zero]
[ " cyclotomic' 0 R = 1" ]
[]
import Mathlib.Algebra.Algebra.Unitization import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul suppress_compilation variable (𝕜 A : Type*) [NontriviallyNormedField 𝕜] [NonUnitalNormedRing A] variable [NormedSpace 𝕜 A] [IsScalarTower 𝕜 A A] [SMulCommClass 𝕜 A A] open ContinuousLinearMap namespace Unitizati...
Mathlib/Analysis/NormedSpace/Unitization.lean
185
190
theorem uniformity_eq_aux : 𝓤[instUniformSpaceProd.comap <| addEquiv 𝕜 A] = 𝓤 (Unitization 𝕜 A) := by
have key : UniformInducing (addEquiv 𝕜 A) := antilipschitzWith_addEquiv.uniformInducing lipschitzWith_addEquiv.uniformContinuous rw [← key.comap_uniformity] rfl
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " Function.Injective ⇑(splitMul 𝕜 A)", " ∀ (a : Un...
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " Function.Injective ⇑(splitMul 𝕜 A)", " ∀ (a : Un...
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : ℕ) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
156
158
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).fin n := by
ext simp
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
import Mathlib.Order.Filter.SmallSets import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Compactness.Compact import Mathlib.Topology.NhdsSet import Mathlib.Algebra.Group.Defs #align_import topology.uniform_space.basic from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c" open Set F...
Mathlib/Topology/UniformSpace/Basic.lean
183
184
theorem compRel_assoc {r s t : Set (α × α)} : r ○ s ○ t = r ○ (s ○ t) := by
ext ⟨a, b⟩; simp only [mem_compRel]; tauto
[ " idRel ⊆ s ↔ ∀ (a : α), (a, a) ∈ s", " (a, b) ∈ Prod.swap '' idRel ↔ (a, b) ∈ idRel", " (a, b) ∈ idRel ○ r ↔ (a, b) ∈ r", " r ○ s ○ t = r ○ (s ○ t)", " (a, b) ∈ r ○ s ○ t ↔ (a, b) ∈ r ○ (s ○ t)", " (∃ z, (∃ z_1, (a, z_1) ∈ r ∧ (z_1, z) ∈ s) ∧ (z, b) ∈ t) ↔ ∃ z, (a, z) ∈ r ∧ ∃ z_1, (z, z_1) ∈ s ∧ (z_1, b)...
[ " idRel ⊆ s ↔ ∀ (a : α), (a, a) ∈ s", " (a, b) ∈ Prod.swap '' idRel ↔ (a, b) ∈ idRel", " (a, b) ∈ idRel ○ r ↔ (a, b) ∈ r" ]
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Topology.Algebra.Module.Basic #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set Function Filter open scoped NNReal Topology instance Real.punctured_nhds_module_neBot {E ...
Mathlib/Analysis/NormedSpace/Real.lean
110
111
theorem frontier_sphere (x : E) {r : ℝ} (hr : r ≠ 0) : frontier (sphere x r) = sphere x r := by
rw [isClosed_sphere.frontier_eq, interior_sphere x hr, diff_empty]
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1", " ‖t • x‖ = t * ‖x‖", " dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖", " ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x", " (1 - r) * dist y x ≤ (1 - 0) * dist y x", " 0 ≤ r", " (1 - 0) * dist y x = dist y x", " closure (ball x r) = closedBall x r", " y ∈ closure (ball x r...
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1", " ‖t • x‖ = t * ‖x‖", " dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖", " ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x", " (1 - r) * dist y x ≤ (1 - 0) * dist y x", " 0 ≤ r", " (1 - 0) * dist y x = dist y x", " closure (ball x r) = closedBall x r", " y ∈ closure (ball x r...
import Mathlib.Control.Monad.Basic import Mathlib.Control.Monad.Writer import Mathlib.Init.Control.Lawful #align_import control.monad.cont from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" universe u v w u₀ u₁ v₀ v₁ structure MonadCont.Label (α : Type w) (m : Type u → Type v) (β : Typ...
Mathlib/Control/Monad/Cont.lean
128
130
theorem ExceptT.goto_mkLabel {α β ε : Type _} (x : Label (Except.{u, u} ε α) m β) (i : α) : goto (ExceptT.mkLabel x) i = ExceptT.mk (Except.ok <$> goto x (Except.ok i)) := by
cases x; rfl
[ " goto (mkLabel x) i = mk (Except.ok <$> goto x (Except.ok i))", " goto (mkLabel { apply := apply✝ }) i = mk (Except.ok <$> goto { apply := apply✝ } (Except.ok i))" ]
[]
import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.SetLike.Fintype import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.Order.Atoms.Finite import Mathlib.Data.Set.Lattice #align_import group_theory.sylow from "leanprove...
Mathlib/GroupTheory/Sylow.lean
76
76
theorem ext {P Q : Sylow p G} (h : (P : Subgroup G) = Q) : P = Q := by
cases P; cases Q; congr
[ " P = Q", " { toSubgroup := toSubgroup✝, isPGroup' := isPGroup'✝, is_maximal' := is_maximal'✝ } = Q", " { toSubgroup := toSubgroup✝¹, isPGroup' := isPGroup'✝¹, is_maximal' := is_maximal'✝¹ } =\n { toSubgroup := toSubgroup✝, isPGroup' := isPGroup'✝, is_maximal' := is_maximal'✝ }" ]
[]
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace suppress_compilation set_option linter.uppercaseLean3 false open Metric open scoped Classical NNReal Topology Uniformity variable {𝕜 E : Type*} [NontriviallyNormedField 𝕜] section SemiNormed variable [SeminormedAddCommGroup E] [NormedSpace 𝕜 E] ...
Mathlib/Analysis/NormedSpace/OperatorNorm/Mul.lean
226
231
theorem norm_toSpanSingleton (x : E) : ‖toSpanSingleton 𝕜 x‖ = ‖x‖ := by
refine opNorm_eq_of_bounds (norm_nonneg _) (fun x => ?_) fun N _ h => ?_ · rw [toSpanSingleton_apply, norm_smul, mul_comm] · specialize h 1 rw [toSpanSingleton_apply, norm_smul, mul_comm] at h exact (mul_le_mul_right (by simp)).mp h
[ " ‖((Algebra.lsmul 𝕜 𝕜 E).toLinearMap c) x‖ ≤ 1 * ‖c‖ * ‖x‖", " ‖toSpanSingleton 𝕜 x‖ = ‖x‖", " ‖(toSpanSingleton 𝕜 x✝) x‖ ≤ ‖x✝‖ * ‖x‖", " ‖x‖ ≤ N", " 0 < ‖1‖" ]
[ " ‖((Algebra.lsmul 𝕜 𝕜 E).toLinearMap c) x‖ ≤ 1 * ‖c‖ * ‖x‖" ]
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
158
158
theorem symmDiff_eq_sup_sdiff_inf : a ∆ b = (a ⊔ b) \ (a ⊓ b) := by
simp [sup_sdiff, symmDiff]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a", " a ∆ a = ⊥", " a ∆ ⊥ = a", " ⊥ ∆ a = a", " a ∆ b = ⊥ ↔ a = b", " a ∆ b = b \\ a", " a ∆ b = a \\ b", " a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c", " a ∆ b = (a ⊔ b) \\ (a ⊓ b)" ]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a", " a ∆ a = ⊥", " a ∆ ⊥ = a", " ⊥ ∆ a = a", " a ∆ b = ⊥ ↔ a = b", " a ∆ b = b \\ a", " a ∆ b = a \\ b", " a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c" ]
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
75
76
theorem countP_pos : 0 < countP p l ↔ ∃ a ∈ l, p a := by
simp only [countP_eq_length_filter, length_pos_iff_exists_mem, mem_filter, exists_prop]
[ " 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.Finsupp.Basic import Mathlib.Data.Finsupp.Order #align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Finset variable {α β ι : Type*} namespace Finsupp def toMultiset : (α →₀ ℕ) →+ Multiset α where toFun f := Finsupp.sum f...
Mathlib/Data/Finsupp/Multiset.lean
117
120
theorem toMultiset_sup [DecidableEq α] (f g : α →₀ ℕ) : toMultiset (f ⊔ g) = toMultiset f ∪ toMultiset g := by
ext simp_rw [Multiset.count_union, Finsupp.count_toMultiset, Finsupp.sup_apply, sup_eq_max]
[ " toMultiset (single a n) = n • {a}", " 0 • {a} = 0", " toMultiset (∑ i ∈ s, single i n) = n • s.val", " Multiset.card (toMultiset f) = f.sum fun x => id", " Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)", " Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)", " ∀ (a : α) (b : ℕ) (f...
[ " toMultiset (single a n) = n • {a}", " 0 • {a} = 0", " toMultiset (∑ i ∈ s, single i n) = n • s.val", " Multiset.card (toMultiset f) = f.sum fun x => id", " Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)", " Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)", " ∀ (a : α) (b : ℕ) (f...
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {α : Type*} [DecidableEq α] def nextOr : ∀ (_ : List α) (_ _ : α), α | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
163
169
theorem next_ne_head_ne_getLast (h : x ∈ l) (y : α) (h : x ∈ y :: l) (hy : x ≠ y) (hx : x ≠ getLast (y :: l) (cons_ne_nil _ _)) : next (y :: l) x h = next l x (by simpa [hy] using h) := by
rw [next, next, nextOr_cons_of_ne _ _ _ _ hy, nextOr_eq_nextOr_of_mem_of_ne] · rwa [getLast_cons] at hx exact ne_nil_of_mem (by assumption) · rwa [getLast_cons] at hx
[ " (y :: xs).nextOr x d = xs.nextOr x d", " [y].nextOr x d = [].nextOr x d", " (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d", " xs.nextOr x d = xs.nextOr x d'", " [].nextOr x d = [].nextOr x d'", " (y :: ys).nextOr x d = (y :: ys).nextOr x d'", " [y].nextOr x d = [y].nextOr x d'", " (y :: z :: zs)....
[ " (y :: xs).nextOr x d = xs.nextOr x d", " [y].nextOr x d = [].nextOr x d", " (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d", " xs.nextOr x d = xs.nextOr x d'", " [].nextOr x d = [].nextOr x d'", " (y :: ys).nextOr x d = (y :: ys).nextOr x d'", " [y].nextOr x d = [y].nextOr x d'", " (y :: z :: zs)....
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
205
208
theorem MetricSpace.replaceTopology_eq {γ} [U : TopologicalSpace γ] (m : MetricSpace γ) (H : U = m.toPseudoMetricSpace.toUniformSpace.toTopologicalSpace) : m.replaceTopology H = m := by
ext; rfl
[ " 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.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products import Mathlib.CategoryTheory.Limits.ConcreteCategory import Mathlib.CategoryTheory.Limits.Shapes.Types import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryT...
Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean
349
353
theorem cokernel_funext {C : Type*} [Category C] [HasZeroMorphisms C] [ConcreteCategory C] {M N K : C} {f : M ⟶ N} [HasCokernel f] {g h : cokernel f ⟶ K} (w : ∀ n : N, g (cokernel.π f n) = h (cokernel.π f n)) : g = h := by
ext x simpa using w x
[ " g = h", " (coequalizer.π f 0 ≫ g) x = (coequalizer.π f 0 ≫ h) x" ]
[]
import Mathlib.Data.List.Infix #align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" -- Make sure we don't import algebra assert_not_exists Monoid variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ) namespace List def rdrop : List α := l.take (l.leng...
Mathlib/Data/List/DropRight.lean
117
118
theorem rdropWhile_concat_neg (x : α) (h : ¬p x) : rdropWhile p (l ++ [x]) = l ++ [x] := by
rw [rdropWhile_concat, if_neg h]
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
import Mathlib.Analysis.Convex.Body import Mathlib.Analysis.Convex.Measure import Mathlib.MeasureTheory.Group.FundamentalDomain #align_import measure_theory.group.geometry_of_numbers from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" namespace MeasureTheory open ENNReal FiniteDimensio...
Mathlib/MeasureTheory/Group/GeometryOfNumbers.lean
92
142
theorem exists_ne_zero_mem_lattice_of_measure_mul_two_pow_le_measure [NormedAddCommGroup E] [NormedSpace ℝ E] [BorelSpace E] [FiniteDimensional ℝ E] [Nontrivial E] [IsAddHaarMeasure μ] {L : AddSubgroup E} [Countable L] [DiscreteTopology L] (fund : IsAddFundamentalDomain L F μ) (h_symm : ∀ x ∈ s, -x ∈ s) (h_...
have h_mes : μ s ≠ 0 := by intro hμ suffices μ F = 0 from fund.measure_ne_zero (NeZero.ne μ) this rw [hμ, le_zero_iff, mul_eq_zero] at h exact h.resolve_right <| pow_ne_zero _ two_ne_zero have h_nemp : s.Nonempty := nonempty_of_measure_ne_zero h_mes let u : ℕ → ℝ≥0 := (exists_seq_strictAnti_tends...
[ " ∃ x y, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)", " μ s ≤ μ F", " ∃ x, x ≠ 0 ∧ ↑x ∈ s", " μ F < μ (2⁻¹ • s)", " 0 ≤ 2⁻¹", " μ F * 2 ^ finrank ℝ E < (ENNReal.ofReal 2)⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " μ F * 2 ^ finrank ℝ E < 2⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " ↑(x - y) ∈ s", " 2⁻¹ •...
[ " ∃ x y, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)", " μ s ≤ μ F", " ∃ x, x ≠ 0 ∧ ↑x ∈ s", " μ F < μ (2⁻¹ • s)", " 0 ≤ 2⁻¹", " μ F * 2 ^ finrank ℝ E < (ENNReal.ofReal 2)⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " μ F * 2 ^ finrank ℝ E < 2⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " ↑(x - y) ∈ s", " 2⁻¹ •...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R...
Mathlib/Algebra/Polynomial/Mirror.lean
101
120
theorem mirror_eval_one : p.mirror.eval 1 = p.eval 1 := by
simp_rw [eval_eq_sum_range, one_pow, mul_one, mirror_natDegree] refine Finset.sum_bij_ne_zero ?_ ?_ ?_ ?_ ?_ · exact fun n _ _ => revAt (p.natDegree + p.natTrailingDegree) n · intro n hn hp rw [Finset.mem_range_succ_iff] at * rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, ...
[ " mirror 0 = 0", " ((monomial n) a).mirror = (monomial n) a", " p.mirror.natDegree = p.natDegree", " p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0", " p.mirror.natTrailingDegree = p.natTrailingDegree", " p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree)) n)", "...
[ " mirror 0 = 0", " ((monomial n) a).mirror = (monomial n) a", " p.mirror.natDegree = p.natDegree", " p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0", " p.mirror.natTrailingDegree = p.natTrailingDegree", " p.mirror.coeff n = p.coeff ((revAt (p.natDegree + p.natTrailingDegree)) n)", "...
import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.FieldTheory.Minpoly.Field #align_import linear_algebra.eigenspace.minpoly from "leanprover-community/mathlib"@"c3216069e5f9369e6be586ccbfcde2592b3cec92" universe u v w namespace Module namespace End open Polynomial FiniteDimensional open scoped Poly...
Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
32
43
theorem eigenspace_aeval_polynomial_degree_1 (f : End K V) (q : K[X]) (hq : degree q = 1) : eigenspace f (-q.coeff 0 / q.leadingCoeff) = LinearMap.ker (aeval f q) := calc eigenspace f (-q.coeff 0 / q.leadingCoeff) _ = LinearMap.ker (q.leadingCoeff • f - algebraMap K (End K V) (-q.coeff 0)) := by
rw [eigenspace_div] intro h rw [leadingCoeff_eq_zero_iff_deg_eq_bot.1 h] at hq cases hq _ = LinearMap.ker (aeval f (C q.leadingCoeff * X + C (q.coeff 0))) := by rw [C_mul', aeval_def]; simp [algebraMap, Algebra.toRingHom] _ = LinearMap.ker (aeval f q) := by rwa...
[ " f.eigenspace (-q.coeff 0 / q.leadingCoeff) =\n LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0))", " q.leadingCoeff ≠ 0", " False", " LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0)) =\n LinearMap.ker ((aeval f) (C q.leadingCoeff * X + C (q.coeff 0)))...
[]
import Mathlib.NumberTheory.Padics.PadicIntegers import Mathlib.RingTheory.ZMod #align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" noncomputable section open scoped Classical open Nat LocalRing Padic namespace PadicInt variable {p : ℕ} [h...
Mathlib/NumberTheory/Padics/RingHoms.lean
563
575
theorem nthHomSeq_mul (r s : R) : nthHomSeq f_compat (r * s) ≈ nthHomSeq f_compat r * nthHomSeq f_compat s := by
intro ε hε obtain ⟨n, hn⟩ := exists_pow_neg_lt_rat p hε use n intro j hj dsimp [nthHomSeq] apply lt_of_le_of_lt _ hn rw [← Int.cast_mul, ← Int.cast_sub, ← padicNorm.dvd_iff_norm_le, ← ZMod.intCast_zmod_eq_zero_iff_dvd] dsimp [nthHom] simp only [ZMod.natCast_val, RingHom.map_mul, Int.cast_sub, ZMo...
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
import Mathlib.Geometry.Manifold.MFDeriv.Defs #align_import geometry.manifold.mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Topology Manifold open Set Bundle section DerivativesProperties variable {𝕜 : Type*} [NontriviallyNormedFiel...
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
54
59
theorem uniqueMDiffWithinAt_iff {s : Set M} {x : M} : UniqueMDiffWithinAt I s x ↔ UniqueDiffWithinAt 𝕜 ((extChartAt I x).symm ⁻¹' s ∩ (extChartAt I x).target) ((extChartAt I x) x) := by
apply uniqueDiffWithinAt_congr rw [nhdsWithin_inter, nhdsWithin_inter, nhdsWithin_extChartAt_target_eq]
[ " UniqueMDiffWithinAt I univ x", " UniqueDiffWithinAt 𝕜 (↑(extChartAt I x).symm ⁻¹' univ ∩ range ↑I) (↑(extChartAt I x) x)", " UniqueDiffWithinAt 𝕜 (range ↑I) (↑(extChartAt I x) x)", " UniqueMDiffWithinAt I s x ↔\n UniqueDiffWithinAt 𝕜 (↑(extChartAt I x).symm ⁻¹' s ∩ (extChartAt I x).target) (↑(extChart...
[ " UniqueMDiffWithinAt I univ x", " UniqueDiffWithinAt 𝕜 (↑(extChartAt I x).symm ⁻¹' univ ∩ range ↑I) (↑(extChartAt I x) x)", " UniqueDiffWithinAt 𝕜 (range ↑I) (↑(extChartAt I x) x)" ]
import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Combinatorics.SetFamily.Compression.Down import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Fintype.Powerset #align_import combinatorics.set_family.harris_kleitman from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" open Finset...
Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
55
91
theorem IsLowerSet.le_card_inter_finset' (h𝒜 : IsLowerSet (𝒜 : Set (Finset α))) (hℬ : IsLowerSet (ℬ : Set (Finset α))) (h𝒜s : ∀ t ∈ 𝒜, t ⊆ s) (hℬs : ∀ t ∈ ℬ, t ⊆ s) : 𝒜.card * ℬ.card ≤ 2 ^ s.card * (𝒜 ∩ ℬ).card := by
induction' s using Finset.induction with a s hs ih generalizing 𝒜 ℬ · simp_rw [subset_empty, ← subset_singleton_iff', subset_singleton_iff] at h𝒜s hℬs obtain rfl | rfl := h𝒜s · simp only [card_empty, zero_mul, empty_inter, mul_zero, le_refl] obtain rfl | rfl := hℬs · simp only [card_empty, inter...
[ " s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)", " s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t", " IsLowerSet ↑(Finset.memberSubfamily a 𝒜)", " s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)", " insert a s ∈ 𝒜 ∧ a ∉ s → insert a t ∈ 𝒜 ∧ a ∉ t", " s ∈ Finset...
[ " s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)", " s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t", " IsLowerSet ↑(Finset.memberSubfamily a 𝒜)", " s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)", " insert a s ∈ 𝒜 ∧ a ∉ s → insert a t ∈ 𝒜 ∧ a ∉ t", " s ∈ Finset...
import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Support #align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace List variable {α β : Type*} section FormPerm variable [DecidableEq α] (l :...
Mathlib/GroupTheory/Perm/List.lean
116
128
theorem formPerm_apply_mem_of_mem (h : x ∈ l) : formPerm l x ∈ l := by
cases' l with y l · simp at h induction' l with z l IH generalizing x y · simpa using h · by_cases hx : x ∈ z :: l · rw [formPerm_cons_cons, mul_apply, swap_apply_def] split_ifs · simp [IH _ hx] · simp · simp [*] · replace h : x = y := Or.resolve_right (mem_cons.1 h) hx ...
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Init.Data.Ordering.Lemmas import Mathlib.SetTheory.Ordinal.Principal import Mathlib.Tactic.NormNum #align_import set_theory.ordinal.notation from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d" set_option linter.uppercaseLean3 ...
Mathlib/SetTheory/Ordinal/Notation.lean
150
150
theorem repr_ofNat (n : ℕ) : repr (ofNat n) = n := by
cases n <;> simp
[ " (↑n).repr = ↑n", " (↑0).repr = ↑0", " (↑(n✝ + 1)).repr = ↑(n✝ + 1)" ]
[]
import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Basic #align_import algebra.euclidean_domain.basic from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d0...
Mathlib/Algebra/EuclideanDomain/Basic.lean
92
93
theorem eq_div_of_mul_eq_right {a b c : R} (ha : a ≠ 0) (h : a * b = c) : b = c / a := by
rw [← h, mul_div_cancel_left₀ _ ha]
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0", " a / a = 1", " a = c / b", " b = c / a" ]
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0", " a / a = 1", " a = c / b" ]
import Mathlib.Algebra.Module.Zlattice.Basic import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.NumberTheory.NumberField.FractionalIdeal #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" variable (K : Type*) [F...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
139
142
theorem latticeBasis_apply [NumberField K] (i : Free.ChooseBasisIndex ℤ (𝓞 K)) : latticeBasis K i = (canonicalEmbedding K) (integralBasis K i) := by
simp only [latticeBasis, integralBasis_apply, coe_basisOfLinearIndependentOfCardEqFinrank, Function.comp_apply, Equiv.apply_symm_apply]
[ " (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)", " ∀ x ∈ Set.range ⇑(canonicalEmbedding K), (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)", " (starRingEnd ℂ) ((canonicalEmbedding K) x φ) = (canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)", " (starRingEnd ℂ) (0 φ) = 0 (ComplexEmbe...
[ " (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)", " ∀ x ∈ Set.range ⇑(canonicalEmbedding K), (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)", " (starRingEnd ℂ) ((canonicalEmbedding K) x φ) = (canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)", " (starRingEnd ℂ) (0 φ) = 0 (ComplexEmbe...
import Mathlib.Data.List.Basic namespace List variable {α β : Type*} #align list.length_enum_from List.enumFrom_length #align list.length_enum List.enum_length @[simp] theorem get?_enumFrom : ∀ n (l : List α) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a) | n, [], m => rfl | n, a :: l, 0 =...
Mathlib/Data/List/Enum.lean
87
88
theorem fst_lt_of_mem_enum {x : ℕ × α} {l : List α} (h : x ∈ enum l) : x.1 < length l := by
simpa using fst_lt_add_of_mem_enumFrom h
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)", " (enumFrom n l)...
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)", " (enumFrom n l)...
import Mathlib.Topology.PartialHomeomorph import Mathlib.Topology.SeparatedMap #align_import topology.is_locally_homeomorph from "leanprover-community/mathlib"@"e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b" open Topology variable {X Y Z : Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] (g : Y →...
Mathlib/Topology/IsLocalHomeomorph.lean
90
99
theorem of_comp_left (hgf : IsLocalHomeomorphOn (g ∘ f) s) (hg : IsLocalHomeomorphOn g (f '' s)) (cont : ∀ x ∈ s, ContinuousAt f x) : IsLocalHomeomorphOn f s := mk f s fun x hx ↦ by obtain ⟨g, hxg, rfl⟩ := hg (f x) ⟨x, hx, rfl⟩ obtain ⟨gf, hgf, he⟩ := hgf x hx refine ⟨(gf.restr <| f ⁻¹' g.source).trans g.symm...
apply interior_subset hy.1.2 rw [← he, g.eq_symm_apply this (by apply g.map_source this), Function.comp_apply]
[ " IsLocalHomeomorphOn f s ↔ ∀ x ∈ s, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)", " ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)", " ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict ↑e)", " ∃ e, x ∈ e.source ∧ f = ↑e", " OpenEmbedding ((interior U).restrict f)", " IsOpen (Set.range (Set.inclusion ⋯))", " IsOpen {x | ↑x ...
[ " IsLocalHomeomorphOn f s ↔ ∀ x ∈ s, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)", " ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)", " ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict ↑e)", " ∃ e, x ∈ e.source ∧ f = ↑e", " OpenEmbedding ((interior U).restrict f)", " IsOpen (Set.range (Set.inclusion ⋯))", " IsOpen {x | ↑x ...
import Mathlib.MeasureTheory.MeasurableSpace.Defs import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.SetTheory.Cardinal.Continuum #align_import measure_theory.card_measurable_space from "leanprover-community/mathlib"@"f2b108e8e97ba393f22bf794989984ddcc1da89b" universe u variable {α : Type u} open Cardi...
Mathlib/MeasureTheory/MeasurableSpace/Card.lean
91
113
theorem cardinal_generateMeasurableRec_le (s : Set (Set α)) (i : ω₁) : #(generateMeasurableRec s i) ≤ max #s 2 ^ aleph0.{u} := by
apply (aleph 1).ord.out.wo.wf.induction i intro i IH have A := aleph0_le_aleph 1 have B : aleph 1 ≤ max #s 2 ^ aleph0.{u} := aleph_one_le_continuum.trans (power_le_power_right (le_max_right _ _)) have C : ℵ₀ ≤ max #s 2 ^ aleph0.{u} := A.trans B have J : #(⋃ j : Iio i, generateMeasurableRec s j.1) ≤ max...
[ " (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝", " s ⊆ generateMeasurableRec s i", " s ⊆\n let i := i;\n let S := ⋃ j, generateMeasurableRec s ↑j;\n s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ n, ↑(f n)", " s ⊆ s", " ∅ ∈ generateMeasurableRec s i", " ∅ ∈\n let i := i;\n l...
[ " (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝", " s ⊆ generateMeasurableRec s i", " s ⊆\n let i := i;\n let S := ⋃ j, generateMeasurableRec s ↑j;\n s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ n, ↑(f n)", " s ⊆ s", " ∅ ∈ generateMeasurableRec s i", " ∅ ∈\n let i := i;\n l...
import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.Factors import Mathlib.Order.Interval.Finset.Nat #align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped Classical open Finset namespace Nat variable (n : ℕ) d...
Mathlib/NumberTheory/Divisors.lean
79
81
theorem mem_properDivisors {m : ℕ} : n ∈ properDivisors m ↔ n ∣ m ∧ n < m := by
rcases eq_or_ne m 0 with (rfl | hm); · simp [properDivisors] simp only [and_comm, ← filter_dvd_eq_properDivisors hm, mem_filter, mem_range]
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
import Mathlib.Logic.Encodable.Basic import Mathlib.Order.Atoms import Mathlib.Order.Chain import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Set.Subsingleton #align_import order.ideal from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Function Set namespace Order variabl...
Mathlib/Order/Ideal.lean
191
195
theorem inter_nonempty [IsDirected P (· ≥ ·)] (I J : Ideal P) : (I ∩ J : Set P).Nonempty := by
obtain ⟨a, ha⟩ := I.nonempty obtain ⟨b, hb⟩ := J.nonempty obtain ⟨c, hac, hbc⟩ := exists_le_le a b exact ⟨c, I.lower hac ha, J.lower hbc hb⟩
[ " s = t", " { toLowerSet := toLowerSet✝, nonempty' := nonempty'✝, directed' := directed'✝ } = t", " { toLowerSet := toLowerSet✝¹, nonempty' := nonempty'✝¹, directed' := directed'✝¹ } =\n { toLowerSet := toLowerSet✝, nonempty' := nonempty'✝, directed' := directed'✝ }", " False", " (↑I ∩ ↑J).Nonempty" ]
[ " s = t", " { toLowerSet := toLowerSet✝, nonempty' := nonempty'✝, directed' := directed'✝ } = t", " { toLowerSet := toLowerSet✝¹, nonempty' := nonempty'✝¹, directed' := directed'✝¹ } =\n { toLowerSet := toLowerSet✝, nonempty' := nonempty'✝, directed' := directed'✝ }", " False" ]
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.extreme from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963" open Function Set open scoped Classical open Affine variable {𝕜 E F ι : Type*} {π : ι → Type*} section SMul variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoi...
Mathlib/Analysis/Convex/Extreme.lean
120
123
theorem isExtreme_biInter {F : Set (Set E)} (hF : F.Nonempty) (hA : ∀ B ∈ F, IsExtreme 𝕜 A B) : IsExtreme 𝕜 A (⋂ B ∈ F, B) := by
haveI := hF.to_subtype simpa only [iInter_subtype] using isExtreme_iInter fun i : F ↦ hA _ i.2
[ " IsExtreme 𝕜 A C", " x₁ ∈ C ∧ x₂ ∈ C", " IsExtreme 𝕜 A (B ∩ C)", " ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x : E⦄, x ∈ B ∩ C → x ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C", " x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C", " IsExtreme 𝕜 A (⋂ i, F i)", " x₁ ∈ ⋂ i, F i ∧ x₂ ∈ ⋂ i, F i", " (∀ (i : ι), x₁ ∈ F i...
[ " IsExtreme 𝕜 A C", " x₁ ∈ C ∧ x₂ ∈ C", " IsExtreme 𝕜 A (B ∩ C)", " ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x : E⦄, x ∈ B ∩ C → x ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C", " x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C", " IsExtreme 𝕜 A (⋂ i, F i)", " x₁ ∈ ⋂ i, F i ∧ x₂ ∈ ⋂ i, F i", " (∀ (i : ι), x₁ ∈ F i...
import Mathlib.Algebra.Group.Prod import Mathlib.Data.Set.Lattice #align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" assert_not_exists MonoidWithZero open Prod Decidable Function namespace Nat -- Porting note: no pp_nodot --@[pp_nodot] def pair (a b : ...
Mathlib/Data/Nat/Pairing.lean
49
56
theorem pair_unpair (n : ℕ) : pair (unpair n).1 (unpair n).2 = n := by
dsimp only [unpair]; let s := sqrt n have sm : s * s + (n - s * s) = n := Nat.add_sub_cancel' (sqrt_le _) split_ifs with h · simp [pair, h, sm] · have hl : n - s * s - s ≤ s := Nat.sub_le_iff_le_add.2 (Nat.sub_le_iff_le_add'.2 <| by rw [← Nat.add_assoc]; apply sqrt_le_add) simp [pair, hl.not_lt, Na...
[ " n.unpair.1.pair n.unpair.2 = n", " (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n", " ...
[]
import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Data.Finsupp.Fin import Mathlib.Data.Finsupp.Indicator #align_import algebra.bi...
Mathlib/Algebra/BigOperators/Finsupp.lean
115
119
theorem sum_ite_self_eq [DecidableEq α] {N : Type*} [AddCommMonoid N] (f : α →₀ N) (a : α) : (f.sum fun x v => ite (a = x) v 0) = f a := by
classical convert f.sum_ite_eq a fun _ => id simp [ite_eq_right_iff.2 Eq.symm]
[ " f.prod g = ∏ x ∈ s, g x (f x)", " f x = 0", " ∏ x ∈ {a}, h x ((single a b) x) = h a b", " h x✝¹ ((mapRange f hf g) x✝¹) = 1", " (f.prod fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1", " (∏ a_1 ∈ f.support, if a = a_1 then b a_1 (f a_1) else 1) = if a ∈ f.support then b ...
[ " f.prod g = ∏ x ∈ s, g x (f x)", " f x = 0", " ∏ x ∈ {a}, h x ((single a b) x) = h a b", " h x✝¹ ((mapRange f hf g) x✝¹) = 1", " (f.prod fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1", " (∏ a_1 ∈ f.support, if a = a_1 then b a_1 (f a_1) else 1) = if a ∈ f.support then b ...
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
165
168
theorem NormedAddGroupHom.ker_le_ker_completion (f : NormedAddGroupHom G H) : (toCompl.comp <| incl f.ker).range ≤ f.completion.ker := by
rintro _ ⟨⟨g, h₀ : f g = 0⟩, rfl⟩ simp [h₀, mem_ker, Completion.coe_zero]
[ " (id G).completion = id (Completion G)", " (id G).completion x = (id (Completion G)) x", " _root_.id x = (id (Completion G)) x", " g.completion.comp f.completion = (g.comp f).completion", " (g.completion.comp f.completion) x = (g.comp f).completion x", " Completion.map (⇑g ∘ ⇑f) x = Completion.map (⇑(g.c...
[ " (id G).completion = id (Completion G)", " (id G).completion x = (id (Completion G)) x", " _root_.id x = (id (Completion G)) x", " g.completion.comp f.completion = (g.comp f).completion", " (g.completion.comp f.completion) x = (g.comp f).completion x", " Completion.map (⇑g ∘ ⇑f) x = Completion.map (⇑(g.c...
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators #align_import data.sign from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c" -- Porting note (#11081): cannot automatically derive Fintype, adde...
Mathlib/Data/Sign.lean
168
168
theorem neg_one_lt_iff {a : SignType} : -1 < a ↔ 0 ≤ a := by
cases a <;> decide
[ " x ∈ ↑[zero, neg, pos]", " zero ∈ ↑[zero, neg, pos]", " neg ∈ ↑[zero, neg, pos]", " pos ∈ ↑[zero, neg, pos]", " Decidable (a.LE b)", " Decidable (SignType.zero.LE b)", " Decidable (neg.LE b)", " Decidable (pos.LE b)", " Decidable (SignType.zero.LE SignType.zero)", " SignType.zero.LE SignType.zero...
[ " x ∈ ↑[zero, neg, pos]", " zero ∈ ↑[zero, neg, pos]", " neg ∈ ↑[zero, neg, pos]", " pos ∈ ↑[zero, neg, pos]", " Decidable (a.LE b)", " Decidable (SignType.zero.LE b)", " Decidable (neg.LE b)", " Decidable (pos.LE b)", " Decidable (SignType.zero.LE SignType.zero)", " SignType.zero.LE SignType.zero...
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Nat import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.OrderOfElement import Mathlib.RingTheory.Fintype import Mathlib.Tactic.IntervalCases #align_import number_the...
Mathlib/NumberTheory/LucasLehmer.lean
138
142
theorem sMod_nonneg (p : ℕ) (hp : p ≠ 0) (i : ℕ) : 0 ≤ sMod p i := by
cases i <;> dsimp [sMod] · exact sup_eq_right.mp rfl · apply Int.emod_nonneg exact mersenne_int_ne_zero p hp
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2", " 0 ≤ sMod p i", " 0 ≤ sMod p 0", " 0 ≤ sMod p (n✝ + 1)", " 0 ≤ 4 % (2 ^ p - 1)", " 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)", " 2 ^ p - 1 ≠ 0" ]
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2" ]
import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Sum import Mathlib.SetTheory.Cardinal.Finite #align_import data.fintype.units from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" variable {α : Type*} instance UnitsInt.fintype : Fintype ℤˣ := ⟨{1, -1}, fun x ↦ by cases Int...
Mathlib/Data/Fintype/Units.lean
42
46
theorem Nat.card_eq_card_units_add_one [GroupWithZero α] [Finite α] : Nat.card α = Nat.card αˣ + 1 := by
have : Fintype α := Fintype.ofFinite α classical rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card, Fintype.card_eq_card_units_add_one]
[ " x ∈ {1, -1}", " card α = card αˣ + 1", " card { a // a ≠ 0 } + 1 = card α", " Nat.card α = Nat.card αˣ + 1" ]
[ " x ∈ {1, -1}", " card α = card αˣ + 1", " card { a // a ≠ 0 } + 1 = card α" ]
import Mathlib.Algebra.Module.MinimalAxioms import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Topolo...
Mathlib/Topology/ContinuousFunction/Bounded.lean
158
162
theorem dist_set_exists : ∃ C, 0 ≤ C ∧ ∀ x : α, dist (f x) (g x) ≤ C := by
rcases isBounded_iff.1 (f.isBounded_range.union g.isBounded_range) with ⟨C, hC⟩ refine ⟨max 0 C, le_max_left _ _, fun x => (hC ?_ ?_).trans (le_max_right _ _)⟩ <;> [left; right] <;> apply mem_range_self
[ " f = g", " { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_bounded' := map_bounded'✝ } = g", " { toFun := toFun✝¹, continuous_toFun := continuous_toFun✝¹, map_bounded' := map_bounded'✝¹ } =\n { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_bounded' := map_bounded'✝ }", " ∃ C, 0...
[ " f = g", " { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_bounded' := map_bounded'✝ } = g", " { toFun := toFun✝¹, continuous_toFun := continuous_toFun✝¹, map_bounded' := map_bounded'✝¹ } =\n { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_bounded' := map_bounded'✝ }" ]
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
188
190
theorem biUnion_Ioc_eq_Ioi_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} : ⋃ (i) (hi : p i), Ioc a (f i hi) = Ioi a ↔ ∀ x, a < x → ∃ i hi, x ≤ f i hi := by
simp [← Ioi_inter_Iic, ← inter_iUnion, 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", " ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ (x : α), a < ...
[ " 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", " ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ (x : α), a < ...
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
132
134
theorem logb_rpow : logb b (b ^ x) = x := by
rw [logb, div_eq_iff, log_rpow b_pos] exact log_b_ne_zero b_pos b_ne_one
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y", " b.logb (x / y) = b.logb x - b.logb y", " b.logb x⁻¹ = -b.logb x", " (a.logb b)⁻¹ = b.logb a", " ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹", " c.logb ...
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y", " b.logb (x / y) = b.logb x - b.logb y", " b.logb x⁻¹ = -b.logb x", " (a.logb b)⁻¹ = b.logb a", " ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹", " c.logb ...
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {α : Type u} class OrderedAddCommGroup (α : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
171
173
theorem lt_inv_mul_iff_mul_lt : b < a⁻¹ * c ↔ a * b < c := by
rw [← mul_lt_mul_iff_left a] simp
[ " b ≤ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a", " b < a⁻¹ * c ↔ a * b < c", " a * b < a * (a⁻¹ * c) ↔ a * b < c" ]
[ " b ≤ c", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ < 1 ↔ 1 < a" ]
import Mathlib.Analysis.Complex.AbsMax import Mathlib.Analysis.Asymptotics.SuperpolynomialDecay #align_import analysis.complex.phragmen_lindelof from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function Filter Asymptotics Metric Complex Bornology open scoped Topology Filter R...
Mathlib/Analysis/Complex/PhragmenLindelof.lean
63
74
theorem isBigO_sub_exp_exp {a : ℝ} {f g : ℂ → E} {l : Filter ℂ} {u : ℂ → ℝ} (hBf : ∃ c < a, ∃ B, f =O[l] fun z => expR (B * expR (c * |u z|))) (hBg : ∃ c < a, ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))) : ∃ c < a, ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|)) := by
have : ∀ {c₁ c₂ B₁ B₂}, c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ z, ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖ := fun hc hB₀ hB z ↦ by simp only [Real.norm_eq_abs, Real.abs_exp]; gcongr rcases hBf with ⟨cf, hcf, Bf, hOf⟩; rcases hBg with ⟨cg, hcg, Bg, hOg⟩ refine ⟨max cf cg, max_lt hcf hcg...
[ " ∃ c < a, ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|))", " ‖expR (B₁✝ * expR (c₁✝ * |u z|))‖ ≤ ‖expR (B₂✝ * expR (c₂✝ * |u z|))‖", " expR (B₁✝ * expR (c₁✝ * |u z|)) ≤ expR (B₂✝ * expR (c₂✝ * |u z|))", " (f - g) =O[l] fun z => expR (max 0 (max Bf Bg) * expR (max cf cg * |u z|))", " Bg ≤ max 0 (ma...
[]
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Topology.Algebra.Module.Basic #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set Function Filter open scoped NNReal Topology instance Real.punctured_nhds_module_neBot {E ...
Mathlib/Analysis/NormedSpace/Real.lean
46
47
theorem norm_smul_of_nonneg {t : ℝ} (ht : 0 ≤ t) (x : E) : ‖t • x‖ = t * ‖x‖ := by
rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg ht]
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1", " ‖t • x‖ = t * ‖x‖" ]
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1" ]
import Mathlib.RingTheory.FractionalIdeal.Basic import Mathlib.RingTheory.Ideal.Norm namespace FractionalIdeal open scoped Pointwise nonZeroDivisors variable {R : Type*} [CommRing R] [IsDedekindDomain R] [Module.Free ℤ R] [Module.Finite ℤ R] variable {K : Type*} [CommRing K] [Algebra R K] [IsFractionRing R K] th...
Mathlib/RingTheory/FractionalIdeal/Norm.lean
97
100
theorem coeIdeal_absNorm (I₀ : Ideal R) : absNorm (I₀ : FractionalIdeal R⁰ K) = Ideal.absNorm I₀ := by
rw [absNorm_eq' 1 I₀ (by rw [one_smul]; rfl), OneMemClass.coe_one, _root_.map_one, abs_one, Int.cast_one, _root_.div_one]
[ " ↑(Ideal.absNorm I.num) / ↑|(Algebra.norm ℤ) ↑I.den| = ↑(Ideal.absNorm I₀) / ↑|(Algebra.norm ℤ) ↑a|", " ↑(Ideal.absNorm I.num) * ↑|(Algebra.norm ℤ) ↑a| = ↑(Ideal.absNorm I₀) * ↑|(Algebra.norm ℤ) ↑I.den|", " ↑(Ideal.absNorm I.num * Ideal.absNorm (Ideal.span {↑a})) = ↑(Ideal.absNorm I₀ * Ideal.absNorm (Ideal.spa...
[ " ↑(Ideal.absNorm I.num) / ↑|(Algebra.norm ℤ) ↑I.den| = ↑(Ideal.absNorm I₀) / ↑|(Algebra.norm ℤ) ↑a|", " ↑(Ideal.absNorm I.num) * ↑|(Algebra.norm ℤ) ↑a| = ↑(Ideal.absNorm I₀) * ↑|(Algebra.norm ℤ) ↑I.den|", " ↑(Ideal.absNorm I.num * Ideal.absNorm (Ideal.span {↑a})) = ↑(Ideal.absNorm I₀ * Ideal.absNorm (Ideal.spa...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Choose.Sum import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f" namespace PowerS...
Mathlib/RingTheory/PowerSeries/WellKnown.lean
60
61
theorem invUnitsSub_mul_sub (u : Rˣ) : invUnitsSub u * (C R u - X) = 1 := by
simp [mul_sub, sub_sub_cancel]
[ " (constantCoeff R) (invUnitsSub u) = 1 /ₚ u", " invUnitsSub u * X = invUnitsSub u * (C R) ↑u - 1", " (coeff R 0) (invUnitsSub u * X) = (coeff R 0) (invUnitsSub u * (C R) ↑u - 1)", " (coeff R (n + 1)) (invUnitsSub u * X) = (coeff R (n + 1)) (invUnitsSub u * (C R) ↑u - 1)", " invUnitsSub u * ((C R) ↑u - X) =...
[ " (constantCoeff R) (invUnitsSub u) = 1 /ₚ u", " invUnitsSub u * X = invUnitsSub u * (C R) ↑u - 1", " (coeff R 0) (invUnitsSub u * X) = (coeff R 0) (invUnitsSub u * (C R) ↑u - 1)", " (coeff R (n + 1)) (invUnitsSub u * X) = (coeff R (n + 1)) (invUnitsSub u * (C R) ↑u - 1)" ]
import Mathlib.Data.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign theorem sign_of_neg {r : ℝ} (hr : r < 0) : si...
Mathlib/Data/Real/Sign.lean
74
79
theorem sign_intCast (z : ℤ) : sign (z : ℝ) = ↑(Int.sign z) := by
obtain hn | rfl | hp := lt_trichotomy z (0 : ℤ) · rw [sign_of_neg (Int.cast_lt_zero.mpr hn), Int.sign_eq_neg_one_of_neg hn, Int.cast_neg, Int.cast_one] · rw [Int.cast_zero, sign_zero, Int.sign_zero, Int.cast_zero] · rw [sign_of_pos (Int.cast_pos.mpr hp), Int.sign_eq_one_of_pos hp, Int.cast_one]
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)" ]
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0" ]
import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators #align_import data.sign from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c" -- Porting note (#11081): cannot automatically derive Fintype, adde...
Mathlib/Data/Sign.lean
177
177
theorem lt_one_iff {a : SignType} : a < 1 ↔ a ≤ 0 := by
cases a <;> decide
[ " x ∈ ↑[zero, neg, pos]", " zero ∈ ↑[zero, neg, pos]", " neg ∈ ↑[zero, neg, pos]", " pos ∈ ↑[zero, neg, pos]", " Decidable (a.LE b)", " Decidable (SignType.zero.LE b)", " Decidable (neg.LE b)", " Decidable (pos.LE b)", " Decidable (SignType.zero.LE SignType.zero)", " SignType.zero.LE SignType.zero...
[ " x ∈ ↑[zero, neg, pos]", " zero ∈ ↑[zero, neg, pos]", " neg ∈ ↑[zero, neg, pos]", " pos ∈ ↑[zero, neg, pos]", " Decidable (a.LE b)", " Decidable (SignType.zero.LE b)", " Decidable (neg.LE b)", " Decidable (pos.LE b)", " Decidable (SignType.zero.LE SignType.zero)", " SignType.zero.LE SignType.zero...
import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.DMatrix import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.Tactic.FieldSimp #align_import linear_algebra.matrix.transvection from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e...
Mathlib/LinearAlgebra/Matrix/Transvection.lean
136
137
theorem mul_transvection_apply_of_ne (a b : n) (hb : b ≠ j) (c : R) (M : Matrix n n R) : (M * transvection i j c) a b = M a b := by
simp [transvection, Matrix.mul_add, hb]
[ " transvection i j 0 = 1", " updateRow 1 i (1 i + c • 1 j) = transvection i j c", " updateRow 1 i (1 i + c • 1 j) a b = transvection i j c a b", " transvection i j c * transvection i j d = transvection i j (c + d)", " (transvection i j c * M) i b = M i b + c * M j b", " (M * transvection i j c) a j = M a ...
[ " transvection i j 0 = 1", " updateRow 1 i (1 i + c • 1 j) = transvection i j c", " updateRow 1 i (1 i + c • 1 j) a b = transvection i j c a b", " transvection i j c * transvection i j d = transvection i j (c + d)", " (transvection i j c * M) i b = M i b + c * M j b", " (M * transvection i j c) a j = M a ...
import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.ZMod.Algebra import Mathlib.FieldTheory.Finite.Basic import Mathlib.FieldTheory.Galois import Mathlib.FieldTheory.SplittingField.IsSplittingField #align_import field_theory.finite.galois_field from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb330...
Mathlib/FieldTheory/Finite/GaloisField.lean
55
60
theorem galois_poly_separable {K : Type*} [Field K] (p q : ℕ) [CharP K p] (h : p ∣ q) : Separable (X ^ q - X : K[X]) := by
use 1, X ^ q - X - 1 rw [← CharP.cast_eq_zero_iff K[X] p] at h rw [derivative_sub, derivative_X_pow, derivative_X, C_eq_natCast, h] ring
[ " Splits (algebraMap F K) (X ^ Fintype.card K - X)", " Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = ⊤", " Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset", " Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset = ⊤", " (X ^ q ...
[ " Splits (algebraMap F K) (X ^ Fintype.card K - X)", " Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = ⊤", " Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset", " Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset = ⊤" ]
import Mathlib.Topology.Algebra.UniformGroup import Mathlib.Topology.UniformSpace.Pi import Mathlib.Data.Matrix.Basic #align_import topology.uniform_space.matrix from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Uniformity Topology variable (m n 𝕜 : Type*) [UniformSpace 𝕜] na...
Mathlib/Topology/UniformSpace/Matrix.lean
37
40
theorem uniformContinuous {β : Type*} [UniformSpace β] {f : β → Matrix m n 𝕜} : UniformContinuous f ↔ ∀ i j, UniformContinuous fun x => f x i j := by
simp only [UniformContinuous, Matrix.uniformity, Filter.tendsto_iInf, Filter.tendsto_comap_iff] apply Iff.intro <;> intro a <;> apply a
[ " UniformSpace (m → n → 𝕜)", " 𝓤 (Matrix m n 𝕜) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)", " ⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (n → 𝕜)) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)", " ⨅ i, ⨅ i_1, Filter.comap ((fun a => (a.1 i_1, a.2 i_1)) ∘ fun a => ...
[ " UniformSpace (m → n → 𝕜)", " 𝓤 (Matrix m n 𝕜) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)", " ⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (n → 𝕜)) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)", " ⨅ i, ⨅ i_1, Filter.comap ((fun a => (a.1 i_1, a.2 i_1)) ∘ fun a => ...
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic import Mathlib.RingTheory.Polynomial.Basic #align_import algebraic_geometry.prime_spectrum.is_open_comap_C from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" open Ideal Polynomial PrimeSpectrum Set namespace AlgebraicGeometry names...
Mathlib/AlgebraicGeometry/PrimeSpectrum/IsOpenComapC.lean
74
79
theorem isOpenMap_comap_C : IsOpenMap (PrimeSpectrum.comap (C : R →+* R[X])) := by
rintro U ⟨s, z⟩ rw [← compl_compl U, ← z, ← iUnion_of_singleton_coe s, zeroLocus_iUnion, compl_iInter, image_iUnion] simp_rw [← imageOfDf_eq_comap_C_compl_zeroLocus] exact isOpen_iUnion fun f => isOpen_imageOfDf
[ " IsOpen (imageOfDf f)", " IsOpen (⋃ i, {x | f.coeff i ∉ x.asIdeal})", " imageOfDf f = ⇑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ", " x ∈ imageOfDf f ↔ x ∈ ⇑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ", " { asIdeal := Ideal.map C x.asIdeal, IsPrime := ⋯ } ∈ (zeroLocus {f})ᶜ", " f ∉ ↑{ asIdeal := Ideal.m...
[ " IsOpen (imageOfDf f)", " IsOpen (⋃ i, {x | f.coeff i ∉ x.asIdeal})", " imageOfDf f = ⇑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ", " x ∈ imageOfDf f ↔ x ∈ ⇑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ", " { asIdeal := Ideal.map C x.asIdeal, IsPrime := ⋯ } ∈ (zeroLocus {f})ᶜ", " f ∉ ↑{ asIdeal := Ideal.m...
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
110
111
theorem gradient_eq_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : ∇ f x = 0 := by
rw [gradient, fderiv_zero_of_not_differentiableAt h, map_zero]
[ " 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" ]
[ " HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x", " HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Order.Bounds.OrderIso import Mathlib.Tactic.Positivity.Core #align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477...
Mathlib/Algebra/Order/Field/Basic.lean
93
93
theorem div_lt_iff' (hc : 0 < c) : b / c < a ↔ b < c * a := by
rw [mul_comm, div_lt_iff hc]
[ " a ≤ b / c ↔ c * a ≤ b", " a = a / b * b", " c * b / b = c", " a / b ≤ c ↔ a ≤ b * c", " a / b ≤ c ↔ a / c ≤ b", " a < b / c ↔ c * a < b", " b / c < a ↔ b < c * a" ]
[ " a ≤ b / c ↔ c * a ≤ b", " a = a / b * b", " c * b / b = c", " a / b ≤ c ↔ a ≤ b * c", " a / b ≤ c ↔ a / c ≤ b", " a < b / c ↔ c * a < b" ]
import Mathlib.Topology.ContinuousOn import Mathlib.Order.Filter.SmallSets #align_import topology.locally_finite from "leanprover-community/mathlib"@"55d771df074d0dd020139ee1cd4b95521422df9f" -- locally finite family [General Topology (Bourbaki, 1995)] open Set Function Filter Topology variable {ι ι' α X Y : Type...
Mathlib/Topology/LocallyFinite.lean
91
101
theorem continuousOn_iUnion' {g : X → Y} (hf : LocallyFinite f) (hc : ∀ i x, x ∈ closure (f i) → ContinuousWithinAt g (f i) x) : ContinuousOn g (⋃ i, f i) := by
rintro x - rw [ContinuousWithinAt, hf.nhdsWithin_iUnion, tendsto_iSup] intro i by_cases hx : x ∈ closure (f i) · exact hc i _ hx · rw [mem_closure_iff_nhdsWithin_neBot, not_neBot] at hx rw [hx] exact tendsto_bot
[ " ∃ t ∈ 𝓝 x, {i | ((f ∘ g) i ∩ t).Nonempty}.Finite", " InjOn (fun i => g i) ((fun i => g i) ⁻¹' {i | (f i ∩ t).Nonempty})", " 𝓝[⋃ i, f i] a = ⨆ i, 𝓝[f i] a", " 𝓝[⋃ i, f i] a ≤ ⨆ i, 𝓝[f i] a", " 𝓝[⋃ i, f i] a = 𝓝[⋃ i, f i ∩ U] a", " 𝓝[⋃ i, f i ∩ U] a = 𝓝[⋃ i ∈ {j | (f j ∩ U).Nonempty}, f i ∩ U] a"...
[ " ∃ t ∈ 𝓝 x, {i | ((f ∘ g) i ∩ t).Nonempty}.Finite", " InjOn (fun i => g i) ((fun i => g i) ⁻¹' {i | (f i ∩ t).Nonempty})", " 𝓝[⋃ i, f i] a = ⨆ i, 𝓝[f i] a", " 𝓝[⋃ i, f i] a ≤ ⨆ i, 𝓝[f i] a", " 𝓝[⋃ i, f i] a = 𝓝[⋃ i, f i ∩ U] a", " 𝓝[⋃ i, f i ∩ U] a = 𝓝[⋃ i ∈ {j | (f j ∩ U).Nonempty}, f i ∩ U] a"...
import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.NormedSpace.Connected import Mathlib.LinearAlgebra.AffineSpace.ContinuousAffineEquiv open Set variable {F : Type*} [AddCommGroup F] [Module ℝ F] [TopologicalSpace F] def AmpleSet (s : Set F) : Prop := ∀ x ∈ s, convexHull ℝ (connectedComponentIn s ...
Mathlib/Analysis/Convex/AmpleSet.lean
65
74
theorem union {s t : Set F} (hs : AmpleSet s) (ht : AmpleSet t) : AmpleSet (s ∪ t) := by
intro x hx rcases hx with (h | h) <;> -- The connected component of `x ∈ s` in `s ∪ t` contains the connected component of `x` in `s`, -- hence is also full; similarly for `t`. [have hx := hs x h; have hx := ht x h] <;> rw [← Set.univ_subset_iff, ← hx] <;> apply convexHull_mono <;> apply connectedCompo...
[ " AmpleSet univ", " (convexHull ℝ) (connectedComponentIn univ x) = univ", " AmpleSet (s ∪ t)", " (convexHull ℝ) (connectedComponentIn (s ∪ t) x) = univ", " (convexHull ℝ) (connectedComponentIn s x) ⊆ (convexHull ℝ) (connectedComponentIn (s ∪ t) x)", " (convexHull ℝ) (connectedComponentIn t x) ⊆ (convexHul...
[ " AmpleSet univ", " (convexHull ℝ) (connectedComponentIn univ x) = univ" ]
import Mathlib.Probability.Notation import Mathlib.Probability.Integration import Mathlib.MeasureTheory.Function.L2Space #align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open MeasureTheory Filter Finset noncomputable section open scoped MeasureThe...
Mathlib/Probability/Variance.lean
92
97
theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) : evariance X μ < ∞ ↔ Memℒp X 2 μ := by
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩ contrapose rw [not_lt, top_le_iff] exact evariance_eq_top hX
[ " evariance X μ < ⊤", " evariance X μ = ⊤", " False", " Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ", " snorm (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2) < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ...
[ " evariance X μ < ⊤", " evariance X μ = ⊤", " False", " Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ", " snorm (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2) < ⊤", " (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ...
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
146
161
theorem acc_iff_wellFoundedOn {α} {r : α → α → Prop} {a : α} : TFAE [Acc r a, WellFoundedOn { b | ReflTransGen r b a } r, WellFoundedOn { b | TransGen r b a } r] := by
tfae_have 1 → 2 · refine fun h => ⟨fun b => InvImage.accessible _ ?_⟩ rw [← acc_transGen_iff] at h ⊢ obtain h' | h' := reflTransGen_iff_eq_or_transGen.1 b.2 · rwa [h'] at h · exact h.inv h' tfae_have 2 → 3 · exact fun h => h.subset fun _ => TransGen.to_reflTransGen tfae_have 3 → 1 · refine ...
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) section AddEdge def edge : SimpleGraph V := fromEdgeSet {s(s, t)} lemma edge_adj (v w : V) : (edge s t).Adj v w ↔ ...
Mathlib/Combinatorics/SimpleGraph/Operations.lean
177
179
theorem card_edgeFinset_sup_edge [Fintype (edgeSet (G ⊔ edge s t))] (hn : ¬G.Adj s t) (h : s ≠ t) : (G ⊔ edge s t).edgeFinset.card = G.edgeFinset.card + 1 := by
rw [G.edgeFinset_sup_edge hn h, card_cons]
[ " (edge s t).Adj v w ↔ (v = s ∧ w = t ∨ v = t ∧ w = s) ∧ v ≠ w", " Decidable ((edge s t).Adj x✝¹ x✝)", " Decidable ((x✝¹ = s ∧ x✝ = t ∨ x✝¹ = t ∧ x✝ = s) ∧ x✝¹ ≠ x✝)", " edge s s = ⊥", " (edge s s).Adj x✝¹ x✝ ↔ ⊥.Adj x✝¹ x✝", " (x✝¹ = s ∧ x✝ = s ∨ x✝¹ = s ∧ x✝ = s) ∧ x✝¹ ≠ x✝ ↔ ⊥.Adj x✝¹ x✝", " G ⊔ edge...
[ " (edge s t).Adj v w ↔ (v = s ∧ w = t ∨ v = t ∧ w = s) ∧ v ≠ w", " Decidable ((edge s t).Adj x✝¹ x✝)", " Decidable ((x✝¹ = s ∧ x✝ = t ∨ x✝¹ = t ∧ x✝ = s) ∧ x✝¹ ≠ x✝)", " edge s s = ⊥", " (edge s s).Adj x✝¹ x✝ ↔ ⊥.Adj x✝¹ x✝", " (x✝¹ = s ∧ x✝ = s ∨ x✝¹ = s ∧ x✝ = s) ∧ x✝¹ ≠ x✝ ↔ ⊥.Adj x✝¹ x✝", " G ⊔ edge...
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
86
88
theorem Integrable.inner_const (hf : Integrable f μ) (c : E) : Integrable (fun x => ⟪f x, c⟫) μ := by
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.inner_const c
[ " 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", " ‖⟪f x, c⟫_𝕜‖ ≤ ?m.10094 * ‖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", " ‖⟪f x, c⟫_𝕜‖ ≤ ?m.10094 * ‖f ...
import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.List.Infix import Mathlib.Data.List.MinMax import Mathlib.Data.List.EditDistance.Defs set_option autoImplicit true variable {C : Levenshtein.Cost α β δ} [CanonicallyLinearOrderedAddCommMonoid δ] theorem suffixLevenshtein_minimum_le_levenshtein...
Mathlib/Data/List/EditDistance/Bounds.lean
81
87
theorem suffixLevenshtein_minimum_le_levenshtein_append (xs ys₁ ys₂) : (suffixLevenshtein C xs ys₂).1.minimum ≤ levenshtein C xs (ys₁ ++ ys₂) := by
cases ys₁ with | nil => exact List.minimum_le_of_mem' (List.get_mem _ _ _) | cons y ys₁ => exact (le_suffixLevenshtein_append_minimum _ _ _).trans (suffixLevenshtein_minimum_le_levenshtein_cons _ _ _)
[ " (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))", " (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))", " levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys", " 0 ≤ C.insert y", " (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :...
[ " (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))", " (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))", " levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys", " 0 ≤ C.insert y", " (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :...
import Batteries.Data.List.Lemmas import Batteries.Tactic.Classical import Mathlib.Tactic.TypeStar import Mathlib.Mathport.Rename #align_import data.list.tfae from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" namespace List def TFAE (l : List Prop) : Prop := ∀ x ∈ l, ∀ y ∈ l, x ↔ ...
Mathlib/Data/List/TFAE.lean
37
37
theorem tfae_singleton (p) : TFAE [p] := by
simp [TFAE, -eq_iff_iff]
[ " [p].TFAE" ]
[]
import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.supported from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" universe u v w namespace MvPolynomial variable {σ τ : Type*} {R : Type u} {S : Type v} {r : R} {e : ℕ} {n m : σ} section CommSemiring variable...
Mathlib/Algebra/MvPolynomial/Supported.lean
107
107
theorem supported_empty : supported R (∅ : Set σ) = ⊥ := by
simp [supported_eq_adjoin_X]
[ " supported R s = (rename Subtype.val).range", " (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range", " (supportedEquivMvPolynomial s).symm (C x) = (algebraMap R ↥(supported R s)) x", " ↑((supportedEquivMvPolynomial s).symm (C x)) = ↑((algebraMap R ↥(supported R s)) x)", " ↑((supportedEquivMvPoly...
[ " supported R s = (rename Subtype.val).range", " (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range", " (supportedEquivMvPolynomial s).symm (C x) = (algebraMap R ↥(supported R s)) x", " ↑((supportedEquivMvPolynomial s).symm (C x)) = ↑((algebraMap R ↥(supported R s)) x)", " ↑((supportedEquivMvPoly...
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {α...
Mathlib/Topology/Algebra/WithZeroTopology.lean
120
121
theorem tendsto_of_ne_zero {γ : Γ₀} (h : γ ≠ 0) : Tendsto f l (𝓝 γ) ↔ ∀ᶠ x in l, f x = γ := by
rw [nhds_of_ne_zero h, tendsto_pure]
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {α β γ δ : Type*} {f : α → β → γ} {a : Option α} {b : Option β} {c : Option γ} def map₂ (f : α → β → γ) (a : Option α) ...
Mathlib/Data/Option/NAry.lean
134
137
theorem map₂_left_comm {f : α → δ → ε} {g : β → γ → δ} {f' : α → γ → δ'} {g' : β → δ' → ε} (h_left_comm : ∀ a b c, f a (g b c) = g' b (f' a c)) : map₂ f a (map₂ g b c) = map₂ g' b (map₂ f' a c) := by
cases a <;> cases b <;> cases c <;> simp [h_left_comm]
[ " map₂ f a b = Seq.seq (f <$> a) fun x => b", " map₂ f none b = Seq.seq (f <$> none) fun x => b", " map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " map₂ f a none = none", " map₂ f none none = none", " map₂ f (some val✝) none = none", " map₂ f a (some b) = Option.map (fun a => f a b) a", ...
[ " map₂ f a b = Seq.seq (f <$> a) fun x => b", " map₂ f none b = Seq.seq (f <$> none) fun x => b", " map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " map₂ f a none = none", " map₂ f none none = none", " map₂ f (some val✝) none = none", " map₂ f a (some b) = Option.map (fun a => f a b) a", ...
import Mathlib.Topology.Order.MonotoneContinuity import Mathlib.Topology.Algebra.Order.LiminfLimsup import Mathlib.Topology.Instances.NNReal import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.Metrizable.Basic import Mathlib.Topology.Order.T5 #align_import topology.instances.ennreal from "leanprove...
Mathlib/Topology/Instances/ENNReal.lean
123
127
theorem eventuallyEq_of_toReal_eventuallyEq {l : Filter α} {f g : α → ℝ≥0∞} (hfi : ∀ᶠ x in l, f x ≠ ∞) (hgi : ∀ᶠ x in l, g x ≠ ∞) (hfg : (fun x => (f x).toReal) =ᶠ[l] fun x => (g x).toReal) : f =ᶠ[l] g := by
filter_upwards [hfi, hgi, hfg] with _ hfx hgx _ rwa [← ENNReal.toReal_eq_toReal hfx hgx]
[ " (range ofNNReal).OrdConnected", " (Iio ⊤).OrdConnected", " IsOpen (Ico 0 b)", " IsOpen (Iio b)", " IsOpen (range ofNNReal)", " IsOpen (Iio ⊤)", " Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ ofNNReal) (𝓝 x) l", " Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 a.toNNReal)", " Tendsto ENNReal.toNNReal (𝓝 ↑a) (𝓝 (↑a)....
[ " (range ofNNReal).OrdConnected", " (Iio ⊤).OrdConnected", " IsOpen (Ico 0 b)", " IsOpen (Iio b)", " IsOpen (range ofNNReal)", " IsOpen (Iio ⊤)", " Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ ofNNReal) (𝓝 x) l", " Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 a.toNNReal)", " Tendsto ENNReal.toNNReal (𝓝 ↑a) (𝓝 (↑a)....
import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator import Mathlib.Init.Data.Quot import Mathlib.Tactic.Cases import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw #align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a...
Mathlib/Logic/Relation.lean
61
64
theorem Reflexive.rel_of_ne_imp (h : Reflexive r) {x y : α} (hr : x ≠ y → r x y) : r x y := by
by_cases hxy : x = y · exact hxy ▸ h x · exact hr hxy
[ " r x y" ]
[]
import Mathlib.Init.Control.Combinators import Mathlib.Data.Option.Defs import Mathlib.Logic.IsEmpty import Mathlib.Logic.Relator import Mathlib.Util.CompileInductive import Aesop #align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a" universe u namespace Op...
Mathlib/Data/Option/Basic.lean
162
163
theorem pbind_eq_bind (f : α → Option β) (x : Option α) : (x.pbind fun a _ ↦ f a) = x.bind f := by
cases x <;> simp only [pbind, none_bind', some_bind']
[ " y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o", " (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)", " (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)", " some a₁ = some a₂", " x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b", " none.bind f = so...
[ " y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o", " (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)", " (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)", " some a₁ = some a₂", " x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b", " none.bind f = so...
import Mathlib.Algebra.ModEq import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Periodic import Mathlib.Data.Int.SuccPred import Mathlib.GroupTheory.QuotientGroup import Mathlib.Order.Circular import Mathlib.Data.List.TFAE import Mathlib.Data.Set.Lattice #align_import a...
Mathlib/Algebra/Order/ToIntervalMod.lean
133
134
theorem toIcoMod_sub_self (a b : α) : toIcoMod hp a b - b = -toIcoDiv hp a b • p := by
rw [toIcoMod, sub_sub_cancel_left, neg_smul]
[ " toIcoMod hp 0 b ∈ Set.Ico 0 p", " p = 0 + p", " toIcoDiv hp a b • p - b = -toIcoMod hp a b", " toIocDiv hp a b • p - b = -toIocMod hp a b", " toIcoMod hp a b - b = -toIcoDiv hp a b • p" ]
[ " toIcoMod hp 0 b ∈ Set.Ico 0 p", " p = 0 + p", " toIcoDiv hp a b • p - b = -toIcoMod hp a b", " toIocDiv hp a b • p - b = -toIocMod hp a b" ]
import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Integral.CircleIntegral #align_import measure_theory.integral.torus_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" variable {n : ℕ} variable {E : Type*} [NormedAddCommGroup E] noncomputa...
Mathlib/MeasureTheory/Integral/TorusIntegral.lean
166
167
theorem torusIntegral_neg (f : ℂⁿ → E) (c : ℂⁿ) (R : ℝⁿ) : (∯ x in T(c, R), -f x) = -∯ x in T(c, R), f x := by
simp [torusIntegral, integral_neg]
[ " torusMap c R θ - c = torusMap 0 R θ", " (torusMap c R θ - c) i = torusMap 0 R θ i", " torusMap c R θ = c ↔ R = 0", " (∯ (x : Fin n → ℂ) in T(c, 0), f x) = 0", " (∯ (x : Fin n → ℂ) in T(c, R), -f x) = -∯ (x : Fin n → ℂ) in T(c, R), f x" ]
[ " torusMap c R θ - c = torusMap 0 R θ", " (torusMap c R θ - c) i = torusMap 0 R θ i", " torusMap c R θ = c ↔ R = 0", " (∯ (x : Fin n → ℂ) in T(c, 0), f x) = 0" ]
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
584
588
theorem oangle_right_eq_arccos_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : ∡ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃) := by
have hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two] rw [oangle_eq_angle_of_sign_eq_one hs, angle_eq_arccos_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)]
[ " ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos", " (∡ p₂ p₃ p₁).sign = 1" ]
[]
import Mathlib.Topology.Instances.Int #align_import topology.instances.nat from "leanprover-community/mathlib"@"620af85adf5cd4282f962eb060e6e562e3e0c0ba" noncomputable section open Metric Set Filter namespace Nat noncomputable instance : Dist ℕ := ⟨fun x y => dist (x : ℝ) y⟩ theorem dist_eq (x y : ℕ) : dist ...
Mathlib/Topology/Instances/Nat.lean
55
63
theorem closedBall_eq_Icc (x : ℕ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊ := by
rcases le_or_lt 0 r with (hr | hr) · rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc] exact add_nonneg (cast_nonneg x) hr · rw [closedBall_eq_empty.2 hr, Icc_eq_empty_of_lt] calc ⌊(x : ℝ) + r⌋₊ ≤ ⌊(x : ℝ)⌋₊ := floor_mono <| by linarith _ < ⌈↑x - r⌉₊ := by rw [floor_natCast, Nat....
[ " closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊", " 0 ≤ ↑x + r", " ⌊↑x + r⌋₊ < ⌈↑x - r⌉₊", " ↑x + r ≤ ↑x", " ⌊↑x⌋₊ < ⌈↑x - r⌉₊", " ↑x < ↑x - r" ]
[]
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Localization.Basic import Mathlib.SetTheory.Game.Birthday import Mathlib.SetTheory.Surreal.Basic #align_import set_theory.surreal.dyadic from "leanprover-community/mathlib"@"9...
Mathlib/SetTheory/Surreal/Dyadic.lean
106
109
theorem powHalf_le_one (n : ℕ) : powHalf n ≤ 1 := by
induction' n with n hn · exact le_rfl · exact (powHalf_succ_le_powHalf n).trans hn
[ " (powHalf n).LeftMoves = PUnit.{u_1 + 1}", " (powHalf 0).LeftMoves = PUnit.{u_1 + 1}", " (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}", " (powHalf n).moveLeft i = 0", " (powHalf 0).moveLeft i = 0", " (powHalf (n✝ + 1)).moveLeft i = 0", " (powHalf 0).moveLeft PUnit.unit = 0", " (powHalf (n✝ + 1)).mo...
[ " (powHalf n).LeftMoves = PUnit.{u_1 + 1}", " (powHalf 0).LeftMoves = PUnit.{u_1 + 1}", " (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}", " (powHalf n).moveLeft i = 0", " (powHalf 0).moveLeft i = 0", " (powHalf (n✝ + 1)).moveLeft i = 0", " (powHalf 0).moveLeft PUnit.unit = 0", " (powHalf (n✝ + 1)).mo...
import Mathlib.Topology.Order.ExtendFrom import Mathlib.Topology.Algebra.Order.Compact import Mathlib.Topology.Order.LocalExtr import Mathlib.Topology.Order.T5 #align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Set Topology variabl...
Mathlib/Topology/Algebra/Order/Rolle.lean
37
55
theorem exists_Ioo_extr_on_Icc (hab : a < b) (hfc : ContinuousOn f (Icc a b)) (hfI : f a = f b) : ∃ c ∈ Ioo a b, IsExtrOn f (Icc a b) c := by
have ne : (Icc a b).Nonempty := nonempty_Icc.2 (le_of_lt hab) -- Consider absolute min and max points obtain ⟨c, cmem, cle⟩ : ∃ c ∈ Icc a b, ∀ x ∈ Icc a b, f c ≤ f x := isCompact_Icc.exists_isMinOn ne hfc obtain ⟨C, Cmem, Cge⟩ : ∃ C ∈ Icc a b, ∀ x ∈ Icc a b, f x ≤ f C := isCompact_Icc.exists_isMaxOn ne...
[ " ∃ c ∈ Ioo a b, IsExtrOn f (Icc a b) c", " x ∈ {x | (fun x => f c' ≤ f x) x}", " C = b → f C = f a", " f C = f a", " c = b → f c = f a", " f c = f a" ]
[]
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Polynomial.Eval import Mathlib.GroupTheory.GroupAction.Ring #align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" noncomputable section open Finset open Polynomial namespace Pol...
Mathlib/Algebra/Polynomial/Derivative.lean
86
89
theorem derivative_monomial (a : R) (n : ℕ) : derivative (monomial n a) = monomial (n - 1) (a * n) := by
rw [derivative_apply, sum_monomial_index, C_mul_X_pow_eq_monomial] simp
[ " (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q", " ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑...
[ " (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q", " ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑...
import Mathlib.Algebra.Order.Floor import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Nat.Log #align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R] namespace Int def log (b : ℕ) (r : ...
Mathlib/Data/Int/Log.lean
133
134
theorem log_one_right (b : ℕ) : log b (1 : R) = 0 := by
rw [log_of_one_le_right _ le_rfl, Nat.floor_one, Nat.log_one_right, Int.ofNat_zero]
[ " log b r = -↑(b.clog ⌈r⁻¹⌉₊)", " log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)", " log b ↑n = ↑(b.log n)", " log b ↑0 = ↑(b.log 0)", " log b ↑(n✝ + 1) = ↑(b.log (n✝ + 1))", " 1 ≤ ↑(n✝ + 1)", " log b r = 0", " ↑b ^ log b r ≤ r", " ↑b ^ ↑(b.log ⌊r⌋₊) ≤ r", " b ^ b.log ⌊r⌋₊ ≤ ⌊r⌋₊", " (↑(b ^ b.clog ⌈r⁻¹⌉₊))⁻¹ ≤ r",...
[ " log b r = -↑(b.clog ⌈r⁻¹⌉₊)", " log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)", " log b ↑n = ↑(b.log n)", " log b ↑0 = ↑(b.log 0)", " log b ↑(n✝ + 1) = ↑(b.log (n✝ + 1))", " 1 ≤ ↑(n✝ + 1)", " log b r = 0", " ↑b ^ log b r ≤ r", " ↑b ^ ↑(b.log ⌊r⌋₊) ≤ r", " b ^ b.log ⌊r⌋₊ ≤ ⌊r⌋₊", " (↑(b ^ b.clog ⌈r⁻¹⌉₊))⁻¹ ≤ r",...
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace suppress_compilation set_option linter.uppercaseLean3 false open Metric open scoped Classical NNReal Topology Uniformity variable {𝕜 E : Type*} [NontriviallyNormedField 𝕜] section SemiNormed variable [SeminormedAddCommGroup E] [NormedSpace 𝕜 E] ...
Mathlib/Analysis/NormedSpace/OperatorNorm/Mul.lean
243
246
theorem opNorm_lsmul_le : ‖(lsmul 𝕜 𝕜' : 𝕜' →L[𝕜] E →L[𝕜] E)‖ ≤ 1 := by
refine ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun x => ?_ simp_rw [one_mul] exact opNorm_lsmul_apply_le _
[ " ‖((Algebra.lsmul 𝕜 𝕜 E).toLinearMap c) x‖ ≤ 1 * ‖c‖ * ‖x‖", " ‖toSpanSingleton 𝕜 x‖ = ‖x‖", " ‖(toSpanSingleton 𝕜 x✝) x‖ ≤ ‖x✝‖ * ‖x‖", " ‖x‖ ≤ N", " 0 < ‖1‖", " ‖lsmul 𝕜 𝕜'‖ ≤ 1", " ‖(lsmul 𝕜 𝕜') x‖ ≤ 1 * ‖x‖", " ‖(lsmul 𝕜 𝕜') x‖ ≤ ‖x‖" ]
[ " ‖((Algebra.lsmul 𝕜 𝕜 E).toLinearMap c) x‖ ≤ 1 * ‖c‖ * ‖x‖", " ‖toSpanSingleton 𝕜 x‖ = ‖x‖", " ‖(toSpanSingleton 𝕜 x✝) x‖ ≤ ‖x✝‖ * ‖x‖", " ‖x‖ ≤ N", " 0 < ‖1‖" ]
import Mathlib.MeasureTheory.SetSemiring open MeasurableSpace Set namespace MeasureTheory variable {α : Type*} {𝒜 : Set (Set α)} {s t : Set α} structure IsSetAlgebra (𝒜 : Set (Set α)) : Prop where empty_mem : ∅ ∈ 𝒜 compl_mem : ∀ ⦃s⦄, s ∈ 𝒜 → sᶜ ∈ 𝒜 union_mem : ∀ ⦃s t⦄, s ∈ 𝒜 → t ∈ 𝒜 → s ∪ t ∈ 𝒜 ...
Mathlib/MeasureTheory/SetAlgebra.lean
86
92
theorem biInter_mem {ι : Type*} (h𝒜 : IsSetAlgebra 𝒜) {s : ι → Set α} (S : Finset ι) (hs : ∀ i ∈ S, s i ∈ 𝒜) : ⋂ i ∈ S, s i ∈ 𝒜 := by
by_cases h : S = ∅ · rw [h, ← Finset.set_biInter_coe, Finset.coe_empty, biInter_empty] exact h𝒜.univ_mem · rw [← ne_eq, ← Finset.nonempty_iff_ne_empty] at h exact h𝒜.isSetRing.biInter_mem S h hs
[ " ⋂ i ∈ S, s i ∈ 𝒜", " univ ∈ 𝒜" ]
[]
import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.Limits.Final.ParallelPair import Mathlib.CategoryTheory.Preadditive.Projective import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.EffectiveEpimorphic na...
Mathlib/CategoryTheory/Sites/Coherent/RegularSheaves.lean
87
100
theorem EqualizerCondition.bijective_mapToEqualizer_pullback (P : Cᵒᵖ ⥤ Type*) (hP : EqualizerCondition P) : ∀ (X B : C) (π : X ⟶ B) [EffectiveEpi π] [HasPullback π π], Function.Bijective (MapToEqualizer P π (pullback.fst (f := π) (g := π)) (pullback.snd (f := π) (g := π)) pullback.condition) := b...
intro X B π _ _ specialize hP π _ (pullbackIsPullback π π) rw [Types.type_equalizer_iff_unique] at hP rw [Function.bijective_iff_existsUnique] intro ⟨b, hb⟩ obtain ⟨a, ha₁, ha₂⟩ := hP b hb refine ⟨a, ?_, ?_⟩ · simpa [MapToEqualizer] using ha₁ · simpa [MapToEqualizer] using ha₂
[ " P.map π.op ≫ P.map c.fst.op = P.map π.op ≫ P.map c.snd.op", " EqualizerCondition (F.op ⋙ P)", " Nonempty (IsLimit (Fork.ofι ((F.op ⋙ P).map π.op) ⋯))", " P.map (F.map π).op = (F.op ⋙ P).map π.op", " P.map (F.map π).op ≫ (F.op ⋙ P).map c.fst.op = P.map (F.map π).op ≫ (F.op ⋙ P).map c.snd.op", " IsLimit (...
[ " P.map π.op ≫ P.map c.fst.op = P.map π.op ≫ P.map c.snd.op", " EqualizerCondition (F.op ⋙ P)", " Nonempty (IsLimit (Fork.ofι ((F.op ⋙ P).map π.op) ⋯))", " P.map (F.map π).op = (F.op ⋙ P).map π.op", " P.map (F.map π).op ≫ (F.op ⋙ P).map c.fst.op = P.map (F.map π).op ≫ (F.op ⋙ P).map c.snd.op", " IsLimit (...
import Mathlib.CategoryTheory.Category.ULift import Mathlib.CategoryTheory.Skeletal import Mathlib.Logic.UnivLE import Mathlib.Logic.Small.Basic #align_import category_theory.essentially_small from "leanprover-community/mathlib"@"f7707875544ef1f81b32cb68c79e0e24e45a0e76" universe w v v' u u' open CategoryTheory ...
Mathlib/CategoryTheory/EssentiallySmall.lean
71
77
theorem essentiallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D] (e : C ≌ D) : EssentiallySmall.{w} C ↔ EssentiallySmall.{w} D := by
fconstructor · rintro ⟨S, 𝒮, ⟨f⟩⟩ exact EssentiallySmall.mk' (e.symm.trans f) · rintro ⟨S, 𝒮, ⟨f⟩⟩ exact EssentiallySmall.mk' (e.trans f)
[ " EssentiallySmall.{w, v, u} C ↔ EssentiallySmall.{w, v', u'} D", " EssentiallySmall.{w, v, u} C → EssentiallySmall.{w, v', u'} D", " EssentiallySmall.{w, v', u'} D", " EssentiallySmall.{w, v', u'} D → EssentiallySmall.{w, v, u} C", " EssentiallySmall.{w, v, u} C" ]
[]
import Mathlib.Topology.MetricSpace.PiNat import Mathlib.Topology.MetricSpace.Isometry import Mathlib.Topology.MetricSpace.Gluing import Mathlib.Topology.Sets.Opens import Mathlib.Analysis.Normed.Field.Basic #align_import topology.metric_space.polish from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78...
Mathlib/Topology/MetricSpace/Polish.lean
155
163
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β] {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
letI := upgradePolishSpace β letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology have : CompleteSpace α := by rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing] exact hf.isClosed_range.isCo...
[ " CompleteSpace α", " polishSpaceMetric α = ⋯.choose", " MetrizableSpace α", " PolishSpace ((i : ι) → E i)", " PolishSpace α", " IsComplete (range f)" ]
[ " CompleteSpace α", " polishSpaceMetric α = ⋯.choose", " MetrizableSpace α", " PolishSpace ((i : ι) → E i)" ]
import Mathlib.Analysis.MeanInequalities import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Data.Set.Image import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import analysis.normed_space.lp_space from "leanprover-community/mathlib"@"de83b43717abe3...
Mathlib/Analysis/NormedSpace/lpSpace.lean
81
83
theorem memℓp_zero_iff {f : ∀ i, E i} : Memℓp f 0 ↔ Set.Finite { i | f i ≠ 0 } := by
dsimp [Memℓp] rw [if_pos rfl]
[ " Memℓp f 0 ↔ {i | f i ≠ 0}.Finite", " (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite" ]
[]
import Mathlib.RingTheory.Ideal.Operations import Mathlib.Algebra.Module.Torsion import Mathlib.Algebra.Ring.Idempotents import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Filtration import Mathlib.RingTheory.Nakayama #align_import ring_theory.ideal.cota...
Mathlib/RingTheory/Ideal/Cotangent.lean
88
96
theorem cotangent_subsingleton_iff : Subsingleton I.Cotangent ↔ IsIdempotentElem I := by
constructor · intro H refine (pow_two I).symm.trans (le_antisymm (Ideal.pow_le_self two_ne_zero) ?_) exact fun x hx => (I.toCotangent_eq_zero ⟨x, hx⟩).mp (Subsingleton.elim _ _) · exact fun e => ⟨fun x y => Quotient.inductionOn₂' x y fun x y => I.toCotangent_eq.mpr <| ((pow_two I)...
[ " AddCommGroup I.Cotangent", " AddCommGroup (↥I ⧸ I • ⊤)", " Module (R ⧸ I) I.Cotangent", " Module (R ⧸ I) (↥I ⧸ I • ⊤)", " Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2", " x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2", " x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ...
[ " AddCommGroup I.Cotangent", " AddCommGroup (↥I ⧸ I • ⊤)", " Module (R ⧸ I) I.Cotangent", " Module (R ⧸ I) (↥I ⧸ I • ⊤)", " Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2", " x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2", " x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ...
import Mathlib.CategoryTheory.Closed.Monoidal import Mathlib.CategoryTheory.Linear.Yoneda import Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric #align_import algebra.category.Module.monoidal.closed from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2" suppress_compilation universe ...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Closed.lean
88
91
theorem ihom_ev_app (M N : ModuleCat.{u} R) : (ihom.ev M).app N = TensorProduct.uncurry _ _ _ _ LinearMap.id.flip := by
apply TensorProduct.ext' apply ModuleCat.monoidalClosed_uncurry
[ " (fun f => (β_ M N).hom ≫ TensorProduct.lift f) ((fun f => (TensorProduct.mk R ↑N ↑M).compr₂ ((β_ N M).hom ≫ f)) f) = f", " ∀ (x : ↑M) (y : ↑N),\n ((fun f => (β_ M N).hom ≫ TensorProduct.lift f) ((fun f => (TensorProduct.mk R ↑N ↑M).compr₂ ((β_ N M).hom ≫ f)) f))\n (x ⊗ₜ[R] y) =\n f (x ⊗ₜ[R] y)", ...
[ " (fun f => (β_ M N).hom ≫ TensorProduct.lift f) ((fun f => (TensorProduct.mk R ↑N ↑M).compr₂ ((β_ N M).hom ≫ f)) f) = f", " ∀ (x : ↑M) (y : ↑N),\n ((fun f => (β_ M N).hom ≫ TensorProduct.lift f) ((fun f => (TensorProduct.mk R ↑N ↑M).compr₂ ((β_ N M).hom ≫ f)) f))\n (x ⊗ₜ[R] y) =\n f (x ⊗ₜ[R] y)", ...
import Mathlib.Algebra.DirectSum.Basic import Mathlib.LinearAlgebra.DFinsupp import Mathlib.LinearAlgebra.Basis #align_import algebra.direct_sum.module from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" universe u v w u₁ namespace DirectSum open DirectSum section General variable {...
Mathlib/Algebra/DirectSum/Module.lean
164
168
theorem linearEquivFunOnFintype_lof [Fintype ι] [DecidableEq ι] (i : ι) (m : M i) : (linearEquivFunOnFintype R ι M) (lof R ι M i m) = Pi.single i m := by
ext a change (DFinsupp.equivFunOnFintype (lof R ι M i m)) a = _ convert _root_.congr_fun (DFinsupp.equivFunOnFintype_single i m) a
[ " ⇑(f + g) = ⇑f + ⇑g", " (f + g) x✝ = (⇑f + ⇑g) x✝", " { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun f", " ⇑(c • f) = c • ⇑f", " (linearEquivFunOnFintype R ι M) ((lof R ι M i) m) = Pi.single i m", " (linearEquivFunOnFintype ...
[ " ⇑(f + g) = ⇑f + ⇑g", " (f + g) x✝ = (⇑f + ⇑g) x✝", " { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun f", " ⇑(c • f) = c • ⇑f" ]
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace α] [MeasurableSpace β] {s : Set α} noncomputable section namespace MeasureTheory.Measure def count : Measure α := sum dirac #align measure_theory.measure.count MeasureTheo...
Mathlib/MeasureTheory/Measure/Count.lean
122
126
theorem empty_of_count_eq_zero [MeasurableSingletonClass α] (hsc : count s = 0) : s = ∅ := by
have hs : s.Finite := by rw [← count_apply_lt_top, hsc] exact WithTop.zero_lt_top simpa [count_apply_finite _ hs] using hsc
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0", " ∑ i ∈ s, 1 = ↑s.card", " count s = ↑s_fin.toFinset.card", " MeasurableSet ↑s_fin.toFinset", " count s = ↑hs.toFinset.card", " count s = ⊤", " ↑n ≤ count s", " ↑t.card ≤ count s", " ↑t.card = ∑ i ∈ t, 1", " count s = ⊤ ↔ s.Infinite", " s = ∅", " ...
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0", " ∑ i ∈ s, 1 = ↑s.card", " count s = ↑s_fin.toFinset.card", " MeasurableSet ↑s_fin.toFinset", " count s = ↑hs.toFinset.card", " count s = ⊤", " ↑n ≤ count s", " ↑t.card ≤ count s", " ↑t.card = ∑ i ∈ t, 1", " count s = ⊤ ↔ s.Infinite", " s = ∅", " ...
import Mathlib.Data.Bool.Set import Mathlib.Data.Nat.Set import Mathlib.Data.Set.Prod import Mathlib.Data.ULift import Mathlib.Order.Bounds.Basic import Mathlib.Order.Hom.Set import Mathlib.Order.SetNotation #align_import order.complete_lattice from "leanprover-community/mathlib"@"5709b0d8725255e76f47debca6400c07b5c2...
Mathlib/Order/CompleteLattice.lean
180
181
theorem iInf_le_iff {s : ι → α} : iInf s ≤ a ↔ ∀ b, (∀ i, b ≤ s i) → b ≤ a := by
simp [iInf, sInf_le_iff, lowerBounds]
[ " sSup s = a → IsLUB s a", " IsLUB s (sSup s)", " a ≤ iSup s ↔ ∀ (b : α), (∀ (i : ι), s i ≤ b) → a ≤ b", " sInf s = a → IsGLB s a", " IsGLB s (sInf s)", " iInf s ≤ a ↔ ∀ (b : α), (∀ (i : ι), b ≤ s i) → b ≤ a" ]
[ " sSup s = a → IsLUB s a", " IsLUB s (sSup s)", " a ≤ iSup s ↔ ∀ (b : α), (∀ (i : ι), s i ≤ b) → a ≤ b", " sInf s = a → IsGLB s a", " IsGLB s (sInf s)" ]
import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.LinearAlgebra.Matrix.ToLin #align_import linear_algebra.matrix.basis from "leanprover-community/mathlib"@"6c263e4bfc2e6714de30f22178b4d0ca4d149a76" noncomputable section open LinearMap Matrix Set Submodule open Matrix section BasisToMatrix variable {ι...
Mathlib/LinearAlgebra/Matrix/Basis.lean
80
83
theorem toMatrix_self [DecidableEq ι] : e.toMatrix e = 1 := by
unfold Basis.toMatrix ext i j simp [Basis.equivFun, Matrix.one_apply, Finsupp.single_apply, eq_comm]
[ " e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)", " e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝", " (Pi.basisFun R ι).toMatrix = transpose", " (Pi.basisFun R ι).toMatrix M i j = Mᵀ i j", " e.toMatrix ⇑e = 1", " (fun i j => (e.repr (e j)) i) = 1", " (e.repr (e j)) i = ...
[ " e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)", " e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝", " (Pi.basisFun R ι).toMatrix = transpose", " (Pi.basisFun R ι).toMatrix M i j = Mᵀ i j" ]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toReal_add (ha : a ≠ ∞) (hb : b ≠ ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
132
133
theorem toNNReal_strict_mono (hb : b ≠ ∞) (h : a < b) : a.toNNReal < b.toNNReal := by
simpa [← ENNReal.coe_lt_coe, hb, h.ne_top]
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...