Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
221
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
61
61
theorem ascPochhammer_one : ascPochhammer S 1 = X := by
simp [ascPochhammer]
[ " ascPochhammer S 1 = X" ]
[ " ascPochhammer S 1 = X" ]
import Mathlib.Probability.Process.HittingTime import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory vari...
Mathlib/Probability/Martingale/OptionalStopping.lean
69
80
theorem submartingale_of_expected_stoppedValue_mono [IsFiniteMeasure μ] (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ) (hf : ∀ τ π : Ω → ℕ, IsStoppingTime 𝒢 τ → IsStoppingTime 𝒢 π → τ ≤ π → (∃ N, ∀ ω, π ω ≤ N) → μ[stoppedValue f τ] ≤ μ[stoppedValue f π]) : Submartingale f 𝒢 μ := by
refine submartingale_of_setIntegral_le hadp hint fun i j hij s hs => ?_ classical specialize hf (s.piecewise (fun _ => i) fun _ => j) _ (isStoppingTime_piecewise_const hij hs) (isStoppingTime_const 𝒢 j) (fun x => (ite_le_sup _ _ (x ∈ s)).trans (max_eq_right hij).le) ⟨j, fun _ => le_rfl⟩ rwa [stoppedVa...
[ " ∫ (x : Ω), stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), stoppedValue f π x ∂μ", " 0 ≤ ∫ (a : Ω), (fun ω => (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (f (i + 1) - f i)) ω) a ∂μ", " 0 ≤ ∫ (a : Ω), ∑ c ∈ Finset.range (N + 1), {ω | τ ω ≤ c ∧ c < π ω}.indicator (f (c + 1) - f c) a ∂μ", " ∀ (i : ℕ), Me...
[ " ∫ (x : Ω), stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), stoppedValue f π x ∂μ", " 0 ≤ ∫ (a : Ω), (fun ω => (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (f (i + 1) - f i)) ω) a ∂μ", " 0 ≤ ∫ (a : Ω), ∑ c ∈ Finset.range (N + 1), {ω | τ ω ≤ c ∧ c < π ω}.indicator (f (c + 1) - f c) a ∂μ", " ∀ (i : ℕ), Me...
import Mathlib.Order.Filter.EventuallyConst import Mathlib.Order.PartialSups import Mathlib.Algebra.Module.Submodule.IterateMapComap import Mathlib.RingTheory.OrzechProperty import Mathlib.RingTheory.Nilpotent.Lemmas #align_import ring_theory.noetherian from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3...
Mathlib/RingTheory/Noetherian.lean
81
91
theorem isNoetherian_submodule {N : Submodule R M} : IsNoetherian R N ↔ ∀ s : Submodule R M, s ≤ N → s.FG := by
refine ⟨fun ⟨hn⟩ => fun s hs => have : s ≤ LinearMap.range N.subtype := N.range_subtype.symm ▸ hs Submodule.map_comap_eq_self this ▸ (hn _).map _, fun h => ⟨fun s => ?_⟩⟩ have f := (Submodule.equivMapOfInjective N.subtype Subtype.val_injective s).symm have h₁ := h (s.map N.subtype) (Submodule.map_sub...
[ " IsNoetherian R ↥N ↔ ∀ s ≤ N, s.FG", " s.FG", " Submodule.map f ⊤ = ⊤" ]
[ " IsNoetherian R ↥N ↔ ∀ s ≤ N, s.FG" ]
import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.PSub import Mathlib.Data.Nat.Size import Mathlib.Data.Num.Bitwise #align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" set_opti...
Mathlib/Data/Num/Lemmas.lean
1,056
1,056
theorem zneg_bit1 (n : ZNum) : -n.bit1 = (-n).bitm1 := by
cases n <;> rfl
[ " - -n = n", " - -zero = zero", " - -pos a✝ = pos a✝", " - -neg a✝ = neg a✝", " -n.bit1 = (-n).bitm1", " -zero.bit1 = (-zero).bitm1", " -(pos a✝).bit1 = (-pos a✝).bitm1", " -(neg a✝).bit1 = (-neg a✝).bitm1" ]
[ " - -n = n", " - -zero = zero", " - -pos a✝ = pos a✝", " - -neg a✝ = neg a✝", " -n.bit1 = (-n).bitm1" ]
import Mathlib.AlgebraicTopology.DoldKan.Faces import Mathlib.CategoryTheory.Idempotents.Basic #align_import algebraic_topology.dold_kan.projections from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Pread...
Mathlib/AlgebraicTopology/DoldKan/Projections.lean
92
94
theorem Q_succ (q : ℕ) : (Q (q + 1) : K[X] ⟶ _) = Q q - P q ≫ Hσ q := by
simp only [Q, P_succ, comp_add, comp_id] abel
[ " (P q).f 0 = 𝟙 (K[X].X 0)", " (P 0).f 0 = 𝟙 (K[X].X 0)", " (P (q + 1)).f 0 = 𝟙 (K[X].X 0)", " P q + Q q = 𝟙 K[X]", " P q + (𝟙 K[X] - P q) = 𝟙 K[X]", " Q (q + 1) = Q q - P q ≫ Hσ q", " 𝟙 K[X] - (P q + P q ≫ Hσ q) = 𝟙 K[X] - P q - P q ≫ Hσ q" ]
[ " (P q).f 0 = 𝟙 (K[X].X 0)", " (P 0).f 0 = 𝟙 (K[X].X 0)", " (P (q + 1)).f 0 = 𝟙 (K[X].X 0)", " P q + Q q = 𝟙 K[X]", " P q + (𝟙 K[X] - P q) = 𝟙 K[X]", " Q (q + 1) = Q q - P q ≫ Hσ q" ]
import Mathlib.Analysis.Convex.StrictConvexSpace #align_import analysis.convex.uniform from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" open Set Metric open Convex Pointwise class UniformConvexSpace (E : Type*) [SeminormedAddCommGroup E] : Prop where uniform_convex : ∀ ⦃ε : ℝ⦄, ...
Mathlib/Analysis/Convex/Uniform.lean
60
112
theorem exists_forall_closed_ball_dist_add_le_two_sub (hε : 0 < ε) : ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ := by
have hε' : 0 < ε / 3 := div_pos hε zero_lt_three obtain ⟨δ, hδ, h⟩ := exists_forall_sphere_dist_add_le_two_sub E hε' set δ' := min (1 / 2) (min (ε / 3) <| δ / 3) refine ⟨δ', lt_min one_half_pos <| lt_min hε' (div_pos hδ zero_lt_three), fun x hx y hy hxy => ?_⟩ obtain hx' | hx' := le_or_lt ‖x‖ (1 - δ') · rw...
[ " ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ", " ‖x + y‖ ≤ 2 - δ'", " ‖x + y‖ ≤ 1 + 1 - δ'", " ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1", " ‖‖z‖⁻¹ • z‖ = 1", " ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'", " ‖‖z‖⁻¹ • z - z‖ ≤ δ'", " ‖‖z‖⁻¹ • z - ...
[ " ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ" ]
import Mathlib.MeasureTheory.Integral.Lebesgue import Mathlib.Analysis.MeanInequalities import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic #align_import measure_theory.integral.mean_inequalities from "leanprover-community/mathlib"@"13bf7613c96a9fd66a81b9020a82cad9...
Mathlib/MeasureTheory/Integral/MeanInequalities.lean
93
98
theorem funMulInvSnorm_rpow {p : ℝ} (hp0 : 0 < p) {f : α → ℝ≥0∞} {a : α} : funMulInvSnorm f p μ a ^ p = f a ^ p * (∫⁻ c, f c ^ p ∂μ)⁻¹ := by
rw [funMulInvSnorm, mul_rpow_of_nonneg _ _ (le_of_lt hp0)] suffices h_inv_rpow : ((∫⁻ c : α, f c ^ p ∂μ) ^ (1 / p))⁻¹ ^ p = (∫⁻ c : α, f c ^ p ∂μ)⁻¹ by rw [h_inv_rpow] rw [inv_rpow, ← rpow_mul, one_div_mul_cancel hp0.ne', rpow_one]
[ " ∫⁻ (a : α), (f * g) a ∂μ ≤ 1", " ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1", " ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1", " ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1", " (ENNR...
[ " ∫⁻ (a : α), (f * g) a ∂μ ≤ 1", " ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1", " ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1", " ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1", " (ENNR...
import Mathlib.Topology.MetricSpace.PiNat #align_import topology.metric_space.cantor_scheme from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993" namespace CantorScheme open List Function Filter Set PiNat open scoped Classical open Topology variable {β α : Type*} (A : List β → Set α) ...
Mathlib/Topology/MetricSpace/CantorScheme.lean
99
115
theorem Disjoint.map_injective (hA : CantorScheme.Disjoint A) : Injective (inducedMap A).2 := by
rintro ⟨x, hx⟩ ⟨y, hy⟩ hxy refine Subtype.coe_injective (res_injective ?_) dsimp ext n : 1 induction' n with n ih; · simp simp only [res_succ, cons.injEq] refine ⟨?_, ih⟩ contrapose hA simp only [CantorScheme.Disjoint, _root_.Pairwise, Ne, not_forall, exists_prop] refine ⟨res x n, _, _, hA, ?_⟩ r...
[ " (inducedMap A).snd x ∈ A (res (↑x) n)", " Injective (inducedMap A).snd", " ⟨x, hx⟩ = ⟨y, hy⟩", " res ((fun a => ↑a) ⟨x, hx⟩) = res ((fun a => ↑a) ⟨y, hy⟩)", " res x = res y", " res x n = res y n", " res x 0 = res y 0", " res x (n + 1) = res y (n + 1)", " x n = y n ∧ res x n = res y n", " x n = y...
[ " (inducedMap A).snd x ∈ A (res (↑x) n)", " Injective (inducedMap A).snd" ]
import Mathlib.Algebra.Polynomial.Module.AEval #align_import data.polynomial.module from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0" universe u v open Polynomial BigOperators @[nolint unusedArguments] def PolynomialModule (R M : Type*) [CommRing R] [AddCommGroup M] [Module R M] := ℕ ...
Mathlib/Algebra/Polynomial/Module/Basic.lean
139
153
theorem monomial_smul_apply (i : ℕ) (r : R) (g : PolynomialModule R M) (n : ℕ) : (monomial i r • g) n = ite (i ≤ n) (r • g (n - i)) 0 := by
induction' g using PolynomialModule.induction_linear with p q hp hq · simp only [smul_zero, zero_apply, ite_self] · simp only [smul_add, add_apply, hp, hq] split_ifs exacts [rfl, zero_add 0] · rw [monomial_smul_single, single_apply, single_apply, smul_ite, smul_zero, ← ite_and] congr rw [eq_iff...
[ " f • m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m", " IsScalarTower S R[X] (PolynomialModule R M)", " ∀ (x : S) (y : R[X]) (z : PolynomialModule R M), (x • y) • z = x • y • z", " (x • y) • z = x • y • z", " (monomial i) r • (single R j) m = (single R (i + j)) (r • m)", " r • (⇑(Finsupp.lmapDomain ...
[ " f • m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m", " IsScalarTower S R[X] (PolynomialModule R M)", " ∀ (x : S) (y : R[X]) (z : PolynomialModule R M), (x • y) • z = x • y • z", " (x • y) • z = x • y • z", " (monomial i) r • (single R j) m = (single R (i + j)) (r • m)", " r • (⇑(Finsupp.lmapDomain ...
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
226
228
theorem vars_monomial_single (i : σ) {e : ℕ} {r : R} (he : e ≠ 0) (hr : r ≠ 0) : (monomial (Finsupp.single i e) r).vars = {i} := by
rw [vars_monomial hr, Finsupp.support_single_ne_zero _ he]
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {α...
Mathlib/Topology/Algebra/WithZeroTopology.lean
128
129
theorem Iio_mem_nhds (h : γ₁ < γ₂) : Iio γ₂ ∈ 𝓝 γ₁ := by
rcases eq_or_ne γ₁ 0 with (rfl | h₀) <;> simp [*, h.ne', Iio_mem_nhds_zero]
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ v₂ u u₁ u₂ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
118
121
theorem Path.cast_eq_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (p : Path u v) (p' : Path u' v') : p.cast hu hv = p' ↔ HEq p p' := by
rw [Path.cast_eq_cast] exact _root_.cast_eq_iff_heq
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'", " e' ...
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'", " e' ...
import Mathlib.Order.CompleteLattice import Mathlib.Order.GaloisConnection import Mathlib.Data.Set.Lattice import Mathlib.Tactic.AdaptationNote #align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" variable {α β γ : Type*} def Rel (α β : Type*) := α → β → Prop --...
Mathlib/Data/Rel.lean
91
93
theorem dom_inv : r.inv.dom = r.codom := by
ext x rfl
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom", " x ∈ r.inv.dom ↔ x ∈ r.codom" ]
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom" ]
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Integral.Pi import Mathlib.Analysis.Fourier.FourierTransform open Real Set MeasureTheory Filter Asymptotics intervalIntegral open scoped Real Topology FourierTransform Re...
Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
51
55
theorem norm_cexp_neg_mul_sq_add_mul_I (b : ℂ) (c T : ℝ) : ‖cexp (-b * (T + c * I) ^ 2)‖ = exp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2)) := by
rw [Complex.norm_eq_abs, Complex.abs_exp, neg_mul, neg_re, ← re_add_im b] simp only [sq, re_add_im, mul_re, mul_im, add_re, add_im, ofReal_re, ofReal_im, I_re, I_im] ring_nf
[ " ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))", " rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - 2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))", " rexp\n (-(b.re * ((T + (c * 0 - 0 *...
[ " ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))" ]
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
104
108
theorem hσ'_eq_zero {q n m : ℕ} (hnq : n < q) (hnm : c.Rel m n) : (hσ' q n m hnm : X _[n] ⟶ X _[m]) = 0 := by
simp only [hσ', hσ] split_ifs exact zero_comp
[ " ¬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" ]
[ " ¬c.Rel 0 j", " False", " j.succ ≤ 0", " X _[n + 1] = K[X].X m", " hσ' q n m hnm = 0" ]
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Linear.Basic #align_import category_theory.linear.linear_functor from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb5bffd3" namespace CategoryTheory variable (R : Type*) [Semiring R] class Functor.Linear...
Mathlib/CategoryTheory/Linear/LinearFunctor.lean
53
54
theorem map_units_smul {X Y : C} (r : Rˣ) (f : X ⟶ Y) : F.map (r • f) = r • F.map f := by
apply map_smul
[ " F.map (r • f) = r • F.map f" ]
[ " F.map (r • f) = r • F.map f" ]
import Mathlib.Topology.EMetricSpace.Paracompact import Mathlib.Topology.Instances.ENNReal import Mathlib.Analysis.Convex.PartitionOfUnity #align_import topology.metric_space.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Topology ENNReal NNReal Filter Set Fu...
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
64
72
theorem exists_forall_closedBall_subset_aux₁ (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) : ∃ r : ℝ, ∀ᶠ y in 𝓝 x, r ∈ Ioi (0 : ℝ) ∩ ENNReal.ofReal ⁻¹' ⋂ (i) (_ : y ∈ K i), { r | closedBall y r ⊆ U i } := by
have := (ENNReal.continuous_ofReal.tendsto' 0 0 ENNReal.ofReal_zero).eventually (eventually_nhds_zero_forall_closedBall_subset hK hU hKU hfin x).curry rcases this.exists_gt with ⟨r, hr0, hr⟩ refine ⟨r, hr.mono fun y hy => ⟨hr0, ?_⟩⟩ rwa [mem_preimage, mem_iInter₂]
[ " ∀ᶠ (p : ℝ≥0∞ × X) in 𝓝 0 ×ˢ 𝓝 x, ∀ (i : ι), p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i", " {x_1 |\n x_1 ∈ Prod.snd ⁻¹' ⋂ i, ⋂ (_ : x ∉ K i), (K i)ᶜ →\n x_1 ∈\n {x_2 |\n x_2 ∈ {x_3 | (fun x_4 => ∀ i ∈ {b | x ∈ K b}, closedBall x_4.2 x_4.1 ⊆ U i) x_3} →\n x_2 ∈ {x | (fun p...
[ " ∀ᶠ (p : ℝ≥0∞ × X) in 𝓝 0 ×ˢ 𝓝 x, ∀ (i : ι), p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i", " {x_1 |\n x_1 ∈ Prod.snd ⁻¹' ⋂ i, ⋂ (_ : x ∉ K i), (K i)ᶜ →\n x_1 ∈\n {x_2 |\n x_2 ∈ {x_3 | (fun x_4 => ∀ i ∈ {b | x ∈ K b}, closedBall x_4.2 x_4.1 ⊆ U i) x_3} →\n x_2 ∈ {x | (fun p...
import Mathlib.Topology.Algebra.UniformConvergence #align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a" open Function open UniformConvergence @[to_additive]
Mathlib/Topology/Algebra/Equicontinuity.lean
20
31
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G] [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : Equicontinuous ((↑) ∘ F) := by
rw [equicontinuous_iff_continuous] rw [equicontinuousAt_iff_continuousAt] at hf let φ : G →* (ι →ᵤ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact continuous_of_continuousAt_on...
[ " Equicontinuous (DFunLike.coe ∘ F)", " Continuous (⇑UniformFun.ofFun ∘ swap (DFunLike.coe ∘ F))", " swap (DFunLike.coe ∘ F) 1 = 1", " swap (DFunLike.coe ∘ F) 1 x✝ = 1 x✝", " { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun (a * b) =\n { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun a ...
[ " Equicontinuous (DFunLike.coe ∘ F)" ]
import Mathlib.Analysis.Calculus.FDeriv.Basic #align_import analysis.calculus.fderiv.restrict_scalars from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncom...
Mathlib/Analysis/Calculus/FDeriv/RestrictScalars.lean
110
117
theorem differentiableWithinAt_iff_restrictScalars (hf : DifferentiableWithinAt 𝕜 f s x) (hs : UniqueDiffWithinAt 𝕜 s x) : DifferentiableWithinAt 𝕜' f s x ↔ ∃ g' : E →L[𝕜'] F, g'.restrictScalars 𝕜 = fderivWithin 𝕜 f s x := by
constructor · rintro ⟨g', hg'⟩ exact ⟨g', hs.eq (hg'.restrictScalars 𝕜) hf.hasFDerivWithinAt⟩ · rintro ⟨f', hf'⟩ exact ⟨f', hf.hasFDerivWithinAt.of_restrictScalars 𝕜 hf'⟩
[ " HasFDerivWithinAt f f' s x", " HasFDerivAt f f' x", " DifferentiableWithinAt 𝕜' f s x ↔ ∃ g', restrictScalars 𝕜 g' = fderivWithin 𝕜 f s x", " DifferentiableWithinAt 𝕜' f s x → ∃ g', restrictScalars 𝕜 g' = fderivWithin 𝕜 f s x", " ∃ g', restrictScalars 𝕜 g' = fderivWithin 𝕜 f s x", " (∃ g', restr...
[ " HasFDerivWithinAt f f' s x", " HasFDerivAt f f' x", " DifferentiableWithinAt 𝕜' f s x ↔ ∃ g', restrictScalars 𝕜 g' = fderivWithin 𝕜 f s x" ]
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
73
77
theorem mk' {arr : Array α} {f : α → β} {n} {g : Fin n → β} (e : n = arr.size) (H : ∀ i h₁ h₂, f (arr.get ⟨i, h₁⟩) = g ⟨i, h₂⟩) : Agrees arr f g := by
cases e have : (fun i ↦ f (arr.get i)) = g := by funext ⟨i, h⟩; apply H cases this; constructor
[ " 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)" ]
[ " Agrees arr f g" ]
import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Adjunction.Reflective #align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were u...
Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
128
134
theorem isUnit_res_toΓSpecMapBasicOpen : IsUnit (X.toToΓSpecMapBasicOpen r r) := by
convert (X.presheaf.map <| (eqToHom <| X.toΓSpecMapBasicOpen_eq r).op).isUnit_map (X.toRingedSpace.isUnit_res_basicOpen r) -- Porting note: `rw [comp_apply]` to `erw [comp_apply]` erw [← comp_apply, ← Functor.map_comp] congr
[ " r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit ((X.ΓToStalk x) r)", " X.toΓSpecFun ⁻¹' (basicOpen r).carrier = (X.toRingedSpace.basicOpen r).carrier", " x✝ ∈ X.toΓSpecFun ⁻¹' (basicOpen r).carrier ↔ x✝ ∈ (X.toRingedSpace.basicOpen r).carrier", " x✝ ∈ X.toΓSpecFun ⁻¹' (basicOpen r).carrier ↔ IsUnit ((X.toRingedSpace....
[ " r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit ((X.ΓToStalk x) r)", " X.toΓSpecFun ⁻¹' (basicOpen r).carrier = (X.toRingedSpace.basicOpen r).carrier", " x✝ ∈ X.toΓSpecFun ⁻¹' (basicOpen r).carrier ↔ x✝ ∈ (X.toRingedSpace.basicOpen r).carrier", " x✝ ∈ X.toΓSpecFun ⁻¹' (basicOpen r).carrier ↔ IsUnit ((X.toRingedSpace....
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Topology.Algebra.Module.Basic #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set Function Filter open scoped NNReal Topology instance Real.punctured_nhds_module_neBot {E ...
Mathlib/Analysis/NormedSpace/Real.lean
101
103
theorem frontier_closedBall (x : E) {r : ℝ} (hr : r ≠ 0) : frontier (closedBall x r) = sphere x r := by
rw [frontier, closure_closedBall, interior_closedBall x hr, closedBall_diff_ball]
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1", " ‖t • x‖ = t * ‖x‖", " dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖", " ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x", " (1 - r) * dist y x ≤ (1 - 0) * dist y x", " 0 ≤ r", " (1 - 0) * dist y x = dist y x", " closure (ball x r) = closedBall x r", " y ∈ closure (ball x r...
[ " ‖x‖⁻¹ • x ∈ closedBall 0 1", " ‖t • x‖ = t * ‖x‖", " dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖", " ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x", " (1 - r) * dist y x ≤ (1 - 0) * dist y x", " 0 ≤ r", " (1 - 0) * dist y x = dist y x", " closure (ball x r) = closedBall x r", " y ∈ closure (ball x r...
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps #align_import combinatorics.simple_graph.subgraph from "leanprover-community/mathlib"@"c6ef6387ede9983aee397d442974e61f89dfd87b" universe u v namespace SimpleGraph @[ext] structure Subgraph {V : Type u} (G : SimpleGra...
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
177
178
theorem spanningCoe_inj : G₁.spanningCoe = G₂.spanningCoe ↔ G₁.Adj = G₂.Adj := by
simp [Subgraph.spanningCoe]
[ " G.Adj v✝ w✝", " s(v, w) ∈ G.edgeSet", " a ∈ {v, w}", " G₁.spanningCoe = G₂.spanningCoe ↔ G₁.Adj = G₂.Adj" ]
[ " G.Adj v✝ w✝", " s(v, w) ∈ G.edgeSet", " a ∈ {v, w}", " G₁.spanningCoe = G₂.spanningCoe ↔ G₁.Adj = G₂.Adj" ]
import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α} namespace Finset def nonMemberSubfamily (a : α) (𝒜 : ...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
133
136
theorem nonMemberSubfamily_nonMemberSubfamily : (𝒜.nonMemberSubfamily a).nonMemberSubfamily a = 𝒜.nonMemberSubfamily a := by
ext simp
[ " s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s", " s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " a ∈ insert a s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s", " insert a (s.erase a) ∈ 𝒜...
[ " s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s", " s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " a ∈ insert a s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s", " insert a (s.erase a) ∈ 𝒜...
import Mathlib.CategoryTheory.Category.Grpd import Mathlib.CategoryTheory.Groupoid import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Homotopy.Path import Mathlib.Data.Set.Subsingleton #align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473...
Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean
152
163
theorem trans_refl_reparam (p : Path x₀ x₁) : p.trans (Path.refl x₁) = p.reparam (fun t => ⟨transReflReparamAux t, transReflReparamAux_mem_I t⟩) (by continuity) (Subtype.ext transReflReparamAux_zero) (Subtype.ext transReflReparamAux_one) := by
ext unfold transReflReparamAux simp only [Path.trans_apply, not_le, coe_reparam, Function.comp_apply, one_div, Path.refl_apply] split_ifs · rfl · rfl · simp · simp
[ " Continuous reflTransSymmAux", " Continuous fun x => ↑x.2", " Continuous fun x => 1 / 2", " Continuous fun x => ↑x.1 * 2 * ↑x.2", " Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)", " ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ref...
[ " Continuous reflTransSymmAux", " Continuous fun x => ↑x.2", " Continuous fun x => 1 / 2", " Continuous fun x => ↑x.1 * 2 * ↑x.2", " Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)", " ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ref...
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.Probability.Kernel.Disintegration.CdfToKernel #align_import probability.kernel.cond_cdf from "leanprover-community/mathlib"@"3b88f4005dc2e28d42f974cc1ce838f0dafb39b8" open MeasureTheory Set Filter TopologicalSpace open scoped NNReal ENNReal Me...
Mathlib/Probability/Kernel/Disintegration/CondCdf.lean
87
89
theorem iInf_IicSnd_gt (t : ℚ) {s : Set α} (hs : MeasurableSet s) [IsFiniteMeasure ρ] : ⨅ r : { r' : ℚ // t < r' }, ρ.IicSnd r s = ρ.IicSnd t s := by
simp_rw [ρ.IicSnd_apply _ hs, Measure.iInf_rat_gt_prod_Iic hs]
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s" ]
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s" ]
import Mathlib.Mathport.Rename import Mathlib.Tactic.Lemma import Mathlib.Tactic.TypeStar #align_import data.option.defs from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" namespace Option #align option.lift_or_get Option.liftOrGet protected def traverse.{u, v} {F : Type u → Type...
Mathlib/Data/Option/Defs.lean
96
97
theorem mem_toList {a : α} {o : Option α} : a ∈ toList o ↔ a ∈ o := by
cases o <;> simp [toList, eq_comm]
[ " Option.elim' b f a = a.elim b f", " Option.elim' b f none = none.elim b f", " Option.elim' b f (some val✝) = (some val✝).elim b f", " a ∈ some b ↔ b = a", " ∀ (a : α), a ∈ none → p a", " False", " a ∈ o.toList ↔ a ∈ o", " a ∈ none.toList ↔ a ∈ none", " a ∈ (some val✝).toList ↔ a ∈ some val✝" ]
[ " Option.elim' b f a = a.elim b f", " Option.elim' b f none = none.elim b f", " Option.elim' b f (some val✝) = (some val✝).elim b f", " a ∈ some b ↔ b = a", " ∀ (a : α), a ∈ none → p a", " False", " a ∈ o.toList ↔ a ∈ o" ]
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {α...
Mathlib/Topology/Algebra/WithZeroTopology.lean
47
49
theorem nhds_eq_update : (𝓝 : Γ₀ → Filter Γ₀) = update pure 0 (⨅ γ ≠ 0, 𝓟 (Iio γ)) := by
rw [nhds_nhdsAdjoint, sup_of_le_right] exact le_iInf₂ fun γ hγ ↦ le_principal_iff.2 <| zero_lt_iff.2 hγ
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)" ]
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))" ]
import Mathlib.Data.List.Nodup #align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" variable {α : Type*} namespace List inductive Duplicate (x : α) : List α → Prop | cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l) | cons_duplicate {y : α} {l ...
Mathlib/Data/List/Duplicate.lean
46
49
theorem Duplicate.mem (h : x ∈+ l) : x ∈ l := by
induction' h with l' _ y l' _ hm · exact mem_cons_self _ _ · exact mem_cons_of_mem _ hm
[ " x ∈ l", " x ∈ x :: l'", " x ∈ y :: l'" ]
[ " x ∈ l" ]
import Mathlib.Order.Bounds.Basic import Mathlib.Order.WellFounded import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.Lattice #align_import order.conditionally_complete_lattice.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Func...
Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
116
121
theorem WithTop.coe_sSup' [SupSet α] {s : Set α} (hs : BddAbove s) : ↑(sSup s) = (sSup ((fun (a : α) ↦ ↑a) '' s) : WithTop α) := by
change _ = ite _ _ _ rw [if_neg, preimage_image_eq, if_pos hs] · exact Option.some_injective _ · rintro ⟨x, _, ⟨⟩⟩
[ " ¬(s ⊆ {⊤} ∨ ¬BddBelow s)", " ∅ ⊆ {⊤} ∨ ¬BddBelow ∅", " ⨅ i, f i = ⊤", " ↑(sInf s) = sInf ((fun a => ↑a) '' s)", " ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))", " ↑(sInf s) = ⊤", " ↑(sInf s) = ↑(sInf ((f...
[ " ¬(s ⊆ {⊤} ∨ ¬BddBelow s)", " ∅ ⊆ {⊤} ∨ ¬BddBelow ∅", " ⨅ i, f i = ⊤", " ↑(sInf s) = sInf ((fun a => ↑a) '' s)", " ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))", " ↑(sInf s) = ⊤", " ↑(sInf s) = ↑(sInf ((f...
import Mathlib.Algebra.MvPolynomial.Supported import Mathlib.RingTheory.WittVector.Truncated #align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section namespace WittVector variable (p : ℕ) [hp : Fact p.Prime] variable {k ...
Mathlib/RingTheory/WittVector/MulCoeff.lean
138
142
theorem mul_polyOfInterest_aux2 (n : ℕ) : (p : 𝕄) ^ n * wittMul p n + wittPolyProdRemainder p n = wittPolyProd p n := by
convert mul_polyOfInterest_aux1 p n rw [sum_range_succ, add_comm, Nat.sub_self, pow_zero, pow_one] rfl
[ " (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p ℤ n) * (rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p ℤ n)).vars ∪ ((rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n ...
[ " (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p ℤ n) * (rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p ℤ n)).vars ∪ ((rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n ...
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝ≥0∞} {r p q...
Mathlib/Data/ENNReal/Operations.lean
212
212
theorem top_mul' : ∞ * a = if a = 0 then 0 else ∞ := by
convert WithTop.top_mul' a
[ " (r₁ + r₂).toNNReal = r₁.toNNReal + r₂.toNNReal", " (↑r₁ + r₂).toNNReal = (↑r₁).toNNReal + r₂.toNNReal", " (↑r₁ + ↑r₂).toNNReal = (↑r₁).toNNReal + (↑r₂).toNNReal", " ¬x < ⊤ ↔ x = ⊤", " a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤", " a * ⊤ = if a = 0 then 0 else ⊤", " ⊤ * a = if a = 0 then 0 else ⊤" ]
[ " (r₁ + r₂).toNNReal = r₁.toNNReal + r₂.toNNReal", " (↑r₁ + r₂).toNNReal = (↑r₁).toNNReal + r₂.toNNReal", " (↑r₁ + ↑r₂).toNNReal = (↑r₁).toNNReal + (↑r₂).toNNReal", " ¬x < ⊤ ↔ x = ⊤", " a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤", " a * ⊤ = if a = 0 then 0 else ⊤", " ⊤ * a = if a = 0 then 0 else ⊤" ]
import Mathlib.Init.Order.Defs import Mathlib.Logic.Nontrivial.Defs import Mathlib.Tactic.Attr.Register import Mathlib.Data.Prod.Basic import Mathlib.Data.Subtype import Mathlib.Logic.Function.Basic import Mathlib.Logic.Unique #align_import logic.nontrivial from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc95...
Mathlib/Logic/Nontrivial/Basic.lean
90
93
theorem nontrivial_at (i' : I) [inst : ∀ i, Nonempty (f i)] [Nontrivial (f i')] : Nontrivial (∀ i : I, f i) := by
letI := Classical.decEq (∀ i : I, f i) exact (Function.update_injective (fun i ↦ Classical.choice (inst i)) i').nontrivial
[ " ∃ x y, x < y", " Nontrivial (Subtype p) ↔ ∃ y x_1, y ≠ ↑x", " x = default", " False", " Nontrivial (Option α)", " ∃ x, f x ≠ y", " Nontrivial ((i : I) → f i)" ]
[ " ∃ x y, x < y", " Nontrivial (Subtype p) ↔ ∃ y x_1, y ≠ ↑x", " x = default", " False", " Nontrivial (Option α)", " ∃ x, f x ≠ y", " Nontrivial ((i : I) → f i)" ]
import Mathlib.GroupTheory.Archimedean import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.archimedean from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set theorem Rat.denseRange_cast {𝕜} [LinearOrderedField 𝕜] [TopologicalSpace 𝕜] [OrderTopology 𝕜] ...
Mathlib/Topology/Algebra/Order/Archimedean.lean
67
71
theorem dense_or_cyclic (S : AddSubgroup G) : Dense (S : Set G) ∨ ∃ a : G, S = closure {a} := by
refine (em _).imp (dense_of_not_isolated_zero S) fun h => ?_ push_neg at h rcases h with ⟨ε, ε0, hε⟩ exact cyclic_of_isolated_zero ε0 (disjoint_left.2 hε)
[ " Dense ↑S", " x ∈ ↑S", " 0 ∈ ↑S", " ∃ c ∈ ↑S, a < c ∧ c < b", " a + g < b", " ∃ g ∈ S, g ∈ Ioo 0 ε", " ∃ a, IsLeast {g | g ∈ S ∧ 0 < g} a", " Dense ↑S ∨ ∃ a, S = closure {a}", " ∃ a, S = closure {a}" ]
[ " Dense ↑S", " x ∈ ↑S", " 0 ∈ ↑S", " ∃ c ∈ ↑S, a < c ∧ c < b", " a + g < b", " ∃ g ∈ S, g ∈ Ioo 0 ε", " ∃ a, IsLeast {g | g ∈ S ∧ 0 < g} a", " Dense ↑S ∨ ∃ a, S = closure {a}" ]
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
84
112
theorem geometric_hahn_banach_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (ht : Convex ℝ t) (disj : Disjoint s t) : ∃ (f : E →L[ℝ] ℝ) (u : ℝ), (∀ a ∈ s, f a < u) ∧ ∀ b ∈ t, u ≤ f b := by
obtain rfl | ⟨a₀, ha₀⟩ := s.eq_empty_or_nonempty · exact ⟨0, 0, by simp, fun b _hb => le_rfl⟩ obtain rfl | ⟨b₀, hb₀⟩ := t.eq_empty_or_nonempty · exact ⟨0, 1, fun a _ha => zero_lt_one, by simp⟩ let x₀ := b₀ - a₀ let C := x₀ +ᵥ (s - t) have : (0 : E) ∈ C := ⟨a₀ - b₀, sub_mem_sub ha₀ hb₀, by simp_rw [x₀...
[ " ∃ 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₀...
[ " ∃ 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.Logic.Encodable.Lattice import Mathlib.MeasureTheory.MeasurableSpace.Defs #align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" open MeasurableSpace Set open scoped Classical open MeasureTheory def IsPiSystem {α} (C : Set (Set α)) :...
Mathlib/MeasureTheory/PiSystem.lean
85
92
theorem IsPiSystem.insert_empty {α} {S : Set (Set α)} (h_pi : IsPiSystem S) : IsPiSystem (insert ∅ S) := by
intro s hs t ht hst cases' hs with hs hs · simp [hs] · cases' ht with ht ht · simp [ht] · exact Set.mem_insert_of_mem _ (h_pi s hs t ht hst)
[ " IsPiSystem {S}", " s ∩ t ∈ {S}", " IsPiSystem (insert ∅ S)", " s ∩ t ∈ insert ∅ S" ]
[ " IsPiSystem {S}", " s ∩ t ∈ {S}", " IsPiSystem (insert ∅ S)" ]
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Function Nat namespace Int variable {a b : ℤ} {n : ℕ} theorem natAbs_eq_iff_mul_self_eq {a b : ℤ} : a.natAbs = b.natAbs ↔ a * a = b * b := by rw [← a...
Mathlib/Data/Int/Order/Lemmas.lean
62
68
theorem eq_zero_of_abs_lt_dvd {m x : ℤ} (h1 : m ∣ x) (h2 : |x| < m) : x = 0 := by
obtain rfl | hm := eq_or_ne m 0 · exact Int.zero_dvd.1 h1 rcases h1 with ⟨d, rfl⟩ apply mul_eq_zero_of_right rw [← abs_lt_one_iff, ← mul_lt_iff_lt_one_right (abs_pos.mpr hm), ← abs_mul] exact lt_of_lt_of_le h2 (le_abs_self m)
[ " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs = b.natAbs ↔ ↑a.natAbs = ↑b.natAbs", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs < b.natAbs ↔ ↑a.natAbs < ↑b.natAbs", " a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b", " a.natAbs ≤ b.natAbs ↔ ↑a.natAbs ≤ ↑b.natAbs", " b ∣ c / a", " b ∣ c / 0", " b ∣ a ...
[ " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs = b.natAbs ↔ ↑a.natAbs = ↑b.natAbs", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs < b.natAbs ↔ ↑a.natAbs < ↑b.natAbs", " a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b", " a.natAbs ≤ b.natAbs ↔ ↑a.natAbs ≤ ↑b.natAbs", " b ∣ c / a", " b ∣ c / 0", " b ∣ a ...
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal va...
Mathlib/MeasureTheory/Decomposition/Jordan.lean
135
137
theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by
-- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe]
[ " ↑r • j = r • j" ]
[ " ↑r • j = r • j" ]
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.Dual #align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2...
Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
159
161
theorem contractRight_mul_algebraMap (a : CliffordAlgebra Q) (r : R) : a * algebraMap _ _ r⌊d = a⌊d * algebraMap _ _ r := by
rw [← Algebra.commutes, contractRight_algebraMap_mul, Algebra.commutes]
[ " ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx", " d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx", " ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL...
[ " ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx", " d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx", " ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL...
import Mathlib.Probability.Notation import Mathlib.Probability.Independence.Basic import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic #align_import probability.conditional_expectation from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open TopologicalSpace Filter open s...
Mathlib/Probability/ConditionalExpectation.lean
40
77
theorem condexp_indep_eq (hle₁ : m₁ ≤ m) (hle₂ : m₂ ≤ m) [SigmaFinite (μ.trim hle₂)] (hf : StronglyMeasurable[m₁] f) (hindp : Indep m₁ m₂ μ) : μ[f|m₂] =ᵐ[μ] fun _ => μ[f] := by
by_cases hfint : Integrable f μ swap; · rw [condexp_undef hfint, integral_undef hfint]; rfl refine (ae_eq_condexp_of_forall_setIntegral_eq hle₂ hfint (fun s _ hs => integrableOn_const.2 (Or.inr hs)) (fun s hms hs => ?_) stronglyMeasurable_const.aeStronglyMeasurable').symm rw [setIntegral_const] rw ...
[ " μ[f|m₂] =ᶠ[ae μ] fun x => ∫ (x : Ω), f x ∂μ", " 0 =ᶠ[ae μ] fun x => 0", " ∫ (x : Ω) in s, ∫ (x : Ω), f x ∂μ ∂μ = ∫ (x : Ω) in s, f x ∂μ", " (μ s).toReal • ∫ (x : Ω), f x ∂μ = ∫ (x : Ω) in s, f x ∂μ", " AEStronglyMeasurable' m₁ f μ", " ∀ (c : E) ⦃s_1 : Set Ω⦄,\n MeasurableSet s_1 →\n μ s_1 < ⊤ →\...
[ " μ[f|m₂] =ᶠ[ae μ] fun x => ∫ (x : Ω), f x ∂μ" ]
import Mathlib.CategoryTheory.Linear.LinearFunctor import Mathlib.CategoryTheory.Monoidal.Preadditive #align_import category_theory.monoidal.linear from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055" namespace CategoryTheory open CategoryTheory.Limits open CategoryTheory.MonoidalCateg...
Mathlib/CategoryTheory/Monoidal/Linear.lean
58
70
theorem monoidalLinearOfFaithful {D : Type*} [Category D] [Preadditive D] [Linear R D] [MonoidalCategory D] [MonoidalPreadditive D] (F : MonoidalFunctor D C) [F.Faithful] [F.toFunctor.Additive] [F.toFunctor.Linear R] : MonoidalLinear R D := { whiskerLeft_smul := by
intros X Y Z r f apply F.toFunctor.map_injective rw [F.map_whiskerLeft] simp smul_whiskerRight := by intros r X Y f Z apply F.toFunctor.map_injective rw [F.map_whiskerRight] simp }
[ " ∀ (X : D) {Y Z : D} (r : R) (f : Y ⟶ Z), X ◁ (r • f) = r • X ◁ f", " X ◁ (r • f) = r • X ◁ f", " F.map (X ◁ (r • f)) = F.map (r • X ◁ f)", " inv (F.μ X Y) ≫ F.obj X ◁ F.map (r • f) ≫ F.μ X Z = F.map (r • X ◁ f)", " ∀ (r : R) {Y Z : D} (f : Y ⟶ Z) (X : D), (r • f) ▷ X = r • f ▷ X", " (r • f) ▷ Z = r • f ...
[ " ∀ (X : D) {Y Z : D} (r : R) (f : Y ⟶ Z), X ◁ (r • f) = r • X ◁ f" ]
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Preserves.Basic #align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac" noncomputable section universe v₁ v₂ u₁ u₂ -- Porting note: ne...
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean
239
241
theorem PreservesPushout.inl_iso_inv : G.map pushout.inl ≫ (PreservesPushout.iso G f g).inv = pushout.inl := by
simp [PreservesPushout.iso, Iso.comp_inv_eq]
[ " G.map f ≫ G.map h = G.map g ≫ G.map k", " ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ...
[ " G.map f ≫ G.map h = G.map g ≫ G.map k", " ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ...
import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.centering from "leanprover-community/mathlib"@"bea6c853b6edbd15e9d0941825abd04d77933ed0" open TopologicalSpace Filter open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory variable {Ω E : Type*} {m0 : ...
Mathlib/Probability/Martingale/Centering.lean
86
90
theorem integrable_martingalePart (hf_int : ∀ n, Integrable (f n) μ) (n : ℕ) : Integrable (martingalePart f ℱ μ n) μ := by
rw [martingalePart_eq_sum] exact (hf_int 0).add (integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp)
[ " predictablePart f ℱ μ 0 = 0", " martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " (fun n => f n - ∑ i ∈ Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " f n - ∑ i ∈ F...
[ " predictablePart f ℱ μ 0 = 0", " martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " (fun n => f n - ∑ i ∈ Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " f n - ∑ i ∈ F...
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {α : Type*} section support v...
Mathlib/GroupTheory/Perm/Support.lean
297
298
theorem mem_support {x : α} : x ∈ f.support ↔ f x ≠ x := by
rw [support, mem_filter, and_iff_right (mem_univ x)]
[ " x ∈ f.support ↔ f x ≠ x" ]
[ " x ∈ f.support ↔ f x ≠ x" ]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Data.Set.Image import Mathlib.MeasureTheory.Function.LpSeminorm.ChebyshevMarkov import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp import Mathlib.MeasureTheory.Function.LpSeminorm.TriangleInequality...
Mathlib/MeasureTheory/Function/LpSpace.lean
126
127
theorem toLp_congr {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) (hfg : f =ᵐ[μ] g) : hf.toLp f = hg.toLp g := by
simp [toLp, hfg]
[ " snorm (↑(AEEqFun.mk f ⋯)) p μ < ⊤", " f + g ∈ {f | snorm (↑f) p μ < ⊤}", " 0 ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯ }.carrier", " -f ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯, zero_mem' := ⋯ }.carrier", " toLp f hf = toLp g hg" ]
[ " snorm (↑(AEEqFun.mk f ⋯)) p μ < ⊤", " f + g ∈ {f | snorm (↑f) p μ < ⊤}", " 0 ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯ }.carrier", " -f ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯, zero_mem' := ⋯ }.carrier", " toLp f hf = toLp g hg" ]
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ι : Sort*} {𝕜 E : Type*} section OrderedSemiring variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] {s t s₁ s₂ t₁ t₂ u : Set ...
Mathlib/Analysis/Convex/Join.lean
98
100
theorem convexJoin_iUnion_right (s : Set E) (t : ι → Set E) : convexJoin 𝕜 s (⋃ i, t i) = ⋃ i, convexJoin 𝕜 s (t i) := by
simp_rw [convexJoin_comm s, convexJoin_iUnion_left]
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅", " convexJoin 𝕜 s ∅ = ∅", " convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y", " convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y", " convexJoin 𝕜 {x} {y} = ...
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅", " convexJoin 𝕜 s ∅ = ∅", " convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y", " convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y", " convexJoin 𝕜 {x} {y} = ...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Ring.Action.Basic import Mathlib.GroupTheory.GroupAction.Hom import Mathlib.GroupTheory.GroupAction.Quotient #align_import algebra.polynomial.group_ring_action from "leanprover-community/mathlib"@"afad8e438d03f...
Mathlib/Algebra/Polynomial/GroupRingAction.lean
76
78
theorem smul_eval [MulSemiringAction G S] (g : G) (f : S[X]) (x : S) : (g • f).eval x = g • f.eval (g⁻¹ • x) := by
rw [← smul_eval_smul, smul_inv_smul]
[ " HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m)", " m • r = map (MulSemiringAction.toRingHom M R m) r", " DistribMulAction.toAddMonoidHom R[X] m = (mapRingHom (MulSemiringAction.toRingHom M R m)).toAddMonoidHom", " ((DistribMulAction.toAddMonoidHom R[X] m).comp (monomial n).toAddMonoidHom) r =\n ...
[ " HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m)", " m • r = map (MulSemiringAction.toRingHom M R m) r", " DistribMulAction.toAddMonoidHom R[X] m = (mapRingHom (MulSemiringAction.toRingHom M R m)).toAddMonoidHom", " ((DistribMulAction.toAddMonoidHom R[X] m).comp (monomial n).toAddMonoidHom) r =\n ...
import Mathlib.NumberTheory.Cyclotomic.Discriminant import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral import Mathlib.RingTheory.Ideal.Norm #align_import number_theory.cyclotomic.rat from "leanprover-community/mathlib"@"b353176c24d96c23f0ce1cc63efc3f55019702d9" universe u open Algebra IsCyclotomicExtensio...
Mathlib/NumberTheory/Cyclotomic/Rat.lean
74
119
theorem isIntegralClosure_adjoin_singleton_of_prime_pow [hcycl : IsCyclotomicExtension {p ^ k} ℚ K] (hζ : IsPrimitiveRoot ζ ↑(p ^ k)) : IsIntegralClosure (adjoin ℤ ({ζ} : Set K)) ℤ K := by
refine ⟨Subtype.val_injective, @fun x => ⟨fun h => ⟨⟨x, ?_⟩, rfl⟩, ?_⟩⟩ swap · rintro ⟨y, rfl⟩ exact IsIntegral.algebraMap ((le_integralClosure_iff_isIntegral.1 (adjoin_le_integralClosure (hζ.isIntegral (p ^ k).pos))).isIntegral _) let B := hζ.subOnePowerBasis ℚ have hint : IsInte...
[ " Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))", " Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis", " Algebra.discr ℚ ⇑(IsPrimitiveRo...
[ " Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))", " Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis", " Algebra.discr ℚ ⇑(IsPrimitiveRo...
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Nat.PartENat import Mathlib.Tactic.Linarith #align_import ring_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" variable {α β...
Mathlib/RingTheory/Multiplicity.lean
123
126
theorem pos_of_dvd {a b : α} (hfin : Finite a b) (hdiv : a ∣ b) : 0 < (multiplicity a b).get hfin := by
refine zero_lt_iff.2 fun h => ?_ simpa [hdiv] using is_greatest' hfin (lt_one_iff.mpr h)
[ " multiplicity ↑a ↑b = multiplicity a b", " (multiplicity ↑a ↑b).Dom ↔ (multiplicity a b).Dom", " (∃ n, ¬↑a ^ (n + 1) ∣ ↑b) ↔ ∃ n, ¬a ^ (n + 1) ∣ b", " ∀ (h₁ : (multiplicity ↑a ↑b).Dom) (h₂ : (multiplicity a b).Dom),\n (multiplicity ↑a ↑b).get h₁ = (multiplicity a b).get h₂", " (multiplicity ↑a ↑b).get h...
[ " multiplicity ↑a ↑b = multiplicity a b", " (multiplicity ↑a ↑b).Dom ↔ (multiplicity a b).Dom", " (∃ n, ¬↑a ^ (n + 1) ∣ ↑b) ↔ ∃ n, ¬a ^ (n + 1) ∣ b", " ∀ (h₁ : (multiplicity ↑a ↑b).Dom) (h₂ : (multiplicity a b).Dom),\n (multiplicity ↑a ↑b).get h₁ = (multiplicity a b).get h₂", " (multiplicity ↑a ↑b).get h...
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Expand import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.ZMod.Basic #align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c...
Mathlib/RingTheory/WittVector/WittPolynomial.lean
154
163
theorem wittPolynomial_zmod_self (n : ℕ) : W_ (ZMod (p ^ (n + 1))) (n + 1) = expand p (W_ (ZMod (p ^ (n + 1))) n) := by
simp only [wittPolynomial_eq_sum_C_mul_X_pow] rw [sum_range_succ, ← Nat.cast_pow, CharP.cast_eq_zero (ZMod (p ^ (n + 1))) (p ^ (n + 1)), C_0, zero_mul, add_zero, AlgHom.map_sum, sum_congr rfl] intro k hk rw [AlgHom.map_mul, AlgHom.map_pow, expand_X, algHom_C, ← pow_mul, ← pow_succ'] congr rw [mem_range...
[ " wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
[ " wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.Order.Filter.IndicatorFunction import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Function.LpSeminorm.Trim #align_import measure_theory.function.conditional...
Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
102
110
theorem const_inner {𝕜 β} [RCLike 𝕜] [NormedAddCommGroup β] [InnerProductSpace 𝕜 β] {f : α → β} (hfm : AEStronglyMeasurable' m f μ) (c : β) : AEStronglyMeasurable' m (fun x => (inner c (f x) : 𝕜)) μ := by
rcases hfm with ⟨f', hf'_meas, hf_ae⟩ refine ⟨fun x => (inner c (f' x) : 𝕜), (@stronglyMeasurable_const _ _ m _ c).inner hf'_meas, hf_ae.mono fun x hx => ?_⟩ dsimp only rw [hx]
[ " AEStronglyMeasurable' m g μ", " AEStronglyMeasurable' m (f + g) μ", " AEStronglyMeasurable' m (-f) μ", " (-f) x = (-f') x", " -f x = -f' x", " AEStronglyMeasurable' m (f - g) μ", " (f - g) x = (f' - g') x", " f x - g x = f' x - g' x", " AEStronglyMeasurable' m (c • f) μ", " c • f =ᶠ[ae μ] c • f'...
[ " AEStronglyMeasurable' m g μ", " AEStronglyMeasurable' m (f + g) μ", " AEStronglyMeasurable' m (-f) μ", " (-f) x = (-f') x", " -f x = -f' x", " AEStronglyMeasurable' m (f - g) μ", " (f - g) x = (f' - g') x", " f x - g x = f' x - g' x", " AEStronglyMeasurable' m (c • f) μ", " c • f =ᶠ[ae μ] c • f'...
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.GroupTheory.GroupAction.Units import Mathlib.Logic.Basic import Mathlib.Tactic.Ring #align_import ring_theory.coprime.basic from "leanprover-community/mathlib"@"a95b16cb...
Mathlib/RingTheory/Coprime/Basic.lean
114
121
theorem IsCoprime.mul_left (H1 : IsCoprime x z) (H2 : IsCoprime y z) : IsCoprime (x * y) z := let ⟨a, b, h1⟩ := H1 let ⟨c, d, h2⟩ := H2 ⟨a * c, a * x * d + b * c * y + b * d * z, calc a * c * (x * y) + (a * x * d + b * c * y + b * d * z) * z _ = (a * x + b * z) * (c * y + d * z) := by
ring _ = 1 := by rw [h1, h2, mul_one] ⟩
[ " b * y + a * x = 1", " x * (a + b) = 1", " b * x + 0 * x = 1", " x * b = 1", " 1 * 0 + b * x = 1", " IsCoprime ↑a ↑b", " ↑u * ↑a + ↑v * ↑b = 1", " ↑1 = 1", " p ≠ 0", " False", " x ≠ 0 ∨ y ≠ 0", " x = 0 → y ≠ 0", " 1 * 1 + 0 * x = 1", " 0 * x + 1 * 1 = 1", " x ∣ y", " x ∣ y * a * x + b...
[ " b * y + a * x = 1", " x * (a + b) = 1", " b * x + 0 * x = 1", " x * b = 1", " 1 * 0 + b * x = 1", " IsCoprime ↑a ↑b", " ↑u * ↑a + ↑v * ↑b = 1", " ↑1 = 1", " p ≠ 0", " False", " x ≠ 0 ∨ y ≠ 0", " x = 0 → y ≠ 0", " 1 * 1 + 0 * x = 1", " 0 * x + 1 * 1 = 1", " x ∣ y", " x ∣ y * a * x + b...
import Mathlib.Analysis.Complex.Circle import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace import Mathlib.Alge...
Mathlib/Analysis/Fourier/FourierTransform.lean
96
100
theorem norm_fourierIntegral_le_integral_norm (e : AddChar 𝕜 𝕊) (μ : Measure V) (L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜) (f : V → E) (w : W) : ‖fourierIntegral e μ L f w‖ ≤ ∫ v : V, ‖f v‖ ∂μ := by
refine (norm_integral_le_integral_norm _).trans (le_of_eq ?_) simp_rw [norm_circle_smul]
[ " fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f", " fourierIntegral e μ L (r • f) w = (r • fourierIntegral e μ L f) w", " ∫ (v : V), e (-(L v) w) • r • f v ∂μ = ∫ (a : V), r • e (-(L a) w) • f a ∂μ", " e (-(L v) w) • r • f v = r • e (-(L v) w) • f v", " ‖fourierIntegral e μ L f w‖ ≤ ∫ (v : V),...
[ " fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f", " fourierIntegral e μ L (r • f) w = (r • fourierIntegral e μ L f) w", " ∫ (v : V), e (-(L v) w) • r • f v ∂μ = ∫ (a : V), r • e (-(L a) w) • f a ∂μ", " e (-(L v) w) • r • f v = r • e (-(L v) w) • f v", " ‖fourierIntegral e μ L f w‖ ≤ ∫ (v : V),...
import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.PNat.Prime import Mathlib.Data.Nat.Factors import Mathlib.Data.Multiset.Sort #align_import data.pnat.factors from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" -- Porting note: `deriving` contained Inhabited, Canonic...
Mathlib/Data/PNat/Factors.lean
89
91
theorem coeNat_prime (v : PrimeMultiset) (p : ℕ) (h : p ∈ (v : Multiset ℕ)) : p.Prime := by
rcases Multiset.mem_map.mp h with ⟨⟨_, hp'⟩, ⟨_, h_eq⟩⟩ exact h_eq ▸ hp'
[ " ∀ (a : PrimeMultiset), ⊥ ≤ a", " Repr PrimeMultiset", " Repr (Multiset Nat.Primes)", " p.Prime" ]
[ " ∀ (a : PrimeMultiset), ⊥ ≤ a", " Repr PrimeMultiset", " Repr (Multiset Nat.Primes)", " p.Prime" ]
import Mathlib.CategoryTheory.Balanced import Mathlib.CategoryTheory.Limits.EssentiallySmall import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Subobject.Lattice import Mathlib.CategoryTheory.Subobject.WellPowered import Mathlib.Data.S...
Mathlib/CategoryTheory/Generator.lean
113
114
theorem isSeparating_unop_iff (𝒢 : Set Cᵒᵖ) : IsSeparating 𝒢.unop ↔ IsCoseparating 𝒢 := by
rw [← isCoseparating_op_iff, Set.unop_op]
[ " IsSeparating 𝒢.op ↔ IsCoseparating 𝒢", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒢.op ↔ IsSeparating 𝒢", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒢.unop ↔ IsSeparating 𝒢", " IsSep...
[ " IsSeparating 𝒢.op ↔ IsCoseparating 𝒢", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒢.op ↔ IsSeparating 𝒢", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒢.unop ↔ IsSeparating 𝒢", " IsSep...
import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Data.Set.Lattice #align_import data.set.intervals.pi from "leanprover-community/mathlib"@"e4bc74cbaf429d706cb9140902f7ca6c431e75a4" -- Porting note: Added, since dot nota...
Mathlib/Order/Interval/Set/Pi.lean
101
109
theorem pi_univ_Ioc_update_right {x y : ∀ i, α i} {i₀ : ι} {m : α i₀} (hm : m ≤ y i₀) : (pi univ fun i ↦ Ioc (x i) (update y i₀ m i)) = { z | z i₀ ≤ m } ∩ pi univ fun i ↦ Ioc (x i) (y i) := by
have : Ioc (x i₀) m = Iic m ∩ Ioc (x i₀) (y i₀) := by rw [← Ioi_inter_Iic, ← Ioi_inter_Iic, inter_left_comm, inter_eq_self_of_subset_left (Iic_subset_Iic.2 hm)] simp_rw [univ_pi_update i₀ y m fun i z ↦ Ioc (x i) z, ← pi_inter_compl ({i₀} : Set ι), singleton_pi', ← inter_assoc, this] rfl
[ " (y ∈ univ.pi fun i => Ici (x i)) ↔ y ∈ Ici x", " (y ∈ univ.pi fun i => Iic (x i)) ↔ y ∈ Iic x", " (y ∈ univ.pi fun i => Icc (x i) (y✝ i)) ↔ y ∈ Icc x y✝", " (univ.pi fun i => Ioc (update x i₀ m i) (y i)) = {z | m < z i₀} ∩ univ.pi fun i => Ioc (x i) (y i)", " Ioc m (y i₀) = Ioi m ∩ Ioc (x i₀) (y i₀)", "...
[ " (y ∈ univ.pi fun i => Ici (x i)) ↔ y ∈ Ici x", " (y ∈ univ.pi fun i => Iic (x i)) ↔ y ∈ Iic x", " (y ∈ univ.pi fun i => Icc (x i) (y✝ i)) ↔ y ∈ Icc x y✝", " (univ.pi fun i => Ioc (update x i₀ m i) (y i)) = {z | m < z i₀} ∩ univ.pi fun i => Ioc (x i) (y i)", " Ioc m (y i₀) = Ioi m ∩ Ioc (x i₀) (y i₀)", "...
import Mathlib.CategoryTheory.Sites.Spaces import Mathlib.Topology.Sheaves.Sheaf import Mathlib.CategoryTheory.Sites.DenseSubsite #align_import topology.sheaves.sheaf_condition.sites from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section set_option linter.uppercaseLe...
Mathlib/Topology/Sheaves/SheafCondition/Sites.lean
137
144
theorem coverDense_iff_isBasis [Category ι] (B : ι ⥤ Opens X) : B.IsCoverDense (Opens.grothendieckTopology X) ↔ Opens.IsBasis (Set.range B.obj) := by
rw [Opens.isBasis_iff_nbhd] constructor · intro hd U x hx; rcases hd.1 U x hx with ⟨V, f, ⟨i, f₁, f₂, _⟩, hV⟩ exact ⟨B.obj i, ⟨i, rfl⟩, f₁.le hV, f₂.le⟩ intro hb; constructor; intro U x hx; rcases hb hx with ⟨_, ⟨i, rfl⟩, hx, hi⟩ exact ⟨B.obj i, ⟨⟨hi⟩⟩, ⟨⟨i, 𝟙 _, ⟨⟨hi⟩⟩, rfl⟩⟩, hx⟩
[ " presieveOfCoveringAux (coveringOfPresieve Y R) Y = R", " f ∈ presieveOfCoveringAux (coveringOfPresieve Y R) Y ↔ f ∈ R", " f ∈ R", " B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔ Opens.IsBasis (Set.range B.obj)", " B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔\n ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ...
[ " presieveOfCoveringAux (coveringOfPresieve Y R) Y = R", " f ∈ presieveOfCoveringAux (coveringOfPresieve Y R) Y ↔ f ∈ R", " f ∈ R", " B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔ Opens.IsBasis (Set.range B.obj)" ]
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Sym.Sym2 namespace List variable {α : Type*} section Sym2 protected def sym2 : List α → List (Sym2 α) | [] => [] | x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2 theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} : z ∈ (x :: xs)...
Mathlib/Data/List/Sym.lean
68
79
theorem mk_mem_sym2 {xs : List α} {a b : α} (ha : a ∈ xs) (hb : b ∈ xs) : s(a, b) ∈ xs.sym2 := by
induction xs with | nil => simp at ha | cons x xs ih => rw [mem_sym2_cons_iff] rw [mem_cons] at ha hb obtain (rfl | ha) := ha <;> obtain (rfl | hb) := hb · left; rfl · right; left; use b · right; left; rw [Sym2.eq_swap]; use a · right; right; exact ih ha hb
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []", " a ∈ xs", ...
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []", " a ∈ xs", ...
import Batteries.Data.RBMap.Basic import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename import Mathlib.Tactic.TypeStar import Mathlib.Util.CompileInductive #align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8" inductive Tree.{u} (α : Type u) : Type ...
Mathlib/Data/Tree/Basic.lean
90
91
theorem numLeaves_eq_numNodes_succ (x : Tree α) : x.numLeaves = x.numNodes + 1 := by
induction x <;> simp [*, Nat.add_comm, Nat.add_assoc, Nat.add_left_comm]
[ " x.numLeaves = x.numNodes + 1", " nil.numLeaves = nil.numNodes + 1", " (node a✝² a✝¹ a✝).numLeaves = (node a✝² a✝¹ a✝).numNodes + 1" ]
[ " x.numLeaves = x.numNodes + 1" ]
import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.Matrix.NonsingularInverse #align_import linear_algebra.affine_space.matrix from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" open Affine Matrix open Set universe u₁ u₂ u₃ u₄ variable {ι : Type u₁} {k : Type...
Mathlib/LinearAlgebra/AffineSpace/Matrix.lean
124
127
theorem toMatrix_mul_toMatrix : b.toMatrix b₂ * b₂.toMatrix b = 1 := by
ext l m change (b.coords (b₂ l) ᵥ* b₂.toMatrix b) m = _ rw [toMatrix_vecMul_coords, coords_apply, ← toMatrix_apply, toMatrix_self]
[ " b.toMatrix ⇑b = 1", " b.toMatrix (⇑b) i j = 1 i j", " ∑ j : ι, b.toMatrix q i j = 1", " AffineIndependent k p", " ∀ (w1 w2 : ι' → k),\n ∑ i : ι', w1 i = 1 →\n ∑ i : ι', w2 i = 1 →\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 → w1 = w2", "...
[ " b.toMatrix ⇑b = 1", " b.toMatrix (⇑b) i j = 1 i j", " ∑ j : ι, b.toMatrix q i j = 1", " AffineIndependent k p", " ∀ (w1 w2 : ι' → k),\n ∑ i : ι', w1 i = 1 →\n ∑ i : ι', w2 i = 1 →\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 → w1 = w2", "...
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.Algebra.Module.Torsion #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v v' u₁' w w' variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}...
Mathlib/LinearAlgebra/Dimension/Constructions.lean
58
64
theorem LinearIndependent.union_of_quotient {M' : Submodule R M} {s : Set M} (hs : s ⊆ M') (hs' : LinearIndependent (ι := s) R Subtype.val) {t : Set M} (ht : LinearIndependent (ι := t) R (Submodule.Quotient.mk (p := M') ∘ Subtype.val)) : LinearIndependent (ι := (s ∪ t : _)) R Subtype.val := by
refine (LinearIndependent.sum_elim_of_quotient (f := Set.embeddingOfSubset s M' hs) (of_comp M'.subtype (by simpa using hs')) Subtype.val ht).to_subtype_range' ?_ simp only [embeddingOfSubset_apply_coe, Sum.elim_range, Subtype.range_val]
[ " LinearIndependent R (Sum.elim (fun x => ↑(f x)) g)", " Disjoint (span R (range fun x => ↑(f x))) (span R (range g))", " x = 0", " (c.sum fun i a => a • g i) = 0", " LinearIndependent (ι := ↑(s ∪ t)) R Subtype.val", " LinearIndependent (ι := ↑s) R (⇑M'.subtype ∘ ⇑(s.embeddingOfSubset (↑M') hs))", " ran...
[ " LinearIndependent R (Sum.elim (fun x => ↑(f x)) g)", " Disjoint (span R (range fun x => ↑(f x))) (span R (range g))", " x = 0", " (c.sum fun i a => a • g i) = 0", " LinearIndependent (ι := ↑(s ∪ t)) R Subtype.val" ]
import Mathlib.Algebra.Quaternion import Mathlib.Tactic.Ring #align_import algebra.quaternion_basis from "leanprover-community/mathlib"@"3aa5b8a9ed7a7cabd36e6e1d022c9858ab8a8c2d" open Quaternion namespace QuaternionAlgebra structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) ...
Mathlib/Algebra/QuaternionBasis.lean
138
139
theorem lift_smul (r : R) (x : ℍ[R,c₁,c₂]) : q.lift (r • x) = r • q.lift x := by
simp [lift, mul_smul, ← Algebra.smul_def]
[ " q₁ = q₂", " { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂", " { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂", " { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ...
[ " q₁ = q₂", " { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂", " { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂", " { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ...
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.RingTheory.Polynomial.Bernstein import Mathlib.Topology.ContinuousFunction.Polynomial import Mathlib.Topology.ContinuousFunction.Compact #align_import analysis.special_functions.bernstein from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba14...
Mathlib/Analysis/SpecialFunctions/Bernstein.lean
67
71
theorem bernstein_nonneg {n ν : ℕ} {x : I} : 0 ≤ bernstein n ν x := by
simp only [bernstein_apply] have h₁ : (0:ℝ) ≤ x := by unit_interval have h₂ : (0:ℝ) ≤ 1 - x := by unit_interval positivity
[ " (bernstein n ν) x = ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " Polynomial.eval (↑x) (↑(n.choose ν) * Polynomial.X ^ ν * (1 - Polynomial.X) ^ (n - ν)) =\n ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " 0 ≤ (bernstein n ν) x", " 0 ≤ ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " 0 ≤ ↑x", " 0 ≤ 1...
[ " (bernstein n ν) x = ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " Polynomial.eval (↑x) (↑(n.choose ν) * Polynomial.X ^ ν * (1 - Polynomial.X) ^ (n - ν)) =\n ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)", " 0 ≤ (bernstein n ν) x" ]
import Mathlib.Algebra.Group.Equiv.TypeTags import Mathlib.GroupTheory.FreeAbelianGroup import Mathlib.GroupTheory.FreeGroup.IsFreeGroup import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import group_theory.free_abelian_group_finsupp from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e600...
Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean
72
74
theorem Finsupp.toFreeAbelianGroup_toFinsupp {X} (x : FreeAbelianGroup X) : Finsupp.toFreeAbelianGroup (FreeAbelianGroup.toFinsupp x) = x := by
rw [← AddMonoidHom.comp_apply, Finsupp.toFreeAbelianGroup_comp_toFinsupp, AddMonoidHom.id_apply]
[ " toFreeAbelianGroup.comp (singleAddHom x) = (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)", " (toFreeAbelianGroup.comp (singleAddHom x)) 1 = ((smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)) 1", " toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)", " (((toFinsupp.comp toFreeAbelianGroup).comp (s...
[ " toFreeAbelianGroup.comp (singleAddHom x) = (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)", " (toFreeAbelianGroup.comp (singleAddHom x)) 1 = ((smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)) 1", " toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)", " (((toFinsupp.comp toFreeAbelianGroup).comp (s...
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n α : Type*} namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
398
401
theorem det_fromBlocks_one₁₁ (B : Matrix m n α) (C : Matrix n m α) (D : Matrix n n α) : (Matrix.fromBlocks 1 B C D).det = det (D - C * B) := by
haveI : Invertible (1 : Matrix m m α) := invertibleOne rw [det_fromBlocks₁₁, invOf_one, Matrix.mul_one, det_one, one_mul]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Data.Complex.Basic import Mathlib.Data.Real.Archimedean #align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Zsqrtd Complex open sc...
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
154
155
theorem intCast_real_norm (x : ℤ[i]) : (x.norm : ℝ) = Complex.normSq (x : ℂ) := by
rw [Zsqrtd.norm, normSq]; simp
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re", " ↑x.im = (toComplex x).im", " (toComplex { re :=...
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re", " ↑x.im = (toComplex x).im", " (toComplex { re :=...
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.Tactic.PPWithUniv import Mathlib.Data.Set.Defs #align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace CategoryTheory -- morphism levels be...
Mathlib/CategoryTheory/Types.lean
272
280
theorem epi_iff_surjective {X Y : Type u} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f := by
constructor · rintro ⟨H⟩ refine Function.surjective_of_right_cancellable_Prop fun g₁ g₂ hg => ?_ rw [← Equiv.ulift.symm.injective.comp_left.eq_iff] apply H change ULift.up ∘ g₁ ∘ f = ULift.up ∘ g₂ ∘ f rw [hg] · exact fun H => ⟨fun g g' h => H.injective_comp_right h⟩
[ " f = g", " f x = g x", " Mono (↾f)", " ↾f ≫ inv (↾f) = 𝟙 α", " x = y → homOfElement x = homOfElement y", " Mono f ↔ Function.Injective f", " Mono f → Function.Injective f", " x = x'", " homOfElement x = homOfElement x'", " Function.Injective f → Mono f", " Epi f ↔ Function.Surjective f", " E...
[ " f = g", " f x = g x", " Mono (↾f)", " ↾f ≫ inv (↾f) = 𝟙 α", " x = y → homOfElement x = homOfElement y", " Mono f ↔ Function.Injective f", " Mono f → Function.Injective f", " x = x'", " homOfElement x = homOfElement x'", " Function.Injective f → Mono f", " Epi f ↔ Function.Surjective f" ]
import Mathlib.LinearAlgebra.Dimension.Finrank import Mathlib.LinearAlgebra.InvariantBasisNumber #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v w w' variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup...
Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
177
191
theorem linearIndependent_le_span_aux' {ι : Type*} [Fintype ι] (v : ι → M) (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : range v ≤ span R w) : Fintype.card ι ≤ Fintype.card w := by
-- We construct an injective linear map `(ι → R) →ₗ[R] (w → R)`, -- by thinking of `f : ι → R` as a linear combination of the finite family `v`, -- and expressing that (using the axiom of choice) as a linear combination over `w`. -- We can do this linearly by constructing the map on a basis. fapply card_le_o...
[ " Fintype.card ι ≤ Fintype.card ↑w", " (ι →₀ R) →ₗ[R] ↑w →₀ R", " ι → ↑w →₀ R", " Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)", " f = g" ]
[ " Fintype.card ι ≤ Fintype.card ↑w" ]
import Mathlib.RingTheory.WittVector.StructurePolynomial #align_import ring_theory.witt_vector.defs from "leanprover-community/mathlib"@"f1944b30c97c5eb626e498307dec8b022a05bd0a" noncomputable section structure WittVector (p : ℕ) (R : Type*) where mk' :: coeff : ℕ → R #align witt_vector WittVector -- Port...
Mathlib/RingTheory/WittVector/Defs.lean
74
78
theorem ext {x y : 𝕎 R} (h : ∀ n, x.coeff n = y.coeff n) : x = y := by
cases x cases y simp only at h simp [Function.funext_iff, h]
[ " x = y", " { coeff := coeff✝ } = y", " { coeff := coeff✝¹ } = { coeff := coeff✝ }" ]
[ " x = y" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Deprecated.Subring #align_import deprecated.subfield from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" variable {F : Type*} [Field F] (S : Set F) structure IsSubfield extends IsSubring S : Prop where inv_mem : ∀ {x : F}, x ∈ S → x⁻...
Mathlib/Deprecated/Subfield.lean
102
123
theorem closure.isSubfield : IsSubfield (closure S) := { closure.isSubmonoid with add_mem := by
intro a b ha hb rcases id ha with ⟨p, hp, q, hq, rfl⟩ rcases id hb with ⟨r, hr, s, hs, rfl⟩ by_cases hq0 : q = 0 · rwa [hq0, div_zero, zero_add] by_cases hs0 : s = 0 · rwa [hs0, div_zero, add_zero] exact ⟨p * s + q * r, IsAddSubmonoid.add_mem Ring.closure.isSubri...
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s", " IsSubfield (Set.range ⇑f)", " IsSubfield (⇑f '' Set.univ)", " ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a * b ∈ closure S", ...
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s", " IsSubfield (Set.range ⇑f)", " IsSubfield (⇑f '' Set.univ)", " ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a * b ∈ closure S", ...
import Mathlib.Data.Nat.Squarefree import Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity import Mathlib.Tactic.LinearCombination #align_import number_theory.sum_two_squares from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" section General theorem sq_add_sq_mul {R} [CommRing R] ...
Mathlib/NumberTheory/SumTwoSquares.lean
56
61
theorem Nat.sq_add_sq_mul {a b x y u v : ℕ} (ha : a = x ^ 2 + y ^ 2) (hb : b = u ^ 2 + v ^ 2) : ∃ r s : ℕ, a * b = r ^ 2 + s ^ 2 := by
zify at ha hb ⊢ obtain ⟨r, s, h⟩ := _root_.sq_add_sq_mul ha hb refine ⟨r.natAbs, s.natAbs, ?_⟩ simpa only [Int.natCast_natAbs, sq_abs]
[ " a * b = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2", " (x ^ 2 + y ^ 2) * (u ^ 2 + v ^ 2) = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2", " ∃ r s, a * b = r ^ 2 + s ^ 2", " ∃ r s, ↑a * ↑b = ↑r ^ 2 + ↑s ^ 2", " ↑a * ↑b = ↑r.natAbs ^ 2 + ↑s.natAbs ^ 2" ]
[ " a * b = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2", " (x ^ 2 + y ^ 2) * (u ^ 2 + v ^ 2) = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2", " ∃ r s, a * b = r ^ 2 + s ^ 2" ]
import Mathlib.Logic.Function.Basic import Mathlib.Tactic.MkIffOfInductiveProp #align_import data.sum.basic from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" universe u v w x variable {α : Type u} {α' : Type w} {β : Type v} {β' : Type x} {γ δ : Type*} namespace Sum #align sum.foral...
Mathlib/Data/Sum/Basic.lean
63
64
theorem getLeft_eq_getLeft? (h₁ : x.isLeft) (h₂ : x.getLeft?.isSome) : x.getLeft h₁ = x.getLeft?.get h₂ := by
simp [← getLeft?_eq_some_iff]
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = inl a ↔ ∃ h, x.getLeft h = a", " inl val✝ ...
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = inl a ↔ ∃ h, x.getLeft h = a", " inl val✝ ...
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Group.Instances import Mathlib.LinearAlgebra.AffineSpace.Slope import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.Tactic.FieldSimp #align_import li...
Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
67
69
theorem lineMap_strict_mono_right (hb : b < b') (hr : 0 < r) : lineMap a b r < lineMap a b' r := by
simp only [lineMap_apply_module] exact add_lt_add_left (smul_lt_smul_of_pos_left hb hr) _
[ " (lineMap a b) r ≤ (lineMap a' b) r", " (1 - r) • a + r • b ≤ (1 - r) • a' + r • b", " (lineMap a b) r < (lineMap a' b) r", " (1 - r) • a + r • b < (1 - r) • a' + r • b", " (lineMap a b) r ≤ (lineMap a b') r", " (1 - r) • a + r • b ≤ (1 - r) • a + r • b'", " (lineMap a b) r < (lineMap a b') r", " (1 ...
[ " (lineMap a b) r ≤ (lineMap a' b) r", " (1 - r) • a + r • b ≤ (1 - r) • a' + r • b", " (lineMap a b) r < (lineMap a' b) r", " (1 - r) • a + r • b < (1 - r) • a' + r • b", " (lineMap a b) r ≤ (lineMap a b') r", " (1 - r) • a + r • b ≤ (1 - r) • a + r • b'", " (lineMap a b) r < (lineMap a b') r" ]
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
875
876
theorem div_lt_div_iff_right (c : α) : a / c < b / c ↔ a < b := by
simpa only [div_eq_mul_inv] using mul_lt_mul_iff_right _
[ " b ≤ c", " a / c < b / c ↔ a < b" ]
[ " b ≤ c", " a / c < b / c ↔ a < b" ]
import Mathlib.Data.Fintype.Basic import Mathlib.Data.Set.Finite #align_import combinatorics.hall.finite from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Finset universe u v namespace HallMarriageTheorem variable {ι : Type u} {α : Type v} [DecidableEq α] {t : ι → Finset α} s...
Mathlib/Combinatorics/Hall/Finite.lean
78
121
theorem hall_hard_inductive_step_A {n : ℕ} (hn : Fintype.card ι = n + 1) (ht : ∀ s : Finset ι, s.card ≤ (s.biUnion t).card) (ih : ∀ {ι' : Type u} [Fintype ι'] (t' : ι' → Finset α), Fintype.card ι' ≤ n → (∀ s' : Finset ι', s'.card ≤ (s'.biUnion t').card) → ∃ f : ι' → α, Functi...
haveI : Nonempty ι := Fintype.card_pos_iff.mp (hn.symm ▸ Nat.succ_pos _) haveI := Classical.decEq ι -- Choose an arbitrary element `x : ι` and `y : t x`. let x := Classical.arbitrary ι have tx_ne : (t x).Nonempty := by rw [← Finset.card_pos] calc 0 < 1 := Nat.one_pos _ ≤ (Finset.biUnion {...
[ " s'.card ≤ (s'.biUnion fun x' => (t ↑x').erase a).card", " s'.card < (s'.biUnion fun x_1 => t ↑x_1).card", " False", " (s'.biUnion fun x_1 => t ↑x_1) = (image (fun z => ↑z) s').biUnion t", " (x ∈ s'.biUnion fun x => t ↑x) ↔ x ∈ (image (fun z => ↑z) s').biUnion t", " s'.card ≤ ((s'.biUnion fun x' => t ↑x'...
[ " s'.card ≤ (s'.biUnion fun x' => (t ↑x').erase a).card", " s'.card < (s'.biUnion fun x_1 => t ↑x_1).card", " False", " (s'.biUnion fun x_1 => t ↑x_1) = (image (fun z => ↑z) s').biUnion t", " (x ∈ s'.biUnion fun x => t ↑x) ↔ x ∈ (image (fun z => ↑z) s').biUnion t", " s'.card ≤ ((s'.biUnion fun x' => t ↑x'...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.GeomSum import Mathlib.LinearAlgebra.Matrix.Block import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.Nondegenerate #align_import linear_algebra.vandermonde from "leanprover-community/mathlib"@"70fd9563a21e7b963887c93...
Mathlib/LinearAlgebra/Vandermonde.lean
77
139
theorem det_vandermonde {n : ℕ} (v : Fin n → R) : det (vandermonde v) = ∏ i : Fin n, ∏ j ∈ Ioi i, (v j - v i) := by
unfold vandermonde induction' n with n ih · exact det_eq_one_of_card_eq_zero (Fintype.card_fin 0) calc det (of fun i j : Fin n.succ => v i ^ (j : ℕ)) = det (of fun i j : Fin n.succ => Matrix.vecCons (v 0 ^ (j : ℕ)) (fun i => v (Fin.succ i) ^ (j : ℕ) - v 0 ^ (j : ℕ)) i) := ...
[ " vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j", " vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j", " vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j...
[ " vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j", " vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j", " vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j...
import Mathlib.Logic.Relation import Mathlib.Order.GaloisConnection #align_import data.setoid.basic from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" variable {α : Type*} {β : Type*} def Setoid.Rel (r : Setoid α) : α → α → Prop := @Setoid.r _ r #align setoid.rel Setoid.Rel instanc...
Mathlib/Data/Setoid/Basic.lean
155
158
theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s) := by
ext simp only [sInf_image, iInf_apply, iInf_Prop_eq] rfl
[ " (sInf s).Rel = sInf (Rel '' s)", " (sInf s).Rel x✝¹ x✝ ↔ sInf (Rel '' s) x✝¹ x✝", " (sInf s).Rel x✝¹ x✝ ↔ ∀ i ∈ s, i.Rel x✝¹ x✝" ]
[ " (sInf s).Rel = sInf (Rel '' s)" ]
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal ...
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
115
128
theorem isCaratheodory_iUnion_nat {s : ℕ → Set α} (h : ∀ i, IsCaratheodory m (s i)) (hd : Pairwise (Disjoint on s)) : IsCaratheodory m (⋃ i, s i) := by
apply (isCaratheodory_iff_le' m).mpr intro t have hp : m (t ∩ ⋃ i, s i) ≤ ⨆ n, m (t ∩ ⋃ i < n, s i) := by convert m.iUnion fun i => t ∩ s i using 1 · simp [inter_iUnion] · simp [ENNReal.tsum_eq_iSup_nat, isCaratheodory_sum m h hd] refine le_trans (add_le_add_right hp _) ...
[ " m.IsCaratheodory ∅", " m.IsCaratheodory s₁ → m.IsCaratheodory s₁ᶜ", " m.IsCaratheodory s", " m t = m (t ∩ (s₁ ∪ s₂)) + m (t \\ (s₁ ∪ s₂))", " m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + (m (t \\ s₁ ∩ s₂) + m ((t \\ s₁) \\ s₂)) =\n m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + m (t ∩ (s₂ \\ s₁)) + m (t \\ (s₁ ∪ s₂)...
[ " m.IsCaratheodory ∅", " m.IsCaratheodory s₁ → m.IsCaratheodory s₁ᶜ", " m.IsCaratheodory s", " m t = m (t ∩ (s₁ ∪ s₂)) + m (t \\ (s₁ ∪ s₂))", " m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + (m (t \\ s₁ ∩ s₂) + m ((t \\ s₁) \\ s₂)) =\n m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + m (t ∩ (s₂ \\ s₁)) + m (t \\ (s₁ ∪ s₂)...
import Mathlib.Algebra.ContinuedFractions.Computation.Approximations import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.Data.Rat.Floor #align_import algebra.continued_fractions.computation.terminates_iff_rat from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b3...
Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
295
312
theorem stream_nth_fr_num_le_fr_num_sub_n_rat : ∀ {ifp_n : IntFractPair ℚ}, IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (IntFractPair.of q).fr.num - n := by
induction n with | zero => intro ifp_zero stream_zero_eq have : IntFractPair.of q = ifp_zero := by injection stream_zero_eq simp [le_refl, this.symm] | succ n IH => intro ifp_succ_n stream_succ_nth_eq suffices ifp_succ_n.fr.num + 1 ≤ (IntFractPair.of q).fr.num - n by rw [Int.ofNat_succ,...
[ " ifp_succ_n.fr.num < ifp_n.fr.num", " ifp_n = ifp_n'", " (IntFractPair.of ifp_n.fr⁻¹).fr.num < ifp_n.fr.num", " ∀ {ifp_n : IntFractPair ℚ}, IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (IntFractPair.of q).fr.num - ↑n", " ∀ {ifp_n : IntFractPair ℚ}, IntFractPair.stream q 0 = some ifp_n → ifp_n.fr.n...
[ " ifp_succ_n.fr.num < ifp_n.fr.num", " ifp_n = ifp_n'", " (IntFractPair.of ifp_n.fr⁻¹).fr.num < ifp_n.fr.num", " ∀ {ifp_n : IntFractPair ℚ}, IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (IntFractPair.of q).fr.num - ↑n" ]
import Mathlib.GroupTheory.QuotientGroup import Mathlib.RingTheory.DedekindDomain.Ideal #align_import ring_theory.class_group from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" variable {R K L : Type*} [CommRing R] variable [Field K] [Field L] [DecidableEq L] variable [Algebra R K] [Is...
Mathlib/RingTheory/ClassGroup.lean
72
79
theorem mem_principal_ideals_iff {I : (FractionalIdeal R⁰ K)ˣ} : I ∈ (toPrincipalIdeal R K).range ↔ ∃ x : K, spanSingleton R⁰ x = I := by
simp only [MonoidHom.mem_range, toPrincipalIdeal_eq_iff] constructor <;> rintro ⟨x, hx⟩ · exact ⟨x, hx⟩ · refine ⟨Units.mk0 x ?_, hx⟩ rintro rfl simp [I.ne_zero.symm] at hx
[ " spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1", " spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1", " ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1", " ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ...
[ " spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1", " spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1", " ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1", " ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ...
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
494
502
theorem measurableSet_region_between_cc (hf : Measurable f) (hg : Measurable g) (hs : MeasurableSet s) : MeasurableSet { p : α × ℝ | p.fst ∈ s ∧ p.snd ∈ Icc (f p.fst) (g p.fst) } := by
dsimp only [regionBetween, Icc, mem_setOf_eq, setOf_and] refine MeasurableSet.inter ?_ ((measurableSet_le (hf.comp measurable_fst) measurable_snd).inter (measurableSet_le measurable_snd (hg.comp measurable_fst))) exact measurable_fst hs
[ " regionBetween f g s ⊆ s ×ˢ univ", " MeasurableSet (regionBetween f g s)", " MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 < g a.1}})", " MeasurableSet {a | a.1 ∈ s}", " MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Ioc (f p.1) (g p.1)}", " MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1...
[ " regionBetween f g s ⊆ s ×ˢ univ", " MeasurableSet (regionBetween f g s)", " MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 < g a.1}})", " MeasurableSet {a | a.1 ∈ s}", " MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Ioc (f p.1) (g p.1)}", " MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1...
import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Basic #align_import algebra.euclidean_domain.basic from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d0...
Mathlib/Algebra/EuclideanDomain/Basic.lean
88
89
theorem eq_div_of_mul_eq_left {a b c : R} (hb : b ≠ 0) (h : a * b = c) : a = c / b := by
rw [← h, mul_div_cancel_right₀ _ hb]
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0", " a / a = 1", " a = c / b" ]
[ " a * b / b = a", " a - a * b / b = 0", " False", " b ∣ a", " b ∣ b * (a / b)", " a % b = 0", " b * c = b * (b * c / b)", " c ∣ a % b ↔ c ∣ a", " 0 / a = 0", " a / a = 1", " a = c / b" ]
import Mathlib.Algebra.CharP.Invertible import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.Topology.Instances.RealVectorSpace #align_import analysis.normed_space.add_torsor from "leanprover-community/mathlib"@...
Mathlib/Analysis/NormedSpace/AddTorsor.lean
57
58
theorem dist_homothety_center (p₁ p₂ : P) (c : 𝕜) : dist (homothety p₁ c p₂) p₁ = ‖c‖ * dist p₁ p₂ := by
rw [dist_comm, dist_center_homothety]
[ " IsClosed ↑s.direction ↔ IsClosed ↑s", " IsClosed ↑⊥.direction ↔ IsClosed ↑⊥", " IsClosed ((fun x_1 => x_1 -ᵥ x) '' ↑s) ↔ IsClosed (⇑(IsometryEquiv.vaddConst x).toHomeomorph.symm '' ↑s)", " dist p₁ ((homothety p₁ c) p₂) = ‖c‖ * dist p₁ p₂", " dist ((homothety p₁ c) p₂) p₁ = ‖c‖ * dist p₁ p₂" ]
[ " IsClosed ↑s.direction ↔ IsClosed ↑s", " IsClosed ↑⊥.direction ↔ IsClosed ↑⊥", " IsClosed ((fun x_1 => x_1 -ᵥ x) '' ↑s) ↔ IsClosed (⇑(IsometryEquiv.vaddConst x).toHomeomorph.symm '' ↑s)", " dist p₁ ((homothety p₁ c) p₂) = ‖c‖ * dist p₁ p₂", " dist ((homothety p₁ c) p₂) p₁ = ‖c‖ * dist p₁ p₂" ]
import Mathlib.Data.Set.Basic #align_import data.set.bool_indicator from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" open Bool namespace Set variable {α : Type*} (s : Set α) noncomputable def boolIndicator (x : α) := @ite _ (x ∈ s) (Classical.propDecidable _) true false #align s...
Mathlib/Data/Set/BoolIndicator.lean
47
51
theorem preimage_boolIndicator_eq_union (t : Set Bool) : s.boolIndicator ⁻¹' t = (if true ∈ t then s else ∅) ∪ if false ∈ t then sᶜ else ∅ := by
ext x simp only [boolIndicator, mem_preimage] split_ifs <;> simp [*]
[ " x ∈ s ↔ s.boolIndicator x = true", " x ∈ s ↔ (if x ∈ s then true else false) = true", " x ∈ s ↔ true = true", " x ∈ s ↔ False", " x ∉ s ↔ s.boolIndicator x = false", " x ∉ s ↔ (if x ∈ s then true else false) = false", " x ∉ s ↔ False", " x ∉ s ↔ false = false", " s.boolIndicator ⁻¹' t = (if true ∈...
[ " x ∈ s ↔ s.boolIndicator x = true", " x ∈ s ↔ (if x ∈ s then true else false) = true", " x ∈ s ↔ true = true", " x ∈ s ↔ False", " x ∉ s ↔ s.boolIndicator x = false", " x ∉ s ↔ (if x ∈ s then true else false) = false", " x ∉ s ↔ False", " x ∉ s ↔ false = false", " s.boolIndicator ⁻¹' t = (if true ∈...
import Mathlib.Data.List.Basic namespace List variable {α β : Type*} @[simp] theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some...
Mathlib/Data/List/ReduceOption.lean
69
74
theorem reduceOption_length_lt_iff {l : List (Option α)} : l.reduceOption.length < l.length ↔ none ∈ l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
import Mathlib.Analysis.Calculus.BumpFunction.Basic import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open F...
Mathlib/Analysis/Calculus/BumpFunction/Normed.lean
69
72
theorem integral_pos : 0 < ∫ x, f x ∂μ := by
refine (integral_pos_iff_support_of_nonneg f.nonneg' f.integrable).mpr ?_ rw [f.support_eq] exact measure_ball_pos μ c f.rOut_pos
[ " f.normed μ (c - x) = f.normed μ (c + x)", " f.normed μ (-x) = f.normed μ x", " 0 < ∫ (x : E), ↑f x ∂μ", " 0 < μ (support fun i => ↑f i)", " 0 < μ (ball c f.rOut)" ]
[ " f.normed μ (c - x) = f.normed μ (c + x)", " f.normed μ (-x) = f.normed μ x", " 0 < ∫ (x : E), ↑f x ∂μ" ]
import Mathlib.Analysis.NormedSpace.Star.Spectrum import Mathlib.Analysis.Normed.Group.Quotient import Mathlib.Analysis.NormedSpace.Algebra import Mathlib.Topology.ContinuousFunction.Units import Mathlib.Topology.ContinuousFunction.Compact import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.ContinuousFunct...
Mathlib/Analysis/NormedSpace/Star/GelfandDuality.lean
88
94
theorem Ideal.toCharacterSpace_apply_eq_zero_of_mem {a : A} (ha : a ∈ I) : I.toCharacterSpace a = 0 := by
unfold Ideal.toCharacterSpace simp only [CharacterSpace.equivAlgHom_symm_coe, AlgHom.coe_comp, AlgHom.coe_coe, Quotient.mkₐ_eq_mk, Function.comp_apply, NormedRing.algEquivComplexOfComplete_symm_apply] simp_rw [Quotient.eq_zero_iff_mem.mpr ha, spectrum.zero_eq] exact Set.eq_of_mem_singleton (Set.singleton_n...
[ " I.toCharacterSpace a = 0", " (CharacterSpace.equivAlgHom.symm ((↑(NormedRing.algEquivComplexOfComplete ⋯).symm).comp (Quotient.mkₐ ℂ I))) a = 0", " ⋯.some = 0" ]
[ " I.toCharacterSpace a = 0" ]
import Mathlib.Topology.Algebra.Module.WeakDual import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed #align_import measure_theory.measure.finite_measure from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable...
Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
220
223
theorem eq_of_forall_apply_eq (μ ν : FiniteMeasure Ω) (h : ∀ s : Set Ω, MeasurableSet s → μ s = ν s) : μ = ν := by
ext1 s s_mble simpa [ennreal_coeFn_eq_coeFn_toMeasure] using congr_arg ((↑) : ℝ≥0 → ℝ≥0∞) (h s s_mble)
[ " ↑μ s = ↑ν s", " μ s₁ ≤ μ s₂", " (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal", " μ s ≤ μ.mass", " μ.mass = 0 ↔ μ = 0", " μ.mass = 0", " μ = 0", " ↑μ = ↑0", " ↑μ univ = 0", " μ.mass ≠ 0 ↔ μ ≠ 0", " μ = ν", " ↑μ = ↑ν" ]
[ " ↑μ s = ↑ν s", " μ s₁ ≤ μ s₂", " (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal", " μ s ≤ μ.mass", " μ.mass = 0 ↔ μ = 0", " μ.mass = 0", " μ = 0", " ↑μ = ↑0", " ↑μ univ = 0", " μ.mass ≠ 0 ↔ μ ≠ 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
106
111
theorem spectral_theorem : A = (eigenvectorUnitary hA : Matrix n n 𝕜) * diagonal (RCLike.ofReal ∘ hA.eigenvalues) * (star (eigenvectorUnitary hA : Matrix n n 𝕜)) := by
rw [← star_mul_self_mul_eq_diagonal, mul_assoc, mul_assoc, (Matrix.mem_unitaryGroup_iff).mp (eigenvectorUnitary hA).2, mul_one, ← mul_assoc, (Matrix.mem_unitaryGroup_iff).mp (eigenvectorUnitary hA).2, one_mul]
[ " 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)", " star ↑hA.eigenvectorUn...
import Mathlib.Tactic.Ring.Basic import Mathlib.Tactic.TryThis import Mathlib.Tactic.Conv import Mathlib.Util.Qq set_option autoImplicit true -- In this file we would like to be able to use multi-character auto-implicits. set_option relaxedAutoImplicit true namespace Mathlib.Tactic open Lean hiding Rat open Qq Me...
Mathlib/Tactic/Ring/RingNF.lean
124
125
theorem rat_rawCast_pos {R} [DivisionRing R] : (Rat.rawCast (.ofNat n) d : R) = Nat.rawCast n / Nat.rawCast d := by
simp
[ " a * -b = -(a * b)", " Nat.rawCast 0 = 0", " Nat.rawCast 1 = 1", " (Int.negOfNat n).rawCast = -n.rawCast", " Rat.rawCast (Int.ofNat n) d = n.rawCast / d.rawCast" ]
[ " a * -b = -(a * b)", " Nat.rawCast 0 = 0", " Nat.rawCast 1 = 1", " (Int.negOfNat n).rawCast = -n.rawCast", " Rat.rawCast (Int.ofNat n) d = n.rawCast / d.rawCast" ]
import Mathlib.Analysis.Convex.Body import Mathlib.Analysis.Convex.Measure import Mathlib.MeasureTheory.Group.FundamentalDomain #align_import measure_theory.group.geometry_of_numbers from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" namespace MeasureTheory open ENNReal FiniteDimensio...
Mathlib/MeasureTheory/Group/GeometryOfNumbers.lean
64
83
theorem exists_ne_zero_mem_lattice_of_measure_mul_two_pow_lt_measure [NormedAddCommGroup E] [NormedSpace ℝ E] [BorelSpace E] [FiniteDimensional ℝ E] [IsAddHaarMeasure μ] {L : AddSubgroup E} [Countable L] (fund : IsAddFundamentalDomain L F μ) (h_symm : ∀ x ∈ s, -x ∈ s) (h_conv : Convex ℝ s) (h : μ F * 2 ^ fi...
have h_vol : μ F < μ ((2⁻¹ : ℝ) • s) := by rw [addHaar_smul_of_nonneg μ (by norm_num : 0 ≤ (2 : ℝ)⁻¹) s, ← mul_lt_mul_right (pow_ne_zero (finrank ℝ E) (two_ne_zero' _)) (pow_ne_top two_ne_top), mul_right_comm, ofReal_pow (by norm_num : 0 ≤ (2 : ℝ)⁻¹), ofReal_inv_of_pos zero_lt_two] norm_num r...
[ " ∃ x y, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)", " μ s ≤ μ F", " ∃ x, x ≠ 0 ∧ ↑x ∈ s", " μ F < μ (2⁻¹ • s)", " 0 ≤ 2⁻¹", " μ F * 2 ^ finrank ℝ E < (ENNReal.ofReal 2)⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " μ F * 2 ^ finrank ℝ E < 2⁻¹ ^ finrank ℝ E * 2 ^ finrank ℝ E * μ s", " ↑(x - y) ∈ s", " 2⁻¹ •...
[ " ∃ x y, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)", " μ s ≤ μ F", " ∃ x, x ≠ 0 ∧ ↑x ∈ s" ]
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
177
181
theorem set_lintegral_pdf_le_map {m : MeasurableSpace Ω} (X : Ω → E) (ℙ : Measure Ω) (μ : Measure E := by
volume_tac) (s : Set E) : ∫⁻ x in s, pdf X ℙ μ x ∂μ ≤ map X ℙ s := by apply (withDensity_apply_le _ s).trans exact withDensity_pdf_le_map _ _ _ s
[ " pdf X ℙ μ =ᶠ[ae μ] 0", " rnDeriv 0 μ =ᶠ[ae μ] 0", " AEMeasurable X ℙ", " HasPDF X ℙ μ", " (map X ℙ).HaveLebesgueDecomposition μ", " Measurable (pdf X ℙ μ)", " ∫⁻ (x : E) in s, pdf X ℙ μ x ∂μ ≤ (map X ℙ) s", " (withDensity μ fun a => pdf X ℙ μ a) s ≤ (map X ℙ) s" ]
[ " pdf X ℙ μ =ᶠ[ae μ] 0", " rnDeriv 0 μ =ᶠ[ae μ] 0", " AEMeasurable X ℙ", " HasPDF X ℙ μ", " (map X ℙ).HaveLebesgueDecomposition μ", " Measurable (pdf X ℙ μ)" ]
import Mathlib.AlgebraicTopology.DoldKan.GammaCompN import Mathlib.AlgebraicTopology.DoldKan.NReflectsIso #align_import algebraic_topology.dold_kan.n_comp_gamma from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" noncomputable section open CategoryTheory CategoryTheory.Category Categor...
Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean
83
124
theorem Γ₀_obj_termwise_mapMono_comp_PInfty (X : SimplicialObject C) {Δ Δ' : SimplexCategory} (i : Δ ⟶ Δ') [Mono i] : Γ₀.Obj.Termwise.mapMono (AlternatingFaceMapComplex.obj X) i ≫ PInfty.f Δ.len = PInfty.f Δ'.len ≫ X.map i.op := by
induction' Δ using SimplexCategory.rec with n induction' Δ' using SimplexCategory.rec with n' dsimp -- We start with the case `i` is an identity by_cases h : n = n' · subst h simp only [SimplexCategory.eq_id_of_mono i, Γ₀.Obj.Termwise.mapMono_id, op_id, X.map_id] dsimp simp only [id_comp, comp_...
[ " PInfty.f n ≫ X.map i.op = 0", " False", " PInfty.f (m + 1) ≫ X.map i.op = 0", " PInfty.f (m + 1) ≫ X.map (SimplexCategory.δ j).op = 0", " 1 ≤ ↑j", " j = 0", " m + 2 ≤ ↑j + (m + 1)", " PInfty.f (m + k + 1 + 1) ≫ X.map i.op = 0", " PInfty.f (m + k + 1 + 1) ≫ X.map (i ≫ SimplexCategory.δ j₁).op = 0",...
[ " PInfty.f n ≫ X.map i.op = 0", " False", " PInfty.f (m + 1) ≫ X.map i.op = 0", " PInfty.f (m + 1) ≫ X.map (SimplexCategory.δ j).op = 0", " 1 ≤ ↑j", " j = 0", " m + 2 ≤ ↑j + (m + 1)", " PInfty.f (m + k + 1 + 1) ≫ X.map i.op = 0", " PInfty.f (m + k + 1 + 1) ≫ X.map (i ≫ SimplexCategory.δ j₁).op = 0",...
import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Iterate import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" n...
Mathlib/Analysis/SpecificLimits/Basic.lean
97
113
theorem tendsto_natCast_div_add_atTop {𝕜 : Type*} [DivisionRing 𝕜] [TopologicalSpace 𝕜] [CharZero 𝕜] [Algebra ℝ 𝕜] [ContinuousSMul ℝ 𝕜] [TopologicalDivisionRing 𝕜] (x : 𝕜) : Tendsto (fun n : ℕ ↦ (n : 𝕜) / (n + x)) atTop (𝓝 1) := by
convert Tendsto.congr' ((eventually_ne_atTop 0).mp (eventually_of_forall fun n hn ↦ _)) _ · exact fun n : ℕ ↦ 1 / (1 + x / n) · field_simp [Nat.cast_ne_zero.mpr hn] · have : 𝓝 (1 : 𝕜) = 𝓝 (1 / (1 + x * (0 : 𝕜))) := by rw [mul_zero, add_zero, div_one] rw [this] refine tendsto_const_nhds.div (t...
[ " Tendsto (fun n => C / ↑n) atTop (𝓝 0)", " Tendsto (fun n => (↑n)⁻¹) atTop (𝓝 0)", " Tendsto (fun a => ↑(↑a)⁻¹) atTop (𝓝 ↑0)", " Tendsto (fun n => 1 / (↑n + 1)) atTop (𝓝 0)", " Tendsto (⇑(algebraMap ℝ≥0 𝕜) ∘ fun n => (↑n)⁻¹) atTop (𝓝 0)", " 0 = (algebraMap ℝ≥0 𝕜) 0", " Tendsto (fun n => ↑n / (↑n...
[ " Tendsto (fun n => C / ↑n) atTop (𝓝 0)", " Tendsto (fun n => (↑n)⁻¹) atTop (𝓝 0)", " Tendsto (fun a => ↑(↑a)⁻¹) atTop (𝓝 ↑0)", " Tendsto (fun n => 1 / (↑n + 1)) atTop (𝓝 0)", " Tendsto (⇑(algebraMap ℝ≥0 𝕜) ∘ fun n => (↑n)⁻¹) atTop (𝓝 0)", " 0 = (algebraMap ℝ≥0 𝕜) 0", " Tendsto (fun n => ↑n / (↑n...
import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.Option import Mathlib.Logic.Equiv.Fin import Mathlib.Logic.Equiv.Fintype #align_import group_theory.perm.fin from "leanprover-community/mathlib"@"7e1c1263b6a25eb90bf16e80d8f47a657e403c4c" open Equiv def Equiv.Perm.decomposeFin {n : ℕ} : ...
Mathlib/GroupTheory/Perm/Fin.lean
29
31
theorem Equiv.Perm.decomposeFin_symm_of_refl {n : ℕ} (p : Fin (n + 1)) : Equiv.Perm.decomposeFin.symm (p, Equiv.refl _) = swap 0 p := by
simp [Equiv.Perm.decomposeFin, Equiv.permCongr_def]
[ " decomposeFin.symm (p, Equiv.refl (Fin n)) = swap 0 p" ]
[ " decomposeFin.symm (p, Equiv.refl (Fin n)) = swap 0 p" ]
import Mathlib.Data.Set.Equitable import Mathlib.Logic.Equiv.Fin import Mathlib.Order.Partition.Finpartition #align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" open Finset Fintype namespace Finpartition variable {α : Type*} [DecidableEq α] ...
Mathlib/Order/Partition/Equipartition.lean
68
71
theorem IsEquipartition.average_le_card_part (hP : P.IsEquipartition) (ht : t ∈ P.parts) : s.card / P.parts.card ≤ t.card := by
rw [← P.sum_card_parts] exact Finset.EquitableOn.le hP ht
[ " P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1", " t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1", " ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)", " False", " s.card / P.parts.card ≤ t.card", " (∑ i ...
[ " P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1", " t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1", " ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)", " False", " s.card / P.parts.card ≤ t.card" ]
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
268
279
theorem Monic.irreducible_iff_natDegree' (hp : p.Monic) : Irreducible p ↔ p ≠ 1 ∧ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → g.natDegree ∉ Ioc 0 (p.natDegree / 2) := by
simp_rw [hp.irreducible_iff_natDegree, mem_Ioc, Nat.le_div_iff_mul_le zero_lt_two, mul_two] apply and_congr_right' constructor <;> intro h f g hf hg he <;> subst he · rw [hf.natDegree_mul hg, add_le_add_iff_right] exact fun ha => (h f g hf hg rfl).elim (ha.1.trans_le ha.2).ne' ha.1.ne' · simp_rw [hf.natD...
[ " 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", " Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = ...
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Int.GCD instance : GCDMonoid ℕ where gcd := Nat.gcd lcm := Nat.lcm gcd_dvd_left := Nat.gcd_dvd_left gcd_dvd_right := Nat.gcd_dvd_right dvd_gcd := Nat.dvd_gcd gcd_mul_lcm a b := by rw [Nat.gcd_mul_lcm]; rfl ...
Mathlib/Algebra/GCDMonoid/Nat.lean
71
75
theorem normalize_of_nonpos {z : ℤ} (h : z ≤ 0) : normalize z = -z := by
obtain rfl | h := h.eq_or_lt · simp · rw [normalize_apply, normUnit_eq, if_neg (not_le_of_gt h), Units.val_neg, Units.val_one, mul_neg_one]
[ " Associated (a.gcd b * a.lcm b) (a * b)", " Associated (a * b) (a * b)", " (fun a => if 0 ≤ a then 1 else -1) (a * b) =\n (fun a => if 0 ≤ a then 1 else -1) a * (fun a => if 0 ≤ a then 1 else -1) b", " -1 < 0", " normalize z = z", " normalize z = -z", " normalize 0 = -0" ]
[ " Associated (a.gcd b * a.lcm b) (a * b)", " Associated (a * b) (a * b)", " (fun a => if 0 ≤ a then 1 else -1) (a * b) =\n (fun a => if 0 ≤ a then 1 else -1) a * (fun a => if 0 ≤ a then 1 else -1) b", " -1 < 0", " normalize z = z", " normalize z = -z" ]
import Mathlib.Algebra.Associated import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Ring.Opposite import Mathlib.GroupTheory.GroupAction.Opposite #align_import ring_theory.non_zero_divisors from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" variable (M₀ : Type*) [...
Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
129
130
theorem mul_left_mem_nonZeroDivisors_eq_zero_iff {r x : M₁} (hr : r ∈ M₁⁰) : r * x = 0 ↔ x = 0 := by
rw [mul_comm, mul_right_mem_nonZeroDivisors_eq_zero_iff hr]
[ " 1 ∈ { carrier := {x | ∀ (y : M₀), y * x = 0 → y = 0}, mul_mem' := ⋯ }.carrier", " r ∉ nonZeroDivisorsLeft M₀ ↔ {s | s * r = 0 ∧ s ≠ 0}.Nonempty", " 1 ∈ { carrier := {x | ∀ (y : M₀), x * y = 0 → y = 0}, mul_mem' := ⋯ }.carrier", " r ∉ nonZeroDivisorsRight M₀ ↔ {s | r * s = 0 ∧ s ≠ 0}.Nonempty", " nonZeroDi...
[ " 1 ∈ { carrier := {x | ∀ (y : M₀), y * x = 0 → y = 0}, mul_mem' := ⋯ }.carrier", " r ∉ nonZeroDivisorsLeft M₀ ↔ {s | s * r = 0 ∧ s ≠ 0}.Nonempty", " 1 ∈ { carrier := {x | ∀ (y : M₀), x * y = 0 → y = 0}, mul_mem' := ⋯ }.carrier", " r ∉ nonZeroDivisorsRight M₀ ↔ {s | r * s = 0 ∧ s ≠ 0}.Nonempty", " nonZeroDi...
import Mathlib.AlgebraicGeometry.Gluing import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.CategoryTheory.Limits.Shapes.Diagonal #align_import algebraic_geometry.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070" set_opt...
Mathlib/AlgebraicGeometry/Pullbacks.lean
71
74
theorem t_fst_snd (i j : 𝒰.J) : t 𝒰 f g i j ≫ pullback.fst ≫ pullback.snd = pullback.fst ≫ pullback.snd := by
simp only [t, Category.assoc, pullbackSymmetry_hom_comp_fst_assoc, pullbackAssoc_hom_snd_snd, pullback.lift_snd, Category.comp_id, pullbackAssoc_inv_snd, pullbackSymmetry_hom_comp_snd_assoc]
[ " v 𝒰 f g i j ⟶ v 𝒰 f g j i", " pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i", " pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g", " (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f", " g ≫ 𝟙 Z...
[ " v 𝒰 f g i j ⟶ v 𝒰 f g j i", " pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i", " pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g", " (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f", " g ≫ 𝟙 Z...