Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.GroupTheory.MonoidLocalization import Mathlib.RingTheory.Ideal.Basic import Mathlib.GroupTheory.GroupAction.Ring #align_import ring_theory.localization.basic from "leanprover-community/mathlib"@"b69c9a770ecf37eb21...
Mathlib/RingTheory/Localization/Basic.lean
230
237
theorem map_eq_zero_iff (r : R) : algebraMap R S r = 0 ↔ ∃ m : M, ↑m * r = 0 := by
constructor · intro h obtain ⟨m, hm⟩ := (IsLocalization.eq_iff_exists M S).mp ((algebraMap R S).map_zero.trans h.symm) exact ⟨m, by simpa using hm.symm⟩ · rintro ⟨m, hm⟩ rw [← (IsLocalization.map_units S m).mul_right_inj, mul_zero, ← RingHom.map_mul, hm, RingHom.map_zero]
[ " (algebraMap R S) x = (algebraMap R S) y", " (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y", " (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y", " ∃ c, ↑c * x = ↑c * y", " (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z", " z = 0", " (algebraMap R S) r = 0 ↔ ∃ m, ↑m * r ...
[ " (algebraMap R S) x = (algebraMap R S) y", " (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y", " (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y", " ∃ c, ↑c * x = ↑c * y", " (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z", " z = 0" ]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from ...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
51
53
theorem univ_fin2 : (univ : Finset (Fin 2)) = {0, 1} := by
ext x fin_cases x <;> simp
[ " univ = {0, 1}", " x ∈ univ ↔ x ∈ {0, 1}", " ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}", " ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}" ]
[]
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" namespace Nat theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd ...
Mathlib/Data/Nat/GCD/Basic.lean
49
49
theorem gcd_mul_left_add_right (m n k : ℕ) : gcd m (m * k + n) = gcd m n := by
simp [add_comm _ n]
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n" ]
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n" ]
import Mathlib.Data.Option.NAry import Mathlib.Data.Seq.Computation #align_import data.seq.seq from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace Stream' universe u v w def IsSeq {α : Type u} (s : Stream' (Option α)) : Prop := ∀ {n : ℕ}, s n = none → s (n + 1) = none #al...
Mathlib/Data/Seq/Seq.lean
129
130
theorem not_terminates_iff {s : Seq α} : ¬s.Terminates ↔ ∀ n, (s.get? n).isSome := by
simp only [Terminates, TerminatedAt, ← Ne.eq_def, Option.ne_none_iff_isSome, not_exists, iff_self]
[ " (some a :: ↑s).IsSeq", " (some a :: ↑s) (0 + 1) = none", " (some a :: ↑s) (n✝ + 1 + 1) = none", " x = y", " s.get? n = t.get? n", " s.TerminatedAt n ↔ (s.get? n).isNone = true", " s.get? n = none ↔ (s.get? n).isNone = true", " none = none ↔ none.isNone = true", " some val✝ = none ↔ (some val✝).isN...
[ " (some a :: ↑s).IsSeq", " (some a :: ↑s) (0 + 1) = none", " (some a :: ↑s) (n✝ + 1 + 1) = none", " x = y", " s.get? n = t.get? n", " s.TerminatedAt n ↔ (s.get? n).isNone = true", " s.get? n = none ↔ (s.get? n).isNone = true", " none = none ↔ none.isNone = true", " some val✝ = none ↔ (some val✝).isN...
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
208
209
theorem mul_rotate' (a b c : G) : a * (b * c) = b * (c * a) := by
simp only [mul_left_comm, mul_comm]
[ " a * b * (c * d) = a * c * (b * d)", " a * b * c = b * c * a", " a * (b * c) = b * (c * a)" ]
[ " a * b * (c * d) = a * c * (b * d)", " a * b * c = b * c * a" ]
import Mathlib.Order.Disjoint #align_import order.prop_instances from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" instance Prop.instDistribLattice : DistribLattice Prop where sup := Or le_sup_left := @Or.inl le_sup_right := @Or.inr sup_le := fun _ _ _ => Or.rec inf := And ...
Mathlib/Order/PropInstances.lean
72
80
theorem disjoint_iff [∀ i, OrderBot (α' i)] {f g : ∀ i, α' i} : Disjoint f g ↔ ∀ i, Disjoint (f i) (g i) := by
classical constructor · intro h i x hf hg exact (update_le_iff.mp <| h (update_le_iff.mpr ⟨hf, fun _ _ => bot_le⟩) (update_le_iff.mpr ⟨hg, fun _ _ => bot_le⟩)).1 · intro h x hf hg i apply h i (hf i) (hg i)
[ " p ≤ q ∨ q ≤ p", " LinearOrder Prop", " Disjoint f g ↔ ∀ (i : ι), Disjoint (f i) (g i)", " Disjoint f g → ∀ (i : ι), Disjoint (f i) (g i)", " x ≤ ⊥", " (∀ (i : ι), Disjoint (f i) (g i)) → Disjoint f g", " x i ≤ ⊥ i" ]
[ " p ≤ q ∨ q ≤ p", " LinearOrder Prop" ]
import Mathlib.Init.Logic import Mathlib.Init.Function import Mathlib.Init.Algebra.Classes import Batteries.Util.LibraryNote import Batteries.Tactic.Lint.Basic #align_import logic.basic from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" #align_import init.ite_simp from "leanprover-communit...
Mathlib/Logic/Basic.lean
1,131
1,131
theorem exists₂_imp : (∃ x h, P x h) → b ↔ ∀ x h, P x h → b := by
simp
[ " (∃ x x_1, p x) ↔ p a", " (∃ x h, P x h) → b ↔ ∀ (x : α) (h : p x), P x h → b" ]
[ " (∃ x x_1, p x) ↔ p a" ]
import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold #align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" namespace Multiset variable {α : Type*} section Sup -- can be defined with just `[Bot α]` where some lemmas hold without...
Mathlib/Data/Multiset/Lattice.lean
84
85
theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup := by
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add]; simp
[ " (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)", " sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a", " ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)", " (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂", " (s₁ ∪ ...
[ " (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)", " sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a", " ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)", " (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂" ]
import Mathlib.Data.Real.NNReal import Mathlib.RingTheory.Valuation.Basic noncomputable section open Function Multiplicative open scoped NNReal variable {R : Type*} [Ring R] {Γ₀ : Type*} [LinearOrderedCommGroupWithZero Γ₀] namespace Valuation class RankOne (v : Valuation R Γ₀) where hom : Γ₀ →*₀ ℝ≥0 st...
Mathlib/RingTheory/Valuation/RankOne.lean
51
55
theorem zero_of_hom_zero {x : Γ₀} (hx : hom v x = 0) : x = 0 := by
refine (eq_of_le_of_not_lt (zero_le' (a := x)) fun h_lt ↦ ?_).symm have hs := strictMono v h_lt rw [_root_.map_zero, hx] at hs exact hs.false
[ " x = 0", " False" ]
[]
import Mathlib.Data.Bracket import Mathlib.LinearAlgebra.Basic #align_import algebra.lie.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v w w₁ w₂ open Function class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where protected add_lie : ∀ x y z ...
Mathlib/Algebra/Lie/Basic.lean
175
175
theorem sub_lie : ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆ := by
simp [sub_eq_add_neg]
[ " -⁅y, x⁆ = ⁅x, y⁆", " ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0", " ⁅x + y, x + y⁆ = 0", " ⁅t • x, m⁆ = t • ⁅x, m⁆", " ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆", " ⁅-x, m⁆ = -⁅x, m⁆", " ⁅-x + x, m⁆ = 0", " ⁅x, -m⁆ = -⁅x, m⁆", " ⁅x, -m + m⁆ = 0", " ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆" ]
[ " -⁅y, x⁆ = ⁅x, y⁆", " ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0", " ⁅x + y, x + y⁆ = 0", " ⁅t • x, m⁆ = t • ⁅x, m⁆", " ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆", " ⁅-x, m⁆ = -⁅x, m⁆", " ⁅-x + x, m⁆ = 0", " ⁅x, -m⁆ = -⁅x, m⁆", " ⁅x, -m + m⁆ = 0" ]
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Group.Measure #align_import measure_theory.group.prod from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open Set hiding prod_eq open Function MeasureTheory open Filter hiding ma...
Mathlib/MeasureTheory/Group/Prod.lean
161
172
theorem quasiMeasurePreserving_inv : QuasiMeasurePreserving (Inv.inv : G → G) μ μ := by
refine ⟨measurable_inv, AbsolutelyContinuous.mk fun s hsm hμs => ?_⟩ rw [map_apply measurable_inv hsm, inv_preimage] have hf : Measurable fun z : G × G => (z.2 * z.1, z.1⁻¹) := (measurable_snd.mul measurable_fst).prod_mk measurable_fst.inv suffices map (fun z : G × G => (z.2 * z.1, z.1⁻¹)) (μ.prod μ) (s⁻¹ ...
[ " Measurable fun x => μ ((fun y => y * x) ⁻¹' s)", " (fun x => μ ((fun y => y * x) ⁻¹' s)) = fun y => μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.1 * z.2)) ⁻¹' univ ×ˢ s))", " μ ((fun y => y * x) ⁻¹' s) = μ ((fun x_1 => (x_1, x)) ⁻¹' ((fun z => (1, z.1 * z.2)) ⁻¹' univ ×ˢ s))", " y ∈ (fun y => y * x) ⁻¹' s ↔ y ...
[ " Measurable fun x => μ ((fun y => y * x) ⁻¹' s)", " (fun x => μ ((fun y => y * x) ⁻¹' s)) = fun y => μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.1 * z.2)) ⁻¹' univ ×ˢ s))", " μ ((fun y => y * x) ⁻¹' s) = μ ((fun x_1 => (x_1, x)) ⁻¹' ((fun z => (1, z.1 * z.2)) ⁻¹' univ ×ˢ s))", " y ∈ (fun y => y * x) ⁻¹' s ↔ y ...
import Mathlib.Algebra.Polynomial.Module.Basic import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.IteratedDeriv.Defs import Mathlib.Analysis.Calculus.MeanValue #align_import analysis.calculus.taylor from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" open scoped...
Mathlib/Analysis/Calculus/Taylor.lean
74
79
theorem taylorWithin_succ (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ : ℝ) : taylorWithin f (n + 1) s x₀ = taylorWithin f n s x₀ + PolynomialModule.comp (Polynomial.X - Polynomial.C x₀) (PolynomialModule.single ℝ (n + 1) (taylorCoeffWithin f (n + 1) s x₀)) := by
dsimp only [taylorWithin] rw [Finset.sum_range_succ]
[ " taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))", " ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ...
[]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
117
118
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
[ " -1 * -1 = 1", " 1 / -a = 1 / (-1 * a)", " 1 / (-1 * a) = 1 / a * (1 / -1)", " 1 / a * (1 / -1) = 1 / a * -1", " 1 / a * -1 = -(1 / a)", " b / -a = b * (1 / -a)", " b * (1 / -a) = b * -(1 / a)", " b * -(1 / a) = -(b * (1 / a))", " -(b * (1 / a)) = -(b / a)", " -b / a = -(b / a)" ]
[ " -1 * -1 = 1", " 1 / -a = 1 / (-1 * a)", " 1 / (-1 * a) = 1 / a * (1 / -1)", " 1 / a * (1 / -1) = 1 / a * -1", " 1 / a * -1 = -(1 / a)", " b / -a = b * (1 / -a)", " b * (1 / -a) = b * -(1 / a)", " b * -(1 / a) = -(b * (1 / a))", " -(b * (1 / a)) = -(b / a)" ]
import Mathlib.CategoryTheory.Abelian.Basic #align_import category_theory.idempotents.basic from "leanprover-community/mathlib"@"3a061790136d13594ec10c7c90d202335ac5d854" open CategoryTheory open CategoryTheory.Category open CategoryTheory.Limits open CategoryTheory.Preadditive open Opposite namespace Catego...
Mathlib/CategoryTheory/Idempotents/Basic.lean
130
140
theorem split_imp_of_iso {X X' : C} (φ : X ≅ X') (p : X ⟶ X) (p' : X' ⟶ X') (hpp' : p ≫ φ.hom = φ.hom ≫ p') (h : ∃ (Y : C) (i : Y ⟶ X) (e : X ⟶ Y), i ≫ e = 𝟙 Y ∧ e ≫ i = p) : ∃ (Y' : C) (i' : Y' ⟶ X') (e' : X' ⟶ Y'), i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p' := by
rcases h with ⟨Y, i, e, ⟨h₁, h₂⟩⟩ use Y, i ≫ φ.hom, φ.inv ≫ e constructor · slice_lhs 2 3 => rw [φ.hom_inv_id] rw [id_comp, h₁] · slice_lhs 2 3 => rw [h₂] rw [hpp', ← assoc, φ.inv_hom_id, id_comp]
[ " IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " HasEqualizer (𝟙 X) p", " i ≫ 𝟙 X = i ≫ p", " IsLimit (Fork.ofι i ⋯)",...
[ " IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p", " HasEqualizer (𝟙 X) p", " i ≫ 𝟙 X = i ≫ p", " IsLimit (Fork.ofι i ⋯)",...
import Mathlib.LinearAlgebra.Quotient import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213" noncomputable section Ring variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E] variable {F : Type*} [Ad...
Mathlib/LinearAlgebra/Projection.lean
160
161
theorem linearProjOfIsCompl_apply_left (h : IsCompl p q) (x : p) : linearProjOfIsCompl p q h x = x := by
simp [linearProjOfIsCompl]
[ " Function.Injective ⇑(p.mkQ ∘ₗ q.subtype)", " Function.Surjective ⇑(p.mkQ ∘ₗ q.subtype)", " (↥p × ↥q) ≃ₗ[R] E", " Function.Bijective ⇑(p.subtype.coprod q.subtype)", " Function.Injective ⇑(p.subtype.coprod q.subtype)", " Disjoint (range p.subtype) (range q.subtype)", " Disjoint p q", " Function.Surjec...
[ " Function.Injective ⇑(p.mkQ ∘ₗ q.subtype)", " Function.Surjective ⇑(p.mkQ ∘ₗ q.subtype)", " (↥p × ↥q) ≃ₗ[R] E", " Function.Bijective ⇑(p.subtype.coprod q.subtype)", " Function.Injective ⇑(p.subtype.coprod q.subtype)", " Disjoint (range p.subtype) (range q.subtype)", " Disjoint p q", " Function.Surjec...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.GeomSum import Mathlib.Data.Fintype.BigOperators import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.PowerSeries.WellKnown import Mathlib.Tactic.FieldSimp #align_import number_theory.bernoulli from "leanprover-community/mat...
Mathlib/NumberTheory/Bernoulli.lean
158
177
theorem bernoulli'PowerSeries_mul_exp_sub_one : bernoulli'PowerSeries A * (exp A - 1) = X * exp A := by
ext n -- constant coefficient is a special case cases' n with n · simp rw [bernoulli'PowerSeries, coeff_mul, mul_comm X, sum_antidiagonal_succ'] suffices (∑ p ∈ antidiagonal n, bernoulli' p.1 / p.1! * ((p.2 + 1) * p.2! : ℚ)⁻¹) = (n ! : ℚ)⁻¹ by simpa [map_sum, Nat.factorial] using congr_arg (algeb...
[ " bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k", " ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1", " ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0", " ↑(n.choose x) / (↑n - ↑...
[ " bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k", " ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1", " ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0", " ↑(n.choose x) / (↑n - ↑...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
74
77
theorem HasDerivAtFilter.scomp (hg : HasDerivAtFilter g₁ g₁' (h x) L') (hh : HasDerivAtFilter h h' x L) (hL : Tendsto h L L') : HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L := by
simpa using ((hg.restrictScalars 𝕜).comp x hh hL).hasDerivAtFilter
[ " HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L" ]
[]
import Mathlib.Algebra.Order.Pointwise import Mathlib.Analysis.NormedSpace.SphereNormEquiv import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar open Set Function Metric MeasurableSpace intervalIntegral open s...
Mathlib/MeasureTheory/Constructions/HaarToSphere.lean
108
125
theorem measurePreserving_homeomorphUnitSphereProd : MeasurePreserving (homeomorphUnitSphereProd E) (μ.comap (↑)) (μ.toSphere.prod (volumeIoiPow (dim E - 1))) := by
nontriviality E refine ⟨(homeomorphUnitSphereProd E).measurable, .symm ?_⟩ refine prod_eq_generateFrom generateFrom_measurableSet ((borel_eq_generateFrom_Iio _).symm.trans BorelSpace.measurable_eq.symm) isPiSystem_measurableSet isPiSystem_Iio μ.toSphere.toFiniteSpanningSetsIn (finiteSpanningSetsIn_vo...
[ " μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)", " μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)", " μ.toSphere s = ↑(dim E) * μ (Ioo 0 1 • Subtype.val '' s)", " μ.toSphere univ = ↑(...
[ " μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)", " μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)", " μ.toSphere s = ↑(dim E) * μ (Ioo 0 1 • Subtype.val '' s)", " μ.toSphere univ = ↑(...
import Mathlib.Topology.Category.CompHaus.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Extensive import Mathlib.CategoryTheory.Limits.Preserves.Finite namespace CompHaus attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike universe u w open Categor...
Mathlib/Topology/Category/CompHaus/Limits.lean
136
139
theorem pullback_snd_eq : CompHaus.pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd := by
dsimp [pullbackIsoPullback] simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]
[ " fst f g ≫ f = snd f g ≫ g", " (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩", " (a z, b z) ∈ {xy | f xy.1 = g xy.2}", " Continuous fun z => ⟨(a z, b z), ⋯⟩", " Continuous fun x => (a x, b x)", " (Continuous fun x => a x) ∧ Continuous fun x => b x", " a = b", " a z = b z", " ↑(a z) = ↑(b z)", ...
[ " fst f g ≫ f = snd f g ≫ g", " (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩", " (a z, b z) ∈ {xy | f xy.1 = g xy.2}", " Continuous fun z => ⟨(a z, b z), ⋯⟩", " Continuous fun x => (a x, b x)", " (Continuous fun x => a x) ∧ Continuous fun x => b x", " a = b", " a z = b z", " ↑(a z) = ↑(b z)", ...
import Batteries.Tactic.Init import Batteries.Tactic.Alias import Batteries.Tactic.Lint.Misc instance {f : α → β} [DecidablePred p] : DecidablePred (p ∘ f) := inferInstanceAs <| DecidablePred fun x => p (f x) @[deprecated] alias proofIrrel := proof_irrel theorem Function.id_def : @id α = fun x => x := rfl al...
.lake/packages/batteries/Batteries/Logic.lean
100
103
theorem eqRec_heq_iff_heq {α : Sort _} {a : α} {motive : (a' : α) → a = a' → Sort _} (x : motive a (rfl : a = a)) {a' : α} (e : a = a') {β : Sort _} (y : β) : HEq (@Eq.rec α a motive x a' e) y ↔ HEq x y := by
subst e; rfl
[ " h ▸ y = y", " ⋯ ▸ y = y", " f x y = f x' y'", " f x y = f x y", " x₁ = x₂ ↔ y₁ = y₂", " x₁ = x₂ ↔ x₁ = y₂", " x₁ = x₂ ↔ x₁ = x₂", " x = z ↔ y = z", " z = x ↔ z = y", " cast e a = a'", " cast e a = a", " e ▸ x = cast ⋯ x", " ⋯ ▸ x = cast ⋯ x", " HEq (e ▸ x) x", " HEq (⋯ ▸ x) x", " HEq...
[ " h ▸ y = y", " ⋯ ▸ y = y", " f x y = f x' y'", " f x y = f x y", " x₁ = x₂ ↔ y₁ = y₂", " x₁ = x₂ ↔ x₁ = y₂", " x₁ = x₂ ↔ x₁ = x₂", " x = z ↔ y = z", " z = x ↔ z = y", " cast e a = a'", " cast e a = a", " e ▸ x = cast ⋯ x", " ⋯ ▸ x = cast ⋯ x", " HEq (e ▸ x) x", " HEq (⋯ ▸ x) x" ]
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
151
154
theorem dvd_gcd_iff {a : α} : a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b := by
apply Iff.trans Multiset.dvd_gcd simp only [Multiset.mem_map, and_imp, exists_imp] exact ⟨fun k b hb ↦ k _ _ hb rfl, fun k a' b hb h ↦ h ▸ k _ hb⟩
[ " a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b", " (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b" ]
[]
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_s...
Mathlib/NumberTheory/Pell.lean
137
137
theorem prop_y (a : Solution₁ d) : d * a.y ^ 2 = a.x ^ 2 - 1 := by
rw [← a.prop]; ring
[ " a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)", " a.x ^ 2 = 1 + d * a.y ^ 2", " a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2", " d * a.y ^ 2 = a.x ^ 2 - 1", " d * a.y ^ 2 = a.x ^ 2 - (a.x ^ 2 - d * a.y ^ 2)" ]
[ " a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)", " a.x ^ 2 = 1 + d * a.y ^ 2", " a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2" ]
import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Int.LeastGreatest import Mathlib.Data.Rat.Floor import Mathlib.Data.NNRat.Defs #align_import algebra.order.archimedean from "leanprover-community/mathlib"@"6f413f3f7330b94c92a5a27488fdc74e6d483a78" open Int Set variable {α : Type*} class Archimedean (...
Mathlib/Algebra/Order/Archimedean.lean
64
81
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) : ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
let s : Set ℤ := { n : ℤ | n • a ≤ g } obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha have h_ne : s.Nonempty := ⟨-k, by simpa [s] using neg_le_neg hk⟩ obtain ⟨k, hk⟩ := Archimedean.arch g ha have h_bdd : ∀ n ∈ s, n ≤ (k : ℤ) := by intro n hn apply (zsmul_le_zsmul_iff ha).mp rw [← natCast...
[ " x ≤ n • y", " ∃! k, k • a ≤ g ∧ g < (k + 1) • a", " -↑k ∈ s", " ∀ n ∈ s, n ≤ ↑k", " n ≤ ↑k", " n • a ≤ ↑k • a", " g < (m + 1) • a", " ∃ z ∈ s, m < z", " m < n + 1", " m • a < (n + 1) • a" ]
[ " x ≤ n • y" ]
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
200
204
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0 := by
refine ⟨fun μ_mass => ?_, fun hμ => by simp only [hμ, zero_mass]⟩ apply toMeasure_injective apply Measure.measure_univ_eq_zero.mp rwa [← ennreal_mass, ENNReal.coe_eq_zero]
[ " ↑μ s = ↑ν s", " μ s₁ ≤ μ s₂", " (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal", " μ s ≤ μ.mass", " μ.mass = 0 ↔ μ = 0", " μ.mass = 0", " μ = 0", " ↑μ = ↑0", " ↑μ univ = 0" ]
[ " ↑μ s = ↑ν s", " μ s₁ ≤ μ s₂", " (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal", " μ s ≤ μ.mass" ]
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align...
Mathlib/Data/Multiset/NatAntidiagonal.lean
70
74
theorem antidiagonal_succ_succ' {n : ℕ} : antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ (antidiagonal n).map (Prod.map Nat.succ Nat.succ) := by
rw [antidiagonal_succ, antidiagonal_succ', map_cons, map_map, Prod.map_apply] rfl
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " card (antidiagonal n) = n + 1", " antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)", " antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)", " antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ map (Pro...
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " card (antidiagonal n) = n + 1", " antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)", " antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)" ]
import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Extreme #align_import analysis.convex.independent from "leanprover-community/mathlib"@"fefd8a38be7811574cd2ec2f77d3a393a407f112" open scoped Classical open Affine open Finset Function variable {𝕜 E ι : Type*} section OrderedSemiring va...
Mathlib/Analysis/Convex/Independent.lean
82
86
theorem ConvexIndependent.comp_embedding {ι' : Type*} (f : ι' ↪ ι) {p : ι → E} (hc : ConvexIndependent 𝕜 p) : ConvexIndependent 𝕜 (p ∘ f) := by
intro s x hx rw [← f.injective.mem_set_image] exact hc _ _ (by rwa [Set.image_image])
[ " ConvexIndependent 𝕜 p", " x ∈ s", " Injective p", " p i ∈ (convexHull 𝕜) (p '' {j})", " p j ∈ {p j}", " ConvexIndependent 𝕜 (p ∘ ⇑f)", " f x ∈ ⇑f '' s", " p (f x) ∈ (convexHull 𝕜) (p '' (⇑f '' s))" ]
[ " ConvexIndependent 𝕜 p", " x ∈ s", " Injective p", " p i ∈ (convexHull 𝕜) (p '' {j})", " p j ∈ {p j}" ]
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Multiset.Powerset #align_import data.finset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Finset open Function Multiset variable {α : Type*} {s t : Finset α} section Powerset def powerset (s : Finset...
Mathlib/Data/Finset/Powerset.lean
34
37
theorem mem_powerset {s t : Finset α} : s ∈ powerset t ↔ s ⊆ t := by
cases s simp [powerset, mem_mk, mem_pmap, mk.injEq, mem_powerset, exists_prop, exists_eq_right, ← val_le_iff]
[ " s ∈ t.powerset ↔ s ⊆ t", " { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } ⊆ t" ]
[]
import Mathlib.NumberTheory.LegendreSymbol.Basic import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum #align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Nat section Values variable {p : ℕ} [Fact p.Pri...
Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean
138
145
theorem quadratic_reciprocity' (hp : p ≠ 2) (hq : q ≠ 2) : legendreSym q p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p q := by
rcases eq_or_ne p q with h | h · subst p rw [(eq_zero_iff q q).mpr (mod_cast natCast_self q), mul_zero] · have qr := congr_arg (· * legendreSym p q) (quadratic_reciprocity hp hq h) have : ((q : ℤ) : ZMod p) ≠ 0 := mod_cast prime_ne_zero p q h simpa only [mul_assoc, ← pow_two, sq_one p this, mul_one] ...
[ " legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))", " ↑↑n = ↑n", " ↑((-1) ^ (p / 2)) = (-1) ^ (p / 2)", " legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q", " legendreSym q ↑q = (-1) ^ (q / 2 * (q / 2)) * legendreSym q ↑q" ]
[ " legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))", " ↑↑n = ↑n", " ↑((-1) ^ (p / 2)) = (-1) ^ (p / 2)" ]
import Mathlib.Data.Fintype.Quotient import Mathlib.ModelTheory.Semantics #align_import model_theory.quotients from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf" namespace FirstOrder namespace Language variable (L : Language) {M : Type*} open FirstOrder open Structure class Prest...
Mathlib/ModelTheory/Quotients.lean
73
77
theorem Term.realize_quotient_mk' {β : Type*} (t : L.Term β) (x : β → M) : (t.realize fun i => (⟦x i⟧ : Quotient s)) = ⟦@Term.realize _ _ ps.toStructure _ x t⟧ := by
induction' t with _ _ _ _ ih · rfl · simp only [ih, funMap_quotient_mk', Term.realize]
[ " (funMap f fun i => ⟦x i⟧) = ⟦funMap f x⟧", " Quotient.map (funMap f) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) = ⟦funMap f x⟧", " (RelMap r fun i => ⟦x i⟧) ↔ RelMap r x", " Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x", " realize (fun i => ⟦x i⟧) t = ⟦realize x t⟧", " realize ...
[ " (funMap f fun i => ⟦x i⟧) = ⟦funMap f x⟧", " Quotient.map (funMap f) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) = ⟦funMap f x⟧", " (RelMap r fun i => ⟦x i⟧) ↔ RelMap r x", " Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x" ]
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {α β δ : Type*} [MeasurableSpace α] [MeasurableSpace β] {s : Set α} ...
Mathlib/MeasureTheory/Measure/Dirac.lean
53
59
theorem dirac_apply [MeasurableSingletonClass α] (a : α) (s : Set α) : dirac a s = s.indicator 1 a := by
by_cases h : a ∈ s; · rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≤ dirac a {a}ᶜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl]
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ", " (dirac a) s = s.indicator 1 a", " (dirac a) s ≤ 0", " (dirac a) {a}ᶜ = 0" ]
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ" ]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.MeasureTheory.Decomposition.RadonNikodym #align_import measure_theory.function.conditional_expectation.real from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean
40
54
theorem rnDeriv_ae_eq_condexp {hm : m ≤ m0} [hμm : SigmaFinite (μ.trim hm)] {f : α → ℝ} (hf : Integrable f μ) : SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᵐ[μ] μ[f|m] := by
refine ae_eq_condexp_of_forall_setIntegral_eq hm hf ?_ ?_ ?_ · exact fun _ _ _ => (integrable_of_integrable_trim hm (SignedMeasure.integrable_rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm))).integrableOn · intro s hs _ conv_rhs => rw [← hf.withDensityᵥ_trim_eq_integral hm hs, ← SignedMeasure.wi...
[ " SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᶠ[ae μ] μ[f|m]", " ∀ (s : Set α),\n MeasurableSet s → μ s < ⊤ → IntegrableOn (SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) s μ", " ∀ (s : Set α),\n MeasurableSet s →\n μ s < ⊤ →\n ∫ (x : α) in s, SignedMeasure...
[]
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FormalMultilinearSeries #align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14" noncomputable section open scoped Classical open NNReal Topology Filter local notatio...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
196
199
theorem HasFTaylorSeriesUpToOn.zero_eq' (h : HasFTaylorSeriesUpToOn n f p s) {x : E} (hx : x ∈ s) : p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x) := by
rw [← h.zero_eq x hx] exact (p x 0).uncurry0_curry0.symm
[ " p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)", " p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (p x 0).uncurry0" ]
[]
import Mathlib.Algebra.Lie.Submodule #align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" universe u v w w₁ w₂ namespace LieSubmodule variable {R : Type u} {L : Type v} {M : Type w} {M₂ : Type w₁} variable [CommRing R] [LieRing L] [LieAlgebra ...
Mathlib/Algebra/Lie/IdealOperations.lean
111
116
theorem lie_comm : ⁅I, J⁆ = ⁅J, I⁆ := by
suffices ∀ I J : LieIdeal R L, ⁅I, J⁆ ≤ ⁅J, I⁆ by exact le_antisymm (this I J) (this J I) clear! I J; intro I J rw [lieIdeal_oper_eq_span, lieSpan_le]; rintro x ⟨y, z, h⟩; rw [← h] rw [← lie_skew, ← lie_neg, ← LieSubmodule.coe_neg] apply lie_coe_mem_lie
[ " ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s", " ⁅y, m'⁆ ∈ Submodule.span R s", " ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x", " ⁅y, m''⁆ ∈ Submodule.span R s"...
[ " ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}", " ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s", " ⁅y, m'⁆ ∈ Submodule.span R s", " ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x", " ⁅y, m''⁆ ∈ Submodule.span R s"...
import Mathlib.Analysis.BoxIntegral.Partition.SubboxInduction import Mathlib.Analysis.BoxIntegral.Partition.Split #align_import analysis.box_integral.partition.filter from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Set Function Filter Metric Finset Bool open scoped Classical o...
Mathlib/Analysis/BoxIntegral/Partition/Filter.lean
347
349
theorem rCond_of_bRiemann_eq_false {ι} (l : IntegrationParams) (hl : l.bRiemann = false) {r : (ι → ℝ) → Ioi (0 : ℝ)} : l.RCond r := by
simp [RCond, hl]
[ " Henstock ≤ Riemann", " Henstock ≤ McShane", " l.RCond r" ]
[ " Henstock ≤ Riemann", " Henstock ≤ McShane" ]
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
54
58
theorem preimage_boolIndicator (t : Set Bool) : s.boolIndicator ⁻¹' t = univ ∨ s.boolIndicator ⁻¹' t = s ∨ s.boolIndicator ⁻¹' t = sᶜ ∨ s.boolIndicator ⁻¹' t = ∅ := by
simp only [preimage_boolIndicator_eq_union] split_ifs <;> simp [s.union_compl_self]
[ " 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.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign theorem sign_of_neg {r : ℝ} (hr : r < 0) : si...
Mathlib/Data/Real/Sign.lean
108
115
theorem inv_sign (r : ℝ) : (sign r)⁻¹ = sign r := by
obtain hn | hz | hp := sign_apply_eq r · rw [hn] norm_num · rw [hz] exact inv_zero · rw [hp] exact inv_one
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0", " 0 ≤...
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0", " 0 ≤...
import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.Star.SelfAdjoint #align_import algebra.star.order from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004" open Set open scoped NNRat universe u variable {R : Type u} class StarOrderedRing (R : Type u) [NonUnitalSemi...
Mathlib/Algebra/Star/Order.lean
137
139
theorem nonneg_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] {x : R} : 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s) := by
simp only [le_iff, zero_add, exists_eq_right']
[ " z + x ≤ z + y", " ∃ p ∈ AddSubmonoid.closure (range fun s => star s * s), z + y = z + x + p", " s ∈ AddSubmonoid.closure (range fun s => star s * s) ∧ z + y = z + x + s", " s ∈ AddSubmonoid.closure (range fun s => star s * s) ∧ z + (x + s) = z + (x + s)", " x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (range fun s ...
[ " z + x ≤ z + y", " ∃ p ∈ AddSubmonoid.closure (range fun s => star s * s), z + y = z + x + p", " s ∈ AddSubmonoid.closure (range fun s => star s * s) ∧ z + y = z + x + s", " s ∈ AddSubmonoid.closure (range fun s => star s * s) ∧ z + (x + s) = z + (x + s)", " x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (range fun s ...
import Mathlib.Algebra.ContinuedFractions.Computation.ApproximationCorollaries import Mathlib.Algebra.ContinuedFractions.Computation.Translations import Mathlib.Data.Real.Irrational import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.Basic #align_import number_theory.diophantine_approximation from "leanpro...
Mathlib/NumberTheory/DiophantineApproximation.lean
152
163
theorem exists_rat_abs_sub_le_and_den_le (ξ : ℝ) {n : ℕ} (n_pos : 0 < n) : ∃ q : ℚ, |ξ - q| ≤ 1 / ((n + 1) * q.den) ∧ q.den ≤ n := by
obtain ⟨j, k, hk₀, hk₁, h⟩ := exists_int_int_abs_mul_sub_le ξ n_pos have hk₀' : (0 : ℝ) < k := Int.cast_pos.mpr hk₀ have hden : ((j / k : ℚ).den : ℤ) ≤ k := by convert le_of_dvd hk₀ (Rat.den_dvd j k) exact Rat.intCast_div_eq_divInt _ _ refine ⟨j / k, ?_, Nat.cast_le.mp (hden.trans hk₁)⟩ rw [← div_div...
[ " ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)", "ξ : ℝ\nn : ℕ\nn_pos : 0 < n\nf : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋\nhn : 0 < ↑n + 1\nhfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1\nj k : ℤ\n| |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)", " ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1", "...
[ " ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)", "ξ : ℝ\nn : ℕ\nn_pos : 0 < n\nf : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋\nhn : 0 < ↑n + 1\nhfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1\nj k : ℤ\n| |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)", " ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1", "...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
357
361
theorem HasFDerivWithinAt.comp_hasDerivWithinAt_of_eq {t : Set F} (hl : HasFDerivWithinAt l l' t y) (hf : HasDerivWithinAt f f' s x) (hst : MapsTo f s t) (hy : y = f x) : HasDerivWithinAt (l ∘ f) (l' f') s x := by
rw [hy] at hl; exact hl.comp_hasDerivWithinAt x hf hst
[ " HasDerivWithinAt (l ∘ f) (l' f') s x" ]
[ " HasDerivWithinAt (l ∘ f) (l' f') s x" ]
import Mathlib.Combinatorics.SimpleGraph.Regularity.Chunk import Mathlib.Combinatorics.SimpleGraph.Regularity.Energy #align_import combinatorics.simple_graph.regularity.increment from "leanprover-community/mathlib"@"bf7ef0e83e5b7e6c1169e97f055e58a2e4e9d52d" open Finset Fintype SimpleGraph SzemerediRegularity ope...
Mathlib/Combinatorics/SimpleGraph/Regularity/Increment.lean
82
87
theorem increment_isEquipartition : (increment hP G ε).IsEquipartition := by
simp_rw [IsEquipartition, Set.equitableOn_iff_exists_eq_eq_add_one] refine ⟨m, fun A hA => ?_⟩ rw [mem_coe, increment, mem_bind] at hA obtain ⟨U, hU, hA⟩ := hA exact card_eq_of_mem_parts_chunk hA
[ " (increment hP G ε).parts.card = stepBound P.parts.card", " 4 ≤ 16", " ∑ A ∈ P.parts.attach, (chunk hP G ε ⋯).parts.card = stepBound P.parts.card", " ∑\n x ∈\n (filter (fun x => (↑x).card = m * 4 ^ P.parts.card + (Fintype.card α / P.parts.card - m * 4 ^ P.parts.card))\n P.parts.a...
[ " (increment hP G ε).parts.card = stepBound P.parts.card", " 4 ≤ 16", " ∑ A ∈ P.parts.attach, (chunk hP G ε ⋯).parts.card = stepBound P.parts.card", " ∑\n x ∈\n (filter (fun x => (↑x).card = m * 4 ^ P.parts.card + (Fintype.card α / P.parts.card - m * 4 ^ P.parts.card))\n P.parts.a...
import Mathlib.Order.Filter.Basic #align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Set open Filter namespace Filter variable {α β γ δ : Type*} {ι : Sort*} section Prod variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β} protected ...
Mathlib/Order/Filter/Prod.lean
64
71
theorem mem_prod_iff {s : Set (α × β)} {f : Filter α} {g : Filter β} : s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s := by
simp only [SProd.sprod, Filter.prod] constructor · rintro ⟨t₁, ⟨s₁, hs₁, hts₁⟩, t₂, ⟨s₂, hs₂, hts₂⟩, rfl⟩ exact ⟨s₁, hs₁, s₂, hs₂, fun p ⟨h, h'⟩ => ⟨hts₁ h, hts₂ h'⟩⟩ · rintro ⟨t₁, ht₁, t₂, ht₂, h⟩ exact mem_inf_of_inter (preimage_mem_comap ht₁) (preimage_mem_comap ht₂) h
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
[]
import Mathlib.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.MvPolynomial.Basic #align_import data.mv_polynomial.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {σ R : Type*} [CommSemiring R] namespace MvPolynomial theorem monomial_dvd_monomial {r s : ...
Mathlib/Algebra/MvPolynomial/Division.lean
251
255
theorem X_dvd_X [Nontrivial R] {i j : σ} : (X i : MvPolynomial σ R) ∣ (X j : MvPolynomial σ R) ↔ i = j := by
refine monomial_one_dvd_monomial_one.trans ?_ simp_rw [Finsupp.single_le_iff, Nat.one_le_iff_ne_zero, Finsupp.single_apply_ne_zero, ne_eq, not_false_eq_true, and_true]
[ " (monomial i) r ∣ (monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (monomial i) r ∣ (monomial j) s → (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s → (monomial i) r ∣ (monomial j) s", " (monomial i) r ∣ (monomial j) (r * d)", " (monomial j) (r * d) = (monomial i) r * (monomia...
[ " (monomial i) r ∣ (monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (monomial i) r ∣ (monomial j) s → (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s → (monomial i) r ∣ (monomial j) s", " (monomial i) r ∣ (monomial j) (r * d)", " (monomial j) (r * d) = (monomial i) r * (monomia...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R...
Mathlib/Algebra/Polynomial/Mirror.lean
44
44
theorem mirror_zero : (0 : R[X]).mirror = 0 := by
simp [mirror]
[ " mirror 0 = 0" ]
[]
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
77
79
theorem not_mem_prime_iff_unit_in_stalk (r : Γ.obj (op X)) (x : X) : r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit (X.ΓToStalk x r) := by
erw [LocalRing.mem_maximalIdeal, Classical.not_not]
[ " r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit ((X.ΓToStalk x) r)" ]
[]
import Mathlib.Data.List.Basic #align_import data.bool.all_any from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" variable {α : Type*} {p : α → Prop} [DecidablePred p] {l : List α} {a : α} namespace List -- Porting note: in Batteries #align list.all_nil List.all_nil #align list.all_...
Mathlib/Data/Bool/AllAny.lean
42
45
theorem any_iff_exists {p : α → Bool} : any l p ↔ ∃ a ∈ l, p a := by
induction' l with a l ih · exact iff_of_false Bool.false_ne_true (not_exists_mem_nil _) simp only [any_cons, Bool.or_eq_true_iff, ih, exists_mem_cons_iff]
[ " l.all p = true ↔ ∀ (a : α), a ∈ l → p a = true", " [].all p = true ↔ ∀ (a : α), a ∈ [] → p a = true", " (a :: l).all p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true", " (l.all fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a", " l.any p = true ↔ ∃ a, a ∈ l ∧ p a = true", " [].any p = true ↔ ∃ ...
[ " l.all p = true ↔ ∀ (a : α), a ∈ l → p a = true", " [].all p = true ↔ ∀ (a : α), a ∈ [] → p a = true", " (a :: l).all p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true", " (l.all fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a" ]
import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.normed_space.enorm from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section attribute [local instance] Classical.propDecidable open ENNReal structure ENorm (𝕜 : Type*) (V : Type*) [NormedField 𝕜] [Ad...
Mathlib/Analysis/NormedSpace/ENorm.lean
96
98
theorem map_zero : e 0 = 0 := by
rw [← zero_smul 𝕜 (0 : V), e.map_smul] norm_num
[ " e₁ = e₂", " { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂", " { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m...
[ " e₁ = e₂", " { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂", " { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m...
import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Block import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.RingTheory.TensorProduct.Basic #align_import data.matrix.kronecker from "leanpr...
Mathlib/Data/Matrix/Kronecker.lean
125
129
theorem kroneckerMap_diagonal_diagonal [Zero α] [Zero β] [Zero γ] [DecidableEq m] [DecidableEq n] (f : α → β → γ) (hf₁ : ∀ b, f 0 b = 0) (hf₂ : ∀ a, f a 0 = 0) (a : m → α) (b : n → β) : kroneckerMap f (diagonal a) (diagonal b) = diagonal fun mn => f (a mn.1) (b mn.2) := by
ext ⟨i₁, i₂⟩ ⟨j₁, j₂⟩ simp [diagonal, apply_ite f, ite_and, ite_apply, apply_ite (f (a i₁)), hf₁, hf₂]
[ " kroneckerMap f (diagonal a) (diagonal b) = diagonal fun mn => f (a mn.1) (b mn.2)", " kroneckerMap f (diagonal a) (diagonal b) (i₁, i₂) (j₁, j₂) =\n diagonal (fun mn => f (a mn.1) (b mn.2)) (i₁, i₂) (j₁, j₂)" ]
[]
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Measure.Haar.Quotient import Mathlib.MeasureTheory.Constructions.Polish import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Topology.Algebra.Order.Floor #align_import measure_theory.integral.periodic from "leanprover-c...
Mathlib/MeasureTheory/Integral/Periodic.lean
49
55
theorem isAddFundamentalDomain_Ioc' {T : ℝ} (hT : 0 < T) (t : ℝ) (μ : Measure ℝ := by
volume_tac) : IsAddFundamentalDomain (AddSubgroup.op <| .zmultiples T) (Ioc t (t + T)) μ := by refine IsAddFundamentalDomain.mk' measurableSet_Ioc.nullMeasurableSet fun x => ?_ have : Bijective (codRestrict (fun n : ℤ => n • T) (AddSubgroup.zmultiples T) _) := (Equiv.ofInjective (fun n : ℤ => n • T) (zsmul...
[ " IsAddFundamentalDomain (↥(zmultiples T)) (Ioc t (t + T)) μ", " ∃! g, g +ᵥ x ∈ Ioc t (t + T)", " ∃! x_1, codRestrict (fun n => n • T) ↑(zmultiples T) ⋯ x_1 +ᵥ x ∈ Ioc t (t + T)", " IsAddFundamentalDomain (↥(zmultiples T).op) (Ioc t (t + T)) μ", " ∃! x_1, (⇑(zmultiples T).equivOp ∘ codRestrict (fun n => n •...
[ " IsAddFundamentalDomain (↥(zmultiples T)) (Ioc t (t + T)) μ", " ∃! g, g +ᵥ x ∈ Ioc t (t + T)", " ∃! x_1, codRestrict (fun n => n • T) ↑(zmultiples T) ⋯ x_1 +ᵥ x ∈ Ioc t (t + T)" ]
import Mathlib.Order.Filter.Basic #align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Set open Filter namespace Filter variable {α β γ δ : Type*} {ι : Sort*} section Prod variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β} protected ...
Mathlib/Order/Filter/Prod.lean
85
92
theorem mem_prod_principal {s : Set (α × β)} : s ∈ f ×ˢ 𝓟 t ↔ { a | ∀ b ∈ t, (a, b) ∈ s } ∈ f := by
rw [← @exists_mem_subset_iff _ f, mem_prod_iff] refine exists_congr fun u => Iff.rfl.and ⟨?_, fun h => ⟨t, mem_principal_self t, ?_⟩⟩ · rintro ⟨v, v_in, hv⟩ a a_in b b_in exact hv (mk_mem_prod a_in <| v_in b_in) · rintro ⟨x, y⟩ ⟨hx, hy⟩ exact h hx y hy
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
[ " s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s", " ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂", " (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ...
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn import Mathlib.Analysis.NormedSpace.FiniteDimension open Set open scoped NNReal namespace ApproximatesLinearOn
Mathlib/Analysis/Calculus/InverseFunctionTheorem/FiniteDimensional.lean
27
47
theorem exists_homeomorph_extension {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {s : Set E} {f : E → F} {f' : E ≃L[ℝ] F} {c : ℝ≥0} (hf : ApproximatesLinearOn f (f' : E →L[ℝ] F) s c) (hc : Subsingleton E ∨ lipschitzExtensio...
-- the difference `f - f'` is Lipschitz on `s`. It can be extended to a Lipschitz function `u` -- on the whole space, with a slightly worse Lipschitz constant. Then `f' + u` will be the -- desired homeomorphism. obtain ⟨u, hu, uf⟩ : ∃ u : E → F, LipschitzWith (lipschitzExtensionConstant F * c) u ∧ EqOn (f ...
[ " ∃ g, EqOn f (⇑g) s", " f x = g x", " ApproximatesLinearOn g (↑f') univ (lipschitzExtensionConstant F * c)", " LipschitzOnWith (lipschitzExtensionConstant F * c) (g - ⇑↑f') univ", " LipschitzWith (lipschitzExtensionConstant F * c) (g - ⇑↑f')", " g - ⇑↑f' = u", " (g - ⇑↑f') x = u x" ]
[]
import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.RingTheory.Finiteness open scoped TensorProduct open Submodule variable {R M N : Type*} variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] variable {M₁ M₂ : Submodule R M} {N₁ N₂ : Submodule R N} namespace Tens...
Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
88
93
theorem exists_finset (x : M ⊗[R] N) : ∃ S : Finset (M × N), x = S.sum fun i ↦ i.1 ⊗ₜ[R] i.2 := by
obtain ⟨S, h⟩ := exists_finsupp_left x use S.graph rw [h, Finsupp.sum] apply Finset.sum_nbij' (fun m ↦ ⟨m, S m⟩) Prod.fst <;> simp
[ " ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum", " ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum", ...
[ " ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum", " ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum", " x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum", ...
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Data.Finset.Pointwise import Mathlib.Data.Finsupp.Indicator import Mathlib.Data.Fintype.BigOperators #align_import data.finset.finsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" noncomputable section open Finsupp open...
Mathlib/Data/Finset/Finsupp.lean
48
57
theorem mem_finsupp_iff {t : ι → Finset α} : f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i := by
refine mem_map.trans ⟨?_, ?_⟩ · rintro ⟨f, hf, rfl⟩ refine ⟨support_indicator_subset _ _, fun i hi => ?_⟩ convert mem_pi.1 hf i hi exact indicator_of_mem hi _ · refine fun h => ⟨fun i _ => f i, mem_pi.2 h.2, ?_⟩ ext i exact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1...
[ " f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i", " (∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f) → f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i", " ({ toFun := indicator s, inj' := ⋯ } f).support ⊆ s ∧ ∀ i ∈ s, ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i", " ({ toFun := indicator s, inj' := ⋯ } ...
[]
import Mathlib.Topology.EMetricSpace.Basic import Mathlib.Topology.Bornology.Constructions import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Topology.Order.DenselyOrdered open Set Filter TopologicalSpace Bornology open scoped ENNReal NNReal Uniformity Topology universe u v w variable {α : Type u} {β : Typ...
Mathlib/Topology/MetricSpace/PseudoMetric.lean
130
140
theorem PseudoMetricSpace.ext {α : Type*} {m m' : PseudoMetricSpace α} (h : m.toDist = m'.toDist) : m = m' := by
cases' m with d _ _ _ ed hed U hU B hB cases' m' with d' _ _ _ ed' hed' U' hU' B' hB' obtain rfl : d = d' := h congr · ext x y : 2 rw [hed, hed'] · exact UniformSpace.ext (hU.trans hU'.symm) · ext : 2 rw [← Filter.mem_sets, ← Filter.mem_sets, hB, hB']
[ " s ∪ t ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " ∅ ∪ t ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " s ∪ ∅ ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " dist a x + dist x b ≤ C + C", " ∃ C, ∀ z ∈ s ∪ t, dist x z ≤ C", " dist x y + dist...
[ " s ∪ t ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " ∅ ∪ t ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " s ∪ ∅ ∈ {s | ∃ C, ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → dist x y ≤ C}", " dist a x + dist x b ≤ C + C", " ∃ C, ∀ z ∈ s ∪ t, dist x z ≤ C", " dist x y + dist...
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
147
161
theorem ClassGroup.mk_eq_one_of_coe_ideal {I : (FractionalIdeal R⁰ <| FractionRing R)ˣ} {I' : Ideal R} (hI : (I : FractionalIdeal R⁰ <| FractionRing R) = I') : ClassGroup.mk I = 1 ↔ ∃ x : R, x ≠ 0 ∧ I' = Ideal.span {x} := by
rw [← _root_.map_one (ClassGroup.mk (R := R) (K := FractionRing R)), ClassGroup.mk_eq_mk_of_coe_ideal hI (?_ : _ = ↑(⊤ : Ideal R))] any_goals rfl constructor · rintro ⟨x, y, hx, hy, h⟩ rw [Ideal.mul_top] at h rcases Ideal.mem_span_singleton_mul.mp ((Ideal.span_singleton_le_iff_mem _).mp h.ge) with ...
[ " 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.Data.Set.Subsingleton import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Group.Nat import Mathlib.Data.Set.Basic #align_import data.set.equitable from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" variable {α β : Type*} namespace Set def Equ...
Mathlib/Data/Set/Equitable.lean
57
59
theorem equitableOn_iff_exists_image_subset_icc {s : Set α} {f : α → ℕ} : s.EquitableOn f ↔ ∃ b, f '' s ⊆ Icc b (b + 1) := by
simpa only [image_subset_iff] using equitableOn_iff_exists_le_le_add_one
[ " s.EquitableOn f ↔ ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " s.EquitableOn f → ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " ∅.EquitableOn f → ∃ b, ∀ a ∈ ∅, b ≤ f a ∧ f a ≤ b + 1", " ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " (f w).succ ≤ (f y).succ", " f x ≤ (f y).succ", " s.EquitableOn f ↔ ∃ b, f '' s ⊆ Icc b (...
[ " s.EquitableOn f ↔ ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " s.EquitableOn f → ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " ∅.EquitableOn f → ∃ b, ∀ a ∈ ∅, b ≤ f a ∧ f a ≤ b + 1", " ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1", " (f w).succ ≤ (f y).succ", " f x ≤ (f y).succ" ]
import Mathlib.Data.Int.Interval import Mathlib.RingTheory.Binomial import Mathlib.RingTheory.HahnSeries.PowerSeries import Mathlib.RingTheory.HahnSeries.Summable import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.Localization.FractionRing #align_import ring_theory.laurent_series from "leanprov...
Mathlib/RingTheory/LaurentSeries.lean
106
108
theorem powerSeriesPart_zero : powerSeriesPart (0 : LaurentSeries R) = 0 := by
ext simp [(PowerSeries.coeff _ _).map_zero] -- Note: this doesn't get picked up any more
[ " ((ofPowerSeries ℤ R) x).coeff ↑n = (PowerSeries.coeff R n) x", " powerSeriesPart 0 = 0", " (PowerSeries.coeff R n✝) (powerSeriesPart 0) = (PowerSeries.coeff R n✝) 0" ]
[ " ((ofPowerSeries ℤ R) x).coeff ↑n = (PowerSeries.coeff R n) x" ]
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Splits import Mathlib.Algebra.Squarefree.Basic import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.PowerBasis #align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" ...
Mathlib/FieldTheory/Separable.lean
87
89
theorem Separable.of_mul_left {f g : R[X]} (h : (f * g).Separable) : f.Separable := by
have := h.of_mul_left_left; rw [derivative_mul] at this exact IsCoprime.of_mul_right_left (IsCoprime.of_add_mul_left_right this)
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1", " X.Separable", " IsCoprime X 1", " (C r).Separable ↔ IsUnit r" ]
[ " ¬Separable 0", " False", " f.Separable", " (X + C a).Separable", " IsCoprime (X + C a) 1", " X.Separable", " IsCoprime X 1", " (C r).Separable ↔ IsUnit r" ]
import Mathlib.Algebra.Category.ModuleCat.Projective import Mathlib.AlgebraicTopology.ExtraDegeneracy import Mathlib.CategoryTheory.Abelian.Ext import Mathlib.RepresentationTheory.Rep #align_import representation_theory.group_cohomology.resolution from "leanprover-community/mathlib"@"cec81510e48e579bde6acd8568c06a87a...
Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean
108
124
theorem actionDiagonalSucc_hom_apply {G : Type u} [Group G] {n : ℕ} (f : Fin (n + 1) → G) : (actionDiagonalSucc G n).hom.hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f i.succ) := by
induction' n with n hn · exact Prod.ext rfl (funext fun x => Fin.elim0 x) · refine Prod.ext rfl (funext fun x => ?_) /- Porting note (#11039): broken proof was · dsimp only [actionDiagonalSucc] simp only [Iso.trans_hom, comp_hom, types_comp_apply, diagonalSucc_hom_hom, leftRegularTensorIso_hom_...
[ " (actionDiagonalSucc G n).hom.hom f = (f 0, fun i => (f i.castSucc)⁻¹ * f i.succ)", " (actionDiagonalSucc G 0).hom.hom f = (f 0, fun i => (f i.castSucc)⁻¹ * f i.succ)", " (actionDiagonalSucc G (n + 1)).hom.hom f = (f 0, fun i => (f i.castSucc)⁻¹ * f i.succ)", " ((actionDiagonalSucc G (n + 1)).hom.hom f).2 x ...
[]
import Mathlib.LinearAlgebra.DFinsupp import Mathlib.LinearAlgebra.StdBasis #align_import linear_algebra.finsupp_vector_space from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95" noncomputable section open Set LinearMap Submodule open scoped Cardinal universe u v w namespace Finsupp ...
Mathlib/LinearAlgebra/FinsuppVectorSpace.lean
34
51
theorem linearIndependent_single {φ : ι → Type*} {f : ∀ ι, φ ι → M} (hf : ∀ i, LinearIndependent R (f i)) : LinearIndependent R fun ix : Σi, φ i => single ix.1 (f ix.1 ix.2) := by
apply @linearIndependent_iUnion_finite R _ _ _ _ ι φ fun i x => single i (f i x) · intro i have h_disjoint : Disjoint (span R (range (f i))) (ker (lsingle i)) := by rw [ker_lsingle] exact disjoint_bot_right apply (hf i).map h_disjoint · intro i t _ hit refine (disjoint_lsingle_lsingle {i}...
[ " LinearIndependent R fun ix => single ix.fst (f ix.fst ix.snd)", " ∀ (j : ι), LinearIndependent R fun x => single j (f j x)", " LinearIndependent R fun x => single i (f i x)", " Disjoint (span R (Set.range (f i))) (ker (lsingle i))", " Disjoint (span R (Set.range (f i))) ⊥", " ∀ (i : ι) (t : Set ι),\n ...
[]
import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.Convex.StrictConvexSpace import Mathlib.MeasureTheory.Function.AEEqOfIntegral import Mathlib.MeasureTheory.Integral.Average #align_import analysis.convex.integral from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Mea...
Mathlib/Analysis/Convex/Integral.lean
87
90
theorem Convex.average_mem [IsFiniteMeasure μ] [NeZero μ] (hs : Convex ℝ s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) : (⨍ x, f x ∂μ) ∈ s := by
refine hs.integral_mem hsc (ae_mono' ?_ hfs) hfi.to_average exact AbsolutelyContinuous.smul (refl _) _
[ " ∫ (x : α), f x ∂μ ∈ s", " (range g ∩ s).Nonempty", " f x₀ ∈ range g", " ∫ (a : α), g a ∂μ ∈ s", " ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)", " g x ∈ closure (range g ∩ s)", " g x ∈ range g ∩ s", " ∀ i ∈ (G n).range, 0 ≤ (μ (↑(G n) ⁻¹' {i})).toReal", " ∑ i ∈ (G n).range, (μ (↑(G n) ⁻¹' {i})).toRe...
[ " ∫ (x : α), f x ∂μ ∈ s", " (range g ∩ s).Nonempty", " f x₀ ∈ range g", " ∫ (a : α), g a ∂μ ∈ s", " ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)", " g x ∈ closure (range g ∩ s)", " g x ∈ range g ∩ s", " ∀ i ∈ (G n).range, 0 ≤ (μ (↑(G n) ⁻¹' {i})).toReal", " ∑ i ∈ (G n).range, (μ (↑(G n) ⁻¹' {i})).toRe...
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products import Mathlib.CategoryTheory.Limits.Yoneda import Mathlib.CategoryTheory.Preadditive.FunctorCategory import Mathlib.CategoryTheory.Sites.SheafOfTypes import Mathlib.CategoryTheory.Sites.Equa...
Mathlib/CategoryTheory/Sites/Sheaf.lean
147
162
theorem isLimit_iff_isSheafFor : Nonempty (IsLimit (P.mapCone S.arrows.cocone.op)) ↔ ∀ E : Aᵒᵖ, IsSheafFor (P ⋙ coyoneda.obj E) S.arrows := by
dsimp [IsSheafFor]; simp_rw [compatible_iff_sieveCompatible] rw [((Cone.isLimitEquivIsTerminal _).trans (isTerminalEquivUnique _ _)).nonempty_congr] rw [Classical.nonempty_pi]; constructor · intro hu E x hx specialize hu hx.cone erw [(homEquivAmalgamation hx).uniqueCongr.nonempty_congr] at hu exact...
[ " (fun Y f h => π.app { unop := { obj := Over.mk f, property := h } }) Y (g ≫ f) ⋯ =\n (P ⋙ coyoneda.obj E).map g.op ((fun Y f h => π.app { unop := { obj := Over.mk f, property := h } }) X f hf)", " 𝟙 (((Functor.const S.arrows.categoryᵒᵖ).op.obj E).unop.obj { unop := { obj := Over.mk (g ≫ f), property := ⋯ } ...
[ " (fun Y f h => π.app { unop := { obj := Over.mk f, property := h } }) Y (g ≫ f) ⋯ =\n (P ⋙ coyoneda.obj E).map g.op ((fun Y f h => π.app { unop := { obj := Over.mk f, property := h } }) X f hf)", " 𝟙 (((Functor.const S.arrows.categoryᵒᵖ).op.obj E).unop.obj { unop := { obj := Over.mk (g ≫ f), property := ⋯ } ...
import Mathlib.Computability.Halting #align_import computability.reduce from "leanprover-community/mathlib"@"d13b3a4a392ea7273dfa4727dbd1892e26cfd518" universe u v w open Function def ManyOneReducible {α β} [Primcodable α] [Primcodable β] (p : α → Prop) (q : β → Prop) := ∃ f, Computable f ∧ ∀ a, p a ↔ q (f a...
Mathlib/Computability/Reduce.lean
111
113
theorem OneOneReducible.of_equiv_symm {α β} [Primcodable α] [Primcodable β] {e : α ≃ β} (q : β → Prop) (h : Computable e.symm) : q ≤₁ (q ∘ e) := by
convert OneOneReducible.of_equiv _ h; funext; simp
[ " ∀ (a : α), p a ↔ p (id a)", " r ((g ∘ f) a)", " p a", " q ≤₁ (q ∘ ⇑e)", " q = (q ∘ ⇑e) ∘ ⇑e.symm", " q x✝ = ((q ∘ ⇑e) ∘ ⇑e.symm) x✝" ]
[ " ∀ (a : α), p a ↔ p (id a)", " r ((g ∘ f) a)", " p a" ]
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁...
Mathlib/CategoryTheory/Conj.lean
124
125
theorem symm_self_conj (f : End X) : α.symm.conj (α.conj f) = f := by
rw [← trans_conj, α.self_symm_id, refl_conj]
[ " α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f", " α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f", " (α.homCongr β) f = α.inv ≫ f ≫ β.hom", " (α.homCongr γ) (f ≫ g) = (α.homCongr β) f ≫ (β.homCongr γ) g", " ((refl X).homCongr (refl Y)) f = f", " ((α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂)) f = ((α₁.homCongr β₁).trans (α₂.homCon...
[ " α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f", " α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f", " (α.homCongr β) f = α.inv ≫ f ≫ β.hom", " (α.homCongr γ) (f ≫ g) = (α.homCongr β) f ≫ (β.homCongr γ) g", " ((refl X).homCongr (refl Y)) f = f", " ((α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂)) f = ((α₁.homCongr β₁).trans (α₂.homCon...
import Mathlib.Algebra.Group.Fin import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.matrix.circulant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" variable {α β m n R : Type*} namespace Matrix open Function open Matrix def circulant [Sub n] (v : n → α)...
Mathlib/LinearAlgebra/Matrix/Circulant.lean
85
86
theorem conjTranspose_circulant [Star α] [AddGroup n] (v : n → α) : (circulant v)ᴴ = circulant (star fun i => v (-i)) := by
ext; simp
[ " Injective circulant", " v = w", " v k = w k", " Injective fun v => circulant v", " (circulant v)ᵀ = circulant fun i => v (-i)", " (circulant v)ᵀ i✝ j✝ = circulant (fun i => v (-i)) i✝ j✝", " (circulant v)ᴴ = circulant (star fun i => v (-i))", " (circulant v)ᴴ i✝ j✝ = circulant (star fun i => v (-i))...
[ " Injective circulant", " v = w", " v k = w k", " Injective fun v => circulant v", " (circulant v)ᵀ = circulant fun i => v (-i)", " (circulant v)ᵀ i✝ j✝ = circulant (fun i => v (-i)) i✝ j✝" ]
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
146
155
theorem reflect_C_mul_X_pow (N n : ℕ) {c : R} : reflect N (C c * X ^ n) = C c * X ^ revAt N n := by
ext rw [reflect_C_mul, coeff_C_mul, coeff_C_mul, coeff_X_pow, coeff_reflect] split_ifs with h · rw [h, revAt_invol, coeff_X_pow_self] · rw [not_mem_support_iff.mp] intro a rw [← one_mul (X ^ n), ← C_1] at a apply h rw [← mem_support_C_mul_X_pow a, revAt_invol]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≤ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
import Mathlib.Analysis.Convex.Combination import Mathlib.Tactic.Linarith open Finset Set variable {ι 𝕜 E : Type*} [LinearOrderedField 𝕜] [AddCommGroup E] [Module 𝕜 E] {f : ι → E}
Mathlib/Analysis/Convex/Radon.lean
26
50
theorem radon_partition (h : ¬ AffineIndependent 𝕜 f) : ∃ I, (convexHull 𝕜 (f '' I) ∩ convexHull 𝕜 (f '' Iᶜ)).Nonempty := by
rw [affineIndependent_iff] at h push_neg at h obtain ⟨s, w, h_wsum, h_vsum, nonzero_w_index, h1, h2⟩ := h let I : Finset ι := s.filter fun i ↦ 0 ≤ w i let J : Finset ι := s.filter fun i ↦ w i < 0 let p : E := centerMass I w f -- point of intersection have hJI : ∑ j ∈ J, w j + ∑ i ∈ I, w i = 0 := by s...
[ " ∃ I, ((convexHull 𝕜) (f '' I) ∩ (convexHull 𝕜) (f '' Iᶜ)).Nonempty", " ∑ j ∈ J, w j + ∑ i ∈ I, w i = 0", " 0 < ∑ i ∈ I, w i", " pos_w_index ∈ I ∧ 0 < w pos_w_index", " ∑ i ∈ J, w i • f i + ∑ i ∈ I, w i • f i = 0", " p ∈ (convexHull 𝕜) (f '' ↑I)", " p ∈ (convexHull 𝕜) (f '' (↑I)ᶜ)", " J.centerMas...
[]
import Mathlib.Data.List.Basic import Mathlib.Data.Sigma.Basic #align_import data.list.prod_sigma from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" variable {α β : Type*} namespace List @[simp] theorem nil_product (l : List β) : (@nil α) ×ˢ l = [] := rfl #align list.nil_product...
Mathlib/Data/List/ProdSigma.lean
51
56
theorem length_product (l₁ : List α) (l₂ : List β) : length (l₁ ×ˢ l₂) = length l₁ * length l₂ := by
induction' l₁ with x l₁ IH · exact (Nat.zero_mul _).symm · simp only [length, product_cons, length_append, IH, Nat.add_mul, Nat.one_mul, length_map, Nat.add_comm]
[ " (head✝ :: l) ×ˢ [] = []", " (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂", " (l₁ ×ˢ l₂).length = l₁.length * l₂.length", " ([] ×ˢ l₂).length = [].length * l₂.length", " ((x :: l₁) ×ˢ l₂).length = (x :: l₁).length * l₂.length" ]
[ " (head✝ :: l) ×ˢ [] = []", " (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂" ]
import Mathlib.Algebra.Ring.Prod import Mathlib.GroupTheory.OrderOfElement import Mathlib.Tactic.FinCases #align_import data.zmod.basic from "leanprover-community/mathlib"@"74ad1c88c77e799d2fea62801d1dbbd698cff1b7" assert_not_exists Submodule open Function namespace ZMod instance charZero : CharZero (ZMod 0) :=...
Mathlib/Data/ZMod/Basic.lean
137
139
theorem ringChar_zmod_n (n : ℕ) : ringChar (ZMod n) = n := by
rw [ringChar.eq_iff] exact ZMod.charP n
[ " a.val < n", " a.val < 0", " a.val < n✝ + 1", " (↑a).val = a % n", " (↑a).val = a % 0", " (↑a).val = a", " (↑a).val = a % (n✝ + 1)", " IsUnit n ↔ n.val = 1", " IsUnit n ↔ Int.natAbs n = 1", " n = 1", " ∀ (x : ℕ), ↑x = 0 ↔ n ∣ x", " ↑k = 0 ↔ n ∣ k", " ↑k = 0 ↔ 0 ∣ k", " ↑k = 0 ↔ n + 1 ∣ k"...
[ " a.val < n", " a.val < 0", " a.val < n✝ + 1", " (↑a).val = a % n", " (↑a).val = a % 0", " (↑a).val = a", " (↑a).val = a % (n✝ + 1)", " IsUnit n ↔ n.val = 1", " IsUnit n ↔ Int.natAbs n = 1", " n = 1", " ∀ (x : ℕ), ↑x = 0 ↔ n ∣ x", " ↑k = 0 ↔ n ∣ k", " ↑k = 0 ↔ 0 ∣ k", " ↑k = 0 ↔ n + 1 ∣ k"...
import Mathlib.Data.Fin.Fin2 import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Common #align_import data.typevec from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" universe u v w @[pp_with_univ] def TypeVec (n : ℕ) := Fin2 n → Type* #align typevec TypeVec instance {n} : Inh...
Mathlib/Data/TypeVec.lean
171
177
theorem eq_of_drop_last_eq {α β : TypeVec (n + 1)} {f g : α ⟹ β} (h₀ : dropFun f = dropFun g) (h₁ : lastFun f = lastFun g) : f = g := by
-- Porting note: FIXME: congr_fun h₀ <;> ext1 ⟨⟩ <;> apply_assumption refine funext (fun x => ?_) cases x · apply h₁ · apply congr_fun h₀
[ " (∀ (i : Fin2 n), f i = g i) → f = g", " f = g", " f i = g i", " (α.drop ::: α.last) i = α i", " (α.drop ::: α.last) Fin2.fz = α Fin2.fz", " (α.drop ::: α.last) a✝.fs = α a✝.fs", " C γ", " C (γ.drop ::: γ.last)", " α i → β i", " f x = g x", " f Fin2.fz = g Fin2.fz", " f a✝.fs = g a✝.fs" ]
[ " (∀ (i : Fin2 n), f i = g i) → f = g", " f = g", " f i = g i", " (α.drop ::: α.last) i = α i", " (α.drop ::: α.last) Fin2.fz = α Fin2.fz", " (α.drop ::: α.last) a✝.fs = α a✝.fs", " C γ", " C (γ.drop ::: γ.last)", " α i → β i" ]
import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.NormedSpace.Real #align_import analysis.calculus.diff_cont_on_cl from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Set Filter Metric open scoped Topology variable (𝕜 : Type*) {E F G : Type*} [NontriviallyNormed...
Mathlib/Analysis/Calculus/DiffContOnCl.lean
64
70
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) : ContinuousOn f (closedBall x r) := by
rcases eq_or_ne r 0 with (rfl | hr) · rw [closedBall_zero] exact continuousOn_singleton f x · rw [← closure_ball x hr] exact h.continuousOn
[ " ContinuousOn f (closedBall x r)", " ContinuousOn f (closedBall x 0)", " ContinuousOn f {x}", " ContinuousOn f (closure (ball x r))" ]
[]
import Mathlib.CategoryTheory.Sites.Sieves #align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe w v₁ v₂ u₁ u₂ namespace CategoryTheory open Opposite CategoryTheory Category Limits Sieve namespace Presieve variable {C : Type ...
Mathlib/CategoryTheory/Sites/IsSheafFor.lean
186
191
theorem FamilyOfElements.Compatible.sieveExtend {x : FamilyOfElements P R} (hx : x.Compatible) : x.sieveExtend.Compatible := by
intro _ _ _ _ _ _ _ h₁ h₂ comm iterate 2 erw [← FunctorToTypes.map_comp_apply]; rw [← op_comp] apply hx simp [comm, h₁.choose_spec.choose_spec.choose_spec.2, h₂.choose_spec.choose_spec.choose_spec.2]
[ " x.Compatible ↔ x.PullbackCompatible", " x.Compatible → x.PullbackCompatible", " P.map pullback.fst.op (x f₁ hf₁) = P.map pullback.snd.op (x f₂ hf₂)", " pullback.fst ≫ f₁ = pullback.snd ≫ f₂", " x.PullbackCompatible → x.Compatible", " P.map g₁.op (x f₁ hf₁) = P.map g₂.op (x f₂ hf₂)", " x.sieveExtend.Co...
[ " x.Compatible ↔ x.PullbackCompatible", " x.Compatible → x.PullbackCompatible", " P.map pullback.fst.op (x f₁ hf₁) = P.map pullback.snd.op (x f₂ hf₂)", " pullback.fst ≫ f₁ = pullback.snd ≫ f₂", " x.PullbackCompatible → x.Compatible", " P.map g₁.op (x f₁ hf₁) = P.map g₂.op (x f₂ hf₂)" ]
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityT...
Mathlib/Probability/CondCount.lean
104
107
theorem condCount_self (hs : s.Finite) (hs' : s.Nonempty) : condCount s s = 1 := by
rw [condCount, cond_apply _ hs.measurableSet, Set.inter_self, ENNReal.inv_mul_cancel] · exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h · exact (Measure.count_apply_lt_top.2 hs).ne
[ " condCount ∅ = 0", " (condCount s) ∅ = 0", " s.Finite", " False", " (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)", " Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)", " Measure.count Set.univ = ↑(Fintype.card Ω)", " ∑ x : Ω, 1 = ↑(Fintype.card Ω)", " M...
[ " condCount ∅ = 0", " (condCount s) ∅ = 0", " s.Finite", " False", " (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)", " Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)", " Measure.count Set.univ = ↑(Fintype.card Ω)", " ∑ x : Ω, 1 = ↑(Fintype.card Ω)", " M...
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Data.Set.Finite #align_import data.finsupp.defs from "leanprover-community/mathlib"@"842328d9df7e96fd90fc424e115679c15fb23a71" noncomputable section open Finset Function variable {α β γ ι M M' N P G H R S : Type*}...
Mathlib/Data/Finsupp/Defs.lean
203
204
theorem support_nonempty_iff {f : α →₀ M} : f.support.Nonempty ↔ f ≠ 0 := by
simp only [Finsupp.support_eq_empty, Finset.nonempty_iff_ne_empty, Ne]
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0", " f a = g a", " g a = 0", " f.support.Nonempty ↔ f ≠ 0" ]
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0", " f a = g a", " g a = 0" ]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toReal_add (ha : a ≠ ∞) (hb : b ≠ ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
50
55
theorem le_toReal_sub {a b : ℝ≥0∞} (hb : b ≠ ∞) : a.toReal - b.toReal ≤ (a - b).toReal := by
lift b to ℝ≥0 using hb induction a · simp · simp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal] exact le_max_left _ _
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal" ]
import Mathlib.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.concrete from "leanprover-community/mathlib"@"00638177efd1b2534fc5269363ebf42a7871df9a" open Equiv Equiv.Perm List variable {α : Type*} namespace List variable [D...
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
97
102
theorem cycleOf_formPerm (hl : Nodup l) (hn : 2 ≤ l.length) (x) : cycleOf l.attach.formPerm x = l.attach.formPerm := have hn : 2 ≤ l.attach.length := by
rwa [← length_attach] at hn have hl : l.attach.Nodup := by rwa [← nodup_attach] at hl (isCycle_formPerm hl hn).cycleOf_eq ((formPerm_apply_mem_ne_self_iff _ hl _ (mem_attach _ _)).mpr hn)
[ " l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " False", " (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ...
[ " l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " False", " (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ...
import Mathlib.LinearAlgebra.Quotient import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213" noncomputable section Ring variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E] variable {F : Type*} [Ad...
Mathlib/LinearAlgebra/Projection.lean
52
62
theorem isCompl_of_proj {f : E →ₗ[R] p} (hf : ∀ x : p, f x = x) : IsCompl p (ker f) := by
constructor · rw [disjoint_iff_inf_le] rintro x ⟨hpx, hfx⟩ erw [SetLike.mem_coe, mem_ker, hf ⟨x, hpx⟩, mk_eq_zero] at hfx simp only [hfx, SetLike.mem_coe, zero_mem] · rw [codisjoint_iff_le_sup] intro x _ rw [mem_sup'] refine ⟨f x, ⟨x - f x, ?_⟩, add_sub_cancel _ _⟩ rw [mem_ker, Linear...
[ " ker (id - p.subtype ∘ₗ f) = p", " x ∈ ker (id - p.subtype ∘ₗ f) ↔ x ∈ p", " x = ↑(f x) ↔ x ∈ p", " x = ↑(f x)", " IsCompl p (ker f)", " Disjoint p (ker f)", " p ⊓ ker f ≤ ⊥", " x ∈ ⊥", " Codisjoint p (ker f)", " ⊤ ≤ p ⊔ ker f", " x ∈ p ⊔ ker f", " ∃ y z, ↑y + ↑z = x", " x - ↑(f x) ∈ ker f"...
[ " ker (id - p.subtype ∘ₗ f) = p", " x ∈ ker (id - p.subtype ∘ₗ f) ↔ x ∈ p", " x = ↑(f x) ↔ x ∈ p", " x = ↑(f x)" ]
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic #align_import algebra.category.Module.monoidal.symmetric from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2" suppress_compilation universe v w x u open CategoryTheory MonoidalC...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean
34
38
theorem braiding_naturality {X₁ X₂ Y₁ Y₂ : ModuleCat.{u} R} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) : (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f) := by
apply TensorProduct.ext' intro x y rfl
[ " (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)", " ∀ (x : ↑X₁) (y : ↑X₂), ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)", " ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)" ]
[]
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Congruence import Mathlib.RingTheory.Ideal.Basic import Mathlib.Tactic.FinCases #align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" universe u v w namespace Ideal open Set variabl...
Mathlib/RingTheory/Ideal/Quotient.lean
152
154
theorem subsingleton_iff {I : Ideal R} : Subsingleton (R ⧸ I) ↔ I = ⊤ := by
rw [eq_top_iff_one, ← subsingleton_iff_zero_eq_one, eq_comm, ← (mk I).map_one, Quotient.eq_zero_iff_mem]
[ " Setoid.r (a₁ * a₂) (b₁ * b₂)", " a₁ * a₂ - b₁ * b₂ ∈ I", " a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁", " (mk (span {x})) y = 0 ↔ x ∣ y", " (mk (span {x})) x = 0", " (mk I) x = (mk I) y ↔ x - y ∈ I", " Subsingleton (R ⧸ I) ↔ I = ⊤" ]
[ " Setoid.r (a₁ * a₂) (b₁ * b₂)", " a₁ * a₂ - b₁ * b₂ ∈ I", " a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁", " (mk (span {x})) y = 0 ↔ x ∣ y", " (mk (span {x})) x = 0", " (mk I) x = (mk I) y ↔ x - y ∈ I" ]
import Mathlib.Data.PFunctor.Multivariate.Basic #align_import data.qpf.multivariate.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u open MvFunctor class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) [MvFunctor F] where P : MvPFunctor.{u} n abs : ∀ {α}, P α → F α ...
Mathlib/Data/QPF/Multivariate/Basic.lean
184
207
theorem has_good_supp_iff {α : TypeVec n} (x : F α) : (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔ ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ := by
constructor · intro h have : LiftP (supp x) x := by rw [h]; introv; exact id rw [liftP_iff] at this rcases this with ⟨a, f, xeq, h'⟩ refine ⟨a, f, xeq.symm, ?_⟩ intro a' f' h'' rintro hu u ⟨j, _h₂, hfi⟩ have hh : u ∈ supp x a' := by rw [← hfi]; apply h' exact (mem_supp x _ u).mp hh ...
[ " TypeVec.id <$$> x = x", " TypeVec.id <$$> abs (repr x) = abs (repr x)", " TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩", " (g ⊚ f) <$$> x = g <$$> f <$$> x", " (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)", " (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ...
[ " TypeVec.id <$$> x = x", " TypeVec.id <$$> abs (repr x) = abs (repr x)", " TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩", " (g ⊚ f) <$$> x = g <$$> f <$$> x", " (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)", " (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Order.Fin import Mathlib.Order.PiLex import Mathlib.Order.Interval.Set.Basic #align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b" assert_not_exists MonoidWithZero un...
Mathlib/Data/Fin/Tuple/Basic.lean
78
78
theorem cons_succ : cons x p i.succ = p i := by
simp [cons]
[ " Unique ((i : Fin 0) → α i)", " tail (cons x p) = p", " cons x p i.succ = p i" ]
[ " Unique ((i : Fin 0) → α i)", " tail (cons x p) = p" ]
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
55
59
theorem irreducible_factor (f : K[X]) : Irreducible (factor f) := by
rw [factor] split_ifs with H · exact (Classical.choose_spec H).1 · exact irreducible_X
[ " Irreducible f.factor", " Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)", " Irreducible (Classical.choose H)", " Irreducible X" ]
[]
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv #align_import linear_algebra.quadratic_form.prod from "leanprover-community/mathlib"@"9b2755b951bc323c962bd072cd447b375cf58101" universe u v w variable {ι : Type*} {R : Type*} {M₁ M₂ N₁ N₂ : Type*} {Mᵢ Nᵢ : ι → Type*} namespace QuadraticForm section Pro...
Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
342
353
theorem posDef_pi_iff [Fintype ι] {R} [OrderedCommRing R] [∀ i, Module R (Mᵢ i)] {Q : ∀ i, QuadraticForm R (Mᵢ i)} : (pi Q).PosDef ↔ ∀ i, (Q i).PosDef := by
simp_rw [posDef_iff_nonneg, nonneg_pi_iff] constructor · rintro ⟨hle, ha⟩ intro i exact ⟨hle i, anisotropic_of_pi ha i⟩ · intro h refine ⟨fun i => (h i).1, fun x hx => funext fun i => (h i).2 _ ?_⟩ rw [pi_apply, Finset.sum_eq_zero_iff_of_nonneg fun j _ => ?_] at hx · exact hx _ (Finset.mem_...
[ " (pi Q) (Pi.single i m) = (Q i) m", " (Q j) (Pi.single i m j) = 0", " (QuadraticForm.pi Q') ((↑(LinearEquiv.piCongrRight fun i => (e i).toLinearEquiv)).toFun x) = (QuadraticForm.pi Q) x", " Q ((LinearMap.proj i).toFun m) = (pi (Pi.single i Q)) m", " Q (m i) = (pi (Pi.single i Q)) m", " (Pi.single i Q j) ...
[ " (pi Q) (Pi.single i m) = (Q i) m", " (Q j) (Pi.single i m j) = 0", " (QuadraticForm.pi Q') ((↑(LinearEquiv.piCongrRight fun i => (e i).toLinearEquiv)).toFun x) = (QuadraticForm.pi Q) x", " Q ((LinearMap.proj i).toFun m) = (pi (Pi.single i Q)) m", " Q (m i) = (pi (Pi.single i Q)) m", " (Pi.single i Q j) ...
import Mathlib.Data.Real.Pi.Bounds import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody -- TODO. Rewrite some of the FLT results on the disciminant using the definitions and results of -- this file namespace NumberField open FiniteDimensional NumberField NumberField.InfinitePlace Matrix open sco...
Mathlib/NumberTheory/NumberField/Discriminant.lean
50
53
theorem discr_eq_discr {ι : Type*} [Fintype ι] [DecidableEq ι] (b : Basis ι ℤ (𝓞 K)) : Algebra.discr ℤ b = discr K := by
let b₀ := Basis.reindex (RingOfIntegers.basis K) (Basis.indexEquiv (RingOfIntegers.basis K) b) rw [Algebra.discr_eq_discr (𝓞 K) b b₀, Basis.coe_reindex, Algebra.discr_reindex]
[ " discr K ≠ 0", " Algebra.discr ℚ ⇑(integralBasis K) ≠ ↑0", " Algebra.discr ℤ ⇑b = discr K" ]
[ " discr K ≠ 0", " Algebra.discr ℚ ⇑(integralBasis K) ≠ ↑0" ]
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} variable [PseudoMetricSpace α] namespace Metric #align metric.bounded Bornology.I...
Mathlib/Topology/MetricSpace/Bounded.lean
133
134
theorem comap_dist_left_atTop (c : α) : comap (dist c) atTop = cobounded α := by
simpa only [dist_comm _ c] using comap_dist_right_atTop c
[ " (∃ r, x✝ ⊆ closedBall c r) ↔ ∃ i, True ∧ (closedBall c i)ᶜ ⊆ x✝ᶜ", " (∃ r, x✝ ⊆ ball c r) ↔ ∃ i, True ∧ (ball c i)ᶜ ⊆ x✝ᶜ", " (cobounded α).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i", " comap (dist c) atTop = cobounded α" ]
[ " (∃ r, x✝ ⊆ closedBall c r) ↔ ∃ i, True ∧ (closedBall c i)ᶜ ⊆ x✝ᶜ", " (∃ r, x✝ ⊆ ball c r) ↔ ∃ i, True ∧ (ball c i)ᶜ ⊆ x✝ᶜ", " (cobounded α).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i" ]
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic #align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Nat section Euler section Legendre open ZMod variable (p : ℕ) [Fact p.Prime] def legendreSym (a : ℤ) : ℤ := ...
Mathlib/NumberTheory/LegendreSymbol/Basic.lean
207
208
theorem eq_neg_one_iff' {a : ℕ} : legendreSym p a = -1 ↔ ¬IsSquare (a : ZMod p) := by
rw [eq_neg_one_iff]; norm_cast
[ " ↑(legendreSym p a) = ↑a ^ (p / 2)", " ↑0 = 0", " ↑(legendreSym 2 a) = ↑a ^ (2 / 2)", " ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → 1 = ↑a ^ 1", " ¬b = 0 → 1 = b ^ 1", " ¬⟨0, ⋯⟩ = 0 → 1 = ⟨0, ⋯⟩ ^ 1", " ¬⟨1, ⋯⟩ = 0 → 1 = ⟨1, ⋯⟩ ^ 1", " p = Fintype.card (ZMod p)", " legendreS...
[ " ↑(legendreSym p a) = ↑a ^ (p / 2)", " ↑0 = 0", " ↑(legendreSym 2 a) = ↑a ^ (2 / 2)", " ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → 1 = ↑a ^ 1", " ¬b = 0 → 1 = b ^ 1", " ¬⟨0, ⋯⟩ = 0 → 1 = ⟨0, ⋯⟩ ^ 1", " ¬⟨1, ⋯⟩ = 0 → 1 = ⟨1, ⋯⟩ ^ 1", " p = Fintype.card (ZMod p)", " legendreS...
import Mathlib.CategoryTheory.Subobject.Lattice #align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d" universe v u noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite var...
Mathlib/CategoryTheory/Subobject/Limits.lean
56
58
theorem equalizerSubobject_arrow' : (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ι f g := by
simp [equalizerSubobjectIso]
[ " (equalizerSubobjectIso f g).hom ≫ equalizer.ι f g = (equalizerSubobject f g).arrow", " (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ι f g" ]
[ " (equalizerSubobjectIso f g).hom ≫ equalizer.ι f g = (equalizerSubobject f g).arrow" ]
import Mathlib.Init.Logic import Mathlib.Tactic.AdaptationNote import Mathlib.Tactic.Coe set_option autoImplicit true -- We align Lean 3 lemmas with lemmas in `Init.SimpLemmas` in Lean 4. #align band_self Bool.and_self #align band_tt Bool.and_true #align band_ff Bool.and_false #align tt_band Bool.true_and #align f...
Mathlib/Init/Data/Bool/Lemmas.lean
48
48
theorem true_eq_false_eq_False : ¬true = false := by
decide
[ " ¬true = false" ]
[]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Fin.VecNotation import Mathlib.Logic.Equiv.Fin #align_import data.fin.tuple.nat_antidiagonal from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" namespace List.Nat def antidiagona...
Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean
142
147
theorem antidiagonalTuple_two (n : ℕ) : antidiagonalTuple 2 n = (antidiagonal n).map fun i => ![i.1, i.2] := by
rw [antidiagonalTuple] simp_rw [antidiagonalTuple_one, List.map_singleton] rw [List.map_eq_bind] rfl
[ " x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n", " Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, i.elim0 = n", " Fin.elim0 ∈ antidiagonalTuple 0 0 ↔ ∑ i : Fin 0, i.elim0 = 0", " Fin.elim0 ∈ antidiagonalTuple 0 (n✝ + 1) ↔ ∑ i : Fin 0, i.elim0 = n✝ + 1", " Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔...
[ " x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n", " Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, i.elim0 = n", " Fin.elim0 ∈ antidiagonalTuple 0 0 ↔ ∑ i : Fin 0, i.elim0 = 0", " Fin.elim0 ∈ antidiagonalTuple 0 (n✝ + 1) ↔ ∑ i : Fin 0, i.elim0 = n✝ + 1", " Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔...
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Data.Multiset.Sort import Mathlib.Data.PNat.Basic import Mathlib.Data.PNat.Interval import Mathlib.Tactic.NormNum import Mathlib.Tactic.IntervalCases #align_import number_theory.ADE_inequality from "leanprover-community/math...
Mathlib/NumberTheory/ADEInequality.lean
160
172
theorem Admissible.one_lt_sumInv {pqr : Multiset ℕ+} : Admissible pqr → 1 < sumInv pqr := by
rw [Admissible] rintro (⟨p', q', H⟩ | ⟨n, H⟩ | H | H | H) · rw [← H, A', sumInv_pqr, add_assoc] simp only [lt_add_iff_pos_right, PNat.one_coe, inv_one, Nat.cast_one] apply add_pos <;> simp only [PNat.pos, Nat.cast_pos, inv_pos] · rw [← H, D', sumInv_pqr] conv_rhs => simp only [OfNat.ofNat, PNat.mk_...
[ " sumInv {p, q, r} = (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹", " Admissible pqr → 1 < sumInv pqr", " (∃ q r, A' q r = pqr) ∨ (∃ r, D' r = pqr) ∨ E' 3 = pqr ∨ E' 4 = pqr ∨ E' 5 = pqr → 1 < sumInv pqr", " 1 < sumInv pqr", " 1 < (↑↑1)⁻¹ + ((↑↑p')⁻¹ + (↑↑q')⁻¹)", " 0 < (↑↑p')⁻¹ + (↑↑q')⁻¹", " 0 < (↑↑p')⁻¹", " 0 < (↑↑...
[ " sumInv {p, q, r} = (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹" ]
import Mathlib.Analysis.Calculus.Deriv.ZPow import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.Convex.Deriv #align_import analysis.convex.specific_functions.deriv from "leanprover-communi...
Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean
72
85
theorem int_prod_range_nonneg (m : ℤ) (n : ℕ) (hn : Even n) : 0 ≤ ∏ k ∈ Finset.range n, (m - k) := by
rcases hn with ⟨n, rfl⟩ induction' n with n ihn · simp rw [← two_mul] at ihn rw [← two_mul, mul_add, mul_one, ← one_add_one_eq_two, ← add_assoc, Finset.prod_range_succ, Finset.prod_range_succ, mul_assoc] refine mul_nonneg ihn ?_; generalize (1 + 1) * n = k rcases le_or_lt m k with hmk | hmk · have ...
[ " StrictConvexOn ℝ (Ici 0) fun x => x ^ n", " StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))", " StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)", " 0 < ↑n", " StrictConvexOn ℝ univ fun x => x ^ n", " StrictMono (deriv fun a => a ^ n)", " StrictMono fun x => ↑n * x ^ (n - 1)", " 0 ≤ (if f x ≤...
[ " StrictConvexOn ℝ (Ici 0) fun x => x ^ n", " StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))", " StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)", " 0 < ↑n", " StrictConvexOn ℝ univ fun x => x ^ n", " StrictMono (deriv fun a => a ^ n)", " StrictMono fun x => ↑n * x ^ (n - 1)", " 0 ≤ (if f x ≤...
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
75
77
theorem integral_normed : ∫ x, f.normed μ x ∂μ = 1 := by
simp_rw [ContDiffBump.normed, div_eq_mul_inv, mul_comm (f _), ← smul_eq_mul, integral_smul] exact inv_mul_cancel f.integral_pos.ne'
[ " 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)", " ∫ (x : E), f.normed μ x ∂μ = 1", " (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1" ]
[ " 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)" ]
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c...
Mathlib/Order/Interval/Set/Disjoint.lean
132
133
theorem iUnion_Ioo_left [NoMinOrder α] (b : α) : ⋃ a, Ioo a b = Iio b := by
simp only [← Ioi_inter_Iio, ← iUnion_inter, iUnion_Ioi, univ_inter]
[ " Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b", " ⋃ b, Icc a b = Ici a", " ⋃ b, Ioc a b = Ioi a", " ⋃ a, Icc a b = Iic b", " ⋃ a, Ico a b = Iio b", " ⋃ b, Ico a b = Ici a", " ⋃ b, Ioo a b = Ioi a", " ⋃ a, Ioc a b = Iic b", " ⋃ a, Ioo a b = Iio b" ]
[ " Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b", " ⋃ b, Icc a b = Ici a", " ⋃ b, Ioc a b = Ioi a", " ⋃ a, Icc a b = Iic b", " ⋃ a, Ico a b = Iio b", " ⋃ b, Ico a b = Ici a", " ⋃ b, Ioo a b = Ioi a", " ⋃ a, Ioc a b = Iic b" ]
import Mathlib.Data.Fintype.Basic import Mathlib.GroupTheory.Perm.Sign import Mathlib.Logic.Equiv.Defs #align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f" section Fintype variable {α β : Type*} [Fintype α] [DecidableEq β] (e : Equiv.Perm α) (f : α ↪ β) ...
Mathlib/Logic/Equiv/Fintype.lean
50
51
theorem Function.Embedding.toEquivRange_symm_apply_self (a : α) : f.toEquivRange.symm ⟨f a, Set.mem_range_self a⟩ = a := by
simp [Equiv.symm_apply_eq]
[ " f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝", " (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝", " f.toEquivRange.symm ⟨f a, ⋯⟩ = a" ]
[ " f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝", " (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝" ]
import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f" universe u v w x variable {α : ...
Mathlib/Algebra/Ring/Defs.lean
168
169
theorem mul_one_add [LeftDistribClass α] (a b : α) : a * (1 + b) = a + a * b := by
rw [mul_add, mul_one]
[ " (a + b + c) * d = a * d + b * d + c * d", " (a + 1) * b = a * b + b", " a * (b + 1) = a * b + a", " (1 + a) * b = b + a * b", " a * (1 + b) = a + a * b" ]
[ " (a + b + c) * d = a * d + b * d + c * d", " (a + 1) * b = a * b + b", " a * (b + 1) = a * b + a", " (1 + a) * b = b + a * b" ]
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (μ : Measure M) (ν : Measure M) : ...
Mathlib/MeasureTheory/Group/Convolution.lean
59
61
theorem mconv_zero (μ : Measure M) : (0 : Measure M) ∗ μ = (0 : Measure M) := by
unfold mconv simp
[ " dirac 1 ∗ μ = μ", " map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2", " μ ∗ dirac 1 = μ", " map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ", " map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ...
[ " dirac 1 ∗ μ = μ", " map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2", " μ ∗ dirac 1 = μ", " map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ", " map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ...
import Mathlib.LinearAlgebra.Matrix.DotProduct import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal #align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7" open Matrix namespace Matrix open FiniteDimensional variable {l m n ...
Mathlib/Data/Matrix/Rank.lean
77
81
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) : (A * B).rank ≤ B.rank := by
rw [rank, rank, mulVecLin_mul] exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _) (rank_lt_aleph0 _ _)
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≤ Fintype.card n", " (A * B).rank ≤ A.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)", " (A * B).rank ≤ B.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(Li...
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≤ Fintype.card n", " (A * B).rank ≤ A.rank", " finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)" ]
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {R : Type*} [Semi...
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
40
46
theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) : iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne' rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx] refine iteratedDerivWithin_congr h ?_ hx intro y hy exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x", " Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s", " Set.EqOn (iteratedDerivWithin 0 f s) (iteratedDerivWithin 0 g s) s", " Set.EqOn (iteratedDerivWithin (n + 1) f s) (iteratedDerivWithin (n +...
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x", " Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s", " Set.EqOn (iteratedDerivWithin 0 f s) (iteratedDerivWithin 0 g s) s", " Set.EqOn (iteratedDerivWithin (n + 1) f s) (iteratedDerivWithin (n +...
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
127
128
theorem coeff_expand_mul' {p : ℕ} (hp : 0 < p) (f : R[X]) (n : ℕ) : (expand R p f).coeff (p * n) = f.coeff n := by
rw [mul_comm, coeff_expand_mul hp]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
import Batteries.Data.Fin.Basic namespace Fin attribute [norm_cast] val_last protected theorem le_antisymm_iff {x y : Fin n} : x = y ↔ x ≤ y ∧ y ≤ x := Fin.ext_iff.trans Nat.le_antisymm_iff protected theorem le_antisymm {x y : Fin n} (h1 : x ≤ y) (h2 : y ≤ x) : x = y := Fin.le_antisymm_iff.2 ⟨h1, h2⟩ @[simp...
.lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
66
73
theorem foldl_loop (f : α → Fin (n+1) → α) (x) (h : m < n+1) : foldl.loop (n+1) f x m = foldl.loop n (fun x i => f x i.succ) (f x ⟨m, h⟩) m := by
if h' : m < n then rw [foldl_loop_lt _ _ h, foldl_loop_lt _ _ h', foldl_loop]; rfl else cases Nat.le_antisymm (Nat.le_of_lt_succ h) (Nat.not_lt.1 h') rw [foldl_loop_lt, foldl_loop_eq, foldl_loop_eq] termination_by n - m
[ " enum 0 = #[]", " (list n).length = n", " (list n).get i = cast ⋯ i", " (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩", " (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩", " list 0 = []", " list (n + 1) = 0 :: List.map succ (list n)", " ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ...
[ " enum 0 = #[]", " (list n).length = n", " (list n).get i = cast ⋯ i", " (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩", " (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩", " list 0 = []", " list (n + 1) = 0 :: List.map succ (list n)", " ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
248
251
theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d
[ " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x", " HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') univ x", " HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d) (c' *...
[ " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x", " HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') univ x", " HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d) (c' *...