Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.Algebra.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
89
92
theorem ack_two (n : ℕ) : ack 2 n = 2 * n + 3 := by
induction' n with n IH · rfl · simpa [mul_succ]
[ " 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 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" ]
import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Data.Set.MemPartition import Mathlib.Order.Filter.CountableSeparatingOn open Set MeasureTheory namespace MeasurableSpace variable {α β : Type*} class CountablyGenerated (α : Type*) [m : MeasurableSpace α] : Prop where isCountablyGenerated : ∃ b...
Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
157
163
theorem separating_of_generateFrom (S : Set (Set α)) [h : @SeparatesPoints α (generateFrom S)] : ∀ x y : α, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y := by
letI := generateFrom S intros x y hxy rw [← forall_generateFrom_mem_iff_mem_iff] at hxy exact separatesPoints_def $ fun _ hs ↦ (hxy _ hs).mp
[ " MeasurableSet s", " generateFrom (range (natGeneratingSequence α)) = m", " CountablyGenerated α", " CountablyGenerated β", " ∃ b, b.Countable ∧ inst✝¹ = generateFrom b", " inst✝¹ = generateFrom (⋃ y, {measurableAtom y})", " ∀ t ∈ ⋃ y, {measurableAtom y}, MeasurableSet t", " inst✝¹ ≤ generateFrom (⋃ ...
[ " MeasurableSet s", " generateFrom (range (natGeneratingSequence α)) = m", " CountablyGenerated α", " CountablyGenerated β", " ∃ b, b.Countable ∧ inst✝¹ = generateFrom b", " inst✝¹ = generateFrom (⋃ y, {measurableAtom y})", " ∀ t ∈ ⋃ y, {measurableAtom y}, MeasurableSet t", " inst✝¹ ≤ generateFrom (⋃ ...
import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Analysis.NormedSpace.Basic variable {𝕜 E : Type*} namespace LinearMap variable (𝕜) section Seminormed variable [NormedDivisionRing 𝕜] [SeminormedAddCommGroup E] [Module 𝕜 E] [BoundedSMu...
Mathlib/Analysis/NormedSpace/Span.lean
36
39
theorem toSpanSingleton_homothety (x : E) (c : 𝕜) : ‖LinearMap.toSpanSingleton 𝕜 E x c‖ = ‖x‖ * ‖c‖ := by
rw [mul_comm] exact norm_smul _ _
[ " ‖(toSpanSingleton 𝕜 E x) c‖ = ‖x‖ * ‖c‖", " ‖(toSpanSingleton 𝕜 E x) c‖ = ‖c‖ * ‖x‖" ]
[]
import Mathlib.Data.Multiset.Sum import Mathlib.Data.Finset.Card #align_import data.finset.sum from "leanprover-community/mathlib"@"48a058d7e39a80ed56858505719a0b2197900999" open Function Multiset Sum namespace Finset variable {α β : Type*} (s : Finset α) (t : Finset β) def disjSum : Finset (Sum α β) := ⟨s....
Mathlib/Data/Finset/Sum.lean
83
83
theorem disjSum_eq_empty : s.disjSum t = ∅ ↔ s = ∅ ∧ t = ∅ := by
simp [ext_iff]
[ " _root_.Disjoint (map Embedding.inl s) (map Embedding.inr t)", " ∀ ⦃a : α ⊕ β⦄, (∃ a_1 ∈ s, Embedding.inl a_1 = a) → ¬∃ a_2 ∈ t, Embedding.inr a_2 = a", " s.disjSum t = ∅ ↔ s = ∅ ∧ t = ∅" ]
[ " _root_.Disjoint (map Embedding.inl s) (map Embedding.inr t)", " ∀ ⦃a : α ⊕ β⦄, (∃ a_1 ∈ s, Embedding.inl a_1 = a) → ¬∃ a_2 ∈ t, Embedding.inr a_2 = a" ]
import Mathlib.Algebra.Group.Defs import Mathlib.Control.Functor #align_import control.applicative from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v w section Lemmas open Function variable {F : Type u → Type v} variable [Applicative F] [LawfulApplicative F] variable {α ...
Mathlib/Control/Applicative.lean
40
63
theorem Applicative.ext {F} : ∀ {A1 : Applicative F} {A2 : Applicative F} [@LawfulApplicative F A1] [@LawfulApplicative F A2], (∀ {α : Type u} (x : α), @Pure.pure _ A1.toPure _ x = @Pure.pure _ A2.toPure _ x) → (∀ {α β : Type u} (f : F (α → β)) (x : F α), @Seq.seq _ A1.toSeq _ _ f (fun _ => x)...
funext α x apply H1 obtain rfl : @s1 = @s2 := by funext α β f x exact H2 f (x Unit.unit) obtain ⟨seqLeft_eq1, seqRight_eq1, pure_seq1, -⟩ := L1 obtain ⟨seqLeft_eq2, seqRight_eq2, pure_seq2, -⟩ := L2 obtain rfl : F1 = F2 := by apply Functor.ext intros exact (pur...
[ " (Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq (((fun x => x ∘ g) ∘ f) <$> x) fun x => y", " (fun x => Seq.seq (pure f) fun x_1 => x) = fun x => f <$> x", " (Seq.seq (pure f) fun x => x✝) = f <$> x✝", " mk = mk", " p1 = p2", " p1 x = p2 x", " s1 = s2", " s1 f x = s2 f x", " F1 = F2", " ∀ (α β : ...
[ " (Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq (((fun x => x ∘ g) ∘ f) <$> x) fun x => y", " (fun x => Seq.seq (pure f) fun x_1 => x) = fun x => f <$> x", " (Seq.seq (pure f) fun x => x✝) = f <$> x✝" ]
import Mathlib.Analysis.InnerProductSpace.Adjoint import Mathlib.Topology.Algebra.Module.Basic #align_import analysis.inner_product_space.linear_pmap from "leanprover-community/mathlib"@"8b981918a93bc45a8600de608cde7944a80d92b9" noncomputable section open RCLike open scoped ComplexConjugate Classical variable ...
Mathlib/Analysis/InnerProductSpace/LinearPMap.lean
140
147
theorem adjointAux_inner (y : T.adjointDomain) (x : T.domain) : ⟪adjointAux hT y, x⟫ = ⟪(y : F), T x⟫ := by
simp only [adjointAux, LinearMap.coe_mk, InnerProductSpace.toDual_symm_apply, adjointDomainMkCLMExtend_apply] -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5026): -- mathlib3 was finished here simp only [AddHom.coe_mk, InnerProductSpace.toDual_symm_apply] rw [adjointDomainMkCLME...
[ " ⟪↑S y, ↑x✝⟫_𝕜 = ⟪↑y, ↑T x✝⟫_𝕜", " a✝ + b✝ ∈ {y | Continuous ⇑((innerₛₗ 𝕜) y ∘ₗ T.toFun)}", " Continuous ⇑(((innerₛₗ 𝕜) a✝ + (innerₛₗ 𝕜) b✝) ∘ₗ T.toFun)", " 0 ∈ { carrier := {y | Continuous ⇑((innerₛₗ 𝕜) y ∘ₗ T.toFun)}, add_mem' := ⋯ }.carrier", " Continuous ⇑0", " a • x ∈ { carrier := {y | Continu...
[ " ⟪↑S y, ↑x✝⟫_𝕜 = ⟪↑y, ↑T x✝⟫_𝕜", " a✝ + b✝ ∈ {y | Continuous ⇑((innerₛₗ 𝕜) y ∘ₗ T.toFun)}", " Continuous ⇑(((innerₛₗ 𝕜) a✝ + (innerₛₗ 𝕜) b✝) ∘ₗ T.toFun)", " 0 ∈ { carrier := {y | Continuous ⇑((innerₛₗ 𝕜) y ∘ₗ T.toFun)}, add_mem' := ⋯ }.carrier", " Continuous ⇑0", " a • x ∈ { carrier := {y | Continu...
import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic #align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904" open Function OrderDual variable {ι α β : Type*} {π : ι → Type*} def symmDiff [Sup α] [SDiff α] (a b : α) : α := a \ b ⊔ b \ a #ali...
Mathlib/Order/SymmDiff.lean
121
121
theorem symmDiff_self : a ∆ a = ⊥ := by
rw [symmDiff, sup_idem, sdiff_self]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a", " a ∆ a = ⊥" ]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a" ]
import Mathlib.CategoryTheory.Sites.Coherent.RegularSheaves namespace CategoryTheory.regularTopology open Limits variable {C : Type*} [Category C] [Preregular C] {X : C} theorem mem_sieves_of_hasEffectiveEpi (S : Sieve X) : (∃ (Y : C) (π : Y ⟶ X), EffectiveEpi π ∧ S.arrows π) → (S ∈ (regularTopology C).sieve...
Mathlib/CategoryTheory/Sites/Coherent/RegularTopology.lean
64
78
theorem mem_sieves_iff_hasEffectiveEpi (S : Sieve X) : (S ∈ (regularTopology C).sieves X) ↔ ∃ (Y : C) (π : Y ⟶ X), EffectiveEpi π ∧ (S.arrows π) := by
constructor · intro h induction' h with Y T hS Y Y R S _ _ a b · rcases hS with ⟨Y', π, h'⟩ refine ⟨Y', π, h'.2, ?_⟩ rcases h' with ⟨rfl, _⟩ exact ⟨Y', 𝟙 Y', π, Presieve.ofArrows.mk (), (by simp)⟩ · exact ⟨Y, (𝟙 Y), inferInstance, by simp only [Sieve.top_apply, forall_const]⟩ · ...
[ " (∃ Y π, EffectiveEpi π ∧ S.arrows π) → S ∈ (regularTopology C).sieves X", " S ∈ (regularTopology C).sieves X", " Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S", " (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S.arrows", " (Presieve.ofArrows (fun x => Y) fun x => π).FactorsThru S.arrows", ...
[ " (∃ Y π, EffectiveEpi π ∧ S.arrows π) → S ∈ (regularTopology C).sieves X", " S ∈ (regularTopology C).sieves X", " Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S", " (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S.arrows", " (Presieve.ofArrows (fun x => Y) fun x => π).FactorsThru S.arrows", ...
import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Ideal.Over import Mathlib.RingTheory.JacobsonIdeal #align_import ring_theory.jacobson from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0" set_option autoImplicit true universe u namespace Ideal open Polynomial ...
Mathlib/RingTheory/Jacobson.lean
303
355
theorem isIntegral_isLocalization_polynomial_quotient (P : Ideal R[X]) (pX : R[X]) (hpX : pX ∈ P) [Algebra (R ⧸ P.comap (C : R →+* R[X])) Rₘ] [IsLocalization.Away (pX.map (Quotient.mk (P.comap (C : R →+* R[X])))).leadingCoeff Rₘ] [Algebra (R[X] ⧸ P) Sₘ] [IsLocalization ((Submonoid.powers (pX.map (Quotient.m...
let P' : Ideal R := P.comap C let M : Submonoid (R ⧸ P') := Submonoid.powers (pX.map (Quotient.mk (P.comap (C : R →+* R[X])))).leadingCoeff let M' : Submonoid (R[X] ⧸ P) := (Submonoid.powers (pX.map (Quotient.mk (P.comap (C : R →+* R[X])))).leadingCoeff).map (quotientMap P C le_rfl) let φ : R ⧸ P...
[ " g x ∈ Subring.closure (⇑g '' u)", " ∀ (S_1 : Subring T), ⇑g '' u ⊆ ↑S_1 → g x ∈ S_1", " g x ∈ T₁", " x ∈ Subring.comap g T₁", " u ⊆ ↑(Subring.comap g T₁)", " ⇑g '' u ⊆ ↑T₁", " p ∈ Subring.closure (insert X {f | f.degree ≤ 0})", " ∀ (a : R), C a ∈ Subring.closure (insert X {f | f.degree ≤ 0})", " C...
[ " g x ∈ Subring.closure (⇑g '' u)", " ∀ (S_1 : Subring T), ⇑g '' u ⊆ ↑S_1 → g x ∈ S_1", " g x ∈ T₁", " x ∈ Subring.comap g T₁", " u ⊆ ↑(Subring.comap g T₁)", " ⇑g '' u ⊆ ↑T₁", " p ∈ Subring.closure (insert X {f | f.degree ≤ 0})", " ∀ (a : R), C a ∈ Subring.closure (insert X {f | f.degree ≤ 0})", " C...
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
83
87
theorem oangle_add_left_eq_arctan_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) : o.oangle (x + y) y = Real.arctan (‖x‖ / ‖y‖) := by
rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢ rw [add_comm] exact (-o).oangle_add_right_eq_arctan_of_oangle_eq_pi_div_two h
[ " o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos", " (o.oangle x (x + y)).sign = 1", " o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos", " o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin", " o.oangle (x + y) ...
[ " o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos", " (o.oangle x (x + y)).sign = 1", " o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos", " o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin", " o.oangle (x + y) ...
import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Data.Nat.Fib.Basic import Mathlib.Tactic.Monotonicity #align_import algebra.continued_fractions.computation.approximations from "leanprover-commu...
Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean
70
80
theorem nth_stream_fr_nonneg_lt_one {ifp_n : IntFractPair K} (nth_stream_eq : IntFractPair.stream v n = some ifp_n) : 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1 := by
cases n with | zero => have : IntFractPair.of v = ifp_n := by injection nth_stream_eq rw [← this, IntFractPair.of] exact ⟨fract_nonneg _, fract_lt_one _⟩ | succ => rcases succ_nth_stream_eq_some_iff.1 nth_stream_eq with ⟨_, _, _, ifp_of_eq_ifp_n⟩ rw [← ifp_of_eq_ifp_n, IntFractPair.of] ex...
[ " 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1", " IntFractPair.of v = ifp_n", " 0 ≤ { b := ⌊v⌋, fr := fract v }.fr ∧ { b := ⌊v⌋, fr := fract v }.fr < 1", " 0 ≤ { b := ⌊w✝.fr⁻¹⌋, fr := fract w✝.fr⁻¹ }.fr ∧ { b := ⌊w✝.fr⁻¹⌋, fr := fract w✝.fr⁻¹ }.fr < 1" ]
[]
import Mathlib.Data.Set.Pointwise.SMul import Mathlib.GroupTheory.GroupAction.Hom open Set Pointwise theorem MulAction.smul_bijective_of_is_unit {M : Type*} [Monoid M] {α : Type*} [MulAction M α] {m : M} (hm : IsUnit m) : Function.Bijective (fun (a : α) ↦ m • a) := by lift m to Mˣ using hm rw [Functio...
Mathlib/GroupTheory/GroupAction/Pointwise.lean
58
60
theorem image_smul_setₛₗ : h '' (c • s) = σ c • h '' s := by
simp only [← image_smul, image_image, map_smulₛₗ h]
[ " Function.Bijective fun a => m • a", " Function.Bijective fun a => ↑m • a", " ∃ g, (Function.LeftInverse g fun a => ↑m • a) ∧ Function.RightInverse g fun a => ↑m • a", " (Function.LeftInverse (fun a => m⁻¹ • a) fun a => ↑m • a) ∧ Function.RightInverse (fun a => m⁻¹ • a) fun a => ↑m • a", " Function.LeftInv...
[ " Function.Bijective fun a => m • a", " Function.Bijective fun a => ↑m • a", " ∃ g, (Function.LeftInverse g fun a => ↑m • a) ∧ Function.RightInverse g fun a => ↑m • a", " (Function.LeftInverse (fun a => m⁻¹ • a) fun a => ↑m • a) ∧ Function.RightInverse (fun a => m⁻¹ • a) fun a => ↑m • a", " Function.LeftInv...
import Mathlib.Algebra.Module.Submodule.Localization import Mathlib.LinearAlgebra.Dimension.DivisionRing import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.OreLocalization.OreSet open Cardinal nonZeroDivisors section CommRing universe u u' v v' variable {R : Type u} (S : Type u') {M : T...
Mathlib/LinearAlgebra/Dimension/Localization.lean
85
93
theorem exists_set_linearIndependent_of_isDomain [IsDomain R] : ∃ s : Set M, #s = Module.rank R M ∧ LinearIndependent (ι := s) R Subtype.val := by
obtain ⟨w, hw⟩ := IsLocalizedModule.linearIndependent_lift R⁰ (LocalizedModule.mkLinearMap R⁰ M) le_rfl (Module.Free.chooseBasis (FractionRing R) (LocalizedModule R⁰ M)).linearIndependent refine ⟨Set.range w, ?_, (linearIndependent_subtype_range hw.injective).mpr hw⟩ apply Cardinal.lift_injective.{max ...
[ " ∃ w, LinearIndependent R w", " LinearIndependent R fun i => (sec (v i)).1", " ∀ (s : Finset ι) (g : ι → R), ∑ i ∈ s, g i • (sec (v i)).1 = 0 → ∀ i ∈ s, g i = 0", " g i = 0", " g i * ↑(sec (v i)).2 = 0", " (algebraMap R S) (g i * ↑(sec (v i)).2) = (algebraMap R S) 0", " (algebraMap R S) (g i * ↑(sec (v...
[ " ∃ w, LinearIndependent R w", " LinearIndependent R fun i => (sec (v i)).1", " ∀ (s : Finset ι) (g : ι → R), ∑ i ∈ s, g i • (sec (v i)).1 = 0 → ∀ i ∈ s, g i = 0", " g i = 0", " g i * ↑(sec (v i)).2 = 0", " (algebraMap R S) (g i * ↑(sec (v i)).2) = (algebraMap R S) 0", " (algebraMap R S) (g i * ↑(sec (v...
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
107
137
theorem integral_tsum {ι} [Countable ι] {f : ι → α → G} (hf : ∀ i, AEStronglyMeasurable (f i) μ) (hf' : ∑' i, ∫⁻ a : α, ‖f i a‖₊ ∂μ ≠ ∞) : ∫ a : α, ∑' i, f i a ∂μ = ∑' i, ∫ a : α, f i a ∂μ := by
by_cases hG : CompleteSpace G; swap · simp [integral, hG] have hf'' : ∀ i, AEMeasurable (fun x => (‖f i x‖₊ : ℝ≥0∞)) μ := fun i => (hf i).ennnorm have hhh : ∀ᵐ a : α ∂μ, Summable fun n => (‖f n a‖₊ : ℝ) := by rw [← lintegral_tsum hf''] at hf' refine (ae_lt_top' (AEMeasurable.ennreal_tsum hf'') hf').mon...
[ " 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.Analysis.NormedSpace.PiTensorProduct.ProjectiveSeminorm import Mathlib.LinearAlgebra.Isomorphisms 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)] ...
Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
152
202
theorem norm_eval_le_injectiveSeminorm (f : ContinuousMultilinearMap 𝕜 E F) (x : ⨂[𝕜] i, E i) : ‖lift f.toMultilinearMap x‖ ≤ ‖f‖ * injectiveSeminorm x := by
/- If `F` were in `Type (max uι u𝕜 uE)` (which is the type of `⨂[𝕜] i, E i`), then the property that we want to prove would hold by definition of `injectiveSeminorm`. This is not necessarily true, but we will show that there exists a normed vector space `G` in `Type (max uι u𝕜 uE)` and an injective ...
[ " ‖((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear) x✝‖ ≤ projectiveSeminorm x * ‖x✝‖", " ‖(lift x✝.toMultilinearMap) x‖ ≤ projectiveSeminorm x * ‖x✝‖", " (fun x => ((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear).mkContinuous (projectiveSeminorm x) ⋯)\n (x + y) =\n ...
[ " ‖((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear) x✝‖ ≤ projectiveSeminorm x * ‖x✝‖", " ‖(lift x✝.toMultilinearMap) x‖ ≤ projectiveSeminorm x * ‖x✝‖", " (fun x => ((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear).mkContinuous (projectiveSeminorm x) ⋯)\n (x + y) =\n ...
import Mathlib.AlgebraicGeometry.Morphisms.Basic import Mathlib.RingTheory.LocalProperties #align_import algebraic_geometry.morphisms.ring_hom_properties from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were used in this file to improve perfomance #127...
Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
48
70
theorem RespectsIso.basicOpen_iff (hP : RespectsIso @P) {X Y : Scheme.{u}} [IsAffine X] [IsAffine Y] (f : X ⟶ Y) (r : Y.presheaf.obj (Opposite.op ⊤)) : P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔ P (@IsLocalization.Away.map (Y.presheaf.obj (Opposite.op ⊤)) _ (Y.presheaf.obj (Opposite.op <| Y.basicOpen ...
rw [Γ_map_morphismRestrict, hP.cancel_left_isIso, hP.cancel_right_isIso, ← hP.cancel_right_isIso (f.val.c.app (Opposite.op (Y.basicOpen r))) (X.presheaf.map (eqToHom (Scheme.preimage_basicOpen f r).symm).op), ← eq_iff_iff] congr delta IsLocalization.Away.map refine IsLocalization.ringHom_ext (Submono...
[ " P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔\n P\n (IsLocalization.Away.map (↑(Y.presheaf.obj { unop := Y.basicOpen r }))\n (↑(X.presheaf.obj { unop := X.basicOpen ((Scheme.Γ.map f.op) r) })) (Scheme.Γ.map f.op) r)", " P (f.val.c.app { unop := Y.basicOpen r } ≫ X.presheaf.map (eqToHom ⋯).op) =\n ...
[]
import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions noncomputable section open scoped Manifold open Bundle Set Topology variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) {M : Type*} [To...
Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean
113
129
theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) : MDifferentiableAt I I e.symm x := by
rw [mdifferentiableAt_iff] refine ⟨(e.continuousOn_symm x hx).continuousAt (e.open_target.mem_nhds hx), ?_⟩ have mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by simp only [hx, mfld_simps] have : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I := HasGroupoid.com...
[ " MDifferentiableAt I I (↑e) x", " ContinuousAt (↑e) x ∧ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)", " DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)", " ↑I (↑(chartAt H x) x) ∈ ↑I.symm ⁻¹' ((chartAt H x).symm ≫ₕ e).sou...
[ " MDifferentiableAt I I (↑e) x", " ContinuousAt (↑e) x ∧ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)", " DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)", " ↑I (↑(chartAt H x) x) ∈ ↑I.symm ⁻¹' ((chartAt H x).symm ≫ₕ e).sou...
import Mathlib.Algebra.Homology.Homotopy import Mathlib.AlgebraicTopology.DoldKan.Notations #align_import algebraic_topology.dold_kan.homotopies from "leanprover-community/mathlib"@"b12099d3b7febf4209824444dd836ef5ad96db55" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditi...
Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean
141
151
theorem Hσ_eq_zero (q : ℕ) : (Hσ q : K[X] ⟶ K[X]).f 0 = 0 := by
unfold Hσ rw [nullHomotopicMap'_f_of_not_rel_left (c_mk 1 0 rfl) cs_down_0_not_rel_left] rcases q with (_|q) · rw [hσ'_eq (show 0 = 0 + 0 by rfl) (c_mk 1 0 rfl)] simp only [pow_zero, Fin.mk_zero, one_zsmul, eqToHom_refl, Category.comp_id] erw [ChainComplex.of_d] rw [AlternatingFaceMapComplex.objD, ...
[ " ¬c.Rel 0 j", " False", " j.succ ≤ 0", " X _[n + 1] = K[X].X m", " hσ' q n m hnm = 0", " (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ eqToHom ⋯ = 0", " 0 ≫ eqToHom ⋯ = 0", " hσ' q n m hnm = ((-1) ^ a • X.σ ⟨a, ⋯⟩) ≫ eqToHom ⋯", " (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ ...
[ " ¬c.Rel 0 j", " False", " j.succ ≤ 0", " X _[n + 1] = K[X].X m", " hσ' q n m hnm = 0", " (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ eqToHom ⋯ = 0", " 0 ≫ eqToHom ⋯ = 0", " hσ' q n m hnm = ((-1) ^ a • X.σ ⟨a, ⋯⟩) ≫ eqToHom ⋯", " (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ ...
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Order.Hom.Basic #align_import algebra.lie.solvable from "leanprover-community/mathlib"@"a50170a88a47570ed186b809ca754110590f9476" universe u v w w₁ w₂ variable (R : Type u) (L : Type v) (M : Type w) {L' : Type w₁} variab...
Mathlib/Algebra/Lie/Solvable.lean
127
128
theorem derivedSeries_of_bot_eq_bot (k : ℕ) : derivedSeriesOfIdeal R L k ⊥ = ⊥ := by
rw [eq_bot_iff]; exact derivedSeriesOfIdeal_le_self ⊥ k
[ " D (k + l) I = D k (D l I)", " D (0 + l) I = D 0 (D l I)", " D (k + 1 + l) I = D (k + 1) (D l I)", " D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J", " ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J", " D 0 I ≤ D l J", " I ≤ D 0 J", " D (k + 1) I ≤ D l J", "...
[ " D (k + l) I = D k (D l I)", " D (0 + l) I = D 0 (D l I)", " D (k + 1 + l) I = D (k + 1) (D l I)", " D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J", " ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J", " D 0 I ≤ D l J", " I ≤ D 0 J", " D (k + 1) I ≤ D l J", "...
import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Digits import Mathlib.Data.Nat.MaxPowDiv import Mathlib.Data.Nat.Multiplicity import Mathlib.Tactic.IntervalCases #align_import number_theory.padics.padic_val from "leanprover-community/mathlib"@"60fa54e778c9e85d930efae172435f42fb0d71f7" universe u ope...
Mathlib/NumberTheory/Padics/PadicVal.lean
126
129
theorem maxPowDiv_eq_multiplicity_get {p n : ℕ} (hp : 1 < p) (hn : 0 < n) (h : Finite p n) : p.maxPowDiv n = (multiplicity p n).get h := by
rw [PartENat.get_eq_iff_eq_coe.mpr] apply maxPowDiv_eq_multiplicity hp hn|>.symm
[ " padicValNat p 0 = 0", " padicValNat p 1 = 0", " (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0", " (multiplicity p 1).get ⋯ = 0", " 0 = 0", " padicValNat p p = 1", " padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n", " ↑(p.maxPowDiv n) = multiplicity p n", " ¬p ^ (p.maxPowDiv n + 1) ∣...
[ " padicValNat p 0 = 0", " padicValNat p 1 = 0", " (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0", " (multiplicity p 1).get ⋯ = 0", " 0 = 0", " padicValNat p p = 1", " padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n", " ↑(p.maxPowDiv n) = multiplicity p n", " ¬p ^ (p.maxPowDiv n + 1) ∣...
import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv open Complex Set open scoped Topology variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℂ E] variable {f g : E →...
Mathlib/Analysis/SpecialFunctions/Complex/Analytic.lean
40
44
theorem analyticAt_clog (m : z ∈ slitPlane) : AnalyticAt ℂ log z := by
rw [analyticAt_iff_eventually_differentiableAt] filter_upwards [isOpen_slitPlane.eventually_mem m] intro z m exact differentiableAt_id.clog m
[ " AnalyticOn ℂ cexp univ", " Differentiable ℂ cexp", " AnalyticAt ℂ log z", " ∀ᶠ (z : ℂ) in 𝓝 z, DifferentiableAt ℂ log z", " ∀ a ∈ slitPlane, DifferentiableAt ℂ log a", " DifferentiableAt ℂ log z" ]
[ " AnalyticOn ℂ cexp univ", " Differentiable ℂ cexp" ]
import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.CategoryTheory.Monoidal.Linear #align_import algebra.category.Module.monoidal.basic from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2" -- Porting note: Module set_option linte...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
151
155
theorem associator_naturality {X₁ X₂ X₃ Y₁ Y₂ Y₃ : ModuleCat R} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃) : tensorHom (tensorHom f₁ f₂) f₃ ≫ (associator Y₁ Y₂ Y₃).hom = (associator X₁ X₂ X₃).hom ≫ tensorHom f₁ (tensorHom f₂ f₃) := by
convert associator_naturality_aux f₁ f₂ f₃ using 1
[ " tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))", " (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))", " tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂", " (TensorProduct.mk R ↑X₁ ↑X₂).compr₂ (tensorHom (f₁ ≫ g₁) (f₂...
[ " tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))", " (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))", " tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂", " (TensorProduct.mk R ↑X₁ ↑X₂).compr₂ (tensorHom (f₁ ≫ g₁) (f₂...
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Field.Rat import Mathlib.GroupTheory.GroupAction.Group import Mathlib.GroupTheory.GroupAction.Pi #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" o...
Mathlib/Algebra/Module/Basic.lean
49
55
theorem map_inv_intCast_smul [AddCommGroup M] [AddCommGroup M₂] {F : Type*} [FunLike F M M₂] [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [DivisionRing R] [DivisionRing S] [Module R M] [Module S M₂] (z : ℤ) (x : M) : f ((z⁻¹ : R) • x) = (z⁻¹ : S) • f x := by
obtain ⟨n, rfl | rfl⟩ := z.eq_nat_or_neg · rw [Int.cast_natCast, Int.cast_natCast, map_inv_natCast_smul _ R S] · simp_rw [Int.cast_neg, Int.cast_natCast, inv_neg, neg_smul, map_neg, map_inv_natCast_smul _ R S]
[ " f ((↑n)⁻¹ • x) = (↑n)⁻¹ • f x", " ∀ (y : M), f y = 0", " f x = 0", " (↑n)⁻¹ • f (↑n • x) = 0", " f ((↑z)⁻¹ • x) = (↑z)⁻¹ • f x", " f ((↑↑n)⁻¹ • x) = (↑↑n)⁻¹ • f x", " f ((↑(-↑n))⁻¹ • x) = (↑(-↑n))⁻¹ • f x" ]
[ " f ((↑n)⁻¹ • x) = (↑n)⁻¹ • f x", " ∀ (y : M), f y = 0", " f x = 0", " (↑n)⁻¹ • f (↑n • x) = 0" ]
import Mathlib.Data.List.Nodup import Mathlib.Data.List.Range #align_import data.list.nat_antidiagonal from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open List Function Nat namespace List namespace Nat def antidiagonal (n : ℕ) : List (ℕ × ℕ) := (range (n + 1)).map fun i ↦ (i,...
Mathlib/Data/List/NatAntidiagonal.lean
68
73
theorem antidiagonal_succ {n : ℕ} : antidiagonal (n + 1) = (0, n + 1) :: (antidiagonal n).map (Prod.map Nat.succ id) := by
simp only [antidiagonal, range_succ_eq_map, map_cons, true_and_iff, Nat.add_succ_sub_one, Nat.add_zero, id, eq_self_iff_true, Nat.sub_zero, map_map, Prod.map_mk] apply congr rfl (congr rfl _) ext; simp
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n", " (i, n - i).1 + (i, n - i).2 = n", " x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x", " ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x", "...
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n", " (i, n - i).1 + (i, n - i).2 = n", " x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x", " ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x", "...
import Mathlib.LinearAlgebra.Matrix.DotProduct import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal #align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7" open Matrix namespace Matrix open FiniteDimensional variable {l m n ...
Mathlib/Data/Matrix/Rank.lean
55
56
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
[ " rank 1 = Fintype.card n", " rank 0 = 0" ]
[ " rank 1 = Fintype.card n" ]
import Mathlib.MeasureTheory.Constructions.Pi import Mathlib.MeasureTheory.Integral.Lebesgue open scoped Classical ENNReal open Set Function Equiv Finset noncomputable section namespace MeasureTheory section LMarginal variable {δ δ' : Type*} {π : δ → Type*} [∀ x, MeasurableSpace (π x)] variable {μ : ∀ i, Measu...
Mathlib/MeasureTheory/Integral/Marginal.lean
88
96
theorem _root_.Measurable.lmarginal (hf : Measurable f) : Measurable (∫⋯∫⁻_s, f ∂μ) := by
refine Measurable.lintegral_prod_right ?_ refine hf.comp ?_ rw [measurable_pi_iff]; intro i by_cases hi : i ∈ s · simp [hi, updateFinset] exact measurable_pi_iff.1 measurable_snd _ · simp [hi, updateFinset] exact measurable_pi_iff.1 measurable_fst _
[ " Measurable (∫⋯∫⁻_s, f ∂μ)", " Measurable (uncurry fun x y => f (updateFinset x s y))", " Measurable fun a => updateFinset a.1 s a.2", " ∀ (a : δ), Measurable fun x => updateFinset x.1 s x.2 a", " Measurable fun x => updateFinset x.1 s x.2 i", " Measurable fun x => x.2 ⟨i, ⋯⟩", " Measurable fun x => x....
[]
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*} variable [TopologicalSpace α] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
89
91
theorem mem_nhdsWithin {t : Set α} {a : α} {s : Set α} : t ∈ 𝓝[s] a ↔ ∃ u, IsOpen u ∧ a ∈ u ∧ u ∩ s ⊆ t := by
simpa only [and_assoc, and_left_comm] using (nhdsWithin_basis_open a s).mem_iff
[ " (∃ᶠ (x : α) in 𝓝 z, x ∈ s ∧ p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s", " z ∈ closure (s \\ {z}) ↔ ∃ᶠ (x : α) in 𝓝[≠] z, x ∈ s", " (∀ᶠ (y : α) in 𝓝[s] a, ∀ᶠ (x : α) in 𝓝[s] y, p x) ↔ ∀ᶠ (x : α) in 𝓝[s] a, p x", " ∀ᶠ (x : α) in 𝓝[s] a, p x", " ∀ᶠ (x : α) in 𝓝 a, x ∈ s → p x", " 𝓝[univ] a = 𝓝 a", ...
[ " (∃ᶠ (x : α) in 𝓝 z, x ∈ s ∧ p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s", " z ∈ closure (s \\ {z}) ↔ ∃ᶠ (x : α) in 𝓝[≠] z, x ∈ s", " (∀ᶠ (y : α) in 𝓝[s] a, ∀ᶠ (x : α) in 𝓝[s] y, p x) ↔ ∀ᶠ (x : α) in 𝓝[s] a, p x", " ∀ᶠ (x : α) in 𝓝[s] a, p x", " ∀ᶠ (x : α) in 𝓝 a, x ∈ s → p x", " 𝓝[univ] a = 𝓝 a" ]
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ s₂ t₁ t₂ : Set X} {x : X} theorem nhdsSet_diagonal (X) [T...
Mathlib/Topology/NhdsSet.lean
110
112
theorem nhdsSet_eq_principal_iff : 𝓝ˢ s = 𝓟 s ↔ IsOpen s := by
rw [← principal_le_nhdsSet.le_iff_eq, le_principal_iff, mem_nhdsSet_iff_forall, isOpen_iff_mem_nhds]
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x", " 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f", " s ⊆ interior t ↔ t ∈ 𝓝ˢ s", " Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)", " ...
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x", " 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f", " s ⊆ interior t ↔ t ∈ 𝓝ˢ s", " Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)", " ...
import Mathlib.Data.Set.Image #align_import data.nat.set from "leanprover-community/mathlib"@"cf9386b56953fb40904843af98b7a80757bbe7f9" namespace Nat section Set open Set theorem zero_union_range_succ : {0} ∪ range succ = univ := by ext n cases n <;> simp #align nat.zero_union_range_succ Nat.zero_union_ran...
Mathlib/Data/Nat/Set.lean
37
46
theorem range_rec {α : Type*} (x : α) (f : ℕ → α → α) : (Set.range fun n => Nat.rec x f n : Set α) = {x} ∪ Set.range fun n => Nat.rec (f 0 x) (f ∘ succ) n := by
convert (range_of_succ (fun n => Nat.rec x f n : ℕ → α)).symm using 4 dsimp rename_i n induction' n with n ihn · rfl · dsimp at ihn ⊢ rw [ihn]
[ " {0} ∪ range succ = univ", " n ∈ {0} ∪ range succ ↔ n ∈ univ", " 0 ∈ {0} ∪ range succ ↔ 0 ∈ univ", " n✝ + 1 ∈ {0} ∪ range succ ↔ n✝ + 1 ∈ univ", " range succ = {i | 0 < i}", " 0 ∈ range succ ↔ 0 ∈ {i | 0 < i}", " i + 1 ∈ range succ ↔ i + 1 ∈ {i | 0 < i}", " {f 0} ∪ range (f ∘ succ) = range f", " (r...
[ " {0} ∪ range succ = univ", " n ∈ {0} ∪ range succ ↔ n ∈ univ", " 0 ∈ {0} ∪ range succ ↔ 0 ∈ univ", " n✝ + 1 ∈ {0} ∪ range succ ↔ n✝ + 1 ∈ univ", " range succ = {i | 0 < i}", " 0 ∈ range succ ↔ 0 ∈ {i | 0 < i}", " i + 1 ∈ range succ ↔ i + 1 ∈ {i | 0 < i}", " {f 0} ∪ range (f ∘ succ) = range f" ]
import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.integer from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" variable {R : Type*} [CommSemiring R] {M : Submonoid R} {S : Type*} [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] open ...
Mathlib/RingTheory/Localization/Integer.lean
149
159
theorem finsetIntegerMultiple_image [DecidableEq R] (s : Finset S) : algebraMap R S '' finsetIntegerMultiple M s = commonDenomOfFinset M s • (s : Set S) := by
delta finsetIntegerMultiple commonDenom rw [Finset.coe_image] ext constructor · rintro ⟨_, ⟨x, -, rfl⟩, rfl⟩ rw [map_integerMultiple] exact Set.mem_image_of_mem _ x.prop · rintro ⟨x, hx, rfl⟩ exact ⟨_, ⟨⟨x, hx⟩, s.mem_attach _, rfl⟩, map_integerMultiple M s id _⟩
[ " IsInteger R (a • b)", " (algebraMap R S) (a * b') = a • b", " ∃ b, IsInteger R (↑b • a)", " ∃ b, IsInteger R (a * (algebraMap R S) ↑b)", " ∃ b, ∀ i ∈ s, IsInteger R (↑b • f i)", " R", " (algebraMap R S) (↑(∏ j ∈ s.erase i, (sec M (f j)).2) * (sec M (f i)).1) = ↑(∏ i ∈ s, (sec M (f i)).2) • f i", " (...
[ " IsInteger R (a • b)", " (algebraMap R S) (a * b') = a • b", " ∃ b, IsInteger R (↑b • a)", " ∃ b, IsInteger R (a * (algebraMap R S) ↑b)", " ∃ b, ∀ i ∈ s, IsInteger R (↑b • f i)", " R", " (algebraMap R S) (↑(∏ j ∈ s.erase i, (sec M (f j)).2) * (sec M (f i)).1) = ↑(∏ i ∈ s, (sec M (f i)).2) • f i", " (...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
393
396
theorem HasStrictFDerivAt.comp_hasStrictDerivAt_of_eq (hl : HasStrictFDerivAt l l' y) (hf : HasStrictDerivAt f f' x) (hy : y = f x) : HasStrictDerivAt (l ∘ f) (l' f') x := by
rw [hy] at hl; exact hl.comp_hasStrictDerivAt x hf
[ " HasDerivWithinAt (l ∘ f) (l' f') s x", " HasDerivAt (l ∘ f) (l' f') x", " HasStrictDerivAt (l ∘ f) (l' f') x" ]
[ " HasDerivWithinAt (l ∘ f) (l' f') s x", " HasDerivAt (l ∘ f) (l' f') x", " HasStrictDerivAt (l ∘ f) (l' f') x" ]
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {...
Mathlib/ModelTheory/Semantics.lean
130
134
theorem realize_subst {t : L.Term α} {tf : α → L.Term β} {v : β → M} : (t.subst tf).realize v = t.realize fun a => (tf a).realize v := by
induction' t with _ _ _ _ ih · rfl · simp [ih]
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)", " realize v (f.apply₁ t) = funMap f ![realize v t]", " (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]", " real...
[ " realize v (relabel g t) = realize (v ∘ g) t", " realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)", " realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)", " realize v (f.apply₁ t) = funMap f ![realize v t]", " (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]", " real...
import Mathlib.Algebra.Order.AbsoluteValue import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax import Mathlib.Algebra.Ring.Pi import Mathlib.GroupTheory.GroupAction.Pi import Mathlib.GroupTheory.GroupAction.Ring import Mathlib.Init.Align import Mathlib.Tactic.GCongr import Mathlib.Tactic...
Mathlib/Algebra/Order/CauSeq/Basic.lean
58
71
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) : ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _) have εK := div_pos (half_pos ε0) K0 refine ⟨_, εK, fun {a₁ a₂ b₁ b₂} ha₁ hb₂ h₁ h₂ => ?_⟩ replace ha₁ := lt_of_lt_of_le ha₁ (le_trans (le_max_left _ K₂) (le_max_right 1 _)) replace hb₂ := lt_of_lt_of_le hb₂ (le_trans (le_ma...
[ " abv (a₁ + a₂ - (b₁ + b₂)) < ε", " ∃ δ > 0,\n ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε", " abv (a₁ * a₂ - b₁ * b₂) < ε", " abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M" ]
[ " abv (a₁ + a₂ - (b₁ + b₂)) < ε" ]
import Mathlib.Algebra.Algebra.Hom import Mathlib.RingTheory.Ideal.Quotient #align_import algebra.ring_quot from "leanprover-community/mathlib"@"e5820f6c8fcf1b75bcd7738ae4da1c5896191f72" universe uR uS uT uA u₄ variable {R : Type uR} [Semiring R] variable {S : Type uS} [CommSemiring S] variable {T : Type uT} vari...
Mathlib/Algebra/RingQuot.lean
71
72
theorem Rel.sub_left {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r a b) : Rel r (a - c) (b - c) := by
simp only [sub_eq_add_neg, h.add_left]
[ " Rel r (a + b) (a + c)", " Rel r (b + a) (c + a)", " Rel r (-a) (-b)", " Rel r (a - c) (b - c)" ]
[ " Rel r (a + b) (a + c)", " Rel r (b + a) (c + a)", " Rel r (-a) (-b)" ]
import Mathlib.Algebra.Module.Zlattice.Basic import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.NumberTheory.NumberField.FractionalIdeal #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" variable (K : Type*) [F...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
302
308
theorem normAtPlace_eq_zero {x : E K} : (∀ w, normAtPlace w x = 0) ↔ x = 0 := by
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩ · ext w · exact norm_eq_zero'.mp (normAtPlace_apply_isReal w.prop _ ▸ h w.1) · exact norm_eq_zero'.mp (normAtPlace_apply_isComplex w.prop _ ▸ h w.1) · simp_rw [h, map_zero, implies_true]
[ " Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))", " finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
[ " Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))", " finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
import Mathlib.Analysis.BoxIntegral.Partition.Basic #align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" noncomputable section open scoped Classical open Filter open Function Set Filter namespace BoxIntegral variable {ι M : Type*} {...
Mathlib/Analysis/BoxIntegral/Partition/Split.lean
84
85
theorem splitLower_eq_self : I.splitLower i x = I ↔ I.upper i ≤ x := by
simp [splitLower, update_eq_iff]
[ " ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}", " (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}", " (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}", " ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧...
[ " ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}", " (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}", " (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}", " ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧...
import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.Asymptotics.Theta import Mathlib.Analysis.Normed.Order.Basic #align_import analysis.asymptotics.asymptotic_equivalent from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" namespace Asymptotics open Filter Function ...
Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
133
136
theorem isEquivalent_zero_iff_isBigO_zero : u ~[l] 0 ↔ u =O[l] (0 : α → β) := by
refine ⟨IsEquivalent.isBigO, fun h ↦ ?_⟩ rw [isEquivalent_zero_iff_eventually_zero, eventuallyEq_iff_exists_mem] exact ⟨{ x : α | u x = 0 }, isBigO_zero_right_iff.mp h, fun x hx ↦ hx⟩
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u", " u ~[l] 0 ↔ u =ᶠ[l] 0", " u =o[l] 0 ↔ u =ᶠ[l] 0", " u ~[l] 0 ↔ u =O[l] 0", " u ~[l] 0", " ∃ s ∈ l, Set.EqOn u 0 s" ]
[ " v =O[l] u", " u x✝ = (u - v) x✝ + v x✝", " u ~[l] u", " 0 =o[l] u", " u ~[l] 0 ↔ u =ᶠ[l] 0", " u =o[l] 0 ↔ u =ᶠ[l] 0" ]
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
259
265
theorem Monic.irreducible_iff_natDegree (hp : p.Monic) : Irreducible p ↔ p ≠ 1 ∧ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0 := by
by_cases hp1 : p = 1; · simp [hp1] rw [irreducible_of_monic hp hp1, and_iff_right hp1] refine forall₄_congr fun a b ha hb => ?_ rw [ha.natDegree_eq_zero_iff_eq_one, hb.natDegree_eq_zero_iff_eq_one]
[ " Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1", " (g * C f.leadingCoeff).Monic", " (f * C g.leadingCoeff).Monic", " g * C f.leadingCoeff * (f * C g.leadingCoeff) = p", " Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = ...
[ " Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1", " (g * C f.leadingCoeff).Monic", " (f * C g.leadingCoeff).Monic", " g * C f.leadingCoeff * (f * C g.leadingCoeff) = p" ]
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {α β : Type*} {n : ℕ} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
73
78
theorem card_filter_univ_eq_vector_get_eq_count [DecidableEq α] (a : α) (v : Vector α n) : (univ.filter fun i => a = v.get i).card = v.toList.count a := by
induction' v with n x xs hxs · simp · simp_rw [card_filter_univ_succ', Vector.get_cons_zero, Vector.toList_cons, Function.comp, Vector.get_cons_succ, hxs, List.count_cons, add_comm (ite (a = x) 1 0)]
[ " map valEmbedding univ = Iio n", " a✝ ∈ map valEmbedding univ ↔ a✝ ∈ Iio n", " ↑(Ioi 0) = ↑(map (succEmb n) univ)", " x✝ ∈ ↑(Ioi 0) ↔ x✝ ∈ ↑(map (succEmb n) univ)", " ↑(Iio (last n)) = ↑(map castSuccEmb univ)", " x✝ ∈ ↑(Iio (last n)) ↔ x✝ ∈ ↑(map castSuccEmb univ)", " Ioi i.succ = map (succEmb n) (Ioi ...
[ " map valEmbedding univ = Iio n", " a✝ ∈ map valEmbedding univ ↔ a✝ ∈ Iio n", " ↑(Ioi 0) = ↑(map (succEmb n) univ)", " x✝ ∈ ↑(Ioi 0) ↔ x✝ ∈ ↑(map (succEmb n) univ)", " ↑(Iio (last n)) = ↑(map castSuccEmb univ)", " x✝ ∈ ↑(Iio (last n)) ↔ x✝ ∈ ↑(map castSuccEmb univ)", " Ioi i.succ = map (succEmb n) (Ioi ...
import Mathlib.CategoryTheory.Opposites #align_import category_theory.eq_to_hom from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe v₁ v₂ v₃ u₁ u₂ u₃ -- morphism levels before object levels. See note [CategoryTheory universes]. namespace CategoryTheory open Opposite variable ...
Mathlib/CategoryTheory/EqToHom.lean
95
98
theorem eqToHom_iso_inv_naturality {f g : β → C} (z : ∀ b, f b ≅ g b) {j j' : β} (w : j = j') : (z j).inv ≫ eqToHom (by simp [w]) = eqToHom (by simp [w]) ≫ (z j').inv := by
cases w simp
[ " X ⟶ Y", " Y ⟶ Y", " eqToHom p ≫ eqToHom q = eqToHom ⋯", " eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯", " eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯", " f = (f ≫ eqToHom p) ≫ eqToHom ⋯", " f ≫ eqToHom p = g", " g = eqToHom ⋯ ≫ eqToHom p ≫ g", " eqToHom p ≫ eqToHom ⋯ ≫ f = f", " g j = g j'", " f j = f j'", " z ...
[ " X ⟶ Y", " Y ⟶ Y", " eqToHom p ≫ eqToHom q = eqToHom ⋯", " eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯", " eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯", " f = (f ≫ eqToHom p) ≫ eqToHom ⋯", " f ≫ eqToHom p = g", " g = eqToHom ⋯ ≫ eqToHom p ≫ g", " eqToHom p ≫ eqToHom ⋯ ≫ f = f", " g j = g j'", " f j = f j'", " z ...
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Measure.Haar.Quotient import Mathlib.MeasureTheory.Constructions.Polish import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Topology.Algebra.Order.Floor #align_import measure_theory.integral.periodic from "leanprover-c...
Mathlib/MeasureTheory/Integral/Periodic.lean
287
306
theorem intervalIntegral_add_zsmul_eq (hf : Periodic f T) (n : ℤ) (t : ℝ) (h_int : ∀ t₁ t₂, IntervalIntegrable f MeasureSpace.volume t₁ t₂) : ∫ x in t..t + n • T, f x = n • ∫ x in t..t + T, f x := by
-- Reduce to the case `b = 0` suffices (∫ x in (0)..(n • T), f x) = n • ∫ x in (0)..T, f x by simp only [hf.intervalIntegral_add_eq t 0, (hf.zsmul n).intervalIntegral_add_eq t 0, zero_add, this] -- First prove it for natural numbers have : ∀ m : ℕ, (∫ x in (0)..m • T, f x) = m • ∫ x in (0)..T, f x :=...
[ " IsAddFundamentalDomain (↥(zmultiples T)) (Ioc t (t + T)) μ", " ∃! g, g +ᵥ x ∈ Ioc t (t + T)", " ∃! x_1, codRestrict (fun n => n • T) ↑(zmultiples T) ⋯ x_1 +ᵥ x ∈ Ioc t (t + T)", " IsAddFundamentalDomain (↥(zmultiples T).op) (Ioc t (t + T)) μ", " ∃! x_1, (⇑(zmultiples T).equivOp ∘ codRestrict (fun n => n •...
[ " IsAddFundamentalDomain (↥(zmultiples T)) (Ioc t (t + T)) μ", " ∃! g, g +ᵥ x ∈ Ioc t (t + T)", " ∃! x_1, codRestrict (fun n => n • T) ↑(zmultiples T) ⋯ x_1 +ᵥ x ∈ Ioc t (t + T)", " IsAddFundamentalDomain (↥(zmultiples T).op) (Ioc t (t + T)) μ", " ∃! x_1, (⇑(zmultiples T).equivOp ∘ codRestrict (fun n => n •...
import Mathlib.Algebra.Module.Defs import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.TensorProduct.Tower #align_import algebra.module.projective from "leanprover-community/mathlib"@"405ea5cee7a7070ff8fb8dcb4cfb003532e34bce" universe u v open LinearMap ...
Mathlib/Algebra/Module/Projective.lean
98
116
theorem projective_lifting_property [h : Projective R P] (f : M →ₗ[R] N) (g : P →ₗ[R] N) (hf : Function.Surjective f) : ∃ h : P →ₗ[R] M, f.comp h = g := by
/- Here's the first step of the proof. Recall that `X →₀ R` is Lean's way of talking about the free `R`-module on a type `X`. The universal property `Finsupp.total` says that to a map `X → N` from a type to an `R`-module, we get an associated R-module map `(X →₀ R) →ₗ N`. Apply this to a (noncomp...
[ " Projective R P ↔ ∃ s, Finsupp.total P P R id ∘ₗ s = LinearMap.id", " ∃ h, f ∘ₗ h = g", " f ∘ₗ φ ∘ₗ s = g", " (f ∘ₗ φ ∘ₗ s) p = g p", "R : Type u_1\ninst✝⁶ : Semiring R\nP : Type u_2\ninst✝⁵ : AddCommMonoid P\ninst✝⁴ : Module R P\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nN : Type u_4\ni...
[ " Projective R P ↔ ∃ s, Finsupp.total P P R id ∘ₗ s = LinearMap.id" ]
import Mathlib.Data.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign theorem sign_of_neg {r : ℝ} (hr : r < 0) : si...
Mathlib/Data/Real/Sign.lean
92
98
theorem sign_mul_nonneg (r : ℝ) : 0 ≤ sign r * r := by
obtain hn | rfl | hp := lt_trichotomy r (0 : ℝ) · rw [sign_of_neg hn] exact mul_nonneg_of_nonpos_of_nonpos (by norm_num) hn.le · rw [mul_zero] · rw [sign_of_pos hp, one_mul] exact hp.le
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0", " 0 ≤...
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0" ]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.HasseDeriv #align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace Polynomial open Polynomial...
Mathlib/Algebra/Polynomial/Taylor.lean
98
102
theorem natDegree_taylor (p : R[X]) (r : R) : natDegree (taylor r p) = natDegree p := by
refine map_natDegree_eq_natDegree _ ?_ nontriviality R intro n c c0 simp [taylor_monomial, natDegree_C_mul_eq_of_mul_ne_zero, natDegree_pow_X_add_C, c0]
[ " { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono...
[ " { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono...
import Mathlib.SetTheory.Game.State #align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225" namespace SetTheory namespace PGame namespace Domineering open Function @[simps!] def shiftUp : ℤ × ℤ ≃ ℤ × ℤ := (Equiv.refl ℤ).prodCongr (Equiv.addRig...
Mathlib/SetTheory/Game/Domineering.lean
93
98
theorem card_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) : 2 ≤ Finset.card b := by
have w₁ : m ∈ b := (Finset.mem_inter.1 h).1 have w₂ : (m.1, m.2 - 1) ∈ b.erase m := snd_pred_mem_erase_of_mem_left h have i₁ := Finset.card_erase_lt_of_mem w₁ have i₂ := Nat.lt_of_le_of_lt (Nat.zero_le _) (Finset.card_erase_lt_of_mem w₂) exact Nat.lt_of_le_of_lt i₂ i₁
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m", " 2 ≤ Finset.card b" ]
[ " (m.1 - 1, m.2) ∈ Finset.erase b m", " (m.1 - 1, m.2) ≠ m", " (m.1, m.2 - 1) ∈ Finset.erase b m", " (m.1, m.2 - 1) ≠ m" ]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.ModEq import Mathlib.Data.Set.Finite #align_import combinatorics.pigeonhole from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" un...
Mathlib/Combinatorics/Pigeonhole.lean
134
141
theorem exists_lt_sum_fiber_of_sum_fiber_nonpos_of_nsmul_lt_sum (ht : ∀ y ∉ t, ∑ x ∈ s.filter fun x => f x = y, w x ≤ 0) (hb : t.card • b < ∑ x ∈ s, w x) : ∃ y ∈ t, b < ∑ x ∈ s.filter fun x => f x = y, w x := exists_lt_of_sum_lt <| calc ∑ _y ∈ t, b < ∑ x ∈ s, w x := by
simpa _ ≤ ∑ y ∈ t, ∑ x ∈ s.filter fun x => f x = y, w x := sum_le_sum_fiberwise_of_sum_fiber_nonpos ht
[ " ∑ i ∈ t, b < ∑ i ∈ t, ∑ x ∈ filter (fun x => f x = i) s, w x", " ∑ _y ∈ t, b < ∑ x ∈ s, w x" ]
[ " ∑ i ∈ t, b < ∑ i ∈ t, ∑ x ∈ filter (fun x => f x = i) s, w x" ]
import Mathlib.Data.Complex.Basic import Mathlib.MeasureTheory.Integral.CircleIntegral #align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" open Set MeasureTheory Metric Filter Function open scoped Interval Real noncomputable secti...
Mathlib/MeasureTheory/Integral/CircleTransform.lean
68
72
theorem integral_circleTransform (f : ℂ → E) : (∫ θ : ℝ in (0)..2 * π, circleTransform R z w f θ) = (2 * ↑π * I)⁻¹ • ∮ z in C(z, R), (z - w)⁻¹ • f z := by
simp_rw [circleTransform, circleIntegral, deriv_circleMap, circleMap] simp
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section General variable {α : Type*} {g : Gen...
Mathlib/Algebra/ContinuedFractions/Translations.lean
45
46
theorem terminatedAt_iff_part_num_none : g.TerminatedAt n ↔ g.partialNumerators.get? n = none := by
rw [terminatedAt_iff_s_none, part_num_none_iff_s_none]
[ " g.TerminatedAt n ↔ g.s.TerminatedAt n", " g.TerminatedAt n ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ none = none", " g.partialNumerators.get? n = none ↔ some val✝ = none", " g.TerminatedAt n ↔ g.partialNumerators.get? n = none" ...
[ " g.TerminatedAt n ↔ g.s.TerminatedAt n", " g.TerminatedAt n ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ none = none", " g.partialNumerators.get? n = none ↔ some val✝ = none" ]
import Mathlib.Algebra.Ring.Prod import Mathlib.GroupTheory.OrderOfElement import Mathlib.Tactic.FinCases #align_import data.zmod.basic from "leanprover-community/mathlib"@"74ad1c88c77e799d2fea62801d1dbbd698cff1b7" assert_not_exists Submodule open Function namespace ZMod instance charZero : CharZero (ZMod 0) :=...
Mathlib/Data/ZMod/Basic.lean
94
96
theorem val_unit' {n : ZMod 0} : IsUnit n ↔ n.val = 1 := by
simp only [val] rw [Int.isUnit_iff, Int.natAbs_eq_iff, Nat.cast_one]
[ " a.val < n", " a.val < 0", " a.val < n✝ + 1", " (↑a).val = a % n", " (↑a).val = a % 0", " (↑a).val = a", " (↑a).val = a % (n✝ + 1)", " IsUnit n ↔ n.val = 1", " IsUnit n ↔ Int.natAbs n = 1" ]
[ " a.val < n", " a.val < 0", " a.val < n✝ + 1", " (↑a).val = a % n", " (↑a).val = a % 0", " (↑a).val = a", " (↑a).val = a % (n✝ + 1)" ]
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {α : Type u} class OrderedAddCommGroup (α : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
382
384
theorem inv_lt_inv_iff : a⁻¹ < b⁻¹ ↔ b < a := by
rw [← mul_lt_mul_iff_left a, ← mul_lt_mul_iff_right b] simp
[ " b ≤ c", " a⁻¹ < b⁻¹ ↔ b < a", " a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a" ]
[ " b ≤ c" ]
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Group.Int import Mathlib.Data.Nat.Dist import Mathlib.Data.Ordmap.Ordnode import Mathlib.Tactic.Abel import Mathlib.Tactic.Linarith #align_import data.ordmap.ordset from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69" variable...
Mathlib/Data/Ordmap/Ordset.lean
144
145
theorem Sized.pos {s l x r} (h : Sized (@node α s l x r)) : 0 < s := by
rw [h.1]; apply Nat.le_add_left
[ " 0 < delta", " a ≤ delta * (delta * a)", " 1 ≤ delta * delta", " node s l x r = l.node' x r", " C t", " C nil", " C (node size✝ l✝ x✝ r✝)", " C (l✝.node' x✝ r✝)", " (node s l x r).size = (node s l x r).realSize", " (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s...
[ " 0 < delta", " a ≤ delta * (delta * a)", " 1 ≤ delta * delta", " node s l x r = l.node' x r", " C t", " C nil", " C (node size✝ l✝ x✝ r✝)", " C (l✝.node' x✝ r✝)", " (node s l x r).size = (node s l x r).realSize", " (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s...
import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.prod from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal ...
Mathlib/Analysis/Calculus/FDeriv/Prod.lean
474
480
theorem hasFDerivWithinAt_apply (i : ι) (f : ∀ i, F' i) (s' : Set (∀ i, F' i)) : HasFDerivWithinAt (𝕜:=𝕜) (fun f : ∀ i, F' i => f i) (proj i) s' f := by
let id' := ContinuousLinearMap.id 𝕜 (∀ i, F' i) have h := ((hasFDerivWithinAt_pi' (Φ := fun (f : ∀ i, F' i) (i' : ι) => f i') (Φ':=id') (x:=f) (s:=s'))).1 have h' : comp (proj i) id' = proj i := by rfl rw [← h']; apply h; apply hasFDerivWithinAt_id
[ " HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x", " ((fun p => Φ p.1 - Φ p.2 - Φ' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n ∀ (i : ι), (fun p => Φ p.1 i - Φ p.2 i - ((proj i).comp Φ') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2", " HasStrictFDerivAt ...
[ " HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x", " ((fun p => Φ p.1 - Φ p.2 - Φ' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n ∀ (i : ι), (fun p => Φ p.1 i - Φ p.2 i - ((proj i).comp Φ') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2", " HasStrictFDerivAt ...
import Batteries.Tactic.Lint.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Order import Mathlib.Init.Data.Int.Order set_option autoImplicit true namespace Linarith theorem lt_irrefl {α : Type u} ...
Mathlib/Tactic/Linarith/Lemmas.lean
39
40
theorem lt_of_lt_of_eq {α} [OrderedSemiring α] {a b : α} (ha : a < 0) (hb : b = 0) : a + b < 0 := by
simp [*]
[ " a + b = 0", " a + b ≤ 0", " a + b < 0" ]
[ " a + b = 0", " a + b ≤ 0", " a + b < 0" ]
import Mathlib.Analysis.InnerProductSpace.Spectrum import Mathlib.Data.Matrix.Rank import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Hermitian #align_import linear_algebra.matrix.spectrum from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/Spectrum.lean
82
84
theorem star_eigenvectorUnitary_mulVec (j : n) : (star (eigenvectorUnitary hA : Matrix n n 𝕜)) *ᵥ ⇑(hA.eigenvectorBasis j) = Pi.single j 1 := by
rw [← eigenvectorUnitary_mulVec, mulVec_mulVec, unitary.coe_star_mul_self, one_mulVec]
[ " A *ᵥ (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j) =\n hA.eigenvalues j • (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)", " ↑hA.eigenvectorUnitary *ᵥ Pi.single j 1 = (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)", " star ↑hA.eigenvectorUn...
[ " A *ᵥ (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j) =\n hA.eigenvalues j • (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)", " ↑hA.eigenvectorUnitary *ᵥ Pi.single j 1 = (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)" ]
import Mathlib.LinearAlgebra.Matrix.Trace #align_import data.matrix.hadamard from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" variable {α β γ m n : Type*} variable {R : Type*} namespace Matrix open Matrix def hadamard [Mul α] (A : Matrix m n α) (B : Matrix m n α) : Matrix m n α :...
Mathlib/Data/Matrix/Hadamard.lean
121
123
theorem one_hadamard : (1 : Matrix n n α) ⊙ M = diagonal fun i => M i i := by
ext i j by_cases h : i = j <;> simp [h]
[ " M ⊙ 1 = diagonal fun i => M i i", " (M ⊙ 1) i j = diagonal (fun i => M i i) i j", " 1 ⊙ M = diagonal fun i => M i i", " (1 ⊙ M) i j = diagonal (fun i => M i i) i j" ]
[ " M ⊙ 1 = diagonal fun i => M i i", " (M ⊙ 1) i j = diagonal (fun i => M i i) i j" ]
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Order.Hom.Basic #align_import algebra.lie.solvable from "leanprover-community/mathlib"@"a50170a88a47570ed186b809ca754110590f9476" universe u v w w₁ w₂ variable (R : Type u) (L : Type v) (M : Type w) {L' : Type w₁} variab...
Mathlib/Algebra/Lie/Solvable.lean
136
138
theorem abelian_iff_derived_succ_eq_bot (I : LieIdeal R L) (k : ℕ) : IsLieAbelian (derivedSeriesOfIdeal R L k I) ↔ derivedSeriesOfIdeal R L (k + 1) I = ⊥ := by
rw [add_comm, derivedSeriesOfIdeal_add I 1 k, abelian_iff_derived_one_eq_bot]
[ " D (k + l) I = D k (D l I)", " D (0 + l) I = D 0 (D l I)", " D (k + 1 + l) I = D (k + 1) (D l I)", " D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J", " ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J", " D 0 I ≤ D l J", " I ≤ D 0 J", " D (k + 1) I ≤ D l J", "...
[ " D (k + l) I = D k (D l I)", " D (0 + l) I = D 0 (D l I)", " D (k + 1 + l) I = D (k + 1) (D l I)", " D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J", " ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J", " ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J", " D 0 I ≤ D l J", " I ≤ D 0 J", " D (k + 1) I ≤ D l J", "...
import Mathlib.CategoryTheory.Limits.Shapes.CommSq import Mathlib.CategoryTheory.Limits.Shapes.Diagonal import Mathlib.CategoryTheory.MorphismProperty.Composition universe v u namespace CategoryTheory open Limits namespace MorphismProperty variable {C : Type u} [Category.{v} C] def StableUnderBaseChange (P : ...
Mathlib/CategoryTheory/MorphismProperty/Limits.lean
95
112
theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C} (hP : StableUnderBaseChange P) [P.IsStableUnderComposition] {S X X' Y Y' : C} {f : X ⟶ S} {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂) (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') : ...
have : pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁) ((Category.comp_id _).trans e₂) = ((pullbackSymmetry _ _).hom ≫ ((Over.baseChange _).map (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g')).left) ≫ (pullbackSymmetry _ _).hom ≫ ((Over.baseChange g')...
[ " P g'", " P pullback.fst", " P.RespectsIso", " ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom", " P f.hom → P g.hom", " P ((Over.baseChange f).map g).left", " e.inv ≫ pullback.snd = ((Over.baseChange f).map g).left", " (e.inv ≫ pullback.snd) ≫ pullback.fst = ((Over.baseChange f).map g).left ≫ pullbac...
[ " P g'", " P pullback.fst", " P.RespectsIso", " ∀ (f g : Arrow C), (f ≅ g) → P f.hom → P g.hom", " P f.hom → P g.hom", " P ((Over.baseChange f).map g).left", " e.inv ≫ pullback.snd = ((Over.baseChange f).map g).left", " (e.inv ≫ pullback.snd) ≫ pullback.fst = ((Over.baseChange f).map g).left ≫ pullbac...
import Mathlib.Analysis.InnerProductSpace.Rayleigh import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Algebra.DirectSum.Decomposition import Mathlib.LinearAlgebra.Eigenspace.Minpoly #align_import analysis.inner_product_space.spectrum from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da...
Mathlib/Analysis/InnerProductSpace/Spectrum.lean
76
79
theorem conj_eigenvalue_eq_self {μ : 𝕜} (hμ : HasEigenvalue T μ) : conj μ = μ := by
obtain ⟨v, hv₁, hv₂⟩ := hμ.exists_hasEigenvector rw [mem_eigenspace_iff] at hv₁ simpa [hv₂, inner_smul_left, inner_smul_right, hv₁] using hT v v
[ " T v ∈ (eigenspace T μ)ᗮ", " ⟪w, T v⟫_𝕜 = 0", " T w = μ • w", " (starRingEnd 𝕜) μ = μ" ]
[ " T v ∈ (eigenspace T μ)ᗮ", " ⟪w, T v⟫_𝕜 = 0", " T w = μ • w" ]
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b...
Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
139
141
theorem neg (hf : IsBoundedLinearMap 𝕜 f) : IsBoundedLinearMap 𝕜 fun e => -f e := by
rw [show (fun e => -f e) = fun e => (-1 : 𝕜) • f e by funext; simp] exact smul (-1) hf
[ " ∀ (x : E), ‖0 x‖ ≤ 0 * ‖x‖", " ∀ (x : E), ‖LinearMap.id x‖ ≤ 1 * ‖x‖", " IsBoundedLinearMap 𝕜 fun x => x.1", " ‖(LinearMap.fst 𝕜 E F) x‖ ≤ 1 * ‖x‖", " ‖(LinearMap.fst 𝕜 E F) x‖ ≤ ‖x‖", " IsBoundedLinearMap 𝕜 fun x => x.2", " ‖(LinearMap.snd 𝕜 E F) x‖ ≤ 1 * ‖x‖", " ‖(LinearMap.snd 𝕜 E F) x‖ ≤ ‖...
[ " ∀ (x : E), ‖0 x‖ ≤ 0 * ‖x‖", " ∀ (x : E), ‖LinearMap.id x‖ ≤ 1 * ‖x‖", " IsBoundedLinearMap 𝕜 fun x => x.1", " ‖(LinearMap.fst 𝕜 E F) x‖ ≤ 1 * ‖x‖", " ‖(LinearMap.fst 𝕜 E F) x‖ ≤ ‖x‖", " IsBoundedLinearMap 𝕜 fun x => x.2", " ‖(LinearMap.snd 𝕜 E F) x‖ ≤ 1 * ‖x‖", " ‖(LinearMap.snd 𝕜 E F) x‖ ≤ ‖...
import Mathlib.Data.Matrix.Basic import Mathlib.Data.PEquiv #align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" namespace PEquiv open Matrix universe u v variable {k l m n : Type*} variable {α : Type v} open Matrix def toMatrix [DecidableEq n] [Zer...
Mathlib/Data/Matrix/PEquiv.lean
109
114
theorem toMatrix_trans [Fintype m] [DecidableEq m] [DecidableEq n] [Semiring α] (f : l ≃. m) (g : m ≃. n) : ((f.trans g).toMatrix : Matrix l n α) = f.toMatrix * g.toMatrix := by
ext i j rw [mul_matrix_apply] dsimp [toMatrix, PEquiv.trans] cases f i <;> simp
[ " (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j", " ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)", " ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none", " ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j...
[ " (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j", " ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)", " ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none", " ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j...
import Mathlib.Init.Data.Nat.Notation import Mathlib.Init.Order.Defs set_option autoImplicit true structure UFModel (n) where parent : Fin n → Fin n rank : Nat → Nat rank_lt : ∀ i, (parent i).1 ≠ i → rank i < rank (parent i) structure UFNode (α : Type*) where parent : Nat value : α rank : Nat inductive...
Mathlib/Data/UnionFind.lean
82
84
theorem get_eq {arr : Array α} {n} {m : Fin n → β} (H : Agrees arr f m) : ∀ i h₁ h₂, f (arr.get ⟨i, h₁⟩) = m ⟨i, h₂⟩ := by
cases H; exact fun i h _ ↦ rfl
[ " Agrees arr f g", " (fun i => f (arr.get i)) = g", " f (arr.get ⟨i, h⟩) = g ⟨i, h⟩", " Agrees arr f fun i => f (arr.get i)", " n = arr.size", " arr.size = arr.size", " ∀ (i : ℕ) (h₁ : i < arr.size) (h₂ : i < n), f (arr.get ⟨i, h₁⟩) = m ⟨i, h₂⟩", " ∀ (i : ℕ) (h₁ h₂ : i < arr.size), f (arr.get ⟨i, h₁⟩)...
[ " Agrees arr f g", " (fun i => f (arr.get i)) = g", " f (arr.get ⟨i, h⟩) = g ⟨i, h⟩", " Agrees arr f fun i => f (arr.get i)", " n = arr.size", " arr.size = arr.size" ]
import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.linear_pmap from "leanprover-community/mathlib"@"8b981918a93bc45a8600de608cde7944a80d92b9" universe u v w structure LinearPMap (R : Type u) [Ring R] (E : Type v) [AddCommGroup E] [Module R E] (F : Type w) [AddCommGroup F] [Module R F] where domai...
Mathlib/LinearAlgebra/LinearPMap.lean
151
157
theorem mkSpanSingleton'_apply (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) (c : R) (h) : mkSpanSingleton' x y H ⟨c • x, h⟩ = c • y := by
dsimp [mkSpanSingleton'] rw [← sub_eq_zero, ← sub_smul] apply H simp only [sub_smul, one_smul, sub_eq_zero] apply Classical.choose_spec (mem_span_singleton.1 h)
[ " f = g", " { domain := f_dom, toFun := f } = g", " { domain := f_dom, toFun := f } = { domain := g_dom, toFun := g }", " { domain := f_dom, toFun := f } = { domain := f_dom, toFun := g }", " { domain := f_dom, toFun := f } = { domain := f_dom, toFun := f }", " ↑f x = ↑f y", " x = y", " ∀ (c₁ c₂ : R),...
[ " f = g", " { domain := f_dom, toFun := f } = g", " { domain := f_dom, toFun := f } = { domain := g_dom, toFun := g }", " { domain := f_dom, toFun := f } = { domain := f_dom, toFun := g }", " { domain := f_dom, toFun := f } = { domain := f_dom, toFun := f }", " ↑f x = ↑f y", " x = y", " ∀ (c₁ c₂ : R),...
import Mathlib.Topology.Order.ProjIcc import Mathlib.Topology.CompactOpen import Mathlib.Topology.UnitInterval #align_import topology.path_connected from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter unitInterval Set Fun...
Mathlib/Topology/Connected/PathConnected.lean
165
165
theorem refl_range {a : X} : range (Path.refl a) = {a} := by
simp [Path.refl, CoeFun.coe]
[ " γ₁ = γ₂", " { toContinuousMap := toContinuousMap✝, source' := source'✝, target' := target'✝ } = γ₂", " { toContinuousMap := toContinuousMap✝¹, source' := source'✝¹, target' := target'✝¹ } =\n { toContinuousMap := toContinuousMap✝, source' := source'✝, target' := target'✝ }", " Continuous ⇑γ.toContinuousM...
[ " γ₁ = γ₂", " { toContinuousMap := toContinuousMap✝, source' := source'✝, target' := target'✝ } = γ₂", " { toContinuousMap := toContinuousMap✝¹, source' := source'✝¹, target' := target'✝¹ } =\n { toContinuousMap := toContinuousMap✝, source' := source'✝, target' := target'✝ }", " Continuous ⇑γ.toContinuousM...
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
40
47
theorem revAtFun_invol {N i : ℕ} : revAtFun N (revAtFun N i) = i := by
unfold revAtFun split_ifs with h j · exact tsub_tsub_cancel_of_le h · exfalso apply j exact Nat.sub_le N i · rfl
[ " 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" ]
[]
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Combinatorics.SimpleGraph.Dart import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Data.ZMod.Parity #align_import combinatorics.simple_graph.degree_sum from "leanprover-community/mathlib"@"90659cbe25e59ec302e2fb92b00e9732160cc620" open Finset nam...
Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean
88
95
theorem dart_edge_fiber_card [DecidableEq V] (e : Sym2 V) (h : e ∈ G.edgeSet) : (univ.filter fun d : G.Dart => d.edge = e).card = 2 := by
refine Sym2.ind (fun v w h => ?_) e h let d : G.Dart := ⟨(v, w), h⟩ convert congr_arg card d.edge_fiber rw [card_insert_of_not_mem, card_singleton] rw [mem_singleton] exact d.symm_ne.symm
[ " filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ", " d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ", " d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d", " d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d...
[ " filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ", " d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ", " d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d", " d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d...
import Mathlib.Analysis.BoxIntegral.Partition.Basic #align_import analysis.box_integral.partition.tagged from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" noncomputable section open scoped Classical open ENNReal NNReal open Set Function namespace BoxIntegral variable {ι : Type*} ...
Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
83
85
theorem mem_iUnion : x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J := by
convert Set.mem_iUnion₂ rw [Box.mem_coe, mem_toPrepartition, exists_prop]
[ " x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J", " x✝ ∈ π ∧ x ∈ x✝ ↔ ∃ (_ : x✝ ∈ π.toPrepartition), x ∈ ↑x✝" ]
[]
import Mathlib.GroupTheory.OrderOfElement import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Ideal.Quotient #align_import algebra.char_p.quotient from "leanprover-community/mathlib"@"85e3c05a94b27c84dc6f234cf88326d5e0096ec3" universe u v
Mathlib/Algebra/CharP/Quotient.lean
60
66
theorem Ideal.Quotient.index_eq_zero {R : Type*} [CommRing R] (I : Ideal R) : (↑I.toAddSubgroup.index : R ⧸ I) = 0 := by
rw [AddSubgroup.index, Nat.card_eq] split_ifs with hq; swap · simp letI : Fintype (R ⧸ I) := @Fintype.ofFinite _ hq exact Nat.cast_card_eq_zero (R ⧸ I)
[ " ↑(Submodule.toAddSubgroup I).index = 0", " ↑(if h : Finite (R ⧸ Submodule.toAddSubgroup I) then Fintype.card (R ⧸ Submodule.toAddSubgroup I) else 0) = 0", " ↑0 = 0", " ↑(Fintype.card (R ⧸ Submodule.toAddSubgroup I)) = 0" ]
[]
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
39
44
theorem convexOn_norm (hs : Convex ℝ s) : ConvexOn ℝ s norm := ⟨hs, fun x _ y _ a b ha hb _ => calc ‖a • x + b • y‖ ≤ ‖a • x‖ + ‖b • y‖ := norm_add_le _ _ _ = a * ‖x‖ + b * ‖y‖ := by
rw [norm_smul, norm_smul, Real.norm_of_nonneg ha, Real.norm_of_nonneg hb]⟩
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖" ]
[]
import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Nat.Choose.Vandermonde import Mathlib.Tactic.FieldSimp #align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358...
Mathlib/Algebra/Polynomial/HasseDeriv.lean
143
161
theorem factorial_smul_hasseDeriv : ⇑(k ! • @hasseDeriv R _ k) = (@derivative R _)^[k] := by
induction' k with k ih · rw [hasseDeriv_zero, factorial_zero, iterate_zero, one_smul, LinearMap.id_coe] ext f n : 2 rw [iterate_succ_apply', ← ih] simp only [LinearMap.smul_apply, coeff_smul, LinearMap.map_smul_of_tower, coeff_derivative, hasseDeriv_coeff, ← @choose_symm_add _ k] simp only [nsmul_eq_mu...
[ " (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)", "...
[ " (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)", "...
import Mathlib.Control.Traversable.Instances import Mathlib.Order.Filter.Basic #align_import order.filter.basic from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set List namespace Filter universe u variable {α β γ : Type u} {f : β → Filter α} {s : γ → Set α} theorem sequence_m...
Mathlib/Order/Filter/ListTraverse.lean
38
53
theorem mem_traverse_iff (fs : List β) (t : Set (List α)) : t ∈ traverse f fs ↔ ∃ us : List (Set α), Forall₂ (fun b (s : Set α) => s ∈ f b) fs us ∧ sequence us ⊆ t := by
constructor · induction fs generalizing t with | nil => simp only [sequence, mem_pure, imp_self, forall₂_nil_left_iff, exists_eq_left, Set.pure_def, singleton_subset_iff, traverse_nil] | cons b fs ih => intro ht rcases mem_seq_iff.1 ht with ⟨u, hu, v, hv, ht⟩ rcases mem_map_...
[ " t ∈ traverse f fs ↔ ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t", " t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t", " t ∈ traverse f [] → ∃ us, Forall₂ (fun b s => s ∈ f b) [] us ∧ sequence us ⊆ t", " t ∈ traverse f (b :: fs) → ∃ us, Forall₂ (fun b s => s ∈ f ...
[]
import Mathlib.Data.Opposite import Mathlib.Data.Set.Defs #align_import data.set.opposite from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" variable {α : Type*} open Opposite namespace Set protected def op (s : Set α) : Set αᵒᵖ := unop ⁻¹' s #align set.op Set.op protected def u...
Mathlib/Data/Set/Opposite.lean
76
80
theorem singleton_op (x : α) : ({x} : Set α).op = {op x} := by
ext constructor · apply unop_injective · apply op_injective
[ " { unop := a } ∈ s.op ↔ a ∈ s", " a.unop ∈ s.unop ↔ a ∈ s", " {x}.op = {{ unop := x }}", " x✝ ∈ {x}.op ↔ x✝ ∈ {{ unop := x }}", " x✝ ∈ {x}.op → x✝ ∈ {{ unop := x }}", " x✝ ∈ {{ unop := x }} → x✝ ∈ {x}.op" ]
[ " { unop := a } ∈ s.op ↔ a ∈ s", " a.unop ∈ s.unop ↔ a ∈ s" ]
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Data.Complex.Cardinality import Mathlib.Data.Fin.VecNotation import Mathlib.LinearAlgebra.FiniteDimensional #align_import data.complex.module from "leanprover-community/mathlib"@"c7bce2818663f456335892ddbdd1809f111a...
Mathlib/Data/Complex/Module.lean
125
127
theorem algHom_ext ⦃f g : ℂ →ₐ[ℝ] A⦄ (h : f I = g I) : f = g := by
ext ⟨x, y⟩ simp only [mk_eq_add_mul_I, AlgHom.map_add, AlgHom.map_coe_real_complex, AlgHom.map_mul, h]
[ " r • s • x = s • r • x", " (r • s • x).re = (s • r • x).re", " (r • s • x).im = (s • r • x).im", " (r • s) • x = r • s • x", " ((r • s) • x).re = (r • s • x).re", " ((r • s) • x).im = (r • s • x).im", " MulOpposite.op r • x = r • x", " (MulOpposite.op r • x).re = (r • x).re", " (MulOpposite.op r • ...
[ " r • s • x = s • r • x", " (r • s • x).re = (s • r • x).re", " (r • s • x).im = (s • r • x).im", " (r • s) • x = r • s • x", " ((r • s) • x).re = (r • s • x).re", " ((r • s) • x).im = (r • s • x).im", " MulOpposite.op r • x = r • x", " (MulOpposite.op r • x).re = (r • x).re", " (MulOpposite.op r • ...
import Batteries.Classes.SatisfiesM namespace Array theorem SatisfiesM_foldlM [Monad m] [LawfulMonad m] {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → m β} (hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → SatisfiesM (motive (i.1 + 1)) (f b as[i])) : SatisfiesM (motive...
.lake/packages/batteries/Batteries/Data/Array/Monadic.lean
62
83
theorem SatisfiesM_anyM [Monad m] [LawfulMonad m] (p : α → m Bool) (as : Array α) (start stop) (hstart : start ≤ min stop as.size) (tru : Prop) (fal : Nat → Prop) (h0 : fal start) (hp : ∀ i : Fin as.size, i.1 < stop → fal i.1 → SatisfiesM (bif · then tru else fal (i + 1)) (p as[i])) : SatisfiesM ...
let rec go {stop j} (hj' : j ≤ stop) (hstop : stop ≤ as.size) (h0 : fal j) (hp : ∀ i : Fin as.size, i.1 < stop → fal i.1 → SatisfiesM (bif · then tru else fal (i + 1)) (p as[i])) : SatisfiesM (fun res => bif res then tru else fal stop) (anyM.loop p as stop hstop j) := by unfold anyM.loo...
[ " SatisfiesM (motive as.size) (foldlM f init as 0)", " SatisfiesM (motive as.size) (foldlM.loop f as as.size ⋯ i j b)", " SatisfiesM (motive as.size)\n (if hlt : j < as.size then\n match i with\n | 0 => pure b\n | i'.succ =>\n let_fun this := ⋯;\n do\n let __do_lift ← f b ...
[ " SatisfiesM (motive as.size) (foldlM f init as 0)", " SatisfiesM (motive as.size) (foldlM.loop f as as.size ⋯ i j b)", " SatisfiesM (motive as.size)\n (if hlt : j < as.size then\n match i with\n | 0 => pure b\n | i'.succ =>\n let_fun this := ⋯;\n do\n let __do_lift ← f b ...
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ v₂ v₃ u₁ u₂ u₃ noncomputable s...
Mathlib/CategoryTheory/Adjunction/Reflective.lean
154
156
theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage) (f) : (unitCompPartialBijective A hB).symm f = (reflectorAdjunction i).unit.app A ≫ f := by
simp [unitCompPartialBijective, unitCompPartialBijectiveAux_symm_apply]
[ " (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =\n i.map ((reflector i).map ((reflectorAdjunction i).unit.app X))", " (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) ≫\n i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X)) =\n i.map\n ((reflector i).map...
[ " (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =\n i.map ((reflector i).map ((reflectorAdjunction i).unit.app X))", " (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) ≫\n i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X)) =\n i.map\n ((reflector i).map...
import Mathlib.Order.Filter.Cofinite import Mathlib.Order.Hom.CompleteLattice #align_import order.liminf_limsup from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" set_option autoImplicit true open Filter Set Function variable {α β γ ι ι' : Type*} namespace Filter section Relation ...
Mathlib/Order/LiminfLimsup.lean
80
80
theorem isBounded_top : IsBounded r ⊤ ↔ ∃ t, ∀ x, r x t := by
simp [IsBounded, eq_univ_iff_forall]
[ " IsBounded r ⊥ ↔ Nonempty α", " IsBounded r ⊤ ↔ ∃ t, ∀ (x : α), r x t" ]
[ " IsBounded r ⊥ ↔ Nonempty α" ]
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition open FiniteDimensional namespace Subalgebra variable {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] (A B : Subalgebra R S) [Module.Free R A] [Module.Free R...
Mathlib/Algebra/Algebra/Subalgebra/Rank.lean
47
49
theorem finrank_sup_eq_finrank_left_mul_finrank_of_free : finrank R ↥(A ⊔ B) = finrank R A * finrank A (Algebra.adjoin A (B : Set S)) := by
simpa only [map_mul] using congr(Cardinal.toNat $(rank_sup_eq_rank_left_mul_rank_of_free A B))
[ " Module.rank R ↥(A ⊔ B) = Module.rank R ↥A * Module.rank ↥A ↥(Algebra.adjoin ↥A ↑B)", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(Algebra.adjoin ↥A ↑B)", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(restrictScalars R (Algebra.adjoin ↥A ↑B))", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(Algebra.adjoin R (↑A ∪ ↑B)...
[ " Module.rank R ↥(A ⊔ B) = Module.rank R ↥A * Module.rank ↥A ↥(Algebra.adjoin ↥A ↑B)", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(Algebra.adjoin ↥A ↑B)", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(restrictScalars R (Algebra.adjoin ↥A ↑B))", " Module.rank R ↥(A ⊔ B) = Module.rank R ↥(Algebra.adjoin R (↑A ∪ ↑B)...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Topology.Instances.NNReal #align_import analysis.normed.group.infinite_sum from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Topology NNReal open Finset Filter Metric variabl...
Mathlib/Analysis/Normed/Group/InfiniteSum.lean
49
51
theorem summable_iff_vanishing_norm [CompleteSpace E] {f : ι → E} : Summable f ↔ ∀ ε > (0 : ℝ), ∃ s : Finset ι, ∀ t, Disjoint t s → ‖∑ i ∈ t, f i‖ < ε := by
rw [summable_iff_cauchySeq_finset, cauchySeq_finset_iff_vanishing_norm]
[ " (CauchySeq fun s => ∑ i ∈ s, f i) ↔ ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε", " (∀ (i : ℝ), 0 < i → ∃ s, ∀ (t : Finset ι), Disjoint t s → ∑ b ∈ t, f b ∈ ball 0 i) ↔\n ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε", " ∀ ⦃s t : Set E⦄,\n s ⊆ t →\n (∃ s_1,...
[ " (CauchySeq fun s => ∑ i ∈ s, f i) ↔ ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε", " (∀ (i : ℝ), 0 < i → ∃ s, ∀ (t : Finset ι), Disjoint t s → ∑ b ∈ t, f b ∈ ball 0 i) ↔\n ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε", " ∀ ⦃s t : Set E⦄,\n s ⊆ t →\n (∃ s_1,...
import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Martingale.OptionalStopping import Mathlib.Probability.Martingale.Centering #align_import probability.martingale.borel_cantelli from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open Filter open scoped NNRea...
Mathlib/Probability/Martingale/BorelCantelli.lean
75
90
theorem leastGE_eq_min (π : Ω → ℕ) (r : ℝ) (ω : Ω) {n : ℕ} (hπn : ∀ ω, π ω ≤ n) : leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω) := by
classical refine le_antisymm (le_min (leastGE_le _) (leastGE_mono (hπn ω) r ω)) ?_ by_cases hle : π ω ≤ leastGE f r n ω · rw [min_eq_left hle, leastGE] by_cases h : ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r · refine hle.trans (Eq.le ?_) rw [leastGE, ← hitting_eq_hitting_of_exists (hπn ω) h] · ...
[ " leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)", " min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω", " π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω", " leastGE f r n ω = hitting f (Set.Ici r) 0 (π ω) ω", " ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r" ]
[]
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
26
45
theorem snorm'_le_snorm'_mul_rpow_measure_univ {p q : ℝ} (hp0_lt : 0 < p) (hpq : p ≤ q) (hf : AEStronglyMeasurable f μ) : snorm' f p μ ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q) := by
have hq0_lt : 0 < q := lt_of_lt_of_le hp0_lt hpq by_cases hpq_eq : p = q · rw [hpq_eq, sub_self, ENNReal.rpow_zero, mul_one] have hpq : p < q := lt_of_le_of_ne hpq hpq_eq let g := fun _ : α => (1 : ℝ≥0∞) have h_rw : (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ p ∂μ) = ∫⁻ a, ((‖f a‖₊ : ℝ≥0∞) * g a) ^ p ∂μ := lintegral_cong...
[ " 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.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Laurent import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.RingTheory.Polynomial.Nilpotent #align_import linear_algebra.matrix.charpoly.coeff from "leanprover-community/mathlib"@"9745b...
Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
127
145
theorem charpoly_monic (M : Matrix n n R) : M.charpoly.Monic := by
nontriviality R -- Porting note: was simply `nontriviality` by_cases h : Fintype.card n = 0 · rw [charpoly, det_of_card_zero h] apply monic_one have mon : (∏ i : n, (X - C (M i i))).Monic := by apply monic_prod_of_monic univ fun i : n => X - C (M i i) simp [monic_X_sub_C] rw [← sub_add_cancel (∏ ...
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ 1", " (M.charmatrix i j).natDegree ≤ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (∑ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≤ 1", " (M.charmatrix i j).natDegree ≤ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (∑ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
import Batteries.Data.Sum.Basic import Batteries.Logic open Function namespace Sum @[simp] protected theorem «forall» {p : α ⊕ β → Prop} : (∀ x, p x) ↔ (∀ a, p (inl a)) ∧ ∀ b, p (inr b) := ⟨fun h => ⟨fun _ => h _, fun _ => h _⟩, fun ⟨h₁, h₂⟩ => Sum.rec h₁ h₂⟩ @[simp] protected theorem «exists» {p : α ⊕ β ...
.lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
85
85
theorem isRight_iff : x.isRight ↔ ∃ y, x = Sum.inr y := by
cases x <;> simp
[ " (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t", " p fab", " fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t", " fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab", " fab (inl val✝) = rec ...
[ " (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t", " p fab", " fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t", " fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab", " fab (inl val✝) = rec ...
import Mathlib.Data.ENNReal.Real import Mathlib.Order.Interval.Finset.Nat import Mathlib.Topology.UniformSpace.Pi import Mathlib.Topology.UniformSpace.UniformConvergence import Mathlib.Topology.UniformSpace.UniformEmbedding #align_import topology.metric_space.emetric_space from "leanprover-community/mathlib"@"c8f3055...
Mathlib/Topology/EMetricSpace/Basic.lean
127
129
theorem edist_congr_left {x y z : α} (h : edist x y = 0) : edist z x = edist z y := by
rw [edist_comm z x, edist_comm z y] apply edist_congr_right h
[ " s ∈ U ↔ ∃ i > z, {p | D p.1 p.2 < i} ⊆ s", " m = m'", " mk edist_self✝ edist_comm✝ edist_triangle✝ U hU = m'", " mk edist_self✝¹ edist_comm✝¹ edist_triangle✝¹ U hU = mk edist_self✝ edist_comm✝ edist_triangle✝ U' hU'", " U = U'", " edist x y ≤ edist z x + edist z y", " edist x y ≤ edist x z + edist z y...
[ " s ∈ U ↔ ∃ i > z, {p | D p.1 p.2 < i} ⊆ s", " m = m'", " mk edist_self✝ edist_comm✝ edist_triangle✝ U hU = m'", " mk edist_self✝¹ edist_comm✝¹ edist_triangle✝¹ U hU = mk edist_self✝ edist_comm✝ edist_triangle✝ U' hU'", " U = U'", " edist x y ≤ edist z x + edist z y", " edist x y ≤ edist x z + edist z y...
import Mathlib.LinearAlgebra.AffineSpace.Independent import Mathlib.LinearAlgebra.Basis #align_import linear_algebra.affine_space.basis from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" open Affine open Set universe u₁ u₂ u₃ u₄ structure AffineBasis (ι : Type u₁) (k : Type u₂) {V ...
Mathlib/LinearAlgebra/AffineSpace/Basis.lean
134
135
theorem basisOf_apply (i : ι) (j : { j : ι // j ≠ i }) : b.basisOf i j = b ↑j -ᵥ b i := by
simp [basisOf]
[ " affineSpan k (range id) = ⊤", " f = g", " { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g", " { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }", " False", " affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤", " affineSpan k (range ⇑b) = ⊤", " ⊤ ≤ S...
[ " affineSpan k (range id) = ⊤", " f = g", " { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g", " { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }", " False", " affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤", " affineSpan k (range ⇑b) = ⊤", " ⊤ ≤ S...
import Mathlib.Order.CompleteLattice import Mathlib.Data.Finset.Lattice import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Category.Preorder import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits #align_import category_theory.limi...
Mathlib/CategoryTheory/Limits/Lattice.lean
122
128
theorem prod_eq_inf [SemilatticeInf α] [OrderTop α] (x y : α) : Limits.prod x y = x ⊓ y := calc Limits.prod x y = limit (pair x y) := rfl _ = Finset.univ.inf (pair x y).obj := by
rw [finite_limit_eq_finset_univ_inf (pair.{u} x y)] _ = x ⊓ (y ⊓ ⊤) := rfl -- Note: finset.inf is realized as a fold, hence the definitional equality _ = x ⊓ y := by rw [inf_top_eq]
[ " ∀ (J : Type) [𝒥 : SmallCategory J] [inst : FinCategory J], HasLimitsOfShape J α", " HasLimitsOfShape J α", " ∀ (J : Type) [𝒥 : SmallCategory J] [inst : FinCategory J], HasColimitsOfShape J α", " HasColimitsOfShape J α", " ∏ᶜ f = Fintype.elems.inf f", " ∏ᶜ f = ?m.21382", " (finiteLimitCone (Discrete....
[ " ∀ (J : Type) [𝒥 : SmallCategory J] [inst : FinCategory J], HasLimitsOfShape J α", " HasLimitsOfShape J α", " ∀ (J : Type) [𝒥 : SmallCategory J] [inst : FinCategory J], HasColimitsOfShape J α", " HasColimitsOfShape J α", " ∏ᶜ f = Fintype.elems.inf f", " ∏ᶜ f = ?m.21382", " (finiteLimitCone (Discrete....
import Mathlib.Analysis.Convex.Cone.Extension import Mathlib.Analysis.Convex.Gauge import Mathlib.Topology.Algebra.Module.FiniteDimension import Mathlib.Topology.Algebra.Module.LocallyConvex #align_import analysis.normed_space.hahn_banach.separation from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a...
Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
47
76
theorem separate_convex_open_set [TopologicalSpace E] [AddCommGroup E] [TopologicalAddGroup E] [Module ℝ E] [ContinuousSMul ℝ E] {s : Set E} (hs₀ : (0 : E) ∈ s) (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) {x₀ : E} (hx₀ : x₀ ∉ s) : ∃ f : E →L[ℝ] ℝ, f x₀ = 1 ∧ ∀ x ∈ s, f x < 1 := by
let f : E →ₗ.[ℝ] ℝ := LinearPMap.mkSpanSingleton x₀ 1 (ne_of_mem_of_not_mem hs₀ hx₀).symm have := exists_extension_of_le_sublinear f (gauge s) (fun c hc => gauge_smul_of_nonneg hc.le) (gauge_add_le hs₁ <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀) ?_ · obtain ⟨φ, hφ₁, hφ₂⟩ := this have hφ₃ : φ x₀ = 1 := by...
[ " ∃ f, f x₀ = 1 ∧ ∀ x ∈ s, f x < 1", " φ x₀ = 1", " Continuous φ.toFun", " -x₀ +ᵥ x ∈ fun x => φ x = 0 → False", " φ (-x₀ + x) ≠ 0", " -φ x₀ + φ x ≠ 0", " ∀ (x : ↥f.domain), ↑f x ≤ gauge s ↑x", " ↑f ⟨x, hx⟩ ≤ gauge s ↑⟨x, hx⟩", " ↑f ⟨y • x₀, hx⟩ ≤ gauge s ↑⟨y • x₀, hx⟩", " y • 1 ≤ gauge s ↑⟨y • x₀...
[]
import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.LinearPMap import Mathlib.LinearAlgebra.Projection #align_import linear_algebra.basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" open Function Set Submodule set_option ...
Mathlib/LinearAlgebra/Basis/VectorSpace.lean
67
69
theorem range_extend (hs : LinearIndependent K ((↑) : s → V)) : range (Basis.extend hs) = hs.extend (subset_univ _) := by
rw [coe_extend, Subtype.range_coe_subtype, setOf_mem_eq]
[ " ↑⊤ ⊆ ↑(span K (range ((hs.extend ⋯).restrict id)))", " range ⇑(extend hs) = hs.extend ⋯" ]
[ " ↑⊤ ⊆ ↑(span K (range ((hs.extend ⋯).restrict id)))" ]
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate ...
Mathlib/Analysis/Complex/Isometry.lean
104
116
theorem LinearIsometry.im_apply_eq_im {f : ℂ →ₗᵢ[ℝ] ℂ} (h : f 1 = 1) (z : ℂ) : z + conj z = f z + conj (f z) := by
have : ‖f z - 1‖ = ‖z - 1‖ := by rw [← f.norm_map (z - 1), f.map_sub, h] apply_fun fun x => x ^ 2 at this simp only [norm_eq_abs, ← normSq_eq_abs] at this rw [← ofReal_inj, ← mul_conj, ← mul_conj] at this rw [RingHom.map_sub, RingHom.map_sub] at this simp only [sub_mul, mul_sub, one_mul, mul_one] at this ...
[ " Complex.abs (↑a * x) = Complex.abs x", " (rotation a).trans (rotation b) = rotation (b * a)", " ((rotation a).trans (rotation b)) x✝ = (rotation (b * a)) x✝", " rotation a ≠ conjLIE", " False", " e 1 / ↑(Complex.abs (e 1)) ∈ circle", " ↑(rotationOf (rotation a)) = ↑a", " (f z).re = z.re", " 2 ≠ 0"...
[ " Complex.abs (↑a * x) = Complex.abs x", " (rotation a).trans (rotation b) = rotation (b * a)", " ((rotation a).trans (rotation b)) x✝ = (rotation (b * a)) x✝", " rotation a ≠ conjLIE", " False", " e 1 / ↑(Complex.abs (e 1)) ∈ circle", " ↑(rotationOf (rotation a)) = ↑a", " (f z).re = z.re", " 2 ≠ 0"...
import Mathlib.Order.Ideal import Mathlib.Order.PFilter #align_import order.prime_ideal from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" open Order.PFilter namespace Order variable {P : Type*} namespace Ideal -- Porting note(#5171): this linter isn't ported yet. -- @[nolint has_...
Mathlib/Order/PrimeIdeal.lean
124
128
theorem IsPrime.mem_or_mem (hI : IsPrime I) {x y : P} : x ⊓ y ∈ I → x ∈ I ∨ y ∈ I := by
contrapose! let F := hI.compl_filter.toPFilter show x ∈ F ∧ y ∈ F → x ⊓ y ∈ F exact fun h => inf_mem h.1 h.2
[ " x ⊓ y ∈ I → x ∈ I ∨ y ∈ I", " x ∉ I ∧ y ∉ I → x ⊓ y ∉ I", " x ∈ F ∧ y ∈ F → x ⊓ y ∈ F" ]
[]
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Lie.OfAssociative import Mathlib.Algebra.Lie.Submodule import Mathlib.Algebra.Lie.Basic #align_import algebra.lie.direct_sum from "leanprover-community/mathlib"@"c0cc689babd41c0e9d5f02429211ffbe2403472a" universe u v w w₁ namespace DirectSum open DF...
Mathlib/Algebra/Lie/DirectSum.lean
140
144
theorem lie_of [DecidableEq ι] {i j : ι} (x : L i) (y : L j) : ⁅of L i x, of L j y⁆ = if hij : i = j then of L i ⁅x, hij.symm.recOn y⁆ else 0 := by
obtain rfl | hij := Decidable.eq_or_ne i j · simp only [lie_of_same L x y, dif_pos] · simp only [lie_of_of_ne L hij x y, hij, dif_neg, dite_false]
[ " ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆", " ⁅x + y, z⁆ x✝ = (⁅x, z⁆ + ⁅y, z⁆) x✝", " ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆", " ⁅x, y + z⁆ x✝ = (⁅x, y⁆ + ⁅x, z⁆) x✝", " ⁅x, x⁆ = 0", " ⁅x, x⁆ x✝ = 0 x✝", " ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆", " ⁅x, ⁅y, z⁆⁆ x✝ = (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆) x✝", " ⁅x x✝, ⁅y x✝, z x✝...
[ " ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆", " ⁅x + y, z⁆ x✝ = (⁅x, z⁆ + ⁅y, z⁆) x✝", " ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆", " ⁅x, y + z⁆ x✝ = (⁅x, y⁆ + ⁅x, z⁆) x✝", " ⁅x, x⁆ = 0", " ⁅x, x⁆ x✝ = 0 x✝", " ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆", " ⁅x, ⁅y, z⁆⁆ x✝ = (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆) x✝", " ⁅x x✝, ⁅y x✝, z x✝...
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
85
91
theorem cyclotomic'_two (R : Type*) [CommRing R] [IsDomain R] (p : ℕ) [CharP R p] (hp : p ≠ 2) : cyclotomic' 2 R = X + 1 := by
rw [cyclotomic'] have prim_root_two : primitiveRoots 2 R = {(-1 : R)} := by simp only [Finset.eq_singleton_iff_unique_mem, mem_primitiveRoots two_pos] exact ⟨IsPrimitiveRoot.neg_one p hp, fun x => IsPrimitiveRoot.eq_neg_one_of_two_right⟩ simp only [prim_root_two, Finset.prod_singleton, RingHom.map_neg, R...
[ " 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' 0 R = 1", " cyclotomic' 1 R = X - 1" ]
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ι : Type*} {α : Type u} {β : Type v} {γ : Type w} open Function Set open scoped Topology ...
Mathlib/Topology/MetricSpace/Isometry.lean
155
157
theorem ediam_range (hf : Isometry f) : EMetric.diam (range f) = EMetric.diam (univ : Set α) := by
rw [← image_univ] exact hf.ediam_image univ
[ " Isometry f ↔ ∀ (x y : α), nndist (f x) (f y) = nndist x y", " Isometry f ↔ ∀ (x y : α), dist (f x) (f y) = dist x y", " edist x y ≤ ↑1 * edist (f x) (f y)", " edist (f x) (f y) = edist x y", " edist (f y) (f y) = edist y y", " edist (Prod.map f g x) (Prod.map f g y) = edist x y", " edist ((fun g i => ...
[ " Isometry f ↔ ∀ (x y : α), nndist (f x) (f y) = nndist x y", " Isometry f ↔ ∀ (x y : α), dist (f x) (f y) = dist x y", " edist x y ≤ ↑1 * edist (f x) (f y)", " edist (f x) (f y) = edist x y", " edist (f y) (f y) = edist y y", " edist (Prod.map f g x) (Prod.map f g y) = edist x y", " edist ((fun g i => ...
import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set Filter ENNReal Topology NNReal TopologicalSpace namespace MeasureTh...
Mathlib/MeasureTheory/Measure/Regular.lean
260
264
theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') : InnerRegularWRT μ p q' := by
intro U hU r hr rcases H' hU r hr with ⟨F, hFU, hqF, hF⟩; rcases H hqF _ hF with ⟨K, hKF, hpK, hrK⟩ exact ⟨K, hKF.trans hFU, hpK, hrK⟩
[ " μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " ∃ K ⊆ U, p K ∧ μ U < μ K + ε", " μ U < μ ∅ + ε", " (map f μ).InnerRegularWRT pb qb", " ∃ K ⊆ U, pb K ∧ r < (map f μ) K", " r < (map f μ) (f '' K)", " (map (⇑f) μ).InnerRegularWRT pb qb", " ∃ K ⊆ U, pb K ∧ r...
[ " μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " ∃ K ⊆ U, p K ∧ μ U < μ K + ε", " μ U < μ ∅ + ε", " (map f μ).InnerRegularWRT pb qb", " ∃ K ⊆ U, pb K ∧ r < (map f μ) K", " r < (map f μ) (f '' K)", " (map (⇑f) μ).InnerRegularWRT pb qb", " ∃ K ⊆ U, pb K ∧ r...
import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analysis.special_functions.pow.nnreal from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real NNReal ENNReal ComplexConjugate open Finset Function Set namespace NNReal var...
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
97
97
theorem rpow_neg_one (x : ℝ≥0) : x ^ (-1 : ℝ) = x⁻¹ := by
simp [rpow_neg]
[ " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0", " x ^ w = x ^ y * x ^ z", " y + z ≠ 0", " x ^ (-1) = x⁻¹" ]
[ " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0", " x ^ w = x ^ y * x ^ z", " y + z ≠ 0" ]
import Mathlib.Analysis.SpecialFunctions.Bernstein import Mathlib.Topology.Algebra.Algebra #align_import topology.continuous_function.weierstrass from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" open ContinuousMap Filter open scoped unitInterval theorem polynomialFunctions_closure...
Mathlib/Topology/ContinuousFunction/Weierstrass.lean
54
79
theorem polynomialFunctions_closure_eq_top (a b : ℝ) : (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤ := by
cases' lt_or_le a b with h h -- (Otherwise it's easy; we'll deal with that later.) · -- We can pullback continuous functions on `[a,b]` to continuous functions on `[0,1]`, -- by precomposing with an affine map. let W : C(Set.Icc a b, ℝ) →ₐ[ℝ] C(I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.to...
[ " (polynomialFunctions I).topologicalClosure = ⊤", " ⊤ ≤ (polynomialFunctions I).topologicalClosure", " f ∈ (polynomialFunctions I).topologicalClosure", " ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)", " ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)", " ∀ (x : ℕ),...
[ " (polynomialFunctions I).topologicalClosure = ⊤", " ⊤ ≤ (polynomialFunctions I).topologicalClosure", " f ∈ (polynomialFunctions I).topologicalClosure", " ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)", " ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)", " ∀ (x : ℕ),...
import Mathlib.FieldTheory.PrimitiveElement import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.G...
Mathlib/RingTheory/Norm.lean
197
207
theorem norm_eq_norm_adjoin [FiniteDimensional K L] [IsSeparable K L] (x : L) : norm K x = norm K (AdjoinSimple.gen K x) ^ finrank K⟮x⟯ L := by
letI := isSeparable_tower_top_of_isSeparable K K⟮x⟯ L let pbL := Field.powerBasisOfFiniteOfSeparable K⟮x⟯ L let pbx := IntermediateField.adjoin.powerBasis (IsSeparable.isIntegral K x) -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644 erw [← AdjoinSimple.algebraMap_gen K x, norm_eq_matrix...
[ " (norm R) x = 1", " (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S", " Module.Finite R S", " (norm R) ...
[ " (norm R) x = 1", " (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S", " Module.Finite R S", " (norm R) ...
import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Ring.Basic import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Order.Hom.Basic #align_import algebra.order.sub.basic from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" variable {α β : Type*} section Add variable [Preord...
Mathlib/Algebra/Order/Sub/Basic.lean
36
38
theorem le_tsub_mul {R : Type*} [CommSemiring R] [Preorder R] [Sub R] [OrderedSub R] [CovariantClass R R (· * ·) (· ≤ ·)] {a b c : R} : a * c - b * c ≤ (a - b) * c := by
simpa only [mul_comm _ c] using le_mul_tsub
[ " f a - f b ≤ f (a - b)", " f a ≤ f (a - b + b)", " a * c - b * c ≤ (a - b) * c" ]
[ " f a - f b ≤ f (a - b)", " f a ≤ f (a - b + b)" ]
import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open scoped Classical noncomputable section open ...
Mathlib/Algebra/Homology/Homotopy.lean
109
112
theorem prevD_comp_right (f : ∀ i j, C.X i ⟶ D.X j) (g : D ⟶ E) (j : ι) : (prevD j fun i j => f i j ≫ g.f j) = prevD j f ≫ g.f j := by
dsimp [prevD] simp only [assoc, g.comm]
[ " (dNext i) f = C.d i i' ≫ f i' i", " (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i", " (dNext i) f = 0", " C.d i (c.next i) ≫ f (c.next i) i = 0", " (prevD i) f = 0", " f i (c.prev i) ≫ D.d (c.prev i) i = 0", " (prevD j) f = f j j' ≫ D.d j' j", " (prevD j) f = f j (c.prev j) ≫ D.d (c.prev j) j", ...
[ " (dNext i) f = C.d i i' ≫ f i' i", " (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i", " (dNext i) f = 0", " C.d i (c.next i) ≫ f (c.next i) i = 0", " (prevD i) f = 0", " f i (c.prev i) ≫ D.d (c.prev i) i = 0", " (prevD j) f = f j j' ≫ D.d j' j", " (prevD j) f = f j (c.prev j) ≫ D.d (c.prev j) j" ]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace Affine...
Mathlib/Analysis/Convex/Side.lean
70
80
theorem _root_.Function.Injective.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᵃ[R] P'} (hf : Function.Injective f) : (s.map f).WSameSide (f x) (f y) ↔ s.WSameSide x y := by
refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fp₂, hfp₂, h⟩ rw [mem_map] at hfp₁ hfp₂ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfp₂ with ⟨p₂, hp₂, rfl⟩ refine ⟨p₁, hp₁, p₂, hp₂, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h
[ " (AffineSubspace.map f s).WSameSide (f x) (f y)", " SameRay R (f x -ᵥ f p₁) (f y -ᵥ f p₂)", " SameRay R (f.linear (x -ᵥ p₁)) (f.linear (y -ᵥ p₂))", " (map f s).WSameSide (f x) (f y) ↔ s.WSameSide x y", " s.WSameSide x y", " SameRay R (x -ᵥ p₁) (y -ᵥ p₂)" ]
[ " (AffineSubspace.map f s).WSameSide (f x) (f y)", " SameRay R (f x -ᵥ f p₁) (f y -ᵥ f p₂)", " SameRay R (f.linear (x -ᵥ p₁)) (f.linear (y -ᵥ p₂))" ]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce" open Set Filter MeasureTheory MeasurableSpace open scoped Classical Topology NNReal ENNReal MeasureTheory univers...
Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
91
94
theorem isPiSystem_Iio_rat : IsPiSystem (⋃ a : ℚ, {Iio (a : ℝ)}) := by
convert isPiSystem_image_Iio (((↑) : ℚ → ℝ) '' univ) ext x simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
import Mathlib.Algebra.Module.Submodule.Ker open Function Submodule namespace LinearMap variable {R N M : Type*} [Semiring R] [AddCommMonoid N] [Module R N] [AddCommMonoid M] [Module R M] (f i : N →ₗ[R] M) def iterateMapComap (n : ℕ) := (fun K : Submodule R N ↦ (K.map i).comap f)^[n] theorem iterateMapComap...
Mathlib/Algebra/Module/Submodule/IterateMapComap.lean
88
92
theorem ker_le_of_iterateMapComap_eq_succ (K : Submodule R N) (m : ℕ) (heq : f.iterateMapComap i m K = f.iterateMapComap i (m + 1) K) (hf : Surjective f) (hi : Injective i) : LinearMap.ker f ≤ K := by
rw [show K = _ from f.iterateMapComap_eq_succ i K m heq hf hi 0] exact f.ker_le_comap
[ " f.iterateMapComap i n K ≤ f.iterateMapComap i (n + 1) K", " f.iterateMapComap i n K ≤ (fun K => comap f (map i K))^[n + 1] K", " map f (f.iterateMapComap i n K) ≤ map i (f.iterateMapComap i n K)", " map f (f.iterateMapComap i 0 K) ≤ map i (f.iterateMapComap i 0 K)", " map f (f.iterateMapComap i (n + 1) K)...
[ " f.iterateMapComap i n K ≤ f.iterateMapComap i (n + 1) K", " f.iterateMapComap i n K ≤ (fun K => comap f (map i K))^[n + 1] K", " map f (f.iterateMapComap i n K) ≤ map i (f.iterateMapComap i n K)", " map f (f.iterateMapComap i 0 K) ≤ map i (f.iterateMapComap i 0 K)", " map f (f.iterateMapComap i (n + 1) K)...