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)",
" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.