Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear
import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm
import Mathlib.Analysis.NormedSpace.Span
suppress_compilation
open Bornology
open Filter hiding map_smul
open scoped Classical NNReal Topology Uniformity
-- the `ₗ` subscript variables are for special... | Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean | 67 | 87 | theorem antilipschitz_of_comap_nhds_le [h : RingHomIsometric σ₁₂] (f : E →ₛₗ[σ₁₂] F)
(hf : (𝓝 0).comap f ≤ 𝓝 0) : ∃ K, AntilipschitzWith K f := by |
rcases ((nhds_basis_ball.comap _).le_basis_iff nhds_basis_ball).1 hf 1 one_pos with ⟨ε, ε0, hε⟩
simp only [Set.subset_def, Set.mem_preimage, mem_ball_zero_iff] at hε
lift ε to ℝ≥0 using ε0.le
rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
refine ⟨ε⁻¹ * ‖c‖₊, AddMonoidHomClass.antilipschitz_of_bound f ... | [
" ‖f x‖ ≤ C * ‖x‖",
" ∃ C, ∀ (z : E), ‖f z‖ ≤ C * ‖z‖",
" ∀ (z : E), ‖f z‖ ≤ c * (‖k‖ / r) * ‖z‖",
" ‖f z‖ ≤ c * (‖k‖ / r) * ‖z‖",
" ‖f x‖ ≤ c * (‖k‖ / r) * ‖x‖",
" c * (‖x‖ * ‖k‖ / r) = c * (‖k‖ / r) * ‖x‖",
" 0 ≤ c",
" 0 ∈ ball 0 r",
" 1 ≤ ‖x‖ * ‖k‖ / r",
" ∃ K, AntilipschitzWith K ⇑f",
" ‖x‖ ... | [
" ‖f x‖ ≤ C * ‖x‖",
" ∃ C, ∀ (z : E), ‖f z‖ ≤ C * ‖z‖",
" ∀ (z : E), ‖f z‖ ≤ c * (‖k‖ / r) * ‖z‖",
" ‖f z‖ ≤ c * (‖k‖ / r) * ‖z‖",
" ‖f x‖ ≤ c * (‖k‖ / r) * ‖x‖",
" c * (‖x‖ * ‖k‖ / r) = c * (‖k‖ / r) * ‖x‖",
" 0 ≤ c",
" 0 ∈ ball 0 r",
" 1 ≤ ‖x‖ * ‖k‖ / r"
] |
import Mathlib.CategoryTheory.CommSq
#align_import category_theory.lifting_properties.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v
namespace CategoryTheory
open Category
variable {C : Type*} [Category C] {A B B' X Y Y' : C} (i : A ⟶ B) (i' : B ⟶ B') (p : X ⟶ Y... | Mathlib/CategoryTheory/LiftingProperties/Basic.lean | 121 | 125 | theorem of_arrow_iso_left {A B A' B' X Y : C} {i : A ⟶ B} {i' : A' ⟶ B'}
(e : Arrow.mk i ≅ Arrow.mk i') (p : X ⟶ Y) [hip : HasLiftingProperty i p] :
HasLiftingProperty i' p := by |
rw [Arrow.iso_w' e]
infer_instance
| [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g",
" HasLiftingProperty i' p",
" HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p"
] | [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g"
] |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Order.Ring.Int
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.ring.abs from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
#align_import data.nat.parity from "leanpr... | Mathlib/Algebra/Order/Ring/Abs.lean | 201 | 202 | theorem dvd_abs (a b : α) : a ∣ |b| ↔ a ∣ b := by |
cases' abs_choice b with h h <;> simp only [h, dvd_neg]
| [
" Odd |a| ↔ Odd a",
" |a| ∣ b ↔ a ∣ b",
" a ∣ |b| ↔ a ∣ b"
] | [
" Odd |a| ↔ Odd a",
" |a| ∣ b ↔ a ∣ b"
] |
import Mathlib.Data.Real.Sqrt
import Mathlib.Analysis.NormedSpace.Star.Basic
import Mathlib.Analysis.NormedSpace.ContinuousLinearMap
import Mathlib.Analysis.NormedSpace.Basic
#align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb"
section
local notation "�... | Mathlib/Analysis/RCLike/Basic.lean | 105 | 106 | theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module ℝ E] [IsScalarTower ℝ K E]
(r : ℝ) (x : E) : r • x = (r : K) • x := by | rw [RCLike.ofReal_alg, smul_one_smul]
| [
" r • x = ↑r • x"
] | [] |
import Mathlib.Data.Real.Basic
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Algebra.Order.EuclideanAbsoluteValue
#align_import number_theory.class_number.admissible_absolute_value from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
local infixl:50 " ≺ " => EuclideanDomain.r
na... | Mathlib/NumberTheory/ClassNumber/AdmissibleAbsoluteValue.lean | 61 | 68 | theorem exists_partition {ι : Type*} [Finite ι] {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0)
(A : ι → R) (h : abv.IsAdmissible) : ∃ t : ι → Fin (h.card ε),
∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ % b - A i₀ % b) : ℝ) < abv b • ε := by |
rcases Finite.exists_equiv_fin ι with ⟨n, ⟨e⟩⟩
obtain ⟨t, ht⟩ := h.exists_partition' n hε hb (A ∘ e.symm)
refine ⟨t ∘ e, fun i₀ i₁ h ↦ ?_⟩
convert (config := {transparency := .default})
ht (e i₀) (e i₁) h <;> simp only [e.symm_apply_apply]
| [
" ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" i₁ = e.symm (e i₁)",
" i₀ = e.symm (e i₀)"
] | [] |
import Mathlib.Init.Logic
import Mathlib.Init.Function
import Mathlib.Init.Algebra.Classes
import Batteries.Util.LibraryNote
import Batteries.Tactic.Lint.Basic
#align_import logic.basic from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe"
#align_import init.ite_simp from "leanprover-communit... | Mathlib/Logic/Basic.lean | 595 | 598 | theorem eqRec_heq' {α : Sort*} {a' : α} {motive : (a : α) → a' = a → Sort*}
(p : motive a' (rfl : a' = a')) {a : α} (t : a' = a) :
HEq (@Eq.rec α a' motive p a t) p := by |
subst t; rfl
| [
" h ▸ z = cast ⋯ z",
" ⋯ ▸ z = cast ⋯ z",
" HEq (t ▸ p) p",
" HEq (⋯ ▸ p) p"
] | [
" h ▸ z = cast ⋯ z",
" ⋯ ▸ z = cast ⋯ z"
] |
import Mathlib.MeasureTheory.Function.SimpleFunc
import Mathlib.MeasureTheory.Constructions.BorelSpace.Metrizable
#align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"7317149f12f55affbc900fc873d0d422485122b9"
open Set Function Filter TopologicalSpace ENNReal EMetric Finset
... | Mathlib/MeasureTheory/Function/SimpleFuncDense.lean | 116 | 121 | theorem tendsto_nearestPt {e : ℕ → α} {x : α} (hx : x ∈ closure (range e)) :
Tendsto (fun N => nearestPt e N x) atTop (𝓝 x) := by |
refine (atTop_basis.tendsto_iff nhds_basis_eball).2 fun ε hε => ?_
rcases EMetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩
rw [edist_comm] at hN
exact ⟨N, trivial, fun n hn => (edist_nearestPt_le e x hn).trans_lt hN⟩
| [
" ↑(nearestPtInd e (N + 1)) x = if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x",
" (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x\n else ↑(nearestPtInd e N) x) =\n if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N +... | [
" ↑(nearestPtInd e (N + 1)) x = if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x",
" (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x\n else ↑(nearestPtInd e N) x) =\n if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N +... |
import Mathlib.Algebra.Lie.Submodule
#align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d"
universe u v w w₁ w₂
namespace LieSubmodule
variable {R : Type u} {L : Type v} {M : Type w} {M₂ : Type w₁}
variable [CommRing R] [LieRing L] [LieAlgebra ... | Mathlib/Algebra/Lie/IdealOperations.lean | 84 | 93 | theorem lieIdeal_oper_eq_linear_span' :
(↑⁅I, N⁆ : Submodule R M) = Submodule.span R { m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m } := by |
rw [lieIdeal_oper_eq_linear_span]
congr
ext m
constructor
· rintro ⟨⟨x, hx⟩, ⟨n, hn⟩, rfl⟩
exact ⟨x, hx, n, hn, rfl⟩
· rintro ⟨x, hx, n, hn, rfl⟩
exact ⟨⟨x, hx⟩, ⟨n, hn⟩, rfl⟩
| [
" ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s",
" ⁅y, m'⁆ ∈ Submodule.span R s",
" ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x",
" ⁅y, m''⁆ ∈ Submodule.span R s"... | [
" ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s",
" ⁅y, m'⁆ ∈ Submodule.span R s",
" ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x",
" ⁅y, m''⁆ ∈ Submodule.span R s"... |
import Mathlib.Data.Rat.Cast.Defs
import Mathlib.Algebra.Field.Basic
#align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
namespace NNRat
@[simp, norm_cast]
theorem cast_pow {K} [DivisionSemiring K] (q : ℚ≥0) (n : ℕ) :
NNRat.cast (q ^ n) = (NNRat.cast q :... | Mathlib/Data/Rat/Cast/Lemmas.lean | 69 | 75 | theorem cast_zpow_of_ne_zero {K} [DivisionSemiring K] (q : ℚ≥0) (z : ℤ) (hq : (q.num : K) ≠ 0) :
NNRat.cast (q ^ z) = (NNRat.cast q : K) ^ z := by |
obtain ⟨n, rfl | rfl⟩ := z.eq_nat_or_neg
· simp
· simp_rw [zpow_neg, zpow_natCast, ← inv_pow, NNRat.cast_pow]
congr
rw [cast_inv_of_ne_zero hq]
| [
" ↑(q ^ n) = ↑q ^ n",
" ↑(q ^ z) = ↑q ^ z",
" ↑(q ^ ↑n) = ↑q ^ ↑n",
" ↑(q ^ (-↑n)) = ↑q ^ (-↑n)",
" ↑q⁻¹ ^ n = (↑q)⁻¹ ^ n",
" ↑q⁻¹ = (↑q)⁻¹"
] | [
" ↑(q ^ n) = ↑q ^ n"
] |
import Mathlib.Data.Finset.Basic
import Mathlib.ModelTheory.Syntax
import Mathlib.Data.List.ProdSigma
#align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
universe u v w u' v'
namespace FirstOrder
namespace Language
variable {L : Language.{u, v}} {... | Mathlib/ModelTheory/Semantics.lean | 158 | 174 | theorem realize_constantsToVars [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
{t : L[[α]].Term β} {v : β → M} :
t.constantsToVars.realize (Sum.elim (fun a => ↑(L.con a)) v) = t.realize v := by |
induction' t with _ n f ts ih
· simp
· cases n
· cases f
· simp only [realize, ih, Nat.zero_eq, constantsOn, mk₂_Functions]
-- Porting note: below lemma does not work with simp for some reason
rw [withConstants_funMap_sum_inl]
· simp only [realize, constantsToVars, Sum.elim_inl, f... | [
" realize v (relabel g t) = realize (v ∘ g) t",
" realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)",
" realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)",
" realize v (f.apply₁ t) = funMap f ![realize v t]",
" (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]",
" real... | [
" realize v (relabel g t) = realize (v ∘ g) t",
" realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)",
" realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)",
" realize v (f.apply₁ t) = funMap f ![realize v t]",
" (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]",
" real... |
import Mathlib.RingTheory.Trace
import Mathlib.FieldTheory.Finite.GaloisField
#align_import field_theory.finite.trace from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"
namespace FiniteField
| Mathlib/FieldTheory/Finite/Trace.lean | 25 | 32 | theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
[Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0 := by |
haveI : Fact (ringChar F).Prime := ⟨CharP.char_is_prime F _⟩
have htr := traceForm_nondegenerate (ZMod (ringChar F)) F a
simp_rw [Algebra.traceForm_apply] at htr
by_contra! hf
exact ha (htr hf)
| [
" ∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0",
" False"
] | [] |
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 | 54 | 61 | theorem oangle_add_right_eq_arcsin_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
o.oangle x (x + y) = Real.arcsin (‖y‖ / ‖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_arcsin_of_inner_eq_zero
(o.inner_eq_zero_of_oangle_eq_pi_div_two h)
(Or.inl (o.left_ne_zero_of_oangle_eq_pi_div_... | [
" o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos",
" (o.oangle x (x + y)).sign = 1",
" o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos",
" o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin"
] | [
" o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos",
" (o.oangle x (x + y)).sign = 1",
" o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 135 | 143 | theorem le_fib_self {n : ℕ} (five_le_n : 5 ≤ n) : n ≤ fib n := by |
induction' five_le_n with n five_le_n IH
·-- 5 ≤ fib 5
rfl
· -- n + 1 ≤ fib (n + 1) for 5 ≤ n
rw [succ_le_iff]
calc
n ≤ fib n := IH
_ < fib (n + 1) := fib_lt_fib_succ (le_trans (by decide) five_le_n)
| [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... |
import Mathlib.Topology.UniformSpace.AbsoluteValue
import Mathlib.Topology.Instances.Real
import Mathlib.Topology.Instances.Rat
import Mathlib.Topology.UniformSpace.Completion
#align_import topology.uniform_space.compare_reals from "leanprover-community/mathlib"@"e1a7bdeb4fd826b7e71d130d34988f0a2d26a177"
open Set... | Mathlib/Topology/UniformSpace/CompareReals.lean | 60 | 65 | theorem Rat.uniformSpace_eq :
(AbsoluteValue.abs : AbsoluteValue ℚ ℚ).uniformSpace = PseudoMetricSpace.toUniformSpace := by |
ext s
rw [(AbsoluteValue.hasBasis_uniformity _).mem_iff, Metric.uniformity_basis_dist_rat.mem_iff]
simp only [Rat.dist_eq, AbsoluteValue.abs_apply, ← Rat.cast_sub, ← Rat.cast_abs, Rat.cast_lt,
abs_sub_comm]
| [
" AbsoluteValue.abs.uniformSpace = PseudoMetricSpace.toUniformSpace",
" s ∈ uniformity ℚ ↔ s ∈ uniformity ℚ",
" (∃ i, 0 < i ∧ {p | AbsoluteValue.abs (p.2 - p.1) < i} ⊆ s) ↔ ∃ i, 0 < i ∧ {p | dist p.1 p.2 < ↑i} ⊆ s"
] | [] |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.GroupTheory.GroupAction.Pi
open Function Set
structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where
protected... | Mathlib/Algebra/AddConstMap/Basic.lean | 90 | 91 | theorem map_add_nat [AddMonoidWithOne G] [AddMonoidWithOne H] [AddConstMapClass F G H 1 1]
(f : F) (x : G) (n : ℕ) : f (x + n) = f x + n := by | simp
| [
" f (x + n • a) = f x + n • b",
" f (x + ↑n) = f x + n • b",
" f (x + ↑n) = f x + ↑n"
] | [
" f (x + n • a) = f x + n • b",
" f (x + ↑n) = f x + n • b"
] |
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.MeasureTheory.Measure.Haar.Unique
#align_import measure_theory.measure.lebesgue.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open Set Filter MeasureTheory... | Mathlib/MeasureTheory/Measure/Lebesgue/Integral.lean | 102 | 127 | theorem integral_comp_abs {f : ℝ → ℝ} :
∫ x, f |x| = 2 * ∫ x in Ioi (0:ℝ), f x := by |
have eq : ∫ (x : ℝ) in Ioi 0, f |x| = ∫ (x : ℝ) in Ioi 0, f x := by
refine setIntegral_congr measurableSet_Ioi (fun _ hx => ?_)
rw [abs_eq_self.mpr (le_of_lt (by exact hx))]
by_cases hf : IntegrableOn (fun x => f |x|) (Ioi 0)
· have int_Iic : IntegrableOn (fun x ↦ f |x|) (Iic 0) := by
rw [← Measure... | [
" ∫ (x : ℝ) in Iic c, f (-x) = ∫ (x : ℝ) in Ioi (-c), f x",
" ∫ (x : ℝ) in Ioi c, f (-x) = ∫ (x : ℝ) in Iic (-c), f x",
" ∫ (x : ℝ) in Iic (-c), f (- -x) = ∫ (x : ℝ) in Iic (- - -c), f x",
" ∫ (x : ℝ), f |x| = 2 * ∫ (x : ℝ) in Ioi 0, f x",
" ∫ (x : ℝ) in Ioi 0, f |x| = ∫ (x : ℝ) in Ioi 0, f x",
" f |x✝| =... | [
" ∫ (x : ℝ) in Iic c, f (-x) = ∫ (x : ℝ) in Ioi (-c), f x",
" ∫ (x : ℝ) in Ioi c, f (-x) = ∫ (x : ℝ) in Iic (-c), f x",
" ∫ (x : ℝ) in Iic (-c), f (- -x) = ∫ (x : ℝ) in Iic (- - -c), f x"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse
#align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Filter Metric Set
open scoped ComplexConjugate Real To... | Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean | 87 | 89 | theorem range_exp_mul_I : (Set.range fun x : ℝ => exp (x * I)) = Metric.sphere 0 1 := by |
ext x
simp only [mem_sphere_zero_iff_norm, norm_eq_abs, abs_eq_one_iff, Set.mem_range]
| [
" x.arg.sin = x.im / abs x",
" (if 0 ≤ x.re then (x.im / abs x).arcsin\n else if 0 ≤ x.im then ((-x).im / abs x).arcsin + π else ((-x).im / abs x).arcsin - π).sin =\n x.im / abs x",
" (x.im / abs x).arcsin.sin = x.im / abs x",
" (((-x).im / abs x).arcsin + π).sin = x.im / abs x",
" (((-x).im / abs x... | [
" x.arg.sin = x.im / abs x",
" (if 0 ≤ x.re then (x.im / abs x).arcsin\n else if 0 ≤ x.im then ((-x).im / abs x).arcsin + π else ((-x).im / abs x).arcsin - π).sin =\n x.im / abs x",
" (x.im / abs x).arcsin.sin = x.im / abs x",
" (((-x).im / abs x).arcsin + π).sin = x.im / abs x",
" (((-x).im / abs x... |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Ring.Divisibility.Basic
#align_import ring_theory.prime from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
section CommRing
variable {α : Ty... | Mathlib/RingTheory/Prime.lean | 70 | 73 | theorem Prime.abs [LinearOrder α] {p : α} (hp : Prime p) : Prime (abs p) := by |
obtain h | h := abs_choice p <;> rw [h]
· exact hp
· exact hp.neg
| [
" Prime (-p)",
" ¬IsUnit (-p)",
" ∀ (a b : α), -p ∣ a * b → -p ∣ a ∨ -p ∣ b",
" Prime |p|",
" Prime p"
] | [
" Prime (-p)",
" ¬IsUnit (-p)",
" ∀ (a b : α), -p ∣ a * b → -p ∣ a ∨ -p ∣ b"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 47 | 48 | theorem constantCoeff_invUnitsSub (u : Rˣ) : constantCoeff R (invUnitsSub u) = 1 /ₚ u := by |
rw [← coeff_zero_eq_constantCoeff_apply, coeff_invUnitsSub, zero_add, pow_one]
| [
" (constantCoeff R) (invUnitsSub u) = 1 /ₚ u"
] | [] |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Nat.Choose.Vandermonde
import Mathlib.Tactic.FieldSimp
#align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358... | Mathlib/Algebra/Polynomial/HasseDeriv.lean | 60 | 64 | theorem hasseDeriv_apply :
hasseDeriv k f = f.sum fun i r => monomial (i - k) (↑(i.choose k) * r) := by |
dsimp [hasseDeriv]
congr; ext; congr
apply nsmul_eq_mul
| [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... | [] |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563... | Mathlib/NumberTheory/FunctionField.lean | 179 | 195 | theorem InftyValuation.map_add_le_max' (x y : RatFunc Fq) :
inftyValuationDef Fq (x + y) ≤ max (inftyValuationDef Fq x) (inftyValuationDef Fq y) := by |
by_cases hx : x = 0
· rw [hx, zero_add]
conv_rhs => rw [inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZero.zero_le (inftyValuationDef Fq y))]
· by_cases hy : y = 0
· rw [hy, add_zero]
conv_rhs => rw [max_comm, inftyValuationDef, if_pos (Eq.refl _)]
rw [max_eq_right (WithZer... | [
" FunctionField Fq F ↔ FiniteDimensional Fqt F",
" ∀ (c : RatFunc Fq) (x : F), e c • x = c • x",
" e c • x = c • x",
" (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x",
" (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c",
" (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu... | [
" FunctionField Fq F ↔ FiniteDimensional Fqt F",
" ∀ (c : RatFunc Fq) (x : F), e c • x = c • x",
" e c • x = c • x",
" (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x",
" (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c",
" (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu... |
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic
import Mathlib.Algebra.Category.Ring.Colimits
import Mathlib.Algebra.Category.Ring.Limits
import Mathlib.Topology.Sheaves.LocalPredicate
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.Algebra.Ring.Subring.Basic
#align_import algebraic_geometry.struct... | Mathlib/AlgebraicGeometry/StructureSheaf.lean | 108 | 118 | theorem IsFraction.eq_mk' {U : Opens (PrimeSpectrum.Top R)} {f : ∀ x : U, Localizations R x}
(hf : IsFraction f) :
∃ r s : R,
∀ x : U,
∃ hs : s ∉ x.1.asIdeal,
f x =
IsLocalization.mk' (Localization.AtPrime _) r
(⟨s, hs⟩ : (x : PrimeSpectrum.Top R).asIdeal.primeC... |
rcases hf with ⟨r, s, h⟩
refine ⟨r, s, fun x => ⟨(h x).1, (IsLocalization.mk'_eq_iff_eq_mul.mpr ?_).symm⟩⟩
exact (h x).2.symm
| [
" ∃ r s, ∀ (x : ↥U), ∃ (hs : s ∉ (↑x).asIdeal), f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r ⟨s, hs⟩",
" (algebraMap R (Localizations R ↑x)) r = f x * (algebraMap R (Localizations R ↑x)) ↑⟨s, ⋯⟩"
] | [] |
import Mathlib.Algebra.DualNumber
import Mathlib.Algebra.QuaternionBasis
import Mathlib.Data.Complex.Module
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.CliffordAlgebra.Star
import Mathlib.LinearAlgebra.QuadraticForm.Prod
#align_import linear_algebra.clifford_algebra.equivs fr... | Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean | 400 | 403 | theorem ι_mul_ι (r₁ r₂) : ι (0 : QuadraticForm R R) r₁ * ι (0 : QuadraticForm R R) r₂ = 0 := by |
rw [← mul_one r₁, ← mul_one r₂, ← smul_eq_mul R, ← smul_eq_mul R, LinearMap.map_smul,
LinearMap.map_smul, smul_mul_smul, ι_sq_scalar, QuadraticForm.zero_apply, RingHom.map_zero,
smul_zero]
| [
" (ι 0) r₁ * (ι 0) r₂ = 0"
] | [] |
import Mathlib.Geometry.Manifold.Diffeomorph
import Mathlib.Geometry.Manifold.Instances.Real
import Mathlib.Geometry.Manifold.PartitionOfUnity
#align_import geometry.manifold.whitney_embedding from "leanprover-community/mathlib"@"86c29aefdba50b3f33e86e52e3b2f51a0d8f0282"
universe uι uE uH uM
variable {ι : Type u... | Mathlib/Geometry/Manifold/WhitneyEmbedding.lean | 101 | 107 | theorem embeddingPiTangent_ker_mfderiv (x : M) (hx : x ∈ s) :
LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) f.embeddingPiTangent x) = ⊥ := by |
apply bot_unique
rw [← (mdifferentiable_chart I (f.c (f.ind x hx))).ker_mfderiv_eq_bot
(f.mem_chartAt_ind_source x hx),
← comp_embeddingPiTangent_mfderiv]
exact LinearMap.ker_le_ker_comp _ _
| [
" InjOn (⇑f.embeddingPiTangent) s",
" x = y",
" ((ContinuousLinearMap.fst ℝ E ℝ).comp (ContinuousLinearMap.proj (f.ind x hx))).comp\n (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent) x) =\n mfderiv I I (↑(chartAt H (f.c (f.ind x hx)))) x",
" L.comp (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent... | [
" InjOn (⇑f.embeddingPiTangent) s",
" x = y",
" ((ContinuousLinearMap.fst ℝ E ℝ).comp (ContinuousLinearMap.proj (f.ind x hx))).comp\n (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent) x) =\n mfderiv I I (↑(chartAt H (f.c (f.ind x hx)))) x",
" L.comp (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent... |
import Mathlib.Algebra.Group.Basic
import Mathlib.Order.Basic
import Mathlib.Order.Monotone.Basic
#align_import algebra.covariant_and_contravariant from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
-- TODO: convert `ExistsMulOfLE`, `ExistsAddOfLE`?
-- TODO: relationship with `Con/AddC... | Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean | 170 | 176 | theorem Group.covariant_swap_iff_contravariant_swap [Group N] :
Covariant N N (swap (· * ·)) r ↔ Contravariant N N (swap (· * ·)) r := by |
refine ⟨fun h a b c bc ↦ ?_, fun h a b c bc ↦ ?_⟩
· rw [← mul_inv_cancel_right b a, ← mul_inv_cancel_right c a]
exact h a⁻¹ bc
· rw [← mul_inv_cancel_right b a, ← mul_inv_cancel_right c a] at bc
exact h a⁻¹ bc
| [
" Covariant N N (fun x x_1 => x * x_1) r ↔ Contravariant N N (fun x x_1 => x * x_1) r",
" r b c",
" r (a⁻¹ * (a * b)) (a⁻¹ * (a * c))",
" r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)",
" Covariant N N (swap fun x x_1 => x * x_1) r ↔ Contravariant N N (swap fun x x_1 => x * x_1) r",
" r (b *... | [
" Covariant N N (fun x x_1 => x * x_1) r ↔ Contravariant N N (fun x x_1 => x * x_1) r",
" r b c",
" r (a⁻¹ * (a * b)) (a⁻¹ * (a * c))",
" r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)"
] |
import Mathlib.Logic.Pairwise
import Mathlib.Order.CompleteBooleanAlgebra
import Mathlib.Order.Directed
import Mathlib.Order.GaloisConnection
#align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd"
open Function Set
universe u
variable {α β γ : Type*} {ι ι' ι... | Mathlib/Data/Set/Lattice.lean | 72 | 73 | theorem mem_iInter₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋂ (i) (j), s i j) ↔ ∀ i j, x ∈ s i j := by |
simp_rw [mem_iInter]
| [
" x ∈ ⋃ i, ⋃ j, s i j ↔ ∃ i j, x ∈ s i j",
" x ∈ ⋂ i, ⋂ j, s i j ↔ ∀ (i : ι) (j : κ i), x ∈ s i j"
] | [
" x ∈ ⋃ i, ⋃ j, s i j ↔ ∃ i j, x ∈ s i j"
] |
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 | 356 | 373 | theorem partiallyWellOrderedOn_iff_finite_antichains [IsSymm α r] :
s.PartiallyWellOrderedOn r ↔ ∀ t, t ⊆ s → IsAntichain r t → t.Finite := by |
refine ⟨fun h t ht hrt => hrt.finite_of_partiallyWellOrderedOn (h.mono ht), ?_⟩
rintro hs f hf
by_contra! H
refine infinite_range_of_injective (fun m n hmn => ?_) (hs _ (range_subset_iff.2 hf) ?_)
· obtain h | h | h := lt_trichotomy m n
· refine (H _ _ h ?_).elim
rw [hmn]
exact refl _
· e... | [
" (s ∪ t).PartiallyWellOrderedOn r",
" ∃ m n, m < n ∧ r (f m) (f n)",
" (f '' s).PartiallyWellOrderedOn r'",
" ∃ m n, m < n ∧ r' (g' m) (g' n)",
" ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)",
" s.Finite",
" False",
" s.PartiallyWellOrderedOn r",
" (insert a s).PartiallyWellOrderedOn r ↔ s.PartiallyWe... | [
" (s ∪ t).PartiallyWellOrderedOn r",
" ∃ m n, m < n ∧ r (f m) (f n)",
" (f '' s).PartiallyWellOrderedOn r'",
" ∃ m n, m < n ∧ r' (g' m) (g' n)",
" ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)",
" s.Finite",
" False",
" s.PartiallyWellOrderedOn r",
" (insert a s).PartiallyWellOrderedOn r ↔ s.PartiallyWe... |
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Tactic.Lift
import Mathlib.Tactic.Monotonicity.Attr
open Function
variable {β G M : Type*}
section Monoid
variable [Monoid M]
section Preorder
variable [Preorder M]
section Left
variable [CovariantClass M M (· * ·) (· ≤ ·)] {x : M}
@[to_additive (... | Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean | 88 | 92 | theorem pow_lt_pow_right' [CovariantClass M M (· * ·) (· < ·)] {a : M} {n m : ℕ} (ha : 1 < a)
(h : n < m) : a ^ n < a ^ m := by |
rcases Nat.le.dest h with ⟨k, rfl⟩; clear h
rw [pow_add, pow_succ, mul_assoc, ← pow_succ']
exact lt_mul_of_one_lt_right' _ (one_lt_pow' ha k.succ_ne_zero)
| [
" a ^ 0 ≤ b ^ 0",
" a ^ (k + 1) ≤ b ^ (k + 1)",
" a ^ k * a ≤ b ^ k * b",
" 1 ≤ a ^ 0",
" 1 ≤ a ^ (k + 1)",
" 1 ≤ a ^ k * a",
" a ^ n * a ^ k = a ^ m",
" 1 < a ^ k",
" 1 < a ^ l.succ",
" 1 < a ^ Nat.succ 0",
" 1 < a ^ 0 * a",
" 1 < a ^ (l + 1).succ",
" 1 < a ^ (l + 1) * a",
" a ^ n < a ^ m... | [
" a ^ 0 ≤ b ^ 0",
" a ^ (k + 1) ≤ b ^ (k + 1)",
" a ^ k * a ≤ b ^ k * b",
" 1 ≤ a ^ 0",
" 1 ≤ a ^ (k + 1)",
" 1 ≤ a ^ k * a",
" a ^ n * a ^ k = a ^ m",
" 1 < a ^ k",
" 1 < a ^ l.succ",
" 1 < a ^ Nat.succ 0",
" 1 < a ^ 0 * a",
" 1 < a ^ (l + 1).succ",
" 1 < a ^ (l + 1) * a"
] |
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Topology.MetricSpace.CauSeqFilter
#align_import analysis.special_functions.exponential from "leanprover-community/mathlib"@"e1a18cad9cd462973d760af7de36b05776b8811c"
open Filter RCLike ContinuousMultili... | Mathlib/Analysis/SpecialFunctions/Exponential.lean | 220 | 224 | theorem Complex.exp_eq_exp_ℂ : Complex.exp = NormedSpace.exp ℂ := by |
refine funext fun x => ?_
rw [Complex.exp, exp_eq_tsum_div]
have : CauSeq.IsComplete ℂ norm := Complex.instIsComplete
exact tendsto_nhds_unique x.exp'.tendsto_limit (expSeries_div_summable ℝ x).hasSum.tendsto_sum_nat
| [
" cexp = NormedSpace.exp ℂ",
" cexp x = NormedSpace.exp ℂ x",
" x.exp'.lim = (fun x => ∑' (n : ℕ), x ^ n / ↑n !) x"
] | [] |
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
import Mathlib.CategoryTheory.Monoidal.Discrete
import Mathlib.CategoryTheory.Monoidal.NaturalTransformation
import Mathlib.CategoryTheory.Monoidal.Opposite
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.CommSq
#align_import category_... | Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean | 93 | 99 | theorem braiding_tensor_left (X Y Z : C) :
(β_ (X ⊗ Y) Z).hom =
(α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫
(β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom := by |
apply (cancel_epi (α_ X Y Z).inv).1
apply (cancel_mono (α_ Z X Y).inv).1
simp [hexagon_reverse]
| [
" (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X... | [] |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {α β : T... | Mathlib/Data/Nat/Cast/Order.lean | 142 | 143 | theorem cast_lt_one : (n : α) < 1 ↔ n = 0 := by |
rw [← cast_one, cast_lt, Nat.lt_succ_iff, ← bot_eq_zero, le_bot_iff]
| [
" ↑n ≤ ↑(n + 1)",
" ↑n ≤ ↑n + 1",
" 1 < ↑n ↔ 1 < n",
" 1 ≤ ↑n ↔ 1 ≤ n",
" ↑n < 1 ↔ n = 0"
] | [
" ↑n ≤ ↑(n + 1)",
" ↑n ≤ ↑n + 1",
" 1 < ↑n ↔ 1 < n",
" 1 ≤ ↑n ↔ 1 ≤ n"
] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Exponent
#align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
inductive DihedralGroup (n : ℕ) : Type
| r : ZMod n → DihedralGroup n
| sr : ZMod n → DihedralGroup n
derivin... | Mathlib/GroupTheory/SpecificGroups/Dihedral.lean | 129 | 132 | theorem nat_card : Nat.card (DihedralGroup n) = 2 * n := by |
cases n
· rw [Nat.card_eq_zero_of_infinite]
· rw [Nat.card_eq_fintype_card, card]
| [
" ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)",
" r a * r b * r c = r a * (r b * r c)",
" r a * r b * sr c = r a * (r b * sr c)",
" r a * sr b * r c = r a * (sr b * r c)",
" r a * sr b * sr c = r a * (sr b * sr c)",
" sr a * r b * r c = sr a * (r b * r c)",
" sr a * r b * sr c = sr a * (r b * s... | [
" ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)",
" r a * r b * r c = r a * (r b * r c)",
" r a * r b * sr c = r a * (r b * sr c)",
" r a * sr b * r c = r a * (sr b * r c)",
" r a * sr b * sr c = r a * (sr b * sr c)",
" sr a * r b * r c = sr a * (r b * r c)",
" sr a * r b * sr c = sr a * (r b * s... |
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
import Mathlib.Analysis.Complex.CauchyIntegral
#align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Metric S... | Mathlib/Analysis/Complex/RemovableSingularity.lean | 46 | 57 | theorem differentiableOn_compl_singleton_and_continuousAt_iff {f : ℂ → E} {s : Set ℂ} {c : ℂ}
(hs : s ∈ 𝓝 c) :
DifferentiableOn ℂ f (s \ {c}) ∧ ContinuousAt f c ↔ DifferentiableOn ℂ f s := by |
refine ⟨?_, fun hd => ⟨hd.mono diff_subset, (hd.differentiableAt hs).continuousAt⟩⟩
rintro ⟨hd, hc⟩ x hx
rcases eq_or_ne x c with (rfl | hne)
· refine (analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt
?_ hc).differentiableAt.differentiableWithinAt
refine eventually_nhdsWithin_iff.2 ((ev... | [
" AnalyticAt ℂ f c",
" ContinuousOn f (closedBall c ↑R)",
" ContinuousAt f z",
" DifferentiableOn ℂ f (s \\ {c}) ∧ ContinuousAt f c ↔ DifferentiableOn ℂ f s",
" DifferentiableOn ℂ f (s \\ {c}) ∧ ContinuousAt f c → DifferentiableOn ℂ f s",
" DifferentiableWithinAt ℂ f s x",
" ∀ᶠ (z : ℂ) in 𝓝[≠] x, Diffe... | [
" AnalyticAt ℂ f c",
" ContinuousOn f (closedBall c ↑R)",
" ContinuousAt f z"
] |
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 | 60 | 62 | theorem count_eq_card_fintype (n : ℕ) : count p n = Fintype.card { k : ℕ // k < n ∧ p k } := by |
rw [count_eq_card_filter_range, ← Fintype.card_ofFinset, ← CountSet.fintype]
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",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... |
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.Topology.Algebra.Field
import Mathlib.Topology.Algebra.Order.Group
#align_import topology.algebra.order.field from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
open Set Filter TopologicalSpace Function
open scoped Pointwise Top... | Mathlib/Topology/Algebra/Order/Field.lean | 117 | 119 | theorem Filter.Tendsto.neg_mul_atBot {C : 𝕜} (hC : C < 0) (hf : Tendsto f l (𝓝 C))
(hg : Tendsto g l atBot) : Tendsto (fun x => f x * g x) l atTop := by |
simpa only [mul_comm] using hg.atBot_mul_neg hC hf
| [
" TopologicalRing R",
" ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)",
" ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}",
" c * norm x < ε",
" ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)",
" Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �... | [
" TopologicalRing R",
" ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)",
" ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}",
" c * norm x < ε",
" ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)",
" Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �... |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂... | Mathlib/Data/Vector/MapLemmas.lean | 76 | 84 | theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ y s.snd
let r₁ := f₁ x r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.... |
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
| [
" mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ... | [
" mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ... |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904"
open Function OrderDual
variable {ι α β : Type*} {π : ι → Type*}
def symmDiff [Sup α] [SDiff α] (a b : α) : α :=
a \ b ⊔ b \ a
#ali... | Mathlib/Order/SymmDiff.lean | 129 | 129 | theorem bot_symmDiff : ⊥ ∆ a = a := by | rw [symmDiff_comm, symmDiff_bot]
| [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a",
" ⊥ ∆ a = a"
] | [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a"
] |
import Mathlib.Probability.Process.Filtration
import Mathlib.Topology.Instances.Discrete
#align_import probability.process.adapted from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Order TopologicalSpace
open scoped Classical MeasureTheory NNReal ENNReal Topology
namespa... | Mathlib/Probability/Process/Adapted.lean | 188 | 198 | theorem progMeasurable_of_tendsto' {γ} [MeasurableSpace ι] [PseudoMetrizableSpace β]
(fltr : Filter γ) [fltr.NeBot] [fltr.IsCountablyGenerated] {U : γ → ι → Ω → β}
(h : ∀ l, ProgMeasurable f (U l)) (h_tendsto : Tendsto U fltr (𝓝 u)) : ProgMeasurable f u := by |
intro i
apply @stronglyMeasurable_of_tendsto (Set.Iic i × Ω) β γ
(MeasurableSpace.prod _ (f i)) _ _ fltr _ _ _ _ fun l => h l i
rw [tendsto_pi_nhds] at h_tendsto ⊢
intro x
specialize h_tendsto x.fst
rw [tendsto_nhds] at h_tendsto ⊢
exact fun s hs h_mem => h_tendsto {g | g x.snd ∈ s} (hs.preimage (con... | [
" Adapted (natural u hum) u",
" StronglyMeasurable (u i)",
" Measurable (u i) ∧ IsSeparable (Set.range (u i))",
" Adapted f u",
" StronglyMeasurable ((fun p => u (↑p.1) p.2) ∘ fun x => (⟨i, ⋯⟩, x))",
" ProgMeasurable f fun i ω => u (t i ω) ω",
" StronglyMeasurable fun p => (fun i ω => u (t i ω) ω) (↑p.1... | [
" Adapted (natural u hum) u",
" StronglyMeasurable (u i)",
" Measurable (u i) ∧ IsSeparable (Set.range (u i))",
" Adapted f u",
" StronglyMeasurable ((fun p => u (↑p.1) p.2) ∘ fun x => (⟨i, ⋯⟩, x))",
" ProgMeasurable f fun i ω => u (t i ω) ω",
" StronglyMeasurable fun p => (fun i ω => u (t i ω) ω) (↑p.1... |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.orthogonal from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {𝕜 E F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup E] [InnerProductSpace... | Mathlib/Analysis/InnerProductSpace/Orthogonal.lean | 127 | 131 | theorem isClosed_orthogonal : IsClosed (Kᗮ : Set E) := by |
rw [orthogonal_eq_inter K]
have := fun v : K => ContinuousLinearMap.isClosed_ker (innerSL 𝕜 (v : E))
convert isClosed_iInter this
simp only [iInf_coe]
| [
" ⟪u, a✝ + b✝⟫_𝕜 = 0",
" ⟪u, c • x⟫_𝕜 = 0",
" v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0",
" ⟪v, u⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ",
" ⟪w, v⟫_𝕜 = 0",
" ⟪c • u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0",
" x - y ∈ Kᗮ",
" ∀ ... | [
" ⟪u, a✝ + b✝⟫_𝕜 = 0",
" ⟪u, c • x⟫_𝕜 = 0",
" v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0",
" ⟪v, u⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ",
" ⟪w, v⟫_𝕜 = 0",
" ⟪c • u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0",
" x - y ∈ Kᗮ",
" ∀ ... |
import Mathlib.Data.Set.Equitable
import Mathlib.Logic.Equiv.Fin
import Mathlib.Order.Partition.Finpartition
#align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset Fintype
namespace Finpartition
variable {α : Type*} [DecidableEq α] ... | Mathlib/Order/Partition/Equipartition.lean | 38 | 42 | theorem isEquipartition_iff_card_parts_eq_average :
P.IsEquipartition ↔
∀ a : Finset α,
a ∈ P.parts → a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1 := by |
simp_rw [IsEquipartition, Finset.equitableOn_iff, P.sum_card_parts]
| [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1"
] | [] |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X ⟶ B) (g ... | Mathlib/Topology/Category/LightProfinite/Limits.lean | 128 | 131 | theorem pullback_snd_eq :
LightProfinite.pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd := by |
dsimp [pullbackIsoPullback]
simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]
| [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... | [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... |
import Mathlib.Analysis.SpecialFunctions.Complex.Log
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import ring_theory.roots_of_unity.complex from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Complex
open Polynomial Real
open scoped Nat Real
theorem isPrimitiveRoot_e... | Mathlib/RingTheory/RootsOfUnity/Complex.lean | 53 | 55 | theorem isPrimitiveRoot_exp (n : ℕ) (h0 : n ≠ 0) : IsPrimitiveRoot (exp (2 * π * I / n)) n := by |
simpa only [Nat.cast_one, one_div] using
isPrimitiveRoot_exp_of_coprime 1 n h0 n.coprime_one_left
| [
" IsPrimitiveRoot (cexp (2 * ↑π * I * (↑i / ↑n))) n",
" cexp (2 * ↑π * I * (↑i / ↑n)) ^ n = 1 ∧ ∀ (l : ℕ), cexp (2 * ↑π * I * (↑i / ↑n)) ^ l = 1 → n ∣ l",
" (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l",
" ∃... | [
" IsPrimitiveRoot (cexp (2 * ↑π * I * (↑i / ↑n))) n",
" cexp (2 * ↑π * I * (↑i / ↑n)) ^ n = 1 ∧ ∀ (l : ℕ), cexp (2 * ↑π * I * (↑i / ↑n)) ^ l = 1 → n ∣ l",
" (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l",
" ∃... |
import Mathlib.AlgebraicGeometry.Gluing
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
#align_import algebraic_geometry.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070"
set_opt... | Mathlib/AlgebraicGeometry/Pullbacks.lean | 110 | 114 | theorem t'_fst_fst_fst (i j k : 𝒰.J) :
t' 𝒰 f g i j k ≫ pullback.fst ≫ pullback.fst ≫ pullback.fst = pullback.fst ≫ pullback.snd := by |
simp only [t', Category.assoc, pullbackSymmetry_hom_comp_fst_assoc,
pullbackRightPullbackFstIso_inv_snd_fst_assoc, pullback.lift_fst_assoc, t_fst_fst,
pullbackRightPullbackFstIso_hom_fst_assoc]
| [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... | [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... |
import Mathlib.Order.Filter.Cofinite
#align_import topology.bornology.basic from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Set Filter
variable {ι α β : Type*}
class Bornology (α : Type*) where
cobounded' : Filter α
le_cofinite' : cobounded' ≤ cofinite
#align borno... | Mathlib/Topology/Bornology/Basic.lean | 143 | 144 | theorem isBounded_compl_iff : IsBounded sᶜ ↔ IsCobounded s := by |
rw [isBounded_def, isCobounded_def, compl_compl]
| [
" t = t'",
" { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ } = t'",
" { cobounded' := cobounded'✝¹, le_cofinite' := le_cofinite'✝¹ } =\n { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ }",
" comk (fun x => x ∈ B) empty_mem subset_mem union_mem ≤ cofinite",
" {x} ∈ B",
" IsBounde... | [
" t = t'",
" { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ } = t'",
" { cobounded' := cobounded'✝¹, le_cofinite' := le_cofinite'✝¹ } =\n { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ }",
" comk (fun x => x ∈ B) empty_mem subset_mem union_mem ≤ cofinite",
" {x} ∈ B"
] |
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Analysis.InnerProductSpace.l2Space
import Mathlib.MeasureTheory.Function.ContinuousMapDense
import Mathlib.MeasureTheory.Function.L2Space
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.M... | Mathlib/Analysis/Fourier/AddCircle.lean | 127 | 129 | theorem fourier_coe_apply' {n : ℤ} {x : ℝ} :
toCircle (n • (x : AddCircle T) :) = Complex.exp (2 * π * Complex.I * n * x / T) := by |
rw [← fourier_apply]; exact fourier_coe_apply
| [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... | [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... |
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 | 63 | 72 | theorem denominators_recurrence {gp : Pair K} {ppredB predB : K}
(succ_nth_s_eq : g.s.get? (n + 1) = some gp) (nth_denom_eq : g.denominators n = ppredB)
(succ_nth_denom_eq : g.denominators (n + 1) = predB) :
g.denominators (n + 2) = gp.b * predB + gp.a * ppredB := by |
obtain ⟨ppredConts, nth_conts_eq, ⟨rfl⟩⟩ : ∃ conts, g.continuants n = conts ∧ conts.b = ppredB :=
exists_conts_b_of_denom nth_denom_eq
obtain ⟨predConts, succ_nth_conts_eq, ⟨rfl⟩⟩ :
∃ conts, g.continuants (n + 1) = conts ∧ conts.b = predB :=
exists_conts_b_of_denom succ_nth_denom_eq
rw [denom_eq_co... | [
" 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.Analysis.Calculus.Deriv.Basic
import Mathlib.LinearAlgebra.AffineSpace.Slope
#align_import analysis.calculus.deriv.slope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open Topology Filter TopologicalSpace
open Filter Set
secti... | Mathlib/Analysis/Calculus/Deriv/Slope.lean | 66 | 69 | theorem hasDerivWithinAt_iff_tendsto_slope :
HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f') := by |
simp only [HasDerivWithinAt, nhdsWithin, diff_eq, ← inf_assoc, inf_principal.symm]
exact hasDerivAtFilter_iff_tendsto_slope
| [
" HasDerivAtFilter f f' x L ↔ Tendsto (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0)",
" ∀ a ∉ {x}ᶜ, slope f x a - (a - x)⁻¹ • (a - x) • f' = 0",
" (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') =ᶠ[L ⊓ 𝓟 {x}ᶜ] fun y => slope f x y - f'",
" slope f x y - (y - x)⁻¹ • (y - x) • f' = slope f x y -... | [
" HasDerivAtFilter f f' x L ↔ Tendsto (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') L (𝓝 0)",
" ∀ a ∉ {x}ᶜ, slope f x a - (a - x)⁻¹ • (a - x) • f' = 0",
" (fun y => slope f x y - (y - x)⁻¹ • (y - x) • f') =ᶠ[L ⊓ 𝓟 {x}ᶜ] fun y => slope f x y - f'",
" slope f x y - (y - x)⁻¹ • (y - x) • f' = slope f x y -... |
import Mathlib.Analysis.Convex.StrictConvexBetween
import Mathlib.Geometry.Euclidean.Basic
#align_import geometry.euclidean.sphere.basic from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RealInnerProductSpace
namespace EuclideanGeometry
variable {V : Type... | Mathlib/Geometry/Euclidean/Sphere/Basic.lean | 136 | 138 | theorem dist_center_eq_dist_center_of_mem_sphere {p₁ p₂ : P} {s : Sphere P} (hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s) : dist p₁ s.center = dist p₂ s.center := by |
rw [mem_sphere.1 hp₁, mem_sphere.1 hp₂]
| [
" { center := s.center, radius := s.radius } = s",
" { center := s.center, radius := s.radius }.center = s.center",
" { center := s.center, radius := s.radius }.radius = s.radius",
" s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius",
" s₁.center = s₂.center ↔ s₁ = s₂",
" s₁.radius = s₂.radius",
"... | [
" { center := s.center, radius := s.radius } = s",
" { center := s.center, radius := s.radius }.center = s.center",
" { center := s.center, radius := s.radius }.radius = s.radius",
" s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius",
" s₁.center = s₂.center ↔ s₁ = s₂",
" s₁.radius = s₂.radius"
] |
import Mathlib.Probability.Kernel.Disintegration.Unique
import Mathlib.Probability.Notation
#align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
open MeasureTheory Set Filter TopologicalSpace
open scoped ENNReal MeasureTheory ProbabilityTheo... | Mathlib/Probability/Kernel/CondDistrib.lean | 171 | 174 | theorem _root_.MeasureTheory.Integrable.norm_integral_condDistrib_map
(hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
Integrable (fun x => ‖∫ y, f (x, y) ∂condDistrib Y X μ x‖) (μ.map X) := by |
rw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]; exact hf_int.norm_integral_condKernel
| [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... | [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 57 | 69 | theorem Finset.prod_nonneg_of_card_nonpos_even {α β : Type*} [LinearOrderedCommRing β] {f : α → β}
[DecidablePred fun x => f x ≤ 0] {s : Finset α} (h0 : Even (s.filter fun x => f x ≤ 0).card) :
0 ≤ ∏ x ∈ s, f x :=
calc
0 ≤ ∏ x ∈ s, (if f x ≤ 0 then (-1 : β) else 1) * f x :=
Finset.prod_nonneg fun x ... |
rw [Finset.prod_mul_distrib, Finset.prod_ite, Finset.prod_const_one, mul_one,
Finset.prod_const, neg_one_pow_eq_pow_mod_two, Nat.even_iff.1 h0, pow_zero, one_mul]
| [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.lifts from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
open Polynomial
noncomputable section
namespace Polynomial
universe u v w
section Semiring
variable {R : Type... | Mathlib/Algebra/Polynomial/Lifts.lean | 69 | 70 | theorem lifts_iff_ringHom_rangeS (p : S[X]) : p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS := by |
simp only [coe_mapRingHom, lifts, Set.mem_range, RingHom.mem_rangeS]
| [
" p ∈ lifts f ↔ ∃ q, map f q = p",
" p ∈ lifts f ↔ p ∈ Set.range (map f)",
" p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS"
] | [
" p ∈ lifts f ↔ ∃ q, map f q = p",
" p ∈ lifts f ↔ p ∈ Set.range (map f)"
] |
import Mathlib.Algebra.BigOperators.WithTop
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.ENNReal.Basic
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
variable {a b c d : ℝ≥0∞} {r p q... | Mathlib/Data/ENNReal/Operations.lean | 130 | 130 | theorem not_lt_zero : ¬a < 0 := by | simp
| [
" a ≠ 0 → ∀ (n : ℕ), a ^ n ≠ 0",
" ¬a < 0"
] | [
" a ≠ 0 → ∀ (n : ℕ), a ^ n ≠ 0"
] |
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FailIfNoProgress
import Mathlib.Algebra.Group.Commutator
#align_import tactic.group from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
namespace Mathlib.Tactic.Group
open Lean
open Lean.Meta
open Lean.Parser.Tactic
open Lean.Elab.Tactic
... | Mathlib/Tactic/Group.lean | 43 | 44 | theorem zpow_trick_one {G : Type*} [Group G] (a b : G) (m : ℤ) :
a * b * b ^ m = a * b ^ (m + 1) := by | rw [mul_assoc, mul_self_zpow]
| [
" a * b ^ n * b ^ m = a * b ^ (n + m)",
" a * b * b ^ m = a * b ^ (m + 1)"
] | [
" a * b ^ n * b ^ m = a * b ^ (n + m)"
] |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Order.Monoid.WithTop
#align_import data.nat.with_bot from "leanprover-community/mathlib"@"966e0cf0685c9cedf8a3283ac69eef4d5f2eaca2"
namespace Nat
namespace WithBot
instance : WellFoundedRelation (WithBot ℕ) where
rel := (· < ·)
wf := IsWellFounde... | Mathlib/Data/Nat/WithBot.lean | 35 | 40 | theorem add_eq_one_iff {n m : WithBot ℕ} : n + m = 1 ↔ n = 0 ∧ m = 1 ∨ n = 1 ∧ m = 0 := by |
rcases n, m with ⟨_ | _, _ | _⟩
repeat refine ⟨fun h => Option.noConfusion h, fun h => ?_⟩;
aesop (simp_config := { decide := true })
repeat erw [WithBot.coe_eq_coe]
exact Nat.add_eq_one_iff
| [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... | [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... |
import Mathlib.FieldTheory.Normal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.Integral
#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
universe u v w
open scoped Classical Polynomial
open Polynomial
vari... | Mathlib/FieldTheory/IsAlgClosed/Basic.lean | 138 | 146 | theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p.eval x = 0) :
IsAlgClosed k := by |
refine ⟨fun p ↦ Or.inr ?_⟩
intro q hq _
have : Irreducible (q * C (leadingCoeff q)⁻¹) := by
rw [← coe_normUnit_of_ne_zero hq.ne_zero]
exact (associated_normalize _).irreducible hq
obtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) this
exact degree_mul_leadingCoeff... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map f p).degree ≠ 0",
" eval₂ ... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map f p).degree ≠ 0",
" eval₂ ... |
import Mathlib.AlgebraicTopology.SplitSimplicialObject
import Mathlib.AlgebraicTopology.DoldKan.Degeneracies
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.split_simplicial_object from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open Categ... | Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean | 53 | 56 | theorem cofan_inj_πSummand_eq_zero [HasZeroMorphisms C] {Δ : SimplexCategoryᵒᵖ} (A B : IndexSet Δ)
(h : B ≠ A) : (s.cofan Δ).inj A ≫ s.πSummand B = 0 := by |
dsimp [πSummand]
rw [ι_desc, dif_neg h.symm]
| [
" s.N B.fst.unop.len ⟶ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Δ).inj A ≫ s.πSummand A = 𝟙 (summand s.N Δ A)",
" (s.cofan Δ).inj A ≫ s.πSummand B = 0",
" ((s.cofan Δ).inj A ≫ s.desc Δ fun B_1 => if h : B_1 = B then eqToHom ⋯ ... | [
" s.N B.fst.unop.len ⟶ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Δ).inj A ≫ s.πSummand A = 𝟙 (summand s.N Δ A)"
] |
import Mathlib.Data.PFunctor.Multivariate.W
import Mathlib.Data.QPF.Multivariate.Basic
#align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe u v
namespace MvQPF
open TypeVec
open MvFunctor (LiftP LiftR)
open MvFunctor
var... | Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean | 108 | 116 | theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
(h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
WEquiv x y := by |
revert h
apply q.P.w_cases _ x
intro a₀ f'₀ f₀
apply q.P.w_cases _ y
intro a₁ f'₁ f₁
apply WEquiv.abs
| [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)",
" recF g x = g (abs ((TypeVec.id ::: r... | [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)",
" recF g x = g (abs ((TypeVec.id ::: r... |
import Batteries.Data.Fin.Basic
namespace Fin
attribute [norm_cast] val_last
protected theorem le_antisymm_iff {x y : Fin n} : x = y ↔ x ≤ y ∧ y ≤ x :=
Fin.ext_iff.trans Nat.le_antisymm_iff
protected theorem le_antisymm {x y : Fin n} (h1 : x ≤ y) (h2 : y ≤ x) : x = y :=
Fin.le_antisymm_iff.2 ⟨h1, h2⟩
@[simp... | .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean | 80 | 85 | theorem foldl_succ_last (f : α → Fin (n+1) → α) (x) :
foldl (n+1) f x = f (foldl n (f · ·.castSucc) x) (last n) := by |
rw [foldl_succ]
induction n generalizing x with
| zero => simp [foldl_succ, Fin.last]
| succ n ih => rw [foldl_succ, ih (f · ·.succ), foldl_succ]; simp [succ_castSucc]
| [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... | [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... |
import Mathlib.Algebra.CharP.ExpChar
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Equiv
import Mathlib.RingTheory.Polynomial.Content
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.polynomial.basic from "leanprover-commun... | Mathlib/RingTheory/Polynomial/Basic.lean | 76 | 94 | theorem degreeLE_eq_span_X_pow [DecidableEq R] {n : ℕ} :
degreeLE R n = Submodule.span R ↑((Finset.range (n + 1)).image fun n => (X : R[X]) ^ n) := by |
apply le_antisymm
· intro p hp
replace hp := mem_degreeLE.1 hp
rw [← Polynomial.sum_monomial_eq p, Polynomial.sum]
refine Submodule.sum_mem _ fun k hk => ?_
have := WithBot.coe_le_coe.1 (Finset.sup_le_iff.1 hp k hk)
rw [← C_mul_X_pow_eq_monomial, C_mul']
refine
Submodule.smul_mem _ _
... | [
" ↑n = 0 ↔ p ∣ n",
" ExpChar R[X] p",
" f ∈ degreeLE R n ↔ f.degree ≤ n",
" (∀ (i : ℕ), ↑i > n → (lcoeff R i) f = 0) ↔ ∀ (m : ℕ), n < ↑m → f.coeff m = 0",
" degreeLE R ↑n = Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))",
" degreeLE R ↑n ≤ Submodule.span R ↑(image (fun n => X ^ n) (range (n + ... | [
" ↑n = 0 ↔ p ∣ n",
" ExpChar R[X] p",
" f ∈ degreeLE R n ↔ f.degree ≤ n",
" (∀ (i : ℕ), ↑i > n → (lcoeff R i) f = 0) ↔ ∀ (m : ℕ), n < ↑m → f.coeff m = 0"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 118 | 120 | theorem binomial_one [DecidableEq α] (h : a ≠ b) (h₁ : f a = 1) :
multinomial {a, b} f = (f b).succ := by |
simp [multinomial_insert_one (Finset.not_mem_singleton.mpr h) h₁]
| [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... | [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Data.ENat.Basic
#align_import data.polynomial.degree.trailing_degree from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836"
noncomputable section
open Function Polynomial Finsupp Finset
open scoped Polynomial
namespace ... | Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean | 148 | 151 | theorem natTrailingDegree_eq_of_trailingDegree_eq [Semiring S] {q : S[X]}
(h : trailingDegree p = trailingDegree q) : natTrailingDegree p = natTrailingDegree q := by |
unfold natTrailingDegree
rw [h]
| [
" p.trailingDegree = ⊤",
" p.trailingDegree = ↑p.natTrailingDegree",
" ↑n = ↑(Option.getD (↑n) 0)",
" p.trailingDegree = ↑n ↔ p.natTrailingDegree = n",
" ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n",
" p.trailingDegree = ↑n → p.natTrailingDegree = n",
" p.natTrailingDegree = n",
" p ≠ 0",
" ... | [
" p.trailingDegree = ⊤",
" p.trailingDegree = ↑p.natTrailingDegree",
" ↑n = ↑(Option.getD (↑n) 0)",
" p.trailingDegree = ↑n ↔ p.natTrailingDegree = n",
" ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n",
" p.trailingDegree = ↑n → p.natTrailingDegree = n",
" p.natTrailingDegree = n",
" p ≠ 0",
" ... |
import Mathlib.Algebra.Algebra.Tower
import Mathlib.Algebra.Polynomial.AlgebraMap
#align_import ring_theory.polynomial.tower from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Polynomial
variable (R A B : Type*)
namespace Polynomial
section CommSemiring
variable [CommSemiring ... | Mathlib/RingTheory/Polynomial/Tower.lean | 68 | 70 | theorem aeval_algebraMap_eq_zero_iff_of_injective {x : A} {p : R[X]}
(h : Function.Injective (algebraMap A B)) : aeval (algebraMap A B x) p = 0 ↔ aeval x p = 0 := by |
rw [aeval_algebraMap_apply, ← (algebraMap A B).map_zero, h.eq_iff]
| [
" (aeval ((algebraMap A B) x)) p = (algebraMap A B) ((aeval x) p)",
" (aeval ((algebraMap A B) x)) p = 0 ↔ (aeval x) p = 0"
] | [
" (aeval ((algebraMap A B) x)) p = (algebraMap A B) ((aeval x) p)",
" (aeval ((algebraMap A B) x)) p = 0 ↔ (aeval x) p = 0"
] |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H ... | Mathlib/Geometry/Manifold/ContMDiff/Product.lean | 218 | 231 | theorem contMDiffWithinAt_snd {s : Set (M × N)} {p : M × N} :
ContMDiffWithinAt (I.prod J) J n Prod.snd s p := by |
/- porting note: `simp` fails to apply lemmas to `ModelProd`. Was
rw [contMDiffWithinAt_iff']
refine' ⟨continuousWithinAt_snd, _⟩
refine' contDiffWithinAt_snd.congr (fun y hy => _) _
· simp only [mfld_simps] at hy
simp only [hy, mfld_simps]
· simp only [mfld_simps]
-/
rw [contMDiffWithinAt_iff']
... | [
" ContMDiffWithinAt (I.prod J) I n Prod.fst s p",
" ContinuousWithinAt Prod.fst s p ∧\n ContDiffWithinAt 𝕜 n (↑(extChartAt I p.1) ∘ Prod.fst ∘ ↑(extChartAt (I.prod J) p).symm)\n ((extChartAt (I.prod J) p).target ∩\n ↑(extChartAt (I.prod J) p).symm ⁻¹' (s ∩ Prod.fst ⁻¹' (extChartAt I p.1).source))\... | [
" ContMDiffWithinAt (I.prod J) I n Prod.fst s p",
" ContinuousWithinAt Prod.fst s p ∧\n ContDiffWithinAt 𝕜 n (↑(extChartAt I p.1) ∘ Prod.fst ∘ ↑(extChartAt (I.prod J) p).symm)\n ((extChartAt (I.prod J) p).target ∩\n ↑(extChartAt (I.prod J) p).symm ⁻¹' (s ∩ Prod.fst ⁻¹' (extChartAt I p.1).source))\... |
import Mathlib.CategoryTheory.Monoidal.Mon_
import Mathlib.CategoryTheory.Monoidal.Braided.Opposite
import Mathlib.CategoryTheory.Monoidal.Transport
import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
universe v₁ v₂ u₁ u₂ u
open CategoryTheory MonoidalCategor... | Mathlib/CategoryTheory/Monoidal/Comon_.lean | 77 | 78 | theorem comul_counit_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (f ⊗ M.counit) = f ≫ (ρ_ Z).inv := by |
rw [rightUnitor_inv_naturality, tensorHom_def', comul_counit_assoc]
| [
" (λ_ (𝟙_ C)).inv ≫ 𝟙 (𝟙_ C) ▷ 𝟙_ C = (λ_ (𝟙_ C)).inv",
" (λ_ (𝟙_ C)).inv ≫ 𝟙_ C ◁ 𝟙 (𝟙_ C) = (ρ_ (𝟙_ C)).inv",
" (λ_ (𝟙_ C)).inv ≫ 𝟙_ C ◁ (λ_ (𝟙_ C)).inv ≫ (α_ (𝟙_ C) (𝟙_ C) (𝟙_ C)).inv = (λ_ (𝟙_ C)).inv ≫ (λ_ (𝟙_ C)).inv ▷ 𝟙_ C",
" M.comul ≫ (M.counit ⊗ f) = f ≫ (λ_ Z).inv",
" M.comul ≫... | [
" (λ_ (𝟙_ C)).inv ≫ 𝟙 (𝟙_ C) ▷ 𝟙_ C = (λ_ (𝟙_ C)).inv",
" (λ_ (𝟙_ C)).inv ≫ 𝟙_ C ◁ 𝟙 (𝟙_ C) = (ρ_ (𝟙_ C)).inv",
" (λ_ (𝟙_ C)).inv ≫ 𝟙_ C ◁ (λ_ (𝟙_ C)).inv ≫ (α_ (𝟙_ C) (𝟙_ C) (𝟙_ C)).inv = (λ_ (𝟙_ C)).inv ≫ (λ_ (𝟙_ C)).inv ▷ 𝟙_ C",
" M.comul ≫ (M.counit ⊗ f) = f ≫ (λ_ Z).inv"
] |
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.EuclideanDomain
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Polynomial.Content
noncomputable section
universe u
variable {K : Type u}
namespace RatFunc
section IntDegree
open Polynomial
variable [Field... | Mathlib/FieldTheory/RatFunc/Degree.lean | 54 | 55 | theorem intDegree_C (k : K) : intDegree (C k) = 0 := by |
rw [intDegree, num_C, natDegree_C, denom_C, natDegree_one, sub_self]
| [
" intDegree 0 = 0",
" intDegree 1 = 0",
" (C k).intDegree = 0"
] | [
" intDegree 0 = 0",
" intDegree 1 = 0"
] |
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.Topology.Category.TopCat.Limits.Basic
#align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967"
-- Porting note: every ML3 decl has an uppercase letter
set_option linter.uppercaseLean3 ... | Mathlib/Topology/Category/TopCat/Limits/Konig.lean | 70 | 81 | theorem partialSections.nonempty [IsCofilteredOrEmpty J] [h : ∀ j : J, Nonempty (F.obj j)]
{G : Finset J} (H : Finset (FiniteDiagramArrow G)) : (partialSections F H).Nonempty := by |
classical
cases isEmpty_or_nonempty J
· exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩
haveI : IsCofiltered J := ⟨⟩
use fun j : J =>
if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some
else (h _).some
rintro ⟨X, Y, hX, hY, f⟩ hf
dsimp only
rwa [... | [
" (partialSections F H).Nonempty",
" (fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some) ∈ partialSections F H",
" (F.map ⟨X, ⟨Y, ⟨hX, ⟨hY, f⟩⟩⟩⟩.snd.snd.snd.snd)\n ((fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some)\n ⟨X, ⟨Y, ⟨hX, ⟨... | [] |
import Mathlib.Algebra.Regular.Basic
import Mathlib.LinearAlgebra.Matrix.MvPolynomial
import Mathlib.LinearAlgebra.Matrix.Polynomial
import Mathlib.RingTheory.Polynomial.Basic
#align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matr... | Mathlib/LinearAlgebra/Matrix/Adjugate.lean | 126 | 132 | theorem cramer_one : cramer (1 : Matrix n n α) = 1 := by |
-- Porting note: was `ext i j`
refine LinearMap.pi_ext' (fun (i : n) => LinearMap.ext_ring (funext (fun (j : n) => ?_)))
convert congr_fun (cramer_row_self (1 : Matrix n n α) (Pi.single i 1) i _) j
· simp
· intro j
rw [Matrix.one_eq_pi_single, Pi.single_comm]
| [
" IsLinearMap α A.cramerMap",
" ∀ (x y : n → α), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" ∀ (c : α) (x : n → α), A.cramerMap (c • x) = c • A.cramerMap x",
" A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝",
" A.cramerMap (c✝ • x✝) = c✝ • A.cramerMap x✝",
" A.cramerMap (x✝ + y✝) i = ... | [
" IsLinearMap α A.cramerMap",
" ∀ (x y : n → α), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" ∀ (c : α) (x : n → α), A.cramerMap (c • x) = c • A.cramerMap x",
" A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝",
" A.cramerMap (c✝ • x✝) = c✝ • A.cramerMap x✝",
" A.cramerMap (x✝ + y✝) i = ... |
import Mathlib.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 | 45 | 47 | theorem natAbs_eq_iff_sq_eq {a b : ℤ} : a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2 := by |
rw [sq, sq]
exact natAbs_eq_iff_mul_self_eq
| [
" ↑m - ↑n ≤ ↑(m - n)",
" 0 ≤ ↑n",
" a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2",
" a.natAbs = b.natAbs ↔ a * a = b * b"
] | [
" ↑m - ↑n ≤ ↑(m - n)",
" 0 ≤ ↑n"
] |
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine
import Mathlib.Tactic.IntervalCases
#align_import geometry.euclidean.triangle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped Classica... | Mathlib/Geometry/Euclidean/Triangle.lean | 62 | 67 | theorem norm_sub_sq_eq_norm_sq_add_norm_sq_sub_two_mul_norm_mul_norm_mul_cos_angle (x y : V) :
‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - 2 * ‖x‖ * ‖y‖ * Real.cos (angle x y) := by |
rw [show 2 * ‖x‖ * ‖y‖ * Real.cos (angle x y) = 2 * (Real.cos (angle x y) * (‖x‖ * ‖y‖)) by ring,
cos_angle_mul_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm, ←
real_inner_self_eq_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm, real_inner_sub_sub_self,
sub_add_eq_add_sub]
| [
" ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - 2 * ‖x‖ * ‖y‖ * (angle x y).cos",
" 2 * ‖x‖ * ‖y‖ * (angle x y).cos = 2 * ((angle x y).cos * (‖x‖ * ‖y‖))"
] | [] |
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.Matrix
import Mathlib.LinearAlgebra.Matrix.ZPow
import Mathlib.LinearAlgebra.Matrix.Hermitian
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.Topology.UniformSpace.Matrix
#align_import analysis.normed_space.matrix_exponential from "l... | Mathlib/Analysis/NormedSpace/MatrixExponential.lean | 111 | 112 | theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ := by |
simp_rw [exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]
| [
" exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ"
] | [] |
import Mathlib.Algebra.Order.Ring.Int
#align_import data.int.range from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
-- Porting note: Many unfolds about `Lean.Internal.coeM`
namespace Int
def range (m n : ℤ) : List ℤ :=
((List.range (toNat (n - m))) : List ℕ).map fun (r : ℕ) => (m ... | Mathlib/Data/Int/Range.lean | 29 | 32 | theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n := by |
simp only [range, List.mem_map, List.mem_range, lt_toNat, lt_sub_iff_add_lt, add_comm]
exact ⟨fun ⟨a, ha⟩ => ha.2 ▸ ⟨le_add_of_nonneg_right (Int.natCast_nonneg _), ha.1⟩,
fun h => ⟨toNat (r - m), by simp [toNat_of_nonneg (sub_nonneg.2 h.1), h.2] ⟩⟩
| [
" r ∈ m.range n ↔ m ≤ r ∧ r < n",
" (∃ a, m + ↑a < n ∧ m + ↑a = r) ↔ m ≤ r ∧ r < n",
" m + ↑(r - m).toNat < n ∧ m + ↑(r - m).toNat = r"
] | [] |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.Algebra.Ring.NegOnePow
namespace Matrix
variable {R : Type*} [CommRing R]
theorem submatrix_succAbove_det_eq_negOnePow_submatrix_succAbove_det {n : ℕ}
(M : Matrix (Fin (n + 1)) (Fin n) R) (hv : ∑ j, M j = 0) (j₁ j₂ : Fin (n + 1)) :
(M.s... | Mathlib/LinearAlgebra/Matrix/Determinant/Misc.lean | 51 | 59 | theorem submatrix_succAbove_det_eq_negOnePow_submatrix_succAbove_det' {n : ℕ}
(M : Matrix (Fin n) (Fin (n + 1)) R) (hv : ∀ i, ∑ j, M i j = 0) (j₁ j₂ : Fin (n + 1)) :
(M.submatrix id (Fin.succAbove j₁)).det =
Int.negOnePow (j₁ - j₂) • (M.submatrix id (Fin.succAbove j₂)).det := by |
rw [← det_transpose, transpose_submatrix,
submatrix_succAbove_det_eq_negOnePow_submatrix_succAbove_det M.transpose ?_ j₁ j₂,
← det_transpose, transpose_submatrix, transpose_transpose]
ext
simp_rw [Finset.sum_apply, transpose_apply, hv, Pi.zero_apply]
| [
" (M.submatrix j₁.succAbove id).det = (↑↑j₁ - ↑↑j₂).negOnePow • (M.submatrix j₂.succAbove id).det",
" ∀ (j : Fin (n + 1)), (M.submatrix j.succAbove id).det = (↑↑j).negOnePow • (M.submatrix (Fin.succAbove 0) id).det",
" (M.submatrix j.succAbove id).det = (↑↑j).negOnePow • (M.submatrix (Fin.succAbove 0) id).det",... | [
" (M.submatrix j₁.succAbove id).det = (↑↑j₁ - ↑↑j₂).negOnePow • (M.submatrix j₂.succAbove id).det",
" ∀ (j : Fin (n + 1)), (M.submatrix j.succAbove id).det = (↑↑j).negOnePow • (M.submatrix (Fin.succAbove 0) id).det",
" (M.submatrix j.succAbove id).det = (↑↑j).negOnePow • (M.submatrix (Fin.succAbove 0) id).det",... |
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.hall.finite from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Finset
universe u v
namespace HallMarriageTheorem
variable {ι : Type u} {α : Type v} [DecidableEq α] {t : ι → Finset α}
s... | Mathlib/Combinatorics/Hall/Finite.lean | 50 | 70 | theorem hall_cond_of_erase {x : ι} (a : α)
(ha : ∀ s : Finset ι, s.Nonempty → s ≠ univ → s.card < (s.biUnion t).card)
(s' : Finset { x' : ι | x' ≠ x }) : s'.card ≤ (s'.biUnion fun x' => (t x').erase a).card := by |
haveI := Classical.decEq ι
specialize ha (s'.image fun z => z.1)
rw [image_nonempty, Finset.card_image_of_injective s' Subtype.coe_injective] at ha
by_cases he : s'.Nonempty
· have ha' : s'.card < (s'.biUnion fun x => t x).card := by
convert ha he fun h => by simpa [← h] using mem_univ x using 2
... | [
" s'.card ≤ (s'.biUnion fun x' => (t ↑x').erase a).card",
" s'.card < (s'.biUnion fun x_1 => t ↑x_1).card",
" False",
" (s'.biUnion fun x_1 => t ↑x_1) = (image (fun z => ↑z) s').biUnion t",
" (x ∈ s'.biUnion fun x => t ↑x) ↔ x ∈ (image (fun z => ↑z) s').biUnion t",
" s'.card ≤ ((s'.biUnion fun x' => t ↑x'... | [] |
import Mathlib.Data.List.Basic
namespace List
variable {α β : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some... | Mathlib/Data/List/ReduceOption.lean | 93 | 94 | theorem reduceOption_mem_iff {l : List (Option α)} {x : α} : x ∈ l.reduceOption ↔ some x ∈ l := by |
simp only [reduceOption, id, mem_filterMap, exists_eq_right]
| [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... | [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.CharZero.Lemmas
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.Choose.Central
import Mathlib.Data.Tree.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.GCongr
import Mathlib... | Mathlib/Combinatorics/Enumerative/Catalan.lean | 65 | 65 | theorem catalan_zero : catalan 0 = 1 := by | rw [catalan]
| [
" catalan 0 = 1"
] | [] |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04"
namespace Set
variable {α β : Type*} {s t : Set α}
noncomputable def encard (s : Set α) : ℕ∞ := PartENat.withTopEquiv (PartENat.card s)
@[simp] theorem encard_uni... | Mathlib/Data/Set/Card.lean | 137 | 138 | theorem encard_ne_top_iff : s.encard ≠ ⊤ ↔ s.Finite := by |
simp
| [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card",
" (↑s).encard = ↑s.card",
" ↑⋯.toFinset.card = ↑s.card",
" s.encard = ⊤",
" s.encard = 0 ↔ s = ∅",
" ∅.encard = 0",
" s.Nonempty",
" s.encard ≠ 0 ↔... | [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card",
" (↑s).encard = ↑s.card",
" ↑⋯.toFinset.card = ↑s.card",
" s.encard = ⊤",
" s.encard = 0 ↔ s = ∅",
" ∅.encard = 0",
" s.Nonempty",
" s.encard ≠ 0 ↔... |
import Mathlib.Probability.Martingale.Basic
#align_import probability.martingale.centering from "leanprover-community/mathlib"@"bea6c853b6edbd15e9d0941825abd04d77933ed0"
open TopologicalSpace Filter
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheory
variable {Ω E : Type*} {m0 : ... | Mathlib/Probability/Martingale/Centering.lean | 75 | 79 | theorem martingalePart_eq_sum : martingalePart f ℱ μ = fun n =>
f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|ℱ i]) := by |
unfold martingalePart predictablePart
ext1 n
rw [Finset.eq_sum_range_sub f n, ← add_sub, ← Finset.sum_sub_distrib]
| [
" predictablePart f ℱ μ 0 = 0",
" martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])",
" (fun n => f n - ∑ i ∈ Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])",
" f n - ∑ i ∈ F... | [
" predictablePart f ℱ μ 0 = 0"
] |
import Mathlib.Algebra.Order.Ring.Cast
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Data.Nat.Bitwise
import Mathlib.Data.Nat.PSub
import Mathlib.Data.Nat.Size
import Mathlib.Data.Num.Bitwise
#align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
set_opti... | Mathlib/Data/Num/Lemmas.lean | 1,053 | 1,053 | theorem zneg_zneg (n : ZNum) : - -n = n := by | cases n <;> rfl
| [
" - -n = n",
" - -zero = zero",
" - -pos a✝ = pos a✝",
" - -neg a✝ = neg a✝"
] | [] |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Range
#align_import data.list.nat_antidiagonal from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
open List Function Nat
namespace List
namespace Nat
def antidiagonal (n : ℕ) : List (ℕ × ℕ) :=
(range (n + 1)).map fun i ↦ (i,... | Mathlib/Data/List/NatAntidiagonal.lean | 52 | 53 | theorem length_antidiagonal (n : ℕ) : (antidiagonal n).length = n + 1 := by |
rw [antidiagonal, length_map, length_range]
| [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n",
" (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n",
" (i, n - i).1 + (i, n - i).2 = n",
" x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x",
" ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x",
"... | [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n",
" (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n",
" (i, n - i).1 + (i, n - i).2 = n",
" x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x",
" ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x",
"... |
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 | 50 | 54 | theorem Nat.Coprime.cast {R : Type*} [CommRing R] {a b : ℕ} (h : Nat.Coprime a b) :
IsCoprime (a : R) (b : R) := by |
rw [← isCoprime_iff_coprime] at h
rw [← Int.cast_natCast a, ← Int.cast_natCast b]
exact IsCoprime.intCast h
| [
" 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"
] |
import Mathlib.Topology.MetricSpace.PseudoMetric
#align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
open Set Filter Bornology
open scoped NNReal Uniformity
universe u v w
variable {α : Type u} {β : Type v} {X ι : Type*}
variable [PseudoMetricS... | Mathlib/Topology/MetricSpace/Basic.lean | 191 | 193 | theorem MetricSpace.replaceUniformity_eq {γ} [U : UniformSpace γ] (m : MetricSpace γ)
(H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : m.replaceUniformity H = m := by |
ext; rfl
| [
" m = m'",
" mk eq_of_dist_eq_zero✝ = m'",
" mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝",
" toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y ↔ x = y",
" dist x y ≠ 0 ↔ x ≠ y",
" dist x y ≤ 0 ↔ x = y",
" 0 < dist x y ↔ x ≠ y",... | [
" m = m'",
" mk eq_of_dist_eq_zero✝ = m'",
" mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝",
" toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y ↔ x = y",
" dist x y ≠ 0 ↔ x ≠ y",
" dist x y ≤ 0 ↔ x = y",
" 0 < dist x y ↔ x ≠ y",... |
import Mathlib.Algebra.Group.Center
import Mathlib.Data.Int.Cast.Lemmas
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
variable {M : Type*}
namespace Set
variable (M)
@[simp]
theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) :... | Mathlib/Algebra/Ring/Center.lean | 81 | 86 | theorem neg_mem_center [NonUnitalNonAssocRing M] {a : M} (ha : a ∈ Set.center M) :
-a ∈ Set.center M where
comm _ := by | rw [← neg_mul_comm, ← ha.comm, neg_mul_comm]
left_assoc _ _ := by rw [neg_mul, ha.left_assoc, neg_mul, neg_mul]
mid_assoc _ _ := by rw [← neg_mul_comm, ha.mid_assoc, neg_mul_comm, neg_mul]
right_assoc _ _ := by rw [mul_neg, ha.right_assoc, mul_neg, mul_neg]
| [
" ↑n * x✝ = x✝ * ↑n",
" ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝",
" ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝",
" ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝",
" x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)",
" x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)",
" x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)",
" x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)",
" ... | [
" ↑n * x✝ = x✝ * ↑n",
" ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝",
" ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝",
" ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝",
" x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)",
" x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)",
" x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)",
" x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)",
" ... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.Algebra.MvPolynomial.Degrees
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
#align_import ring_theory.mv_polynomial.basic from "leanprover-community/mathlib"@"2f5b500a507... | Mathlib/RingTheory/MvPolynomial/Basic.lean | 119 | 123 | theorem mem_restrictDegree_iff_sup [DecidableEq σ] (p : MvPolynomial σ R) (n : ℕ) :
p ∈ restrictDegree σ R n ↔ ∀ i, p.degrees.count i ≤ n := by |
simp only [mem_restrictDegree, degrees_def, Multiset.count_finset_sup, Finsupp.count_toMultiset,
Finset.sup_le_iff]
exact ⟨fun h n s hs => h s hs n, fun h s hs n => h n s hs⟩
| [
" p ∈ restrictTotalDegree σ R m ↔ p.totalDegree ≤ m",
" p ∈ restrictTotalDegree σ R m ↔ ∀ b ∈ p.support, (b.sum fun x e => e) ≤ m",
" p ∈ restrictDegree σ R n ↔ ∀ s ∈ p.support, ∀ (i : σ), s i ≤ n",
" ↑p.support ⊆ {n_1 | ∀ (i : σ), n_1 i ≤ n} ↔ ∀ s ∈ p.support, ∀ (i : σ), s i ≤ n",
" p ∈ restrictDegree σ R ... | [
" p ∈ restrictTotalDegree σ R m ↔ p.totalDegree ≤ m",
" p ∈ restrictTotalDegree σ R m ↔ ∀ b ∈ p.support, (b.sum fun x e => e) ≤ m",
" p ∈ restrictDegree σ R n ↔ ∀ s ∈ p.support, ∀ (i : σ), s i ≤ n",
" ↑p.support ⊆ {n_1 | ∀ (i : σ), n_1 i ≤ n} ↔ ∀ s ∈ p.support, ∀ (i : σ), s i ≤ n"
] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
se... | Mathlib/Analysis/Complex/RealDeriv.lean | 68 | 81 | theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : ℝ => (e x).re) e'.re z := by |
have A : HasFDerivAt ((↑) : ℝ → ℂ) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : ℂ →L[ℂ] ℂ).restrictScalars ℝ)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars ℝ
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note... | [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... | [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))"
] |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X α : Type*} {ι : Sort*}
section BaireTheorem
variable [TopologicalSpace... | Mathlib/Topology/Baire/Lemmas.lean | 74 | 81 | theorem mem_residual {s : Set X} : s ∈ residual X ↔ ∃ t ⊆ s, IsGδ t ∧ Dense t := by |
constructor
· rw [mem_residual_iff]
rintro ⟨S, hSo, hSd, Sct, Ss⟩
refine ⟨_, Ss, ⟨_, fun t ht => hSo _ ht, Sct, rfl⟩, ?_⟩
exact dense_sInter_of_isOpen hSo Sct hSd
rintro ⟨t, ts, ho, hd⟩
exact mem_of_superset (residual_of_dense_Gδ ho hd) ts
| [
" Dense (⋂₀ S)",
" Dense (⋂₀ range f)",
" Dense (⋂ s ∈ S, f s)",
" Dense (⋂₀ ((fun s => f s) '' S))",
" ∀ s ∈ (fun s => f s) '' S, IsOpen s",
" ∀ s ∈ (fun s => f s) '' S, Dense s",
" s ∈ residual X ↔ ∃ t ⊆ s, IsGδ t ∧ Dense t",
" s ∈ residual X → ∃ t ⊆ s, IsGδ t ∧ Dense t",
" (∃ S, (∀ t ∈ S, IsOpen ... | [
" Dense (⋂₀ S)",
" Dense (⋂₀ range f)",
" Dense (⋂ s ∈ S, f s)",
" Dense (⋂₀ ((fun s => f s) '' S))",
" ∀ s ∈ (fun s => f s) '' S, IsOpen s",
" ∀ s ∈ (fun s => f s) '' S, Dense s"
] |
import Mathlib.Data.Finsupp.Encodable
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Span
import Mathlib.Data.Set.Countable
#align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
noncomputable section
open Set LinearMap Submodule
namespa... | Mathlib/LinearAlgebra/Finsupp.lean | 234 | 234 | theorem lapply_comp_lsingle_same (a : α) : lapply a ∘ₗ lsingle a = (.id : M →ₗ[R] M) := by | ext; simp
| [
" ⇑(x + y) = ⇑x + ⇑y",
" (x + y) x✝ = (⇑x + ⇑y) x✝",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) =\n (RingHom.id R) x • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun y",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) x✝ =\n ((RingHom.id R) x • { toFun := DFunLike.coe, map_add' :=... | [
" ⇑(x + y) = ⇑x + ⇑y",
" (x + y) x✝ = (⇑x + ⇑y) x✝",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) =\n (RingHom.id R) x • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun y",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) x✝ =\n ((RingHom.id R) x • { toFun := DFunLike.coe, map_add' :=... |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
namespace WittVector
open MvPolynomial
variable {p : ℕ} {R S : Type*} [hp : Fact p.Prime] [Comm... | Mathlib/RingTheory/WittVector/Verschiebung.lean | 47 | 48 | theorem verschiebungFun_coeff_zero (x : 𝕎 R) : (verschiebungFun x).coeff 0 = 0 := by |
rw [verschiebungFun_coeff, if_pos rfl]
| [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0"
] | [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)"
] |
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.LinearAlgebra.Dimension.Finite
import Mathlib.SetTheory.Cardinal.Subfield
import Mathlib.LinearAlgebra.Dimension.RankNullity
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomput... | Mathlib/LinearAlgebra/Dimension/DivisionRing.lean | 59 | 63 | theorem rank_quotient_add_rank_of_divisionRing (p : Submodule K V) :
Module.rank K (V ⧸ p) + Module.rank K p = Module.rank K V := by |
classical
let ⟨f⟩ := quotient_prod_linearEquiv p
exact rank_prod'.symm.trans f.rank_eq
| [
" Module.rank K (V ⧸ p) + Module.rank K ↥p = Module.rank K V"
] | [] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Sum
#align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open scoped Classical
universe u v
namespace ... | Mathlib/Combinatorics/HalesJewett.lean | 211 | 212 | theorem diagonal_apply {α ι} [Nonempty ι] (x : α) : Line.diagonal α ι x = fun _ => x := by |
simp_rw [Line.diagonal, Option.getD_none]
| [
" Inhabited (ColorFocused C)",
" h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) ⋯.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... | [
" Inhabited (ColorFocused C)",
" h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) ⋯.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... |
import Mathlib.Algebra.GroupWithZero.Hom
import Mathlib.Algebra.GroupWithZero.Units.Basic
import Mathlib.Algebra.Ring.Defs
import Mathlib.Data.Nat.Lattice
#align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
open Function Set
variable {R ... | Mathlib/RingTheory/Nilpotent/Defs.lean | 197 | 205 | theorem isReduced_of_injective [MonoidWithZero R] [MonoidWithZero S] {F : Type*}
[FunLike F R S] [MonoidWithZeroHomClass F R S]
(f : F) (hf : Function.Injective f) [IsReduced S] :
IsReduced R := by |
constructor
intro x hx
apply hf
rw [map_zero]
exact (hx.map f).eq_zero
| [
" IsNilpotent (x ^ n.succ)",
" (x ^ n.succ) ^ N = 0",
" IsNilpotent x",
" x ^ (m * n) = 0",
" IsNilpotent (x ^ n)",
" IsNilpotent (x ^ 0)",
" IsNilpotent (x ^ (n✝ + 1))",
" IsNilpotent (f r)",
" f r ^ Exists.choose hr = 0",
" f (r ^ k) = 0",
" (r * u) ^ n = 0 ↔ r ^ n = 0",
" IsReduced R",
" ... | [
" IsNilpotent (x ^ n.succ)",
" (x ^ n.succ) ^ N = 0",
" IsNilpotent x",
" x ^ (m * n) = 0",
" IsNilpotent (x ^ n)",
" IsNilpotent (x ^ 0)",
" IsNilpotent (x ^ (n✝ + 1))",
" IsNilpotent (f r)",
" f r ^ Exists.choose hr = 0",
" f (r ^ k) = 0",
" (r * u) ^ n = 0 ↔ r ^ n = 0"
] |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.ModEq
import Mathlib.Data.Nat.Count
import Mathlib.Data.Rat.Floor
import Mathlib.Order.Interval.Finset.Nat
open Finset Int
namespace Int
variable (a b : ℤ) {r : ℤ} (hr : 0 < r)
lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) =
(Ico ⌈a / (r : ℚ)⌉ ⌈b... | Mathlib/Data/Int/CardIntervalMod.lean | 47 | 49 | theorem Ioc_filter_dvd_card : ((Ioc a b).filter (r ∣ ·)).card =
max (⌊b / (r : ℚ)⌋ - ⌊a / (r : ℚ)⌋) 0 := by |
rw [Ioc_filter_dvd_eq _ _ hr, card_map, card_Ioc, toNat_eq_max]
| [
" filter (fun x => r ∣ x) (Ico a b) = map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" x ∈ filter (fun x => r ∣ x) (Ico a b) ↔ x ∈ map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" ((a ≤ x ∧ x < b) ∧ ∃ c, x = c * r) ↔\n ∃ a_1, (a ≤ a_1 * r ∧ a_1 * r < b) ∧ { toF... | [
" filter (fun x => r ∣ x) (Ico a b) = map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" x ∈ filter (fun x => r ∣ x) (Ico a b) ↔ x ∈ map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" ((a ≤ x ∧ x < b) ∧ ∃ c, x = c * r) ↔\n ∃ a_1, (a ≤ a_1 * r ∧ a_1 * r < b) ∧ { toF... |
import Mathlib.Analysis.NormedSpace.Real
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import analysis.normed_space.riesz_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Metric
open Topology
variable {𝕜 : Type*} [Norm... | Mathlib/Analysis/NormedSpace/RieszLemma.lean | 83 | 105 | theorem riesz_lemma_of_norm_lt {c : 𝕜} (hc : 1 < ‖c‖) {R : ℝ} (hR : ‖c‖ < R) {F : Subspace 𝕜 E}
(hFc : IsClosed (F : Set E)) (hF : ∃ x : E, x ∉ F) :
∃ x₀ : E, ‖x₀‖ ≤ R ∧ ∀ y ∈ F, 1 ≤ ‖x₀ - y‖ := by |
have Rpos : 0 < R := (norm_nonneg _).trans_lt hR
have : ‖c‖ / R < 1 := by
rw [div_lt_iff Rpos]
simpa using hR
rcases riesz_lemma hFc hF this with ⟨x, xF, hx⟩
have x0 : x ≠ 0 := fun H => by simp [H] at xF
obtain ⟨d, d0, dxlt, ledx, -⟩ :
∃ d : 𝕜, d ≠ 0 ∧ ‖d • x‖ < R ∧ R / ‖c‖ ≤ ‖d • x‖ ∧ ‖d‖⁻¹ ≤ R... | [
" ∃ x₀ ∉ F, ∀ y ∈ F, r * ‖x₀‖ ≤ ‖x₀ - y‖",
" r' < 1",
" 2⁻¹ < 1",
" 0 < 2⁻¹",
" x - y₀ ∉ F",
" False",
" r * ‖x - y₀‖ < ‖x - y₀ - y‖",
" r * ‖x - y₀‖ ≤ r' * ‖x - y₀‖",
" r ≤ r'",
" r' * ‖x - y₀‖ < d",
" r' * dist x y₀ < d",
" dist x (y₀ + y) = ‖x - y₀ - y‖",
" ∃ x₀, ‖x₀‖ ≤ R ∧ ∀ y ∈ F, 1 ≤ ‖... | [
" ∃ x₀ ∉ F, ∀ y ∈ F, r * ‖x₀‖ ≤ ‖x₀ - y‖",
" r' < 1",
" 2⁻¹ < 1",
" 0 < 2⁻¹",
" x - y₀ ∉ F",
" False",
" r * ‖x - y₀‖ < ‖x - y₀ - y‖",
" r * ‖x - y₀‖ ≤ r' * ‖x - y₀‖",
" r ≤ r'",
" r' * ‖x - y₀‖ < d",
" r' * dist x y₀ < d",
" dist x (y₀ + y) = ‖x - y₀ - y‖"
] |
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 | 90 | 94 | theorem natAbs_coe_sub_coe_lt_of_lt {a b n : ℕ} (a_lt_n : a < n) (b_lt_n : b < n) :
natAbs (a - b : ℤ) < n := by |
rw [← Nat.cast_lt (α := ℤ), natCast_natAbs]
exact abs_sub_lt_of_nonneg_of_lt (ofNat_nonneg a) (ofNat_lt.mpr a_lt_n)
(ofNat_nonneg b) (ofNat_lt.mpr b_lt_n)
| [
" ↑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.Algebra.Polynomial.RingDivision
import Mathlib.RingTheory.Localization.FractionRing
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable section
namespace Polynomial
universe u v w z
variable {R : Type u} {S : Ty... | Mathlib/Algebra/Polynomial/Roots.lean | 69 | 73 | theorem card_roots (hp0 : p ≠ 0) : (Multiset.card (roots p) : WithBot ℕ) ≤ degree p := by |
classical
unfold roots
rw [dif_neg hp0]
exact (Classical.choose_spec (exists_multiset_roots hp0)).1
| [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯",
" ↑(Multiset.card p.roots) ≤ p.degree",
" ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree",
" ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree"
] | [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯"
] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.Data.Complex.Orientation
import Mathlib.Tactic.LinearCombination
#align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af"
non... | Mathlib/Analysis/InnerProductSpace/TwoDim.lean | 150 | 158 | theorem abs_areaForm_of_orthogonal {x y : E} (h : ⟪x, y⟫ = 0) : |ω x y| = ‖x‖ * ‖y‖ := by |
rw [o.areaForm_to_volumeForm, o.abs_volumeForm_apply_of_pairwise_orthogonal]
· simp [Fin.prod_univ_succ]
intro i j hij
fin_cases i <;> fin_cases j
· simp_all
· simpa using h
· simpa [real_inner_comm] using h
· simp_all
| [
" E →ₗ[ℝ] E →ₗ[ℝ] ℝ",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 ≠ 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)",
" ![x, y] ... | [
" E →ₗ[ℝ] E →ₗ[ℝ] ℝ",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 ≠ 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)",
" ![x, y] ... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.GroupTheory.GroupAction.Ring
#align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Finset
open Polynomial
namespace Pol... | Mathlib/Algebra/Polynomial/Derivative.lean | 109 | 110 | theorem derivative_X_pow (n : ℕ) : derivative (X ^ n : R[X]) = C (n : R) * X ^ (n - 1) := by |
convert derivative_C_mul_X_pow (1 : R) n <;> simp
| [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... | [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... |
import Mathlib.Topology.PartialHomeomorph
import Mathlib.Topology.SeparatedMap
#align_import topology.is_locally_homeomorph from "leanprover-community/mathlib"@"e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b"
open Topology
variable {X Y Z : Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] (g : Y →... | Mathlib/Topology/IsLocalHomeomorph.lean | 155 | 158 | theorem isLocalHomeomorph_iff_openEmbedding_restrict {f : X → Y} :
IsLocalHomeomorph f ↔ ∀ x : X, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f) := by |
simp_rw [isLocalHomeomorph_iff_isLocalHomeomorphOn_univ,
isLocalHomeomorphOn_iff_openEmbedding_restrict, imp_iff_right (Set.mem_univ _)]
| [
" IsLocalHomeomorphOn f s ↔ ∀ x ∈ s, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)",
" ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)",
" ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict ↑e)",
" ∃ e, x ∈ e.source ∧ f = ↑e",
" OpenEmbedding ((interior U).restrict f)",
" IsOpen (Set.range (Set.inclusion ⋯))",
" IsOpen {x | ↑x ... | [
" IsLocalHomeomorphOn f s ↔ ∀ x ∈ s, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)",
" ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)",
" ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict ↑e)",
" ∃ e, x ∈ e.source ∧ f = ↑e",
" OpenEmbedding ((interior U).restrict f)",
" IsOpen (Set.range (Set.inclusion ⋯))",
" IsOpen {x | ↑x ... |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : ... | Mathlib/LinearAlgebra/SymplecticGroup.lean | 52 | 55 | theorem J_squared : J l R * J l R = -1 := by |
rw [J, fromBlocks_multiply]
simp only [Matrix.zero_mul, Matrix.neg_mul, zero_add, neg_zero, Matrix.one_mul, add_zero]
rw [← neg_zero, ← Matrix.fromBlocks_neg, ← fromBlocks_one]
| [
" (J l R)ᵀ = -J l R",
" fromBlocks 0 1 (-1ᵀ) 0 = (-1 • 0).fromBlocks (-1 • -1) (-1 • 1) (-1 • 0)",
" J l R * J l R = -1",
" (0 * 0 + -1 * 1).fromBlocks (0 * -1 + -1 * 0) (1 * 0 + 0 * 1) (1 * -1 + 0 * 0) = -1",
" (-1).fromBlocks 0 0 (-1) = -1"
] | [
" (J l R)ᵀ = -J l R",
" fromBlocks 0 1 (-1ᵀ) 0 = (-1 • 0).fromBlocks (-1 • -1) (-1 • 1) (-1 • 0)"
] |
import Mathlib.Algebra.Group.Semiconj.Defs
import Mathlib.Algebra.Group.Basic
#align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
namespace SemiconjBy
variable {G : Type*}
section Div... | Mathlib/Algebra/Group/Semiconj/Basic.lean | 26 | 27 | theorem inv_inv_symm_iff : SemiconjBy a⁻¹ x⁻¹ y⁻¹ ↔ SemiconjBy a y x := by |
simp_rw [SemiconjBy, ← mul_inv_rev, inv_inj, eq_comm]
| [
" SemiconjBy a⁻¹ x⁻¹ y⁻¹ ↔ SemiconjBy a y x"
] | [] |
import Mathlib.RingTheory.WittVector.Frobenius
import Mathlib.RingTheory.WittVector.Verschiebung
import Mathlib.RingTheory.WittVector.MulP
#align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
namespace WittVector
variable {p : ℕ} {R : Typ... | Mathlib/RingTheory/WittVector/Identities.lean | 74 | 77 | theorem coeff_p [CharP R p] (i : ℕ) : (p : 𝕎 R).coeff i = if i = 1 then 1 else 0 := by |
split_ifs with hi
· simpa only [hi, pow_one] using coeff_p_pow p R 1
· simpa only [pow_one] using coeff_p_pow_eq_zero p R hi
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.