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.Topology.ContinuousFunction.Bounded import Mathlib.Topology.UniformSpace.Compact import Mathlib.Topology.CompactOpen import Mathlib.Topology.Sets.Compacts import Mathlib.Analysis.Normed.Group.InfiniteSum #align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6d...
Mathlib/Topology/ContinuousFunction/Compact.lean
141
143
theorem dist_le_iff_of_nonempty [Nonempty α] : dist f g ≤ C ↔ ∀ x, dist (f x) (g x) ≤ C := by
simp only [← dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty, mkOfCompact_apply]
[ " (mkOfCompact f).toContinuousMap = f", " (mkOfCompact f).toContinuousMap a✝ = f a✝", " mkOfCompact f.toContinuousMap = f", " (mkOfCompact f.toContinuousMap) x✝ = f x✝", " ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun...
[ " (mkOfCompact f).toContinuousMap = f", " (mkOfCompact f).toContinuousMap a✝ = f a✝", " mkOfCompact f.toContinuousMap = f", " (mkOfCompact f.toContinuousMap) x✝ = f x✝", " ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun...
import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.MeasureTheory.Integral.FundThmCalculus #align_import analysis.special_functions.non_integrable from "leanprover-community/mathlib"@"55ec6e9af7d3e0043f57e394cb06a72f6275273e" open scoped MeasureTheory Topology Interval NNReal ENNReal open MeasureTh...
Mathlib/Analysis/SpecialFunctions/NonIntegrable.lean
98
121
theorem not_integrableOn_of_tendsto_norm_atTop_of_deriv_isBigO_filter {f : ℝ → E} {g : ℝ → F} {k : Set ℝ} (l : Filter ℝ) [NeBot l] [TendstoIxxClass Icc l l] (hl : k ∈ l) (hd : ∀ᶠ x in l, DifferentiableAt ℝ f x) (hf : Tendsto (fun x => ‖f x‖) l atTop) (hfg : deriv f =O[l] g) : ¬IntegrableOn g k := by
let a : E →ₗᵢ[ℝ] UniformSpace.Completion E := UniformSpace.Completion.toComplₗᵢ let f' := a ∘ f have h'd : ∀ᶠ x in l, DifferentiableAt ℝ f' x := by filter_upwards [hd] with x hx using a.toContinuousLinearMap.differentiableAt.comp x hx have h'f : Tendsto (fun x => ‖f' x‖) l atTop := hf.congr (fun x ↦ by sim...
[ " ¬IntegrableOn g k volume", " False", " ∃ C,\n ∃ (_ : 0 ≤ C),\n ∃ s ∈ l,\n (∀ x ∈ s, ∀ y ∈ s, [[x, y]] ⊆ k) ∧\n (∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], DifferentiableAt ℝ f z) ∧\n ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], ‖deriv f z‖ ≤ C * ‖g z‖", " IntegrableOn (fun x => C * ‖g x‖) k v...
[ " ¬IntegrableOn g k volume", " False", " ∃ C,\n ∃ (_ : 0 ≤ C),\n ∃ s ∈ l,\n (∀ x ∈ s, ∀ y ∈ s, [[x, y]] ⊆ k) ∧\n (∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], DifferentiableAt ℝ f z) ∧\n ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], ‖deriv f z‖ ≤ C * ‖g z‖", " IntegrableOn (fun x => C * ‖g x‖) k v...
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 α}
Mathlib/Topology/Order/DenselyOrdered.lean
25
29
theorem closure_Ioi' {a : α} (h : (Ioi a).Nonempty) : closure (Ioi a) = Ici a := by
apply Subset.antisymm · exact closure_minimal Ioi_subset_Ici_self isClosed_Ici · rw [← diff_subset_closure_iff, Ici_diff_Ioi_same, singleton_subset_iff] exact isGLB_Ioi.mem_closure h
[ " closure (Ioi a) = Ici a", " closure (Ioi a) ⊆ Ici a", " Ici a ⊆ closure (Ioi a)", " a ∈ closure (Ioi a)" ]
[]
import Mathlib.MeasureTheory.Covering.DensityTheorem import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar #align_import measure_theory.covering.one_dim from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open Set MeasureTheory IsUnifLocDoublingMeasure Filter open scoped Topology names...
Mathlib/MeasureTheory/Covering/OneDim.lean
26
30
theorem Icc_mem_vitaliFamily_at_right {x y : ℝ} (hxy : x < y) : Icc x y ∈ (vitaliFamily (volume : Measure ℝ) 1).setsAt x := by
rw [Icc_eq_closedBall] refine closedBall_mem_vitaliFamily_of_dist_le_mul _ ?_ (by linarith) rw [dist_comm, Real.dist_eq, abs_of_nonneg] <;> linarith
[ " Icc x y ∈ (vitaliFamily volume 1).setsAt x", " Metric.closedBall ((x + y) / 2) ((y - x) / 2) ∈ (vitaliFamily volume 1).setsAt x", " 0 < (y - x) / 2", " dist x ((x + y) / 2) ≤ 1 * ((y - x) / 2)", " (x + y) / 2 - x ≤ 1 * ((y - x) / 2)", " 0 ≤ (x + y) / 2 - x" ]
[]
import Mathlib.Init.Control.Combinators import Mathlib.Data.Option.Defs import Mathlib.Logic.IsEmpty import Mathlib.Logic.Relator import Mathlib.Util.CompileInductive import Aesop #align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a" universe u namespace Op...
Mathlib/Data/Option/Basic.lean
61
62
theorem exists_mem_map {f : α → β} {o : Option α} {p : β → Prop} : (∃ y ∈ o.map f, p y) ↔ ∃ x ∈ o, p (f x) := by
simp
[ " y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o", " (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)", " (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)" ]
[ " y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o", " (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)" ]
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set...
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
107
109
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} : (∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
[ " (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x" ]
[]
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Factorial.DoubleFactorial #align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74" noncomputable section open Polynomial namespace P...
Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
59
62
theorem hermite_eq_iterate (n : ℕ) : hermite n = (fun p => X * p - derivative p)^[n] 1 := by
induction' n with n ih · rfl · rw [Function.iterate_succ_apply', ← ih, hermite_succ]
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)", " hermite n = (fun p => X * p - derivative p)^[n] 1", " hermite 0 = (fun p => X * p - derivative p)^[0] 1", " hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1" ]
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)" ]
import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.SimpleGraph.Density import Mathlib.Data.Rat.BigOperators #align_import combinatorics.simple_graph.regularity.energy from "leanprover-community/mathlib"@"bf7ef0...
Mathlib/Combinatorics/SimpleGraph/Regularity/Energy.lean
42
43
theorem energy_nonneg : 0 ≤ P.energy G := by
exact div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) <| sq_nonneg _
[ " 0 ≤ P.energy G" ]
[]
import Mathlib.MeasureTheory.Group.Arithmetic #align_import measure_theory.group.pointwise from "leanprover-community/mathlib"@"66f7114a1d5cba41c47d417a034bbb2e96cf564a" open Pointwise open Set @[to_additive] theorem MeasurableSet.const_smul {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace G] [Measu...
Mathlib/MeasureTheory/Group/Pointwise.lean
39
44
theorem MeasurableSet.const_smul₀ {G₀ α : Type*} [GroupWithZero G₀] [Zero α] [MulActionWithZero G₀ α] [MeasurableSpace G₀] [MeasurableSpace α] [MeasurableSMul G₀ α] [MeasurableSingletonClass α] {s : Set α} (hs : MeasurableSet s) (a : G₀) : MeasurableSet (a • s) := by
rcases eq_or_ne a 0 with (rfl | ha) exacts [(subsingleton_zero_smul_set s).measurableSet, hs.const_smul_of_ne_zero ha]
[ " MeasurableSet (a • s)", " MeasurableSet ((fun x => a⁻¹ • x) ⁻¹' s)" ]
[ " MeasurableSet (a • s)", " MeasurableSet ((fun x => a⁻¹ • x) ⁻¹' s)" ]
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
113
119
theorem coeff_reflect (N : ℕ) (f : R[X]) (i : ℕ) : coeff (reflect N f) i = f.coeff (revAt N i) := by
rcases f with ⟨f⟩ simp only [reflect, coeff] calc Finsupp.embDomain (revAt N) f i = Finsupp.embDomain (revAt N) f (revAt N (revAt N i)) := by rw [revAt_invol] _ = f (revAt N i) := Finsupp.embDomain_apply _ _ _
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
52
56
theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by
simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt
[ " HasDerivWithinAt (fun x => (B (u x)) (v x)) ((B (u x)) v' + (B u') (v x)) s x" ]
[]
import Mathlib.CategoryTheory.Filtered.Connected import Mathlib.CategoryTheory.Limits.TypesFiltered import Mathlib.CategoryTheory.Limits.Final universe v₁ v₂ u₁ u₂ namespace CategoryTheory open CategoryTheory.Limits CategoryTheory.Functor Opposite section ArbitraryUniverses variable {C : Type u₁} [Category.{v₁}...
Mathlib/CategoryTheory/Filtered/Final.lean
99
104
theorem Functor.initial_of_exists_of_isCofiltered [IsCofilteredOrEmpty C] (h₁ : ∀ d, ∃ c, Nonempty (F.obj c ⟶ d)) (h₂ : ∀ {d : D} {c : C} (s s' : F.obj c ⟶ d), ∃ (c' : C) (t : c' ⟶ c), F.map t ≫ s = F.map t ≫ s') : Functor.Initial F := by
suffices ∀ d, IsCofiltered (CostructuredArrow F d) from initial_of_isCofiltered_costructuredArrow F exact isCofiltered_costructuredArrow_of_isCofiltered_of_exists F h₁ h₂
[ " IsFiltered (StructuredArrow d F)", " Nonempty (StructuredArrow d F)", " IsFilteredOrEmpty (StructuredArrow d F)", " ∃ Z x x, True", " f ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))", " g ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))", ...
[ " IsFiltered (StructuredArrow d F)", " Nonempty (StructuredArrow d F)", " IsFilteredOrEmpty (StructuredArrow d F)", " ∃ Z x x, True", " f ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))", " g ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))", ...
import Mathlib.Algebra.Lie.Submodule #align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" universe u v w w₁ w₂ namespace LieSubmodule variable {R : Type u} {L : Type v} {M : Type w} {M₂ : Type w₁} variable [CommRing R] [LieRing L] [LieAlgebra ...
Mathlib/Algebra/Lie/IdealOperations.lean
103
104
theorem lie_coe_mem_lie (x : I) (m : N) : ⁅(x : L), (m : M)⁆ ∈ ⁅I, N⁆ := by
rw [lieIdeal_oper_eq_span]; apply subset_lieSpan; use x, m
[ " ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s", " ⁅y, m'⁆ ∈ Submodule.span R s", " ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x", " ⁅y, m''⁆ ∈ Submodule.span R s"...
[ " ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s", " ⁅y, m'⁆ ∈ Submodule.span R s", " ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x", " ⁅y, m''⁆ ∈ Submodule.span R s"...
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Laurent import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.RingTheory.Polynomial.Nilpotent #align_import linear_algebra.matrix.charpoly.coeff from "leanprover-community/mathlib"@"9745b...
Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
89
93
theorem det_of_card_zero (h : Fintype.card n = 0) (M : Matrix n n R) : M.det = 1 := by
rw [Fintype.card_eq_zero_iff] at h suffices M = 1 by simp [this] ext i exact h.elim i
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ 1", " (M.charmatrix i j).natDegree ≤ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (∑ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ 1", " (M.charmatrix i j).natDegree ≤ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (∑ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Topology.Algebra.Field import Mathlib.Topology.Algebra.Order.Group #align_import topology.algebra.order.field from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Set Filter TopologicalSpace Function open scoped Pointwise Top...
Mathlib/Topology/Algebra/Order/Field.lean
72
74
theorem Filter.Tendsto.mul_atTop {C : 𝕜} (hC : 0 < C) (hf : Tendsto f l (𝓝 C)) (hg : Tendsto g l atTop) : Tendsto (fun x => f x * g x) l atTop := by
simpa only [mul_comm] using hg.atTop_mul hC hf
[ " TopologicalRing R", " ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)", " ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}", " c * norm x < ε", " ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �...
[ " TopologicalRing R", " ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)", " ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}", " c * norm x < ε", " ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �...
import Mathlib.Algebra.Order.Field.Pi import Mathlib.Algebra.Order.UpperLower import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.Normed.Order.Basic import Mathlib.Data.Real.Sqrt import Mathlib.Topology.Algebra.Order.UpperLower import Mathlib.Topology.MetricSpace.Sequences #align_import analysis.no...
Mathlib/Analysis/Normed/Order/UpperLower.lean
94
109
theorem IsUpperSet.mem_interior_of_forall_lt (hs : IsUpperSet s) (hx : x ∈ closure s) (h : ∀ i, x i < y i) : y ∈ interior s := by
cases nonempty_fintype ι obtain ⟨ε, hε, hxy⟩ := Pi.exists_forall_pos_add_lt h obtain ⟨z, hz, hxz⟩ := Metric.mem_closure_iff.1 hx _ hε rw [dist_pi_lt_iff hε] at hxz have hyz : ∀ i, z i < y i := by refine fun i => (hxy _).trans_le' (sub_le_iff_le_add'.1 <| (le_abs_self _).trans ?_) rw [← Real.norm_eq_a...
[ " y ∈ interior s", " ∀ (i : ι), z i < y i", " |z i - x i| ≤ ε", " dist (x i) (z i) ≤ ε", " ball y δ ⊆ s", " w ∈ s", " z i ≤ w i" ]
[]
import Mathlib.MeasureTheory.Integral.SetToL1 #align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" assert_not_exists Differentiable noncomputable section open scoped Topology NNReal ENNReal MeasureTheory open Set Filter TopologicalSpace EN...
Mathlib/MeasureTheory/Integral/Bochner.lean
282
286
theorem posPart_sub_negPart (f : α →ₛ ℝ) : f.posPart - f.negPart = f := by
simp only [posPart, negPart] ext a rw [coe_sub] exact max_zero_sub_eq_self (f a)
[ " map norm f.posPart = f.posPart", " ↑(map norm f.posPart) a✝ = ↑f.posPart a✝", " 0 ≤ ↑f.posPart a✝", " map norm f.negPart = f.negPart", " map norm (-f).posPart = (-f).posPart", " f.posPart - f.negPart = f", " map (fun b => max b 0) f - map (fun b => max b 0) (-f) = f", " ↑(map (fun b => max b 0) f - ...
[ " map norm f.posPart = f.posPart", " ↑(map norm f.posPart) a✝ = ↑f.posPart a✝", " 0 ≤ ↑f.posPart a✝", " map norm f.negPart = f.negPart", " map norm (-f).posPart = (-f).posPart" ]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Data.ENat.Basic #align_import data.polynomial.degree.trailing_degree from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" noncomputable section open Function Polynomial Finsupp Finset open scoped Polynomial namespace ...
Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
158
164
theorem natTrailingDegree_le_of_ne_zero (h : coeff p n ≠ 0) : natTrailingDegree p ≤ n := by
have : WithTop.some (natTrailingDegree p) = Nat.cast (natTrailingDegree p) := rfl rw [← WithTop.coe_le_coe, this, ← trailingDegree_eq_natTrailingDegree] · exact trailingDegree_le_of_ne_zero h · intro h subst h exact h rfl
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n", " p.trailingDegree = ↑n → p.natTrailingDegree = n", " p.natTrailingDegree = n", " p ≠ 0", " ...
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n", " p.trailingDegree = ↑n → p.natTrailingDegree = n", " p.natTrailingDegree = n", " p ≠ 0", " ...
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Nat import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.OrderOfElement import Mathlib.RingTheory.Fintype import Mathlib.Tactic.IntervalCases #align_import number_the...
Mathlib/NumberTheory/LucasLehmer.lean
154
158
theorem sZMod_eq_s (p' : ℕ) (i : ℕ) : sZMod (p' + 2) i = (s i : ZMod (2 ^ (p' + 2) - 1)) := by
induction' i with i ih · dsimp [s, sZMod] norm_num · push_cast [s, sZMod, ih]; rfl
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2", " 0 ≤ sMod p i", " 0 ≤ sMod p 0", " 0 ≤ sMod p (n✝ + 1)", " 0 ≤ 4 % (2 ^ p - 1)", " 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)", " 2 ^ p - 1 ≠ 0", " sMod p i % (2 ^ p - 1) = sMod p i", " sMod p 0 % (2 ^ p - 1) = sMod p...
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2", " 0 ≤ sMod p i", " 0 ≤ sMod p 0", " 0 ≤ sMod p (n✝ + 1)", " 0 ≤ 4 % (2 ^ p - 1)", " 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)", " 2 ^ p - 1 ≠ 0", " sMod p i % (2 ^ p - 1) = sMod p i", " sMod p 0 % (2 ^ p - 1) = sMod p...
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {α β γ : Type*} section ConditionallyCompleteLinearOrder variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] [ConditionallyCompleteLinearOrder β] [Top...
Mathlib/Topology/Order/Monotone.lean
58
62
theorem Monotone.map_iInf_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α} (Cf : ContinuousAt f (iInf g)) (Mf : Monotone f) (bdd : BddBelow (range g) := by
bddDefault) : f (⨅ i, g i) = ⨅ i, f (g i) := by rw [iInf, Monotone.map_sInf_of_continuousAt' Cf Mf (range_nonempty g) bdd, ← range_comp, iInf] rfl
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))", " f (⨅ i, g i) = ⨅ i, f (g i)", " sInf (range (f ∘ g)) = sInf (range fun i => f (g i))" ]
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))" ]
import Mathlib.CategoryTheory.Closed.Cartesian import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Adjunction.FullyFaithful #align_import category_theory.closed.functor from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184" noncomputable secti...
Mathlib/CategoryTheory/Closed/Functor.lean
91
97
theorem coev_expComparison (A B : C) : F.map ((exp.coev A).app B) ≫ (expComparison F A).app (A ⨯ B) = (exp.coev _).app (F.obj B) ≫ (exp (F.obj A)).map (inv (prodComparison F A B)) := by
convert unit_transferNatTrans _ _ (prodComparisonNatIso F A).inv B using 3 apply IsIso.inv_eq_of_hom_inv_id -- Porting note: was `ext` dsimp simp
[ " IsIso ((frobeniusMorphism F h A).app B)", " IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (𝟙 (L.obj B)))", " prod.map (𝟙 (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A ⟹ B)) ≫ F.map ((exp.ev A).app B)", " inv (prodComparison F ...
[ " IsIso ((frobeniusMorphism F h A).app B)", " IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (𝟙 (L.obj B)))", " prod.map (𝟙 (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A ⟹ B)) ≫ F.map ((exp.ev A).app B)", " inv (prodComparison F ...
import Mathlib.Topology.PartialHomeomorph import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Data.Real.Sqrt #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Set Metric Pointwise var...
Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
140
141
theorem univBall_apply_zero (c : P) (r : ℝ) : univBall c r 0 = c := by
unfold univBall; split_ifs <;> simp
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Baire.LocallyCompactRegular import Mathlib.Topology.Instances.Irrational #align_import number_theory.liouville.residual from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c" open scope...
Mathlib/NumberTheory/Liouville/Residual.lean
25
31
theorem setOf_liouville_eq_iInter_iUnion : { x | Liouville x } = ⋂ n : ℕ, ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball ((a : ℝ) / b) (1 / (b : ℝ) ^ n) \ {(a : ℝ) / b} := by
ext x simp only [mem_iInter, mem_iUnion, Liouville, mem_setOf_eq, exists_prop, mem_diff, mem_singleton_iff, mem_ball, Real.dist_eq, and_comm]
[ " {x | Liouville x} = ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}", " x ∈ {x | Liouville x} ↔ x ∈ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}" ]
[]
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.Adjugate import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422" namespace Matrix universe u u' v variable {l : ...
Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
221
222
theorem nonsing_inv_apply_not_isUnit (h : ¬IsUnit A.det) : A⁻¹ = 0 := by
rw [inv_def, Ring.inverse_non_unit _ h, zero_smul]
[ " IsUnit Aᵀ.det", " IsUnit A.det", " A⁻¹ = 0" ]
[ " IsUnit Aᵀ.det", " IsUnit A.det" ]
import Mathlib.Data.Set.Function import Mathlib.Logic.Relation import Mathlib.Logic.Pairwise #align_import data.set.pairwise.basic from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Order Set variable {α β γ ι ι' : Type*} {r p q : α → α → Prop} section Pairwise variabl...
Mathlib/Data/Set/Pairwise/Basic.lean
234
236
theorem pairwise_subtype_iff_pairwise_set (s : Set α) (r : α → α → Prop) : (Pairwise fun (x : s) (y : s) => r x y) ↔ s.Pairwise r := by
simp only [Pairwise, Set.Pairwise, SetCoe.forall, Ne, Subtype.ext_iff, Subtype.coe_mk]
[ " Pairwise (r on fun c => bif c then a else b) ↔ r a b", " (Pairwise fun x y => r ↑x ↑y) ↔ s.Pairwise r" ]
[ " Pairwise (r on fun c => bif c then a else b) ↔ r a b" ]
import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.DMatrix import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.Tactic.FieldSimp #align_import linear_algebra.matrix.transvection from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e...
Mathlib/LinearAlgebra/Matrix/Transvection.lean
371
380
theorem listTransvecCol_mul_last_row_drop (i : Sum (Fin r) Unit) {k : ℕ} (hk : k ≤ r) : (((listTransvecCol M).drop k).prod * M) (inr unit) i = M (inr unit) i := by
-- Porting note: `apply` didn't work anymore, because of the implicit arguments refine Nat.decreasingInduction' ?_ hk ?_ · intro n hn _ IH have hn' : n < (listTransvecCol M).length := by simpa [listTransvecCol] using hn rw [List.drop_eq_get_cons hn'] simpa [listTransvecCol, Matrix.mul_assoc] · simp...
[ " transvection i j 0 = 1", " updateRow 1 i (1 i + c • 1 j) = transvection i j c", " updateRow 1 i (1 i + c • 1 j) a b = transvection i j c a b", " transvection i j c * transvection i j d = transvection i j (c + d)", " (transvection i j c * M) i b = M i b + c * M j b", " (M * transvection i j c) a j = M a ...
[ " transvection i j 0 = 1", " updateRow 1 i (1 i + c • 1 j) = transvection i j c", " updateRow 1 i (1 i + c • 1 j) a b = transvection i j c a b", " transvection i j c * transvection i j d = transvection i j (c + d)", " (transvection i j c * M) i b = M i b + c * M j b", " (M * transvection i j c) a j = M a ...
import Batteries.Tactic.SeqFocus import Batteries.Data.List.Lemmas import Batteries.Data.List.Init.Attach namespace Std.Range def numElems (r : Range) : Nat := if r.step = 0 then -- This is a very weird choice, but it is chosen to coincide with the `forIn` impl if r.stop ≤ r.start then 0 else r.stop els...
.lake/packages/batteries/Batteries/Data/Range/Lemmas.lean
40
47
theorem mem_range'_elems (r : Range) (h : x ∈ List.range' r.start r.numElems r.step) : x ∈ r := by
obtain ⟨i, h', rfl⟩ := List.mem_range'.1 h refine ⟨Nat.le_add_right .., ?_⟩ unfold numElems at h'; split at h' · split at h' <;> [cases h'; simp_all] · next step0 => refine Nat.not_le.1 fun h => Nat.not_le.2 h' <| (numElems_le_iff (Nat.pos_of_ne_zero step0)).2 h
[ " { start := start, stop := stop, step := step }.numElems = 0", " (if step = 0 then if stop ≤ start then 0 else stop else (stop - start + step - 1) / step) = 0", " 0 = 0", " (stop - start + step - 1) / step = 0", " stop - start + step - 1 < step", " step - 1 < step", " { start := start, stop := stop, st...
[ " { start := start, stop := stop, step := step }.numElems = 0", " (if step = 0 then if stop ≤ start then 0 else stop else (stop - start + step - 1) / step) = 0", " 0 = 0", " (stop - start + step - 1) / step = 0", " stop - start + step - 1 < step", " step - 1 < step", " { start := start, stop := stop, st...
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Field.Rat import Mathlib.GroupTheory.GroupAction.Group import Mathlib.GroupTheory.GroupAction.Pi #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" o...
Mathlib/Algebra/Module/Basic.lean
61
66
theorem map_ratCast_smul [AddCommGroup M] [AddCommGroup M₂] {F : Type*} [FunLike F M M₂] [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [DivisionRing R] [DivisionRing S] [Module R M] [Module S M₂] (c : ℚ) (x : M) : f ((c : R) • x) = (c : S) • f x := by
rw [Rat.cast_def, Rat.cast_def, div_eq_mul_inv, div_eq_mul_inv, mul_smul, mul_smul, map_intCast_smul f R S, map_inv_natCast_smul f R S]
[ " f ((↑n)⁻¹ • x) = (↑n)⁻¹ • f x", " ∀ (y : M), f y = 0", " f x = 0", " (↑n)⁻¹ • f (↑n • x) = 0", " f ((↑z)⁻¹ • x) = (↑z)⁻¹ • f x", " f ((↑↑n)⁻¹ • x) = (↑↑n)⁻¹ • f x", " f ((↑(-↑n))⁻¹ • x) = (↑(-↑n))⁻¹ • f x", " f (↑c • x) = ↑c • f x" ]
[ " f ((↑n)⁻¹ • x) = (↑n)⁻¹ • f x", " ∀ (y : M), f y = 0", " f x = 0", " (↑n)⁻¹ • f (↑n • x) = 0", " f ((↑z)⁻¹ • x) = (↑z)⁻¹ • f x", " f ((↑↑n)⁻¹ • x) = (↑↑n)⁻¹ • f x", " f ((↑(-↑n))⁻¹ • x) = (↑(-↑n))⁻¹ • f x" ]
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
96
99
theorem prevD_eq (f : ∀ i j, C.X i ⟶ D.X j) {j j' : ι} (w : c.Rel j' j) : prevD j f = f j j' ≫ D.d j' j := by
obtain rfl := c.prev_eq' w rfl
[ " (dNext i) f = C.d i i' ≫ f i' i", " (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i", " (dNext i) f = 0", " C.d i (c.next i) ≫ f (c.next i) i = 0", " (prevD i) f = 0", " f i (c.prev i) ≫ D.d (c.prev i) i = 0", " (prevD j) f = f j j' ≫ D.d j' j", " (prevD j) f = f j (c.prev j) ≫ D.d (c.prev j) j" ]
[ " (dNext i) f = C.d i i' ≫ f i' i", " (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i", " (dNext i) f = 0", " C.d i (c.next i) ≫ f (c.next i) i = 0", " (prevD i) f = 0", " f i (c.prev i) ≫ D.d (c.prev i) i = 0" ]
import Mathlib.Analysis.InnerProductSpace.Adjoint #align_import analysis.inner_product_space.positive from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c" open InnerProductSpace RCLike ContinuousLinearMap open scoped InnerProduct ComplexConjugate namespace ContinuousLinearMap variable...
Mathlib/Analysis/InnerProductSpace/Positive.lean
109
112
theorem IsPositive.orthogonalProjection_comp {T : E →L[𝕜] E} (hT : T.IsPositive) (U : Submodule 𝕜 E) [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive := by
have := hT.conj_adjoint (orthogonalProjection U : E →L[𝕜] U) rwa [U.adjoint_orthogonalProjection] at this
[ " 0 ≤ re ⟪x, T x⟫_𝕜", " 0 ≤ re ⟪T x, x⟫_𝕜", " IsPositive 0", " 0 ≤ reApplyInnerSelf 0 x", " 0 ≤ re ⟪0 x, x⟫_𝕜", " (T + S).IsPositive", " 0 ≤ (T + S).reApplyInnerSelf x", " 0 ≤ re ⟪T x, x⟫_𝕜 + re ⟪S x, x⟫_𝕜", " (S.comp (T.comp (adjoint S))).IsPositive", " 0 ≤ (S.comp (T.comp (adjoint S))).reAp...
[ " 0 ≤ re ⟪x, T x⟫_𝕜", " 0 ≤ re ⟪T x, x⟫_𝕜", " IsPositive 0", " 0 ≤ reApplyInnerSelf 0 x", " 0 ≤ re ⟪0 x, x⟫_𝕜", " (T + S).IsPositive", " 0 ≤ (T + S).reApplyInnerSelf x", " 0 ≤ re ⟪T x, x⟫_𝕜 + re ⟪S x, x⟫_𝕜", " (S.comp (T.comp (adjoint S))).IsPositive", " 0 ≤ (S.comp (T.comp (adjoint S))).reAp...
import Mathlib.Dynamics.Ergodic.MeasurePreserving #align_import dynamics.ergodic.ergodic from "leanprover-community/mathlib"@"809e920edfa343283cea507aedff916ea0f1bd88" open Set Function Filter MeasureTheory MeasureTheory.Measure open ENNReal variable {α : Type*} {m : MeasurableSpace α} (f : α → α) {s : Set α} ...
Mathlib/Dynamics/Ergodic/Ergodic.lean
124
127
theorem ae_empty_or_univ' (hf : QuasiErgodic f μ) (hs : MeasurableSet s) (hs' : f ⁻¹' s =ᵐ[μ] s) : s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ := by
obtain ⟨t, h₀, h₁, h₂⟩ := hf.toQuasiMeasurePreserving.exists_preimage_eq_of_preimage_ae hs hs' rcases hf.ae_empty_or_univ h₀ h₂ with (h₃ | h₃) <;> [left; right] <;> exact ae_eq_trans h₁.symm h₃
[ " s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ", " s =ᶠ[ae μ] ∅", " s =ᶠ[ae μ] univ" ]
[]
import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Coxeter.Basic namespace CoxeterSystem open List Matrix Function Classical variable {B : Type*} variable {W : Type*} [Group W] variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W) local prefix:100 "s" => cs.simple local prefix:100 "π" => cs.wordProd ...
Mathlib/GroupTheory/Coxeter/Length.lean
71
73
theorem exists_reduced_word (w : W) : ∃ ω, ω.length = ℓ w ∧ w = π ω := by
have := Nat.find_spec (cs.exists_word_with_prod w) tauto
[ " ∃ n ω, ω.length = n ∧ cs.wordProd ω = w", " ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω", " ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω" ]
[ " ∃ n ω, ω.length = n ∧ cs.wordProd ω = w", " ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω" ]
import Mathlib.Control.Bitraversable.Basic #align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a" universe u variable {t : Type u → Type u → Type u} [Bitraversable t] variable {β : Type u} namespace Bitraversable open Functor LawfulApplicative ...
Mathlib/Control/Bitraversable/Lemmas.lean
79
83
theorem tfst_tsnd {α₀ α₁ β₀ β₁} (f : α₀ → F α₁) (f' : β₀ → G β₁) (x : t α₀ β₀) : Comp.mk (tfst f <$> tsnd f' x) = bitraverse (Comp.mk ∘ pure ∘ f) (Comp.mk ∘ map pure ∘ f') x := by
rw [← comp_bitraverse] simp only [Function.comp, map_pure]
[ " Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk ∘ map f' ∘ f) x", " bitraverse (Comp.mk ∘ map f' ∘ f) (Comp.mk ∘ map pure ∘ pure) x = tfst (Comp.mk ∘ map f' ∘ f) x", " Comp.mk (tfst f <$> tsnd f' x) = bitraverse (Comp.mk ∘ pure ∘ f) (Comp.mk ∘ map pure ∘ f') x", " bitraverse (Comp.mk ∘ map f ∘ pure) (Comp.mk...
[ " Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk ∘ map f' ∘ f) x", " bitraverse (Comp.mk ∘ map f' ∘ f) (Comp.mk ∘ map pure ∘ pure) x = tfst (Comp.mk ∘ map f' ∘ f) x" ]
import Mathlib.MeasureTheory.Measure.MeasureSpace #align_import measure_theory.covering.vitali_family from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Metric Set Filter TopologicalSpace MeasureTheory.Measure open Filter MeasureTheory Topology variable {α : Type*}...
Mathlib/MeasureTheory/Covering/VitaliFamily.lean
234
236
theorem mem_filterAt_iff {x : α} {s : Set (Set α)} : s ∈ v.filterAt x ↔ ∃ ε > (0 : ℝ), ∀ a ∈ v.setsAt x, a ⊆ closedBall x ε → a ∈ s := by
simp only [(v.filterAt_basis_closedBall x).mem_iff, ← and_imp, subset_def, mem_setOf]
[ " MeasurableSet a", " (interior a).Nonempty", " ∀ (x : α),\n ∀ ε > 0,\n ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ}) x,\n s ⊆ closedBall x ε", " ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ})...
[ " MeasurableSet a", " (interior a).Nonempty", " ∀ (x : α),\n ∀ ε > 0,\n ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ}) x,\n s ⊆ closedBall x ε", " ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ})...
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Splits import Mathlib.Algebra.Squarefree.Basic import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.PowerBasis #align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" ...
Mathlib/FieldTheory/Separable.lean
76
78
theorem separable_X : (X : R[X]).Separable := by
rw [separable_def, derivative_X] exact isCoprime_one_right
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1", " X.Separable", " IsCoprime X 1" ]
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1" ]
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Galois universe u v w open scoped Classical Polynomial open Polynomial variable (k : Type u) [Field k] (K : Type v) [Field K] class IsSepClosed : Prop where splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom....
Mathlib/FieldTheory/IsSepClosed.lean
168
179
theorem algebraMap_surjective [IsSepClosed k] [Algebra k K] [IsSeparable k K] : Function.Surjective (algebraMap k K) := by
refine fun x => ⟨-(minpoly k x).coeff 0, ?_⟩ have hq : (minpoly k x).leadingCoeff = 1 := minpoly.monic (IsSeparable.isIntegral k x) have hsep : (minpoly k x).Separable := IsSeparable.separable k x have h : (minpoly k x).degree = 1 := degree_eq_one_of_irreducible k (minpoly.irreducible (IsSeparable.isIntegr...
[ " Splits f p", " Splits f p ↔ Splits (RingHom.id K) (map f p)", " ∃ z, z ^ n = x", " False", " (X ^ n - C x).degree ≠ 0", " ↑n ≠ 0", " 0 ^ n = x", " z ^ n = x", " ∃ z, x = z * z", " ∃ z_1, z ^ 2 = z_1 * z_1", " p.roots = 0 ↔ p = C (p.coeff 0)", " p.roots = 0", " p = C (p.coeff 0)", " (map ...
[ " Splits f p", " Splits f p ↔ Splits (RingHom.id K) (map f p)", " ∃ z, z ^ n = x", " False", " (X ^ n - C x).degree ≠ 0", " ↑n ≠ 0", " 0 ^ n = x", " z ^ n = x", " ∃ z, x = z * z", " ∃ z_1, z ^ 2 = z_1 * z_1", " p.roots = 0 ↔ p = C (p.coeff 0)", " p.roots = 0", " p = C (p.coeff 0)", " (map ...
import Mathlib.Topology.Bornology.Basic #align_import topology.bornology.constructions from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" open Set Filter Bornology Function open Filter variable {α β ι : Type*} {π : ι → Type*} [Bornology α] [Bornology β] [∀ i, Bornology (π i)] inst...
Mathlib/Topology/Bornology/Constructions.lean
88
91
theorem isBounded_prod : IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t := by
rcases s.eq_empty_or_nonempty with (rfl | hs); · simp rcases t.eq_empty_or_nonempty with (rfl | ht); · simp simp only [hs.ne_empty, ht.ne_empty, isBounded_prod_of_nonempty (hs.prod ht), false_or_iff]
[ " IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t", " IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t", " IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅" ]
[]
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u → Type u) [Functor F] where P : PFunctor.{u} abs : ∀ {α}, P α → F α repr : ∀ {α}, F α → P α abs_repr : ∀ {α} (...
Mathlib/Data/QPF/Univariate/Basic.lean
169
172
theorem recF_eq {α : Type _} (g : F α → α) (x : q.P.W) : recF g x = g (abs (q.P.map (recF g) x.dest)) := by
cases x rfl
[ " id <$> x = x", " id <$> abs (repr x) = abs (repr x)", " id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩", " (g ∘ f) <$> x = g <$> f <$> x", " (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)", " (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩", " abs ((P F).map (g ∘ f✝...
[ " id <$> x = x", " id <$> abs (repr x) = abs (repr x)", " id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩", " (g ∘ f) <$> x = g <$> f <$> x", " (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)", " (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩", " abs ((P F).map (g ∘ f✝...
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic import Mathlib.MeasureTheory.Integral.MeanInequalities #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" open Filter open scoped ENNReal Topology namespace MeasureTheory variable ...
Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean
87
94
theorem LpAddConst_lt_top (p : ℝ≥0∞) : LpAddConst p < ∞ := by
rw [LpAddConst] split_ifs with h · apply ENNReal.rpow_lt_top_of_nonneg _ ENNReal.two_ne_top simp only [one_div, sub_nonneg] apply one_le_inv (ENNReal.toReal_pos h.1.ne' (h.2.trans ENNReal.one_lt_top).ne) simpa using ENNReal.toReal_mono ENNReal.one_ne_top h.2.le · exact ENNReal.one_lt_top
[ " (∫⁻ (a : α), ↑‖(f + g) a‖₊ ^ q ∂μ) ^ (1 / q) ≤\n (∫⁻ (a : α), ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a ^ q ∂μ) ^ (1 / q)", " ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a", " snormEssSup (f + g) μ ≤ snormEssSup f μ + snormEssSup g μ", " (fun x => ↑‖(f + g) x‖₊) x ≤ ((fun x => ↑‖f x‖₊) + fun ...
[ " (∫⁻ (a : α), ↑‖(f + g) a‖₊ ^ q ∂μ) ^ (1 / q) ≤\n (∫⁻ (a : α), ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a ^ q ∂μ) ^ (1 / q)", " ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a", " snormEssSup (f + g) μ ≤ snormEssSup f μ + snormEssSup g μ", " (fun x => ↑‖(f + g) x‖₊) x ≤ ((fun x => ↑‖f x‖₊) + fun ...
import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator import Mathlib.Init.Data.Quot import Mathlib.Tactic.Cases import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw #align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a...
Mathlib/Logic/Relation.lean
345
350
theorem cases_head (h : ReflTransGen r a b) : a = b ∨ ∃ c, r a c ∧ ReflTransGen r c b := by
induction h using Relation.ReflTransGen.head_induction_on · left rfl · right exact ⟨_, by assumption, by assumption⟩;
[ " ReflTransGen r a c", " ReflTransGen r a b", " ReflTransGen r a c✝", " Symmetric (ReflTransGen r)", " ReflTransGen r y x", " ReflTransGen r x x", " ReflTransGen r w x", " P a h", " P a ⋯", " P b ⋯", " ∀ {a c_1 : α} (h' : r a c_1) (h : ReflTransGen r c_1 b), P c_1 ⋯ → P a ⋯", " P h", " P ⋯",...
[ " ReflTransGen r a c", " ReflTransGen r a b", " ReflTransGen r a c✝", " Symmetric (ReflTransGen r)", " ReflTransGen r y x", " ReflTransGen r x x", " ReflTransGen r w x", " P a h", " P a ⋯", " P b ⋯", " ∀ {a c_1 : α} (h' : r a c_1) (h : ReflTransGen r c_1 b), P c_1 ⋯ → P a ⋯", " P h", " P ⋯" ...
import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.PNat.Prime import Mathlib.Data.Nat.Factors import Mathlib.Data.Multiset.Sort #align_import data.pnat.factors from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" -- Porting note: `deriving` contained Inhabited, Canonic...
Mathlib/Data/PNat/Factors.lean
141
146
theorem coe_prod (v : PrimeMultiset) : (v.prod : ℕ) = (v : Multiset ℕ).prod := by
let h : (v.prod : ℕ) = ((v.map Coe.coe).map Coe.coe).prod := PNat.coeMonoidHom.map_multiset_prod v.toPNatMultiset rw [Multiset.map_map] at h have : (Coe.coe : ℕ+ → ℕ) ∘ (Coe.coe : Nat.Primes → ℕ+) = Coe.coe := funext fun p => rfl rw [this] at h; exact h
[ " ∀ (a : PrimeMultiset), ⊥ ≤ a", " Repr PrimeMultiset", " Repr (Multiset Nat.Primes)", " p.Prime", " Multiset.map PNat.val v.toPNatMultiset = v.toNatMultiset", " Multiset.map Subtype.val (Multiset.map Coe.coe v) = Multiset.map Subtype.val v", " Multiset.map (Subtype.val ∘ Coe.coe) v = Multiset.map Subty...
[ " ∀ (a : PrimeMultiset), ⊥ ≤ a", " Repr PrimeMultiset", " Repr (Multiset Nat.Primes)", " p.Prime", " Multiset.map PNat.val v.toPNatMultiset = v.toNatMultiset", " Multiset.map Subtype.val (Multiset.map Coe.coe v) = Multiset.map Subtype.val v", " Multiset.map (Subtype.val ∘ Coe.coe) v = Multiset.map Subty...
import Mathlib.Tactic.FinCases import Mathlib.Data.Nat.Choose.Sum import Mathlib.LinearAlgebra.Finsupp import Mathlib.Algebra.Field.IsField #align_import ring_theory.ideal.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v w variable {α : Type u} {β : Type v} open ...
Mathlib/RingTheory/Ideal/Basic.lean
106
110
theorem unit_mul_mem_iff_mem {x y : α} (hy : IsUnit y) : y * x ∈ I ↔ x ∈ I := by
refine ⟨fun h => ?_, fun h => I.mul_mem_left y h⟩ obtain ⟨y', hy'⟩ := hy.exists_left_inv have := I.mul_mem_left y' h rwa [← mul_assoc, hy', one_mul] at this
[ " z = z * (y * x)", " I = ⊤ → 1 ∈ I", " 1 ∈ ⊤", " 1 * 1 = 1", " y * x ∈ I ↔ x ∈ I", " x ∈ I" ]
[ " z = z * (y * x)", " I = ⊤ → 1 ∈ I", " 1 ∈ ⊤", " 1 * 1 = 1" ]
import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Int.LeastGreatest import Mathlib.Data.Rat.Floor import Mathlib.Data.NNRat.Defs #align_import algebra.order.archimedean from "leanprover-community/mathlib"@"6f413f3f7330b94c92a5a27488fdc74e6d483a78" open Int Set variable {α : Type*} class Archimedean (...
Mathlib/Algebra/Order/Archimedean.lean
120
122
theorem exists_nat_ge [OrderedSemiring α] [Archimedean α] (x : α) : ∃ n : ℕ, x ≤ n := by
nontriviality α exact (Archimedean.arch x one_pos).imp fun n h => by rwa [← nsmul_one]
[ " x ≤ n • y", " ∃ n, x ≤ ↑n", " x ≤ ↑n" ]
[ " x ≤ n • y" ]
import Batteries.Tactic.SeqFocus namespace Ordering @[simp] theorem swap_swap {o : Ordering} : o.swap.swap = o := by cases o <;> rfl @[simp] theorem swap_inj {o₁ o₂ : Ordering} : o₁.swap = o₂.swap ↔ o₁ = o₂ := ⟨fun h => by simpa using congrArg swap h, congrArg _⟩ theorem swap_then (o₁ o₂ : Ordering) : (o₁.then...
.lake/packages/batteries/Batteries/Classes/Order.lean
23
24
theorem then_eq_eq {o₁ o₂ : Ordering} : o₁.then o₂ = eq ↔ o₁ = eq ∧ o₂ = eq := by
cases o₁ <;> simp [«then»]
[ " o.swap.swap = o", " lt.swap.swap = lt", " eq.swap.swap = eq", " gt.swap.swap = gt", " o₁ = o₂", " (o₁.then o₂).swap = o₁.swap.then o₂.swap", " (lt.then o₂).swap = lt.swap.then o₂.swap", " (eq.then o₂).swap = eq.swap.then o₂.swap", " (gt.then o₂).swap = gt.swap.then o₂.swap", " o₁.then o₂ = lt ↔ ...
[ " o.swap.swap = o", " lt.swap.swap = lt", " eq.swap.swap = eq", " gt.swap.swap = gt", " o₁ = o₂", " (o₁.then o₂).swap = o₁.swap.then o₂.swap", " (lt.then o₂).swap = lt.swap.then o₂.swap", " (eq.then o₂).swap = eq.swap.then o₂.swap", " (gt.then o₂).swap = gt.swap.then o₂.swap", " o₁.then o₂ = lt ↔ ...
import Mathlib.Data.Vector.Basic import Mathlib.Data.List.Zip #align_import data.vector.zip from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" namespace Vector section ZipWith variable {α β γ : Type*} {n : ℕ} (f : α → β → γ) def zipWith : Vector α n → Vector β n → Vector γ n := fun...
Mathlib/Data/Vector/Zip.lean
40
43
theorem zipWith_tail (x : Vector α n) (y : Vector β n) : (Vector.zipWith f x y).tail = Vector.zipWith f x.tail y.tail := by
ext simp [get_tail]
[ " (List.zipWith f ↑x ↑y).length = n", " (zipWith f x y).get i = f (x.get i) (y.get i)", " (List.zipWith f ↑x ↑y).get (Fin.cast ⋯ i) = f ((↑x).get (Fin.cast ⋯ i)) ((↑y).get (Fin.cast ⋯ i))", " (zipWith f x y).tail = zipWith f x.tail y.tail", " (zipWith f x y).tail.get m✝ = (zipWith f x.tail y.tail).get m✝" ]
[ " (List.zipWith f ↑x ↑y).length = n", " (zipWith f x y).get i = f (x.get i) (y.get i)", " (List.zipWith f ↑x ↑y).get (Fin.cast ⋯ i) = f ((↑x).get (Fin.cast ⋯ i)) ((↑y).get (Fin.cast ⋯ i))" ]
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [Topologic...
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
218
221
theorem hasProd_nat_add_iff {f : ℕ → G} (k : ℕ) : HasProd (fun n ↦ f (n + k)) g ↔ HasProd f (g * ∏ i ∈ range k, f i) := by
refine Iff.trans ?_ (range k).hasProd_compl_iff rw [← (notMemRangeEquiv k).symm.hasProd_iff, Function.comp_def, coe_notMemRangeEquiv_symm]
[ " HasProd (fun n => f (n + k)) g ↔ HasProd f (g * ∏ i ∈ range k, f i)", " HasProd (fun n => f (n + k)) g ↔ HasProd (fun x => f ↑x) g" ]
[]
import Mathlib.Data.Finset.Grade import Mathlib.Order.Interval.Finset.Basic #align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" variable {α β : Type*} namespace Finset section Decidable variable [DecidableEq α] (s t : Finset α) instance instLocally...
Mathlib/Data/Finset/Interval.lean
115
116
theorem card_Ioc_finset (h : s ⊆ t) : (Ioc s t).card = 2 ^ (t.card - s.card) - 1 := by
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc_finset h]
[ " u ∈ (fun s t => filter (fun x => s ⊆ x) t.powerset) s t ↔ s ≤ u ∧ u ≤ t", " u ⊆ t ∧ s ⊆ u ↔ s ≤ u ∧ u ≤ t", " u ∈ (fun s t => filter (fun x => s ⊆ x) t.ssubsets) s t ↔ s ≤ u ∧ u < t", " u ⊂ t ∧ s ⊆ u ↔ s ≤ u ∧ u < t", " u ∈ (fun s t => filter (fun x => s ⊂ x) t.powerset) s t ↔ s < u ∧ u ≤ t", " u ⊆ t ∧ ...
[ " u ∈ (fun s t => filter (fun x => s ⊆ x) t.powerset) s t ↔ s ≤ u ∧ u ≤ t", " u ⊆ t ∧ s ⊆ u ↔ s ≤ u ∧ u ≤ t", " u ∈ (fun s t => filter (fun x => s ⊆ x) t.ssubsets) s t ↔ s ≤ u ∧ u < t", " u ⊂ t ∧ s ⊆ u ↔ s ≤ u ∧ u < t", " u ∈ (fun s t => filter (fun x => s ⊂ x) t.powerset) s t ↔ s < u ∧ u ≤ t", " u ⊆ t ∧ ...
import Mathlib.Order.CompleteLattice import Mathlib.Order.Cover import Mathlib.Order.Iterate import Mathlib.Order.WellFounded #align_import order.succ_pred.basic from "leanprover-community/mathlib"@"0111834459f5d7400215223ea95ae38a1265a907" open Function OrderDual Set variable {α β : Type*} @[ext] class SuccOr...
Mathlib/Order/SuccPred/Basic.lean
284
286
theorem succ_le_succ_iff_of_not_isMax (ha : ¬IsMax a) (hb : ¬IsMax b) : succ a ≤ succ b ↔ a ≤ b := by
rw [succ_le_iff_of_not_isMax ha, lt_succ_iff_of_not_isMax hb]
[ " ∀ (a : αᵒᵈ), (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) a ≤ a", " IsMin a✝", " ∀ {a b : αᵒᵈ}, a < b → a ≤ (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) b", " a ≤ (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) b", " ∀ (a : αᵒᵈ), a ≤ (⇑toDual ∘ PredOrder.pred ∘ ⇑ofDual) a", " IsMax a✝", " ∀ {a b : αᵒᵈ}, a < b → (⇑toDual ∘ PredO...
[ " ∀ (a : αᵒᵈ), (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) a ≤ a", " IsMin a✝", " ∀ {a b : αᵒᵈ}, a < b → a ≤ (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) b", " a ≤ (⇑toDual ∘ SuccOrder.succ ∘ ⇑ofDual) b", " ∀ (a : αᵒᵈ), a ≤ (⇑toDual ∘ PredOrder.pred ∘ ⇑ofDual) a", " IsMax a✝", " ∀ {a b : αᵒᵈ}, a < b → (⇑toDual ∘ PredO...
import Mathlib.CategoryTheory.Limits.Preserves.Finite import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.Preserves universe v u w namespace CategoryTheory open Limits variable {C : Type u} [Category.{v} C] variable [FinitaryPreExten...
Mathlib/CategoryTheory/Sites/Coherent/ExtensiveSheaves.lean
80
110
theorem Presieve.isSheaf_iff_preservesFiniteProducts [FinitaryExtensive C] (F : Cᵒᵖ ⥤ Type w) : Presieve.IsSheaf (extensiveTopology C) F ↔ Nonempty (PreservesFiniteProducts F) := by
refine ⟨fun hF ↦ ⟨⟨fun α _ ↦ ⟨fun {K} ↦ ?_⟩⟩⟩, fun hF ↦ ?_⟩ · erw [Presieve.isSheaf_coverage] at hF let Z : α → C := fun i ↦ unop (K.obj ⟨i⟩) have : (Presieve.ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks := (inferInstance : (Presieve.ofArrows Z (Sigma.ι Z)).hasPullbacks) have : ∀ (i ...
[ " ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g", " ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g", " HasPullback f✝ g✝", " HasPullback f✝ (w✝ i✝)", " IsSheafFor F S", " IsSheafFor F (ofArrows Z π)", " IsSheaf (ext...
[ " ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g", " ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g", " HasPullback f✝ g✝", " HasPullback f✝ (w✝ i✝)", " IsSheafFor F S", " IsSheafFor F (ofArrows Z π)", " IsSheaf (ext...
import Mathlib.Algebra.DualNumber import Mathlib.Algebra.QuaternionBasis import Mathlib.Data.Complex.Module import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Star import Mathlib.LinearAlgebra.QuadraticForm.Prod #align_import linear_algebra.clifford_algebra.equivs fr...
Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
311
322
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) : toQuaternion (star c) = star (toQuaternion c) := by
simp only [CliffordAlgebra.star_def'] induction c using CliffordAlgebra.induction with | algebraMap r => simp only [reverse.commutes, AlgHom.commutes, QuaternionAlgebra.coe_algebraMap, QuaternionAlgebra.star_coe] | ι x => rw [reverse_ι, involute_ι, toQuaternion_ι, AlgHom.map_neg, toQuaternion_ι, ...
[ " (ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (1, 0) = c₁ • 1", " (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((1, 0).1 * (1, 0).1) + c₂ * ((1, 0).2 * (1, 0).2)) =\n (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₁", " (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (0, 1) = c₂ • 1", " (algebraMap R (CliffordAlgebra (Q c₁...
[ " (ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (1, 0) = c₁ • 1", " (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((1, 0).1 * (1, 0).1) + c₂ * ((1, 0).2 * (1, 0).2)) =\n (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₁", " (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (0, 1) = c₂ • 1", " (algebraMap R (CliffordAlgebra (Q c₁...
import Mathlib.Data.List.Basic open Function open Nat hiding one_pos assert_not_exists Set.range namespace List universe u v w variable {ι : Type*} {α : Type u} {β : Type v} {γ : Type w} {l₁ l₂ : List α} section InsertNth variable {a : α} @[simp] theorem insertNth_zero (s : List α) (x : α) : insertNth 0 x s...
Mathlib/Data/List/InsertNth.lean
122
127
theorem length_le_length_insertNth (l : List α) (x : α) (n : ℕ) : l.length ≤ (insertNth n x l).length := by
rcases le_or_lt n l.length with hn | hn · rw [length_insertNth _ _ hn] exact (Nat.lt_succ_self _).le · rw [insertNth_of_length_lt _ _ _ hn]
[ " (insertNth n a l).eraseIdx n = l", " modifyNthTail (tail ∘ cons a) n l = l", " insertNth 0 a ((head✝ :: as).eraseIdx 0) = (insertNth (0 + 1) a (head✝ :: as)).eraseIdx 0", " 0 ≤ j → j ≤ l.length → insertNth (j + 1) b (insertNth 0 a l) = insertNth 0 a (insertNth j b l)", " i + 1 ≤ j + 1 →\n j + 1 ≤ [].le...
[ " (insertNth n a l).eraseIdx n = l", " modifyNthTail (tail ∘ cons a) n l = l", " insertNth 0 a ((head✝ :: as).eraseIdx 0) = (insertNth (0 + 1) a (head✝ :: as)).eraseIdx 0", " 0 ≤ j → j ≤ l.length → insertNth (j + 1) b (insertNth 0 a l) = insertNth 0 a (insertNth j b l)", " i + 1 ≤ j + 1 →\n j + 1 ≤ [].le...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Choose.Sum import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f" namespace PowerS...
Mathlib/RingTheory/PowerSeries/WellKnown.lean
64
68
theorem map_invUnitsSub (f : R →+* S) (u : Rˣ) : map f (invUnitsSub u) = invUnitsSub (Units.map (f : R →* S) u) := by
ext simp only [← map_pow, coeff_map, coeff_invUnitsSub, one_divp] rfl
[ " (constantCoeff R) (invUnitsSub u) = 1 /ₚ u", " invUnitsSub u * X = invUnitsSub u * (C R) ↑u - 1", " (coeff R 0) (invUnitsSub u * X) = (coeff R 0) (invUnitsSub u * (C R) ↑u - 1)", " (coeff R (n + 1)) (invUnitsSub u * X) = (coeff R (n + 1)) (invUnitsSub u * (C R) ↑u - 1)", " invUnitsSub u * ((C R) ↑u - X) =...
[ " (constantCoeff R) (invUnitsSub u) = 1 /ₚ u", " invUnitsSub u * X = invUnitsSub u * (C R) ↑u - 1", " (coeff R 0) (invUnitsSub u * X) = (coeff R 0) (invUnitsSub u * (C R) ↑u - 1)", " (coeff R (n + 1)) (invUnitsSub u * X) = (coeff R (n + 1)) (invUnitsSub u * (C R) ↑u - 1)", " invUnitsSub u * ((C R) ↑u - X) =...
import Mathlib.CategoryTheory.Preadditive.Injective import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.RingTheory.Ideal.Basic import Mathlib.LinearAlgebra.LinearPMap import Mathlib.Logic.Equiv.TransferInstance #align_import algebra.module.injective from "leanprover-community/mathlib"@"f8d8465c3c392a93b9...
Mathlib/Algebra/Module/Injective.lean
70
76
theorem Module.injective_module_of_injective_object [inj : CategoryTheory.Injective <| ModuleCat.of R Q] : Module.Injective R Q where out X Y _ _ _ _ f hf g := by
have : CategoryTheory.Mono (ModuleCat.ofHom f) := (ModuleCat.mono_iff_injective _).mpr hf obtain ⟨l, rfl⟩ := inj.factors (ModuleCat.ofHom g) (ModuleCat.ofHom f) exact ⟨l, fun _ ↦ rfl⟩
[ " ∃ h, ∀ (x : X), h (f x) = g x", " ∃ h, ∀ (x : X), h (f x) = (CategoryTheory.CategoryStruct.comp (ModuleCat.ofHom f) l) x" ]
[]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.RingTheory.Polynomial.Bernstein import Mathlib.Topology.ContinuousFunction.Polynomial import Mathlib.Topology.ContinuousFunction.Compact #align_import analysis.special_functions.bernstein from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba14...
Mathlib/Analysis/SpecialFunctions/Bernstein.lean
61
64
theorem bernstein_apply (n ν : ℕ) (x : I) : bernstein n ν x = (n.choose ν : ℝ) * (x : ℝ) ^ ν * (1 - (x : ℝ)) ^ (n - ν) := by
dsimp [bernstein, Polynomial.toContinuousMapOn, Polynomial.toContinuousMap, bernsteinPolynomial] simp
[ " (bernstein n ν) x = ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " Polynomial.eval (↑x) (↑(n.choose ν) * Polynomial.X ^ ν * (1 - Polynomial.X) ^ (n - ν)) =\n ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)" ]
[]
import Mathlib.Topology.MetricSpace.PseudoMetric open Filter open scoped Uniformity Topology universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricSpace α] theorem Metric.complete_of_convergent_controlled_sequences (B : ℕ → Real) (hB : ∀ n, 0 < B n) (H : ∀ u : ℕ → α, (∀ N n m...
Mathlib/Topology/MetricSpace/Cauchy.lean
113
123
theorem cauchySeq_bdd {u : ℕ → α} (hu : CauchySeq u) : ∃ R > 0, ∀ m n, dist (u m) (u n) < R := by
rcases Metric.cauchySeq_iff'.1 hu 1 zero_lt_one with ⟨N, hN⟩ rsuffices ⟨R, R0, H⟩ : ∃ R > 0, ∀ n, dist (u n) (u N) < R · exact ⟨_, add_pos R0 R0, fun m n => lt_of_le_of_lt (dist_triangle_right _ _ _) (add_lt_add (H m) (H n))⟩ let R := Finset.sup (Finset.range N) fun n => nndist (u n) (u N) refine ⟨↑R +...
[ " UniformCauchySeqOn F atTop s ↔ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " UniformCauchySeqOn F atTop s → ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " ∀ {a b : α}, dist a b < ε → (a, b) ∈ u", " ...
[ " UniformCauchySeqOn F atTop s ↔ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " UniformCauchySeqOn F atTop s → ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε", " ∀ {a b : α}, dist a b < ε → (a, b) ∈ u", " ...
import Mathlib.Algebra.Polynomial.Roots import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import analysis.special_functions.polynomials from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Finset Asymptotic...
Mathlib/Analysis/SpecialFunctions/Polynomials.lean
64
70
theorem tendsto_atTop_iff_leadingCoeff_nonneg : Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff := by
refine ⟨fun h => ?_, fun h => tendsto_atTop_of_leadingCoeff_nonneg P h.1 h.2⟩ have : Tendsto (fun x => P.leadingCoeff * x ^ P.natDegree) atTop atTop := (isEquivalent_atTop_lead P).tendsto_atTop h rw [tendsto_const_mul_pow_atTop_iff, ← pos_iff_ne_zero, natDegree_pos_iff_degree_pos] at this exact ⟨this.1, th...
[ " (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree", " (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree", " Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff", "...
[ " (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree", " (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree" ]
import Mathlib.Algebra.Star.Subalgebra import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.Star #align_import topology.algebra.star_subalgebra from "leanprover-community/mathlib"@"b7f5a77fa29ad9a3ccc484109b0d7534178e7ecd" open scoped Classical open Set TopologicalSpace open scoped Classical ...
Mathlib/Topology/Algebra/StarSubalgebra.lean
122
127
theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) : (star s).topologicalClosure = star s.topologicalClosure := by
suffices ∀ t : Subalgebra R A, (star t).topologicalClosure ≤ star t.topologicalClosure from le_antisymm (this s) (by simpa only [star_star] using Subalgebra.star_mono (this (star s))) exact fun t => (star t).topologicalClosure_minimal (Subalgebra.star_mono subset_closure) (isClosed_closure.preimage continu...
[ " Subtype.val ⁻¹' ↑S₁ = range ⇑(inclusion h)", " ↑S₁ = id '' {x | x ∈ S₁}", " ↑S₁ = {x | x ∈ S₁}", " ∀ x ∈ S₁, id x ∈ S₂", " id x✝ ∈ S₂", " (star s).topologicalClosure = star s.topologicalClosure", " star s.topologicalClosure ≤ (star s).topologicalClosure", " ∀ (t : Subalgebra R A), (star t).topologic...
[ " Subtype.val ⁻¹' ↑S₁ = range ⇑(inclusion h)", " ↑S₁ = id '' {x | x ∈ S₁}", " ↑S₁ = {x | x ∈ S₁}", " ∀ x ∈ S₁, id x ∈ S₂", " id x✝ ∈ S₂" ]
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold #align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" namespace Multiset variable {α : Type*} [CancelCommMonoidWithZero α] [NormalizedG...
Mathlib/Algebra/GCDMonoid/Multiset.lean
104
106
theorem lcm_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).lcm = GCDMonoid.lcm s₁.lcm s₂.lcm := by
rw [← lcm_dedup, dedup_ext.2, lcm_dedup, lcm_add] simp
[ " (s₁ + s₂).lcm = fold GCDMonoid.lcm (GCDMonoid.lcm 1 1) (s₁ + s₂)", " lcm 0 ∣ a ↔ ∀ b ∈ 0, b ∣ a", " ∀ (a_1 : α) (s : Multiset α), (s.lcm ∣ a ↔ ∀ b ∈ s, b ∣ a) → ((a_1 ::ₘ s).lcm ∣ a ↔ ∀ b ∈ a_1 ::ₘ s, b ∣ a)", " normalize (lcm 0) = lcm 0", " normalize (a ::ₘ s).lcm = (a ::ₘ s).lcm", " s.lcm = 0 ↔ 0 ∈ s"...
[ " (s₁ + s₂).lcm = fold GCDMonoid.lcm (GCDMonoid.lcm 1 1) (s₁ + s₂)", " lcm 0 ∣ a ↔ ∀ b ∈ 0, b ∣ a", " ∀ (a_1 : α) (s : Multiset α), (s.lcm ∣ a ↔ ∀ b ∈ s, b ∣ a) → ((a_1 ::ₘ s).lcm ∣ a ↔ ∀ b ∈ a_1 ::ₘ s, b ∣ a)", " normalize (lcm 0) = lcm 0", " normalize (a ::ₘ s).lcm = (a ::ₘ s).lcm", " s.lcm = 0 ↔ 0 ∈ s"...
import Mathlib.Algebra.CharP.Basic import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.RingTheory.Coprime.Lemmas #align_import algebra.char_p.char_and_card from "leanprover-community/mathlib"@"2fae5fd7f90711febdadf19c44dc60fae8834d1b" theorem isUnit_iff_not_dvd_char_of_ringChar_ne_zero (R : Type*) [CommRin...
Mathlib/Algebra/CharP/CharAndCard.lean
59
75
theorem prime_dvd_char_iff_dvd_card {R : Type*} [CommRing R] [Fintype R] (p : ℕ) [Fact p.Prime] : p ∣ ringChar R ↔ p ∣ Fintype.card R := by
refine ⟨fun h => h.trans <| Int.natCast_dvd_natCast.mp <| (CharP.intCast_eq_zero_iff R (ringChar R) (Fintype.card R)).mp <| mod_cast Nat.cast_card_eq_zero R, fun h => ?_⟩ by_contra h₀ rcases exists_prime_addOrderOf_dvd_card p h with ⟨r, hr⟩ have hr₁ := addOrderOf_n...
[ " IsUnit ↑p ↔ ¬p ∣ ringChar R", " IsUnit ↑p → ¬p ∣ ringChar R", " False", " ¬ringChar R ∣ q", " ¬p ∣ ringChar R → IsUnit ↑p", " IsUnit ↑p", " p ∣ ringChar R ↔ p ∣ Fintype.card R", " p ∣ ringChar R" ]
[ " IsUnit ↑p ↔ ¬p ∣ ringChar R", " IsUnit ↑p → ¬p ∣ ringChar R", " False", " ¬ringChar R ∣ q", " ¬p ∣ ringChar R → IsUnit ↑p", " IsUnit ↑p" ]
import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" namespace Set variable {α β : Type*} {s t : Set α} noncomputable def encard (s : Set α) : ℕ∞ := PartENat.withTopEquiv (PartENat.card s) @[simp] theorem encard_uni...
Mathlib/Data/Set/Card.lean
152
153
theorem encard_le_card (h : s ⊆ t) : s.encard ≤ t.encard := by
rw [← union_diff_cancel h, encard_union_eq disjoint_sdiff_right]; exact le_self_add
[ " univ.encard = s.encard", " univ.encard = PartENat.withTopEquiv (PartENat.card α)", " s.encard = ↑h.toFinset.card", " s.encard = ↑s.toFinset.card", " (↑s).encard = ↑s.card", " ↑⋯.toFinset.card = ↑s.card", " s.encard = ⊤", " s.encard = 0 ↔ s = ∅", " ∅.encard = 0", " s.Nonempty", " s.encard ≠ 0 ↔...
[ " univ.encard = s.encard", " univ.encard = PartENat.withTopEquiv (PartENat.card α)", " s.encard = ↑h.toFinset.card", " s.encard = ↑s.toFinset.card", " (↑s).encard = ↑s.card", " ↑⋯.toFinset.card = ↑s.card", " s.encard = ⊤", " s.encard = 0 ↔ s = ∅", " ∅.encard = 0", " s.Nonempty", " s.encard ≠ 0 ↔...
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic #align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
93
95
theorem intervalIntegrable_iff_integrableOn_Ioc_of_le (hab : a ≤ b) : IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b) μ := by
rw [intervalIntegrable_iff, uIoc_of_le hab]
[ " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b) μ", " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b) μ" ]
[ " IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b) μ" ]
import Mathlib.Init.Algebra.Classes import Mathlib.Data.FunLike.Basic import Mathlib.Logic.Embedding.Basic import Mathlib.Order.RelClasses #align_import order.rel_iso.basic from "leanprover-community/mathlib"@"f29120f82f6e24a6f6579896dfa2de6769fec962" set_option autoImplicit true open Function universe u v w v...
Mathlib/Order/RelIso/Basic.lean
168
180
theorem injective_of_increasing (r : α → α → Prop) (s : β → β → Prop) [IsTrichotomous α r] [IsIrrefl β s] (f : α → β) (hf : ∀ {x y}, r x y → s (f x) (f y)) : Injective f := by
intro x y hxy rcases trichotomous_of r x y with (h | h | h) · have := hf h rw [hxy] at this exfalso exact irrefl_of s (f y) this · exact h · have := hf h rw [hxy] at this exfalso exact irrefl_of s (f y) this
[ " Injective f", " x = y", " False" ]
[]
import Mathlib.Data.Int.Bitwise import Mathlib.Data.Int.Order.Lemmas import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.int.lemmas from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f" open Nat namespace Int theorem le_natCast_sub (m n : ℕ) : (m ...
Mathlib/Data/Int/Lemmas.lean
137
143
theorem div2_bit (b n) : div2 (bit b n) = n := by
rw [bit_val, div2_val, add_comm, Int.add_mul_ediv_left, (_ : (_ / 2 : ℤ) = 0), zero_add] cases b · decide · show ofNat _ = _ rw [Nat.div_eq_of_lt] <;> simp · decide
[ " ↑m - ↑n ≤ ↑(m - n)", " 0 ≤ ↑n", " a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2", " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2", " a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b", " a.natAbs = b.natAbs ↔ a ...
[ " ↑m - ↑n ≤ ↑(m - n)", " 0 ≤ ↑n", " a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2", " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2", " a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b", " a.natAbs = b.natAbs ↔ a ...
import Mathlib.LinearAlgebra.Dual import Mathlib.LinearAlgebra.Matrix.ToLin #align_import linear_algebra.contraction from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec" suppress_compilation -- Porting note: universe metavariables behave oddly universe w u v₁ v₂ v₃ v₄ variable {ι : Type...
Mathlib/LinearAlgebra/Contraction.lean
96
101
theorem dualTensorHom_prodMap_zero (f : Module.Dual R M) (p : P) : ((dualTensorHom R M P) (f ⊗ₜ[R] p)).prodMap (0 : N →ₗ[R] Q) = dualTensorHom R (M × N) (P × Q) ((f ∘ₗ fst R M N) ⊗ₜ inl R P Q p) := by
ext <;> simp only [coe_comp, coe_inl, Function.comp_apply, prodMap_apply, dualTensorHom_apply, fst_apply, Prod.smul_mk, LinearMap.zero_apply, smul_zero]
[ " Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)", " ((Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)) f') m'", " f m' * f' m = f' m * f m'", ...
[ " Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)", " ((Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)) f') m'", " f m' * f' m = f' m * f m'" ]
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
294
295
theorem hom_f_injective {C₁ C₂ : HomologicalComplex V c} : Function.Injective fun f : Hom C₁ C₂ => f.f := by
aesop_cat
[ " f.f i ≫ B.d i j = A.d i j ≫ f.f j", " f = g", " f.f = g.f", " f.f x✝ = g.f x✝", " (eqToHom h).f n = eqToHom ⋯", " (eqToHom ⋯).f n = eqToHom ⋯", " Function.Injective fun f => f.f" ]
[ " f.f i ≫ B.d i j = A.d i j ≫ f.f j", " f = g", " f.f = g.f", " f.f x✝ = g.f x✝", " (eqToHom h).f n = eqToHom ⋯", " (eqToHom ⋯).f n = eqToHom ⋯" ]
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {α : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n ...
Mathlib/Data/List/OfFn.lean
58
59
theorem get_ofFn {n} (f : Fin n → α) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
[ " (ofFn.go f i j h).length = i", " (ofFn.go f 0 j h).length = 0", " (ofFn.go f (n✝ + 1) j h).length = n✝ + 1", " (ofFn f).length = n", " j + k < n", " (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩", " (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩", " (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,...
[ " (ofFn.go f i j h).length = i", " (ofFn.go f 0 j h).length = 0", " (ofFn.go f (n✝ + 1) j h).length = n✝ + 1", " (ofFn f).length = n", " j + k < n", " (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩", " (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩", " (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,...
import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Dimension.Constructions open Cardinal Submodule Set FiniteDimensional universe u v section Module variable {K : Type u} {V : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] noncomputable def Basis.ofRankEqZero [Mo...
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
63
71
theorem le_rank_iff_exists_linearIndependent_finset [Module.Free K V] {n : ℕ} : ↑n ≤ Module.rank K V ↔ ∃ s : Finset V, s.card = n ∧ LinearIndependent K ((↑) : ↥(s : Set V) → V) := by
simp only [le_rank_iff_exists_linearIndependent, mk_set_eq_nat_iff_finset] constructor · rintro ⟨s, ⟨t, rfl, rfl⟩, si⟩ exact ⟨t, rfl, si⟩ · rintro ⟨s, rfl, si⟩ exact ⟨s, ⟨s, rfl, rfl⟩, si⟩
[ " Subsingleton V", " c ≤ Module.rank K V ↔ ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " c ≤ Module.rank K V → ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " LinearIndependent (ι := ...
[ " Subsingleton V", " c ≤ Module.rank K V ↔ ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " c ≤ Module.rank K V → ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val", " LinearIndependent (ι := ...
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
318
323
theorem linfty_opNNNorm_diagonal [DecidableEq m] (v : m → α) : ‖diagonal v‖₊ = ‖v‖₊ := by
rw [linfty_opNNNorm_def, Pi.nnnorm_def] congr 1 with i : 1 refine (Finset.sum_eq_single_of_mem _ (Finset.mem_univ i) fun j _hj hij => ?_).trans ?_ · rw [diagonal_apply_ne' _ hij, nnnorm_zero] · rw [diagonal_apply_eq]
[ " SeminormedAddCommGroup (m → PiLp 1 fun j => α)", " NormedAddCommGroup (m → PiLp 1 fun j => α)", " BoundedSMul R (m → PiLp 1 fun j => α)", " NormedSpace R (m → PiLp 1 fun j => α)", " ‖A‖ = ↑(Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊)", " ‖fun i => (WithLp.equiv 1 (n → α)).symm (A i)‖ = ↑(Finset.univ.sup...
[ " SeminormedAddCommGroup (m → PiLp 1 fun j => α)", " NormedAddCommGroup (m → PiLp 1 fun j => α)", " BoundedSMul R (m → PiLp 1 fun j => α)", " NormedSpace R (m → PiLp 1 fun j => α)", " ‖A‖ = ↑(Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊)", " ‖fun i => (WithLp.equiv 1 (n → α)).symm (A i)‖ = ↑(Finset.univ.sup...
import Mathlib.Topology.Separation import Mathlib.Topology.NoetherianSpace #align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" open TopologicalSpace variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β} def IsQuasiSeparate...
Mathlib/Topology/QuasiSeparated.lean
106
109
theorem IsQuasiSeparated.of_subset {s t : Set α} (ht : IsQuasiSeparated t) (h : s ⊆ t) : IsQuasiSeparated s := by
intro U V hU hU' hU'' hV hV' hV'' exact ht U V (hU.trans h) hU' hU'' (hV.trans h) hV' hV''
[ " IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α", " IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)", " IsQuasiSeparated (f '' s)", " IsCompact (U ∩ V)", " U ∩ V = f '' (f ⁻¹' U ∩ f ⁻¹' V)", " f '' (f ⁻¹' U ∩ f ⁻¹' V) = U ∩ V", " U ∩ V...
[ " IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α", " IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)", " IsQuasiSeparated (f '' s)", " IsCompact (U ∩ V)", " U ∩ V = f '' (f ⁻¹' U ∩ f ⁻¹' V)", " f '' (f ⁻¹' U ∩ f ⁻¹' V) = U ∩ V", " U ∩ V...
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
166
171
theorem gcd_insert [DecidableEq β] {b : β} : (insert b s : Finset β).gcd f = GCDMonoid.gcd (f b) (s.gcd f) := by
by_cases h : b ∈ s · rw [insert_eq_of_mem h, (gcd_eq_right_iff (f b) (s.gcd f) (Multiset.normalize_gcd (s.1.map f))).2 (gcd_dvd h)] apply fold_insert h
[ " a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b", " (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)" ]
[ " a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b", " (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b" ]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classi...
Mathlib/Topology/MetricSpace/Contracting.lean
84
87
theorem eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x) (hy : IsFixedPt f y) : x = y ∨ edist x y = ∞ := by
refine or_iff_not_imp_right.2 fun h ↦ edist_le_zero.1 ?_ simpa only [hx.eq, edist_self, add_zero, ENNReal.zero_div] using hf.edist_le_of_fixedPoint h hy
[ " 0 < 1 - ↑K", " 1 - ↑K ≠ ⊤", " ¬1 - ↑K = ⊤", " edist x (f x) + edist (f x) (f y) + edist (f y) y = edist x (f x) + edist y (f y) + edist (f x) (f y)", " edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)", " edist x y ≤ edist x (f x) / (1 - ↑K)", " x = y ∨ edist x y = ⊤", " edist x y ≤ 0" ]
[ " 0 < 1 - ↑K", " 1 - ↑K ≠ ⊤", " ¬1 - ↑K = ⊤", " edist x (f x) + edist (f x) (f y) + edist (f y) y = edist x (f x) + edist y (f y) + edist (f x) (f y)", " edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)", " edist x y ≤ edist x (f x) / (1 - ↑K)" ]
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry #align_import analysis.normed_space.conformal_linear_map from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1" noncomputable section open Function LinearIsometry ContinuousLinearMap def IsConf...
Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean
62
65
theorem IsConformalMap.smul (hf : IsConformalMap f) {c : R} (hc : c ≠ 0) : IsConformalMap (c • f) := by
rcases hf with ⟨c', hc', li, rfl⟩ exact ⟨c * c', mul_ne_zero hc hc', li, smul_smul _ _ _⟩
[ " ContinuousLinearMap.id R M = 1 • LinearIsometry.id.toContinuousLinearMap", " IsConformalMap (c • f)", " IsConformalMap (c • c' • li.toContinuousLinearMap)" ]
[ " ContinuousLinearMap.id R M = 1 • LinearIsometry.id.toContinuousLinearMap" ]
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityT...
Mathlib/Probability/CondCount.lean
89
95
theorem condCount_singleton (ω : Ω) (t : Set Ω) [Decidable (ω ∈ t)] : condCount {ω} t = if ω ∈ t then 1 else 0 := by
rw [condCount, cond_apply _ (measurableSet_singleton ω), Measure.count_singleton, inv_one, one_mul] split_ifs · rw [(by simpa : ({ω} : Set Ω) ∩ t = {ω}), Measure.count_singleton] · rw [(by simpa : ({ω} : Set Ω) ∩ t = ∅), Measure.count_empty]
[ " condCount ∅ = 0", " (condCount s) ∅ = 0", " s.Finite", " False", " (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)", " Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)", " Measure.count Set.univ = ↑(Fintype.card Ω)", " ∑ x : Ω, 1 = ↑(Fintype.card Ω)", " M...
[ " condCount ∅ = 0", " (condCount s) ∅ = 0", " s.Finite", " False", " (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)", " Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)", " Measure.count Set.univ = ↑(Fintype.card Ω)", " ∑ x : Ω, 1 = ↑(Fintype.card Ω)", " M...
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.Data.Set.Finite import Mathlib.Data.Set.Subsingleton import Mathlib.Topology.Category.TopCat.Limits.Konig import Mathlib.Tactic.AdaptationNote #align_import category_theory.cofiltered_system from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e...
Mathlib/CategoryTheory/CofilteredSystem.lean
166
171
theorem eventualRange_eq_range_precomp (f : i ⟶ j) (g : j ⟶ k) (h : F.eventualRange k = range (F.map g)) : F.eventualRange k = range (F.map <| f ≫ g) := by
apply subset_antisymm · apply iInter₂_subset · rw [h, F.map_comp] apply range_comp_subset_range
[ " F.eventualRange i ⊆ F.map f '' F.eventualRange j", " F.eventualRange i ⊆ F.map f '' range (F.map g)", " x ∈ F.map f '' range (F.map g)", " F.map (g ≫ f) x ∈ F.map f '' range (F.map g)", " F.map f (F.map g x) = F.map (g ≫ f) x", " F.eventualRange k = range (F.map (f ≫ g))", " F.eventualRange k ⊆ range ...
[ " F.eventualRange i ⊆ F.map f '' F.eventualRange j", " F.eventualRange i ⊆ F.map f '' range (F.map g)", " x ∈ F.map f '' range (F.map g)", " F.map (g ≫ f) x ∈ F.map f '' range (F.map g)", " F.map f (F.map g x) = F.map (g ≫ f) x" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
120
129
theorem mul_isClassified (k : ℤ) (hc : h.IsClassified) : (h.mul k).IsClassified := by
obtain ⟨l, m, n, ⟨⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, co⟩⟩ := hc · use k * l, m, n apply And.intro _ co left constructor <;> ring · use k * l, m, n apply And.intro _ co right constructor <;> ring
[ " z * z ≠ 2", " ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2", " ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2", " ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2", " ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2", " z * z % 4 ≠ 2", " ¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
[ " z * z ≠ 2", " ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2", " ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2", " ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2", " ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2", " z * z % 4 ≠ 2", " ¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
import Mathlib.Analysis.SpecialFunctions.Gamma.Beta import Mathlib.NumberTheory.LSeries.HurwitzZeta import Mathlib.Analysis.Complex.RemovableSingularity import Mathlib.Analysis.PSeriesComplex #align_import number_theory.zeta_function from "leanprover-community/mathlib"@"57f9349f2fe19d2de7207e99b0341808d977cdcf" o...
Mathlib/NumberTheory/LSeries/RiemannZeta.lean
110
112
theorem completedRiemannZeta_one_sub (s : ℂ) : completedRiemannZeta (1 - s) = completedRiemannZeta s := by
rw [← completedHurwitzZetaEven_zero, ← completedCosZeta_zero, completedHurwitzZetaEven_one_sub]
[ " completedCosZeta 0 s = completedRiemannZeta s", " completedCosZeta₀ 0 s = completedRiemannZeta₀ s", " completedRiemannZeta s = completedRiemannZeta₀ s - 1 / s - 1 / (1 - s)", " completedRiemannZeta₀ (1 - s) = completedRiemannZeta₀ s", " completedRiemannZeta (1 - s) = completedRiemannZeta s" ]
[ " completedCosZeta 0 s = completedRiemannZeta s", " completedCosZeta₀ 0 s = completedRiemannZeta₀ s", " completedRiemannZeta s = completedRiemannZeta₀ s - 1 / s - 1 / (1 - s)", " completedRiemannZeta₀ (1 - s) = completedRiemannZeta₀ s" ]
import Mathlib.Analysis.Calculus.LocalExtr.Rolle import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Topology.Algebra.Polynomial #align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" namespace Polynomial
Mathlib/Analysis/Calculus/LocalExtr/Polynomial.lean
36
46
theorem card_roots_toFinset_le_card_roots_derivative_diff_roots_succ (p : ℝ[X]) : p.roots.toFinset.card ≤ (p.derivative.roots.toFinset \ p.roots.toFinset).card + 1 := by
rcases eq_or_ne (derivative p) 0 with hp' | hp' · rw [eq_C_of_derivative_eq_zero hp', roots_C, Multiset.toFinset_zero, Finset.card_empty] exact zero_le _ have hp : p ≠ 0 := ne_of_apply_ne derivative (by rwa [derivative_zero]) refine Finset.card_le_diff_of_interleaved fun x hx y hy hxy hxy' => ?_ rw [Mult...
[ " p.roots.toFinset.card ≤ ((derivative p).roots.toFinset \\ p.roots.toFinset).card + 1", " 0 ≤ ((derivative (C (p.coeff 0))).roots.toFinset \\ ∅).card + 1", " derivative p ≠ derivative 0", " ∃ z ∈ (derivative p).roots.toFinset, x < z ∧ z < y", " z ∈ (derivative p).roots.toFinset" ]
[]
import Mathlib.SetTheory.Ordinal.Arithmetic #align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d" noncomputable section open Function Cardinal Set Equiv Order open scoped Classical open Cardinal Ordinal universe u v w namespace Ordinal in...
Mathlib/SetTheory/Ordinal/Exponential.lean
42
42
theorem zero_opow' (a : Ordinal) : 0 ^ a = 1 - a := by
simp only [opow_def, if_true]
[ " 0 ^ a = 1 - a" ]
[]
import Mathlib.Algebra.Regular.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.ring.regular from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" variable {α : Type*}
Mathlib/Algebra/Ring/Regular.lean
20
23
theorem isLeftRegular_of_non_zero_divisor [NonUnitalNonAssocRing α] (k : α) (h : ∀ x : α, k * x = 0 → x = 0) : IsLeftRegular k := by
refine fun x y (h' : k * x = k * y) => sub_eq_zero.mp (h _ ?_) rw [mul_sub, sub_eq_zero, h']
[ " IsLeftRegular k", " k * (x - y) = 0" ]
[]
import Mathlib.Data.Option.Basic import Mathlib.Data.Set.Basic #align_import data.pequiv from "leanprover-community/mathlib"@"7c3269ca3fa4c0c19e4d127cd7151edbdbf99ed4" universe u v w x structure PEquiv (α : Type u) (β : Type v) where toFun : α → Option β invFun : β → Option α inv : ∀ (a : α) (b :...
Mathlib/Data/PEquiv.lean
161
165
theorem trans_eq_none (f : α ≃. β) (g : β ≃. γ) (a : α) : f.trans g a = none ↔ ∀ b c, b ∉ f a ∨ c ∉ g b := by
simp only [eq_none_iff_forall_not_mem, mem_trans, imp_iff_not_or.symm] push_neg exact forall_swap
[ " Injective toFun", " { toFun := f₁, invFun := f₂, inv := hf } = { toFun := f₁, invFun := g₂, inv := hg }", " x ∈ f₂ y ↔ x ∈ g₂ y", " a ∈ (fun a => (g.symm a).bind ⇑f.symm) b ↔ b ∈ (fun a => (f a).bind ⇑g) a", " f.symm.symm = f", " { toFun := toFun✝, invFun := invFun✝, inv := inv✝ }.symm.symm = { toFun :=...
[ " Injective toFun", " { toFun := f₁, invFun := f₂, inv := hf } = { toFun := f₁, invFun := g₂, inv := hg }", " x ∈ f₂ y ↔ x ∈ g₂ y", " a ∈ (fun a => (g.symm a).bind ⇑f.symm) b ↔ b ∈ (fun a => (f a).bind ⇑g) a", " f.symm.symm = f", " { toFun := toFun✝, invFun := invFun✝, inv := inv✝ }.symm.symm = { toFun :=...
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic import Mathlib.MeasureTheory.Integral.MeanInequalities #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" open Filter open scoped ENNReal Topology namespace MeasureTheory section B...
Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean
208
222
theorem snorm'_le_snorm'_mul_snorm' {p q r : ℝ} (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) (b : E → F → G) (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) (hp0_lt : 0 < p) (hpq : p < q) (hpqr : 1 / p = 1 / q + 1 / r) : snorm' (fun x => b (f x) (g x)) p μ ≤ snorm' f q μ * snorm' g ...
rw [snorm'] calc (∫⁻ a : α, ↑‖b (f a) (g a)‖₊ ^ p ∂μ) ^ (1 / p) ≤ (∫⁻ a : α, ↑(‖f a‖₊ * ‖g a‖₊) ^ p ∂μ) ^ (1 / p) := (ENNReal.rpow_le_rpow_iff <| one_div_pos.mpr hp0_lt).mpr <| lintegral_mono_ae <| h.mono fun a ha => (ENNReal.rpow_le_rpow_iff hp0_lt).mpr <| ENNReal.coe_le_coe.mp...
[ " snorm (fun x => b (f x) (g x)) p μ ≤ snorm f ⊤ μ * snorm g p μ", " snormEssSup (fun x => b (f x) (g x)) μ ≤ snormEssSup f μ * snormEssSup g μ", " (fun x => ↑‖(fun x => b (f x) (g x)) x‖₊) a ≤ ((fun x => ↑‖f x‖₊) * fun x => ↑‖g x‖₊) a", " ‖b (f a) (g a)‖₊ ≤ ‖f a‖₊ * ‖g a‖₊", " (∫⁻ (x : α), ↑‖b (f x) (g x)‖...
[ " snorm (fun x => b (f x) (g x)) p μ ≤ snorm f ⊤ μ * snorm g p μ", " snormEssSup (fun x => b (f x) (g x)) μ ≤ snormEssSup f μ * snormEssSup g μ", " (fun x => ↑‖(fun x => b (f x) (g x)) x‖₊) a ≤ ((fun x => ↑‖f x‖₊) * fun x => ↑‖g x‖₊) a", " ‖b (f a) (g a)‖₊ ≤ ‖f a‖₊ * ‖g a‖₊", " (∫⁻ (x : α), ↑‖b (f x) (g x)‖...
import Mathlib.Algebra.Associated import Mathlib.Algebra.GeomSum import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Nat.Choose.Sum import Mathlib.Data.Nat.Lattice import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_th...
Mathlib/RingTheory/Nilpotent/Basic.lean
117
127
theorem add_pow_eq_zero_of_add_le_succ_of_pow_eq_zero {m n k : ℕ} (hx : x ^ m = 0) (hy : y ^ n = 0) (h : m + n ≤ k + 1) : (x + y) ^ k = 0 := by
rw [h_comm.add_pow'] apply Finset.sum_eq_zero rintro ⟨i, j⟩ hij suffices x ^ i * y ^ j = 0 by simp only [this, nsmul_eq_mul, mul_zero] by_cases hi : m ≤ i · rw [pow_eq_zero_of_le hi hx, zero_mul] rw [pow_eq_zero_of_le ?_ hy, mul_zero] linarith [Finset.mem_antidiagonal.mp hij]
[ " IsNilpotent (-x)", " (-x) ^ n = 0", " IsNilpotent (t • a)", " (t • a) ^ k = 0", " IsUnit (r - 1)", " (r - 1) * -∑ i ∈ Finset.range n, r ^ i = 1", " (-∑ i ∈ Finset.range n, r ^ i) * (r - 1) = 1", " IsUnit (1 - r)", " IsUnit (r + 1)", " IsUnit (-r - 1)", " IsUnit (u + r)", " IsUnit (1 + r * ↑h...
[ " IsNilpotent (-x)", " (-x) ^ n = 0", " IsNilpotent (t • a)", " (t • a) ^ k = 0", " IsUnit (r - 1)", " (r - 1) * -∑ i ∈ Finset.range n, r ^ i = 1", " (-∑ i ∈ Finset.range n, r ^ i) * (r - 1) = 1", " IsUnit (1 - r)", " IsUnit (r + 1)", " IsUnit (-r - 1)", " IsUnit (u + r)", " IsUnit (1 + r * ↑h...
import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.Localization.AtPrime import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Integer import Mathlib.RingTheory.Localization.Submodule import Mathlib.RingTheory.Nilpotent.Lemmas import Mathlib.RingTheory.RingHomProperties im...
Mathlib/RingTheory/LocalProperties.lean
193
197
theorem RingHom.LocalizationPreserves.away (H : RingHom.LocalizationPreserves @P) (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] (hf : P f) : P (IsLocalization.Away.map R' S' f r) := by
have : IsLocalization ((Submonoid.powers r).map f) S' := by rw [Submonoid.map_powers]; assumption exact H f (Submonoid.powers r) R' S' hf
[ " OfLocalizationSpan P ↔ OfLocalizationFiniteSpan P", " (∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Set R),\n Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap f ↑r)) → P f) ↔\n ∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Finset R)...
[ " OfLocalizationSpan P ↔ OfLocalizationFiniteSpan P", " (∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Set R),\n Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap f ↑r)) → P f) ↔\n ∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Finset R)...
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.Combinatorics.Pigeonhole #align_import dynamics.ergodic.conservative from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" noncomputable section open scoped Classi...
Mathlib/Dynamics/Ergodic/Conservative.lean
121
130
theorem measure_mem_forall_ge_image_not_mem_eq_zero (hf : Conservative f μ) (hs : MeasurableSet s) (n : ℕ) : μ ({ x ∈ s | ∀ m ≥ n, f^[m] x ∉ s }) = 0 := by
by_contra H have : MeasurableSet (s ∩ { x | ∀ m ≥ n, f^[m] x ∉ s }) := by simp only [setOf_forall, ← compl_setOf] exact hs.inter (MeasurableSet.biInter (to_countable _) fun m _ => hf.measurable.iterate m hs.compl) rcases (hf.exists_gt_measure_inter_ne_zero this H) n with ⟨m, hmn, hm⟩ rcases nonem...
[ " ∃ᶠ (m : ℕ) in atTop, μ (s ∩ f^[m] ⁻¹' s) ≠ 0", " False", " μ s = 0", " μ T = 0", " T = ⋃ i ∈ fun i => (N + 1).le i, s ∩ f^[i] ⁻¹' s", " T = s ∩ ⋃ i ∈ fun i => (N + 1).le i, f^[i] ⁻¹' s", " μ ((s ∩ f^[n] ⁻¹' s) \\ T) ≠ 0", " n + m ≥ N + 1", " x ∈ f^[n + m] ⁻¹' s", " μ {x | x ∈ s ∧ ∀ m ≥ n, f^[m] ...
[ " ∃ᶠ (m : ℕ) in atTop, μ (s ∩ f^[m] ⁻¹' s) ≠ 0", " False", " μ s = 0", " μ T = 0", " T = ⋃ i ∈ fun i => (N + 1).le i, s ∩ f^[i] ⁻¹' s", " T = s ∩ ⋃ i ∈ fun i => (N + 1).le i, f^[i] ⁻¹' s", " μ ((s ∩ f^[n] ⁻¹' s) \\ T) ≠ 0", " n + m ≥ N + 1", " x ∈ f^[n + m] ⁻¹' s" ]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Deprecated.Group #align_import deprecated.submonoid from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" variable {M : Type*} [Monoid M] {s : Set M} variable {A : Type*} [AddMonoi...
Mathlib/Deprecated/Submonoid.lean
426
427
theorem Submonoid.isSubmonoid (S : Submonoid M) : IsSubmonoid (S : Set M) := by
exact ⟨S.2, S.1.2⟩
[ " IsSubmonoid ↑S" ]
[]
import Mathlib.Algebra.Algebra.Prod import Mathlib.LinearAlgebra.Basic import Mathlib.LinearAlgebra.Span import Mathlib.Order.PartialSups #align_import linear_algebra.prod from "leanprover-community/mathlib"@"cd391184c85986113f8c00844cfe6dda1d34be3d" universe u v w x y z u' v' w' y' variable {R : Type u} {K : Ty...
Mathlib/LinearAlgebra/Prod.lean
162
169
theorem range_inr : range (inr R M M₂) = ker (fst R M M₂) := by
ext x simp only [mem_ker, mem_range] constructor · rintro ⟨y, rfl⟩ rfl · intro h exact ⟨x.snd, Prod.ext h.symm rfl⟩
[ " Pi.prod (⇑f) (⇑g) (x + y) = Pi.prod (⇑f) (⇑g) x + Pi.prod (⇑f) (⇑g) y", " { toFun := Pi.prod ⇑f ⇑g, map_add' := ⋯ }.toFun (c • x) =\n (RingHom.id R) c • { toFun := Pi.prod ⇑f ⇑g, map_add' := ⋯ }.toFun x", " (fun f => (fst R M₂ M₃ ∘ₗ f, snd R M₂ M₃ ∘ₗ f))\n ({ toFun := fun f => f.1.prod f.2, map_add' :...
[ " Pi.prod (⇑f) (⇑g) (x + y) = Pi.prod (⇑f) (⇑g) x + Pi.prod (⇑f) (⇑g) y", " { toFun := Pi.prod ⇑f ⇑g, map_add' := ⋯ }.toFun (c • x) =\n (RingHom.id R) c • { toFun := Pi.prod ⇑f ⇑g, map_add' := ⋯ }.toFun x", " (fun f => (fst R M₂ M₃ ∘ₗ f, snd R M₂ M₃ ∘ₗ f))\n ({ toFun := fun f => f.1.prod f.2, map_add' :...
import Mathlib.Data.Multiset.Nodup #align_import data.multiset.sum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Sum namespace Multiset variable {α β : Type*} (s : Multiset α) (t : Multiset β) def disjSum : Multiset (Sum α β) := s.map inl + t.map inr #align multiset.dis...
Mathlib/Data/Multiset/Sum.lean
64
69
theorem inr_mem_disjSum : inr b ∈ s.disjSum t ↔ b ∈ t := by
rw [mem_disjSum, or_iff_right] -- Porting note: Previous code for L72 was: simp only [exists_eq_right] · simp only [inr.injEq, exists_eq_right] rintro ⟨a, _, ha⟩ exact inl_ne_inr ha
[ " card (s.disjSum t) = card s + card t", " x ∈ s.disjSum t ↔ (∃ a ∈ s, inl a = x) ∨ ∃ b ∈ t, inr b = x", " inl a ∈ s.disjSum t ↔ a ∈ s", " (∃ a_1 ∈ s, inl a_1 = inl a) ↔ a ∈ s", " ¬∃ b ∈ t, inr b = inl a", " False", " inr b ∈ s.disjSum t ↔ b ∈ t", " (∃ b_1 ∈ t, inr b_1 = inr b) ↔ b ∈ t", " ¬∃ a ∈ s,...
[ " card (s.disjSum t) = card s + card t", " x ∈ s.disjSum t ↔ (∃ a ∈ s, inl a = x) ∨ ∃ b ∈ t, inr b = x", " inl a ∈ s.disjSum t ↔ a ∈ s", " (∃ a_1 ∈ s, inl a_1 = inl a) ↔ a ∈ s", " ¬∃ b ∈ t, inr b = inl a", " False" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Instances.Irrational #align_import number_theory.liouville.liouville_with from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open Filter Metric Real Set open sc...
Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
114
128
theorem mul_rat (h : LiouvilleWith p x) (hr : r ≠ 0) : LiouvilleWith p (x * r) := by
rcases h.exists_pos with ⟨C, _hC₀, hC⟩ refine ⟨r.den ^ p * (|r| * C), (tendsto_id.nsmul_atTop r.pos).frequently (hC.mono ?_)⟩ rintro n ⟨_hn, m, hne, hlt⟩ have A : (↑(r.num * m) : ℝ) / ↑(r.den • id n) = m / n * r := by simp [← div_mul_div_comm, ← r.cast_def, mul_comm] refine ⟨r.num * m, ?_, ?_⟩ · rw [A]...
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ι : Sort*} {α β X Y : Type*}...
Mathlib/Topology/Filter.lean
139
141
theorem nhds_iInf (f : ι → Filter α) : 𝓝 (⨅ i, f i) = ⨅ i, 𝓝 (f i) := by
simp only [nhds_eq] apply lift'_iInf_of_map_univ <;> simp
[ " IsOpen {l | s ∈ l}", " ∀ t₁ ∈ range (Iic ∘ 𝓟), ∀ t₂ ∈ range (Iic ∘ 𝓟), ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ range (Iic ∘ 𝓟), x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t", " (Iic ∘ 𝓟) (s ∩ t) = Iic (𝓟 s) ∩ Iic (𝓟 t)", " (∃ S ⊆ range (Iic ∘ 𝓟), s = ⋃₀ S) ↔ ∃ T, s = ⋃...
[ " IsOpen {l | s ∈ l}", " ∀ t₁ ∈ range (Iic ∘ 𝓟), ∀ t₂ ∈ range (Iic ∘ 𝓟), ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ range (Iic ∘ 𝓟), x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t", " (Iic ∘ 𝓟) (s ∩ t) = Iic (𝓟 s) ∩ Iic (𝓟 t)", " (∃ S ⊆ range (Iic ∘ 𝓟), s = ⋃₀ S) ↔ ∃ T, s = ⋃...
import Mathlib.Order.CompleteLattice import Mathlib.Order.GaloisConnection import Mathlib.Data.Set.Lattice import Mathlib.Tactic.AdaptationNote #align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" variable {α β γ : Type*} def Rel (α β : Type*) := α → β → Prop --...
Mathlib/Data/Rel.lean
70
72
theorem inv_inv : inv (inv r) = r := by
ext x y rfl
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y" ]
[]
import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.MulOpposite import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Finset.NoncommProd import Mathlib.Data.Int.Order.Lemmas #align_import group_theory.submonoid.membership fro...
Mathlib/Algebra/Group/Submonoid/Membership.lean
340
341
theorem closure_singleton_one : closure ({1} : Set M) = ⊥ := by
simp [eq_bot_iff_forall, mem_closure_singleton]
[ " y ∈ closure {x} ↔ ∃ n, x ^ n = y", " (∃ x_1, ((powersHom M) x) x_1 = y) ↔ ∃ n, x ^ n = y", " closure {1} = ⊥" ]
[ " y ∈ closure {x} ↔ ∃ n, x ^ n = y", " (∃ x_1, ((powersHom M) x) x_1 = y) ↔ ∃ n, x ^ n = y" ]
import Batteries.Tactic.Lint.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Order import Mathlib.Init.Data.Int.Order set_option autoImplicit true namespace Linarith theorem lt_irrefl {α : Type u} ...
Mathlib/Tactic/Linarith/Lemmas.lean
33
34
theorem lt_of_eq_of_lt {α} [OrderedSemiring α] {a b : α} (ha : a = 0) (hb : b < 0) : a + b < 0 := by
simp [*]
[ " a + b = 0", " a + b ≤ 0", " a + b < 0" ]
[ " a + b = 0", " a + b ≤ 0" ]
import Mathlib.Data.DFinsupp.Basic #align_import data.dfinsupp.ne_locus from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {α : Type*} {N : α → Type*} namespace DFinsupp variable [DecidableEq α] section NHasZero variable [∀ a, DecidableEq (N a)] [∀ a, Zero (N a)] (f g : Π₀...
Mathlib/Data/DFinsupp/NeLocus.lean
41
43
theorem mem_neLocus {f g : Π₀ a, N a} {a : α} : a ∈ f.neLocus g ↔ f a ≠ g a := by
simpa only [neLocus, Finset.mem_filter, Finset.mem_union, mem_support_iff, and_iff_right_iff_imp] using Ne.ne_or_ne _
[ " a ∈ f.neLocus g ↔ f a ≠ g a" ]
[]
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : ℕ) : List ℕ := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
120
122
theorem succ_singleton {n : ℕ} : Ico n (n + 1) = [n] := by
dsimp [Ico] simp [range', Nat.add_sub_cancel_left]
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
import Mathlib.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Data.Finset.Fold import Mathlib.Data.Finset.Option import Mathlib.Data.Finset.Pi import Mathlib.Data.Finset.Prod import Mathlib.Data.Multiset.Lattice import Mathlib.Data.Set.Lattice import Mathlib.Order.Hom.Lattice import Mathlib.Order.Nat #align_import...
Mathlib/Data/Finset/Lattice.lean
82
87
theorem sup_sup : s.sup (f ⊔ g) = s.sup f ⊔ s.sup g := by
induction s using Finset.cons_induction with | empty => rw [sup_empty, sup_empty, sup_empty, bot_sup_eq] | cons _ _ _ ih => rw [sup_cons, sup_cons, sup_cons, ih] exact sup_sup_sup_comm _ _ _ _
[ " s.sup (f ⊔ g) = s.sup f ⊔ s.sup g", " ∅.sup (f ⊔ g) = ∅.sup f ⊔ ∅.sup g", " (cons a✝ s✝ h✝).sup (f ⊔ g) = (cons a✝ s✝ h✝).sup f ⊔ (cons a✝ s✝ h✝).sup g", " (f ⊔ g) a✝ ⊔ (s✝.sup f ⊔ s✝.sup g) = f a✝ ⊔ s✝.sup f ⊔ (g a✝ ⊔ s✝.sup g)" ]
[]
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
79
81
theorem weightedVSubOfPoint_apply_const (w : ι → k) (p : P) (b : P) : s.weightedVSubOfPoint (fun _ => p) b w = (∑ i ∈ s, w i) • (p -ᵥ b) := by
rw [weightedVSubOfPoint_apply, sum_smul]
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)", " (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)" ]
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}", " (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)" ]
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
160
161
theorem reflect_C (r : R) (N : ℕ) : reflect N (C r) = C r * X ^ N := by
conv_lhs => rw [← mul_one (C r), ← pow_zero X, reflect_C_mul_X_pow, revAt_zero]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Rat.Cast.Order import Mathlib.Order.Partition.Finpartition import Mathlib.Tactic.GCongr import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring #align_import combinatorics.simp...
Mathlib/Combinatorics/SimpleGraph/Density.lean
85
90
theorem interedges_disjoint_left {s s' : Finset α} (hs : Disjoint s s') (t : Finset β) : Disjoint (interedges r s t) (interedges r s' t) := by
rw [Finset.disjoint_left] at hs ⊢ intro _ hx hy rw [mem_interedges_iff] at hx hy exact hs hx.1 hy.1
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r ∅ t = ∅", " x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁", " x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card", " Disjoint (...
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r ∅ t = ∅", " x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁", " x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card", " Disjoint (...
import Mathlib.Algebra.Module.Equiv import Mathlib.Data.DFinsupp.Basic import Mathlib.Data.Finsupp.Basic #align_import data.finsupp.to_dfinsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ι : Type*} {R : Type*} {M : Type*} section Defs def Finsupp.toDFinsupp [Zer...
Mathlib/Data/Finsupp/ToDFinsupp.lean
88
91
theorem Finsupp.toDFinsupp_single (i : ι) (m : M) : (Finsupp.single i m).toDFinsupp = DFinsupp.single i m := by
ext simp [Finsupp.single_apply, DFinsupp.single_apply]
[ " (single i m).toDFinsupp = DFinsupp.single i m", " (single i m).toDFinsupp i✝ = (DFinsupp.single i m) i✝" ]
[]
import Mathlib.CategoryTheory.Sites.Canonical #align_import category_theory.sites.types from "leanprover-community/mathlib"@"9f9015c645d85695581237cc761981036be8bd37" universe u namespace CategoryTheory --open scoped CategoryTheory.Type -- Porting note: unknown namespace def typesGrothendieckTopology : Grothe...
Mathlib/CategoryTheory/Sites/Types.lean
108
117
theorem typesGlue_eval {S hs α} (s) : typesGlue.{u} S hs α (eval S α s) = s := by
apply (hs.isSheafFor _ _ (generate_discretePresieve_mem α)).isSeparatedFor.ext intro β f hf apply (IsSheafFor.valid_glue _ _ _ hf).trans apply (FunctorToTypes.map_comp_apply _ _ _ _).symm.trans rw [← op_comp] --congr 2 -- Porting note: This tactic didn't work. Find an alternative. suffices ((↾fun _ ↦ PUn...
[ " (yoneda.obj α).map f.op (fun y => x (fun x => y) ⋯ PUnit.unit) z = x f h z", " f y = x (fun x => y) ⋯ PUnit.unit", " S.map g.op (S.map g₁.op ((fun β g hg => S.map (↾fun x => PUnit.unit).op (f (g (Classical.choose hg)))) β f₁ hf₁)) =\n S.map g.op (S.map g₂.op ((fun β g hg => S.map (↾fun x => PUnit.unit).op ...
[ " (yoneda.obj α).map f.op (fun y => x (fun x => y) ⋯ PUnit.unit) z = x f h z", " f y = x (fun x => y) ⋯ PUnit.unit", " S.map g.op (S.map g₁.op ((fun β g hg => S.map (↾fun x => PUnit.unit).op (f (g (Classical.choose hg)))) β f₁ hf₁)) =\n S.map g.op (S.map g₂.op ((fun β g hg => S.map (↾fun x => PUnit.unit).op ...