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.Algebra.Lie.OfAssociative import Mathlib.Algebra.Lie.IdealOperations #align_import algebra.lie.abelian from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" universe u v w w₁ w₂ class LieModule.IsTrivial (L : Type v) (M : Type w) [Bracket L M] [Zero M] : Prop where triv...
Mathlib/Algebra/Lie/Abelian.lean
91
96
theorem commutative_ring_iff_abelian_lie_ring {A : Type v} [Ring A] : Std.Commutative (α := A) (· * ·) ↔ IsLieAbelian A := by
have h₁ : Std.Commutative (α := A) (· * ·) ↔ ∀ a b : A, a * b = b * a := ⟨fun h => h.1, fun h => ⟨h⟩⟩ have h₂ : IsLieAbelian A ↔ ∀ a b : A, ⁅a, b⁆ = 0 := ⟨fun h => h.1, fun h => ⟨h⟩⟩ simp only [h₁, h₂, LieRing.of_associative_ring_bracket, sub_eq_zero]
[ " ⁅x, m⁆ = 0", " ⁅x, y⁆ = 0", " ⁅f u, y⁆ = 0", " ⁅f u, f v⁆ = 0", " (Std.Commutative fun x x_1 => x * x_1) ↔ IsLieAbelian A" ]
[ " ⁅x, m⁆ = 0", " ⁅x, y⁆ = 0", " ⁅f u, y⁆ = 0", " ⁅f u, f v⁆ = 0" ]
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ι : Type _} {α : ι → Type _} section cylinder def cylinder (s : Finset ι) (S : Set (∀ i : s, α...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
169
183
theorem cylinder_eq_empty_iff [h_nonempty : Nonempty (∀ i, α i)] (s : Finset ι) (S : Set (∀ i : s, α i)) : cylinder s S = ∅ ↔ S = ∅ := by
refine ⟨fun h ↦ ?_, fun h ↦ by (rw [h]; exact cylinder_empty _)⟩ by_contra hS rw [← Ne, ← nonempty_iff_ne_empty] at hS let f := hS.some have hf : f ∈ S := hS.choose_spec classical let f' : ∀ i, α i := fun i ↦ if hi : i ∈ s then f ⟨i, hi⟩ else h_nonempty.some i have hf' : f' ∈ cylinder s S := by rw ...
[ " cylinder s ∅ = ∅", " cylinder s univ = univ", " cylinder s S = ∅ ↔ S = ∅", " cylinder s S = ∅", " S = ∅", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S" ]
[ " cylinder s ∅ = ∅", " cylinder s univ = univ" ]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Polynomial.Inductions import Mathlib.RingTheory.Localization.Basic #align_import data.polynomial.laurent from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86" open Polynomial Func...
Mathlib/Algebra/Polynomial/Laurent.lean
203
204
theorem mul_T_assoc (f : R[T;T⁻¹]) (m n : ℤ) : f * T m * T n = f * T (m + n) := by
simp [← T_add, mul_assoc]
[ " (C t) n = if n = 0 then t else 0", " (if 0 = n then t else 0) = if n = 0 then t else 0", " T (m + n) = T m * T n", " T (m - n) = T m * T (-n)", " T m ^ n = T (↑n * m)", " f * T m * T n = f * T (m + n)" ]
[ " (C t) n = if n = 0 then t else 0", " (if 0 = n then t else 0) = if n = 0 then t else 0", " T (m + n) = T m * T n", " T (m - n) = T m * T (-n)", " T m ^ n = T (↑n * m)" ]
import Mathlib.LinearAlgebra.FreeModule.PID import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.BilinearForm.DualLattice import Mathlib.RingTheory.DedekindDomain.Basic import Mathlib.RingTheory.Localization.Module import Mathlib.RingTheory.Trace #align_import ring_theory.dedekind_domain....
Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean
106
112
theorem integralClosure_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι] [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] : Subalgebra.toSubmodule (integralClosure A L) ≤ Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K...
refine le_trans ?_ (IsIntegralClosure.range_le_span_dualBasis (integralClosure A L) b hb_int) intro x hx exact ⟨⟨x, hx⟩, rfl⟩
[ " IsLocalization (algebraMapSubmonoid C A⁰) L", " ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)", " IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)", " x ≠ 0", " ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1", " z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr...
[ " IsLocalization (algebraMapSubmonoid C A⁰) L", " ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)", " IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)", " x ≠ 0", " ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1", " z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr...
import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" assert_not_exists MonoidWithZero assert_not_exists Finset.sum open Function OrderDual open FinsetInterval variable {ι α : T...
Mathlib/Order/Interval/Finset/Basic.lean
144
144
theorem right_mem_Icc : b ∈ Icc a b ↔ a ≤ b := by
simp only [mem_Icc, and_true_iff, le_rfl]
[ " (Icc a b).Nonempty ↔ a ≤ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = ∅ ↔ ¬a ≤ b", " Ico a b = ∅ ↔ ¬a < b", " Ioc a b = ∅ ↔ ¬a < b", " Ioo a b = ∅ ↔ ¬a < b", " a ∈ Icc a b ↔ a ≤ b", " a ∈ Ico a b ↔ a < b", " b ∈ Icc a b ↔ a ≤ b" ]
[ " (Icc a b).Nonempty ↔ a ≤ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = ∅ ↔ ¬a ≤ b", " Ico a b = ∅ ↔ ¬a < b", " Ioc a b = ∅ ↔ ¬a < b", " Ioo a b = ∅ ↔ ¬a < b", " a ∈ Icc a b ↔ a ≤ b", " a ∈ Ico a b ↔ a < b" ]
import Mathlib.LinearAlgebra.Dimension.DivisionRing import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition noncomputable section universe u v v' v'' variable {K : Type u} {V V₁ : Type v} {V' V'₁ : Type v'} {V'' : Type v''} open Cardinal Basis Submodule Function Set namespace LinearMap section Ring ...
Mathlib/LinearAlgebra/Dimension/LinearMap.lean
58
60
theorem lift_rank_comp_le_right (g : V →ₗ[K] V') (f : V' →ₗ[K] V'') : Cardinal.lift.{v'} (rank (f.comp g)) ≤ Cardinal.lift.{v''} (rank g) := by
rw [rank, rank, LinearMap.range_comp]; exact lift_rank_map_le _ _
[ " rank 0 = 0", " (f ∘ₗ g).rank ≤ f.rank", " range (f ∘ₗ g) ≤ range f", " Submodule.map f (range g) ≤ range f", " lift.{v', v''} (f ∘ₗ g).rank ≤ lift.{v'', v'} g.rank", " lift.{v', v''} (Module.rank K ↥(Submodule.map f (range g))) ≤ lift.{v'', v'} (Module.rank K ↥(range g))" ]
[ " rank 0 = 0", " (f ∘ₗ g).rank ≤ f.rank", " range (f ∘ₗ g) ≤ range f", " Submodule.map f (range g) ≤ range f" ]
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
112
112
theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by
simp [laverage]
[ " ⨍⁻ (_x : α), 0 ∂μ = 0", " ⨍⁻ (x : α), f x ∂0 = 0" ]
[ " ⨍⁻ (_x : α), 0 ∂μ = 0" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Topology.Order.ProjIcc #align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter open S...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
133
134
theorem arcsin_of_le_neg_one {x : ℝ} (hx : x ≤ -1) : arcsin x = -(π / 2) := by
rw [← arcsin_projIcc, projIcc_of_le_left _ hx, Subtype.coe_mk, arcsin_neg_one]
[ " range arcsin = Icc (-(π / 2)) (π / 2)", " Subtype.val '' range (IccExtend arcsin.proof_2 ⇑sinOrderIso.symm) = Icc (-(π / 2)) (π / 2)", " (↑(projIcc (-1) 1 ⋯ x)).arcsin = x.arcsin", " x.arcsin.sin = x", " x.sin.arcsin.sin = x.sin", " y.arcsin = x", " x.sin.arcsin = x", " x.arcsin = π / 2", " (-(π /...
[ " range arcsin = Icc (-(π / 2)) (π / 2)", " Subtype.val '' range (IccExtend arcsin.proof_2 ⇑sinOrderIso.symm) = Icc (-(π / 2)) (π / 2)", " (↑(projIcc (-1) 1 ⋯ x)).arcsin = x.arcsin", " x.arcsin.sin = x", " x.sin.arcsin.sin = x.sin", " y.arcsin = x", " x.sin.arcsin = x", " x.arcsin = π / 2", " (-(π /...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Analysis.NormedSpace.Real #align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable ...
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
114
115
theorem sinh_log {x : ℝ} (hx : 0 < x) : sinh (log x) = (x - x⁻¹) / 2 := by
rw [sinh_eq, exp_neg, exp_log hx]
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x", " rexp x.log = -x", " |x| = -x", " x ≤ rexp x.log", " 0 ≤ 1", " x ≤ |x|", " rexp (log 1) = rexp 0", " |x|.log = x.log", " (-x).log = x.log", " x...
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x", " rexp x.log = -x", " |x| = -x", " x ≤ rexp x.log", " 0 ≤ 1", " x ≤ |x|", " rexp (log 1) = rexp 0", " |x|.log = x.log", " (-x).log = x.log" ]
import Mathlib.Analysis.SpecialFunctions.Integrals #align_import data.real.pi.wallis from "leanprover-community/mathlib"@"980755c33b9168bc82f774f665eaa27878140fac" open scoped Real Topology Nat open Filter Finset intervalIntegral namespace Real namespace Wallis set_option linter.uppercaseLean3 false noncomp...
Mathlib/Data/Real/Pi/Wallis.lean
62
75
theorem W_eq_factorial_ratio (n : ℕ) : W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
induction' n with n IH · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero, algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne, one_ne_zero, not_false_iff] norm_num · unfold W at IH ⊢ rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.d...
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3", " W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)...
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3" ]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ι : Sort*} {f g : ι → ℝ≥0∞} variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toNNReal_iInf (hf : ∀ i, f ...
Mathlib/Data/ENNReal/Real.lean
548
553
theorem toNNReal_sInf (s : Set ℝ≥0∞) (hs : ∀ r ∈ s, r ≠ ∞) : (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s) := by
have hf : ∀ i, ((↑) : s → ℝ≥0∞) i ≠ ∞ := fun ⟨r, rs⟩ => hs r rs -- Porting note: `← sInf_image'` had to be replaced by `← image_eq_range` as the lemmas are used -- in a different order. simpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf)
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal", " (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)" ]
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {α β γ : Type*} section DenselyOrdered variable [TopologicalSpace α] [LinearOrder α] [OrderTopology α] [DenselyOrdered α] {a b : α} {s : Set α} theorem closure_Ioi' {a : α} (h : (Io...
Mathlib/Topology/Order/DenselyOrdered.lean
75
79
theorem closure_Ico {a b : α} (hab : a ≠ b) : closure (Ico a b) = Icc a b := by
apply Subset.antisymm · exact closure_minimal Ico_subset_Icc_self isClosed_Icc · apply Subset.trans _ (closure_mono Ioo_subset_Ico_self) rw [closure_Ioo hab]
[ " closure (Ioi a) = Ici a", " closure (Ioi a) ⊆ Ici a", " Ici a ⊆ closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) ⊆ Icc a b", " Icc a b ⊆ closure (Ioo a b)", " {a, b} ⊆ closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " ∅ ⊆ closure...
[ " closure (Ioi a) = Ici a", " closure (Ioi a) ⊆ Ici a", " Ici a ⊆ closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) ⊆ Icc a b", " Icc a b ⊆ closure (Ioo a b)", " {a, b} ⊆ closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " ∅ ⊆ closure...
import Mathlib.Tactic.NormNum import Mathlib.Tactic.TryThis import Mathlib.Util.AtomM set_option autoImplicit true namespace Mathlib.Tactic.Abel open Lean Elab Meta Tactic Qq initialize registerTraceClass `abel initialize registerTraceClass `abel.detail structure Context where α : Expr univ :...
Mathlib/Tactic/Abel.lean
132
134
theorem const_add_termg {α} [AddCommGroup α] (k n x a a') (h : k + a = a') : k + @termg α _ n x a = termg n x a' := by
simp [h.symm, termg, add_comm, add_assoc]
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'" ]
[ " k + term n x a = term n x a'" ]
import Mathlib.Topology.LocalAtTarget import Mathlib.AlgebraicGeometry.Morphisms.Basic #align_import algebraic_geometry.morphisms.open_immersion from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" noncomputable section open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace...
Mathlib/AlgebraicGeometry/Morphisms/OpenImmersion.lean
34
38
theorem isOpenImmersion_iff_stalk {f : X ⟶ Y} : IsOpenImmersion f ↔ OpenEmbedding f.1.base ∧ ∀ x, IsIso (PresheafedSpace.stalkMap f.1 x) := by
constructor · intro h; exact ⟨h.1, inferInstance⟩ · rintro ⟨h₁, h₂⟩; exact IsOpenImmersion.of_stalk_iso f h₁
[ " IsOpenImmersion f ↔\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)", " IsOpenImmersion f →\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)", " OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedS...
[]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.Prod import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.LinearCombination import Mathlib.Lean.Expr.ExtraRecognizers import Mathlib.Data.Set.Subsingleton #align_import lin...
Mathlib/LinearAlgebra/LinearIndependent.lean
192
194
theorem Fintype.not_linearIndependent_iff [Fintype ι] : ¬LinearIndependent R v ↔ ∃ g : ι → R, ∑ i, g i • v i = 0 ∧ ∃ i, g i ≠ 0 := by
simpa using not_iff_not.2 Fintype.linearIndependent_iff
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0", " (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0", " g i = (Finsupp.lapply i) (Finsupp.single i (g i))", " (Finsupp.lapply i) (Finsupp.single j (g j)) = 0", " LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)...
[ " LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0", " (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0", " g i = (Finsupp.lapply i) (Finsupp.single i (g i))", " (Finsupp.lapply i) (Finsupp.single j (g j)) = 0", " LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)...
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ ℵ₀ #align cardinal.continuum Cardinal.continuum scoped notat...
Mathlib/SetTheory/Cardinal/Continuum.lean
90
90
theorem mk_set_nat : #(Set ℕ) = 𝔠 := by
simp
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c", " lift.{v, u} c < 𝔠 ↔ c < 𝔠", " beth 1 = 𝔠", " #(Set ℕ) = 𝔠" ]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c", " lift.{v, u} c < 𝔠 ↔ c < 𝔠", " beth 1 = 𝔠" ]
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp #align_import measure_theory.integral.set_to_l1 from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical Topology NNReal ENNReal MeasureTheory Pointwise open Set Filter TopologicalSpace ENNR...
Mathlib/MeasureTheory/Integral/SetToL1.lean
122
127
theorem of_smul_measure (c : ℝ≥0∞) (hc_ne_top : c ≠ ∞) (hT : FinMeasAdditive (c • μ) T) : FinMeasAdditive μ T := by
refine of_eq_top_imp_eq_top (fun s _ hμs => ?_) hT rw [Measure.smul_apply, smul_eq_mul, ENNReal.mul_eq_top] at hμs simp only [hc_ne_top, or_false_iff, Ne, false_and_iff] at hμs exact hμs.2
[ " 0 (s ∪ t) = 0 s + 0 t", " FinMeasAdditive μ (T + T')", " (T + T') (s ∪ t) = (T + T') s + (T + T') t", " T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)", " (fun s => c • T s) (s ∪ t) = (fun s => c • T s) s + (fun s => c • T s) t", " FinMeasAdditive μ T", " μ s = ⊤" ]
[ " 0 (s ∪ t) = 0 s + 0 t", " FinMeasAdditive μ (T + T')", " (T + T') (s ∪ t) = (T + T') s + (T + T') t", " T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)", " (fun s => c • T s) (s ∪ t) = (fun s => c • T s) s + (fun s => c • T s) t" ]
namespace Nat @[reducible] def Coprime (m n : Nat) : Prop := gcd m n = 1 instance (m n : Nat) : Decidable (Coprime m n) := inferInstanceAs (Decidable (_ = 1)) theorem coprime_iff_gcd_eq_one : Coprime m n ↔ gcd m n = 1 := .rfl theorem Coprime.gcd_eq_one : Coprime m n → gcd m n = 1 := id theorem Coprime.symm ...
.lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
65
75
theorem exists_coprime (m n : Nat) : ∃ m' n', Coprime m' n' ∧ m = m' * gcd m n ∧ n = n' * gcd m n := by
cases eq_zero_or_pos (gcd m n) with | inl h0 => rw [gcd_eq_zero_iff] at h0 refine ⟨1, 1, gcd_one_left 1, ?_⟩ simp [h0] | inr hpos => exact ⟨_, _, coprime_div_gcd_div_gcd hpos, (Nat.div_mul_cancel (gcd_dvd_left m n)).symm, (Nat.div_mul_cancel (gcd_dvd_right m n)).symm⟩
[ " k ∣ m", " k ∣ n * m", " ((k * m).gcd n).Coprime k", " (m * k).gcd n = m.gcd n", " m.gcd (k * n) = m.gcd n", " m.gcd (n * k) = m.gcd n", " (m / m.gcd n).Coprime (n / m.gcd n)", " d ∣ 1", " d ∣ m.gcd n", " ∃ m' n', m'.Coprime n' ∧ m = m' * m.gcd n ∧ n = n' * m.gcd n", " m = 1 * m.gcd n ∧ n = 1 *...
[ " k ∣ m", " k ∣ n * m", " ((k * m).gcd n).Coprime k", " (m * k).gcd n = m.gcd n", " m.gcd (k * n) = m.gcd n", " m.gcd (n * k) = m.gcd n", " (m / m.gcd n).Coprime (n / m.gcd n)", " d ∣ 1", " d ∣ m.gcd n" ]
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace #align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb" open MeasureTheory Set Filter A...
Mathlib/Analysis/MellinTransform.lean
304
312
theorem isBigO_rpow_top_log_smul [NormedSpace ℝ E] {a b : ℝ} {f : ℝ → E} (hab : b < a) (hf : f =O[atTop] (· ^ (-a))) : (fun t : ℝ => log t • f t) =O[atTop] (· ^ (-b)) := by
refine ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).isBigO.smul hf).congr' (eventually_of_forall fun t => by rfl) ((eventually_gt_atTop 0).mp (eventually_of_forall fun t ht => ?_)) simp only rw [smul_eq_mul, ← rpow_add ht, ← sub_eq_add_neg, sub_eq_add_neg a, add_sub_cancel_left]
[ " (fun t => t.log • f t) =O[atTop] fun x => x ^ (-b)", " (fun x => x.log • f x) t = (fun t => t.log • f t) t", " (fun x => x ^ (a - b) • x ^ (-a)) t = (fun x => x ^ (-b)) t", " t ^ (a - b) • t ^ (-a) = t ^ (-b)" ]
[]
import Mathlib.Probability.Notation import Mathlib.Probability.Density import Mathlib.Probability.ConditionalProbability import Mathlib.Probability.ProbabilityMassFunction.Constructions open scoped Classical MeasureTheory NNReal ENNReal -- TODO: We can't `open ProbabilityTheory` without opening the `ProbabilityThe...
Mathlib/Probability/Distributions/Uniform.lean
114
121
theorem pdf_eq_zero_of_measure_eq_zero_or_top {X : Ω → E} {s : Set E} (hu : IsUniform X s ℙ μ) (hμs : μ s = 0 ∨ μ s = ∞) : pdf X ℙ μ =ᵐ[μ] 0 := by
rcases hμs with H|H · simp only [IsUniform, ProbabilityTheory.cond, H, ENNReal.inv_zero, restrict_eq_zero.mpr H, smul_zero] at hu simp [pdf, hu] · simp only [IsUniform, ProbabilityTheory.cond, H, ENNReal.inv_top, zero_smul] at hu simp [pdf, hu]
[ " AEMeasurable X ℙ", " False", " 0 = 1", " 0 Set.univ = 1", " Measure.map X ℙ ≪ μ", " ProbabilityTheory.cond μ s ≪ μ", " ℙ (X ⁻¹' A) = μ (s ∩ A) / μ s", " ℙ Set.univ = 1", " IsUniform X (toMeasurable μ s) ℙ μ ↔ IsUniform X s ℙ μ", " Measure.map X ℙ = ProbabilityTheory.cond μ (toMeasurable μ s) ↔ M...
[ " AEMeasurable X ℙ", " False", " 0 = 1", " 0 Set.univ = 1", " Measure.map X ℙ ≪ μ", " ProbabilityTheory.cond μ s ≪ μ", " ℙ (X ⁻¹' A) = μ (s ∩ A) / μ s", " ℙ Set.univ = 1", " IsUniform X (toMeasurable μ s) ℙ μ ↔ IsUniform X s ℙ μ", " Measure.map X ℙ = ProbabilityTheory.cond μ (toMeasurable μ s) ↔ M...
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : Me...
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
103
104
theorem edist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : edist (c • f) (c • g) = edist f g := by
simp only [Lp.edist_dist, dist_smul_Lp]
[ " ∀ (f g : ↥(Lp E p μ)), c • (f + g) = c • f + c • g", " c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + c • ⟨Quot.mk Setoid.r a✝, property✝⟩", " c • -f = -(c • f)", " c • -⟨Quot.mk Setoid.r a✝, property✝⟩ = -(c • ⟨Quot.mk Setoid.r a✝...
[ " ∀ (f g : ↥(Lp E p μ)), c • (f + g) = c • f + c • g", " c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + c • ⟨Quot.mk Setoid.r a✝, property✝⟩", " c • -f = -(c • f)", " c • -⟨Quot.mk Setoid.r a✝, property✝⟩ = -(c • ⟨Quot.mk Setoid.r a✝...
import Mathlib.Data.Matrix.Notation import Mathlib.Data.Matrix.Basic import Mathlib.Data.Fin.Tuple.Reflection #align_import data.matrix.reflection from "leanprover-community/mathlib"@"820b22968a2bc4a47ce5cf1d2f36a9ebe52510aa" open Matrix namespace Matrix variable {l m n : ℕ} {α β : Type*} def Forall : ∀ {m n}...
Mathlib/Data/Matrix/Reflection.lean
159
162
theorem mulᵣ_eq [Mul α] [AddCommMonoid α] (A : Matrix (Fin l) (Fin m) α) (B : Matrix (Fin m) (Fin n) α) : mulᵣ A B = A * B := by
simp [mulᵣ, Function.comp, Matrix.transpose] rfl
[ " Forall P ↔ ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x", " (∀ (x : Fin n → α) (x_1 : Matrix (Fin m) (Fin n) α), P (of (vecCons x x_1))) ↔\n ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x", " Exists P ↔ ∃ x, P x", " (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x", " A.transposeᵣ i j = Aᵀ i j", " of (vecCons (F...
[ " Forall P ↔ ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x", " (∀ (x : Fin n → α) (x_1 : Matrix (Fin m) (Fin n) α), P (of (vecCons x x_1))) ↔\n ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x", " Exists P ↔ ∃ x, P x", " (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x", " A.transposeᵣ i j = Aᵀ i j", " of (vecCons (F...
import Mathlib.Analysis.Convex.StrictConvexBetween import Mathlib.Geometry.Euclidean.Basic #align_import geometry.euclidean.sphere.basic from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RealInnerProductSpace namespace EuclideanGeometry variable {V : Type...
Mathlib/Geometry/Euclidean/Sphere/Basic.lean
124
128
theorem Sphere.center_eq_iff_eq_of_mem {s₁ s₂ : Sphere P} {p : P} (hs₁ : p ∈ s₁) (hs₂ : p ∈ s₂) : s₁.center = s₂.center ↔ s₁ = s₂ := by
refine ⟨fun h => Sphere.ext _ _ h ?_, fun h => h ▸ rfl⟩ rw [mem_sphere] at hs₁ hs₂ rw [← hs₁, ← hs₂, h]
[ " { center := s.center, radius := s.radius } = s", " { center := s.center, radius := s.radius }.center = s.center", " { center := s.center, radius := s.radius }.radius = s.radius", " s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius", " s₁.center = s₂.center ↔ s₁ = s₂", " s₁.radius = s₂.radius" ]
[ " { center := s.center, radius := s.radius } = s", " { center := s.center, radius := s.radius }.center = s.center", " { center := s.center, radius := s.radius }.radius = s.radius", " s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius" ]
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" n...
Mathlib/Analysis/SpecificLimits/Basic.lean
59
61
theorem NNReal.tendsto_const_div_atTop_nhds_zero_nat (C : ℝ≥0) : Tendsto (fun n : ℕ ↦ C / n) atTop (𝓝 0) := by
simpa using tendsto_const_nhds.mul NNReal.tendsto_inverse_atTop_nhds_zero_nat
[ " Tendsto (fun n => C / ↑n) atTop (𝓝 0)", " Tendsto (fun n => (↑n)⁻¹) atTop (𝓝 0)", " Tendsto (fun a => ↑(↑a)⁻¹) atTop (𝓝 ↑0)" ]
[ " Tendsto (fun n => C / ↑n) atTop (𝓝 0)", " Tendsto (fun n => (↑n)⁻¹) atTop (𝓝 0)", " Tendsto (fun a => ↑(↑a)⁻¹) atTop (𝓝 ↑0)" ]
import Mathlib.Order.Filter.Ultrafilter import Mathlib.Order.Filter.Germ #align_import order.filter.filter_product from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3bd48e9ed90ad94e947d" universe u v variable {α : Type u} {β : Type v} {φ : Ultrafilter α} open scoped Classical namespace Filter local not...
Mathlib/Order/Filter/FilterProduct.lean
82
84
theorem lt_def [Preorder β] : ((· < ·) : β* → β* → Prop) = LiftRel (· < ·) := by
ext ⟨f⟩ ⟨g⟩ exact coe_lt
[ " ((fun x => Inv.inv ∘ x) fun x => 0) =ᶠ[↑φ] fun x => 0", " ↑f < ↑g ↔ ∀* (x : α), f x < g x", " (fun x x_1 => x < x_1) = LiftRel fun x x_1 => x < x_1", " Quot.mk Setoid.r f < Quot.mk Setoid.r g ↔ LiftRel (fun x x_1 => x < x_1) (Quot.mk Setoid.r f) (Quot.mk Setoid.r g)" ]
[ " ((fun x => Inv.inv ∘ x) fun x => 0) =ᶠ[↑φ] fun x => 0", " ↑f < ↑g ↔ ∀* (x : α), f x < g x" ]
import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Data.Set.Lattice #align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Interval Function OrderDual namespace Set variable {α : Type*} [LinearOrder α] {s t : Set α}...
Mathlib/Order/Interval/Set/OrdConnectedComponent.lean
82
84
theorem mem_ordConnectedComponent_comm : y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y := by
rw [mem_ordConnectedComponent, mem_ordConnectedComponent, uIcc_comm]
[ " toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " x ∈ s.ordConnectedComponent x ↔ x ∈ s", " s.ordConnectedComponent x = ∅ ↔ x ∉ s", " univ.ordCon...
[ " toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " x ∈ s.ordConnectedComponent x ↔ x ∈ s", " s.ordConnectedComponent x = ∅ ↔ x ∉ s", " univ.ordCon...
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
63
63
theorem map₂_none_right (f : α → β → γ) (a : Option α) : map₂ f a none = none := by
cases a <;> rfl
[ " 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 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" ]
import Mathlib.MeasureTheory.Integral.Lebesgue open Set hiding restrict restrict_apply open Filter ENNReal NNReal MeasureTheory.Measure namespace MeasureTheory variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α} noncomputable def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥...
Mathlib/MeasureTheory/Measure/WithDensity.lean
116
119
theorem withDensity_sum {ι : Type*} {m : MeasurableSpace α} (μ : ι → Measure α) (f : α → ℝ≥0∞) : (sum μ).withDensity f = sum fun n => (μ n).withDensity f := by
ext1 s hs simp_rw [sum_apply _ hs, withDensity_apply f hs, restrict_sum μ hs, lintegral_sum_measure]
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.UniformLimitsDeriv import Mathlib.Topology.Algebra.InfiniteSum.Module import Mathlib.Analysis.NormedSpace.FunctionSeries #align_import analysis.calculus.series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982...
Mathlib/Analysis/Calculus/SmoothSeries.lean
60
66
theorem summable_of_summable_hasDerivAt_of_isPreconnected (hu : Summable u) (ht : IsOpen t) (h't : IsPreconnected t) (hg : ∀ n y, y ∈ t → HasDerivAt (g n) (g' n y) y) (hg' : ∀ n y, y ∈ t → ‖g' n y‖ ≤ u n) (hy₀ : y₀ ∈ t) (hg0 : Summable (g · y₀)) (hy : y ∈ t) : Summable fun n => g n y := by
simp_rw [hasDerivAt_iff_hasFDerivAt] at hg refine summable_of_summable_hasFDerivAt_of_isPreconnected hu ht h't hg ?_ hy₀ hg0 hy simpa? says simpa only [ContinuousLinearMap.norm_smulRight_apply, norm_one, one_mul]
[ " Summable fun n => f n x", " CauchySeq fun s => ∑ b ∈ s, f b x", " HasFDerivAt ((fun t x => ∑ i ∈ t, f i x) t) (∑ i ∈ t, f' i y) y", " Summable fun n => g n y", " ∀ (n : α), ∀ x ∈ t, ‖ContinuousLinearMap.smulRight 1 (g' n x)‖ ≤ u n" ]
[ " Summable fun n => f n x", " CauchySeq fun s => ∑ b ∈ s, f b x", " HasFDerivAt ((fun t x => ∑ i ∈ t, f i x) t) (∑ i ∈ t, f' i y) y" ]
import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker #align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99" namespace Matrix variable {α β R n m : Type*} open Function...
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
92
95
theorem IsDiag.add [AddZeroClass α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) : (A + B).IsDiag := by
intro i j h simp [ha h, hb h]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0" ]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0" ]
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
59
60
theorem pair_unpair' {n a b} (H : unpair n = (a, b)) : pair a b = n := by
simpa [H] using pair_unpair n
[ " 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", " ...
[ " 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.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {α : Type u} {β : Type v} {ι : Sort w} (r r' s : α → α → Prop) local infixl:50 " ≼ " => r def Directed (f : ι → α) := ∀ x y, ∃ z, ...
Mathlib/Order/Directed.lean
58
60
theorem directedOn_iff_directed {s} : @DirectedOn α r s ↔ Directed r (Subtype.val : s → α) := by
simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forall₂_congr fun x _ => by simp [And.comm, and_assoc]
[ " DirectedOn r s ↔ Directed r Subtype.val", " (∀ x ∈ s, ∀ y ∈ s, ∃ z ∈ s, r x z ∧ r y z) ↔ ∀ a ∈ s, ∀ a_1 ∈ s, ∃ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2", " (∀ y ∈ s, ∃ z ∈ s, r x z ∧ r y z) ↔ ∀ a ∈ s, ∃ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1" ]
[]
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open AffineMap AffineEquiv section variable (R : Type*) {V V' P P' : Type*} [Ring R] [Invertible (2 : R)] [AddCommGroup V] [Modu...
Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
77
79
theorem AffineEquiv.pointReflection_midpoint_right (x y : P) : pointReflection R (midpoint R x y) y = x := by
rw [midpoint_comm, AffineEquiv.pointReflection_midpoint_left]
[ " (pointReflection R (midpoint R x y)) x = y", " (pointReflection (midpoint R x y)) x = y", " midpoint R x y = midpoint R y x", " (pointReflection R (midpoint R x y)) y = x" ]
[ " (pointReflection R (midpoint R x y)) x = y", " (pointReflection (midpoint R x y)) x = y", " midpoint R x y = midpoint R y x" ]
import Mathlib.Tactic.NormNum.Inv set_option autoImplicit true open Lean Meta Qq namespace Mathlib.Meta.NormNum theorem isNat_eq_false [AddMonoidWithOne α] [CharZero α] : {a b : α} → {a' b' : ℕ} → IsNat a a' → IsNat b b' → Nat.beq a' b' = false → ¬a = b | _, _, _, _, ⟨rfl⟩, ⟨rfl⟩, h => by simp; exact Nat.n...
Mathlib/Tactic/NormNum/Eq.lean
26
29
theorem Rat.invOf_denom_swap [Ring α] (n₁ n₂ : ℤ) (a₁ a₂ : α) [Invertible a₁] [Invertible a₂] : n₁ * ⅟a₁ = n₂ * ⅟a₂ ↔ n₁ * a₂ = n₂ * a₁ := by
rw [mul_invOf_eq_iff_eq_mul_right, ← Int.commute_cast, mul_assoc, ← mul_left_eq_iff_eq_invOf_mul, Int.commute_cast]
[ " ¬↑n✝¹ = ↑n✝", " ¬n✝¹ = n✝", " ↑n₁ * ⅟a₁ = ↑n₂ * ⅟a₂ ↔ ↑n₁ * a₂ = ↑n₂ * a₁" ]
[ " ¬↑n✝¹ = ↑n✝", " ¬n✝¹ = n✝" ]
import Mathlib.RingTheory.EisensteinCriterion import Mathlib.RingTheory.Polynomial.ScaleRoots #align_import ring_theory.polynomial.eisenstein.basic from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973" universe u v w z variable {R : Type u} open Ideal Algebra Finset open Polynomial na...
Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean
66
69
theorem map {A : Type v} [CommRing A] (φ : R →+* A) : (f.map φ).IsWeaklyEisensteinAt (𝓟.map φ) := by
refine (isWeaklyEisensteinAt_iff _ _).2 fun hn => ?_ rw [coeff_map] exact mem_map_of_mem _ (hf.mem (lt_of_lt_of_le hn (natDegree_map_le _ _)))
[ " (Polynomial.map φ f).IsWeaklyEisensteinAt (Ideal.map φ 𝓟)", " (Polynomial.map φ f).coeff n✝ ∈ Ideal.map φ 𝓟", " φ (f.coeff n✝) ∈ Ideal.map φ 𝓟" ]
[]
import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Finset.Preimage #align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Function @[ext] structure YoungDiagram where cells : Finset (ℕ × ℕ) isLowerSet : IsLowerSet (cel...
Mathlib/Combinatorics/Young/YoungDiagram.lean
174
179
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ)) := by
refine Set.eq_of_subset_of_subset ?_ ?_ · intros x h simp? [mem_mk, Finset.coe_empty, Set.mem_empty_iff_false] at h says simp only [cells_bot, Finset.coe_empty, Set.mem_empty_iff_false] at h · simp only [cells_bot, Finset.coe_empty, Set.empty_subset]
[ " μ = ν", " IsLowerSet ↑(μ.cells ∪ ν.cells)", " IsLowerSet (↑μ.cells ∪ ↑ν.cells)", " IsLowerSet ↑(μ.cells ∩ ν.cells)", " IsLowerSet (↑μ.cells ∩ ↑ν.cells)", " IsLowerSet ↑∅", " b ∈ ↑∅", " False", " x✝ ∈ ⊥ → x✝ ∈ x✝¹", " x✝ ∈ x✝¹", " ↑⊥.cells = ∅", " ↑⊥.cells ⊆ ∅", " x ∈ ∅", " ∅ ⊆ ↑⊥.cells" ...
[ " μ = ν", " IsLowerSet ↑(μ.cells ∪ ν.cells)", " IsLowerSet (↑μ.cells ∪ ↑ν.cells)", " IsLowerSet ↑(μ.cells ∩ ν.cells)", " IsLowerSet (↑μ.cells ∩ ↑ν.cells)", " IsLowerSet ↑∅", " b ∈ ↑∅", " False", " x✝ ∈ ⊥ → x✝ ∈ x✝¹", " x✝ ∈ x✝¹" ]
import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Analysis.Fourier.PoissonSummation open Real Set MeasureTheory Filter Asymptotics intervalIntegral open scoped Real Topology FourierTransform RealInnerProductSpace open Complex hiding exp continuous_exp abs_of_nonneg sq_abs noncomp...
Mathlib/Analysis/SpecialFunctions/Gaussian/PoissonSummation.lean
88
122
theorem Complex.tsum_exp_neg_quadratic {a : ℂ} (ha : 0 < a.re) (b : ℂ) : (∑' n : ℤ, cexp (-π * a * n ^ 2 + 2 * π * b * n)) = 1 / a ^ (1 / 2 : ℂ) * ∑' n : ℤ, cexp (-π / a * (n + I * b) ^ 2) := by
let f : ℝ → ℂ := fun x ↦ cexp (-π * a * x ^ 2 + 2 * π * b * x) have hCf : Continuous f := by refine Complex.continuous_exp.comp (Continuous.add ?_ ?_) · exact continuous_const.mul (Complex.continuous_ofReal.pow 2) · exact continuous_const.mul Complex.continuous_ofReal have hFf : 𝓕 f = fun x : ℝ ↦ 1 ...
[ " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (-x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - (a * x ^ 2 + b * x)) atTop atTop", " (fun x => -x - (a * x ^ 2 + b * x)) = fun x => x * (-a * x - (...
[ " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (-x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - (a * x ^ 2 + b * x)) atTop atTop", " (fun x => -x - (a * x ^ 2 + b * x)) = fun x => x * (-a * x - (...
import Mathlib.Data.Complex.Exponential import Mathlib.Analysis.SpecialFunctions.Log.Deriv #align_import data.complex.exponential_bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973" namespace Real open IsAbsoluteValue Finset CauSeq Complex
Mathlib/Data/Complex/ExponentialBounds.lean
20
25
theorem exp_one_near_10 : |exp 1 - 2244083 / 825552| ≤ 1 / 10 ^ 10 := by
apply exp_approx_start iterate 13 refine exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) ?_ norm_num1 refine exp_approx_end' _ (by norm_num1; rfl) _ (by norm_cast) (by simp) ?_ rw [_root_.abs_one, abs_of_pos] <;> norm_num1
[ " |rexp 1 - 2244083 / 825552| ≤ 1 / 10 ^ 10", " |rexp 1 - expNear 0 1 (2244083 / 825552)| ≤ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 10)", " 0 + 1 = ?m.532", " 1 = ?m.532", " ↑1 = ?m.543", " |rexp 1 - expNear 1 1 ((2244083 / 825552 - 1) * 1)| ≤ |1| ^ 1 / ↑(Nat.factorial 1) * (1 / 10 ^ 10 * 1)", " 1 + 1 ...
[]
import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Polynomial.Roots import Mathlib.GroupTheory.SpecificGroups.Cyclic #align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e" section open Finset Polynomial Function Nat section CancelMonoidWithZero...
Mathlib/RingTheory/IntegralDomain.lean
61
69
theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type*} [CommSemiring R] [IsDomain R] [GCDMonoid R] [Unique Rˣ] {a b c : R} {n : ℕ} (cp : IsCoprime a b) (h : a * b = c ^ n) : ∃ d : R, a = d ^ n := by
refine exists_eq_pow_of_mul_eq_pow (isUnit_of_dvd_one ?_) h obtain ⟨x, y, hxy⟩ := cp rw [← hxy] exact -- Porting note: added `GCDMonoid.` twice dvd_add (dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_right _ _) _)
[ " 0⁻¹ = 0", " a * a⁻¹ = 1", " a * bijInv ⋯ 1 = 1", " ∃ d, a = d ^ n", " GCDMonoid.gcd a b ∣ 1", " GCDMonoid.gcd a b ∣ x * a + y * b" ]
[ " 0⁻¹ = 0", " a * a⁻¹ = 1", " a * bijInv ⋯ 1 = 1" ]
import Mathlib.Algebra.IsPrimePow import Mathlib.SetTheory.Cardinal.Ordinal import Mathlib.Tactic.WLOG #align_import set_theory.cardinal.divisibility from "leanprover-community/mathlib"@"ea050b44c0f9aba9d16a948c7cc7d2e7c8493567" namespace Cardinal open Cardinal universe u variable {a b : Cardinal.{u}} {n m : ℕ...
Mathlib/SetTheory/Cardinal/Divisibility.lean
43
58
theorem isUnit_iff : IsUnit a ↔ a = 1 := by
refine ⟨fun h => ?_, by rintro rfl exact isUnit_one⟩ rcases eq_or_ne a 0 with (rfl | ha) · exact (not_isUnit_zero h).elim rw [isUnit_iff_forall_dvd] at h cases' h 1 with t ht rw [eq_comm, mul_eq_one_iff'] at ht · exact ht.1 · exact one_le_iff_ne_zero.mpr ha · apply one_le_iff_ne_zero....
[ " IsUnit a ↔ a = 1", " a = 1 → IsUnit a", " IsUnit 1", " a = 1", " 0 = 1", " 1 ≤ a", " 1 ≤ t", " t ≠ 0", " False" ]
[]
import Mathlib.Init.Core import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0" noncomputable section open Affine section AffineSpace...
Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
81
87
theorem finite_of_fin_dim_affineIndependent [FiniteDimensional k V] {p : ι → P} (hi : AffineIndependent k p) : Finite ι := by
nontriviality ι; inhabit ι rw [affineIndependent_iff_linearIndependent_vsub k p default] at hi letI : IsNoetherian k V := IsNoetherian.iff_fg.2 inferInstance exact (Set.finite_singleton default).finite_of_compl (Set.finite_coe_iff.1 hi.finite_of_isNoetherian)
[ " _root_.Finite ι" ]
[]
import Mathlib.RingTheory.EisensteinCriterion import Mathlib.RingTheory.Polynomial.ScaleRoots #align_import ring_theory.polynomial.eisenstein.basic from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973" universe u v w z variable {R : Type u} open Ideal Algebra Finset open Polynomial na...
Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean
161
166
theorem scaleRoots.isWeaklyEisensteinAt (p : R[X]) {x : R} {P : Ideal R} (hP : x ∈ P) : (scaleRoots p x).IsWeaklyEisensteinAt P := by
refine ⟨fun i => ?_⟩ rw [coeff_scaleRoots] rw [natDegree_scaleRoots, ← tsub_pos_iff_lt] at i exact Ideal.mul_mem_left _ _ (Ideal.pow_mem_of_mem P hP _ i)
[ " (p.scaleRoots x).IsWeaklyEisensteinAt P", " (p.scaleRoots x).coeff n✝ ∈ P", " p.coeff n✝ * x ^ (p.natDegree - n✝) ∈ P" ]
[]
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480" open Set namespace MeasureTheory namespace Measure noncomputable instance instSub {α : Type*} [MeasurableSpace α] : Sub (Measure α) := ⟨fun ...
Mathlib/MeasureTheory/Measure/Sub.lean
105
134
theorem restrict_sub_eq_restrict_sub_restrict (h_meas_s : MeasurableSet s) : (μ - ν).restrict s = μ.restrict s - ν.restrict s := by
repeat rw [sub_def] have h_nonempty : { d | μ ≤ d + ν }.Nonempty := ⟨μ, Measure.le_add_right le_rfl⟩ rw [restrict_sInf_eq_sInf_restrict h_nonempty h_meas_s] apply le_antisymm · refine sInf_le_sInf_of_forall_exists_le ?_ intro ν' h_ν'_in rw [mem_setOf_eq] at h_ν'_in refine ⟨ν'.restrict s, ?_, rest...
[ " μ ≤ 0 + ν", " (μ - ν) s = μ s - ν s", " (fun t x => μ t - ν t) ∅ ⋯ = 0", " (fun t x => μ t - ν t) (⋃ i, g i) ⋯ = ∑' (i : ℕ), (fun t x => μ t - ν t) (g i) ⋯", " ∑' (i : ℕ), μ (g i) - ∑' (i : ℕ), ν (g i) = ∑' (i : ℕ), (μ (g i) - ν (g i))", " ∑' (i : ℕ), ν (g i) ≠ ⊤", " ν (⋃ i, g i) ≠ ⊤", " ν + measure...
[ " μ ≤ 0 + ν", " (μ - ν) s = μ s - ν s", " (fun t x => μ t - ν t) ∅ ⋯ = 0", " (fun t x => μ t - ν t) (⋃ i, g i) ⋯ = ∑' (i : ℕ), (fun t x => μ t - ν t) (g i) ⋯", " ∑' (i : ℕ), μ (g i) - ∑' (i : ℕ), ν (g i) = ∑' (i : ℕ), (μ (g i) - ν (g i))", " ∑' (i : ℕ), ν (g i) ≠ ⊤", " ν (⋃ i, g i) ≠ ⊤", " ν + measure...
import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Order.Bounds.OrderIso import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import algebra.bounds from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29...
Mathlib/Algebra/Bounds.lean
185
186
theorem ciInf_div (hf : BddBelow (range f)) (a : G) : (⨅ i, f i) / a = ⨅ i, f i / a := by
simp only [div_eq_mul_inv, ciInf_mul hf]
[ " (⨆ i, f i) / a = ⨆ i, f i / a", " (⨅ i, f i) / a = ⨅ i, f i / a" ]
[ " (⨆ i, f i) / a = ⨆ i, f i / a" ]
import Mathlib.CategoryTheory.Subobject.MonoOver import Mathlib.CategoryTheory.Skeletal import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.Tactic.ApplyFun import Mathlib.Tactic.CategoryTheory.Elementwise #align_import category_theory.subobject.basic from "leanprover-community/mathlib"@"70fd9563a21e7b...
Mathlib/CategoryTheory/Subobject/Basic.lean
580
582
theorem map_id (x : Subobject X) : (map (𝟙 X)).obj x = x := by
induction' x using Quotient.inductionOn' with f exact Quotient.sound ⟨(MonoOver.mapId _).app f⟩
[ " PartialOrder (Subobject X)", " PartialOrder (ThinSkeleton (MonoOver X))", " 𝟭 (Subobject A) ≅ lower e.functor ⋙ lower e.inverse", " 𝟭 (Subobject A) = lower e.functor ⋙ lower e.inverse", " 𝟭 (Subobject A) = ThinSkeleton.map (𝟭 (MonoOver A))", " lower e.functor ⋙ lower e.inverse = ThinSkeleton.map (e....
[ " PartialOrder (Subobject X)", " PartialOrder (ThinSkeleton (MonoOver X))", " 𝟭 (Subobject A) ≅ lower e.functor ⋙ lower e.inverse", " 𝟭 (Subobject A) = lower e.functor ⋙ lower e.inverse", " 𝟭 (Subobject A) = ThinSkeleton.map (𝟭 (MonoOver A))", " lower e.functor ⋙ lower e.inverse = ThinSkeleton.map (e....
import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.weighted_homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Fins...
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
89
91
theorem weightedTotalDegree'_zero (w : σ → M) : weightedTotalDegree' w (0 : MvPolynomial σ R) = ⊥ := by
simp only [weightedTotalDegree', support_zero, Finset.sup_empty]
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0", " (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0", " weightedTotalDegree' w 0 = ⊥" ]
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0", " (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0" ]
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ι : Type _} {α : ι → Type _} section cylinder def cylinder (s : Finset ι) (S : Set (∀ i : s, α...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
205
207
theorem union_cylinder_same (s : Finset ι) (S₁ : Set (∀ i : s, α i)) (S₂ : Set (∀ i : s, α i)) : cylinder s S₁ ∪ cylinder s S₂ = cylinder s (S₁ ∪ S₂) := by
classical rw [union_cylinder]; rfl
[ " cylinder s ∅ = ∅", " cylinder s univ = univ", " cylinder s S = ∅ ↔ S = ∅", " cylinder s S = ∅", " S = ∅", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder s₂ S₂ = cylinder (s₁ ∪ s₂) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₁ ∩ (fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₂)", " f ∈ cylind...
[ " cylinder s ∅ = ∅", " cylinder s univ = univ", " cylinder s S = ∅ ↔ S = ∅", " cylinder s S = ∅", " S = ∅", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder s₂ S₂ = cylinder (s₁ ∪ s₂) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₁ ∩ (fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₂)", " f ∈ cylind...
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce" open Set Filter MeasureTheory MeasurableSpace open scoped Classical Topology NNReal ENNReal MeasureTheory univers...
Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
76
82
theorem borel_eq_generateFrom_Ici_rat : borel ℝ = .generateFrom (⋃ a : ℚ, {Ici (a : ℝ)}) := by
rw [borel_eq_generateFrom_Iio_rat, iUnion_singleton_eq_range, iUnion_singleton_eq_range] refine le_antisymm (generateFrom_le ?_) (generateFrom_le ?_) <;> rintro _ ⟨q, rfl⟩ <;> dsimp only <;> [rw [← compl_Ici]; rw [← compl_Iio]] <;> exact MeasurableSet.compl (GenerateMeasurable.basic _ (mem_range_self q))
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace #align_import algebraic_geometry.open_immersion.basic from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" -- Porting note: due to `PresheafedSpace`, `SheafedSpace` and `Locally...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
145
146
theorem isoRestrict_inv_ofRestrict : H.isoRestrict.inv ≫ f = Y.ofRestrict _ := by
rw [Iso.inv_comp_eq, isoRestrict_hom_ofRestrict]
[]
[]
import Mathlib.Data.Matrix.Basis import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.Pi #align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" open Function Set Submodule namespace LinearMap variable (R : Type*) {ι : Type*} [Semiring R] ...
Mathlib/LinearAlgebra/StdBasis.lean
123
129
theorem iSup_range_stdBasis_eq_iInf_ker_proj {I J : Set ι} (hd : Disjoint I J) (hu : Set.univ ⊆ I ∪ J) (hI : Set.Finite I) : ⨆ i ∈ I, range (stdBasis R φ i) = ⨅ i ∈ J, ker (proj i : (∀ i, φ i) →ₗ[R] φ i) := by
refine le_antisymm (iSup_range_stdBasis_le_iInf_ker_proj _ _ _ _ hd) ?_ have : Set.univ ⊆ ↑hI.toFinset ∪ J := by rwa [hI.coe_toFinset] refine le_trans (iInf_ker_proj_le_iSup_range_stdBasis R φ this) (iSup_mono fun i => ?_) rw [Set.Finite.mem_toFinset]
[ " (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0", " (if i' = i then 1 else 0) = if i = i' then 1 else 0", " (i' = i) = (i = i')", " stdBasis R φ i = pi (diag i)", " (stdBasis R φ i) x j = (pi (diag i)) x j", " x = id x", " proj i ∘ₗ stdBasis R φ j = diag j i", " ⨆ i ∈ I, range (stdBasis ...
[ " (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0", " (if i' = i then 1 else 0) = if i = i' then 1 else 0", " (i' = i) = (i = i')", " stdBasis R φ i = pi (diag i)", " (stdBasis R φ i) x j = (pi (diag i)) x j", " x = id x", " proj i ∘ₗ stdBasis R φ j = diag j i", " ⨆ i ∈ I, range (stdBasis ...
import Batteries.Data.List.Lemmas import Batteries.Data.Array.Basic import Batteries.Tactic.SeqFocus import Batteries.Util.ProofWanted namespace Array theorem forIn_eq_data_forIn [Monad m] (as : Array α) (b : β) (f : α → β → m (ForInStep β)) : forIn as b f = forIn as.data b f := by let rec loop : ∀ {i h b ...
.lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
121
125
theorem size_shrink_loop (a : Array α) (n) : (shrink.loop n a).size = a.size - n := by
induction n generalizing a with simp[shrink.loop] | succ n ih => simp[ih] omega
[ " forIn as b f = forIn as.data b f", " forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f", " forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f", " forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f", " (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi...
[ " forIn as b f = forIn as.data b f", " forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f", " forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f", " forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f", " (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi...
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
124
134
theorem ascPochhammer_succ_right (n : ℕ) : ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X])) by apply_fun Polynomial.map (algebraMap ℕ S) at h simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X, Polynomial.map_natCast] using h induction' n with n ih · simp · conv_lhs => rw [ascPoch...
[ " ascPochhammer S 1 = X", " ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1)", " (ascPochhammer S n).Monic", " (ascPochhammer S 0).Monic", " (ascPochhammer S (n + 1)).Monic", " map f (ascPochhammer S n) = ascPochhammer T n", " map f (ascPochhammer S 0) = ascPochhammer T 0", " map f (ascP...
[ " ascPochhammer S 1 = X", " ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1)", " (ascPochhammer S n).Monic", " (ascPochhammer S 0).Monic", " (ascPochhammer S (n + 1)).Monic", " map f (ascPochhammer S n) = ascPochhammer T n", " map f (ascPochhammer S 0) = ascPochhammer T 0", " map f (ascP...
import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.MeasureTheory.Group.Measure #align_import measure_theory.group.integration from "leanprover-community/mathlib"@"ec247d43814751ffceb33b758e8820df2372bf6f" namespace MeasureTheory open Measure TopologicalSpace open scoped ENNReal variable {𝕜 M α G E F ...
Mathlib/MeasureTheory/Group/Integral.lean
79
83
theorem integral_div_right_eq_self [IsMulRightInvariant μ] (f : G → E) (g : G) : (∫ x, f (x / g) ∂μ) = ∫ x, f x ∂μ := by
simp_rw [div_eq_mul_inv] -- Porting note: was `simp_rw` rw [integral_mul_right_eq_self f g⁻¹]
[ " ∫ (x : G), f (g * x) ∂μ = ∫ (x : G), f x ∂μ", " ∫ (x : G), f (x * g) ∂μ = ∫ (x : G), f x ∂μ", " ∫ (x : G), f (x / g) ∂μ = ∫ (x : G), f x ∂μ", " ∫ (x : G), f (x * g⁻¹) ∂μ = ∫ (x : G), f x ∂μ" ]
[ " ∫ (x : G), f (g * x) ∂μ = ∫ (x : G), f x ∂μ", " ∫ (x : G), f (x * g) ∂μ = ∫ (x : G), f x ∂μ" ]
import Batteries.Data.List.Count import Batteries.Data.Fin.Lemmas open Nat Function namespace List theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : ∀ {a'}, a' ∈ l → R a a' := (pairwise_cons.1 p).1 _ theorem Pairwise.of_cons (p : (a :: l).Pairwise R) : Pairwise R l := (pairwise_cons.1 p).2 theorem...
.lake/packages/batteries/Batteries/Data/List/Pairwise.lean
114
118
theorem pairwise_middle {R : α → α → Prop} (s : ∀ {x y}, R x y → R y x) {a : α} {l₁ l₂ : List α} : Pairwise R (l₁ ++ a :: l₂) ↔ Pairwise R (a :: (l₁ ++ l₂)) := by
show Pairwise R (l₁ ++ ([a] ++ l₂)) ↔ Pairwise R ([a] ++ l₁ ++ l₂) rw [← append_assoc, pairwise_append, @pairwise_append _ _ ([a] ++ l₁), pairwise_append_comm s] simp only [mem_append, or_comm]
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " ∀ (a' : α), a' ∈ l → S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (∀ (a' : α✝), a' ∈ l✝ → R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " ∀ (a' : α), a' ∈ l → S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (∀ (a' : α✝), a' ∈ l✝ → R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
import Mathlib.SetTheory.Game.State #align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225" namespace SetTheory namespace PGame namespace Domineering open Function @[simps!] def shiftUp : ℤ × ℤ ≃ ℤ × ℤ := (Equiv.refl ℤ).prodCongr (Equiv.addRig...
Mathlib/SetTheory/Game/Domineering.lean
109
114
theorem moveLeft_card {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : Finset.card (moveLeft b m) + 2 = Finset.card b := by
dsimp [moveLeft] rw [Finset.card_erase_of_mem (snd_pred_mem_erase_of_mem_left h)] rw [Finset.card_erase_of_mem (Finset.mem_of_mem_inter_left h)] exact tsub_add_cancel_of_le (card_of_mem_left h)
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m", " 2 ≤ Finset.card b", " Finset.card (moveLeft b m) + 2 = Finset.card b", " ((Finset.erase b m).erase (m.1, m.2 - 1)).card + 2 = Finset.card b", " (Finset.erase b m).card - 1 + 2 = ...
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m", " 2 ≤ Finset.card b" ]
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ι : Type _} {α : ι → Type _} section squareCylinders def squareCylinders (C : ∀ i, Set (Set (α...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
63
105
theorem isPiSystem_squareCylinders {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) (hC_univ : ∀ i, univ ∈ C i) : IsPiSystem (squareCylinders C) := by
rintro S₁ ⟨s₁, t₁, h₁, rfl⟩ S₂ ⟨s₂, t₂, h₂, rfl⟩ hst_nonempty classical let t₁' := s₁.piecewise t₁ (fun i ↦ univ) let t₂' := s₂.piecewise t₂ (fun i ↦ univ) have h1 : ∀ i ∈ (s₁ : Set ι), t₁ i = t₁' i := fun i hi ↦ (Finset.piecewise_eq_of_mem _ _ _ hi).symm have h1' : ∀ i ∉ (s₁ : Set ι), t₁' i = univ := ...
[ " squareCylinders C = ⋃ s, (fun t => (↑s).pi t) '' univ.pi C", " f ∈ squareCylinders C ↔ f ∈ ⋃ s, (fun t => (↑s).pi t) '' univ.pi C", " IsPiSystem (squareCylinders C)", " (↑s₁).pi t₁ ∩ (↑s₂).pi t₂ ∈ squareCylinders C", " ((↑s₁ ∪ ↑s₂).pi fun i => t₁' i ∩ t₂' i) ∈ squareCylinders C", " (fun i => t₁' i ∩ t₂'...
[ " squareCylinders C = ⋃ s, (fun t => (↑s).pi t) '' univ.pi C", " f ∈ squareCylinders C ↔ f ∈ ⋃ s, (fun t => (↑s).pi t) '' univ.pi C" ]
import Mathlib.Probability.Kernel.Disintegration.Unique import Mathlib.Probability.Notation #align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d" open MeasureTheory Set Filter TopologicalSpace open scoped ENNReal MeasureTheory ProbabilityTheo...
Mathlib/Probability/Kernel/CondDistrib.lean
120
130
theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Measurable X) (hY : Measurable Y) (κ : kernel β Ω) [IsFiniteKernel κ] (hκ : μ.map (fun x => (X x, Y x)) = μ.map X ⊗ₘ κ) : ∀ᵐ x ∂μ.map X, κ x = condDistrib Y X μ x := by
have heq : μ.map X = (μ.map (fun x ↦ (X x, Y x))).fst := by ext s hs rw [Measure.map_apply hX hs, Measure.fst_apply hs, Measure.map_apply] exacts [rfl, Measurable.prod hX hY, measurable_fst hs] rw [heq, condDistrib] refine eq_condKernel_of_measure_eq_compProd _ ?_ convert hκ exact heq.symm
[ " IsMarkovKernel (condDistrib Y X μ)", " IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel", " ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)", " ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({...
[ " IsMarkovKernel (condDistrib Y X μ)", " IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel", " ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)", " ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({...
import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.Spectrum import Mathlib.Analysis.SpecialFunctions.Exponential import Mathlib.Algebra.Star.StarAlgHom #align_import analysis.normed_space.star.spectrum from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" l...
Mathlib/Analysis/NormedSpace/Star/Spectrum.lean
60
69
theorem IsSelfAdjoint.spectralRadius_eq_nnnorm {a : A} (ha : IsSelfAdjoint a) : spectralRadius ℂ a = ‖a‖₊ := by
have hconst : Tendsto (fun _n : ℕ => (‖a‖₊ : ℝ≥0∞)) atTop _ := tendsto_const_nhds refine tendsto_nhds_unique ?_ hconst convert (spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a : A)).comp (Nat.tendsto_pow_atTop_atTop_of_one_lt one_lt_two) using 1 refine funext fun n => ?_ rw [Function...
[ " spectralRadius ℂ a = ↑‖a‖₊", " Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 (spectralRadius ℂ a))", " (fun _n => ↑‖a‖₊) = (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n", " ↑‖a‖₊ = ((fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n) n", " ↑‖a‖₊ = ↑‖a‖₊ ^ (↑(2 ^ n) * (1 / ↑(2 ^ n)))" ]
[]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.LinearAlgebra.AffineSpace.Slope #align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open Topology Filter TopologicalSpace open Filter Set secti...
Mathlib/Analysis/Calculus/Deriv/Slope.lean
51
63
theorem hasDerivAtFilter_iff_tendsto_slope {x : 𝕜} {L : Filter 𝕜} : HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L ⊓ 𝓟 {x}ᶜ) (𝓝 f') := calc HasDerivAtFilter f f' x L ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0) := by
simp only [hasDerivAtFilter_iff_tendsto, ← norm_inv, ← norm_smul, ← tendsto_zero_iff_norm_tendsto_zero, slope_def_module, smul_sub] _ ↔ Tendsto (fun y ↦ slope f x y - (y - x)⁻¹ • (y - x) • f') (L ⊓ 𝓟 {x}ᶜ) (𝓝 0) := .symm <| tendsto_inf_principal_nhds_iff_of_forall_eq <| by simp _ ↔ Tend...
[ " HasDerivAtFilter f f' x L ↔ Tendsto (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0)", " ∀ a ∉ {x}ᶜ, slope f x a - (a - x)⁻¹ • (a - x) • f' = 0", " (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') =ᶠ[L ⊓ 𝓟 {x}ᶜ] fun y => slope f x y - f'", " slope f x y - (y - x)⁻¹ • (y - x) • f' = slope f x y -...
[]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from ...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
804
809
theorem sum_centroidWeights_eq_one_of_card_ne_zero [CharZero k] (h : card s ≠ 0) : ∑ i ∈ s, s.centroidWeights k i = 1 := by
-- Porting note: `simp` cannot find `mul_inv_cancel` and does not use `norm_cast` simp only [centroidWeights_apply, sum_const, nsmul_eq_mul, ne_eq, Nat.cast_eq_zero, card_eq_zero] refine mul_inv_cancel ?_ norm_cast
[ " ∑ i ∈ s, centroidWeights k s i = 1", " ↑s.card * (↑s.card)⁻¹ = 1", " ↑s.card ≠ 0" ]
[ " ∑ i ∈ s, centroidWeights k s i = 1" ]
import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion import Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits noncomputable section open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace universe ...
Mathlib/AlgebraicGeometry/Morphisms/Separated.lean
57
60
theorem respectsIso : MorphismProperty.RespectsIso @IsSeparated := by
rw [isSeparated_eq_diagonal_isClosedImmersion] apply MorphismProperty.RespectsIso.diagonal exact IsClosedImmersion.respectsIso
[ " @IsSeparated = MorphismProperty.diagonal @IsClosedImmersion", " IsSeparated x✝ ↔ MorphismProperty.diagonal (@IsClosedImmersion) x✝", " MorphismProperty.RespectsIso @IsSeparated", " (MorphismProperty.diagonal @IsClosedImmersion).RespectsIso", " MorphismProperty.RespectsIso @IsClosedImmersion" ]
[ " @IsSeparated = MorphismProperty.diagonal @IsClosedImmersion", " IsSeparated x✝ ↔ MorphismProperty.diagonal (@IsClosedImmersion) x✝" ]
import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Join #align_import analysis.convex.stone_separation from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" open Set variable {𝕜 E ι : Type*} [LinearOrderedField 𝕜] [AddCommGroup E] [Module 𝕜 E] {s t : Set E}
Mathlib/Analysis/Convex/StoneSeparation.lean
30
77
theorem not_disjoint_segment_convexHull_triple {p q u v x y z : E} (hz : z ∈ segment 𝕜 x y) (hu : u ∈ segment 𝕜 x p) (hv : v ∈ segment 𝕜 y q) : ¬Disjoint (segment 𝕜 u v) (convexHull 𝕜 {p, q, z}) := by
rw [not_disjoint_iff] obtain ⟨az, bz, haz, hbz, habz, rfl⟩ := hz obtain rfl | haz' := haz.eq_or_lt · rw [zero_add] at habz rw [zero_smul, zero_add, habz, one_smul] refine ⟨v, by apply right_mem_segment, segment_subset_convexHull ?_ ?_ hv⟩ <;> simp obtain ⟨av, bv, hav, hbv, habv, rfl⟩ := hv obtain r...
[ " ¬Disjoint (segment 𝕜 u v) ((convexHull 𝕜) {p, q, z})", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p, q, z}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, az • x + bz • y}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, 0 • x + bz • y}", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p...
[]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv #align_import analysis.ODE.gronwall from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] open Metric Set Asymptotics Fil...
Mathlib/Analysis/ODE/Gronwall.lean
79
83
theorem gronwallBound_x0 (δ K ε : ℝ) : gronwallBound δ K ε 0 = δ := by
by_cases hK : K = 0 · simp only [gronwallBound, if_pos hK, mul_zero, add_zero] · simp only [gronwallBound, if_neg hK, mul_zero, exp_zero, sub_self, mul_one, add_zero]
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.Multilinear.Basic #align_import linear_algebra.multilinear.basis from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" open MultilinearMap variable {R : Type*} {ι : Type*} {n : ℕ} {M : Fin n → Type*} {M₂ : Type*} {M₃ : Type*...
Mathlib/LinearAlgebra/Multilinear/Basis.lean
56
61
theorem Basis.ext_multilinear [Finite ι] {f g : MultilinearMap R (fun _ : ι => M₂) M₃} {ι₁ : Type*} (e : Basis ι₁ R M₂) (h : ∀ v : ι → ι₁, (f fun i => e (v i)) = g fun i => e (v i)) : f = g := by
cases nonempty_fintype ι exact (domDomCongr_eq_iff (Fintype.equivFin ι) f g).mp (Basis.ext_multilinear_fin (fun _ => e) fun i => h (i ∘ _))
[ " f = g", " f x = g x", " (fun x => x.curryLeft) f = (fun x => x.curryLeft) g", " ∀ (i : ι₁ 0), ((fun x => x.curryLeft) f) ((e 0) i) = ((fun x => x.curryLeft) g) ((e 0) i)", " ((fun x => x.curryLeft) f) ((e 0) i) = ((fun x => x.curryLeft) g) ((e 0) i)", " ∀ (v : (i : Fin m) → ι₁ i.succ),\n ((((fun x =>...
[ " f = g", " f x = g x", " (fun x => x.curryLeft) f = (fun x => x.curryLeft) g", " ∀ (i : ι₁ 0), ((fun x => x.curryLeft) f) ((e 0) i) = ((fun x => x.curryLeft) g) ((e 0) i)", " ((fun x => x.curryLeft) f) ((e 0) i) = ((fun x => x.curryLeft) g) ((e 0) i)", " ∀ (v : (i : Fin m) → ι₁ i.succ),\n ((((fun x =>...
import Mathlib.RingTheory.DedekindDomain.Ideal #align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87" noncomputable section open scoped Classical nonZeroDivisors open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind...
Mathlib/RingTheory/DedekindDomain/Factorization.lean
81
90
theorem Associates.finite_factors {I : Ideal R} (hI : I ≠ 0) : ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite, ((Associates.mk v.asIdeal).count (Associates.mk I).factors : ℤ) = 0 := by
have h_supp : {v : HeightOneSpectrum R | ¬((Associates.mk v.asIdeal).count (Associates.mk I).factors : ℤ) = 0} = {v : HeightOneSpectrum R | v.asIdeal ∣ I} := by ext v simp_rw [Int.natCast_eq_zero] exact Associates.count_ne_zero_iff_dvd hI v.irreducible rw [Filter.eventually_cofinite, h_supp] ex...
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w", " ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0", " {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0...
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w" ]
import Mathlib.Algebra.DirectSum.Finsupp import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.DirectSum.TensorProduct #align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d" noncomputable section open DirectSum TensorProduct ope...
Mathlib/LinearAlgebra/DirectSum/Finsupp.lean
320
323
theorem finsuppTensorFinsuppRid_single_tmul_single (a : ι) (b : κ) (m : M) (r : R) : finsuppTensorFinsuppRid R M ι κ (Finsupp.single a m ⊗ₜ[R] Finsupp.single b r) = Finsupp.single (a, b) (r • m) := by
simp [finsuppTensorFinsuppRid]
[ " (finsuppTensorFinsupp R S M N ι κ) (Finsupp.single i m ⊗ₜ[R] Finsupp.single k n) = Finsupp.single (i, k) (m ⊗ₜ[R] n)", " ((finsuppTensorFinsupp R S M N ι κ) (f ⊗ₜ[R] g)) (i, k) = f i ⊗ₜ[R] g k", " ((finsuppTensorFinsupp R S M N ι κ) (0 ⊗ₜ[R] g)) (i, k) = 0 i ⊗ₜ[R] g k", " ∀ (f g_1 : ι →₀ M),\n ((finsuppT...
[ " (finsuppTensorFinsupp R S M N ι κ) (Finsupp.single i m ⊗ₜ[R] Finsupp.single k n) = Finsupp.single (i, k) (m ⊗ₜ[R] n)", " ((finsuppTensorFinsupp R S M N ι κ) (f ⊗ₜ[R] g)) (i, k) = f i ⊗ₜ[R] g k", " ((finsuppTensorFinsupp R S M N ι κ) (0 ⊗ₜ[R] g)) (i, k) = 0 i ⊗ₜ[R] g k", " ∀ (f g_1 : ι →₀ M),\n ((finsuppT...
import Mathlib.Order.Filter.Basic #align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Set open Filter namespace Filter variable {α β γ δ : Type*} {ι : Sort*} section Prod variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β} protected ...
Mathlib/Order/Filter/Prod.lean
121
123
theorem sup_prod (f₁ f₂ : Filter α) (g : Filter β) : (f₁ ⊔ f₂) ×ˢ g = (f₁ ×ˢ g) ⊔ (f₂ ×ˢ g) := by
dsimp only [SProd.sprod] rw [Filter.prod, comap_sup, inf_sup_right, ← Filter.prod, ← Filter.prod]
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
import Mathlib.Topology.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
140
144
theorem uniformEmbedding_iff' [MetricSpace β] {f : γ → β} : UniformEmbedding f ↔ (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, dist a b < δ → dist (f a) (f b) < ε) ∧ ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, dist (f a) (f b) < ε → dist a b < δ := by
rw [uniformEmbedding_iff_uniformInducing, uniformInducing_iff, uniformContinuous_iff]
[ " 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.LinearAlgebra.Dual open Function Module variable (R M N : Type*) [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] structure PerfectPairing := toLin : M →ₗ[R] N →ₗ[R] R bijectiveLeft : Bijective toLin bijectiveRight : Bijective toLin.flip attribute [nolint docBlame] P...
Mathlib/LinearAlgebra/PerfectPairing.lean
112
115
theorem reflexive_left : IsReflexive R M where bijective_dual_eval' := by
rw [← p.toDualRight_symm_comp_toDualLeft] exact p.bijective_toDualRight_symm_toDualLeft
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }", " (p (p.toDual...
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }", " (p (p.toDual...
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMa...
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
459
465
theorem HasFDerivWithinAt.eventually_ne (h : HasFDerivWithinAt f f' s x) (hf' : ∃ C, ∀ z, ‖z‖ ≤ C * ‖f' z‖) : ∀ᶠ z in 𝓝[s \ {x}] x, f z ≠ f x := by
rw [nhdsWithin, diff_eq, ← inf_principal, ← inf_assoc, eventually_inf_principal] have A : (fun z => z - x) =O[𝓝[s] x] fun z => f' (z - x) := isBigO_iff.2 <| hf'.imp fun C hC => eventually_of_forall fun z => hC _ have : (fun z => f z - f x) ~[𝓝[s] x] fun z => f' (z - x) := h.isLittleO.trans_isBigO A simpa...
[ " HasStrictFDerivAt g (↑f'.symm) a", " (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)", " ↑f'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)", " (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[𝓝 (a, a)] fun p => p.1 - p.2",...
[ " HasStrictFDerivAt g (↑f'.symm) a", " (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)", " ↑f'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)", " (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[𝓝 (a, a)] fun p => p.1 - p.2",...
import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Digits import Mathlib.Data.Nat.MaxPowDiv import Mathlib.Data.Nat.Multiplicity import Mathlib.Tactic.IntervalCases #align_import number_theory.padics.padic_val from "leanprover-community/mathlib"@"60fa54e778c9e85d930efae172435f42fb0d71f7" universe u ope...
Mathlib/NumberTheory/Padics/PadicVal.lean
162
169
theorem of_ne_one_ne_zero {z : ℤ} (hp : p ≠ 1) (hz : z ≠ 0) : padicValInt p z = (multiplicity (p : ℤ) z).get (by apply multiplicity.finite_int_iff.2 simp [hp, hz]) := by
rw [padicValInt, padicValNat, dif_pos (And.intro hp (Int.natAbs_pos.mpr hz))] simp only [multiplicity.Int.natAbs p z]
[ " (multiplicity (↑p) z).Dom", " (↑p).natAbs ≠ 1 ∧ z ≠ 0", " padicValInt p z = (multiplicity (↑p) z).get ⋯", " (multiplicity p z.natAbs).get ⋯ = (multiplicity (↑p) z).get ⋯" ]
[]
import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Complex #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" noncomputable secti...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
69
72
theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, k * π / 2 = θ := by
rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← mul_right_inj' two_ne_zero, mul_zero, ← mul_assoc, ← sin_two_mul, sin_eq_zero_iff] field_simp [mul_comm, eq_comm]
[ " θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2", " (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1", " cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1", " (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +...
[ " θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2", " (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1", " cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1", " (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +...
import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Data.Rat.Cast.CharZero import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Order.Field.Basic #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {F ι α β : Type*} namespace Rat variable {p...
Mathlib/Data/Rat/Cast/Order.lean
31
33
theorem cast_pos_of_pos (hq : 0 < q) : (0 : K) < q := by
rw [Rat.cast_def] exact div_pos (Int.cast_pos.2 <| num_pos.2 hq) (Nat.cast_pos.2 q.pos)
[ " 0 < ↑q", " 0 < ↑q.num / ↑q.den" ]
[]
import Mathlib.Data.List.Basic namespace List variable {α β : Type*} @[simp] theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some...
Mathlib/Data/List/ReduceOption.lean
64
66
theorem reduceOption_length_eq_iff {l : List (Option α)} : l.reduceOption.length = l.length ↔ ∀ x ∈ l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace #align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb" open MeasureTheory Set Filter A...
Mathlib/Analysis/MellinTransform.lean
78
87
theorem MellinConvergent.comp_rpow {f : ℝ → E} {s : ℂ} {a : ℝ} (ha : a ≠ 0) : MellinConvergent (fun t => f (t ^ a)) s ↔ MellinConvergent f (s / a) := by
refine Iff.trans ?_ (integrableOn_Ioi_comp_rpow_iff' _ ha) rw [MellinConvergent] refine integrableOn_congr_fun (fun t ht => ?_) measurableSet_Ioi dsimp only [Pi.smul_apply] rw [← Complex.coe_smul (t ^ (a - 1)), ← mul_smul, ← cpow_mul_ofReal_nonneg (le_of_lt ht), ofReal_cpow (le_of_lt ht), ← cpow_add _ _ ...
[ " MellinConvergent (fun t => c • f t) s", " MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)", " ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t", " MellinConvergent (fun t => f t / a) s", " MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s", " (fun t ...
[ " MellinConvergent (fun t => c • f t) s", " MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)", " ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t", " MellinConvergent (fun t => f t / a) s", " MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s", " (fun t ...
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
54
56
theorem get_enum (l : List α) (i : Fin l.enum.length) : l.enum.get i = (i.1, l.get (i.cast enum_length)) := by
simp [enum]
[ " 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.FieldTheory.Separable import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.Algebra.CharP.Reduced open Function Polynomial class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where bijective_frobenius : Bijective <| frobenius R p section PerfectRing va...
Mathlib/FieldTheory/Perfect.lean
146
148
theorem frobenius_comp_frobeniusEquiv_symm : (frobenius R p).comp (frobeniusEquiv R p).symm = RingHom.id R := by
ext; simp
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x", " (iterateFrobeniusEquiv R p 1) x = x ^ p", " ⇑(iterateFrobeniusEq...
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x", " (iterateFrobeniusEquiv R p 1) x = x ^ p", " ⇑(iterateFrobeniusEq...
import Mathlib.Algebra.CharP.Two import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Periodic import Mathlib.Data.ZMod.Basic import Mathlib.Tactic.Monotonicity #align_import data.nat.totient from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8" open Finset namespace Nat ...
Mathlib/Data/Nat/Totient.lean
51
57
theorem totient_eq_card_lt_and_coprime (n : ℕ) : φ n = Nat.card { m | m < n ∧ n.Coprime m } := by
let e : { m | m < n ∧ n.Coprime m } ≃ Finset.filter n.Coprime (Finset.range n) := { toFun := fun m => ⟨m, by simpa only [Finset.mem_filter, Finset.mem_range] using m.property⟩ invFun := fun m => ⟨m, by simpa only [Finset.mem_filter, Finset.mem_range] using m.property⟩ left_inv := fun m => by simp onl...
[ " φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}", " ↑m ∈ filter n.Coprime (range n)", " ↑m ∈ {m | m < n ∧ n.Coprime m}", " (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m" ]
[]
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
123
127
theorem supported_le_supported_iff [Nontrivial R] : supported R s ≤ supported R t ↔ s ⊆ t := by
constructor · intro h i simpa using @h (X i) · exact supported_mono
[ " 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.Tactic.NormNum.Basic import Mathlib.Data.Rat.Cast.CharZero import Mathlib.Algebra.Field.Basic set_option autoImplicit true namespace Mathlib.Meta.NormNum open Lean.Meta Qq def inferCharZeroOfRing {α : Q(Type u)} (_i : Q(Ring $α) := by with_reducible assumption) : MetaM Q(CharZero $α) := ret...
Mathlib/Tactic/NormNum/Inv.lean
124
131
theorem isRat_inv_neg {α} [DivisionRing α] [CharZero α] {a : α} {n d : ℕ} : IsRat a (.negOfNat (Nat.succ n)) d → IsRat a⁻¹ (.negOfNat d) (Nat.succ n) := by
rintro ⟨_, rfl⟩ simp only [Int.negOfNat_eq] have := invertibleOfNonzero (α := α) (Nat.cast_ne_zero.2 (Nat.succ_ne_zero n)) generalize Nat.succ n = n at * use this; simp only [Int.ofNat_eq_coe, Int.cast_neg, Int.cast_natCast, invOf_eq_inv, inv_neg, neg_mul, mul_inv_rev, inv_inv]
[ " IsRat (mkRat ↑n✝¹ ↑n✝) num✝ denom✝", " IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝", " ↑↑n✝ = ↑n✝", " ↑qi * ↑denom✝ = 1", " ↑denom✝ * ↑qi = 1", " ↑(↑num✝ * ⅟↑denom✝) = ↑num✝ * ⅟↑denom✝", " ↑(↑num✝ * qi) = ↑num✝ * ↑qi", " IsRat a (Int.ofNat n.succ) d → IsRat a⁻¹ (Int.ofNat d) n.succ", " IsRat (↑(Int.ofNat n.s...
[ " IsRat (mkRat ↑n✝¹ ↑n✝) num✝ denom✝", " IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝", " ↑↑n✝ = ↑n✝", " ↑qi * ↑denom✝ = 1", " ↑denom✝ * ↑qi = 1", " ↑(↑num✝ * ⅟↑denom✝) = ↑num✝ * ⅟↑denom✝", " ↑(↑num✝ * qi) = ↑num✝ * ↑qi", " IsRat a (Int.ofNat n.succ) d → IsRat a⁻¹ (Int.ofNat d) n.succ", " IsRat (↑(Int.ofNat n.s...
import Mathlib.Analysis.BoxIntegral.Basic import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.Tactic.Generalize #align_import analysis.box_integral.integrability from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open scoped Classical NNReal ENNReal Topology universe u v ...
Mathlib/Analysis/BoxIntegral/Integrability.lean
104
155
theorem HasIntegral.of_aeEq_zero {l : IntegrationParams} {I : Box ι} {f : (ι → ℝ) → E} {μ : Measure (ι → ℝ)} [IsLocallyFiniteMeasure μ] (hf : f =ᵐ[μ.restrict I] 0) (hl : l.bRiemann = false) : HasIntegral.{u, v, v} I l f μ.toBoxAdditive.toSMul 0 := by
/- Each set `{x | n < ‖f x‖ ≤ n + 1}`, `n : ℕ`, has measure zero. We cover it by an open set of measure less than `ε / 2 ^ n / (n + 1)`. Then the norm of the integral sum is less than `ε`. -/ refine hasIntegral_iff.2 fun ε ε0 => ?_ lift ε to ℝ≥0 using ε0.lt.le; rw [gt_iff_lt, NNReal.coe_pos] at ε0 rcases N...
[ " HasIntegral I l (s.indicator fun x => y) μ.toBoxAdditive.toSMul ((μ (s ∩ ↑I)).toReal • y)", " ∃ r,\n (∀ (c : ℝ≥0), l.RCond (r c)) ∧\n ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n l.MemBaseSet I c (r c) π →\n π.IsPartition →\n dist (integralSum (s.indicator fun x => y) μ.toBoxAddi...
[ " HasIntegral I l (s.indicator fun x => y) μ.toBoxAdditive.toSMul ((μ (s ∩ ↑I)).toReal • y)", " ∃ r,\n (∀ (c : ℝ≥0), l.RCond (r c)) ∧\n ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n l.MemBaseSet I c (r c) π →\n π.IsPartition →\n dist (integralSum (s.indicator fun x => y) μ.toBoxAddi...
import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.RingTheory.Finiteness open scoped TensorProduct open Submodule variable {R M N : Type*} variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] variable {M₁ M₂ : Submodule R M} {N₁ N₂ : Submodule R N} namespace Tens...
Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
140
152
theorem exists_finite_submodule_of_finite' (s : Set (M₁ ⊗[R] N₁)) (hs : s.Finite) : ∃ (M' : Submodule R M) (N' : Submodule R N) (hM : M' ≤ M₁) (hN : N' ≤ N₁), Module.Finite R M' ∧ Module.Finite R N' ∧ s ⊆ LinearMap.range (TensorProduct.map (inclusion hM) (inclusion hN)) := by
obtain ⟨M', N', _, _, h⟩ := exists_finite_submodule_of_finite s hs have hM := map_subtype_le M₁ M' have hN := map_subtype_le N₁ N' refine ⟨_, _, hM, hN, .map _ _, .map _ _, ?_⟩ rw [mapIncl, show M'.subtype = inclusion hM ∘ₗ M₁.subtype.submoduleMap M' by ext; simp, show N'.subtype = inclusion hN ∘ₗ N₁...
[ " ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum", " ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum", ...
[ " ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum", " ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum", ...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Monic #align_import data.polynomial.lifts from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0" open Polynomial noncomputable section namespace Polynomial universe u v w section Semiring variable {R : Type...
Mathlib/Algebra/Polynomial/Lifts.lean
87
91
theorem C'_mem_lifts {f : R →+* S} {s : S} (h : s ∈ Set.range f) : C s ∈ lifts f := by
obtain ⟨r, rfl⟩ := Set.mem_range.1 h use C r simp only [coe_mapRingHom, map_C, Set.mem_univ, Subsemiring.coe_top, eq_self_iff_true, and_self_iff]
[ " p ∈ lifts f ↔ ∃ q, map f q = p", " p ∈ lifts f ↔ p ∈ Set.range (map f)", " p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS", " p ∈ lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f", " (∀ (n : ℕ), p.coeff n ∈ f.rangeS) ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f", " (mapRingHom f) (C r) = C (f r)", " C s ∈ lifts f", ...
[ " p ∈ lifts f ↔ ∃ q, map f q = p", " p ∈ lifts f ↔ p ∈ Set.range (map f)", " p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS", " p ∈ lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f", " (∀ (n : ℕ), p.coeff n ∈ f.rangeS) ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f", " (mapRingHom f) (C r) = C (f r)" ]
import Mathlib.Algebra.Polynomial.Div import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87" set_option linter.uppercaseLean3 false open Polynomial ...
Mathlib/RingTheory/Polynomial/Quotient.lean
205
209
theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i ∈ I) : (Ideal.Quotient.mk (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))).comp C i = 0 := by
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem] exact Ideal.mem_map_of_mem _ hi
[ " ((Ideal.Quotient.mk (Ideal.map C I)).comp C) i = 0", " C i ∈ Ideal.map C I" ]
[]
import Mathlib.Data.Multiset.Nodup #align_import data.multiset.dedup from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset open List variable {α β : Type*} [DecidableEq α] def dedup (s : Multiset α) : Multiset α := Quot.liftOn s (fun l => (l.dedup : Multiset α)...
Mathlib/Data/Multiset/Dedup.lean
120
122
theorem dedup_map_dedup_eq [DecidableEq β] (f : α → β) (s : Multiset α) : dedup (map f (dedup s)) = dedup (map f s) := by
simp [dedup_ext]
[ " count a (dedup (Quot.mk Setoid.r x✝)) = if a ∈ Quot.mk Setoid.r x✝ then 1 else 0", " List.count a x✝.dedup = if a ∈ x✝ then 1 else 0", " s ≤ s.dedup ↔ s.Nodup", " s.dedup = t.dedup ↔ ∀ (a : α), a ∈ s ↔ a ∈ t", " (map f s.dedup).dedup = (map f s).dedup" ]
[ " count a (dedup (Quot.mk Setoid.r x✝)) = if a ∈ Quot.mk Setoid.r x✝ then 1 else 0", " List.count a x✝.dedup = if a ∈ x✝ then 1 else 0", " s ≤ s.dedup ↔ s.Nodup", " s.dedup = t.dedup ↔ ∀ (a : α), a ∈ s ↔ a ∈ t" ]
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory.Invariants universe v u noncomputable section open CategoryTheory Limits Representation variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G) namespace grou...
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
409
411
theorem map_one_snd_of_isTwoCocycle {f : G × G → A} (hf : IsTwoCocycle f) (g : G) : f (g, 1) = g • f (1, 1) := by
simpa only [mul_one, add_left_inj] using hf g 1 1
[ " f 1 = 0", " f (1, g) = f (1, 1)", " f (g, 1) = g • f (1, 1)" ]
[ " f 1 = 0", " f (1, g) = f (1, 1)" ]
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall #align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88" noncomputable section open RCLike Real ...
Mathlib/Analysis/InnerProductSpace/Calculus.lean
322
325
theorem differentiableOn_euclidean : DifferentiableOn 𝕜 f t ↔ ∀ i, DifferentiableOn 𝕜 (fun x => f x i) t := by
rw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiableOn_iff, differentiableOn_pi] rfl
[ " DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA...
[ " DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA...
import Mathlib.Probability.Kernel.Disintegration.Unique import Mathlib.Probability.Notation #align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d" open MeasureTheory Set Filter TopologicalSpace open scoped ENNReal MeasureTheory ProbabilityTheo...
Mathlib/Probability/Kernel/CondDistrib.lean
157
160
theorem _root_.MeasureTheory.Integrable.integral_norm_condDistrib_map (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) : Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂condDistrib Y X μ x) (μ.map X) := by
rw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]; exact hf_int.integral_norm_condKernel
[ " IsMarkovKernel (condDistrib Y X μ)", " IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel", " ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)", " ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({...
[ " IsMarkovKernel (condDistrib Y X μ)", " IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel", " ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)", " ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({...
import Mathlib.Probability.ProbabilityMassFunction.Monad #align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" universe u namespace PMF noncomputable section variable {α β γ : Type*} open scoped Classical open NNReal ENN...
Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
125
128
theorem seq_apply : (seq q p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0 := by
simp only [seq, mul_boole, bind_apply, pure_apply] refine tsum_congr fun f => ENNReal.tsum_mul_left.symm.trans (tsum_congr fun a => ?_) simpa only [mul_zero] using mul_ite (b = f a) (q f) (p a) 0
[ " (map f p) b = ∑' (a : α), if b = f a then p a else 0", " b ∈ (map f p).support ↔ b ∈ f '' p.support", " b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b", " map g (map f p) = map (g ∘ f) p", " map (Function.const α b) p = pure b", " (q.seq p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0"...
[ " (map f p) b = ∑' (a : α), if b = f a then p a else 0", " b ∈ (map f p).support ↔ b ∈ f '' p.support", " b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b", " map g (map f p) = map (g ∘ f) p", " map (Function.const α b) p = pure b" ]
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R × S) where ...
Mathlib/RingTheory/Ideal/Prod.lean
103
105
theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} : prod I J = prod I' J' ↔ I = I' ∧ J = J' := by
simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff]
[ " ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier", " ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a...
[ " ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier", " ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a...
import Mathlib.Algebra.CharP.Defs import Mathlib.RingTheory.Multiplicity import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Polynomial open Finset (antidiagonal mem_anti...
Mathlib/RingTheory/PowerSeries/Order.lean
121
129
theorem le_order (φ : R⟦X⟧) (n : PartENat) (h : ∀ i : ℕ, ↑i < n → coeff R i φ = 0) : n ≤ order φ := by
induction n using PartENat.casesOn · show _ ≤ _ rw [top_le_iff, order_eq_top] ext i exact h _ (PartENat.natCast_lt_top i) · apply nat_le_order simpa only [PartENat.coe_lt_coe] using h
[ " (∃ n, (coeff R n) φ ≠ 0) ↔ φ ≠ 0", " (¬∃ n, (coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0", " (∀ (n : ℕ), (coeff R n) φ = 0) ↔ φ = 0", " φ.order.Dom ↔ φ ≠ 0", " (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom ↔ φ ≠ 0", " (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom → φ ≠ 0", " ⊤.Dom → φ ≠ 0", " (↑(Nat.find ⋯)).Dom → φ ≠...
[ " (∃ n, (coeff R n) φ ≠ 0) ↔ φ ≠ 0", " (¬∃ n, (coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0", " (∀ (n : ℕ), (coeff R n) φ = 0) ↔ φ = 0", " φ.order.Dom ↔ φ ≠ 0", " (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom ↔ φ ≠ 0", " (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom → φ ≠ 0", " ⊤.Dom → φ ≠ 0", " (↑(Nat.find ⋯)).Dom → φ ≠...
import Mathlib.Data.Finset.Image #align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" assert_not_exists MonoidWithZero -- TODO: After a lot more work, -- assert_not_exists OrderedCommMonoid open Function Multiset Nat variable {α β R : Type*} namespace Fin...
Mathlib/Data/Finset/Card.lean
150
152
theorem card_pair_eq_one_or_two : ({a,b} : Finset α).card = 1 ∨ ({a,b} : Finset α).card = 2 := by
simp [card_insert_eq_ite] tauto
[ " Monotone card", " ({a} ∩ s).card ≤ 1", " (insert a s).card = s.card + 1", " (insert a s).card = s.card", " (insert a s).card ≤ s.card + 1", " s.card ≤ s.card + 1", " (insert a s).card = if a ∈ s then s.card else s.card + 1", " {a, b}.card = 1 ∨ {a, b}.card = 2", " a = b ∨ ¬a = b" ]
[ " Monotone card", " ({a} ∩ s).card ≤ 1", " (insert a s).card = s.card + 1", " (insert a s).card = s.card", " (insert a s).card ≤ s.card + 1", " s.card ≤ s.card + 1", " (insert a s).card = if a ∈ s then s.card else s.card + 1" ]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
315
324
theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] : (descPochhammer R n).natDegree = n := by
induction' n with n hn · simp · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R) rw [descPochhammer_succ_right, natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this] cases n · simp · refine ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.add_one_po...
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic", " (descPochhammer R 0).Monic", " (descPochhammer R (n + 1)).Monic", " map f (descPochhammer R n) = descPochhammer T n", " map f (descPochhammer R 0) = descPochhammer T 0", " m...
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic", " (descPochhammer R 0).Monic", " (descPochhammer R (n + 1)).Monic", " map f (descPochhammer R n) = descPochhammer T n", " map f (descPochhammer R 0) = descPochhammer T 0", " m...
import Mathlib.MeasureTheory.OuterMeasure.Basic open Filter Set open scoped ENNReal namespace MeasureTheory variable {α β F : Type*} [FunLike F (Set α) ℝ≥0∞] [OuterMeasureClass F α] {μ : F} {s t : Set α} def ae (μ : F) : Filter α := .ofCountableUnion (μ · = 0) (fun _S hSc ↦ (measure_sUnion_null_iff hSc).2) fu...
Mathlib/MeasureTheory/OuterMeasure/AE.lean
107
109
theorem all_ae_of {ι : Sort*} {p : α → ι → Prop} (hp : ∀ᵐ a ∂μ, ∀ i, p a i) (i : ι) : ∀ᵐ a ∂μ, p a i := by
filter_upwards [hp] with a ha using ha i
[ " sᶜ ∈ ae μ ↔ μ s = 0", " CountableInterFilter (ae μ)", " CountableInterFilter (ofCountableUnion (fun x => μ x = 0) ⋯ ⋯)", " ∀ᵐ (a : α) ∂μ, p a i" ]
[ " sᶜ ∈ ae μ ↔ μ s = 0", " CountableInterFilter (ae μ)", " CountableInterFilter (ofCountableUnion (fun x => μ x = 0) ⋯ ⋯)" ]
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.LatticeIntervals import Mathlib.Order.Interval.Set.OrdConnected #align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open scoped Classical open Set variable {ι : ...
Mathlib/Order/CompleteLatticeIntervals.lean
62
64
theorem subset_sSup_emptyset [Inhabited s] : sSup (∅ : Set s) = default := by
simp [sSup]
[ " sSup (Subtype.val '' t) = ↑(sSup t)", " sSup ∅ = default" ]
[ " sSup (Subtype.val '' t) = ↑(sSup t)" ]
import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.ideal.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable {R : Type*} [CommRing R] namespace Ideal open Submodule variable (R) in def isPrincipalSubmonoid : Submonoid (Ideal R) where carrier := ...
Mathlib/RingTheory/Ideal/IsPrincipal.lean
75
78
theorem associatesEquivIsPrincipal_map_zero : (associatesEquivIsPrincipal R 0 : Ideal R) = 0 := by
rw [← Associates.mk_zero, ← Associates.quotient_mk_eq_mk, associatesEquivIsPrincipal_apply, Set.singleton_zero, span_zero, zero_eq_bot]
[ " ∀ {a b : Ideal R}, a ∈ {I | IsPrincipal I} → b ∈ {I | IsPrincipal I} → a * b ∈ {I | IsPrincipal I}", " Submodule.span R {x} * Submodule.span R {y} ∈ {I | IsPrincipal I}", " (fun x => ⟨span {x}, ⋯⟩) x✝² = (fun x => ⟨span {x}, ⋯⟩) x✝¹", " (fun I => Associates.mk (IsPrincipal.generator ↑I)) (Quotient.lift (fun...
[ " ∀ {a b : Ideal R}, a ∈ {I | IsPrincipal I} → b ∈ {I | IsPrincipal I} → a * b ∈ {I | IsPrincipal I}", " Submodule.span R {x} * Submodule.span R {y} ∈ {I | IsPrincipal I}", " (fun x => ⟨span {x}, ⋯⟩) x✝² = (fun x => ⟨span {x}, ⋯⟩) x✝¹", " (fun I => Associates.mk (IsPrincipal.generator ↑I)) (Quotient.lift (fun...
import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped NNReal Matrix namespace Matrix variable {R l m n α β : Type*} [Fintype l] [Fintyp...
Mathlib/Analysis/Matrix.lean
90
91
theorem norm_le_iff {r : ℝ} (hr : 0 ≤ r) {A : Matrix m n α} : ‖A‖ ≤ r ↔ ∀ i j, ‖A i j‖ ≤ r := by
simp_rw [norm_def, pi_norm_le_iff_of_nonneg hr]
[ " ‖A‖ = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => ‖A i j‖₊)", " ‖A‖ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖ ≤ r" ]
[ " ‖A‖ = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => ‖A i j‖₊)" ]
import Mathlib.LinearAlgebra.Quotient import Mathlib.Algebra.Category.ModuleCat.Basic #align_import algebra.category.Module.epi_mono from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe v u open CategoryTheory namespace ModuleCat variable {R : Type u} [Ring R] {X Y : ModuleCa...
Mathlib/Algebra/Category/ModuleCat/EpiMono.lean
44
45
theorem mono_iff_injective : Mono f ↔ Function.Injective f := by
rw [mono_iff_ker_eq_bot, LinearMap.ker_eq_bot]
[ " Function.Injective ⇑f", " Mono f ↔ Function.Injective ⇑f" ]
[ " Function.Injective ⇑f" ]
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
498
500
theorem nthHom_zero : nthHom f 0 = 0 := by
simp (config := { unfoldPartialApp := true }) [nthHom] rfl
[ " nthHom f 0 = 0", " (fun n => 0) = 0" ]
[]
import Mathlib.Algebra.Algebra.Subalgebra.Directed import Mathlib.FieldTheory.IntermediateField import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.RingTheory.TensorProduct.Basic #align_import field_theory.adjoin from "leanprover-community/mathlib"@"df76f4335...
Mathlib/FieldTheory/Adjoin.lean
62
67
theorem mem_adjoin_simple_iff {α : E} (x : E) : x ∈ adjoin F {α} ↔ ∃ r s : F[X], x = aeval α r / aeval α s := by
simp only [adjoin, mem_mk, Subring.mem_toSubsemiring, Subfield.mem_toSubring, Subfield.mem_closure_iff, ← Algebra.adjoin_eq_ring_closure, Subalgebra.mem_toSubring, Algebra.adjoin_singleton_eq_range_aeval, AlgHom.mem_range, exists_exists_eq_and] tauto
[ " x ∈ adjoin F S ↔ ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s", " (∃ a a_1, (MvPolynomial.aeval Subtype.val) a / (MvPolynomial.aeval Subtype.val) a_1 = x) ↔\n ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s", " x ∈ adjoin F {α} ↔ ∃ r ...
[ " x ∈ adjoin F S ↔ ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s", " (∃ a a_1, (MvPolynomial.aeval Subtype.val) a / (MvPolynomial.aeval Subtype.val) a_1 = x) ↔\n ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s" ]