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.Topology.Homotopy.Basic
import Mathlib.Topology.Connected.PathConnected
import Mathlib.Analysis.Convex.Basic
#align_import topology.homotopy.path from "leanprover-community/mathlib"@"bb9d1c5085e0b7ea619806a68c5021927cecb2a6"
universe u v
variable {X : Type u} {Y : Type v} [TopologicalSpace X] [Top... | Mathlib/Topology/Homotopy/Path.lean | 83 | 85 | theorem eval_zero (F : Homotopy p₀ p₁) : F.eval 0 = p₀ := by |
ext t
simp [eval]
| [
" { toFun := ⇑(F.curry t), continuous_toFun := ⋯ }.toFun 0 = x₀",
" { toFun := ⇑(F.curry t), continuous_toFun := ⋯ }.toFun 1 = x₁",
" F.eval 0 = p₀",
" (F.eval 0) t = p₀ t"
] | [
" { toFun := ⇑(F.curry t), continuous_toFun := ⋯ }.toFun 0 = x₀",
" { toFun := ⇑(F.curry t), continuous_toFun := ⋯ }.toFun 1 = x₁"
] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Congruence
import Mathlib.RingTheory.Ideal.Basic
import Mathlib.Tactic.FinCases
#align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69"
universe u v w
namespace Ideal
open Set
variabl... | Mathlib/RingTheory/Ideal/Quotient.lean | 137 | 138 | theorem mk_eq_mk_iff_sub_mem (x y : R) : mk I x = mk I y ↔ x - y ∈ I := by |
rw [← eq_zero_iff_mem, map_sub, sub_eq_zero]
| [
" Setoid.r (a₁ * a₂) (b₁ * b₂)",
" a₁ * a₂ - b₁ * b₂ ∈ I",
" a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁",
" (mk (span {x})) y = 0 ↔ x ∣ y",
" (mk (span {x})) x = 0",
" (mk I) x = (mk I) y ↔ x - y ∈ I"
] | [
" Setoid.r (a₁ * a₂) (b₁ * b₂)",
" a₁ * a₂ - b₁ * b₂ ∈ I",
" a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁",
" (mk (span {x})) y = 0 ↔ x ∣ y",
" (mk (span {x})) x = 0"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Expand
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.ZMod.Basic
#align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c... | Mathlib/RingTheory/WittVector/WittPolynomial.lean | 116 | 119 | theorem map_wittPolynomial (f : R →+* S) (n : ℕ) : map f (W n) = W n := by |
rw [wittPolynomial, map_sum, wittPolynomial]
refine sum_congr rfl fun i _ => ?_
rw [map_monomial, RingHom.map_pow, map_natCast]
| [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... | [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1"
] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Comp
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
#align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Top... | Mathlib/Analysis/Calculus/Deriv/Comp.lean | 123 | 126 | theorem HasStrictDerivAt.scomp_of_eq
(hg : HasStrictDerivAt g₁ g₁' y) (hh : HasStrictDerivAt h h' x) (hy : y = h x) :
HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x := by |
rw [hy] at hg; exact hg.scomp x hh
| [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L",
" HasDerivAt (g₁ ∘ h) (h' • g₁') x",
" HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x",
" HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x"
] | [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L",
" HasDerivAt (g₁ ∘ h) (h' • g₁') x",
" HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x",
" HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x"
] |
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic
#align_import measure_theory.integral.mean_inequalities from "leanprover-community/mathlib"@"13bf7613c96a9fd66a81b9020a82cad9... | Mathlib/MeasureTheory/Integral/MeanInequalities.lean | 101 | 106 | theorem lintegral_rpow_funMulInvSnorm_eq_one {p : ℝ} (hp0_lt : 0 < p) {f : α → ℝ≥0∞}
(hf_nonzero : (∫⁻ a, f a ^ p ∂μ) ≠ 0) (hf_top : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) :
∫⁻ c, funMulInvSnorm f p μ c ^ p ∂μ = 1 := by |
simp_rw [funMulInvSnorm_rpow hp0_lt]
rw [lintegral_mul_const', ENNReal.mul_inv_cancel hf_nonzero hf_top]
rwa [inv_ne_top]
| [
" ∫⁻ (a : α), (f * g) a ∂μ ≤ 1",
" ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" (ENNR... | [
" ∫⁻ (a : α), (f * g) a ∂μ ≤ 1",
" ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" (ENNR... |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Logic.Encodable.Lattice
noncomputable section
open Filter Finset Function Encodable
open scoped Topology
variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M}
variable {G : Type*} [CommGroup G] {g g' : G}
-- don't declare [Topologic... | Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean | 62 | 65 | theorem prod_range_mul {f : ℕ → M} {k : ℕ} (h : HasProd (fun n ↦ f (n + k)) m) :
HasProd f ((∏ i ∈ range k, f i) * m) := by |
refine ((range k).hasProd f).mul_compl ?_
rwa [← (notMemRangeEquiv k).symm.hasProd_iff]
| [
" HasProd f ((∏ i ∈ range k, f i) * m)",
" HasProd (f ∘ Subtype.val) m"
] | [] |
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Data.List.Rotate
#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4"
open Function
universe u v w
namespace SimpleGraph
variable {V : Type u} {V' : Type v} {V'' : Typ... | Mathlib/Combinatorics/SimpleGraph/Connectivity.lean | 211 | 218 | theorem getVert_of_length_le {u v} (w : G.Walk u v) {i : ℕ} (hi : w.length ≤ i) :
w.getVert i = v := by |
induction w generalizing i with
| nil => rfl
| cons _ _ ih =>
cases i
· cases hi
· exact ih (Nat.succ_le_succ_iff.1 hi)
| [
" (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯",
" (p.copy ⋯ ⋯).copy ⋯ ⋯ = p.copy ⋯ ⋯",
" nil.copy hu hu = nil",
" nil.copy ⋯ ⋯ = nil",
" (cons h p).copy hu hw = cons ⋯ (p.copy ⋯ hw)",
" (cons h p).copy ⋯ ⋯ = cons ⋯ (p.copy ⋯ ⋯)",
" cons h (p.copy hv hw) = (cons ⋯ p).copy ⋯ hw",
" cons h (p.copy ⋯ ⋯) = (c... | [
" (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯",
" (p.copy ⋯ ⋯).copy ⋯ ⋯ = p.copy ⋯ ⋯",
" nil.copy hu hu = nil",
" nil.copy ⋯ ⋯ = nil",
" (cons h p).copy hu hw = cons ⋯ (p.copy ⋯ hw)",
" (cons h p).copy ⋯ ⋯ = cons ⋯ (p.copy ⋯ ⋯)",
" cons h (p.copy hv hw) = (cons ⋯ p).copy ⋯ hw",
" cons h (p.copy ⋯ ⋯) = (c... |
import Mathlib.Data.Nat.Defs
import Mathlib.Tactic.GCongr.Core
import Mathlib.Tactic.Common
import Mathlib.Tactic.Monotonicity.Attr
#align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
namespace Nat
def factorial : ℕ → ℕ
| 0 => 1
| succ n => s... | Mathlib/Data/Nat/Factorial/Basic.lean | 150 | 155 | theorem add_factorial_succ_lt_factorial_add_succ {i : ℕ} (n : ℕ) (hi : 2 ≤ i) :
i + (n + 1)! < (i + n + 1)! := by |
rw [factorial_succ (i + _), Nat.add_mul, Nat.one_mul]
have := (i + n).self_le_factorial
refine Nat.add_lt_add_of_lt_of_le (Nat.lt_of_le_of_lt ?_ ((Nat.lt_mul_iff_one_lt_right ?_).2 ?_))
(factorial_le ?_) <;> omega
| [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... | [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... |
import Mathlib.Analysis.Calculus.Deriv.AffineMap
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Comp
import Mathlib.Analysis.Calculus.LocalExtr.Rolle
import Mathlib.Analysis.Convex.Normed
import Mathlib.Analysis.RCLike.Basic
#align_import... | Mathlib/Analysis/Calculus/MeanValue.lean | 156 | 175 | theorem image_le_of_liminf_slope_right_le_deriv_boundary {f : ℝ → ℝ} {a b : ℝ}
(hf : ContinuousOn f (Icc a b)) {B B' : ℝ → ℝ} (ha : f a ≤ B a) (hB : ContinuousOn B (Icc a b))
(hB' : ∀ x ∈ Ico a b, HasDerivWithinAt B (B' x) (Ici x) x)
-- `bound` actually says `liminf (f z - f x) / (z - x) ≤ B' x`
(bound ... |
have Hr : ∀ x ∈ Icc a b, ∀ r > 0, f x ≤ B x + r * (x - a) := fun x hx r hr => by
apply image_le_of_liminf_slope_right_lt_deriv_boundary' hf bound
· rwa [sub_self, mul_zero, add_zero]
· exact hB.add (continuousOn_const.mul (continuousOn_id.sub continuousOn_const))
· intro x hx
exact (hB' x hx).a... | [
" ∀ ⦃x : ℝ⦄, x ∈ Icc a b → f x ≤ B x",
" Icc a b ⊆ {x | f x ≤ B x}",
" IsClosed s",
" IsClosed (Icc a b ∩ {x | f x ≤ B x})",
" ∀ x ∈ {x | f x ≤ B x} ∩ Ico a b, ∀ y ∈ Ioi x, ({x | f x ≤ B x} ∩ Ioc x y).Nonempty",
" ({x | f x ≤ B x} ∩ Ioc x y).Nonempty",
" {x | f x ≤ B x} ∈ 𝓝[>] x",
" z ∈ {x | f x ≤ B ... | [
" ∀ ⦃x : ℝ⦄, x ∈ Icc a b → f x ≤ B x",
" Icc a b ⊆ {x | f x ≤ B x}",
" IsClosed s",
" IsClosed (Icc a b ∩ {x | f x ≤ B x})",
" ∀ x ∈ {x | f x ≤ B x} ∩ Ico a b, ∀ y ∈ Ioi x, ({x | f x ≤ B x} ∩ Ioc x y).Nonempty",
" ({x | f x ≤ B x} ∩ Ioc x y).Nonempty",
" {x | f x ≤ B x} ∈ 𝓝[>] x",
" z ∈ {x | f x ≤ B ... |
import Mathlib.Data.PFunctor.Multivariate.Basic
#align_import data.qpf.multivariate.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u
open MvFunctor
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) [MvFunctor F] where
P : MvPFunctor.{u} n
abs : ∀ {α}, P α → F α
... | Mathlib/Data/QPF/Multivariate/Basic.lean | 126 | 138 | theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) := by |
constructor
· rintro ⟨y, hy⟩
cases' h : repr y with a f
use a, fun i j => (f i j).val
constructor
· rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
intro i j
apply (f i j).property
rintro ⟨a, f, h₀, h₁⟩
use abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩
rw [← abs_map, h₀]; rfl
| [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... | [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v... | Mathlib/Data/Set/NAry.lean | 72 | 73 | theorem image2_subset_iff_right : image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u := by |
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage, @forall₂_swap α]
| [
" f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t",
" a ∈ s ∧ b ∈ t",
" a' ∈ s ∧ b' ∈ t",
" image2 f s t ⊆ image2 f s' t'",
" f a b ∈ image2 f s' t'",
" image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u",
" image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u"
] | [
" f a b ∈ image2 f s t → a ∈ s ∧ b ∈ t",
" a ∈ s ∧ b ∈ t",
" a' ∈ s ∧ b' ∈ t",
" image2 f s t ⊆ image2 f s' t'",
" f a b ∈ image2 f s' t'",
" image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u"
] |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.BigOperators
import Mathlib.LinearAlgebra.Isomorphisms
import Mathlib.GroupTheory.Torsion
import Mathlib.RingTheory.Coprime.Ideal
import Mathlib.RingTheory.Finiteness
import Mathlib.Data.Set.Lattice
#align_import algebra.module.torsion from "leanpr... | Mathlib/Algebra/Module/Torsion.lean | 110 | 123 | theorem CompleteLattice.Independent.linear_independent' {ι R M : Type*} {v : ι → M} [Ring R]
[AddCommGroup M] [Module R M] (hv : CompleteLattice.Independent fun i => R ∙ v i)
(h_ne_zero : ∀ i, Ideal.torsionOf R M (v i) = ⊥) : LinearIndependent R v := by |
refine linearIndependent_iff_not_smul_mem_span.mpr fun i r hi => ?_
replace hv := CompleteLattice.independent_def.mp hv i
simp only [iSup_subtype', ← Submodule.span_range_eq_iSup (ι := Subtype _), disjoint_iff] at hv
have : r • v i ∈ (⊥ : Submodule R M) := by
rw [← hv, Submodule.mem_inf]
refine ⟨Submod... | [
" torsionOf R M 0 = ⊤",
" torsionOf R M m = ⊤ ↔ m = 0",
" torsionOf R M m = ⊤",
" m = 0",
" 1 ∈ ⊤",
" torsionOf R M m = ⊥ ↔ m ≠ 0",
" False",
" r = 0",
" LinearIndependent R v",
" r • v i ∈ ⊥",
" r • v i ∈ Submodule.span R {v i} ∧ r • v i ∈ Submodule.span R (Set.range fun i_1 => v ↑i_1)",
" r ... | [
" torsionOf R M 0 = ⊤",
" torsionOf R M m = ⊤ ↔ m = 0",
" torsionOf R M m = ⊤",
" m = 0",
" 1 ∈ ⊤",
" torsionOf R M m = ⊥ ↔ m ≠ 0",
" False",
" r = 0"
] |
import Mathlib.MeasureTheory.Group.GeometryOfNumbers
import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean | 188 | 194 | theorem convexBodyLT'_neg_mem (x : E K) (hx : x ∈ convexBodyLT' K f w₀) :
-x ∈ convexBodyLT' K f w₀ := by |
simp [Set.mem_prod, Prod.fst_neg, Set.mem_pi, Set.mem_univ, Pi.neg_apply,
mem_ball_zero_iff, norm_neg, Real.norm_eq_abs, forall_true_left, Subtype.forall,
Prod.snd_neg, Complex.norm_eq_abs] at hx ⊢
convert hx using 3
split_ifs <;> simp
| [
" (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2",
" ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀... | [
" (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2",
" ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
#align_import linear_algebra.exterior_algebra.of_alternating from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
variable {R M N N' : Type*}
variable [CommRing R] [AddCommGroup M] [AddCo... | Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean | 68 | 76 | theorem liftAlternating_ι (f : ∀ i, M [⋀^Fin i]→ₗ[R] N) (m : M) :
liftAlternating (R := R) (M := M) (N := N) f (ι R m) = f 1 ![m] := by |
dsimp [liftAlternating]
rw [foldl_ι, LinearMap.mk₂_apply, AlternatingMap.curryLeft_apply_apply]
congr
-- Porting note: In Lean 3, `congr` could use the `[Subsingleton (Fin 0 → M)]` instance to finish
-- the proof. Here, the instance can be synthesized but `congr` does not use it so the following
-- line is... | [
" Module R (M [⋀^ι]→ₗ[R] N)",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] N",
" M [⋀^Fin 0]→ₗ[R] N ≃ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] (i : ℕ) → M [⋀^Fin i]→ₗ[R] N",
" M →ₗ[R] ((i : ℕ) → M [⋀^Fin i]→ₗ[R]... | [
" Module R (M [⋀^ι]→ₗ[R] N)",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] N",
" M [⋀^Fin 0]→ₗ[R] N ≃ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] (i : ℕ) → M [⋀^Fin i]→ₗ[R] N",
" M →ₗ[R] ((i : ℕ) → M [⋀^Fin i]→ₗ[R]... |
import Mathlib.Order.Filter.Lift
import Mathlib.Order.Filter.AtTopBot
#align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Filter
open Filter Set
variable {α β : Type*} {ι : Sort*}
namespace Filter
variable {l l' la : Filter α} {lb : Filter ... | Mathlib/Order/Filter/SmallSets.lean | 47 | 51 | theorem bind_smallSets_gc :
GaloisConnection (fun L : Filter (Set α) ↦ L.bind principal) smallSets := by |
intro L l
simp_rw [smallSets_eq_generate, le_generate_iff, image_subset_iff]
rfl
| [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = ⨅ b ∈ f.sets, 𝓟 (𝒫 b)",
" GaloisConnection (fun L => L.bind 𝓟) smallSets",
" (fun L => L.bind 𝓟) L ≤ l ↔ L ≤ l.smallSets",
" L.bind 𝓟 ≤ l ↔ l.sets ⊆ powerset ⁻¹' L.sets"
] | [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = ⨅ b ∈ f.sets, 𝓟 (𝒫 b)"
] |
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 | 110 | 112 | theorem Filter.Tendsto.mul_atBot {C : 𝕜} (hC : 0 < C) (hf : Tendsto f l (𝓝 C))
(hg : Tendsto g l atBot) : Tendsto (fun x => f x * g x) l atBot := by |
simpa only [mul_comm] using hg.atBot_mul 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.Analysis.Analytic.Basic
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.Normed.Field.InfiniteSum
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Topology.Algebra.Algebra
#align_import analysis.normed_space.exponential from "leanprover-community/ma... | Mathlib/Analysis/NormedSpace/Exponential.lean | 119 | 120 | theorem expSeries_apply_eq (x : 𝔸) (n : ℕ) :
(expSeries 𝕂 𝔸 n fun _ => x) = (n !⁻¹ : 𝕂) • x ^ n := by | simp [expSeries]
| [
" ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n"
] | [] |
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Order.Filter.Cofinite
#align_import number_theory.fermat_psp from "leanprover-community/mathlib"@"c0439b4877c24a117bfdd9e32faf62eee9b115eb"
namespace Nat
def ProbablePrime (n b : ℕ) : Prop :=
n ∣ b ^ (n - 1) - 1
#align fermat_psp.probable_prime Nat.Probabl... | Mathlib/NumberTheory/FermatPsp.lean | 120 | 122 | theorem coprime_of_fermatPsp {n b : ℕ} (h : FermatPsp n b) (h₁ : 1 ≤ b) : Nat.Coprime n b := by |
rcases h with ⟨hp, _, hn₂⟩
exact coprime_of_probablePrime hp (by omega) h₁
| [
" n.Coprime b",
" ∀ (k : ℕ), k.Prime → k ∣ n → ¬k ∣ b",
" False",
" k ∣ 1",
" k ∣ (k * j) ^ (k * m - 1)",
" k * m - 1 ≠ 0",
" n = 1",
" Coprime 1 b",
" n.ProbablePrime b ↔ b ^ (n - 1) ≡ 1 [MOD n]",
" n.ProbablePrime b ↔ 1 ≡ b ^ (n - 1) [MOD n]",
" n.ProbablePrime b → 1 ≡ b ^ (n - 1) [MOD n]",
... | [
" n.Coprime b",
" ∀ (k : ℕ), k.Prime → k ∣ n → ¬k ∣ b",
" False",
" k ∣ 1",
" k ∣ (k * j) ^ (k * m - 1)",
" k * m - 1 ≠ 0",
" n = 1",
" Coprime 1 b",
" n.ProbablePrime b ↔ b ^ (n - 1) ≡ 1 [MOD n]",
" n.ProbablePrime b ↔ 1 ≡ b ^ (n - 1) [MOD n]",
" n.ProbablePrime b → 1 ≡ b ^ (n - 1) [MOD n]",
... |
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Integral.CircleIntegral
#align_import measure_theory.integral.torus_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
variable {n : ℕ}
variable {E : Type*} [NormedAddCommGroup E]
noncomputa... | Mathlib/MeasureTheory/Integral/TorusIntegral.lean | 113 | 114 | theorem torusIntegrable_const (a : E) (c : ℂⁿ) (R : ℝⁿ) : TorusIntegrable (fun _ => a) c R := by |
simp [TorusIntegrable, measure_Icc_lt_top]
| [
" torusMap c R θ - c = torusMap 0 R θ",
" (torusMap c R θ - c) i = torusMap 0 R θ i",
" torusMap c R θ = c ↔ R = 0",
" TorusIntegrable (fun x => a) c R"
] | [
" torusMap c R θ - c = torusMap 0 R θ",
" (torusMap c R θ - c) i = torusMap 0 R θ i",
" torusMap c R θ = c ↔ R = 0"
] |
import Mathlib.Geometry.RingedSpace.PresheafedSpace
import Mathlib.CategoryTheory.Limits.Final
import Mathlib.Topology.Sheaves.Stalks
#align_import algebraic_geometry.stalks from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
noncomputable section
universe v u v' u'
open Opposite Cate... | Mathlib/Geometry/RingedSpace/Stalks.lean | 99 | 104 | theorem restrictStalkIso_inv_eq_germ {U : TopCat} (X : PresheafedSpace.{_, _, v} C)
{f : U ⟶ (X : TopCat.{v})} (h : OpenEmbedding f) (V : Opens U) (x : U) (hx : x ∈ V) :
X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ ≫
(restrictStalkIso X h x).inv =
(X.restrict h).pr... |
rw [← restrictStalkIso_hom_eq_germ, Category.assoc, Iso.hom_inv_id, Category.comp_id]
| [
" Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ stalkMap α ↑x = α.c.app { unop := U } ≫ X.presheaf.germ x",
" X.presheaf.germ ⟨f x, ⋯⟩ ≫ (X.restrictStalkIso h x).inv = (X.restrict h).presheaf.germ ⟨x, hx⟩"
] | [
" Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ stalkMap α ↑x = α.c.app { unop := U } ≫ X.presheaf.germ x"
] |
import Batteries.Data.UnionFind.Basic
namespace Batteries.UnionFind
@[simp] theorem arr_empty : empty.arr = #[] := rfl
@[simp] theorem parent_empty : empty.parent a = a := rfl
@[simp] theorem rank_empty : empty.rank a = 0 := rfl
@[simp] theorem rootD_empty : empty.rootD a = a := rfl
@[simp] theorem arr_push {m : Un... | .lake/packages/batteries/Batteries/Data/UnionFind/Lemmas.lean | 113 | 113 | theorem equiv_find : Equiv (self.find x).1 a b ↔ Equiv self a b := by | simp [Equiv, find_root_1]
| [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... | [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ :=
(Equiv.refl ℤ).prodCongr (Equiv.addRig... | Mathlib/SetTheory/Game/Domineering.lean | 86 | 90 | theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :
(m.1, m.2 - 1) ∈ b.erase m := by |
rw [mem_left] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.snd (pred_ne_self m.2)
| [
" (m.1 - 1, m.2) ∈ Finset.erase b m",
" (m.1 - 1, m.2) ≠ m",
" (m.1, m.2 - 1) ∈ Finset.erase b m",
" (m.1, m.2 - 1) ≠ m"
] | [
" (m.1 - 1, m.2) ∈ Finset.erase b m",
" (m.1 - 1, m.2) ≠ m"
] |
import Mathlib.Analysis.InnerProductSpace.Orthogonal
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Set
open scoped RealInnerProductSpace
variable {V P : Type*} [NormedAddCommGroup V] [InnerP... | Mathlib/Geometry/Euclidean/PerpBisector.lean | 80 | 84 | theorem mem_perpBisector_iff_inner_eq_inner :
c ∈ perpBisector p₁ p₂ ↔ ⟪c -ᵥ p₁, p₂ -ᵥ p₁⟫ = ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫ := by |
rw [Iff.comm, mem_perpBisector_iff_inner_eq_zero, ← add_neg_eq_zero, ← inner_neg_right,
neg_vsub_eq_vsub_rev, ← inner_add_left, vsub_midpoint, invOf_eq_inv, ← smul_add,
real_inner_smul_left]; simp
| [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... | [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 43 | 44 | theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by |
rw [← not_exists, not_iff_not, cos_eq_zero_iff]
| [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... | [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
#align_import linear_algebra.clifford_algebra.fold from "leanprover-community/mathlib"@"446eb51ce0a90f8385f260d2b52e760e2004246b"
universe u1 u2 u3
variable {R M N : Type*}
variable [CommRing R] [AddCommGroup M] [AddCommGroup N]
variable [Module R M] [Modu... | Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean | 77 | 81 | theorem foldr_prod_map_ι (l : List M) (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) :
foldr Q f hf n (l.map <| ι Q).prod = List.foldr (fun m n => f m n) n l := by |
induction' l with hd tl ih
· rw [List.map_nil, List.prod_nil, List.foldr_nil, foldr_one]
· rw [List.map_cons, List.prod_cons, List.foldr_cons, foldr_mul, foldr_ι, ih]
| [
" ((foldr Q f hf) n) (List.map (⇑(ι Q)) l).prod = List.foldr (fun m n => (f m) n) n l",
" ((foldr Q f hf) n) (List.map ⇑(ι Q) []).prod = List.foldr (fun m n => (f m) n) n []",
" ((foldr Q f hf) n) (List.map (⇑(ι Q)) (hd :: tl)).prod = List.foldr (fun m n => (f m) n) n (hd :: tl)"
] | [] |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 104 | 106 | theorem mul_self_num (q : ℚ) : (q * q).num = q.num * q.num := by |
rw [mul_num, Int.natAbs_mul, Nat.Coprime.gcd_eq_one, Int.ofNat_one, Int.ediv_one]
exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.Algebra.Order.Field.Power
import Mathlib.Data.Int.LeastGreatest
import Mathlib.Data.Rat.Floor
import Mathlib.Data.NNRat.Defs
#align_import algebra.order.archimedean from "leanprover-community/mathlib"@"6f413f3f7330b94c92a5a27488fdc74e6d483a78"
open Int Set
variable {α : Type*}
class Archimedean (... | Mathlib/Algebra/Order/Archimedean.lean | 138 | 148 | theorem add_one_pow_unbounded_of_pos (x : α) (hy : 0 < y) : ∃ n : ℕ, x < (y + 1) ^ n :=
have : 0 ≤ 1 + y := add_nonneg zero_le_one hy.le
(Archimedean.arch x hy).imp fun n h ↦
calc
x ≤ n • y := h
_ = n * y := nsmul_eq_mul _ _
_ < 1 + n * y := lt_one_add _
_ ≤ (1 + y) ^ n :=
one_ad... | rw [add_comm]
| [
" x ≤ n • y",
" ∃ n, x ≤ ↑n",
" x ≤ ↑n",
" x < ↑n",
" (1 + y) ^ n = (y + 1) ^ n"
] | [
" x ≤ n • y",
" ∃ n, x ≤ ↑n",
" x ≤ ↑n",
" x < ↑n"
] |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Analysis.Convex.Hull
import Mathlib.LinearAlgebra.AffineSpace.Basis
#align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set Function
open scoped Classical
open Pointwise
... | Mathlib/Analysis/Convex/Combination.lean | 93 | 100 | theorem Finset.centerMass_segment' (s : Finset ι) (t : Finset ι') (ws : ι → R) (zs : ι → E)
(wt : ι' → R) (zt : ι' → E) (hws : ∑ i ∈ s, ws i = 1) (hwt : ∑ i ∈ t, wt i = 1) (a b : R)
(hab : a + b = 1) : a • s.centerMass ws zs + b • t.centerMass wt zt = (s.disjSum t).centerMass
(Sum.elim (fun i => a * ws i) f... |
rw [s.centerMass_eq_of_sum_1 _ hws, t.centerMass_eq_of_sum_1 _ hwt, smul_sum, smul_sum, ←
Finset.sum_sum_elim, Finset.centerMass_eq_of_sum_1]
· congr with ⟨⟩ <;> simp only [Sum.elim_inl, Sum.elim_inr, mul_smul]
· rw [sum_sum_elim, ← mul_sum, ← mul_sum, hws, hwt, mul_one, mul_one, hab]
| [
" ∅.centerMass w z = 0",
" {i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j",
" (insert i t).centerMass w z =\n (w i / (w i + ∑ j ∈ t, w j)) • z i + ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z",
" (w i / (w i + ∑ i ∈ t, w i)) • z i + (w i + ∑ i ∈ t, w i)⁻¹ • ∑ i ... | [
" ∅.centerMass w z = 0",
" {i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j",
" (insert i t).centerMass w z =\n (w i / (w i + ∑ j ∈ t, w j)) • z i + ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z",
" (w i / (w i + ∑ i ∈ t, w i)) • z i + (w i + ∑ i ∈ t, w i)⁻¹ • ∑ i ... |
import Mathlib.Algebra.Group.Defs
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
universe u
variable {α : Type u}
class Invertible [Mul α] [One α] (a : α) : Type u where
invOf... | Mathlib/Algebra/Group/Invertible/Defs.lean | 144 | 145 | theorem mul_mul_invOf_self_cancel [Monoid α] (a b : α) [Invertible b] : a * b * ⅟ b = a := by |
simp [mul_assoc]
| [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a",
" a * b * ⅟b = a"
] | [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a",
" a * b * ⅟b = a"
] |
import Mathlib.Analysis.Convolution
import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd
import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup
import Mathlib.Analysis.Analytic.IsolatedZeros
import Mathlib.Analysis.Complex.CauchyIntegral
#align_import analysis.special_functions.gamma.beta from "l... | Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean | 105 | 111 | theorem betaIntegral_eval_one_right {u : ℂ} (hu : 0 < re u) : betaIntegral u 1 = 1 / u := by |
simp_rw [betaIntegral, sub_self, cpow_zero, mul_one]
rw [integral_cpow (Or.inl _)]
· rw [ofReal_zero, ofReal_one, one_cpow, zero_cpow, sub_zero, sub_add_cancel]
rw [sub_add_cancel]
contrapose! hu; rw [hu, zero_re]
· rwa [sub_re, one_re, ← sub_pos, sub_neg_eq_add, sub_add_cancel]
| [
" IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 (1 / 2)",
" IntervalIntegrable (fun x => ↑x ^ (u - 1)) volume 0 (1 / 2)",
" -1 < (u - 1).re",
" ContinuousOn (fun x => (1 - ↑x) ^ (v - 1)) (uIcc 0 (1 / 2))",
" ∀ x ∈ uIcc 0 (1 / 2), ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x",
" ... | [
" IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 (1 / 2)",
" IntervalIntegrable (fun x => ↑x ^ (u - 1)) volume 0 (1 / 2)",
" -1 < (u - 1).re",
" ContinuousOn (fun x => (1 - ↑x) ^ (v - 1)) (uIcc 0 (1 / 2))",
" ∀ x ∈ uIcc 0 (1 / 2), ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x",
" ... |
import Aesop
import Mathlib.Algebra.Group.Defs
import Mathlib.Data.Nat.Defs
import Mathlib.Data.Int.Defs
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.Cases
import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.SplitIfs
#align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a... | Mathlib/Algebra/Group/Basic.lean | 479 | 479 | theorem div_eq_mul_one_div (a b : G) : a / b = a * (1 / b) := by | rw [div_eq_mul_inv, one_div]
| [
" x⁻¹ = 1 / x",
" x * (1 / y) = x / y",
" a * b / c = a * (b / c)",
" a * (b / c) = a * b / c",
" a / b = a * (1 / b)"
] | [
" x⁻¹ = 1 / x",
" x * (1 / y) = x / y",
" a * b / c = a * (b / c)",
" a * (b / c) = a * b / c"
] |
import Mathlib.Topology.MetricSpace.PiNat
#align_import topology.metric_space.cantor_scheme from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
namespace CantorScheme
open List Function Filter Set PiNat
open scoped Classical
open Topology
variable {β α : Type*} (A : List β → Set α)
... | Mathlib/Topology/MetricSpace/CantorScheme.lean | 131 | 144 | theorem VanishingDiam.dist_lt (hA : VanishingDiam A) (ε : ℝ) (ε_pos : 0 < ε) (x : ℕ → β) :
∃ n : ℕ, ∀ (y) (_ : y ∈ A (res x n)) (z) (_ : z ∈ A (res x n)), dist y z < ε := by |
specialize hA x
rw [ENNReal.tendsto_atTop_zero] at hA
cases' hA (ENNReal.ofReal (ε / 2)) (by
simp only [gt_iff_lt, ENNReal.ofReal_pos]
linarith) with n hn
use n
intro y hy z hz
rw [← ENNReal.ofReal_lt_ofReal_iff ε_pos, ← edist_dist]
apply lt_of_le_of_lt (EMetric.edist_le_diam_of_mem hy hz)
appl... | [
" ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε",
" ENNReal.ofReal (ε / 2) > 0",
" 0 < ε / 2",
" ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε",
" dist y z < ε",
" edist y z < ENNReal.ofReal ε",
" EMetric.diam (A (res x n)) < ENNReal.ofReal ε",
" ENNReal.ofReal (ε / 2) < ENNReal.ofReal ... | [] |
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Data.Set.UnionLift
#align_import algebra.algebra.subalgebra.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca"
namespace Subalgebra
open Algebra
variable {R A B : Type*} [CommSemiring R] [Semiring A] [Algebra R A] [... | Mathlib/Algebra/Algebra/Subalgebra/Directed.lean | 90 | 93 | theorem iSupLift_mk {i : ι} (x : K i) (hx : (x : A) ∈ T) :
iSupLift K dir f hf T hT ⟨x, hx⟩ = f i x := by |
dsimp [iSupLift, inclusion]
rw [Set.iUnionLift_mk]
| [
" (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩",
" (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩",
" ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩",
" ↑T ⊆ ⋃ i, ↑(K i)",
" Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1",
" ∀ (i : ι), ↑1 = ↑1",
"... | [
" (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩",
" (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩",
" ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩",
" ↑T ⊆ ⋃ i, ↑(K i)",
" Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1",
" ∀ (i : ι), ↑1 = ↑1",
"... |
import Mathlib.Data.PFunctor.Multivariate.Basic
#align_import data.qpf.multivariate.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u
open MvFunctor
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) [MvFunctor F] where
P : MvPFunctor.{u} n
abs : ∀ {α}, P α → F α
... | Mathlib/Data/QPF/Multivariate/Basic.lean | 180 | 181 | theorem supp_eq {α : TypeVec n} {i} (x : F α) :
supp x i = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ } := by | ext; apply mem_supp
| [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... | [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... |
import Mathlib.CategoryTheory.Monad.Types
import Mathlib.CategoryTheory.Monad.Limits
import Mathlib.CategoryTheory.Equivalence
import Mathlib.Topology.Category.CompHaus.Basic
import Mathlib.Topology.Category.Profinite.Basic
import Mathlib.Data.Set.Constructions
#align_import topology.category.Compactum from "leanprov... | Mathlib/Topology/Category/Compactum.lean | 150 | 154 | theorem str_hom_commute (X Y : Compactum) (f : X ⟶ Y) (xs : Ultrafilter X) :
f (X.str xs) = Y.str (map f xs) := by |
change (X.a ≫ f.f) _ = _
rw [← f.h]
rfl
| [
" X.str (X.incl x) = x",
" (β.η.app X.A ≫ X.a) x = x",
" 𝟙 X.A x = x",
" f.f (X.str xs) = Y.str (Ultrafilter.map f.f xs)",
" (X.a ≫ f.f) xs = Y.str (Ultrafilter.map f.f xs)",
" (β.map f.f ≫ Y.a) xs = Y.str (Ultrafilter.map f.f xs)"
] | [
" X.str (X.incl x) = x",
" (β.η.app X.A ≫ X.a) x = x",
" 𝟙 X.A x = x"
] |
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
import Mathlib.Analysis.NormedSpace.Pointwise
#align_import analysis.normed_space.is_R_or_C from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric
variable {𝕜 : Type*} [RCLike 𝕜] {E :... | Mathlib/Analysis/NormedSpace/RCLike.lean | 55 | 75 | theorem LinearMap.bound_of_sphere_bound {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : E →ₗ[𝕜] 𝕜)
(h : ∀ z ∈ sphere (0 : E) r, ‖f z‖ ≤ c) (z : E) : ‖f z‖ ≤ c / r * ‖z‖ := by |
by_cases z_zero : z = 0
· rw [z_zero]
simp only [LinearMap.map_zero, norm_zero, mul_zero]
exact le_rfl
set z₁ := ((r : 𝕜) * (‖z‖ : 𝕜)⁻¹) • z with hz₁
have norm_f_z₁ : ‖f z₁‖ ≤ c := by
apply h
rw [mem_sphere_zero_iff_norm]
exact norm_smul_inv_norm' r_pos.le z_zero
have r_ne_zero : (r : �... | [
" ‖↑‖z‖‖ = ‖z‖",
" ‖(↑‖x‖)⁻¹ • x‖ = 1",
" ‖x‖ ≠ 0",
" ‖(↑r * (↑‖x‖)⁻¹) • x‖ = r",
" ‖f z‖ ≤ c / r * ‖z‖",
" ‖f 0‖ ≤ c / r * ‖0‖",
" 0 ≤ 0",
" ‖f z₁‖ ≤ c",
" z₁ ∈ sphere 0 r",
" ‖z₁‖ = r",
" f z = ↑‖z‖ / ↑r * f z₁",
" f z = ↑‖z‖ / ↑r * (↑r * (↑‖z‖)⁻¹ * f z)",
" ↑‖z‖ ≠ 0",
" ‖f z₁‖ * ‖z‖ / r... | [
" ‖↑‖z‖‖ = ‖z‖",
" ‖(↑‖x‖)⁻¹ • x‖ = 1",
" ‖x‖ ≠ 0",
" ‖(↑r * (↑‖x‖)⁻¹) • x‖ = r"
] |
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.RingTheory.Ideal.Operations
#align_import ring_theory.coprime.ideal from "leanprover-community/mathlib"@"2bbc7e3884ba234309d2a43b19144105a753292e"
namespace Ideal
variable {ι R : Type*} [CommSemiring R]
| Mathlib/RingTheory/Coprime/Ideal.lean | 31 | 112 | theorem iSup_iInf_eq_top_iff_pairwise {t : Finset ι} (h : t.Nonempty) (I : ι → Ideal R) :
(⨆ i ∈ t, ⨅ (j) (_ : j ∈ t) (_ : j ≠ i), I j) = ⊤ ↔
(t : Set ι).Pairwise fun i j => I i ⊔ I j = ⊤ := by |
haveI : DecidableEq ι := Classical.decEq ι
rw [eq_top_iff_one, Submodule.mem_iSup_finset_iff_exists_sum]
refine h.cons_induction ?_ ?_ <;> clear t h
· simp only [Finset.sum_singleton, Finset.coe_singleton, Set.pairwise_singleton, iff_true_iff]
refine fun a => ⟨fun i => if h : i = a then ⟨1, ?_⟩ else 0, ?_⟩... | [
" ⨆ i ∈ t, ⨅ j ∈ t, ⨅ (_ : j ≠ i), I j = ⊤ ↔ (↑t).Pairwise fun i j => I i ⊔ I j = ⊤",
" (∃ μ, ∑ i ∈ t, ↑(μ i) = 1) ↔ (↑t).Pairwise fun i j => I i ⊔ I j = ⊤",
" ∀ (a : ι), (∃ μ, ∑ i ∈ {a}, ↑(μ i) = 1) ↔ (↑{a}).Pairwise fun i j => I i ⊔ I j = ⊤",
" ∀ (a : ι) (s : Finset ι) (h : a ∉ s),\n s.Nonempty →\n ... | [] |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Data.List.Cycle
import Mathlib.Data.Nat.Prime
import Mathlib.Data.PNat.Basic
import Mathlib.Dynamics.FixedPoints.Basic
import Mathlib.GroupTheory.GroupAction.Group
#align_import dynamics.periodic_pts from "leanp... | Mathlib/Dynamics/PeriodicPts.lean | 162 | 163 | theorem iterate_mod_apply (h : IsPeriodicPt f n x) (m : ℕ) : f^[m % n] x = f^[m] x := by |
conv_rhs => rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
| [
" IsPeriodicPt f (n + m) x",
" IsFixedPt (f^[n] ∘ f^[m]) x",
" IsPeriodicPt f n x",
" IsPeriodicPt f m x",
" IsPeriodicPt f (m - n) x",
" IsPeriodicPt f (m - n + n) x",
" IsPeriodicPt f 0 x",
" IsPeriodicPt f (m * n) x",
" IsPeriodicPt f (n * m) x",
" IsPeriodicPt f^[m] n x",
" IsFixedPt f^[n]^[... | [
" IsPeriodicPt f (n + m) x",
" IsFixedPt (f^[n] ∘ f^[m]) x",
" IsPeriodicPt f n x",
" IsPeriodicPt f m x",
" IsPeriodicPt f (m - n) x",
" IsPeriodicPt f (m - n + n) x",
" IsPeriodicPt f 0 x",
" IsPeriodicPt f (m * n) x",
" IsPeriodicPt f (n * m) x",
" IsPeriodicPt f^[m] n x",
" IsFixedPt f^[n]^[... |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {α β : Type*} [Fintype α] [DecidableEq β] (e : Equiv.Perm α) (f : α ↪ β)
... | Mathlib/Logic/Equiv/Fintype.lean | 78 | 82 | theorem Equiv.Perm.viaFintypeEmbedding_apply_mem_range {b : β} (h : b ∈ Set.range f) :
e.viaFintypeEmbedding f b = f (e (f.invOfMemRange ⟨b, h⟩)) := by |
simp only [viaFintypeEmbedding, Function.Embedding.invOfMemRange]
rw [Equiv.Perm.extendDomain_apply_subtype]
congr
| [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a",
" f.toEquivRange = Equiv.ofInjective ⇑f ⋯",
" ↑(f.toEquivRange x✝) = ↑((Equiv.ofInjective ⇑f ⋯) x✝)",
" (e.viaFintypeEmbedding f) (f a) = f (e a)",
" (e.extendDomain f... | [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a",
" f.toEquivRange = Equiv.ofInjective ⇑f ⋯",
" ↑(f.toEquivRange x✝) = ↑((Equiv.ofInjective ⇑f ⋯) x✝)",
" (e.viaFintypeEmbedding f) (f a) = f (e a)",
" (e.extendDomain f... |
import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions
noncomputable section
open scoped Manifold
open Bundle Set Topology
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [To... | Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean | 159 | 169 | theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
(h : q.1 ∈ (chartAt H p.1).target) :
tangentMap I I (chartAt H p.1).symm q =
(chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q) := by |
dsimp only [tangentMap]
rw [MDifferentiableAt.mfderiv (mdifferentiableAt_atlas_symm _ (chart_mem_atlas _ _) h)]
simp only [ContinuousLinearMap.coe_coe, TangentBundle.chartAt, h, tangentBundleCore,
mfld_simps, (· ∘ ·)]
-- `simp` fails to apply `PartialEquiv.prod_symm` with `ModelProd`
congr
exact ((char... | [
" MDifferentiableAt I I (↑e) x",
" ContinuousAt (↑e) x ∧ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)",
" DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)",
" ↑I (↑(chartAt H x) x) ∈ ↑I.symm ⁻¹' ((chartAt H x).symm ≫ₕ e).sou... | [
" MDifferentiableAt I I (↑e) x",
" ContinuousAt (↑e) x ∧ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)",
" DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)",
" ↑I (↑(chartAt H x) x) ∈ ↑I.symm ⁻¹' ((chartAt H x).symm ≫ₕ e).sou... |
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.Bounded
import Mathlib.SetTheory.Cardinal.PartENat
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.Linarith
#align_import set_theory.cardinal.ordinal from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f"
noncomputa... | Mathlib/SetTheory/Cardinal/Ordinal.lean | 204 | 207 | theorem aleph'_succ {o : Ordinal} : aleph' (succ o) = succ (aleph' o) := by |
apply (succ_le_of_lt <| aleph'_lt.2 <| lt_succ o).antisymm' (Cardinal.alephIdx_le.1 <| _)
rw [alephIdx_aleph', succ_le_iff, ← aleph'_lt, aleph'_alephIdx]
apply lt_succ
| [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" a.alephIdx ≤ b.alephIdx ↔ a ≤ b",
" False",
" ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r], (∀ (c : Cardinal.{u}), c.alephIdx < type r) → False",
" ... | [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" a.alephIdx ≤ b.alephIdx ↔ a ≤ b",
" False",
" ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r], (∀ (c : Cardinal.{u}), c.alephIdx < type r) → False",
" ... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.Algebra.FreeAlgebra
import Mathlib.RingTheory.Localization.FractionRing
#align_import algebra.char_p.algebra from "leanprover-community/mathlib"@"96782a2d6dcded92116d8ac9ae48efb41d46a27c"
| Mathlib/Algebra/CharP/Algebra.lean | 34 | 37 | theorem charP_of_injective_ringHom {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A]
{f : R →+* A} (h : Function.Injective f) (p : ℕ) [CharP R p] : CharP A p where
cast_eq_zero_iff' x := by |
rw [← CharP.cast_eq_zero_iff R p x, ← map_natCast f x, map_eq_zero_iff f h]
| [
" ↑x = 0 ↔ p ∣ x"
] | [] |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α}
open Finset
-- The namespace is here to distinguish fro... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 283 | 290 | theorem card_compression (a : α) (𝒜 : Finset (Finset α)) : (𝓓 a 𝒜).card = 𝒜.card := by |
rw [compression, card_disjUnion, filter_image,
card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), ← card_union_of_disjoint]
· conv_rhs => rw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]
· exact disjoint_filter_filter_neg 𝒜 𝒜 (fun s => (erase s a ∈ 𝒜))
intro s hs
rw [mem_coe, m... | [
" False",
" s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜",
" s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ (∃ a_1 ∈ 𝒜, a_1.erase a = s) ∧ s ∉ 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ insert a s ∈ 𝒜 ∧ s ∉ 𝒜",
" (∃ a_1 ∈ 𝒜, a_1.erase a = s) → insert a s ∈ 𝒜",
" insert a (t.erase a) ∈ 𝒜",
" s.erase a ∈ 𝓓 a 𝒜",... | [
" False",
" s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜",
" s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ (∃ a_1 ∈ 𝒜, a_1.erase a = s) ∧ s ∉ 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ insert a s ∈ 𝒜 ∧ s ∉ 𝒜",
" (∃ a_1 ∈ 𝒜, a_1.erase a = s) → insert a s ∈ 𝒜",
" insert a (t.erase a) ∈ 𝒜",
" s.erase a ∈ 𝓓 a 𝒜",... |
import Mathlib.Data.Matrix.Block
#align_import linear_algebra.matrix.symmetric from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
variable {α β n m R : Type*}
namespace Matrix
open Matrix
def IsSymm (A : Matrix n n α) : Prop :=
Aᵀ = A
#align matrix.is_symm Matrix.IsSymm
instance... | Mathlib/LinearAlgebra/Matrix/Symmetric.lean | 139 | 146 | theorem IsSymm.fromBlocks {A : Matrix m m α} {B : Matrix m n α} {C : Matrix n m α}
{D : Matrix n n α} (hA : A.IsSymm) (hBC : Bᵀ = C) (hD : D.IsSymm) :
(A.fromBlocks B C D).IsSymm := by |
have hCB : Cᵀ = B := by
rw [← hBC]
simp
unfold Matrix.IsSymm
rw [fromBlocks_transpose, hA, hCB, hBC, hD]
| [
" (A ^ k).IsSymm",
" (A.fromBlocks B C D).IsSymm",
" Cᵀ = B",
" Bᵀᵀ = B",
" (A.fromBlocks B C D)ᵀ = A.fromBlocks B C D"
] | [
" (A ^ k).IsSymm"
] |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {α : Type v} {β : Type w}
namespace Matrix
def col (w : m → α) : Matrix m Unit α :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 112 | 114 | theorem conjTranspose_row [Star α] (v : m → α) : (row v)ᴴ = col (star v) := by |
ext
rfl
| [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... | [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... |
import Mathlib.CategoryTheory.Idempotents.Basic
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
import Mathlib.CategoryTheory.Equivalence
#align_import category_theory.idempotents.karoubi from "leanprover-community/mathlib"@"200eda15d8ff5669854ff6bcc10aaf37cb70498f"
noncomputable section
open CategoryT... | Mathlib/CategoryTheory/Idempotents/Karoubi.lean | 108 | 112 | theorem hom_ext_iff {P Q : Karoubi C} {f g : P ⟶ Q} : f = g ↔ f.f = g.f := by |
constructor
· intro h
rw [h]
· apply Hom.ext
| [
" P = Q",
" { X := X✝, p := p✝, idem := idem✝ } = Q",
" { X := X✝¹, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }",
" { X := X✝, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }",
" 0 = P.p ≫ 0 ≫ Q.p",
" P.p ≫ f.f = f.f",
" f.f ≫ Q.p = f.f",
" P.p ≫ f.f = f.f ≫ Q.p",... | [
" P = Q",
" { X := X✝, p := p✝, idem := idem✝ } = Q",
" { X := X✝¹, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }",
" { X := X✝, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }",
" 0 = P.p ≫ 0 ≫ Q.p",
" P.p ≫ f.f = f.f",
" f.f ≫ Q.p = f.f",
" P.p ≫ f.f = f.f ≫ Q.p",... |
import Mathlib.AlgebraicGeometry.GammaSpecAdjunction
import Mathlib.AlgebraicGeometry.Restrict
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.RingTheory.Localization.InvSubmonoid
#align_import algebraic_geometry.AffineScheme from "leanprover-community/mathlib"@"88474d1b5af6d37c2ab728b757771bced7f5194c"... | Mathlib/AlgebraicGeometry/AffineScheme.lean | 193 | 196 | theorem topIsAffineOpen (X : Scheme) [IsAffine X] : IsAffineOpen (⊤ : Opens X) := by |
convert rangeIsAffineOpenOfOpenImmersion (𝟙 X)
ext1
exact Set.range_id.symm
| [
" IsAffine X",
" X ∈ Scheme.Spec.essImage",
" IsAffineOpen (Scheme.Hom.opensRange f)",
" Set.range ⇑f.val.base = Set.range ⇑(Y.ofRestrict ⋯).val.base",
" IsAffineOpen ⊤",
" ⊤ = Scheme.Hom.opensRange (𝟙 X)",
" ↑⊤ = ↑(Scheme.Hom.opensRange (𝟙 X))"
] | [
" IsAffine X",
" X ∈ Scheme.Spec.essImage",
" IsAffineOpen (Scheme.Hom.opensRange f)",
" Set.range ⇑f.val.base = Set.range ⇑(Y.ofRestrict ⋯).val.base"
] |
import Mathlib.SetTheory.Ordinal.Basic
import Mathlib.Data.Nat.SuccPred
#align_import set_theory.ordinal.arithmetic from "leanprover-community/mathlib"@"31b269b60935483943542d547a6dd83a66b37dc7"
assert_not_exists Field
assert_not_exists Module
noncomputable section
open Function Cardinal Set Equiv Order
open sc... | Mathlib/SetTheory/Ordinal/Arithmetic.lean | 81 | 83 | theorem lift_succ (a : Ordinal.{v}) : lift.{u} (succ a) = succ (lift.{u} a) := by |
rw [← add_one_eq_succ, lift_add, lift_one]
rfl
| [
" lift.{u, v} (succ a) = succ (lift.{u, v} a)",
" lift.{u, v} a + 1 = succ (lift.{u, v} a)"
] | [] |
import Mathlib.FieldTheory.Separable
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.Algebra.CharP.Reduced
open Function Polynomial
class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where
bijective_frobenius : Bijective <| frobenius R p
section PerfectRing
va... | Mathlib/FieldTheory/Perfect.lean | 168 | 171 | theorem not_irreducible_expand (R p) [CommSemiring R] [Fact p.Prime] [CharP R p] [PerfectRing R p]
(f : R[X]) : ¬ Irreducible (expand R p f) := by |
rw [polynomial_expand_eq]
exact not_irreducible_pow (Fact.out : p.Prime).ne_one
| [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))",
" (iterateFrobeniusEquiv R p 0) x = x",
" (iterateFrobeniusEquiv R p 1) x = x ^ p",
" ⇑(iterateFrobeniusEq... | [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))",
" (iterateFrobeniusEquiv R p 0) x = x",
" (iterateFrobeniusEquiv R p 1) x = x ^ p",
" ⇑(iterateFrobeniusEq... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finsupp.Defs
import Mathlib.Data.Finset.Pairwise
#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
variable {ι M : Type*} [DecidableEq ι]
| Mathlib/Data/Finsupp/BigOperators.lean | 39 | 45 | theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
l.sum.support ⊆ l.foldr (Finsupp.support · ⊔ ·) ∅ := by |
induction' l with hd tl IH
· simp
· simp only [List.sum_cons, Finset.union_comm]
refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH)
rfl
| [
" l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l",
" [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []",
" (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" hd.support ⊆ hd.support"
... | [] |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.List.Chain
#align_import data.bool.count from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace List
@[simp]
| Mathlib/Data/Bool/Count.lean | 24 | 29 | theorem count_not_add_count (l : List Bool) (b : Bool) : count (!b) l + count b l = length l := by |
-- Porting note: Proof re-written
-- Old proof: simp only [length_eq_countP_add_countP (Eq (!b)), Bool.not_not_eq, count]
simp only [length_eq_countP_add_countP (· == !b), count, add_right_inj]
suffices (fun x => x == b) = (fun a => decide ¬(a == !b) = true) by rw [this]
ext x; cases x <;> cases b <;> rfl
| [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... | [] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.Matrix.AbsoluteValue
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.ClassGroup
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.Ri... | Mathlib/NumberTheory/ClassNumber/Finite.lean | 76 | 86 | theorem norm_le (a : S) {y : ℤ} (hy : ∀ k, abv (bS.repr a k) ≤ y) :
abv (Algebra.norm R a) ≤ normBound abv bS * y ^ Fintype.card ι := by |
conv_lhs => rw [← bS.sum_repr a]
rw [Algebra.norm_apply, ← LinearMap.det_toMatrix bS]
simp only [Algebra.norm_apply, AlgHom.map_sum, AlgHom.map_smul, map_sum,
map_smul, Algebra.toMatrix_lmul_eq, normBound, smul_mul_assoc, ← mul_pow]
convert Matrix.det_sum_smul_le Finset.univ _ hy using 3
· rw [Finset.car... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 284 | 287 | theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
(((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) := by |
rw [← descPochhammer_map (algebraMap ℤ R), eval_map, ← eq_intCast (algebraMap ℤ R)]
simp only [algebraMap_int_eq, eq_intCast, eval₂_at_intCast, Nat.cast_id, eq_natCast, Int.cast_id]
| [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... |
import Mathlib.Data.List.Lattice
import Mathlib.Data.List.Range
import Mathlib.Data.Bool.Basic
#align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
open Nat
namespace List
def Ico (n m : ℕ) : List ℕ :=
range' n (m - n)
#align list.Ico List.Ico
names... | Mathlib/Data/List/Intervals.lean | 62 | 69 | theorem mem {n m l : ℕ} : l ∈ Ico n m ↔ n ≤ l ∧ l < m := by |
suffices n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m by simp [Ico, this]
rcases le_total n m with hnm | hmn
· rw [Nat.add_sub_cancel' hnm]
· rw [Nat.sub_eq_zero_iff_le.mpr hmn, Nat.add_zero]
exact
and_congr_right fun hnl =>
Iff.intro (fun hln => (not_le_of_gt hln hnl).elim) fun hlm => lt_of_lt_of... | [
" Ico 0 n = range n",
" (Ico n m).length = m - n",
" (range' n (m - n)).length = m - n",
" Pairwise (fun x x_1 => x < x_1) (Ico n m)",
" Pairwise (fun x x_1 => x < x_1) (range' n (m - n))",
" (Ico n m).Nodup",
" (range' n (m - n)).Nodup",
" l ∈ Ico n m ↔ n ≤ l ∧ l < m",
" n ≤ l ∧ l < n + (m - n) ↔ n... | [
" Ico 0 n = range n",
" (Ico n m).length = m - n",
" (range' n (m - n)).length = m - n",
" Pairwise (fun x x_1 => x < x_1) (Ico n m)",
" Pairwise (fun x x_1 => x < x_1) (range' n (m - n))",
" (Ico n m).Nodup",
" (range' n (m - n)).Nodup"
] |
import Mathlib.Logic.Basic
import Mathlib.Tactic.Convert
import Mathlib.Tactic.SplitIfs
#align_import logic.lemmas from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c"
protected alias ⟨HEq.eq, Eq.heq⟩ := heq_iff_eq
#align heq.eq HEq.eq
#align eq.heq Eq.heq
variable {α : Sort*} {p q r : ... | Mathlib/Logic/Lemmas.lean | 34 | 37 | theorem dite_dite_distrib_right {a : p → q → α} {b : p → ¬q → α} {c : ¬p → α} :
dite p (fun hp ↦ dite q (a hp) (b hp)) c =
dite q (fun hq ↦ dite p (fun hp ↦ a hp hq) c) fun hq ↦ dite p (fun hp ↦ b hp hq) c := by |
split_ifs <;> rfl
| [
" (dite p a fun hp => dite q (b hp) (c hp)) = if hq : q then dite p a fun hp => b hp hq else dite p a fun hp => c hp hq",
" a h✝¹ = a h✝¹",
" b h✝¹ h✝ = b h✝¹ ⋯",
" c h✝¹ h✝ = c h✝¹ ⋯",
" dite p (fun hp => dite q (a hp) (b hp)) c =\n if hq : q then dite p (fun hp => a hp hq) c else dite p (fun hp => b hp... | [
" (dite p a fun hp => dite q (b hp) (c hp)) = if hq : q then dite p a fun hp => b hp hq else dite p a fun hp => c hp hq",
" a h✝¹ = a h✝¹",
" b h✝¹ h✝ = b h✝¹ ⋯",
" c h✝¹ h✝ = c h✝¹ ⋯"
] |
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.ZMod
#align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
noncomputable section
open scoped Classical
open Nat LocalRing Padic
namespace PadicInt
variable {p : ℕ} [h... | Mathlib/NumberTheory/Padics/RingHoms.lean | 505 | 511 | theorem pow_dvd_nthHom_sub (r : R) (i j : ℕ) (h : i ≤ j) :
(p : ℤ) ^ i ∣ nthHom f r j - nthHom f r i := by |
specialize f_compat i j h
rw [← Int.natCast_pow, ← ZMod.intCast_zmod_eq_zero_iff_dvd, Int.cast_sub]
dsimp [nthHom]
rw [← f_compat, RingHom.comp_apply]
simp only [ZMod.cast_id, ZMod.castHom_apply, sub_self, ZMod.natCast_val, ZMod.intCast_cast]
| [
" nthHom f 0 = 0",
" (fun n => 0) = 0",
" ↑p ^ i ∣ nthHom f r j - nthHom f r i",
" ↑(nthHom f r j) - ↑(nthHom f r i) = 0",
" ↑↑((f j) r).val - ↑↑((f i) r).val = 0",
" ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0"
] | [
" nthHom f 0 = 0",
" (fun n => 0) = 0"
] |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : ℕ) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 27 | 27 | theorem dist_comm (n m : ℕ) : dist n m = dist m n := by | simp [dist, add_comm]
| [
" n.dist m = m.dist n"
] | [] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.NormedSpace.HomeomorphBall
#align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
noncomputable section
open RCLike Real ... | Mathlib/Analysis/InnerProductSpace/Calculus.lean | 353 | 356 | theorem contDiffAt_euclidean {n : ℕ∞} :
ContDiffAt 𝕜 n f y ↔ ∀ i, ContDiffAt 𝕜 n (fun x => f x i) y := by |
rw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffAt_iff, contDiffAt_pi]
rfl
| [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... | [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... |
import Mathlib.CategoryTheory.Functor.Hom
import Mathlib.CategoryTheory.Products.Basic
import Mathlib.Data.ULift
#align_import category_theory.yoneda from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
namespace CategoryTheory
open Opposite
universe v₁ u₁ u₂
-- morphism levels before ... | Mathlib/CategoryTheory/Yoneda.lean | 221 | 224 | theorem reprW_app_hom (X : Cᵒᵖ) (f : unop X ⟶ F.reprX) :
(F.reprW.app X).hom f = F.map f.op F.reprx := by |
simp only [yoneda_obj_obj, Iso.app_hom, op_unop, reprx, ← FunctorToTypes.naturality,
yoneda_obj_map, unop_op, Quiver.Hom.unop_op, Category.comp_id]
| [
" (F.reprW.app X).hom f = F.map f.op F.reprx"
] | [] |
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers
#align_import category_theory.limits.shapes.wide_equalizers from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace CategoryTheory.Limits
open CategoryTheo... | Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean | 218 | 219 | theorem Trident.app_zero (s : Trident f) (j : J) : s.π.app zero ≫ f j = s.π.app one := by |
rw [← s.w (line j), parallelFamily_map_left]
| [
" f ≫ 𝟙 Y✝ = f",
" Hom.id X✝ ≫ 𝟙 X✝ = Hom.id X✝",
" line a✝ ≫ 𝟙 one = line a✝",
" (f ≫ g) ≫ h = f ≫ g ≫ h",
" (Hom.id W✝ ≫ g) ≫ h = Hom.id W✝ ≫ g ≫ h",
" (line a✝ ≫ g) ≫ h = line a✝ ≫ g ≫ h",
" (Hom.id W✝ ≫ Hom.id W✝) ≫ h = Hom.id W✝ ≫ Hom.id W✝ ≫ h",
" (Hom.id zero ≫ line a✝) ≫ h = Hom.id zero ≫ l... | [
" f ≫ 𝟙 Y✝ = f",
" Hom.id X✝ ≫ 𝟙 X✝ = Hom.id X✝",
" line a✝ ≫ 𝟙 one = line a✝",
" (f ≫ g) ≫ h = f ≫ g ≫ h",
" (Hom.id W✝ ≫ g) ≫ h = Hom.id W✝ ≫ g ≫ h",
" (line a✝ ≫ g) ≫ h = line a✝ ≫ g ≫ h",
" (Hom.id W✝ ≫ Hom.id W✝) ≫ h = Hom.id W✝ ≫ Hom.id W✝ ≫ h",
" (Hom.id zero ≫ line a✝) ≫ h = Hom.id zero ≫ l... |
import Mathlib.Algebra.MvPolynomial.Basic
#align_import data.mv_polynomial.rename from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
variable {σ τ α R S : Type*} [CommSemiring R] [CommSemiring S]
namespace MvPolynomial... | Mathlib/Algebra/MvPolynomial/Rename.lean | 102 | 106 | theorem rename_eq (f : σ → τ) (p : MvPolynomial σ R) :
rename f p = Finsupp.mapDomain (Finsupp.mapDomain f) p := by |
simp only [rename, aeval_def, eval₂, Finsupp.mapDomain, algebraMap_eq, comp_apply,
X_pow_eq_monomial, ← monomial_finsupp_sum_index]
rfl
| [
" (map f) ((rename g) p) = (rename g) ((map f) p)",
" (map f) ((rename g) (C a)) = (rename g) ((map f) (C a))",
" (map f) ((rename g) (p + q)) = (rename g) ((map f) (p + q))",
" (map f) ((rename g) (p * X n)) = (rename g) ((map f) (p * X n))",
" (rename g) (eval₂ C (X ∘ f) p) = (rename (g ∘ f)) p",
" (eva... | [
" (map f) ((rename g) p) = (rename g) ((map f) p)",
" (map f) ((rename g) (C a)) = (rename g) ((map f) (C a))",
" (map f) ((rename g) (p + q)) = (rename g) ((map f) (p + q))",
" (map f) ((rename g) (p * X n)) = (rename g) ((map f) (p * X n))",
" (rename g) (eval₂ C (X ∘ f) p) = (rename (g ∘ f)) p",
" (eva... |
import Mathlib.CategoryTheory.Preadditive.Injective
import Mathlib.Algebra.Category.ModuleCat.EpiMono
import Mathlib.RingTheory.Ideal.Basic
import Mathlib.LinearAlgebra.LinearPMap
import Mathlib.Logic.Equiv.TransferInstance
#align_import algebra.module.injective from "leanprover-community/mathlib"@"f8d8465c3c392a93b9... | Mathlib/Algebra/Module/Injective.lean | 112 | 119 | theorem ExtensionOf.ext {a b : ExtensionOf i f} (domain_eq : a.domain = b.domain)
(to_fun_eq :
∀ ⦃x : a.domain⦄ ⦃y : b.domain⦄, (x : N) = y → a.toLinearPMap x = b.toLinearPMap y) :
a = b := by |
rcases a with ⟨a, a_le, e1⟩
rcases b with ⟨b, b_le, e2⟩
congr
exact LinearPMap.ext domain_eq to_fun_eq
| [
" ∃ h, ∀ (x : X), h (f x) = g x",
" ∃ h, ∀ (x : X), h (f x) = (CategoryTheory.CategoryStruct.comp (ModuleCat.ofHom f) l) x",
" a = b",
" { toLinearPMap := a, le := a_le, is_extension := e1 } = b",
" { toLinearPMap := a, le := a_le, is_extension := e1 } = { toLinearPMap := b, le := b_le, is_extension := e2 }... | [
" ∃ h, ∀ (x : X), h (f x) = g x",
" ∃ h, ∀ (x : X), h (f x) = (CategoryTheory.CategoryStruct.comp (ModuleCat.ofHom f) l) x"
] |
import Mathlib.CategoryTheory.Filtered.Connected
import Mathlib.CategoryTheory.Limits.TypesFiltered
import Mathlib.CategoryTheory.Limits.Final
universe v₁ v₂ u₁ u₂
namespace CategoryTheory
open CategoryTheory.Limits CategoryTheory.Functor Opposite
section ArbitraryUniverses
variable {C : Type u₁} [Category.{v₁}... | Mathlib/CategoryTheory/Filtered/Final.lean | 121 | 126 | theorem IsCofilteredOrEmpty.of_exists_of_isCofiltered_of_fullyFaithful [IsCofilteredOrEmpty D]
[F.Full] [F.Faithful] (h : ∀ d, ∃ c, Nonempty (F.obj c ⟶ d)) : IsCofilteredOrEmpty C := by |
suffices IsFilteredOrEmpty Cᵒᵖ from isCofilteredOrEmpty_of_isFilteredOrEmpty_op _
refine IsFilteredOrEmpty.of_exists_of_isFiltered_of_fullyFaithful F.op (fun d => ?_)
obtain ⟨c, ⟨f⟩⟩ := h d.unop
exact ⟨op c, ⟨f.op⟩⟩
| [
" IsFiltered (StructuredArrow d F)",
" Nonempty (StructuredArrow d F)",
" IsFilteredOrEmpty (StructuredArrow d F)",
" ∃ Z x x, True",
" f ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
" g ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
... | [
" IsFiltered (StructuredArrow d F)",
" Nonempty (StructuredArrow d F)",
" IsFilteredOrEmpty (StructuredArrow d F)",
" ∃ Z x x, True",
" f ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
" g ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
... |
import Mathlib.Analysis.NormedSpace.Star.Spectrum
import Mathlib.Analysis.Normed.Group.Quotient
import Mathlib.Analysis.NormedSpace.Algebra
import Mathlib.Topology.ContinuousFunction.Units
import Mathlib.Topology.ContinuousFunction.Compact
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.ContinuousFunct... | Mathlib/Analysis/NormedSpace/Star/GelfandDuality.lean | 108 | 115 | theorem WeakDual.CharacterSpace.mem_spectrum_iff_exists {a : A} {z : ℂ} :
z ∈ spectrum ℂ a ↔ ∃ f : characterSpace ℂ A, f a = z := by |
refine ⟨fun hz => ?_, ?_⟩
· obtain ⟨f, hf⟩ := WeakDual.CharacterSpace.exists_apply_eq_zero hz
simp only [map_sub, sub_eq_zero, AlgHomClass.commutes] at hf
exact ⟨_, hf.symm⟩
· rintro ⟨f, rfl⟩
exact AlgHom.apply_mem_spectrum f a
| [
" I.toCharacterSpace a = 0",
" (CharacterSpace.equivAlgHom.symm ((↑(NormedRing.algEquivComplexOfComplete ⋯).symm).comp (Quotient.mkₐ ℂ I))) a = 0",
" ⋯.some = 0",
" ∃ f, f a = 0",
" z ∈ spectrum ℂ a ↔ ∃ f, f a = z",
" ∃ f, f a = z",
" (∃ f, f a = z) → z ∈ spectrum ℂ a",
" f a ∈ spectrum ℂ a"
] | [
" I.toCharacterSpace a = 0",
" (CharacterSpace.equivAlgHom.symm ((↑(NormedRing.algEquivComplexOfComplete ⋯).symm).comp (Quotient.mkₐ ℂ I))) a = 0",
" ⋯.some = 0",
" ∃ f, f a = 0"
] |
import Mathlib.Algebra.ContinuedFractions.Computation.Basic
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
open Generali... | Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean | 170 | 171 | theorem of_h_eq_floor : (of v).h = ⌊v⌋ := by |
simp [of_h_eq_intFractPair_seq1_fst_b, IntFractPair.of]
| [
" (of v).h = ↑(IntFractPair.seq1 v).1.b",
" (of v).h = ↑(fst✝, snd✝).1.b",
" (of v).h = ↑⌊v⌋"
] | [
" (of v).h = ↑(IntFractPair.seq1 v).1.b",
" (of v).h = ↑(fst✝, snd✝).1.b"
] |
import Mathlib.Algebra.CharP.Two
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.NumberTheory.Divisors
import Mathlib.RingTheory.IntegralDomain
import Mathlib.Tactic.Zify
#align_import rin... | Mathlib/RingTheory/RootsOfUnity/Basic.lean | 275 | 278 | theorem mem_rootsOfUnity_prime_pow_mul_iff' (p k : ℕ) (m : ℕ+) [ExpChar R p]
{ζ : Rˣ} : ζ ^ (p ^ k * ↑m) = 1 ↔ ζ ∈ rootsOfUnity m R := by |
rw [← PNat.mk_coe p (expChar_pos R p), ← PNat.pow_coe, ← PNat.mul_coe, ← mem_rootsOfUnity,
mem_rootsOfUnity_prime_pow_mul_iff]
| [
" a✝ * b✝ ∈ {ζ | ζ ^ ↑k = 1}",
" x✝¹⁻¹ ∈ { carrier := {ζ | ζ ^ ↑k = 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" ζ ∈ rootsOfUnity k M ↔ ↑ζ ^ ↑k = 1",
" ζ ^ ↑k = 1 ↔ ↑ζ ^ ↑k = 1",
" rootsOfUnity 1 M = ⊥",
" x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ ⊥",
" rootsOfUnity k M ≤ rootsOfUnity l M",
" rootsOfUnity k M ≤ ... | [
" a✝ * b✝ ∈ {ζ | ζ ^ ↑k = 1}",
" x✝¹⁻¹ ∈ { carrier := {ζ | ζ ^ ↑k = 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" ζ ∈ rootsOfUnity k M ↔ ↑ζ ^ ↑k = 1",
" ζ ^ ↑k = 1 ↔ ↑ζ ^ ↑k = 1",
" rootsOfUnity 1 M = ⊥",
" x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ ⊥",
" rootsOfUnity k M ≤ rootsOfUnity l M",
" rootsOfUnity k M ≤ ... |
import Mathlib.Algebra.Order.Group.Nat
import Mathlib.Data.List.Rotate
import Mathlib.GroupTheory.Perm.Support
#align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace List
variable {α β : Type*}
section FormPerm
variable [DecidableEq α] (l :... | Mathlib/GroupTheory/Perm/List.lean | 108 | 109 | theorem mem_of_formPerm_apply_ne (h : l.formPerm x ≠ x) : x ∈ l := by |
simpa [or_iff_left_of_imp mem_of_mem_tail] using mem_or_mem_of_zipWith_swap_prod_ne h
| [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... | [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... |
import Mathlib.Algebra.Exact
import Mathlib.RingTheory.TensorProduct.Basic
section Modules
open TensorProduct LinearMap
section Semiring
variable {R : Type*} [CommSemiring R] {M N P Q: Type*}
[AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] [AddCommMonoid Q]
[Module R M] [Module R N] [Module R P] [... | Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean | 136 | 147 | theorem LinearMap.rTensor_surjective (hg : Function.Surjective g) :
Function.Surjective (rTensor Q g) := by |
intro z
induction z using TensorProduct.induction_on with
| zero => exact ⟨0, map_zero _⟩
| tmul p q =>
obtain ⟨n, rfl⟩ := hg p
exact ⟨n ⊗ₜ[R] q, rfl⟩
| add x y hx hy =>
obtain ⟨x, rfl⟩ := hx
obtain ⟨y, rfl⟩ := hy
exact ⟨x + y, map_add _ _ _⟩
| [
" range g ≤ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" range g ≤ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (... | [
" range g ≤ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" range g ≤ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (... |
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.Algebra.Module.ULift
#align_import ring_theory.is_tensor_product from "leanprover-community/mathlib"@"c4926d76bb9c5a4a62ed2f03d998081786132105"
universe u v₁ v₂ v₃ v₄
open TensorProduct
section IsTensorProduct
variable {R : Type*} [CommSemiring R]
va... | Mathlib/RingTheory/IsTensorProduct.lean | 97 | 100 | theorem IsTensorProduct.lift_eq (h : IsTensorProduct f) (f' : M₁ →ₗ[R] M₂ →ₗ[R] M') (x₁ : M₁)
(x₂ : M₂) : h.lift f' (f x₁ x₂) = f' x₁ x₂ := by |
delta IsTensorProduct.lift
simp
| [
" IsTensorProduct (mk R M N)",
" Function.Bijective ⇑(lift (mk R M N))",
" lift (mk R M N) = LinearMap.id",
" ∀ (x : M) (y : N), (lift (mk R M N)) (x ⊗ₜ[R] y) = LinearMap.id (x ⊗ₜ[R] y)",
" Function.Bijective ⇑LinearMap.id",
" h.equiv.symm ((f x₁) x₂) = x₁ ⊗ₜ[R] x₂",
" h.equiv (h.equiv.symm ((f x₁) x₂))... | [
" IsTensorProduct (mk R M N)",
" Function.Bijective ⇑(lift (mk R M N))",
" lift (mk R M N) = LinearMap.id",
" ∀ (x : M) (y : N), (lift (mk R M N)) (x ⊗ₜ[R] y) = LinearMap.id (x ⊗ₜ[R] y)",
" Function.Bijective ⇑LinearMap.id",
" h.equiv.symm ((f x₁) x₂) = x₁ ⊗ₜ[R] x₂",
" h.equiv (h.equiv.symm ((f x₁) x₂))... |
import Mathlib.Data.Sigma.Lex
import Mathlib.Order.BoundedOrder
import Mathlib.Mathport.Notation
import Mathlib.Data.Sigma.Basic
#align_import data.sigma.order from "leanprover-community/mathlib"@"1fc36cc9c8264e6e81253f88be7fb2cb6c92d76a"
namespace Sigma
variable {ι : Type*} {α : ι → Type*}
-- Porting note: I... | Mathlib/Data/Sigma/Order.lean | 79 | 86 | theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by |
constructor
· rintro ⟨i, a, b, h⟩
exact ⟨rfl, h⟩
· obtain ⟨i, a⟩ := a
obtain ⟨j, b⟩ := b
rintro ⟨rfl : i = j, h⟩
exact le.fiber _ _ _ h
| [
" a ≤ b ↔ ∃ h, h ▸ a.snd ≤ b.snd",
" a ≤ b → ∃ h, h ▸ a.snd ≤ b.snd",
" ∃ h, h ▸ ⟨i, a⟩.snd ≤ ⟨i, b⟩.snd",
" (∃ h, h ▸ a.snd ≤ b.snd) → a ≤ b",
" (∃ h, h ▸ ⟨i, a⟩.snd ≤ b.snd) → ⟨i, a⟩ ≤ b",
" (∃ h, h ▸ ⟨i, a⟩.snd ≤ ⟨j, b⟩.snd) → ⟨i, a⟩ ≤ ⟨j, b⟩",
" ⟨i, a⟩ ≤ ⟨i, b⟩"
] | [] |
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Limits.Shapes.Images
import Mathlib.CategoryTheory.IsomorphismClasses
import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects
#align_import category_theory.limits.shapes.zero_morphisms from "leanpr... | Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean | 145 | 147 | theorem zero_of_epi_comp {X Y Z : C} (f : X ⟶ Y) {g : Y ⟶ Z} [Epi f] (h : f ≫ g = 0) : g = 0 := by |
rw [← comp_zero, cancel_epi] at h
exact h
| [] | [] |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Data.Set.Image
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import analysis.normed_space.lp_space from "leanprover-community/mathlib"@"de83b43717abe3... | Mathlib/Analysis/NormedSpace/lpSpace.lean | 106 | 114 | theorem memℓp_gen {f : ∀ i, E i} (hf : Summable fun i => ‖f i‖ ^ p.toReal) : Memℓp f p := by |
rcases p.trichotomy with (rfl | rfl | hp)
· apply memℓp_zero
have H : Summable fun _ : α => (1 : ℝ) := by simpa using hf
exact (Set.Finite.of_summable_const (by norm_num) H).subset (Set.subset_univ _)
· apply memℓp_infty
have H : Summable fun _ : α => (1 : ℝ) := by simpa using hf
simpa using ((Se... | [
" Memℓp f 0 ↔ {i | f i ≠ 0}.Finite",
" (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite",
" Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)",
" (if ⊤ = 0 then {i | ¬f i = 0}.Finite\n else if ⊤ = ⊤... | [
" Memℓp f 0 ↔ {i | f i ≠ 0}.Finite",
" (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite",
" Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)",
" (if ⊤ = 0 then {i | ¬f i = 0}.Finite\n else if ⊤ = ⊤... |
import Aesop.Nanos
import Aesop.Util.UnionFind
import Aesop.Util.UnorderedArraySet
import Batteries.Data.String
import Batteries.Lean.Expr
import Batteries.Lean.Meta.DiscrTree
import Batteries.Lean.PersistentHashSet
import Lean.Meta.Tactic.TryThis
open Lean
open Lean.Meta Lean.Elab.Tactic
namespace Aesop.Array
| .lake/packages/aesop/Aesop/Util/Basic.lean | 21 | 24 | theorem size_modify (a : Array α) (i : Nat) (f : α → α) :
(a.modify i f).size = a.size := by |
simp only [Array.modify, Id.run, Array.modifyM]
split <;> simp
| [
" (a.modify i f).size = a.size",
" Array.size\n (if h : i < a.size then do\n let v ← f (a.get ⟨i, ⋯⟩)\n pure (a.set ⟨i, ⋯⟩ v)\n else pure a) =\n a.size",
" (Array.size do\n let v ← f (a.get ⟨i, ⋯⟩)\n pure (a.set ⟨i, ⋯⟩ v)) =\n a.size",
" Array.size (pure a) = a.size"
] | [] |
import Mathlib.AlgebraicTopology.SimplexCategory
import Mathlib.CategoryTheory.Comma.Arrow
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Opposites
#align_import algebraic_topology.simplicial_object from "leanprover-community/mathlib"@"5ed51dc37c6b891b79314ee11a50adc2b1df6fd6"
o... | Mathlib/AlgebraicTopology/SimplicialObject.lean | 100 | 102 | theorem eqToIso_refl {n : ℕ} (h : n = n) : X.eqToIso h = Iso.refl _ := by |
ext
simp [eqToIso]
| [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... | [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.Perm.Cycle.Type
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Tactic.IntervalCases
#align_import group_theory.p_gr... | Mathlib/GroupTheory/PGroup.lean | 84 | 87 | theorem of_surjective {H : Type*} [Group H] (ϕ : G →* H) (hϕ : Function.Surjective ϕ) :
IsPGroup p H := by |
refine fun h => Exists.elim (hϕ h) fun g hg => Exists.imp (fun k hk => ?_) (hG g)
rw [← hg, ← ϕ.map_pow, hk, ϕ.map_one]
| [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card ↥⊥ = p ^ ?m.2806",
" IsPGroup p G ↔ ∃ n, card G = p ^ n",
" ∃ n, card G = p ^ n",
" card G = p ^ (card G).factors.length",
" ∀ q ∈ (card G).factors, q = p",
" q = p",
" IsPGroup p H",
" ∀ (g : H), ∃ k, ϕ g ^ p ^ k = 1",
" h ^ p ^ k = 1"
] | [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card ↥⊥ = p ^ ?m.2806",
" IsPGroup p G ↔ ∃ n, card G = p ^ n",
" ∃ n, card G = p ^ n",
" card G = p ^ (card G).factors.length",
" ∀ q ∈ (card G).factors, q = p",
" q = p",
" IsPGroup p H",
" ∀ (g : H), ∃ k, ϕ g ^ p ^ k = 1"
] |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
... | Mathlib/Analysis/Convex/Gauge.lean | 138 | 139 | theorem gauge_neg_set_eq_gauge_neg (x : E) : gauge (-s) x = gauge s (-x) := by |
rw [← gauge_neg_set_neg, neg_neg]
| [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... | [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... |
import Mathlib.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 | 140 | 145 | theorem approxOn_mem {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
[SeparableSpace s] (n : ℕ) (x : β) : approxOn f hf s y₀ h₀ n x ∈ s := by |
haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩
suffices ∀ n, (Nat.casesOn n y₀ ((↑) ∘ denseSeq s) : α) ∈ s by apply this
rintro (_ | n)
exacts [h₀, Subtype.mem _]
| [
" ↑(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.Data.ENNReal.Inv
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
section iInf
variable {ι : Sort*} {f g : ι → ℝ≥0∞}
variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0}
theorem toNNReal_iInf (hf : ∀ i, f ... | Mathlib/Data/ENNReal/Real.lean | 600 | 603 | theorem sub_iInf : (a - ⨅ i, f i) = ⨆ i, a - f i := by |
refine eq_of_forall_ge_iff fun c => ?_
rw [tsub_le_iff_right, add_comm, iInf_add]
simp [tsub_le_iff_right, sub_eq_add_neg, add_comm]
| [
" (iInf f).toNNReal = ⨅ i, (f i).toNNReal",
" (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal",
" (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)",
" (iSup f).toNNReal = ⨆ i, (f i).toNNReal",
" (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal",
" (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i... | [
" (iInf f).toNNReal = ⨅ i, (f i).toNNReal",
" (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal",
" (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)",
" (iSup f).toNNReal = ⨆ i, (f i).toNNReal",
" (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal",
" (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i... |
import Mathlib.GroupTheory.Solvable
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import field_theory.abel_ruffini from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial Intermedi... | Mathlib/FieldTheory/AbelRuffini.lean | 248 | 280 | theorem induction (P : solvableByRad F E → Prop)
(base : ∀ α : F, P (algebraMap F (solvableByRad F E) α))
(add : ∀ α β : solvableByRad F E, P α → P β → P (α + β))
(neg : ∀ α : solvableByRad F E, P α → P (-α))
(mul : ∀ α β : solvableByRad F E, P α → P β → P (α * β))
(inv : ∀ α : solvableByRad F E, P ... |
revert α
suffices ∀ α : E, IsSolvableByRad F α → ∃ β : solvableByRad F E, ↑β = α ∧ P β by
intro α
obtain ⟨α₀, hα₀, Pα⟩ := this α (Subtype.mem α)
convert Pα
exact Subtype.ext hα₀.symm
apply IsSolvableByRad.rec
· exact fun α => ⟨algebraMap F (solvableByRad F E) α, rfl, base α⟩
· intro α β _ _ P... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolva... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolva... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 98 | 101 | theorem mul_den (q₁ q₂ : ℚ) :
(q₁ * q₂).den =
q₁.den * q₂.den / Nat.gcd (q₁.num * q₂.num).natAbs (q₁.den * q₂.den) := by |
rw [mul_def, normalize_eq]
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.Analysis.SpecialFunctions.Exp
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Analysis.NormedSpace.Real
#align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable ... | Mathlib/Analysis/SpecialFunctions/Log/Basic.lean | 104 | 107 | theorem log_abs (x : ℝ) : log |x| = log x := by |
by_cases h : x = 0
· simp [h]
· rw [← exp_eq_exp, exp_log_eq_abs h, exp_log_eq_abs (abs_pos.2 h).ne', abs_abs]
| [
" x.log = expOrderIso.symm ⟨x, hx⟩",
" expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩",
" |x| = x",
" rexp x.log = |x|",
" rexp x.log = x",
" rexp x.log = -x",
" |x| = -x",
" x ≤ rexp x.log",
" 0 ≤ 1",
" x ≤ |x|",
" rexp (log 1) = rexp 0",
" |x|.log = x.log"
] | [
" x.log = expOrderIso.symm ⟨x, hx⟩",
" expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩",
" |x| = x",
" rexp x.log = |x|",
" rexp x.log = x",
" rexp x.log = -x",
" |x| = -x",
" x ≤ rexp x.log",
" 0 ≤ 1",
" x ≤ |x|",
" rexp (log 1) = rexp 0"
] |
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Noetherian
import Mathlib.RingTheory.ChainOfDivisors
import Mathlib.RingTheory.DedekindDomain.Basic
import Mathlib.RingTheory.FractionalIdeal.Operations
#align_impo... | Mathlib/RingTheory/DedekindDomain/Ideal.lean | 108 | 122 | theorem right_inverse_eq (I J : FractionalIdeal R₁⁰ K) (h : I * J = 1) : J = I⁻¹ := by |
have hI : I ≠ 0 := ne_zero_of_mul_eq_one I J h
suffices h' : I * (1 / I) = 1 from
congr_arg Units.inv <| @Units.ext _ _ (Units.mkOfMulEqOne _ _ h) (Units.mkOfMulEqOne _ _ h') rfl
apply le_antisymm
· apply mul_le.mpr _
intro x hx y hy
rw [mul_comm]
exact (mem_div_iff_of_nonzero hI).mp hy x hx
... | [
" ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J",
" J⁻¹ ≤ I⁻¹",
" x ∈ (fun a => ↑a) J⁻¹ → x ∈ (fun a => ↑a) I⁻¹",
" (∀ y ∈ J, x * y ∈ 1) → ∀ y ∈ I, x * y ∈ 1",
" J = I⁻¹",
" I * (1 / I) = 1",
" I * (1 / I) ≤ 1",
" ∀ i ∈ I, ∀ j ∈ 1 / I, i * j ∈ 1",
" x * y ∈ 1",
" y * x ∈ 1",
" 1 ≤ I * (1 / I)",
... | [
" ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J",
" J⁻¹ ≤ I⁻¹",
" x ∈ (fun a => ↑a) J⁻¹ → x ∈ (fun a => ↑a) I⁻¹",
" (∀ y ∈ J, x * y ∈ 1) → ∀ y ∈ I, x * y ∈ 1"
] |
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
import Mathlib.Tactic.AdaptationNote
#align_import probability.martingale.upcrossing from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Topological... | Mathlib/Probability/Martingale/Upcrossing.lean | 197 | 198 | theorem lowerCrossingTime_le : lowerCrossingTime a b f N n ω ≤ N := by |
simp only [lowerCrossingTime, hitting_le ω]
| [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... | [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... |
import Mathlib.Algebra.Algebra.Unitization
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
suppress_compilation
variable (𝕜 A : Type*) [NontriviallyNormedField 𝕜] [NonUnitalNormedRing A]
variable [NormedSpace 𝕜 A] [IsScalarTower 𝕜 A A] [SMulCommClass 𝕜 A A]
open ContinuousLinearMap
namespace Unitizati... | Mathlib/Analysis/NormedSpace/Unitization.lean | 139 | 141 | theorem norm_eq_sup (x : Unitization 𝕜 A) :
‖x‖ = ‖x.fst‖ ⊔ ‖algebraMap 𝕜 (A →L[𝕜] A) x.fst + mul 𝕜 A x.snd‖ := by |
rw [norm_def, splitMul_apply, Prod.norm_def, sup_eq_max]
| [
" (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)",
" (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)",
" Function.Injective ⇑(splitMul 𝕜 A)",
" ∀ (a : Un... | [
" (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)",
" (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)",
" Function.Injective ⇑(splitMul 𝕜 A)",
" ∀ (a : Un... |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.MeasureTheory.Function.SimpleFunc
import Mathlib.MeasureTheory.Measure.MutuallySingular
import Mathlib.MeasureTheory.Measure.Count
import Mathlib.Topology.IndicatorConstPointwise
import Mathlib.MeasureTheory.Constructions.BorelSpace.Real
#align_import m... | Mathlib/MeasureTheory/Integral/Lebesgue.lean | 90 | 93 | theorem lintegral_mono' {m : MeasurableSpace α} ⦃μ ν : Measure α⦄ (hμν : μ ≤ ν) ⦃f g : α → ℝ≥0∞⦄
(hfg : f ≤ g) : ∫⁻ a, f a ∂μ ≤ ∫⁻ a, g a ∂ν := by |
rw [lintegral, lintegral]
exact iSup_mono fun φ => iSup_mono' fun hφ => ⟨le_trans hφ hfg, lintegral_mono (le_refl φ) hμν⟩
| [
" ∫⁻ (a : α), ↑f a ∂μ = f.lintegral μ",
" ⨆ g, ⨆ (_ : ↑g ≤ fun a => ↑f a), g.lintegral μ = f.lintegral μ",
" ∫⁻ (a : α), f a ∂μ ≤ ∫⁻ (a : α), g a ∂ν",
" ⨆ g, ⨆ (_ : ↑g ≤ fun a => f a), g.lintegral μ ≤ ⨆ g_1, ⨆ (_ : ↑g_1 ≤ fun a => g a), g_1.lintegral ν"
] | [
" ∫⁻ (a : α), ↑f a ∂μ = f.lintegral μ",
" ⨆ g, ⨆ (_ : ↑g ≤ fun a => ↑f a), g.lintegral μ = f.lintegral μ"
] |
import Mathlib.CategoryTheory.PathCategory
import Mathlib.CategoryTheory.Functor.FullyFaithful
import Mathlib.CategoryTheory.Bicategory.Free
import Mathlib.CategoryTheory.Bicategory.LocallyDiscrete
#align_import category_theory.bicategory.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786ca... | Mathlib/CategoryTheory/Bicategory/Coherence.lean | 94 | 98 | theorem preinclusion_map₂ {a b : B} (f g : Discrete (Path.{v + 1} a b)) (η : f ⟶ g) :
(preinclusion B).map₂ η = eqToHom (congr_arg _ (Discrete.ext _ _ (Discrete.eq_of_hom η))) := by |
rcases η with ⟨⟨⟩⟩
cases Discrete.ext _ _ (by assumption)
convert (inclusionPath a b).map_id _
| [
" (preinclusion B).map₂ η = eqToHom ⋯",
" (preinclusion B).map₂ { down := { down := down✝ } } = eqToHom ⋯",
" ?m.3791.as = ?m.3792.as"
] | [] |
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 125 | 132 | theorem basis_le_span' {ι : Type*} (b : Basis ι R M) {w : Set M} [Fintype w] (s : span R w = ⊤) :
#ι ≤ Fintype.card w := by |
haveI := nontrivial_of_invariantBasisNumber R
haveI := basis_finite_of_finite_spans w (toFinite _) s b
cases nonempty_fintype ι
rw [Cardinal.mk_fintype ι]
simp only [Cardinal.natCast_le]
exact Basis.le_span'' b s
| [
" Fintype.card ι ≤ Fintype.card ↑w",
" (↑w →₀ R) →ₗ[R] ι →₀ R",
" Surjective ⇑(↑b.repr ∘ₗ Finsupp.total (↑w) M R Subtype.val)",
" Surjective ⇑↑b.repr",
" Surjective fun x => (Finsupp.total (↑w) M R Subtype.val) x",
" span R (range Subtype.val) = ⊤",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(... | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (↑w →₀ R) →ₗ[R] ι →₀ R",
" Surjective ⇑(↑b.repr ∘ₗ Finsupp.total (↑w) M R Subtype.val)",
" Surjective ⇑↑b.repr",
" Surjective fun x => (Finsupp.total (↑w) M R Subtype.val) x",
" span R (range Subtype.val) = ⊤"
] |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
... | Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 62 | 62 | theorem isCaratheodory_empty : IsCaratheodory m ∅ := by | simp [IsCaratheodory, m.empty, diff_empty]
| [
" m.IsCaratheodory ∅"
] | [] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Shift
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
variable
{𝕜 : Type*} [NontriviallyNormedField 𝕜]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
{R : Type*} [Semi... | Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean | 58 | 62 | theorem iteratedDerivWithin_const_smul (c : R) (hf : ContDiffOn 𝕜 n f s) :
iteratedDerivWithin n (c • f) s x = c • iteratedDerivWithin n f s x := by |
simp_rw [iteratedDerivWithin]
rw [iteratedFDerivWithin_const_smul_apply hf h hx]
simp only [ContinuousMultilinearMap.smul_apply]
| [
" iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x",
" Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s",
" Set.EqOn (iteratedDerivWithin 0 f s) (iteratedDerivWithin 0 g s) s",
" Set.EqOn (iteratedDerivWithin (n + 1) f s) (iteratedDerivWithin (n +... | [
" iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x",
" Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s",
" Set.EqOn (iteratedDerivWithin 0 f s) (iteratedDerivWithin 0 g s) s",
" Set.EqOn (iteratedDerivWithin (n + 1) f s) (iteratedDerivWithin (n +... |
import Mathlib.Topology.Order.MonotoneContinuity
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.Instances.NNReal
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.Metrizable.Basic
import Mathlib.Topology.Order.T5
#align_import topology.instances.ennreal from "leanprove... | Mathlib/Topology/Instances/ENNReal.lean | 748 | 771 | theorem exists_upcrossings_of_not_bounded_under {ι : Type*} {l : Filter ι} {x : ι → ℝ}
(hf : liminf (fun i => (Real.nnabs (x i) : ℝ≥0∞)) l ≠ ∞)
(hbdd : ¬IsBoundedUnder (· ≤ ·) l fun i => |x i|) :
∃ a b : ℚ, a < b ∧ (∃ᶠ i in l, x i < a) ∧ ∃ᶠ i in l, ↑b < x i := by |
rw [isBoundedUnder_le_abs, not_and_or] at hbdd
obtain hbdd | hbdd := hbdd
· obtain ⟨R, hR⟩ := exists_frequently_lt_of_liminf_ne_top hf
obtain ⟨q, hq⟩ := exists_rat_gt R
refine ⟨q, q + 1, (lt_add_iff_pos_right _).2 zero_lt_one, ?_, ?_⟩
· refine fun hcon => hR ?_
filter_upwards [hcon] with x hx u... | [
" ∃ R, ∃ᶠ (n : ι) in l, x n < R",
" False",
" IsCobounded (fun x x_1 => x ≥ x_1) (map (fun n => ↑(Real.nnabs (x n))) l)",
" ∀ᶠ (n : ℝ≥0∞) in map (fun n => ↑(Real.nnabs (x n))) l, ↑r ≤ n",
" ∀ᶠ (a : ι) in l, r ≤ Real.nnabs (x a)",
" ∃ R, ∃ᶠ (n : ι) in l, R < x n",
" ∃ a b, a < b ∧ (∃ᶠ (i : ι) in l, x i <... | [
" ∃ R, ∃ᶠ (n : ι) in l, x n < R",
" False",
" IsCobounded (fun x x_1 => x ≥ x_1) (map (fun n => ↑(Real.nnabs (x n))) l)",
" ∀ᶠ (n : ℝ≥0∞) in map (fun n => ↑(Real.nnabs (x n))) l, ↑r ≤ n",
" ∀ᶠ (a : ι) in l, r ≤ Real.nnabs (x a)",
" ∃ R, ∃ᶠ (n : ι) in l, R < x n"
] |
import Mathlib.Analysis.Calculus.BumpFunction.Basic
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open F... | Mathlib/Analysis/Calculus/BumpFunction/Normed.lean | 106 | 108 | theorem integral_normed_smul {X} [NormedAddCommGroup X] [NormedSpace ℝ X]
[CompleteSpace X] (z : X) : ∫ x, f.normed μ x • z ∂μ = z := by |
simp_rw [integral_smul_const, f.integral_normed (μ := μ), one_smul]
| [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... | [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... |
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.affine_space.matrix from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Affine Matrix
open Set
universe u₁ u₂ u₃ u₄
variable {ι : Type u₁} {k : Type... | Mathlib/LinearAlgebra/AffineSpace/Matrix.lean | 55 | 56 | theorem toMatrix_row_sum_one [Fintype ι] (q : ι' → P) (i : ι') : ∑ j, b.toMatrix q i j = 1 := by |
simp
| [
" b.toMatrix ⇑b = 1",
" b.toMatrix (⇑b) i j = 1 i j",
" ∑ j : ι, b.toMatrix q i j = 1"
] | [
" b.toMatrix ⇑b = 1",
" b.toMatrix (⇑b) i j = 1 i j"
] |
import Mathlib.Algebra.Exact
import Mathlib.RingTheory.TensorProduct.Basic
section Modules
open TensorProduct LinearMap
section Semiring
variable {R : Type*} [CommSemiring R] {M N P Q: Type*}
[AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] [AddCommMonoid Q]
[Module R M] [Module R N] [Module R P] [... | Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean | 149 | 158 | theorem LinearMap.rTensor_range :
range (rTensor Q g) =
range (rTensor Q (Submodule.subtype (range g))) := by |
have : g = (Submodule.subtype _).comp g.rangeRestrict := rfl
nth_rewrite 1 [this]
rw [rTensor_comp]
apply range_comp_of_range_eq_top
rw [range_eq_top]
apply rTensor_surjective
rw [← range_eq_top, range_rangeRestrict]
| [
" range g ≤ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" range g ≤ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (... | [
" range g ≤ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R Q P) q) (range (lTensor Q g))",
" range g ≤ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (rTensor Q g))",
" g n ∈ Submodule.comap ((TensorProduct.mk R P Q).flip q) (range (... |
import Mathlib.CategoryTheory.Abelian.Basic
import Mathlib.CategoryTheory.Preadditive.Opposite
import Mathlib.CategoryTheory.Limits.Opposites
#align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80"
noncomputable section
namespace CategoryTheor... | Mathlib/CategoryTheory/Abelian/Opposite.lean | 95 | 98 | theorem cokernel.π_op :
(cokernel.π f.op).unop =
(cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (Opposite.unop_op _).symm := by |
simp [cokernelOpUnop]
| [
" Abelian Cᵒᵖ",
" (cokernel.π f).op ≫ f.op = 0",
" f ≫ (kernel.ι f.op).unop = 0",
" (kernel.ι f.op ≫ f.op).unop = 0",
" (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop",
" ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel... | [
" Abelian Cᵒᵖ",
" (cokernel.π f).op ≫ f.op = 0",
" f ≫ (kernel.ι f.op).unop = 0",
" (kernel.ι f.op ≫ f.op).unop = 0",
" (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop",
" ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel... |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Zip
import Mathlib.Data.Nat.Defs
import Mathlib.Data.List.Infix
#align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u
variable {α : Type u}
open Nat Function
namespace List
| Mathlib/Data/List/Rotate.lean | 37 | 37 | theorem rotate_mod (l : List α) (n : ℕ) : l.rotate (n % l.length) = l.rotate n := by | simp [rotate]
| [
" l.rotate (n % l.length) = l.rotate n"
] | [] |
import Mathlib.AlgebraicTopology.SimplicialObject
import Mathlib.CategoryTheory.Limits.Shapes.Products
#align_import algebraic_topology.split_simplicial_object from "leanprover-community/mathlib"@"dd1f8496baa505636a82748e6b652165ea888733"
noncomputable section
open CategoryTheory CategoryTheory.Category Category... | Mathlib/AlgebraicTopology/SplitSimplicialObject.lean | 143 | 151 | theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len := by |
rw [eqId_iff_eq]
constructor
· intro h
rw [h]
· intro h
rw [← unop_inj_iff]
ext
exact h
| [
" A₁.fst.unop = A₂.fst.unop",
" A₁ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₂, ⟨α₂, hα₂⟩⟩",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₁, ⟨α₂, hα₂⟩⟩",
" Function.Injective fun A => ⟨⟨A.fst.unop.len, ⋯⟩, ⇑(Hom.toOrderHom A.e)⟩",
" ⟨Δ₁, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α... | [
" A₁.fst.unop = A₂.fst.unop",
" A₁ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₂, ⟨α₂, hα₂⟩⟩",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₁, ⟨α₂, hα₂⟩⟩",
" Function.Injective fun A => ⟨⟨A.fst.unop.len, ⋯⟩, ⇑(Hom.toOrderHom A.e)⟩",
" ⟨Δ₁, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α... |
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 | 111 | 115 | theorem HasDerivWithinAt.complexToReal_fderiv' {f : ℂ → E} {s : Set ℂ} {x : ℂ} {f' : E}
(h : HasDerivWithinAt f f' s x) :
HasFDerivWithinAt f (reCLM.smulRight f' + I • imCLM.smulRight f') s x := by |
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasFDerivWithinAt.restrictScalars ℝ
| [
" 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))",
" HasDerivAt (fun x => (e ↑x... |
import Mathlib.Data.List.Basic
#align_import data.list.count from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
assert_not_exists Set.range
assert_not_exists GroupWithZero
assert_not_exists Ring
open Nat
variable {α : Type*} {l : List α}
namespace List
section CountP
variable (p q ... | Mathlib/Data/List/Count.lean | 54 | 57 | theorem length_filter_lt_length_iff_exists (l) :
length (filter p l) < length l ↔ ∃ x ∈ l, ¬p x := by |
simpa [length_eq_countP_add_countP p l, countP_eq_length_filter] using
countP_pos (fun x => ¬p x) (l := l)
| [
" (filter p l).length < l.length ↔ ∃ x, x ∈ l ∧ ¬p x = true"
] | [] |
import Mathlib.Probability.ProbabilityMassFunction.Monad
#align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d"
universe u
namespace PMF
noncomputable section
variable {α β γ : Type*}
open scoped Classical
open NNReal ENN... | Mathlib/Probability/ProbabilityMassFunction/Constructions.lean | 172 | 173 | theorem mem_support_ofFinset_iff (a : α) : a ∈ (ofFinset f s h h').support ↔ a ∈ s ∧ f a ≠ 0 := by |
simp
| [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p",
" map (Function.const α b) p = pure b",
" a ∈ (ofFinset f s h h').support ↔ a ∈ ↑s ∩ Function.support f",
" a ∈... | [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p",
" map (Function.const α b) p = pure b",
" a ∈ (ofFinset f s h h').support ↔ a ∈ ↑s ∩ Function.support f"
] |
import Mathlib.MeasureTheory.Measure.Content
import Mathlib.MeasureTheory.Group.Prod
import Mathlib.Topology.Algebra.Group.Compact
#align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open Set Inv Function Topological... | Mathlib/MeasureTheory/Measure/Haar/Basic.lean | 178 | 180 | theorem index_elim {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
∃ t : Finset G, (K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V) ∧ Finset.card t = index K V := by |
have := Nat.sInf_mem (index_defined hK hV); rwa [mem_image] at this
| [
" index ∅ V = 0",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∨\n Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} = ∅",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}",
" ∅ ∈ {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∧ ∅.card = 0",
" prehaar (↑K₀) U ⊥ = 0",
"... | [
" index ∅ V = 0",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∨\n Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} = ∅",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}",
" ∅ ∈ {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∧ ∅.card = 0",
" prehaar (↑K₀) U ⊥ = 0",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.