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.LinearAlgebra.Ray import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.ray from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Real variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSp...
Mathlib/Analysis/NormedSpace/Ray.lean
38
46
theorem norm_sub (h : SameRay ℝ x y) : ‖x - y‖ = |‖x‖ - ‖y‖| := by
rcases h.exists_eq_smul with ⟨u, a, b, ha, hb, -, rfl, rfl⟩ wlog hab : b ≤ a generalizing a b with H · rw [SameRay.sameRay_comm] at h rw [norm_sub_rev, abs_sub_comm] exact H b a hb ha h (le_of_not_le hab) rw [← sub_nonneg] at hab rw [← sub_smul, norm_smul_of_nonneg hab, norm_smul_of_nonneg ha, norm_s...
[ " ‖x + y‖ = ‖x‖ + ‖y‖", " ‖a • u + b • u‖ = ‖a • u‖ + ‖b • u‖", " ‖x - y‖ = |‖x‖ - ‖y‖|", " ‖a • u - b • u‖ = |‖a • u‖ - ‖b • u‖|", " ‖b • u - a • u‖ = |‖b • u‖ - ‖a • u‖|" ]
[ " ‖x + y‖ = ‖x‖ + ‖y‖", " ‖a • u + b • u‖ = ‖a • u‖ + ‖b • u‖" ]
import Mathlib.Data.Finset.Image import Mathlib.Data.List.FinRange #align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf" assert_not_exists MonoidWithZero assert_not_exists MulAction open Function open Nat universe u v variable {α β γ : Type*} class Fi...
Mathlib/Data/Fintype/Basic.lean
99
101
theorem Nonempty.eq_univ [Subsingleton α] : s.Nonempty → s = univ := by
rintro ⟨x, hx⟩ exact eq_univ_of_forall fun y => by rwa [Subsingleton.elim y x]
[ " s = univ ↔ ∀ (x : α), x ∈ s", " ↑univ = Set.univ", " x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ", " ↑s = Set.univ ↔ s = univ", " s.Nonempty → s = univ", " s = univ", " y ∈ s" ]
[ " s = univ ↔ ∀ (x : α), x ∈ s", " ↑univ = Set.univ", " x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ", " ↑s = Set.univ ↔ s = univ" ]
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Algebra.Ring.Defs import Mathlib.Data.Subtype import Mathlib.Order.Notation #align_import algebra.ring.idempotents from "leanprover-community/mathlib"@"655994e298904d7e5bbd1e18c95defd7b543eb94" variable {M N S M₀ M₁ R G G₀...
Mathlib/Algebra/Ring/Idempotents.lean
93
97
theorem iff_eq_zero_or_one {p : G₀} : IsIdempotentElem p ↔ p = 0 ∨ p = 1 := by
refine Iff.intro (fun h => or_iff_not_imp_left.mpr fun hp => ?_) fun h => h.elim (fun hp => hp.symm ▸ zero) fun hp => hp.symm ▸ one exact mul_left_cancel₀ hp (h.trans (mul_one p).symm)
[ " IsIdempotentElem (p * q)", " IsIdempotentElem (1 - p)", " p ^ n.succ * p ^ n.succ = p ^ n.succ", "M : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : Mul...
[ " IsIdempotentElem (p * q)", " IsIdempotentElem (1 - p)", " p ^ n.succ * p ^ n.succ = p ^ n.succ", "M : Type u_1\nN : Type u_2\nS : Type u_3\nM₀ : Type u_4\nM₁ : Type u_5\nR : Type u_6\nG : Type u_7\nG₀ : Type u_8\ninst✝⁷ : Mul M\ninst✝⁶ : Monoid N\ninst✝⁵ : Semigroup S\ninst✝⁴ : MulZeroClass M₀\ninst✝³ : Mul...
import Mathlib.Analysis.Convex.Cone.Basic import Mathlib.Analysis.InnerProductSpace.Projection #align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open Set LinearMap open scoped Classical open Pointwise variable {𝕜 E F G : Type*} section Dua...
Mathlib/Analysis/Convex/Cone/InnerDual.lean
105
107
theorem innerDualCone_insert (x : H) (s : Set H) : (insert x s).innerDualCone = Set.innerDualCone {x} ⊓ s.innerDualCone := by
rw [insert_eq, innerDualCone_union]
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ", " (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone" ]
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ" ]
import Mathlib.Analysis.RCLike.Basic import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic import Mathlib.Analysis.NormedSpace.Pointwise #align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b" open Metric variable {𝕜 : Type*} [RCLike 𝕜] {E :...
Mathlib/Analysis/NormedSpace/RCLike.lean
49
52
theorem norm_smul_inv_norm' {r : ℝ} (r_nonneg : 0 ≤ r) {x : E} (hx : x ≠ 0) : ‖((r : 𝕜) * (‖x‖ : 𝕜)⁻¹) • x‖ = r := by
have : ‖x‖ ≠ 0 := by simp [hx] field_simp [norm_smul, r_nonneg, rclike_simps]
[ " ‖↑‖z‖‖ = ‖z‖", " ‖(↑‖x‖)⁻¹ • x‖ = 1", " ‖x‖ ≠ 0", " ‖(↑r * (↑‖x‖)⁻¹) • x‖ = r" ]
[ " ‖↑‖z‖‖ = ‖z‖", " ‖(↑‖x‖)⁻¹ • x‖ = 1", " ‖x‖ ≠ 0" ]
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.CategoryTheory.Monoidal.OfChosenFiniteProducts.Basic #align_import category_theory.monoidal.of_chosen_finite_products.symmetric from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4" universe v u namespace CategoryTheory ...
Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Symmetric.lean
57
74
theorem hexagon_reverse (X Y Z : C) : (BinaryFan.associatorOfLimitCone ℬ X Y Z).inv ≫ (Limits.BinaryFan.braiding (ℬ (tensorObj ℬ X Y) Z).isLimit (ℬ Z (tensorObj ℬ X Y)).isLimit).hom ≫ (BinaryFan.associatorOfLimitCone ℬ Z X Y).inv = tensorHom ℬ (𝟙 X) (Limits.BinaryFan.braiding ...
dsimp [tensorHom, Limits.BinaryFan.braiding] apply (ℬ _ _).isLimit.hom_ext; rintro ⟨⟨⟩⟩ · apply (ℬ _ _).isLimit.hom_ext rintro ⟨⟨⟩⟩ <;> · dsimp [BinaryFan.associatorOfLimitCone, BinaryFan.associator, Limits.IsLimit.conePointUniqueUpToIso] simp · dsimp [BinaryFan.associatorOfLimitCon...
[ " tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f", " (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique...
[ " tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f", " (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique...
import Mathlib.Control.Traversable.Equiv import Mathlib.Control.Traversable.Instances import Batteries.Data.LazyList import Mathlib.Lean.Thunk #align_import data.lazy_list.basic from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" universe u namespace LazyList open Function def listE...
Mathlib/Data/LazyList/Basic.lean
150
155
theorem append_assoc {α} (xs ys zs : LazyList α) : (xs.append ys).append zs = xs.append (ys.append zs) := by
induction' xs using LazyList.rec with _ _ _ _ ih · simp only [append, Thunk.get] · simpa only [append, cons.injEq, true_and] · ext; apply ih
[ " LeftInverse toList ofList", " (ofList xs).toList = xs", " (ofList []).toList = []", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " Function.RightInverse toList ofList", " ofList xs.toList = xs", " ofList nil.toList = nil", " ofList (cons h✝ t✝).toList = cons h✝ t✝", " { fn := fun x => t✝....
[ " LeftInverse toList ofList", " (ofList xs).toList = xs", " (ofList []).toList = []", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " Function.RightInverse toList ofList", " ofList xs.toList = xs", " ofList nil.toList = nil", " ofList (cons h✝ t✝).toList = cons h✝ t✝", " { fn := fun x => t✝....
import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Data.Complex.Basic import Mathlib.Data.Real.Archimedean #align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Zsqrtd Complex open sc...
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
93
93
theorem to_real_im (x : ℤ[i]) : ((x.im : ℤ) : ℝ) = (x : ℂ).im := by
simp [toComplex_def]
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re", " ↑x.im = (toComplex x).im" ]
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re" ]
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.LatticeIntervals import Mathlib.Order.Interval.Set.OrdConnected #align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open scoped Classical open Set variable {ι : ...
Mathlib/Order/CompleteLatticeIntervals.lean
265
265
theorem coe_biSup : (↑(⨆ i, ⨆ (_ : p i), f i) : α) = ⨆ i, ⨆ (_ : p i), (f i : α) := by
simp
[ " sSup (Subtype.val '' S) ∈ Iic a", " a ⊓ sInf (Subtype.val '' S) ∈ Iic a", " ∀ (x : ↑(Iic a)), x ≤ ⊤", " ∀ (x : ↑(Iic a)), ⊥ ≤ x", " ↑(⨆ i, f i) = ⨆ i, ↑(f i)", " sSup (Subtype.val '' range fun i => f i) = ⨆ i, ↑(f i)", " (Subtype.val '' range fun i => f i) = range fun i => ↑(f i)", " (x✝ ∈ Subtype.v...
[ " sSup (Subtype.val '' S) ∈ Iic a", " a ⊓ sInf (Subtype.val '' S) ∈ Iic a", " ∀ (x : ↑(Iic a)), x ≤ ⊤", " ∀ (x : ↑(Iic a)), ⊥ ≤ x", " ↑(⨆ i, f i) = ⨆ i, ↑(f i)", " sSup (Subtype.val '' range fun i => f i) = ⨆ i, ↑(f i)", " (Subtype.val '' range fun i => f i) = range fun i => ↑(f i)", " (x✝ ∈ Subtype.v...
import Mathlib.Algebra.Associated import Mathlib.Algebra.Ring.Regular import Mathlib.Tactic.Common #align_import algebra.gcd_monoid.basic from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11" variable {α : Type*} -- Porting note: mathlib3 had a `@[protect_proj]` here, but adding `protect...
Mathlib/Algebra/GCDMonoid/Basic.lean
148
148
theorem normalize_coe_units (u : αˣ) : normalize (u : α) = 1 := by
simp
[ " (fun x => x * ↑(normUnit x)) 0 = 0", " 0 * ↑1 = 0", " { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun 1 = 1", " 1 * ↑(normUnit 1) = 1", " ↑1 = 1", " { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun (x * y) =\n { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun x ...
[ " (fun x => x * ↑(normUnit x)) 0 = 0", " 0 * ↑1 = 0", " { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun 1 = 1", " 1 * ↑(normUnit 1) = 1", " ↑1 = 1", " { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun (x * y) =\n { toFun := fun x => x * ↑(normUnit x), map_zero' := ⋯ }.toFun x ...
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
343
346
theorem factorThruImageSubobject_comp_self {W : C} (k : W ⟶ X) (h) : (imageSubobject f).factorThru (k ≫ f) h = k ≫ factorThruImageSubobject f := by
ext simp
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow", " (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f", " Epi (factorThruImageSubobject f)", " Epi (factorThruImage f ≫ (imageSubobjectIso f).inv)", " factorThruImageSubobject f ≫ (imageSubobject f).arrow = f", " factorThruI...
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow", " (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f", " Epi (factorThruImageSubobject f)", " Epi (factorThruImage f ≫ (imageSubobjectIso f).inv)", " factorThruImageSubobject f ≫ (imageSubobject f).arrow = f", " factorThruI...
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.Finsupp.Order #align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Finset variable {α β ι : Type*} namespace Finsupp def toMultiset : (α →₀ ℕ) →+ Multiset α where toFun f := Finsupp.sum f...
Mathlib/Data/Finsupp/Multiset.lean
83
90
theorem prod_toMultiset [CommMonoid α] (f : α →₀ ℕ) : f.toMultiset.prod = f.prod fun a n => a ^ n := by
refine f.induction ?_ ?_ · rw [toMultiset_zero, Multiset.prod_zero, Finsupp.prod_zero_index] · intro a n f _ _ ih rw [toMultiset_add, Multiset.prod_add, ih, toMultiset_single, Multiset.prod_nsmul, Finsupp.prod_add_index' pow_zero pow_add, Finsupp.prod_single_index, Multiset.prod_singleton] exact po...
[ " toMultiset (single a n) = n • {a}", " 0 • {a} = 0", " toMultiset (∑ i ∈ s, single i n) = n • s.val", " Multiset.card (toMultiset f) = f.sum fun x => id", " Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)", " Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)", " ∀ (a : α) (b : ℕ) (f...
[ " toMultiset (single a n) = n • {a}", " 0 • {a} = 0", " toMultiset (∑ i ∈ s, single i n) = n • s.val", " Multiset.card (toMultiset f) = f.sum fun x => id", " Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)", " Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)", " ∀ (a : α) (b : ℕ) (f...
import Mathlib.Data.List.Basic #align_import data.list.lattice from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" open Nat namespace List variable {α : Type*} {l l₁ l₂ : List α} {p : α → Prop} {a : α} variable [DecidableEq α] section BagInter @[simp]
Mathlib/Data/List/Lattice.lean
195
195
theorem nil_bagInter (l : List α) : [].bagInter l = [] := by
cases l <;> rfl
[ " [].bagInter l = []", " [].bagInter [] = []", " [].bagInter (head✝ :: tail✝) = []" ]
[]
import Mathlib.Analysis.BoxIntegral.Basic import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.Tactic.Generalize #align_import analysis.box_integral.integrability from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open scoped Classical NNReal ENNReal Topology universe u v ...
Mathlib/Analysis/BoxIntegral/Integrability.lean
39
99
theorem hasIntegralIndicatorConst (l : IntegrationParams) (hl : l.bRiemann = false) {s : Set (ι → ℝ)} (hs : MeasurableSet s) (I : Box ι) (y : E) (μ : Measure (ι → ℝ)) [IsLocallyFiniteMeasure μ] : HasIntegral.{u, v, v} I l (s.indicator fun _ => y) μ.toBoxAdditive.toSMul ((μ (s ∩ I)).toReal • y) := by
refine HasIntegral.of_mul ‖y‖ fun ε ε0 => ?_ lift ε to ℝ≥0 using ε0.le; rw [NNReal.coe_pos] at ε0 /- First we choose a closed set `F ⊆ s ∩ I.Icc` and an open set `U ⊇ s` such that both `(s ∩ I.Icc) \ F` and `U \ s` have measure less than `ε`. -/ have A : μ (s ∩ Box.Icc I) ≠ ∞ := ((measure_mono Set.inte...
[ " HasIntegral I l (s.indicator fun x => y) μ.toBoxAdditive.toSMul ((μ (s ∩ ↑I)).toReal • y)", " ∃ r,\n (∀ (c : ℝ≥0), l.RCond (r c)) ∧\n ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n l.MemBaseSet I c (r c) π →\n π.IsPartition →\n dist (integralSum (s.indicator fun x => y) μ.toBoxAddi...
[]
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Instances.Irrational #align_import number_theory.liouville.liouville_with from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open Filter Metric Real Set open sc...
Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
142
143
theorem rat_mul_iff (hr : r ≠ 0) : LiouvilleWith p (r * x) ↔ LiouvilleWith p x := by
rw [mul_comm, mul_rat_iff hr]
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
import Mathlib.RingTheory.Derivation.Basic import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.derivation.to_square_zero from "leanprover-community/mathlib"@"b608348ffaeb7f557f2fd46876037abafd326ff3" section ToSquareZero universe u v w variable {R : Type u} {A : Type v} {B : Type w} [Co...
Mathlib/RingTheory/Derivation/ToSquareZero.lean
114
116
theorem liftOfDerivationToSquareZero_mk_apply' (d : Derivation R A I) (x : A) : (Ideal.Quotient.mk I) (d x) + (algebraMap A (B ⧸ I)) x = algebraMap A (B ⧸ I) x := by
simp only [Ideal.Quotient.eq_zero_iff_mem.mpr (d x).prop, zero_add]
[ " ∀ (c : A), (f₁.toLinearMap - f₂.toLinearMap) c ∈ Submodule.restrictScalars R I", " (f₁.toLinearMap - f₂.toLinearMap) x ∈ Submodule.restrictScalars R I", " f₁ x - f₂ x ∈ I", " ((Ideal.Quotient.mkₐ R I).comp f₂) x = (Ideal.Quotient.mkₐ R I) (f₂ x)", " Derivation R A ↥I", " (Ideal.Quotient.mkₐ R I).comp f ...
[ " ∀ (c : A), (f₁.toLinearMap - f₂.toLinearMap) c ∈ Submodule.restrictScalars R I", " (f₁.toLinearMap - f₂.toLinearMap) x ∈ Submodule.restrictScalars R I", " f₁ x - f₂ x ∈ I", " ((Ideal.Quotient.mkₐ R I).comp f₂) x = (Ideal.Quotient.mkₐ R I) (f₂ x)", " Derivation R A ↥I", " (Ideal.Quotient.mkₐ R I).comp f ...
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.RelIso.Basic #align_import order.ord_continuous from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w x variable {α : Type u} {β : Type v} {γ : Type w} {ι : Sort x} open Function OrderDual Set ...
Mathlib/Order/OrdContinuous.lean
151
154
theorem map_ciSup (hf : LeftOrdContinuous f) {g : ι → α} (hg : BddAbove (range g)) : f (⨆ i, g i) = ⨆ i, f (g i) := by
simp only [iSup, hf.map_csSup (range_nonempty _) hg, ← range_comp] rfl
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))" ]
[]
import Mathlib.Data.Fin.Basic import Mathlib.Order.Chain import Mathlib.Order.Cover import Mathlib.Order.Fin open Set variable {α : Type*} [PartialOrder α] [BoundedOrder α] {n : ℕ} {f : Fin (n + 1) → α}
Mathlib/Data/Fin/FlagRange.lean
32
44
theorem IsMaxChain.range_fin_of_covBy (h0 : f 0 = ⊥) (hlast : f (.last n) = ⊤) (hcovBy : ∀ k : Fin n, f k.castSucc ⩿ f k.succ) : IsMaxChain (· ≤ ·) (range f) := by
have hmono : Monotone f := Fin.monotone_iff_le_succ.2 fun k ↦ (hcovBy k).1 refine ⟨hmono.isChain_range, fun t htc hbt ↦ hbt.antisymm fun x hx ↦ ?_⟩ rw [mem_range]; by_contra! h suffices ∀ k, f k < x by simpa [hlast] using this (.last _) intro k induction k using Fin.induction with | zero => simpa [h0, bo...
[ " IsMaxChain (fun x x_1 => x ≤ x_1) (range f)", " x ∈ range f", " ∃ y, f y = x", " False", " ∀ (k : Fin (n + 1)), f k < x", " f k < x", " f 0 < x", " f k.succ < x" ]
[]
import Batteries.Data.RBMap.Alter import Batteries.Data.List.Lemmas namespace Batteries namespace RBNode open RBColor attribute [simp] fold foldl foldr Any forM foldlM Ordered @[simp] theorem min?_reverse (t : RBNode α) : t.reverse.min? = t.max? := by unfold RBNode.max?; split <;> simp [RBNode.min?] unfold RB...
.lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean
42
43
theorem mem_congr [@TransCmp α cmp] {t : RBNode α} (h : cmp x y = .eq) : Mem cmp x t ↔ Mem cmp y t := by
simp [Mem, TransCmp.cmp_congr_left' h]
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Finsupp #align_import algebra.big_operators.associated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {α β γ δ : Type*} -- the same local notation used in `Algebra.Associated` local infixl:50 " ~ᵤ " => ...
Mathlib/Algebra/BigOperators/Associated.lean
82
100
theorem Multiset.prod_primes_dvd [CancelCommMonoidWithZero α] [∀ a : α, DecidablePred (Associated a)] {s : Multiset α} (n : α) (h : ∀ a ∈ s, Prime a) (div : ∀ a ∈ s, a ∣ n) (uniq : ∀ a, s.countP (Associated a) ≤ 1) : s.prod ∣ n := by
induction' s using Multiset.induction_on with a s induct n primes divs generalizing n · simp only [Multiset.prod_zero, one_dvd] · rw [Multiset.prod_cons] obtain ⟨k, rfl⟩ : a ∣ n := div a (Multiset.mem_cons_self a s) apply mul_dvd_mul_left a refine induct _ (fun a ha => h a (Multiset.mem_cons_of_mem h...
[ " ∏ i ∈ s, f i ~ᵤ ∏ i ∈ s, g i", " ∏ i ∈ ∅, f i ~ᵤ ∏ i ∈ ∅, g i", " 1 ~ᵤ 1", " ∏ i ∈ insert j s, f i ~ᵤ ∏ i ∈ insert j s, g i", " f j * ∏ x ∈ s, f x ~ᵤ g j * ∏ x ∈ s, g x", " (∀ r ∈ 0, Prime r) → p ∣ Multiset.prod 0 → ∃ q ∈ 0, p ~ᵤ q", " ∃ q ∈ a ::ₘ s, p ~ᵤ q", " s.prod ∣ n", " prod 0 ∣ n", " (a :...
[ " ∏ i ∈ s, f i ~ᵤ ∏ i ∈ s, g i", " ∏ i ∈ ∅, f i ~ᵤ ∏ i ∈ ∅, g i", " 1 ~ᵤ 1", " ∏ i ∈ insert j s, f i ~ᵤ ∏ i ∈ insert j s, g i", " f j * ∏ x ∈ s, f x ~ᵤ g j * ∏ x ∈ s, g x", " (∀ r ∈ 0, Prime r) → p ∣ Multiset.prod 0 → ∃ q ∈ 0, p ~ᵤ q", " ∃ q ∈ a ::ₘ s, p ~ᵤ q" ]
import Mathlib.Analysis.Calculus.ContDiff.Bounds import Mathlib.Analysis.Calculus.IteratedDeriv.Defs import Mathlib.Analysis.Calculus.LineDeriv.Basic import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.Normed.Group.ZeroAtInfty import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Ana...
Mathlib/Analysis/Distribution/SchwartzSpace.lean
157
169
theorem isBigO_cocompact_rpow [ProperSpace E] (s : ℝ) : f =O[cocompact E] fun x => ‖x‖ ^ s := by
let k := ⌈-s⌉₊ have hk : -(k : ℝ) ≤ s := neg_le.mp (Nat.le_ceil (-s)) refine (isBigO_cocompact_zpow_neg_nat f k).trans ?_ suffices (fun x : ℝ => x ^ (-k : ℤ)) =O[atTop] fun x : ℝ => x ^ s from this.comp_tendsto tendsto_norm_cocompact_atTop simp_rw [Asymptotics.IsBigO, Asymptotics.IsBigOWith] refine ⟨1,...
[ " f = g", " { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g", " { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }", " ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C", " 0 < max C 1", " ⇑f =O[...
[ " f = g", " { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g", " { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }", " ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C", " 0 < max C 1", " ⇑f =O[...
import Mathlib.Data.Nat.Choose.Dvd import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Norm import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand #align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf1682e59106d6c942434a32" universe u ...
Mathlib/RingTheory/Polynomial/Eisenstein/IsIntegral.lean
44
73
theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] : ((cyclotomic p ℤ).comp (X + 1)).IsEisensteinAt 𝓟 := by
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_ (Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (mod_cast hp.out.ne_zero)).2 <| Nat.prime_iff_prime_int.1 hp.out) (fun {i hi} => ?_) ?_ · rw [show (X + 1 : ℤ[X]) = X + C 1 by simp] refine (cyclotomic.monic p ℤ).comp (monic_X_add_C 1) fun h => ...
[ " ((cyclotomic p ℤ).comp (X + 1)).IsEisensteinAt (Submodule.span ℤ {↑p})", " ((cyclotomic p ℤ).comp (X + 1)).Monic", " X + 1 = X + C 1", " ((cyclotomic p ℤ).comp (X + C 1)).Monic", " False", " ((cyclotomic p ℤ).comp (X + 1)).coeff i ∈ Submodule.span ℤ {↑p}", " ∑ x ∈ range p, (lcoeff ℤ i) (↑(p.choose (x ...
[]
import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.pow.complex from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open scoped Classical open Real Topology Filter ComplexConjugate Finset Set namespace Complex noncomputable def cpow (x y : ℂ) ...
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
96
99
theorem cpow_mul {x y : ℂ} (z : ℂ) (h₁ : -π < (log x * y).im) (h₂ : (log x * y).im ≤ π) : x ^ (y * z) = (x ^ y) ^ z := by
simp only [cpow_def] split_ifs <;> simp_all [exp_ne_zero, log_exp h₁ h₂, mul_assoc]
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Integral.Pi import Mathlib.Analysis.Fourier.FourierTransform open Real Set MeasureTheory Filter Asymptotics intervalIntegral open scoped Real Topology FourierTransform Re...
Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
59
66
theorem norm_cexp_neg_mul_sq_add_mul_I' (hb : b.re ≠ 0) (c T : ℝ) : ‖cexp (-b * (T + c * I) ^ 2)‖ = exp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re))) := by
have : b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2 = b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re) := by field_simp; ring rw [norm_cexp_neg_mul_sq_add_mul_I, this]
[ " ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))", " rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - 2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))", " rexp\n (-(b.re * ((T + (c * 0 - 0 *...
[ " ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))", " rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - 2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))", " rexp\n (-(b.re * ((T + (c * 0 - 0 *...
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
302
303
theorem exists_sq_eq_neg_one_iff : IsSquare (-1 : ZMod p) ↔ p % 4 ≠ 3 := by
rw [FiniteField.isSquare_neg_one_iff, card p]
[ " legendreSym p (-1) = χ₄ ↑p", " IsSquare (-1) ↔ p % 4 ≠ 3" ]
[ " legendreSym p (-1) = χ₄ ↑p" ]
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Even import Mathlib.LinearAlgebra.QuadraticForm.Prod import Mathlib.Tactic.LiftLets #align_import linear_algebra.clifford_algebra.even_equiv from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36d...
Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean
69
71
theorem ι_eq_v_add_smul_e0 (m : M) (r : R) : ι (Q' Q) (m, r) = v Q m + r • e0 Q := by
rw [e0, v, LinearMap.comp_apply, LinearMap.inl_apply, ← LinearMap.map_smul, Prod.smul_mk, smul_zero, smul_eq_mul, mul_one, ← LinearMap.map_add, Prod.mk_add_mk, zero_add, add_zero]
[ " (ι (Q' Q)) (m, r) = (v Q) m + r • e0 Q" ]
[]
import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" noncomputable section open scoped Topology ENNReal MeasureTheory ProbabilityTheory op...
Mathlib/Probability/Kernel/IntegralCompProd.lean
64
68
theorem integrable_kernel_prod_mk_left (a : α) {s : Set (β × γ)} (hs : MeasurableSet s) (h2s : (κ ⊗ₖ η) a s ≠ ∞) : Integrable (fun b => (η (a, b) (Prod.mk b ⁻¹' s)).toReal) (κ a) := by
constructor · exact (measurable_kernel_prod_mk_left' hs a).ennreal_toReal.aestronglyMeasurable · exact hasFiniteIntegral_prod_mk_left a h2s
[ " HasFiniteIntegral (fun b => ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal) (κ a)", " ∫⁻ (a_1 : β), ENNReal.ofReal ((η (a, a_1)) (Prod.mk a_1 ⁻¹' s)).toReal ∂κ a < ⊤", " ∫⁻ (b : β), ENNReal.ofReal ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal ∂κ a ≤ ∫⁻ (b : β), (η (a, b)) (Prod.mk b ⁻¹' t) ∂κ a", " ∀ᵐ (a_1 : β) ∂κ a, ENNRea...
[ " HasFiniteIntegral (fun b => ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal) (κ a)", " ∫⁻ (a_1 : β), ENNReal.ofReal ((η (a, a_1)) (Prod.mk a_1 ⁻¹' s)).toReal ∂κ a < ⊤", " ∫⁻ (b : β), ENNReal.ofReal ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal ∂κ a ≤ ∫⁻ (b : β), (η (a, b)) (Prod.mk b ⁻¹' t) ∂κ a", " ∀ᵐ (a_1 : β) ∂κ a, ENNRea...
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
412
415
theorem imageSubobjectCompIso_hom_arrow (f : X ⟶ Y) [HasImage f] {Y' : C} (h : Y ⟶ Y') [IsIso h] : (imageSubobjectCompIso f h).hom ≫ (imageSubobject f).arrow = (imageSubobject (f ≫ h)).arrow ≫ inv h := by
simp [imageSubobjectCompIso]
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow", " (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f", " Epi (factorThruImageSubobject f)", " Epi (factorThruImage f ≫ (imageSubobjectIso f).inv)", " factorThruImageSubobject f ≫ (imageSubobject f).arrow = f", " factorThruI...
[ " (imageSubobjectIso f).hom ≫ image.ι f = (imageSubobject f).arrow", " (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f", " Epi (factorThruImageSubobject f)", " Epi (factorThruImage f ≫ (imageSubobjectIso f).inv)", " factorThruImageSubobject f ≫ (imageSubobject f).arrow = f", " factorThruI...
import Mathlib.Algebra.MvPolynomial.Funext import Mathlib.Algebra.Ring.ULift import Mathlib.RingTheory.WittVector.Basic #align_import ring_theory.witt_vector.is_poly from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" namespace WittVector universe u variable {p : ℕ} {R S : Type u} {σ id...
Mathlib/RingTheory/WittVector/IsPoly.lean
172
195
theorem ext [Fact p.Prime] {f g} (hf : IsPoly p f) (hg : IsPoly p g) (h : ∀ (R : Type u) [_Rcr : CommRing R] (x : 𝕎 R) (n : ℕ), ghostComponent n (f x) = ghostComponent n (g x)) : ∀ (R : Type u) [_Rcr : CommRing R] (x : 𝕎 R), f x = g x := by
obtain ⟨φ, hf⟩ := hf obtain ⟨ψ, hg⟩ := hg intros ext n rw [hf, hg, poly_eq_of_wittPolynomial_bind_eq p φ ψ] intro k apply MvPolynomial.funext intro x simp only [hom_bind₁] specialize h (ULift ℤ) (mk p fun i => ⟨x i⟩) k simp only [ghostComponent_apply, aeval_eq_eval₂Hom] at h apply (ULift.ringEq...
[ " f = g", " f n = g n", " (MvPolynomial.map (Int.castRingHom ℚ)) (f n) = (MvPolynomial.map (Int.castRingHom ℚ)) (g n)", " ∀ ⦃R : Type ?u.7522⦄ [inst : CommRing R] (x : 𝕎 R), (id x).coeff = fun n => (aeval x.coeff) (X n)", " (id x✝).coeff = fun n => (aeval x✝.coeff) (X n)", " ∀ (R : Type u) [_Rcr : CommRi...
[ " f = g", " f n = g n", " (MvPolynomial.map (Int.castRingHom ℚ)) (f n) = (MvPolynomial.map (Int.castRingHom ℚ)) (g n)", " ∀ ⦃R : Type ?u.7522⦄ [inst : CommRing R] (x : 𝕎 R), (id x).coeff = fun n => (aeval x.coeff) (X n)", " (id x✝).coeff = fun n => (aeval x✝.coeff) (X n)" ]
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.LinearAlgebra.SesquilinearForm #align_import analysis.inner_product_space.orthogonal from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" variable {𝕜 E F : Type*} [RCLike 𝕜] variable [NormedAddCommGroup E] [InnerProductSpace...
Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
86
90
theorem sub_mem_orthogonal_of_inner_left {x y : E} (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x - y ∈ Kᗮ := by
rw [mem_orthogonal'] intro u hu rw [inner_sub_left, sub_eq_zero] exact h ⟨u, hu⟩
[ " ⟪u, a✝ + b✝⟫_𝕜 = 0", " ⟪u, c • x⟫_𝕜 = 0", " v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0", " ⟪v, u⟫_𝕜 = 0", " ⟪u, v⟫_𝕜 = 0", " v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0", " ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ", " ⟪w, v⟫_𝕜 = 0", " ⟪c • u, v⟫_𝕜 = 0", " v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0", " x - y ∈ Kᗮ", " ∀ ...
[ " ⟪u, a✝ + b✝⟫_𝕜 = 0", " ⟪u, c • x⟫_𝕜 = 0", " v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0", " ⟪v, u⟫_𝕜 = 0", " ⟪u, v⟫_𝕜 = 0", " v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0", " ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ", " ⟪w, v⟫_𝕜 = 0", " ⟪c • u, v⟫_𝕜 = 0", " v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Deprecated.Subring #align_import deprecated.subfield from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" variable {F : Type*} [Field F] (S : Set F) structure IsSubfield extends IsSubring S : Prop where inv_mem : ∀ {x : F}, x ∈ S → x⁻...
Mathlib/Deprecated/Subfield.lean
75
77
theorem Range.isSubfield {K : Type*} [Field K] (f : F →+* K) : IsSubfield (Set.range f) := by
rw [← Set.image_univ] apply Image.isSubfield _ Univ.isSubfield
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s", " IsSubfield (Set.range ⇑f)", " IsSubfield (⇑f '' Set.univ)" ]
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s" ]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Data.ENat.Basic #align_import data.polynomial.degree.trailing_degree from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" noncomputable section open Function Polynomial Finsupp Finset open scoped Polynomial namespace ...
Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
141
145
theorem natTrailingDegree_le_trailingDegree : ↑(natTrailingDegree p) ≤ trailingDegree p := by
by_cases hp : p = 0; · rw [hp, trailingDegree_zero] exact le_top rw [trailingDegree_eq_natTrailingDegree hp]
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n", " p.trailingDegree = ↑n → p.natTrailingDegree = n", " p.natTrailingDegree = n", " p ≠ 0", " ...
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n", " p.trailingDegree = ↑n → p.natTrailingDegree = n", " p.natTrailingDegree = n", " p ≠ 0", " ...
import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set #align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set namespace OrderIso section Preorder variable {α β : Type*} [Preorder α] [Preorder β] @[simp] theorem preimage_I...
Mathlib/Order/Interval/Set/OrderIso.lean
68
69
theorem image_Iic (e : α ≃o β) (a : α) : e '' Iic a = Iic (e a) := by
rw [e.image_eq_preimage, e.symm.preimage_Iic, e.symm_symm]
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)", " ⇑e ⁻¹' Ici b = Ici (e.symm b)", " x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)", " ⇑e ⁻¹' Iio b = Iio (e.symm b)", " x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)", " ⇑e ⁻¹' Ioi b = Ioi (e.symm b)", " x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"...
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)", " ⇑e ⁻¹' Ici b = Ici (e.symm b)", " x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)", " ⇑e ⁻¹' Iio b = Iio (e.symm b)", " x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)", " ⇑e ⁻¹' Ioi b = Ioi (e.symm b)", " x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"...
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
101
104
theorem HasDerivWithinAt.scomp_of_eq (hg : HasDerivWithinAt g₁ g₁' t' y) (hh : HasDerivWithinAt h h' s x) (hst : MapsTo h s t') (hy : y = h x) : HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x := by
rw [hy] at hg; exact hg.scomp x hh hst
[ " HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L", " HasDerivAt (g₁ ∘ h) (h' • g₁') x", " HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x" ]
[ " HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L", " HasDerivAt (g₁ ∘ h) (h' • g₁') x" ]
import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α} namespace Finset def nonMemberSubfamily (a : α) (𝒜 : ...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
91
96
theorem card_memberSubfamily_add_card_nonMemberSubfamily (a : α) (𝒜 : Finset (Finset α)) : (𝒜.memberSubfamily a).card + (𝒜.nonMemberSubfamily a).card = 𝒜.card := by
rw [memberSubfamily, nonMemberSubfamily, card_image_of_injOn] · conv_rhs => rw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))] · apply (erase_injOn' _).mono simp
[ " s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s", " s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " a ∈ insert a s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s", " insert a (s.erase a) ∈ 𝒜...
[ " s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s", " s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s", " a ∈ insert a s", " (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s", " insert a (s.erase a) ∈ 𝒜...
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.floor from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set section FloorRing variable {α R : Type*} [MeasurableSpace α] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R] ...
Mathlib/MeasureTheory/Function/Floor.lean
47
50
theorem measurable_fract [BorelSpace R] : Measurable (Int.fract : R → R) := by
intro s hs rw [Int.preimage_fract] exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
[ " MeasurableSet (floor ⁻¹' {⌊x⌋})", " MeasurableSet (ceil ⁻¹' {⌈x⌉})", " Measurable Int.fract", " MeasurableSet (Int.fract ⁻¹' s)", " MeasurableSet (⋃ m, (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1))" ]
[ " MeasurableSet (floor ⁻¹' {⌊x⌋})", " MeasurableSet (ceil ⁻¹' {⌈x⌉})" ]
import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Closure #align_import analysis.convex.hull from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set open Pointwise variable {𝕜 E F : Type*} section convexHull section OrderedSemiring variable [OrderedSemiring 𝕜] secti...
Mathlib/Analysis/Convex/Hull.lean
62
63
theorem mem_convexHull_iff : x ∈ convexHull 𝕜 s ↔ ∀ t, s ⊆ t → Convex 𝕜 t → x ∈ t := by
simp_rw [convexHull_eq_iInter, mem_iInter]
[ " (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t", " x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t" ]
[ " (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t" ]
import Mathlib.RingTheory.RootsOfUnity.Basic import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.Algebra.GCDMonoid.IntegrallyClosed import Mathlib.FieldTheory.Finite.Basic #align_import ring_theory.roots_of_unity.minpoly from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f" ...
Mathlib/RingTheory/RootsOfUnity/Minpoly.lean
95
104
theorem minpoly_dvd_pow_mod {p : ℕ} [hprime : Fact p.Prime] (hdiv : ¬p ∣ n) : map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣ map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) ^ p := by
set Q := minpoly ℤ (μ ^ p) have hfrob : map (Int.castRingHom (ZMod p)) Q ^ p = map (Int.castRingHom (ZMod p)) (expand ℤ p Q) := by rw [← ZMod.expand_card, map_expand] rw [hfrob] apply RingHom.map_dvd (mapRingHom (Int.castRingHom (ZMod p))) exact minpoly_dvd_expand h hdiv
[ " IsIntegral ℤ μ", " (X ^ n - 1).Monic ∧ eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0", " (X ^ n - 1).Monic", " eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0", " minpoly ℤ μ ∣ X ^ n - 1", " minpoly ℤ μ ∣ X ^ 0 - 1", " (Polynomial.aeval μ) (X ^ n - 1) = 0", " (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ)).Separ...
[ " IsIntegral ℤ μ", " (X ^ n - 1).Monic ∧ eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0", " (X ^ n - 1).Monic", " eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0", " minpoly ℤ μ ∣ X ^ n - 1", " minpoly ℤ μ ∣ X ^ 0 - 1", " (Polynomial.aeval μ) (X ^ n - 1) = 0", " (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ)).Separ...
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
45
45
theorem gcd_mul_right_add_right (m n k : ℕ) : gcd m (k * m + 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 (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n" ]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Data.Complex.Exponential import Mathlib.Data.Complex.Module import Mathlib.RingTheory.Polynomial.Chebyshev #align_import analysis.special_functions.trigonometric.chebyshev from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" set_...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean
73
86
theorem T_complex_cos (n : ℤ) : (T ℂ n).eval (cos θ) = cos (n * θ) := by
induction n using Polynomial.Chebyshev.induct with | zero => simp | one => simp | add_two n ih1 ih2 => simp only [T_add_two, eval_sub, eval_mul, eval_X, eval_ofNat, ih1, ih2, sub_eq_iff_eq_add, cos_add_cos] push_cast ring_nf | neg_add_one n ih1 ih2 => simp only [T_sub_one, eval_sub, eva...
[ " (aeval x) (T R n) = eval x (T A n)", " (aeval x) (U R n) = eval x (U A n)", " (algebraMap R A) (eval x (T R n)) = eval ((algebraMap R A) x) (T A n)", " (algebraMap R A) (eval x (U R n)) = eval ((algebraMap R A) x) (U A n)", " eval θ.cos (T ℂ n) = (↑n * θ).cos", " eval θ.cos (T ℂ 0) = (↑0 * θ).cos", " ...
[ " (aeval x) (T R n) = eval x (T A n)", " (aeval x) (U R n) = eval x (U A n)", " (algebraMap R A) (eval x (T R n)) = eval ((algebraMap R A) x) (T A n)", " (algebraMap R A) (eval x (U R n)) = eval ((algebraMap R A) x) (U A n)" ]
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SumOverResidueClass #align_import analysis.p_series from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" def SuccDiffBounded (C : ℕ) (u : ℕ → ℕ) : Prop :=...
Mathlib/Analysis/PSeries.lean
64
68
theorem le_sum_condensed' (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (n : ℕ) : (∑ k ∈ Ico 1 (2 ^ n), f k) ≤ ∑ k ∈ range n, 2 ^ k • f (2 ^ k) := by
convert le_sum_schlomilch' hf (fun n => pow_pos zero_lt_two n) (fun m n hm => pow_le_pow_right one_le_two hm) n using 2 simp [pow_succ, mul_two, two_mul]
[ " ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)", " ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈...
[ " ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)", " ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)", " ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈...
import Mathlib.Algebra.Algebra.Quasispectrum import Mathlib.FieldTheory.IsAlgClosed.Spectrum import Mathlib.Analysis.Complex.Liouville import Mathlib.Analysis.Complex.Polynomial import Mathlib.Analysis.Analytic.RadiusLiminf import Mathlib.Topology.Algebra.Module.CharacterSpace import Mathlib.Analysis.NormedSpace.Expon...
Mathlib/Analysis/NormedSpace/Spectrum.lean
104
113
theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : 𝕜} (h : ‖a‖ * ‖(1 : A)‖ < ‖k‖) : k ∈ ρ a := by
rw [resolventSet, Set.mem_setOf_eq, Algebra.algebraMap_eq_smul_one] nontriviality A have hk : k ≠ 0 := ne_zero_of_norm_ne_zero ((mul_nonneg (norm_nonneg _) (norm_nonneg _)).trans_lt h).ne' letI ku := Units.map ↑ₐ.toMonoidHom (Units.mk0 k hk) rw [← inv_inv ‖(1 : A)‖, mul_inv_lt_iff (inv_pos.2 <| norm_...
[ " spectralRadius 𝕜 a = 0", " spectralRadius 𝕜 0 = 0", " k ∈ ρ a", " IsUnit (k • 1 - a)", " ‖-a‖ < ‖↑ku⁻¹‖⁻¹" ]
[ " spectralRadius 𝕜 a = 0", " spectralRadius 𝕜 0 = 0" ]
import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.PPWithUniv #align_import logic.small.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" universe u w v v' @[mk_iff, pp_with_univ] class Small (α : Type v) : Prop where equiv_sma...
Mathlib/Logic/Small/Defs.lean
56
58
theorem Shrink.ext {α : Type v} [Small.{w} α] {x y : Shrink α} (w : (equivShrink _).symm x = (equivShrink _).symm y) : x = y := by
simpa using w
[ " x = y" ]
[]
import Mathlib.Algebra.Algebra.Basic import Mathlib.Algebra.Periodic import Mathlib.Topology.Algebra.Order.Field import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.Algebra.Star import Mathlib.Topology.Instances.Int import Mathlib.Topology.Order.Bornology #align_import topology.instances.real fro...
Mathlib/Topology/Instances/Real.lean
92
94
theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε := by
simp [mem_closure_iff_nhds_basis nhds_basis_ball, Real.dist_eq]
[ " dist (-a✝) (-b✝) < ε", " TopologicalAddGroup ℝ", " IsCompact (closedBall x r)", " IsCompact (Icc (x - r) (x + r))", " ∀ u ∈ ⋃ a, ⋃ b, ⋃ (_ : a < b), {Ioo ↑a ↑b}, IsOpen u", " Ioo ↑q ↑p ∈ ⋃ a, ⋃ b, ⋃ (_ : a < b), {Ioo ↑a ↑b}", " ∃ i i_1, ∃ (_ : i < i_1), Ioo ↑q ↑p ∈ {Ioo ↑i ↑i_1}", " cobounded ℝ = at...
[ " dist (-a✝) (-b✝) < ε", " TopologicalAddGroup ℝ", " IsCompact (closedBall x r)", " IsCompact (Icc (x - r) (x + r))", " ∀ u ∈ ⋃ a, ⋃ b, ⋃ (_ : a < b), {Ioo ↑a ↑b}, IsOpen u", " Ioo ↑q ↑p ∈ ⋃ a, ⋃ b, ⋃ (_ : a < b), {Ioo ↑a ↑b}", " ∃ i i_1, ∃ (_ : i < i_1), Ioo ↑q ↑p ∈ {Ioo ↑i ↑i_1}", " cobounded ℝ = at...
import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho import Mathlib.LinearAlgebra.Orientation #align_import analysis.inner_product_space.orientation from "leanprover-community/mathlib"@"bd65478311e4dfd41f48bf38c7e3b02fb75d0163" noncomputable section variable {E : Type*} [NormedAddCommGroup E] [InnerProduct...
Mathlib/Analysis/InnerProductSpace/Orientation.lean
76
84
theorem same_orientation_iff_det_eq_det : e.toBasis.det = f.toBasis.det ↔ e.toBasis.orientation = f.toBasis.orientation := by
constructor · intro h dsimp [Basis.orientation] congr · intro h rw [e.toBasis.det.eq_smul_basis_det f.toBasis] simp [e.det_to_matrix_orthonormalBasis_of_same_orientation f h]
[ " e.toBasis.det ⇑f = 1", " ¬e.toBasis.det ⇑f = -1", " 0 < e.toBasis.det ⇑f", " e.toBasis.det ⇑f = -1", " e.toBasis.orientation = f.toBasis.orientation", " e.toBasis.det = f.toBasis.det ↔ e.toBasis.orientation = f.toBasis.orientation", " e.toBasis.det = f.toBasis.det → e.toBasis.orientation = f.toBasis.o...
[ " e.toBasis.det ⇑f = 1", " ¬e.toBasis.det ⇑f = -1", " 0 < e.toBasis.det ⇑f", " e.toBasis.det ⇑f = -1", " e.toBasis.orientation = f.toBasis.orientation" ]
import Mathlib.Analysis.SpecialFunctions.Exponential #align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84e0d918668460a34aa19d02fe2e0e2286da0" open NormedSpace open scoped Nat section SinCos theorem Complex.hasSum_cos' (z : ℂ) : HasSum (fun n : ℕ => (z *...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
49
64
theorem Complex.hasSum_sin' (z : ℂ) : HasSum (fun n : ℕ => (z * Complex.I) ^ (2 * n + 1) / ↑(2 * n + 1)! / Complex.I) (Complex.sin z) := by
rw [Complex.sin, Complex.exp_eq_exp_ℂ] have := (((expSeries_div_hasSum_exp ℂ (-z * Complex.I)).sub (expSeries_div_hasSum_exp ℂ (z * Complex.I))).mul_right Complex.I).div_const 2 replace := (Nat.divModEquiv 2).symm.hasSum_iff.mpr this dsimp [Function.comp_def] at this simp_rw [← mul_comm 2 _] at this re...
[ " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos", " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp ℂ (z * I) + NormedSpace.exp ℂ (-z * I)) / 2)", " HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +...
[ " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos", " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp ℂ (z * I) + NormedSpace.exp ℂ (-z * I)) / 2)", " HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +...
import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ι → ...
Mathlib/LinearAlgebra/Projectivization/Independence.lean
63
72
theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by
refine ⟨?_, fun h => ?_⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine h.linearIndependent (Projectivization.submodule ∘ f) (fun i => ?_) fun i => ?_ · simpa only [Function.comp_a...
[ " Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)", " Independent f → LinearIndependent K (Projectivization.rep ∘ f)", " LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)", " (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff", " (Projectivization.rep ∘ fun i => mk K (...
[ " Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)", " Independent f → LinearIndependent K (Projectivization.rep ∘ f)", " LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)", " (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff", " (Projectivization.rep ∘ fun i => mk K (...
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
76
79
theorem toReal_le_toReal (ha : a ≠ ∞) (hb : b ≠ ∞) : a.toReal ≤ b.toReal ↔ a ≤ b := by
lift a to ℝ≥0 using ha lift b to ℝ≥0 using hb norm_cast
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
import Mathlib.Algebra.Algebra.Operations import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Algebra.DirectSum.Algebra #align_import algebra.direct_sum.internal from "leanprover-community/mathlib"@"9936c3dfc04e5876f4368aeb2e60f8d8358d095a" open DirectSum variable {ι : Type*} {σ S R : Type*} instance...
Mathlib/Algebra/DirectSum/Internal.lean
62
68
theorem SetLike.natCast_mem_graded [Zero ι] [AddMonoidWithOne R] [SetLike σ R] [AddSubmonoidClass σ R] (A : ι → σ) [SetLike.GradedOne A] (n : ℕ) : (n : R) ∈ A 0 := by
induction' n with _ n_ih · rw [Nat.cast_zero] exact zero_mem (A 0) · rw [Nat.cast_succ] exact add_mem n_ih (SetLike.one_mem_graded _)
[ " AddCommMonoid ↥(A i)", " AddCommGroup ↥(A i)", " (algebraMap S R) s ∈ A 0", " s • 1 ∈ A 0", " ↑n ∈ A 0", " ↑0 ∈ A 0", " 0 ∈ A 0", " ↑(n✝ + 1) ∈ A 0", " ↑n✝ + 1 ∈ A 0" ]
[ " AddCommMonoid ↥(A i)", " AddCommGroup ↥(A i)", " (algebraMap S R) s ∈ A 0", " s • 1 ∈ A 0" ]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.List.MinMax import Mathlib.Algebra.Tropical.Basic import Mathlib.Order.ConditionallyCompleteLattice.Finset #align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" variable {R S :...
Mathlib/Algebra/Tropical/BigOperators.lean
141
143
theorem Finset.untrop_sum [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → Tropical (WithTop R)) : untrop (∑ i ∈ s, f i) = ⨅ i : s, untrop (f i) := by
simpa [← _root_.untrop_sum] using (sum_attach _ _).symm
[ " trop l.sum = (map trop l).prod", " trop [].sum = (map trop []).prod", " trop (hd :: tl).sum = (map trop (hd :: tl)).prod", " ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod", " trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)", " ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod", " ...
[ " trop l.sum = (map trop l).prod", " trop [].sum = (map trop []).prod", " trop (hd :: tl).sum = (map trop (hd :: tl)).prod", " ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod", " trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)", " ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod", " ...
import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Polynomial.Roots import Mathlib.GroupTheory.SpecificGroups.Cyclic #align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e" section open Finset Polynomial Function Nat variable {R : Type*} {G : Ty...
Mathlib/RingTheory/IntegralDomain.lean
174
185
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) : ∃ q r : R[X], r.degree < g.degree ∧ (algebraMap R[X] K f) / (algebraMap R[X] K g) = algebraMap R[X] K q + (algebraMap R[X] K r) / (algebraMap R[X] K g) := by
refine ⟨f /ₘ g, f %ₘ g, ?_, ?_⟩ · exact degree_modByMonic_lt _ hg · have hg' : algebraMap R[X] K g ≠ 0 := -- Porting note: the proof was `by exact_mod_cast Monic.ne_zero hg` (map_ne_zero_iff _ (IsFractionRing.injective R[X] K)).mpr (Monic.ne_zero hg) field_simp [hg'] -- Porting note: `norm_ca...
[ " (filter (fun g => g ^ n = g₀) univ).card ≤ Multiset.card (nthRoots n (f g₀))", " (filter (fun g => g ^ n = g₀) univ).card ≤ (nthRoots n (f g₀)).toFinset.card", " ∀ a ∈ filter (fun g => g ^ n = g₀) univ, f a ∈ (nthRoots n (f g₀)).toFinset", " f g ∈ (nthRoots n (f g₀)).toFinset", " ∀ a₁ ∈ filter (fun g => g...
[ " (filter (fun g => g ^ n = g₀) univ).card ≤ Multiset.card (nthRoots n (f g₀))", " (filter (fun g => g ^ n = g₀) univ).card ≤ (nthRoots n (f g₀)).toFinset.card", " ∀ a ∈ filter (fun g => g ^ n = g₀) univ, f a ∈ (nthRoots n (f g₀)).toFinset", " f g ∈ (nthRoots n (f g₀)).toFinset", " ∀ a₁ ∈ filter (fun g => g...
import Mathlib.Topology.Compactness.Compact open Set Filter Topology TopologicalSpace Classical variable {X : Type*} {Y : Type*} {ι : Type*} variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X} instance [WeaklyLocallyCompactSpace X] [WeaklyLocallyCompactSpace Y] : WeaklyLocallyCompactSpace (X × Y) ...
Mathlib/Topology/Compactness/LocallyCompact.lean
141
144
theorem exists_compact_subset [LocallyCompactSpace X] {x : X} {U : Set X} (hU : IsOpen U) (hx : x ∈ U) : ∃ K : Set X, IsCompact K ∧ x ∈ interior K ∧ K ⊆ U := by
rcases LocallyCompactSpace.local_compact_nhds x U (hU.mem_nhds hx) with ⟨K, h1K, h2K, h3K⟩ exact ⟨K, h3K, mem_interior_iff_mem_nhds.2 h1K, h2K⟩
[ " ∃ s, IsCompact s ∧ s ∈ 𝓝 f", " ∃ K', IsCompact K' ∧ K ⊆ interior K'", " ⋃ x ∈ I, interior (s x) ⊆ interior (⋃ x ∈ I, s x)", " ∀ t ∈ 𝓝 x, ∃ r ∈ 𝓝 x, IsCompact r ∧ r ⊆ t", " ∃ K, IsCompact K ∧ x ∈ interior K ∧ K ⊆ U" ]
[ " ∃ s, IsCompact s ∧ s ∈ 𝓝 f", " ∃ K', IsCompact K' ∧ K ⊆ interior K'", " ⋃ x ∈ I, interior (s x) ⊆ interior (⋃ x ∈ I, s x)", " ∀ t ∈ 𝓝 x, ∃ r ∈ 𝓝 x, IsCompact r ∧ r ⊆ t" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics #align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" noncomputable section open scoped Classical open Real Topology NNReal ENNReal Filter ComplexConjugate open Filter Finset...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
44
50
theorem cpow_eq_nhds {a b : ℂ} (ha : a ≠ 0) : (fun x => x ^ b) =ᶠ[𝓝 a] fun x => exp (log x * b) := by
suffices ∀ᶠ x : ℂ in 𝓝 a, x ≠ 0 from this.mono fun x hx ↦ by dsimp only rw [cpow_def_of_ne_zero hx] exact IsOpen.eventually_mem isOpen_ne ha
[ " (fun x => 0 ^ x) =ᶠ[𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0", " (fun x => x ^ b) =ᶠ[𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0" ]
[ " (fun x => 0 ^ x) =ᶠ[𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0" ]
import Batteries.Control.ForInStep.Lemmas import Batteries.Data.List.Basic import Batteries.Tactic.Init import Batteries.Tactic.Alias namespace List open Nat @[simp] theorem mem_toArray {a : α} {l : List α} : a ∈ l.toArray ↔ a ∈ l := by simp [Array.mem_def] @[simp] theorem drop_one : ∀ l : List α, drop 1 l =...
.lake/packages/batteries/Batteries/Data/List/Lemmas.lean
91
100
theorem Sublist.trans {l₁ l₂ l₃ : List α} (h₁ : l₁ <+ l₂) (h₂ : l₂ <+ l₃) : l₁ <+ l₃ := by
induction h₂ generalizing l₁ with | slnil => exact h₁ | cons _ _ IH => exact (IH h₁).cons _ | @cons₂ l₂ _ a _ IH => generalize e : a :: l₂ = l₂' match e ▸ h₁ with | .slnil => apply nil_sublist | .cons a' h₁' => cases e; apply (IH h₁').cons | .cons₂ a' h₁' => cases e; apply (IH h₁').cons₂
[ " a ∈ toArray l ↔ a ∈ l", " (zipWith f l l').tail = zipWith f l.tail l'.tail", " drop 1 (zipWith f l l') = zipWith f l.tail l'.tail", " x✝ ∈ a :: l₁ → x✝ ∈ a :: l₂", " x✝ = a ∨ x✝ ∈ l₁ → x✝ = a ∨ x✝ ∈ l₂", " a :: l ⊆ m ↔ a ∈ m ∧ l ⊆ m", " l₁ ++ l₂ ⊆ l ↔ l₁ ⊆ l ∧ l₂ ⊆ l", " x ∈ map f l₁ → x ∈ map f l₂"...
[ " a ∈ toArray l ↔ a ∈ l", " (zipWith f l l').tail = zipWith f l.tail l'.tail", " drop 1 (zipWith f l l') = zipWith f l.tail l'.tail", " x✝ ∈ a :: l₁ → x✝ ∈ a :: l₂", " x✝ = a ∨ x✝ ∈ l₁ → x✝ = a ∨ x✝ ∈ l₂", " a :: l ⊆ m ↔ a ∈ m ∧ l ⊆ m", " l₁ ++ l₂ ⊆ l ↔ l₁ ⊆ l ∧ l₂ ⊆ l", " x ∈ map f l₁ → x ∈ map f l₂"...
import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Data.Nat.SuccPred #align_import set_theory.ordinal.arithmetic from "leanprover-community/mathlib"@"31b269b60935483943542d547a6dd83a66b37dc7" assert_not_exists Field assert_not_exists Module noncomputable section open Function Cardinal Set Equiv Order open sc...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
145
146
theorem add_right_cancel {a b : Ordinal} (n : ℕ) : a + n = b + n ↔ a = b := by
simp only [le_antisymm_iff, add_le_add_iff_right]
[ " lift.{u, v} (succ a) = succ (lift.{u, v} a)", " lift.{u, v} a + 1 = succ (lift.{u, v} a)", " f (Sum.inl a) = Sum.inl a", " (b : β₁) → { b' // f (Sum.inr b) = Sum.inr b' }", " { b' // f (Sum.inr b) = Sum.inr b' }", " { b' // Sum.inl val✝ = Sum.inr b' }", " { b' // Sum.inr val✝ = Sum.inr b' }", " x = ...
[ " lift.{u, v} (succ a) = succ (lift.{u, v} a)", " lift.{u, v} a + 1 = succ (lift.{u, v} a)", " f (Sum.inl a) = Sum.inl a", " (b : β₁) → { b' // f (Sum.inr b) = Sum.inr b' }", " { b' // f (Sum.inr b) = Sum.inr b' }", " { b' // Sum.inl val✝ = Sum.inr b' }", " { b' // Sum.inr val✝ = Sum.inr b' }", " x = ...
import Mathlib.Data.Nat.Multiplicity import Mathlib.Data.ZMod.Algebra import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly import Mathlib.FieldTheory.Perfect #align_import ring_theory.witt_vector.frobenius from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"...
Mathlib/RingTheory/WittVector/Frobenius.lean
143
193
theorem map_frobeniusPoly (n : ℕ) : MvPolynomial.map (Int.castRingHom ℚ) (frobeniusPoly p n) = frobeniusPolyRat p n := by
rw [frobeniusPoly, RingHom.map_add, RingHom.map_mul, RingHom.map_pow, map_C, map_X, eq_intCast, Int.cast_natCast, frobeniusPolyRat] refine Nat.strong_induction_on n ?_; clear n intro n IH rw [xInTermsOfW_eq] simp only [AlgHom.map_sum, AlgHom.map_sub, AlgHom.map_mul, AlgHom.map_pow, bind₁_C_right] have ...
[ " (bind₁ (frobeniusPolyRat p)) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1)", " (bind₁ fun n => (bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1)) (xInTermsOfW p ℚ n)) (wittPolynomial p ℚ n) =\n wittPolynomial p ℚ (n + 1)", " frobeniusPolyAux p n =\n X (n + 1) -\n ∑ i ∈ range n,\n ∑ j ∈ rang...
[ " (bind₁ (frobeniusPolyRat p)) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1)", " (bind₁ fun n => (bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1)) (xInTermsOfW p ℚ n)) (wittPolynomial p ℚ n) =\n wittPolynomial p ℚ (n + 1)", " frobeniusPolyAux p n =\n X (n + 1) -\n ∑ i ∈ range n,\n ∑ j ∈ rang...
import Mathlib.Analysis.Convex.Cone.Basic import Mathlib.Analysis.InnerProductSpace.Projection #align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open Set LinearMap open scoped Classical open Pointwise variable {𝕜 E F G : Type*} section Dua...
Mathlib/Analysis/Convex/Cone/InnerDual.lean
110
116
theorem innerDualCone_iUnion {ι : Sort*} (f : ι → Set H) : (⋃ i, f i).innerDualCone = ⨅ i, (f i).innerDualCone := by
refine le_antisymm (le_iInf fun i x hx y hy => hx _ <| mem_iUnion_of_mem _ hy) ?_ intro x hx y hy rw [ConvexCone.mem_iInf] at hx obtain ⟨j, hj⟩ := mem_iUnion.mp hy exact hx _ _ hj
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ", " (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone", " (⋃ i, f i).inne...
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ", " (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone" ]
import Mathlib.SetTheory.Game.Basic import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834" universe u open SetTheory PGame open scoped NaturalOps PGame namespace Ordinal noncomputable def toPGame : Ordin...
Mathlib/SetTheory/Game/Ordinal.lean
121
121
theorem one_toPGame_moveLeft (x) : (toPGame 1).moveLeft x = toPGame 0 := by
simp
[ " let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).α", " o.toPGame.RightMoves = PEmpty.{u_1 + 1}", " IsEmpty (toPGame 0).LeftMoves", " IsEmpty (Quotient.out 0).α", " IsEmpty ...
[ " let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).α", " o.toPGame.RightMoves = PEmpty.{u_1 + 1}", " IsEmpty (toPGame 0).LeftMoves", " IsEmpty (Quotient.out 0).α", " IsEmpty ...
import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul #align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" noncomputable section open Finset open Polynomial namespace Polynomial universe u v y variable {R : Type u} {S : Typ...
Mathlib/Algebra/Polynomial/Monic.lean
76
80
theorem monic_C_mul_of_mul_leadingCoeff_eq_one {b : R} (hp : b * p.leadingCoeff = 1) : Monic (C b * p) := by
unfold Monic nontriviality rw [leadingCoeff_mul' _] <;> simp [leadingCoeff_C b, hp]
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i", "R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p", " C (p.coeff p.natD...
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i", "R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p", " C (p.coeff p.natD...
import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.Tactic.ComputeDegree #align_import linear_algebra.matrix.polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" set_...
Mathlib/LinearAlgebra/Matrix/Polynomial.lean
39
59
theorem natDegree_det_X_add_C_le (A B : Matrix n n α) : natDegree (det ((X : α[X]) • A.map C + B.map C : Matrix n n α[X])) ≤ Fintype.card n := by
rw [det_apply] refine (natDegree_sum_le _ _).trans ?_ refine Multiset.max_le_of_forall_le _ _ ?_ simp only [forall_apply_eq_imp_iff, true_and_iff, Function.comp_apply, Multiset.map_map, Multiset.mem_map, exists_imp, Finset.mem_univ_val] intro g calc natDegree (sign g • ∏ i : n, (X • A.map C + B.map...
[ " (X • A.map ⇑C + B.map ⇑C).det.natDegree ≤ Fintype.card n", " (∑ σ : Equiv.Perm n, sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i).natDegree ≤ Fintype.card n", " Finset.fold max 0 (natDegree ∘ fun σ => sign σ • ∏ i : n, (X • A.map ⇑C + B.map ⇑C) (σ i) i) Finset.univ ≤\n Fintype.card n", " ∀ x ∈ Multi...
[]
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Data.Finite.Card #align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" variable {G : Type*} [Group G] variable {A : Type*} [AddGroup A] n...
Mathlib/Algebra/Group/Subgroup/Finite.lean
241
247
theorem pi_le_iff [DecidableEq η] [Finite η] {H : ∀ i, Subgroup (f i)} {J : Subgroup (∀ i, f i)} : pi univ H ≤ J ↔ ∀ i : η, map (MonoidHom.mulSingle f i) (H i) ≤ J := by
constructor · rintro h i _ ⟨x, hx, rfl⟩ apply h simpa using hx · exact fun h x hx => pi_mem_of_mulSingle_mem x fun i => h i (mem_map_of_mem _ (hx i trivial))
[ " x ∈ H", " x = 1", " x i = 1 i", " x = Function.update x i 1 * Pi.mulSingle i (x i)", " x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j", " x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j", " Function.update x i 1 * Pi.mulSingle i (x i) ∈ H", " Function.update x i 1 ∈ H", " ∀ i_1 ∉ I,...
[ " x ∈ H", " x = 1", " x i = 1 i", " x = Function.update x i 1 * Pi.mulSingle i (x i)", " x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j", " x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j", " Function.update x i 1 * Pi.mulSingle i (x i) ∈ H", " Function.update x i 1 ∈ H", " ∀ i_1 ∉ I,...
import Mathlib.Algebra.PUnitInstances import Mathlib.Tactic.Abel import Mathlib.Tactic.Ring import Mathlib.Order.Hom.Lattice #align_import algebra.ring.boolean_ring from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped symmDiff variable {α β γ : Type*} class BooleanRing (α) ...
Mathlib/Algebra/Ring/BooleanRing.lean
90
97
theorem mul_add_mul : a * b + b * a = 0 := by
have : a + b = a + b + (a * b + b * a) := calc a + b = (a + b) * (a + b) := by rw [mul_self] _ = a * a + a * b + (b * a + b * b) := by rw [add_mul, mul_add, mul_add] _ = a + a * b + (b * a + b) := by simp only [mul_self] _ = a + b + (a * b + b * a) := by abel rwa [self_eq_add_right] at ...
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0", " -a + 0 = -a + -a + a", " -a + -a + a = a", " a = -b ↔ a = b", " a * b + b * a = 0", " a + b = (a + b) * (a + b)", " (a + b) ...
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0", " -a + 0 = -a + -a + a", " -a + -a + a = a", " a = -b ↔ a = b" ]
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [Mu...
Mathlib/Algebra/Polynomial/Smeval.lean
83
85
theorem smeval_one : (1 : R[X]).smeval x = 1 • x ^ 0 := by
rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul]
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r • x ^ 0", " ((monomial n) r).smeval x = r • x ^ n", " eval r p = p.smeval r", " (p.sum fun e a => a * r ^ e) = p.sum (smul_pow r)", " eval₂ f x p = p.smeval x", " (p.sum fun e a => f a * x ^ e) = p.sum (smul_pow x)", " smeval 0 x = 0", " smeva...
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r • x ^ 0", " ((monomial n) r).smeval x = r • x ^ n", " eval r p = p.smeval r", " (p.sum fun e a => a * r ^ e) = p.sum (smul_pow r)", " eval₂ f x p = p.smeval x", " (p.sum fun e a => f a * x ^ e) = p.sum (smul_pow x)", " smeval 0 x = 0" ]
import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.Index #align_import group_theory.commensurable from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" variable {G : Type*} [Group G] def Commensurable (H K : Subgroup...
Mathlib/GroupTheory/Commensurable.lean
81
82
theorem commensurable_inv (H : Subgroup G) (g : ConjAct G) : Commensurable (g • H) H ↔ Commensurable H (g⁻¹ • H) := by
rw [commensurable_conj, inv_smul_smul]
[ " Commensurable H H", " Setoid.r a b ↔ Setoid.r ((Subgroup.equivSMul g K).toEquiv a) ((Subgroup.equivSMul g K).toEquiv b)", " Setoid.r a b ↔ Setoid.r ((Subgroup.equivSMul g K) a) ((Subgroup.equivSMul g K) b)", " ↑(a⁻¹ * b) ∈ H ↔ g • ↑(a⁻¹ * b) ∈ g • H", " Commensurable (g • H) H ↔ Commensurable H (g⁻¹ • H)"...
[ " Commensurable H H", " Setoid.r a b ↔ Setoid.r ((Subgroup.equivSMul g K).toEquiv a) ((Subgroup.equivSMul g K).toEquiv b)", " Setoid.r a b ↔ Setoid.r ((Subgroup.equivSMul g K) a) ((Subgroup.equivSMul g K) b)", " ↑(a⁻¹ * b) ∈ H ↔ g • ↑(a⁻¹ * b) ∈ g • H" ]
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
133
133
theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := 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" ]
[ " a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)" ]
import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.RowCol import Mathlib.Data.Fin.VecNotation import Mathlib.Tactic.FinCases #align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matrix universe u uₘ uₙ uₒ variable {α : Type u} {o n m...
Mathlib/Data/Matrix/Notation.lean
263
268
theorem cons_mul [Fintype n'] (v : n' → α) (A : Fin m → n' → α) (B : Matrix n' o' α) : of (vecCons v A) * B = of (vecCons (v ᵥ* B) (of.symm (of A * B))) := by
ext i j refine Fin.cases ?_ ?_ i · rfl simp [mul_val_succ]
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ", " of (vecCons v A) * B = of (vecCons (v ᵥ* B) (of.symm (of A * B)))", " (of (vecCons v A) * B) i j = of (vecCons (v ᵥ*...
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ" ]
import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" ...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
286
296
theorem convexBodySumFun_apply' (x : E K) : convexBodySumFun x = ∑ w, ‖x.1 w‖ + 2 * ∑ w, ‖x.2 w‖ := by
simp_rw [convexBodySumFun_apply, ← Finset.sum_add_sum_compl {w | IsReal w}.toFinset, Set.toFinset_setOf, Finset.compl_filter, not_isReal_iff_isComplex, ← Finset.subtype_univ, ← Finset.univ.sum_subtype_eq_sum_filter, Finset.mul_sum] congr · ext w rw [mult, if_pos w.prop, normAtPlace_apply_isReal, Nat....
[ " convexBodySumFun x = ∑ w : { w // w.IsReal }, ‖x.1 w‖ + 2 * ∑ w : { w // w.IsComplex }, ‖x.2 w‖", " ∑ x_1 ∈ Finset.subtype (fun x => x.IsReal) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x +\n ∑ x_1 ∈ Finset.subtype (fun x => x.IsComplex) Finset.univ, ↑(↑x_1).mult * (normAtPlace ↑x_1) x =\n ∑ x_1 ∈ F...
[]
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) section ReplaceVertex def replaceVertex : SimpleGraph V where Adj v w := if v = t then if w = t then False else G...
Mathlib/Combinatorics/SimpleGraph/Operations.lean
92
96
theorem edgeFinset_replaceVertex_of_not_adj (hn : ¬G.Adj s t) : (G.replaceVertex s t).edgeFinset = G.edgeFinset \ G.incidenceFinset t ∪ (G.neighborFinset s).image (s(·, t)) := by
simp only [incidenceFinset, neighborFinset, ← Set.toFinset_diff, ← Set.toFinset_image, ← Set.toFinset_union] exact Set.toFinset_congr (G.edgeSet_replaceVertex_of_not_adj hn)
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w →\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w →\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Data.Set.MulAntidiagonal #align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Finset open Pointwise variable {α : Type*} variable [OrderedCancelCommMonoid α] {s t : Set α} (hs : ...
Mathlib/Data/Finset/MulAntidiagonal.lean
92
95
theorem swap_mem_mulAntidiagonal : x.swap ∈ Finset.mulAntidiagonal hs ht a ↔ x ∈ Finset.mulAntidiagonal ht hs a := by
simp only [mem_mulAntidiagonal, Prod.fst_swap, Prod.snd_swap, Set.swap_mem_mulAntidiagonal_aux, Set.mem_mulAntidiagonal]
[ " x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a", " x.swap ∈ mulAntidiagonal hs ht a ↔ x ∈ mulAntidiagonal ht hs a" ]
[ " x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a" ]
import Mathlib.Algebra.Polynomial.UnitTrinomial import Mathlib.RingTheory.Polynomial.GaussLemma import Mathlib.Tactic.LinearCombination #align_import ring_theory.polynomial.selmer from "leanprover-community/mathlib"@"3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6" namespace Polynomial open scoped Polynomial variable ...
Mathlib/RingTheory/Polynomial/Selmer.lean
49
67
theorem X_pow_sub_X_sub_one_irreducible (hn1 : n ≠ 1) : Irreducible (X ^ n - X - 1 : ℤ[X]) := by
by_cases hn0 : n = 0 · rw [hn0, pow_zero, sub_sub, add_comm, ← sub_sub, sub_self, zero_sub] exact Associated.irreducible ⟨-1, mul_neg_one X⟩ irreducible_X have hn : 1 < n := Nat.one_lt_iff_ne_zero_and_ne_one.mpr ⟨hn0, hn1⟩ have hp : (X ^ n - X - 1 : ℤ[X]) = trinomial 0 1 n (-1) (-1) 1 := by simp only [...
[ " ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)", " False", " z ^ 3 = 1", " z ^ n = 1 ∨ z ^ n = z ∨ z ^ n = z ^ 2", " z ^ (n % 3) = 1 ∨ z ^ (n % 3) = z ∨ z ^ (n % 3) = z ^ 2", " z ^ 0 = 1 ∨ z ^ 0 = z ∨ z ^ 0 = z ^ 2", " z ^ 1 = 1 ∨ z ^ 1 = z ∨ z ^ 1 = z ^ 2", " z ^ 2 = 1 ∨ z ^ 2 = z ∨ z ^ 2 = z ^ 2", " z = 0...
[ " ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)", " False", " z ^ 3 = 1", " z ^ n = 1 ∨ z ^ n = z ∨ z ^ n = z ^ 2", " z ^ (n % 3) = 1 ∨ z ^ (n % 3) = z ∨ z ^ (n % 3) = z ^ 2", " z ^ 0 = 1 ∨ z ^ 0 = z ∨ z ^ 0 = z ^ 2", " z ^ 1 = 1 ∨ z ^ 1 = z ∨ z ^ 1 = z ^ 2", " z ^ 2 = 1 ∨ z ^ 2 = z ∨ z ^ 2 = z ^ 2", " z = 0...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis #align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" open scoped Polynomial open Polynomial noncomputable sec...
Mathlib/RingTheory/IsAdjoinRoot.lean
179
181
theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) : h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0", " h.repr 0 ∈ Ideal.span {f}", "...
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0", " h.repr 0 ∈ Ideal.span {f}" ]
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperat...
Mathlib/Analysis/NormedSpace/CompactOperator.lean
228
230
theorem IsCompactOperator.sub [TopologicalAddGroup M₄] {f g : M₁ → M₄} (hf : IsCompactOperator f) (hg : IsCompactOperator g) : IsCompactOperator (f - g) := by
rw [sub_eq_add_neg]; exact hf.add hg.neg
[ " IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))", " (∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))", " IsCompactOperator (f - g)", " IsCompactOperator (f + -g)" ]
[ " IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))", " (∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))" ]
import Mathlib.Data.Set.Image import Mathlib.Data.List.InsertNth import Mathlib.Init.Data.List.Lemmas #align_import data.list.lemmas from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4" open List variable {α β γ : Type*} namespace List
Mathlib/Data/List/Lemmas.lean
23
41
theorem injOn_insertNth_index_of_not_mem (l : List α) (x : α) (hx : x ∉ l) : Set.InjOn (fun k => insertNth k x l) { n | n ≤ l.length } := by
induction' l with hd tl IH · intro n hn m hm _ simp only [Set.mem_singleton_iff, Set.setOf_eq_eq_singleton, length] at hn hm simp_all [hn, hm] · intro n hn m hm h simp only [length, Set.mem_setOf_eq] at hn hm simp only [mem_cons, not_or] at hx cases n <;> cases m · rfl · simp [h...
[ " Set.InjOn (fun k => insertNth k x l) {n | n ≤ l.length}", " Set.InjOn (fun k => insertNth k x []) {n | n ≤ [].length}", " n = m", " Set.InjOn (fun k => insertNth k x (hd :: tl)) {n | n ≤ (hd :: tl).length}", " 0 = m", " n✝ + 1 = m", " 0 = 0", " 0 = n✝ + 1", " n✝ + 1 = 0", " n✝¹ + 1 = n✝ + 1", ...
[]
import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Algebra.MulAction #align_import topology.algebra.affine from "leanprover-community/mathlib"@"717c073262cd9d59b1a1dcda7e8ab570c5b63370" namespace AffineMap variable {R E F : Type*} variable [AddC...
Mathlib/Topology/Algebra/Affine.lean
61
67
theorem homothety_continuous (x : F) (t : R) : Continuous <| homothety x t := by
suffices ⇑(homothety x t) = fun y => t • (y - x) + x by rw [this] exact ((continuous_id.sub continuous_const).const_smul _).add continuous_const -- Porting note: proof was `by continuity` ext y simp [homothety_apply]
[ " Continuous ⇑(homothety x t)", " Continuous fun y => t • (y - x) + x", " ⇑(homothety x t) = fun y => t • (y - x) + x", " (homothety x t) y = t • (y - x) + x" ]
[]
import Mathlib.NumberTheory.FLT.Basic import Mathlib.NumberTheory.PythagoreanTriples import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.LinearCombination #align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" noncomputable section open scope...
Mathlib/NumberTheory/FLT/Four.lean
38
55
theorem mul {a b c k : ℤ} (hk0 : k ≠ 0) : Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c) := by
delta Fermat42 constructor · intro f42 constructor · exact mul_ne_zero hk0 f42.1 constructor · exact mul_ne_zero hk0 f42.2.1 · have H : a ^ 4 + b ^ 4 = c ^ 2 := f42.2.2 linear_combination k ^ 4 * H · intro f42 constructor · exact right_ne_zero_of_mul f42.1 constructor ...
[ " Fermat42 a b c ↔ Fermat42 b a c", " a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " a ≠ 0 ∧ b ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)", " a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a ≠ ...
[ " Fermat42 a b c ↔ Fermat42 b a c", " a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " a ≠ 0 ∧ b ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2" ]
import Mathlib.Topology.Algebra.Algebra import Mathlib.Analysis.InnerProductSpace.Basic #align_import analysis.inner_product_space.of_norm from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb" open RCLike open scoped ComplexConjugate variable {𝕜 : Type*} [RCLike 𝕜] (E : Type*) [Normed...
Mathlib/Analysis/InnerProductSpace/OfNorm.lean
120
124
theorem _root_.Continuous.inner_ {f g : ℝ → E} (hf : Continuous f) (hg : Continuous g) : Continuous fun x => inner_ 𝕜 (f x) (g x) := by
unfold inner_ have := Continuous.const_smul (M := 𝕜) hf I continuity
[ " InnerProductSpaceable.innerProp' E ↑(-1)", " inner_ 𝕜 (↑(-1) • x) y = (starRingEnd 𝕜) ↑(-1) * inner_ 𝕜 x y", " 4⁻¹ *\n (𝓚 ‖-x + y‖ * 𝓚 ‖-x + y‖ - 𝓚 ‖-x - y‖ * 𝓚 ‖-x - y‖ + I * 𝓚 ‖I • -x + y‖ * 𝓚 ‖I • -x + y‖ -\n I * 𝓚 ‖I • -x - y‖ * 𝓚 ‖I • -x - y‖) =\n -4⁻¹ *\n (𝓚 ‖x + y‖ * 𝓚 ...
[ " InnerProductSpaceable.innerProp' E ↑(-1)", " inner_ 𝕜 (↑(-1) • x) y = (starRingEnd 𝕜) ↑(-1) * inner_ 𝕜 x y", " 4⁻¹ *\n (𝓚 ‖-x + y‖ * 𝓚 ‖-x + y‖ - 𝓚 ‖-x - y‖ * 𝓚 ‖-x - y‖ + I * 𝓚 ‖I • -x + y‖ * 𝓚 ‖I • -x + y‖ -\n I * 𝓚 ‖I • -x - y‖ * 𝓚 ‖I • -x - y‖) =\n -4⁻¹ *\n (𝓚 ‖x + y‖ * 𝓚 ...
import Mathlib.Data.Set.Prod #align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654" open Function namespace Set variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ} variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v...
Mathlib/Data/Set/NAry.lean
37
39
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩ exact mem_image2_of_mem (hs ha) (ht hb)
[ " f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t", " image2 f s t ⊆ image2 f s' t'", " f a b ∈ image2 f s' t'" ]
[ " f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t" ]
import Mathlib.MeasureTheory.Integral.Lebesgue open Set hiding restrict restrict_apply open Filter ENNReal NNReal MeasureTheory.Measure namespace MeasureTheory variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α} noncomputable def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥...
Mathlib/MeasureTheory/Measure/WithDensity.lean
44
52
theorem withDensity_apply_le (f : α → ℝ≥0∞) (s : Set α) : ∫⁻ a in s, f a ∂μ ≤ μ.withDensity f s := by
let t := toMeasurable (μ.withDensity f) s calc ∫⁻ a in s, f a ∂μ ≤ ∫⁻ a in t, f a ∂μ := lintegral_mono_set (subset_toMeasurable (withDensity μ f) s) _ = μ.withDensity f t := (withDensity_apply f (measurableSet_toMeasurable (withDensity μ f) s)).symm _ = μ.withDensity f s := measure_toMeasurable s
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s" ]
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0" ]
import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.CategoryTheory.Monoidal.Linear #align_import algebra.category.Module.monoidal.basic from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2" -- Porting note: Module set_option linte...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
158
162
theorem pentagon (W X Y Z : ModuleCat R) : whiskerRight (associator W X Y).hom Z ≫ (associator W (tensorObj X Y) Z).hom ≫ whiskerLeft W (associator X Y Z).hom = (associator (tensorObj W X) Y Z).hom ≫ (associator W X (tensorObj Y Z)).hom := by
convert pentagon_aux R W X Y Z using 1
[ " tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))", " (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))", " tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂", " (TensorProduct.mk R ↑X₁ ↑X₂).compr₂ (tensorHom (f₁ ≫ g₁) (f₂...
[ " tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))", " (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))", " tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂", " (TensorProduct.mk R ↑X₁ ↑X₂).compr₂ (tensorHom (f₁ ≫ g₁) (f₂...
import Mathlib.Algebra.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
101
102
theorem val_natCast_of_lt {n a : ℕ} (h : a < n) : (a : ZMod n).val = a := by
rwa [val_natCast, Nat.mod_eq_of_lt]
[ " 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" ]
[ " 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" ]
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
236
240
theorem Hom.comm {A B : HomologicalComplex V c} (f : A.Hom B) (i j : ι) : f.f i ≫ B.d i j = A.d i j ≫ f.f j := by
by_cases hij : c.Rel i j · exact f.comm' i j hij · rw [A.shape i j hij, B.shape i j hij, comp_zero, zero_comp]
[ " f.f i ≫ B.d i j = A.d i j ≫ f.f j" ]
[]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1 #align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" open TopologicalSpace MeasureTheory.Lp Filter open scoped ENNReal Topology MeasureTheory names...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
179
189
theorem stronglyMeasurable_condexp : StronglyMeasurable[m] (μ[f|m]) := by
by_cases hm : m ≤ m0 swap; · rw [condexp_of_not_le hm]; exact stronglyMeasurable_zero by_cases hμm : SigmaFinite (μ.trim hm) swap; · rw [condexp_of_not_sigmaFinite hm hμm]; exact stronglyMeasurable_zero haveI : SigmaFinite (μ.trim hm) := hμm rw [condexp_of_sigmaFinite hm] split_ifs with hfi hfm · exact...
[ " μ[f|m] = 0", " ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)", " SigmaFinite (μ.trim hm) → ¬Integrable f μ", " μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0", " (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S...
[ " μ[f|m] = 0", " ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)", " SigmaFinite (μ.trim hm) → ¬Integrable f μ", " μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0", " (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S...
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Analysis.Convex.Segment import Mathlib.Tactic.GCongr #align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Set open Convex Pointwise variable {𝕜 E F : Type*} section OrderedSemiring va...
Mathlib/Analysis/Convex/Star.lean
121
125
theorem StarConvex.union (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 x t) : StarConvex 𝕜 x (s ∪ t) := by
rintro y (hy | hy) a b ha hb hab · exact Or.inl (hs hy ha hb hab) · exact Or.inr (ht hy ha hb hab)
[ " StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " a • x + b • y ∈ s", " (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s", " StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃...
[ " StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " a • x + b • y ∈ s", " (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s", " StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃...
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic #align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" universe u v section IsCoprime variable {R : Type ...
Mathlib/RingTheory/Coprime/Lemmas.lean
33
40
theorem Int.isCoprime_iff_gcd_eq_one {m n : ℤ} : IsCoprime m n ↔ Int.gcd m n = 1 := by
constructor · rintro ⟨a, b, h⟩ have : 1 = m * a + n * b := by rwa [mul_comm m, mul_comm n, eq_comm] exact Nat.dvd_one.mp (Int.gcd_dvd_iff.mpr ⟨a, b, this⟩) · rw [← Int.ofNat_inj, IsCoprime, Int.gcd_eq_gcd_ab, mul_comm m, mul_comm n, Nat.cast_one] intro h exact ⟨_, _, h⟩
[ " IsCoprime m n ↔ m.gcd n = 1", " IsCoprime m n → m.gcd n = 1", " m.gcd n = 1", " 1 = m * a + n * b", " m.gcd n = 1 → IsCoprime m n", " m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1", " ∃ a b, a * m + b * n = 1" ]
[]
import Mathlib.FieldTheory.Separable import Mathlib.RingTheory.IntegralDomain import Mathlib.Algebra.CharP.Reduced import Mathlib.Tactic.ApplyFun #align_import field_theory.finite.basic from "leanprover-community/mathlib"@"12a85fac627bea918960da036049d611b1a3ee43" variable {K : Type*} {R : Type*} local notation ...
Mathlib/FieldTheory/Finite/Basic.lean
104
111
theorem prod_univ_units_id_eq_neg_one [CommRing K] [IsDomain K] [Fintype Kˣ] : ∏ x : Kˣ, x = (-1 : Kˣ) := by
classical have : (∏ x ∈ (@univ Kˣ _).erase (-1), x) = 1 := prod_involution (fun x _ => x⁻¹) (by simp) (fun a => by simp (config := { contextual := true }) [Units.inv_eq_self_iff]) (fun a => by simp [@inv_eq_iff_eq_inv _ _ a]) (by simp) rw [← insert_erase (mem_univ (-1 : Kˣ)), prod_inser...
[ " ∏ x : Kˣ, x = -1", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), a * (fun x x_1 => x⁻¹) a ha = 1", " ∀ (ha : a ∈ univ.erase (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a", " ∀ (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) a ha ∈ univ.erase (-1)", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) ((fun ...
[]
import Mathlib.Data.Opposite import Mathlib.Data.Set.Defs #align_import data.set.opposite from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" variable {α : Type*} open Opposite namespace Set protected def op (s : Set α) : Set αᵒᵖ := unop ⁻¹' s #align set.op Set.op protected def u...
Mathlib/Data/Set/Opposite.lean
48
48
theorem unop_mem_unop {s : Set αᵒᵖ} {a : αᵒᵖ} : unop a ∈ s.unop ↔ a ∈ s := by
rfl
[ " { unop := a } ∈ s.op ↔ a ∈ s", " a.unop ∈ s.unop ↔ a ∈ s" ]
[ " { unop := a } ∈ s.op ↔ a ∈ s" ]
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
352
354
theorem mul_left_eq_self : a * b = b ↔ a = 1 := calc a * b = b ↔ a * b = 1 * b := by
rw [one_mul] _ ↔ a = 1 := mul_right_cancel_iff
[ " a * b = b ↔ a * b = 1 * b" ]
[]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv #align_import analysis.ODE.gronwall from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] open Metric Set Asymptotics Fil...
Mathlib/Analysis/ODE/Gronwall.lean
92
93
theorem gronwallBound_ε0_δ0 (K x : ℝ) : gronwallBound 0 K 0 x = 0 := by
simp only [gronwallBound_ε0, zero_mul]
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
import Mathlib.Algebra.Module.DedekindDomain import Mathlib.LinearAlgebra.FreeModule.PID import Mathlib.Algebra.Module.Projective import Mathlib.Algebra.Category.ModuleCat.Biproducts import Mathlib.RingTheory.SimpleModule #align_import algebra.module.pid from "leanprover-community/mathlib"@"cdc34484a07418af43daf8198b...
Mathlib/Algebra/Module/PID.lean
153
165
theorem exists_smul_eq_zero_and_mk_eq {z : M} (hz : Module.IsTorsionBy R M (p ^ pOrder hM z)) {k : ℕ} (f : (R ⧸ R ∙ p ^ k) →ₗ[R] M ⧸ R ∙ z) : ∃ x : M, p ^ k • x = 0 ∧ Submodule.Quotient.mk (p := span R {z}) x = f 1 := by
have f1 := mk_surjective (R ∙ z) (f 1) have : p ^ k • f1.choose ∈ R ∙ z := by rw [← Quotient.mk_eq_zero, mk_smul, f1.choose_spec, ← f.map_smul] convert f.map_zero; change _ • Submodule.Quotient.mk _ = _ rw [← mk_smul, Quotient.mk_eq_zero, Algebra.id.smul_eq_mul, mul_one] exact Submodule.mem_span_si...
[ " DirectSum.IsInternal fun p => torsionBy R M (IsPrincipal.generator ↑p ^ Multiset.count (↑p) (factors ⊤.annihilator))", " torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =\n torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))", " p ∈ torsionBy R M ...
[ " DirectSum.IsInternal fun p => torsionBy R M (IsPrincipal.generator ↑p ^ Multiset.count (↑p) (factors ⊤.annihilator))", " torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =\n torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))", " p ∈ torsionBy R M ...
import Mathlib.LinearAlgebra.Contraction #align_import linear_algebra.coevaluation from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" noncomputable section section coevaluation open TensorProduct FiniteDimensional open TensorProduct universe u v variable (K : Type u) [Field K] var...
Mathlib/LinearAlgebra/Coevaluation.lean
81
95
theorem contractLeft_assoc_coevaluation' : (contractLeft K V).lTensor _ ∘ₗ (TensorProduct.assoc K _ _ _).toLinearMap ∘ₗ (coevaluation K V).rTensor V = (TensorProduct.rid K _).symm.toLinearMap ∘ₗ (TensorProduct.lid K _).toLinearMap := by
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V) apply TensorProduct.ext apply LinearMap.ext_ring; apply (Basis.ofVectorSpace K V).ext; intro j rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply] simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap] ...
[ " (coevaluation K V) 1 =\n let bV := Basis.ofVectorSpace K V;\n ∑ i : ↑(Basis.ofVectorSpaceIndex K V), bV i ⊗ₜ[K] bV.coord i", " (((Basis.singleton Unit K).constr K) fun x =>\n ∑ i : ↑(Basis.ofVectorSpaceIndex K V), (Basis.ofVectorSpace K V) i ⊗ₜ[K] (Basis.ofVectorSpace K V).coord i)\n 1 =\n ...
[ " (coevaluation K V) 1 =\n let bV := Basis.ofVectorSpace K V;\n ∑ i : ↑(Basis.ofVectorSpaceIndex K V), bV i ⊗ₜ[K] bV.coord i", " (((Basis.singleton Unit K).constr K) fun x =>\n ∑ i : ↑(Basis.ofVectorSpaceIndex K V), (Basis.ofVectorSpace K V) i ⊗ₜ[K] (Basis.ofVectorSpace K V).coord i)\n 1 =\n ...
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct import Mathlib.LinearAlgebra.QuadraticForm.Basic universe uR uA uM₁ uM₂ variable {R : Type uR} {A : Type uA} {M₁ : Type uM₁} {M₂ : Type uM₂} open TensorProduct open LinearMap (BilinForm) namespace QuadraticForm section CommRing variable [CommRing R] [CommR...
Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean
69
75
theorem associated_tmul [Invertible (2 : A)] (Q₁ : QuadraticForm A M₁) (Q₂ : QuadraticForm R M₂) : associated (R := A) (Q₁.tmul Q₂) = (associated (R := A) Q₁).tmul (associated (R := R) Q₂) := by
rw [QuadraticForm.tmul, tensorDistrib, BilinForm.tmul] dsimp have : Subsingleton (Invertible (2 : A)) := inferInstance convert associated_left_inverse A ((associated_isSymm A Q₁).tmul (associated_isSymm R Q₂))
[ " associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)", " associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ...
[]
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {α : Type*} section Disjoint ...
Mathlib/GroupTheory/Perm/Support.lean
130
135
theorem disjoint_prod_right (l : List (Perm α)) (h : ∀ g ∈ l, Disjoint f g) : Disjoint f l.prod := by
induction' l with g l ih · exact disjoint_one_right _ · rw [List.prod_cons] exact (h _ (List.mem_cons_self _ _)).mul_right (ih fun g hg => h g (List.mem_cons_of_mem _ hg))
[ " f.Disjoint g → g.Disjoint f", " (f * g) x = (g * f) x", " f.Disjoint f ↔ f = 1", " f = 1", " f x = 1 x", " f⁻¹.Disjoint g", " f⁻¹ x = x ∨ g x = x", " f x = x ∨ g x = x", " f⁻¹.Disjoint g ↔ f.Disjoint g", " f.Disjoint g", " f.Disjoint g⁻¹ ↔ f.Disjoint g", " (f * g) x = x ∨ h x = x", " f.Dis...
[ " f.Disjoint g → g.Disjoint f", " (f * g) x = (g * f) x", " f.Disjoint f ↔ f = 1", " f = 1", " f x = 1 x", " f⁻¹.Disjoint g", " f⁻¹ x = x ∨ g x = x", " f x = x ∨ g x = x", " f⁻¹.Disjoint g ↔ f.Disjoint g", " f.Disjoint g", " f.Disjoint g⁻¹ ↔ f.Disjoint g", " (f * g) x = x ∨ h x = x", " f.Dis...
import Batteries.Data.UnionFind.Basic namespace Batteries.UnionFind @[simp] theorem arr_empty : empty.arr = #[] := rfl @[simp] theorem parent_empty : empty.parent a = a := rfl @[simp] theorem rank_empty : empty.rank a = 0 := rfl @[simp] theorem rootD_empty : empty.rootD a = a := rfl @[simp] theorem arr_push {m : Un...
.lake/packages/batteries/Batteries/Data/UnionFind/Lemmas.lean
115
134
theorem equiv_link {self : UnionFind} {x y : Fin self.size} (xroot : self.parent x = x) (yroot : self.parent y = y) : Equiv (link self x y yroot) a b ↔ Equiv self a b ∨ Equiv self a x ∧ Equiv self y b ∨ Equiv self a y ∧ Equiv self x b := by
have {m : UnionFind} {x y : Fin self.size} (xroot : self.rootD x = x) (yroot : self.rootD y = y) (hm : ∀ i, m.rootD i = if self.rootD i = x ∨ self.rootD i = y then x.1 else self.rootD i) : Equiv m a b ↔ Equiv self a b ∨ Equiv self a x ∧ Equiv self y b ∨ Equiv self a y ∧ Equiv self x b := by ...
[ " parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a", " (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a", " (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr...
[ " parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a", " (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a", " (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr...
import Mathlib.Algebra.Module.Defs import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.TensorProduct.Tower #align_import algebra.module.projective from "leanprover-community/mathlib"@"405ea5cee7a7070ff8fb8dcb4cfb003532e34bce" universe u v open LinearMap ...
Mathlib/Algebra/Module/Projective.lean
156
163
theorem Projective.of_basis {ι : Type*} (b : Basis ι R P) : Projective R P := by
-- need P →ₗ (P →₀ R) for definition of projective. -- get it from `ι → (P →₀ R)` coming from `b`. use b.constr ℕ fun i => Finsupp.single (b i) (1 : R) intro m simp only [b.constr_apply, mul_one, id, Finsupp.smul_single', Finsupp.total_single, map_finsupp_sum] exact b.total_repr m
[ " Projective R P", " Function.LeftInverse ⇑(Finsupp.total P P R id) ⇑((b.constr ℕ) fun i => Finsupp.single (b i) 1)", " (Finsupp.total P P R id) (((b.constr ℕ) fun i => Finsupp.single (b i) 1) m) = m", " ((b.repr m).sum fun a b_1 => b_1 • b a) = m" ]
[]
import Mathlib.SetTheory.Cardinal.Finite #align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" noncomputable section open scoped Classical variable {α β γ : Type*} def Finite.equivFin (α : Type*) [Finite α] : α ≃ Fin (Nat.card α) := by have := (Finite....
Mathlib/Data/Finite/Card.lean
72
75
theorem card_eq [Finite α] [Finite β] : Nat.card α = Nat.card β ↔ Nonempty (α ≃ β) := by
haveI := Fintype.ofFinite α haveI := Fintype.ofFinite β simp only [Nat.card_eq_fintype_card, Fintype.card_eq]
[ " α ≃ Fin (Nat.card α)", " α ≃ Fin n", " Nat.card α = if h : Finite α then Fintype.card α else 0", " 0 < Nat.card α ↔ Nonempty α", " Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)" ]
[ " α ≃ Fin (Nat.card α)", " α ≃ Fin n", " Nat.card α = if h : Finite α then Fintype.card α else 0", " 0 < Nat.card α ↔ Nonempty α" ]
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
161
164
theorem _root_.Finset.sum_single_ite [Fintype n] (a : R) (i : n) : (∑ x : n, Finsupp.single x (if i = x then a else 0)) = Finsupp.single i a := by
simp only [apply_ite (Finsupp.single _), Finsupp.single_zero, Finset.sum_ite_eq, if_pos (Finset.mem_univ _)]
[ " ∑ x : n, single x (if i = x then a else 0) = single i a" ]
[]
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b...
Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
285
286
theorem map_add₂ (f : M →SL[ρ₁₂] F →SL[σ₁₂] G') (x x' : M) (y : F) : f (x + x') y = f x y + f x' y := by
rw [f.map_add, add_apply]
[ " (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2", " ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝", " (c • p).1.prod (c • p).2 = c • p.1.prod p.2", " ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝", " ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co...
[ " (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2", " ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝", " (c • p).1.prod (c • p).2 = c • p.1.prod p.2", " ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝", " ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co...
import Mathlib.RepresentationTheory.Action.Limits import Mathlib.RepresentationTheory.Action.Concrete import Mathlib.CategoryTheory.Monoidal.FunctorCategory import Mathlib.CategoryTheory.Monoidal.Transport import Mathlib.CategoryTheory.Monoidal.Rigid.OfEquivalence import Mathlib.CategoryTheory.Monoidal.Rigid.FunctorCa...
Mathlib/RepresentationTheory/Action/Monoidal.lean
112
114
theorem rightUnitor_hom_hom {X : Action V G} : Hom.hom (ρ_ X).hom = (ρ_ X.V).hom := by
dsimp simp
[ " (α_ X Y Z).hom.hom = (α_ X.V Y.V Z.V).hom", " (𝟙 (X.V ⊗ Y.V) ⊗ 𝟙 Z.V) ≫ (α_ X.V Y.V Z.V).hom ≫ (𝟙 X.V ⊗ 𝟙 (Y.V ⊗ Z.V)) = (α_ X.V Y.V Z.V).hom", " (α_ X Y Z).inv.hom = (α_ X.V Y.V Z.V).inv", " ((𝟙 X.V ⊗ 𝟙 (Y.V ⊗ Z.V)) ≫ (α_ X.V Y.V Z.V).inv) ≫ (𝟙 (X.V ⊗ Y.V) ⊗ 𝟙 Z.V) = (α_ X.V Y.V Z.V).inv", " (λ_ ...
[ " (α_ X Y Z).hom.hom = (α_ X.V Y.V Z.V).hom", " (𝟙 (X.V ⊗ Y.V) ⊗ 𝟙 Z.V) ≫ (α_ X.V Y.V Z.V).hom ≫ (𝟙 X.V ⊗ 𝟙 (Y.V ⊗ Z.V)) = (α_ X.V Y.V Z.V).hom", " (α_ X Y Z).inv.hom = (α_ X.V Y.V Z.V).inv", " ((𝟙 X.V ⊗ 𝟙 (Y.V ⊗ Z.V)) ≫ (α_ X.V Y.V Z.V).inv) ≫ (𝟙 (X.V ⊗ Y.V) ⊗ 𝟙 Z.V) = (α_ X.V Y.V Z.V).inv", " (λ_ ...
import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.FieldDivision #align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3" namespace Po...
Mathlib/RingTheory/Polynomial/Content.lean
142
142
theorem content_X : content (X : R[X]) = 1 := by
rw [← mul_one X, content_X_mul, content_one]
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
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
138
138
theorem inv_neg_one : (-1 : K)⁻¹ = -1 := by
rw [← neg_inv, inv_one]
[ " -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)", " -(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)", " -b / a = -(b / a)", " -(b / a) = -...