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.Order.Filter.Basic
#align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Set
open Filter
namespace Filter
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort*}
section Prod
variable {s : Set Ξ±} {t : Set Ξ²} {f : Filter Ξ±} {g : Filter Ξ²}
protected ... | Mathlib/Order/Filter/Prod.lean | 112 | 114 | theorem prod_top : f ΓΛ’ (β€ : Filter Ξ²) = f.comap Prod.fst := by |
dsimp only [SProd.sprod]
rw [Filter.prod, comap_top, inf_top_eq]
| [
" s β f ΓΛ’ g β β tβ β f, β tβ β g, tβ ΓΛ’ tβ β s",
" s β comap Prod.fst f β comap Prod.snd g β β tβ β f, β tβ β g, tβ.prod tβ β s",
" s β comap Prod.fst f β comap Prod.snd g β β tβ β f, β tβ β g, tβ.prod tβ β s",
" β tβ_1 β f, β tβ_1 β g, tβ_1.prod tβ_1 β tβ β© tβ",
" (β tβ β f, β tβ β g, tβ.prod tβ β s) β s ... | [
" s β f ΓΛ’ g β β tβ β f, β tβ β g, tβ ΓΛ’ tβ β s",
" s β comap Prod.fst f β comap Prod.snd g β β tβ β f, β tβ β g, tβ.prod tβ β s",
" s β comap Prod.fst f β comap Prod.snd g β β tβ β f, β tβ β g, tβ.prod tβ β s",
" β tβ_1 β f, β tβ_1 β g, tβ_1.prod tβ_1 β tβ β© tβ",
" (β tβ β f, β tβ β g, tβ.prod tβ β s) β s ... |
import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence
import Mathlib.Algebra.ContinuedFractions.TerminatedStable
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Ring
#align_import algebra.continued_fractions.convergents_equiv from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40a... | Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean | 134 | 150 | theorem squashSeq_succ_n_tail_eq_squashSeq_tail_n :
(squashSeq s (n + 1)).tail = squashSeq s.tail n := by |
cases s_succ_succ_nth_eq : s.get? (n + 2) with
| none =>
cases s_succ_nth_eq : s.get? (n + 1) <;>
simp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq]
| some gp_succ_succ_n =>
obtain β¨gp_succ_n, s_succ_nth_eqβ© : β gp_succ_n, s.get? (n + 1) = some gp_succ_n :=
s.ge_s... | [
" squashSeq s n = s",
" (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }",
" (squashSeq s n).get? m = s.get? m",
" (squashSeq s (n + 1)).tail = squashSeq s.tail n",
" (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m"
] | [
" squashSeq s n = s",
" (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }",
" (squashSeq s n).get? m = s.get? m"
] |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function ... | Mathlib/Algebra/Field/Basic.lean | 37 | 37 | theorem same_add_div (h : b β 0) : (b + a) / b = 1 + a / b := by | rw [β div_self h, add_div]
| [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b"
] | [
" (a + b) / c = a / c + b / c"
] |
import Mathlib.Analysis.Normed.Group.Basic
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace
import Mathlib.LinearAlgebra.AffineSpace.Midpoint
#align_import analysis.normed.group.add_torsor from "leanprover-community/mathlib"@"837f72de63ad6cd96519cde5f1ffd5ed8d280ad0"
noncomputable section
open NNReal Topo... | Mathlib/Analysis/Normed/Group/AddTorsor.lean | 114 | 116 | theorem dist_vadd_left (v : V) (x : P) : dist (v +α΅₯ x) x = βvβ := by |
-- porting note (#10745): was `simp [dist_eq_norm_vsub V _ x]`
rw [dist_eq_norm_vsub V _ x, vadd_vsub]
| [
" dist (c +α΅₯ x) (c +α΅₯ y) = dist x y",
" dist (vβ +α΅₯ x) (vβ +α΅₯ x) = dist vβ vβ",
" dist (v +α΅₯ x) x = βvβ"
] | [
" dist (c +α΅₯ x) (c +α΅₯ y) = dist x y",
" dist (vβ +α΅₯ x) (vβ +α΅₯ x) = dist vβ vβ"
] |
import Mathlib.Order.Filter.Basic
import Mathlib.Data.Set.Countable
#align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
open Set Filter
open Filter
variable {ΞΉ : Sort*} {Ξ± Ξ² : Type*}
class CountableInterFilter (l : Filter Ξ±) : Prop where
... | Mathlib/Order/Filter/CountableInter.lean | 58 | 62 | theorem countable_bInter_mem {ΞΉ : Type*} {S : Set ΞΉ} (hS : S.Countable) {s : β i β S, Set Ξ±} :
(β i, β hi : i β S, s i βΉ_βΊ) β l β β i, β hi : i β S, s i βΉ_βΊ β l := by |
rw [biInter_eq_iInter]
haveI := hS.toEncodable
exact countable_iInter_mem.trans Subtype.forall
| [
" β i, β (hi : i β S), s i hi β l β β (i : ΞΉ) (hi : i β S), s i hi β l",
" β x, s βx β― β l β β (i : ΞΉ) (hi : i β S), s i hi β l"
] | [] |
import Mathlib.Algebra.Polynomial.Coeff
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antid... | Mathlib/RingTheory/PowerSeries/Trunc.lean | 99 | 106 | theorem degree_trunc_lt (f : Rβ¦Xβ§) (n) : (trunc n f).degree < n := by |
rw [degree_lt_iff_coeff_zero]
intros
rw [coeff_trunc]
split_ifs with h
Β· rw [β not_le] at h
contradiction
Β· rfl
| [
" (trunc n Ο).coeff m = if m < n then (coeff R m) Ο else 0",
" (trunc n 0).coeff m = Polynomial.coeff 0 m",
" (if m < n then 0 else 0) = 0",
" 0 = 0",
" (trunc (n + 1) 1).coeff m = Polynomial.coeff 1 m",
" (if m < n + 1 then if m = 0 then 1 else 0 else 0) = if m = 0 then 1 else 0",
" 1 = 1",
" 0 = 1",... | [
" (trunc n Ο).coeff m = if m < n then (coeff R m) Ο else 0",
" (trunc n 0).coeff m = Polynomial.coeff 0 m",
" (if m < n then 0 else 0) = 0",
" 0 = 0",
" (trunc (n + 1) 1).coeff m = Polynomial.coeff 1 m",
" (if m < n + 1 then if m = 0 then 1 else 0 else 0) = if m = 0 then 1 else 0",
" 1 = 1",
" 0 = 1",... |
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic
import Mathlib.MeasureTheory.Integral.MeanInequalities
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9"
open Filter
open scoped ENNReal Topology
namespace MeasureTheory
variable ... | Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean | 26 | 33 | theorem snorm'_add_le {f g : Ξ± β E} (hf : AEStronglyMeasurable f ΞΌ) (hg : AEStronglyMeasurable g ΞΌ)
(hq1 : 1 β€ q) : snorm' (f + g) q ΞΌ β€ snorm' f q ΞΌ + snorm' g q ΞΌ :=
calc
(β«β» a, (β(f + g) aββ : ββ₯0β) ^ q βΞΌ) ^ (1 / q) β€
(β«β» a, ((fun a => (βf aββ : ββ₯0β)) + fun a => (βg aββ : ββ₯0β)) a ^ q βΞΌ) ^ (1 / ... |
gcongr with a
simp only [Pi.add_apply, β ENNReal.coe_add, ENNReal.coe_le_coe, nnnorm_add_le]
_ β€ snorm' f q ΞΌ + snorm' g q ΞΌ := ENNReal.lintegral_Lp_add_le hf.ennnorm hg.ennnorm hq1
| [
" (β«β» (a : Ξ±), ββ(f + g) aββ ^ q βΞΌ) ^ (1 / q) β€\n (β«β» (a : Ξ±), ((fun a => ββf aββ) + fun a => ββg aββ) a ^ q βΞΌ) ^ (1 / q)",
" ββ(f + g) aββ β€ ((fun a => ββf aββ) + fun a => ββg aββ) a"
] | [] |
import Mathlib.NumberTheory.FLT.Basic
import Mathlib.NumberTheory.PythagoreanTriples
import Mathlib.RingTheory.Coprime.Lemmas
import Mathlib.Tactic.LinearCombination
#align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
noncomputable section
open scope... | Mathlib/NumberTheory/FLT/Four.lean | 124 | 136 | theorem exists_odd_minimal {a b c : β€} (h : Fermat42 a b c) :
β a0 b0 c0, Minimal a0 b0 c0 β§ a0 % 2 = 1 := by |
obtain β¨a0, b0, c0, hfβ© := exists_minimal h
cases' Int.emod_two_eq_zero_or_one a0 with hap hap
Β· cases' Int.emod_two_eq_zero_or_one b0 with hbp hbp
Β· exfalso
have h1 : 2 β£ (Int.gcd a0 b0 : β€) :=
Int.dvd_gcd (Int.dvd_of_emod_eq_zero hap) (Int.dvd_of_emod_eq_zero hbp)
rw [Int.gcd_eq_one_iff... | [
" Fermat42 a b c β Fermat42 b a c",
" a β 0 β§ b β 0 β§ a ^ 4 + b ^ 4 = c ^ 2 β b β 0 β§ a β 0 β§ b ^ 4 + a ^ 4 = c ^ 2",
" a β 0 β§ b β 0 β§ b ^ 4 + a ^ 4 = c ^ 2 β b β 0 β§ a β 0 β§ b ^ 4 + a ^ 4 = c ^ 2",
" Fermat42 a b c β Fermat42 (k * a) (k * b) (k ^ 2 * c)",
" a β 0 β§ b β 0 β§ a ^ 4 + b ^ 4 = c ^ 2 β k * a β ... | [
" Fermat42 a b c β Fermat42 b a c",
" a β 0 β§ b β 0 β§ a ^ 4 + b ^ 4 = c ^ 2 β b β 0 β§ a β 0 β§ b ^ 4 + a ^ 4 = c ^ 2",
" a β 0 β§ b β 0 β§ b ^ 4 + a ^ 4 = c ^ 2 β b β 0 β§ a β 0 β§ b ^ 4 + a ^ 4 = c ^ 2",
" Fermat42 a b c β Fermat42 (k * a) (k * b) (k ^ 2 * c)",
" a β 0 β§ b β 0 β§ a ^ 4 + b ^ 4 = c ^ 2 β k * a β ... |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Geometry.Manifold.LocalInvariantProperties
#align_import geometry.manifold.cont_mdiff from "leanprover-community/mathlib"@"e5ab837fc252451f3eb9124ae6e7b6f57455e7b9"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scope... | Mathlib/Geometry/Manifold/ContMDiff/Defs.lean | 97 | 100 | theorem contDiffWithinAtProp_self_source {f : E β H'} {s : Set E} {x : E} :
ContDiffWithinAtProp π(π, E) I' n f s x β ContDiffWithinAt π n (I' β f) s x := by |
simp_rw [ContDiffWithinAtProp, modelWithCornersSelf_coe, range_id, inter_univ,
modelWithCornersSelf_coe_symm, CompTriple.comp_eq, preimage_id_eq, id_eq]
| [
" ContDiffWithinAtProp π(π, E) I' n f s x β ContDiffWithinAt π n (βI' β f) s x"
] | [] |
import Mathlib.CategoryTheory.Category.Grpd
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Homotopy.Path
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473... | Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean | 138 | 140 | theorem transReflReparamAux_mem_I (t : I) : transReflReparamAux t β I := by |
unfold transReflReparamAux
split_ifs <;> constructor <;> linarith [unitInterval.le_one t, unitInterval.nonneg t]
| [
" Continuous reflTransSymmAux",
" Continuous fun x => βx.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => βx.1 * 2 * βx.2",
" Continuous fun x => βx.1 * (2 - 2 * βx.2)",
" β (x : βI Γ βI), βx.2 = 1 / 2 β βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" ref... | [
" Continuous reflTransSymmAux",
" Continuous fun x => βx.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => βx.1 * 2 * βx.2",
" Continuous fun x => βx.1 * (2 - 2 * βx.2)",
" β (x : βI Γ βI), βx.2 = 1 / 2 β βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" βx.1 * 2 * βx.2 = βx.1 * (2 - 2 * βx.2)",
" ref... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
#align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open AffineMap AffineEquiv
section
variable (R : Type*) {V V' P P' : Type*} [Ring R] [Invertible (2 : R)] [AddCommGroup V]
[Modu... | Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean | 61 | 64 | theorem AffineEquiv.pointReflection_midpoint_left (x y : P) :
pointReflection R (midpoint R x y) x = y := by |
rw [midpoint, pointReflection_apply, lineMap_apply, vadd_vsub, vadd_vadd, β add_smul, β two_mul,
mul_invOf_self, one_smul, vsub_vadd]
| [
" (pointReflection R (midpoint R x y)) x = y"
] | [] |
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 | 116 | 118 | theorem measure_iUnion_null_iff {ΞΉ : Sort*} [Countable ΞΉ] {s : ΞΉ β Set Ξ±} :
ΞΌ (β i, s i) = 0 β β i, ΞΌ (s i) = 0 := by |
rw [β sUnion_range, measure_sUnion_null_iff (countable_range s), forall_mem_range]
| [
" ΞΌ (β 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.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option lin... | Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 94 | 96 | theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by |
delta AffineTargetMorphismProperty.toProperty; simp [*]
| [
" P.toProperty f β P f",
" (β (h : IsAffine Y), P f) β P f"
] | [] |
import Mathlib.Topology.EMetricSpace.Basic
#align_import topology.metric_space.metric_separated from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2"
open EMetric Set
noncomputable section
def IsMetricSeparated {X : Type*} [EMetricSpace X] (s t : Set X) :=
β r, r β 0 β§ β x β s, β y β... | Mathlib/Topology/MetricSpace/MetricSeparated.lean | 78 | 85 | theorem union_left {s'} (h : IsMetricSeparated s t) (h' : IsMetricSeparated s' t) :
IsMetricSeparated (s βͺ s') t := by |
rcases h, h' with β¨β¨r, r0, hrβ©, β¨r', r0', hr'β©β©
refine β¨min r r', ?_, fun x hx y hy => hx.elim ?_ ?_β©
Β· rw [β pos_iff_ne_zero] at r0 r0' β’
exact lt_min r0 r0'
Β· exact fun hx => (min_le_left _ _).trans (hr _ hx _ hy)
Β· exact fun hx => (min_le_right _ _).trans (hr' _ hx _ hy)
| [
" r = 0",
" IsMetricSeparated (s βͺ s') t",
" min r r' β 0",
" 0 < min r r'",
" x β s β min r r' β€ edist x y",
" x β s' β min r r' β€ edist x y"
] | [
" r = 0"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable sec... | Mathlib/RingTheory/IsAdjoinRoot.lean | 174 | 175 | theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 β Ideal.span ({f} : Set R[X]) := by |
rw [β h.ker_map, RingHom.mem_ker, h.map_repr]
| [
" (algebraMap R S) x = h.map (C x)",
" p β RingHom.ker h.map β f β£ p",
" h.map p = 0 β f β£ p",
" (aeval h.root) (C x) = h.map (C x)",
" (aeval h.root) (p + q) = h.map (p + q)",
" (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))",
" (aeval h.root) f = 0",
" h.repr 0 β Ideal.span {f}"
] | [
" (algebraMap R S) x = h.map (C x)",
" p β RingHom.ker h.map β f β£ p",
" h.map p = 0 β f β£ p",
" (aeval h.root) (C x) = h.map (C x)",
" (aeval h.root) (p + q) = h.map (p + q)",
" (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))",
" (aeval h.root) f = 0"
] |
import Mathlib.RingTheory.DedekindDomain.Ideal
import Mathlib.RingTheory.Valuation.ExtendToLocalization
import Mathlib.RingTheory.Valuation.ValuationSubring
import Mathlib.Topology.Algebra.ValuedField
import Mathlib.Algebra.Order.Group.TypeTags
#align_import ring_theory.dedekind_domain.adic_valuation from "leanprover... | Mathlib/RingTheory/DedekindDomain/AdicValuation.lean | 97 | 99 | theorem int_valuation_ne_zero (x : R) (hx : x β 0) : v.intValuationDef x β 0 := by |
rw [intValuationDef, if_neg hx]
exact WithZero.coe_ne_zero
| [
" v.intValuationDef x β 0",
" β(ofAdd (-β((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) β 0"
] | [] |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {Ξ± : Type*} [DecidableEq Ξ±] {π β¬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±}
open Finset
-- The namespace is here to distinguish fro... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 273 | 278 | theorem compression_idem (a : Ξ±) (π : Finset (Finset Ξ±)) : π a (π a π) = π a π := by |
ext s
refine mem_compression.trans β¨?_, fun h => Or.inl β¨h, erase_mem_compression_of_mem_compression hβ©β©
rintro (h | h)
Β· exact h.1
Β· cases h.1 (mem_compression_of_insert_mem_compression h.2)
| [
" False",
" s β π a π β s β π β§ s.erase a β π β¨ s β π β§ insert a s β π",
" s β π β§ s.erase a β π β¨ (β a_1 β π, a_1.erase a = s) β§ s β π β s β π β§ s.erase a β π β¨ insert a s β π β§ s β π",
" (β a_1 β π, a_1.erase a = s) β insert a s β π",
" insert a (t.erase a) β π",
" s.erase a β π a π",... | [
" False",
" s β π a π β s β π β§ s.erase a β π β¨ s β π β§ insert a s β π",
" s β π β§ s.erase a β π β¨ (β a_1 β π, a_1.erase a = s) β§ s β π β s β π β§ s.erase a β π β¨ insert a s β π β§ s β π",
" (β a_1 β π, a_1.erase a = s) β insert a s β π",
" insert a (t.erase a) β π",
" s.erase a β π a π",... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Tactic.NthRewrite
#align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
namespace Nat
theorem gcd_greatest {a b d : β} (hda : d β£ a) (hdb : d β£ b) (hd ... | Mathlib/Data/Nat/GCD/Basic.lean | 80 | 81 | theorem gcd_add_self_left (m n : β) : gcd (m + n) n = gcd m n := by |
rw [gcd_comm, gcd_add_self_right, gcd_comm]
| [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... | [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)"
] |
import Mathlib.Order.Atoms
import Mathlib.Order.OrderIsoNat
import Mathlib.Order.RelIso.Set
import Mathlib.Order.SupClosed
import Mathlib.Order.SupIndep
import Mathlib.Order.Zorn
import Mathlib.Data.Finset.Order
import Mathlib.Order.Interval.Set.OrderIso
import Mathlib.Data.Finite.Set
import Mathlib.Tactic.TFAE
#alig... | Mathlib/Order/CompactlyGenerated/Basic.lean | 110 | 149 | theorem isCompactElement_iff_le_of_directed_sSup_le (k : Ξ±) :
IsCompactElement k β
β s : Set Ξ±, s.Nonempty β DirectedOn (Β· β€ Β·) s β k β€ sSup s β β x : Ξ±, x β s β§ k β€ x := by |
classical
constructor
Β· intro hk s hne hdir hsup
obtain β¨t, htβ© := hk s hsup
-- certainly every element of t is below something in s, since βt β s.
have t_below_s : β x β t, β y β s, x β€ y := fun x hxt => β¨x, ht.left hxt, le_rflβ©
obtain β¨x, β¨hxs, hsupxβ©β© := Finset.sup_le_of_le_directe... | [
" IsCompactElement k β β (ΞΉ : Type u) (s : ΞΉ β Ξ±), k β€ iSup s β β t, k β€ t.sup s",
" IsCompactElement k β β (ΞΉ : Type u) (s : ΞΉ β Ξ±), k β€ iSup s β β t, k β€ t.sup s",
" β t, k β€ t.sup s",
" t.sup id β€ (Finset.image f Finset.univ).sup s",
" β b β t, id b β€ (Finset.image f Finset.univ).sup s",
" id b β€ (Fins... | [
" IsCompactElement k β β (ΞΉ : Type u) (s : ΞΉ β Ξ±), k β€ iSup s β β t, k β€ t.sup s",
" IsCompactElement k β β (ΞΉ : Type u) (s : ΞΉ β Ξ±), k β€ iSup s β β t, k β€ t.sup s",
" β t, k β€ t.sup s",
" t.sup id β€ (Finset.image f Finset.univ).sup s",
" β b β t, id b β€ (Finset.image f Finset.univ).sup s",
" id b β€ (Fins... |
import Mathlib.CategoryTheory.Idempotents.Basic
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
import Mathlib.CategoryTheory.Equivalence
#align_import category_theory.idempotents.karoubi from "leanprover-community/mathlib"@"200eda15d8ff5669854ff6bcc10aaf37cb70498f"
noncomputable section
open CategoryT... | Mathlib/CategoryTheory/Idempotents/Karoubi.lean | 117 | 118 | theorem hom_ext {P Q : Karoubi C} (f g : P βΆ Q) (h : f.f = g.f) : f = g := by |
simpa [hom_ext_iff] using h
| [
" P = Q",
" { X := Xβ, p := pβ, idem := idemβ } = Q",
" { X := XβΒΉ, p := pβΒΉ, idem := idemβΒΉ } = { X := Xβ, p := pβ, idem := idemβ }",
" { X := Xβ, p := pβΒΉ, idem := idemβΒΉ } = { X := Xβ, p := pβ, idem := idemβ }",
" 0 = P.p β« 0 β« Q.p",
" P.p β« f.f = f.f",
" f.f β« Q.p = f.f",
" P.p β« f.f = f.f β« Q.p",... | [
" P = Q",
" { X := Xβ, p := pβ, idem := idemβ } = Q",
" { X := XβΒΉ, p := pβΒΉ, idem := idemβΒΉ } = { X := Xβ, p := pβ, idem := idemβ }",
" { X := Xβ, p := pβΒΉ, idem := idemβΒΉ } = { X := Xβ, p := pβ, idem := idemβ }",
" 0 = P.p β« 0 β« Q.p",
" P.p β« f.f = f.f",
" f.f β« Q.p = f.f",
" P.p β« f.f = f.f β« Q.p",... |
import Mathlib.CategoryTheory.Sites.CompatiblePlus
import Mathlib.CategoryTheory.Sites.ConcreteSheafification
#align_import category_theory.sites.compatible_sheafification from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory.GrothendieckTopology
open CategoryThe... | Mathlib/CategoryTheory/Sites/CompatibleSheafification.lean | 118 | 125 | theorem whiskerRight_toSheafify_sheafifyCompIso_hom :
whiskerRight (J.toSheafify _) _ β« (J.sheafifyCompIso F P).hom = J.toSheafify _ := by |
dsimp [sheafifyCompIso]
erw [whiskerRight_comp, Category.assoc]
slice_lhs 2 3 => rw [plusCompIso_whiskerRight]
rw [Category.assoc, β J.plusMap_comp, whiskerRight_toPlus_comp_plusCompIso_hom, β
Category.assoc, whiskerRight_toPlus_comp_plusCompIso_hom]
rfl
| [
" (whiskeringLeft Cα΅α΅ D E).obj (J.sheafify P) β
(whiskeringLeft Cα΅α΅ D E).obj P β J.sheafification E",
" (whiskeringLeft Cα΅α΅ D E).obj (J.plusObj P) β J.plusFunctor E β
\n ((whiskeringLeft Cα΅α΅ D E).obj P β J.plusFunctor E) β J.plusFunctor E",
" (whiskeringLeft Cα΅α΅ D E).obj (J.plusObj P) β
(whiskeringLeft Cα΅α΅ D ... | [
" (whiskeringLeft Cα΅α΅ D E).obj (J.sheafify P) β
(whiskeringLeft Cα΅α΅ D E).obj P β J.sheafification E",
" (whiskeringLeft Cα΅α΅ D E).obj (J.plusObj P) β J.plusFunctor E β
\n ((whiskeringLeft Cα΅α΅ D E).obj P β J.plusFunctor E) β J.plusFunctor E",
" (whiskeringLeft Cα΅α΅ D E).obj (J.plusObj P) β
(whiskeringLeft Cα΅α΅ D ... |
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 | 121 | 124 | theorem permutationsAux2_snd_eq (t : Ξ±) (ts : List Ξ±) (r : List Ξ²) (ys : List Ξ±) (f : List Ξ± β Ξ²) :
(permutationsAux2 t ts r ys f).2 =
((permutationsAux2 t [] [] ys id).2.map fun x => f (x ++ ts)) ++ r := by |
rw [β permutationsAux2_append, map_permutationsAux2, permutationsAux2_comp_append]
| [
" (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.CategoryTheory.Subobject.Limits
#align_import algebra.homology.image_to_kernel from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u w
open CategoryTheory CategoryTheory.Limits
variable {ΞΉ : Type*}
variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V]
o... | Mathlib/Algebra/Homology/ImageToKernel.lean | 82 | 85 | theorem factorThruImageSubobject_comp_imageToKernel (w : f β« g = 0) :
factorThruImageSubobject f β« imageToKernel f g w = factorThruKernelSubobject g f w := by |
ext
simp
| [
" kernel.lift g f w β« kernel.ΞΉ g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) β―)",
" imageToKernel f g w β« (kernelSubobject g).arrow = (imageSubobject f).arrow",
" (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x",
" factorThruIma... | [
" kernel.lift g f w β« kernel.ΞΉ g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) β―)",
" imageToKernel f g w β« (kernelSubobject g).arrow = (imageSubobject f).arrow",
" (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Deprecated.Subring
#align_import deprecated.subfield from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc"
variable {F : Type*} [Field F] (S : Set F)
structure IsSubfield extends IsSubring S : Prop where
inv_mem : β {x : F}, x β S β xβ»... | Mathlib/Deprecated/Subfield.lean | 46 | 53 | theorem IsSubfield.pow_mem {a : F} {n : β€} {s : Set F} (hs : IsSubfield s) (h : a β s) :
a ^ n β s := by |
cases' n with n n
Β· suffices a ^ (n : β€) β s by exact this
rw [zpow_natCast]
exact hs.toIsSubring.toIsSubmonoid.pow_mem h
Β· rw [zpow_negSucc]
exact hs.inv_mem (hs.toIsSubring.toIsSubmonoid.pow_mem h)
| [
" x / y β S",
" x * yβ»ΒΉ β S",
" a ^ n β s",
" a ^ Int.ofNat n β s",
" a ^ βn β s",
" a ^ Int.negSucc n β s",
" (a ^ (n + 1))β»ΒΉ β s"
] | [
" x / y β S",
" x * yβ»ΒΉ β S"
] |
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Geometry.Euclidean.PerpBisector
import Mathlib.Algebra.QuadraticDiscriminant
#align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
noncomputable section
open scoped Classical
open ... | Mathlib/Geometry/Euclidean/Basic.lean | 78 | 87 | theorem inner_weightedVSub {ΞΉβ : Type*} {sβ : Finset ΞΉβ} {wβ : ΞΉβ β β} (pβ : ΞΉβ β P)
(hβ : β i β sβ, wβ i = 0) {ΞΉβ : Type*} {sβ : Finset ΞΉβ} {wβ : ΞΉβ β β} (pβ : ΞΉβ β P)
(hβ : β i β sβ, wβ i = 0) :
βͺsβ.weightedVSub pβ wβ, sβ.weightedVSub pβ wββ« =
(-β iβ β sβ, β iβ β sβ, wβ iβ * wβ iβ * (dist (pβ iβ) (p... |
rw [Finset.weightedVSub_apply, Finset.weightedVSub_apply,
inner_sum_smul_sum_smul_of_sum_eq_zero _ hβ _ hβ]
simp_rw [vsub_sub_vsub_cancel_right]
rcongr (iβ iβ) <;> rw [dist_eq_norm_vsub V (pβ iβ) (pβ iβ)]
| [
" dist p1 (midpoint β p1 p2) = dist p2 (midpoint β p1 p2)",
" βͺ(sβ.weightedVSub pβ) wβ, (sβ.weightedVSub pβ) wββ«_β =\n (-β iβ β sβ, β iβ β sβ, wβ iβ * wβ iβ * (dist (pβ iβ) (pβ iβ) * dist (pβ iβ) (pβ iβ))) / 2",
" (-β iβ β sβ,\n β iβ β sβ,\n wβ iβ * wβ iβ *\n (βpβ iβ -α΅₯ Class... | [
" dist p1 (midpoint β p1 p2) = dist p2 (midpoint β p1 p2)"
] |
import Mathlib.Algebra.ContinuedFractions.Basic
import Mathlib.Algebra.GroupWithZero.Basic
#align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
section General
variable {Ξ± : Type*} {g : Gen... | Mathlib/Algebra/ContinuedFractions/Translations.lean | 49 | 50 | theorem part_denom_none_iff_s_none : g.partialDenominators.get? n = none β g.s.get? n = none := by |
cases s_nth_eq : g.s.get? n <;> simp [partialDenominators, s_nth_eq]
| [
" g.TerminatedAt n β g.s.TerminatedAt n",
" g.TerminatedAt n β g.s.get? n = none",
" g.partialNumerators.get? n = none β g.s.get? n = none",
" g.partialNumerators.get? n = none β none = none",
" g.partialNumerators.get? n = none β some valβ = none",
" g.TerminatedAt n β g.partialNumerators.get? n = none",... | [
" g.TerminatedAt n β g.s.TerminatedAt n",
" g.TerminatedAt n β g.s.get? n = none",
" g.partialNumerators.get? n = none β g.s.get? n = none",
" g.partialNumerators.get? n = none β none = none",
" g.partialNumerators.get? n = none β some valβ = none",
" g.TerminatedAt n β g.partialNumerators.get? n = none"
... |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : β β β β β β β
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 ... | Mathlib/Data/Nat/Hyperoperation.lean | 82 | 88 | theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by |
ext m k
induction' k with bn bih
Β· rw [hyperoperation_ge_three_eq_one]
exact (pow_zero m).symm
Β· rw [hyperoperation_recursion, hyperoperation_two, bih]
exact (pow_succ' m bn).symm
| [
" hyperoperation 0 m k = k.succ",
" hyperoperation (n + 3) m 0 = 1",
" hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)",
" hyperoperation 1 = fun x x_1 => x + x_1",
" hyperoperation 1 m k = m + k",
" hyperoperation 1 m 0 = m + 0",
" hyperoperation 1 m (bn + 1) = m + (b... | [
" hyperoperation 0 m k = k.succ",
" hyperoperation (n + 3) m 0 = 1",
" hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)",
" hyperoperation 1 = fun x x_1 => x + x_1",
" hyperoperation 1 m k = m + k",
" hyperoperation 1 m 0 = m + 0",
" hyperoperation 1 m (bn + 1) = m + (b... |
import Mathlib.Data.Matrix.Kronecker
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.TensorProduct.Basis
#align_import linear_algebra.tensor_product.matrix from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081"
variable {R : Type*} {M N P M' N' : Type*} {ΞΉ ΞΊ Ο ΞΉ' ΞΊ' ... | Mathlib/LinearAlgebra/TensorProduct/Matrix.lean | 57 | 64 | theorem TensorProduct.toMatrix_comm :
toMatrix (bM.tensorProduct bN) (bN.tensorProduct bM) (TensorProduct.comm R M N) =
(1 : Matrix (ΞΉ Γ ΞΊ) (ΞΉ Γ ΞΊ) R).submatrix Prod.swap _root_.id := by |
ext β¨i, jβ© β¨i', j'β©
simp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, TensorProduct.comm_tmul,
Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply, Prod.swap_prod_mk, _root_.id,
Basis.repr_self_apply, Matrix.one_apply, Prod.ext_iff, ite_and, @eq_comm _ i', @eq_comm _ j']
sp... | [
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)",
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa... | [
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)",
" (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Sum
#align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open scoped Classical
universe u v
namespace ... | Mathlib/Combinatorics/HalesJewett.lean | 204 | 207 | theorem prod_apply {Ξ± ΞΉ ΞΉ'} (l : Line Ξ± ΞΉ) (l' : Line Ξ± ΞΉ') (x : Ξ±) :
l.prod l' x = Sum.elim (l x) (l' x) := by |
funext i
cases i <;> rfl
| [
" Inhabited (ColorFocused C)",
" h β 0 β (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) β―.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... | [
" Inhabited (ColorFocused C)",
" h β 0 β (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) β―.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... |
import Mathlib.CategoryTheory.Closed.Cartesian
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
#align_import category_theory.closed.functor from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184"
noncomputable secti... | Mathlib/CategoryTheory/Closed/Functor.lean | 83 | 88 | theorem expComparison_ev (A B : C) :
Limits.prod.map (π (F.obj A)) ((expComparison F A).app B) β« (exp.ev (F.obj A)).app (F.obj B) =
inv (prodComparison F _ _) β« F.map ((exp.ev _).app _) := by |
convert transferNatTrans_counit _ _ (prodComparisonNatIso F A).inv B using 2
apply IsIso.inv_eq_of_hom_inv_id -- Porting note: was `ext`
simp only [Limits.prodComparisonNatIso_inv, asIso_inv, NatIso.isIso_inv_app, IsIso.hom_inv_id]
| [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B β« prod.map (h.counit.app A) (π (L.obj B)))",
" prod.map (π (F.obj A)) ((expComparison F A).app B) β« (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A βΉ B)) β« F.map ((exp.ev A).app B)",
" inv (prodComparison F ... | [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B β« prod.map (h.counit.app A) (π (L.obj B)))"
] |
import Mathlib.Combinatorics.SimpleGraph.Coloring
#align_import combinatorics.simple_graph.partition from "leanprover-community/mathlib"@"2303b3e299f1c75b07bceaaac130ce23044d1386"
universe u v
namespace SimpleGraph
variable {V : Type u} (G : SimpleGraph V)
structure Partition where
parts : Set (Set V)
... | Mathlib/Combinatorics/SimpleGraph/Partition.lean | 88 | 90 | theorem partOfVertex_mem (v : V) : P.partOfVertex v β P.parts := by |
obtain β¨h, -β© := (P.isPartition.2 v).choose_spec.1
exact h
| [
" P.partOfVertex v β P.parts"
] | [] |
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing
import Mathlib.AlgebraicGeometry.OpenImmersion
#align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
set_option linter.uppercaseLean3 false
noncomputable section
universe u
open Topologica... | Mathlib/AlgebraicGeometry/Gluing.lean | 302 | 304 | theorem gluedCoverT'_fst_snd (x y z : π°.J) :
gluedCoverT' π° x y z β« pullback.fst β« pullback.snd = pullback.snd β« pullback.snd := by |
delta gluedCoverT'; simp
| [
" pullback pullback.fst pullback.fst βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback (pullback.fst β« π°.map y) (π°.map z)",
" (pullback.fst β« π°.map x) β« π X = (pullbackSym... | [
" pullback pullback.fst pullback.fst βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback (pullback.fst β« π°.map y) (π°.map z)",
" (pullback.fst β« π°.map x) β« π X = (pullbackSym... |
import Mathlib.Order.PartialSups
#align_import order.disjointed from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable {Ξ± Ξ² : Type*}
section GeneralizedBooleanAlgebra
variable [GeneralizedBooleanAlgebra Ξ±]
def disjointed (f : β β Ξ±) : β β Ξ±
| 0 => f 0
| n + 1 => f (n + 1) ... | Mathlib/Order/Disjointed.lean | 74 | 80 | theorem disjoint_disjointed (f : β β Ξ±) : Pairwise (Disjoint on disjointed f) := by |
refine (Symmetric.pairwise_on Disjoint.symm _).2 fun m n h => ?_
cases n
Β· exact (Nat.not_lt_zero _ h).elim
exact
disjoint_sdiff_self_right.mono_left
((disjointed_le f m).trans (le_partialSups_of_le f (Nat.lt_add_one_iff.1 h)))
| [
" disjointed β€ id",
" disjointed f n β€ id f n",
" disjointed f 0 β€ id f 0",
" disjointed f (nβ + 1) β€ id f (nβ + 1)",
" Pairwise (Disjoint on disjointed f)",
" Disjoint (disjointed f m) (disjointed f n)",
" Disjoint (disjointed f m) (disjointed f 0)",
" Disjoint (disjointed f m) (disjointed f (nβ + 1)... | [
" disjointed β€ id",
" disjointed f n β€ id f n",
" disjointed f 0 β€ id f 0",
" disjointed f (nβ + 1) β€ id f (nβ + 1)"
] |
import Mathlib.Logic.Equiv.Option
import Mathlib.Order.RelIso.Basic
import Mathlib.Order.Disjoint
import Mathlib.Order.WithBot
import Mathlib.Tactic.Monotonicity.Attr
import Mathlib.Util.AssertExists
#align_import order.hom.basic from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
open ... | Mathlib/Order/Hom/Basic.lean | 180 | 182 | theorem map_inv_le_iff (f : F) {a : Ξ±} {b : Ξ²} : EquivLike.inv f b β€ a β b β€ f a := by |
convert (map_le_map_iff f (a := EquivLike.inv f b) (b := a)).symm
exact (EquivLike.right_inv f _).symm
| [
" EquivLike.inv f b β€ a β b β€ f a",
" b = f (EquivLike.inv f b)"
] | [] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 146 | 150 | theorem edgeDensity_add_edgeDensity_compl (hs : s.Nonempty) (ht : t.Nonempty) :
edgeDensity r s t + edgeDensity (fun x y β¦ Β¬r x y) s t = 1 := by |
rw [edgeDensity, edgeDensity, div_add_div_same, div_eq_one_iff_eq]
Β· exact mod_cast card_interedges_add_card_interedges_compl r s t
Β· exact mod_cast (mul_pos hs.card_pos ht.card_pos).ne'
| [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
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 | 256 | 261 | theorem mono_iff_injective {X Y : Type u} (f : X βΆ Y) : Mono f β Function.Injective f := by |
constructor
Β· intro H x x' h
rw [β homOfElement_eq_iff] at h β’
exact (cancel_mono f).mp h
Β· exact fun H => β¨fun g g' h => H.comp_left hβ©
| [
" f = g",
" f x = g x",
" Mono (βΎf)",
" βΎf β« inv (βΎf) = π Ξ±",
" x = y β homOfElement x = homOfElement y",
" Mono f β Function.Injective f",
" Mono f β Function.Injective f",
" x = x'",
" homOfElement x = homOfElement x'",
" Function.Injective f β Mono f"
] | [
" f = g",
" f x = g x",
" Mono (βΎf)",
" βΎf β« inv (βΎf) = π Ξ±",
" x = y β homOfElement x = homOfElement y"
] |
import Mathlib.Data.Real.Basic
#align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Real
noncomputable def sign (r : β) : β :=
if r < 0 then -1 else if 0 < r then 1 else 0
#align real.sign Real.sign
theorem sign_of_neg {r : β} (hr : r < 0) : si... | Mathlib/Data/Real/Sign.lean | 64 | 71 | theorem sign_eq_zero_iff {r : β} : sign r = 0 β r = 0 := by |
refine β¨fun h => ?_, fun h => h.symm βΈ sign_zeroβ©
obtain hn | rfl | hp := lt_trichotomy r (0 : β)
Β· rw [sign_of_neg hn, neg_eq_zero] at h
exact (one_ne_zero h).elim
Β· rfl
Β· rw [sign_of_pos hp] at h
exact (one_ne_zero h).elim
| [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 β¨ r.sign = 0 β¨ r.sign = 1",
" sign 0 = -1 β¨ sign 0 = 0 β¨ sign 0 = 1",
" r.sign = 0 β r = 0",
" r = 0",
" 0 = 0"
] | [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 β¨ r.sign = 0 β¨ r.sign = 1",
" sign 0 = -1 β¨ sign 0 = 0 β¨ sign 0 = 1"
] |
import Mathlib.Algebra.Lie.Abelian
#align_import algebra.lie.tensor_product from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec"
suppress_compilation
universe u v w wβ wβ wβ
variable {R : Type u} [CommRing R]
open LieModule
namespace TensorProduct
open scoped TensorProduct
namespace... | Mathlib/Algebra/Lie/TensorProduct.lean | 115 | 122 | theorem coe_liftLie_eq_lift_coe (f : M βββ
R,Lβ N ββ[R] P) :
β(liftLie R L M N P f) = lift R L M N P f := by |
suffices (liftLie R L M N P f : M β[R] N ββ[R] P) = lift R L M N P f by
rw [β this, LieModuleHom.coe_toLinearMap]
ext m n
simp only [liftLie, LinearEquiv.trans_apply, LieModuleEquiv.coe_to_linearEquiv,
coe_linearMap_maxTrivLinearMapEquivLieModuleHom, coe_maxTrivEquiv_apply,
coe_linearMap_maxTrivLinea... | [
" β
x + y, tβ = β
x, tβ + β
y, tβ",
" (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.rTensor N ((toEnd R L M) y)) t +\n ((LinearMap.lTensor M ((toEnd R L N) x)) t + (LinearMap.lTensor M ((toEnd R L N) y)) t) =\n (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.lTensor M ((toEnd R L N) x)) t +\n... | [
" β
x + y, tβ = β
x, tβ + β
y, tβ",
" (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.rTensor N ((toEnd R L M) y)) t +\n ((LinearMap.lTensor M ((toEnd R L N) x)) t + (LinearMap.lTensor M ((toEnd R L N) y)) t) =\n (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.lTensor M ((toEnd R L N) x)) t +\n... |
import Mathlib.Probability.ConditionalProbability
import Mathlib.MeasureTheory.Measure.Count
#align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4"
noncomputable section
open ProbabilityTheory
open MeasureTheory MeasurableSpace
namespace ProbabilityT... | Mathlib/Probability/CondCount.lean | 59 | 59 | theorem condCount_empty_meas : (condCount β
: Measure Ξ©) = 0 := by | simp [condCount]
| [
" condCount β
= 0"
] | [] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.LinearAlgebra.Vandermonde
import Mathlib.RingTheory.Polynomial.Basic
#align_import linear_algebra.lagrange from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Polynomial
section PolynomialDetermination
namespace Poly... | Mathlib/LinearAlgebra/Lagrange.lean | 55 | 60 | theorem eq_of_degree_sub_lt_of_eval_finset_eq (degree_fg_lt : (f - g).degree < s.card)
(eval_fg : β x β s, f.eval x = g.eval x) : f = g := by |
rw [β sub_eq_zero]
refine eq_zero_of_degree_lt_of_eval_finset_eq_zero _ degree_fg_lt ?_
simp_rw [eval_sub, sub_eq_zero]
exact eval_fg
| [
" f = 0",
" (degreeLTEquiv R s.card) β¨f, degree_f_ltβ© = 0",
" f = g",
" f - g = 0",
" β x β s, eval x (f - g) = 0",
" β x β s, eval x f = eval x g"
] | [
" f = 0",
" (degreeLTEquiv R s.card) β¨f, degree_f_ltβ© = 0"
] |
import Mathlib.Topology.Category.TopCat.Limits.Products
#align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
-- Porting note: every ML3 decl has an uppercase letter
set_option linter.uppercaseLean3 false
open TopologicalSpace
open Cat... | Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean | 115 | 117 | theorem pullbackIsoProdSubtype_inv_snd (f : X βΆ Z) (g : Y βΆ Z) :
(pullbackIsoProdSubtype f g).inv β« pullback.snd = pullbackSnd f g := by |
simp [pullbackCone, pullbackIsoProdSubtype]
| [
" Continuous (Prod.fst β Subtype.val)",
" Continuous Prod.fst",
" Continuous Subtype.val",
" Continuous (Prod.snd β Subtype.val)",
" Continuous Prod.snd",
" pullbackFst f g β« f = pullbackSnd f g β« g",
" { toFun := fun x => (βx).1, continuous_toFun := β― } β« f = { toFun := fun x => (βx).2, continuous_toFu... | [
" Continuous (Prod.fst β Subtype.val)",
" Continuous Prod.fst",
" Continuous Subtype.val",
" Continuous (Prod.snd β Subtype.val)",
" Continuous Prod.snd",
" pullbackFst f g β« f = pullbackSnd f g β« g",
" { toFun := fun x => (βx).1, continuous_toFun := β― } β« f = { toFun := fun x => (βx).2, continuous_toFu... |
import Mathlib.Order.Interval.Finset.Nat
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
assert_not_exists MonoidWithZero
open Finset Fin Function
namespace Fin
variable (n : β)
instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) :=
Orde... | Mathlib/Order/Interval/Finset/Fin.lean | 148 | 149 | theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by |
rw [β card_Ioo, Fintype.card_ofFinset]
| [
" map valEmbedding (Icc a b) = Icc βa βb",
" map valEmbedding (Ico a b) = Ico βa βb",
" map valEmbedding (Ioc a b) = Ioc βa βb",
" map valEmbedding (Ioo a b) = Ioo βa βb",
" (Icc a b).card = βb + 1 - βa",
" (Ico a b).card = βb - βa",
" (Ioc a b).card = βb - βa",
" (Ioo a b).card = βb - βa - 1",
" (u... | [
" map valEmbedding (Icc a b) = Icc βa βb",
" map valEmbedding (Ico a b) = Ico βa βb",
" map valEmbedding (Ioc a b) = Ioc βa βb",
" map valEmbedding (Ioo a b) = Ioo βa βb",
" (Icc a b).card = βb + 1 - βa",
" (Ico a b).card = βb - βa",
" (Ioc a b).card = βb - βa",
" (Ioo a b).card = βb - βa - 1",
" (u... |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.Nat.Totient
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Subgroup.Simple
import Mathlib.Tactic.Group
import Mathlib.GroupTheory.Exponent
#align_import group_theory.specific_groups.cyclic from "leanprover-community/mathli... | Mathlib/GroupTheory/SpecificGroups/Cyclic.lean | 110 | 116 | theorem MonoidHom.map_cyclic {G : Type*} [Group G] [h : IsCyclic G] (Ο : G β* G) :
β m : β€, β g : G, Ο g = g ^ m := by |
obtain β¨h, hGβ© := IsCyclic.exists_generator (Ξ± := G)
obtain β¨m, hmβ© := hG (Ο h)
refine β¨m, fun g => ?_β©
obtain β¨n, rflβ© := hG g
rw [MonoidHom.map_zpow, β hm, β zpow_mul, β zpow_mul']
| [
" x β zpowers 1",
" 1 β zpowers 1",
" Nontrivial Ξ±",
" IsCyclic Ξ±",
" β m, β (g : G), Ο g = g ^ m",
" Ο g = g ^ m",
" Ο ((fun x => h ^ x) n) = (fun x => h ^ x) n ^ m"
] | [
" x β zpowers 1",
" 1 β zpowers 1",
" Nontrivial Ξ±",
" IsCyclic Ξ±"
] |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
#align list.length_enum_from List.enumFrom_length
#align list.length_enum List.enum_length
@[simp]
theorem get?_enumFrom :
β n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a)
| n, [], m => rfl
| n, a :: l, 0 =... | Mathlib/Data/List/Enum.lean | 48 | 50 | theorem get_enumFrom (l : List Ξ±) (n) (i : Fin (l.enumFrom n).length) :
(l.enumFrom n).get i = (n + i, l.get (i.cast enumFrom_length)) := by |
simp [get_eq_get?]
| [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... | [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)"
] |
import Mathlib.Order.Filter.Lift
import Mathlib.Order.Filter.AtTopBot
#align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Filter
open Filter Set
variable {Ξ± Ξ² : Type*} {ΞΉ : Sort*}
namespace Filter
variable {l l' la : Filter Ξ±} {lb : Filter ... | Mathlib/Order/Filter/SmallSets.lean | 116 | 117 | theorem smallSets_top : (β€ : Filter Ξ±).smallSets = β€ := by |
rw [smallSets, lift'_top, powerset_univ, principal_univ]
| [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = β¨
b β f.sets, π (π« b)",
" GaloisConnection (fun L => L.bind π) smallSets",
" (fun L => L.bind π) L β€ l β L β€ l.smallSets",
" L.bind π β€ l β l.sets β powerset β»ΒΉ' L.sets",
" Tendsto (fun x => f '' x) la.smallSets lb.smallSets β Tends... | [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = β¨
b β f.sets, π (π« b)",
" GaloisConnection (fun L => L.bind π) smallSets",
" (fun L => L.bind π) L β€ l β L β€ l.smallSets",
" L.bind π β€ l β l.sets β powerset β»ΒΉ' L.sets",
" Tendsto (fun x => f '' x) la.smallSets lb.smallSets β Tends... |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.Data.Complex.Orientation
import Mathlib.Tactic.LinearCombination
#align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af"
non... | Mathlib/Analysis/InnerProductSpace/TwoDim.lean | 146 | 147 | theorem areaForm_le (x y : E) : Ο x y β€ βxβ * βyβ := by |
simpa [areaForm_to_volumeForm, Fin.prod_univ_succ] using o.volumeForm_apply_le ![x, y]
| [
" E ββ[β] E ββ[β] β",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 β 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] β β(Equiv.swap 0 1)",
" ![x, y] ... | [
" E ββ[β] E ββ[β] β",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 β 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] β β(Equiv.swap 0 1)",
" ![x, y] ... |
import Mathlib.Algebra.Regular.Basic
import Mathlib.Algebra.Ring.Defs
#align_import algebra.ring.regular from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
variable {Ξ± : Type*}
theorem isLeftRegular_of_non_zero_divisor [NonUnitalNonAssocRing Ξ±] (k : Ξ±)
(h : β x : Ξ±, k * x = 0 β x... | Mathlib/Algebra/Ring/Regular.lean | 28 | 31 | theorem isRightRegular_of_non_zero_divisor [NonUnitalNonAssocRing Ξ±] (k : Ξ±)
(h : β x : Ξ±, x * k = 0 β x = 0) : IsRightRegular k := by |
refine fun x y (h' : x * k = y * k) => sub_eq_zero.mp (h _ ?_)
rw [sub_mul, sub_eq_zero, h']
| [
" IsLeftRegular k",
" k * (x - y) = 0",
" IsRightRegular k",
" (x - y) * k = 0"
] | [
" IsLeftRegular k",
" k * (x - y) = 0"
] |
import Mathlib.Algebra.Algebra.Unitization
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
suppress_compilation
variable (π A : Type*) [NontriviallyNormedField π] [NonUnitalNormedRing A]
variable [NormedSpace π A] [IsScalarTower π A A] [SMulCommClass π A A]
open ContinuousLinearMap
namespace Unitizati... | Mathlib/Analysis/NormedSpace/Unitization.lean | 149 | 165 | theorem lipschitzWith_addEquiv :
LipschitzWith 2 (Unitization.addEquiv π A) := by |
rw [β Real.toNNReal_ofNat]
refine AddMonoidHomClass.lipschitz_of_bound (Unitization.addEquiv π A) 2 fun x => ?_
rw [norm_eq_sup, Prod.norm_def]
refine max_le ?_ ?_
Β· rw [sup_eq_max, mul_max_of_nonneg _ _ (zero_le_two : (0 : β) β€ 2)]
exact le_max_of_le_left ((le_add_of_nonneg_left (norm_nonneg _)).trans_... | [
" (x.fst + 0, (lift (NonUnitalAlgHom.Lmul π A)).toRingHom x) =\n (x.fst, (algebraMap π (A βL[π] A)) x.fst + (mul π A) x.snd)",
" (x.fst, (lift (NonUnitalAlgHom.Lmul π A)).toRingHom x) = (x.fst, (algebraMap π (A βL[π] A)) x.fst + (mul π A) x.snd)",
" Function.Injective β(splitMul π A)",
" β (a : Un... | [
" (x.fst + 0, (lift (NonUnitalAlgHom.Lmul π A)).toRingHom x) =\n (x.fst, (algebraMap π (A βL[π] A)) x.fst + (mul π A) x.snd)",
" (x.fst, (lift (NonUnitalAlgHom.Lmul π A)).toRingHom x) = (x.fst, (algebraMap π (A βL[π] A)) x.fst + (mul π A) x.snd)",
" Function.Injective β(splitMul π A)",
" β (a : Un... |
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 | 86 | 89 | theorem expChar_one_of_char_zero (q : β) [hp : CharP R 0] [hq : ExpChar R q] : q = 1 := by |
cases' hq with q hq_one hq_prime hq_hchar
Β· rfl
Β· exact False.elim <| hq_prime.ne_zero <| hq_hchar.eq R hp
| [
" 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",
" q = 1",
" 1 = 1"
] | [
" 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.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : β}
-- @... | Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 87 | 89 | theorem inv_logb_mul_base {a b : β} (hβ : a β 0) (hβ : b β 0) (c : β) :
(logb (a * b) c)β»ΒΉ = (logb a c)β»ΒΉ + (logb b c)β»ΒΉ := by |
simp_rw [inv_logb]; exact logb_mul hβ hβ
| [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb xβ»ΒΉ = -b.logb x",
" (a.logb b)β»ΒΉ = b.logb a",
" ((a * b).logb c)β»ΒΉ = (a.logb c)β»ΒΉ + (b.logb c)β»ΒΉ",
" c.logb ... | [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb xβ»ΒΉ = -b.logb x",
" (a.logb b)β»ΒΉ = b.logb a"
] |
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace
import Mathlib.Algebra.Category.Ring.Constructions
import Mathlib.Geometry.RingedSpace.OpenImmersion
import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
#align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprov... | Mathlib/Geometry/RingedSpace/LocallyRingedSpace/HasColimits.lean | 214 | 223 | theorem imageBasicOpen_image_open :
IsOpen ((coequalizer.Ο f.1 g.1).base '' (imageBasicOpen f g U s).1) := by |
rw [β (TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget _) f.1
g.1)).isOpen_preimage, TopCat.coequalizer_isOpen_iff, β Set.preimage_comp]
erw [β TopCat.coe_comp]
rw [PreservesCoequalizer.iso_hom, ΞΉ_comp_coequalizerComparison]
dsimp only [SheafedSpace.forget]
-- Porting note (#11224): chan... | [
" IsLocalRingHom ((coequalizer.Ο f.val g.val).c.app { unop := U })",
" IsLocalRingHom\n ((coequalizer.Ο (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) β«\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ... | [
" IsLocalRingHom ((coequalizer.Ο f.val g.val).c.app { unop := U })",
" IsLocalRingHom\n ((coequalizer.Ο (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) β«\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ... |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
#align list.length_enum_from List.enumFrom_length
#align list.length_enum List.enum_length
@[simp]
theorem get?_enumFrom :
β n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a)
| n, [], m => rfl
| n, a :: l, 0 =... | Mathlib/Data/List/Enum.lean | 30 | 31 | theorem get?_enum (l : List Ξ±) (n) : get? (enum l) n = (get? l n).map fun a => (n, a) := by |
rw [enum, get?_enumFrom, Nat.zero_add]
| [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)"
] | [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))"
] |
import Mathlib.CategoryTheory.Subobject.MonoOver
import Mathlib.CategoryTheory.Skeletal
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.Tactic.ApplyFun
import Mathlib.Tactic.CategoryTheory.Elementwise
#align_import category_theory.subobject.basic from "leanprover-community/mathlib"@"70fd9563a21e7b... | Mathlib/CategoryTheory/Subobject/Basic.lean | 585 | 588 | theorem map_comp (f : X βΆ Y) (g : Y βΆ Z) [Mono f] [Mono g] (x : Subobject X) :
(map (f β« g)).obj x = (map g).obj ((map f).obj x) := by |
induction' x using Quotient.inductionOn' with t
exact Quotient.sound β¨(MonoOver.mapComp _ _).app tβ©
| [
" PartialOrder (Subobject X)",
" PartialOrder (ThinSkeleton (MonoOver X))",
" π (Subobject A) β
lower e.functor β lower e.inverse",
" π (Subobject A) = lower e.functor β lower e.inverse",
" π (Subobject A) = ThinSkeleton.map (π (MonoOver A))",
" lower e.functor β lower e.inverse = ThinSkeleton.map (e.... | [
" PartialOrder (Subobject X)",
" PartialOrder (ThinSkeleton (MonoOver X))",
" π (Subobject A) β
lower e.functor β lower e.inverse",
" π (Subobject A) = lower e.functor β lower e.inverse",
" π (Subobject A) = ThinSkeleton.map (π (MonoOver A))",
" lower e.functor β lower e.inverse = ThinSkeleton.map (e.... |
import Mathlib.Topology.ContinuousOn
import Mathlib.Order.Minimal
open Set Classical
variable {X : Type*} {Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X}
section Preirreducible
def IsPreirreducible (s : Set X) : Prop :=
β u v : Set X, IsOpen u β IsOpen v β (s β© u).Nonempty β (s β© v).Nonempt... | Mathlib/Topology/Irreducible.lean | 118 | 127 | theorem irreducibleComponents_eq_maximals_closed (X : Type*) [TopologicalSpace X] :
irreducibleComponents X = maximals (Β· β€ Β·) { s : Set X | IsClosed s β§ IsIrreducible s } := by |
ext s
constructor
Β· intro H
exact β¨β¨isClosed_of_mem_irreducibleComponents _ H, H.1β©, fun x h e => H.2 h.2 eβ©
Β· intro H
refine β¨H.1.2, fun x h e => ?_β©
have : closure x β€ s := H.2 β¨isClosed_closure, h.closureβ© (e.trans subset_closure)
exact le_trans subset_closure this
| [
" (closure s β© u).Nonempty β (closure s β© v).Nonempty β (closure s β© (u β© v)).Nonempty β\n (s β© u).Nonempty β (s β© v).Nonempty β (s β© (u β© v)).Nonempty",
" IsOpen u",
" IsClosed s",
" s = closure s",
" irreducibleComponents X = maximals (fun x x_1 => x β€ x_1) {s | IsClosed s β§ IsIrreducible s}",
" s β ... | [
" (closure s β© u).Nonempty β (closure s β© v).Nonempty β (closure s β© (u β© v)).Nonempty β\n (s β© u).Nonempty β (s β© v).Nonempty β (s β© (u β© v)).Nonempty",
" IsOpen u",
" IsClosed s",
" s = closure s"
] |
import Mathlib.NumberTheory.SmoothNumbers
import Mathlib.Analysis.PSeries
open Set Nat
open scoped Topology
-- This needs `Mathlib.Analysis.RCLike.Basic`, so we put it here
-- instead of in `Mathlib.NumberTheory.SmoothNumbers`.
lemma Nat.roughNumbersUpTo_card_le' (N k : β) :
(roughNumbersUpTo N k).card β€
... | Mathlib/NumberTheory/SumPrimeReciprocals.lean | 86 | 97 | theorem Nat.Primes.summable_rpow {r : β} :
Summable (fun p : Nat.Primes β¦ (p : β) ^ r) β r < -1 := by |
by_cases h : r < -1
Β· -- case `r < -1`
simp only [h, iff_true]
exact (Real.summable_nat_rpow.mpr h).subtype _
Β· -- case `-1 β€ r`
simp only [h, iff_false]
refine fun H β¦ Nat.Primes.not_summable_one_div <| H.of_nonneg_of_le (fun _ β¦ by positivity) ?_
intro p
rw [one_div, β Real.rpow_neg_one... | [
" β(N.roughNumbersUpTo k).card β€ βN * β p β N.succ.primesBelow \\ k.primesBelow, 1 / βp",
" β(N.roughNumbersUpTo k).card β€ β x β N.succ.primesBelow \\ k.primesBelow, βN / βx",
" 1 / 2 β€ β p β (4 ^ (k.primesBelow.card + 1)).succ.primesBelow \\ k.primesBelow, 1 / βp",
" 4 ^ (k.primesBelow.card + 1) = 2 * Nβ",
... | [
" β(N.roughNumbersUpTo k).card β€ βN * β p β N.succ.primesBelow \\ k.primesBelow, 1 / βp",
" β(N.roughNumbersUpTo k).card β€ β x β N.succ.primesBelow \\ k.primesBelow, βN / βx",
" 1 / 2 β€ β p β (4 ^ (k.primesBelow.card + 1)).succ.primesBelow \\ k.primesBelow, 1 / βp",
" 4 ^ (k.primesBelow.card + 1) = 2 * Nβ",
... |
import Mathlib.Analysis.NormedSpace.Exponential
#align_import analysis.normed_space.star.exponential from "leanprover-community/mathlib"@"1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9"
open NormedSpace -- For `NormedSpace.exp`.
section Star
variable {A : Type*} [NormedRing A] [NormedAlgebra β A] [StarRing A] [Continu... | Mathlib/Analysis/NormedSpace/Star/Exponential.lean | 42 | 48 | theorem Commute.expUnitary_add {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) :
expUnitary (a + b) = expUnitary a * expUnitary b := by |
ext
have hcomm : Commute (I β’ (a : A)) (I β’ (b : A)) := by
unfold Commute SemiconjBy
simp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm]
simpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm
| [
" expUnitary (a + b) = expUnitary a * expUnitary b",
" β(expUnitary (a + b)) = β(expUnitary a * expUnitary b)",
" Commute (I β’ βa) (I β’ βb)",
" I β’ βa * I β’ βb = I β’ βb * I β’ βa"
] | [] |
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 | 86 | 91 | theorem contDiff_const {c : F} : ContDiff π n fun _ : E => c := by |
suffices h : ContDiff π β fun _ : E => c from h.of_le le_top
rw [contDiff_top_iff_fderiv]
refine β¨differentiable_const c, ?_β©
rw [fderiv_const]
exact contDiff_zero_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 ... | [
" 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.RingTheory.PowerSeries.Trunc
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.Derivation.Basic
namespace PowerSeries
open Polynomial Derivation Nat
section CommutativeSemiring
variable {R} [CommSemiring R]
noncomputable def derivativeFun (f : Rβ¦Xβ§) : Rβ¦Xβ§ := mk fun n β¦ coef... | Mathlib/RingTheory/PowerSeries/Derivative.lean | 60 | 68 | theorem trunc_derivativeFun (f : Rβ¦Xβ§) (n : β) :
trunc n f.derivativeFun = derivative (trunc (n + 1) f) := by |
ext d
rw [coeff_trunc]
split_ifs with h
Β· have : d + 1 < n + 1 := succ_lt_succ_iff.2 h
rw [coeff_derivativeFun, coeff_derivative, coeff_trunc, if_pos this]
Β· have : Β¬d + 1 < n + 1 := by rwa [succ_lt_succ_iff]
rw [coeff_derivative, coeff_trunc, if_neg this, zero_mul]
| [
" (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (βn + 1)",
" (βf).derivativeFun = β(derivative f)",
" (coeff R nβ) (βf).derivativeFun = (coeff R nβ) β(derivative f)",
" (f + g).derivativeFun = f.derivativeFun + g.derivativeFun",
" (coeff R nβ) (f + g).derivativeFun = (coeff R nβ) (f.derivativeFun + g.... | [
" (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (βn + 1)",
" (βf).derivativeFun = β(derivative f)",
" (coeff R nβ) (βf).derivativeFun = (coeff R nβ) β(derivative f)",
" (f + g).derivativeFun = f.derivativeFun + g.derivativeFun",
" (coeff R nβ) (f + g).derivativeFun = (coeff R nβ) (f.derivativeFun + g.... |
import Mathlib.Init.Control.Combinators
import Mathlib.Data.Option.Defs
import Mathlib.Logic.IsEmpty
import Mathlib.Logic.Relator
import Mathlib.Util.CompileInductive
import Aesop
#align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a"
universe u
namespace Op... | Mathlib/Data/Option/Basic.lean | 57 | 58 | theorem forall_mem_map {f : Ξ± β Ξ²} {o : Option Ξ±} {p : Ξ² β Prop} :
(β y β o.map f, p y) β β x β o, p (f x) := by | simp
| [
" y β Option.map f o β β x, x β o β§ f x = y",
" f a β Option.map f o β a β o",
" (β (y : Ξ²), y β Option.map f o β p y) β β (x : Ξ±), x β o β p (f x)"
] | [
" y β Option.map f o β β x, x β o β§ f x = y",
" f a β Option.map f o β a β o"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 174 | 176 | theorem constantCoeff_exp : constantCoeff A (exp A) = 1 := by |
rw [β coeff_zero_eq_constantCoeff_apply, coeff_exp]
simp
| [
" (constantCoeff A) (exp A) = 1",
" (algebraMap β A) (1 / β0!) = 1"
] | [] |
import Mathlib.Algebra.Lie.Nilpotent
import Mathlib.Algebra.Lie.Normalizer
#align_import algebra.lie.engel from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
universe uβ uβ uβ uβ
variable {R : Type uβ} {L : Type uβ} {Lβ : Type uβ} {M : Type uβ}
variable [CommRing R] [LieRing L] [LieAl... | Mathlib/Algebra/Lie/Engel.lean | 128 | 140 | theorem isNilpotentOfIsNilpotentSpanSupEqTop (hnp : IsNilpotent <| toEnd R L M x)
(hIM : IsNilpotent R I M) : IsNilpotent R L M := by |
obtain β¨n, hnβ© := hnp
obtain β¨k, hkβ© := hIM
have hk' : I.lcs M k = β₯ := by
simp only [β coe_toSubmodule_eq_iff, I.coe_lcs_eq, hk, bot_coeSubmodule]
suffices β l, lowerCentralSeries R L M (l * n) β€ I.lcs M l by
use k * n
simpa [hk'] using this k
intro l
induction' l with l ih
Β· simp
Β· exact ... | [
" β t, β z β I, y = t β’ x + z",
" β t_1, β z_1 β I, t β’ x + z = t_1 β’ x + z_1",
" ββ
β€, Nβ = Submodule.map ((toEnd R L M) x) βN β ββ
I, Nβ",
" Submodule.span R {m | β x, β n β N, β
x, nβ = m} =\n Submodule.span R ((fun a => β
x, aβ) '' ββN βͺ {m | β x β I, β n β N, β
x, nβ = m})",
" {m | β x, β n β N, β
x, nβ =... | [
" β t, β z β I, y = t β’ x + z",
" β t_1, β z_1 β I, t β’ x + z = t_1 β’ x + z_1",
" ββ
β€, Nβ = Submodule.map ((toEnd R L M) x) βN β ββ
I, Nβ",
" Submodule.span R {m | β x, β n β N, β
x, nβ = m} =\n Submodule.span R ((fun a => β
x, aβ) '' ββN βͺ {m | β x β I, β n β N, β
x, nβ = m})",
" {m | β x, β n β N, β
x, nβ =... |
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Topology.Algebra.InfiniteSum.Real
#align_import analysis.normed.field.infinite_sum from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
variable {R : Type*} {ΞΉ : Type*} {ΞΉ' : Type*}... | Mathlib/Analysis/Normed/Field/InfiniteSum.lean | 73 | 83 | theorem summable_norm_sum_mul_antidiagonal_of_summable_norm {f g : β β R}
(hf : Summable fun x => βf xβ) (hg : Summable fun x => βg xβ) :
Summable fun n => ββ kl β antidiagonal n, f kl.1 * g kl.2β := by |
have :=
summable_sum_mul_antidiagonal_of_summable_mul
(Summable.mul_of_nonneg hf hg (fun _ => norm_nonneg _) fun _ => norm_nonneg _)
refine this.of_nonneg_of_le (fun _ => norm_nonneg _) (fun n β¦ ?_)
calc
ββ kl β antidiagonal n, f kl.1 * g kl.2β β€ β kl β antidiagonal n, βf kl.1 * g kl.2β :=
no... | [
" Summable fun x => β' (y : ΞΉ'), f (x, y).1 * g (x, y).2",
" Summable fun n => ββ kl β antidiagonal n, f kl.1 * g kl.2β",
" ββ kl β antidiagonal n, f kl.1 * g kl.2β β€ β kl β antidiagonal n, βf kl.1β * βg kl.2β",
" β kl β antidiagonal n, βf kl.1 * g kl.2β β€ β kl β antidiagonal n, βf kl.1β * βg kl.2β",
" βf i... | [
" Summable fun x => β' (y : ΞΉ'), f (x, y).1 * g (x, y).2"
] |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (Ξ± : Type u) where
| nil : Heap Ξ±
| node (a : Ξ±) (child sibling : Heap Ξ±) : Heap Ξ±
deriving Repr
def Heap.size : Heap Ξ± β Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : Ξ±) : Heap Ξ± := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 138 | 140 | theorem Heap.size_deleteMin {s : Heap Ξ±} (h : s.NoSibling) (eq : s.deleteMin le = some (a, s')) :
s.size = s'.size + 1 := by |
cases h with cases eq | node a c => rw [size_combine, size, size]
| [
" (merge le sβ sβ).NoSibling",
" (match sβ, sβ with\n | nil, nil => nil\n | nil, node aβ cβ sibling => node aβ cβ nil\n | node aβ cβ sibling, nil => node aβ cβ nil\n | node aβ cβ sibling, node aβ cβ sibling_1 =>\n if le aβ aβ = true then node aβ (node aβ cβ cβ) nil else node aβ (node aβ cβ cβ) ni... | [
" (merge le sβ sβ).NoSibling",
" (match sβ, sβ with\n | nil, nil => nil\n | nil, node aβ cβ sibling => node aβ cβ nil\n | node aβ cβ sibling, nil => node aβ cβ nil\n | node aβ cβ sibling, node aβ cβ sibling_1 =>\n if le aβ aβ = true then node aβ (node aβ cβ cβ) nil else node aβ (node aβ cβ cβ) ni... |
import Mathlib.Topology.Algebra.Constructions
import Mathlib.Topology.Bases
import Mathlib.Topology.UniformSpace.Basic
#align_import topology.uniform_space.cauchy from "leanprover-community/mathlib"@"22131150f88a2d125713ffa0f4693e3355b1eb49"
universe u v
open scoped Classical
open Filter TopologicalSpace Set Uni... | Mathlib/Topology/UniformSpace/Cauchy.lean | 63 | 67 | theorem Cauchy.ultrafilter_of {l : Filter Ξ±} (h : Cauchy l) :
Cauchy (@Ultrafilter.of _ l h.1 : Filter Ξ±) := by |
haveI := h.1
have := Ultrafilter.of_le l
exact β¨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2β©
| [
" (β (i' : ΞΉ), p i' β β i β f, id i ΓΛ’ id i β s i') β β (i : ΞΉ), p i β β t β f, β x β t, β y β t, (x, y) β s i",
" (f.NeBot β§ β s β π€ Ξ±, β t β f, β x β t, β y β t, (x, y) β s) β f.NeBot β§ β s β π€ Ξ±, β t β f, t ΓΛ’ t β s",
" Cauchy l β l ΓΛ’ l β€ π€ Ξ±",
" Cauchy β(Ultrafilter.of l)"
] | [
" (β (i' : ΞΉ), p i' β β i β f, id i ΓΛ’ id i β s i') β β (i : ΞΉ), p i β β t β f, β x β t, β y β t, (x, y) β s i",
" (f.NeBot β§ β s β π€ Ξ±, β t β f, β x β t, β y β t, (x, y) β s) β f.NeBot β§ β s β π€ Ξ±, β t β f, t ΓΛ’ t β s",
" Cauchy l β l ΓΛ’ l β€ π€ Ξ±"
] |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.Submodule.Basic
#align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
variable {ΞΉ R M Ο : Type*}
open DirectSum
namespace DirectSum
section AddCommMonoid
variable [Deci... | Mathlib/Algebra/DirectSum/Decomposition.lean | 136 | 137 | theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x β β³ i) : (decompose β³ x i : M) = x := by |
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
| [
" x = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }",
" β (m : M), p m",
" (decompose β³) βx = (of (fun i => β₯(β³ i)) i) x",
" β(((decompose β³) x) i) = x"
] | [
" x = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = y",
" { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }",
" β (m : M), p m",
" (decompose β³) βx = (of (fun i => β₯(β³ i)) i) x"
] |
import Mathlib.CategoryTheory.Limits.Types
import Mathlib.CategoryTheory.Functor.Currying
import Mathlib.CategoryTheory.Limits.FunctorCategory
#align_import category_theory.limits.colimit_limit from "leanprover-community/mathlib"@"59382264386afdbaf1727e617f5fdda511992eb9"
universe vβ vβ v uβ uβ u
open CategoryTh... | Mathlib/CategoryTheory/Limits/ColimitLimit.lean | 89 | 93 | theorem ΞΉ_colimitLimitToLimitColimit_Ο (j) (k) :
colimit.ΞΉ _ k β« colimitLimitToLimitColimit F β« limit.Ο _ j =
limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k := by |
dsimp [colimitLimitToLimitColimit]
simp
| [
" β β¦X Y : Kβ¦ (f : X βΆ Y),\n (curry.obj (Prod.swap K J β F) β lim).map f β«\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) X β«\n ((Functor.c... | [
" β β¦X Y : Kβ¦ (f : X βΆ Y),\n (curry.obj (Prod.swap K J β F) β lim).map f β«\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) X β«\n ((Functor.c... |
import Mathlib.Order.Filter.Basic
import Mathlib.Data.Set.Countable
#align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
open Set Filter
open Filter
variable {ΞΉ : Sort*} {Ξ± Ξ² : Type*}
class CountableInterFilter (l : Filter Ξ±) : Prop where
... | Mathlib/Order/Filter/CountableInter.lean | 116 | 121 | theorem EventuallyLE.countable_bInter {ΞΉ : Type*} {S : Set ΞΉ} (hS : S.Countable)
{s t : β i β S, Set Ξ±} (h : β i hi, s i hi β€αΆ [l] t i hi) :
β i β S, s i βΉ_βΊ β€αΆ [l] β i β S, t i βΉ_βΊ := by |
simp only [biInter_eq_iInter]
haveI := hS.toEncodable
exact EventuallyLE.countable_iInter fun i => h i i.2
| [
" β i, β (hi : i β S), s i hi β l β β (i : ΞΉ) (hi : i β S), s i hi β l",
" β x, s βx β― β l β β (i : ΞΉ) (hi : i β S), s i hi β l",
" (βαΆ (x : Ξ±) in l, β (i : ΞΉ), p x i) β β (i : ΞΉ), βαΆ (x : Ξ±) in l, p x i",
" (βαΆ (x : Ξ±) in l, β (i : ΞΉ) (hi : i β S), p x i hi) β β (i : ΞΉ) (hi : i β S), βαΆ (x : Ξ±) in l, p x i h... | [
" β i, β (hi : i β S), s i hi β l β β (i : ΞΉ) (hi : i β S), s i hi β l",
" β x, s βx β― β l β β (i : ΞΉ) (hi : i β S), s i hi β l",
" (βαΆ (x : Ξ±) in l, β (i : ΞΉ), p x i) β β (i : ΞΉ), βαΆ (x : Ξ±) in l, p x i",
" (βαΆ (x : Ξ±) in l, β (i : ΞΉ) (hi : i β S), p x i hi) β β (i : ΞΉ) (hi : i β S), βαΆ (x : Ξ±) in l, p x i h... |
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.Tactic.Ring
#align_import data.fintype.perm from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
open Function
open Nat
universe u v
variable {Ξ± Ξ² Ξ³ : Type*}
open Finset Function List Equiv Equiv.Per... | Mathlib/Data/Fintype/Perm.lean | 102 | 128 | theorem nodup_permsOfList : β {l : List Ξ±}, l.Nodup β (permsOfList l).Nodup
| [], _ => by simp [permsOfList]
| a :: l, hl => by
have hl' : l.Nodup := hl.of_cons
have hln' : (permsOfList l).Nodup := nodup_permsOfList hl'
have hmeml : β {f : Perm Ξ±}, f β permsOfList l β f a = a := fun {f} hf =>
not_... |
rw [β hf.2, mul_apply, hmeml hf.1, swap_apply_left]
have hiy : x a = List.get l j := by
rw [β hg.2, mul_apply, hmeml hg.1, swap_apply_left]
have hieqj : i = j := nodup_iff_injective_get.1 hl' (hix.symm.trans hiy)
exact absurd hieqj (_root_.ne_of_lt hij)
Β· intros f hfβ hfβ
le... | [
" (permsOfList (a :: l)).length = (a :: l).length !",
" (permsOfList (a :: l)).length = (l.length + 1) * l.length !",
" l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !",
" f β permsOfList l",
" f β permsOfList []",
" f β permsOfList (a :: l)",
" x β a",
" False",
" β (x : Ξ±),... | [
" (permsOfList (a :: l)).length = (a :: l).length !",
" (permsOfList (a :: l)).length = (l.length + 1) * l.length !",
" l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !",
" f β permsOfList l",
" f β permsOfList []",
" f β permsOfList (a :: l)",
" x β a",
" False",
" β (x : Ξ±),... |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Data.Fintype.Order
import Mathlib.LinearAlgebra.Matrix.Basis
import Mathlib.Analysis.NormedSpace.WithLp
#align_import analysis.normed_space.pi_Lp from "leanprover-community/mathlib"@"9d013ad8430ddddd350cff5c3db830278ded3c79"
set_option linter.uppercaseLean3 f... | Mathlib/Analysis/NormedSpace/PiLp.lean | 185 | 187 | theorem edist_eq_iSup (f g : PiLp β Ξ²) : edist f g = β¨ i, edist (f i) (g i) := by |
dsimp [edist]
exact if_neg ENNReal.top_ne_zero
| [
" edist f g = β¨ i, edist (f i) (g i)",
" (if β€ = 0 then ββ―.toFinset.card\n else if β€ = β€ then β¨ i, edist (f i) (g i) else (β i : ΞΉ, edist (f i) (g i) ^ 0) ^ (1 / 0)) =\n β¨ i, edist (f i) (g i)"
] | [] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ΞΉ : Type*}
namespace Finset
section Sigma
variable {Ξ± : ΞΉ β Type*} {Ξ² : Type*} (s sβ sβ : Finset ΞΉ) (... | Mathlib/Data/Finset/Sigma.lean | 91 | 94 | theorem sigma_eq_biUnion [DecidableEq (Ξ£i, Ξ± i)] (s : Finset ΞΉ) (t : β i, Finset (Ξ± i)) :
s.sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i := by |
ext β¨x, yβ©
simp [and_left_comm]
| [
" (s.sigma t).Nonempty β β i β s, (t i).Nonempty",
" s.sigma t = β
β β i β s, t i = β
",
" (βs).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)",
" (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j",
" β β¦a : (x : ΞΉ) Γ Ξ± xβ¦, a β map (Embedding.sigmaMk i) (t i) β a β map (Embedding.s... | [
" (s.sigma t).Nonempty β β i β s, (t i).Nonempty",
" s.sigma t = β
β β i β s, t i = β
",
" (βs).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)",
" (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j",
" β β¦a : (x : ΞΉ) Γ Ξ± xβ¦, a β map (Embedding.sigmaMk i) (t i) β a β map (Embedding.s... |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 184 | 195 | theorem content_eq_gcd_range_of_lt (p : R[X]) (n : β) (h : p.natDegree < n) :
p.content = (Finset.range n).gcd p.coeff := by |
apply dvd_antisymm_of_normalize_eq normalize_content Finset.normalize_gcd
Β· rw [Finset.dvd_gcd_iff]
intro i _
apply content_dvd_coeff _
Β· apply Finset.gcd_mono
intro i
simp only [Nat.lt_succ_iff, mem_support_iff, Ne, Finset.mem_range]
contrapose!
intro h1
apply coeff_eq_zero_of_natDeg... | [
" p.content β£ p.coeff n",
" p.content β£ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1",
" (X * p).content = p.content",
" (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd",
" Multis... | [
" p.content β£ p.coeff n",
" p.content β£ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1",
" (X * p).content = p.content",
" (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd",
" Multis... |
import Mathlib.Data.Fin.Fin2
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.Common
#align_import data.typevec from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
universe u v w
@[pp_with_univ]
def TypeVec (n : β) :=
Fin2 n β Type*
#align typevec TypeVec
instance {n} : Inh... | Mathlib/Data/TypeVec.lean | 60 | 62 | theorem Arrow.ext {Ξ± Ξ² : TypeVec n} (f g : Ξ± βΉ Ξ²) :
(β i, f i = g i) β f = g := by |
intro h; funext i; apply h
| [
" (β (i : Fin2 n), f i = g i) β f = g",
" f = g",
" f i = g i"
] | [] |
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function
open scoped Topology ENNReal Convex
variable... | Mathlib/MeasureTheory/Integral/Average.lean | 158 | 162 | theorem laverage_lt_top (hf : β«β» x, f x βΞΌ β β) : β¨β» x, f x βΞΌ < β := by |
obtain rfl | hΞΌ := eq_or_ne ΞΌ 0
Β· simp
Β· rw [laverage_eq]
exact div_lt_top hf (measure_univ_ne_zero.2 hΞΌ)
| [
" β¨β» (_x : Ξ±), 0 βΞΌ = 0",
" β¨β» (x : Ξ±), f x β0 = 0",
" β¨β» (x : Ξ±), f x βΞΌ = (β«β» (x : Ξ±), f x βΞΌ) / ΞΌ univ",
" β¨β» (x : Ξ±), f x βΞΌ = β«β» (x : Ξ±), f x βΞΌ",
" ΞΌ univ * β¨β» (x : Ξ±), f x βΞΌ = β«β» (x : Ξ±), f x βΞΌ",
" β¨β» (x : Ξ±) in s, f x βΞΌ = (β«β» (x : Ξ±) in s, f x βΞΌ) / ΞΌ s",
" β¨β» (x : Ξ±) in s, f x βΞΌ = β«β» (x : Ξ±... | [
" β¨β» (_x : Ξ±), 0 βΞΌ = 0",
" β¨β» (x : Ξ±), f x β0 = 0",
" β¨β» (x : Ξ±), f x βΞΌ = (β«β» (x : Ξ±), f x βΞΌ) / ΞΌ univ",
" β¨β» (x : Ξ±), f x βΞΌ = β«β» (x : Ξ±), f x βΞΌ",
" ΞΌ univ * β¨β» (x : Ξ±), f x βΞΌ = β«β» (x : Ξ±), f x βΞΌ",
" β¨β» (x : Ξ±) in s, f x βΞΌ = (β«β» (x : Ξ±) in s, f x βΞΌ) / ΞΌ s",
" β¨β» (x : Ξ±) in s, f x βΞΌ = β«β» (x : Ξ±... |
import Mathlib.Data.Real.Cardinality
import Mathlib.Topology.Separation
import Mathlib.Topology.TietzeExtension
open Set Function Cardinal Topology TopologicalSpace
universe u
variable {X : Type u} [TopologicalSpace X] [SeparableSpace X]
| Mathlib/Topology/Separation/NotNormal.lean | 26 | 53 | theorem IsClosed.mk_lt_continuum [NormalSpace X] {s : Set X} (hs : IsClosed s)
[DiscreteTopology s] : #s < π := by |
-- Proof by contradiction: assume `π β€ #s`
by_contra! h
-- Choose a countable dense set `t : Set X`
rcases exists_countable_dense X with β¨t, htc, htdβ©
haveI := htc.to_subtype
-- To obtain a contradiction, we will prove `2 ^ π β€ π `.
refine (Cardinal.cantor π ).not_le ?_
calc
-- Any function `s β ... | [
" #βs < π ",
" False",
" 2 ^ π β€ π ",
" 2 ^ π β€ #C(βs, β)",
" 2 ^ π β€ π ^ #βs",
" #C(βs, β) β€ #C(X, β)",
" #(βt β β) β€ π ",
" 2 ^ (β΅β * #βt) β€ 2 ^ β΅β"
] | [] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polyn... | Mathlib/Algebra/Polynomial/Eval.lean | 100 | 100 | theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by | rw [bit0, evalβ_add, bit0]
| [
" evalβ f x p = p.sum fun e a => f a * x ^ e",
" f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο",
" evalβ f s Ο = evalβ f s Ο",
" evalβ f 0 p = f (p.coeff 0)",
" evalβ f x 0 = 0",
" evalβ f x (C a) = f a",
" evalβ f x X = x",
" evalβ f x ((monomial n) r) = f r * x ^ n",
" evalβ f x (X ^ n) = x ^ ... | [
" evalβ f x p = p.sum fun e a => f a * x ^ e",
" f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο",
" evalβ f s Ο = evalβ f s Ο",
" evalβ f 0 p = f (p.coeff 0)",
" evalβ f x 0 = 0",
" evalβ f x (C a) = f a",
" evalβ f x X = x",
" evalβ f x ((monomial n) r) = f r * x ^ n",
" evalβ f x (X ^ n) = x ^ ... |
import Mathlib.RingTheory.WittVector.Identities
#align_import ring_theory.witt_vector.domain from "leanprover-community/mathlib"@"b1d911acd60ab198808e853292106ee352b648ea"
noncomputable section
open scoped Classical
namespace WittVector
open Function
variable {p : β} {R : Type*}
local notation "π" => WittVe... | Mathlib/RingTheory/WittVector/Domain.lean | 79 | 85 | theorem eq_iterate_verschiebung {x : π R} {n : β} (h : β i < n, x.coeff i = 0) :
x = verschiebung^[n] (x.shift n) := by |
induction' n with k ih
Β· cases x; simp [shift]
Β· dsimp; rw [verschiebung_shift]
Β· exact ih fun i hi => h _ (hi.trans (Nat.lt_succ_self _))
Β· exact h
| [
" verschiebung (x.shift k.succ) = x.shift k",
" (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0",
" k + 0 < k + 1",
" (verschiebung (x.shift k.succ)).coeff (nβ + 1) = (x.shift k).coeff (nβ + 1)",
" x.coeff (k.succ + nβ) = x.coeff (k + (nβ + 1))",
" k.succ + nβ = k + (nβ + 1)",
" x = (βvers... | [
" verschiebung (x.shift k.succ) = x.shift k",
" (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0",
" k + 0 < k + 1",
" (verschiebung (x.shift k.succ)).coeff (nβ + 1) = (x.shift k).coeff (nβ + 1)",
" x.coeff (k.succ + nβ) = x.coeff (k + (nβ + 1))",
" k.succ + nβ = k + (nβ + 1)"
] |
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential
import Mathlib.Geometry.Manifold.ContMDiffMap
#align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle
open sc... | Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean | 287 | 339 | theorem ContMDiffOn.contMDiffOn_tangentMapWithin_aux {f : H β H'} {s : Set H}
(hf : ContMDiffOn I I' n f s) (hmn : m + 1 β€ n) (hs : UniqueMDiffOn I s) :
ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s)
(Ο E (TangentSpace I) β»ΒΉ' s) := by |
have m_le_n : m β€ n := (le_add_right le_rfl).trans hmn
have one_le_n : 1 β€ n := (le_add_left le_rfl).trans hmn
have U' : UniqueDiffOn π (range I β© I.symm β»ΒΉ' s) := fun y hy β¦ by
simpa only [UniqueMDiffOn, UniqueMDiffWithinAt, hy.1, inter_comm, mfld_simps]
using hs (I.symm y) hy.2
rw [contMDiffOn_iff... | [
" ContinuousOn (tangentMapWithin I I' f s) (TotalSpace.proj β»ΒΉ' s)",
" univ β© β(tangentBundleModelSpaceHomeomorph H I) β»ΒΉ' (Prod.fst β»ΒΉ' s) = TotalSpace.proj β»ΒΉ' s",
" { proj := x, snd := v } β univ β© β(tangentBundleModelSpaceHomeomorph H I) β»ΒΉ' (Prod.fst β»ΒΉ' s) β\n { proj := x, snd := v } β TotalSpace.proj ... | [
" ContinuousOn (tangentMapWithin I I' f s) (TotalSpace.proj β»ΒΉ' s)",
" univ β© β(tangentBundleModelSpaceHomeomorph H I) β»ΒΉ' (Prod.fst β»ΒΉ' s) = TotalSpace.proj β»ΒΉ' s",
" { proj := x, snd := v } β univ β© β(tangentBundleModelSpaceHomeomorph H I) β»ΒΉ' (Prod.fst β»ΒΉ' s) β\n { proj := x, snd := v } β TotalSpace.proj ... |
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Measure.Haar.Quotient
import Mathlib.MeasureTheory.Constructions.Polish
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Topology.Algebra.Order.Floor
#align_import measure_theory.integral.periodic from "leanprover-c... | Mathlib/MeasureTheory/Integral/Periodic.lean | 39 | 46 | theorem isAddFundamentalDomain_Ioc {T : β} (hT : 0 < T) (t : β)
(ΞΌ : Measure β := by | volume_tac) :
IsAddFundamentalDomain (AddSubgroup.zmultiples T) (Ioc t (t + T)) ΞΌ := by
refine IsAddFundamentalDomain.mk' measurableSet_Ioc.nullMeasurableSet fun x => ?_
have : Bijective (codRestrict (fun n : β€ => n β’ T) (AddSubgroup.zmultiples T) _) :=
(Equiv.ofInjective (fun n : β€ => n β’ T) (zsmul_strict... | [
" IsAddFundamentalDomain (β₯(zmultiples T)) (Ioc t (t + T)) ΞΌ",
" β! g, g +α΅₯ x β Ioc t (t + T)",
" β! x_1, codRestrict (fun n => n β’ T) β(zmultiples T) β― x_1 +α΅₯ x β Ioc t (t + T)"
] | [] |
import Mathlib.Topology.Algebra.GroupWithZero
import Mathlib.Topology.Order.OrderClosed
#align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064"
open Topology Filter TopologicalSpace Filter Set Function
namespace WithZeroTopology
variable {Ξ±... | Mathlib/Topology/Algebra/WithZeroTopology.lean | 78 | 79 | theorem tendsto_zero : Tendsto f l (π (0 : Ξβ)) β β (Ξ³β) (_ : Ξ³β β 0), βαΆ x in l, f x < Ξ³β := by |
simp [nhds_zero]
| [
" π = update pure 0 (β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³))",
" pure 0 β€ β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)",
" π 0 = β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)",
" (π 0).HasBasis (fun Ξ³ => Ξ³ β 0) Iio",
" (β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)).HasBasis (fun Ξ³ => Ξ³ β 0) Iio",
" DirectedOn ((fun Ξ³ => Iio Ξ³) β»ΒΉ'o fun x x_1 => x β₯ x_1... | [
" π = update pure 0 (β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³))",
" pure 0 β€ β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)",
" π 0 = β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)",
" (π 0).HasBasis (fun Ξ³ => Ξ³ β 0) Iio",
" (β¨
Ξ³, β¨
(_ : Ξ³ β 0), π (Iio Ξ³)).HasBasis (fun Ξ³ => Ξ³ β 0) Iio",
" DirectedOn ((fun Ξ³ => Iio Ξ³) β»ΒΉ'o fun x x_1 => x β₯ x_1... |
import Mathlib.Order.Interval.Set.Image
import Mathlib.Order.CompleteLatticeIntervals
import Mathlib.Topology.Order.DenselyOrdered
import Mathlib.Topology.Order.Monotone
#align_import topology.algebra.order.intermediate_value from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Filt... | Mathlib/Topology/Order/IntermediateValue.lean | 105 | 112 | theorem IsPreconnected.intermediate_valueβ_eventuallyβ {s : Set X} (hs : IsPreconnected s) {a : X}
{l : Filter X} (ha : a β s) [NeBot l] (hl : l β€ π s) {f g : X β Ξ±} (hf : ContinuousOn f s)
(hg : ContinuousOn g s) (ha' : f a β€ g a) (he : g β€αΆ [l] f) : β x β s, f x = g x := by |
rw [continuousOn_iff_continuous_restrict] at hf hg
obtain β¨b, hβ© :=
@intermediate_value_univβ_eventuallyβ _ _ _ _ _ _ (Subtype.preconnectedSpace hs) β¨a, haβ© _
(comap_coe_neBot_of_le_principal hl) _ _ hf hg ha' (he.comap _)
exact β¨b, b.prop, hβ©
| [
" β x, f x = g x",
" β x β s, f x = g x"
] | [
" β x, f x = g x"
] |
import Mathlib.Algebra.Order.Floor
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Ring
#align_import data.rat.floor from "leanprover-community/mathlib"@"e1bccd6e40ae78370f01659715d3c948716e3b7e"
open Int
namespace Rat
variable {Ξ± : Type*} [LinearOrderedField Ξ±] [FloorRi... | Mathlib/Data/Rat/Floor.lean | 56 | 66 | theorem floor_int_div_nat_eq_div {n : β€} {d : β} : β(βn : β) / (βd : β)β = n / (βd : β€) := by |
rw [Rat.floor_def]
obtain rfl | hd := @eq_zero_or_pos _ _ d
Β· simp
set q := (n : β) / d with q_eq
obtain β¨c, n_eq_c_mul_num, d_eq_c_mul_denomβ© : β c, n = c * q.num β§ (d : β€) = c * q.den := by
rw [q_eq]
exact mod_cast @Rat.exists_eq_mul_div_num_and_eq_mul_div_den n d (mod_cast hd.ne')
rw [n_eq_c_mul... | [
" a.floor = a.num / βa.den",
" (if a.den = 1 then a.num else a.num / βa.den) = a.num / βa.den",
" a.num = a.num / βa.den",
" a.num / βa.den = a.num / βa.den",
" z β€ { num := n, den := d, den_nz := h, reduced := c }.floor β βz β€ { num := n, den := d, den_nz := h, reduced := c }",
" z β€ n / βd β βz β€ { num ... | [
" a.floor = a.num / βa.den",
" (if a.den = 1 then a.num else a.num / βa.den) = a.num / βa.den",
" a.num = a.num / βa.den",
" a.num / βa.den = a.num / βa.den",
" z β€ { num := n, den := d, den_nz := h, reduced := c }.floor β βz β€ { num := n, den := d, den_nz := h, reduced := c }",
" z β€ n / βd β βz β€ { num ... |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
namespace WittVector
open MvPolynomial
variable {p : β} {R S : Type*} [hp : Fact p.Prime] [Comm... | Mathlib/RingTheory/WittVector/Verschiebung.lean | 65 | 71 | theorem ghostComponent_verschiebungFun (x : π R) (n : β) :
ghostComponent (n + 1) (verschiebungFun x) = p * ghostComponent n x := by |
simp only [ghostComponent_apply, aeval_wittPolynomial]
rw [Finset.sum_range_succ', verschiebungFun_coeff, if_pos rfl,
zero_pow (pow_ne_zero _ hp.1.ne_zero), mul_zero, add_zero, Finset.mul_sum, Finset.sum_congr rfl]
rintro i -
simp only [pow_succ', verschiebungFun_coeff_succ, Nat.succ_sub_succ_eq_sub, mul_a... | [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0",
" (ghostComponent 0) x.verschiebungFun = 0",
" (ghostComponent (n + 1)) x.verschiebungFun = βp * (ghostComponent n) x",
" β i β Finset.range (n + 1 + 1), βp ^ i * x.verschiebungFun.coeff i ^ p ^ (n + 1 - i... | [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0",
" (ghostComponent 0) x.verschiebungFun = 0"
] |
import Mathlib.NumberTheory.Zsqrtd.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Real.Archimedean
#align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Zsqrtd Complex
open sc... | Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean | 162 | 163 | theorem intCast_complex_norm (x : β€[i]) : (x.norm : β) = Complex.normSq (x : β) := by |
cases x; rw [Zsqrtd.norm, normSq]; simp
| [
" I * I = β(-1)",
" toComplex { re := x, im := y } = βx + βy * I",
" toComplex x = { re := βx.re, im := βx.im }",
" (toComplex x).re = { re := βx.re, im := βx.im }.re",
" (toComplex x).im = { re := βx.re, im := βx.im }.im",
" βx.re = (toComplex x).re",
" βx.im = (toComplex x).im",
" (toComplex { re :=... | [
" I * I = β(-1)",
" toComplex { re := x, im := y } = βx + βy * I",
" toComplex x = { re := βx.re, im := βx.im }",
" (toComplex x).re = { re := βx.re, im := βx.im }.re",
" (toComplex x).im = { re := βx.re, im := βx.im }.im",
" βx.re = (toComplex x).re",
" βx.im = (toComplex x).im",
" (toComplex { re :=... |
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 | 135 | 136 | theorem linearMap_vsub (f : P1 βα΅[k] P2) (p1 p2 : P1) : f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2 := by |
conv_rhs => rw [β vsub_vadd p1 p2, map_vadd, vadd_vsub]
| [
" { 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"
] |
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function
open scoped Topology ENNReal Convex
variable... | Mathlib/MeasureTheory/Integral/Average.lean | 108 | 108 | theorem laverage_zero : β¨β» _x, (0 : ββ₯0β) βΞΌ = 0 := by | rw [laverage, lintegral_zero]
| [
" β¨β» (_x : Ξ±), 0 βΞΌ = 0"
] | [] |
import Batteries.Data.List.Count
import Batteries.Data.Fin.Lemmas
open Nat Function
namespace List
theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : β {a'}, a' β l β R a a' :=
(pairwise_cons.1 p).1 _
theorem Pairwise.of_cons (p : (a :: l).Pairwise R) : Pairwise R l :=
(pairwise_cons.1 p).2
theorem... | .lake/packages/batteries/Batteries/Data/List/Pairwise.lean | 104 | 104 | theorem pairwise_singleton (R) (a : Ξ±) : Pairwise R [a] := by | simp
| [
" Pairwise S l",
" Pairwise S []",
" Pairwise S (a :: l)",
" β (a' : Ξ±), a' β l β S a a'",
" Pairwise (fun a b => R a b β§ S a b) l",
" Pairwise (fun a b => R a b β§ S a b) []",
" Pairwise (fun a b => R a b β§ S a b) (aβΒΉ :: lβ)",
" (β (a' : Ξ±β), a' β lβ β R aβΒΉ a' β§ S aβΒΉ a') β§ Pairwise (fun a b => R a ... | [
" Pairwise S l",
" Pairwise S []",
" Pairwise S (a :: l)",
" β (a' : Ξ±), a' β l β S a a'",
" Pairwise (fun a b => R a b β§ S a b) l",
" Pairwise (fun a b => R a b β§ S a b) []",
" Pairwise (fun a b => R a b β§ S a b) (aβΒΉ :: lβ)",
" (β (a' : Ξ±β), a' β lβ β R aβΒΉ a' β§ S aβΒΉ a') β§ Pairwise (fun a b => R a ... |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ΞΉ : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 111 | 117 | theorem natDegree_C_mul_eq_of_mul_eq_one {ai : R} (au : ai * a = 1) :
(C a * p).natDegree = p.natDegree :=
le_antisymm (natDegree_C_mul_le a p)
(calc
p.natDegree = (1 * p).natDegree := by | nth_rw 1 [β one_mul p]
_ = (C ai * (C a * p)).natDegree := by rw [β C_1, β au, RingHom.map_mul, β mul_assoc]
_ β€ (C a * p).natDegree := natDegree_C_mul_le ai (C a * p))
| [
" (p.comp q).natDegree β€ p.natDegree * q.natDegree",
" 0 β€ p.natDegree * q.natDegree",
" β(C (p.coeff n)).natDegree + n β’ βq.natDegree = β(n * q.natDegree)",
" βn * βq.natDegree = β(n * q.natDegree)",
" False",
" p.natDegree β€ n β β (N : β), n < N β p.coeff N = 0",
" (p + q).natDegree β€ n β p.natDegree ... | [
" (p.comp q).natDegree β€ p.natDegree * q.natDegree",
" 0 β€ p.natDegree * q.natDegree",
" β(C (p.coeff n)).natDegree + n β’ βq.natDegree = β(n * q.natDegree)",
" βn * βq.natDegree = β(n * q.natDegree)",
" False",
" p.natDegree β€ n β β (N : β), n < N β p.coeff N = 0",
" (p + q).natDegree β€ n β p.natDegree ... |
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.prod from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open Topology NNReal ... | Mathlib/Analysis/Calculus/FDeriv/Prod.lean | 451 | 454 | theorem hasFDerivAt_apply (i : ΞΉ) (f : β i, F' i) :
HasFDerivAt (π:=π) (fun f : β i, F' i => f i) (proj i) f := by |
apply HasStrictFDerivAt.hasFDerivAt
apply hasStrictFDerivAt_apply
| [
" HasStrictFDerivAt Ξ¦ Ξ¦' x β β (i : ΞΉ), HasStrictFDerivAt (fun x => Ξ¦ x i) ((proj i).comp Ξ¦') x",
" ((fun p => Ξ¦ p.1 - Ξ¦ p.2 - Ξ¦' (p.1 - p.2)) =o[π (x, x)] fun p => p.1 - p.2) β\n β (i : ΞΉ), (fun p => Ξ¦ p.1 i - Ξ¦ p.2 i - ((proj i).comp Ξ¦') (p.1 - p.2)) =o[π (x, x)] fun p => p.1 - p.2",
" HasStrictFDerivAt ... | [
" HasStrictFDerivAt Ξ¦ Ξ¦' x β β (i : ΞΉ), HasStrictFDerivAt (fun x => Ξ¦ x i) ((proj i).comp Ξ¦') x",
" ((fun p => Ξ¦ p.1 - Ξ¦ p.2 - Ξ¦' (p.1 - p.2)) =o[π (x, x)] fun p => p.1 - p.2) β\n β (i : ΞΉ), (fun p => Ξ¦ p.1 i - Ξ¦ p.2 i - ((proj i).comp Ξ¦') (p.1 - p.2)) =o[π (x, x)] fun p => p.1 - p.2",
" HasStrictFDerivAt ... |
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.WittVector.Truncated
#align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
namespace WittVector
variable (p : β) [hp : Fact p.Prime]
variable {k ... | Mathlib/RingTheory/WittVector/MulCoeff.lean | 120 | 135 | theorem mul_polyOfInterest_aux1 (n : β) :
β i β range (n + 1), (p : π) ^ i * wittMul p i ^ p ^ (n - i) = wittPolyProd p n := by |
simp only [wittPolyProd]
convert wittStructureInt_prop p (X (0 : Fin 2) * X 1) n using 1
Β· simp only [wittPolynomial, wittMul]
rw [AlgHom.map_sum]
congr 1 with i
congr 1
have hsupp : (Finsupp.single i (p ^ (n - i))).support = {i} := by
rw [Finsupp.support_eq_singleton]
simp only [and_... | [
" (wittPolyProd p n).vars β univ ΓΛ’ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p β€ n) * (rename (Prod.mk 1)) (wittPolynomial p β€ n)).vars β\n univ ΓΛ’ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p β€ n)).vars βͺ ((rename (Prod.mk 1)) (wittPolynomial p β€ n)).vars β\n univ ΓΛ’ range (n ... | [
" (wittPolyProd p n).vars β univ ΓΛ’ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p β€ n) * (rename (Prod.mk 1)) (wittPolynomial p β€ n)).vars β\n univ ΓΛ’ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p β€ n)).vars βͺ ((rename (Prod.mk 1)) (wittPolynomial p β€ n)).vars β\n univ ΓΛ’ range (n ... |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {Ξ± : Type u}
class OrderedAddCommGroup (Ξ± : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 318 | 319 | theorem inv_mul_lt_one_iff_lt : a * bβ»ΒΉ < 1 β a < b := by |
rw [β mul_lt_mul_iff_right b, inv_mul_cancel_right, one_mul]
| [
" b β€ c",
" aβ»ΒΉ < 1 β 1 < a",
" 1 < aβ»ΒΉ β a < 1",
" aβ»ΒΉ * a < b * a β 1 < b * a",
" a * b < bβ»ΒΉ * b β a * b < 1",
" a * bβ»ΒΉ < c β a < c * b",
" c * b < a * bβ»ΒΉ * b β c * b < a",
" a * bβ»ΒΉ < 1 β a < b"
] | [
" b β€ c",
" aβ»ΒΉ < 1 β 1 < a",
" 1 < aβ»ΒΉ β a < 1",
" aβ»ΒΉ * a < b * a β 1 < b * a",
" a * b < bβ»ΒΉ * b β a * b < 1",
" a * bβ»ΒΉ < c β a < c * b",
" c * b < a * bβ»ΒΉ * b β c * b < a"
] |
import Mathlib.Algebra.Ring.Defs
import Mathlib.Algebra.Group.Ext
local macro:max "local_hAdd[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HAdd.hAdd : $type β $type β $type))
local macro:max "local_hMul[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HMul.hMul : $type β $typ... | Mathlib/Algebra/Ring/Ext.lean | 497 | 499 | theorem toSemiring_injective :
Function.Injective (@toSemiring R) := by |
rintro β¨β© β¨β© _; congr
| [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... |
import Mathlib.Analysis.Normed.Group.Basic
#align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
section HammingDistNorm
open Finset Function
variable {Ξ± ΞΉ : Type*} {Ξ² : ΞΉ β Type*} [Fintype ΞΉ] [β i, DecidableEq (Ξ² i)]
variable {Ξ³ : ΞΉ β Type*} [β ... | Mathlib/InformationTheory/Hamming.lean | 61 | 67 | theorem hammingDist_triangle (x y z : β i, Ξ² i) :
hammingDist x z β€ hammingDist x y + hammingDist y z := by |
classical
unfold hammingDist
refine le_trans (card_mono ?_) (card_union_le _ _)
rw [β filter_or]
exact monotone_filter_right _ fun i h β¦ (h.ne_or_ne _).imp_right Ne.symm
| [
" hammingDist x x = 0",
" β β¦x_1 : ΞΉβ¦, x_1 β univ β Β¬x x_1 β x x_1",
" hammingDist x y = hammingDist y x",
" hammingDist x z β€ hammingDist x y + hammingDist y z",
" (filter (fun i => x i β z i) univ).card β€\n (filter (fun i => x i β y i) univ).card + (filter (fun i => y i β z i) univ).card",
" filter (... | [
" hammingDist x x = 0",
" β β¦x_1 : ΞΉβ¦, x_1 β univ β Β¬x x_1 β x x_1",
" hammingDist x y = hammingDist y x"
] |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ... | Mathlib/Topology/MetricSpace/Isometry.lean | 138 | 141 | theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.closedBall (f x) r = EMetric.closedBall x r := by |
ext y
simp [h.edist_eq]
| [
" Isometry f β β (x y : Ξ±), nndist (f x) (f y) = nndist x y",
" Isometry f β β (x y : Ξ±), dist (f x) (f y) = dist x y",
" edist x y β€ β1 * edist (f x) (f y)",
" edist (f x) (f y) = edist x y",
" edist (f y) (f y) = edist y y",
" edist (Prod.map f g x) (Prod.map f g y) = edist x y",
" edist ((fun g i => ... | [
" Isometry f β β (x y : Ξ±), nndist (f x) (f y) = nndist x y",
" Isometry f β β (x y : Ξ±), dist (f x) (f y) = dist x y",
" edist x y β€ β1 * edist (f x) (f y)",
" edist (f x) (f y) = edist x y",
" edist (f y) (f y) = edist y y",
" edist (Prod.map f g x) (Prod.map f g y) = edist x y",
" edist ((fun g i => ... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
import Mathlib.Topology.Algebra.Module.Basic
open Function
structure ContinuousAffineEquiv (k Pβ Pβ : Type*) {Vβ Vβ : Type*} [Ring k]
[AddCommGroup Vβ] [Module k Vβ] [AddTorsor Vβ Pβ] [TopologicalSpace Pβ]
[AddCommGroup Vβ] [Module k Vβ] [AddTorsor Vβ P... | Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean | 84 | 87 | theorem coe_injective : Function.Injective ((β) : (Pβ βα΅L[k] Pβ) β Pβ βα΅[k] Pβ) := by |
intro e e' H
cases e
congr
| [
" Injective toAffineEquiv",
" { toAffineEquiv := e, continuous_toFun := econt, continuous_invFun := einv_cont } =\n { toAffineEquiv := e', continuous_toFun := e'cont, continuous_invFun := e'inv_cont }",
" e = e'",
" { toAffineEquiv := toAffineEquivβ, continuous_toFun := continuous_toFunβ, continuous_invFun... | [
" Injective toAffineEquiv",
" { toAffineEquiv := e, continuous_toFun := econt, continuous_invFun := einv_cont } =\n { toAffineEquiv := e', continuous_toFun := e'cont, continuous_invFun := e'inv_cont }"
] |
import Mathlib.AlgebraicTopology.SplitSimplicialObject
import Mathlib.AlgebraicTopology.DoldKan.Degeneracies
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.split_simplicial_object from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open Categ... | Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean | 73 | 85 | theorem Ο_comp_ΟSummand_id_eq_zero {n : β} (i : Fin (n + 1)) :
X.Ο i β« s.ΟSummand (IndexSet.id (op [n + 1])) = 0 := by |
apply s.hom_ext'
intro A
dsimp only [SimplicialObject.Ο]
rw [comp_zero, s.cofan_inj_epi_naturality_assoc A (SimplexCategory.Ο i).op,
cofan_inj_ΟSummand_eq_zero]
rw [ne_comm]
change Β¬(A.epiComp (SimplexCategory.Ο i).op).EqId
rw [IndexSet.eqId_iff_len_eq]
have h := SimplexCategory.len_le_of_epi (infe... | [
" s.N B.fst.unop.len βΆ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Ξ).inj A β« s.ΟSummand A = π (summand s.N Ξ A)",
" (s.cofan Ξ).inj A β« s.ΟSummand B = 0",
" ((s.cofan Ξ).inj A β« s.desc Ξ fun B_1 => if h : B_1 = B then eqToHom β― ... | [
" s.N B.fst.unop.len βΆ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Ξ).inj A β« s.ΟSummand A = π (summand s.N Ξ A)",
" (s.cofan Ξ).inj A β« s.ΟSummand B = 0",
" ((s.cofan Ξ).inj A β« s.desc Ξ fun B_1 => if h : B_1 = B then eqToHom β― ... |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.CategoryTheory.Elementwise
#align_import analysis.normed.group.SemiNormedGroup from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11... | Mathlib/Analysis/Normed/Group/SemiNormedGroupCat.lean | 111 | 114 | theorem isZero_of_subsingleton (V : SemiNormedGroupCat) [Subsingleton V] : Limits.IsZero V := by |
refine β¨fun X => β¨β¨β¨0β©, fun f => ?_β©β©, fun X => β¨β¨β¨0β©, fun f => ?_β©β©β©
Β· ext x; have : x = 0 := Subsingleton.elim _ _; simp only [this, map_zero]
Β· ext; apply Subsingleton.elim
| [
" ConcreteCategory SemiNormedGroupCat",
" ConcreteCategory (Bundled SeminormedAddCommGroup)",
" f = g",
" { toFun := toFunβ, map_add' := map_add'β, bound' := bound'β } = g",
" { toFun := toFunβΒΉ, map_add' := map_add'βΒΉ, bound' := bound'βΒΉ } =\n { toFun := toFunβ, map_add' := map_add'β, bound' := bound'β ... | [
" ConcreteCategory SemiNormedGroupCat",
" ConcreteCategory (Bundled SeminormedAddCommGroup)",
" f = g",
" { toFun := toFunβ, map_add' := map_add'β, bound' := bound'β } = g",
" { toFun := toFunβΒΉ, map_add' := map_add'βΒΉ, bound' := bound'βΒΉ } =\n { toFun := toFunβ, map_add' := map_add'β, bound' := bound'β ... |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (Ξ± : Type u) where
| nil : Heap Ξ±
| node (a : Ξ±) (child sibling : Heap Ξ±) : Heap Ξ±
deriving Repr
def Heap.size : Heap Ξ± β Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : Ξ±) : Heap Ξ± := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 119 | 121 | theorem Heap.size_merge_node (le) (aβ : Ξ±) (cβ sβ : Heap Ξ±) (aβ : Ξ±) (cβ sβ : Heap Ξ±) :
(merge le (.node aβ cβ sβ) (.node aβ cβ sβ)).size = cβ.size + cβ.size + 2 := by |
unfold merge; dsimp; split <;> simp_arith [size]
| [
" (merge le sβ sβ).NoSibling",
" (match sβ, sβ with\n | nil, nil => nil\n | nil, node aβ cβ sibling => node aβ cβ nil\n | node aβ cβ sibling, nil => node aβ cβ nil\n | node aβ cβ sibling, node aβ cβ sibling_1 =>\n if le aβ aβ = true then node aβ (node aβ cβ cβ) nil else node aβ (node aβ cβ cβ) ni... | [
" (merge le sβ sβ).NoSibling",
" (match sβ, sβ with\n | nil, nil => nil\n | nil, node aβ cβ sibling => node aβ cβ nil\n | node aβ cβ sibling, nil => node aβ cβ nil\n | node aβ cβ sibling, node aβ cβ sibling_1 =>\n if le aβ aβ = true then node aβ (node aβ cβ cβ) nil else node aβ (node aβ cβ cβ) ni... |
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.Data.ZMod.Algebra
#align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
namespace Polynomial
@[simp]
| Mathlib/RingTheory/Polynomial/Cyclotomic/Expand.lean | 36 | 72 | theorem cyclotomic_expand_eq_cyclotomic_mul {p n : β} (hp : Nat.Prime p) (hdiv : Β¬p β£ n)
(R : Type*) [CommRing R] :
expand R p (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R := by |
rcases Nat.eq_zero_or_pos n with (rfl | hnpos)
Β· simp
haveI := NeZero.of_pos hnpos
suffices expand β€ p (cyclotomic n β€) = cyclotomic (n * p) β€ * cyclotomic n β€ by
rw [β map_cyclotomic_int, β map_expand, this, Polynomial.map_mul, map_cyclotomic_int,
map_cyclotomic]
refine eq_of_monic_of_dvd_of_natDe... | [
" (expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R",
" (expand R p) (cyclotomic 0 R) = cyclotomic (0 * p) R * cyclotomic 0 R",
" (expand β€ p) (cyclotomic n β€) = cyclotomic (n * p) β€ * cyclotomic n β€",
" cyclotomic (n * p) β€ * cyclotomic n β€ β£ (expand β€ p) (cyclotomic n β€)",
" map (Int.c... | [] |
import Mathlib.Analysis.Normed.Order.Basic
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.asymptotics.specific_asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Asymptotics
open Topology
sectio... | Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean | 42 | 46 | theorem pow_div_pow_eventuallyEq_atTop {p q : β} :
(fun x : π => x ^ p / x ^ q) =αΆ [atTop] fun x => x ^ ((p : β€) - q) := by |
apply (eventually_gt_atTop (0 : π)).mono fun x hx => _
intro x hx
simp [zpow_subβ hx.ne']
| [
" (fun x => x ^ p / x ^ q) =αΆ [atTop] fun x => x ^ (βp - βq)",
" β (x : π), 0 < x β (fun x => x ^ p / x ^ q) x = (fun x => x ^ (βp - βq)) x",
" (fun x => x ^ p / x ^ q) x = (fun x => x ^ (βp - βq)) x"
] | [] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 159 | 160 | theorem edgeDensity_empty_right (s : Finset Ξ±) : edgeDensity r s β
= 0 := by |
rw [edgeDensity, Finset.card_empty, Nat.cast_zero, mul_zero, div_zero]
| [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.