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.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.concrete from "leanprover-community/mathlib"@"00638177efd1b2534fc5269363ebf42a7871df9a" open Equiv Equiv.Perm List variable {Ξ± : Type*} namespace Equiv.Perm secti...
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
245
246
theorem get_toList (n : β„•) (hn : n < length (toList p x)) : (toList p x).get ⟨n, hn⟩ = (p ^ n) x := by
simp [toList]
[ " toList 1 x = []", " p.toList x = [] ↔ x βˆ‰ p.support", " (p.toList x).length = (p.cycleOf x).support.card", " p.toList x β‰  [y]", " False", " 2 ≀ (p.toList x).length ↔ x ∈ p.support", " (p.toList x).get ⟨n, hn⟩ = (p ^ n) x" ]
[ " toList 1 x = []", " p.toList x = [] ↔ x βˆ‰ p.support", " (p.toList x).length = (p.cycleOf x).support.card", " p.toList x β‰  [y]", " False", " 2 ≀ (p.toList x).length ↔ x ∈ p.support" ]
import Mathlib.CategoryTheory.Groupoid import Mathlib.Combinatorics.Quiver.Basic #align_import category_theory.groupoid.basic from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" namespace CategoryTheory namespace Groupoid variable (C : Type*) [Groupoid C] section Thin
Mathlib/CategoryTheory/Groupoid/Basic.lean
23
30
theorem isThin_iff : Quiver.IsThin C ↔ βˆ€ c : C, Subsingleton (c ⟢ c) := by
refine ⟨fun h c => h c c, fun h c d => Subsingleton.intro fun f g => ?_⟩ haveI := h d calc f = f ≫ inv g ≫ g := by simp only [inv_eq_inv, IsIso.inv_hom_id, Category.comp_id] _ = f ≫ inv f ≫ g := by congr 1 simp only [inv_eq_inv, IsIso.inv_hom_id, eq_iff_true_of_subsingleton] ...
[ " Quiver.IsThin C ↔ βˆ€ (c : C), Subsingleton (c ⟢ c)", " f = g", " f = f ≫ inv g ≫ g", " f ≫ inv g ≫ g = f ≫ inv f ≫ g", " inv g ≫ g = inv f ≫ g", " f ≫ inv f ≫ g = g" ]
[]
import Mathlib.Algebra.Lie.Semisimple.Defs import Mathlib.Order.BooleanGenerators #align_import algebra.lie.semisimple from "leanprover-community/mathlib"@"356447fe00e75e54777321045cdff7c9ea212e60" namespace LieAlgebra variable (R L : Type*) [CommRing R] [LieRing L] [LieAlgebra R L] variable {R L} in theorem Has...
Mathlib/Algebra/Lie/Semisimple/Basic.lean
71
77
theorem hasTrivialRadical_iff_no_abelian_ideals : HasTrivialRadical R L ↔ βˆ€ I : LieIdeal R L, IsLieAbelian I β†’ I = βŠ₯ := by
rw [hasTrivialRadical_iff_no_solvable_ideals] constructor <;> intro h₁ I hβ‚‚ Β· exact h₁ _ <| LieAlgebra.ofAbelianIsSolvable R I Β· rw [← abelian_of_solvable_ideal_eq_bot_iff] exact h₁ _ <| abelian_derivedAbelianOfIdeal I
[ " HasTrivialRadical R L ↔ βˆ€ (I : LieIdeal R L), IsLieAbelian β†₯↑I β†’ I = βŠ₯", " (βˆ€ (I : LieIdeal R L), IsSolvable R β†₯↑I β†’ I = βŠ₯) ↔ βˆ€ (I : LieIdeal R L), IsLieAbelian β†₯↑I β†’ I = βŠ₯", " (βˆ€ (I : LieIdeal R L), IsSolvable R β†₯↑I β†’ I = βŠ₯) β†’ βˆ€ (I : LieIdeal R L), IsLieAbelian β†₯↑I β†’ I = βŠ₯", " (βˆ€ (I : LieIdeal R L), IsLieA...
[]
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.euclidean_domain.defs from "leanprover-community/mathlib"@"ee7b9f9a9ac2a8d9f04ea39bbfe6b1a3be053b38" universe u class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R ...
Mathlib/Algebra/EuclideanDomain/Defs.lean
136
138
theorem div_add_mod' (m k : R) : m / k * k + m % k = m := by
rw [mul_comm] exact div_add_mod _ _
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m" ]
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m" ]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.Algebra.Star.Subalgebra import Mathlib.Algebra.Star.Unitary import Mathlib.Topology.Algebra.Module.Star #align_import analysis.no...
Mathlib/Analysis/NormedSpace/Star/Basic.lean
140
141
theorem star_mul_self_ne_zero_iff (x : E) : x⋆ * x β‰  0 ↔ x β‰  0 := by
simp only [Ne, star_mul_self_eq_zero_iff]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–", " βˆ€ (x : E), β€–x⋆‖ = β€–xβ€–", " β€–x⋆‖ = β€–xβ€–", " β€–x⋆‖ * β€–x⋆‖ = β€–x * x⋆‖", " β€–x * x⋆‖ = β€–xβ€– * β€–xβ€–", " β€–x⋆⋆ * x⋆‖ = β€–xβ€– * β€–xβ€–", " β€–x⋆ * xβ€– = β€–x⋆‖ * β€–xβ€–", " x⋆ * x = 0 ↔ x = 0", " β€–xβ€– * β€–xβ€– = 0 ↔ x = 0", " x⋆ * x β‰  0 ↔ x β‰  0" ]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–", " βˆ€ (x : E), β€–x⋆‖ = β€–xβ€–", " β€–x⋆‖ = β€–xβ€–", " β€–x⋆‖ * β€–x⋆‖ = β€–x * x⋆‖", " β€–x * x⋆‖ = β€–xβ€– * β€–xβ€–", " β€–x⋆⋆ * x⋆‖ = β€–xβ€– * β€–xβ€–", " β€–x⋆ * xβ€– = β€–x⋆‖ * β€–xβ€–", " x⋆ * x = 0 ↔ x = 0", " β€–xβ€– * β€–xβ€– = 0 ↔ x = 0" ]
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.Calculus.Deriv.Basic open Topology InnerProductSpace Set noncomputable section variable {π•œ F : Type*} [RCLike π•œ] variable [NormedAddCommGroup F] [InnerProductSpace π•œ F] [CompleteSpace F] variabl...
Mathlib/Analysis/Calculus/Gradient/Basic.lean
162
166
theorem HasDerivAtFilter.hasGradientAtFilter (h : HasDerivAtFilter g g' u L') : HasGradientAtFilter g (starRingEnd π•œ g') u L' := by
have : ContinuousLinearMap.smulRight (1 : π•œ β†’L[π•œ] π•œ) g' = (toDual π•œ π•œ) (starRingEnd π•œ g') := by ext; simp rwa [HasGradientAtFilter, ← this]
[ " HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual π•œ F).symm frechet) s x", " HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual π•œ F).symm frechet) x", " βˆ‡ f x = 0", " HasGradientAt f (βˆ‡ f x) x", " HasFDerivAt f (fderiv π•œ f x) x", " HasGradientWithinAt f (gradientWithin f s x) s x", "...
[ " HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual π•œ F).symm frechet) s x", " HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual π•œ F).symm frechet) x", " βˆ‡ f x = 0", " HasGradientAt f (βˆ‡ f x) x", " HasFDerivAt f (fderiv π•œ f x) x", " HasGradientWithinAt f (gradientWithin f s x) s x", "...
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
98
101
theorem hyperoperation_two_two_eq_four (n : β„•) : hyperoperation (n + 1) 2 2 = 4 := by
induction' n with nn nih Β· rw [hyperoperation_one] Β· rw [hyperoperation_recursion, hyperoperation_ge_two_eq_self, nih]
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
import Mathlib.Algebra.Homology.ImageToKernel #align_import algebra.homology.exact from "leanprover-community/mathlib"@"3feb151caefe53df080ca6ca67a0c6685cfd1b82" universe v vβ‚‚ u uβ‚‚ open CategoryTheory CategoryTheory.Limits variable {V : Type u} [Category.{v} V] variable [HasImages V] namespace CategoryTheory ...
Mathlib/Algebra/Homology/Exact.lean
99
110
theorem Preadditive.exact_of_iso_of_exact {A₁ B₁ C₁ Aβ‚‚ Bβ‚‚ Cβ‚‚ : V} (f₁ : A₁ ⟢ B₁) (g₁ : B₁ ⟢ C₁) (fβ‚‚ : Aβ‚‚ ⟢ Bβ‚‚) (gβ‚‚ : Bβ‚‚ ⟢ Cβ‚‚) (Ξ± : Arrow.mk f₁ β‰… Arrow.mk fβ‚‚) (Ξ² : Arrow.mk g₁ β‰… Arrow.mk gβ‚‚) (p : Ξ±.hom.right = Ξ².hom.left) (h : Exact f₁ g₁) : Exact fβ‚‚ gβ‚‚ := by
rw [Preadditive.exact_iff_homology'_zero] at h ⊒ rcases h with ⟨w₁, ⟨i⟩⟩ suffices wβ‚‚ : fβ‚‚ ≫ gβ‚‚ = 0 from ⟨wβ‚‚, ⟨(homology'.mapIso w₁ wβ‚‚ Ξ± Ξ² p).symm.trans i⟩⟩ rw [← cancel_epi Ξ±.hom.left, ← cancel_mono Ξ².inv.right, comp_zero, zero_comp, ← w₁] have eq₁ := Ξ².inv.w have eqβ‚‚ := Ξ±.hom.w dsimp at eq₁ eqβ‚‚ simp o...
[ " homology' f g β‹― β‰… 0", " Exact f g", " cokernel.Ο€ (imageToKernel f g w) ≫ i.hom = 0 ≫ i.hom", " Exact fβ‚‚ gβ‚‚", " βˆƒ (w : fβ‚‚ ≫ gβ‚‚ = 0), Nonempty (homology' fβ‚‚ gβ‚‚ w β‰… 0)", " fβ‚‚ ≫ gβ‚‚ = 0", " (Ξ±.hom.left ≫ fβ‚‚ ≫ gβ‚‚) ≫ Ξ².inv.right = f₁ ≫ g₁" ]
[ " homology' f g β‹― β‰… 0", " Exact f g", " cokernel.Ο€ (imageToKernel f g w) ≫ i.hom = 0 ≫ i.hom" ]
import Mathlib.Data.List.Range import Mathlib.Algebra.Order.Ring.Nat variable {Ξ± : Type*} namespace List @[simp] theorem length_iterate (f : Ξ± β†’ Ξ±) (a : Ξ±) (n : β„•) : length (iterate f a n) = n := by induction n generalizing a <;> simp [*] @[simp] theorem iterate_eq_nil {f : Ξ± β†’ Ξ±} {a : Ξ±} {n : β„•} : iterate f ...
Mathlib/Data/List/Iterate.lean
44
46
theorem range_map_iterate (n : β„•) (f : Ξ± β†’ Ξ±) (a : Ξ±) : (List.range n).map (f^[Β·] a) = List.iterate f a n := by
apply List.ext_get <;> simp
[ " (iterate f a n).length = n", " (iterate f a 0).length = 0", " (iterate f a (n✝ + 1)).length = n✝ + 1", " iterate f a n = [] ↔ n = 0", " (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)", " i < n", " ↑i < n", " b ∈ iterate f a n ↔ βˆƒ m < n, b = f^[m] a", " map (fun x => f^[x] a) (range n) = i...
[ " (iterate f a n).length = n", " (iterate f a 0).length = 0", " (iterate f a (n✝ + 1)).length = n✝ + 1", " iterate f a n = [] ↔ n = 0", " (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)", " i < n", " ↑i < n", " b ∈ iterate f a n ↔ βˆƒ m < n, b = f^[m] a" ]
import Mathlib.Data.SetLike.Basic import Mathlib.Data.Finset.Preimage import Mathlib.ModelTheory.Semantics #align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u v w u₁ namespace Set variable {M : Type w} (A : Set M) (L : FirstOrder.Lang...
Mathlib/ModelTheory/Definability.lean
75
78
theorem empty_definable_iff : (βˆ… : Set M).Definable L s ↔ βˆƒ Ο† : L.Formula Ξ±, s = setOf Ο†.Realize := by
rw [Definable, Equiv.exists_congr_left (LEquiv.addEmptyConstants L (βˆ… : Set M)).onFormula] simp [-constantsOn]
[ " A.Definable L' s", " A.Definable L' (setOf ψ.Realize)", " setOf ψ.Realize = setOf ((LHom.addConstants (↑A) Ο†).onFormula ψ).Realize", " x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) Ο†).onFormula ψ).Realize", " A.Definable L s ↔ βˆƒ Ο†, s = {v | Ο†.Realize (Sum.elim Subtype.val v)}", " (βˆƒ b, s = se...
[ " A.Definable L' s", " A.Definable L' (setOf ψ.Realize)", " setOf ψ.Realize = setOf ((LHom.addConstants (↑A) Ο†).onFormula ψ).Realize", " x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) Ο†).onFormula ψ).Realize", " A.Definable L s ↔ βˆƒ Ο†, s = {v | Ο†.Realize (Sum.elim Subtype.val v)}", " (βˆƒ b, s = se...
import Mathlib.Init.Function import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Inhabit #align_import data.prod.basic from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408" variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} @[simp] theorem Prod.map_apply (f : Ξ± β†’ Ξ³) (g : Ξ² β†’ Ξ΄...
Mathlib/Data/Prod/Basic.lean
105
107
theorem mk.inj_left {Ξ± Ξ² : Type*} (a : Ξ±) : Function.Injective (Prod.mk a : Ξ² β†’ Ξ± Γ— Ξ²) := by
intro b₁ bβ‚‚ h simpa only [true_and, Prod.mk.inj_iff, eq_self_iff_true] using h
[ " Function.Injective (mk a)", " b₁ = bβ‚‚" ]
[]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.Topology.Sets.Compacts #align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topo...
Mathlib/Topology/MetricSpace/Closeds.lean
74
84
theorem isClosed_subsets_of_isClosed (hs : IsClosed s) : IsClosed { t : Closeds Ξ± | (t : Set Ξ±) βŠ† s } := by
refine isClosed_of_closure_subset fun (t : Closeds Ξ±) (ht : t ∈ closure {t : Closeds Ξ± | (t : Set Ξ±) βŠ† s}) (x : Ξ±) (hx : x ∈ t) => ?_ have : x ∈ closure s := by refine mem_closure_iff.2 fun Ξ΅ Ξ΅pos => ?_ obtain ⟨u : Closeds Ξ±, hu : u ∈ {t : Closeds Ξ± | (t : Set Ξ±) βŠ† s}, Dtu : edist t u < Ρ⟩ := mem...
[ " Continuous fun p => infEdist p.1 ↑p.2", " 2 β‰  ⊀", " βˆ€ (x y : Ξ± Γ— Closeds Ξ±), infEdist x.1 ↑x.2 ≀ infEdist y.1 ↑y.2 + 2 * edist x y", " infEdist (x, s).1 ↑(x, s).2 ≀ infEdist (y, t).1 ↑(y, t).2 + 2 * edist (x, s) (y, t)", " infEdist y ↑t + edist x y + hausdorffEdist ↑t ↑s = infEdist y ↑t + (edist x y + hau...
[ " Continuous fun p => infEdist p.1 ↑p.2", " 2 β‰  ⊀", " βˆ€ (x y : Ξ± Γ— Closeds Ξ±), infEdist x.1 ↑x.2 ≀ infEdist y.1 ↑y.2 + 2 * edist x y", " infEdist (x, s).1 ↑(x, s).2 ≀ infEdist (y, t).1 ↑(y, t).2 + 2 * edist (x, s) (y, t)", " infEdist y ↑t + edist x y + hausdorffEdist ↑t ↑s = infEdist y ↑t + (edist x y + hau...
import Mathlib.Algebra.Algebra.Subalgebra.Unitization import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.StarSubalgebra import Mathlib.Topology.ContinuousFunction.ContinuousMapZero import Mathlib.Topology.ContinuousFunction.Weierstrass #align_import topology.continuous_function.stone_weierstrass fro...
Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean
159
165
theorem sup_mem_closed_subalgebra (A : Subalgebra ℝ C(X, ℝ)) (h : IsClosed (A : Set C(X, ℝ))) (f g : A) : (f : C(X, ℝ)) βŠ” (g : C(X, ℝ)) ∈ A := by
convert sup_mem_subalgebra_closure A f g apply SetLike.ext' symm erw [closure_eq_iff_isClosed] exact h
[ " (g.toContinuousMapOn (Set.Icc (-β€–fβ€–) β€–fβ€–)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)", " ((g.toContinuousMapOn (Set.Icc (-β€–fβ€–) β€–fβ€–)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝", " Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g", " (g.toContinuousMapOn (Set.Icc (...
[ " (g.toContinuousMapOn (Set.Icc (-β€–fβ€–) β€–fβ€–)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)", " ((g.toContinuousMapOn (Set.Icc (-β€–fβ€–) β€–fβ€–)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝", " Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g", " (g.toContinuousMapOn (Set.Icc (...
import Mathlib.AlgebraicTopology.SimplexCategory import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Instances.NNReal #align_import algebraic_topology.topological_simplex from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" set_option linter.uppercaseLean3 false noncomp...
Mathlib/AlgebraicTopology/TopologicalSimplex.lean
65
68
theorem continuous_toTopMap {x y : SimplexCategory} (f : x ⟢ y) : Continuous (toTopMap f) := by
refine Continuous.subtype_mk (continuous_pi fun i => ?_) _ dsimp only [coe_toTopMap] exact continuous_finset_sum _ (fun j _ => (continuous_apply _).comp continuous_subtype_val)
[ " (fun i => βˆ‘ j ∈ Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g j) ∈ y.toTopObj", " βˆ‘ i : (forget SimplexCategory).obj y, βˆ‘ x_1 ∈ Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g x_1 = 1", " βˆ‘ x_1 ∈ Finset.univ.biUnion fun i => Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g x_1 = 1", " (Finse...
[ " (fun i => βˆ‘ j ∈ Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g j) ∈ y.toTopObj", " βˆ‘ i : (forget SimplexCategory).obj y, βˆ‘ x_1 ∈ Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g x_1 = 1", " βˆ‘ x_1 ∈ Finset.univ.biUnion fun i => Finset.filter (fun x_1 => f x_1 = i) Finset.univ, ↑g x_1 = 1", " (Finse...
import Mathlib.Data.Fintype.Card import Mathlib.Computability.Language import Mathlib.Tactic.NormNum #align_import computability.DFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Computability universe u v -- Porting note: Required as `DFA` is used in mathlib3 set_option li...
Mathlib/Computability/DFA.lean
64
66
theorem evalFrom_append_singleton (s : Οƒ) (x : List Ξ±) (a : Ξ±) : M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a := by
simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil]
[ " M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a" ]
[]
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Data.Finset.Sym import Mathlib.Data.Matrix.Basic #align_import combinatorics.simple_graph.inc_matrix from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496" open Finset Matrix SimpleGraph Sym2 open Matrix namespace SimpleGraph...
Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean
126
131
theorem incMatrix_mul_transpose_diag [Fintype (neighborSet G a)] : (G.incMatrix R * (G.incMatrix R)α΅€) a a = G.degree a := by
classical rw [← sum_incMatrix_apply] simp only [mul_apply, incMatrix_apply', transpose_apply, mul_ite, mul_one, mul_zero] simp_all only [ite_true, sum_boole]
[ " incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0", " (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0", " βˆ‘ e : Sym2 Ξ±, incMatrix R G a e = ↑(G.degree a)", " (incMatrix R G * (incMatrix R G)α΅€) a a = ↑(G.degree a)", " (incMatrix R G * (incMatrix R G)α΅€) a a = βˆ‘ e : ...
[ " incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0", " (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0", " βˆ‘ e : Sym2 Ξ±, incMatrix R G a e = ↑(G.degree a)" ]
import Mathlib.Algebra.Order.Floor import Mathlib.Topology.Algebra.Order.Group import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.floor from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Filter Function Int Set Topology variable {Ξ± Ξ² Ξ³ : Type*} [LinearOrdere...
Mathlib/Topology/Algebra/Order/Floor.lean
84
85
theorem tendsto_ceil_left_pure (n : β„€) : Tendsto (ceil : Ξ± β†’ β„€) (𝓝[≀] n) (pure n) := by
simpa only [ceil_intCast] using tendsto_ceil_left_pure_ceil (n : Ξ±)
[ " b ≀ βŒŠβ†‘(b + 1)βŒ‹", " b ≀ b + 1", " βŒˆβ†‘(b - 1)βŒ‰ ≀ b", " b - 1 ≀ b", " Tendsto floor (𝓝[β‰₯] ↑n) (pure n)", " Tendsto ceil (𝓝[≀] ↑n) (pure n)" ]
[ " b ≀ βŒŠβ†‘(b + 1)βŒ‹", " b ≀ b + 1", " βŒˆβ†‘(b - 1)βŒ‰ ≀ b", " b - 1 ≀ b", " Tendsto floor (𝓝[β‰₯] ↑n) (pure n)" ]
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Nat.Cast.Order import Mathlib.Tactic.Common #align_import data.nat.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" namespace Nat variable {Ξ± : Type*} @[simp] theorem cast_div [DivisionSemiring Ξ±] {m n : β„•} (n_...
Mathlib/Data/Nat/Cast/Field.lean
53
58
theorem cast_div_le {m n : β„•} : ((m / n : β„•) : Ξ±) ≀ m / n := by
cases n Β· rw [cast_zero, div_zero, Nat.div_zero, cast_zero] rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le] Β· exact Nat.div_mul_le_self m _ Β· exact Nat.cast_pos.2 (Nat.succ_pos _)
[ " ↑(m / n) = ↑m / ↑n", " ↑(n * k / n) = ↑(n * k) / ↑n", " n β‰  0", " False", " ↑(m / d) / ↑(n / d) = ↑m / ↑n", " ↑(m / 0) / ↑(n / 0) = ↑m / ↑n", " ↑d β‰  0", " (↑0)⁻¹ ≀ 1", " 1 ≀ ↑(n + 1)", " ↑(m / n) ≀ ↑m / ↑n", " ↑(m / 0) ≀ ↑m / ↑0", " ↑(m / (n✝ + 1)) ≀ ↑m / ↑(n✝ + 1)", " m / (n✝ + 1) * (n✝ +...
[ " ↑(m / n) = ↑m / ↑n", " ↑(n * k / n) = ↑(n * k) / ↑n", " n β‰  0", " False", " ↑(m / d) / ↑(n / d) = ↑m / ↑n", " ↑(m / 0) / ↑(n / 0) = ↑m / ↑n", " ↑d β‰  0", " (↑0)⁻¹ ≀ 1", " 1 ≀ ↑(n + 1)" ]
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
130
131
theorem toPGame_lf {a b : Ordinal} (h : a < b) : a.toPGame ⧏ b.toPGame := by
convert moveLeft_lf (toLeftMovesToPGame ⟨a, h⟩); rw [toPGame_moveLeft]
[ " 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.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
159
168
theorem append_bind {Ξ± Ξ²} (xs : LazyList Ξ±) (ys : Thunk (LazyList Ξ±)) (f : Ξ± β†’ LazyList Ξ²) : (xs.append ys).bind f = (xs.bind f).append (ys.get.bind f) := by
match xs with | LazyList.nil => simp only [append, Thunk.get, LazyList.bind] | LazyList.cons x xs => simp only [append, Thunk.get, LazyList.bind] have := append_bind xs.get ys f simp only [Thunk.get] at this rw [this, append_assoc]
[ " 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.Algebra.Algebra.Tower import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.tower from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496" variable (R A B : Type*) {Οƒ : Type*} namespace MvPolynomial section CommSemiring variable [CommSemiring R] ...
Mathlib/RingTheory/MvPolynomial/Tower.lean
56
59
theorem aeval_algebraMap_eq_zero_iff [NoZeroSMulDivisors A B] [Nontrivial B] (x : Οƒ β†’ A) (p : MvPolynomial Οƒ R) : aeval (algebraMap A B ∘ x) p = 0 ↔ aeval x p = 0 := by
rw [aeval_algebraMap_apply, Algebra.algebraMap_eq_smul_one, smul_eq_zero, iff_false_intro (one_ne_zero' B), or_false_iff]
[ " (aeval (⇑(algebraMap A B) ∘ x)) p = (algebraMap A B) ((aeval x) p)", " (evalβ‚‚Hom (algebraMap R B) (⇑(algebraMap A B) ∘ x)) p = (evalβ‚‚Hom (algebraMap R B) fun i => (algebraMap A B) (x i)) p", " (aeval (⇑(algebraMap A B) ∘ x)) p = 0 ↔ (aeval x) p = 0" ]
[ " (aeval (⇑(algebraMap A B) ∘ x)) p = (algebraMap A B) ((aeval x) p)", " (evalβ‚‚Hom (algebraMap R B) (⇑(algebraMap A B) ∘ x)) p = (evalβ‚‚Hom (algebraMap R B) fun i => (algebraMap A B) (x i)) p" ]
import Mathlib.Order.CompleteLattice import Mathlib.Order.GaloisConnection import Mathlib.Data.Set.Lattice import Mathlib.Tactic.AdaptationNote #align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" variable {Ξ± Ξ² Ξ³ : Type*} def Rel (Ξ± Ξ² : Type*) := Ξ± β†’ Ξ² β†’ Prop --...
Mathlib/Data/Rel.lean
104
108
theorem comp_assoc {Ξ΄ : Type*} (r : Rel Ξ± Ξ²) (s : Rel Ξ² Ξ³) (t : Rel Ξ³ Ξ΄) : (r β€’ s) β€’ t = r β€’ (s β€’ t) := by
unfold comp; ext (x w); constructor · rintro ⟨z, ⟨y, rxy, syz⟩, tzw⟩; exact ⟨y, rxy, z, syz, tzw⟩ · rintro ⟨y, rxy, z, syz, tzw⟩; exact ⟨z, ⟨y, rxy, syz⟩, tzw⟩
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom", " x ∈ r.inv.dom ↔ x ∈ r.codom", " (r β€’ s) β€’ t = r β€’ s β€’ t", " (fun x z => βˆƒ y, (βˆƒ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => βˆƒ y, r x y ∧ βˆƒ y_1, s y y_1 ∧ t y_1 z", " (βˆƒ y, ...
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom", " x ∈ r.inv.dom ↔ x ∈ r.codom" ]
import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.ContinuousFunction.Compact import Mathlib.Topology.UrysohnsLemma import Mathlib.Analysis.RCLike.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Topology.Algebra.Module.CharacterSpace #align_import topology.continuous_function.ideals from "...
Mathlib/Topology/ContinuousFunction/Ideals.lean
128
132
theorem setOfIdeal_open [T2Space R] (I : Ideal C(X, R)) : IsOpen (setOfIdeal I) := by
simp only [setOfIdeal, Set.setOf_forall, isOpen_compl_iff] exact isClosed_iInter fun f => isClosed_iInter fun _ => isClosed_eq (map_continuous f) continuous_const
[ " (f + g) x = 0", " IsClosed ↑(idealOfSet R s)", " IsClosed ↑{ carrier := β‹‚ i ∈ sᢜ, {x | x i = 0}, add_mem' := β‹―, zero_mem' := β‹― }", " f ∈ idealOfSet R s ↔ βˆ€ ⦃x : X⦄, x ∈ sᢜ β†’ f x = 0", " f βˆ‰ idealOfSet R s ↔ βˆƒ x ∈ sᢜ, f x β‰  0", " (Β¬βˆ€ ⦃x : X⦄, x ∈ sᢜ β†’ f x = 0) ↔ βˆƒ x ∈ sᢜ, f x β‰  0", " (βˆƒ x ∈ sᢜ, f x β‰  0...
[ " (f + g) x = 0", " IsClosed ↑(idealOfSet R s)", " IsClosed ↑{ carrier := β‹‚ i ∈ sᢜ, {x | x i = 0}, add_mem' := β‹―, zero_mem' := β‹― }", " f ∈ idealOfSet R s ↔ βˆ€ ⦃x : X⦄, x ∈ sᢜ β†’ f x = 0", " f βˆ‰ idealOfSet R s ↔ βˆƒ x ∈ sᢜ, f x β‰  0", " (Β¬βˆ€ ⦃x : X⦄, x ∈ sᢜ β†’ f x = 0) ↔ βˆƒ x ∈ sᢜ, f x β‰  0", " (βˆƒ x ∈ sᢜ, f x β‰  0...
import Mathlib.Data.Set.Subsingleton import Mathlib.Order.WithBot #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" universe u v open Function Set namespace Set variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ ΞΉ' : Sort*} theorem powerset_insert (s : Set Ξ±) (a : Ξ±)...
Mathlib/Data/Set/Image.lean
1,490
1,496
theorem injective_iff {Ξ± Ξ²} {f : Option Ξ± β†’ Ξ²} : Injective f ↔ Injective (f ∘ some) ∧ f none βˆ‰ range (f ∘ some) := by
simp only [mem_range, not_exists, (· ∘ ·)] refine ⟨fun hf => ⟨hf.comp (Option.some_injective _), fun x => hf.ne <| Option.some_ne_none _⟩, ?_⟩ rintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab exacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]
[ " 𝒫 insert a s = 𝒫 s βˆͺ insert a '' 𝒫 s", " t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s βˆͺ insert a '' 𝒫 s", " t βŠ† insert a s ↔ t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " t βŠ† insert a s β†’ t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " βˆƒ x βŠ† s, insert a x = t", " t \\ {a} βŠ† s", " t βŠ† insert a s", ...
[ " 𝒫 insert a s = 𝒫 s βˆͺ insert a '' 𝒫 s", " t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s βˆͺ insert a '' 𝒫 s", " t βŠ† insert a s ↔ t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " t βŠ† insert a s β†’ t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " t βŠ† s ∨ βˆƒ x βŠ† s, insert a x = t", " βˆƒ x βŠ† s, insert a x = t", " t \\ {a} βŠ† s", " t βŠ† insert a s", ...
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Extension variable {G ...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
226
230
theorem NormedAddGroupHom.extension_unique (f : NormedAddGroupHom G H) {g : NormedAddGroupHom (Completion G) H} (hg : βˆ€ v, f v = g v) : f.extension = g := by
ext v rw [NormedAddGroupHom.extension_coe_to_fun, Completion.extension_unique f.uniformContinuous g.uniformContinuous fun a => hg a]
[ " f.extension = g", " f.extension v = g v" ]
[]
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
124
124
theorem projIci_coe (x : Ici a) : projIci a x = x := by
cases x; apply projIci_of_mem
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIcc a b β‹― x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIci a x = ⟨x, hx⟩", " projIic b x = ⟨x, hx⟩", " projIcc a b h x = ⟨x, hx⟩", " projIci a ↑x = x...
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIcc a b β‹― x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIci a x = ⟨x, hx⟩", " projIic b x = ⟨x, hx⟩", " projIcc a b h x = ⟨x, hx⟩" ]
import Mathlib.Geometry.Euclidean.Circumcenter #align_import geometry.euclidean.monge_point from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0" noncomputable section open scoped Classical open scoped RealInnerProductSpace namespace Affine namespace Simplex open Finset AffineSubspac...
Mathlib/Geometry/Euclidean/MongePoint.lean
103
106
theorem mongePoint_eq_of_range_eq {n : β„•} {s₁ sβ‚‚ : Simplex ℝ P n} (h : Set.range s₁.points = Set.range sβ‚‚.points) : s₁.mongePoint = sβ‚‚.mongePoint := by
simp_rw [mongePoint_eq_smul_vsub_vadd_circumcenter, centroid_eq_of_range_eq h, circumcenter_eq_of_range_eq h]
[ " s₁.mongePoint = sβ‚‚.mongePoint" ]
[]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polyn...
Mathlib/Algebra/Polynomial/Eval.lean
73
73
theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by
simp [evalβ‚‚_eq_sum]
[ " evalβ‚‚ f x p = p.sum fun e a => f a * x ^ e", " f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ", " evalβ‚‚ f s Ο† = evalβ‚‚ f s Ο†", " evalβ‚‚ f 0 p = f (p.coeff 0)", " evalβ‚‚ f x 0 = 0", " evalβ‚‚ f x (C a) = f a", " evalβ‚‚ f x X = x" ]
[ " evalβ‚‚ f x p = p.sum fun e a => f a * x ^ e", " f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ", " evalβ‚‚ f s Ο† = evalβ‚‚ f s Ο†", " evalβ‚‚ f 0 p = f (p.coeff 0)", " evalβ‚‚ f x 0 = 0", " evalβ‚‚ f x (C a) = f a" ]
import Mathlib.FieldTheory.SeparableClosure import Mathlib.Algebra.CharP.IntermediateField open FiniteDimensional Polynomial IntermediateField Field noncomputable section universe u v w variable (F : Type u) (E : Type v) [Field F] [Field E] [Algebra F E] variable (K : Type w) [Field K] [Algebra F K] section per...
Mathlib/FieldTheory/PurelyInseparable.lean
287
289
theorem mem_perfectClosure_iff_natSepDegree_eq_one {x : E} : x ∈ perfectClosure F E ↔ (minpoly F x).natSepDegree = 1 := by
rw [mem_perfectClosure_iff, minpoly.natSepDegree_eq_one_iff_pow_mem (ringExpChar F)]
[ " βˆ€ {a b : E},\n a ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} β†’\n b ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} β†’\n a * b ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}", " x * y ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}", " (x * y) ...
[ " βˆ€ {a b : E},\n a ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} β†’\n b ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} β†’\n a * b ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}", " x * y ∈ {x | βˆƒ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}", " (x * y) ...
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormed...
Mathlib/Analysis/Calculus/Dslope.lean
91
95
theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) : ContinuousWithinAt f s b := by
have : ContinuousWithinAt (fun x => (x - a) β€’ dslope f a x + f a) s b := ((continuousWithinAt_id.sub continuousWithinAt_const).smul h).add continuousWithinAt_const simpa only [sub_smul_dslope, sub_add_cancel] using this
[ " dslope (⇑f ∘ g) a b = f (dslope g a b)", " dslope (⇑f ∘ g) b b = f (dslope g b b)", " deriv (⇑f ∘ g) b = f (deriv g b)", " (b - a) β€’ dslope f a b = f b - f a", " (b - b) β€’ dslope f b b = f b - f b", " dslope (fun x => (x - a) β€’ f x) a b = f b", " ContinuousAt (dslope f a) a ↔ DifferentiableAt π•œ f a",...
[ " dslope (⇑f ∘ g) a b = f (dslope g a b)", " dslope (⇑f ∘ g) b b = f (dslope g b b)", " deriv (⇑f ∘ g) b = f (deriv g b)", " (b - a) β€’ dslope f a b = f b - f a", " (b - b) β€’ dslope f b b = f b - f b", " dslope (fun x => (x - a) β€’ f x) a b = f b", " ContinuousAt (dslope f a) a ↔ DifferentiableAt π•œ f a" ...
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
166
167
theorem reflect_monomial (N n : β„•) : reflect N ((X : R[X]) ^ n) = X ^ revAt N n := by
rw [← one_mul (X ^ n), ← one_mul (X ^ revAt N n), ← C_1, reflect_C_mul_X_pow]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
import Mathlib.Data.Bracket import Mathlib.LinearAlgebra.Basic #align_import algebra.lie.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v w w₁ wβ‚‚ open Function class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where protected add_lie : βˆ€ x y z ...
Mathlib/Algebra/Lie/Basic.lean
151
153
theorem lie_skew : -⁅y, x⁆ = ⁅x, y⁆ := by
have h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0 := by rw [← lie_add]; apply lie_self simpa [neg_eq_iff_add_eq_zero] using h
[ " -⁅y, x⁆ = ⁅x, y⁆", " ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0", " ⁅x + y, x + y⁆ = 0" ]
[]
import Mathlib.CategoryTheory.Preadditive.Yoneda.Projective import Mathlib.CategoryTheory.Preadditive.Yoneda.Limits import Mathlib.Algebra.Category.ModuleCat.EpiMono universe v u namespace CategoryTheory open Limits Projective Opposite variable {C : Type u} [Category.{v} C] [Abelian C] noncomputable def preser...
Mathlib/CategoryTheory/Abelian/Projective.lean
37
42
theorem projective_of_preservesFiniteColimits_preadditiveCoyonedaObj (P : C) [hP : PreservesFiniteColimits (preadditiveCoyonedaObj (op P))] : Projective P := by
rw [projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj'] -- Porting note: this next line wasn't necessary in Lean 3 dsimp only [preadditiveCoyoneda] infer_instance
[ " PreservesFiniteColimits (preadditiveCoyonedaObj { unop := P })", " Projective P", " (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms", " (preadditiveCoyonedaObj { unop := P } β‹™ forgetβ‚‚ (ModuleCat (End { unop := P })) AddCommGroupCat).PreservesEpimorphisms" ]
[ " PreservesFiniteColimits (preadditiveCoyonedaObj { unop := P })" ]
import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.DMatrix import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.Tactic.FieldSimp #align_import linear_algebra.matrix.transvection from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e...
Mathlib/LinearAlgebra/Matrix/Transvection.lean
87
87
theorem transvection_zero : transvection i j (0 : R) = 1 := by
simp [transvection]
[ " transvection i j 0 = 1" ]
[]
import Mathlib.Data.Finset.Prod import Mathlib.Data.Set.Finite #align_import data.finset.n_ary from "leanprover-community/mathlib"@"eba7871095e834365616b5e43c8c7bb0b37058d0" open Function Set variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' ΞΆ ΞΆ' Ξ½ : Type*} namespace Finset variable [DecidableEq Ξ±'] [DecidableEq Ξ²'] [Decidabl...
Mathlib/Data/Finset/NAry.lean
117
119
theorem imageβ‚‚_nonempty_iff : (imageβ‚‚ f s t).Nonempty ↔ s.Nonempty ∧ t.Nonempty := by
rw [← coe_nonempty, coe_imageβ‚‚] exact image2_nonempty_iff
[ " c ∈ imageβ‚‚ f s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, f a b = c", " (imageβ‚‚ f s t).card = s.card * t.card ↔ InjOn (fun x => f x.1 x.2) (↑s Γ—Λ’ ↑t)", " (imageβ‚‚ f s t).card = (s Γ—Λ’ t).card ↔ InjOn (fun x => f x.1 x.2) ↑(s Γ—Λ’ t)", " f a b ∈ imageβ‚‚ f s t ↔ a ∈ s ∧ b ∈ t", " imageβ‚‚ f s t βŠ† imageβ‚‚ f s' t'", " image2 f ↑s ↑t βŠ† ...
[ " c ∈ imageβ‚‚ f s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, f a b = c", " (imageβ‚‚ f s t).card = s.card * t.card ↔ InjOn (fun x => f x.1 x.2) (↑s Γ—Λ’ ↑t)", " (imageβ‚‚ f s t).card = (s Γ—Λ’ t).card ↔ InjOn (fun x => f x.1 x.2) ↑(s Γ—Λ’ t)", " f a b ∈ imageβ‚‚ f s t ↔ a ∈ s ∧ b ∈ t", " imageβ‚‚ f s t βŠ† imageβ‚‚ f s' t'", " image2 f ↑s ↑t βŠ† ...
import Mathlib.LinearAlgebra.Matrix.Adjugate import Mathlib.RingTheory.PolynomialAlgebra #align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section universe u v w namespace Matrix open Finset Matrix Polynomial variable...
Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean
134
154
theorem aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 := by
-- We begin with the fact $Ο‡_M(t) I = adjugate (t I - M) * (t I - M)$, -- as an identity in `Matrix n n R[X]`. have h : M.charpoly β€’ (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M := (adjugate_mul _).symm -- Using the algebra isomorphism `Matrix n n R[X] ≃ₐ[R] Polynomial (Matrix n n R)`, ...
[ " M.charmatrix i i = X - C (M i i)", " M.charmatrix i j = -C (M i j)", " matPolyEquiv M.charmatrix = X - C M", " (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j", " (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j", " (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i...
[ " M.charmatrix i i = X - C (M i i)", " M.charmatrix i j = -C (M i j)", " matPolyEquiv M.charmatrix = X - C M", " (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j", " (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j", " (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i...
import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.add_torsor from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P, VSub G P where [nonempty : Nonempty P] vsub_vadd' : βˆ€ p₁ pβ‚‚ : P, (p₁ ...
Mathlib/Algebra/AddTorsor.lean
124
125
theorem vsub_self (p : P) : p -α΅₯ p = (0 : G) := by
rw [← zero_add (p -α΅₯ p), ← vadd_vsub_assoc, vadd_vsub]
[ " g₁ = gβ‚‚", " g +α΅₯ p₁ -α΅₯ pβ‚‚ = g + (p₁ -α΅₯ pβ‚‚)", " g +α΅₯ p₁ -α΅₯ pβ‚‚ +α΅₯ pβ‚‚ = g + (p₁ -α΅₯ pβ‚‚) +α΅₯ pβ‚‚", " p -α΅₯ p = 0" ]
[ " g₁ = gβ‚‚", " g +α΅₯ p₁ -α΅₯ pβ‚‚ = g + (p₁ -α΅₯ pβ‚‚)", " g +α΅₯ p₁ -α΅₯ pβ‚‚ +α΅₯ pβ‚‚ = g + (p₁ -α΅₯ pβ‚‚) +α΅₯ pβ‚‚" ]
import Mathlib.Data.ENat.Lattice import Mathlib.Order.OrderIsoNat import Mathlib.Tactic.TFAE #align_import order.height from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" open List hiding le_antisymm open OrderDual universe u v variable {Ξ± Ξ² : Type*} namespace Set section LT varia...
Mathlib/Order/Height.lean
127
131
theorem chainHeight_eq_top_iff : s.chainHeight = ⊀ ↔ βˆ€ n, βˆƒ l ∈ s.subchain, length l = n := by
refine ⟨fun h n ↦ le_chainHeight_iff.1 (le_top.trans_eq h.symm), fun h ↦ ?_⟩ contrapose! h; obtain ⟨n, hn⟩ := WithTop.ne_top_iff_exists.1 h exact ⟨n + 1, fun l hs ↦ (Nat.lt_succ_iff.2 <| Nat.cast_le.1 <| (length_le_chainHeight_of_mem_subchain hs).trans_eq hn.symm).ne⟩
[ " a :: l ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ βˆ€ b ∈ l.head?, a < b", " [a] ∈ s.subchain ↔ a ∈ s", " βˆƒ l ∈ s.subchain, l.length = n", " n ≀ l.length", " [↑n ≀ s.chainHeight, βˆƒ l ∈ s.subchain, l.length = n, βˆƒ l ∈ s.subchain, n ≀ l.length].TFAE", " ↑n ≀ s.chainHeight β†’ βˆƒ l ∈ s.subchain, l.length = n", "...
[ " a :: l ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ βˆ€ b ∈ l.head?, a < b", " [a] ∈ s.subchain ↔ a ∈ s", " βˆƒ l ∈ s.subchain, l.length = n", " n ≀ l.length", " [↑n ≀ s.chainHeight, βˆƒ l ∈ s.subchain, l.length = n, βˆƒ l ∈ s.subchain, n ≀ l.length].TFAE", " ↑n ≀ s.chainHeight β†’ βˆƒ l ∈ s.subchain, l.length = n", "...
import Mathlib.CategoryTheory.LiftingProperties.Basic import Mathlib.CategoryTheory.Adjunction.Basic #align_import category_theory.lifting_properties.adjunction from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory open Category variable {C D : Type*} [Category ...
Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean
111
113
theorem left_adjoint_hasLift_iff : HasLift (sq.left_adjoint adj) ↔ HasLift sq := by
simp only [HasLift.iff] exact Equiv.nonempty_congr (sq.leftAdjointLiftStructEquiv adj).symm
[ " (adj.homEquiv A X) u ≫ F.map p = i ≫ (adj.homEquiv B Y) v", " adj.unit.app A ≫ F.map (G.map i ≫ v) = i ≫ adj.unit.app B ≫ F.map v", " i ≫ (adj.homEquiv B X) l.l = (adj.homEquiv A X) u", " (adj.homEquiv B X) l.l ≫ F.map p = (adj.homEquiv B Y) v", " G.map i ≫ (adj.homEquiv B X).symm l.l = u", " (adj.homEq...
[ " (adj.homEquiv A X) u ≫ F.map p = i ≫ (adj.homEquiv B Y) v", " adj.unit.app A ≫ F.map (G.map i ≫ v) = i ≫ adj.unit.app B ≫ F.map v", " i ≫ (adj.homEquiv B X) l.l = (adj.homEquiv A X) u", " (adj.homEquiv B X) l.l ≫ F.map p = (adj.homEquiv B Y) v", " G.map i ≫ (adj.homEquiv B X).symm l.l = u", " (adj.homEq...
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
307
308
theorem map_negβ‚‚ (f : M β†’SL[ρ₁₂] F β†’SL[σ₁₂] G') (x : M) (y : F) : f (-x) y = -f x y := by
rw [f.map_neg, neg_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.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68ab8cf7dd83d549eb78a68a1" open Finset variable {Ξ± : Type*} theorem sup_sdiff_injOn [GeneralizedBooleanAlgebra Ξ±] (u v : Ξ±) : { x | Disjoint u x ∧ v ≀ x }....
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
194
200
theorem compress_mem_compression_of_mem_compression (ha : a ∈ 𝓒 u v s) : compress u v a ∈ 𝓒 u v s := by
rw [mem_compression] at ha ⊒ simp only [compress_idem, exists_prop] obtain ⟨_, ha⟩ | ⟨_, b, hb, rfl⟩ := ha · exact Or.inl ⟨ha, ha⟩ · exact Or.inr ⟨by rwa [compress_idem], b, hb, (compress_idem _ _ _).symm⟩
[ " Set.InjOn (fun x => (x βŠ” u) \\ v) {x | Disjoint u x ∧ v ≀ x}", " a = b", " ((a βŠ” u) \\ v) \\ u βŠ” v = ((b βŠ” u) \\ v) \\ u βŠ” v", " compress u v ((a βŠ” v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≀ a then (a βŠ” u) \\ u else a) = a", " (a βŠ” u) \\ u = a", " a = a", " compress (a \\ b) (b...
[ " Set.InjOn (fun x => (x βŠ” u) \\ v) {x | Disjoint u x ∧ v ≀ x}", " a = b", " ((a βŠ” u) \\ v) \\ u βŠ” v = ((b βŠ” u) \\ v) \\ u βŠ” v", " compress u v ((a βŠ” v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≀ a then (a βŠ” u) \\ u else a) = a", " (a βŠ” u) \\ u = a", " a = a", " compress (a \\ b) (b...
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
119
120
theorem add_left_cancel (a) {b c : Ordinal} : a + b = a + c ↔ b = c := by
simp only [le_antisymm_iff, add_le_add_iff_left]
[ " 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.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Order.Interval.Finset.Nat #align_import data.polynomial.inductions from "leanprover-community/mathlib"@"57e09a1296bf...
Mathlib/Algebra/Polynomial/Inductions.lean
79
81
theorem divX_one : divX (1 : R[X]) = 0 := by
ext simpa only [coeff_divX, coeff_zero] using coeff_one
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
import Mathlib.Algebra.Polynomial.Splits #align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222" noncomputable section @[ext] structure Cubic (R : Type*) where (a b c d : R) #align cubic Cubic namespace Cubic open Cubic Polynomial open Polynom...
Mathlib/Algebra/CubicDiscriminant.lean
127
127
theorem c_of_eq (h : P.toPoly = Q.toPoly) : P.c = Q.c := by
rw [← coeff_eq_c, h, coeff_eq_c]
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
76
77
theorem logb_div (hx : x β‰  0) (hy : y β‰  0) : logb b (x / y) = logb b x - logb b y := by
simp_rw [logb, log_div hx hy, sub_div]
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y", " b.logb (x / y) = b.logb x - b.logb y" ]
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y" ]
import Mathlib.Algebra.Exact import Mathlib.RingTheory.TensorProduct.Basic section Modules open TensorProduct LinearMap section Semiring variable {R : Type*} [CommSemiring R] {M N P Q: Type*} [AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] [AddCommMonoid Q] [Module R M] [Module R N] [Module R P] [...
Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean
124
133
theorem LinearMap.lTensor_range : range (lTensor Q g) = range (lTensor Q (Submodule.subtype (range g))) := by
have : g = (Submodule.subtype _).comp g.rangeRestrict := rfl nth_rewrite 1 [this] rw [lTensor_comp] apply range_comp_of_range_eq_top rw [range_eq_top] apply lTensor_surjective rw [← range_eq_top, range_rangeRestrict]
[ " range g ≀ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))", " g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))", " range g ≀ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))", " g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (...
[ " range g ≀ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))", " g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))", " range g ≀ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))", " g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (...
import Mathlib.Algebra.Associated import Mathlib.Algebra.GeomSum import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Nat.Choose.Sum import Mathlib.Data.Nat.Lattice import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_th...
Mathlib/RingTheory/Nilpotent/Basic.lean
75
81
theorem IsNilpotent.isUnit_add_left_of_commute [Ring R] {r u : R} (hnil : IsNilpotent r) (hu : IsUnit u) (h_comm : Commute r u) : IsUnit (u + r) := by
rw [← Units.isUnit_mul_units _ hu.unit⁻¹, add_mul, IsUnit.mul_val_inv] replace h_comm : Commute r (↑hu.unit⁻¹) := Commute.units_inv_right h_comm refine IsNilpotent.isUnit_one_add ?_ exact (hu.unit⁻¹.isUnit.isNilpotent_mul_unit_of_commute_iff h_comm).mpr hnil
[ " IsNilpotent (-x)", " (-x) ^ n = 0", " IsNilpotent (t β€’ a)", " (t β€’ a) ^ k = 0", " IsUnit (r - 1)", " (r - 1) * -βˆ‘ i ∈ Finset.range n, r ^ i = 1", " (-βˆ‘ i ∈ Finset.range n, r ^ i) * (r - 1) = 1", " IsUnit (1 - r)", " IsUnit (r + 1)", " IsUnit (-r - 1)", " IsUnit (u + r)", " IsUnit (1 + r * ↑h...
[ " IsNilpotent (-x)", " (-x) ^ n = 0", " IsNilpotent (t β€’ a)", " (t β€’ a) ^ k = 0", " IsUnit (r - 1)", " (r - 1) * -βˆ‘ i ∈ Finset.range n, r ^ i = 1", " (-βˆ‘ i ∈ Finset.range n, r ^ i) * (r - 1) = 1", " IsUnit (1 - r)", " IsUnit (r + 1)", " IsUnit (-r - 1)" ]
import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.PSub import Mathlib.Data.Nat.Size import Mathlib.Data.Num.Bitwise #align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" set_opti...
Mathlib/Data/Num/Lemmas.lean
84
84
theorem add_one (n : PosNum) : n + 1 = succ n := by
cases n <;> rfl
[ " ↑↑n = ↑n", " ↑p + 1 + ↑p + 1 = ↑p + ↑p + 1 + 1", " 1 + n = n.succ", " 1 + one = one.succ", " 1 + a✝.bit1 = a✝.bit1.succ", " 1 + a✝.bit0 = a✝.bit0.succ", " n + 1 = n.succ", " one + 1 = one.succ", " a✝.bit1 + 1 = a✝.bit1.succ", " a✝.bit0 + 1 = a✝.bit0.succ" ]
[ " ↑↑n = ↑n", " ↑p + 1 + ↑p + 1 = ↑p + ↑p + 1 + 1", " 1 + n = n.succ", " 1 + one = one.succ", " 1 + a✝.bit1 = a✝.bit1.succ", " 1 + a✝.bit0 = a✝.bit0.succ" ]
import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.FullSubcategory import Mathlib.CategoryTheory.Skeletal import Mathlib.Data.Fintype.Card #align_import category_theory.Fintype from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395" open scoped Classical ope...
Mathlib/CategoryTheory/FintypeCat.lean
160
179
theorem is_skeletal : Skeletal Skeleton.{u} := fun X Y ⟨h⟩ => ext _ _ <| Fin.equiv_iff_eq.mp <| Nonempty.intro <| { toFun := fun x => (h.hom ⟨x⟩).down invFun := fun x => (h.inv ⟨x⟩).down left_inv := by
intro a change ULift.down _ = _ rw [ULift.up_down] change ((h.hom ≫ h.inv) _).down = _ simp rfl right_inv := by intro a change ULift.down _ = _ rw [ULift.up_down] change ((h.inv ≫ h.hom) _)...
[ " f = g", " f x✝ = g x✝", " Function.LeftInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := β‹―, right_inv := β‹― }) fun e =>\n { hom := ⇑e, inv := ⇑e.symm, hom_inv_id := β‹―, inv_hom_id := β‹― }", " Function.RightInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := β‹―, right_inv := β‹― }) f...
[ " f = g", " f x✝ = g x✝", " Function.LeftInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := β‹―, right_inv := β‹― }) fun e =>\n { hom := ⇑e, inv := ⇑e.symm, hom_inv_id := β‹―, inv_hom_id := β‹― }", " Function.RightInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := β‹―, right_inv := β‹― }) f...
import Mathlib.Topology.StoneCech import Mathlib.Topology.Algebra.Semigroup import Mathlib.Data.Stream.Init #align_import combinatorics.hindman from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Filter @[to_additive "Addition of ultrafilters given by `βˆ€αΆ  m in U+V, p m ↔ βˆ€αΆ ...
Mathlib/Combinatorics/Hindman.lean
119
131
theorem FP.mul {M} [Semigroup M] {a : Stream' M} {m : M} (hm : m ∈ FP a) : βˆƒ n, βˆ€ m' ∈ FP (a.drop n), m * m' ∈ FP a := by
induction' hm with a a m hm ih a m hm ih · exact ⟨1, fun m hm => FP.cons a m hm⟩ · cases' ih with n hn use n + 1 intro m' hm' exact FP.tail _ _ (hn _ hm') · cases' ih with n hn use n + 1 intro m' hm' rw [mul_assoc] exact FP.cons _ _ (hn _ hm')
[ " (βˆ€αΆ  (x : M) in ↑(U * V * W), p x) ↔ βˆ€αΆ  (x : M) in ↑(U * (V * W)), p x", " βˆƒ n, βˆ€ m' ∈ FP (Stream'.drop n a), m * m' ∈ FP a", " βˆƒ n, βˆ€ m' ∈ FP (Stream'.drop n a), a.head * m' ∈ FP a", " βˆ€ m' ∈ FP (Stream'.drop (n + 1) a), m * m' ∈ FP a", " m * m' ∈ FP a", " βˆƒ n, βˆ€ m' ∈ FP (Stream'.drop n a), a.head * m *...
[ " (βˆ€αΆ  (x : M) in ↑(U * V * W), p x) ↔ βˆ€αΆ  (x : M) in ↑(U * (V * W)), p x" ]
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Data.List.Cycle import Mathlib.Data.Nat.Prime import Mathlib.Data.PNat.Basic import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.GroupTheory.GroupAction.Group #align_import dynamics.periodic_pts from "leanp...
Mathlib/Dynamics/PeriodicPts.lean
145
148
theorem comp {g : Ξ± β†’ Ξ±} (hco : Commute f g) (hf : IsPeriodicPt f n x) (hg : IsPeriodicPt g n x) : IsPeriodicPt (f ∘ g) n x := by
rw [IsPeriodicPt, hco.comp_iterate] exact IsFixedPt.comp hf hg
[ " IsPeriodicPt f (n + m) x", " IsFixedPt (f^[n] ∘ f^[m]) x", " IsPeriodicPt f n x", " IsPeriodicPt f m x", " IsPeriodicPt f (m - n) x", " IsPeriodicPt f (m - n + n) x", " IsPeriodicPt f 0 x", " IsPeriodicPt f (m * n) x", " IsPeriodicPt f (n * m) x", " IsPeriodicPt f^[m] n x", " IsFixedPt f^[n]^[...
[ " IsPeriodicPt f (n + m) x", " IsFixedPt (f^[n] ∘ f^[m]) x", " IsPeriodicPt f n x", " IsPeriodicPt f m x", " IsPeriodicPt f (m - n) x", " IsPeriodicPt f (m - n + n) x", " IsPeriodicPt f 0 x", " IsPeriodicPt f (m * n) x", " IsPeriodicPt f (n * m) x", " IsPeriodicPt f^[m] n x", " IsFixedPt f^[n]^[...
import Mathlib.Data.Setoid.Partition import Mathlib.GroupTheory.GroupAction.Basic import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.GroupTheory.GroupAction.SubMulAction open scoped BigOperators Pointwise namespace MulAction section SMul variable (G : Type*) {X : Type*} [SMul G X] -- Change termin...
Mathlib/GroupTheory/GroupAction/Blocks.lean
90
92
theorem IsBlock.mk_notempty {B : Set X} : IsBlock G B ↔ βˆ€ g g' : G, g β€’ B ∩ g' β€’ B β‰  βˆ… β†’ g β€’ B = g' β€’ B := by
simp_rw [IsBlock.def, or_iff_not_imp_right, Set.disjoint_iff_inter_eq_empty]
[ " IsBlock G B ↔ βˆ€ (g g' : G), g β€’ B = g' β€’ B ∨ Disjoint (g β€’ B) (g' β€’ B)", " IsBlock G B ↔ βˆ€ (g g' : G), g β€’ B ∩ g' β€’ B β‰  βˆ… β†’ g β€’ B = g' β€’ B" ]
[ " IsBlock G B ↔ βˆ€ (g g' : G), g β€’ B = g' β€’ B ∨ Disjoint (g β€’ B) (g' β€’ B)" ]
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {Ξ± : Type u} {Ξ² : Type v} (l :...
Mathlib/Data/List/GetD.lean
83
86
theorem getD_append (l l' : List Ξ±) (d : Ξ±) (n : β„•) (h : n < l.length) : (l ++ l').getD n d = l.getD n d := by
rw [getD_eq_get _ _ (Nat.lt_of_lt_of_le h (length_append _ _ β–Έ Nat.le_add_right _ _)), get_append _ h, getD_eq_get]
[ " l.getD n d = l.get ⟨n, hn⟩", " [].getD n d = [].get ⟨n, hn⟩", " (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩", " (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩", " (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩", " (map f l).getD n (f d) = f (l.getD n d)", " (map f [])....
[ " l.getD n d = l.get ⟨n, hn⟩", " [].getD n d = [].get ⟨n, hn⟩", " (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩", " (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩", " (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩", " (map f l).getD n (f d) = f (l.getD n d)", " (map f [])....
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} ...
Mathlib/Analysis/Analytic/Inverse.lean
177
178
theorem rightInv_coeff_zero (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) : p.rightInv i 0 = 0 := by
rw [rightInv]
[ " p.leftInv i 0 = 0", " p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm ↑i.symm", " p.removeZero.leftInv i = p.leftInv i", " p.removeZero.leftInv i n = p.leftInv i n", " p.removeZero.leftInv i 0 = p.leftInv i 0", " p.removeZero.leftInv i 1 = p.leftInv i 1", " p.removeZero.leftInv i (n + 2) ...
[ " p.leftInv i 0 = 0", " p.leftInv i 1 = (continuousMultilinearCurryFin1 π•œ F E).symm ↑i.symm", " p.removeZero.leftInv i = p.leftInv i", " p.removeZero.leftInv i n = p.leftInv i n", " p.removeZero.leftInv i 0 = p.leftInv i 0", " p.removeZero.leftInv i 1 = p.leftInv i 1", " p.removeZero.leftInv i (n + 2) ...
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
62
64
theorem equalizerSubobject_arrow_comp : (equalizerSubobject f g).arrow ≫ f = (equalizerSubobject f g).arrow ≫ g := by
rw [← equalizerSubobject_arrow, Category.assoc, Category.assoc, equalizer.condition]
[ " (equalizerSubobjectIso f g).hom ≫ equalizer.ΞΉ f g = (equalizerSubobject f g).arrow", " (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ΞΉ f g", " (equalizerSubobject f g).arrow ≫ f = (equalizerSubobject f g).arrow ≫ g" ]
[ " (equalizerSubobjectIso f g).hom ≫ equalizer.ΞΉ f g = (equalizerSubobject f g).arrow", " (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ΞΉ f g" ]
import Mathlib.CategoryTheory.Endomorphism import Mathlib.CategoryTheory.FinCategory.Basic import Mathlib.CategoryTheory.Category.Cat import Mathlib.Algebra.Category.MonCat.Basic import Mathlib.Combinatorics.Quiver.SingleObj #align_import category_theory.single_obj from "leanprover-community/mathlib"@"56adee5b5eef9e7...
Mathlib/CategoryTheory/SingleObj.lean
93
95
theorem inv_as_inv {x y : SingleObj G} (f : x ⟢ y) : inv f = f⁻¹ := by
apply IsIso.inv_eq_of_hom_inv_id rw [comp_as_mul, inv_mul_self, id_as_one]
[ " inv f = f⁻¹", " f ≫ f⁻¹ = πŸ™ x" ]
[]
import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Convex.Strict import Mathlib.Analysis.Normed.Order.Basic import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.NormedSpace.Ray #align_import analysis.convex.strict_convex_space from "leanprover-...
Mathlib/Analysis/Convex/StrictConvexSpace.lean
95
106
theorem StrictConvexSpace.of_norm_combo_lt_one (h : βˆ€ x y : E, β€–xβ€– = 1 β†’ β€–yβ€– = 1 β†’ x β‰  y β†’ βˆƒ a b : ℝ, a + b = 1 ∧ β€–a β€’ x + b β€’ yβ€– < 1) : StrictConvexSpace ℝ E := by
refine StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => ?_) rw [interior_closedBall (0 : E) one_ne_zero, closedBall_diff_ball, mem_sphere_zero_iff_norm] at hx hy rcases h x y hx hy hne with ⟨a, b, hab, hlt⟩ use b rwa [AffineMap.lin...
[ " StrictConvex π•œ (closedBall x r)", " StrictConvex π•œ (x +α΅₯ closedBall 0 r)", " StrictConvex π•œ (closedBall 0 r)", " StrictConvexSpace ℝ E", " (fun x y => βˆƒ c, (AffineMap.lineMap x y) c ∈ interior (closedBall 0 1)) x y", " βˆƒ c, (AffineMap.lineMap x y) c ∈ interior (closedBall 0 1)", " (AffineMap.lineMa...
[ " StrictConvex π•œ (closedBall x r)", " StrictConvex π•œ (x +α΅₯ closedBall 0 r)", " StrictConvex π•œ (closedBall 0 r)" ]
import Mathlib.FieldTheory.SplittingField.IsSplittingField import Mathlib.Algebra.CharP.Algebra #align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Classical Polynomial universe u v w variable {...
Mathlib/FieldTheory/SplittingField/Construction.lean
103
104
theorem natDegree_removeFactor' {f : K[X]} {n : β„•} (hfn : f.natDegree = n + 1) : f.removeFactor.natDegree = n := by
rw [natDegree_removeFactor, hfn, n.add_sub_cancel]
[ " Irreducible f.factor", " Irreducible (if H : βˆƒ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)", " Irreducible (Classical.choose H)", " Irreducible X", " f.factor ∣ f", " factor 0 ∣ 0", " Classical.choose β‹― ∣ f", " (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.f...
[ " Irreducible f.factor", " Irreducible (if H : βˆƒ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)", " Irreducible (Classical.choose H)", " Irreducible X", " f.factor ∣ f", " factor 0 ∣ 0", " Classical.choose β‹― ∣ f", " (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.f...
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.Factorial.Cast #align_import data.nat.choose.cast from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496" open Nat variable (K : Type*) [DivisionRing K] [CharZero K] namespace Nat
Mathlib/Data/Nat/Choose/Cast.lean
25
28
theorem cast_choose {a b : β„•} (h : a ≀ b) : (b.choose a : K) = b ! / (a ! * (b - a)!) := by
have : βˆ€ {n : β„•}, (n ! : K) β‰  0 := Nat.cast_ne_zero.2 (factorial_ne_zero _) rw [eq_div_iff_mul_eq (mul_ne_zero this this)] rw_mod_cast [← mul_assoc, choose_mul_factorial_mul_factorial h]
[ " ↑(b.choose a) = ↑b ! / (↑a ! * ↑(b - a)!)", " ↑(b.choose a) * (↑a ! * ↑(b - a)!) = ↑b !" ]
[]
import Mathlib.Analysis.Fourier.Inversion open Real Complex Set MeasureTheory variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β„‚ E] open scoped FourierTransform private theorem rexp_neg_deriv_aux : βˆ€ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x := fun x _ ↦ mul_neg_one (rexp (-x)...
Mathlib/Analysis/MellinInversion.lean
44
67
theorem mellin_eq_fourierIntegral (f : ℝ β†’ E) {s : β„‚} : mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) β€’ f (Real.exp (-u)))) (s.im / (2 * Ο€)) := calc mellin f s = ∫ (u : ℝ), Complex.exp (-s * u) β€’ f (Real.exp (-u)) := by
rw [mellin, ← rexp_neg_image_aux, integral_image_eq_integral_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] simp [rexp_cexp_aux] _ = ∫ (u : ℝ), Complex.exp (↑(-2 * Ο€ * (u * (s.im / (2 * Ο€)))) * I) β€’ (Real.exp (-s.re * u) β€’ f (Real.exp (-u))) := by congr ...
[ " rexp ∘ Neg.neg '' univ = Ioi 0", " rexp (-x) β€’ cexp (-↑x) ^ (s - 1) β€’ f = cexp (-s * ↑x) β€’ f", " ↑(rexp (-x)) β€’ cexp (-↑x) ^ (s - 1) β€’ f = cexp (-s * ↑x) β€’ f", " (↑(rexp (-x)) * cexp (-↑x) ^ (s - 1)) β€’ f = cexp (-s * ↑x) β€’ f", " (cexp (-↑x) * cexp (-↑x) ^ (s - 1)) β€’ f = cexp (-s * ↑x) β€’ f", "E : Type u_...
[ " rexp ∘ Neg.neg '' univ = Ioi 0", " rexp (-x) β€’ cexp (-↑x) ^ (s - 1) β€’ f = cexp (-s * ↑x) β€’ f", " ↑(rexp (-x)) β€’ cexp (-↑x) ^ (s - 1) β€’ f = cexp (-s * ↑x) β€’ f", " (↑(rexp (-x)) * cexp (-↑x) ^ (s - 1)) β€’ f = cexp (-s * ↑x) β€’ f", " (cexp (-↑x) * cexp (-↑x) ^ (s - 1)) β€’ f = cexp (-s * ↑x) β€’ f", "E : Type u_...
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
49
49
theorem logb_zero : logb b 0 = 0 := by
simp [logb]
[ " b.logb 0 = 0" ]
[]
import Mathlib.Data.Finset.Pointwise #align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259" open MulOpposite open Pointwise variable {Ξ± : Type*} [DecidableEq Ξ±] namespace Finset section CommGroup variable [CommGroup Ξ±] (e : Ξ±) (x : F...
Mathlib/Combinatorics/Additive/ETransform.lean
75
81
theorem mulDysonETransform_idem : mulDysonETransform e (mulDysonETransform e x) = mulDysonETransform e x := by
ext : 1 <;> dsimp Β· rw [smul_finset_inter, smul_inv_smul, inter_comm, union_eq_left] exact inter_subset_union Β· rw [smul_finset_union, inv_smul_smul, union_comm, inter_eq_left] exact inter_subset_union
[ " (mulDysonETransform e x).1 * (mulDysonETransform e x).2 βŠ† x.1 * x.2", " e β€’ x.2 * e⁻¹ β€’ x.1 βŠ† x.1 * x.2", " (mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card", " (x.1 βˆͺ e β€’ x.2).card + (x.2 ∩ e⁻¹ β€’ x.1).card = x.1.card + x.2.card", " mulDysonETransform e (mulDysonETra...
[ " (mulDysonETransform e x).1 * (mulDysonETransform e x).2 βŠ† x.1 * x.2", " e β€’ x.2 * e⁻¹ β€’ x.1 βŠ† x.1 * x.2", " (mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card", " (x.1 βˆͺ e β€’ x.2).card + (x.2 ∩ e⁻¹ β€’ x.1).card = x.1.card + x.2.card" ]
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
192
207
theorem vars_sum_of_disjoint [DecidableEq Οƒ] (h : Pairwise <| (Disjoint on fun i => (Ο† i).vars)) : (βˆ‘ i ∈ t, Ο† i).vars = Finset.biUnion t fun i => (Ο† i).vars := by
classical induction t using Finset.induction_on with | empty => simp | insert has hsum => rw [Finset.biUnion_insert, Finset.sum_insert has, vars_add_of_disjoint, hsum] unfold Pairwise onFun at h rw [hsum] simp only [Finset.disjoint_iff_ne] at h ⊒ intro v hv v2 hv2 rw [Finset.mem_biUnion...
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = βˆ…", " ((monomial s) r).vars = s.support", " (C r).vars = βˆ…", " (X n).vars = {n}", " i ∈ p.vars ↔ βˆƒ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars βŠ† p.vars βˆͺ q.vars", " x ∈ p.vars βˆͺ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = βˆ…", " ((monomial s) r).vars = s.support", " (C r).vars = βˆ…", " (X n).vars = {n}", " i ∈ p.vars ↔ βˆƒ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars βŠ† p.vars βˆͺ q.vars", " x ∈ p.vars βˆͺ q....
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic #align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
161
161
theorem refl : IntervalIntegrable f ΞΌ a a := by
constructor <;> simp
[ " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ξ™ a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ioc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f [[a, b]] ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Icc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ico a b) ΞΌ", " Interva...
[ " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ξ™ a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ioc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f [[a, b]] ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Icc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ico a b) ΞΌ", " Interva...
import Mathlib.Algebra.Ring.Int import Mathlib.Data.ZMod.Basic import Mathlib.FieldTheory.Finite.Basic import Mathlib.Data.Fintype.BigOperators #align_import number_theory.sum_four_squares from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" open Finset Polynomial FiniteField Equiv the...
Mathlib/NumberTheory/SumFourSquares.lean
46
59
theorem sq_add_sq_of_two_mul_sq_add_sq {m x y : β„€} (h : 2 * m = x ^ 2 + y ^ 2) : m = ((x - y) / 2) ^ 2 + ((x + y) / 2) ^ 2 := have : Even (x ^ 2 + y ^ 2) := by
simp [← h, even_mul] have hxaddy : Even (x + y) := by simpa [sq, parity_simps] have hxsuby : Even (x - y) := by simpa [sq, parity_simps] mul_right_injectiveβ‚€ (show (2 * 2 : β„€) β‰  0 by decide) <| calc 2 * 2 * m = (x - y) ^ 2 + (x + y) ^ 2 := by rw [mul_assoc, h]; ring _ = (2 * ((x - y) / 2)) ^ 2 + ...
[ " (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)", " (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c *...
[ " (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)", " (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c *...
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
124
130
theorem finset_prod_mk {p : Finset Ξ²} {f : Ξ² β†’ Ξ±} : (∏ i ∈ p, Associates.mk (f i)) = Associates.mk (∏ i ∈ p, f i) := by
-- Porting note: added have : (fun i => Associates.mk (f i)) = Associates.mk ∘ f := funext fun x => Function.comp_apply rw [Finset.prod_eq_multiset_prod, this, ← Multiset.map_map, prod_mk, ← Finset.prod_eq_multiset_prod]
[ " ∏ 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", " s.prod ∣ n", " prod 0 ∣ n", " (a :...
import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" variable {Ξ± Ξ² : Type*} namespace Set section Einfsep open ENNReal open Function noncomputable def einfsep [EDist Ξ±] (s : Set Ξ±) : ℝβ‰₯0∞ := β¨… (x...
Mathlib/Topology/MetricSpace/Infsep.lean
79
81
theorem einfsep_lt_iff {d} : s.einfsep < d ↔ βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < d := by
simp_rw [einfsep, iInf_lt_iff, exists_prop]
[ " d ≀ s.einfsep ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ d ≀ edist x y", " s.einfsep = 0 ↔ βˆ€ C > 0, βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < C", " 0 < s.einfsep ↔ βˆƒ C > 0, βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ C ≀ edist x y", " (Β¬βˆ€ C > 0, βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < C) ↔ βˆƒ C > 0, βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ C ≀ edist x y", " s...
[ " d ≀ s.einfsep ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ d ≀ edist x y", " s.einfsep = 0 ↔ βˆ€ C > 0, βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < C", " 0 < s.einfsep ↔ βˆƒ C > 0, βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ C ≀ edist x y", " (Β¬βˆ€ C > 0, βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < C) ↔ βˆƒ C > 0, βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ C ≀ edist x y", " s...
import Mathlib.Topology.ExtendFrom import Mathlib.Topology.Order.DenselyOrdered #align_import topology.algebra.order.extend_from from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" set_option autoImplicit true open Filter Set TopologicalSpace open scoped Classical open Topology theor...
Mathlib/Topology/Order/ExtendFrom.lean
54
65
theorem continuousOn_Ico_extendFrom_Ioo [TopologicalSpace Ξ±] [LinearOrder Ξ±] [DenselyOrdered Ξ±] [OrderTopology Ξ±] [TopologicalSpace Ξ²] [RegularSpace Ξ²] {f : Ξ± β†’ Ξ²} {a b : Ξ±} {la : Ξ²} (hab : a < b) (hf : ContinuousOn f (Ioo a b)) (ha : Tendsto f (𝓝[>] a) (𝓝 la)) : ContinuousOn (extendFrom (Ioo a b) f) (Ico...
apply continuousOn_extendFrom · rw [closure_Ioo hab.ne] exact Ico_subset_Icc_self · intro x x_in rcases eq_left_or_mem_Ioo_of_mem_Ico x_in with (rfl | h) · use la simpa [hab] · exact ⟨f x, hf x h⟩
[ " ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)", " Icc a b βŠ† closure (Ioo a b)", " βˆ€ x ∈ Icc a b, βˆƒ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo a x] x) (𝓝 y)", " extendFrom (Ioo a b) f a = la", "...
[ " ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)", " Icc a b βŠ† closure (Ioo a b)", " βˆ€ x ∈ Icc a b, βˆƒ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)", " βˆƒ y, Tendsto f (𝓝[Ioo a x] x) (𝓝 y)", " extendFrom (Ioo a b) f a = la", "...
import Mathlib.MeasureTheory.Constructions.Pi import Mathlib.MeasureTheory.Integral.Lebesgue open scoped Classical ENNReal open Set Function Equiv Finset noncomputable section namespace MeasureTheory section LMarginal variable {Ξ΄ Ξ΄' : Type*} {Ο€ : Ξ΄ β†’ Type*} [βˆ€ x, MeasurableSpace (Ο€ x)] variable {ΞΌ : βˆ€ i, Measu...
Mathlib/MeasureTheory/Integral/Marginal.lean
105
108
theorem lmarginal_congr {x y : βˆ€ i, Ο€ i} (f : (βˆ€ i, Ο€ i) β†’ ℝβ‰₯0∞) (h : βˆ€ i βˆ‰ s, x i = y i) : (βˆ«β‹―βˆ«β»_s, f βˆ‚ΞΌ) x = (βˆ«β‹―βˆ«β»_s, f βˆ‚ΞΌ) y := by
dsimp [lmarginal, updateFinset_def]; rcongr; exact h _ β€Ή_β€Ί
[ " Measurable (βˆ«β‹―βˆ«β»_s, f βˆ‚ΞΌ)", " Measurable (uncurry fun x y => f (updateFinset x s y))", " Measurable fun a => updateFinset a.1 s a.2", " βˆ€ (a : Ξ΄), Measurable fun x => updateFinset x.1 s x.2 a", " Measurable fun x => updateFinset x.1 s x.2 i", " Measurable fun x => x.2 ⟨i, β‹―βŸ©", " Measurable fun x => x....
[ " Measurable (βˆ«β‹―βˆ«β»_s, f βˆ‚ΞΌ)", " Measurable (uncurry fun x y => f (updateFinset x s y))", " Measurable fun a => updateFinset a.1 s a.2", " βˆ€ (a : Ξ΄), Measurable fun x => updateFinset x.1 s x.2 a", " Measurable fun x => updateFinset x.1 s x.2 i", " Measurable fun x => x.2 ⟨i, β‹―βŸ©", " Measurable fun x => x....
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [To...
Mathlib/Topology/Maps.lean
132
134
theorem continuous_iff (hg : Inducing g) : Continuous f ↔ Continuous (g ∘ f) := by
simp_rw [continuous_iff_continuousAt, hg.continuousAt_iff]
[ " inst✝² = TopologicalSpace.induced (g ∘ f) inst✝", " Inducing (g ∘ f) ↔ Inducing f", " Inducing f", " inst✝² ≀ induced f inst✝¹", " induced f inst✝¹ ≀ inst✝²", " induced f inst✝¹ ≀ induced f (induced g inst✝)", " 𝓝˒ s = comap f (𝓝˒ (f '' s))", " MapClusterPt (f x) l f ↔ ClusterPt x l", " (𝓝 (f x...
[ " inst✝² = TopologicalSpace.induced (g ∘ f) inst✝", " Inducing (g ∘ f) ↔ Inducing f", " Inducing f", " inst✝² ≀ induced f inst✝¹", " induced f inst✝¹ ≀ inst✝²", " induced f inst✝¹ ≀ induced f (induced g inst✝)", " 𝓝˒ s = comap f (𝓝˒ (f '' s))", " MapClusterPt (f x) l f ↔ ClusterPt x l", " (𝓝 (f x...
import Mathlib.Algebra.Polynomial.Roots import Mathlib.Tactic.IntervalCases namespace Polynomial section IsDomain variable {R : Type*} [CommRing R] [IsDomain R]
Mathlib/Algebra/Polynomial/SpecificDegree.lean
22
34
theorem Monic.irreducible_iff_roots_eq_zero_of_degree_le_three {p : R[X]} (hp : p.Monic) (hp2 : 2 ≀ p.natDegree) (hp3 : p.natDegree ≀ 3) : Irreducible p ↔ p.roots = 0 := by
have hp0 : p β‰  0 := hp.ne_zero have hp1 : p β‰  1 := by rintro rfl; rw [natDegree_one] at hp2; cases hp2 rw [hp.irreducible_iff_lt_natDegree_lt hp1] simp_rw [show p.natDegree / 2 = 1 from (Nat.div_le_div_right hp3).antisymm (by apply Nat.div_le_div_right (c := 2) hp2), show Finset.Ioc 0 1 = {1}...
[ " Irreducible p ↔ p.roots = 0", " p β‰  1", " False", " (βˆ€ (q : R[X]), q.Monic β†’ q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) β†’ Β¬q ∣ p) ↔ p.roots = 0", " 3 / 2 ≀ p.natDegree / 2", " (βˆ€ (q : R[X]), q.Monic β†’ q.natDegree = 1 β†’ Β¬q ∣ p) ↔ βˆ€ (a : R), Β¬X - C a ∣ p", " Β¬q ∣ p", " Β¬X - C (-q.coeff 0) ∣ p" ]
[]
import Mathlib.CategoryTheory.Preadditive.Injective import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Algebra.Homology.QuasiIso #align_import category_theory.preadditive.injective_resolution from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" noncomputable s...
Mathlib/CategoryTheory/Preadditive/InjectiveResolution.lean
111
113
theorem complex_d_comp (n : β„•) : I.cocomplex.d n (n + 1) ≫ I.cocomplex.d (n + 1) (n + 2) = 0 := by
simp
[ " ExactAt I.cocomplex (n + 1)", " QuasiIsoAt I.ΞΉ (n + 1)", " (ComplexShape.up β„•).prev (n + 1) = n", " (ComplexShape.up β„•).next (n + 1) = n + 2", " n + 1 + 1 = n + 2", " n + 1 β‰  0", " I.ΞΉ.f 0 ≫ I.cocomplex.d 0 1 = 0", " I.cocomplex.d n (n + 1) ≫ I.cocomplex.d (n + 1) (n + 2) = 0" ]
[ " ExactAt I.cocomplex (n + 1)", " QuasiIsoAt I.ΞΉ (n + 1)", " (ComplexShape.up β„•).prev (n + 1) = n", " (ComplexShape.up β„•).next (n + 1) = n + 2", " n + 1 + 1 = n + 2", " n + 1 β‰  0", " I.ΞΉ.f 0 ≫ I.cocomplex.d 0 1 = 0" ]
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.Nondegenerate import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Rin...
Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean
114
132
theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} : (βˆƒ v β‰  0, M *α΅₯ v = 0) ↔ M.det = 0 := by
constructor Β· rintro ⟨v, hv, mul_eq⟩ contrapose! hv exact eq_zero_of_mulVec_eq_zero hv mul_eq Β· contrapose! intro h have : Function.Injective (Matrix.toLin' M) := by simpa only [← LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h have : M * LinearMap.toMa...
[ " (βˆƒ v, v β‰  0 ∧ M *α΅₯ v = 0) ↔ M.det = 0", " (βˆƒ v, v β‰  0 ∧ M *α΅₯ v = 0) β†’ M.det = 0", " M.det = 0", " v = 0", " M.det = 0 β†’ βˆƒ v, v β‰  0 ∧ M *α΅₯ v = 0", " (βˆ€ (v : n β†’ K), v β‰  0 β†’ M *α΅₯ v β‰  0) β†’ M.det β‰  0", " M.det β‰  0", " Function.Injective ⇑(toLin' M)", " M * toMatrix' ↑(LinearEquiv.ofInjectiveEndo (toLi...
[]
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
58
72
theorem zero_cpow_eq_iff {x : β„‚} {a : β„‚} : (0 : β„‚) ^ x = a ↔ x β‰  0 ∧ a = 0 ∨ x = 0 ∧ a = 1 := by
constructor · intro hyp simp only [cpow_def, eq_self_iff_true, if_true] at hyp by_cases h : x = 0 · subst h simp only [if_true, eq_self_iff_true] at hyp right exact ⟨rfl, hyp.symm⟩ · rw [if_neg h] at hyp left exact ⟨h, hyp.symm⟩ · rintro (⟨h, rfl⟩ | ⟨rfl, rfl⟩) ·...
[ " 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" ]
import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Data.Set.MemPartition import Mathlib.Order.Filter.CountableSeparatingOn open Set MeasureTheory namespace MeasurableSpace variable {Ξ± Ξ² : Type*} class CountablyGenerated (Ξ± : Type*) [m : MeasurableSpace Ξ±] : Prop where isCountablyGenerated : βˆƒ b...
Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
144
147
theorem exists_measurableSet_of_ne [MeasurableSpace Ξ±] [SeparatesPoints Ξ±] {x y : Ξ±} (h : x β‰  y) : βˆƒ s, MeasurableSet s ∧ x ∈ s ∧ y βˆ‰ s := by
contrapose! h exact separatesPoints_def h
[ " MeasurableSet s", " generateFrom (range (natGeneratingSequence Ξ±)) = m", " CountablyGenerated Ξ±", " CountablyGenerated Ξ²", " βˆƒ b, b.Countable ∧ inst✝¹ = generateFrom b", " inst✝¹ = generateFrom (⋃ y, {measurableAtom y})", " βˆ€ t ∈ ⋃ y, {measurableAtom y}, MeasurableSet t", " inst✝¹ ≀ generateFrom (⋃ ...
[ " MeasurableSet s", " generateFrom (range (natGeneratingSequence Ξ±)) = m", " CountablyGenerated Ξ±", " CountablyGenerated Ξ²", " βˆƒ b, b.Countable ∧ inst✝¹ = generateFrom b", " inst✝¹ = generateFrom (⋃ y, {measurableAtom y})", " βˆ€ t ∈ ⋃ y, {measurableAtom y}, MeasurableSet t", " inst✝¹ ≀ generateFrom (⋃ ...
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q...
Mathlib/Data/ENNReal/Operations.lean
33
41
theorem mul_lt_mul (ac : a < c) (bd : b < d) : a * b < c * d := by
rcases lt_iff_exists_nnreal_btwn.1 ac with ⟨a', aa', a'c⟩ lift a to ℝβ‰₯0 using ne_top_of_lt aa' rcases lt_iff_exists_nnreal_btwn.1 bd with ⟨b', bb', b'd⟩ lift b to ℝβ‰₯0 using ne_top_of_lt bb' norm_cast at * calc ↑(a * b) < ↑(a' * b') := coe_lt_coe.2 (mul_lt_mulβ‚€ aa' bb') _ ≀ c * d := mul_le_mul' a'c....
[ " a * b < c * d", " ↑a * b < c * d", " ↑a * ↑b < c * d", " ↑(a * b) < c * d" ]
[]
import Mathlib.ModelTheory.Syntax import Mathlib.ModelTheory.Semantics import Mathlib.Algebra.Ring.Equiv variable {Ξ± : Type*} namespace FirstOrder open FirstOrder inductive ringFunc : β„• β†’ Type | add : ringFunc 2 | mul : ringFunc 2 | neg : ringFunc 1 | zero : ringFunc 0 | one : ringFunc 0 deriving D...
Mathlib/ModelTheory/Algebra/Ring/Basic.lean
185
187
theorem realize_mul (x y : ring.Term Ξ±) (v : Ξ± β†’ R) : Term.realize v (x * y) = Term.realize v x * Term.realize v y := by
simp [mul_def, funMap_mul]
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " βˆ€ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " βˆ€ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.MvPolynomial.Rename import Mathlib.Algebra.Order.BigOperators.Ring.Finset #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp Ad...
Mathlib/Algebra/MvPolynomial/Degrees.lean
133
135
theorem degrees_sum {ΞΉ : Type*} [DecidableEq Οƒ] (s : Finset ΞΉ) (f : ΞΉ β†’ MvPolynomial Οƒ R) : (βˆ‘ i ∈ s, f i).degrees ≀ s.sup fun i => (f i).degrees := by
simp_rw [degrees_def]; exact supDegree_sum_le
[ " p.degrees = p.support.sup fun s => toMultiset s", " (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s", " ((monomial s) a).degrees ≀ toMultiset s", " (if a = 0 then βŠ₯ else toMultiset s) ≀ toMultiset s", " toMultiset s ≀ toMultiset s", " ((monomial s) a).degrees = toMultiset s",...
[ " p.degrees = p.support.sup fun s => toMultiset s", " (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s", " ((monomial s) a).degrees ≀ toMultiset s", " (if a = 0 then βŠ₯ else toMultiset s) ≀ toMultiset s", " toMultiset s ≀ toMultiset s", " ((monomial s) a).degrees = toMultiset s",...
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
85
90
theorem card_Ioc : (Ioc a b).card = b - a := by
rw [← Nat.card_Ioc] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Ioc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
[ " (Icc a b).card = ↑b + 1 - ↑a", " (Icc a b).card = (Icc ↑a ↑b).card", " (Icc a b).card = (map (Embedding.subtype fun n => 0 < n) (Icc a b)).card", " (Ico a b).card = ↑b - ↑a", " (Ico a b).card = (Ico ↑a ↑b).card", " (Ico a b).card = (map (Embedding.subtype fun n => 0 < n) (Ico a b)).card", " (Ioc a b)....
[ " (Icc a b).card = ↑b + 1 - ↑a", " (Icc a b).card = (Icc ↑a ↑b).card", " (Icc a b).card = (map (Embedding.subtype fun n => 0 < n) (Icc a b)).card", " (Ico a b).card = ↑b - ↑a", " (Ico a b).card = (Ico ↑a ↑b).card", " (Ico a b).card = (map (Embedding.subtype fun n => 0 < n) (Ico a b)).card" ]
import Mathlib.Geometry.RingedSpace.PresheafedSpace import Mathlib.CategoryTheory.Limits.Final import Mathlib.Topology.Sheaves.Stalks #align_import algebraic_geometry.stalks from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section universe v u v' u' open Opposite Cate...
Mathlib/Geometry/RingedSpace/Stalks.lean
181
184
theorem congr_hom {X Y : PresheafedSpace.{_, _, v} C} (Ξ± Ξ² : X ⟢ Y) (h : Ξ± = Ξ²) (x : X) : stalkMap Ξ± x = eqToHom (show Y.stalk (Ξ±.base x) = Y.stalk (Ξ².base x) by rw [h]) ≫ stalkMap Ξ² x := by
rw [← stalkMap.congr Ξ± Ξ² h x x rfl, eqToHom_refl, Category.comp_id]
[]
[]
import Mathlib.SetTheory.Ordinal.FixedPoint #align_import set_theory.ordinal.principal from "leanprover-community/mathlib"@"31b269b60935483943542d547a6dd83a66b37dc7" universe u v w noncomputable section open Order namespace Ordinal -- Porting note: commented out, doesn't seem necessary --local infixr:0 "^" => ...
Mathlib/SetTheory/Ordinal/Principal.lean
52
54
theorem principal_iff_principal_swap {op : Ordinal β†’ Ordinal β†’ Ordinal} {o : Ordinal} : Principal op o ↔ Principal (Function.swap op) o := by
constructor <;> exact fun h a b ha hb => h hb ha
[ " Principal op o ↔ Principal (Function.swap op) o", " Principal op o β†’ Principal (Function.swap op) o", " Principal (Function.swap op) o β†’ Principal op o" ]
[]
import Mathlib.RingTheory.Derivation.ToSquareZero import Mathlib.RingTheory.Ideal.Cotangent import Mathlib.RingTheory.IsTensorProduct import Mathlib.Algebra.Exact import Mathlib.Algebra.MvPolynomial.PDeriv import Mathlib.Algebra.Polynomial.Derivation #align_import ring_theory.kaehler from "leanprover-community/mathli...
Mathlib/RingTheory/Kaehler.lean
105
128
theorem KaehlerDifferential.submodule_span_range_eq_ideal : Submodule.span S (Set.range fun s : S => (1 : S) βŠ—β‚œ[R] s - s βŠ—β‚œ[R] (1 : S)) = (KaehlerDifferential.ideal R S).restrictScalars S := by
apply le_antisymm Β· rw [Submodule.span_le] rintro _ ⟨s, rfl⟩ exact KaehlerDifferential.one_smul_sub_smul_one_mem_ideal _ _ Β· rintro x (hx : _ = _) have : x - TensorProduct.lmul' (S := S) R x βŠ—β‚œ[R] (1 : S) = x := by rw [hx, TensorProduct.zero_tmul, sub_zero] rw [← this] clear this hx ...
[ " 1 βŠ—β‚œ[R] a - a βŠ—β‚œ[R] 1 ∈ ideal R S", " D.tensorProductTo (x * y) =\n (TensorProduct.lmul' R) x β€’ D.tensorProductTo y + (TensorProduct.lmul' R) y β€’ D.tensorProductTo x", " D.tensorProductTo (0 * y) =\n (TensorProduct.lmul' R) 0 β€’ D.tensorProductTo y + (TensorProduct.lmul' R) y β€’ D.tensorProductTo 0", " ...
[ " 1 βŠ—β‚œ[R] a - a βŠ—β‚œ[R] 1 ∈ ideal R S", " D.tensorProductTo (x * y) =\n (TensorProduct.lmul' R) x β€’ D.tensorProductTo y + (TensorProduct.lmul' R) y β€’ D.tensorProductTo x", " D.tensorProductTo (0 * y) =\n (TensorProduct.lmul' R) 0 β€’ D.tensorProductTo y + (TensorProduct.lmul' R) y β€’ D.tensorProductTo 0", " ...
import Mathlib.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Order.Interval.Finset.Nat #align_import data.polynomial.inductions from "leanprover-community/mathlib"@"57e09a1296bf...
Mathlib/Algebra/Polynomial/Inductions.lean
119
143
theorem degree_divX_lt (hp0 : p β‰  0) : (divX p).degree < p.degree := by
haveI := Nontrivial.of_polynomial_ne hp0 calc degree (divX p) < (divX p * X + C (p.coeff 0)).degree := if h : degree p ≀ 0 then by have h' : C (p.coeff 0) β‰  0 := by rwa [← eq_C_of_degree_le_zero h] rw [eq_C_of_degree_le_zero h, divX_C, degree_zero, zero_mul, zero_add] exact lt_of_...
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
import Mathlib.Data.List.Basic #align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" -- Make sure we don't import algebra assert_not_exists Monoid variable {Ξ± Ξ² : Type*} namespace List attribute [simp] join -- Porting note (#10618): simp can prove this -- @...
Mathlib/Data/List/Join.lean
115
119
theorem drop_sum_join' (L : List (List Ξ±)) (i : β„•) : L.join.drop (Nat.sum ((L.map length).take i)) = (L.drop i).join := by
induction L generalizing i Β· simp Β· cases i <;> simp [drop_append, *]
[ " [l].join = l", " (l :: L).join = [] ↔ βˆ€ (l_1 : List Ξ±), l_1 ∈ l :: L β†’ l_1 = []", " (L₁ ++ Lβ‚‚).join = L₁.join ++ Lβ‚‚.join", " ([] ++ Lβ‚‚).join = [].join ++ Lβ‚‚.join", " (head✝ :: tail✝ ++ Lβ‚‚).join = (head✝ :: tail✝).join ++ Lβ‚‚.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
[ " [l].join = l", " (l :: L).join = [] ↔ βˆ€ (l_1 : List Ξ±), l_1 ∈ l :: L β†’ l_1 = []", " (L₁ ++ Lβ‚‚).join = L₁.join ++ Lβ‚‚.join", " ([] ++ Lβ‚‚).join = [].join ++ Lβ‚‚.join", " (head✝ :: tail✝ ++ Lβ‚‚).join = (head✝ :: tail✝).join ++ Lβ‚‚.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.Algebra.CharP.Reduced open Function Polynomial class PerfectRing (R : Type*) (p : β„•) [CommSemiring R] [ExpChar R p] : Prop where bijective_frobenius : Bijective <| frobenius R p section PerfectRing va...
Mathlib/FieldTheory/Perfect.lean
116
117
theorem iterateFrobeniusEquiv_one_apply (x : R) : iterateFrobeniusEquiv R p 1 x = x ^ p := by
rw [iterateFrobeniusEquiv_def, pow_one]
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x", " (iterateFrobeniusEquiv R p 1) x = x ^ p" ]
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x" ]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Group.Instances import Mathlib.Algebra.Order.Group.MinMax import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Data.Finset.Preimage import Mathlib.Order.Interval.Set.Disjoint import Mathlib.Order.Int...
Mathlib/Order/Filter/AtTopBot.lean
118
125
theorem disjoint_atBot_atTop [PartialOrder Ξ±] [Nontrivial Ξ±] : Disjoint (atBot : Filter Ξ±) atTop := by
rcases exists_pair_ne Ξ± with ⟨x, y, hne⟩ by_cases hle : x ≀ y Β· refine disjoint_of_disjoint_of_mem ?_ (Iic_mem_atBot x) (Ici_mem_atTop y) exact Iic_disjoint_Ici.2 (hle.lt_of_ne hne).not_le Β· refine disjoint_of_disjoint_of_mem ?_ (Iic_mem_atBot y) (Ici_mem_atTop x) exact Iic_disjoint_Ici.2 hle
[ " Disjoint atBot atTop", " Disjoint (Iic x) (Ici y)", " Disjoint (Iic y) (Ici x)" ]
[]
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Ring.Invertible import Mathlib.Data.Nat.Cast.Order #align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±} @[simp]
Mathlib/Algebra/Order/Invertible.lean
19
21
theorem invOf_pos [Invertible a] : 0 < β…Ÿ a ↔ 0 < a := haveI : 0 < a * β…Ÿ a := by
simp only [mul_invOf_self, zero_lt_one] ⟨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.le⟩
[ " 0 < a * β…Ÿa" ]
[]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.Algebra.Star.Subalgebra import Mathlib.Algebra.Star.Unitary import Mathlib.Topology.Algebra.Module.Star #align_import analysis.no...
Mathlib/Analysis/NormedSpace/Star/Basic.lean
212
214
theorem norm_coe_unitary [Nontrivial E] (U : unitary E) : β€–(U : E)β€– = 1 := by
rw [← sq_eq_sq (norm_nonneg _) zero_le_one, one_pow 2, sq, ← CstarRing.norm_star_mul_self, unitary.coe_star_mul_self, CstarRing.norm_one]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–", " β€–1β€– = 1", " ‖↑Uβ€– = 1" ]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–", " β€–1β€– = 1" ]
import Mathlib.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Order.Interval.Finset.Nat #align_import data.polynomial.inductions from "leanprover-community/mathlib"@"57e09a1296bf...
Mathlib/Algebra/Polynomial/Inductions.lean
88
92
theorem divX_X_pow : divX (X ^ n : R[X]) = if (n = 0) then 0 else X ^ (n - 1) := by
cases n Β· simp Β· ext n simp [coeff_X_pow]
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
[ " p.divX.coeff n = p.coeff (n + 1)", " p.divX.coeff n = p.coeff (1 + n)", " { toFinsupp := toFinsupp✝ }.divX.coeff n = { toFinsupp := toFinsupp✝ }.coeff (1 + n)", " βˆ€ (n : β„•), (p.divX * X + C (p.coeff 0)).coeff n = p.coeff n", " (p.divX * X + C (p.coeff 0)).coeff 0 = p.coeff 0", " (p.divX * X + C (p.coeff...
import Mathlib.FieldTheory.Extension import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.GroupTheory.Solvable #align_import field_theory.normal from "leanprover-community/mathlib"@"9fb8964792b4237dac6200193a0d533f1b3f7423" noncomputable section open scoped Classical Polynomial open Polynomial ...
Mathlib/FieldTheory/Normal.lean
107
111
theorem Normal.of_algEquiv [h : Normal F E] (f : E ≃ₐ[F] E') : Normal F E' := by
rw [normal_iff] at h ⊒ intro x; specialize h (f.symm x) rw [← f.apply_symm_apply x, minpoly.algEquiv_eq, ← f.toAlgHom.comp_algebraMap] exact ⟨h.1.map f, splits_comp_of_splits _ _ h.2⟩
[ " βˆƒ p, IsSplittingField F K p", " Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (s x)).rootSet K)) =\n Subalgebra.toSubmodule ⊀", " βˆ€ (y : ↑(Basis.ofVectorSpaceIndex F K)),\n s y ∈\n ↑(Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpace...
[ " βˆƒ p, IsSplittingField F K p", " Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (s x)).rootSet K)) =\n Subalgebra.toSubmodule ⊀", " βˆ€ (y : ↑(Basis.ofVectorSpaceIndex F K)),\n s y ∈\n ↑(Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpace...
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
312
317
theorem _root_.IsAntichain.finite_of_partiallyWellOrderedOn (ha : IsAntichain r s) (hp : s.PartiallyWellOrderedOn r) : s.Finite := by
refine not_infinite.1 fun hi => ?_ obtain ⟨m, n, hmn, h⟩ := hp (fun n => hi.natEmbedding _ n) fun n => (hi.natEmbedding _ n).2 exact hmn.ne ((hi.natEmbedding _).injective <| Subtype.val_injective <| ha.eq (hi.natEmbedding _ m).2 (hi.natEmbedding _ n).2 h)
[ " (s βˆͺ t).PartiallyWellOrderedOn r", " βˆƒ m n, m < n ∧ r (f m) (f n)", " (f '' s).PartiallyWellOrderedOn r'", " βˆƒ m n, m < n ∧ r' (g' m) (g' n)", " βˆƒ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)", " s.Finite", " False" ]
[ " (s βˆͺ t).PartiallyWellOrderedOn r", " βˆƒ m n, m < n ∧ r (f m) (f n)", " (f '' s).PartiallyWellOrderedOn r'", " βˆƒ m n, m < n ∧ r' (g' m) (g' n)", " βˆƒ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)" ]
import Batteries.Data.Array.Lemmas namespace ByteArray @[ext] theorem ext : {a b : ByteArray} β†’ a.data = b.data β†’ a = b | ⟨_⟩, ⟨_⟩, rfl => rfl theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data[i] := rfl @[simp] theorem uset_eq_set (a : ByteArray) {i : USize} (h : i.toNat < a.size...
.lake/packages/batteries/Batteries/Data/ByteArray.lean
79
82
theorem get_append_left {a b : ByteArray} (hlt : i < a.size) (h : i < (a ++ b).size := size_append .. β–Έ Nat.lt_of_lt_of_le hlt (Nat.le_add_right ..)) : (a ++ b)[i] = a[i] := by
simp [getElem_eq_data_getElem]; exact Array.get_append_left hlt
[ " ↑i < (a.set i v).size", " (a ++ b).data = a.data ++ b.data", " (a.append b).data = a.data ++ b.data", " a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data", " (a ++ b).size = a.size + b.size", " (a.data ++ b.data).size = a.data.size + b.data.size", " (a ++ b)...
[ " ↑i < (a.set i v).size", " (a ++ b).data = a.data ++ b.data", " (a.append b).data = a.data ++ b.data", " a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data", " (a ++ b).size = a.size + b.size", " (a.data ++ b.data).size = a.data.size + b.data.size" ]
import Mathlib.Data.Finset.Fin import Mathlib.Data.Int.Order.Units import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.Perm.Support import Mathlib.Logic.Equiv.Fintype #align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" universe u v o...
Mathlib/GroupTheory/Perm/Finite.lean
57
65
theorem perm_inv_on_of_perm_on_finset {s : Finset Ξ±} {f : Perm Ξ±} (h : βˆ€ x ∈ s, f x ∈ s) {y : Ξ±} (hy : y ∈ s) : f⁻¹ y ∈ s := by
have h0 : βˆ€ y ∈ s, βˆƒ (x : _) (hx : x ∈ s), y = (fun i (_ : i ∈ s) => f i) x hx := Finset.surj_on_of_inj_on_of_card_le (fun x hx => (fun i _ => f i) x hx) (fun a ha => h a ha) (fun a₁ aβ‚‚ ha₁ haβ‚‚ heq => (Equiv.apply_eq_iff_eq f).mp heq) rfl.ge obtain ⟨y2, hy2, heq⟩ := h0 y hy convert hy2 rw [heq] sim...
[ " -1 β‰  1", " f⁻¹ y ∈ s", " f⁻¹ y = y2", " f⁻¹ ((fun i x => f i) y2 hy2) = y2" ]
[ " -1 β‰  1" ]
import Batteries.Tactic.Alias import Batteries.Data.Nat.Basic namespace Nat @[simp] theorem recAux_zero {motive : Nat β†’ Sort _} (zero : motive 0) (succ : βˆ€ n, motive n β†’ motive (n+1)) : Nat.recAux zero succ 0 = zero := rfl theorem recAux_succ {motive : Nat β†’ Sort _} (zero : motive 0) (succ : βˆ€ n, mo...
.lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean
44
46
theorem strongRec_eq {motive : Nat β†’ Sort _} (ind : βˆ€ n, (βˆ€ m, m < n β†’ motive m) β†’ motive n) (t : Nat) : Nat.strongRec ind t = ind t fun m _ => Nat.strongRec ind m := by
conv => lhs; unfold Nat.strongRec
[ " Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m", "motive : Nat β†’ Sort u_1\nind : (n : Nat) β†’ ((m : Nat) β†’ m < n β†’ motive m) β†’ motive n\nt : Nat\n| Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m", "motive : Nat β†’ Sort u_1 ind : (n : Nat) β†’ ((m : Nat) β†’ m < n β†’ motive m) β†’ motive n t : N...
[]
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055" noncomputable section open scoped Classical namespace CategoryTheory open Cat...
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
151
158
theorem leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J β†’ C) : (leftDistributor X f).hom = βˆ‘ j : J, (X ◁ biproduct.Ο€ f j) ≫ biproduct.ΞΉ (fun j => X βŠ— f j) j := by
ext dsimp [leftDistributor, Functor.mapBiproduct, Functor.mapBicone] erw [biproduct.lift_Ο€] simp only [Preadditive.sum_comp, Category.assoc, biproduct.ΞΉ_Ο€, comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, ite_true, eqToHom_refl, Category.comp_id]
[ " βˆ€ {X Y Z : D}, X ◁ 0 = 0", " X✝ ◁ 0 = 0", " F.map (X✝ ◁ 0) = F.map 0", " βˆ€ {X Y Z : D}, 0 β–· X = 0", " 0 β–· X✝ = 0", " F.map (0 β–· X✝) = F.map 0", " βˆ€ {X Y Z : D} (f g : Y ⟢ Z), X ◁ (f + g) = X ◁ f + X ◁ g", " X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝", " F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",...
[ " βˆ€ {X Y Z : D}, X ◁ 0 = 0", " X✝ ◁ 0 = 0", " F.map (X✝ ◁ 0) = F.map 0", " βˆ€ {X Y Z : D}, 0 β–· X = 0", " 0 β–· X✝ = 0", " F.map (0 β–· X✝) = F.map 0", " βˆ€ {X Y Z : D} (f g : Y ⟢ Z), X ◁ (f + g) = X ◁ f + X ◁ g", " X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝", " F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Nat.Choose.Central import Mathlib.Data.Tree.Basic import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.GCongr import Mathlib...
Mathlib/Combinatorics/Enumerative/Catalan.lean
72
75
theorem catalan_succ' (n : β„•) : catalan (n + 1) = βˆ‘ ij ∈ antidiagonal n, catalan ij.1 * catalan ij.2 := by
rw [catalan_succ, Nat.sum_antidiagonal_eq_sum_range_succ (fun x y => catalan x * catalan y) n, sum_range]
[ " catalan 0 = 1", " catalan (n + 1) = βˆ‘ i : Fin n.succ, catalan ↑i * catalan (n - ↑i)", " catalan (n + 1) = βˆ‘ ij ∈ antidiagonal n, catalan ij.1 * catalan ij.2" ]
[ " catalan 0 = 1", " catalan (n + 1) = βˆ‘ i : Fin n.succ, catalan ↑i * catalan (n - ↑i)" ]
import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.integer from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" variable {R : Type*} [CommSemiring R] {M : Submonoid R} {S : Type*} [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] open ...
Mathlib/RingTheory/Localization/Integer.lean
107
111
theorem exist_integer_multiples_of_finite {ΞΉ : Type*} [Finite ΞΉ] (f : ΞΉ β†’ S) : βˆƒ b : M, βˆ€ i, IsLocalization.IsInteger R ((b : R) β€’ f i) := by
cases nonempty_fintype ι obtain ⟨b, hb⟩ := exist_integer_multiples M Finset.univ f exact ⟨b, fun i => hb i (Finset.mem_univ _)⟩
[ " IsInteger R (a β€’ b)", " (algebraMap R S) (a * b') = a β€’ b", " βˆƒ b, IsInteger R (↑b β€’ a)", " βˆƒ b, IsInteger R (a * (algebraMap R S) ↑b)", " βˆƒ b, βˆ€ i ∈ s, IsInteger R (↑b β€’ f i)", " R", " (algebraMap R S) (↑(∏ j ∈ s.erase i, (sec M (f j)).2) * (sec M (f i)).1) = ↑(∏ i ∈ s, (sec M (f i)).2) β€’ f i", " (...
[ " IsInteger R (a β€’ b)", " (algebraMap R S) (a * b') = a β€’ b", " βˆƒ b, IsInteger R (↑b β€’ a)", " βˆƒ b, IsInteger R (a * (algebraMap R S) ↑b)", " βˆƒ b, βˆ€ i ∈ s, IsInteger R (↑b β€’ f i)", " R", " (algebraMap R S) (↑(∏ j ∈ s.erase i, (sec M (f j)).2) * (sec M (f i)).1) = ↑(∏ i ∈ s, (sec M (f i)).2) β€’ f i", " (...
import Mathlib.Topology.ContinuousOn #align_import topology.algebra.order.left_right from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Set Filter Topology section TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [LinearOrder Ξ±] [TopologicalSpace Ξ²] theorem nhds_lef...
Mathlib/Topology/Order/LeftRight.lean
119
120
theorem nhds_left_sup_nhds_right' (a : Ξ±) : 𝓝[≀] a βŠ” 𝓝[>] a = 𝓝 a := by
rw [← nhdsWithin_union, Iic_union_Ioi, nhdsWithin_univ]
[ " 𝓝[≀] a βŠ” 𝓝[β‰₯] a = 𝓝 a", " 𝓝[<] a βŠ” 𝓝[β‰₯] a = 𝓝 a", " 𝓝[≀] a βŠ” 𝓝[>] a = 𝓝 a" ]
[ " 𝓝[≀] a βŠ” 𝓝[β‰₯] a = 𝓝 a", " 𝓝[<] a βŠ” 𝓝[β‰₯] a = 𝓝 a" ]
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory.Invariants universe v u noncomputable section open CategoryTheory Limits Representation variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G) namespace grou...
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
524
526
theorem map_one_of_isMulOneCocycle {f : G β†’ M} (hf : IsMulOneCocycle f) : f 1 = 1 := by
simpa only [mul_one, one_smul, self_eq_mul_right] using hf 1 1
[ " f 1 = 1" ]
[]
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ sβ‚‚ t₁ tβ‚‚ : Set X} {x : X} theorem nhdsSet_diagonal (X) [T...
Mathlib/Topology/NhdsSet.lean
124
124
theorem nhdsSet_singleton : 𝓝˒ {x} = 𝓝 x := by
simp [nhdsSet]
[ " 𝓝˒ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝˒ t ↔ βˆ€ x ∈ t, s ∈ 𝓝 x", " 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f", " s βŠ† interior t ↔ t ∈ 𝓝˒ s", " Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t)", " ...
[ " 𝓝˒ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝˒ t ↔ βˆ€ x ∈ t, s ∈ 𝓝 x", " 𝓝˒ s ≀ f ↔ βˆ€ x ∈ s, 𝓝 x ≀ f", " s βŠ† interior t ↔ t ∈ 𝓝˒ s", " Disjoint (π“Ÿ s) (𝓝˒ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝˒ s) (π“Ÿ t) ↔ Disjoint s (closure t)", " ...