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.Algebra.Group.Defs
import Mathlib.Control.Functor
#align_import control.applicative from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u v w
section Lemmas
open Function
variable {F : Type u β Type v}
variable [Applicative F] [LawfulApplicative F]
variable {Ξ± ... | Mathlib/Control/Applicative.lean | 31 | 33 | theorem Applicative.map_seq_map (f : Ξ± β Ξ² β Ξ³) (g : Ο β Ξ²) (x : F Ξ±) (y : F Ο) :
f <$> x <*> g <$> y = ((Β· β g) β f) <$> x <*> y := by |
simp [flip, functor_norm]
| [
" (Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq (((fun x => x β g) β f) <$> x) fun x => y"
] | [] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FieldSimp
import Mathlib.Data.Int.NatPrime
import Mathlib.Data.ZMod.Basic
#align_import number_theory.pythagorean_tri... | Mathlib/NumberTheory/PythagoreanTriples.lean | 87 | 93 | theorem mul_iff (k : β€) (hk : k β 0) :
PythagoreanTriple (k * x) (k * y) (k * z) β PythagoreanTriple x y z := by |
refine β¨?_, fun h => h.mul kβ©
simp only [PythagoreanTriple]
intro h
rw [β mul_left_inj' (mul_ne_zero hk hk)]
convert h using 1 <;> ring
| [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2",
" PythagoreanTriple x y z β PythagoreanTriple y x z",
" x * x + y * y = z * z β y * y + x * x = z * z",
" PythagoreanTriple ... | [
" z * z β 2",
" β¨0, β―β© * β¨0, β―β© β 2",
" β¨1, β―β© * β¨1, β―β© β 2",
" β¨2, β―β© * β¨2, β―β© β 2",
" β¨3, β―β© * β¨3, β―β© β 2",
" z * z % 4 β 2",
" Β¬z * z % β4 = 2 % β4",
" Β¬β(z * z) = β2",
" PythagoreanTriple x y z β PythagoreanTriple y x z",
" x * x + y * y = z * z β y * y + x * x = z * z",
" PythagoreanTriple ... |
import Mathlib.Topology.UniformSpace.Cauchy
import Mathlib.Topology.UniformSpace.Separation
import Mathlib.Topology.DenseEmbedding
#align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c"
open Filter Function Set Uniformity Topology
sec... | Mathlib/Topology/UniformSpace/UniformEmbedding.lean | 110 | 114 | theorem UniformInducing.uniformContinuousOn_iff {f : Ξ± β Ξ²} {g : Ξ² β Ξ³} {S : Set Ξ±}
(hg : UniformInducing g) :
UniformContinuousOn f S β UniformContinuousOn (g β f) S := by |
dsimp only [UniformContinuousOn, Tendsto]
rw [β hg.comap_uniformity, β map_le_iff_le_comap, Filter.map_map, comp_def, comp_def]
| [
" UniformInducing f β UniformSpace.comap f instβΒΉ = instβΒ²",
" (β (s : Set (Ξ± Γ Ξ±)), s β comap (fun x => (f x.1, f x.2)) (π€ Ξ²) β s β π€ Ξ±) β β (s : Set (Ξ± Γ Ξ±)), s β π€ Ξ± β s β π€ Ξ±",
" UniformInducing f β UniformContinuous f β§ comap (Prod.map f f) (π€ Ξ²) β€ π€ Ξ±",
" π€ Ξ± β€ comap (fun x => (f x.1, f x.2)) (π€... | [
" UniformInducing f β UniformSpace.comap f instβΒΉ = instβΒ²",
" (β (s : Set (Ξ± Γ Ξ±)), s β comap (fun x => (f x.1, f x.2)) (π€ Ξ²) β s β π€ Ξ±) β β (s : Set (Ξ± Γ Ξ±)), s β π€ Ξ± β s β π€ Ξ±",
" UniformInducing f β UniformContinuous f β§ comap (Prod.map f f) (π€ Ξ²) β€ π€ Ξ±",
" π€ Ξ± β€ comap (fun x => (f x.1, f x.2)) (π€... |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 125 | 126 | theorem leadingCoeff_hermite (n : β) : (hermite n).leadingCoeff = 1 := by |
rw [β coeff_natDegree, natDegree_hermite, coeff_hermite_self]
| [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classi... | Mathlib/Topology/MetricSpace/Contracting.lean | 53 | 53 | theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by | simp [hf.1]
| [
" 0 < 1 - βK"
] | [] |
import Mathlib.Algebra.DirectSum.Internal
import Mathlib.Algebra.GradedMonoid
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Equiv
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous
import Mathlib.Algebra.Polynomial.Roots
#align_i... | Mathlib/RingTheory/MvPolynomial/Homogeneous.lean | 99 | 102 | theorem homogeneousSubmodule_eq_finsupp_supported [CommSemiring R] (n : β) :
homogeneousSubmodule Ο R n = Finsupp.supported _ R { d | degree d = n } := by |
simp_rw [β weightedDegree_one]
exact weightedHomogeneousSubmodule_eq_finsupp_supported R 1 n
| [
" (weightedDegree 1) d = degree d",
" weightedTotalDegree 1 Ο = Ο.totalDegree",
" (weightedDegree 1) c = n",
" coeff c a β 0 β¨ coeff c b β 0",
" coeff c a + coeff c b = 0",
" coeff c a β 0",
" False",
" r β’ coeff c a = 0",
" r β’ 0 = 0",
" homogeneousSubmodule Ο R n = Finsupp.supported R R {d | deg... | [
" (weightedDegree 1) d = degree d",
" weightedTotalDegree 1 Ο = Ο.totalDegree",
" (weightedDegree 1) c = n",
" coeff c a β 0 β¨ coeff c b β 0",
" coeff c a + coeff c b = 0",
" coeff c a β 0",
" False",
" r β’ coeff c a = 0",
" r β’ 0 = 0"
] |
import Mathlib.Algebra.Group.Hom.End
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
assert_n... | Mathlib/Algebra/Module/Defs.lean | 104 | 104 | theorem two_smul : (2 : R) β’ x = x + x := by | rw [β one_add_one_eq_two, add_smul, one_smul]
| [
" a β’ x + b β’ x = x",
" 2 β’ x = x + x"
] | [
" a β’ x + b β’ x = x"
] |
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v'... | Mathlib/LinearAlgebra/Dimension/Free.lean | 55 | 58 | theorem rank_mul_rank (A : Type v) [AddCommGroup A]
[Module K A] [Module F A] [IsScalarTower F K A] [Module.Free K A] :
Module.rank F K * Module.rank K A = Module.rank F A := by |
convert lift_rank_mul_lift_rank F K A <;> rw [lift_id]
| [
" lift.{w, v} (Module.rank F K) * lift.{v, w} (Module.rank K A) = lift.{v, w} (Module.rank F A)",
" Module.rank F K * Module.rank K A = Module.rank F A",
" Module.rank F K = lift.{v, v} (Module.rank F K)",
" Module.rank K A = lift.{v, v} (Module.rank K A)",
" Module.rank F A = lift.{v, v} (Module.rank F A)"... | [
" lift.{w, v} (Module.rank F K) * lift.{v, w} (Module.rank K A) = lift.{v, w} (Module.rank F A)"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Density
import Mathlib.Data.Nat.Cast.Field
import Mathlib.Order.Partition.Equipartition
import Mathlib.SetTheory.Ordinal.Basic
#align_import combinatorics.simple_graph.regularity.uniform from "leanprover-community/mathlib"@"bf7ef0e83e5b... | Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean | 148 | 151 | theorem right_nonuniformWitnesses_subset (h : Β¬G.IsUniform Ξ΅ s t) :
(G.nonuniformWitnesses Ξ΅ s t).2 β t := by |
rw [nonuniformWitnesses, dif_pos h]
exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.1
| [
" DecidableRel (G.IsUniform Ξ΅)",
" DecidableRel fun s t =>\n β β¦s' : Finset Ξ±β¦,\n s' β s β\n β β¦t' : Finset Ξ±β¦,\n t' β t β βs.card * Ξ΅ β€ βs'.card β βt.card * Ξ΅ β€ βt'.card β |β(G.edgeDensity s' t') - β(G.edgeDensity s t)| < Ξ΅",
" |β(G.edgeDensity s' t') - β(G.edgeDensity s t)| < Ξ΅'",
" ... | [
" DecidableRel (G.IsUniform Ξ΅)",
" DecidableRel fun s t =>\n β β¦s' : Finset Ξ±β¦,\n s' β s β\n β β¦t' : Finset Ξ±β¦,\n t' β t β βs.card * Ξ΅ β€ βs'.card β βt.card * Ξ΅ β€ βt'.card β |β(G.edgeDensity s' t') - β(G.edgeDensity s t)| < Ξ΅",
" |β(G.edgeDensity s' t') - β(G.edgeDensity s t)| < Ξ΅'",
" ... |
import Mathlib.Analysis.Convex.Between
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.NormedSpace.AddTorsor
#align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052... | Mathlib/Analysis/Convex/Normed.lean | 62 | 63 | theorem convex_ball (a : E) (r : β) : Convex β (Metric.ball a r) := by |
simpa only [Metric.ball, sep_univ] using (convexOn_univ_dist a).convex_lt r
| [
" βa β’ xβ + βb β’ yβ = a * βxβ + b * βyβ",
" ConvexOn β s fun z' => dist z' z",
" Convex β (ball a r)"
] | [
" βa β’ xβ + βb β’ yβ = a * βxβ + b * βyβ",
" ConvexOn β s fun z' => dist z' z"
] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
#align_import dynamics.ergodic.ergodic from "leanprover-community/mathlib"@"809e920edfa343283cea507aedff916ea0f1bd88"
open Set Function Filter MeasureTheory MeasureTheory.Measure
open ENNReal
variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} (f : Ξ± β Ξ±) {s : Set Ξ±}
... | Mathlib/Dynamics/Ergodic/Ergodic.lean | 74 | 76 | theorem prob_eq_zero_or_one [IsProbabilityMeasure ΞΌ] (hf : PreErgodic f ΞΌ) (hs : MeasurableSet s)
(hs' : f β»ΒΉ' s = s) : ΞΌ s = 0 β¨ ΞΌ s = 1 := by |
simpa [hs] using hf.measure_self_or_compl_eq_zero hs hs'
| [
" ΞΌ s = 0 β¨ ΞΌ sαΆ = 0",
" ΞΌ s = 0 β¨ ΞΌ s = 1"
] | [
" ΞΌ s = 0 β¨ ΞΌ sαΆ = 0"
] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.Dynamics.Minimal
import Mathlib.GroupTheory.GroupAction.Hom
import Mathlib.MeasureTheory.Group.MeasurableEquiv
import Mathlib.MeasureTheory.Measure.Regular
#align_import measure_theory.group.action from "leanprover-community/mathlib"@"f2ce6086713c78a7f8... | Mathlib/MeasureTheory/Group/Action.lean | 90 | 95 | theorem measurePreserving_smul : MeasurePreserving (c β’ Β·) ΞΌ ΞΌ :=
{ measurable := measurable_const_smul c
map_eq := by |
ext1 s hs
rw [map_apply (measurable_const_smul c) hs]
exact SMulInvariantMeasure.measure_preimage_smul c hs }
| [
" map (fun x => c β’ x) ΞΌ = ΞΌ",
" (map (fun x => c β’ x) ΞΌ) s = ΞΌ s",
" ΞΌ ((fun x => c β’ x) β»ΒΉ' s) = ΞΌ s"
] | [] |
import Mathlib.Order.Interval.Multiset
#align_import data.nat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
-- TODO
-- assert_not_exists Ring
open Finset Nat
variable (a b c : β)
namespace Nat
instance instLocallyFiniteOrder : LocallyFiniteOrder β where
finsetIcc a b... | Mathlib/Order/Interval/Finset/Nat.lean | 109 | 109 | theorem card_Iio : (Iio b).card = b := by | rw [Iio_eq_Ico, card_Ico, Nat.bot_eq_zero, Nat.sub_zero]
| [
" x β (fun a b => { val := β(List.range' a (b + 1 - a)), nodup := β― }) a b β a β€ x β§ x β€ b",
" a β€ x β§ x < a + (b + 1 - a) β a β€ x β§ x β€ b",
" x β (fun a b => { val := β(List.range' a (b - a)), nodup := β― }) a b β a β€ x β§ x < b",
" a β€ x β§ x < a + (b - a) β a β€ x β§ x < b",
" x β (fun a b => { val := β(List.... | [
" x β (fun a b => { val := β(List.range' a (b + 1 - a)), nodup := β― }) a b β a β€ x β§ x β€ b",
" a β€ x β§ x < a + (b + 1 - a) β a β€ x β§ x β€ b",
" x β (fun a b => { val := β(List.range' a (b - a)), nodup := β― }) a b β a β€ x β§ x < b",
" a β€ x β§ x < a + (b - a) β a β€ x β§ x < b",
" x β (fun a b => { val := β(List.... |
import Mathlib.Init.ZeroOne
import Mathlib.Data.Set.Defs
import Mathlib.Order.Basic
import Mathlib.Order.SymmDiff
import Mathlib.Tactic.Tauto
import Mathlib.Tactic.ByContra
import Mathlib.Util.Delaborators
#align_import data.set.basic from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
... | Mathlib/Data/Set/Basic.lean | 224 | 225 | theorem forall_in_swap {p : Ξ± β Ξ² β Prop} : (β a β s, β (b), p a b) β β (b), β a β s, p a b := by |
tauto
| [
" xβ β t",
" xβ β s",
" x β s β x β t",
" (β a β s, β (b : Ξ²), p a b) β β (b : Ξ²), β a β s, p a b"
] | [
" xβ β t",
" xβ β s",
" x β s β x β t"
] |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMa... | Mathlib/Analysis/Calculus/FDeriv/Equiv.lean | 116 | 118 | theorem comp_differentiable_iff {f : G β E} : Differentiable π (iso β f) β Differentiable π f := by |
rw [β differentiableOn_univ, β differentiableOn_univ]
exact iso.comp_differentiableOn_iff
| [
" DifferentiableWithinAt π (βiso β f) s x β DifferentiableWithinAt π f s x",
" DifferentiableWithinAt π f s x",
" DifferentiableAt π (βiso β f) x β DifferentiableAt π f x",
" DifferentiableOn π (βiso β f) s β DifferentiableOn π f s",
" (β x β s, DifferentiableWithinAt π (βiso β f) s x) β β x β s, Di... | [
" DifferentiableWithinAt π (βiso β f) s x β DifferentiableWithinAt π f s x",
" DifferentiableWithinAt π f s x",
" DifferentiableAt π (βiso β f) x β DifferentiableAt π f x",
" DifferentiableOn π (βiso β f) s β DifferentiableOn π f s",
" (β x β s, DifferentiableWithinAt π (βiso β f) s x) β β x β s, Di... |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 51 | 54 | theorem xgcdAux_rec {r s t r' s' t'} (h : 0 < r) :
xgcdAux r s t r' s' t' = xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t := by |
obtain β¨r, rflβ© := Nat.exists_eq_succ_of_ne_zero h.ne'
simp [xgcdAux]
| [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n β¨r' % k.succ, β¨s' - βq * s, ... | [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n β¨r' % k.succ, β¨s' - βq * s, ... |
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 | 59 | 61 | theorem mk_add_mem_enumFrom_iff_get? {n i : β} {x : Ξ±} {l : List Ξ±} :
(n + i, x) β enumFrom n l β l.get? i = x := by |
simp [mem_iff_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)",
" (enumFrom n l)... |
import Mathlib.Algebra.GradedMonoid
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.MvPolynomial.Basic
#align_import ring_theory.mv_polynomial.weighted_homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Fins... | Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean | 120 | 122 | theorem weightedTotalDegree_zero (w : Ο β M) :
weightedTotalDegree w (0 : MvPolynomial Ο R) = β₯ := by |
simp only [weightedTotalDegree, support_zero, Finset.sup_empty]
| [
" (weightedDegree w) f = f.sum fun i c => c β’ w i",
" weightedTotalDegree' w p = β₯ β p = 0",
" (β (s : Ο ββ β), coeff s p β 0 β False) β β (d : Ο ββ β), coeff d p = 0",
" weightedTotalDegree' w 0 = β₯",
" weightedTotalDegree' w p = β(weightedTotalDegree w p)",
" weightedTotalDegree' w p β€ β(weightedTotalDe... | [
" (weightedDegree w) f = f.sum fun i c => c β’ w i",
" weightedTotalDegree' w p = β₯ β p = 0",
" (β (s : Ο ββ β), coeff s p β 0 β False) β β (d : Ο ββ β), coeff d p = 0",
" weightedTotalDegree' w 0 = β₯",
" weightedTotalDegree' w p = β(weightedTotalDegree w p)",
" weightedTotalDegree' w p β€ β(weightedTotalDe... |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe"
open scoped LinearAlgebra.Projectivization
variable {ΞΉ K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ΞΉ β ... | Mathlib/LinearAlgebra/Projectivization/Independence.lean | 98 | 99 | theorem dependent_iff_not_independent : Dependent f β Β¬Independent f := by |
rw [dependent_iff, independent_iff]
| [
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" LinearIndependent K (Projectivization.rep β fun i => mk K (ff i) β―)",
" (Projectivization.rep β fun i => mk K (ff i) β―) = a β’ ff",
" (Projectivization.rep β fun i => mk K (... | [
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" LinearIndependent K (Projectivization.rep β fun i => mk K (ff i) β―)",
" (Projectivization.rep β fun i => mk K (ff i) β―) = a β’ ff",
" (Projectivization.rep β fun i => mk K (... |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 111 | 116 | theorem degree_hermite (n : β) : (hermite n).degree = n := by |
rw [degree_eq_of_le_of_coeff_ne_zero]
Β· simp_rw [degree_le_iff_coeff_zero, Nat.cast_lt]
rintro m hnm
exact coeff_hermite_of_lt hnm
Β· simp [coeff_hermite_self n]
| [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... |
import Mathlib.Analysis.Complex.Isometry
import Mathlib.Analysis.NormedSpace.ConformalLinearMap
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.complex.conformal from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
noncomputable section
open Complex Continuous... | Mathlib/Analysis/Complex/Conformal.lean | 78 | 91 | theorem IsConformalMap.is_complex_or_conj_linear (h : IsConformalMap g) :
(β map : β βL[β] β, map.restrictScalars β = g) β¨
β map : β βL[β] β, map.restrictScalars β = g βL βconjCLE := by |
rcases h with β¨c, -, li, rflβ©
obtain β¨li, rflβ© : β li' : β ββα΅’[β] β, li'.toLinearIsometry = li :=
β¨li.toLinearIsometryEquiv rfl, by ext1; rflβ©
rcases linear_isometry_complex li with β¨a, rfl | rflβ©
-- let rot := c β’ (a : β) β’ ContinuousLinearMap.id β β,
Β· refine Or.inl β¨c β’ (a : β) β’ ContinuousLinearMap.i... | [
" (β map, restrictScalars β map = g) β¨ β map, restrictScalars β map = g.comp βconjCLE",
" (β map, restrictScalars β map = c β’ li.toContinuousLinearMap) β¨\n β map, restrictScalars β map = (c β’ li.toContinuousLinearMap).comp βconjCLE",
" (li.toLinearIsometryEquiv β―).toLinearIsometry = li",
" (li.toLinearIsom... | [] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Ideal.Operations
namespace Submodule
open Pointwise
variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M]
variable {N Nβ Nβ P Pβ Pβ : Submodule R M}
def colon (N P : Submodule R M) : Ideal R :=
annihilator (P.map N.mkQ)
#align ... | Mathlib/RingTheory/Ideal/Colon.lean | 81 | 84 | theorem annihilator_quotient {N : Submodule R M} :
Module.annihilator R (M β§Έ N) = N.colon β€ := by |
simp_rw [SetLike.ext_iff, Module.mem_annihilator, colon, mem_annihilator, map_top,
LinearMap.range_eq_top.mpr (mkQ_surjective N), mem_top, forall_true_left, forall_const]
| [
" colon I β€ = I",
" β (x : R), (β p β β€, x * p β I) β x β I",
" β₯.colon N = N.annihilator",
" r β N.colon (span R {x}) β β (a : R), r β’ a β’ x β N",
" (β (a : R), r β’ a β’ x β N) β r β’ x β N",
" (β (a : R), a β’ r β’ x β N) β r β’ x β N",
" r β colon I (Ideal.span {x}) β r * x β I",
" Module.annihilator R ... | [
" colon I β€ = I",
" β (x : R), (β p β β€, x * p β I) β x β I",
" β₯.colon N = N.annihilator",
" r β N.colon (span R {x}) β β (a : R), r β’ a β’ x β N",
" (β (a : R), r β’ a β’ x β N) β r β’ x β N",
" (β (a : R), a β’ r β’ x β N) β r β’ x β N",
" r β colon I (Ideal.span {x}) β r * x β I"
] |
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Types
#align_import category_theory.limits.filtered from "leanprover-community/mathlib"@"e4ee4e30418efcb8cf304ba76ad653aeec04ba6e"
universe w' w v u
noncomputable section
open Categor... | Mathlib/CategoryTheory/Limits/Filtered.lean | 40 | 48 | theorem IsFiltered.iff_nonempty_limit : IsFiltered C β
β {J : Type v} [SmallCategory J] [FinCategory J] (F : J β₯€ C),
β (X : C), Nonempty (limit (F.op β yoneda.obj X)) := by |
rw [IsFiltered.iff_cocone_nonempty.{v}]
refine β¨fun h J _ _ F => ?_, fun h J _ _ F => ?_β©
Β· obtain β¨cβ© := h F
exact β¨c.pt, β¨(limitCompYonedaIsoCocone F c.pt).inv c.ΞΉβ©β©
Β· obtain β¨pt, β¨ΞΉβ©β© := h F
exact β¨β¨pt, (limitCompYonedaIsoCocone F pt).hom ΞΉβ©β©
| [
" IsFiltered C β\n β {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J β₯€ C),\n β X, Nonempty (limit (F.op β yoneda.obj X))",
" (β {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J β₯€ C), Nonempty (Cocone F)) β\n β {J : Type v} [inst : SmallCategory J] [inst_1 : Fi... | [] |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 93 | 95 | theorem card_option [Finite Ξ±] : Nat.card (Option Ξ±) = Nat.card Ξ± + 1 := by |
haveI := Fintype.ofFinite Ξ±
simp only [Nat.card_eq_fintype_card, Fintype.card_option]
| [
" Ξ± β Fin (Nat.card Ξ±)",
" Ξ± β Fin n",
" Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0",
" 0 < Nat.card Ξ± β Nonempty Ξ±",
" Nat.card Ξ± = Nat.card Ξ² β Nonempty (Ξ± β Ξ²)",
" Nat.card Ξ± β€ 1 β Subsingleton Ξ±",
" 1 < Nat.card Ξ± β Nontrivial Ξ±",
" Nat.card (Option Ξ±) = Nat.card Ξ± + 1"
] | [
" Ξ± β Fin (Nat.card Ξ±)",
" Ξ± β Fin n",
" Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0",
" 0 < Nat.card Ξ± β Nonempty Ξ±",
" Nat.card Ξ± = Nat.card Ξ² β Nonempty (Ξ± β Ξ²)",
" Nat.card Ξ± β€ 1 β Subsingleton Ξ±",
" 1 < Nat.card Ξ± β Nontrivial Ξ±"
] |
import Mathlib.Init.Function
#align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb"
universe u
open Function
namespace Option
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β Ξ² β Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³}
def mapβ (f : Ξ± β Ξ² β Ξ³) (a : Option Ξ±) ... | Mathlib/Data/Option/NAry.lean | 140 | 143 | theorem mapβ_right_comm {f : Ξ΄ β Ξ³ β Ξ΅} {g : Ξ± β Ξ² β Ξ΄} {f' : Ξ± β Ξ³ β Ξ΄'} {g' : Ξ΄' β Ξ² β Ξ΅}
(h_right_comm : β a b c, f (g a b) c = g' (f' a c) b) :
mapβ f (mapβ g a b) c = mapβ g' (mapβ f' a c) b := by |
cases a <;> cases b <;> cases c <;> simp [h_right_comm]
| [
" mapβ f a b = Seq.seq (f <$> a) fun x => b",
" mapβ f none b = Seq.seq (f <$> none) fun x => b",
" mapβ f (some valβ) b = Seq.seq (f <$> some valβ) fun x => b",
" mapβ f a none = none",
" mapβ f none none = none",
" mapβ f (some valβ) none = none",
" mapβ f a (some b) = Option.map (fun a => f a b) a",
... | [
" mapβ f a b = Seq.seq (f <$> a) fun x => b",
" mapβ f none b = Seq.seq (f <$> none) fun x => b",
" mapβ f (some valβ) b = Seq.seq (f <$> some valβ) fun x => b",
" mapβ f a none = none",
" mapβ f none none = none",
" mapβ f (some valβ) none = none",
" mapβ f a (some b) = Option.map (fun a => f a b) a",
... |
import Mathlib.Algebra.Module.Submodule.Lattice
import Mathlib.Algebra.Module.Submodule.LinearMap
open Function Pointwise Set
variable {R : Type*} {Rβ : Type*} {Rβ : Type*} {Rβ : Type*}
variable {M : Type*} {Mβ : Type*} {Mβ : Type*} {Mβ : Type*}
namespace Submodule
section AddCommMonoid
variable [Semiring R] [... | Mathlib/Algebra/Module/Submodule/Map.lean | 121 | 123 | theorem map_add_le (f g : M βββ[Οββ] Mβ) : map (f + g) p β€ map f p β map g p := by |
rintro x β¨m, hm, rflβ©
exact add_mem_sup (mem_map_of_mem hm) (mem_map_of_mem hm)
| [
" β (c : Rβ) {x : Mβ},\n x β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier β\n c β’ x β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier",
" c β’ f y β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier",
" Οββ a β’ f y β { carrier := βf '' βp, add_mem' := β―, zero... | [
" β (c : Rβ) {x : Mβ},\n x β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier β\n c β’ x β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier",
" c β’ f y β { carrier := βf '' βp, add_mem' := β―, zero_mem' := β― }.carrier",
" Οββ a β’ f y β { carrier := βf '' βp, add_mem' := β―, zero... |
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Pi
#align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
namespace Finset
open Multiset
section Pi
variable {Ξ± : Type*}
def Pi.empty (Ξ² : Ξ± β Sort*) (a : Ξ±) (h : a β (β
: Finset Ξ±)) : Ξ² a :=... | Mathlib/Data/Finset/Pi.lean | 74 | 83 | theorem Pi.cons_injective {a : Ξ±} {b : Ξ΄ a} {s : Finset Ξ±} (hs : a β s) :
Function.Injective (Pi.cons s a b) := fun eβ eβ eq =>
@Multiset.Pi.cons_injective Ξ± _ Ξ΄ a b s.1 hs _ _ <|
funext fun e =>
funext fun h =>
have :
Pi.cons s a b eβ e (by simpa only [Multiset.mem_cons, mem_insert] u... |
rw [eq]
this
| [
" e β insert a s",
" cons s a b eβ e β― = cons s a b eβ e β―"
] | [] |
import Mathlib.Data.Finsupp.Defs
#align_import data.list.to_finsupp from "leanprover-community/mathlib"@"06a655b5fcfbda03502f9158bbf6c0f1400886f9"
namespace List
variable {M : Type*} [Zero M] (l : List M) [DecidablePred (getD l Β· 0 β 0)] (n : β)
def toFinsupp : β ββ M where
toFun i := getD l i 0
support := ... | Mathlib/Data/List/ToFinsupp.lean | 92 | 94 | theorem toFinsupp_singleton (x : M) [DecidablePred (getD [x] Β· 0 β 0)] :
toFinsupp [x] = Finsupp.single 0 x := by |
ext β¨_ | iβ© <;> simp [Finsupp.single_apply, (Nat.zero_lt_succ _).ne]
| [
" n β Finset.filter (fun i => l.getD i 0 β 0) (Finset.range l.length) β (fun i => l.getD i 0) n β 0",
" Β¬l.getD n 0 = 0 β n < l.length",
" l.length β€ n β l.getD n 0 = 0",
" [].toFinsupp = 0",
" [].toFinsupp aβ = 0 aβ",
" [x].toFinsupp = Finsupp.single 0 x",
" [x].toFinsupp 0 = (Finsupp.single 0 x) 0",
... | [
" n β Finset.filter (fun i => l.getD i 0 β 0) (Finset.range l.length) β (fun i => l.getD i 0) n β 0",
" Β¬l.getD n 0 = 0 β n < l.length",
" l.length β€ n β l.getD n 0 = 0",
" [].toFinsupp = 0",
" [].toFinsupp aβ = 0 aβ"
] |
import Mathlib.Algebra.Ring.Int
import Mathlib.Data.ZMod.Basic
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Data.Fintype.BigOperators
#align_import number_theory.sum_four_squares from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc"
open Finset Polynomial FiniteField Equiv
| Mathlib/NumberTheory/SumFourSquares.lean | 28 | 31 | theorem euler_four_squares {R : Type*} [CommRing R] (a b c d x y z w : R) :
(a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 +
(a * z - b * w + c * x + d * y) ^ 2 + (a * w + b * z - c * y + d * x) ^ 2 =
(a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2) := by | ring
| [
" (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)"
] | [] |
import Mathlib.Algebra.Polynomial.Inductions
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.Ideal.Maps
#align_import data.polynomial.div from "leanprover-community/mathlib"@"e1e7190efdcefc925cb36f257a8362ef22944204"
noncomputable section
open Polynomial
... | Mathlib/Algebra/Polynomial/Div.lean | 166 | 173 | theorem natDegree_modByMonic_lt (p : R[X]) {q : R[X]} (hmq : Monic q) (hq : q β 1) :
natDegree (p %β q) < q.natDegree := by |
by_cases hpq : p %β q = 0
Β· rw [hpq, natDegree_zero, Nat.pos_iff_ne_zero]
contrapose! hq
exact eq_one_of_monic_natDegree_zero hmq hq
Β· haveI := Nontrivial.of_polynomial_ne hpq
exact natDegree_lt_natDegree hpq (degree_modByMonic_lt p hmq)
| [
" βq.natDegree β€ βp.natDegree",
" p.leadingCoeff β 0 β q β 0 β PartialOrder (WithBot β)",
" p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree",
" p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff",
" (p %β q).degree < q.degree",
" (if hq : ... | [
" βq.natDegree β€ βp.natDegree",
" p.leadingCoeff β 0 β q β 0 β PartialOrder (WithBot β)",
" p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree",
" p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff",
" (p %β q).degree < q.degree",
" (if hq : ... |
import Mathlib.MeasureTheory.Measure.Regular
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp
import Mathlib.Topology.UrysohnsLemma
import Mathlib.MeasureTheory.Integral.Bochner
#align_import measure_theory.function.continuous_map_dense from "leanprover-community/mathlib"@"e0736bb5b48bdadbca19dbd857e12bee38ccf... | Mathlib/MeasureTheory/Function/ContinuousMapDense.lean | 78 | 134 | theorem exists_continuous_snorm_sub_le_of_closed [ΞΌ.OuterRegular] (hp : p β β) {s u : Set Ξ±}
(s_closed : IsClosed s) (u_open : IsOpen u) (hsu : s β u) (hs : ΞΌ s β β) (c : E) {Ξ΅ : ββ₯0β}
(hΞ΅ : Ξ΅ β 0) :
β f : Ξ± β E,
Continuous f β§
snorm (fun x => f x - s.indicator (fun _y => c) x) p ΞΌ β€ Ξ΅ β§
... |
obtain β¨Ξ·, Ξ·_pos, hΞ·β© :
β Ξ· : ββ₯0, 0 < Ξ· β§ β s : Set Ξ±, ΞΌ s β€ Ξ· β snorm (s.indicator fun _x => c) p ΞΌ β€ Ξ΅ :=
exists_snorm_indicator_le hp c hΞ΅
have Ξ·pos : (0 : ββ₯0β) < Ξ· := ENNReal.coe_lt_coe.2 Ξ·_pos
obtain β¨V, sV, V_open, h'V, hVβ© : β (V : Set Ξ±), V β s β§ IsOpen V β§ ΞΌ V < β β§ ΞΌ (V \ s) < Ξ· :=
s_cl... | [
" β f,\n Continuous f β§\n snorm (fun x => f x - s.indicator (fun _y => c) x) p ΞΌ β€ Ξ΅ β§\n (β (x : Ξ±), βf xβ β€ βcβ) β§ Function.support f β u β§ Memβp f p ΞΌ",
" βg xβ = g x",
" β (x : Ξ±), βg x β’ cβ β€ βcβ",
" βg x β’ cβ β€ βcβ",
" g x * βcβ β€ βcβ",
" g x β€ 1",
" β (x : Ξ±), βg x β’ c - s.indicator... | [] |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Combinatorics.SimpleGraph.Maps
open Finset
namespace SimpleGraph
variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V)
section ReplaceVertex
def replaceVertex : SimpleGraph V where
Adj v w := if v = t then if w = t then False else G... | Mathlib/Combinatorics/SimpleGraph/Operations.lean | 126 | 135 | theorem card_edgeFinset_replaceVertex_of_adj (ha : G.Adj s t) :
(G.replaceVertex s t).edgeFinset.card = G.edgeFinset.card + G.degree s - G.degree t - 1 := by |
have inc : G.incidenceFinset t β G.edgeFinset := by simp [incidenceFinset, incidenceSet_subset]
rw [G.edgeFinset_replaceVertex_of_adj ha, card_sdiff (by simp [ha]),
card_union_of_disjoint G.disjoint_sdiff_neighborFinset_image, card_sdiff inc,
β Nat.sub_add_comm <| card_le_card inc, card_incidenceFinset_eq_... | [
" (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v",
" (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el... | [
" (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v",
" (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el... |
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional
open sco... | Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean | 52 | 54 | theorem mem_parallelepiped_iff (v : ΞΉ β E) (x : E) :
x β parallelepiped v β β t β Icc (0 : ΞΉ β β) 1, x = β i, t i β’ v i := by |
simp [parallelepiped, eq_comm]
| [
" x β parallelepiped v β β t β Icc 0 1, x = β i : ΞΉ, t i β’ v i"
] | [] |
import Mathlib.Logic.Function.CompTypeclasses
import Mathlib.Algebra.Group.Hom.Defs
section MonoidHomCompTriple
namespace MonoidHom
class CompTriple {M N P : Type*} [Monoid M] [Monoid N] [Monoid P]
(Ο : M β* N) (Ο : N β* P) (Ο : outParam (M β* P)) : Prop where
comp_eq : Ο.comp Ο = Ο
attribute [simp] C... | Mathlib/Algebra/Group/Hom/CompTypeclasses.lean | 98 | 106 | theorem comp_assoc {Q : Type*} [Monoid Q]
{Οβ : M β* N} {Οβ : N β* P} {Οββ : M β* P}
(ΞΊ : CompTriple Οβ Οβ Οββ)
{Οβ : P β* Q} {Οββ : N β* Q} (ΞΊ' : CompTriple Οβ Οβ Οββ)
{Οβββ : M β* Q} :
CompTriple Οβ Οββ Οβββ β CompTriple Οββ Οβ Οβββ := by |
constructor <;>
Β· rintro β¨hβ©
exact β¨by simp only [β ΞΊ.comp_eq, β h, β ΞΊ'.comp_eq, MonoidHom.comp_assoc]β©
| [
" Ο = id M",
" Ο xβ = (id M) xβ",
" Ο.comp Ο = Ο",
" Ο.comp Ο = Ο",
" Ο.comp Ο = Ο",
" _root_.id = β(id M)",
" βΟ β βΟ = βΟ",
" Ο (Ο x) = Ο x",
" Οβ.CompTriple Οββ Οβββ β Οββ.CompTriple Οβ Οβββ",
" Οβ.CompTriple Οββ Οβββ β Οββ.CompTriple Οβ Οβββ",
" Οββ.CompTriple Οβ Οβββ",
" Οβ.comp Οββ = Οββ... | [
" Ο = id M",
" Ο xβ = (id M) xβ",
" Ο.comp Ο = Ο",
" Ο.comp Ο = Ο",
" Ο.comp Ο = Ο",
" _root_.id = β(id M)",
" βΟ β βΟ = βΟ",
" Ο (Ο x) = Ο x"
] |
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 | 451 | 453 | theorem toNonUnitalNonAssocRing_injective :
Function.Injective (@toNonUnitalNonAssocRing 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.Order.BoundedOrder
#align_import data.prod.lex from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
variable {Ξ± Ξ² Ξ³ : Type*}
namespace Prod.Lex
@[inherit_doc] notation:35 Ξ± " Γβ " Ξ²:34 => Lex (Prod Ξ± Ξ²)
instance decidableEq (Ξ± Ξ² : Type*) [DecidableEq Ξ±] [DecidableEq Ξ²] ... | Mathlib/Data/Prod/Lex.lean | 105 | 109 | theorem monotone_fst [Preorder Ξ±] [LE Ξ²] (t c : Ξ± Γβ Ξ²) (h : t β€ c) :
(ofLex t).1 β€ (ofLex c).1 := by |
cases (Prod.Lex.le_iff t c).mp h with
| inl h' => exact h'.le
| inr h' => exact h'.1.le
| [
" (aβ, bβ) < (aβ, bβ) β (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) < (aβ, bβ) β (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) β€ (aβ, bβ)",
" Β¬(aβ, bβ) β€ (aβ, bβ)",
" False",
" aβ < aβ",
" (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",... | [
" (aβ, bβ) < (aβ, bβ) β (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) < (aβ, bβ) β (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",
" (aβ, bβ) β€ (aβ, bβ)",
" Β¬(aβ, bβ) β€ (aβ, bβ)",
" False",
" aβ < aβ",
" (aβ, bβ) β€ (aβ, bβ) β§ Β¬(aβ, bβ) β€ (aβ, bβ)",... |
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.isomorphism from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6"
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Category
structure Iso {... | Mathlib/CategoryTheory/Iso.lean | 117 | 117 | theorem symm_symm_eq {X Y : C} (Ξ± : X β
Y) : Ξ±.symm.symm = Ξ± := by | cases Ξ±; rfl
| [
" Ξ±.inv = Ξ±.inv β« Ξ².hom β« Ξ².inv",
" Ξ±.inv β« Ξ².hom β« Ξ².inv = (Ξ±.inv β« Ξ±.hom) β« Ξ².inv",
" (Ξ±.inv β« Ξ±.hom) β« Ξ².inv = Ξ².inv",
" Ξ± = Ξ²",
" { hom := homβ, inv := invβ, hom_inv_id := hom_inv_idβ, inv_hom_id := inv_hom_idβ } = Ξ²",
" { hom := homβΒΉ, inv := invβΒΉ, hom_inv_id := hom_inv_idβΒΉ, inv_hom_id := inv_hom_i... | [
" Ξ±.inv = Ξ±.inv β« Ξ².hom β« Ξ².inv",
" Ξ±.inv β« Ξ².hom β« Ξ².inv = (Ξ±.inv β« Ξ±.hom) β« Ξ².inv",
" (Ξ±.inv β« Ξ±.hom) β« Ξ².inv = Ξ².inv",
" Ξ± = Ξ²",
" { hom := homβ, inv := invβ, hom_inv_id := hom_inv_idβ, inv_hom_id := inv_hom_idβ } = Ξ²",
" { hom := homβΒΉ, inv := invβΒΉ, hom_inv_id := hom_inv_idβΒΉ, inv_hom_id := inv_hom_i... |
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 | 90 | 92 | theorem toNonUnitalNonAssocSemiring_injective :
Function.Injective (@toNonUnitalNonAssocSemiring R) := by |
rintro β¨β© β¨β© _; congr
| [
" Function.Injective (@toNonUnitalNonAssocSemiring R)",
" mk mul_assocβΒΉ = mk mul_assocβ"
] | [] |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.init_tail from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
variable {p : β} [hp : Fact p.Prime] (n : β) {R : Type*} [CommRing R]
-- type as `\bbW`
local notat... | Mathlib/RingTheory/WittVector/InitTail.lean | 88 | 109 | theorem select_add_select_not : β x : π R, select P x + select (fun i => Β¬P i) x = x := by |
-- Porting note: TC search was insufficient to find this instance, even though all required
-- instances exist. See zulip: [https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/WittVector.20saga/near/370073526]
have : IsPoly p fun {R} [CommRing R] x β¦ select P x + select (fun i β¦ Β¬P i) x :=
... | [
" (select P x).coeff n = (aeval x.coeff) (selectPoly P n)",
" (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)",
" (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)",
" { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef... | [
" (select P x).coeff n = (aeval x.coeff) (selectPoly P n)",
" (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)",
" (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)",
" { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef... |
import Mathlib.Tactic.NormNum.Core
import Mathlib.Tactic.HaveI
import Mathlib.Data.Nat.Cast.Commute
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.GroupWithZero.Invertible
import Mathlib.Tactic.ClearExclamation
import Mathlib.Data.Nat.Cast.Basic
set_option autoImplicit true
namespace Mathlib
open Lean hidi... | Mathlib/Tactic/NormNum/Basic.lean | 125 | 126 | theorem isintCast {R} [Ring R] (n m : β€) :
IsInt n m β IsInt (n : R) m := by | rintro β¨β¨β©β©; exact β¨rflβ©
| [
" (β(Int.negOfNat aβ)).natAbs = βaβ",
" IsNat n m β IsNat (βn) m",
" IsNat (ββm) m",
" ββm = βm",
" IsInt n m β IsInt (βn) m",
" IsInt (ββm) m"
] | [
" (β(Int.negOfNat aβ)).natAbs = βaβ",
" IsNat n m β IsNat (βn) m",
" IsNat (ββm) m",
" ββm = βm"
] |
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.RingTheory.MvPolynomial.Basic
#align_import field_theory.mv_polynomial from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
noncomputable section
open scoped Classical
... | Mathlib/FieldTheory/MvPolynomial.lean | 34 | 40 | theorem quotient_mk_comp_C_injective (I : Ideal (MvPolynomial Ο K)) (hI : I β β€) :
Function.Injective ((Ideal.Quotient.mk I).comp MvPolynomial.C) := by |
refine (injective_iff_map_eq_zero _).2 fun x hx => ?_
rw [RingHom.comp_apply, Ideal.Quotient.eq_zero_iff_mem] at hx
refine _root_.by_contradiction fun hx0 => absurd (I.eq_top_iff_one.2 ?_) hI
have := I.mul_mem_left (MvPolynomial.C xβ»ΒΉ) hx
rwa [β MvPolynomial.C.map_mul, inv_mul_cancel hx0, MvPolynomial.C_1] a... | [
" Function.Injective β((Ideal.Quotient.mk I).comp C)",
" x = 0",
" 1 β I"
] | [] |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N ... | Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 53 | 56 | theorem FiniteDimensional.rank_linearMap :
Module.rank S (M ββ[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by |
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul,
β finrank_eq_card_chooseBasisIndex, β finrank_eq_rank R, lift_natCast]
| [
" Module.rank S (M ββ[R] N) = lift.{w, v} (Module.rank R M) * lift.{v, w} (Module.rank S N)"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 197 | 198 | theorem preimage_add_const_Ico : (fun x => x + a) β»ΒΉ' Ico b c = Ico (b - a) (c - a) := by |
simp [β Ici_inter_Iio]
| [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Ico b c ... | [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a)"
] |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def Οβ : MulChar (ZMod 4) β€... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 48 | 52 | theorem isQuadratic_Οβ : Οβ.IsQuadratic := by |
intro a
-- Porting note (#11043): was `decide!`
fin_cases a
all_goals decide
| [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... | [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0"
] |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.continuants_recurrence from "leanprover-community/mathlib"@"5f11361a98ae4acd77f5c1837686f6f0102cdc25"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n : β} [Division... | Mathlib/Algebra/ContinuedFractions/ContinuantsRecurrence.lean | 50 | 59 | theorem numerators_recurrence {gp : Pair K} {ppredA predA : K}
(succ_nth_s_eq : g.s.get? (n + 1) = some gp) (nth_num_eq : g.numerators n = ppredA)
(succ_nth_num_eq : g.numerators (n + 1) = predA) :
g.numerators (n + 2) = gp.b * predA + gp.a * ppredA := by |
obtain β¨ppredConts, nth_conts_eq, β¨rflβ©β© : β conts, g.continuants n = conts β§ conts.a = ppredA :=
exists_conts_a_of_num nth_num_eq
obtain β¨predConts, succ_nth_conts_eq, β¨rflβ©β© :
β conts, g.continuants (n + 1) = conts β§ conts.a = predA :=
exists_conts_a_of_num succ_nth_num_eq
rw [num_eq_conts_a, con... | [
" g.continuantsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }",
" g.continuants (n + 1) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }",
" g.continuants (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.... | [
" g.continuantsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }",
" g.continuants (n + 1) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }",
" g.continuants (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.... |
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.DFinsupp.Order
import Mathlib.Order.Interval.Finset.Basic
#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
open DFinsupp Finset
open Pointwise
vari... | Mathlib/Data/DFinsupp/Interval.lean | 48 | 58 | theorem mem_dfinsupp_iff : f β s.dfinsupp t β f.support β s β§ β i β s, f i β t i := by |
refine mem_map.trans β¨?_, ?_β©
Β· rintro β¨f, hf, rflβ©
rw [Function.Embedding.coeFn_mk] -- Porting note: added to avoid heartbeat timeout
refine β¨support_mk_subset, fun i hi => ?_β©
convert mem_pi.1 hf i hi
exact mk_of_mem hi
Β· refine fun h => β¨fun i _ => f i, mem_pi.2 h.2, ?_β©
ext i
dsimp
... | [
" Function.Injective fun f => DFinsupp.mk s fun i => f βi β―",
" f = g",
" f i hi = g i hi",
" f β s.dfinsupp t β f.support β s β§ β i β s, f i β t i",
" (β a β s.pi t, { toFun := fun f => DFinsupp.mk s fun i => f βi β―, inj' := β― } a = f) β\n f.support β s β§ β i β s, f i β t i",
" ({ toFun := fun f => DF... | [
" Function.Injective fun f => DFinsupp.mk s fun i => f βi β―",
" f = g",
" f i hi = g i hi"
] |
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic
import Mathlib.Analysis.SpecialFunctions.PolarCoord
import Mathlib.Analysis.Convex.Complex
#align_import analysis.special_functions.gaussian from "leanprover-community/mathlib"@"7982767093ae38cba236487f9c9dd9cd99f63c16"
noncomputable section
open Real Set Measu... | Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean | 91 | 102 | theorem integrableOn_rpow_mul_exp_neg_mul_rpow {p s b : β} (hs : -1 < s) (hp : 1 β€ p) (hb : 0 < b) :
IntegrableOn (fun x : β => x ^ s * exp (- b * x ^ p)) (Ioi 0) := by |
have hib : 0 < b ^ (-pβ»ΒΉ) := rpow_pos_of_pos hb _
suffices IntegrableOn (fun x β¦ (b ^ (-pβ»ΒΉ)) ^ s * (x ^ s * exp (-x ^ p))) (Ioi 0) by
rw [show 0 = b ^ (-pβ»ΒΉ) * 0 by rw [mul_zero], β integrableOn_Ioi_comp_mul_left_iff _ _ hib]
refine this.congr_fun (fun _ hx => ?_) measurableSet_Ioi
rw [β mul_assoc, mu... | [
" (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)",
" Tendsto (fun x => -x - -b * x ^ p) atTop atTop",
" (fun x => x * (b * x ^ (p - 1) + -1)) =αΆ [atTop] fun x => -x - -b * x ^ p",
" x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p",
" x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p",
" b * x ^ p + -x =... | [
" (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)",
" Tendsto (fun x => -x - -b * x ^ p) atTop atTop",
" (fun x => x * (b * x ^ (p - 1) + -1)) =αΆ [atTop] fun x => -x - -b * x ^ p",
" x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p",
" x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p",
" b * x ^ p + -x =... |
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Ideal.Over
import Mathlib.RingTheory.JacobsonIdeal
#align_import ring_theory.jacobson from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0"
set_option autoImplicit true
universe u
namespace Ideal
open Polynomial
... | Mathlib/RingTheory/Jacobson.lean | 132 | 148 | theorem isJacobson_of_isIntegral [Algebra R S] [Algebra.IsIntegral R S] (hR : IsJacobson R) :
IsJacobson S := by |
rw [isJacobson_iff_prime_eq]
intro P hP
by_cases hP_top : comap (algebraMap R S) P = β€
Β· simp [comap_eq_top_iff.1 hP_top]
Β· haveI : Nontrivial (R β§Έ comap (algebraMap R S) P) := Quotient.nontrivial hP_top
rw [jacobson_eq_iff_jacobson_quotient_eq_bot]
refine eq_bot_of_comap_eq_bot (R := R β§Έ comap (alge... | [
" IsJacobson R β β (P : Ideal R), P.IsPrime β P.jacobson = P",
" (β (P : Ideal R), P.IsPrime β P.jacobson = P) β β (I : Ideal R), I.IsRadical β I.jacobson = I",
" x β I",
" β β¦I_1 : Ideal Rβ¦, I_1 β {J | I β€ J β§ J.IsPrime} β x β I_1",
" x β P",
" β β¦I : Ideal Rβ¦, I β {J | P β€ J β§ J.IsMaximal} β x β I",
"... | [
" IsJacobson R β β (P : Ideal R), P.IsPrime β P.jacobson = P",
" (β (P : Ideal R), P.IsPrime β P.jacobson = P) β β (I : Ideal R), I.IsRadical β I.jacobson = I",
" x β I",
" β β¦I_1 : Ideal Rβ¦, I_1 β {J | I β€ J β§ J.IsPrime} β x β I_1",
" x β P",
" β β¦I : Ideal Rβ¦, I β {J | P β€ J β§ J.IsMaximal} β x β I",
"... |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 56 | 58 | theorem Ici_mul_Ici_subset' (a b : Ξ±) : Ici a * Ici b β Ici (a * b) := by |
rintro x β¨y, hya, z, hzb, rflβ©
exact mul_le_mul' hya hzb
| [
" Icc a b * Icc c d β Icc (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z β Icc (a * c) (b * d)",
" Iic a * Iic b β Iic (a * b)",
" (fun x x_1 => x * x_1) y z β Iic (a * b)",
" Ici a * Ici b β Ici (a * b)",
" (fun x x_1 => x * x_1) y z β Ici (a * b)"
] | [
" Icc a b * Icc c d β Icc (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z β Icc (a * c) (b * d)",
" Iic a * Iic b β Iic (a * b)",
" (fun x x_1 => x * x_1) y z β Iic (a * b)"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Function Filter Set
open scoped Topology
name... | Mathlib/Analysis/SpecialFunctions/Arsinh.lean | 168 | 168 | theorem arsinh_nonpos_iff : arsinh x β€ 0 β x β€ 0 := by | rw [β sinh_le_sinh, sinh_zero, sinh_arsinh]
| [
" rexp x.arsinh = x + β(1 + x ^ 2)",
" 0 < x + β(1 + x ^ 2)",
" -x < β(1 + x ^ 2)",
" (-x) ^ 2 < 1 + x ^ 2",
" arsinh 0 = 0",
" (-x).arsinh = -x.arsinh",
" -x + β(1 + (-x) ^ 2) = (x + β(1 + x ^ 2))β»ΒΉ",
" (-x + β(1 + (-x) ^ 2)) * (x + β(1 + x ^ 2)) = 1",
" 0 β€ 1 + x ^ 2",
" x.arsinh.sinh = x",
" ... | [
" rexp x.arsinh = x + β(1 + x ^ 2)",
" 0 < x + β(1 + x ^ 2)",
" -x < β(1 + x ^ 2)",
" (-x) ^ 2 < 1 + x ^ 2",
" arsinh 0 = 0",
" (-x).arsinh = -x.arsinh",
" -x + β(1 + (-x) ^ 2) = (x + β(1 + x ^ 2))β»ΒΉ",
" (-x + β(1 + (-x) ^ 2)) * (x + β(1 + x ^ 2)) = 1",
" 0 β€ 1 + x ^ 2",
" x.arsinh.sinh = x",
" ... |
import Mathlib.GroupTheory.Coxeter.Length
import Mathlib.Data.ZMod.Parity
namespace CoxeterSystem
open List Matrix Function
variable {B : Type*}
variable {W : Type*} [Group W]
variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W)
local prefix:100 "s" => cs.simple
local prefix:100 "Ο" => cs.wordProd
local prefi... | Mathlib/GroupTheory/Coxeter/Inversion.lean | 76 | 78 | theorem inv : tβ»ΒΉ = t := by |
rcases ht with β¨w, i, rflβ©
simp [mul_assoc]
| [
" cs.IsReflection (cs.simple i)",
" cs.simple i = 1 * cs.simple i * 1β»ΒΉ",
" t ^ 2 = 1",
" (w * cs.simple i * wβ»ΒΉ) ^ 2 = 1",
" t * t = 1",
" w * cs.simple i * wβ»ΒΉ * (w * cs.simple i * wβ»ΒΉ) = 1",
" tβ»ΒΉ = t",
" (w * cs.simple i * wβ»ΒΉ)β»ΒΉ = w * cs.simple i * wβ»ΒΉ"
] | [
" cs.IsReflection (cs.simple i)",
" cs.simple i = 1 * cs.simple i * 1β»ΒΉ",
" t ^ 2 = 1",
" (w * cs.simple i * wβ»ΒΉ) ^ 2 = 1",
" t * t = 1",
" w * cs.simple i * wβ»ΒΉ * (w * cs.simple i * wβ»ΒΉ) = 1"
] |
import Mathlib.Algebra.FreeMonoid.Basic
#align_import algebra.free_monoid.count from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f"
variable {Ξ± : Type*} (p : Ξ± β Prop) [DecidablePred p]
namespace FreeAddMonoid
def countP : FreeAddMonoid Ξ± β+ β where
toFun := List.countP p
map_zero... | Mathlib/Algebra/FreeMonoid/Count.lean | 31 | 32 | theorem countP_of (x : Ξ±) : countP p (of x) = if p x = true then 1 else 0 := by |
simp [countP, List.countP, List.countP.go]
| [
" (countP p) (of x) = if p x = (true = true) then 1 else 0"
] | [] |
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 | 195 | 196 | theorem logb_le_logb (h : 0 < x) (hβ : 0 < y) : logb b x β€ logb b y β x β€ y := by |
rw [logb, logb, div_le_div_right (log_pos hb), log_le_log_iff 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",
" ((a * b).logb c)β»ΒΉ = (a.logb c)β»ΒΉ + (b.logb c)β»ΒΉ",
" c.logb ... |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
| Mathlib/RingTheory/Int/Basic.lean | 88 | 90 | theorem Int.Prime.dvd_mul {m n : β€} {p : β} (hp : Nat.Prime p) (h : (p : β€) β£ m * n) :
p β£ m.natAbs β¨ p β£ n.natAbs := by |
rwa [β hp.dvd_mul, β Int.natAbs_mul, β Int.natCast_dvd]
| [
" p β£ m.natAbs β¨ p β£ n.natAbs"
] | [] |
import Mathlib.Topology.Order.IsLUB
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {Ξ± Ξ² Ξ³ : Type*}
section DenselyOrdered
variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] [OrderTopology Ξ±] [DenselyOrdered Ξ±] {a b : Ξ±}
{s : Set Ξ±}
theorem closure_Ioi' {a : Ξ±} (h : (Io... | Mathlib/Topology/Order/DenselyOrdered.lean | 146 | 147 | theorem Ico_subset_closure_interior (a b : Ξ±) : Ico a b β closure (interior (Ico a b)) := by |
simpa only [dual_Ioc] using Ioc_subset_closure_interior (OrderDual.toDual b) (OrderDual.toDual a)
| [
" closure (Ioi a) = Ici a",
" closure (Ioi a) β Ici a",
" Ici a β closure (Ioi a)",
" a β closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) β Icc a b",
" Icc a b β closure (Ioo a b)",
" {a, b} β closure (Ioo a b)",
" a β closure (Ioo a b) β§ b β closure (Ioo a b)",
" β
β closure... | [
" closure (Ioi a) = Ici a",
" closure (Ioi a) β Ici a",
" Ici a β closure (Ioi a)",
" a β closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) β Icc a b",
" Icc a b β closure (Ioo a b)",
" {a, b} β closure (Ioo a b)",
" a β closure (Ioo a b) β§ b β closure (Ioo a b)",
" β
β closure... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open scoped Classical... | Mathlib/Analysis/Calculus/Deriv/Mul.lean | 487 | 492 | theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x)
(hu : HasDerivWithinAt u u' s x) :
HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by |
have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt
rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul,
one_smul, add_comm] at this
| [
" HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x",
" HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (... | [
" HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x",
" HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (... |
import Mathlib.Algebra.Lie.Abelian
import Mathlib.Algebra.Lie.IdealOperations
import Mathlib.Algebra.Lie.Quotient
#align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102"
variable {R L M M' : Type*}
variable [CommRing R] [LieRing L] [LieAlgebra R L]
varia... | Mathlib/Algebra/Lie/Normalizer.lean | 75 | 78 | theorem monotone_normalizer : Monotone (normalizer : LieSubmodule R L M β LieSubmodule R L M) := by |
intro Nβ Nβ h m hm
rw [mem_normalizer] at hm β’
exact fun x => h (hm x)
| [
" β
x, aβ + bββ β N",
" β
x, aββ + β
x, bββ β N",
" β
x, 0β β N",
" β
x, t β’ mβ β N",
" t β’ β
x, mβ β N",
" β
y, β
x, mββ β N",
" β
β
y, xβ, mβ + β
x, β
y, mββ β N",
" N β€ N.normalizer",
" m β N.normalizer",
" β (x : L), β
x, mβ β N",
" (Nβ β Nβ).normalizer = Nβ.normalizer β Nβ.normalizer",
" mβ β (Nβ β Nβ... | [
" β
x, aβ + bββ β N",
" β
x, aββ + β
x, bββ β N",
" β
x, 0β β N",
" β
x, t β’ mβ β N",
" t β’ β
x, mβ β N",
" β
y, β
x, mββ β N",
" β
β
y, xβ, mβ + β
x, β
y, mββ β N",
" N β€ N.normalizer",
" m β N.normalizer",
" β (x : L), β
x, mβ β N",
" (Nβ β Nβ).normalizer = Nβ.normalizer β Nβ.normalizer",
" mβ β (Nβ β Nβ... |
import Mathlib.MeasureTheory.PiSystem
import Mathlib.Order.OmegaCompletePartialOrder
import Mathlib.Topology.Constructions
import Mathlib.MeasureTheory.MeasurableSpace.Basic
open Set
namespace MeasureTheory
variable {ΞΉ : Type _} {Ξ± : ΞΉ β Type _}
section cylinder
def cylinder (s : Finset ΞΉ) (S : Set (β i : s, Ξ±... | Mathlib/MeasureTheory/Constructions/Cylinders.lean | 197 | 203 | theorem union_cylinder (sβ sβ : Finset ΞΉ) (Sβ : Set (β i : sβ, Ξ± i)) (Sβ : Set (β i : sβ, Ξ± i))
[DecidableEq ΞΉ] :
cylinder sβ Sβ βͺ cylinder sβ Sβ =
cylinder (sβ βͺ sβ)
((fun f β¦ fun j : sβ β¦ f β¨j, Finset.mem_union_left sβ j.propβ©) β»ΒΉ' Sβ βͺ
(fun f β¦ fun j : sβ β¦ f β¨j, Finset.mem_union_righ... |
ext1 f; simp only [mem_union, mem_cylinder, mem_setOf_eq]; rfl
| [
" cylinder s β
= β
",
" cylinder s univ = univ",
" cylinder s S = β
β S = β
",
" cylinder s S = β
",
" S = β
",
" False",
" f' β cylinder s S",
" (fun i => f' βi) β S",
" cylinder sβ Sβ β© cylinder sβ Sβ = cylinder (sβ βͺ sβ) ((fun f j => f β¨βj, β―β©) β»ΒΉ' Sβ β© (fun f j => f β¨βj, β―β©) β»ΒΉ' Sβ)",
" f β cylind... | [
" cylinder s β
= β
",
" cylinder s univ = univ",
" cylinder s S = β
β S = β
",
" cylinder s S = β
",
" S = β
",
" False",
" f' β cylinder s S",
" (fun i => f' βi) β S",
" cylinder sβ Sβ β© cylinder sβ Sβ = cylinder (sβ βͺ sβ) ((fun f j => f β¨βj, β―β©) β»ΒΉ' Sβ β© (fun f j => f β¨βj, β―β©) β»ΒΉ' Sβ)",
" f β cylind... |
import Mathlib.ModelTheory.ElementaryMaps
open FirstOrder
namespace FirstOrder
namespace Language
open Structure
variable {L : Language} {M : Type*} {N : Type*} {P : Type*} {Q : Type*}
variable [L.Structure M] [L.Structure N] [L.Structure P] [L.Structure Q]
def Substructure.IsElementary (S : L.Substructure M... | Mathlib/ModelTheory/ElementarySubstructures.lean | 111 | 112 | theorem theory_model_iff (S : L.ElementarySubstructure M) (T : L.Theory) : S β¨ T β M β¨ T := by |
simp only [Theory.model_iff, realize_sentence]
| [
" { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'β }",
" β₯S β¨ T β M β¨ T"
] | [
" { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'β }"
] |
import Mathlib.Probability.Kernel.MeasurableIntegral
#align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b"
open MeasureTheory
open scoped ENNReal
namespace ProbabilityTheory
namespace kernel
variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}... | Mathlib/Probability/Kernel/Composition.lean | 158 | 169 | theorem measurable_compProdFun_of_finite (ΞΊ : kernel Ξ± Ξ²) [IsFiniteKernel ΞΊ] (Ξ· : kernel (Ξ± Γ Ξ²) Ξ³)
[IsFiniteKernel Ξ·] (hs : MeasurableSet s) : Measurable fun a => compProdFun ΞΊ Ξ· a s := by |
simp only [compProdFun]
have h_meas : Measurable (Function.uncurry fun a b => Ξ· (a, b) {c : Ξ³ | (b, c) β s}) := by
have :
(Function.uncurry fun a b => Ξ· (a, b) {c : Ξ³ | (b, c) β s}) = fun p =>
Ξ· p {c : Ξ³ | (p.2, c) β s} := by
ext1 p
rw [Function.uncurry_apply_pair]
rw [this]
e... | [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... | [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... |
import Mathlib.Init.Data.Sigma.Lex
import Mathlib.Data.Prod.Lex
import Mathlib.Data.Sigma.Lex
import Mathlib.Order.Antichain
import Mathlib.Order.OrderIsoNat
import Mathlib.Order.WellFounded
import Mathlib.Tactic.TFAE
#align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104... | Mathlib/Order/WellFoundedSet.lean | 286 | 293 | theorem PartiallyWellOrderedOn.union (hs : s.PartiallyWellOrderedOn r)
(ht : t.PartiallyWellOrderedOn r) : (s βͺ t).PartiallyWellOrderedOn r := by |
rintro f hf
rcases Nat.exists_subseq_of_forall_mem_union f hf with β¨g, hgs | hgtβ©
Β· rcases hs _ hgs with β¨m, n, hlt, hrβ©
exact β¨g m, g n, g.strictMono hlt, hrβ©
Β· rcases ht _ hgt with β¨m, n, hlt, hrβ©
exact β¨g m, g n, g.strictMono hlt, hrβ©
| [
" (s βͺ t).PartiallyWellOrderedOn r",
" β m n, m < n β§ r (f m) (f n)"
] | [] |
import Mathlib.Analysis.InnerProductSpace.Calculus
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.euclidean_dist from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
open scoped Topology
open Set
variable {E : Type*} [AddCommGroup E] [Topologi... | Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean | 82 | 84 | theorem closedBall_eq_image (x : E) (r : β) :
closedBall x r = toEuclidean.symm '' Metric.closedBall (toEuclidean x) r := by |
rw [toEuclidean.image_symm_eq_preimage, closedBall_eq_preimage]
| [
" closedBall x r = βtoEuclidean.symm '' Metric.closedBall (toEuclidean x) r"
] | [] |
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 | 80 | 81 | theorem pairwise_of_forall {l : List Ξ±} (H : β x y, R x y) : Pairwise R l := by |
induction l <;> 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.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic
#align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open FiniteDimensional Complex
open scoped ... | Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean | 140 | 140 | theorem rotation_zero : o.rotation 0 = LinearIsometryEquiv.refl β V := by | ext; simp [rotation]
| [
" β (x y : V),\n βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) yβ«_β =\n βͺx, yβ«_β",
" βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.r... | [
" β (x y : V),\n βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) yβ«_β =\n βͺx, yβ«_β",
" βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.r... |
import Mathlib.Data.ENNReal.Real
#align_import data.real.conjugate_exponents from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
noncomputable section
open scoped ENNReal
namespace Real
@[mk_iff]
structure IsConjExponent (p q : β) : Prop where
one_lt : 1 < p
inv_add_inv_conj : pβ»... | Mathlib/Data/Real/ConjExponents.lean | 85 | 88 | theorem conj_eq : q = p / (p - 1) := by |
have := h.inv_add_inv_conj
rw [β eq_sub_iff_add_eq', inv_eq_iff_eq_inv] at this
field_simp [this, h.ne_zero]
| [
" q = p / (p - 1)"
] | [] |
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle
#align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped EuclideanGeometry
ope... | Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean | 36 | 42 | theorem oangle_add_right_eq_arccos_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = β(Ο / 2)) :
o.oangle x (x + y) = Real.arccos (βxβ / βx + yβ) := by |
have hs : (o.oangle x (x + y)).sign = 1 := by
rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
rw [o.oangle_eq_angle_of_sign_eq_one hs,
InnerProductGeometry.angle_add_eq_arccos_of_inner_eq_zero
(o.inner_eq_zero_of_oangle_eq_pi_div_two h)]
| [
" o.oangle x (x + y) = β(βxβ / βx + yβ).arccos",
" (o.oangle x (x + y)).sign = 1"
] | [] |
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 | 89 | 94 | theorem EventuallyLE.countable_bUnion {ΞΉ : 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 [biUnion_eq_iUnion]
haveI := hS.toEncodable
exact EventuallyLE.countable_iUnion 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.Topology.ContinuousFunction.Basic
#align_import topology.compact_open from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Set Filter TopologicalSpace
open scoped Topology
namespace ContinuousMap
section CompactOpen
variable {Ξ± X Y Z T : Type*}
variable [Topologica... | Mathlib/Topology/CompactOpen.lean | 129 | 138 | theorem continuous_comp' : Continuous fun x : C(X, Y) Γ C(Y, Z) => x.2.comp x.1 := by |
simp_rw [continuous_iff_continuousAt, ContinuousAt, tendsto_nhds_compactOpen]
intro β¨f, gβ© K hK U hU (hKU : MapsTo (g β f) K U)
obtain β¨L, hKL, hLc, hLUβ© : β L β πΛ’ (f '' K), IsCompact L β§ MapsTo g L U :=
exists_mem_nhdsSet_isCompact_mapsTo g.continuous (hK.image f.continuous) hU
(mapsTo_image_iff.2 h... | [
" π f = β¨
K, β¨
(_ : IsCompact K), β¨
U, β¨
(_ : IsOpen U), β¨
(_ : MapsTo (βf) K U), π {g | MapsTo (βg) K U}",
" Tendsto f l (π g) β\n β (K : Set Y), IsCompact K β β (U : Set Z), IsOpen U β MapsTo (βg) K U β βαΆ (a : Ξ±) in l, MapsTo (β(f a)) K U",
" compactOpen = induced g.comp compactOpen",
" IsOpen {x | M... | [
" π f = β¨
K, β¨
(_ : IsCompact K), β¨
U, β¨
(_ : IsOpen U), β¨
(_ : MapsTo (βf) K U), π {g | MapsTo (βg) K U}",
" Tendsto f l (π g) β\n β (K : Set Y), IsCompact K β β (U : Set Z), IsOpen U β MapsTo (βg) K U β βαΆ (a : Ξ±) in l, MapsTo (β(f a)) K U",
" compactOpen = induced g.comp compactOpen",
" IsOpen {x | M... |
import Mathlib.CategoryTheory.Preadditive.Basic
#align_import category_theory.preadditive.functor_category from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb5bffd3"
namespace CategoryTheory
open CategoryTheory.Limits Preadditive
variable {C D : Type*} [Category C] [Category D] [Preadditive D... | Mathlib/CategoryTheory/Preadditive/FunctorCategory.lean | 123 | 124 | theorem app_units_zsmul (X : C) (Ξ± : F βΆ G) (n : β€Λ£) : (n β’ Ξ±).app X = n β’ Ξ±.app X := by |
apply app_zsmul
| [
" β (a b c : F βΆ G), a + b + c = a + (b + c)",
" aβ + bβ + cβ = aβ + (bβ + cβ)",
" (aβ + bβ + cβ).app xβ = (aβ + (bβ + cβ)).app xβ",
" β (a : F βΆ G), 0 + a = a",
" 0 + aβ = aβ",
" (0 + aβ).app xβ = aβ.app xβ",
" β (a : F βΆ G), a + 0 = a",
" aβ + 0 = aβ",
" (aβ + 0).app xβ = aβ.app xβ",
" β (a b : ... | [
" β (a b c : F βΆ G), a + b + c = a + (b + c)",
" aβ + bβ + cβ = aβ + (bβ + cβ)",
" (aβ + bβ + cβ).app xβ = (aβ + (bβ + cβ)).app xβ",
" β (a : F βΆ G), 0 + a = a",
" 0 + aβ = aβ",
" (0 + aβ).app xβ = aβ.app xβ",
" β (a : F βΆ G), a + 0 = a",
" aβ + 0 = aβ",
" (aβ + 0).app xβ = aβ.app xβ",
" β (a b : ... |
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Analysis.Convex.Normed
open Metric Bornology Filter Set
open scoped NNReal Topology Pointwise
noncomputable section
section Module
variable {E : Type*} [AddCommGroup E] [Module β E]
def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β’ x
the... | Mathlib/Analysis/Convex/GaugeRescale.lean | 75 | 80 | theorem gaugeRescale_gaugeRescale {s t u : Set E} (hta : Absorbent β t) (htb : IsVonNBounded β t)
(x : E) : gaugeRescale t u (gaugeRescale s t x) = gaugeRescale s u x := by |
rcases eq_or_ne x 0 with rfl | hx; Β· simp
rw [gaugeRescale_def s t x, gaugeRescale_smul, gaugeRescale, gaugeRescale, smul_smul,
div_mul_div_cancel]
exacts [((gauge_pos hta htb).2 hx).ne', div_nonneg (gauge_nonneg _) (gauge_nonneg _)]
| [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x",
" gauge t (gaugeRescale s t 0) = gauge s 0",
" ga... | [
" gaugeRescale s t (c β’ x) = c β’ gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) β’ x = (c * (gauge s x / gauge t x)) β’ x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x β 0",
" gauge t (gaugeRescale s t x) = gauge s x",
" gauge t (gaugeRescale s t 0) = gauge s 0",
" ga... |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.SetTheory.Cardinal.Cofinality
#align_import linear_algebra.basis from "leanprover-communit... | Mathlib/LinearAlgebra/Basis.lean | 154 | 158 | theorem repr_symm_apply (v) : b.repr.symm v = Finsupp.total ΞΉ M R b v :=
calc
b.repr.symm v = b.repr.symm (v.sum Finsupp.single) := by | simp
_ = v.sum fun i vi => b.repr.symm (Finsupp.single i vi) := map_finsupp_sum ..
_ = Finsupp.total ΞΉ M R b v := by simp only [repr_symm_single, Finsupp.total_apply]
| [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... | [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... |
import Mathlib.Algebra.Group.Embedding
import Mathlib.Data.Fin.Basic
import Mathlib.Data.Finset.Union
#align_import data.finset.image from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
-- TODO
-- assert_not_exists OrderedCommMonoid
assert_not_exists MonoidWithZero
assert_not_exists MulA... | Mathlib/Data/Finset/Image.lean | 81 | 86 | theorem mem_map_equiv {f : Ξ± β Ξ²} {b : Ξ²} : b β s.map f.toEmbedding β f.symm b β s := by |
rw [mem_map]
exact
β¨by
rintro β¨a, H, rflβ©
simpa, fun h => β¨_, h, by simpβ©β©
| [
" b β map f.toEmbedding s β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" f.symm (f.toEmbedding a) β s",
" f.toEmbedding (f.symm b) = b"
] | [] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section IsCoprime
variable {R : Type ... | Mathlib/RingTheory/Coprime/Lemmas.lean | 61 | 66 | theorem IsCoprime.prod_left : (β i β t, IsCoprime (s i) x) β IsCoprime (β i β t, s i) x := by |
classical
refine Finset.induction_on t (fun _ β¦ isCoprime_one_left) fun b t hbt ih H β¦ ?_
rw [Finset.prod_insert hbt]
rw [Finset.forall_mem_insert] at H
exact H.1.mul_left (ih H.2)
| [
" IsCoprime m n β m.gcd n = 1",
" IsCoprime m n β m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 β IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 β β a b, a * m + b * n = 1",
" β a b, a * m + b * n = 1",
" IsCoprime βm βn β m.Coprime n",
" IsCoprime βa βb",
" IsCoprime ββa ββ... | [
" IsCoprime m n β m.gcd n = 1",
" IsCoprime m n β m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 β IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 β β a b, a * m + b * n = 1",
" β a b, a * m + b * n = 1",
" IsCoprime βm βn β m.Coprime n",
" IsCoprime βa βb",
" IsCoprime ββa ββ... |
import Mathlib.Analysis.Convex.Combination
import Mathlib.Analysis.Convex.Extreme
#align_import analysis.convex.independent from "leanprover-community/mathlib"@"fefd8a38be7811574cd2ec2f77d3a393a407f112"
open scoped Classical
open Affine
open Finset Function
variable {π E ΞΉ : Type*}
section OrderedSemiring
va... | Mathlib/Analysis/Convex/Independent.lean | 144 | 153 | theorem convexIndependent_set_iff_inter_convexHull_subset {s : Set E} :
ConvexIndependent π ((β) : s β E) β β t, t β s β s β© convexHull π t β t := by |
constructor
Β· rintro hc t h x β¨hxs, hxtβ©
refine hc { x | βx β t } β¨x, hxsβ© ?_
rw [Subtype.coe_image_of_subset h]
exact hxt
Β· intro hc t x h
rw [β Subtype.coe_injective.mem_set_image]
exact hc (t.image ((β) : s β E)) (Subtype.coe_image_subset s t) β¨x.prop, hβ©
| [
" ConvexIndependent π p",
" x β s",
" Injective p",
" p i β (convexHull π) (p '' {j})",
" p j β {p j}",
" ConvexIndependent π (p β βf)",
" f x β βf '' s",
" p (f x) β (convexHull π) (p '' (βf '' s))",
" ConvexIndependent π Subtype.val",
" Subtype.val = p β βfe",
" βxβ = (p β βfe) xβ",
" C... | [
" ConvexIndependent π p",
" x β s",
" Injective p",
" p i β (convexHull π) (p '' {j})",
" p j β {p j}",
" ConvexIndependent π (p β βf)",
" f x β βf '' s",
" p (f x) β (convexHull π) (p '' (βf '' s))",
" ConvexIndependent π Subtype.val",
" Subtype.val = p β βfe",
" βxβ = (p β βfe) xβ",
" C... |
import Mathlib.RingTheory.Ideal.Cotangent
import Mathlib.RingTheory.QuotientNilpotent
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.RingTheory.FinitePresentation
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Localization.Away.AdjoinRoot
#align_import ring_theory.etale from ... | Mathlib/RingTheory/Smooth/Basic.lean | 68 | 88 | theorem exists_lift {B : Type u} [CommRing B] [_RB : Algebra R B]
[FormallySmooth R A] (I : Ideal B) (hI : IsNilpotent I) (g : A ββ[R] B β§Έ I) :
β f : A ββ[R] B, (Ideal.Quotient.mkβ R I).comp f = g := by |
revert g
change Function.Surjective (Ideal.Quotient.mkβ R I).comp
revert _RB
apply Ideal.IsNilpotent.induction_on (R := B) I hI
Β· intro B _ I hI _; exact FormallySmooth.comp_surjective I hI
Β· intro B _ I J hIJ hβ hβ _ g
let this : ((B β§Έ I) β§Έ J.map (Ideal.Quotient.mk I)) ββ[R] B β§Έ J :=
{
(... | [
" β f, (Ideal.Quotient.mkβ R I).comp f = g",
" β (g : A ββ[R] B β§Έ I), β f, (Ideal.Quotient.mkβ R I).comp f = g",
" Function.Surjective (Ideal.Quotient.mkβ R I).comp",
" β [_RB : Algebra R B], Function.Surjective (Ideal.Quotient.mkβ R I).comp",
" β β¦S : Type uβ¦ [inst : CommRing S] (I : Ideal S),\n I ^ 2 =... | [] |
import Mathlib.Analysis.BoxIntegral.DivergenceTheorem
import Mathlib.Analysis.BoxIntegral.Integrability
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.FDeriv.Equiv
#align_impo... | Mathlib/MeasureTheory/Integral/DivergenceTheorem.lean | 111 | 137 | theorem integral_divergence_of_hasFDerivWithinAt_off_countable_auxβ (I : Box (Fin (n + 1)))
(f : ββΏβΊΒΉ β EβΏβΊΒΉ)
(f' : ββΏβΊΒΉ β ββΏβΊΒΉ βL[β] EβΏβΊΒΉ) (s : Set ββΏβΊΒΉ)
(hs : s.Countable) (Hc : ContinuousOn f (Box.Icc I))
(Hd : β x β (Box.Icc I) \ s, HasFDerivWithinAt f (f' x) (Box.Icc I) x)
(Hi : IntegrableOn (f... |
simp only [β setIntegral_congr_set_ae (Box.coe_ae_eq_Icc _)]
have A := (Hi.mono_set Box.coe_subset_Icc).hasBoxIntegral β₯ rfl
have B :=
hasIntegral_GP_divergence_of_forall_hasDerivWithinAt I f f' (s β© Box.Icc I)
(hs.mono inter_subset_left) (fun x hx => Hc _ hx.2) fun x hx =>
Hd _ β¨hx.1, fun h => h... | [
" β« (x : Fin (n + 1) β β) in Box.Icc I, β i : Fin (n + 1), (f' x) (e i) i =\n β i : Fin (n + 1),\n ((β« (x : Fin n β β) in Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -\n β« (x : Fin n β β) in Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)",
" β« (x : Fin (n + 1) β β) in βI, β i : Fin (... | [] |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Hom.Defs
#align_import algebra.hom.group from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
-- `NeZero` cannot be additivised, hence its theory should be developed outside of the
-- `Algebra.Group` folder.
assert_not_exists... | Mathlib/Algebra/Group/Hom/Basic.lean | 252 | 254 | theorem comp_inv (Ο : G β* H) (Ο : M β* G) : Ο.comp Οβ»ΒΉ = (Ο.comp Ο)β»ΒΉ := by |
ext
simp only [Function.comp_apply, inv_apply, map_inv, coe_comp]
| [
" (fun g => (f g)β»ΒΉ) (a * b) = (fun g => (f g)β»ΒΉ) a * (fun g => (f g)β»ΒΉ) b",
" Ο.comp Οβ»ΒΉ = (Ο.comp Ο)β»ΒΉ",
" (Ο.comp Οβ»ΒΉ) xβ = (Ο.comp Ο)β»ΒΉ xβ"
] | [
" (fun g => (f g)β»ΒΉ) (a * b) = (fun g => (f g)β»ΒΉ) a * (fun g => (f g)β»ΒΉ) b"
] |
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.Algebra.Algebra.NonUnitalHom
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Finsupp.Basic
import Mathlib.LinearAlgebra.Finsupp
#align_import algebra.monoid_algebra.basic from "leanprover-community/mathlib"@... | Mathlib/Algebra/MonoidAlgebra/Basic.lean | 249 | 251 | theorem liftNC_one {g_hom : Type*} [FunLike g_hom G R] [OneHomClass g_hom G R]
(f : k β+* R) (g : g_hom) :
liftNC (f : k β+ R) g 1 = 1 := by | simp [one_def]
| [
" (liftNC βf βg) 1 = 1"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
import Qq
#align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
noncomputable section
open scoped Classical
open Real ComplexConjugate
open Finset Set
namespace Real
variable {x y z... | Mathlib/Analysis/SpecialFunctions/Pow/Real.lean | 128 | 128 | theorem rpow_zero_pos (x : β) : 0 < x ^ (0 : β) := by | simp
| [
" x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)",
" (if βx = 0 then if βy = 0 then 1 else 0 else ((βx).log * βy).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)",
" Complex.re 1 = 1",
" Complex.re 1 = 0",
" Complex.re 1 = rexp (x.log * y)",
" Complex.re 0 = 1... | [
" x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)",
" (if βx = 0 then if βy = 0 then 1 else 0 else ((βx).log * βy).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)",
" Complex.re 1 = 1",
" Complex.re 1 = 0",
" Complex.re 1 = rexp (x.log * y)",
" Complex.re 0 = 1... |
import Mathlib.Data.ENNReal.Inv
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
section Real
variable {a b c d : ββ₯0β} {r p q : ββ₯0}
theorem toReal_add (ha : a β β) (hb : b β β) : (a + b).toReal = a.toReal ... | Mathlib/Data/ENNReal/Real.lean | 43 | 47 | theorem toReal_sub_of_le {a b : ββ₯0β} (h : b β€ a) (ha : a β β) :
(a - b).toReal = a.toReal - b.toReal := by |
lift b to ββ₯0 using ne_top_of_le_ne_top ha h
lift a to ββ₯0 using ha
simp only [β ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)]
| [
" (a + b).toReal = a.toReal + b.toReal",
" (βa + b).toReal = (βa).toReal + b.toReal",
" (βa + βb).toReal = (βa).toReal + (βb).toReal",
" (a - b).toReal = a.toReal - b.toReal",
" (a - βb).toReal = a.toReal - (βb).toReal",
" (βa - βb).toReal = (βa).toReal - (βb).toReal"
] | [
" (a + b).toReal = a.toReal + b.toReal",
" (βa + b).toReal = (βa).toReal + b.toReal",
" (βa + βb).toReal = (βa).toReal + (βb).toReal"
] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Comp
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
#align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Top... | Mathlib/Analysis/Calculus/Deriv/Comp.lean | 382 | 385 | theorem HasFDerivAt.comp_hasDerivAt_of_eq
(hl : HasFDerivAt l l' y) (hf : HasDerivAt f f' x) (hy : y = f x) :
HasDerivAt (l β f) (l' f') x := by |
rw [hy] at hl; exact hl.comp_hasDerivAt x hf
| [
" HasDerivWithinAt (l β f) (l' f') s x",
" HasDerivAt (l β f) (l' f') x"
] | [
" HasDerivWithinAt (l β f) (l' f') s x"
] |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Set.Pointwise.Iterate
import Mathlib.Dynamics.Ergodic.Ergodic
import Mathlib.MeasureTheory.Covering.DensityTheorem
import Mathlib.MeasureTheory.Group.AddCircle
import Mathlib.MeasureTheory.Measure.Haar.Unique
#align_import dynamics.ergodic.add_circle from "lea... | Mathlib/Dynamics/Ergodic/AddCircle.lean | 45 | 101 | theorem ae_empty_or_univ_of_forall_vadd_ae_eq_self {s : Set <| AddCircle T}
(hs : NullMeasurableSet s volume) {ΞΉ : Type*} {l : Filter ΞΉ} [l.NeBot] {u : ΞΉ β AddCircle T}
(huβ : β i, (u i +α΅₯ s : Set _) =α΅[volume] s) (huβ : Tendsto (addOrderOf β u) l atTop) :
s =α΅[volume] (β
: Set <| AddCircle T) β¨ s =α΅[volume... |
/- Sketch of proof:
Assume `T = 1` for simplicity and let `ΞΌ` be the Haar measure. We may assume `s` has positive
measure since otherwise there is nothing to prove. In this case, by Lebesgue's density theorem,
there exists a point `d` of positive density. Let `Iβ±Ό` be the sequence of closed balls about `d... | [
" s =αΆ [ae volume] β
β¨ s =αΆ [ae volume] univ",
" s =αΆ [ae ΞΌ] β
β¨ s =αΆ [ae ΞΌ] univ",
" ENNReal.ofReal T β 0",
" ΞΌ s = 0 β¨ ΞΌ s = ENNReal.ofReal T",
" ΞΌ s = ENNReal.ofReal T",
" Tendsto (fun j => ΞΌ (s β© I j) / ΞΌ (I j)) l (π 1)",
" 0 < 2 * β(n j)",
" Tendsto Ξ΄ l (π[>] 0)",
" Tendsto Ξ΄ l (π 0)",
" 0 < T... | [] |
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd"
namespace Polynomial
open Polynomial Finsupp Finset
open... | Mathlib/Algebra/Polynomial/Reverse.lean | 139 | 141 | theorem reflect_C_mul (f : R[X]) (r : R) (N : β) : reflect N (C r * f) = C r * reflect N f := by |
ext
simp only [coeff_reflect, coeff_C_mul]
| [
" revAtFun N (revAtFun N i) = i",
" (if (if i β€ N then N - i else i) β€ N then N - if i β€ N then N - i else i else if i β€ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i β€ N",
" i = i",
" Function.Injective (revAtFun N)",
" a = b",
" (revAt N) i = i",
" (revAt (N + ... | [
" revAtFun N (revAtFun N i) = i",
" (if (if i β€ N then N - i else i) β€ N then N - if i β€ N then N - i else i else if i β€ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i β€ N",
" i = i",
" Function.Injective (revAtFun N)",
" a = b",
" (revAt N) i = i",
" (revAt (N + ... |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.PNat.Basic
import Mathlib.GroupTheory.GroupAction.Prod
variable {M : Type*}
class PNatPowAssoc (M : Type*) [Mul M] [Pow M β+] : Prop where
protected ppow_add : β (k n : β+) (x : M), x ^ (k + n) = x ^ k * x ^ n
prote... | Mathlib/Algebra/Group/PNatPowAssoc.lean | 64 | 65 | theorem ppow_mul_comm (m n : β+) (x : M) :
x ^ m * x ^ n = x ^ n * x ^ m := by | simp only [β ppow_add, add_comm]
| [
" x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)",
" x ^ m * x ^ n = x ^ n * x ^ m"
] | [
" x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)"
] |
import Mathlib.Algebra.Module.Submodule.Map
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
open Function
open Pointwise
variable {R : Type*} {Rβ : Type*} {Rβ : Type*} {Rβ : Type*}
variable {K : Type*}
variable {M : Type*} {Mβ : Type*} {Mβ : Type*... | Mathlib/Algebra/Module/Submodule/Ker.lean | 121 | 122 | theorem le_ker_iff_map [RingHomSurjective Οββ] {f : F} {p : Submodule R M} :
p β€ ker f β map f p = β₯ := by | rw [ker, eq_bot_iff, map_le_iff_le_comap]
| [
" ker f β€ ker (g.comp f)",
" ker f β€ comap f (ker g)",
" ker f β ker g β€ ker (f ββ g)",
" ker f β€ ker (f ββ g)",
" ker f β€ ker (g ββ f)",
" x β comap f p",
" Disjoint p (ker f) β β x β p, f x = 0 β x = 0",
" ker f = β₯ β β (m : M), f m = 0 β m = 0",
" m = 0",
" p β€ ker f β map f p = β₯"
] | [
" ker f β€ ker (g.comp f)",
" ker f β€ comap f (ker g)",
" ker f β ker g β€ ker (f ββ g)",
" ker f β€ ker (f ββ g)",
" ker f β€ ker (g ββ f)",
" x β comap f p",
" Disjoint p (ker f) β β x β p, f x = 0 β x = 0",
" ker f = β₯ β β (m : M), f m = 0 β m = 0",
" m = 0"
] |
import Mathlib.Algebra.MvPolynomial.PDeriv
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.RingTheory.Polynomial.Pochhammer
#align_import ring_theory.polynomial.bernstein from "le... | Mathlib/RingTheory/Polynomial/Bernstein.lean | 61 | 62 | theorem eq_zero_of_lt {n Ξ½ : β} (h : n < Ξ½) : bernsteinPolynomial R n Ξ½ = 0 := by |
simp [bernsteinPolynomial, Nat.choose_eq_zero_of_lt h]
| [
" bernsteinPolynomial β€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n Ξ½ = 0"
] | [
" bernsteinPolynomial β€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3"
] |
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
import Mathlib.Data.Real.ConjExponents
#align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
universe u... | Mathlib/Analysis/MeanInequalities.lean | 150 | 166 | theorem geom_mean_weighted_of_constant (w z : ΞΉ β β) (x : β) (hw : β i β s, 0 β€ w i)
(hw' : β i β s, w i = 1) (hz : β i β s, 0 β€ z i) (hx : β i β s, w i β 0 β z i = x) :
β i β s, z i ^ w i = x :=
calc
β i β s, z i ^ w i = β i β s, x ^ w i := by |
refine prod_congr rfl fun i hi => ?_
rcases eq_or_ne (w i) 0 with hβ | hβ
Β· rw [hβ, rpow_zero, rpow_zero]
Β· rw [hx i hi hβ]
_ = x := by
rw [β rpow_sum_of_nonneg _ hw, hw', rpow_one]
have : (β i β s, w i) β 0 := by
rw [hw']
exact one_ne_zero
obtain β¨i, his, ... | [
" β i β s, z i ^ w i β€ β i β s, w i * z i",
" 0 β€ β i β s, w i * z i",
" z i ^ w i = 0",
" 0 ^ w i = 0",
" β i β s, z i ^ w i = β x β s, rexp ((z x).log * w x)",
" β i β s, w i * z i = β x β s, w x * rexp (z x).log",
" β x β s, z x ^ w x = rexp ((z x).log * w x)",
" β x β s, w x * z x = w x * rexp (z ... | [
" β i β s, z i ^ w i β€ β i β s, w i * z i",
" 0 β€ β i β s, w i * z i",
" z i ^ w i = 0",
" 0 ^ w i = 0",
" β i β s, z i ^ w i = β x β s, rexp ((z x).log * w x)",
" β i β s, w i * z i = β x β s, w x * rexp (z x).log",
" β x β s, z x ^ w x = rexp ((z x).log * w x)",
" β x β s, w x * z x = w x * rexp (z ... |
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.RingTheory.Int.Basic
import Mathlib.RingTheory.Localization.Integral
import Mathlib.RingTheory.IntegrallyClosed
#align_import ring_theory.polynomial.gauss_lemma from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
open... | Mathlib/RingTheory/Polynomial/GaussLemma.lean | 54 | 70 | theorem integralClosure.mem_lifts_of_monic_of_dvd_map {f : R[X]} (hf : f.Monic) {g : K[X]}
(hg : g.Monic) (hd : g β£ f.map (algebraMap R K)) :
g β lifts (algebraMap (integralClosure R K) K) := by |
have := mem_lift_of_splits_of_roots_mem_range (integralClosure R g.SplittingField)
((splits_id_iff_splits _).2 <| SplittingField.splits g) (hg.map _) fun a ha =>
(SetLike.ext_iff.mp (integralClosure R g.SplittingField).range_algebraMap _).mpr <|
roots_mem_integralClosure hf ?_
Β· rw [lifts_iff_coe... | [
" g β lifts (algebraMap (β₯(integralClosure R K)) K)",
" g.coeff n β Set.range β(algebraMap (β₯(integralClosure R K)) K)",
" g.coeff n β β(integralClosure R K).toSubring",
" evalβ (algebraMap R K) (g.coeff n) p = 0",
" eval (g.coeff n) (map (algebraMap R K) p) = 0",
" Function.Injective β(algebraMap K g.Spl... | [] |
import Mathlib.Data.Int.Bitwise
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.Basic
#align_import data.int.lemmas from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f"
open Nat
namespace Int
theorem le_natCast_sub (m n : β) : (m ... | Mathlib/Data/Int/Lemmas.lean | 70 | 72 | theorem natAbs_inj_of_nonneg_of_nonpos {a b : β€} (ha : 0 β€ a) (hb : b β€ 0) :
natAbs a = natAbs b β a = -b := by |
simpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg ha (neg_nonneg_of_nonpos hb)
| [
" βm - βn β€ β(m - n)",
" 0 β€ βn",
" a.natAbs = b.natAbs β a ^ 2 = b ^ 2",
" a.natAbs = b.natAbs β a * a = b * b",
" a.natAbs < b.natAbs β a ^ 2 < b ^ 2",
" a.natAbs < b.natAbs β a * a < b * b",
" a.natAbs β€ b.natAbs β a ^ 2 β€ b ^ 2",
" a.natAbs β€ b.natAbs β a * a β€ b * b",
" a.natAbs = b.natAbs β a ... | [
" βm - βn β€ β(m - n)",
" 0 β€ βn",
" a.natAbs = b.natAbs β a ^ 2 = b ^ 2",
" a.natAbs = b.natAbs β a * a = b * b",
" a.natAbs < b.natAbs β a ^ 2 < b ^ 2",
" a.natAbs < b.natAbs β a * a < b * b",
" a.natAbs β€ b.natAbs β a ^ 2 β€ b ^ 2",
" a.natAbs β€ b.natAbs β a * a β€ b * b",
" a.natAbs = b.natAbs β a ... |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Data.Real.Sqrt
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008... | Mathlib/Analysis/Normed/Group/Quotient.lean | 181 | 184 | theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) :
βmk' S mβ = 0 β m β closure (S : Set M) := by |
rw [mk'_apply, norm_mk, β mem_closure_iff_infDist_zero]
exact β¨0, S.zero_memβ©
| [
" βxβ = infDist 0 {m | βm = x}",
" ββxβ = infDist x βS",
" infDist x (β(IsometryEquiv.subLeft x).symm β»ΒΉ' {m | βm = βx}) = infDist x βS",
" y β β(IsometryEquiv.subLeft x).symm β»ΒΉ' {m | βm = βx} β y β βS",
" β-xβ = βxβ",
" sInf (norm '' {m | βm = -x}) = sInf (norm '' {m | βm = x})",
" r β norm '' {m | βm... | [
" βxβ = infDist 0 {m | βm = x}",
" ββxβ = infDist x βS",
" infDist x (β(IsometryEquiv.subLeft x).symm β»ΒΉ' {m | βm = βx}) = infDist x βS",
" y β β(IsometryEquiv.subLeft x).symm β»ΒΉ' {m | βm = βx} β y β βS",
" β-xβ = βxβ",
" sInf (norm '' {m | βm = -x}) = sInf (norm '' {m | βm = x})",
" r β norm '' {m | βm... |
import Mathlib.Data.Nat.Prime
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.prime_norm_num from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
open Nat Qq Lean Meta
namespace Mathlib.Meta.NormNum
theorem not_prime_mul_of_ble (a b n : β) (h : a * b = n) (hβ : a.ble 1 = fals... | Mathlib/Tactic/NormNum/Prime.lean | 84 | 88 | theorem minFacHelper_2 {n k k' : β} (e : k + 2 = k') (nk : Β¬ Nat.Prime k)
(h : MinFacHelper n k) : MinFacHelper n k' := by |
refine minFacHelper_1 e h Ξ» h2 β¦ ?_
rw [β h2] at nk
exact nk <| minFac_prime h.one_lt.ne'
| [
" 1 < n",
" 1 < 0",
" 1 < succ 0",
" MinFacHelper n 3",
" 2 < 3",
" 3 % 2 = 1",
" 3 β€ n.minFac",
" 3 β€ p",
" 3 β€ 2",
" MinFacHelper n k'",
" MinFacHelper n (k + 2)",
" (k + 2) % 2 = 1",
" k % 2 = 1",
" k + 2 β€ n.minFac",
" n.minFac + 2 β€ n.minFac",
" 2 = n.minFac",
" 2 β£ n.minFac",
... | [
" 1 < n",
" 1 < 0",
" 1 < succ 0",
" MinFacHelper n 3",
" 2 < 3",
" 3 % 2 = 1",
" 3 β€ n.minFac",
" 3 β€ p",
" 3 β€ 2",
" MinFacHelper n k'",
" MinFacHelper n (k + 2)",
" (k + 2) % 2 = 1",
" k % 2 = 1",
" k + 2 β€ n.minFac",
" n.minFac + 2 β€ n.minFac",
" 2 = n.minFac",
" 2 β£ n.minFac"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Set.Subsingleton
#align_import combinatorics.composition from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
open List
variable {n : β}
... | Mathlib/Combinatorics/Enumerative/Composition.lean | 207 | 210 | theorem sizeUpTo_ofLength_le (i : β) (h : c.length β€ i) : c.sizeUpTo i = n := by |
dsimp [sizeUpTo]
convert c.blocks_sum
exact take_all_of_le h
| [
" β i : Fin c.length, c.blocksFun i = n",
"n : β c : Composition n | n",
" c.length β€ n",
" c.length β€ c.blocks.sum",
" 0 < c.length",
" 0 < c.blocks.sum",
" c.blocks.sum = n",
" c.sizeUpTo 0 = 0",
" c.sizeUpTo i = n",
" (take i c.blocks).sum = n",
" take i c.blocks = c.blocks"
] | [
" β i : Fin c.length, c.blocksFun i = n",
"n : β c : Composition n | n",
" c.length β€ n",
" c.length β€ c.blocks.sum",
" 0 < c.length",
" 0 < c.blocks.sum",
" c.blocks.sum = n",
" c.sizeUpTo 0 = 0"
] |
import Mathlib.Data.List.Duplicate
import Mathlib.Data.List.Sort
#align_import data.list.nodup_equiv_fin from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace List
variable {Ξ± : Type*}
section Sublist
theorem sublist_of_orderEmbedding_get?_eq {l l' : List Ξ±} (f : β βͺo β)
... | Mathlib/Data/List/NodupEquivFin.lean | 144 | 161 | theorem sublist_iff_exists_orderEmbedding_get?_eq {l l' : List Ξ±} :
l <+ l' β β f : β βͺo β, β ix : β, l.get? ix = l'.get? (f ix) := by |
constructor
Β· intro H
induction' H with xs ys y _H IH xs ys x _H IH
Β· simp
Β· obtain β¨f, hfβ© := IH
refine β¨f.trans (OrderEmbedding.ofStrictMono (Β· + 1) fun _ => by simp), ?_β©
simpa using hf
Β· obtain β¨f, hfβ© := IH
refine
β¨OrderEmbedding.ofMapLEIff (fun ix : β => if ix = 0 th... | [
" l <+ l'",
" [] <+ l'",
" hd :: tl <+ l'",
" (fun i => f (i + 1) - (f 0 + 1)) a β€ (fun i => f (i + 1) - (f 0 + 1)) b β a β€ b",
" f (a + 1) - (f 0 + 1) β€ f (b + 1) - (f 0 + 1) β a β€ b",
" f 0 + 1 β€ f (b + 1)",
" 0 < b + 1",
" β (ix : β), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)",
" tl.get? ix =... | [
" l <+ l'",
" [] <+ l'",
" hd :: tl <+ l'",
" (fun i => f (i + 1) - (f 0 + 1)) a β€ (fun i => f (i + 1) - (f 0 + 1)) b β a β€ b",
" f (a + 1) - (f 0 + 1) β€ f (b + 1) - (f 0 + 1) β a β€ b",
" f 0 + 1 β€ f (b + 1)",
" 0 < b + 1",
" β (ix : β), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)",
" tl.get? ix =... |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.SetTheory.Cardinal.Cofinality
#align_import linear_algebra.basis from "leanprover-communit... | Mathlib/LinearAlgebra/Basis.lean | 178 | 179 | theorem repr_range : LinearMap.range (b.repr : M ββ[R] ΞΉ ββ R) = Finsupp.supported R R univ := by |
rw [LinearEquiv.range, Finsupp.supported_univ]
| [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... | [
" { repr := b } = default",
" f = g",
" { repr := reprβ } = g",
" { repr := reprβΒΉ } = { repr := reprβ }",
" βf.repr.symm = βg.repr.symm",
" (βf.repr.symm ββ Finsupp.lsingle aβ) 1 = (βg.repr.symm ββ Finsupp.lsingle aβ) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c β’ Finsupp.single i 1)",
" b... |
import Mathlib.Topology.Algebra.InfiniteSum.Defs
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Topology.Algebra.Monoid
noncomputable section
open Filter Finset Function
open scoped Topology
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*}
section tprod
variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] {f g : Ξ² β Ξ±} {a aβ aβ : ... | Mathlib/Topology/Algebra/InfiniteSum/Basic.lean | 387 | 388 | theorem tprod_congr_set_coe (f : Ξ² β Ξ±) {s t : Set Ξ²} (h : s = t) :
β' x : s, f x = β' x : t, f x := by | rw [h]
| [
" β' (x : βs), f βx = β' (x : βt), f βx"
] | [] |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.List.AList
#align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
namespace AList
variable {Ξ± M : Type*} [Zero M]
open List
noncomputable def lookupFinsupp (l : AList fun _x : Ξ± => M) : Ξ± ββ M where
... | Mathlib/Data/Finsupp/AList.lean | 95 | 98 | theorem lookupFinsupp_eq_zero_iff [DecidableEq Ξ±] {l : AList fun _x : Ξ± => M} {a : Ξ±} :
l.lookupFinsupp a = 0 β a β l β¨ (0 : M) β l.lookup a := by |
rw [lookupFinsupp_apply, β lookup_eq_none]
cases' lookup a l with m <;> simp
| [
" Finset Ξ±",
" a β (filter (fun x => decide (x.snd β 0)) l.entries).keys.toFinset β (fun a => (lookup a l).getD 0) a β 0",
" (β b β lookup a l, decide (b β 0) = true) β (lookup a l).getD 0 β 0",
" (β b β none, decide (b β 0) = true) β none.getD 0 β 0",
" (β b β some valβ, decide (b β 0) = true) β (some valβ... | [
" Finset Ξ±",
" a β (filter (fun x => decide (x.snd β 0)) l.entries).keys.toFinset β (fun a => (lookup a l).getD 0) a β 0",
" (β b β lookup a l, decide (b β 0) = true) β (lookup a l).getD 0 β 0",
" (β b β none, decide (b β 0) = true) β none.getD 0 β 0",
" (β b β some valβ, decide (b β 0) = true) β (some valβ... |
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.Ring
#align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Finset
namespace Nat
variable (p : β β Prop)
section Count
variable [DecidablePred p]
def count (n : β) : β :=
(List.range n).... | Mathlib/Data/Nat/Count.lean | 54 | 56 | theorem count_eq_card_filter_range (n : β) : count p n = ((range n).filter p).card := by |
rw [count, List.countP_eq_length_filter]
rfl
| [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... | [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x"
] |
import Mathlib.Data.Fintype.Card
import Mathlib.Computability.Language
import Mathlib.Tactic.NormNum
#align_import computability.DFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
open Computability
universe u v
-- Porting note: Required as `DFA` is used in mathlib3
set_option li... | Mathlib/Computability/DFA.lean | 137 | 148 | theorem evalFrom_of_pow {x y : List Ξ±} {s : Ο} (hx : M.evalFrom s x = s)
(hy : y β ({x} : Language Ξ±)β) : M.evalFrom s y = s := by |
rw [Language.mem_kstar] at hy
rcases hy with β¨S, rfl, hSβ©
induction' S with a S ih
Β· rfl
Β· have ha := hS a (List.mem_cons_self _ _)
rw [Set.mem_singleton_iff] at ha
rw [List.join, evalFrom_of_append, ha, hx]
apply ih
intro z hz
exact hS z (List.mem_cons_of_mem a hz)
| [
" M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a",
" x β M.accepts β M.evalFrom M.start x β M.accept",
" β q a b c,\n x = a ++ b ++ c β§\n a.length + b.length β€ Fintype.card Ο β§ b β [] β§ M.evalFrom s a = q β§ M.evalFrom q b = q β§ M.evalFrom q c = t",
" Fintype.card Ο < Fintype.card (Fin (Fintype.ca... | [
" M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a",
" x β M.accepts β M.evalFrom M.start x β M.accept",
" β q a b c,\n x = a ++ b ++ c β§\n a.length + b.length β€ Fintype.card Ο β§ b β [] β§ M.evalFrom s a = q β§ M.evalFrom q b = q β§ M.evalFrom q c = t",
" Fintype.card Ο < Fintype.card (Fin (Fintype.ca... |
import Mathlib.Dynamics.PeriodicPts
import Mathlib.GroupTheory.Exponent
import Mathlib.GroupTheory.GroupAction.Basic
namespace MulAction
universe u v
variable {Ξ± : Type v}
variable {G : Type u} [Group G] [MulAction G Ξ±]
variable {M : Type u} [Monoid M] [MulAction M Ξ±]
@[to_additive "If the action is periodic, t... | Mathlib/GroupTheory/GroupAction/Period.lean | 87 | 88 | theorem period_dvd_orderOf (m : M) (a : Ξ±) : period m a β£ orderOf m := by |
rw [β pow_smul_eq_iff_period_dvd, pow_orderOf_eq_one, one_smul]
| [
" m ^ 1 β’ a = a",
" period m a β£ orderOf m"
] | [
" m ^ 1 β’ a = a"
] |
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 | 152 | 153 | theorem card_fintype_uIcc : Fintype.card (Set.uIcc a b) = (b - a : β€).natAbs + 1 := by |
rw [β card_uIcc, 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.