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.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Inverse
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputab... | Mathlib/Analysis/Calculus/ContDiff/Basic.lean | 126 | 132 | theorem iteratedFDerivWithin_succ_const (n : β) (c : F) (hs : UniqueDiffOn π s) (hx : x β s) :
iteratedFDerivWithin π (n + 1) (fun _ : E β¦ c) s x = 0 := by |
ext m
rw [iteratedFDerivWithin_succ_apply_right hs hx]
rw [iteratedFDerivWithin_congr (fun y hy β¦ fderivWithin_const_apply c (hs y hy)) hx]
rw [iteratedFDerivWithin_zero_fun hs hx]
simp [ContinuousMultilinearMap.zero_apply (R := π)]
| [
" iteratedFDerivWithin π i (fun x => 0) s x = 0",
" iteratedFDerivWithin π 0 (fun x => 0) s x = 0",
" (iteratedFDerivWithin π 0 (fun x => 0) s x) xβ = 0 xβ",
" iteratedFDerivWithin π (i + 1) (fun x => 0) s x = 0",
" (iteratedFDerivWithin π (i + 1) (fun x => 0) s x) m = 0 m",
" ((fderivWithin π (fun ... | [
" iteratedFDerivWithin π i (fun x => 0) s x = 0",
" iteratedFDerivWithin π 0 (fun x => 0) s x = 0",
" (iteratedFDerivWithin π 0 (fun x => 0) s x) xβ = 0 xβ",
" iteratedFDerivWithin π (i + 1) (fun x => 0) s x = 0",
" (iteratedFDerivWithin π (i + 1) (fun x => 0) s x) m = 0 m",
" ((fderivWithin π (fun ... |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
#align_import analysis.normed_space.conformal_linear_map from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
noncomputable section
open Function LinearIsometry ContinuousLinearMap
def IsConf... | Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean | 84 | 89 | theorem comp (hg : IsConformalMap g) (hf : IsConformalMap f) : IsConformalMap (g.comp f) := by |
rcases hf with β¨cf, hcf, lif, rflβ©
rcases hg with β¨cg, hcg, lig, rflβ©
refine β¨cg * cf, mul_ne_zero hcg hcf, lig.comp lif, ?_β©
rw [smul_comp, comp_smul, mul_smul]
rfl
| [
" ContinuousLinearMap.id R M = 1 β’ LinearIsometry.id.toContinuousLinearMap",
" IsConformalMap (c β’ f)",
" IsConformalMap (c β’ c' β’ li.toContinuousLinearMap)",
" β0 xβ = βxβ",
" IsConformalMap (g.comp f)",
" IsConformalMap (g.comp (cf β’ lif.toContinuousLinearMap))",
" IsConformalMap ((cg β’ lig.toContinuo... | [
" ContinuousLinearMap.id R M = 1 β’ LinearIsometry.id.toContinuousLinearMap",
" IsConformalMap (c β’ f)",
" IsConformalMap (c β’ c' β’ li.toContinuousLinearMap)",
" β0 xβ = βxβ"
] |
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.Separable
import Mathlib.FieldTheory.NormalClosure
import Mathlib.RingTheory.Polynomial.SeparableDegree
open scoped Classical Polynomial
open FiniteDimensional Polynomial Interm... | Mathlib/FieldTheory/SeparableDegree.lean | 168 | 172 | theorem finSepDegree_self : finSepDegree F F = 1 := by |
have : Cardinal.mk (Emb F F) = 1 := le_antisymm
(Cardinal.le_one_iff_subsingleton.2 AlgHom.subsingleton)
(Cardinal.one_le_iff_ne_zero.2 <| Cardinal.mk_ne_zero _)
rw [finSepDegree, Nat.card, this, Cardinal.one_toNat]
| [
" AlgebraicClosure K ββ[F] AlgebraicClosure E",
" Algebra.IsAlgebraic E K",
" β (x : K), IsAlgebraic E x",
" IsAlgebraic E x",
" AlgebraicClosure K ββ[E] AlgebraicClosure E",
" finSepDegree F F = 1"
] | [
" AlgebraicClosure K ββ[F] AlgebraicClosure E",
" Algebra.IsAlgebraic E K",
" β (x : K), IsAlgebraic E x",
" IsAlgebraic E x",
" AlgebraicClosure K ββ[E] AlgebraicClosure E"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.special_functions.pow.asymptotics from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
set_option linter.uppercaseLean3 false
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter C... | Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean | 132 | 137 | theorem tendsto_exp_div_rpow_atTop (s : β) : Tendsto (fun x : β => exp x / x ^ s) atTop atTop := by |
cases' archimedean_iff_nat_lt.1 Real.instArchimedean s with n hn
refine tendsto_atTop_mono' _ ?_ (tendsto_exp_div_pow_atTop n)
filter_upwards [eventually_gt_atTop (0 : β), eventually_ge_atTop (1 : β)] with x hxβ hxβ
rw [div_le_div_left (exp_pos _) (pow_pos hxβ _) (rpow_pos_of_pos hxβ _), β Real.rpow_natCast]
... | [
" Tendsto (fun x => x ^ y) atTop atTop",
" β (b : β), β i, β (a : β), i β€ a β b β€ a ^ y",
" β i, β (a : β), i β€ a β b β€ a ^ y",
" β (a : β), max b 0 ^ (1 / y) β€ a β b β€ a ^ y",
" b β€ x ^ y",
" max b ?m.800 β€ x ^ y",
" max b ?m.800 = (max b 0 ^ (1 / y)) ^ y",
" Tendsto (fun x => b ^ x) atTop (π 0)",
... | [
" Tendsto (fun x => x ^ y) atTop atTop",
" β (b : β), β i, β (a : β), i β€ a β b β€ a ^ y",
" β i, β (a : β), i β€ a β b β€ a ^ y",
" β (a : β), max b 0 ^ (1 / y) β€ a β b β€ a ^ y",
" b β€ x ^ y",
" max b ?m.800 β€ x ^ y",
" max b ?m.800 = (max b 0 ^ (1 / y)) ^ y",
" Tendsto (fun x => b ^ x) atTop (π 0)",
... |
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 | 89 | 91 | theorem cons_self_properDivisors (h : n β 0) :
cons n (properDivisors n) properDivisors.not_self_mem = divisors n := by |
rw [cons_eq_insert, insert_self_properDivisors h]
| [
" 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.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn
#align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Function Set Filter Metric
open scoped Topology Classical NNReal
n... | Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean | 86 | 96 | theorem map_nhds_eq_of_surj [CompleteSpace E] [CompleteSpace F] {f : E β F} {f' : E βL[π] F} {a : E}
(hf : HasStrictFDerivAt f (f' : E βL[π] F) a) (h : LinearMap.range f' = β€) :
map f (π a) = π (f a) := by |
let f'symm := f'.nonlinearRightInverseOfSurjective h
set c : ββ₯0 := f'symm.nnnormβ»ΒΉ / 2 with hc
have f'symm_pos : 0 < f'symm.nnnorm := f'.nonlinearRightInverseOfSurjective_nnnorm_pos h
have cpos : 0 < c := by simp [hc, half_pos, inv_pos, f'symm_pos]
obtain β¨s, s_nhds, hsβ© : β s β π a, ApproximatesLinearOn f... | [
" β s β π a, ApproximatesLinearOn f f' s c",
" βf x - f y - f' (x - y)β β€ βc * βx - yβ",
" map f (π a) = π (f a)",
" 0 < c",
" f'symm.nnnormβ»ΒΉ β 0"
] | [
" β s β π a, ApproximatesLinearOn f f' s c",
" βf x - f y - f' (x - y)β β€ βc * βx - yβ"
] |
import Mathlib.Algebra.Lie.BaseChange
import Mathlib.Algebra.Lie.Solvable
import Mathlib.Algebra.Lie.Quotient
import Mathlib.Algebra.Lie.Normalizer
import Mathlib.LinearAlgebra.Eigenspace.Basic
import Mathlib.Order.Filter.AtTopBot
import Mathlib.RingTheory.Artinian
import Mathlib.RingTheory.Nilpotent.Lemmas
import Mat... | Mathlib/Algebra/Lie/Nilpotent.lean | 493 | 496 | theorem ucs_eq_self_of_normalizer_eq_self (h : Nβ.normalizer = Nβ) (k : β) : Nβ.ucs k = Nβ := by |
induction' k with k ih
Β· simp
Β· rwa [ucs_succ, ih]
| [
" ucs k Nβ β€ ucs k Nβ",
" ucs 0 Nβ β€ ucs 0 Nβ",
" ucs (k + 1) Nβ β€ ucs (k + 1) Nβ",
" (ucs k Nβ).normalizer β€ (ucs k Nβ).normalizer",
" ucs k Nβ = Nβ",
" ucs 0 Nβ = Nβ",
" ucs (k + 1) Nβ = Nβ"
] | [
" ucs k Nβ β€ ucs k Nβ",
" ucs 0 Nβ β€ ucs 0 Nβ",
" ucs (k + 1) Nβ β€ ucs (k + 1) Nβ",
" (ucs k Nβ).normalizer β€ (ucs k Nβ).normalizer"
] |
import Mathlib.Data.Finset.Grade
import Mathlib.Order.Interval.Finset.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
variable {Ξ± Ξ² : Type*}
namespace Finset
section Decidable
variable [DecidableEq Ξ±] (s t : Finset Ξ±)
instance instLocally... | Mathlib/Data/Finset/Interval.lean | 101 | 106 | theorem card_Icc_finset (h : s β t) : (Icc s t).card = 2 ^ (t.card - s.card) := by |
rw [β card_sdiff h, β card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff]
rintro u hu v hv (huv : s β u = s β v)
rw [mem_coe, mem_powerset] at hu hv
rw [β (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, β
(disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, h... | [
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s β€ u β§ u β€ t",
" u β t β§ s β u β s β€ u β§ u β€ t",
" u β (fun s t => filter (fun x => s β x) t.ssubsets) s t β s β€ u β§ u < t",
" u β t β§ s β u β s β€ u β§ u < t",
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s < u β§ u β€ t",
" u β t β§ ... | [
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s β€ u β§ u β€ t",
" u β t β§ s β u β s β€ u β§ u β€ t",
" u β (fun s t => filter (fun x => s β x) t.ssubsets) s t β s β€ u β§ u < t",
" u β t β§ s β u β s β€ u β§ u < t",
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s < u β§ u β€ t",
" u β t β§ ... |
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Order.BigOperators.Group.List
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.WellFoundedSet
#align_import group_theory.submonoid.pointwise from "leanprover-community/mathlib"@"2bbc7e3884ba234309d2a43b19144105a753292e"
open Set P... | Mathlib/Algebra/Group/Submonoid/Pointwise.lean | 700 | 704 | theorem submonoid_closure (hpos : β x : Ξ±, x β s β 1 β€ x) (h : s.IsPWO) :
IsPWO (Submonoid.closure s : Set Ξ±) := by |
rw [Submonoid.closure_eq_image_prod]
refine (h.partiallyWellOrderedOn_sublistForallβ (Β· β€ Β·)).image_of_monotone_on ?_
exact fun l1 _ l2 hl2 h12 => h12.prod_le_prod' fun x hx => hpos x <| hl2 x hx
| [
" (β(closure s)).IsPWO",
" (List.prod '' {l | β x β l, x β s}).IsPWO",
" β aβ β {l | β x β l, x β s},\n β aβ β {l | β x β l, x β s}, List.SublistForallβ (fun x x_1 => x β€ x_1) aβ aβ β aβ.prod β€ aβ.prod"
] | [] |
import Mathlib.Data.Int.Interval
import Mathlib.RingTheory.Binomial
import Mathlib.RingTheory.HahnSeries.PowerSeries
import Mathlib.RingTheory.HahnSeries.Summable
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.Localization.FractionRing
#align_import ring_theory.laurent_series from "leanprov... | Mathlib/RingTheory/LaurentSeries.lean | 112 | 121 | theorem powerSeriesPart_eq_zero (x : LaurentSeries R) : x.powerSeriesPart = 0 β x = 0 := by |
constructor
Β· contrapose!
simp only [ne_eq]
intro h
rw [PowerSeries.ext_iff, not_forall]
refine β¨0, ?_β©
simp [coeff_order_ne_zero h]
Β· rintro rfl
simp
| [
" ((ofPowerSeries β€ R) x).coeff βn = (PowerSeries.coeff R n) x",
" powerSeriesPart 0 = 0",
" (PowerSeries.coeff R nβ) (powerSeriesPart 0) = (PowerSeries.coeff R nβ) 0",
" x.powerSeriesPart = 0 β x = 0",
" x.powerSeriesPart = 0 β x = 0",
" x β 0 β x.powerSeriesPart β 0",
" Β¬x = 0 β Β¬x.powerSeriesPart = 0... | [
" ((ofPowerSeries β€ R) x).coeff βn = (PowerSeries.coeff R n) x",
" powerSeriesPart 0 = 0",
" (PowerSeries.coeff R nβ) (powerSeriesPart 0) = (PowerSeries.coeff R nβ) 0"
] |
import Mathlib.MeasureTheory.Measure.MeasureSpace
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
#align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal MeasureTheory
open Set Function Filter
namespace Measur... | Mathlib/MeasureTheory/Measure/OpenPos.lean | 97 | 100 | theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) :
F =α΅[ΞΌ] univ β F = univ := by |
refine β¨fun h β¦ ?_, fun h β¦ by rw [h]β©
rwa [ae_eq_univ, hF.isOpen_compl.measure_eq_zero_iff ΞΌ, compl_empty_iff] at h
| [
" ΞΌ U = 0 β U = β
",
" ΞΌ U = 0",
" U =αΆ [ae ΞΌ] β
β U = β
",
" F =αΆ [ae ΞΌ] univ β F = univ",
" F =αΆ [ae ΞΌ] univ",
" F = univ"
] | [
" ΞΌ U = 0 β U = β
",
" ΞΌ U = 0",
" U =αΆ [ae ΞΌ] β
β U = β
"
] |
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.Finite
#align_import field_theory.finiteness from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
universe u v
open scoped Classical
open Cardinal
... | Mathlib/FieldTheory/Finiteness.lean | 103 | 112 | theorem iff_fg : IsNoetherian K V β Module.Finite K V := by |
constructor
Β· intro h
exact
β¨β¨finsetBasisIndex K V, by
convert (finsetBasis K V).span_eq
simpβ©β©
Β· rintro β¨s, hsβ©
rw [IsNoetherian.iff_rank_lt_aleph0, β rank_top, β hs]
exact lt_of_le_of_lt (rank_span_le _) s.finite_toSet.lt_aleph0
| [
" IsNoetherian K V β Module.rank K V < β΅β",
" IsNoetherian K V β (Basis.ofVectorSpaceIndex K V).Finite",
" IsNoetherian K V β (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite β IsNoetherian K V",
" IsNoetherian K V",
" IsNoetherian... | [
" IsNoetherian K V β Module.rank K V < β΅β",
" IsNoetherian K V β (Basis.ofVectorSpaceIndex K V).Finite",
" IsNoetherian K V β (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite β IsNoetherian K V",
" IsNoetherian K V",
" IsNoetherian... |
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 | 89 | 90 | theorem image_coe_Ioi : (some : Ξ± β WithTop Ξ±) '' Ioi a = Ioo (a : WithTop Ξ±) β€ := by |
rw [β preimage_coe_Ioi, image_preimage_eq_inter_range, range_coe, Ioi_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"
] |
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Analysis.Convex.Normed
open Metric Bornology Filter Set
open scoped NNReal Topology Pointwise
noncomputable section
section Module
variable {E : Type*} [AddCommGroup E] [Module β E]
def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β’ x
the... | Mathlib/Analysis/Convex/GaugeRescale.lean | 63 | 67 | theorem gauge_gaugeRescale (s : Set E) {t : Set E} (hta : Absorbent β t) (htb : IsVonNBounded β t)
(x : E) : gauge t (gaugeRescale s t x) = gauge s x := by |
rcases eq_or_ne x 0 with rfl | hx
Β· simp
Β· exact gauge_gaugeRescale' s ((gauge_pos hta htb).2 hx).ne'
| [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x",
" gauge t (gaugeRescale s t 0) = gauge s 0"
] | [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x"
] |
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.LinearAlgebra.AffineSpace.Basic
import Mathlib.LinearAlgebra.BilinearMap
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Prod
#align_import linear_algebra.affine_space.affine_map from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901... | Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean | 162 | 169 | theorem ext_linear {f g : P1 βα΅[k] P2} (hβ : f.linear = g.linear) {p : P1} (hβ : f p = g p) :
f = g := by |
ext q
have hgl : g.linear (q -α΅₯ p) = toFun g ((q -α΅₯ p) +α΅₯ q) -α΅₯ toFun g q := by simp
have := f.map_vadd' q (q -α΅₯ p)
rw [hβ, hgl, toFun_eq_coe, map_vadd, linearMap_vsub, hβ] at this
simp at this
exact this
| [
" { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }",
" f_linear v = g_linear v",
" f_linear v +α΅₯ f p = g_linear v +α΅₯ f p",
" f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2",
"k : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Typ... | [
" { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }",
" f_linear v = g_linear v",
" f_linear v +α΅₯ f p = g_linear v +α΅₯ f p",
" f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2",
"k : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Typ... |
import Mathlib.Data.List.Duplicate
import Mathlib.Data.List.Sort
#align_import data.list.nodup_equiv_fin from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace List
variable {Ξ± : Type*}
section Sublist
| Mathlib/Data/List/NodupEquivFin.lean | 116 | 137 | theorem sublist_of_orderEmbedding_get?_eq {l l' : List Ξ±} (f : β βͺo β)
(hf : β ix : β, l.get? ix = l'.get? (f ix)) : l <+ l' := by |
induction' l with hd tl IH generalizing l' f
Β· simp
have : some hd = _ := hf 0
rw [eq_comm, List.get?_eq_some] at this
obtain β¨w, hβ© := this
let f' : β βͺo β :=
OrderEmbedding.ofMapLEIff (fun i => f (i + 1) - (f 0 + 1)) fun a b => by
dsimp only
rw [Nat.sub_le_sub_iff_right, OrderEmbedding.le... | [
" l <+ l'",
" [] <+ l'",
" hd :: tl <+ l'",
" (fun i => f (i + 1) - (f 0 + 1)) a β€ (fun i => f (i + 1) - (f 0 + 1)) b β a β€ b",
" f (a + 1) - (f 0 + 1) β€ f (b + 1) - (f 0 + 1) β a β€ b",
" f 0 + 1 β€ f (b + 1)",
" 0 < b + 1",
" β (ix : β), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)",
" tl.get? ix =... | [] |
import Mathlib.Algebra.FreeMonoid.Basic
import Mathlib.Algebra.Group.Submonoid.MulOpposite
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Int.Order.Lemmas
#align_import group_theory.submonoid.membership fro... | Mathlib/Algebra/Group/Submonoid/Membership.lean | 234 | 236 | theorem mem_sup_left {S T : Submonoid M} : β {x : M}, x β S β x β S β T := by |
rw [β SetLike.le_def]
exact le_sup_left
| [
" x β β¨ i, S i β β i, x β S i",
" x β β¨ i, S i β β i, x β S i",
" x β closure (β i, β(S i)) β β i, x β S i",
" β i, 1 β S i",
" β (x y : M), (β i, x β S i) β (β i, y β S i) β β i, x * y β S i",
" β i, x * y β S i",
" x β β(β¨ i, S i) β x β β i, β(S i)",
" x β sSup S β β s β S, x β s",
" x β β(sSup S)... | [
" x β β¨ i, S i β β i, x β S i",
" x β β¨ i, S i β β i, x β S i",
" x β closure (β i, β(S i)) β β i, x β S i",
" β i, 1 β S i",
" β (x y : M), (β i, x β S i) β (β i, y β S i) β β i, x * y β S i",
" β i, x * y β S i",
" x β β(β¨ i, S i) β x β β i, β(S i)",
" x β sSup S β β s β S, x β s",
" x β β(sSup S)... |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ Ξ½β Ξ½β: Measure Ξ±}
{s t : Set Ξ±}
section IsFinit... | Mathlib/MeasureTheory/Measure/Typeclasses.lean | 132 | 139 | theorem Measure.isFiniteMeasure_map {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ]
(f : Ξ± β Ξ²) : IsFiniteMeasure (ΞΌ.map f) := by |
by_cases hf : AEMeasurable f ΞΌ
Β· constructor
rw [map_apply_of_aemeasurable hf MeasurableSet.univ]
exact measure_lt_top ΞΌ _
Β· rw [map_of_not_aemeasurable hf]
exact MeasureTheory.isFiniteMeasureZero
| [
" Β¬IsFiniteMeasure ΞΌ β ΞΌ univ = β€",
" ΞΌ univ = β€",
" False",
" (ΞΌ.restrict s) univ < β€",
" ΞΌ tαΆ β€ ΞΌ sαΆ + Ξ΅",
" ΞΌ univ β€ ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t",
" ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) = ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t",
" 0 univ < β€",
" IsFiniteMeasure ΞΌ",
" IsFiniteMeasure 0",
" (ΞΌ + Ξ½) univ < β€",
" ΞΌ univ < β€ β§ ... | [
" Β¬IsFiniteMeasure ΞΌ β ΞΌ univ = β€",
" ΞΌ univ = β€",
" False",
" (ΞΌ.restrict s) univ < β€",
" ΞΌ tαΆ β€ ΞΌ sαΆ + Ξ΅",
" ΞΌ univ β€ ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t",
" ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) = ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t",
" 0 univ < β€",
" IsFiniteMeasure ΞΌ",
" IsFiniteMeasure 0",
" (ΞΌ + Ξ½) univ < β€",
" ΞΌ univ < β€ β§ ... |
import Mathlib.Topology.Constructions
import Mathlib.Topology.ContinuousOn
#align_import topology.bases from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology
noncomputable section
namespace TopologicalSpace
universe u
variable {Ξ± : Type u} {Ξ² : Type*} ... | Mathlib/Topology/Bases.lean | 77 | 90 | theorem IsTopologicalBasis.insert_empty {s : Set (Set Ξ±)} (h : IsTopologicalBasis s) :
IsTopologicalBasis (insert β
s) := by |
refine β¨?_, by rw [sUnion_insert, empty_union, h.sUnion_eq], ?_β©
Β· rintro tβ (rfl | hβ) tβ (rfl | hβ) x β¨hxβ, hxββ©
Β· cases hxβ
Β· cases hxβ
Β· cases hxβ
Β· obtain β¨tβ, hβ, hsβ© := h.exists_subset_inter _ hβ _ hβ x β¨hxβ, hxββ©
exact β¨tβ, .inr hβ, hsβ©
Β· rw [h.eq_generateFrom]
refine le_antisym... | [
" IsTopologicalBasis (insert β
s)",
" ββ insert β
s = univ",
" β tβ β insert β
s, β tβ β insert β
s, β x β tβ β© tβ, β tβ β insert β
s, x β tβ β§ tβ β tβ β© tβ",
" β tβ β insert β
s, x β tβ β§ tβ β β
β© β
",
" β tβ β insert β
s, x β tβ β§ tβ β β
β© tβ",
" β tβ β insert β
s, x β tβ β§ tβ β tβ β© β
",
" β tβ β inser... | [] |
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 | 86 | 89 | theorem exists_lt_of_gauge_lt (absorbs : Absorbent β s) (h : gauge s x < a) :
β b, 0 < b β§ b < a β§ x β b β’ s := by |
obtain β¨b, β¨hb, hxβ©, hbaβ© := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact β¨b, hb, hba, hxβ©
| [
" 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 x = sInf {r | r β Ioi 0 β§ rβ»ΒΉ β’ x β s}",
" 0 < r β§ x β r β’ s β r β Ioi 0 β§ rβ»ΒΉ β’ x β s"
] |
import Mathlib.Data.List.Join
#align_import data.list.permutation from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734"
-- Make sure we don't import algebra
assert_not_exists Monoid
open Nat
variable {Ξ± Ξ² : Type*}
namespace List
theorem permutationsAux2_fst (t : Ξ±) (ts : List Ξ±) (r : L... | Mathlib/Data/List/Permutation.lean | 83 | 87 | theorem permutationsAux2_comp_append {t : Ξ±} {ts ys : List Ξ±} {r : List Ξ²} (f : List Ξ± β Ξ²) :
((permutationsAux2 t [] r ys) fun x => f (x ++ ts)).2 = (permutationsAux2 t ts r ys f).2 := by |
induction' ys with ys_hd _ ys_ih generalizing f
Β· simp
Β· simp [ys_ih fun xs => f (ys_hd :: xs)]
| [
" (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts",
" (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2",
" (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2",
" (permutationsAux2 t ts [] [] f).2 ++ r = (permu... | [
" (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts",
" (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2",
" (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2",
" (permutationsAux2 t ts [] [] f).2 ++ r = (permu... |
import Mathlib.Data.Set.Image
#align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780"
open Function
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β Ξ± β Prop)
local infixl:50 " βΌ " => r
def Directed (f : ΞΉ β Ξ±) :=
β x y, β z, ... | Mathlib/Order/Directed.lean | 66 | 67 | theorem directedOn_range {f : ΞΉ β Ξ±} : Directed r f β DirectedOn r (Set.range f) := by |
simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff]
| [
" DirectedOn r s β Directed r Subtype.val",
" (β x β s, β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1 β s, β a_2, r a a_2 β§ a_2 β s β§ r a_1 a_2",
" (β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1, r x a_1 β§ a_1 β s β§ r a a_1",
" Directed r f β DirectedOn r (Set.range f)"
] | [
" DirectedOn r s β Directed r Subtype.val",
" (β x β s, β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1 β s, β a_2, r a a_2 β§ a_2 β s β§ r a_1 a_2",
" (β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1, r x a_1 β§ a_1 β s β§ r a a_1"
] |
import Mathlib.Probability.ProbabilityMassFunction.Monad
#align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d"
universe u
namespace PMF
noncomputable section
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped Classical
open NNReal ENN... | Mathlib/Probability/ProbabilityMassFunction/Constructions.lean | 60 | 60 | theorem mem_support_map_iff : b β (map f p).support β β a β p.support, f a = b := by | simp
| [
" (map f p) b = β' (a : Ξ±), if b = f a then p a else 0",
" b β (map f p).support β b β f '' p.support",
" b β (map f p).support β β a β p.support, f a = b"
] | [
" (map f p) b = β' (a : Ξ±), if b = f a then p a else 0",
" b β (map f p).support β b β f '' p.support"
] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.Perm.Cycle.Type
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Tactic.IntervalCases
#align_import group_theory.p_gr... | Mathlib/GroupTheory/PGroup.lean | 123 | 124 | theorem powEquiv_symm_apply {n : β} (hn : p.Coprime n) (g : G) :
(hG.powEquiv hn).symm g = g ^ (orderOf g).gcdB n := by | rw [β Nat.card_zpowers]; rfl
| [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card β₯β₯ = p ^ ?m.2806",
" IsPGroup p G β β n, card G = p ^ n",
" β n, card G = p ^ n",
" card G = p ^ (card G).factors.length",
" β q β (card G).factors, q = p",
" q = p",
" IsPGroup p H",
" β (g : H), β k, Ο g ^ p ^ k = 1",
" h ^ p ^ k = 1",
" (hG.powEqui... | [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card β₯β₯ = p ^ ?m.2806",
" IsPGroup p G β β n, card G = p ^ n",
" β n, card G = p ^ n",
" card G = p ^ (card G).factors.length",
" β q β (card G).factors, q = p",
" q = p",
" IsPGroup p H",
" β (g : H), β k, Ο g ^ p ^ k = 1",
" h ^ p ^ k = 1"
] |
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Analysis.Convex.Normed
open Metric Bornology Filter Set
open scoped NNReal Topology Pointwise
noncomputable section
section Module
variable {E : Type*} [AddCommGroup E] [Module β E]
def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β’ x
the... | Mathlib/Analysis/Convex/GaugeRescale.lean | 69 | 73 | theorem gauge_gaugeRescale_le (s t : Set E) (x : E) :
gauge t (gaugeRescale s t x) β€ gauge s x := by |
by_cases hx : gauge t x = 0
Β· simp [gaugeRescale, hx, gauge_nonneg]
Β· exact (gauge_gaugeRescale' s hx).le
| [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x",
" gauge t (gaugeRescale s t 0) = gauge s 0",
" ga... | [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x",
" gauge t (gaugeRescale s t 0) = gauge s 0"
] |
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 | 92 | 100 | theorem IsCut.congr [IsCut cmp cut] [TransCmp cmp] (H : cmp x y = .eq) : cut x = cut y := by |
cases ey : cut y
Β· exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans <| OrientedCmp.cmp_eq_gt.1 h) ey
Β· cases ex : cut x
Β· exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans h) ex |>.symm.trans ey
Β· rfl
Β· refine IsCut.le_gt_trans (cmp := cmp) (fun h => ?_) ex |>.symm.trans ey
cases H.s... | [
" t.reverse.min? = t.max?",
" t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?",
" nil.reverse.min? = none",
" (node cβ lβ vβ nil).reverse.min? = some vβ",
" (node cβ lβ vβ rβ).reverse.min? = rβ.max?",
" (node cβ rβ.reverse vβ lβ.reverse).... | [
" t.reverse.min? = t.max?",
" t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?",
" nil.reverse.min? = none",
" (node cβ lβ vβ nil).reverse.min? = some vβ",
" (node cβ lβ vβ rβ).reverse.min? = rβ.max?",
" (node cβ rβ.reverse vβ lβ.reverse).... |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {Ξ± Ξ² A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
... | Mathlib/Algebra/Group/Support.lean | 127 | 129 | theorem disjoint_mulSupport_iff {f : Ξ± β M} {s : Set Ξ±} :
Disjoint s (mulSupport f) β EqOn f 1 s := by |
rw [disjoint_comm, mulSupport_disjoint_iff]
| [
" mulSupport f = s β (β x β s, f x β 1) β§ β x β s, f x = 1",
" f x = g x",
" mulSupport (update f x y) = insert x (mulSupport f)",
" a β mulSupport (update f x y) β a β insert x (mulSupport f)",
" a β mulSupport (update f a y) β a β insert a (mulSupport f)",
" mulSupport (update f x 1) = mulSupport f \\ {... | [
" mulSupport f = s β (β x β s, f x β 1) β§ β x β s, f x = 1",
" f x = g x",
" mulSupport (update f x y) = insert x (mulSupport f)",
" a β mulSupport (update f x y) β a β insert x (mulSupport f)",
" a β mulSupport (update f a y) β a β insert a (mulSupport f)",
" mulSupport (update f x 1) = mulSupport f \\ {... |
import Mathlib.Tactic.CategoryTheory.Elementwise
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryTheory.Limits.Constructions.EpiMono
import Mathlib.CategoryTheory.Limits.Preserves.Limits
import Mathlib.CategoryTheory.Limits.Shapes.Types
#align_import category_theory.glue_data from "l... | Mathlib/CategoryTheory/GlueData.lean | 93 | 95 | theorem t'_iji (i j : D.J) : D.t' i j i = pullback.fst β« D.t i j β« inv pullback.snd := by |
rw [β Category.assoc, β D.t_fac]
simp
| [
" D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom",
" D.t' j i i = pullback.fst β« D.t j i β« inv pullback.snd",
" D.t' j i i = (D.t' j i i β« pullback.snd) β« inv pullback.snd",
" D.t' i j i = pullback.fst β« D.t i j β« inv pullback.snd",
" D.t' i j i = (D.t' i j i β« pullback.snd) β« inv pullback.snd"
] | [
" D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom",
" D.t' j i i = pullback.fst β« D.t j i β« inv pullback.snd",
" D.t' j i i = (D.t' j i i β« pullback.snd) β« inv pullback.snd"
] |
import Mathlib.FieldTheory.RatFunc.Defs
import Mathlib.RingTheory.EuclideanDomain
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Polynomial.Content
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
universe u v
noncompu... | Mathlib/FieldTheory/RatFunc/Basic.lean | 117 | 118 | theorem ofFractionRing_neg (p : FractionRing K[X]) :
ofFractionRing (-p) = -ofFractionRing p := by | simp only [Neg.neg, RatFunc.neg]
| [
" { toFractionRing := 0 } = 0",
" { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }",
" { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }",
" { toFractionRing := -p } = -{ toFractionRing := p }"
] | [
" { toFractionRing := 0 } = 0",
" { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }",
" { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }"
] |
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset
import Mathlib.Data.Finite.Card
import Mathlib.GroupTheory.Finiteness
import Mathlib.GroupTheory.GroupAction.Quotient
#align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Subgroup
open Ca... | Mathlib/GroupTheory/Index.lean | 126 | 129 | theorem relindex_mul_relindex (hHK : H β€ K) (hKL : K β€ L) :
H.relindex K * K.relindex L = H.relindex L := by |
rw [β relindex_subgroupOf hKL]
exact relindex_mul_index fun x hx => hHK hx
| [
" (comap f H).index = H.index",
" β (x y : G'), Setoid.r x y β Setoid.r (f x) (f y)",
" β (x y : G'), xβ»ΒΉ * y β comap f H β (f x)β»ΒΉ * f y β H",
" f (xβ»ΒΉ * y) = (f x)β»ΒΉ * f y",
" Function.Injective (Quotient.map' βf β―)",
" β β¦aβ : G' β§Έ comap f Hβ¦, Quotient.map' βf β― (Quotient.mk'' x) = Quotient.map' βf β― a... | [
" (comap f H).index = H.index",
" β (x y : G'), Setoid.r x y β Setoid.r (f x) (f y)",
" β (x y : G'), xβ»ΒΉ * y β comap f H β (f x)β»ΒΉ * f y β H",
" f (xβ»ΒΉ * y) = (f x)β»ΒΉ * f y",
" Function.Injective (Quotient.map' βf β―)",
" β β¦aβ : G' β§Έ comap f Hβ¦, Quotient.map' βf β― (Quotient.mk'' x) = Quotient.map' βf β― a... |
import Mathlib.Data.Fintype.List
#align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49"
assert_not_exists MonoidWithZero
namespace List
variable {Ξ± : Type*} [DecidableEq Ξ±]
def nextOr : β (_ : List Ξ±) (_ _ : Ξ±), Ξ±
| [], _, default => default
| [_], _, d... | Mathlib/Data/List/Cycle.lean | 76 | 84 | theorem mem_of_nextOr_ne {xs : List Ξ±} {x d : Ξ±} (h : nextOr xs x d β d) : x β xs := by |
induction' xs with y ys IH
Β· simp at h
cases' ys with z zs
Β· simp at h
Β· by_cases hx : x = y
Β· simp [hx]
Β· rw [nextOr_cons_of_ne _ _ _ _ hx] at h
simpa [hx] using IH h
| [
" (y :: xs).nextOr x d = xs.nextOr x d",
" [y].nextOr x d = [].nextOr x d",
" (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d",
" xs.nextOr x d = xs.nextOr x d'",
" [].nextOr x d = [].nextOr x d'",
" (y :: ys).nextOr x d = (y :: ys).nextOr x d'",
" [y].nextOr x d = [y].nextOr x d'",
" (y :: z :: zs).... | [
" (y :: xs).nextOr x d = xs.nextOr x d",
" [y].nextOr x d = [].nextOr x d",
" (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d",
" xs.nextOr x d = xs.nextOr x d'",
" [].nextOr x d = [].nextOr x d'",
" (y :: ys).nextOr x d = (y :: ys).nextOr x d'",
" [y].nextOr x d = [y].nextOr x d'",
" (y :: z :: zs).... |
import Mathlib.Data.ENat.Lattice
import Mathlib.Order.OrderIsoNat
import Mathlib.Tactic.TFAE
#align_import order.height from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
open List hiding le_antisymm
open OrderDual
universe u v
variable {Ξ± Ξ² : Type*}
namespace Set
section LT
varia... | Mathlib/Order/Height.lean | 93 | 106 | theorem exists_chain_of_le_chainHeight {n : β} (hn : βn β€ s.chainHeight) :
β l β s.subchain, length l = n := by |
rcases (le_top : s.chainHeight β€ β€).eq_or_lt with ha | ha <;>
rw [chainHeight_eq_iSup_subtype] at ha
Β· obtain β¨_, β¨β¨l, hβ, hββ©, rflβ©, hββ© :=
not_bddAbove_iff'.mp (WithTop.iSup_coe_eq_top.1 ha) n
exact β¨l.take n, β¨hβ.take _, fun x h β¦ hβ _ <| take_subset _ _ hβ©,
(l.length_take n).trans <| min_eq... | [
" a :: l β s.subchain β a β s β§ l β s.subchain β§ β b β l.head?, a < b",
" [a] β s.subchain β a β s",
" β l β s.subchain, l.length = n",
" n β€ l.length"
] | [
" a :: l β s.subchain β a β s β§ l β s.subchain β§ β b β l.head?, a < b",
" [a] β s.subchain β a β s"
] |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.SetTheory.Cardinal.Cofinality
#align_import linear_algebra.basis from "leanprover-communit... | Mathlib/LinearAlgebra/Basis.lean | 149 | 150 | theorem repr_self_apply (j) [Decidable (i = j)] : b.repr (b i) j = if i = j then 1 else 0 := by |
rw [repr_self, Finsupp.single_apply]
| [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... | [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FieldSimp
import Mathlib.Data.Int.NatPrime
import Mathlib.Data.ZMod.Basic
#align_import number_theory.pythagorean_tri... | Mathlib/NumberTheory/PythagoreanTriples.lean | 54 | 56 | theorem pythagoreanTriple_comm {x y z : β€} : PythagoreanTriple x y z β PythagoreanTriple y x z := by |
delta PythagoreanTriple
rw [add_comm]
| [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2",
" PythagoreanTriple x y z β PythagoreanTriple y x z",
" x * x + y * y = z * z β y * y + x * x = z * z"
] | [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2"
] |
import Mathlib.Data.List.OfFn
import Mathlib.Data.List.Range
#align_import data.list.indexes from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
assert_not_exists MonoidWithZero
universe u v
open Function
namespace List
variable {Ξ± : Type u} {Ξ² : Type v}
section MapIdx
-- Porting n... | Mathlib/Data/List/Indexes.lean | 141 | 147 | theorem mapIdx_append_one : β (f : β β Ξ± β Ξ²) (l : List Ξ±) (e : Ξ±),
mapIdx f (l ++ [e]) = mapIdx f l ++ [f l.length e] := by |
intros f l e
unfold mapIdx
rw [mapIdxGo_append f l [e]]
simp only [mapIdx.go, Array.size_toArray, mapIdxGo_length, length_nil, Nat.add_zero,
Array.toList_eq, Array.push_data, Array.data_toArray]
| [
" List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l",
" List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ... | [
" List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l",
" List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ... |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac"
noncomputable section
universe vβ vβ uβ uβ
-- Porting note: ne... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean | 232 | 235 | theorem PreservesPushout.inr_iso_hom :
pushout.inr β« (PreservesPushout.iso G f g).hom = G.map pushout.inr := by |
delta PreservesPushout.iso
simp
| [
" G.map f β« G.map h = G.map g β« G.map k",
" β (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj\n ... | [
" G.map f β« G.map h = G.map g β« G.map k",
" β (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj\n ... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FieldSimp
import Mathlib.Data.Int.NatPrime
import Mathlib.Data.ZMod.Basic
#align_import number_theory.pythagorean_tri... | Mathlib/NumberTheory/PythagoreanTriples.lean | 60 | 61 | theorem PythagoreanTriple.zero : PythagoreanTriple 0 0 0 := by |
simp only [PythagoreanTriple, zero_mul, zero_add]
| [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2",
" PythagoreanTriple x y z β PythagoreanTriple y x z",
" x * x + y * y = z * z β y * y + x * x = z * z",
" PythagoreanTriple ... | [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2",
" PythagoreanTriple x y z β PythagoreanTriple y x z",
" x * x + y * y = z * z β y * y + x * x = z * z"
] |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.RingTheory.AlgebraTower
import Mathlib.Algebra.Algebra.Subalgebra.Tower
#align_import linear_algebra.matrix.to_lin from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6"
... | Mathlib/LinearAlgebra/Matrix/ToLin.lean | 102 | 110 | theorem range_vecMulLinear (M : Matrix m n R) :
LinearMap.range M.vecMulLinear = span R (range M) := by |
letI := Classical.decEq m
simp_rw [range_eq_map, β iSup_range_stdBasis, Submodule.map_iSup, range_eq_map, β
Ideal.span_singleton_one, Ideal.span, Submodule.map_span, image_image, image_singleton,
Matrix.vecMulLinear_apply, iSup_span, range_eq_iUnion, iUnion_singleton_eq_range,
LinearMap.stdBasis, coe_s... | [
" ((LinearMap.stdBasis R (fun x => R) i) 1 α΅₯* M) j = M i j",
" β i' : m, (if i = i' then 1 else 0) * M i' j = M i j",
" β x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j",
" (LinearMap.stdBasis R (fun x => R) i) 1 xβ = if i = xβ then 1 else 0",
" (LinearMap.stdBasis R (fun x => R) i) 1 xβ =... | [
" ((LinearMap.stdBasis R (fun x => R) i) 1 α΅₯* M) j = M i j",
" β i' : m, (if i = i' then 1 else 0) * M i' j = M i j",
" β x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j",
" (LinearMap.stdBasis R (fun x => R) i) 1 xβ = if i = xβ then 1 else 0",
" (LinearMap.stdBasis R (fun x => R) i) 1 xβ =... |
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.measure.haar.inner_product_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open FiniteDimensional MeasureTheory MeasureTheory.Measure Set
var... | Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean | 61 | 66 | theorem OrthonormalBasis.volume_parallelepiped (b : OrthonormalBasis ΞΉ β F) :
volume (parallelepiped b) = 1 := by |
haveI : Fact (finrank β F = finrank β F) := β¨rflβ©
let o := (stdOrthonormalBasis β F).toBasis.orientation
rw [β o.measure_eq_volume]
exact o.measure_orthonormalBasis b
| [
" o.volumeForm.measure (parallelepiped βb) = 1",
" ΞΉ β Fin n",
" Fintype.card ΞΉ = n",
" βb = β(b.reindex e) β βe",
" b x = (β(b.reindex e) β βe) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis β F).toBasis.parallelepiped = volume",
" volume (parallelepiped βb) = 1"
] | [
" o.volumeForm.measure (parallelepiped βb) = 1",
" ΞΉ β Fin n",
" Fintype.card ΞΉ = n",
" βb = β(b.reindex e) β βe",
" b x = (β(b.reindex e) β βe) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis β F).toBasis.parallelepiped = volume"
] |
import Mathlib.Data.Countable.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Order.Disjointed
import Mathlib.MeasureTheory.OuterMeasure.Defs
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set F... | Mathlib/MeasureTheory/OuterMeasure/Basic.lean | 96 | 100 | theorem measure_diff_null (ht : ΞΌ t = 0) : ΞΌ (s \ t) = ΞΌ s :=
(measure_mono diff_subset).antisymm <| calc
ΞΌ s β€ ΞΌ (s β© t) + ΞΌ (s \ t) := measure_le_inter_add_diff _ _ _
_ β€ ΞΌ t + ΞΌ (s \ t) := by | gcongr; apply inter_subset_right
_ = ΞΌ (s \ t) := by simp [ht]
| [
" ΞΌ (β i, s i) β€ β' (i : ΞΉ), ΞΌ (s i)",
" (fun x x_1 => x β€ x_1) (ΞΌ (β¨ i, t i)) (β' (i : β), ΞΌ (t i))",
" ΞΌ (β i, t i) = ΞΌ (β i, disjointed t i)",
" β' (i : β), ΞΌ (disjointed t i) β€ β' (i : β), ΞΌ (t i)",
" disjointed t aβ β t aβ",
" ΞΌ (β i β I, s i) β€ β' (i : βI), ΞΌ (s βi)",
" ΞΌ (β x, s βx) β€ β' (i : βI)... | [
" ΞΌ (β i, s i) β€ β' (i : ΞΉ), ΞΌ (s i)",
" (fun x x_1 => x β€ x_1) (ΞΌ (β¨ i, t i)) (β' (i : β), ΞΌ (t i))",
" ΞΌ (β i, t i) = ΞΌ (β i, disjointed t i)",
" β' (i : β), ΞΌ (disjointed t i) β€ β' (i : β), ΞΌ (t i)",
" disjointed t aβ β t aβ",
" ΞΌ (β i β I, s i) β€ β' (i : βI), ΞΌ (s βi)",
" ΞΌ (β x, s βx) β€ β' (i : βI)... |
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Tactic.GCongr
#align_import order.filter.archimedean from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
variable {Ξ± R : Type*}
open Filter Set Function
@[simp]
theorem Nat.comap_cast_atTop [S... | Mathlib/Order/Filter/Archimedean.lean | 100 | 102 | theorem Filter.Eventually.intCast_atBot [StrictOrderedRing R] [Archimedean R] {p : R β Prop}
(h : βαΆ (x:R) in atBot, p x) : βαΆ (n:β€) in atBot, p n := by |
rw [β Int.comap_cast_atBot (R := R)]; exact h.comap _
| [
" β(-βn) β€ r",
" Tendsto (fun n => β(f n)) l atTop β Tendsto f l atTop",
" Tendsto (fun n => β(f n)) l atTop β Tendsto (Int.cast β f) l atTop",
" Tendsto (fun n => β(f n)) l atBot β Tendsto f l atBot",
" Tendsto (fun n => β(f n)) l atBot β Tendsto (Int.cast β f) l atBot",
" βαΆ (n : β€) in atTop, p βn",
"... | [
" β(-βn) β€ r",
" Tendsto (fun n => β(f n)) l atTop β Tendsto f l atTop",
" Tendsto (fun n => β(f n)) l atTop β Tendsto (Int.cast β f) l atTop",
" Tendsto (fun n => β(f n)) l atBot β Tendsto f l atBot",
" Tendsto (fun n => β(f n)) l atBot β Tendsto (Int.cast β f) l atBot",
" βαΆ (n : β€) in atTop, p βn",
"... |
import Mathlib.Data.Fintype.List
#align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49"
assert_not_exists MonoidWithZero
open List
def Cycle (Ξ± : Type*) : Type _ :=
Quotient (IsRotated.setoid Ξ±)
#align cycle Cycle
namespace Cycle
variable {Ξ± : Type*}
--... | Mathlib/Data/List/Cycle.lean | 601 | 602 | theorem subsingleton_reverse_iff {s : Cycle Ξ±} : s.reverse.Subsingleton β s.Subsingleton := by |
simp [length_subsingleton_iff]
| [
" (a :: l).rotate 1 = l ++ [a]",
" C (Quotient.mk'' l)",
" C (Quotient.mk'' [])",
" β (head : Ξ±) (tail : List Ξ±), C (Quotient.mk'' tail) β C (Quotient.mk'' (head :: tail))",
" β (head : Ξ±) (tail : List Ξ±), C βtail β C β(head :: tail)",
" (reverse (Quot.mk Setoid.r xβ)).reverse = Quot.mk Setoid.r xβ",
" ... | [
" (a :: l).rotate 1 = l ++ [a]",
" C (Quotient.mk'' l)",
" C (Quotient.mk'' [])",
" β (head : Ξ±) (tail : List Ξ±), C (Quotient.mk'' tail) β C (Quotient.mk'' (head :: tail))",
" β (head : Ξ±) (tail : List Ξ±), C βtail β C β(head :: tail)",
" (reverse (Quot.mk Setoid.r xβ)).reverse = Quot.mk Setoid.r xβ"
] |
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Group.TypeTags
import Mathlib.Algebra.Ring.Hom.Defs
import Mathlib.Algebra.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
assert_not_e... | Mathlib/Data/Nat/Cast/Basic.lean | 159 | 164 | theorem ext_nat'' [MonoidWithZeroHomClass F β A] (f g : F) (h_pos : β {n : β}, 0 < n β f n = g n) :
f = g := by |
apply DFunLike.ext
rintro (_ | n)
Β· simp [map_zero f, map_zero g]
Β· exact h_pos n.succ_pos
| [
" f = g",
" β (x : β), f x = g x",
" f 0 = g 0",
" f (n + 1) = g (n + 1)"
] | [] |
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 | 95 | 97 | theorem trinomial_leadingCoeff (hkm : k < m) (hmn : m < n) (hw : w β 0) :
(trinomial k m n u v w).leadingCoeff = w := by |
rw [leadingCoeff, trinomial_natDegree hkm hmn hw, trinomial_leading_coeff' hkm hmn]
| [
" (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 k = u",
" (trinomial k m n u v w).natDegree = n",
" (trinomial k m n u v w).coeff n β 0",
" βi β€ βn",
" βi β€ βi",
" (trinomial k m n u v w).natTrailingDegree = k",
" (trinomial k m n u v w... | [
" (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 k = u",
" (trinomial k m n u v w).natDegree = n",
" (trinomial k m n u v w).coeff n β 0",
" βi β€ βn",
" βi β€ βi",
" (trinomial k m n u v w).natTrailingDegree = k",
" (trinomial k m n u v w... |
import Mathlib.Analysis.Convex.Hull
#align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8"
open Set
variable {ΞΉ : Sort*} {π E : Type*}
section OrderedSemiring
variable (π) [OrderedSemiring π] [AddCommMonoid E] [Module π E] {s t sβ sβ tβ tβ u : Set ... | Mathlib/Analysis/Convex/Join.lean | 36 | 37 | theorem mem_convexJoin : x β convexJoin π s t β β a β s, β b β t, x β segment π a b := by |
simp [convexJoin]
| [
" x β convexJoin π s t β β a β s, β b β t, x β segment π a b"
] | [] |
import Mathlib.GroupTheory.QuotientGroup
#align_import algebra.char_zero.quotient from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46"
variable {R : Type*} [DivisionRing R] [CharZero R] {p : R}
namespace AddSubgroup
theorem zsmul_mem_zmultiples_iff_exists_sub_div {r : R} {z : β€} (hz :... | Mathlib/Algebra/CharZero/Quotient.lean | 42 | 47 | theorem nsmul_mem_zmultiples_iff_exists_sub_div {r : R} {n : β} (hn : n β 0) :
n β’ r β AddSubgroup.zmultiples p β
β k : Fin n, r - (k : β) β’ (p / n : R) β AddSubgroup.zmultiples p := by |
rw [β natCast_zsmul r, zsmul_mem_zmultiples_iff_exists_sub_div (Int.natCast_ne_zero.mpr hn),
Int.cast_natCast]
rfl
| [
" z β’ r β zmultiples p β β k, r - βk β’ (p / βz) β zmultiples p",
" (β k, k β’ p = z β’ r) β β k, r - βk β’ (p / βz) β zmultiples p",
" (β k, k β’ p = z β’ r) β β k k_1, k_1 β’ p + βk β’ p * (βz)β»ΒΉ = r",
"R : Type u_1\ninstβΒΉ : DivisionRing R\ninstβ : CharZero R\np r : R\nz : β€\nhz : z β 0\nhz' : βz β 0\n| β k k_1, k... | [
" z β’ r β zmultiples p β β k, r - βk β’ (p / βz) β zmultiples p",
" (β k, k β’ p = z β’ r) β β k, r - βk β’ (p / βz) β zmultiples p",
" (β k, k β’ p = z β’ r) β β k k_1, k_1 β’ p + βk β’ p * (βz)β»ΒΉ = r",
"R : Type u_1\ninstβΒΉ : DivisionRing R\ninstβ : CharZero R\np r : R\nz : β€\nhz : z β 0\nhz' : βz β 0\n| β k k_1, k... |
import Mathlib.Data.Set.Prod
import Mathlib.Logic.Equiv.Fin
import Mathlib.ModelTheory.LanguageMap
#align_import model_theory.syntax from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
universe u v w u' v'
namespace FirstOrder
namespace Language
variable (L : Language.{u, v}) {L' : L... | Mathlib/ModelTheory/Syntax.lean | 284 | 290 | theorem comp_onTerm {L'' : Language} (Ο : L' βα΄Έ L'') (Ο : L βα΄Έ L') :
((Ο.comp Ο).onTerm : L.Term Ξ± β L''.Term Ξ±) = Ο.onTerm β Ο.onTerm := by |
ext t
induction' t with _ _ _ _ ih
Β· rfl
Β· simp_rw [onTerm, ih]
rfl
| [
" (LHom.id L).onTerm = id",
" (LHom.id L).onTerm t = id t",
" (LHom.id L).onTerm (var aβ) = id (var aβ)",
" (LHom.id L).onTerm (func _fβ _tsβ) = id (func _fβ _tsβ)",
" (func ((LHom.id L).onFunction _fβ) fun i => id (_tsβ i)) = id (func _fβ _tsβ)",
" (Ο.comp Ο).onTerm = Ο.onTerm β Ο.onTerm",
" (Ο.comp Ο)... | [
" (LHom.id L).onTerm = id",
" (LHom.id L).onTerm t = id t",
" (LHom.id L).onTerm (var aβ) = id (var aβ)",
" (LHom.id L).onTerm (func _fβ _tsβ) = id (func _fβ _tsβ)",
" (func ((LHom.id L).onFunction _fβ) fun i => id (_tsβ i)) = id (func _fβ _tsβ)"
] |
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.Module.LocalizedModule
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import ring_theory.localization.module from "leanprover-community/mathlib"@"2e59a6de168f95d16b16d217b808a36290398c0a"
open nonZ... | Mathlib/RingTheory/Localization/Module.lean | 56 | 71 | theorem LinearIndependent.of_isLocalizedModule {ΞΉ : Type*} {v : ΞΉ β M}
(hv : LinearIndependent R v) : LinearIndependent Rβ (f β v) := by |
rw [linearIndependent_iff'] at hv β’
intro t g hg i hi
choose! a g' hg' using IsLocalization.exist_integer_multiples S t g
have h0 : f (β i β t, g' i β’ v i) = 0 := by
apply_fun ((a : R) β’ Β·) at hg
rw [smul_zero, Finset.smul_sum] at hg
rw [map_sum, β hg]
refine Finset.sum_congr rfl fun i hi => ?_... | [
" x β span Rβ (βf '' v)",
" f (m, s).1 β β(span R (βf '' v))",
" (βR f) (m, s).1 β β(map (βR f) β€)",
" LinearIndependent Rβ (βf β v)",
" β (s : Finset ΞΉ) (g : ΞΉ β Rβ), β i β s, g i β’ (βf β v) i = 0 β β i β s, g i = 0",
" g i = 0",
" f (β i β t, g' i β’ v i) = 0",
" β x β t, f (g' x β’ v x) = β x β t, βa... | [
" x β span Rβ (βf '' v)",
" f (m, s).1 β β(span R (βf '' v))",
" (βR f) (m, s).1 β β(map (βR f) β€)"
] |
import Mathlib.Algebra.DirectLimit
import Mathlib.Algebra.CharP.Algebra
import Mathlib.FieldTheory.IsAlgClosed.Basic
import Mathlib.FieldTheory.SplittingField.Construction
#align_import field_theory.is_alg_closed.algebraic_closure from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87"
univ... | Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean | 85 | 94 | theorem spanEval_ne_top : spanEval k β β€ := by |
rw [Ideal.ne_top_iff_one, spanEval, Ideal.span, β Set.image_univ,
Finsupp.mem_span_image_iff_total]
rintro β¨v, _, hvβ©
replace hv := congr_arg (toSplittingField k v.support) hv
rw [AlgHom.map_one, Finsupp.total_apply, Finsupp.sum, AlgHom.map_sum, Finset.sum_eq_zero] at hv
Β· exact zero_ne_one hv
intro j ... | [
" (toSplittingField k s) (evalXSelf k f) = 0",
" Polynomial.evalβ (algebraMap k (β x β s, βx).SplittingField)\n (rootOfSplits (algebraMap k (β x β s, βx).SplittingField) β― β―) βf =\n 0",
" spanEval k β β€",
" Β¬β l β Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible ... | [
" (toSplittingField k s) (evalXSelf k f) = 0",
" Polynomial.evalβ (algebraMap k (β x β s, βx).SplittingField)\n (rootOfSplits (algebraMap k (β x β s, βx).SplittingField) β― β―) βf =\n 0"
] |
import Mathlib.ModelTheory.FinitelyGenerated
import Mathlib.ModelTheory.DirectLimit
import Mathlib.ModelTheory.Bundled
#align_import model_theory.fraisse from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398"
universe u v w w'
open scoped FirstOrder
open Set CategoryTheory
namespace Fir... | Mathlib/ModelTheory/Fraisse.lean | 169 | 182 | theorem age.countable_quotient [h : Countable M] : (Quotient.mk' '' L.age M).Countable := by |
classical
refine (congr_arg _ (Set.ext <| Quotient.forall.2 fun N => ?_)).mp
(countable_range fun s : Finset M => β¦β¨closure L (s : Set M), inferInstanceβ©β§)
constructor
Β· rintro β¨s, hsβ©
use Bundled.of (closure L (s : Set M))
exact β¨β¨(fg_iff_structure_fg _).1 (fg_closure s.finite_toSet), β¨Substructur... | [
" (Quotient.mk' '' L.age M).Countable",
" (β¦Nβ§ β range fun s => β¦{ Ξ± := β₯((closure L).toFun βs), str := inferInstance }β§) β β¦Nβ§ β Quotient.mk' '' L.age M",
" (β¦Nβ§ β range fun s => β¦{ Ξ± := β₯((closure L).toFun βs), str := inferInstance }β§) β β¦Nβ§ β Quotient.mk' '' L.age M",
" β¦Nβ§ β Quotient.mk' '' L.age M",
" ... | [] |
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
import Mathlib.Analysis.Complex.CauchyIntegral
#align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Metric S... | Mathlib/Analysis/Complex/RemovableSingularity.lean | 34 | 43 | theorem analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt {f : β β E} {c : β}
(hd : βαΆ z in π[β ] c, DifferentiableAt β f z) (hc : ContinuousAt f c) : AnalyticAt β f c := by |
rcases (nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with β¨R, hR0, hRsβ©
lift R to ββ₯0 using hR0.le
replace hc : ContinuousOn f (closedBall c R) := by
refine fun z hz => ContinuousAt.continuousWithinAt ?_
rcases eq_or_ne z c with (rfl | hne)
exacts [hc, (hRs β¨hz, hneβ©).continuousAt]
exa... | [
" AnalyticAt β f c",
" ContinuousOn f (closedBall c βR)",
" ContinuousAt f z"
] | [] |
import Mathlib.AlgebraicTopology.DoldKan.Faces
import Mathlib.CategoryTheory.Idempotents.Basic
#align_import algebraic_topology.dold_kan.projections from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Pread... | Mathlib/AlgebraicTopology/DoldKan/Projections.lean | 100 | 101 | theorem Q_f_0_eq (q : β) : ((Q q).f 0 : X _[0] βΆ X _[0]) = 0 := by |
simp only [HomologicalComplex.sub_f_apply, HomologicalComplex.id_f, Q, P_f_0_eq, sub_self]
| [
" (P q).f 0 = π (K[X].X 0)",
" (P 0).f 0 = π (K[X].X 0)",
" (P (q + 1)).f 0 = π (K[X].X 0)",
" P q + Q q = π K[X]",
" P q + (π K[X] - P q) = π K[X]",
" Q (q + 1) = Q q - P q β« HΟ q",
" π K[X] - (P q + P q β« HΟ q) = π K[X] - P q - P q β« HΟ q",
" (Q q).f 0 = 0"
] | [
" (P q).f 0 = π (K[X].X 0)",
" (P 0).f 0 = π (K[X].X 0)",
" (P (q + 1)).f 0 = π (K[X].X 0)",
" P q + Q q = π K[X]",
" P q + (π K[X] - P q) = π K[X]",
" Q (q + 1) = Q q - P q β« HΟ q",
" π K[X] - (P q + P q β« HΟ q) = π K[X] - P q - P q β« HΟ q"
] |
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan
non... | Mathlib/AlgebraicTopology/DoldKan/Normalized.lean | 77 | 78 | theorem PInftyToNormalizedMooreComplex_comp_inclusionOfMooreComplexMap (X : SimplicialObject A) :
PInftyToNormalizedMooreComplex X β« inclusionOfMooreComplexMap X = PInfty := by | aesop_cat
| [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) β« X.Ξ΄ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow β« X.Ξ΄ j.succ = 0",
" j β Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... | [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) β« X.Ξ΄ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow β« X.Ξ΄ j.succ = 0",
" j β Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... |
import Mathlib.Dynamics.Flow
import Mathlib.Tactic.Monotonicity
#align_import dynamics.omega_limit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Function Filter Topology
section omegaLimit
variable {Ο : Type*} {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*}
def omegaLimit [Topol... | Mathlib/Dynamics/OmegaLimit.lean | 142 | 144 | theorem mem_omegaLimit_iff_frequentlyβ (y : Ξ²) :
y β Ο f Ο s β β n β π y, βαΆ t in f, (Ο t '' s β© n).Nonempty := by |
simp_rw [mem_omegaLimit_iff_frequently, image_inter_nonempty_iff]
| [
" Ο fβ (fun t x => Ο (m t) x) s β Ο fβ Ο s",
" closure (image2 (fun t x => Ο (m t) x) (m β»ΒΉ' u) s) β closure (image2 Ο u s)",
" closure (image2 Ο ((fun t => m t) '' (m β»ΒΉ' u)) s) β closure (image2 Ο u s)",
" MapsTo gb (Ο f Ο s) (Ο f Ο' s')",
" β β¦x : Ξ²β¦, (β i β f, x β closure (image2 Ο i s)) β β i β f, gb x... | [
" Ο fβ (fun t x => Ο (m t) x) s β Ο fβ Ο s",
" closure (image2 (fun t x => Ο (m t) x) (m β»ΒΉ' u) s) β closure (image2 Ο u s)",
" closure (image2 Ο ((fun t => m t) '' (m β»ΒΉ' u)) s) β closure (image2 Ο u s)",
" MapsTo gb (Ο f Ο s) (Ο f Ο' s')",
" β β¦x : Ξ²β¦, (β i β f, x β closure (image2 Ο i s)) β β i β f, gb x... |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 90 | 101 | theorem cos_eq_cos_iff {x y : β} : cos x = cos y β β k : β€, y = 2 * k * Ο + x β¨ y = 2 * k * Ο - x :=
calc
cos x = cos y β cos x - cos y = 0 := sub_eq_zero.symm
_ β -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by | rw [cos_sub_cos]
_ β sin ((x + y) / 2) = 0 β¨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : β) β 0)]
_ β sin ((x - y) / 2) = 0 β¨ sin ((x + y) / 2) = 0 := or_comm
_ β (β k : β€, y = 2 * k * Ο + x) β¨ β k : β€, y = 2 * k * Ο - x := by
apply or_congr <;>
field_simp [sin_eq_zero_iff, (by norm... | [
" ΞΈ.cos = 0 β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 β cexp (2 * ΞΈ * I) = -1",
" cexp (ΞΈ * I - -ΞΈ * I) = -1 β cexp (2 * ΞΈ * I) = -1",
" (β n, 2 * I * ΞΈ = βΟ * I + βn * (2 * βΟ * I)) β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" 2 * I * ΞΈ = βΟ * I + βx * (2 * βΟ * I) β ΞΈ = (2 * βx +... | [
" ΞΈ.cos = 0 β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 β cexp (2 * ΞΈ * I) = -1",
" cexp (ΞΈ * I - -ΞΈ * I) = -1 β cexp (2 * ΞΈ * I) = -1",
" (β n, 2 * I * ΞΈ = βΟ * I + βn * (2 * βΟ * I)) β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" 2 * I * ΞΈ = βΟ * I + βx * (2 * βΟ * I) β ΞΈ = (2 * βx +... |
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 | 137 | 150 | theorem sum_bernoulli' (n : β) : (β k β range n, (n.choose k : β) * bernoulli' k) = n := by |
cases' n with n
Β· simp
suffices
((n + 1 : β) * β k β range n, β(n.choose k) / (n - k + 1) * bernoulli' k) =
β x β range n, β(n.succ.choose x) * bernoulli' x by
rw_mod_cast [sum_range_succ, bernoulli'_def, β this, choose_succ_self_right]
ring
simp_rw [mul_sum, β mul_assoc]
refine sum_congr r... | [
" 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.Algebra.Regular.Basic
import Mathlib.LinearAlgebra.Matrix.MvPolynomial
import Mathlib.LinearAlgebra.Matrix.Polynomial
import Mathlib.RingTheory.Polynomial.Basic
#align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matr... | Mathlib/LinearAlgebra/Matrix/Adjugate.lean | 119 | 122 | theorem cramer_row_self (i : n) (h : β j, b j = A j i) : A.cramer b = Pi.single i A.det := by |
rw [β transpose_transpose A, det_transpose]
convert cramer_transpose_row_self Aα΅ i
exact funext h
| [
" IsLinearMap Ξ± A.cramerMap",
" β (x y : n β Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" β (c : Ξ±) (x : n β Ξ±), A.cramerMap (c β’ x) = c β’ A.cramerMap x",
" A.cramerMap (xβ + yβ) = A.cramerMap xβ + A.cramerMap yβ",
" A.cramerMap (cβ β’ xβ) = cβ β’ A.cramerMap xβ",
" A.cramerMap (xβ + yβ) i = ... | [
" IsLinearMap Ξ± A.cramerMap",
" β (x y : n β Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" β (c : Ξ±) (x : n β Ξ±), A.cramerMap (c β’ x) = c β’ A.cramerMap x",
" A.cramerMap (xβ + yβ) = A.cramerMap xβ + A.cramerMap yβ",
" A.cramerMap (cβ β’ xβ) = cβ β’ A.cramerMap xβ",
" A.cramerMap (xβ + yβ) i = ... |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Order.Hom.Set
#align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
namespace OrderIso
section Preorder
variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²]
@[simp]
theorem preimage_I... | Mathlib/Order/Interval/Set/OrderIso.lean | 30 | 32 | theorem preimage_Ici (e : Ξ± βo Ξ²) (b : Ξ²) : e β»ΒΉ' Ici b = Ici (e.symm b) := by |
ext x
simp [β e.le_iff_le]
| [
" βe β»ΒΉ' Iic b = Iic (e.symm b)",
" x β βe β»ΒΉ' Iic b β x β Iic (e.symm b)",
" βe β»ΒΉ' Ici b = Ici (e.symm b)",
" x β βe β»ΒΉ' Ici b β x β Ici (e.symm b)"
] | [
" βe β»ΒΉ' Iic b = Iic (e.symm b)",
" x β βe β»ΒΉ' Iic b β x β Iic (e.symm b)"
] |
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 | 111 | 112 | theorem interior_Ico [NoMinOrder Ξ±] {a b : Ξ±} : interior (Ico a b) = Ioo a b := by |
rw [β Ici_inter_Iio, interior_inter, interior_Ici, interior_Iio, Ioi_inter_Iio]
| [
" 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.Order.Interval.Set.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Bornology.Hom
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.lipschitz from "leanprove... | Mathlib/Topology/MetricSpace/Lipschitz.lean | 41 | 44 | theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} : LipschitzWith K f β β x y, dist (f x) (f y) β€ K * dist x y := by |
simp only [LipschitzWith, edist_nndist, dist_nndist]
norm_cast
| [
" LipschitzWith K f β β (x y : Ξ±), dist (f x) (f y) β€ βK * dist x y",
" (β (x y : Ξ±), β(nndist (f x) (f y)) β€ βK * β(nndist x y)) β β (x y : Ξ±), β(nndist (f x) (f y)) β€ βK * β(nndist x y)"
] | [] |
import Mathlib.Algebra.Star.Order
import Mathlib.Topology.Instances.NNReal
import Mathlib.Topology.Order.MonotoneContinuity
#align_import data.real.sqrt from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
open Set Filter
open scoped Filter NNReal Topology
namespace NNReal
variable {x y... | Mathlib/Data/Real/Sqrt.lean | 97 | 98 | theorem sqrt_mul (x y : ββ₯0) : sqrt (x * y) = sqrt x * sqrt y := by |
rw [sqrt_eq_iff_eq_sq, mul_pow, sq_sqrt, sq_sqrt]
| [
" sqrt x * sqrt x = x",
" sqrt (x * x) = x",
" sqrt x = 0 β x = 0",
" sqrt x = 1 β x = 1",
" sqrt 0 = 0",
" sqrt 1 = 1",
" sqrt x β€ 1 β x β€ 1",
" 1 β€ sqrt x β 1 β€ x",
" sqrt (x * y) = sqrt x * sqrt y"
] | [
" sqrt x * sqrt x = x",
" sqrt (x * x) = x",
" sqrt x = 0 β x = 0",
" sqrt x = 1 β x = 1",
" sqrt 0 = 0",
" sqrt 1 = 1",
" sqrt x β€ 1 β x β€ 1",
" 1 β€ sqrt x β 1 β€ x"
] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 207 | 208 | theorem preimage_add_const_Ioo : (fun x => x + a) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a) := by |
simp [β Ioi_inter_Iio]
| [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Ico b c ... | [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Ico b c ... |
import Mathlib.Algebra.BigOperators.Associated
import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Nat.PrimeFin
import Mathlib.RingTheory.Coprime.Lemmas
namespace ZMod
variable {n m : β}
def unitsMap (hm : n β£ m) : (ZMod m)Λ£ β* (ZMod n)Λ£ := Units.map (castHom hm (ZMod n))
lemma unitsMap_def (hm : n β£ m) : unitsM... | Mathlib/Data/ZMod/Units.lean | 38 | 63 | theorem unitsMap_surjective [hm : NeZero m] (h : n β£ m) :
Function.Surjective (unitsMap h) := by |
suffices β x : β, x.Coprime n β β k : β, (x + k * n).Coprime m by
intro x
have β¨k, hkβ© := this x.val.val (val_coe_unit_coprime x)
refine β¨unitOfCoprime _ hk, Units.ext ?_β©
have : NeZero n := β¨fun hn β¦ hm.out (eq_zero_of_zero_dvd (hn βΈ h))β©
simp [unitsMap_def]
intro x hx
let ps := m.primeFacto... | [
" (unitsMap hm).comp (unitsMap hd) = unitsMap β―",
" (Units.map β(castHom hm (ZMod n))).comp (Units.map β(castHom hd (ZMod m))) = Units.map β(castHom β― (ZMod n))",
" Units.map ((β(castHom hm (ZMod n))).comp β(castHom hd (ZMod m))) = Units.map β(castHom β― (ZMod n))",
" unitsMap β― = MonoidHom.id (ZMod n)Λ£",
" ... | [
" (unitsMap hm).comp (unitsMap hd) = unitsMap β―",
" (Units.map β(castHom hm (ZMod n))).comp (Units.map β(castHom hd (ZMod m))) = Units.map β(castHom β― (ZMod n))",
" Units.map ((β(castHom hm (ZMod n))).comp β(castHom hd (ZMod m))) = Units.map β(castHom β― (ZMod n))",
" unitsMap β― = MonoidHom.id (ZMod n)Λ£"
] |
import Mathlib.CategoryTheory.Elementwise
import Mathlib.CategoryTheory.Adjunction.Evaluation
import Mathlib.Tactic.CategoryTheory.Elementwise
import Mathlib.CategoryTheory.Adhesive
import Mathlib.CategoryTheory.Sites.ConcreteSheafification
#align_import category_theory.sites.subsheaf from "leanprover-community/mathl... | Mathlib/CategoryTheory/Sites/Subsheaf.lean | 122 | 130 | theorem Subpresheaf.eq_top_iff_isIso : G = β€ β IsIso G.ΞΉ := by |
constructor
Β· rintro rfl
infer_instance
Β· intro H
ext U x
apply iff_true_iff.mpr
rw [β IsIso.inv_hom_id_apply (G.ΞΉ.app U) x]
exact ((inv (G.ΞΉ.app U)) x).2
| [
" x β F.map xβΒΉ β»ΒΉ' (fun U => β€) V",
" { obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.map (π X) =\n π ({ obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.obj X)",
" β({ obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.map (π X) β¨x, propertyββ©) =... | [
" x β F.map xβΒΉ β»ΒΉ' (fun U => β€) V",
" { obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.map (π X) =\n π ({ obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.obj X)",
" β({ obj := fun U => β(G.obj U), map := fun U V i x => β¨F.map i βx, β―β© }.map (π X) β¨x, propertyββ©) =... |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04"
namespace Set
variable {Ξ± Ξ² : Type*} {s t : Set Ξ±}
noncomputable def encard (s : Set Ξ±) : ββ := PartENat.withTopEquiv (PartENat.card s)
@[simp] theorem encard_uni... | Mathlib/Data/Set/Card.lean | 78 | 80 | theorem encard_eq_coe_toFinset_card (s : Set Ξ±) [Fintype s] : encard s = s.toFinset.card := by |
have h := toFinite s
rw [h.encard_eq_coe_toFinset_card, toFinite_toFinset]
| [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card Ξ±)",
" s.encard = βh.toFinset.card",
" s.encard = βs.toFinset.card"
] | [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card Ξ±)",
" s.encard = βh.toFinset.card"
] |
import Mathlib.Dynamics.PeriodicPts
import Mathlib.GroupTheory.Exponent
import Mathlib.GroupTheory.GroupAction.Basic
namespace MulAction
universe u v
variable {Ξ± : Type v}
variable {G : Type u} [Group G] [MulAction G Ξ±]
variable {M : Type u} [Monoid M] [MulAction M Ξ±]
@[to_additive "If the action is periodic, t... | Mathlib/GroupTheory/GroupAction/Period.lean | 117 | 120 | theorem period_bounded_of_exponent_pos (exp_pos : 0 < Monoid.exponent M) (m : M) :
BddAbove (Set.range (fun a : Ξ± => period m a)) := by |
use Monoid.exponent M
simpa [upperBounds] using period_le_exponent exp_pos _
| [
" m ^ 1 β’ a = a",
" period m a β£ orderOf m",
" period m a β£ Monoid.exponent M",
" BddAbove (Set.range fun a => period m a)",
" Monoid.exponent M β upperBounds (Set.range fun a => period m a)"
] | [
" m ^ 1 β’ a = a",
" period m a β£ orderOf m",
" period m a β£ Monoid.exponent M"
] |
import Mathlib.Algebra.Star.Basic
import Mathlib.Data.Set.Finite
import Mathlib.Data.Set.Pointwise.Basic
#align_import algebra.star.pointwise from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
namespace Set
open Pointwise
local postfix:max "β" => star
variable {Ξ± : Type*} {s t : Set... | Mathlib/Algebra/Star/Pointwise.lean | 115 | 117 | theorem star_singleton {Ξ² : Type*} [InvolutiveStar Ξ²] (x : Ξ²) : ({x} : Set Ξ²)β = {xβ} := by |
ext1 y
rw [mem_star, mem_singleton_iff, mem_singleton_iff, star_eq_iff_star_eq, eq_comm]
| [
" aβ β sβ β a β s",
" star '' s = sβ",
" star '' s = star β»ΒΉ' s",
" Function.LeftInverse star star",
" Function.RightInverse star star",
" xβββ = xβ",
" sββ = s",
" sβ β t β s β tβ",
" {x}β = {xβ}",
" y β {x}β β y β {xβ}"
] | [
" aβ β sβ β a β s",
" star '' s = sβ",
" star '' s = star β»ΒΉ' s",
" Function.LeftInverse star star",
" Function.RightInverse star star",
" xβββ = xβ",
" sββ = s",
" sβ β t β s β tβ"
] |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpace
namespace MeasureTheory
namespace Measure
variable {M : Type*} [Monoid M] [MeasurableSpace M]
@[to_additive conv "Additive convolution of measures."]
noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) :
... | Mathlib/MeasureTheory/Group/Convolution.lean | 65 | 67 | theorem zero_mconv (ΞΌ : Measure M) : ΞΌ β (0 : Measure M) = (0 : Measure M) := by |
unfold mconv
simp
| [
" dirac 1 β ΞΌ = ΞΌ",
" map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ",
" map ((fun x => x.1 * x.2) β Prod.mk 1) ΞΌ = ΞΌ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" ΞΌ β dirac 1 = ΞΌ",
" map (fun x => x.1 * x.2) (ΞΌ.prod (dirac 1)) = ΞΌ",
" map ((fun x => x.1 * x.2) β fun x => (x, 1)) ΞΌ... | [
" dirac 1 β ΞΌ = ΞΌ",
" map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ",
" map ((fun x => x.1 * x.2) β Prod.mk 1) ΞΌ = ΞΌ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" ΞΌ β dirac 1 = ΞΌ",
" map (fun x => x.1 * x.2) (ΞΌ.prod (dirac 1)) = ΞΌ",
" map ((fun x => x.1 * x.2) β fun x => (x, 1)) ΞΌ... |
import Mathlib.Data.Set.Finite
import Mathlib.Order.Partition.Finpartition
#align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
namespace Setoid
variable {Ξ± : Type*}
theorem eq_of_mem_eqv_class {c : Set (Set Ξ±)} (H : β a, β! b β c, a β b) {x b b'}
... | Mathlib/Data/Setoid/Partition.lean | 67 | 71 | theorem classes_ker_subset_fiber_set {Ξ² : Type*} (f : Ξ± β Ξ²) :
(Setoid.ker f).classes β Set.range fun y => { x | f x = y } := by |
rintro s β¨x, rflβ©
rw [Set.mem_range]
exact β¨f x, rflβ©
| [
" x β s",
" (ker f).classes β Set.range fun y => {x | f x = y}",
" {x_1 | (ker f).Rel x_1 x} β Set.range fun y => {x | f x = y}",
" β y, {x | f x = y} = {x_1 | (ker f).Rel x_1 x}"
] | [
" x β s"
] |
import Mathlib.Analysis.Convolution
import Mathlib.Analysis.Calculus.BumpFunction.Normed
import Mathlib.MeasureTheory.Integral.Average
import Mathlib.MeasureTheory.Covering.Differentiation
import Mathlib.MeasureTheory.Covering.BesicovitchVectorSpace
import Mathlib.MeasureTheory.Measure.Haar.Unique
#align_import analy... | Mathlib/Analysis/Calculus/BumpFunction/Convolution.lean | 110 | 139 | theorem ae_convolution_tendsto_right_of_locallyIntegrable
{ΞΉ} {Ο : ΞΉ β ContDiffBump (0 : G)} {l : Filter ΞΉ} {K : β}
(hΟ : Tendsto (fun i β¦ (Ο i).rOut) l (π 0))
(h'Ο : βαΆ i in l, (Ο i).rOut β€ K * (Ο i).rIn) (hg : LocallyIntegrable g ΞΌ) : βα΅ xβ βΞΌ,
Tendsto (fun i β¦ ((Ο i).normed ΞΌ β[lsmul β β, ΞΌ] g) xβ) ... |
have : IsAddHaarMeasure ΞΌ := β¨β©
-- By Lebesgue differentiation theorem, the average of `g` on a small ball converges
-- almost everywhere to the value of `g` as the radius shrinks to zero.
-- We will see that this set of points satisfies the desired conclusion.
filter_upwards [(Besicovitch.vitaliFamily ΞΌ).ae... | [
" (βΟ β[lsmul β β, ΞΌ] g) xβ = integral ΞΌ βΟ β’ g xβ",
" (Ο.normed ΞΌ β[lsmul β β, ΞΌ] g) xβ = g xβ",
" β« (t : G), ((lsmul β β) (Ο.normed ΞΌ t)) (g xβ) βΞΌ = g xβ",
" 0 β€ Ξ΅",
" βα΅ (xβ : G) βΞΌ, Tendsto (fun i => ((Ο i).normed ΞΌ β[lsmul β β, ΞΌ] g) xβ) l (π (g xβ))",
" Tendsto (fun i => ((Ο i).normed ΞΌ β[lsmul β ... | [
" (βΟ β[lsmul β β, ΞΌ] g) xβ = integral ΞΌ βΟ β’ g xβ",
" (Ο.normed ΞΌ β[lsmul β β, ΞΌ] g) xβ = g xβ",
" β« (t : G), ((lsmul β β) (Ο.normed ΞΌ t)) (g xβ) βΞΌ = g xβ",
" 0 β€ Ξ΅"
] |
import Mathlib.Algebra.ContinuedFractions.Basic
import Mathlib.Algebra.GroupWithZero.Basic
#align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
section WithDivisionRing
variable {K : Type*}... | Mathlib/Algebra/ContinuedFractions/Translations.lean | 116 | 117 | theorem exists_conts_b_of_denom {B : K} (nth_denom_eq : g.denominators n = B) :
β conts, g.continuants n = conts β§ conts.b = B := by | simpa
| [
" β conts, g.continuants n = conts β§ conts.a = A",
" β conts, g.continuants n = conts β§ conts.b = B"
] | [
" β conts, g.continuants n = conts β§ conts.a = A"
] |
import Mathlib.Analysis.Calculus.LocalExtr.Rolle
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Topology.Algebra.Polynomial
#align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
namespace Polynomial
theorem card_roots_toFinset_... | Mathlib/Analysis/Calculus/LocalExtr/Polynomial.lean | 91 | 94 | theorem card_rootSet_le_derivative {F : Type*} [CommRing F] [Algebra F β] (p : F[X]) :
Fintype.card (p.rootSet β) β€ Fintype.card (p.derivative.rootSet β) + 1 := by |
simpa only [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe, derivative_map] using
card_roots_toFinset_le_derivative (p.map (algebraMap F β))
| [
" p.roots.toFinset.card β€ ((derivative p).roots.toFinset \\ p.roots.toFinset).card + 1",
" 0 β€ ((derivative (C (p.coeff 0))).roots.toFinset \\ β
).card + 1",
" derivative p β derivative 0",
" β z β (derivative p).roots.toFinset, x < z β§ z < y",
" z β (derivative p).roots.toFinset",
" β x β p.roots.toFinset... | [
" p.roots.toFinset.card β€ ((derivative p).roots.toFinset \\ p.roots.toFinset).card + 1",
" 0 β€ ((derivative (C (p.coeff 0))).roots.toFinset \\ β
).card + 1",
" derivative p β derivative 0",
" β z β (derivative p).roots.toFinset, x < z β§ z < y",
" z β (derivative p).roots.toFinset",
" β x β p.roots.toFinset... |
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
universe u v w
open Polynomial
open Finset
namespace Polynomial
section CommSemiring
variable (R : Type u) [... | Mathlib/Algebra/Polynomial/Expand.lean | 48 | 49 | theorem expand_eq_sum {f : R[X]} : expand R p f = f.sum fun e a => C a * (X ^ p) ^ e := by |
simp [expand, evalβ]
| [
" (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e"
] | [] |
import Mathlib.Algebra.MonoidAlgebra.Basic
#align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951"
variable {k G : Type*} [Semiring k]
namespace AddMonoidAlgebra
section
variable [AddCancelCommMonoid G]
noncomputable def divOf (x : k[G]) (g... | Mathlib/Algebra/MonoidAlgebra/Division.lean | 77 | 79 | theorem divOf_zero (x : k[G]) : x /α΅αΆ 0 = x := by |
refine Finsupp.ext fun _ => ?_ -- Porting note: `ext` doesn't work
simp only [AddMonoidAlgebra.divOf_apply, zero_add]
| [
" x /α΅αΆ 0 = x",
" (x /α΅αΆ 0) xβ = x xβ"
] | [] |
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 | 62 | 63 | theorem sub_smul_slope_vadd (f : k β PE) (a b : k) : (b - a) β’ slope f a b +α΅₯ f a = f b := by |
rw [sub_smul_slope, vsub_vadd]
| [
" 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 f a a = 0",
" (b - a) β’ slope f a b = f b -α΅₯ f a",
" (a - a) β’ slope f a a = f a -α΅₯ f a"
] |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Order.Hom.Set
#align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
namespace OrderIso
section Preorder
variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²]
@[simp]
theorem preimage_I... | Mathlib/Order/Interval/Set/OrderIso.lean | 58 | 59 | theorem preimage_Ioc (e : Ξ± βo Ξ²) (a b : Ξ²) : e β»ΒΉ' Ioc a b = Ioc (e.symm a) (e.symm b) := by |
simp [β Ioi_inter_Iic]
| [
" βe β»ΒΉ' Iic b = Iic (e.symm b)",
" x β βe β»ΒΉ' Iic b β x β Iic (e.symm b)",
" βe β»ΒΉ' Ici b = Ici (e.symm b)",
" x β βe β»ΒΉ' Ici b β x β Ici (e.symm b)",
" βe β»ΒΉ' Iio b = Iio (e.symm b)",
" x β βe β»ΒΉ' Iio b β x β Iio (e.symm b)",
" βe β»ΒΉ' Ioi b = Ioi (e.symm b)",
" x β βe β»ΒΉ' Ioi b β x β Ioi (e.symm b)"... | [
" βe β»ΒΉ' Iic b = Iic (e.symm b)",
" x β βe β»ΒΉ' Iic b β x β Iic (e.symm b)",
" βe β»ΒΉ' Ici b = Ici (e.symm b)",
" x β βe β»ΒΉ' Ici b β x β Ici (e.symm b)",
" βe β»ΒΉ' Iio b = Iio (e.symm b)",
" x β βe β»ΒΉ' Iio b β x β Iio (e.symm b)",
" βe β»ΒΉ' Ioi b = Ioi (e.symm b)",
" x β βe β»ΒΉ' Ioi b β x β Ioi (e.symm b)"... |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Bicategory.Coherence
namespace CategoryTheory
namespace Bicategory
open Category
open scoped Bicategory
open Mathlib.Tactic.BicategoryCoherence (bicategoricalComp bicategoricalIsoComp)
universe w v u
variable {B : Type u} [Bicategory... | Mathlib/CategoryTheory/Bicategory/Adjunction.lean | 205 | 206 | theorem rightZigzagIso_inv : (rightZigzagIso Ξ· Ξ΅).inv = leftZigzag Ξ΅.inv Ξ·.inv := by |
simp [bicategoricalComp, bicategoricalIsoComp]
| [
" rightZigzag Ξ· Ξ΅ ββ« rightZigzag Ξ· Ξ΅ = rightZigzag Ξ· Ξ΅",
" (g β Ξ· ββ« Ξ΅ β· g) ββ« g β Ξ· ββ« Ξ΅ β· g = g β Ξ· ββ« Ξ΅ β· g",
" (g β Ξ· ββ« Ξ΅ β· g) ββ« g β Ξ· ββ« Ξ΅ β· g = g β Ξ· ββ« (Ξ΅ β· g β· π a β« (π b β« g) β Ξ·) ββ« Ξ΅ β· g",
" g β Ξ· β« (Ξ±_ g f g).inv β« Ξ΅ β· g β« (Ξ»_ g).hom β« (Ο_ g).inv β« g β Ξ· β« (Ξ±_ g f g).inv β« Ξ΅ β· g =\n g β Ξ· β«... | [
" rightZigzag Ξ· Ξ΅ ββ« rightZigzag Ξ· Ξ΅ = rightZigzag Ξ· Ξ΅",
" (g β Ξ· ββ« Ξ΅ β· g) ββ« g β Ξ· ββ« Ξ΅ β· g = g β Ξ· ββ« Ξ΅ β· g",
" (g β Ξ· ββ« Ξ΅ β· g) ββ« g β Ξ· ββ« Ξ΅ β· g = g β Ξ· ββ« (Ξ΅ β· g β· π a β« (π b β« g) β Ξ·) ββ« Ξ΅ β· g",
" g β Ξ· β« (Ξ±_ g f g).inv β« Ξ΅ β· g β« (Ξ»_ g).hom β« (Ο_ g).inv β« g β Ξ· β« (Ξ±_ g f g).inv β« Ξ΅ β· g =\n g β Ξ· β«... |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
#align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b... | Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean | 217 | 231 | theorem isBoundedLinearMap_prod_multilinear {E : ΞΉ β Type*} [β i, NormedAddCommGroup (E i)]
[β i, NormedSpace π (E i)] :
IsBoundedLinearMap π fun p : ContinuousMultilinearMap π E F Γ ContinuousMultilinearMap π E G =>
p.1.prod p.2 where
map_add pβ pβ := by | ext : 1; rfl
map_smul c p := by ext : 1; rfl
bound := by
refine β¨1, zero_lt_one, fun p β¦ ?_β©
rw [one_mul]
apply ContinuousMultilinearMap.opNorm_le_bound _ (norm_nonneg _) _
intro m
rw [ContinuousMultilinearMap.prod_apply, norm_prod_le_iff]
constructor
Β· exact (p.1.le_opNorm m).trans (mu... | [
" (pβ + pβ).1.prod (pβ + pβ).2 = pβ.1.prod pβ.2 + pβ.1.prod pβ.2",
" ((pβ + pβ).1.prod (pβ + pβ).2) xβ = (pβ.1.prod pβ.2 + pβ.1.prod pβ.2) xβ",
" (c β’ p).1.prod (c β’ p).2 = c β’ p.1.prod p.2",
" ((c β’ p).1.prod (c β’ p).2) xβ = (c β’ p.1.prod p.2) xβ",
" β M, 0 < M β§ β (x : ContinuousMultilinearMap π E F Γ Co... | [] |
import Mathlib.AlgebraicGeometry.OpenImmersion
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
import Mathlib.CategoryTheory.MorphismProperty.Composition
import Mathlib.RingTheory.LocalProperties
universe v u
open CategoryTheory
namespace AlgebraicGeometry
class IsClosedImmersion {X Y : Scheme} (f : X βΆ... | Mathlib/AlgebraicGeometry/Morphisms/ClosedImmersion.lean | 79 | 89 | theorem spec_of_surjective {R S : CommRingCat} (f : R βΆ S) (h : Function.Surjective f) :
IsClosedImmersion (Scheme.specMap f) where
base_closed := PrimeSpectrum.closedEmbedding_comap_of_surjective _ _ h
surj_on_stalks x := by |
erw [β localRingHom_comp_stalkIso, CommRingCat.coe_comp, CommRingCat.coe_comp]
apply Function.Surjective.comp (Function.Surjective.comp _ _) _
Β· exact (ConcreteCategory.bijective_of_isIso (StructureSheaf.stalkIso S x).inv).2
Β· exact surjective_localRingHom_of_surjective f h x.asIdeal
Β· let g := (St... | [
" IsClosedImmersion (f β« g)",
" Function.Surjective β(PresheafedSpace.stalkMap (f β« g).val x)",
" Function.Surjective β(PresheafedSpace.stalkMap g.val (f.val.base x) β« PresheafedSpace.stalkMap f.val x)",
" MorphismProperty.RespectsIso @IsClosedImmersion",
" β {X Y Z : Scheme} (e : X β
Y) (f : Y βΆ Z), IsClos... | [
" IsClosedImmersion (f β« g)",
" Function.Surjective β(PresheafedSpace.stalkMap (f β« g).val x)",
" Function.Surjective β(PresheafedSpace.stalkMap g.val (f.val.base x) β« PresheafedSpace.stalkMap f.val x)",
" MorphismProperty.RespectsIso @IsClosedImmersion",
" β {X Y Z : Scheme} (e : X β
Y) (f : Y βΆ Z), IsClos... |
import Mathlib.FieldTheory.PrimitiveElement
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.G... | Mathlib/RingTheory/Norm.lean | 118 | 121 | theorem PowerBasis.norm_gen_eq_coeff_zero_minpoly (pb : PowerBasis R S) :
norm R pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0 := by |
rw [norm_eq_matrix_det pb.basis, det_eq_sign_charpoly_coeff, charpoly_leftMulMatrix,
Fintype.card_fin]
| [
" (norm R) x = 1",
" (if H : β s, Nonempty (Basis { x // x β s } R S) then detAux (Trunc.mk β―.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk β―.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (β s, Nonempty (Basis { x // x β s } R S)) β Module.Finite R S",
" Module.Finite R S",
" (norm R) ... | [
" (norm R) x = 1",
" (if H : β s, Nonempty (Basis { x // x β s } R S) then detAux (Trunc.mk β―.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk β―.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (β s, Nonempty (Basis { x // x β s } R S)) β Module.Finite R S",
" Module.Finite R S",
" (norm R) ... |
import Batteries.Data.RBMap.Basic
import Mathlib.Init.Data.Nat.Notation
import Mathlib.Mathport.Rename
import Mathlib.Tactic.TypeStar
import Mathlib.Util.CompileInductive
#align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8"
inductive Tree.{u} (Ξ± : Type u) : Type ... | Mathlib/Data/Tree/Basic.lean | 94 | 96 | theorem numLeaves_pos (x : Tree Ξ±) : 0 < x.numLeaves := by |
rw [numLeaves_eq_numNodes_succ]
exact x.numNodes.zero_lt_succ
| [
" x.numLeaves = x.numNodes + 1",
" nil.numLeaves = nil.numNodes + 1",
" (node aβΒ² aβΒΉ aβ).numLeaves = (node aβΒ² aβΒΉ aβ).numNodes + 1",
" 0 < x.numLeaves",
" 0 < x.numNodes + 1"
] | [
" x.numLeaves = x.numNodes + 1",
" nil.numLeaves = nil.numNodes + 1",
" (node aβΒ² aβΒΉ aβ).numLeaves = (node aβΒ² aβΒΉ aβ).numNodes + 1"
] |
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 | 87 | 89 | theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) :
HasDerivWithinAt (fun y => c y β’ f y) (c x β’ f' + c' β’ f x) s x := by |
simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
| [
" HasDerivWithinAt (fun y => c y β’ f y) (c x β’ f' + c' β’ f x) s x"
] | [] |
import Mathlib.Data.Set.Lattice
#align_import data.set.accumulate from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
variable {Ξ± Ξ² Ξ³ : Type*} {s : Ξ± β Set Ξ²} {t : Ξ± β Set Ξ³}
namespace Set
def Accumulate [LE Ξ±] (s : Ξ± β Set Ξ²) (x : Ξ±) : Set Ξ² :=
β y β€ x, s y
#align set.accumulate S... | Mathlib/Data/Set/Accumulate.lean | 56 | 61 | theorem iUnion_accumulate [Preorder Ξ±] : β x, Accumulate s x = β x, s x := by |
apply Subset.antisymm
Β· simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate]
intro z x x' β¨_, hzβ©
exact β¨x', hzβ©
Β· exact iUnion_mono fun i => subset_accumulate
| [
" z β Accumulate s x β β y β€ x, z β s y",
" β y, β (_ : y β€ x), Accumulate s y = β y, β (_ : y β€ x), s y",
" β y, β (_ : y β€ x), Accumulate s y β β y, β (_ : y β€ x), s y",
" β y, β (_ : y β€ x), s y β β y, β (_ : y β€ x), Accumulate s y",
" β x, Accumulate s x = β x, s x",
" β x, Accumulate s x β β x, s x",... | [
" z β Accumulate s x β β y β€ x, z β s y",
" β y, β (_ : y β€ x), Accumulate s y = β y, β (_ : y β€ x), s y",
" β y, β (_ : y β€ x), Accumulate s y β β y, β (_ : y β€ x), s y",
" β y, β (_ : y β€ x), s y β β y, β (_ : y β€ x), Accumulate s y"
] |
import Mathlib.CategoryTheory.EpiMono
import Mathlib.CategoryTheory.Functor.FullyFaithful
import Mathlib.Tactic.PPWithUniv
import Mathlib.Data.Set.Defs
#align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
namespace CategoryTheory
-- morphism levels be... | Mathlib/CategoryTheory/Types.lean | 170 | 172 | theorem eqToHom_map_comp_apply (p : X = Y) (q : Y = Z) (x : F.obj X) :
F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom <| p.trans q) x := by |
aesop_cat
| [
" f = g",
" f x = g x",
" Mono (βΎf)",
" βΎf β« inv (βΎf) = π Ξ±",
" F.map (f β« g) a = F.map g (F.map f a)",
" F.map (π X) a = a",
" F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom β―) x"
] | [
" f = g",
" f x = g x",
" Mono (βΎf)",
" βΎf β« inv (βΎf) = π Ξ±",
" F.map (f β« g) a = F.map g (F.map f a)",
" F.map (π X) a = a"
] |
import Mathlib.Data.Matrix.Basis
import Mathlib.RingTheory.TensorProduct.Basic
#align_import ring_theory.matrix_algebra from "leanprover-community/mathlib"@"6c351a8fb9b06e5a542fdf427bfb9f46724f9453"
suppress_compilation
universe u v w
open TensorProduct
open TensorProduct
open Algebra.TensorProduct
open Matri... | Mathlib/RingTheory/MatrixAlgebra.lean | 113 | 121 | theorem right_inv (M : Matrix n n A) : (toFunAlgHom R A n) (invFun R A n M) = M := by |
simp only [invFun, AlgHom.map_sum, stdBasisMatrix, apply_ite β(algebraMap R A), smul_eq_mul,
mul_boole, toFunAlgHom_apply, RingHom.map_zero, RingHom.map_one, Matrix.map_apply,
Pi.smul_def]
convert Finset.sum_product (Ξ² := Matrix n n A)
conv_lhs => rw [matrix_eq_sum_std_basis M]
refine Finset.sum_congr ... | [
" β (aβ aβ : A) (bβ bβ : Matrix n n R),\n (toFunLinear R A n) ((aβ * aβ) ββ[R] (bβ * bβ)) =\n (toFunLinear R A n) (aβ ββ[R] bβ) * (toFunLinear R A n) (aβ ββ[R] bβ)",
" (toFunLinear R A n) ((aββ * aββ) ββ[R] (bββ * bββ)) =\n (toFunLinear R A n) (aββ ββ[R] bββ) * (toFunLinear R A n) (aββ ββ[R] bββ)",
"... | [
" β (aβ aβ : A) (bβ bβ : Matrix n n R),\n (toFunLinear R A n) ((aβ * aβ) ββ[R] (bβ * bβ)) =\n (toFunLinear R A n) (aβ ββ[R] bβ) * (toFunLinear R A n) (aβ ββ[R] bβ)",
" (toFunLinear R A n) ((aββ * aββ) ββ[R] (bββ * bββ)) =\n (toFunLinear R A n) (aββ ββ[R] bββ) * (toFunLinear R A n) (aββ ββ[R] bββ)",
"... |
import Mathlib.Tactic.Linarith.Datatypes
import Mathlib.Tactic.Zify
import Mathlib.Tactic.CancelDenoms.Core
import Batteries.Data.RBMap.Basic
import Mathlib.Data.HashMap
import Mathlib.Control.Basic
set_option autoImplicit true
namespace Linarith
open Lean hiding Rat
open Elab Tactic Meta
open Qq
partial def ... | Mathlib/Tactic/Linarith/Preprocessing.lean | 273 | 273 | theorem without_one_mul [MulOneClass M] {a b : M} (h : 1 * a = b) : a = b := by | rwa [one_mul] at h
| [
" a = b"
] | [] |
import Mathlib.Order.Filter.Cofinite
import Mathlib.Order.Filter.CountableInter
import Mathlib.Order.Filter.CardinalInter
import Mathlib.SetTheory.Cardinal.Ordinal
import Mathlib.SetTheory.Cardinal.Cofinality
import Mathlib.Order.Filter.Bases
open Set Filter Cardinal
universe u
variable {ΞΉ : Type u} {Ξ± Ξ² : Type u}... | Mathlib/Order/Filter/Cocardinal.lean | 70 | 72 | theorem frequently_cocardinal {p : Ξ± β Prop} :
(βαΆ x in cocardinal Ξ± hreg, p x) β c β€ # { x | p x } := by |
simp only [Filter.Frequently, eventually_cocardinal, not_not,coe_setOf, not_lt]
| [
" Filter Ξ±",
" β (S : Set (Set Ξ±)), #βS < c β (β s β S, s β {s | #βs < c}) β ββ S β {s | #βs < c}",
" β¨ s_1, #ββs_1 < c",
" β t β {s | #βs < c}, β s β t, s β {s | #βs < c}",
" cocardinal Ξ± isRegular_aleph0 = cofinite",
" ββ S β cocardinal Ξ± hreg",
" #β(ββ (compl '' S)) < c",
" #β(compl '' S) * β¨ s, #β... | [
" Filter Ξ±",
" β (S : Set (Set Ξ±)), #βS < c β (β s β S, s β {s | #βs < c}) β ββ S β {s | #βs < c}",
" β¨ s_1, #ββs_1 < c",
" β t β {s | #βs < c}, β s β t, s β {s | #βs < c}",
" cocardinal Ξ± isRegular_aleph0 = cofinite",
" ββ S β cocardinal Ξ± hreg",
" #β(ββ (compl '' S)) < c",
" #β(compl '' S) * β¨ s, #β... |
import Batteries.Data.Char
import Batteries.Data.List.Lemmas
import Batteries.Data.String.Basic
import Batteries.Tactic.Lint.Misc
import Batteries.Tactic.SeqFocus
namespace String
attribute [ext] ext
theorem lt_trans {sβ sβ sβ : String} : sβ < sβ β sβ < sβ β sβ < sβ :=
List.lt_trans' (Ξ± := Char) Nat.lt_trans
... | .lake/packages/batteries/Batteries/Data/String/Lemmas.lean | 134 | 143 | theorem utf8GetAux_add_right_cancel (s : List Char) (i p n : Nat) :
utf8GetAux s β¨i + nβ© β¨p + nβ© = utf8GetAux s β¨iβ© β¨pβ© := by |
apply utf8InductionOn s β¨iβ© β¨pβ© (motive := fun s i =>
utf8GetAux s β¨i.byteIdx + nβ© β¨p + nβ© = utf8GetAux s i β¨pβ©) <;>
simp [utf8GetAux]
intro c cs β¨iβ© h ih
simp [Pos.ext_iff, Pos.addChar_eq] at h β’
simp [Nat.add_right_cancel_iff, h]
rw [Nat.add_right_comm]
exact ih
| [
" utf8Len (csβ ++ csβ) = utf8Len csβ + utf8Len csβ",
" utf8Len ([] ++ csβ) = utf8Len [] + utf8Len csβ",
" utf8Len (headβ :: tailβ ++ csβ) = utf8Len (headβ :: tailβ) + utf8Len csβ",
" utf8Len (csβ.reverseAux csβ) = utf8Len csβ + utf8Len csβ",
" utf8Len ([].reverseAux csβ) = utf8Len [] + utf8Len csβ",
" utf... | [
" utf8Len (csβ ++ csβ) = utf8Len csβ + utf8Len csβ",
" utf8Len ([] ++ csβ) = utf8Len [] + utf8Len csβ",
" utf8Len (headβ :: tailβ ++ csβ) = utf8Len (headβ :: tailβ) + utf8Len csβ",
" utf8Len (csβ.reverseAux csβ) = utf8Len csβ + utf8Len csβ",
" utf8Len ([].reverseAux csβ) = utf8Len [] + utf8Len csβ",
" utf... |
import Batteries.Data.Array.Lemmas
namespace ByteArray
@[ext] theorem ext : {a b : ByteArray} β a.data = b.data β a = b
| β¨_β©, β¨_β©, rfl => rfl
theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data[i] := rfl
@[simp] theorem uset_eq_set (a : ByteArray) {i : USize} (h : i.toNat < a.size... | .lake/packages/batteries/Batteries/Data/ByteArray.lean | 84 | 87 | theorem get_append_right {a b : ByteArray} (hle : a.size β€ i) (h : i < (a ++ b).size)
(h' : i - a.size < b.size := Nat.sub_lt_left_of_lt_add hle (size_append .. βΈ h)) :
(a ++ b)[i] = b[i - a.size] := by |
simp [getElem_eq_data_getElem]; exact Array.get_append_right hle
| [
" βi < (a.set i v).size",
" (a ++ b).data = a.data ++ b.data",
" (a.append b).data = a.data ++ b.data",
" a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data",
" (a ++ b).size = a.size + b.size",
" (a.data ++ b.data).size = a.data.size + b.data.size",
" (a ++ b)... | [
" βi < (a.set i v).size",
" (a ++ b).data = a.data ++ b.data",
" (a.append b).data = a.data ++ b.data",
" a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data",
" (a ++ b).size = a.size + b.size",
" (a.data ++ b.data).size = a.data.size + b.data.size",
" (a ++ b)... |
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace
#align_import algebraic_geometry.open_immersion.basic from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
-- Porting note: due to `PresheafedSpace`, `SheafedSpace` and `Locally... | Mathlib/Geometry/RingedSpace/OpenImmersion.lean | 133 | 141 | theorem isoRestrict_hom_ofRestrict : H.isoRestrict.hom β« Y.ofRestrict _ = f := by |
-- Porting note: `ext` did not pick up `NatTrans.ext`
refine PresheafedSpace.Hom.ext _ _ rfl <| NatTrans.ext _ _ <| funext fun x => ?_
simp only [isoRestrict_hom_c_app, NatTrans.comp_app, eqToHom_refl,
ofRestrict_c_app, Category.assoc, whiskerRight_id']
erw [Category.comp_id, comp_c_app, f.c.naturality_ass... | [] | [] |
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Types.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.CategoryTheory.Linear.LinearFunctor
#align_import algebra.category.Module.adjunctions from "leanpr... | Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | 112 | 129 | theorem left_unitality (X : Type u) :
(Ξ»_ ((free R).obj X)).hom =
(Ξ΅ R β π ((free R).obj X)) β« (ΞΌ R (π_ (Type u)) X).hom β« map (free R).obj (Ξ»_ X).hom := by |
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.ext
intro x'
-- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ]
let q : X ββ R := ((Ξ»_ (of R (X ββ R))).hom) (1 ββ[R] Finsupp.single x 1)
cha... | [
" β (X : Type u),\n { obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (π X) =\n π ({ obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)",
" { obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (π Xβ... | [
" β (X : Type u),\n { obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (π X) =\n π ({ obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)",
" { obj := fun X => of R (X ββ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (π Xβ... |
import Mathlib.Data.List.Chain
#align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
variable {Ξ± : Type*} (l : List Ξ±) (R : Ξ± β Ξ± β Prop) [DecidableRel R] {a b : Ξ±}
namespace List
@[simp]
theorem destutter'_nil : destutter' R a [] = [a] :=
rfl
#align ... | Mathlib/Data/List/Destutter.lean | 64 | 70 | theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l := by |
induction' l with b l hl generalizing a
Β· simp
rw [destutter']
split_ifs
Β· exact Sublist.consβ a (hl b)
Β· exact (hl a).trans ((l.sublist_cons b).cons_cons a)
| [
" destutter' R b (a :: l) = b :: destutter' R a l",
" destutter' R b (a :: l) = destutter' R b l",
" destutter' R a [b] = if R a b then [a, b] else [a]",
" destutter' R a [b] = [a, b]",
" destutter' R a [b] = [a]",
" destutter' R a l <+ a :: l",
" destutter' R a [] <+ [a]",
" destutter' R a (b :: l) <... | [
" destutter' R b (a :: l) = b :: destutter' R a l",
" destutter' R b (a :: l) = destutter' R b l",
" destutter' R a [b] = if R a b then [a, b] else [a]",
" destutter' R a [b] = [a, b]",
" destutter' R a [b] = [a]"
] |
import Mathlib.Algebra.CharP.Two
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.NumberTheory.Divisors
import Mathlib.RingTheory.IntegralDomain
import Mathlib.Tactic.Zify
#align_import rin... | Mathlib/RingTheory/RootsOfUnity/Basic.lean | 131 | 133 | theorem rootsOfUnity.coe_pow [CommMonoid R] (ΞΆ : rootsOfUnity k R) (m : β) :
(((ΞΆ ^ m :) : RΛ£) : R) = ((ΞΆ : RΛ£) : R) ^ m := by |
rw [Subgroup.coe_pow, Units.val_pow_eq_pow_val]
| [
" aβ * bβ β {ΞΆ | ΞΆ ^ βk = 1}",
" xβΒΉβ»ΒΉ β { carrier := {ΞΆ | ΞΆ ^ βk = 1}, mul_mem' := β―, one_mem' := β― }.carrier",
" ΞΆ β rootsOfUnity k M β βΞΆ ^ βk = 1",
" ΞΆ ^ βk = 1 β βΞΆ ^ βk = 1",
" rootsOfUnity 1 M = β₯",
" xβ β rootsOfUnity 1 M β xβ β β₯",
" rootsOfUnity k M β€ rootsOfUnity l M",
" rootsOfUnity k M β€ ... | [
" aβ * bβ β {ΞΆ | ΞΆ ^ βk = 1}",
" xβΒΉβ»ΒΉ β { carrier := {ΞΆ | ΞΆ ^ βk = 1}, mul_mem' := β―, one_mem' := β― }.carrier",
" ΞΆ β rootsOfUnity k M β βΞΆ ^ βk = 1",
" ΞΆ ^ βk = 1 β βΞΆ ^ βk = 1",
" rootsOfUnity 1 M = β₯",
" xβ β rootsOfUnity 1 M β xβ β β₯",
" rootsOfUnity k M β€ rootsOfUnity l M",
" rootsOfUnity k M β€ ... |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMa... | Mathlib/Analysis/Calculus/FDeriv/Equiv.lean | 391 | 410 | theorem HasStrictFDerivAt.of_local_left_inverse {f : E β F} {f' : E βL[π] F} {g : F β E} {a : F}
(hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E βL[π] F) (g a))
(hfg : βαΆ y in π a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F βL[π] E) a := by |
replace hg := hg.prod_map' hg
replace hfg := hfg.prod_mk_nhds hfg
have :
(fun p : F Γ F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[π (a, a)] fun p : F Γ F =>
f' (g p.1 - g p.2) - (p.1 - p.2) := by
refine ((f'.symm : F βL[π] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl
simp
refine th... | [
" HasStrictFDerivAt g (βf'.symm) a",
" (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[π (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)",
" βf'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)",
" (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[π (a, a)] fun p => p.1 - p.2",... | [] |
import Mathlib.Data.List.Basic
#align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {Ξ± Ξ² : Type*}
namespace List
attribute [simp] join
-- Porting note (#10618): simp can prove this
-- @... | Mathlib/Data/List/Join.lean | 105 | 109 | theorem take_sum_join' (L : List (List Ξ±)) (i : β) :
L.join.take (Nat.sum ((L.map length).take i)) = (L.take i).join := by |
induction L generalizing i
Β· simp
Β· cases i <;> simp [take_append, *]
| [
" [l].join = l",
" (l :: L).join = [] β β (l_1 : List Ξ±), l_1 β l :: L β l_1 = []",
" (Lβ ++ Lβ).join = Lβ.join ++ Lβ.join",
" ([] ++ Lβ).join = [].join ++ Lβ.join",
" (headβ :: tailβ ++ Lβ).join = (headβ :: tailβ).join ++ Lβ.join",
" (L.concat l).join = L.join ++ l",
" (filter (fun l => !l.isEmpty) ([]... | [
" [l].join = l",
" (l :: L).join = [] β β (l_1 : List Ξ±), l_1 β l :: L β l_1 = []",
" (Lβ ++ Lβ).join = Lβ.join ++ Lβ.join",
" ([] ++ Lβ).join = [].join ++ Lβ.join",
" (headβ :: tailβ ++ Lβ).join = (headβ :: tailβ).join ++ Lβ.join",
" (L.concat l).join = L.join ++ l",
" (filter (fun l => !l.isEmpty) ([]... |
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.CharP.Algebra
import Mathlib.Data.Nat.Prime
#align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u
variable (R : Type u)
section Semiring
variable [Semiring R]
class inductive Ex... | Mathlib/Algebra/CharP/ExpChar.lean | 82 | 83 | theorem ringExpChar.eq_one (R : Type*) [NonAssocSemiring R] [CharZero R] : ringExpChar R = 1 := by |
rw [ringExpChar, ringChar.eq_zero, max_eq_right zero_le_one]
| [
" ExpChar (R Γ S) p",
" ExpChar (R Γ S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q"
] | [
" ExpChar (R Γ S) p",
" ExpChar (R Γ S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q"
] |
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordin... | Mathlib/SetTheory/Game/Ordinal.lean | 58 | 59 | theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty := by |
rw [toPGame, RightMoves]
| [
" let_fun this := β―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).Ξ±",
" o.toPGame.RightMoves = PEmpty.{u_1 + 1}"
] | [
" let_fun this := β―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).Ξ±"
] |
import Mathlib.Order.ConditionallyCompleteLattice.Finset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54"
assert_not_exists MonoidWithZero
open Set
namespace Nat
open scoped Classical
noncomputable instance : ... | Mathlib/Data/Nat/Lattice.lean | 59 | 62 | theorem sInf_empty : sInf β
= 0 := by |
rw [sInf_eq_zero]
right
rfl
| [
" sInf s = 0 β 0 β s β¨ s = β
",
" sInf β
= 0 β 0 β β
β¨ β
= β
",
" sInf β
= 0",
" 0 β β
β¨ β
= β
",
" β
= β
"
] | [
" sInf s = 0 β 0 β s β¨ s = β
",
" sInf β
= 0 β 0 β β
β¨ β
= β
"
] |
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.OrdConnected
#align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c"
variable {Ξ± Ξ² : Type*} [LinearOrder Ξ±]
open Function
namespace Set
def projIci (a x : Ξ±) : Ici a := β¨max a x,... | Mathlib/Order/Interval/Set/ProjIcc.lean | 109 | 110 | theorem projIcc_eq_right (h : a < b) : projIcc a b h.le x = β¨b, right_mem_Icc.2 h.leβ© β b β€ x := by |
simp [projIcc, Subtype.ext_iff, max_min_distrib_left, h.le, h.not_le]
| [
" projIcc a b h x = β¨a, β―β©",
" projIcc a b h x = β¨b, β―β©",
" projIci a x = β¨a, β―β© β x β€ a",
" projIic b x = β¨b, β―β© β b β€ x",
" projIcc a b β― x = β¨a, β―β© β x β€ a",
" projIcc a b β― x = β¨b, β―β© β b β€ x"
] | [
" projIcc a b h x = β¨a, β―β©",
" projIcc a b h x = β¨b, β―β©",
" projIci a x = β¨a, β―β© β x β€ a",
" projIic b x = β¨b, β―β© β b β€ x",
" projIcc a b β― x = β¨a, β―β© β x β€ a"
] |
import Mathlib.Data.Stream.Defs
import Mathlib.Logic.Function.Basic
import Mathlib.Init.Data.List.Basic
import Mathlib.Data.List.Basic
#align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
set_option autoImplicit true
open Nat Function Option
namespace Stre... | Mathlib/Data/Stream/Init.lean | 94 | 94 | theorem head_drop (a : Stream' Ξ±) (n : β) : (a.drop n).head = a.get n := by | simp
| [
" (s.head :: s.tail) i = s i",
" (s.head :: s.tail) 0 = s 0",
" (s.head :: s.tail) (nβ + 1) = s (nβ + 1)",
" drop n (drop m s) = drop (n + m) s",
" (drop n (drop m s)).get nβ = (drop (n + m) s).get nβ",
" (drop i s).tail = drop (i + 1) s",
" (drop i s).tail.get nβ = (drop (i + 1) s).get nβ",
" (drop n... | [
" (s.head :: s.tail) i = s i",
" (s.head :: s.tail) 0 = s 0",
" (s.head :: s.tail) (nβ + 1) = s (nβ + 1)",
" drop n (drop m s) = drop (n + m) s",
" (drop n (drop m s)).get nβ = (drop (n + m) s).get nβ",
" (drop i s).tail = drop (i + 1) s",
" (drop i s).tail.get nβ = (drop (i + 1) s).get nβ",
" (drop n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.