Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
221
import Mathlib.Init.Function import Mathlib.Init.Order.Defs #align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Bool @[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true #align bool.to_bool_true decide_true_eq_true @[dep...
Mathlib/Data/Bool/Basic.lean
115
115
theorem and_elim_right : ∀ {a b : Bool}, a && b → b := by
decide
[ " b = false ∨ b = true", " false = false ∨ false = true", " true = false ∨ true = true", " p x", " p false", " p true", " p b ∨ p !b", " p false ∨ p !false", " p true ∨ p !true", " ∃ x, p x", " (a || b) = true", " (false || b) = true", " (true || b) = true", " ∀ {a b : Bool}, (a && b) = tr...
[ " b = false ∨ b = true", " false = false ∨ false = true", " true = false ∨ true = true", " p x", " p false", " p true", " p b ∨ p !b", " p false ∨ p !false", " p true ∨ p !true", " ∃ x, p x", " (a || b) = true", " (false || b) = true", " (true || b) = true", " ∀ {a b : Bool}, (a && b) = tr...
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {α...
Mathlib/Topology/Algebra/WithZeroTopology.lean
62
65
theorem hasBasis_nhds_zero : (𝓝 (0 : Γ₀)).HasBasis (fun γ : Γ₀ => γ ≠ 0) Iio := by
rw [nhds_zero] refine hasBasis_biInf_principal ?_ ⟨1, one_ne_zero⟩ exact directedOn_iff_directed.2 (Monotone.directed_ge fun a b hab => Iio_subset_Iio hab)
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio" ]
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : ∀ {b₁ b₂ : Buckets α β}, b₁.1.data = b₂.1.data → b₁ = b₂ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
48
64
theorem WF.update [BEq α] [Hashable α] {buckets : Buckets α β} {i d h} (H : buckets.WF) (h₁ : ∀ [PartialEquivBEq α] [LawfulHashable α], (buckets.1[i].toList.Pairwise fun a b => ¬(a.1 == b.1)) → d.toList.Pairwise fun a b => ¬(a.1 == b.1)) (h₂ : (buckets.1[i].All fun k _ => ((hash k).toUSize % buckets...
refine ⟨fun l hl => ?_, fun i hi p hp => ?_⟩ · exact match List.mem_or_eq_of_mem_set hl with | .inl hl => H.1 _ hl | .inr rfl => h₁ (H.1 _ (Array.getElem_mem_data ..)) · revert hp simp only [Array.getElem_eq_data_get, update_data, List.get_set, Array.data_length, update_size] split <;> intro hp ...
[ " ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " (self.update i d h).update i d' h' ...
[ " ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " (self.update i d h).update i d' h' ...
import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.Transfer #align_import group_theory.schreier from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6" open scoped Pointwise namespace Subgroup open MemRightTransversals variable {G : T...
Mathlib/GroupTheory/Schreier.lean
37
58
theorem closure_mul_image_mul_eq_top (hR : R ∈ rightTransversals (H : Set G)) (hR1 : (1 : G) ∈ R) (hS : closure S = ⊤) : (closure ((R * S).image fun g => g * (toFun hR g : G)⁻¹)) * R = ⊤ := by
let f : G → R := fun g => toFun hR g let U : Set G := (R * S).image fun g => g * (f g : G)⁻¹ change (closure U : Set G) * R = ⊤ refine top_le_iff.mp fun g _ => ?_ refine closure_induction_right ?_ ?_ ?_ (eq_top_iff.mp hS (mem_top g)) · exact ⟨1, (closure U).one_mem, 1, hR1, one_mul 1⟩ · rintro - - s hs ⟨...
[ " ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤", " ↑(closure U) * R = ⊤", " g ∈ ↑(closure U) * R", " 1 ∈ ↑(closure U) * R", " ∀ x ∈ closure S, ∀ y ∈ S, x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R", " (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R", " u * r * s = u * (r * s * (...
[ " ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤" ]
import Mathlib.Logic.Equiv.Option import Mathlib.Order.RelIso.Basic import Mathlib.Order.Disjoint import Mathlib.Order.WithBot import Mathlib.Tactic.Monotonicity.Attr import Mathlib.Util.AssertExists #align_import order.hom.basic from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c" open ...
Mathlib/Order/Hom/Basic.lean
207
209
theorem lt_map_inv_iff (f : F) {a : α} {b : β} : a < EquivLike.inv f b ↔ f a < b := by
rw [← map_lt_map_iff f] simp only [EquivLike.apply_inv_apply]
[ " EquivLike.inv f b < a ↔ b < f a", " f (EquivLike.inv f b) < f a ↔ b < f a", " a < EquivLike.inv f b ↔ f a < b", " f a < f (EquivLike.inv f b) ↔ f a < b" ]
[ " EquivLike.inv f b < a ↔ b < f a", " f (EquivLike.inv f b) < f a ↔ b < f a", " a < EquivLike.inv f b ↔ f a < b" ]
import Mathlib.Tactic.NormNum import Mathlib.Tactic.TryThis import Mathlib.Util.AtomM set_option autoImplicit true namespace Mathlib.Tactic.Abel open Lean Elab Meta Tactic Qq initialize registerTraceClass `abel initialize registerTraceClass `abel.detail structure Context where α : Expr univ :...
Mathlib/Tactic/Abel.lean
148
152
theorem term_add_termg {α} [AddCommGroup α] (n₁ x a₁ n₂ a₂ n' a') (h₁ : n₁ + n₂ = n') (h₂ : a₁ + a₂ = a') : @termg α _ n₁ x a₁ + @termg α _ n₂ x a₂ = termg n' x a' := by
simp only [termg, h₁.symm, add_zsmul, h₂.symm] exact add_add_add_comm (n₁ • x) a₁ (n₂ • x) a₂
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'", " termg n x a + k = termg n x a'", " term n₁ x a₁ + term n₂ x a₂ = term n' x a'", " termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'", " n₁ • x + a₁ + (n₂ • x + a₂) = n₁ • x + n₂ • x + (a₁ + a₂)" ]
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'", " termg n x a + k = termg n x a'", " term n₁ x a₁ + term n₂ x a₂ = term n' x a'", " termg n₁ x a₁ + termg n₂ x a₂ = termg n' x a'" ]
import Mathlib.Algebra.MvPolynomial.Derivation import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.pderiv from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section universe u v namespace MvPolynomial open Set Function Finsupp variable {R : ...
Mathlib/Algebra/MvPolynomial/PDeriv.lean
64
65
theorem pderiv_def [DecidableEq σ] (i : σ) : pderiv i = mkDerivation R (Pi.single i 1) := by
unfold pderiv; congr!
[ " pderiv i = mkDerivation R (Pi.single i 1)", " mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)" ]
[ " pderiv i = mkDerivation R (Pi.single i 1)" ]
import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics #align_import analysis.calculus.fderiv.basic from "leanprover-community/mathlib"@"41bef4ae1254365bc190aee63b947674d2977f01" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open To...
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
246
276
theorem HasFDerivWithinAt.lim (h : HasFDerivWithinAt f f' s x) {α : Type*} (l : Filter α) {c : α → 𝕜} {d : α → E} {v : E} (dtop : ∀ᶠ n in l, x + d n ∈ s) (clim : Tendsto (fun n => ‖c n‖) l atTop) (cdlim : Tendsto (fun n => c n • d n) l (𝓝 v)) : Tendsto (fun n => c n • (f (x + d n) - f x)) l (𝓝 (f' v)) :=...
have tendsto_arg : Tendsto (fun n => x + d n) l (𝓝[s] x) := by conv in 𝓝[s] x => rw [← add_zero x] rw [nhdsWithin, tendsto_inf] constructor · apply tendsto_const_nhds.add (tangentConeAt.lim_zero l clim cdlim) · rwa [tendsto_principal] have : (fun y => f y - f x - f' (y - x)) =o[𝓝[s] x] fun y...
[ " fderivWithin 𝕜 f s x = 0", " 𝓝[s \\ {x}] x = ⊥", " 𝓝[s \\ {x}] x ≤ 𝓝[s] x", " fderiv 𝕜 f x = 0", " Tendsto (fun n => c n • (f (x + d n) - f x)) l (𝓝 (f' v))", " Tendsto (fun n => x + d n) l (𝓝[s] x)", "𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup...
[ " fderivWithin 𝕜 f s x = 0", " 𝓝[s \\ {x}] x = ⊥", " 𝓝[s \\ {x}] x ≤ 𝓝[s] x", " fderiv 𝕜 f x = 0", " Tendsto (fun n => c n • (f (x + d n) - f x)) l (𝓝 (f' v))" ]
import Mathlib.MeasureTheory.Group.Measure import Mathlib.MeasureTheory.Integral.IntegrableOn import Mathlib.MeasureTheory.Function.LocallyIntegrable open Asymptotics MeasureTheory Set Filter variable {α E F : Type*} [MeasurableSpace α] [NormedAddCommGroup E] [NormedAddCommGroup F] {f : α → E} {g : α → F} {a b :...
Mathlib/MeasureTheory/Integral/Asymptotics.lean
70
77
theorem LocallyIntegrable.integrable_of_isBigO_atBot_atTop [IsMeasurablyGenerated (atBot (α := α))] [IsMeasurablyGenerated (atTop (α := α))] (hf : LocallyIntegrable f μ) (ho : f =O[atBot] g) (hg : IntegrableAtFilter g atBot μ) (ho' : f =O[atTop] g') (hg' : IntegrableAtFilter g' atTop μ) : Integrable f μ...
refine integrable_iff_integrableAtFilter_atBot_atTop.mpr ⟨⟨ho.integrableAtFilter ?_ hg, ho'.integrableAtFilter ?_ hg'⟩, hf⟩ all_goals exact hf.aestronglyMeasurable.stronglyMeasurableAtFilter
[ " IntegrableAtFilter f l μ", " ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ ‖C * ‖g a‖‖", " ‖f x‖ ≤ ‖C * ‖g x‖‖", " Integrable f μ", " IntegrableAtFilter f ⊤ μ", " StronglyMeasurableAtFilter f (cocompact α) μ", " StronglyMeasurableAtFilter f atTop μ", " StronglyMeasurableAtFilter f atBot μ" ]
[ " IntegrableAtFilter f l μ", " ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ ‖C * ‖g a‖‖", " ‖f x‖ ≤ ‖C * ‖g x‖‖", " Integrable f μ", " IntegrableAtFilter f ⊤ μ", " StronglyMeasurableAtFilter f (cocompact α) μ" ]
import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.Function #align_import data.set.intervals.surj_on from "leanprover-community/mathlib"@"a59dad53320b73ef180174aae867addd707ef00e" variable {α : Type*} {β : Type*} [LinearOrder α] [PartialOrder β] {f : α → β} open Set Function open OrderDual (toDual)...
Mathlib/Order/Interval/Set/SurjOn.lean
47
49
theorem surjOn_Ioc_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f) (a b : α) : SurjOn f (Ioc a b) (Ioc (f a) (f b)) := by
simpa using surjOn_Ico_of_monotone_surjective h_mono.dual h_surj (toDual b) (toDual a)
[ " SurjOn f (Ioo a b) (Ioo (f a) (f b))", " p ∈ f '' Ioo a b", " f x ∈ f '' Ioo a b", " a < x ∧ x < b", " f x ∉ Ioo (f a) (f b)", " SurjOn f (Ico a b) (Ico (f a) (f b))", " p ∈ f '' Ico a b", " f a ∈ f '' Ico a b", " SurjOn f (Ico a b) ∅", " SurjOn f (Ioc a b) (Ioc (f a) (f b))" ]
[ " SurjOn f (Ioo a b) (Ioo (f a) (f b))", " p ∈ f '' Ioo a b", " f x ∈ f '' Ioo a b", " a < x ∧ x < b", " f x ∉ Ioo (f a) (f b)", " SurjOn f (Ico a b) (Ico (f a) (f b))", " p ∈ f '' Ico a b", " f a ∈ f '' Ico a b", " SurjOn f (Ico a b) ∅", " SurjOn f (Ioc a b) (Ioc (f a) (f b))" ]
import Mathlib.CategoryTheory.Sites.CompatiblePlus import Mathlib.CategoryTheory.Sites.ConcreteSheafification #align_import category_theory.sites.compatible_sheafification from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace CategoryTheory.GrothendieckTopology open CategoryThe...
Mathlib/CategoryTheory/Sites/CompatibleSheafification.lean
70
76
theorem sheafificationWhiskerLeftIso_hom_app (P : Cᵒᵖ ⥤ D) (F : D ⥤ E) [∀ (F : D ⥤ E) (X : C), PreservesColimitsOfShape (J.Cover X)ᵒᵖ F] [∀ (F : D ⥤ E) (X : C) (W : J.Cover X) (P : Cᵒᵖ ⥤ D), PreservesLimit (W.index P).multicospan F] : (sheafificationWhiskerLeftIso J P).hom.app F = (J.sheafifyCompIso...
dsimp [sheafificationWhiskerLeftIso, sheafifyCompIso] rw [Category.comp_id]
[ " (whiskeringLeft Cᵒᵖ D E).obj (J.sheafify P) ≅ (whiskeringLeft Cᵒᵖ D E).obj P ⋙ J.sheafification E", " (whiskeringLeft Cᵒᵖ D E).obj (J.plusObj P) ⋙ J.plusFunctor E ≅\n ((whiskeringLeft Cᵒᵖ D E).obj P ⋙ J.plusFunctor E) ⋙ J.plusFunctor E", " (whiskeringLeft Cᵒᵖ D E).obj (J.plusObj P) ≅ (whiskeringLeft Cᵒᵖ D ...
[ " (whiskeringLeft Cᵒᵖ D E).obj (J.sheafify P) ≅ (whiskeringLeft Cᵒᵖ D E).obj P ⋙ J.sheafification E", " (whiskeringLeft Cᵒᵖ D E).obj (J.plusObj P) ⋙ J.plusFunctor E ≅\n ((whiskeringLeft Cᵒᵖ D E).obj P ⋙ J.plusFunctor E) ⋙ J.plusFunctor E", " (whiskeringLeft Cᵒᵖ D E).obj (J.plusObj P) ≅ (whiskeringLeft Cᵒᵖ D ...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {R : Type*} [Semi...
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
24
28
theorem iteratedDerivWithin_add (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) : iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by
simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx, ContinuousMultilinearMap.add_apply]
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x" ]
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x" ]
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Tactic.AdaptationNote #align_import measure_theory.covering.besicovitch_vector_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" universe u open Metric Set Fini...
Mathlib/MeasureTheory/Covering/BesicovitchVectorSpace.lean
110
150
theorem card_le_of_separated (s : Finset E) (hs : ∀ c ∈ s, ‖c‖ ≤ 2) (h : ∀ c ∈ s, ∀ d ∈ s, c ≠ d → 1 ≤ ‖c - d‖) : s.card ≤ 5 ^ finrank ℝ E := by
/- We consider balls of radius `1/2` around the points in `s`. They are disjoint, and all contained in the ball of radius `5/2`. A volume argument gives `s.card * (1/2)^dim ≤ (5/2)^dim`, i.e., `s.card ≤ 5^dim`. -/ borelize E let μ : Measure E := Measure.addHaar let δ : ℝ := (1 : ℝ) / 2 let ρ : ℝ := (...
[ " s.card ≤ 5 ^ finrank ℝ E", " 0 < ρ", " (↑s).Pairwise (Disjoint on fun c => ball c δ)", " (Disjoint on fun c => ball c δ) c d", " δ + δ ≤ dist c d", " δ + δ ≤ ‖c - d‖", " δ + δ = 1", " A ⊆ ball 0 ρ", " ball x δ ⊆ ball 0 ρ", " δ + dist x 0 ≤ ρ", " δ + dist x 0 ≤ δ + 2", " δ + ‖x‖ ≤ δ + 2", "...
[ " s.card ≤ 5 ^ finrank ℝ E" ]
import Mathlib.Topology.Sets.Closeds import Mathlib.Topology.QuasiSeparated #align_import topology.sets.compacts from "leanprover-community/mathlib"@"8c1b484d6a214e059531e22f1be9898ed6c1fd47" open Set variable {α β γ : Type*} [TopologicalSpace α] [TopologicalSpace β] [TopologicalSpace γ] namespace TopologicalSp...
Mathlib/Topology/Sets/Compacts.lean
125
129
theorem coe_finset_sup {ι : Type*} {s : Finset ι} {f : ι → Compacts α} : (↑(s.sup f) : Set α) = s.sup fun i => ↑(f i) := by
refine Finset.cons_induction_on s rfl fun a s _ h => ?_ simp_rw [Finset.sup_cons, coe_sup, sup_eq_union] congr
[ " s = t", " { carrier := carrier✝, isCompact' := isCompact'✝ } = t", " { carrier := carrier✝¹, isCompact' := isCompact'✝¹ } = { carrier := carrier✝, isCompact' := isCompact'✝ }", " ↑(s.sup f) = s.sup fun i => ↑(f i)", " ↑((Finset.cons a s x✝).sup f) = (Finset.cons a s x✝).sup fun i => ↑(f i)", " ↑(f a) ∪ ...
[ " s = t", " { carrier := carrier✝, isCompact' := isCompact'✝ } = t", " { carrier := carrier✝¹, isCompact' := isCompact'✝¹ } = { carrier := carrier✝, isCompact' := isCompact'✝ }", " ↑(s.sup f) = s.sup fun i => ↑(f i)" ]
import Mathlib.Data.Matrix.Block #align_import linear_algebra.matrix.symmetric from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" variable {α β n m R : Type*} namespace Matrix open Matrix def IsSymm (A : Matrix n n α) : Prop := Aᵀ = A #align matrix.is_symm Matrix.IsSymm instance...
Mathlib/LinearAlgebra/Matrix/Symmetric.lean
86
89
theorem IsSymm.pow [CommSemiring α] [Fintype n] [DecidableEq n] {A : Matrix n n α} (h : A.IsSymm) (k : ℕ) : (A ^ k).IsSymm := by
rw [IsSymm, transpose_pow, h]
[ " (A ^ k).IsSymm" ]
[ " (A ^ k).IsSymm" ]
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProd...
Mathlib/RingTheory/Unramified/Basic.lean
69
83
theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by
revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x ...
[ " g₁ = g₂", " ∀ (g₁ g₂ : A →ₐ[R] B), (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂ → g₁ = g₂", " Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ [_RB : Algebra R B], Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2...
[ " g₁ = g₂" ]
import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.Data.Fintype.Card import Mathlib.RingTheory.Algebraic #align_import field_theory.ax_grothendieck from "leanprover-community/mathlib"@"4e529b03dd62b7b7d13806c3fb974d9d4848910e" noncomputable section open MvPolynomial Finset Function
Mathlib/FieldTheory/AxGrothendieck.lean
33
66
theorem ax_grothendieck_of_locally_finite {ι K R : Type*} [Field K] [Finite K] [CommRing R] [Finite ι] [Algebra K R] [Algebra.IsAlgebraic K R] (ps : ι → MvPolynomial ι R) (hinj : Injective fun v i => MvPolynomial.eval v (ps i)) : Surjective fun v i => MvPolynomial.eval v (ps i) := by
classical intro v cases nonempty_fintype ι /- `s` is the set of all coefficients of the polynomial, as well as all of the coordinates of `v`, the point I am trying to find the preimage of. -/ let s : Finset R := (Finset.biUnion (univ : Finset ι) fun i => (ps i).support.image fun x => coef...
[ " Surjective fun v i => (MvPolynomial.eval v) (ps i)", " ∃ a, (fun v i => (MvPolynomial.eval v) (ps i)) a = v", " Injective res", " x = y", " ↑(x i) = ↑(y i)", " ((fun v i => (MvPolynomial.eval v) (ps i)) fun i => ↑(w i)) = v" ]
[ " Surjective fun v i => (MvPolynomial.eval v) (ps i)" ]
import Mathlib.Algebra.Ring.Defs import Mathlib.Algebra.Group.Ext local macro:max "local_hAdd[" type:term ", " inst:term "]" : term => `(term| (letI := $inst; HAdd.hAdd : $type → $type → $type)) local macro:max "local_hMul[" type:term ", " inst:term "]" : term => `(term| (letI := $inst; HMul.hMul : $type → $typ...
Mathlib/Algebra/Ring/Ext.lean
73
77
theorem toDistrib_injective : Function.Injective (@toDistrib R) := by
intro _ _ h ext x y · exact congrArg (·.toAdd.add x y) h · exact congrArg (·.toMul.mul x y) h
[ " inst₁ = inst₂", " mk left_distrib✝ right_distrib✝ zero_mul✝ mul_zero✝ = inst₂", " mk left_distrib✝¹ right_distrib✝¹ zero_mul✝¹ mul_zero✝¹ = mk left_distrib✝ right_distrib✝ zero_mul✝ mul_zero✝", " toAddCommMonoid✝¹ = toAddCommMonoid✝", " HAdd.hAdd = HAdd.hAdd", " Function.Injective (@toDistrib R)", " a...
[ " inst₁ = inst₂", " mk left_distrib✝ right_distrib✝ zero_mul✝ mul_zero✝ = inst₂", " mk left_distrib✝¹ right_distrib✝¹ zero_mul✝¹ mul_zero✝¹ = mk left_distrib✝ right_distrib✝ zero_mul✝ mul_zero✝", " toAddCommMonoid✝¹ = toAddCommMonoid✝", " HAdd.hAdd = HAdd.hAdd", " Function.Injective (@toDistrib R)" ]
import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.Data.Set.Basic import Mathlib.Data.Setoid.Basic import Mathlib.GroupTheory.Coset #align_import group_theory.double_coset from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" -- Porting note: removed import -- import Mathlib.Tac...
Mathlib/GroupTheory/DoubleCoset.lean
69
73
theorem eq_of_not_disjoint {H K : Subgroup G} {a b : G} (h : ¬Disjoint (doset a H K) (doset b H K)) : doset a H K = doset b H K := by
rw [disjoint_comm] at h have ha : a ∈ doset b H K := mem_doset_of_not_disjoint h apply doset_eq_of_mem ha
[ " doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t", " b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y", " doset b ↑H ↑K = doset a ↑H ↑K", " doset (h * a * k) ↑H ↑K = doset a ↑H ↑K", " b ∈ doset a ↑H ↑K", " ∃ x ∈ ↑H, ∃ y ∈ ↑K, b = x * a * y", " b = y⁻¹ * l * a * (r * r'⁻¹)", " doset a ↑H ↑K =...
[ " doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t", " b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y", " doset b ↑H ↑K = doset a ↑H ↑K", " doset (h * a * k) ↑H ↑K = doset a ↑H ↑K", " b ∈ doset a ↑H ↑K", " ∃ x ∈ ↑H, ∃ y ∈ ↑K, b = x * a * y", " b = y⁻¹ * l * a * (r * r'⁻¹)", " doset a ↑H ↑K =...
import Mathlib.Algebra.MvPolynomial.Funext import Mathlib.Algebra.Ring.ULift import Mathlib.RingTheory.WittVector.Basic #align_import ring_theory.witt_vector.is_poly from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" namespace WittVector universe u variable {p : ℕ} {R S : Type u} {σ id...
Mathlib/RingTheory/WittVector/IsPoly.lean
114
122
theorem poly_eq_of_wittPolynomial_bind_eq' [Fact p.Prime] (f g : ℕ → MvPolynomial (idx × ℕ) ℤ) (h : ∀ n, bind₁ f (wittPolynomial p _ n) = bind₁ g (wittPolynomial p _ n)) : f = g := by
ext1 n apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective rw [← Function.funext_iff] at h replace h := congr_arg (fun fam => bind₁ (MvPolynomial.map (Int.castRingHom ℚ) ∘ fam) (xInTermsOfW p ℚ n)) h simpa only [Function.comp, map_bind₁, map_wittPolynomial, ← bind₁_bind₁, bind₁_wi...
[ " f = g", " f n = g n", " (MvPolynomial.map (Int.castRingHom ℚ)) (f n) = (MvPolynomial.map (Int.castRingHom ℚ)) (g n)" ]
[ " f = g" ]
import Mathlib.LinearAlgebra.Matrix.Adjugate import Mathlib.RingTheory.PolynomialAlgebra #align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section universe u v w namespace Matrix open Finset Matrix Polynomial variable...
Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean
79
83
theorem charmatrix_reindex (e : n ≃ m) : charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
ext i j x by_cases h : i = j all_goals simp [h]
[ " M.charmatrix i i = X - C (M i i)", " M.charmatrix i j = -C (M i j)", " matPolyEquiv M.charmatrix = X - C M", " (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j", " (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j", " (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i...
[ " M.charmatrix i i = X - C (M i i)", " M.charmatrix i j = -C (M i j)", " matPolyEquiv M.charmatrix = X - C M", " (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j", " (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j", " (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i...
import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.adjoin.fg from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" universe u v w open Subsemiring Ring Submodule open Pointwise na...
Mathlib/RingTheory/Adjoin/FG.lean
129
137
theorem FG.prod {S : Subalgebra R A} {T : Subalgebra R B} (hS : S.FG) (hT : T.FG) : (S.prod T).FG := by
obtain ⟨s, hs⟩ := fg_def.1 hS obtain ⟨t, ht⟩ := fg_def.1 hT rw [← hs.2, ← ht.2] exact fg_def.2 ⟨LinearMap.inl R A B '' (s ∪ {1}) ∪ LinearMap.inr R A B '' (t ∪ {1}), Set.Finite.union (Set.Finite.image _ (Set.Finite.union hs.1 (Set.finite_singleton _))) (Set.Finite.image _ (Set.Finite.union ht.1 (Set.f...
[ " x ∈ span R ↑t", " x ∈ toSubmodule S", " toSubmodule (Algebra.adjoin R ↑s) = toSubmodule ⊤", " ↑s ⊆ ↑(toSubmodule (Algebra.adjoin R ↑s))", " (S.prod T).FG", " ((Algebra.adjoin R s).prod (Algebra.adjoin R t)).FG" ]
[ " x ∈ span R ↑t", " x ∈ toSubmodule S", " toSubmodule (Algebra.adjoin R ↑s) = toSubmodule ⊤", " ↑s ⊆ ↑(toSubmodule (Algebra.adjoin R ↑s))", " (S.prod T).FG" ]
import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Data.Nat.Lattice #align_import combinatorics.simple_graph.metric from "leanprover-community/mathlib"@"352ecfe114946c903338006dd3287cb5a9955ff2" namespace SimpleGraph variable {V : Type*} (G : SimpleGraph V) noncomputable def dist (u v : V)...
Mathlib/Combinatorics/SimpleGraph/Metric.lean
95
96
theorem dist_eq_zero_of_not_reachable {u v : V} (h : ¬G.Reachable u v) : G.dist u v = 0 := by
simp [h]
[ " G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v", " G.dist v v = 0", " G.dist u v = 0 ↔ u = v", " G.dist u v ≠ 0", " False", " G.dist u v = 0" ]
[ " G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v", " G.dist v v = 0", " G.dist u v = 0 ↔ u = v", " G.dist u v ≠ 0", " False", " G.dist u v = 0" ]
import Mathlib.Geometry.RingedSpace.PresheafedSpace import Mathlib.CategoryTheory.Limits.Final import Mathlib.Topology.Sheaves.Stalks #align_import algebraic_geometry.stalks from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section universe v u v' u' open Opposite Cate...
Mathlib/Geometry/RingedSpace/Stalks.lean
150
162
theorem comp {X Y Z : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) (β : Y ⟶ Z) (x : X) : stalkMap (α ≫ β) x = (stalkMap β (α.base x) : Z.stalk (β.base (α.base x)) ⟶ Y.stalk (α.base x)) ≫ (stalkMap α x : Y.stalk (α.base x) ⟶ X.stalk x) := by
dsimp [stalkMap, stalkFunctor, stalkPushforward] -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159 refine colimit.hom_ext fun U => ?_ induction U with | h U => ?_ cases U simp only [whiskeringLeft_obj_obj, comp_obj, op_obj, unop_op, OpenNhds.inclusion_obj, ι_colimMap_assoc, ...
[]
[ " Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ stalkMap α ↑x = α.c.app { unop := U } ≫ X.presheaf.germ x", " stalkMap (𝟙 X) x = 𝟙 (X.stalk x)", " (stalkFunctor C x).map (𝟙 X).c ≫ stalkPushforward C (𝟙 ↑X) X.presheaf x = 𝟙 (X.stalk x)", " (stalkFunctor C x).map (𝟙 X).c ≫ (stalkFunctor C x).map (Pushforward.id X.pres...
import Mathlib.Data.Finsupp.Lex import Mathlib.Data.Finsupp.Multiset import Mathlib.Order.GameAdd #align_import logic.hydra from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace Relation open Multiset Prod variable {α : Type*} def CutExpand (r : α → α → Prop) (s' s : Multise...
Mathlib/Logic/Hydra.lean
126
133
theorem acc_of_singleton [IsIrrefl α r] {s : Multiset α} (hs : ∀ a ∈ s, Acc (CutExpand r) {a}) : Acc (CutExpand r) s := by
induction s using Multiset.induction with | empty => exact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim | cons a s ihs => rw [← s.singleton_add a] rw [forall_mem_cons] at hs exact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)
[ " CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp", " InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t", " (toFinsupp s) b = (toFinsupp t) b", " (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)", " count b...
[ " CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp", " InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t", " (toFinsupp s) b = (toFinsupp t) b", " (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)", " count b...
import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.Matrix import Mathlib.LinearAlgebra.Matrix.ZPow import Mathlib.LinearAlgebra.Matrix.Hermitian import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.Topology.UniformSpace.Matrix #align_import analysis.normed_space.matrix_exponential from "l...
Mathlib/Analysis/NormedSpace/MatrixExponential.lean
89
91
theorem exp_blockDiagonal' (v : ∀ i, Matrix (n' i) (n' i) 𝔸) : exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v) := by
simp_rw [exp_eq_tsum, ← blockDiagonal'_pow, ← blockDiagonal'_smul, ← blockDiagonal'_tsum]
[ " exp 𝕂 (diagonal v) = diagonal (exp 𝕂 v)", " exp 𝕂 (blockDiagonal v) = blockDiagonal (exp 𝕂 v)", " exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v)" ]
[ " exp 𝕂 (diagonal v) = diagonal (exp 𝕂 v)", " exp 𝕂 (blockDiagonal v) = blockDiagonal (exp 𝕂 v)", " exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v)" ]
import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.Finset.Antidiagonal import Mathlib.Data.Finset.Card import Mathlib.Data.Multiset.NatAntidiagonal #align_import data.finset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function namespace Finset name...
Mathlib/Data/Finset/NatAntidiagonal.lean
78
86
theorem antidiagonal_succ' (n : ℕ) : antidiagonal (n + 1) = cons (n + 1, 0) ((antidiagonal n).map (Embedding.prodMap (Embedding.refl _) ⟨Nat.succ, Nat.succ_injective⟩)) (by simp) := by
apply eq_of_veq rw [cons_val, map_val] exact Multiset.Nat.antidiagonal_succ'
[ " xy ∈ (fun n => { val := Multiset.Nat.antidiagonal n, nodup := ⋯ }) n ↔ xy.1 + xy.2 = n", " antidiagonal n = map { toFun := fun i => (n - i, i), inj' := ⋯ } (range (n + 1))", " map ({ toFun := fun i => (i, n - i), inj' := ⋯ }.trans { toFun := Prod.swap, inj' := ⋯ }) (range (n + 1)) =\n map { toFun := fun i ...
[ " xy ∈ (fun n => { val := Multiset.Nat.antidiagonal n, nodup := ⋯ }) n ↔ xy.1 + xy.2 = n", " antidiagonal n = map { toFun := fun i => (n - i, i), inj' := ⋯ } (range (n + 1))", " map ({ toFun := fun i => (i, n - i), inj' := ⋯ }.trans { toFun := Prod.swap, inj' := ⋯ }) (range (n + 1)) =\n map { toFun := fun i ...
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
92
92
theorem revAt_zero (N : ℕ) : revAt N 0 = N := by
simp
[ " 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.Ring.Basic import Mathlib.Computability.Primrec import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383" open Nat def ack : ℕ → ℕ → ℕ | 0, n => n + 1 | m + 1, 0 ...
Mathlib/Computability/Ackermann.lean
97
105
theorem ack_three (n : ℕ) : ack 3 n = 2 ^ (n + 3) - 3 := by
induction' n with n IH · rfl · rw [ack_succ_succ, IH, ack_two, Nat.succ_add, Nat.pow_succ 2 (n + 3), mul_comm _ 2, Nat.mul_sub_left_distrib, ← Nat.sub_add_comm, two_mul 3, Nat.add_sub_add_right] have H : 2 * 3 ≤ 2 * 2 ^ 3 := by norm_num apply H.trans rw [_root_.mul_le_mul_left two_pos] ex...
[ " ack 0 n = n + 1", " ack (m + 1) 0 = ack m 1", " ack (m + 1) (n + 1) = ack m (ack (m + 1) n)", " ack 1 n = n + 2", " ack 1 0 = 0 + 2", " ack 1 (n + 1) = n + 1 + 2", " ack 2 n = 2 * n + 3", " ack 2 0 = 2 * 0 + 3", " ack 2 (n + 1) = 2 * (n + 1) + 3", " ack 3 n = 2 ^ (n + 3) - 3", " ack 3 0 = 2 ^ ...
[ " ack 0 n = n + 1", " ack (m + 1) 0 = ack m 1", " ack (m + 1) (n + 1) = ack m (ack (m + 1) n)", " ack 1 n = n + 2", " ack 1 0 = 0 + 2", " ack 1 (n + 1) = n + 1 + 2", " ack 2 n = 2 * n + 3", " ack 2 0 = 2 * 0 + 3", " ack 2 (n + 1) = 2 * (n + 1) + 3", " ack 3 n = 2 ^ (n + 3) - 3" ]
import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Tactic.LinearCombination #align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946" namespace Polynomial.Chebyshev set_option linter.uppercaseLean3 false -- `T` `U` `X` open Polynomial v...
Mathlib/RingTheory/Polynomial/Chebyshev.lean
153
154
theorem U_add_one (n : ℤ) : U R (n + 1) = 2 * X * U R n - U R (n - 1) := by
linear_combination (norm := ring_nf) U_add_two R (n - 1)
[ " motive (Int.negSucc n)", " T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))", " T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0", " T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))...
[ " motive (Int.negSucc n)", " T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))", " T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0", " T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))...
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Data.Set.Pointwise.SMul import Mathlib.Order.UpperLower.Basic #align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c" open Function Set open Pointw...
Mathlib/Algebra/Order/UpperLower.lean
97
99
theorem IsUpperSet.div_left (ht : IsUpperSet t) : IsLowerSet (s / t) := by
rw [div_eq_mul_inv] exact ht.inv.mul_left
[ " (a • s).OrdConnected", " (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected", " IsUpperSet (s * t)", " IsUpperSet (⋃ a ∈ s, a • t)", " IsUpperSet (t * s)", " IsLowerSet (s / t)", " IsLowerSet (s * t⁻¹)" ]
[ " (a • s).OrdConnected", " (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected", " IsUpperSet (s * t)", " IsUpperSet (⋃ a ∈ s, a • t)", " IsUpperSet (t * s)", " IsLowerSet (s / t)" ]
import Mathlib.RingTheory.FiniteType #align_import ring_theory.rees_algebra from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u v variable {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (I : Ideal R) open Polynomial open Polynomial def reesAlgebra : Subalgebra...
Mathlib/RingTheory/ReesAlgebra.lean
98
108
theorem adjoin_monomial_eq_reesAlgebra : Algebra.adjoin R (Submodule.map (monomial 1 : R →ₗ[R] R[X]) I : Set R[X]) = reesAlgebra I := by
apply le_antisymm · apply Algebra.adjoin_le _ rintro _ ⟨r, hr, rfl⟩ exact reesAlgebra.monomial_mem.mpr (by rwa [pow_one]) · intro p hp rw [p.as_sum_support] apply Subalgebra.sum_mem _ _ rintro i - exact monomial_mem_adjoin_monomial (hp i)
[ " (a✝ * b✝).coeff i ∈ I ^ i", " ∑ x ∈ Finset.antidiagonal i, a✝.coeff x.1 * b✝.coeff x.2 ∈ I ^ i", " ∀ c ∈ Finset.antidiagonal i, a✝.coeff c.1 * b✝.coeff c.2 ∈ I ^ i", " a✝.coeff (j, k).1 * b✝.coeff (j, k).2 ∈ I ^ i", " a✝.coeff (j, k).1 * b✝.coeff (j, k).2 ∈ I ^ (j, k).1 * I ^ (j, k).2", " coeff 1 i ∈ I ...
[ " (a✝ * b✝).coeff i ∈ I ^ i", " ∑ x ∈ Finset.antidiagonal i, a✝.coeff x.1 * b✝.coeff x.2 ∈ I ^ i", " ∀ c ∈ Finset.antidiagonal i, a✝.coeff c.1 * b✝.coeff c.2 ∈ I ^ i", " a✝.coeff (j, k).1 * b✝.coeff (j, k).2 ∈ I ^ i", " a✝.coeff (j, k).1 * b✝.coeff (j, k).2 ∈ I ^ (j, k).1 * I ^ (j, k).2", " coeff 1 i ∈ I ...
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.PolarCoord import Mathlib.Analysis.Convex.Complex #align_import analysis.special_functions.gaussian from "leanprover-community/mathlib"@"7982767093ae38cba236487f9c9dd9cd99f63c16" noncomputable section open Real Set Measu...
Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
57
60
theorem rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg {b : ℝ} (hb : 0 < b) (s : ℝ) : (fun x : ℝ => x ^ s * exp (-b * x ^ 2)) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
simp_rw [← rpow_two] exact rpow_mul_exp_neg_mul_rpow_isLittleO_exp_neg s one_lt_two hb
[ " (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - -b * x ^ p) atTop atTop", " (fun x => x * (b * x ^ (p - 1) + -1)) =ᶠ[atTop] fun x => -x - -b * x ^ p", " x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p", " x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p", " b * x ^ p + -x =...
[ " (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - -b * x ^ p) atTop atTop", " (fun x => x * (b * x ^ (p - 1) + -1)) =ᶠ[atTop] fun x => -x - -b * x ^ p", " x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p", " x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p", " b * x ^ p + -x =...
import Mathlib.Logic.Function.Basic import Mathlib.Tactic.MkIffOfInductiveProp #align_import data.sum.basic from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" universe u v w x variable {α : Type u} {α' : Type w} {β : Type v} {β' : Type x} {γ δ : Type*} namespace Sum #align sum.foral...
Mathlib/Data/Sum/Basic.lean
57
58
theorem eq_right_iff_getRight_eq {b : β} : x = inr b ↔ ∃ h, x.getRight h = b := by
cases x <;> simp
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = inl a ↔ ∃ h, x.getLeft h = a", " inl val✝ ...
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = inl a ↔ ∃ h, x.getLeft h = a", " inl val✝ ...
import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.ideal.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable {R : Type*} [CommRing R] namespace Ideal open Submodule variable (R) in def isPrincipalSubmonoid : Submonoid (Ideal R) where carrier := ...
Mathlib/RingTheory/Ideal/IsPrincipal.lean
81
84
theorem associatesEquivIsPrincipal_map_one : (associatesEquivIsPrincipal R 1 : Ideal R) = 1 := by
rw [Associates.one_eq_mk_one, ← Associates.quotient_mk_eq_mk, associatesEquivIsPrincipal_apply, span_singleton_one, one_eq_top]
[ " ∀ {a b : Ideal R}, a ∈ {I | IsPrincipal I} → b ∈ {I | IsPrincipal I} → a * b ∈ {I | IsPrincipal I}", " Submodule.span R {x} * Submodule.span R {y} ∈ {I | IsPrincipal I}", " (fun x => ⟨span {x}, ⋯⟩) x✝² = (fun x => ⟨span {x}, ⋯⟩) x✝¹", " (fun I => Associates.mk (IsPrincipal.generator ↑I)) (Quotient.lift (fun...
[ " ∀ {a b : Ideal R}, a ∈ {I | IsPrincipal I} → b ∈ {I | IsPrincipal I} → a * b ∈ {I | IsPrincipal I}", " Submodule.span R {x} * Submodule.span R {y} ∈ {I | IsPrincipal I}", " (fun x => ⟨span {x}, ⋯⟩) x✝² = (fun x => ⟨span {x}, ⋯⟩) x✝¹", " (fun I => Associates.mk (IsPrincipal.generator ↑I)) (Quotient.lift (fun...
import Mathlib.Data.Int.AbsoluteValue import Mathlib.LinearAlgebra.Matrix.Determinant.Basic #align_import linear_algebra.matrix.absolute_value from "leanprover-community/mathlib"@"ab0a2959c83b06280ef576bc830d4aa5fe8c8e61" open Matrix namespace Matrix open Equiv Finset variable {R S : Type*} [CommRing R] [Nontr...
Mathlib/LinearAlgebra/Matrix/AbsoluteValue.lean
64
73
theorem det_sum_smul_le {ι : Type*} (s : Finset ι) {c : ι → R} {A : ι → Matrix n n R} {abv : AbsoluteValue R S} {x : S} (hx : ∀ k i j, abv (A k i j) ≤ x) {y : S} (hy : ∀ k, abv (c k) ≤ y) : abv (det (∑ k ∈ s, c k • A k)) ≤ Nat.factorial (Fintype.card n) • (Finset.card s • y * x) ^ Fintype.card n := by
simpa only [smul_mul_assoc] using det_sum_le s fun k i j => calc abv (c k * A k i j) = abv (c k) * abv (A k i j) := abv.map_mul _ _ _ ≤ y * x := mul_le_mul (hy k) (hx k i j) (abv.nonneg _) ((abv.nonneg _).trans (hy k))
[ " abv (Perm.sign σ • ∏ i : n, A (σ i) i) = ∏ i : n, abv (A (σ i) i)", " ∏ _i : n, x = x ^ Fintype.card n", " ∑ _σ : Perm n, x ^ Fintype.card n = (Fintype.card n).factorial • x ^ Fintype.card n", " abv ((∑ k ∈ s, A k) i j) = abv (∑ k ∈ s, A k i j)", " abv (∑ k ∈ s, c k • A k).det ≤ (Fintype.card n).factorial...
[ " abv (Perm.sign σ • ∏ i : n, A (σ i) i) = ∏ i : n, abv (A (σ i) i)", " ∏ _i : n, x = x ^ Fintype.card n", " ∑ _σ : Perm n, x ^ Fintype.card n = (Fintype.card n).factorial • x ^ Fintype.card n", " abv ((∑ k ∈ s, A k) i j) = abv (∑ k ∈ s, A k i j)", " abv (∑ k ∈ s, c k • A k).det ≤ (Fintype.card n).factorial...
import Mathlib.Algebra.CharZero.Defs import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Defs import Mathlib.Order.WithBot #align_import algebra.order.monoid.with_top ...
Mathlib/Algebra/Order/Monoid/WithTop.lean
161
161
theorem coe_add_eq_top_iff {y : WithTop α} : ↑x + y = ⊤ ↔ y = ⊤ := by
simp
[ " a + ⊤ = ⊤", " ⊤ + ⊤ = ⊤", " ↑a✝ + ⊤ = ⊤", " a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤", " ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤", " x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤", " ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤", " a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤", " ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c", " ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b...
[ " a + ⊤ = ⊤", " ⊤ + ⊤ = ⊤", " ↑a✝ + ⊤ = ⊤", " a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤", " ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤", " x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤", " ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤", " a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤", " ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c", " ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b...
import Mathlib.Analysis.Normed.Order.Basic import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.asymptotics.specific_asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Asymptotics open Topology sectio...
Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean
49
53
theorem pow_div_pow_eventuallyEq_atBot {p q : ℕ} : (fun x : 𝕜 => x ^ p / x ^ q) =ᶠ[atBot] fun x => x ^ ((p : ℤ) - q) := by
apply (eventually_lt_atBot (0 : 𝕜)).mono fun x hx => _ intro x hx simp [zpow_sub₀ hx.ne]
[ " (fun x => x ^ p / x ^ q) =ᶠ[atTop] fun x => x ^ (↑p - ↑q)", " ∀ (x : 𝕜), 0 < x → (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x", " (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x", " (fun x => x ^ p / x ^ q) =ᶠ[atBot] fun x => x ^ (↑p - ↑q)", " ∀ x < 0, (fun x => x ^ p / x ^ q) x = (fun...
[ " (fun x => x ^ p / x ^ q) =ᶠ[atTop] fun x => x ^ (↑p - ↑q)", " ∀ (x : 𝕜), 0 < x → (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x", " (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x", " (fun x => x ^ p / x ^ q) =ᶠ[atBot] fun x => x ^ (↑p - ↑q)" ]
import Mathlib.Data.SetLike.Basic import Mathlib.Data.Finset.Preimage import Mathlib.ModelTheory.Semantics #align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u v w u₁ namespace Set variable {M : Type w} (A : Set M) (L : FirstOrder.Lang...
Mathlib/ModelTheory/Definability.lean
52
57
theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s) (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s := by
obtain ⟨ψ, rfl⟩ := h refine ⟨(φ.addConstants A).onFormula ψ, ?_⟩ ext x simp only [mem_setOf_eq, LHom.realize_onFormula]
[ " A.Definable L' s", " A.Definable L' (setOf ψ.Realize)", " setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize", " x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize" ]
[ " A.Definable L' s" ]
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Localization.Ideal import Mathlib.RingTheory.Noetherian #align_import ring_theory.localization.submodule from "leanprover-community/mathlib"@"1ebb20602a8caef435ce47f6373e1aa40851a177" variable {R : Type*} [CommRing R] (M : Submonoid R) ...
Mathlib/RingTheory/Localization/Submodule.lean
82
84
theorem coeSubmodule_span_singleton (x : R) : coeSubmodule S (Ideal.span {x}) = Submodule.span R {(algebraMap R S) x} := by
rw [coeSubmodule_span, Set.image_singleton]
[ " coeSubmodule S ⊥ = ⊥", " coeSubmodule S ⊤ = 1", " coeSubmodule S (Ideal.span s) = Submodule.span R (⇑(algebraMap R S) '' s)", " Submodule.span R (⇑(Algebra.linearMap R S) '' s) = Submodule.span R (⇑(algebraMap R S) '' s)", " coeSubmodule S (Ideal.span {x}) = Submodule.span R {(algebraMap R S) x}" ]
[ " coeSubmodule S ⊥ = ⊥", " coeSubmodule S ⊤ = 1", " coeSubmodule S (Ideal.span s) = Submodule.span R (⇑(algebraMap R S) '' s)", " Submodule.span R (⇑(Algebra.linearMap R S) '' s) = Submodule.span R (⇑(algebraMap R S) '' s)", " coeSubmodule S (Ideal.span {x}) = Submodule.span R {(algebraMap R S) x}" ]
import Mathlib.LinearAlgebra.Quotient import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213" noncomputable section Ring variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E] variable {F : Type*} [Ad...
Mathlib/LinearAlgebra/Projection.lean
430
433
theorem codRestrict_apply_cod {f : M →ₗ[S] M} (h : IsProj m f) (x : m) : h.codRestrict x = x := by
ext rw [codRestrict_apply] exact h.map_id x x.2
[ " (∃ p, IsProj p f) ↔ f ∘ₗ f = f", " (∃ p, IsProj p f) → f ∘ₗ f = f", " f ∘ₗ f = f", " (f ∘ₗ f) x = f x", " f (f x) = f x", " f ∘ₗ f = f → ∃ p, IsProj p f", " ∃ p, IsProj p f", " IsProj (range f) f", " ∀ (x : M), f x ∈ range f", " f x ∈ range f", " ∀ x ∈ range f, f x = x", " f x = x", " h.co...
[ " (∃ p, IsProj p f) ↔ f ∘ₗ f = f", " (∃ p, IsProj p f) → f ∘ₗ f = f", " f ∘ₗ f = f", " (f ∘ₗ f) x = f x", " f (f x) = f x", " f ∘ₗ f = f → ∃ p, IsProj p f", " ∃ p, IsProj p f", " IsProj (range f) f", " ∀ (x : M), f x ∈ range f", " f x ∈ range f", " ∀ x ∈ range f, f x = x", " f x = x", " h.co...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.UniformLimitsDeriv import Mathlib.Topology.Algebra.InfiniteSum.Module import Mathlib.Analysis.NormedSpace.FunctionSeries #align_import analysis.calculus.series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982...
Mathlib/Analysis/Calculus/SmoothSeries.lean
104
109
theorem summable_of_summable_hasFDerivAt (hu : Summable u) (hf : ∀ n x, HasFDerivAt (f n) (f' n x) x) (hf' : ∀ n x, ‖f' n x‖ ≤ u n) (hf0 : Summable fun n => f n x₀) (x : E) : Summable fun n => f n x := by
let _ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 _ exact summable_of_summable_hasFDerivAt_of_isPreconnected hu isOpen_univ isPreconnected_univ (fun n x _ => hf n x) (fun n x _ => hf' n x) (mem_univ _) hf0 (mem_univ _)
[ " Summable fun n => f n x", " CauchySeq fun s => ∑ b ∈ s, f b x", " HasFDerivAt ((fun t x => ∑ i ∈ t, f i x) t) (∑ i ∈ t, f' i y) y", " Summable fun n => g n y", " ∀ (n : α), ∀ x ∈ t, ‖ContinuousLinearMap.smulRight 1 (g' n x)‖ ≤ u n", " HasFDerivAt (fun y => ∑' (n : α), f n y) (∑' (n : α), f' n x) x", "...
[ " Summable fun n => f n x", " CauchySeq fun s => ∑ b ∈ s, f b x", " HasFDerivAt ((fun t x => ∑ i ∈ t, f i x) t) (∑ i ∈ t, f' i y) y", " Summable fun n => g n y", " ∀ (n : α), ∀ x ∈ t, ‖ContinuousLinearMap.smulRight 1 (g' n x)‖ ≤ u n", " HasFDerivAt (fun y => ∑' (n : α), f n y) (∑' (n : α), f' n x) x", "...
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
33
33
theorem log_re (x : ℂ) : x.log.re = x.abs.log := by
simp [log]
[ " x.log.re = (abs x).log" ]
[ " x.log.re = (abs x).log" ]
import Mathlib.Logic.Equiv.Defs #align_import data.erased from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" universe u def Erased (α : Sort u) : Sort max 1 u := Σ's : α → Prop, ∃ a, (fun b => a = b) = s #align erased Erased namespace Erased @[inline] def mk {α} (a : α) : Erased...
Mathlib/Data/Erased.lean
68
68
theorem out_inj {α} (a b : Erased α) (h : a.out = b.out) : a = b := by
simpa using congr_arg mk h
[ " (mk a).out = a", " Classical.choose h = a", " mk (out ⟨s, h⟩) = ⟨s, h⟩", " ⟨fun b => out ⟨s, h⟩ = b, ⋯⟩ = ⟨s, h⟩", " (fun b => out ⟨s, h⟩ = b) = s", " a = b" ]
[ " (mk a).out = a", " Classical.choose h = a", " mk (out ⟨s, h⟩) = ⟨s, h⟩", " ⟨fun b => out ⟨s, h⟩ = b, ⋯⟩ = ⟨s, h⟩", " (fun b => out ⟨s, h⟩ = b) = s", " a = b" ]
import Mathlib.Data.List.Basic namespace List variable {α β : Type*} @[simp] theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some...
Mathlib/Data/List/ReduceOption.lean
35
41
theorem reduceOption_map {l : List (Option α)} {f : α → β} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl · simp only [reduceOption_nil, map_nil] · cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption" ]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
113
114
theorem convexHull_diam (s : Set E) : Metric.diam (convexHull ℝ s) = Metric.diam s := by
simp only [Metric.diam, convexHull_ediam]
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.convex.body from "leanprover-community/mathlib"@"858a10cf68fd6c06872950fc58c4dcc68d465591" open scoped Pointwise Topology NNReal variable {V : Type*} struc...
Mathlib/Analysis/Convex/Body.lean
93
97
theorem zero_mem_of_symmetric (K : ConvexBody V) (h_symm : ∀ x ∈ K, - x ∈ K) : 0 ∈ K := by
obtain ⟨x, hx⟩ := K.nonempty rw [show 0 = (1/2 : ℝ) • x + (1/2 : ℝ) • (- x) by field_simp] apply convex_iff_forall_pos.mp K.convex hx (h_symm x hx) all_goals linarith
[ " K = L", " { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ } = L", " { carrier := carrier✝¹, convex' := convex'✝¹, isCompact' := isCompact'✝¹, nonempty' := nonempty'✝¹ } =\n { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := non...
[ " K = L", " { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ } = L", " { carrier := carrier✝¹, convex' := convex'✝¹, isCompact' := isCompact'✝¹, nonempty' := nonempty'✝¹ } =\n { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := non...
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal va...
Mathlib/MeasureTheory/Decomposition/Jordan.lean
158
160
theorem real_smul_posPart_neg (r : ℝ) (hr : r < 0) : (r • j).posPart = (-r).toNNReal • j.negPart := by
rw [real_smul_def, ← smul_negPart, if_neg (not_le.2 hr), neg_posPart]
[ " ↑r • j = r • j", " (r • j).posPart = r.toNNReal • j.posPart", " (r • j).negPart = r.toNNReal • j.negPart", " (r • j).posPart = (-r).toNNReal • j.negPart" ]
[ " ↑r • j = r • j", " (r • j).posPart = r.toNNReal • j.posPart", " (r • j).negPart = r.toNNReal • j.negPart", " (r • j).posPart = (-r).toNNReal • j.negPart" ]
import Mathlib.Probability.Martingale.Upcrossing import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.MeasureTheory.Constructions.Polish #align_import probability.martingale.convergence from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Filter Me...
Mathlib/Probability/Martingale/Convergence.lean
156
183
theorem Submartingale.upcrossings_ae_lt_top' [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ) (hbdd : ∀ n, snorm (f n) 1 μ ≤ R) (hab : a < b) : ∀ᵐ ω ∂μ, upcrossings a b f ω < ∞ := by
refine ae_lt_top (hf.adapted.measurable_upcrossings hab) ?_ have := hf.mul_lintegral_upcrossings_le_lintegral_pos_part a b rw [mul_comm, ← ENNReal.le_div_iff_mul_le] at this · refine (lt_of_le_of_lt this (ENNReal.div_lt_top ?_ ?_)).ne · have hR' : ∀ n, ∫⁻ ω, ‖f n ω - a‖₊ ∂μ ≤ R + ‖a‖₊ * μ Set.univ := by ...
[ " ¬((∃ᶠ (n : ℕ) in atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in atTop, b < f n ω)", " ∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k", " False", " ¬∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k", " ∀ (k : ℕ), ∃ N, k ≤ upcrossingsBefore a b f N ω", " ∃ N, k ≤ upcrossingsBefore a b f N ω", " ∃ N, 0 ≤ upcrossingsB...
[ " ¬((∃ᶠ (n : ℕ) in atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in atTop, b < f n ω)", " ∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k", " False", " ¬∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k", " ∀ (k : ℕ), ∃ N, k ≤ upcrossingsBefore a b f N ω", " ∃ N, k ≤ upcrossingsBefore a b f N ω", " ∃ N, 0 ≤ upcrossingsB...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
82
84
theorem continuous_cosh : Continuous cosh := by
change Continuous fun z => (exp z + exp (-z)) / 2 continuity
[ " Continuous sin", " Continuous fun z => (cexp (-z * I) - cexp (z * I)) * I / 2", " Continuous cos", " Continuous fun z => (cexp (z * I) + cexp (-z * I)) / 2", " Continuous sinh", " Continuous fun z => (cexp z - cexp (-z)) / 2", " Continuous cosh", " Continuous fun z => (cexp z + cexp (-z)) / 2" ]
[ " Continuous sin", " Continuous fun z => (cexp (-z * I) - cexp (z * I)) * I / 2", " Continuous cos", " Continuous fun z => (cexp (z * I) + cexp (-z * I)) / 2", " Continuous sinh", " Continuous fun z => (cexp z - cexp (-z)) / 2", " Continuous cosh" ]
import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Algebra.Polynomial.Splits import Mathlib.RingTheory.RootsOfUnity.Complex import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.RingTheory.RootsOfUnity.Basic import Mathlib.FieldTh...
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
118
120
theorem degree_cyclotomic' {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) : (cyclotomic' n R).degree = Nat.totient n := by
simp only [degree_eq_natDegree (cyclotomic'_ne_zero n R), natDegree_cyclotomic' h]
[ " cyclotomic' 0 R = 1", " cyclotomic' 1 R = X - 1", " cyclotomic' 2 R = X + 1", " ∏ μ ∈ primitiveRoots 2 R, (X - C μ) = X + 1", " primitiveRoots 2 R = {-1}", " IsPrimitiveRoot (-1) 2 ∧ ∀ (x : R), IsPrimitiveRoot x 2 → x = -1", " (cyclotomic' n R).natDegree = n.totient", " (∏ μ ∈ primitiveRoots n R, (X...
[ " cyclotomic' 0 R = 1", " cyclotomic' 1 R = X - 1", " cyclotomic' 2 R = X + 1", " ∏ μ ∈ primitiveRoots 2 R, (X - C μ) = X + 1", " primitiveRoots 2 R = {-1}", " IsPrimitiveRoot (-1) 2 ∧ ∀ (x : R), IsPrimitiveRoot x 2 → x = -1", " (cyclotomic' n R).natDegree = n.totient", " (∏ μ ∈ primitiveRoots n R, (X...
import Mathlib.Data.Finsupp.Lex import Mathlib.Data.Finsupp.Multiset import Mathlib.Order.GameAdd #align_import logic.hydra from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace Relation open Multiset Prod variable {α : Type*} def CutExpand (r : α → α → Prop) (s' s : Multise...
Mathlib/Logic/Hydra.lean
101
104
theorem not_cutExpand_zero [IsIrrefl α r] (s) : ¬CutExpand r s 0 := by
classical rw [cutExpand_iff] rintro ⟨_, _, _, ⟨⟩, _⟩
[ " CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp", " InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t", " (toFinsupp s) b = (toFinsupp t) b", " (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)", " count b...
[ " CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp", " InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t", " (toFinsupp s) b = (toFinsupp t) b", " (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)", " count b...
import Mathlib.RingTheory.FractionalIdeal.Basic import Mathlib.RingTheory.Ideal.Norm namespace FractionalIdeal open scoped Pointwise nonZeroDivisors variable {R : Type*} [CommRing R] [IsDedekindDomain R] [Module.Free ℤ R] [Module.Finite ℤ R] variable {K : Type*} [CommRing K] [Algebra R K] [IsFractionRing R K] th...
Mathlib/RingTheory/FractionalIdeal/Norm.lean
88
88
theorem absNorm_one : absNorm (1 : FractionalIdeal R⁰ K) = 1 := by
convert absNorm.map_one'
[ " ↑(Ideal.absNorm I.num) / ↑|(Algebra.norm ℤ) ↑I.den| = ↑(Ideal.absNorm I₀) / ↑|(Algebra.norm ℤ) ↑a|", " ↑(Ideal.absNorm I.num) * ↑|(Algebra.norm ℤ) ↑a| = ↑(Ideal.absNorm I₀) * ↑|(Algebra.norm ℤ) ↑I.den|", " ↑(Ideal.absNorm I.num * Ideal.absNorm (Ideal.span {↑a})) = ↑(Ideal.absNorm I₀ * Ideal.absNorm (Ideal.spa...
[ " ↑(Ideal.absNorm I.num) / ↑|(Algebra.norm ℤ) ↑I.den| = ↑(Ideal.absNorm I₀) / ↑|(Algebra.norm ℤ) ↑a|", " ↑(Ideal.absNorm I.num) * ↑|(Algebra.norm ℤ) ↑a| = ↑(Ideal.absNorm I₀) * ↑|(Algebra.norm ℤ) ↑I.den|", " ↑(Ideal.absNorm I.num * Ideal.absNorm (Ideal.span {↑a})) = ↑(Ideal.absNorm I₀ * Ideal.absNorm (Ideal.spa...
import Mathlib.Algebra.Order.ToIntervalMod import Mathlib.Algebra.Ring.AddAut import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.Divisible import Mathlib.Topology.Connected.PathConnected import Mathlib.Topology.IsLocalHomeomorph #align_import topology.instances.add_circle from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/AddCircle.lean
175
176
theorem coe_add_period (x : 𝕜) : ((x + p : 𝕜) : AddCircle p) = x := by
rw [coe_add, ← eq_sub_iff_add_eq', sub_self, coe_period]
[ " ↑x = 0 ↔ ∃ n, n • p = x", " (∃ n, n • p = x) ↔ ∃ n, n • p = x", " (∃ n, n • p = x) → ∃ n, n • p = x", " ∃ n_1, n_1 • p = n • p", " 0 < n", " n • p ≤ 0", " n.toNat • p = n • p", " ↑n • p = n • p", " ↑(x + p) = ↑x" ]
[ " ↑x = 0 ↔ ∃ n, n • p = x", " (∃ n, n • p = x) ↔ ∃ n, n • p = x", " (∃ n, n • p = x) → ∃ n, n • p = x", " ∃ n_1, n_1 • p = n • p", " 0 < n", " n • p ≤ 0", " n.toNat • p = n • p", " ↑n • p = n • p", " ↑(x + p) = ↑x" ]
import Mathlib.Algebra.Group.Prod import Mathlib.Data.Set.Lattice #align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" assert_not_exists MonoidWithZero open Prod Decidable Function namespace Nat -- Porting note: no pp_nodot --@[pp_nodot] def pair (a b : ...
Mathlib/Data/Nat/Pairing.lean
114
114
theorem left_le_pair (a b : ℕ) : a ≤ pair a b := by
simpa using unpair_left_le (pair a b)
[ " n.unpair.1.pair n.unpair.2 = n", " (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n", " ...
[ " n.unpair.1.pair n.unpair.2 = n", " (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n", " ...
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.MeasureTheory.Function.ConditionalExpectation.Unique import Mathlib.MeasureTheory.Function.L2Space #align_import measure_theory.function.conditional_expectation.condexp_L2 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e"...
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
106
110
theorem snorm_condexpL2_le (hm : m ≤ m0) (f : α →₂[μ] E) : snorm (F := E) (condexpL2 E 𝕜 hm f) 2 μ ≤ snorm f 2 μ := by
rw [lpMeas_coe, ← ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _), ← Lp.norm_def, ← Lp.norm_def, Submodule.norm_coe] exact norm_condexpL2_le hm f
[ " snorm (↑↑↑((condexpL2 E 𝕜 hm) f)) 2 μ ≤ snorm (↑↑f) 2 μ", " ‖(condexpL2 E 𝕜 hm) f‖ ≤ ‖f‖" ]
[ " snorm (↑↑↑((condexpL2 E 𝕜 hm) f)) 2 μ ≤ snorm (↑↑f) 2 μ" ]
import Batteries.Classes.Order import Batteries.Control.ForInStep.Basic namespace Batteries namespace BinomialHeap namespace Imp inductive HeapNode (α : Type u) where | nil : HeapNode α | node (a : α) (child sibling : HeapNode α) : HeapNode α deriving Repr @[simp] def HeapNode.realSize : HeapNode α → ...
.lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean
205
221
theorem Heap.realSize_merge (le) (s₁ s₂ : Heap α) : (s₁.merge le s₂).realSize = s₁.realSize + s₂.realSize := by
unfold merge; split · simp · simp · next r₁ a₁ n₁ t₁ r₂ a₂ n₂ t₂ => have IH₁ r a n := realSize_merge le t₁ (cons r a n t₂) have IH₂ r a n := realSize_merge le (cons r a n t₁) t₂ have IH₃ := realSize_merge le t₁ t₂ split; · simp [IH₁, Nat.add_assoc] split; · simp [IH₂, Nat.add_assoc, Nat.add...
[ " Batteries.BinomialHeap.Imp.HeapNode.rankTR.go (node a✝ child✝ sibling✝) x✝ = (node a✝ child✝ sibling✝).rank + x✝", " @Batteries.BinomialHeap.Imp.HeapNode.rankTR = @rank", " Batteries.BinomialHeap.Imp.HeapNode.rankTR s = s.rank", " (merge le s₁ s₂).realSize = s₁.realSize + s₂.realSize", " (match s₁, s₂ wit...
[ " Batteries.BinomialHeap.Imp.HeapNode.rankTR.go (node a✝ child✝ sibling✝) x✝ = (node a✝ child✝ sibling✝).rank + x✝", " @Batteries.BinomialHeap.Imp.HeapNode.rankTR = @rank", " Batteries.BinomialHeap.Imp.HeapNode.rankTR s = s.rank", " (merge le s₁ s₂).realSize = s₁.realSize + s₂.realSize" ]
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : ℕ) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
79
80
theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc ↑a ↑b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b" ]
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b" ]
import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Order.Filter.IndicatorFunction open MeasureTheory section DominatedConvergenceTheorem open Set Filter TopologicalSpace ENNReal open scoped Topology namespace MeasureTheory variable {α E G: Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [C...
Mathlib/MeasureTheory/Integral/DominatedConvergence.lean
79
104
theorem hasSum_integral_of_dominated_convergence {ι} [Countable ι] {F : ι → α → G} {f : α → G} (bound : ι → α → ℝ) (hF_meas : ∀ n, AEStronglyMeasurable (F n) μ) (h_bound : ∀ n, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound n a) (bound_summable : ∀ᵐ a ∂μ, Summable fun n => bound n a) (bound_integrable : Integrable (fun a => ...
have hb_nonneg : ∀ᵐ a ∂μ, ∀ n, 0 ≤ bound n a := eventually_countable_forall.2 fun n => (h_bound n).mono fun a => (norm_nonneg _).trans have hb_le_tsum : ∀ n, bound n ≤ᵐ[μ] fun a => ∑' n, bound n a := by intro n filter_upwards [hb_nonneg, bound_summable] with _ ha0 ha_sum using le_tsum ha_sum _ fu...
[ " Tendsto (fun n => ∫ (a : α), F n a ∂μ) atTop (𝓝 (∫ (a : α), f a ∂μ))", " Tendsto\n (fun n =>\n if h : True then\n if hf : Integrable (fun a => F n a) μ then L1.integralCLM (Integrable.toL1 (fun a => F n a) hf) else 0\n else 0)\n atTop\n (𝓝\n (if h : True then\n if hf : In...
[ " Tendsto (fun n => ∫ (a : α), F n a ∂μ) atTop (𝓝 (∫ (a : α), f a ∂μ))", " Tendsto\n (fun n =>\n if h : True then\n if hf : Integrable (fun a => F n a) μ then L1.integralCLM (Integrable.toL1 (fun a => F n a) hf) else 0\n else 0)\n atTop\n (𝓝\n (if h : True then\n if hf : In...
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProd...
Mathlib/RingTheory/Unramified/Basic.lean
121
128
theorem of_equiv [FormallyUnramified R A] (e : A ≃ₐ[R] B) : FormallyUnramified R B := by
constructor intro C _ _ I hI f₁ f₂ e' rw [← f₁.comp_id, ← f₂.comp_id, ← e.comp_symm, ← AlgHom.comp_assoc, ← AlgHom.comp_assoc] congr 1 refine FormallyUnramified.comp_injective I hI ?_ rw [← AlgHom.comp_assoc, e', AlgHom.comp_assoc]
[ " g₁ = g₂", " ∀ (g₁ g₂ : A →ₐ[R] B), (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂ → g₁ = g₂", " Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ [_RB : Algebra R B], Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2...
[ " g₁ = g₂", " ∀ (g₁ g₂ : A →ₐ[R] B), (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂ → g₁ = g₂", " Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ [_RB : Algebra R B], Function.Injective (Ideal.Quotient.mkₐ R I).comp", " ∀ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2...
import Mathlib.Algebra.Order.AbsoluteValue import Mathlib.Algebra.Ring.Prod import Mathlib.Algebra.Ring.Subring.Basic import Mathlib.Topology.Algebra.Group.Basic #align_import topology.algebra.ring.basic from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Set Filter TopologicalSpac...
Mathlib/Topology/Algebra/Ring/Basic.lean
63
66
theorem TopologicalSemiring.continuousNeg_of_mul [TopologicalSpace α] [NonAssocRing α] [ContinuousMul α] : ContinuousNeg α where continuous_neg := by
simpa using (continuous_const.mul continuous_id : Continuous fun x : α => -1 * x)
[ " Continuous fun a => -a" ]
[ " Continuous fun a => -a" ]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toReal_add (ha : a ≠ ∞) (hb : b ≠ ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
65
68
theorem ofReal_add {p q : ℝ} (hp : 0 ≤ p) (hq : 0 ≤ q) : ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q := by
rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_inj, Real.toNNReal_add hp hq]
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RCLike open scoped ComplexConjugate variable {𝕜 E F G : Type...
Mathlib/Analysis/InnerProductSpace/Adjoint.lean
92
95
theorem adjointAux_adjointAux (A : E →L[𝕜] F) : adjointAux (adjointAux A) = A := by
ext v refine ext_inner_left 𝕜 fun w => ?_ rw [adjointAux_inner_right, adjointAux_inner_left]
[ " ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜", " ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜", " adjointAux (adjointAux A) = A", " (adjointAux (adjointAux A)) v = A v", " ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜" ]
[ " ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜", " ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜", " adjointAux (adjointAux A) = A" ]
import Mathlib.Algebra.Module.Torsion import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" ...
Mathlib/LinearAlgebra/Dimension/Finite.lean
82
84
theorem rank_pos_iff_exists_ne_zero : 0 < Module.rank R M ↔ ∃ x : M, x ≠ 0 := by
rw [← not_iff_not] simpa using rank_zero_iff_forall_zero
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n", " Module.rank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " Module.rank R M = 0 → ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " (∃ x, ∀ (a : R), a ≠ 0 → a • x ≠...
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n", " Module.rank R M = 0 ↔ ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " Module.rank R M = 0 → ∀ (x : M), ∃ a, a ≠ 0 ∧ a • x = 0", " (∃ x, ∀ (a : R), a ≠ 0 → a • x ≠...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9" namespace Set variable {M : Type*} ...
Mathlib/Algebra/Order/Interval/Set/Monoid.lean
113
114
theorem image_const_add_Ici : (fun x => a + x) '' Ici b = Ici (a + b) := by
simp only [add_comm a, image_add_const_Ici]
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul #align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" noncomputable section open Finset open Polynomial namespace Polynomial universe u v y variable {R : Type u} {S : Typ...
Mathlib/Algebra/Polynomial/Monic.lean
58
62
theorem ne_zero_of_ne_zero_of_monic (hp : p ≠ 0) (hq : Monic q) : q ≠ 0 := by
rintro rfl rw [Monic.def, leadingCoeff_zero] at hq rw [← mul_one p, ← C_1, ← hq, C_0, mul_zero] at hp exact hp rfl
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i", "R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p", " C (p.coeff p.natD...
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i", "R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p", " C (p.coeff p.natD...
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Fin import Mathlib.GroupTheory.GroupAction.Pi import Mathlib.Logic.Equiv.Fin #align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013" open Fins...
Mathlib/Algebra/BigOperators/Fin.lean
90
92
theorem prod_univ_castSucc [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) : ∏ i, f i = (∏ i : Fin n, f (Fin.castSucc i)) * f (last n) := by
simpa [mul_comm] using prod_univ_succAbove f (last n)
[ " (List.ofFn f).prod = ∏ i : Fin n, f i", " ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod", " ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)", " f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)", " ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)...
[ " (List.ofFn f).prod = ∏ i : Fin n, f i", " ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod", " ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)", " f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)", " ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)...
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
82
83
theorem vars_monomial (h : r ≠ 0) : (monomial s r).vars = s.support := by
classical rw [vars_def, degrees_monomial_eq _ _ h, Finsupp.toFinset_toMultiset]
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support" ]
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support" ]
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 fa...
Mathlib/Computability/NFA.lean
126
132
theorem pumping_lemma [Fintype σ] {x : List α} (hx : x ∈ M.accepts) (hlen : Fintype.card (Set σ) ≤ List.length x) : ∃ a b c, x = a ++ b ++ c ∧ a.length + b.length ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ M.accepts := by
rw [← toDFA_correct] at hx ⊢ exact M.toDFA.pumping_lemma hx hlen
[ " s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a", " M.stepSet ∅ a = ∅", " M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a", " x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x", " M.toDFA.accepts = M.accepts", " x ∈ M.toDFA.accepts ↔ x ∈ M.accepts", " M.toDFA.evalFrom M.toDFA.start x ∈ M.toD...
[ " s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a", " M.stepSet ∅ a = ∅", " M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a", " x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x", " M.toDFA.accepts = M.accepts", " x ∈ M.toDFA.accepts ↔ x ∈ M.accepts", " M.toDFA.evalFrom M.toDFA.start x ∈ M.toD...
import Mathlib.Data.Countable.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Order.Disjointed import Mathlib.MeasureTheory.OuterMeasure.Defs #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set F...
Mathlib/MeasureTheory/OuterMeasure/Basic.lean
110
112
theorem measure_sUnion_null_iff {S : Set (Set α)} (hS : S.Countable) : μ (⋃₀ S) = 0 ↔ ∀ s ∈ S, μ s = 0 := by
rw [sUnion_eq_biUnion, measure_biUnion_null_iff hS]
[ " μ (⋃ i, s i) ≤ ∑' (i : ι), μ (s i)", " (fun x x_1 => x ≤ x_1) (μ (⨆ i, t i)) (∑' (i : ℕ), μ (t i))", " μ (⋃ i, t i) = μ (⋃ i, disjointed t i)", " ∑' (i : ℕ), μ (disjointed t i) ≤ ∑' (i : ℕ), μ (t i)", " disjointed t a✝ ⊆ t a✝", " μ (⋃ i ∈ I, s i) ≤ ∑' (i : ↑I), μ (s ↑i)", " μ (⋃ x, s ↑x) ≤ ∑' (i : ↑I)...
[ " μ (⋃ i, s i) ≤ ∑' (i : ι), μ (s i)", " (fun x x_1 => x ≤ x_1) (μ (⨆ i, t i)) (∑' (i : ℕ), μ (t i))", " μ (⋃ i, t i) = μ (⋃ i, disjointed t i)", " ∑' (i : ℕ), μ (disjointed t i) ≤ ∑' (i : ℕ), μ (t i)", " disjointed t a✝ ⊆ t a✝", " μ (⋃ i ∈ I, s i) ≤ ∑' (i : ↑I), μ (s ↑i)", " μ (⋃ x, s ↑x) ≤ ∑' (i : ↑I)...
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero namespace List variable {α : Type*} [DecidableEq α] def nextOr : ∀ (_ : List α) (_ _ : α), α | [], _, default => default | [_], _, d...
Mathlib/Data/List/Cycle.lean
172
177
theorem next_cons_concat (y : α) (hy : x ≠ y) (hx : x ∉ l) (h : x ∈ y :: l ++ [x] := mem_append_right _ (mem_singleton_self x)) : next (y :: l ++ [x]) x h = y := by
rw [next, nextOr_concat] · rfl · simp [hy, hx]
[ " (y :: xs).nextOr x d = xs.nextOr x d", " [y].nextOr x d = [].nextOr x d", " (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d", " xs.nextOr x d = xs.nextOr x d'", " [].nextOr x d = [].nextOr x d'", " (y :: ys).nextOr x d = (y :: ys).nextOr x d'", " [y].nextOr x d = [y].nextOr x d'", " (y :: z :: zs)....
[ " (y :: xs).nextOr x d = xs.nextOr x d", " [y].nextOr x d = [].nextOr x d", " (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d", " xs.nextOr x d = xs.nextOr x d'", " [].nextOr x d = [].nextOr x d'", " (y :: ys).nextOr x d = (y :: ys).nextOr x d'", " [y].nextOr x d = [y].nextOr x d'", " (y :: z :: zs)....
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.LinearAlgebra.PiTensorProduct universe uι u𝕜 uE uF variable {ι : Type uι} [Fintype ι] variable {𝕜 : Type u𝕜} [NontriviallyNormedField 𝕜] variable {E : ι → Type uE} [∀ i, SeminormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] variable {F : ...
Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean
126
132
theorem projectiveSeminorm_tprod_le (m : Π i, E i) : projectiveSeminorm (⨂ₜ[𝕜] i, m i) ≤ ∏ i, ‖m i‖ := by
rw [projectiveSeminorm_apply] convert ciInf_le (bddBelow_projectiveSemiNormAux _) ⟨[((1 : 𝕜), m)] ,?_⟩ · simp only [projectiveSeminormAux, Function.comp_apply, List.map_cons, norm_one, one_mul, List.map_nil, List.sum_cons, List.sum_nil, add_zero] · rw [mem_lifts_iff, List.map_singleton, List.sum_singleton...
[ " 0 ≤ projectiveSeminormAux p", " 0 ≤ (List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p).sum", " ∀ x ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p, 0 ≤ x", " a ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p → 0 ≤ a", " ∀ (x : 𝕜) (x_1 : (i : ι) → E i), (x, x_1) ∈ p → ‖x‖ * ∏ x : ι, ‖x_1 x‖ = a → 0 ≤ a", ...
[ " 0 ≤ projectiveSeminormAux p", " 0 ≤ (List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p).sum", " ∀ x ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p, 0 ≤ x", " a ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p → 0 ≤ a", " ∀ (x : 𝕜) (x_1 : (i : ι) → E i), (x, x_1) ∈ p → ‖x‖ * ∏ x : ι, ‖x_1 x‖ = a → 0 ≤ a", ...
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Group.Instances import Mathlib.LinearAlgebra.AffineSpace.Slope import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.Tactic.FieldSimp #align_import li...
Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
127
130
theorem lineMap_le_lineMap_iff_of_lt (h : r < r') : lineMap a b r ≤ lineMap a b r' ↔ a ≤ b := by
simp only [lineMap_apply_module] rw [← le_sub_iff_add_le, add_sub_assoc, ← sub_le_iff_le_add', ← sub_smul, ← sub_smul, sub_sub_sub_cancel_left, smul_le_smul_iff_of_pos_left (sub_pos.2 h)]
[ " (lineMap a b) r ≤ (lineMap a b) r' ↔ a ≤ b", " (1 - r) • a + r • b ≤ (1 - r') • a + r' • b ↔ a ≤ b" ]
[ " (lineMap a b) r ≤ (lineMap a b) r' ↔ a ≤ b" ]
import Mathlib.Algebra.Group.Hom.Defs #align_import algebra.group.ext from "leanprover-community/mathlib"@"e574b1a4e891376b0ef974b926da39e05da12a06" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open Function universe u @[to_additive (attr := ext)]
Mathlib/Algebra/Group/Ext.lean
38
51
theorem Monoid.ext {M : Type u} ⦃m₁ m₂ : Monoid M⦄ (h_mul : (letI := m₁; HMul.hMul : M → M → M) = (letI := m₂; HMul.hMul : M → M → M)) : m₁ = m₂ := by
have : m₁.toMulOneClass = m₂.toMulOneClass := MulOneClass.ext h_mul have h₁ : m₁.one = m₂.one := congr_arg (·.one) this let f : @MonoidHom M M m₁.toMulOneClass m₂.toMulOneClass := @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y) have : m₁.npow = m₂.npo...
[ " m₁ = m₂", " Monoid.npow = Monoid.npow", " Monoid.npow n x = Monoid.npow n x", " mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝ = m₂", " mk one_mul✝¹ mul_one✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ = mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝" ]
[ " m₁ = m₂" ]
import Mathlib.Data.Set.Subsingleton import Mathlib.Order.WithBot #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" universe u v open Function Set namespace Set variable {α β γ : Type*} {ι ι' : Sort*} theorem powerset_insert (s : Set α) (a : α)...
Mathlib/Data/Set/Image.lean
654
654
theorem forall_mem_range {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) := by
simp
[ " 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s", " t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s ∪ insert a '' 𝒫 s", " t ⊆ insert a s ↔ t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " t ⊆ insert a s → t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " ∃ x ⊆ s, insert a x = t", " t \\ {a} ⊆ s", " t ⊆ insert a s", ...
[ " 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s", " t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s ∪ insert a '' 𝒫 s", " t ⊆ insert a s ↔ t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " t ⊆ insert a s → t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " t ⊆ s ∨ ∃ x ⊆ s, insert a x = t", " ∃ x ⊆ s, insert a x = t", " t \\ {a} ⊆ s", " t ⊆ insert a s", ...
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 S...
Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean
88
92
theorem snorm'_le_snorm'_of_exponent_le {p q : ℝ} (hp0_lt : 0 < p) (hpq : p ≤ q) (μ : Measure α) [IsProbabilityMeasure μ] (hf : AEStronglyMeasurable f μ) : snorm' f p μ ≤ snorm' f q μ := by
have h_le_μ := snorm'_le_snorm'_mul_rpow_measure_univ hp0_lt hpq hf rwa [measure_univ, ENNReal.one_rpow, mul_one] at h_le_μ
[ " snorm' f p μ ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)", " ↑‖f a‖₊ ^ p = (↑‖f a‖₊ * g a) ^ p", " (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)", " (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q) * μ Set.univ ^ (1 / p - 1 / q)", " (...
[ " snorm' f p μ ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)", " ↑‖f a‖₊ ^ p = (↑‖f a‖₊ * g a) ^ p", " (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)", " (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q) * μ Set.univ ^ (1 / p - 1 / q)", " (...
import Mathlib.Data.Matrix.Basis import Mathlib.RingTheory.TensorProduct.Basic #align_import ring_theory.matrix_algebra from "leanprover-community/mathlib"@"6c351a8fb9b06e5a542fdf427bfb9f46724f9453" suppress_compilation universe u v w open TensorProduct open TensorProduct open Algebra.TensorProduct open Matri...
Mathlib/RingTheory/MatrixAlgebra.lean
93
95
theorem invFun_add (M N : Matrix n n A) : invFun R A n (M + N) = invFun R A n M + invFun R A n N := by
simp [invFun, add_tmul, Finset.sum_add_distrib]
[ " ∀ (a₁ a₂ : A) (b₁ b₂ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) =\n (toFunLinear R A n) (a₁ ⊗ₜ[R] b₁) * (toFunLinear R A n) (a₂ ⊗ₜ[R] b₂)", " (toFunLinear R A n) ((a₁✝ * a₂✝) ⊗ₜ[R] (b₁✝ * b₂✝)) =\n (toFunLinear R A n) (a₁✝ ⊗ₜ[R] b₁✝) * (toFunLinear R A n) (a₂✝ ⊗ₜ[R] b₂✝)", "...
[ " ∀ (a₁ a₂ : A) (b₁ b₂ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) =\n (toFunLinear R A n) (a₁ ⊗ₜ[R] b₁) * (toFunLinear R A n) (a₂ ⊗ₜ[R] b₂)", " (toFunLinear R A n) ((a₁✝ * a₂✝) ⊗ₜ[R] (b₁✝ * b₂✝)) =\n (toFunLinear R A n) (a₁✝ ⊗ₜ[R] b₁✝) * (toFunLinear R A n) (a₂✝ ⊗ₜ[R] b₂✝)", "...
import Mathlib.SetTheory.Game.Basic import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834" universe u open SetTheory PGame open scoped NaturalOps PGame namespace Ordinal noncomputable def toPGame : Ordin...
Mathlib/SetTheory/Game/Ordinal.lean
116
118
theorem to_leftMoves_one_toPGame_symm (i) : (@toLeftMovesToPGame 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ := by
simp [eq_iff_true_of_subsingleton]
[ " let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).α", " o.toPGame.RightMoves = PEmpty.{u_1 + 1}", " IsEmpty (toPGame 0).LeftMoves", " IsEmpty (Quotient.out 0).α", " IsEmpty ...
[ " let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).α", " o.toPGame.RightMoves = PEmpty.{u_1 + 1}", " IsEmpty (toPGame 0).LeftMoves", " IsEmpty (Quotient.out 0).α", " IsEmpty ...
import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" noncomputable section open Polynomial open Finsupp Finset namespace Polynomial universe u v w variable {R : Type u} {S : Type v} {ι : Type w} {a b ...
Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
72
73
theorem natDegree_le_iff_coeff_eq_zero : p.natDegree ≤ n ↔ ∀ N : ℕ, n < N → p.coeff N = 0 := by
simp_rw [natDegree_le_iff_degree_le, degree_le_iff_coeff_zero, Nat.cast_lt]
[ " (p.comp q).natDegree ≤ p.natDegree * q.natDegree", " 0 ≤ p.natDegree * q.natDegree", " ↑(C (p.coeff n)).natDegree + n • ↑q.natDegree = ↑(n * q.natDegree)", " ↑n * ↑q.natDegree = ↑(n * q.natDegree)", " False", " p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0" ]
[ " (p.comp q).natDegree ≤ p.natDegree * q.natDegree", " 0 ≤ p.natDegree * q.natDegree", " ↑(C (p.coeff n)).natDegree + n • ↑q.natDegree = ↑(n * q.natDegree)", " ↑n * ↑q.natDegree = ↑(n * q.natDegree)", " False", " p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0" ]
import Mathlib.Algebra.Group.Commutator import Mathlib.Algebra.Group.Subgroup.Finite import Mathlib.Data.Bracket import Mathlib.GroupTheory.Subgroup.Centralizer import Mathlib.Tactic.Group #align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef" variable...
Mathlib/GroupTheory/Commutator.lean
61
62
theorem commutatorElement_inv : ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆ := by
simp_rw [commutatorElement_def, mul_inv_rev, inv_inv, mul_assoc]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁", " ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆" ]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁", " ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆" ]
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {α : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m := @OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory...
Mathlib/MeasureTheory/Measure/Trim.lean
49
50
theorem zero_trim (hm : m ≤ m0) : (0 : Measure α).trim hm = (0 : @Measure α m) := by
simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m]
[ " μ.trim ⋯ = μ", " (μ.trim hm).toOuterMeasure = μ.trim", " Measure.trim 0 hm = 0" ]
[ " μ.trim ⋯ = μ", " (μ.trim hm).toOuterMeasure = μ.trim", " Measure.trim 0 hm = 0" ]
import Mathlib.Algebra.Group.Action.Defs #align_import group_theory.group_action.sum from "leanprover-community/mathlib"@"f1a2caaf51ef593799107fe9a8d5e411599f3996" variable {M N P α β γ : Type*} namespace Sum section SMul variable [SMul M α] [SMul M β] [SMul N α] [SMul N β] (a : M) (b : α) (c : β) (x : Sum α...
Mathlib/GroupTheory/GroupAction/Sum.lean
56
56
theorem smul_swap : (a • x).swap = a • x.swap := by
cases x <;> rfl
[ " (a • x).swap = a • x.swap", " (a • inl val✝).swap = a • (inl val✝).swap", " (a • inr val✝).swap = a • (inr val✝).swap" ]
[ " (a • x).swap = a • x.swap" ]
import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.Data.Finset.PiAntidiagonal import Mathlib.LinearAlgebra.StdBasis import Mathlib.Tactic.Linarith #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Finset (...
Mathlib/RingTheory/MvPowerSeries/Basic.lean
150
153
theorem coeff_monomial_ne {m n : σ →₀ ℕ} (h : m ≠ n) (a : R) : coeff R m (monomial R n a) = 0 := by
classical rw [monomial_def] exact LinearMap.stdBasis_ne R (fun _ ↦ R) _ _ h a
[ " monomial R n = LinearMap.stdBasis R (fun x => R) n", " LinearMap.stdBasis R (fun x => R) n = LinearMap.stdBasis R (fun x => R) n", " (coeff R m) ((monomial R n) a) = if m = n then a else 0", " (LinearMap.stdBasis R (fun x => R) n) a m = if m = n then a else 0", " (coeff R n) ((monomial R n) a) = a", " (...
[ " monomial R n = LinearMap.stdBasis R (fun x => R) n", " LinearMap.stdBasis R (fun x => R) n = LinearMap.stdBasis R (fun x => R) n", " (coeff R m) ((monomial R n) a) = if m = n then a else 0", " (LinearMap.stdBasis R (fun x => R) n) a m = if m = n then a else 0", " (coeff R n) ((monomial R n) a) = a", " (...
import Mathlib.CategoryTheory.Action import Mathlib.Combinatorics.Quiver.Arborescence import Mathlib.Combinatorics.Quiver.ConnectedComponent import Mathlib.GroupTheory.FreeGroup.IsFreeGroup #align_import group_theory.nielsen_schreier from "leanprover-community/mathlib"@"1bda4fc53de6ade5ab9da36f2192e24e2084a2ce" n...
Mathlib/GroupTheory/FreeGroup/NielsenSchreier.lean
178
179
theorem treeHom_eq {a : G} (p : Path (root T) a) : treeHom T a = homOfPath T p := by
rw [treeHom, Unique.default_eq]
[ " ∀ {X : Type u} [inst : Group X] (f : Labelling (Generators (ActionCategory G A)) X),\n ∃! F, ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b), F.map ((fun {a b} e => ⟨IsFreeGroup.of ↑e, ⋯⟩) g) = f g", " ∃! F, ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b), F.map ((fun {a b} e => ⟨IsFreeGroup.of ↑...
[ " ∀ {X : Type u} [inst : Group X] (f : Labelling (Generators (ActionCategory G A)) X),\n ∃! F, ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b), F.map ((fun {a b} e => ⟨IsFreeGroup.of ↑e, ⋯⟩) g) = f g", " ∃! F, ∀ (a b : Generators (ActionCategory G A)) (g : a ⟶ b), F.map ((fun {a b} e => ⟨IsFreeGroup.of ↑...
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.GroupTheory.GroupAction.Units import Mathlib.Logic.Basic import Mathlib.Tactic.Ring #align_import ring_theory.coprime.basic from "leanprover-community/mathlib"@"a95b16cb...
Mathlib/RingTheory/Coprime/Basic.lean
108
111
theorem IsCoprime.dvd_of_dvd_mul_left (H1 : IsCoprime x y) (H2 : x ∣ y * z) : x ∣ z := by
let ⟨a, b, H⟩ := H1 rw [← one_mul z, ← H, add_mul, mul_right_comm, mul_assoc b] exact dvd_add (dvd_mul_left _ _) (H2.mul_left _)
[ " b * y + a * x = 1", " x * (a + b) = 1", " b * x + 0 * x = 1", " x * b = 1", " 1 * 0 + b * x = 1", " IsCoprime ↑a ↑b", " ↑u * ↑a + ↑v * ↑b = 1", " ↑1 = 1", " p ≠ 0", " False", " x ≠ 0 ∨ y ≠ 0", " x = 0 → y ≠ 0", " 1 * 1 + 0 * x = 1", " 0 * x + 1 * 1 = 1", " x ∣ y", " x ∣ y * a * x + b...
[ " b * y + a * x = 1", " x * (a + b) = 1", " b * x + 0 * x = 1", " x * b = 1", " 1 * 0 + b * x = 1", " IsCoprime ↑a ↑b", " ↑u * ↑a + ↑v * ↑b = 1", " ↑1 = 1", " p ≠ 0", " False", " x ≠ 0 ∨ y ≠ 0", " x = 0 → y ≠ 0", " 1 * 1 + 0 * x = 1", " 0 * x + 1 * 1 = 1", " x ∣ y", " x ∣ y * a * x + b...
import Mathlib.Data.ENNReal.Basic import Mathlib.Topology.ContinuousFunction.Bounded import Mathlib.Topology.MetricSpace.Thickening #align_import topology.metric_space.thickened_indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal ENNReal Topol...
Mathlib/Topology/MetricSpace/ThickenedIndicator.lean
94
102
theorem thickenedIndicatorAux_zero {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) {x : α} (x_out : x ∉ thickening δ E) : thickenedIndicatorAux δ E x = 0 := by
rw [thickening, mem_setOf_eq, not_lt] at x_out unfold thickenedIndicatorAux apply le_antisymm _ bot_le have key := tsub_le_tsub (@rfl _ (1 : ℝ≥0∞)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal δ : ℝ≥0∞)).le) rw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr δ_pos)) ofReal_ne_top] at key si...
[ " Continuous (thickenedIndicatorAux δ E)", " Continuous fun x => 1 - infEdist x E / ENNReal.ofReal δ", " (fun x => 1 - infEdist x E / ENNReal.ofReal δ) = sub ∘ f", " Continuous (sub ∘ f)", " Continuous fun x => (f x).2", " ENNReal.ofReal δ ≠ 0", " thickenedIndicatorAux δ E x ≤ 1", " thickenedIndicator...
[ " Continuous (thickenedIndicatorAux δ E)", " Continuous fun x => 1 - infEdist x E / ENNReal.ofReal δ", " (fun x => 1 - infEdist x E / ENNReal.ofReal δ) = sub ∘ f", " Continuous (sub ∘ f)", " Continuous fun x => (f x).2", " ENNReal.ofReal δ ≠ 0", " thickenedIndicatorAux δ E x ≤ 1", " thickenedIndicator...
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.units from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" namespace Int theorem isUnit_iff_abs_eq {x : ℤ} : IsUnit x ↔ abs x = 1 := by rw [isUnit_iff_natAbs_eq, abs_eq_natAbs, ← Int.ofNat_one, natCast_inj] #align int....
Mathlib/Data/Int/Order/Units.lean
37
37
theorem units_inv_eq_self (u : ℤˣ) : u⁻¹ = u := by
rw [inv_eq_iff_mul_eq_one, units_mul_self]
[ " IsUnit x ↔ |x| = 1", " a ^ 2 = 1", " u ^ 2 = 1", " u * u = 1", " u⁻¹ = u" ]
[ " IsUnit x ↔ |x| = 1", " a ^ 2 = 1", " u ^ 2 = 1", " u * u = 1", " u⁻¹ = u" ]
import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Support #align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace List variable {α β : Type*} section FormPerm variable [DecidableEq α] (l :...
Mathlib/GroupTheory/Perm/List.lean
150
152
theorem formPerm_apply_getLast (x : α) (xs : List α) : formPerm (x :: xs) ((x :: xs).getLast (cons_ne_nil x xs)) = x := by
induction' xs using List.reverseRecOn with xs y _ generalizing x <;> simp
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Int import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.RingTheory.Ideal.Quotient #align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open I...
Mathlib/NumberTheory/Multiplicity.lean
82
146
theorem odd_sq_dvd_geom_sum₂_sub (hp : Odd p) : (p : R) ^ 2 ∣ (∑ i ∈ range p, (a + p * b) ^ i * a ^ (p - 1 - i)) - p * a ^ (p - 1) := by
have h1 : ∀ (i : ℕ), (p : R) ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * i + a ^ i) := by intro i calc ↑p ^ 2 ∣ (↑p * b) ^ 2 := by simp only [mul_pow, dvd_mul_right] _ ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) := by simp only [sq_dvd_add_pow_sub_sub (↑p * b) ...
[ " p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)", " p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)", " p ∣ y - x", " p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n", " p ^ 2 ∣ (x + p) ^ 0 - x ^ (0 - 1) * p * ↑0 - x ^ 0", " p ^ 2 ∣ (x + p) ^ (n + 1) - x ^ (n + 1 -...
[ " p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)", " p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)", " p ∣ y - x", " p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n", " p ^ 2 ∣ (x + p) ^ 0 - x ^ (0 - 1) * p * ↑0 - x ^ 0", " p ^ 2 ∣ (x + p) ^ (n + 1) - x ^ (n + 1 -...
import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Trace import Mathlib.RingTheory.Norm #align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" universe u v w z open scoped Matrix open Matrix FiniteDimensional Fintype Polynomial Fin...
Mathlib/RingTheory/Discriminant.lean
88
89
theorem discr_reindex (b : Basis ι A B) (f : ι ≃ ι') : discr A (b ∘ ⇑f.symm) = discr A b := by
classical rw [← Basis.coe_reindex, discr_def, traceMatrix_reindex, det_reindex_self, ← discr_def]
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝", " discr A (⇑b ∘ ⇑f.symm) = discr A ⇑b" ]
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝", " discr A (⇑b ∘ ⇑f.symm) = discr A ⇑b" ]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Div #align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8" noncomputable ...
Mathlib/Algebra/Polynomial/RingDivision.lean
439
441
theorem rootMultiplicity_le_iff {p : R[X]} (p0 : p ≠ 0) (a : R) (n : ℕ) : rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣ p := by
rw [← (le_rootMultiplicity_iff p0).not, not_le, Nat.lt_add_one_iff]
[ " n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p", " (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p", " (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p", " (X - C a) ^ n ∣ p", " (X - C a) ^ 0 ∣ p", " 1 ∣ p", " (X - C a) ^ (n + 1) ∣ p", " rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣...
[ " n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p", " (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p", " (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p", " (X - C a) ^ n ∣ p", " (X - C a) ^ 0 ∣ p", " 1 ∣ p", " (X - C a) ^ (n + 1) ∣ p", " rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣...
import Mathlib.Init.Algebra.Classes import Mathlib.Init.Data.Ordering.Basic #align_import init.data.ordering.lemmas from "leanprover-community/lean"@"4bd314f7bd5e0c9e813fc201f1279a23f13f9f1d" universe u namespace Ordering @[simp]
Mathlib/Init/Data/Ordering/Lemmas.lean
20
22
theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) : ((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt := by
by_cases c <;> simp [*]
[ " ((if c then a else b) = lt) = if c then a = lt else b = lt" ]
[ " ((if c then a else b) = lt) = if c then a = lt else b = lt" ]
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-...
Mathlib/Topology/PartitionOfUnity.lean
161
164
theorem exists_pos {x : X} (hx : x ∈ s) : ∃ i, 0 < f i x := by
have H := f.sum_eq_one hx contrapose! H simpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one
[ " f = g", " { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g", " { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ...
[ " f = g", " { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g", " { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ...
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Sym.Sym2 namespace List variable {α : Type*} section Sym2 protected def sym2 : List α → List (Sym2 α) | [] => [] | x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2 theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} : z ∈ (x :: xs)...
Mathlib/Data/List/Sym.lean
146
151
theorem length_sym2 {xs : List α} : xs.sym2.length = Nat.choose (xs.length + 1) 2 := by
induction xs with | nil => rfl | cons x xs ih => rw [List.sym2, length_append, length_map, length_cons, Nat.choose_succ_succ, ← ih, Nat.choose_one_right]
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []", " a ∈ xs", ...
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []", " a ∈ xs", ...
import Mathlib.Algebra.ContinuedFractions.Computation.Basic import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction open Generali...
Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
250
258
theorem get?_of_eq_some_of_get?_intFractPair_stream_fr_ne_zero {ifp_n : IntFractPair K} (stream_nth_eq : IntFractPair.stream v n = some ifp_n) (nth_fr_ne_zero : ifp_n.fr ≠ 0) : (of v).s.get? n = some ⟨1, (IntFractPair.of ifp_n.fr⁻¹).b⟩ := have : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹...
cases ifp_n simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff] intro; contradiction get?_of_eq_some_of_succ_get?_intFractPair_stream this
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b", " (of v).s.get? n = some { a := 1, b := ↑ifp_succ_n.b }", ...
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b", " (of v).s.get? n = some { a := 1, b := ↑ifp_succ_n.b }", ...
import Batteries.Classes.Order namespace Batteries.PairingHeapImp inductive Heap (α : Type u) where | nil : Heap α | node (a : α) (child sibling : Heap α) : Heap α deriving Repr def Heap.size : Heap α → Nat | .nil => 0 | .node _ c s => c.size + 1 + s.size def Heap.singleton (a : α) : Heap α := ....
.lake/packages/batteries/Batteries/Data/PairingHeap.lean
154
156
theorem Heap.size_deleteMin_lt {s : Heap α} (eq : s.deleteMin le = some (a, s')) : s'.size < s.size := by
cases s with cases eq | node a c => simp_arith [size_combine, size]
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
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
62
62
theorem condCount_empty {s : Set Ω} : condCount s ∅ = 0 := by
simp
[ " condCount ∅ = 0", " (condCount s) ∅ = 0" ]
[ " condCount ∅ = 0", " (condCount s) ∅ = 0" ]
import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Analysis.Normed.Group.Basic #align_import analysis.normed_space.indicator_function from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" variable {α E : Type*} [SeminormedAddCommGroup E] {s t : Set α} (f : α → E) (a : α) open Se...
Mathlib/Analysis/NormedSpace/IndicatorFunction.lean
44
46
theorem norm_indicator_le_norm_self : ‖indicator s f a‖ ≤ ‖f a‖ := by
rw [norm_indicator_eq_indicator_norm] apply indicator_norm_le_norm_self
[ " ‖s.indicator f a‖ ≤ ‖t.indicator f a‖", " s.indicator (fun a => ‖f a‖) a ≤ t.indicator (fun a => ‖f a‖) a", " ‖s.indicator f a‖ ≤ ‖f a‖", " s.indicator (fun a => ‖f a‖) a ≤ ‖f a‖" ]
[ " ‖s.indicator f a‖ ≤ ‖t.indicator f a‖", " s.indicator (fun a => ‖f a‖) a ≤ t.indicator (fun a => ‖f a‖) a", " ‖s.indicator f a‖ ≤ ‖f a‖" ]
import Mathlib.Data.List.Forall2 import Mathlib.Data.Set.Pairwise.Basic import Mathlib.Init.Data.Fin.Basic #align_import data.list.nodup from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" universe u v open Nat Function variable {α : Type u} {β : Type v} {l l₁ l₂ : List α} {r : α → α ...
Mathlib/Data/List/Nodup.lean
123
132
theorem nodup_iff_get?_ne_get? {l : List α} : l.Nodup ↔ ∀ i j : ℕ, i < j → j < l.length → l.get? i ≠ l.get? j := by
rw [Nodup, pairwise_iff_get] constructor · intro h i j hij hj rw [get?_eq_get (lt_trans hij hj), get?_eq_get hj, Ne, Option.some_inj] exact h _ _ hij · intro h i j hij rw [Ne, ← Option.some_inj, ← get?_eq_get, ← get?_eq_get] exact h i j hij j.2
[ " (a :: l).Nodup ↔ a ∉ l ∧ l.Nodup", " (fun x x_1 => x ↔ x_1) [].Nodup [].Nodup", " (fun x x_1 => x ↔ x_1) (a✝ :: l₁✝).Nodup (b✝ :: l₂✝).Nodup", " (∀ (a : α), ¬[a, a] <+ l) → l.Nodup", " (∀ (a : α), ¬[a, a] <+ []) → [].Nodup", " (∀ (a_1 : α), ¬[a_1, a_1] <+ a :: l) → (a :: l).Nodup", " [].Nodup", " (a...
[ " (a :: l).Nodup ↔ a ∉ l ∧ l.Nodup", " (fun x x_1 => x ↔ x_1) [].Nodup [].Nodup", " (fun x x_1 => x ↔ x_1) (a✝ :: l₁✝).Nodup (b✝ :: l₂✝).Nodup", " (∀ (a : α), ¬[a, a] <+ l) → l.Nodup", " (∀ (a : α), ¬[a, a] <+ []) → [].Nodup", " (∀ (a_1 : α), ¬[a_1, a_1] <+ a :: l) → (a :: l).Nodup", " [].Nodup", " (a...
import Mathlib.Data.Set.Subsingleton import Mathlib.Order.WithBot #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" universe u v open Function Set namespace Set variable {α β γ : Type*} {ι ι' : Sort*} section Image variable {f : α → β} {s t : Set...
Mathlib/Data/Set/Image.lean
223
224
theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} : (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x⦄, x ∈ s → p (f x) := by
simp
[ " (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)" ]
[ " (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)" ]