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.Dynamics.Ergodic.AddCircle
import Mathlib.MeasureTheory.Covering.LiminfLimsup
#align_import number_theory.well_approximable from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Set Filter Function Metric MeasureTheory
open scoped MeasureTheory Topology Pointwise
@[... | Mathlib/NumberTheory/WellApproximable.lean | 183 | 191 | theorem mem_addWellApproximable_iff (Ξ΄ : β β β) (x : UnitAddCircle) :
x β addWellApproximable UnitAddCircle Ξ΄ β
{n : β | β m < n, gcd m n = 1 β§ βx - β((m : β) / n)β < Ξ΄ n}.Infinite := by |
simp only [mem_add_wellApproximable_iff, β Nat.cofinite_eq_atTop, cofinite.blimsup_set_eq,
mem_setOf_eq]
refine iff_of_eq (congr_arg Set.Infinite <| ext fun n => β¨fun hn => ?_, fun hn => ?_β©)
Β· exact (mem_approxAddOrderOf_iff hn.1).mp hn.2
Β· have h : 0 < n := by obtain β¨m, hmβ, _, _β© := hn; exact pos_of_gt... | [
" a β approxOrderOf A n Ξ΄ β β b, orderOf b = n β§ a β ball b Ξ΄",
" x β approxAddOrderOf UnitAddCircle n Ξ΄ β β m < n, gcd m n = 1 β§ βx - β(βm / βn)β < Ξ΄",
" (β b, (β m < n, m.gcd n = 1 β§ β(βm / βn) = b) β§ βx - bβ < Ξ΄) β β m < n, gcd m n = 1 β§ βx - β(βm / βn)β < Ξ΄",
" (β b, (β m < n, m.gcd n = 1 β§ β(βm / βn) = b... | [
" a β approxOrderOf A n Ξ΄ β β b, orderOf b = n β§ a β ball b Ξ΄",
" x β approxAddOrderOf UnitAddCircle n Ξ΄ β β m < n, gcd m n = 1 β§ βx - β(βm / βn)β < Ξ΄",
" (β b, (β m < n, m.gcd n = 1 β§ β(βm / βn) = b) β§ βx - bβ < Ξ΄) β β m < n, gcd m n = 1 β§ βx - β(βm / βn)β < Ξ΄",
" (β b, (β m < n, m.gcd n = 1 β§ β(βm / βn) = b... |
import Mathlib.Data.PNat.Prime
import Mathlib.Algebra.IsPrimePow
import Mathlib.NumberTheory.Cyclotomic.Basic
import Mathlib.RingTheory.Adjoin.PowerBasis
import Mathlib.RingTheory.Polynomial.Cyclotomic.Eval
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand
#align_import number_theo... | Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean | 128 | 131 | theorem powerBasis_gen_mem_adjoin_zeta_sub_one :
(hΞΆ.powerBasis K).gen β adjoin K ({ΞΆ - 1} : Set L) := by |
rw [powerBasis_gen, adjoin_singleton_eq_range_aeval, AlgHom.mem_range]
exact β¨X + 1, by simpβ©
| [
" (IsPrimitiveRoot.powerBasis K hΞΆ).gen β adjoin K {ΞΆ - 1}",
" β x, (aeval (ΞΆ - 1)) x = ΞΆ",
" (aeval (ΞΆ - 1)) (X + 1) = ΞΆ"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Topology.Order.ProjIcc
#align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Filter
open S... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean | 58 | 61 | theorem arcsin_projIcc (x : β) :
arcsin (projIcc (-1) 1 (neg_le_self zero_le_one) x) = arcsin x := by |
rw [arcsin, Function.comp_apply, IccExtend_val, Function.comp_apply, IccExtend,
Function.comp_apply]
| [
" range arcsin = Icc (-(Ο / 2)) (Ο / 2)",
" Subtype.val '' range (IccExtend arcsin.proof_2 βsinOrderIso.symm) = Icc (-(Ο / 2)) (Ο / 2)",
" (β(projIcc (-1) 1 β― x)).arcsin = x.arcsin"
] | [
" range arcsin = Icc (-(Ο / 2)) (Ο / 2)",
" Subtype.val '' range (IccExtend arcsin.proof_2 βsinOrderIso.symm) = Icc (-(Ο / 2)) (Ο / 2)"
] |
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 | 423 | 427 | theorem smul_map_inv_sub_map_inv_of_isTwoCocycle {f : G Γ G β A} (hf : IsTwoCocycle f) (g : G) :
g β’ f (gβ»ΒΉ, g) - f (g, gβ»ΒΉ) = f (1, 1) - f (g, 1) := by |
have := hf g gβ»ΒΉ g
simp only [mul_right_inv, mul_left_inv, map_one_fst_of_isTwoCocycle hf g] at this
exact sub_eq_sub_iff_add_eq_add.2 this.symm
| [
" f 1 = 0",
" f (1, g) = f (1, 1)",
" f (g, 1) = g β’ f (1, 1)",
" g β’ f gβ»ΒΉ = -f g",
" g β’ f (gβ»ΒΉ, g) - f (g, gβ»ΒΉ) = f (1, 1) - f (g, 1)"
] | [
" f 1 = 0",
" f (1, g) = f (1, 1)",
" f (g, 1) = g β’ f (1, 1)",
" g β’ f gβ»ΒΉ = -f g"
] |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X Ξ± : Type*} {ΞΉ : Sort*}
section BaireTheorem
variable [TopologicalSpace... | Mathlib/Topology/Baire/Lemmas.lean | 132 | 145 | theorem IsGΞ΄.dense_iUnion_interior_of_closed [Countable ΞΉ] {s : Set X} (hs : IsGΞ΄ s) (hd : Dense s)
{f : ΞΉ β Set X} (hc : β i, IsClosed (f i)) (hU : s β β i, f i) :
Dense (β i, interior (f i)) := by |
let g i := (frontier (f i))αΆ
have hgo : β i, IsOpen (g i) := fun i => isClosed_frontier.isOpen_compl
have hgd : Dense (β i, g i) := by
refine dense_iInter_of_isOpen hgo fun i x => ?_
rw [closure_compl, interior_frontier (hc _)]
exact id
refine (hd.inter_of_GΞ΄ hs (.iInter_of_isOpen fun i => (hgo i))... | [
" Dense (ββ S)",
" Dense (ββ range f)",
" Dense (β s β S, f s)",
" Dense (ββ ((fun s => f s) '' S))",
" β s β (fun s => f s) '' S, IsOpen s",
" β s β (fun s => f s) '' S, Dense s",
" s β residual X β β t β s, IsGΞ΄ t β§ Dense t",
" s β residual X β β t β s, IsGΞ΄ t β§ Dense t",
" (β S, (β t β S, IsOpen ... | [
" Dense (ββ S)",
" Dense (ββ range f)",
" Dense (β s β S, f s)",
" Dense (ββ ((fun s => f s) '' S))",
" β s β (fun s => f s) '' S, IsOpen s",
" β s β (fun s => f s) '' S, Dense s",
" s β residual X β β t β s, IsGΞ΄ t β§ Dense t",
" s β residual X β β t β s, IsGΞ΄ t β§ Dense t",
" (β S, (β t β S, IsOpen ... |
import Mathlib.CategoryTheory.Sites.Subsheaf
import Mathlib.CategoryTheory.Sites.CompatibleSheafification
import Mathlib.CategoryTheory.Sites.LocallyInjective
#align_import category_theory.sites.surjective from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe v u w v' u' w'
open ... | Mathlib/CategoryTheory/Sites/LocallySurjective.lean | 119 | 124 | theorem isLocallySurjective_of_surjective {F G : Cα΅α΅ β₯€ A} (f : F βΆ G)
(H : β U, Function.Surjective (f.app U)) : IsLocallySurjective J f where
imageSieve_mem {U} s := by |
obtain β¨t, rflβ© := H _ s
rw [imageSieve_app]
exact J.top_mem _
| [
" β {Y Z : C} {f_1 : Y βΆ U},\n (fun V i => β t, (f.app { unop := V }) t = (G.map i.op) s) Y f_1 β\n β (g : Z βΆ Y), (fun V i => β t, (f.app { unop := V }) t = (G.map i.op) s) Z (g β« f_1)",
" β t, (f.app { unop := W }) t = (G.map (j β« i).op) s",
" (f.app { unop := W }) ((F.map j.op) t) = (G.map (j β« i).op... | [
" β {Y Z : C} {f_1 : Y βΆ U},\n (fun V i => β t, (f.app { unop := V }) t = (G.map i.op) s) Y f_1 β\n β (g : Z βΆ Y), (fun V i => β t, (f.app { unop := V }) t = (G.map i.op) s) Z (g β« f_1)",
" β t, (f.app { unop := W }) t = (G.map (j β« i).op) s",
" (f.app { unop := W }) ((F.map j.op) t) = (G.map (j β« i).op... |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.Order.Fin
import Mathlib.Order.PiLex
import Mathlib.Order.Interval.Set.Basic
#align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b"
assert_not_exists MonoidWithZero
un... | Mathlib/Data/Fin/Tuple/Basic.lean | 141 | 150 | theorem cons_self_tail : cons (q 0) (tail q) = q := by |
ext j
by_cases h : j = 0
Β· rw [h]
simp
Β· let j' := pred j h
have : j'.succ = j := succ_pred j h
rw [β this]
unfold tail
rw [cons_succ]
| [
" Unique ((i : Fin 0) β Ξ± i)",
" tail (cons x p) = p",
" cons x p i.succ = p i",
" cons x p 0 = x",
" cons x p 1 = p 0",
" cons x p 1 = cons x p (succ 0)",
" cons x (update p i y) = update (cons x p) i.succ y",
" cons x (update p i y) j = update (cons x p) i.succ y j",
" cons x (update p i y) 0 = up... | [
" Unique ((i : Fin 0) β Ξ± i)",
" tail (cons x p) = p",
" cons x p i.succ = p i",
" cons x p 0 = x",
" cons x p 1 = p 0",
" cons x p 1 = cons x p (succ 0)",
" cons x (update p i y) = update (cons x p) i.succ y",
" cons x (update p i y) j = update (cons x p) i.succ y j",
" cons x (update p i y) 0 = up... |
import Mathlib.AlgebraicGeometry.Properties
#align_import algebraic_geometry.function_field from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
-- Explicit universe annotations were used in this file to improve perfomance #12737
set_option linter.uppercaseLean3 false
universe u v
open... | Mathlib/AlgebraicGeometry/FunctionField.lean | 67 | 75 | theorem germ_injective_of_isIntegral [IsIntegral X] {U : Opens X.carrier} (x : U) :
Function.Injective (X.presheaf.germ x) := by |
rw [injective_iff_map_eq_zero]
intro y hy
rw [β (X.presheaf.germ x).map_zero] at hy
obtain β¨W, hW, iU, iV, eβ© := X.presheaf.germ_eq _ x.prop x.prop _ _ hy
cases Subsingleton.elim iU iV
haveI : Nonempty W := β¨β¨_, hWβ©β©
exact map_injective_of_isIntegral X iU e
| [
" (β€ β© βU).Nonempty",
" Field βX.functionField",
" IsUnit a β¨ a = 0",
" IsUnit ((X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s) β¨\n (X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s = 0",
" Β¬(X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s =\n (X.presheaf.germ β¨ge... | [
" (β€ β© βU).Nonempty",
" Field βX.functionField",
" IsUnit a β¨ a = 0",
" IsUnit ((X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s) β¨\n (X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s = 0",
" Β¬(X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s =\n (X.presheaf.germ β¨ge... |
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 | 106 | 111 | theorem continuousWithinAt_dslope_of_ne (h : b β a) :
ContinuousWithinAt (dslope f a) s b β ContinuousWithinAt f s b := by |
refine β¨ContinuousWithinAt.of_dslope, fun hc => ?_β©
simp only [dslope, continuousWithinAt_update_of_ne h]
exact ((continuousWithinAt_id.sub continuousWithinAt_const).invβ (sub_ne_zero.2 h)).smul
(hc.sub continuousWithinAt_const)
| [
" 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.Order.Ring.Defs
import Mathlib.Algebra.Group.Int
import Mathlib.Data.Nat.Dist
import Mathlib.Data.Ordmap.Ordnode
import Mathlib.Tactic.Abel
import Mathlib.Tactic.Linarith
#align_import data.ordmap.ordset from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69"
variable... | Mathlib/Data/Ordmap/Ordset.lean | 124 | 130 | theorem Sized.induction {t} (hl : @Sized Ξ± t) {C : Ordnode Ξ± β Prop} (H0 : C nil)
(H1 : β l x r, C l β C r β C (.node' l x r)) : C t := by |
induction t with
| nil => exact H0
| node _ _ _ _ t_ih_l t_ih_r =>
rw [hl.eq_node']
exact H1 _ _ _ (t_ih_l hl.2.1) (t_ih_r hl.2.2)
| [
" 0 < delta",
" a β€ delta * (delta * a)",
" 1 β€ delta * delta",
" node s l x r = l.node' x r",
" C t",
" C nil",
" C (node sizeβ lβ xβ rβ)",
" C (lβ.node' xβ rβ)"
] | [
" 0 < delta",
" a β€ delta * (delta * a)",
" 1 β€ delta * delta",
" node s l x r = l.node' x r"
] |
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Finset.Preimage
#align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
@[ext]
structure YoungDiagram where
cells : Finset (β Γ β)
isLowerSet : IsLowerSet (cel... | Mathlib/Combinatorics/Young/YoungDiagram.lean | 219 | 221 | theorem transpose_transpose (ΞΌ : YoungDiagram) : ΞΌ.transpose.transpose = ΞΌ := by |
ext x
simp
| [
" ΞΌ = Ξ½",
" xβΒΉ β β((Equiv.prodComm β β).finsetCongr ΞΌ.cells) β xβ β β((Equiv.prodComm β β).finsetCongr ΞΌ.cells)",
" (Equiv.prodComm β β).symm xβΒΉ β ΞΌ.cells β (Equiv.prodComm β β).symm xβ β ΞΌ.cells",
" (Equiv.prodComm β β).symm xβ β ΞΌ.cells",
" (Equiv.prodComm β β).symm xβ β€ (Equiv.prodComm β β).symm xβΒΉ",
... | [
" ΞΌ = Ξ½",
" xβΒΉ β β((Equiv.prodComm β β).finsetCongr ΞΌ.cells) β xβ β β((Equiv.prodComm β β).finsetCongr ΞΌ.cells)",
" (Equiv.prodComm β β).symm xβΒΉ β ΞΌ.cells β (Equiv.prodComm β β).symm xβ β ΞΌ.cells",
" (Equiv.prodComm β β).symm xβ β ΞΌ.cells",
" (Equiv.prodComm β β).symm xβ β€ (Equiv.prodComm β β).symm xβΒΉ",
... |
import Mathlib.Topology.Category.LightProfinite.Limits
import Mathlib.CategoryTheory.Sites.Coherent.Comparison
universe u
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
namespace LightProfinite
noncomputable
def EffectiveEpi.struct {B X : LightProfinite.{u}} (... | Mathlib/Topology/Category/LightProfinite/EffectiveEpi.lean | 54 | 58 | theorem effectiveEpi_iff_surjective {X Y : LightProfinite.{u}} (f : X βΆ Y) :
EffectiveEpi f β Function.Surjective f := by |
refine β¨fun h β¦ ?_, fun h β¦ β¨β¨EffectiveEpi.struct f hβ©β©β©
rw [β epi_iff_surjective]
infer_instance
| [
" { toFun := fun x => a, continuous_toFun := β― } β« Ο = { toFun := fun x => b, continuous_toFun := β― } β« Ο",
" ({ toFun := fun x => a, continuous_toFun := β― } β« Ο) xβ = ({ toFun := fun x => b, continuous_toFun := β― } β« Ο) xβ",
" g = (fun {W} e h => β―.lift e β―) e β―",
" g = β―.liftEquiv β¨e, β―β©",
" β―.liftEquiv.s... | [
" { toFun := fun x => a, continuous_toFun := β― } β« Ο = { toFun := fun x => b, continuous_toFun := β― } β« Ο",
" ({ toFun := fun x => a, continuous_toFun := β― } β« Ο) xβ = ({ toFun := fun x => b, continuous_toFun := β― } β« Ο) xβ",
" g = (fun {W} e h => β―.lift e β―) e β―",
" g = β―.liftEquiv β¨e, β―β©",
" β―.liftEquiv.s... |
import Mathlib.Topology.Order.IsLUB
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {Ξ± Ξ² Ξ³ : Type*}
section DenselyOrdered
variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] [OrderTopology Ξ±] [DenselyOrdered Ξ±] {a b : Ξ±}
{s : Set Ξ±}
theorem closure_Ioi' {a : Ξ±} (h : (Io... | Mathlib/Topology/Order/DenselyOrdered.lean | 66 | 70 | theorem closure_Ioc {a b : Ξ±} (hab : a β b) : closure (Ioc a b) = Icc a b := by |
apply Subset.antisymm
Β· exact closure_minimal Ioc_subset_Icc_self isClosed_Icc
Β· apply Subset.trans _ (closure_mono Ioo_subset_Ioc_self)
rw [closure_Ioo hab]
| [
" closure (Ioi a) = Ici a",
" closure (Ioi a) β Ici a",
" Ici a β closure (Ioi a)",
" a β closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) β Icc a b",
" Icc a b β closure (Ioo a b)",
" {a, b} β closure (Ioo a b)",
" a β closure (Ioo a b) β§ b β closure (Ioo a b)",
" β
β closure... | [
" closure (Ioi a) = Ici a",
" closure (Ioi a) β Ici a",
" Ici a β closure (Ioi a)",
" a β closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) β Icc a b",
" Icc a b β closure (Ioo a b)",
" {a, b} β closure (Ioo a b)",
" a β closure (Ioo a b) β§ b β closure (Ioo a b)",
" β
β closure... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 96 | 106 | theorem mk_one_pow_eq_mk_choose_add :
(mk 1 : Sβ¦Xβ§) ^ (d + 1) = (mk fun n => Nat.choose (d + n) d : Sβ¦Xβ§) := by |
induction d with
| zero => ext; simp
| succ d hd =>
ext n
rw [pow_add, hd, pow_one, mul_comm, coeff_mul]
simp_rw [coeff_mk, Pi.one_apply, one_mul]
norm_cast
rw [Finset.sum_antidiagonal_choose_add, β Nat.choose_succ_succ, Nat.succ_eq_add_one,
add_right_comm]
| [
" mk 1 * (1 - X) = 1",
" β (n : β), (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S 0) ((1 - X) * mk 1) = (coeff S 0) 1",
" (coeff S (n + 1)) ((1 - X) * mk 1) = (coeff S (n + 1)) 1",
" mk 1 ^ (d + 1) = mk fun n => β((d + n).choose d)",
" mk 1 ^ ... | [
" mk 1 * (1 - X) = 1",
" β (n : β), (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S 0) ((1 - X) * mk 1) = (coeff S 0) 1",
" (coeff S (n + 1)) ((1 - X) * mk 1) = (coeff S (n + 1)) 1"
] |
import Mathlib.Algebra.IsPrimePow
import Mathlib.SetTheory.Cardinal.Ordinal
import Mathlib.Tactic.WLOG
#align_import set_theory.cardinal.divisibility from "leanprover-community/mathlib"@"ea050b44c0f9aba9d16a948c7cc7d2e7c8493567"
namespace Cardinal
open Cardinal
universe u
variable {a b : Cardinal.{u}} {n m : β... | Mathlib/SetTheory/Cardinal/Divisibility.lean | 112 | 134 | theorem nat_is_prime_iff : Prime (n : Cardinal) β n.Prime := by |
simp only [Prime, Nat.prime_iff]
refine and_congr (by simp) (and_congr ?_ β¨fun h b c hbc => ?_, fun h b c hbc => ?_β©)
Β· simp only [isUnit_iff, Nat.isUnit_iff]
exact mod_cast Iff.rfl
Β· exact mod_cast h b c (mod_cast hbc)
cases' lt_or_le (b * c) β΅β with h' h'
Β· rcases mul_lt_aleph0_iff.mp h' with (rfl | ... | [
" IsUnit a β a = 1",
" a = 1 β IsUnit a",
" IsUnit 1",
" a = 1",
" 0 = 1",
" 1 β€ a",
" 1 β€ t",
" t β 0",
" False",
" a β€ x",
" x = 0",
" Prime a",
" Β¬IsUnit a",
" Β¬a = 1",
" a β£ b β¨ a β£ c",
" a β£ 0 β¨ a β£ c",
" a β£ b β¨ a β£ 0",
" a β£ c β¨ a β£ b",
" b β€ c",
" c * b β 0",
" a β£ c ... | [
" IsUnit a β a = 1",
" a = 1 β IsUnit a",
" IsUnit 1",
" a = 1",
" 0 = 1",
" 1 β€ a",
" 1 β€ t",
" t β 0",
" False",
" a β€ x",
" x = 0",
" Prime a",
" Β¬IsUnit a",
" Β¬a = 1",
" a β£ b β¨ a β£ c",
" a β£ 0 β¨ a β£ c",
" a β£ b β¨ a β£ 0",
" a β£ c β¨ a β£ b",
" b β€ c",
" c * b β 0",
" a β£ c ... |
import Mathlib.Topology.UniformSpace.UniformEmbedding
import Mathlib.Topology.UniformSpace.Equiv
#align_import topology.uniform_space.abstract_completion from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
noncomputable section
attribute [local instance] Classical.propDecidable
open F... | Mathlib/Topology/UniformSpace/AbstractCompletion.lean | 143 | 149 | theorem uniformContinuous_extend : UniformContinuous (pkg.extend f) := by |
by_cases hf : UniformContinuous f
Β· rw [pkg.extend_def hf]
exact uniformContinuous_uniformly_extend pkg.uniformInducing pkg.dense hf
Β· change UniformContinuous (ite _ _ _)
rw [if_neg hf]
exact uniformContinuous_of_const fun a b => by congr 1
| [
" pkg.extend f (pkg.coe a) = f a",
" β―.extend f (pkg.coe a) = f a",
" UniformContinuous (pkg.extend f)",
" UniformContinuous (β―.extend f)",
" UniformContinuous (if UniformContinuous f then β―.extend f else fun x => f (β―.some x))",
" UniformContinuous fun x => f (β―.some x)",
" f (β―.some a) = f (β―.some b)"... | [
" pkg.extend f (pkg.coe a) = f a",
" β―.extend f (pkg.coe a) = f a"
] |
import Mathlib.Topology.Algebra.InfiniteSum.Basic
import Mathlib.Topology.Algebra.UniformGroup
noncomputable section
open Filter Finset Function
open scoped Topology
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*}
section TopologicalGroup
variable [CommGroup Ξ±] [TopologicalSpace Ξ±] [TopologicalGroup Ξ±]
variable {f g : Ξ² β Ξ±} {a aβ... | Mathlib/Topology/Algebra/InfiniteSum/Group.lean | 75 | 81 | theorem HasProd.update (hf : HasProd f aβ) (b : Ξ²) [DecidableEq Ξ²] (a : Ξ±) :
HasProd (update f b a) (a / f b * aβ) := by |
convert (hasProd_ite_eq b (a / f b)).mul hf with b'
by_cases h : b' = b
Β· rw [h, update_same]
simp [eq_self_iff_true, if_true, sub_add_cancel]
Β· simp only [h, update_noteq, if_false, Ne, one_mul, not_false_iff]
| [
" HasProd (fun b => (f b)β»ΒΉ) aβ»ΒΉ",
" Multipliable f",
" HasProd (fun b => f b / g b) (aβ / aβ)",
" HasProd (fun b => f b * (g b)β»ΒΉ) (aβ * aββ»ΒΉ)",
" Multipliable fun b => g b / f b",
" HasProd (Function.update f b a) (a / f b * aβ)",
" Function.update f b a b' = (if b' = b then a / f b else 1) * f b'",
... | [
" HasProd (fun b => (f b)β»ΒΉ) aβ»ΒΉ",
" Multipliable f",
" HasProd (fun b => f b / g b) (aβ / aβ)",
" HasProd (fun b => f b * (g b)β»ΒΉ) (aβ * aββ»ΒΉ)",
" Multipliable fun b => g b / f b"
] |
import Mathlib.CategoryTheory.Category.Grpd
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Homotopy.Path
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473... | Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean | 144 | 145 | theorem transReflReparamAux_zero : transReflReparamAux 0 = 0 := by |
set_option tactic.skipAssignedInstances false in norm_num [transReflReparamAux]
| [
" Continuous reflTransSymmAux",
" Continuous fun x => βx.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => βx.1 * 2 * βx.2",
" Continuous fun x => βx.1 * (2 - 2 * βx.2)",
" β (x : βI Γ βI), βx.2 = 1 / 2 β βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" ref... | [
" Continuous reflTransSymmAux",
" Continuous fun x => βx.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => βx.1 * 2 * βx.2",
" Continuous fun x => βx.1 * (2 - 2 * βx.2)",
" β (x : βI Γ βI), βx.2 = 1 / 2 β βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" ref... |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def Οβ : MulChar (ZMod 4) β€... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 95 | 97 | theorem Οβ_nat_one_mod_four {n : β} (hn : n % 4 = 1) : Οβ n = 1 := by |
rw [Οβ_nat_mod_four, hn]
rfl
| [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... | [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... |
import Mathlib.Data.Stream.Init
import Mathlib.Tactic.Common
#align_import data.seq.computation from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
open Function
universe u v w
def Computation (Ξ± : Type u) : Type u :=
{ f : Stream' (Option Ξ±) // β β¦n aβ¦, f n = some a β f (n + 1) = ... | Mathlib/Data/Seq/Computation.lean | 175 | 176 | theorem tail_think (s : Computation Ξ±) : tail (think s) = s := by |
cases' s with f al; apply Subtype.eq; dsimp [tail, think]
| [
" Stream'.cons none (βc) (n + 1) = some a",
" Stream'.cons none (βc) (0 + 1) = some a",
" Stream'.cons none (βc) (n + 1 + 1) = some a",
" s.destruct = Sum.inl a β s = pure a",
" (match βs 0 with\n | none => Sum.inr s.tail\n | some a => Sum.inl a) =\n Sum.inl a β\n s = pure a",
" (match n... | [
" Stream'.cons none (βc) (n + 1) = some a",
" Stream'.cons none (βc) (0 + 1) = some a",
" Stream'.cons none (βc) (n + 1 + 1) = some a",
" s.destruct = Sum.inl a β s = pure a",
" (match βs 0 with\n | none => Sum.inr s.tail\n | some a => Sum.inl a) =\n Sum.inl a β\n s = pure a",
" (match n... |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : β) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 60 | 60 | theorem dist_tri_left' (n m : β) : n β€ dist n m + m := by | rw [dist_comm]; apply dist_tri_left
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m β€ n + n.dist m",
" m β€ n.dist m + n",
" n β€ n.dist m + m",
" n β€ m.dist n + m"
] | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m β€ n + n.dist m",
" m β€ n.dist m + n"
] |
import Mathlib.NumberTheory.BernoulliPolynomials
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Fourier.AddCircle
import Mathlib.Analysis.PSeries
#align_import number_theory.zeta_values from "leanprover-community/mathlib"@"f0c8bf9245297... | Mathlib/NumberTheory/ZetaValues.lean | 74 | 77 | theorem antideriv_bernoulliFun (k : β) (x : β) :
HasDerivAt (fun x => bernoulliFun (k + 1) x / (k + 1)) (bernoulliFun k x) x := by |
convert (hasDerivAt_bernoulliFun (k + 1) x).div_const _ using 1
field_simp [Nat.cast_add_one_ne_zero k]
| [
" bernoulliFun k 0 = β(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0",
" bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0",
" (algebraMap β β) (bernoulli' k) = β(bernoulli k) + if k = 1 then 1 else 0",
" (algebraMap β β) (bernoulli' k) = β(bernoulli k) + 1",
" β(1 / 2) = β(-1 / 2) + 1",... | [
" bernoulliFun k 0 = β(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0",
" bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0",
" (algebraMap β β) (bernoulli' k) = β(bernoulli k) + if k = 1 then 1 else 0",
" (algebraMap β β) (bernoulli' k) = β(bernoulli k) + 1",
" β(1 / 2) = β(-1 / 2) + 1",... |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
#align list.length_enum_from List.enumFrom_length
#align list.length_enum List.enum_length
@[simp]
theorem get?_enumFrom :
β n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a)
| n, [], m => rfl
| n, a :: l, 0 =... | Mathlib/Data/List/Enum.lean | 63 | 70 | theorem mk_mem_enumFrom_iff_le_and_get?_sub {n i : β} {x : Ξ±} {l : List Ξ±} :
(i, x) β enumFrom n l β n β€ i β§ l.get? (i - n) = x := by |
if h : n β€ i then
rcases Nat.exists_eq_add_of_le h with β¨i, rflβ©
simp [mk_add_mem_enumFrom_iff_get?, Nat.add_sub_cancel_left]
else
have : β k, n + k β i := by rintro k rfl; simp at h
simp [h, mem_iff_get?, this]
| [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... | [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... |
import Mathlib.Init.Algebra.Classes
import Mathlib.Logic.Nontrivial.Basic
import Mathlib.Order.BoundedOrder
import Mathlib.Data.Option.NAry
import Mathlib.Tactic.Lift
import Mathlib.Data.Option.Basic
#align_import order.with_bot from "leanprover-community/mathlib"@"0111834459f5d7400215223ea95ae38a1265a907"
variabl... | Mathlib/Order/WithBot.lean | 135 | 136 | theorem unbot'_eq_iff {d y : Ξ±} {x : WithBot Ξ±} : unbot' d x = y β x = y β¨ x = β₯ β§ y = d := by |
induction x <;> simp [@eq_comm _ d]
| [
" unbot' d x = y β x = βy β¨ x = β₯ β§ y = d",
" unbot' d β₯ = y β β₯ = βy β¨ β₯ = β₯ β§ y = d",
" unbot' d βaβ = y β βaβ = βy β¨ βaβ = β₯ β§ y = d"
] | [] |
import Mathlib.Algebra.Algebra.Tower
import Mathlib.Algebra.Polynomial.AlgebraMap
#align_import ring_theory.polynomial.tower from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Polynomial
variable (R A B : Type*)
namespace Polynomial
section CommSemiring
variable [CommSemiring ... | Mathlib/RingTheory/Polynomial/Tower.lean | 54 | 56 | theorem aeval_algebraMap_apply (x : A) (p : R[X]) :
aeval (algebraMap A B x) p = algebraMap A B (aeval x p) := by |
rw [aeval_def, aeval_def, hom_evalβ, β IsScalarTower.algebraMap_eq]
| [
" (aeval ((algebraMap A B) x)) p = (algebraMap A B) ((aeval x) p)"
] | [] |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.Tactic.FieldSimp
#align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open AffineMap
variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE]
def ... | Mathlib/LinearAlgebra/AffineSpace/Slope.lean | 92 | 93 | theorem slope_comm (f : k β PE) (a b : k) : slope f a b = slope f b a := by |
rw [slope, slope, β neg_vsub_eq_vsub_rev, smul_neg, β neg_smul, neg_inv, neg_sub]
| [
" slope f a a = 0",
" (b - a) β’ slope f a b = f b -α΅₯ f a",
" (a - a) β’ slope f a a = f a -α΅₯ f a",
" (b - a) β’ slope f a b +α΅₯ f a = f b",
" (slope fun x => f x +α΅₯ c) = slope f",
" slope (fun x => f x +α΅₯ c) a b = slope f a b",
" slope (fun x => (x - a) β’ f x) a b = f b",
" f a = f b",
" slope (βf β g)... | [
" slope f a a = 0",
" (b - a) β’ slope f a b = f b -α΅₯ f a",
" (a - a) β’ slope f a a = f a -α΅₯ f a",
" (b - a) β’ slope f a b +α΅₯ f a = f b",
" (slope fun x => f x +α΅₯ c) = slope f",
" slope (fun x => f x +α΅₯ c) a b = slope f a b",
" slope (fun x => (x - a) β’ f x) a b = f b",
" f a = f b",
" slope (βf β g)... |
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {Ξ± : Type*}
namespace WithTop
@[simp]
theorem preimage_coe_top : (some : Ξ± β WithTop Ξ±) β»ΒΉ' {β€} =... | Mathlib/Order/Interval/Set/WithBotTop.lean | 93 | 94 | theorem image_coe_Ici : (some : Ξ± β WithTop Ξ±) '' Ici a = Ico (a : WithTop Ξ±) β€ := by |
rw [β preimage_coe_Ici, image_preimage_eq_inter_range, range_coe, Ici_inter_Iio]
| [
" range some = Iio β€",
" x β range some β x β Iio β€",
" some β»ΒΉ' Icc βa βb = Icc a b",
" some β»ΒΉ' Ico βa βb = Ico a b",
" some β»ΒΉ' Ioc βa βb = Ioc a b",
" some β»ΒΉ' Ioo βa βb = Ioo a b",
" some β»ΒΉ' Iio β€ = univ",
" some β»ΒΉ' Ico βa β€ = Ici a",
" some β»ΒΉ' Ioo βa β€ = Ioi a",
" some '' Ioi a = Ioo βa β€... | [
" range some = Iio β€",
" x β range some β x β Iio β€",
" some β»ΒΉ' Icc βa βb = Icc a b",
" some β»ΒΉ' Ico βa βb = Ico a b",
" some β»ΒΉ' Ioc βa βb = Ioc a b",
" some β»ΒΉ' Ioo βa βb = Ioo a b",
" some β»ΒΉ' Iio β€ = univ",
" some β»ΒΉ' Ico βa β€ = Ici a",
" some β»ΒΉ' Ioo βa β€ = Ioi a",
" some '' Ioi a = Ioo βa β€... |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.Algebra.Ring.NegOnePow
namespace Matrix
variable {R : Type*} [CommRing R]
| Mathlib/LinearAlgebra/Matrix/Determinant/Misc.lean | 21 | 47 | theorem submatrix_succAbove_det_eq_negOnePow_submatrix_succAbove_det {n : β}
(M : Matrix (Fin (n + 1)) (Fin n) R) (hv : β j, M j = 0) (jβ jβ : Fin (n + 1)) :
(M.submatrix (Fin.succAbove jβ) id).det =
Int.negOnePow (jβ - jβ) β’ (M.submatrix (Fin.succAbove jβ) id).det := by |
suffices β j, (M.submatrix (Fin.succAbove j) id).det =
Int.negOnePow j β’ (M.submatrix (Fin.succAbove 0) id).det by
rw [this jβ, this jβ, smul_smul, β Int.negOnePow_add, sub_add_cancel]
intro j
induction j using Fin.induction with
| zero => rw [Fin.val_zero, Nat.cast_zero, Int.negOnePow_zero, one_smul... | [
" (M.submatrix jβ.succAbove id).det = (ββjβ - ββjβ).negOnePow β’ (M.submatrix jβ.succAbove id).det",
" β (j : Fin (n + 1)), (M.submatrix j.succAbove id).det = (ββj).negOnePow β’ (M.submatrix (Fin.succAbove 0) id).det",
" (M.submatrix j.succAbove id).det = (ββj).negOnePow β’ (M.submatrix (Fin.succAbove 0) id).det",... | [] |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNR... | Mathlib/Probability/IdentDistrib.lean | 162 | 168 | theorem aestronglyMeasurable_snd [TopologicalSpace Ξ³] [MetrizableSpace Ξ³] [BorelSpace Ξ³]
(h : IdentDistrib f g ΞΌ Ξ½) (hf : AEStronglyMeasurable f ΞΌ) : AEStronglyMeasurable g Ξ½ := by |
refine aestronglyMeasurable_iff_aemeasurable_separable.2 β¨h.aemeasurable_snd, ?_β©
rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with β¨t, t_sep, htβ©
refine β¨closure t, t_sep.closure, ?_β©
apply h.ae_mem_snd isClosed_closure.measurableSet
filter_upwards [ht] with x hx using subset_closure hx
| [
" AEMeasurable (u β g) Ξ½",
" Measure.map (u β f) ΞΌ = Measure.map (u β g) Ξ½",
" AEMeasurable u (Measure.map g Ξ½)",
" ΞΌ (f β»ΒΉ' s) = Ξ½ (g β»ΒΉ' s)",
" βα΅ (x : Ξ²) βΞ½, p (g x)",
" βα΅ (y : Ξ³) βMeasure.map g Ξ½, p y",
" βα΅ (y : Ξ³) βMeasure.map f ΞΌ, p y",
" AEStronglyMeasurable g Ξ½",
" β t, IsSeparable t β§ βα΅ ... | [
" AEMeasurable (u β g) Ξ½",
" Measure.map (u β f) ΞΌ = Measure.map (u β g) Ξ½",
" AEMeasurable u (Measure.map g Ξ½)",
" ΞΌ (f β»ΒΉ' s) = Ξ½ (g β»ΒΉ' s)",
" βα΅ (x : Ξ²) βΞ½, p (g x)",
" βα΅ (y : Ξ³) βMeasure.map g Ξ½, p y",
" βα΅ (y : Ξ³) βMeasure.map f ΞΌ, p y"
] |
import Mathlib.Algebra.Order.GroupWithZero.Synonym
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Algebra.Order.Ring.Canonical
import Mathlib.Algebra.Ring.Hom.Defs
#align_import algebra.order.ring.with_top from "leanprover-community/mathlib"@"0111834459f5d7400215223ea95ae38a1265a907"
variable {Ξ± : Type... | Mathlib/Algebra/Order/Ring/WithTop.lean | 89 | 91 | theorem mul_lt_top' [LT Ξ±] {a b : WithTop Ξ±} (ha : a < β€) (hb : b < β€) : a * b < β€ := by |
rw [WithTop.lt_top_iff_ne_top] at *
simp only [Ne, mul_eq_top_iff, *, and_false, false_and, or_self, not_false_eq_true]
| [
" a * β€ = β€",
" β€ * b = β€",
" a * b = if a = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) a b",
" β€ * b = if β€ = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) β€ b",
" βaβ * b = if βaβ = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) (βaβ) b",
" β€ * β€ = if β€ = 0 β¨ β€ = 0 then 0 else mapβ (fun x ... | [
" a * β€ = β€",
" β€ * b = β€",
" a * b = if a = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) a b",
" β€ * b = if β€ = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) β€ b",
" βaβ * b = if βaβ = 0 β¨ b = 0 then 0 else mapβ (fun x x_1 => x * x_1) (βaβ) b",
" β€ * β€ = if β€ = 0 β¨ β€ = 0 then 0 else mapβ (fun x ... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Tactic.NthRewrite
#align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
namespace Nat
theorem gcd_greatest {a b d : β} (hda : d β£ a) (hdb : d β£ b) (hd ... | Mathlib/Data/Nat/GCD/Basic.lean | 85 | 85 | theorem gcd_self_add_left (m n : β) : gcd (m + n) m = gcd n m := by | rw [add_comm, gcd_add_self_left]
| [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... | [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... |
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.RingTheory.HahnSeries.Basic
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open scoped Classical
noncomputable section
v... | Mathlib/RingTheory/HahnSeries/Addition.lean | 81 | 89 | theorem min_order_le_order_add {Ξ} [Zero Ξ] [LinearOrder Ξ] {x y : HahnSeries Ξ R}
(hxy : x + y β 0) : min x.order y.order β€ (x + y).order := by |
by_cases hx : x = 0; Β· simp [hx]
by_cases hy : y = 0; Β· simp [hy]
rw [order_of_ne hx, order_of_ne hy, order_of_ne hxy]
apply le_of_eq_of_le _ (Set.IsWF.min_le_min_of_subset (support_add_subset (x := x) (y := y)))
Β· simp
Β· simp [hy]
Β· exact (Set.IsWF.min_union _ _ _ _).symm
| [
" x + y + z = x + (y + z)",
" (x + y + z).coeff xβ = (x + (y + z)).coeff xβ",
" 0 + x = x",
" (0 + x).coeff xβ = x.coeff xβ",
" x + 0 = x",
" (x + 0).coeff xβ = x.coeff xβ",
" a β x.support βͺ y.support",
" x.coeff a β 0 β¨ y.coeff a β 0",
" x.coeff a + y.coeff a = 0",
" min x.order y.order β€ (x + y... | [
" x + y + z = x + (y + z)",
" (x + y + z).coeff xβ = (x + (y + z)).coeff xβ",
" 0 + x = x",
" (0 + x).coeff xβ = x.coeff xβ",
" x + 0 = x",
" (x + 0).coeff xβ = x.coeff xβ",
" a β x.support βͺ y.support",
" x.coeff a β 0 β¨ y.coeff a β 0",
" x.coeff a + y.coeff a = 0"
] |
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Logic.Equiv.Embedding
#align_import data.fintype.card_embedding from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
local notation "|" x "|" => Finset.card x
local notation "β" x "β" => Fintype.card x
open Function
open Nat
nam... | Mathlib/Data/Fintype/CardEmbedding.lean | 36 | 50 | theorem card_embedding_eq {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²] [emb : Fintype (Ξ± βͺ Ξ²)] :
βΞ± βͺ Ξ²β = βΞ²β.descFactorial βΞ±β := by |
rw [Subsingleton.elim emb Embedding.fintype]
refine Fintype.induction_empty_option (P := fun t β¦ βt βͺ Ξ²β = βΞ²β.descFactorial βtβ)
(fun Ξ±β Ξ±β hβ e ih β¦ ?_) (?_) (fun Ξ³ h ih β¦ ?_) Ξ± <;> dsimp only <;> clear! Ξ±
Β· letI := Fintype.ofEquiv _ e.symm
rw [β card_congr (Equiv.embeddingCongr e (Equiv.refl Ξ²)), ... | [
" βΞ± βͺ Ξ²β = βΞ²β.descFactorial βΞ±β",
" (fun t [Fintype t] => βt βͺ Ξ²β = βΞ²β.descFactorial βtβ) Ξ±β",
" (fun t [Fintype t] => βt βͺ Ξ²β = βΞ²β.descFactorial βtβ) PEmpty.{u_1 + 1}",
" (fun t [Fintype t] => βt βͺ Ξ²β = βΞ²β.descFactorial βtβ) (Option Ξ³)",
" βΞ±β βͺ Ξ²β = βΞ²β.descFactorial βΞ±ββ",
" βPEmpty.{u_1 + 1} βͺ Ξ²β... | [] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 119 | 119 | theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by | simp [cylinder_eq_pi]
| [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) β€ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (β(Finset.range n)).pi... | [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) β€ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (β(Finset.range n)).pi... |
import Mathlib.MeasureTheory.Integral.Periodic
import Mathlib.Data.ZMod.Quotient
#align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Function Filter MeasureTheory MeasureTheory.Measure Metric
open scoped MeasureTheory Pointwise Top... | Mathlib/MeasureTheory/Group/AddCircle.lean | 34 | 48 | theorem closedBall_ae_eq_ball {x : AddCircle T} {Ξ΅ : β} : closedBall x Ξ΅ =α΅[volume] ball x Ξ΅ := by |
rcases le_or_lt Ξ΅ 0 with hΞ΅ | hΞ΅
Β· rw [ball_eq_empty.mpr hΞ΅, ae_eq_empty, volume_closedBall,
min_eq_right (by linarith [hT.out] : 2 * Ξ΅ β€ T), ENNReal.ofReal_eq_zero]
exact mul_nonpos_of_nonneg_of_nonpos zero_le_two hΞ΅
Β· suffices volume (closedBall x Ξ΅) β€ volume (ball x Ξ΅) by
exact (ae_eq_of_subse... | [
" closedBall x Ξ΅ =αΆ [ae volume] ball x Ξ΅",
" 2 * Ξ΅ β€ T",
" 2 * Ξ΅ β€ 0",
" volume (closedBall x Ξ΅) β€ volume (ball x Ξ΅)",
" Tendsto (fun Ξ΄ => volume (closedBall x Ξ΄)) (π[<] Ξ΅) (π (volume (closedBall x Ξ΅)))",
" Tendsto (fun Ξ΄ => ENNReal.ofReal (min T (2 * Ξ΄))) (π[<] Ξ΅) (π (ENNReal.ofReal (min T (2 * Ξ΅))))"... | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.MvPowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
... | Mathlib/RingTheory/PowerSeries/Basic.lean | 181 | 184 | theorem coeff_monomial (m n : β) (a : R) : coeff R m (monomial R n a) = if m = n then a else 0 :=
calc
coeff R m (monomial R n a) = _ := MvPowerSeries.coeff_monomial _ _ _
_ = if m = n then a else 0 := by | simp only [Finsupp.unique_single_eq_iff]
| [
" Inhabited Rβ¦Xβ§",
" Inhabited (MvPowerSeries Unit R)",
" Zero Rβ¦Xβ§",
" Zero (MvPowerSeries Unit R)",
" AddMonoid Rβ¦Xβ§",
" AddMonoid (MvPowerSeries Unit R)",
" AddGroup Rβ¦Xβ§",
" AddGroup (MvPowerSeries Unit R)",
" AddCommMonoid Rβ¦Xβ§",
" AddCommMonoid (MvPowerSeries Unit R)",
" AddCommGroup Rβ¦Xβ§"... | [
" Inhabited Rβ¦Xβ§",
" Inhabited (MvPowerSeries Unit R)",
" Zero Rβ¦Xβ§",
" Zero (MvPowerSeries Unit R)",
" AddMonoid Rβ¦Xβ§",
" AddMonoid (MvPowerSeries Unit R)",
" AddGroup Rβ¦Xβ§",
" AddGroup (MvPowerSeries Unit R)",
" AddCommMonoid Rβ¦Xβ§",
" AddCommMonoid (MvPowerSeries Unit R)",
" AddCommGroup Rβ¦Xβ§"... |
import Batteries.Data.RBMap.Basic
import Batteries.Tactic.SeqFocus
namespace Batteries
namespace RBNode
open RBColor
attribute [simp] All
theorem All.trivial (H : β {x : Ξ±}, p x) : β {t : RBNode Ξ±}, t.All p
| nil => _root_.trivial
| node .. => β¨H, All.trivial H, All.trivial Hβ©
theorem All_and {t : RBNode Ξ±}... | .lake/packages/batteries/Batteries/Data/RBMap/WF.lean | 51 | 52 | theorem reverse_eq_iff {t t' : RBNode Ξ±} : t.reverse = t' β t = t'.reverse := by |
constructor <;> rintro rfl <;> simp
| [
" All (fun a => p a β§ q a) t β All p t β§ All q t",
" All (fun a => p a β§ q a) nil β All p nil β§ All q nil",
" All (fun a => p a β§ q a) (node cβ lβ vβ rβ) β All p (node cβ lβ vβ rβ) β§ All q (node cβ lβ vβ rβ)",
" t.reverse.reverse = t",
" nil.reverse.reverse = nil",
" (node cβ lβ vβ rβ).reverse.reverse = n... | [
" All (fun a => p a β§ q a) t β All p t β§ All q t",
" All (fun a => p a β§ q a) nil β All p nil β§ All q nil",
" All (fun a => p a β§ q a) (node cβ lβ vβ rβ) β All p (node cβ lβ vβ rβ) β§ All q (node cβ lβ vβ rβ)",
" t.reverse.reverse = t",
" nil.reverse.reverse = nil",
" (node cβ lβ vβ rβ).reverse.reverse = n... |
import Mathlib.Data.Real.Irrational
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Algebra.LinearRecurrence
import Mathlib.Tactic.NormNum.NatFib
import Mathlib.Tactic.NormNum.Prime
#align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712... | Mathlib/Data/Real/GoldenRatio.lean | 87 | 88 | theorem gold_pow_sub_gold_pow (n : β) : Ο ^ (n + 2) - Ο ^ (n + 1) = Ο ^ n := by |
rw [goldenRatio]; ring_nf; norm_num; ring
| [
" Οβ»ΒΉ = -Ο",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" Οβ»ΒΉ = -Ο",
" -Ο = Οβ»ΒΉ",
" Ο * Ο = -1",
" (1 + β5) * (1 - β5) = -(2 * 2)",
" 1 ^ 2 - β5 ^ 2 = -(2 * 2)",
" Ο * Ο = -1",
" Ο + Ο = 1",
" (1 + β5) / 2 + (1 - β5) / 2 = 1",
" 1 - Ο = Ο",
" 1 - Ο = Ο",
" Ο - Ο = β5",
" Ο ^ (n + 2) - Ο ^ (... | [
" Οβ»ΒΉ = -Ο",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" Οβ»ΒΉ = -Ο",
" -Ο = Οβ»ΒΉ",
" Ο * Ο = -1",
" (1 + β5) * (1 - β5) = -(2 * 2)",
" 1 ^ 2 - β5 ^ 2 = -(2 * 2)",
" Ο * Ο = -1",
" Ο + Ο = 1",
" (1 + β5) / 2 + (1 - β5) / 2 = 1",
" 1 - Ο = Ο",
" 1 - Ο = Ο",
" Ο - Ο = β5"
] |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' uβ' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {Mβ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 251 | 252 | theorem finrank_matrix (m n : Type*) [Fintype m] [Fintype n] :
finrank R (Matrix m n R) = card m * card n := by | simp [finrank]
| [
" Module.rank R (ΞΉ ββ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)",
" Module.rank R (ΞΉ ββ M) = #ΞΉ * Module.rank R M",
" Module.rank R (ΞΉ ββ R) = lift.{u, w} #ΞΉ",
" Module.rank R (ΞΉ ββ R) = #ΞΉ",
" Module.rank R (β¨ (i : ΞΉ), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ΞΉ ββ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)",
" Module.rank R (ΞΉ ββ M) = #ΞΉ * Module.rank R M",
" Module.rank R (ΞΉ ββ R) = lift.{u, w} #ΞΉ",
" Module.rank R (ΞΉ ββ R) = #ΞΉ",
" Module.rank R (β¨ (i : ΞΉ), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.AlgebraicTopology.DoldKan.FunctorGamma
import Mathlib.AlgebraicTopology.DoldKan.SplitSimplicialObject
import Mathlib.CategoryTheory.Idempotents.HomologicalComplex
#align_import algebraic_topology.dold_kan.gamma_comp_n from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
no... | Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean | 95 | 100 | theorem NβΞβ_inv_app (K : ChainComplex C β) :
NβΞβ.inv.app K = (toKaroubi _).map (ΞβNondegComplexIso K).inv β«
(Ξβ.splitting K).toKaroubiNondegComplexIsoNβ.hom := by |
change (NβΞβ.app K).inv = _
simp only [NβΞβ_app]
rfl
| [
" β (i j : β),\n (ComplexShape.down β).Rel i j β\n ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) i).hom β« K.d i j =\n (Ξβ.splitting K).nondegComplex.d i j β« ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) j).hom",
" ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) (n ... | [
" β (i j : β),\n (ComplexShape.down β).Rel i j β\n ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) i).hom β« K.d i j =\n (Ξβ.splitting K).nondegComplex.d i j β« ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) j).hom",
" ((fun n => Iso.refl ((Ξβ.splitting K).nondegComplex.X n)) (n ... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.GeomSum
import Mathlib.Data.Fintype.BigOperators
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.Tactic.FieldSimp
#align_import number_theory.bernoulli from "leanprover-community/mat... | Mathlib/NumberTheory/Bernoulli.lean | 91 | 95 | theorem bernoulli'_spec' (n : β) :
(β k β antidiagonal n, ((k.1 + k.2).choose k.2 : β) / (k.2 + 1) * bernoulli' k.1) = 1 := by |
refine ((sum_antidiagonal_eq_sum_range_succ_mk _ n).trans ?_).trans (bernoulli'_spec n)
refine sum_congr rfl fun x hx => ?_
simp only [add_tsub_cancel_of_le, mem_range_succ_iff.mp hx, cast_sub]
| [
" bernoulli' n = 1 - β k β range n, β(n.choose k) / (βn - βk + 1) * bernoulli' k",
" β k β range n.succ, β(n.choose (n - k)) / (βn - βk + 1) * bernoulli' k = 1",
" β x β range n, (β(n.choose x) / (βn - βx + 1) * bernoulli' x - β(n.choose (n - x)) / (βn - βx + 1) * bernoulli' x) = 0",
" β(n.choose x) / (βn - β... | [
" bernoulli' n = 1 - β k β range n, β(n.choose k) / (βn - βk + 1) * bernoulli' k",
" β k β range n.succ, β(n.choose (n - k)) / (βn - βk + 1) * bernoulli' k = 1",
" β x β range n, (β(n.choose x) / (βn - βx + 1) * bernoulli' x - β(n.choose (n - x)) / (βn - βx + 1) * bernoulli' x) = 0",
" β(n.choose x) / (βn - β... |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {Ξ± : Type*} [DecidableEq Ξ±] {π β¬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±}
namespace Finset
def nonMemberSubfamily (a : Ξ±) (π : ... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 74 | 78 | theorem memberSubfamily_inter (a : Ξ±) (π β¬ : Finset (Finset Ξ±)) :
(π β© β¬).memberSubfamily a = π.memberSubfamily a β© β¬.memberSubfamily a := by |
unfold memberSubfamily
rw [filter_inter_distrib, image_inter_of_injOn _ _ ((erase_injOn' _).mono _)]
simp
| [
" s β nonMemberSubfamily a π β s β π β§ a β s",
" s β memberSubfamily a π β insert a s β π β§ a β s",
" (β a_1, (a_1 β π β§ a β a_1) β§ a_1.erase a = s) β insert a s β π β§ a β s",
" a β insert a s",
" (β a_1, (a_1 β π β§ a β a_1) β§ a_1.erase a = s) β insert a s β π β§ a β s",
" insert a (s.erase a) β π... | [
" s β nonMemberSubfamily a π β s β π β§ a β s",
" s β memberSubfamily a π β insert a s β π β§ a β s",
" (β a_1, (a_1 β π β§ a β a_1) β§ a_1.erase a = s) β insert a s β π β§ a β s",
" a β insert a s",
" (β a_1, (a_1 β π β§ a β a_1) β§ a_1.erase a = s) β insert a s β π β§ a β s",
" insert a (s.erase a) β π... |
import Mathlib.Algebra.Algebra.Basic
import Mathlib.Algebra.Periodic
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Algebra.UniformMulAction
import Mathlib.Topology.Algebra.Star
import Mathlib.Topology.Instances.Int
import Mathlib.Topology.Order.Bornology
#align_import topology.instances.real fro... | Mathlib/Topology/Instances/Real.lean | 77 | 78 | theorem Real.cobounded_eq : cobounded β = atBot β atTop := by |
simp only [β comap_dist_right_atTop (0 : β), Real.dist_eq, sub_zero, comap_abs_atTop]
| [
" dist (-aβ) (-bβ) < Ξ΅",
" TopologicalAddGroup β",
" IsCompact (closedBall x r)",
" IsCompact (Icc (x - r) (x + r))",
" β u β β a, β b, β (_ : a < b), {Ioo βa βb}, IsOpen u",
" Ioo βq βp β β a, β b, β (_ : a < b), {Ioo βa βb}",
" β i i_1, β (_ : i < i_1), Ioo βq βp β {Ioo βi βi_1}",
" cobounded β = at... | [
" dist (-aβ) (-bβ) < Ξ΅",
" TopologicalAddGroup β",
" IsCompact (closedBall x r)",
" IsCompact (Icc (x - r) (x + r))",
" β u β β a, β b, β (_ : a < b), {Ioo βa βb}, IsOpen u",
" Ioo βq βp β β a, β b, β (_ : a < b), {Ioo βa βb}",
" β i i_1, β (_ : i < i_1), Ioo βq βp β {Ioo βi βi_1}"
] |
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 236 | 238 | theorem linearIndependent_le_span_finset {ΞΉ : Type*} (v : ΞΉ β M) (i : LinearIndependent R v)
(w : Finset M) (s : span R (w : Set M) = β€) : #ΞΉ β€ w.card := by |
simpa only [Finset.coe_sort_coe, Fintype.card_coe] using linearIndependent_le_span v i w s
| [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw",
" #ΞΉ β€ β(Fintype.card βw)",
" β(Fintype.card ΞΉ) β€ β(Fintype.card βw)",
" range v β€ β(span R w)",
" ran... | [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw",
" #ΞΉ β€ β(Fintype.card βw)",
" β(Fintype.card ΞΉ) β€ β(Fintype.card βw)",
" range v β€ β(span R w)",
" ran... |
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.RingTheory.Ideal.Quotient
#align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24"
open Submodule
open Polynomial
variable {R : Type*} [Ring R]
variable {A : Type*} [CommRing A]
variable {M : Type*} [... | Mathlib/LinearAlgebra/SModEq.lean | 87 | 89 | theorem add (hxyβ : xβ β‘ yβ [SMOD U]) (hxyβ : xβ β‘ yβ [SMOD U]) : xβ + xβ β‘ yβ + yβ [SMOD U] := by |
rw [SModEq.def] at hxyβ hxyβ β’
simp_rw [Quotient.mk_add, hxyβ, hxyβ]
| [
" x β‘ y [SMOD U] β x - y β U",
" x β‘ y [SMOD β₯] β x = y",
" xβ + xβ β‘ yβ + yβ [SMOD U]",
" Submodule.Quotient.mk (xβ + xβ) = Submodule.Quotient.mk (yβ + yβ)"
] | [
" x β‘ y [SMOD U] β x - y β U",
" x β‘ y [SMOD β₯] β x = y"
] |
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
import Mathlib.Tactic.AdaptationNote
#align_import probability.martingale.upcrossing from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Topological... | Mathlib/Probability/Martingale/Upcrossing.lean | 206 | 209 | theorem lowerCrossingTime_le_upperCrossingTime_succ :
lowerCrossingTime a b f N n Ο β€ upperCrossingTime a b f N (n + 1) Ο := by |
rw [upperCrossingTime_succ]
exact le_hitting lowerCrossingTime_le Ο
| [
" upperCrossingTime a b f N (n + 1) Ο =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n Ο) N Ο) N Ο",
" upperCrossingTime a b f N (n + 1) Ο = hitting f (Set.Ici b) (lowerCrossingTime a b f N n Ο) N Ο",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... | [
" upperCrossingTime a b f N (n + 1) Ο =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n Ο) N Ο) N Ο",
" upperCrossingTime a b f N (n + 1) Ο = hitting f (Set.Ici b) (lowerCrossingTime a b f N n Ο) N Ο",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... |
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 | 124 | 134 | theorem inf_mem_subalgebra_closure (A : Subalgebra β C(X, β)) (f g : A) :
(f : C(X, β)) β (g : C(X, β)) β A.topologicalClosure := by |
rw [inf_eq_half_smul_add_sub_abs_sub' β]
refine
A.topologicalClosure.smul_mem
(A.topologicalClosure.sub_mem
(A.topologicalClosure.add_mem (A.le_topologicalClosure f.property)
(A.le_topologicalClosure g.property))
?_)
_
exact mod_cast abs_mem_subalgebra_closure A _
| [
" (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.MeasureTheory.Measure.MeasureSpace
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function
variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³]
variable {ΞΌ ΞΌβ ΞΌβ ΞΌβ Ξ½ Ξ½' Ξ½... | Mathlib/MeasureTheory/Measure/Restrict.lean | 56 | 59 | theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) :
(ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by |
simp_rw [restrict, restrictβ, liftLinear, LinearMap.coe_mk, AddHom.coe_mk,
toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed]
| [
" ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t β© s') + ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t \\ s')",
" ΞΌ (s β© t) = ΞΌ (s β© t β© s') + ΞΌ ((s β© t) \\ s')",
" (ΞΌ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) ΞΌ.toOuterMeasure"
] | [
" ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t β© s') + ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t \\ s')",
" ΞΌ (s β© t) = ΞΌ (s β© t β© s') + ΞΌ ((s β© t) \\ s')"
] |
import Mathlib.Dynamics.Ergodic.Ergodic
import Mathlib.MeasureTheory.Function.AEEqFun
open Function Set Filter MeasureTheory Topology TopologicalSpace
variable {Ξ± X : Type*} [MeasurableSpace Ξ±] {ΞΌ : MeasureTheory.Measure Ξ±}
| Mathlib/Dynamics/Ergodic/Function.lean | 27 | 35 | theorem QuasiErgodic.ae_eq_const_of_ae_eq_comp_of_ae_rangeβ [Nonempty X] [MeasurableSpace X]
{s : Set X} [MeasurableSpace.CountablySeparated s] {f : Ξ± β Ξ±} {g : Ξ± β X}
(h : QuasiErgodic f ΞΌ) (hs : βα΅ x βΞΌ, g x β s) (hgm : NullMeasurable g ΞΌ)
(hg_eq : g β f =α΅[ΞΌ] g) :
β c, g =α΅[ΞΌ] const Ξ± c := by |
refine exists_eventuallyEq_const_of_eventually_mem_of_forall_separating MeasurableSet hs ?_
refine fun U hU β¦ h.ae_mem_or_ae_nmemβ (s := g β»ΒΉ' U) (hgm hU) ?_b
refine (hg_eq.mono fun x hx β¦ ?_).set_eq
rw [β preimage_comp, mem_preimage, mem_preimage, hx]
| [
" β c, g =αΆ [ae ΞΌ] const Ξ± c",
" β (U : Set X), MeasurableSet U β (βα΅ (x : Ξ±) βΞΌ, g x β U) β¨ βα΅ (x : Ξ±) βΞΌ, g x β U",
" f β»ΒΉ' (g β»ΒΉ' U) =αΆ [ae ΞΌ] g β»ΒΉ' U",
" x β f β»ΒΉ' (g β»ΒΉ' U) β x β g β»ΒΉ' U"
] | [] |
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.isomorphism from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6"
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Category
structure Iso {... | Mathlib/CategoryTheory/Iso.lean | 295 | 296 | theorem inv_hom_id_assoc (f : X βΆ Y) [I : IsIso f] {Z} (g : Y βΆ Z) : inv f β« f β« g = g := by |
simp [β Category.assoc]
| [
" f β« inv f β« g = g",
" inv f β« f β« g = g"
] | [
" f β« inv f β« g = g"
] |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
... | Mathlib/Analysis/Convex/Gauge.lean | 148 | 163 | theorem gauge_le_eq (hsβ : Convex β s) (hsβ : (0 : E) β s) (hsβ : Absorbent β s) (ha : 0 β€ a) :
{ x | gauge s x β€ a } = β (r : β) (_ : a < r), r β’ s := by |
ext x
simp_rw [Set.mem_iInter, Set.mem_setOf_eq]
refine β¨fun h r hr => ?_, fun h => le_of_forall_pos_lt_add fun Ξ΅ hΞ΅ => ?_β©
Β· have hr' := ha.trans_lt hr
rw [mem_smul_set_iff_inv_smul_memβ hr'.ne']
obtain β¨Ξ΄, Ξ΄_pos, hΞ΄r, hΞ΄β© := exists_lt_of_gauge_lt hsβ (h.trans_lt hr)
suffices (rβ»ΒΉ * Ξ΄) β’ Ξ΄β»ΒΉ β’ x β... | [
" gauge s x = sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ x β s}",
" 0 < r β§ x β r β’ s β r β Ioi 0 β§ rβ»ΒΉ β’ x β s",
" β b, 0 < b β§ b < a β§ x β b β’ s",
" gauge s 0 = 0",
" sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ 0 β s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ x β 0} = 0 x",
" sInf {r | r β Ioi 0 β§ ... | [
" gauge s x = sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ x β s}",
" 0 < r β§ x β r β’ s β r β Ioi 0 β§ rβ»ΒΉ β’ x β s",
" β b, 0 < b β§ b < a β§ x β b β’ s",
" gauge s 0 = 0",
" sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ 0 β s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ x β 0} = 0 x",
" sInf {r | r β Ioi 0 β§ ... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.lifts from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
open Polynomial
noncomputable section
namespace Polynomial
universe u v w
section Semiring
variable {R : Type... | Mathlib/Algebra/Polynomial/Lifts.lean | 257 | 258 | theorem lifts_iff_liftsRing (p : S[X]) : p β lifts f β p β liftsRing f := by |
simp only [lifts, liftsRing, RingHom.mem_range, RingHom.mem_rangeS]
| [
" p β lifts f β β q, map f q = p",
" p β lifts f β p β Set.range (map f)",
" p β lifts f β p β (mapRingHom f).rangeS",
" p β lifts f β β (n : β), p.coeff n β Set.range βf",
" (β (n : β), p.coeff n β f.rangeS) β β (n : β), p.coeff n β Set.range βf",
" (mapRingHom f) (C r) = C (f r)",
" C s β lifts f",
... | [
" p β lifts f β β q, map f q = p",
" p β lifts f β p β Set.range (map f)",
" p β lifts f β p β (mapRingHom f).rangeS",
" p β lifts f β β (n : β), p.coeff n β Set.range βf",
" (β (n : β), p.coeff n β f.rangeS) β β (n : β), p.coeff n β Set.range βf",
" (mapRingHom f) (C r) = C (f r)",
" C s β lifts f",
... |
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 | 88 | 91 | theorem polynomial_comp_attachBound_mem (A : Subalgebra β C(X, β)) (f : A) (g : β[X]) :
(g.toContinuousMapOn (Set.Icc (-βfβ) βfβ)).comp (f : C(X, β)).attachBound β A := by |
rw [polynomial_comp_attachBound]
apply SetLike.coe_mem
| [
" (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"
] |
import Mathlib.Data.Vector.Basic
#align_import data.vector.mem from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Vector
variable {Ξ± Ξ² : Type*} {n : β} (a a' : Ξ±)
@[simp]
theorem get_mem (i : Fin n) (v : Vector Ξ± n) : v.get i β v.toList := by
rw [get_eq_get]
exact List.... | Mathlib/Data/Vector/Mem.lean | 48 | 49 | theorem mem_cons_iff (v : Vector Ξ± n) : a' β (a ::α΅₯ v).toList β a' = a β¨ a' β v.toList := by |
rw [Vector.toList_cons, List.mem_cons]
| [
" v.get i β v.toList",
" v.toList.get (Fin.cast β― i) β v.toList",
" a β v.toList β β i, v.get i = a",
" (β i, β (h : i < v.toList.length), v.toList.get β¨i, hβ© = a) β β i, β (h : i < n), v.toList.get (Fin.cast β― β¨i, hβ©) = a",
" i < n",
" i < v.toList.length",
" a β nil.toList",
" a β toList β¨[], β―β©",
... | [
" v.get i β v.toList",
" v.toList.get (Fin.cast β― i) β v.toList",
" a β v.toList β β i, v.get i = a",
" (β i, β (h : i < v.toList.length), v.toList.get β¨i, hβ© = a) β β i, β (h : i < n), v.toList.get (Fin.cast β― β¨i, hβ©) = a",
" i < n",
" i < v.toList.length",
" a β nil.toList",
" a β toList β¨[], β―β©",
... |
import Mathlib.Algebra.Group.Semiconj.Defs
import Mathlib.Algebra.Ring.Defs
#align_import algebra.ring.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u v w x
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} {R : Type x}
open Function
namespace SemiconjBy
@[simp... | Mathlib/Algebra/Ring/Semiconj.lean | 48 | 49 | theorem neg_right (h : SemiconjBy a x y) : SemiconjBy a (-x) (-y) := by |
simp only [SemiconjBy, h.eq, neg_mul, mul_neg]
| [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y",
" SemiconjBy a (-x) (-y)"
] | [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 368 | 396 | theorem eq_zero_of_mul_eq_zero_of_smul (P : R[X]) (h : β r : R, r β’ P = 0 β r = 0) :
β (Q : R[X]), P * Q = 0 β Q = 0 := by |
intro Q hQ
suffices β i, P.coeff i β’ Q = 0 by
rw [β leadingCoeff_eq_zero]
apply h
simpa [ext_iff, mul_comm Q.leadingCoeff] using fun i β¦ congr_arg (Β·.coeff Q.natDegree) (this i)
apply Nat.strong_decreasing_induction
Β· use P.natDegree
intro i hi
rw [coeff_eq_zero_of_natDegree_lt hi, zero_smu... | [
" IsUnit a",
" IsUnit (C (a.coeff 0))",
" β (Q : R[X]), P * Q = 0 β Q = 0",
" Q = 0",
" Q.leadingCoeff = 0",
" Q.leadingCoeff β’ P = 0",
" β (i : β), P.coeff i β’ Q = 0",
" β n, β m > n, P.coeff m β’ Q = 0",
" β m > P.natDegree, P.coeff m β’ Q = 0",
" P.coeff i β’ Q = 0",
" β (n : β), (β m > n, P.coe... | [
" IsUnit a",
" IsUnit (C (a.coeff 0))"
] |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.localization.num_denom from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
variable {R : Type*} [CommRing R] (... | Mathlib/RingTheory/Localization/NumDen.lean | 97 | 105 | theorem isInteger_of_isUnit_den {x : K} (h : IsUnit (den A x : A)) : IsInteger A x := by |
cases' h with d hd
have d_ne_zero : algebraMap A K (den A x) β 0 :=
IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors (den A x).2
use βdβ»ΒΉ * num A x
refine _root_.trans ?_ (mk'_num_den A x)
rw [map_mul, map_units_inv, hd]
apply mul_left_cancelβ d_ne_zero
rw [β mul_assoc, mul_inv_cancel d_ne_zero, ... | [
" β a b, IsRelPrime a βb β§ mk' K a b = x",
" mk' K a' β¨b', b'_nonzeroβ© = x",
" (algebraMap A K) (c' * b') * mk' K a' β¨b', b'_nonzeroβ© = (algebraMap A K) (c' * b') * x",
" (algebraMap A K) c' * (algebraMap A K) b' * mk' K a' β¨b', b'_nonzeroβ© = (algebraMap A K) c' * (algebraMap A K) b' * x",
" (algebraMap A K... | [
" β a b, IsRelPrime a βb β§ mk' K a b = x",
" mk' K a' β¨b', b'_nonzeroβ© = x",
" (algebraMap A K) (c' * b') * mk' K a' β¨b', b'_nonzeroβ© = (algebraMap A K) (c' * b') * x",
" (algebraMap A K) c' * (algebraMap A K) b' * mk' K a' β¨b', b'_nonzeroβ© = (algebraMap A K) c' * (algebraMap A K) b' * x",
" (algebraMap A K... |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ... | Mathlib/Topology/MetricSpace/Isometry.lean | 40 | 42 | theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by |
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
| [
" Isometry f β β (x y : Ξ±), nndist (f x) (f y) = nndist x y"
] | [] |
import Mathlib.Data.Finset.Basic
import Mathlib.ModelTheory.Syntax
import Mathlib.Data.List.ProdSigma
#align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
universe u v w u' v'
namespace FirstOrder
namespace Language
variable {L : Language.{u, v}} {... | Mathlib/ModelTheory/Semantics.lean | 88 | 92 | theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β Ξ²} {v : Ξ² β M} :
(t.relabel g).realize v = t.realize (v β g) := by |
induction' t with _ n f ts ih
Β· rfl
Β· simp [ih]
| [
" realize v (relabel g t) = realize (v β g) t",
" realize v (relabel g (var aβ)) = realize (v β g) (var aβ)",
" realize v (relabel g (func f ts)) = realize (v β g) (func f ts)"
] | [] |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
... | Mathlib/Analysis/Complex/Isometry.lean | 125 | 139 | theorem linear_isometry_complex_aux {f : β ββα΅’[β] β} (h : f 1 = 1) :
f = LinearIsometryEquiv.refl β β β¨ f = conjLIE := by |
have h0 : f I = I β¨ f I = -I := by
simp only [ext_iff, β and_or_left, neg_re, I_re, neg_im, neg_zero]
constructor
Β· rw [β I_re]
exact @LinearIsometry.re_apply_eq_re f.toLinearIsometry h I
Β· apply @LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re f.toLinearIsometry
intro z
rw [... | [
" Complex.abs (βa * x) = Complex.abs x",
" (rotation a).trans (rotation b) = rotation (b * a)",
" ((rotation a).trans (rotation b)) xβ = (rotation (b * a)) xβ",
" rotation a β conjLIE",
" False",
" e 1 / β(Complex.abs (e 1)) β circle",
" β(rotationOf (rotation a)) = βa",
" (f z).re = z.re",
" 2 β 0"... | [
" Complex.abs (βa * x) = Complex.abs x",
" (rotation a).trans (rotation b) = rotation (b * a)",
" ((rotation a).trans (rotation b)) xβ = (rotation (b * a)) xβ",
" rotation a β conjLIE",
" False",
" e 1 / β(Complex.abs (e 1)) β circle",
" β(rotationOf (rotation a)) = βa",
" (f z).re = z.re",
" 2 β 0"... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
#align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d"
variable {R : Type*} [CommRing R]
variable {M : Type*} [AddCommGroup M] [Module R M]
variable {Q : QuadraticForm R M}
namespac... | Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean | 62 | 64 | theorem star_algebraMap (r : R) :
star (algebraMap R (CliffordAlgebra Q) r) = algebraMap R (CliffordAlgebra Q) r := by |
rw [star_def, involute.commutes, reverse.commutes]
| [
" star (star x) = x",
" star (x * y) = star y * star x",
" star (x + y) = star x + star y",
" star ((ΞΉ Q) m) = -(ΞΉ Q) m",
" star (r β’ x) = r β’ star x",
" star ((algebraMap R (CliffordAlgebra Q)) r) = (algebraMap R (CliffordAlgebra Q)) r"
] | [
" star (star x) = x",
" star (x * y) = star y * star x",
" star (x + y) = star x + star y",
" star ((ΞΉ Q) m) = -(ΞΉ Q) m",
" star (r β’ x) = r β’ star x"
] |
import Mathlib.RingTheory.AdjoinRoot
import Mathlib.FieldTheory.Minpoly.Field
import Mathlib.RingTheory.Polynomial.GaussLemma
#align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Classical Polynomial
open Polynomial Set... | Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean | 138 | 145 | theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpoly R x) := by |
refine
β¨(minpoly.monic hx).ne_zero,
β¨fun h_contra => (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_isUnit h_contra).symm,
fun a b h => or_iff_not_imp_left.mpr fun h' => ?_β©β©
rw [β minpoly.isIntegrallyClosed_dvd_iff hx] at h' h β’
rw [aeval_mul] at h
exact eq_zero_of_ne_zero_of_mul_left... | [
" minpoly K ((algebraMap S L) s) = map (algebraMap R K) (minpoly R s)",
" Irreducible (map (algebraMap R K) (minpoly R s))",
" (Polynomial.aeval ((algebraMap S L) s)) (map (algebraMap R K) (minpoly R s)) = 0",
" (map (algebraMap R K) (minpoly R s)).Monic",
" minpoly K s = map (algebraMap R K) (minpoly R s)"... | [
" minpoly K ((algebraMap S L) s) = map (algebraMap R K) (minpoly R s)",
" Irreducible (map (algebraMap R K) (minpoly R s))",
" (Polynomial.aeval ((algebraMap S L) s)) (map (algebraMap R K) (minpoly R s)) = 0",
" (map (algebraMap R K) (minpoly R s)).Monic",
" minpoly K s = map (algebraMap R K) (minpoly R s)"... |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.RowCol
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.LinearAlgebra.Alternating.Basic
#align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30... | Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean | 128 | 141 | theorem det_mul_aux {M N : Matrix n n R} {p : n β n} (H : Β¬Bijective p) :
(β Ο : Perm n, Ξ΅ Ο * β x, M (Ο x) (p x) * N (p x) x) = 0 := by |
obtain β¨i, j, hpij, hijβ© : β i j, p i = p j β§ i β j := by
rw [β Finite.injective_iff_bijective, Injective] at H
push_neg at H
exact H
exact
sum_involution (fun Ο _ => Ο * Equiv.swap i j)
(fun Ο _ => by
have : (β x, M (Ο x) (p x)) = β x, M ((Ο * Equiv.swap i j) x) (p x) :=
Fi... | [
" M.det = β Ο : Perm n, ββ(sign Ο) * β i : n, M (Ο i) i",
" (diagonal d).det = β i : n, d i",
" β Ο : Perm n, ββ(sign Ο) * β i : n, diagonal d (Ο i) i = β i : n, d i",
" β b β univ, b β 1 β ββ(sign b) * β i : n, diagonal d (b i) i = 0",
" ββ(sign Ο) * β i : n, diagonal d (Ο i) i = 0",
" β i : n, diagonal ... | [
" M.det = β Ο : Perm n, ββ(sign Ο) * β i : n, M (Ο i) i",
" (diagonal d).det = β i : n, d i",
" β Ο : Perm n, ββ(sign Ο) * β i : n, diagonal d (Ο i) i = β i : n, d i",
" β b β univ, b β 1 β ββ(sign b) * β i : n, diagonal d (b i) i = 0",
" ββ(sign Ο) * β i : n, diagonal d (Ο i) i = 0",
" β i : n, diagonal ... |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def Οβ : MulChar (ZMod 4) β€... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 107 | 109 | theorem Οβ_int_one_mod_four {n : β€} (hn : n % 4 = 1) : Οβ n = 1 := by |
rw [Οβ_int_mod_four, hn]
rfl
| [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... | [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.Topology.Spectral.Hom
import Mathlib.AlgebraicGeometry.Limits
#align_import algebraic_geometry.morphisms.quasi_compact from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
noncomputable section
open CategoryTheory CategoryT... | Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean | 129 | 158 | theorem isCompact_basicOpen (X : Scheme) {U : Opens X.carrier} (hU : IsCompact (U : Set X.carrier))
(f : X.presheaf.obj (op U)) : IsCompact (X.basicOpen f : Set X.carrier) := by |
classical
refine ((isCompact_open_iff_eq_finset_affine_union _).mpr ?_).1
obtain β¨s, hs, eβ© := (isCompact_open_iff_eq_finset_affine_union _).mp β¨hU, U.isOpenβ©
let g : s β X.affineOpens := by
intro V
use V.1 β X.basicOpen f
have : V.1.1 βΆ U := by
apply homOfLE; change _ β (U : Set X.carrier); ... | [
" Continuous βf.val.base",
" QuasiCompact f",
" β (U : Set ββY.toPresheafedSpace), IsOpen U β IsCompact U β IsCompact (βf.val.base β»ΒΉ' U)",
" IsCompact (βf.val.base β»ΒΉ' U)",
" βf.val.base β»ΒΉ' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (βf.val.base) (inv f.val.base).toFun",
" β (x : ββY.toP... | [
" Continuous βf.val.base",
" QuasiCompact f",
" β (U : Set ββY.toPresheafedSpace), IsOpen U β IsCompact U β IsCompact (βf.val.base β»ΒΉ' U)",
" IsCompact (βf.val.base β»ΒΉ' U)",
" βf.val.base β»ΒΉ' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (βf.val.base) (inv f.val.base).toFun",
" β (x : ββY.toP... |
import Batteries.Data.RBMap.Alter
import Batteries.Data.List.Lemmas
namespace Batteries
namespace RBNode
open RBColor
attribute [simp] fold foldl foldr Any forM foldlM Ordered
@[simp] theorem min?_reverse (t : RBNode Ξ±) : t.reverse.min? = t.max? := by
unfold RBNode.max?; split <;> simp [RBNode.min?]
unfold RB... | .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean | 45 | 65 | theorem isOrdered_iff' [@TransCmp Ξ± cmp] {t : RBNode Ξ±} :
isOrdered cmp t L R β
(β a β L, t.All (cmpLT cmp a Β·)) β§
(β a β R, t.All (cmpLT cmp Β· a)) β§
(β a β L, β b β R, cmpLT cmp a b) β§
Ordered cmp t := by |
induction t generalizing L R with
| nil =>
simp [isOrdered]; split <;> simp [cmpLT_iff]
next h => intro _ ha _ hb; cases h _ _ ha hb
| node _ l v r =>
simp [isOrdered, *]
exact β¨
fun β¨β¨Ll, lv, Lv, olβ©, β¨vr, rR, vR, orβ©β© => β¨
fun _ h => β¨Lv _ h, Ll _ h, (Lv _ h).trans_l vrβ©,
... | [
" t.reverse.min? = t.max?",
" t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?",
" nil.reverse.min? = none",
" (node cβ lβ vβ nil).reverse.min? = some vβ",
" (node cβ lβ vβ rβ).reverse.min? = rβ.max?",
" (node cβ rβ.reverse vβ lβ.reverse).... | [
" t.reverse.min? = t.max?",
" t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?",
" nil.reverse.min? = none",
" (node cβ lβ vβ nil).reverse.min? = some vβ",
" (node cβ lβ vβ rβ).reverse.min? = rβ.max?",
" (node cβ rβ.reverse vβ lβ.reverse).... |
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Finset.Preimage
#align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
@[ext]
structure YoungDiagram where
cells : Finset (β Γ β)
isLowerSet : IsLowerSet (cel... | Mathlib/Combinatorics/Young/YoungDiagram.lean | 347 | 348 | theorem mem_col_iff {ΞΌ : YoungDiagram} {j : β} {c : β Γ β} : c β ΞΌ.col j β c β ΞΌ β§ c.snd = j := by |
simp [col]
| [
" ΞΌ = Ξ½",
" c β ΞΌ.col j β c β ΞΌ β§ c.2 = j"
] | [
" ΞΌ = Ξ½"
] |
import Mathlib.Algebra.IsPrimePow
import Mathlib.SetTheory.Cardinal.Ordinal
import Mathlib.Tactic.WLOG
#align_import set_theory.cardinal.divisibility from "leanprover-community/mathlib"@"ea050b44c0f9aba9d16a948c7cc7d2e7c8493567"
namespace Cardinal
open Cardinal
universe u
variable {a b : Cardinal.{u}} {n m : β... | Mathlib/SetTheory/Cardinal/Divisibility.lean | 76 | 89 | theorem prime_of_aleph0_le (ha : β΅β β€ a) : Prime a := by |
refine β¨(aleph0_pos.trans_le ha).ne', ?_, fun b c hbc => ?_β©
Β· rw [isUnit_iff]
exact (one_lt_aleph0.trans_le ha).ne'
rcases eq_or_ne (b * c) 0 with hz | hz
Β· rcases mul_eq_zero.mp hz with (rfl | rfl) <;> simp
wlog h : c β€ b
Β· cases le_total c b <;> [solve_by_elim; rw [or_comm]]
apply_assumption
... | [
" IsUnit a β a = 1",
" a = 1 β IsUnit a",
" IsUnit 1",
" a = 1",
" 0 = 1",
" 1 β€ a",
" 1 β€ t",
" t β 0",
" False",
" a β€ x",
" x = 0",
" Prime a",
" Β¬IsUnit a",
" Β¬a = 1",
" a β£ b β¨ a β£ c",
" a β£ 0 β¨ a β£ c",
" a β£ b β¨ a β£ 0",
" a β£ c β¨ a β£ b",
" b β€ c",
" c * b β 0",
" a β£ c ... | [
" IsUnit a β a = 1",
" a = 1 β IsUnit a",
" IsUnit 1",
" a = 1",
" 0 = 1",
" 1 β€ a",
" 1 β€ t",
" t β 0",
" False",
" a β€ x",
" x = 0"
] |
import Mathlib.Algebra.Module.Equiv
import Mathlib.Data.DFinsupp.Basic
import Mathlib.Data.Finsupp.Basic
#align_import data.finsupp.to_dfinsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
variable {ΞΉ : Type*} {R : Type*} {M : Type*}
section Defs
def Finsupp.toDFinsupp [Zer... | Mathlib/Data/Finsupp/ToDFinsupp.lean | 117 | 119 | theorem DFinsupp.toFinsupp_support (f : Ξ β _ : ΞΉ, M) : f.toFinsupp.support = f.support := by |
ext
simp
| [
" (single i m).toDFinsupp = DFinsupp.single i m",
" (single i m).toDFinsupp iβ = (DFinsupp.single i m) iβ",
" f.toDFinsupp.support = f.support",
" aβ β f.toDFinsupp.support β aβ β f.support",
" i β f.support β f i β 0",
" f.toFinsupp.support = f.support",
" aβ β f.toFinsupp.support β aβ β f.support"
] | [
" (single i m).toDFinsupp = DFinsupp.single i m",
" (single i m).toDFinsupp iβ = (DFinsupp.single i m) iβ",
" f.toDFinsupp.support = f.support",
" aβ β f.toDFinsupp.support β aβ β f.support",
" i β f.support β f i β 0"
] |
import Mathlib.MeasureTheory.Measure.Restrict
#align_import measure_theory.measure.mutually_singular from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570"
open Set
open MeasureTheory NNReal ENNReal
namespace MeasureTheory
namespace Measure
variable {Ξ± : Type*} {m0 : MeasurableSpace Ξ±}... | Mathlib/MeasureTheory/Measure/MutuallySingular.lean | 129 | 130 | theorem add_left_iff : ΞΌβ + ΞΌβ ββ Ξ½ β ΞΌβ ββ Ξ½ β§ ΞΌβ ββ Ξ½ := by |
rw [β sum_cond, sum_left, Bool.forall_bool, cond, cond, and_comm]
| [
" ΞΌ ββ Ξ½",
" Ξ½ (toMeasurable ΞΌ s)αΆ = 0",
" x β toMeasurable ΞΌ s",
" ΞΌ.restrict h.nullSet = 0",
" Ξ½.restrict h.nullSetαΆ = 0",
" ΞΌ ββ ΞΌ β ΞΌ = 0",
" ΞΌ ββ ΞΌ",
" 0 ββ 0",
" ΞΌ ββ ΞΌ β ΞΌ = 0",
" ΞΌ = 0",
" ΞΌ univ = 0",
" sum ΞΌ ββ Ξ½ β β (i : ΞΉ), ΞΌ i ββ Ξ½",
" sum ΞΌ ββ Ξ½",
" (sum ΞΌ) (β i, s i) = 0",
... | [
" ΞΌ ββ Ξ½",
" Ξ½ (toMeasurable ΞΌ s)αΆ = 0",
" x β toMeasurable ΞΌ s",
" ΞΌ.restrict h.nullSet = 0",
" Ξ½.restrict h.nullSetαΆ = 0",
" ΞΌ ββ ΞΌ β ΞΌ = 0",
" ΞΌ ββ ΞΌ",
" 0 ββ 0",
" ΞΌ ββ ΞΌ β ΞΌ = 0",
" ΞΌ = 0",
" ΞΌ univ = 0",
" sum ΞΌ ββ Ξ½ β β (i : ΞΉ), ΞΌ i ββ Ξ½",
" sum ΞΌ ββ Ξ½",
" (sum ΞΌ) (β i, s i) = 0",
... |
import Mathlib.Topology.PartialHomeomorph
import Mathlib.Topology.SeparatedMap
#align_import topology.is_locally_homeomorph from "leanprover-community/mathlib"@"e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b"
open Topology
variable {X Y Z : Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] (g : Y β... | Mathlib/Topology/IsLocalHomeomorph.lean | 45 | 59 | theorem isLocalHomeomorphOn_iff_openEmbedding_restrict {f : X β Y} :
IsLocalHomeomorphOn f s β β x β s, β U β π x, OpenEmbedding (U.restrict f) := by |
refine β¨fun h x hx β¦ ?_, fun h x hx β¦ ?_β©
Β· obtain β¨e, hxe, rflβ© := h x hx
exact β¨e.source, e.open_source.mem_nhds hxe, e.openEmbedding_restrictβ©
Β· obtain β¨U, hU, embβ© := h x hx
have : OpenEmbedding ((interior U).restrict f) := by
refine emb.comp β¨embedding_inclusion interior_subset, ?_β©
rw [... | [
" IsLocalHomeomorphOn f s β β x β s, β U β π x, OpenEmbedding (U.restrict f)",
" β U β π x, OpenEmbedding (U.restrict f)",
" β U β π x, OpenEmbedding (U.restrict βe)",
" β e, x β e.source β§ f = βe",
" OpenEmbedding ((interior U).restrict f)",
" IsOpen (Set.range (Set.inclusion β―))",
" IsOpen {x | βx ... | [] |
import Mathlib.Algebra.Algebra.Bilinear
import Mathlib.RingTheory.Localization.Basic
#align_import algebra.module.localized_module from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
namespace LocalizedModule
universe u v
variable {R : Type u} [CommSemiring R] (S : Submonoid R)
variab... | Mathlib/Algebra/Module/LocalizedModule.lean | 106 | 109 | theorem induction_onβ {Ξ² : LocalizedModule S M β LocalizedModule S M β Prop}
(h : β (m m' : M) (s s' : S), Ξ² (mk m s) (mk m' s')) : β x y, Ξ² x y := by |
rintro β¨β¨m, sβ©β© β¨β¨m', s'β©β©
exact h m m' s s'
| [
" 1 β’ (m, s).2 β’ (m, s).1 = 1 β’ (m, s).2 β’ (m, s).1",
" r S M (m1, s1) (m3, s3)",
" (u1 * u2 * s2) β’ (m3, s3).2 β’ (m1, s1).1 = (u1 * u2 * s2) β’ (m1, s1).2 β’ (m3, s3).1",
" (s2 * (s3 * (u1 * u2))) β’ m1 = (s1 * (s2 * (u1 * u2))) β’ m3",
" β (x : LocalizedModule S M), Ξ² x",
" Ξ² (Quot.mk Setoid.r (m, s))",
"... | [
" 1 β’ (m, s).2 β’ (m, s).1 = 1 β’ (m, s).2 β’ (m, s).1",
" r S M (m1, s1) (m3, s3)",
" (u1 * u2 * s2) β’ (m3, s3).2 β’ (m1, s1).1 = (u1 * u2 * s2) β’ (m1, s1).2 β’ (m3, s3).1",
" (s2 * (s3 * (u1 * u2))) β’ m1 = (s1 * (s2 * (u1 * u2))) β’ m3",
" β (x : LocalizedModule S M), Ξ² x",
" Ξ² (Quot.mk Setoid.r (m, s))"
] |
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 | 184 | 188 | theorem det_toMatrix_prod [Fintype n] (L : List (TransvectionStruct n π)) :
det (L.map toMatrix).prod = 1 := by |
induction' L with t L IH
Β· simp
Β· simp [IH]
| [
" transvection i j 0 = 1",
" updateRow 1 i (1 i + c β’ 1 j) = transvection i j c",
" updateRow 1 i (1 i + c β’ 1 j) a b = transvection i j c a b",
" transvection i j c * transvection i j d = transvection i j (c + d)",
" (transvection i j c * M) i b = M i b + c * M j b",
" (M * transvection i j c) a j = M a ... | [
" transvection i j 0 = 1",
" updateRow 1 i (1 i + c β’ 1 j) = transvection i j c",
" updateRow 1 i (1 i + c β’ 1 j) a b = transvection i j c a b",
" transvection i j c * transvection i j d = transvection i j (c + d)",
" (transvection i j c * M) i b = M i b + c * M j b",
" (M * transvection i j c) a j = M a ... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antidiagonal mem_anti... | Mathlib/RingTheory/PowerSeries/Order.lean | 162 | 164 | theorem le_order_add (Ο Ο : Rβ¦Xβ§) : min (order Ο) (order Ο) β€ order (Ο + Ο) := by |
refine le_order _ _ ?_
simp (config := { contextual := true }) [coeff_of_lt_order]
| [
" (β n, (coeff R n) Ο β 0) β Ο β 0",
" (Β¬β n, (coeff R n) Ο β 0) β Β¬Ο β 0",
" (β (n : β), (coeff R n) Ο = 0) β Ο = 0",
" Ο.order.Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" β€.Dom β Ο β 0",
" (β(Nat.find β―)).Dom β Ο β ... | [
" (β n, (coeff R n) Ο β 0) β Ο β 0",
" (Β¬β n, (coeff R n) Ο β 0) β Β¬Ο β 0",
" (β (n : β), (coeff R n) Ο = 0) β Ο = 0",
" Ο.order.Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" β€.Dom β Ο β 0",
" (β(Nat.find β―)).Dom β Ο β ... |
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
#align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
section
variable {Ξ± : Type*} [Group Ξ±] [LinearOrder Ξ±] [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· β€ Β·)]
-- TODO... | Mathlib/Algebra/Order/Group/MinMax.lean | 22 | 23 | theorem max_one_div_max_inv_one_eq_self (a : Ξ±) : max a 1 / max aβ»ΒΉ 1 = a := by |
rcases le_total a 1 with (h | h) <;> simp [h]
| [
" max a 1 / max aβ»ΒΉ 1 = a"
] | [] |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.RingTheory.Coprime.Basic
import Mathlib.Tactic.AdaptationNote
#align_import ring_theory.polynomial.scale_roots from "leanprover-community/mathlib"@"40ac1b258344e0c2b4568dc37bfad937ec35a727"
variable {R... | Mathlib/RingTheory/Polynomial/ScaleRoots.lean | 37 | 39 | theorem coeff_scaleRoots (p : R[X]) (s : R) (i : β) :
(scaleRoots p s).coeff i = coeff p i * s ^ (p.natDegree - i) := by |
simp (config := { contextual := true }) [scaleRoots, coeff_monomial]
| [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)"
] | [] |
import Mathlib.Algebra.Lie.Nilpotent
import Mathlib.Algebra.Lie.Normalizer
#align_import algebra.lie.cartan_subalgebra from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102"
universe u v w wβ wβ
variable {R : Type u} {L : Type v}
variable [CommRing R] [LieRing L] [LieAlgebra R L] (H : Lie... | Mathlib/Algebra/Lie/CartanSubalgebra.lean | 58 | 61 | theorem normalizer_eq_self_of_isCartanSubalgebra (H : LieSubalgebra R L) [H.IsCartanSubalgebra] :
H.toLieSubmodule.normalizer = H.toLieSubmodule := by |
rw [β LieSubmodule.coe_toSubmodule_eq_iff, coe_normalizer_eq_normalizer,
IsCartanSubalgebra.self_normalizing, coe_toLieSubmodule]
| [
" H.toLieSubmodule.normalizer = H.toLieSubmodule"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 178 | 180 | theorem not_dvd_of_degree_lt {p q : R[X]} (h0 : q β 0) (hl : q.degree < p.degree) : Β¬p β£ q := by |
by_contra hcontra
exact h0 (eq_zero_of_dvd_of_degree_lt hcontra hl)
| [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... | [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open scoped Classical... | Mathlib/Analysis/Calculus/Deriv/Mul.lean | 215 | 218 | theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) :
HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by |
rw [β hasDerivWithinAt_univ] at *
exact hc.mul hd
| [
" HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x",
" HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x",
" HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') univ x"
] | [
" HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x"
] |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Nat.Factors
import Mathlib.Order.Interval.Finset.Nat
#align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open scoped Classical
open Finset
namespace Nat
variable (n : β)
d... | Mathlib/NumberTheory/Divisors.lean | 147 | 151 | theorem divisor_le {m : β} : n β divisors m β n β€ m := by |
cases' m with m
Β· simp
Β· simp only [mem_divisors, Nat.succ_ne_zero m, and_true_iff, Ne, not_false_iff]
exact Nat.le_of_dvd (Nat.succ_pos m)
| [
" filter (fun x => x β£ n) (range n.succ) = n.divisors",
" aβ β filter (fun x => x β£ n) (range n.succ) β aβ β n.divisors",
" aβ β£ n β aβ < n.succ β 1 β€ aβ",
" filter (fun x => x β£ n) (range n) = n.properDivisors",
" aβ β filter (fun x => x β£ n) (range n) β aβ β n.properDivisors",
" aβ β£ n β aβ < n β 1 β€ aβ... | [
" filter (fun x => x β£ n) (range n.succ) = n.divisors",
" aβ β filter (fun x => x β£ n) (range n.succ) β aβ β n.divisors",
" aβ β£ n β aβ < n.succ β 1 β€ aβ",
" filter (fun x => x β£ n) (range n) = n.properDivisors",
" aβ β filter (fun x => x β£ n) (range n) β aβ β n.properDivisors",
" aβ β£ n β aβ < n β 1 β€ aβ... |
import Mathlib.Analysis.SpecialFunctions.PolarCoord
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic
open Real Set MeasureTheory MeasureTheory.Measure
section real
theorem integral_rpow_mul_exp_neg_rpow {p q : β} (hp : 0 < p) (hq : - 1 < q) :
β« x in Ioi (0:β), x ^ q * exp (- x ^ p) = (1 / p) * Gamma ((q +... | Mathlib/MeasureTheory/Integral/Gamma.lean | 39 | 57 | theorem integral_rpow_mul_exp_neg_mul_rpow {p q b : β} (hp : 0 < p) (hq : - 1 < q) (hb : 0 < b) :
β« x in Ioi (0:β), x ^ q * exp (- b * x ^ p) =
b ^ (-(q + 1) / p) * (1 / p) * Gamma ((q + 1) / p) := by |
calc
_ = β« x in Ioi (0:β), b ^ (-pβ»ΒΉ * q) * ((b ^ pβ»ΒΉ * x) ^ q * rexp (-(b ^ pβ»ΒΉ * x) ^ p)) := by
refine setIntegral_congr measurableSet_Ioi (fun _ hx => ?_)
rw [mul_rpow _ (le_of_lt hx), mul_rpow _ (le_of_lt hx), β rpow_mul, β rpow_mul,
inv_mul_cancel, rpow_one, mul_assoc, β mul_assoc, β rpo... | [
" β« (x : β) in Ioi 0, x ^ q * rexp (-x ^ p) = 1 / p * ((q + 1) / p).Gamma",
" β« (x : β) in Ioi 0, x ^ q * rexp (-x ^ p) =\n β« (x : β) in Ioi 0, (1 / p * x ^ (1 / p - 1)) β’ ((x ^ (1 / p)) ^ q * rexp (-x))",
" β« (x : β) in Ioi 0, (1 / p * x ^ (1 / p - 1)) β’ ((x ^ (1 / p)) ^ q * rexp (-(x ^ (1 / p)) ^ p)) =\n ... | [
" β« (x : β) in Ioi 0, x ^ q * rexp (-x ^ p) = 1 / p * ((q + 1) / p).Gamma",
" β« (x : β) in Ioi 0, x ^ q * rexp (-x ^ p) =\n β« (x : β) in Ioi 0, (1 / p * x ^ (1 / p - 1)) β’ ((x ^ (1 / p)) ^ q * rexp (-x))",
" β« (x : β) in Ioi 0, (1 / p * x ^ (1 / p - 1)) β’ ((x ^ (1 / p)) ^ q * rexp (-(x ^ (1 / p)) ^ p)) =\n ... |
import Mathlib.Data.List.Sublists
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
open List
variable {Ξ± : Type*}
-- Porting note (#11215): TODO: Write a more efficient version
def powerset... | Mathlib/Data/Multiset/Powerset.lean | 132 | 137 | theorem revzip_powersetAux' {l : List Ξ±} β¦xβ¦ (h : x β revzip (powersetAux' l)) :
x.1 + x.2 = βl := by |
rw [revzip, powersetAux', β map_reverse, zip_map, β revzip, List.mem_map] at h
simp only [Prod.map_apply, Prod.exists] at h
rcases h with β¨lβ, lβ, h, rfl, rflβ©
exact Quot.sound (revzip_sublists' _ _ _ h)
| [
" β (a : List Ξ±), β¦aβ§ β powersetAux l β β¦aβ§ β€ βl",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList β List.cons a) l.sublists' = List.map (cons a β ofList) l.sublists'",
" ... | [
" β (a : List Ξ±), β¦aβ§ β powersetAux l β β¦aβ§ β€ βl",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList β List.cons a) l.sublists' = List.map (cons a β ofList) l.sublists'",
" ... |
import Mathlib.AlgebraicGeometry.Restrict
import Mathlib.CategoryTheory.Adjunction.Limits
import Mathlib.CategoryTheory.Adjunction.Reflective
#align_import algebraic_geometry.Gamma_Spec_adjunction from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
-- Explicit universe annotations were u... | Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean | 84 | 87 | theorem toΞSpec_preim_basicOpen_eq (r : Ξ.obj (op X)) :
X.toΞSpecFun β»ΒΉ' (basicOpen r).1 = (X.toRingedSpace.basicOpen r).1 := by |
ext
erw [X.toRingedSpace.mem_top_basicOpen]; apply not_mem_prime_iff_unit_in_stalk
| [
" r β (X.toΞSpecFun x).asIdeal β IsUnit ((X.ΞToStalk x) r)",
" X.toΞSpecFun β»ΒΉ' (basicOpen r).carrier = (X.toRingedSpace.basicOpen r).carrier",
" xβ β X.toΞSpecFun β»ΒΉ' (basicOpen r).carrier β xβ β (X.toRingedSpace.basicOpen r).carrier",
" xβ β X.toΞSpecFun β»ΒΉ' (basicOpen r).carrier β IsUnit ((X.toRingedSpace.... | [
" r β (X.toΞSpecFun x).asIdeal β IsUnit ((X.ΞToStalk x) r)"
] |
import Mathlib.Combinatorics.Quiver.Cast
import Mathlib.Combinatorics.Quiver.Symmetric
#align_import combinatorics.quiver.single_obj from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Quiver
-- Porting note: Removed `deriving Unique`.
@[nolint unusedArguments]
def SingleObj ... | Mathlib/Combinatorics/Quiver/SingleObj.lean | 132 | 136 | theorem listToPath_pathToList {x : SingleObj Ξ±} (p : Path (star Ξ±) x) :
listToPath (pathToList p) = p.cast rfl ext := by |
induction' p with y z p a ih
Β· rfl
Β· dsimp at *; rw [ih]
| [
" toPrefunctor.symm (f βq g) = toPrefunctor.symm g β toPrefunctor.symm f",
" listToPath (pathToList p) = Path.cast β― β― p",
" listToPath (pathToList Path.nil) = Path.cast β― β― Path.nil",
" listToPath (pathToList (p.cons a)) = Path.cast β― β― (p.cons a)",
" (listToPath (pathToList p)).cons a = p.cons a"
] | [
" toPrefunctor.symm (f βq g) = toPrefunctor.symm g β toPrefunctor.symm f"
] |
import Mathlib.Data.Matrix.Kronecker
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.TensorProduct.Basis
#align_import linear_algebra.tensor_product.matrix from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081"
variable {R : Type*} {M N P M' N' : Type*} {ΞΉ ΞΊ Ο ΞΉ' ΞΊ' ... | Mathlib/LinearAlgebra/TensorProduct/Matrix.lean | 68 | 77 | theorem TensorProduct.toMatrix_assoc :
toMatrix ((bM.tensorProduct bN).tensorProduct bP) (bM.tensorProduct (bN.tensorProduct bP))
(TensorProduct.assoc R M N P) =
(1 : Matrix (ΞΉ Γ ΞΊ Γ Ο) (ΞΉ Γ ΞΊ Γ Ο) R).submatrix _root_.id (Equiv.prodAssoc _ _ _) := by |
ext β¨i, j, kβ© β¨β¨i', j'β©, k'β©
simp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe,
TensorProduct.assoc_tmul, Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply,
Equiv.prodAssoc_apply, _root_.id, Basis.repr_self_apply, Matrix.one_apply, Prod.ext_iff,
ite_and, @eq_comm _ i', @... | [
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)",
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa... | [
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)",
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa... |
import Mathlib.Algebra.Polynomial.Mirror
import Mathlib.Analysis.Complex.Polynomial
#align_import data.polynomial.unit_trinomial from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836"
namespace Polynomial
open scoped Polynomial
open Finset
section Semiring
variable {R : Type*} [Semirin... | Mathlib/Algebra/Polynomial/UnitTrinomial.lean | 55 | 58 | theorem trinomial_middle_coeff (hkm : k < m) (hmn : m < n) :
(trinomial k m n u v w).coeff m = v := by |
rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow,
if_neg hkm.ne', if_pos rfl, if_neg hmn.ne, zero_add, add_zero]
| [
" (trinomial k m n u v w).coeff n = w",
" (trinomial k m n u v w).coeff m = v"
] | [
" (trinomial k m n u v w).coeff n = w"
] |
import Batteries.Data.Sum.Basic
import Batteries.Logic
open Function
namespace Sum
@[simp] protected theorem Β«forallΒ» {p : Ξ± β Ξ² β Prop} :
(β x, p x) β (β a, p (inl a)) β§ β b, p (inr b) :=
β¨fun h => β¨fun _ => h _, fun _ => h _β©, fun β¨hβ, hββ© => Sum.rec hβ hββ©
@[simp] protected theorem Β«existsΒ» {p : Ξ± β Ξ² ... | .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean | 134 | 136 | theorem elim_map {fβ : Ξ± β Ξ²} {fβ : Ξ² β Ξ΅} {gβ : Ξ³ β Ξ΄} {gβ : Ξ΄ β Ξ΅} {x} :
Sum.elim fβ gβ (Sum.map fβ gβ x) = Sum.elim (fβ β fβ) (gβ β gβ) x := by |
cases x <;> rfl
| [
" (β (fab : (ab : Ξ± β Ξ²) β Ξ³ ab), p fab) β\n β (fa : (val : Ξ±) β Ξ³ (inl val)) (fb : (val : Ξ²) β Ξ³ (inr val)), p fun t => rec fa fb t",
" p fab",
" fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t",
" fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab",
" fab (inl valβ) = rec ... | [
" (β (fab : (ab : Ξ± β Ξ²) β Ξ³ ab), p fab) β\n β (fa : (val : Ξ±) β Ξ³ (inl val)) (fb : (val : Ξ²) β Ξ³ (inr val)), p fun t => rec fa fb t",
" p fab",
" fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t",
" fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab",
" fab (inl valβ) = rec ... |
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 115 | 118 | theorem basisSets_zero (U) (hU : U β p.basisSets) : (0 : E) β U := by |
rcases p.basisSets_iff.mp hU with β¨ΞΉ', r, hr, hUβ©
rw [hU, mem_ball_zero, map_zero]
exact hr
| [
" U β p.basisSets β β i r, 0 < r β§ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r",
" p.basisSets.Nonempty",
" (p i).ball 0 1 β p.basisSets",
" β z β p.basisSets, z β U β© V",
" ((s βͺ t).sup p).ball 0 (min rβ rβ) β p.basisSets β§ ((s βͺ t).sup p).ball 0 (min rβ rβ) β U β© V",
" ((s βͺ t).su... | [
" U β p.basisSets β β i r, 0 < r β§ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r",
" p.basisSets.Nonempty",
" (p i).ball 0 1 β p.basisSets",
" β z β p.basisSets, z β U β© V",
" ((s βͺ t).sup p).ball 0 (min rβ rβ) β p.basisSets β§ ((s βͺ t).sup p).ball 0 (min rβ rβ) β U β© V",
" ((s βͺ t).su... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 156 | 161 | theorem fib_coprime_fib_succ (n : β) : Nat.Coprime (fib n) (fib (n + 1)) := by |
induction' n with n ih
Β· simp
Β· rw [fib_add_two]
simp only [coprime_add_self_right]
simp [Coprime, ih.symm]
| [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib β€ (n + 1).fib",
" fib 0 β€ (0 + 1).fib",
" (nβ + 1).fib β€ (nβ + 1 + 1).fib",
" (n + 2).fib = 0 β n + 2 = 0",
" 0 < n.fib β 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib β€ (n + 1).fib",
" fib 0 β€ (0 + 1).fib",
" (nβ + 1).fib β€ (nβ + 1 + 1).fib",
" (n + 2).fib = 0 β n + 2 = 0",
" 0 < n.fib β 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... |
import Mathlib.Data.Finset.Sort
import Mathlib.Data.List.FinRange
import Mathlib.Data.Prod.Lex
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.Order.Interval.Finset.Fin
#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace Tuple
variable {... | Mathlib/Data/Fin/Tuple/Sort.lean | 99 | 102 | theorem monotone_proj (f : Fin n β Ξ±) : Monotone (graph.proj : graph f β Ξ±) := by |
rintro β¨β¨x, iβ©, hxβ© β¨β¨y, jβ©, hyβ© (_ | h)
Β· exact le_of_lt βΉ_βΊ
Β· simp [graph.proj]
| [
" (graph f).card = n",
" Finset.univ.card = n",
" Function.Injective fun i => (f i, i)",
" (fun i => (f i, i)) aββ = (fun i => (f i, i)) aββ β aββ = aββ",
" (f aββ, aββ) = (f aββ, aββ) β aββ = aββ",
" (f aββ, aββ).1 = (f aββ, aββ).1 β§ (f aββ, aββ).2 = (f aββ, aββ).2 β aββ = aββ",
" (f i, i) β graph f",
... | [
" (graph f).card = n",
" Finset.univ.card = n",
" Function.Injective fun i => (f i, i)",
" (fun i => (f i, i)) aββ = (fun i => (f i, i)) aββ β aββ = aββ",
" (f aββ, aββ) = (f aββ, aββ) β aββ = aββ",
" (f aββ, aββ).1 = (f aββ, aββ).1 β§ (f aββ, aββ).2 = (f aββ, aββ).2 β aββ = aββ",
" (f i, i) β graph f",
... |
import Mathlib.RingTheory.LocalProperties
#align_import ring_theory.ring_hom.surjective from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
local notation "surjective" => fun {X Y : Type _} [CommRing... | Mathlib/RingTheory/RingHom/Surjective.lean | 30 | 33 | theorem surjective_respectsIso : RespectsIso surjective := by |
apply surjective_stableUnderComposition.respectsIso
intros _ _ _ _ e
exact e.surjective
| [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective βf",
" Function.Surjective β(g.comp f)",
" RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective βf",
" β {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R β+* S), Function.Surjective βe.to... | [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective βf",
" Function.Surjective β(g.comp f)"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 107 | 109 | theorem binomial_eq_choose [DecidableEq Ξ±] (h : a β b) :
multinomial {a, b} f = (f a + f b).choose (f a) := by |
simp [binomial_eq h, choose_eq_factorial_div_factorial (Nat.le_add_right _ _)]
| [
" multinomial β
f = 1",
" multinomial (cons a s ha) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" 0 < β i β cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + β i β β
, f i).choose (f a) * multinomial β
... | [
" multinomial β
f = 1",
" multinomial (cons a s ha) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" 0 < β i β cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + β i β β
, f i).choose (f a) * multinomial β
... |
import Mathlib.Analysis.Analytic.Constructions
import Mathlib.Analysis.Calculus.Dslope
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.Analytic.Uniqueness
#align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090"
open sco... | Mathlib/Analysis/Analytic/IsolatedZeros.lean | 44 | 45 | theorem hasSum_at_zero (a : β β E) : HasSum (fun n => (0 : π) ^ n β’ a n) (a 0) := by |
convert hasSum_single (Ξ± := E) 0 fun b h β¦ _ <;> simp [*]
| [
" HasSum (fun n => 0 ^ n β’ a n) (a 0)",
" a 0 = 0 ^ 0 β’ a 0",
" 0 ^ b β’ a b = 0"
] | [] |
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
import Mathlib.CategoryTheory.Limits.ConcreteCategory
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryT... | Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean | 324 | 333 | theorem widePushout_exists_rep {B : C} {Ξ± : Type _} {X : Ξ± β C} (f : β j : Ξ±, B βΆ X j)
[HasWidePushout.{v} B X f] [PreservesColimit (wideSpan B X f) (forget C)]
(x : β(widePushout B X f)) : (β y : B, head f y = x) β¨ β (i : Ξ±) (y : X i), ΞΉ f i y = x := by |
obtain β¨_ | j, y, rflβ© := Concrete.colimit_exists_rep _ x
Β· left
use y
rfl
Β· right
use j, y
rfl
| [
" (β y, (head f) y = x) β¨ β i y, (ΞΉ f i) y = x",
" (β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y) β¨\n β i y_1, (ΞΉ f i) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" (head f) y = (colimit.ΞΉ (wideSpan B X f) none) y",
" (β y_1, (hea... | [] |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.Finsupp.Order
#align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Finset
variable {Ξ± Ξ² ΞΉ : Type*}
namespace Finsupp
def toMultiset : (Ξ± ββ β) β+ Multiset Ξ± where
toFun f := Finsupp.sum f... | Mathlib/Data/Finsupp/Multiset.lean | 122 | 125 | theorem toMultiset_inf [DecidableEq Ξ±] (f g : Ξ± ββ β) :
toMultiset (f β g) = toMultiset f β© toMultiset g := by |
ext
simp_rw [Multiset.count_inter, Finsupp.count_toMultiset, Finsupp.inf_apply, inf_eq_min]
| [
" toMultiset (single a n) = n β’ {a}",
" 0 β’ {a} = 0",
" toMultiset (β i β s, single i n) = n β’ s.val",
" Multiset.card (toMultiset f) = f.sum fun x => id",
" Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)",
" Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)",
" β (a : Ξ±) (b : β) (f... | [
" toMultiset (single a n) = n β’ {a}",
" 0 β’ {a} = 0",
" toMultiset (β i β s, single i n) = n β’ s.val",
" Multiset.card (toMultiset f) = f.sum fun x => id",
" Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)",
" Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)",
" β (a : Ξ±) (b : β) (f... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.Prod
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.FinCases
import Mathlib.Tactic.LinearCombination
import Mathlib.Lean.Expr.ExtraRecognizers
import Mathlib.Data.Set.Subsingleton
#align_import lin... | Mathlib/LinearAlgebra/LinearIndependent.lean | 126 | 128 | theorem linearIndependent_iff :
LinearIndependent R v β β l, Finsupp.total ΞΉ M R v l = 0 β l = 0 := by |
simp [LinearIndependent, LinearMap.ker_eq_bot']
| [
" LinearIndependent R v β β (l : ΞΉ ββ R), (Finsupp.total ΞΉ M R v) l = 0 β l = 0"
] | [] |
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Ring.Action.Basic
import Mathlib.Algebra.Ring.Equiv
import Mathlib.Algebra.Group.Hom.CompTypeclasses
#align_import algebra.hom.group_action from "leanprover-community/mathlib"@"e7bab9a85e92cf46c02cb4725a7be2f04691e3a7"
assert_not_exists Submonoid
section ... | Mathlib/GroupTheory/GroupAction/Hom.lean | 150 | 154 | theorem _root_.IsScalarTower.smulHomClass [MulOneClass X] [SMul X Y] [IsScalarTower M' X Y]
[MulActionHomClass F X X Y] : MulActionHomClass F M' X Y where
map_smulββ f m x := by |
rw [β mul_one (m β’ x), β smul_eq_mul, map_smul, smul_assoc, β map_smul,
smul_eq_mul, mul_one, id_eq]
| [
" f = g",
" { toFun := toFunβ, map_smul' := map_smul'β } = g",
" { toFun := toFunβΒΉ, map_smul' := map_smul'βΒΉ } = { toFun := toFunβ, map_smul' := map_smul'β }",
" f (m β’ x) = id m β’ f x"
] | [
" f = g",
" { toFun := toFunβ, map_smul' := map_smul'β } = g",
" { toFun := toFunβΒΉ, map_smul' := map_smul'βΒΉ } = { toFun := toFunβ, map_smul' := map_smul'β }"
] |
import Mathlib.MeasureTheory.Measure.Doubling
import Mathlib.MeasureTheory.Covering.Vitali
import Mathlib.MeasureTheory.Covering.Differentiation
#align_import measure_theory.covering.density_theorem from "leanprover-community/mathlib"@"5f6e827d81dfbeb6151d7016586ceeb0099b9655"
noncomputable section
open Set Filt... | Mathlib/MeasureTheory/Covering/DensityTheorem.lean | 112 | 132 | theorem tendsto_closedBall_filterAt {K : β} {x : Ξ±} {ΞΉ : Type*} {l : Filter ΞΉ} (w : ΞΉ β Ξ±)
(Ξ΄ : ΞΉ β β) (Ξ΄lim : Tendsto Ξ΄ l (π[>] 0)) (xmem : βαΆ j in l, x β closedBall (w j) (K * Ξ΄ j)) :
Tendsto (fun j => closedBall (w j) (Ξ΄ j)) l ((vitaliFamily ΞΌ K).filterAt x) := by |
refine (vitaliFamily ΞΌ K).tendsto_filterAt_iff.mpr β¨?_, fun Ξ΅ hΞ΅ => ?_β©
Β· filter_upwards [xmem, Ξ΄lim self_mem_nhdsWithin] with j hj h'j
exact closedBall_mem_vitaliFamily_of_dist_le_mul ΞΌ hj h'j
Β· rcases l.eq_or_neBot with rfl | h
Β· simp
have hK : 0 β€ K := by
rcases (xmem.and (Ξ΄lim self_mem_nhds... | [
" VitaliFamily ΞΌ",
" β (x : Ξ±),\n βαΆ (r : β) in π[>] 0, ΞΌ (closedBall x (3 * r)) β€ β(scalingConstantOf ΞΌ (max (4 * K + 3) 3)) * ΞΌ (closedBall x r)",
" βαΆ (r : β) in π[>] 0, ΞΌ (closedBall x (3 * r)) β€ β(scalingConstantOf ΞΌ (max (4 * K + 3) 3)) * ΞΌ (closedBall x r)",
" β x_1 β U, ΞΌ (closedBall x (3 * x_1))... | [
" VitaliFamily ΞΌ",
" β (x : Ξ±),\n βαΆ (r : β) in π[>] 0, ΞΌ (closedBall x (3 * r)) β€ β(scalingConstantOf ΞΌ (max (4 * K + 3) 3)) * ΞΌ (closedBall x r)",
" βαΆ (r : β) in π[>] 0, ΞΌ (closedBall x (3 * r)) β€ β(scalingConstantOf ΞΌ (max (4 * K + 3) 3)) * ΞΌ (closedBall x r)",
" β x_1 β U, ΞΌ (closedBall x (3 * x_1))... |
import Mathlib.Order.Filter.SmallSets
import Mathlib.Tactic.Monotonicity
import Mathlib.Topology.Compactness.Compact
import Mathlib.Topology.NhdsSet
import Mathlib.Algebra.Group.Defs
#align_import topology.uniform_space.basic from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c"
open Set F... | Mathlib/Topology/UniformSpace/Basic.lean | 199 | 202 | theorem subset_iterate_compRel {s t : Set (Ξ± Γ Ξ±)} (h : idRel β s) (n : β) :
t β (s β Β·)^[n] t := by |
induction' n with n ihn generalizing t
exacts [Subset.rfl, (right_subset_compRel h).trans ihn]
| [
" idRel β s β β (a : Ξ±), (a, a) β s",
" (a, b) β Prod.swap '' idRel β (a, b) β idRel",
" (a, b) β idRel β r β (a, b) β r",
" r β s β t = r β (s β t)",
" (a, b) β r β s β t β (a, b) β r β (s β t)",
" (β z, (β z_1, (a, z_1) β r β§ (z_1, z) β s) β§ (z, b) β t) β β z, (a, z) β r β§ β z_1, (z, z_1) β s β§ (z_1, b)... | [
" idRel β s β β (a : Ξ±), (a, a) β s",
" (a, b) β Prod.swap '' idRel β (a, b) β idRel",
" (a, b) β idRel β r β (a, b) β r",
" r β s β t = r β (s β t)",
" (a, b) β r β s β t β (a, b) β r β (s β t)",
" (β z, (β z_1, (a, z_1) β r β§ (z_1, z) β s) β§ (z, b) β t) β β z, (a, z) β r β§ β z_1, (z, z_1) β s β§ (z_1, b)... |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Data.Matrix.CharP
#align_import linear_algebra.matrix.charpoly.finite_field from "leanprover-community/mathlib"@"b95b8c7a484a298228805c72c142f6b062eb0d70"
noncomputable section
open Polynomial Matrix
open s... | Mathlib/LinearAlgebra/Matrix/Charpoly/FiniteField.lean | 47 | 50 | theorem ZMod.charpoly_pow_card {p : β} [Fact p.Prime] (M : Matrix n n (ZMod p)) :
(M ^ p).charpoly = M.charpoly := by |
have h := FiniteField.Matrix.charpoly_pow_card M
rwa [ZMod.card] at h
| [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (β(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (β(frobeni... | [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (β(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (β(frobeni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.