Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Algebra.Category.GroupCat.FilteredColimits
import Mathlib.Algebra.Category.ModuleCat.Basic
#align_import algebra.category.Module.filtered_colimits from "leanprover-community/mathlib"@"806bbb0132ba63b93d5edbe4789ea226f8329979"
universe v u
noncomputable section
open scoped Classical
open Category... | Mathlib/Algebra/Category/ModuleCat/FilteredColimits.lean | 72 | 79 | theorem colimitSMulAux_eq_of_rel (r : R) (x y : Σ j, F.obj j)
(h : Types.FilteredColimit.Rel (F ⋙ forget (ModuleCat R)) x y) :
colimitSMulAux F r x = colimitSMulAux F r y := by |
apply M.mk_eq
obtain ⟨k, f, g, hfg⟩ := h
use k, f, g
simp only [Functor.comp_obj, Functor.comp_map, forget_map] at hfg
simp [hfg]
| [
" colimitSMulAux F r x = colimitSMulAux F r y",
" ∃ k f g, (F.map f) ⟨x.fst, r • x.snd⟩.snd = (F.map g) ⟨y.fst, r • y.snd⟩.snd",
" (F.map f) ⟨x.fst, r • x.snd⟩.snd = (F.map g) ⟨y.fst, r • y.snd⟩.snd"
] | [] |
import Mathlib.Algebra.ModEq
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Algebra.Periodic
import Mathlib.Data.Int.SuccPred
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.Order.Circular
import Mathlib.Data.List.TFAE
import Mathlib.Data.Set.Lattice
#align_import a... | Mathlib/Algebra/Order/ToIntervalMod.lean | 87 | 89 | theorem toIcoMod_mem_Ico' (b : α) : toIcoMod hp 0 b ∈ Set.Ico 0 p := by |
convert toIcoMod_mem_Ico hp 0 b
exact (zero_add p).symm
| [
" toIcoMod hp 0 b ∈ Set.Ico 0 p",
" p = 0 + p"
] | [] |
import Mathlib.Data.Int.ModEq
import Mathlib.GroupTheory.QuotientGroup
#align_import algebra.modeq from "leanprover-community/mathlib"@"a07d750983b94c530ab69a726862c2ab6802b38c"
namespace AddCommGroup
variable {α : Type*}
section AddCommGroup
variable [AddCommGroup α] {p a a₁ a₂ b b₁ b₂ c : α} {n : ℕ} {z : ℤ}
... | Mathlib/Algebra/ModEq.lean | 311 | 312 | theorem modEq_iff_int_modEq {a b z : ℤ} : a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z] := by |
simp [ModEq, dvd_iff_exists_eq_mul_left, Int.modEq_iff_dvd]
| [
" a - a = 0 • p",
" (∃ b_1, b - a = (Equiv.symm (Equiv.neg ℤ)) b_1 • p) ↔ b ≡ a [PMOD p]",
" c - a = (m + n) • p",
" -b ≡ -a [PMOD p] ↔ a ≡ b [PMOD p]",
" b ≡ a [PMOD -p] ↔ a ≡ b [PMOD p]",
" a ≡ b [PMOD 0] ↔ a = b",
" 0 - p = -1 • p",
" 0 - z • p = -z • p",
" a - (a + z • p) = -z • p",
" a - (z •... | [
" a - a = 0 • p",
" (∃ b_1, b - a = (Equiv.symm (Equiv.neg ℤ)) b_1 • p) ↔ b ≡ a [PMOD p]",
" c - a = (m + n) • p",
" -b ≡ -a [PMOD p] ↔ a ≡ b [PMOD p]",
" b ≡ a [PMOD -p] ↔ a ≡ b [PMOD p]",
" a ≡ b [PMOD 0] ↔ a = b",
" 0 - p = -1 • p",
" 0 - z • p = -z • p",
" a - (a + z • p) = -z • p",
" a - (z •... |
import Mathlib.Analysis.SpecialFunctions.Gamma.Beta
import Mathlib.NumberTheory.LSeries.HurwitzZeta
import Mathlib.Analysis.Complex.RemovableSingularity
import Mathlib.Analysis.PSeriesComplex
#align_import number_theory.zeta_function from "leanprover-community/mathlib"@"57f9349f2fe19d2de7207e99b0341808d977cdcf"
o... | Mathlib/NumberTheory/LSeries/RiemannZeta.lean | 164 | 166 | theorem riemannZeta_one_sub {s : ℂ} (hs : ∀ n : ℕ, s ≠ -n) (hs' : s ≠ 1) :
riemannZeta (1 - s) = 2 * (2 * π) ^ (-s) * Gamma s * cos (π * s / 2) * riemannZeta s := by |
rw [riemannZeta, hurwitzZetaEven_one_sub 0 hs (Or.inr hs'), cosZeta_zero, hurwitzZetaEven_zero]
| [
" completedCosZeta 0 s = completedRiemannZeta s",
" completedCosZeta₀ 0 s = completedRiemannZeta₀ s",
" completedRiemannZeta s = completedRiemannZeta₀ s - 1 / s - 1 / (1 - s)",
" completedRiemannZeta₀ (1 - s) = completedRiemannZeta₀ s",
" completedRiemannZeta (1 - s) = completedRiemannZeta s",
" cosZeta 0... | [
" completedCosZeta 0 s = completedRiemannZeta s",
" completedCosZeta₀ 0 s = completedRiemannZeta₀ s",
" completedRiemannZeta s = completedRiemannZeta₀ s - 1 / s - 1 / (1 - s)",
" completedRiemannZeta₀ (1 - s) = completedRiemannZeta₀ s",
" completedRiemannZeta (1 - s) = completedRiemannZeta s",
" cosZeta 0... |
import Mathlib.Algebra.Group.Semiconj.Defs
import Mathlib.Algebra.Ring.Defs
#align_import algebra.ring.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u v w x
variable {α : Type u} {β : Type v} {γ : Type w} {R : Type x}
open Function
namespace SemiconjBy
@[simp... | Mathlib/Algebra/Ring/Semiconj.lean | 89 | 91 | theorem sub_right (h : SemiconjBy a x y) (h' : SemiconjBy a x' y') :
SemiconjBy a (x - x') (y - y') := by |
simpa only [sub_eq_add_neg] using h.add_right h'.neg_right
| [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y",
" SemiconjBy a (-x) (-y)",
" SemiconjBy (-a) x y",
" SemiconjBy a (x - x') (y - y')"
] | [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y",
" SemiconjBy a (-x) (-y)",
" SemiconjBy (-a) x y"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.NumberTheory.Bernoulli
#align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a"
noncomputable section... | Mathlib/NumberTheory/BernoulliPolynomials.lean | 72 | 72 | theorem bernoulli_zero : bernoulli 0 = 1 := by | simp [bernoulli]
| [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... | [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... |
import Mathlib.FieldTheory.Separable
import Mathlib.RingTheory.IntegralDomain
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Tactic.ApplyFun
#align_import field_theory.finite.basic from "leanprover-community/mathlib"@"12a85fac627bea918960da036049d611b1a3ee43"
variable {K : Type*} {R : Type*}
local notation ... | Mathlib/FieldTheory/Finite/Basic.lean | 168 | 176 | theorem sum_subgroup_units [Ring K] [NoZeroDivisors K]
{G : Subgroup Kˣ} [Fintype G] [Decidable (G = ⊥)] :
∑ x : G, (x.val : K) = if G = ⊥ then 1 else 0 := by |
by_cases G_bot : G = ⊥
· subst G_bot
simp only [ite_true, Subgroup.mem_bot, Fintype.card_ofSubsingleton, Nat.cast_ite, Nat.cast_one,
Nat.cast_zero, univ_unique, Set.default_coe_singleton, sum_singleton, Units.val_one]
· simp only [G_bot, ite_false]
exact sum_subgroup_units_eq_zero G_bot
| [
" ∏ x : Kˣ, x = -1",
" ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), a * (fun x x_1 => x⁻¹) a ha = 1",
" ∀ (ha : a ∈ univ.erase (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a",
" ∀ (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) a ha ∈ univ.erase (-1)",
" ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) ((fun ... | [
" ∏ x : Kˣ, x = -1",
" ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), a * (fun x x_1 => x⁻¹) a ha = 1",
" ∀ (ha : a ∈ univ.erase (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a",
" ∀ (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) a ha ∈ univ.erase (-1)",
" ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) ((fun ... |
import Mathlib.Analysis.SpecificLimits.Basic
#align_import analysis.hofer from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open Topology
open Filter Finset
local notation "d" => dist
#noalign pos_div_pow_pos
| Mathlib/Analysis/Hofer.lean | 33 | 104 | theorem hofer {X : Type*} [MetricSpace X] [CompleteSpace X] (x : X) (ε : ℝ) (ε_pos : 0 < ε)
{ϕ : X → ℝ} (cont : Continuous ϕ) (nonneg : ∀ y, 0 ≤ ϕ y) : ∃ ε' > 0, ∃ x' : X,
ε' ≤ ε ∧ d x' x ≤ 2 * ε ∧ ε * ϕ x ≤ ε' * ϕ x' ∧ ∀ y, d x' y ≤ ε' → ϕ y ≤ 2 * ϕ x' := by |
by_contra H
have reformulation : ∀ (x') (k : ℕ), ε * ϕ x ≤ ε / 2 ^ k * ϕ x' ↔ 2 ^ k * ϕ x ≤ ϕ x' := by
intro x' k
rw [div_mul_eq_mul_div, le_div_iff, mul_assoc, mul_le_mul_left ε_pos, mul_comm]
positivity
-- Now let's specialize to `ε/2^k`
replace H : ∀ k : ℕ, ∀ x', d x' x ≤ 2 * ε ∧ 2 ^ k * ϕ x ≤ ϕ... | [
" ∃ ε' > 0, ∃ x', ε' ≤ ε ∧ d x' x ≤ 2 * ε ∧ ε * ϕ x ≤ ε' * ϕ x' ∧ ∀ (y : X), d x' y ≤ ε' → ϕ y ≤ 2 * ϕ x'",
" False",
" ∀ (x' : X) (k : ℕ), ε * ϕ x ≤ ε / 2 ^ k * ϕ x' ↔ 2 ^ k * ϕ x ≤ ϕ x'",
" ε * ϕ x ≤ ε / 2 ^ k * ϕ x' ↔ 2 ^ k * ϕ x ≤ ϕ x'",
" 0 < 2 ^ k",
" ∀ (k : ℕ) (x' : X), d x' x ≤ 2 * ε ∧ 2 ^ k * ϕ x... | [] |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uM₁ uM₂
variable {R : Type uR} {A : Type uA} {M₁ : Type uM₁} {M₂ : Type uM₂}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommR... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 101 | 105 | theorem polarBilin_baseChange [Invertible (2 : A)] (Q : QuadraticForm R M₂) :
polarBilin (Q.baseChange A) = (polarBilin Q).baseChange A := by |
rw [QuadraticForm.baseChange, BilinForm.baseChange, polarBilin_tmul, BilinForm.tmul,
← LinearMap.map_smul, smul_tmul', ← two_nsmul_associated R, coe_associatedHom, associated_sq,
smul_comm, ← smul_assoc, two_smul, invOf_two_add_invOf_two, one_smul]
| [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... | [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... |
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Topology.Instances.ENNReal
#align_import analysis.calculus.series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Metric TopologicalSpace Function Filter
open scoped Topology NNReal
variable {α β F : Type*} [N... | Mathlib/Analysis/NormedSpace/FunctionSeries.lean | 28 | 39 | theorem tendstoUniformlyOn_tsum {f : α → β → F} (hu : Summable u) {s : Set β}
(hfu : ∀ n x, x ∈ s → ‖f n x‖ ≤ u n) :
TendstoUniformlyOn (fun t : Finset α => fun x => ∑ n ∈ t, f n x) (fun x => ∑' n, f n x) atTop
s := by |
refine tendstoUniformlyOn_iff.2 fun ε εpos => ?_
filter_upwards [(tendsto_order.1 (tendsto_tsum_compl_atTop_zero u)).2 _ εpos] with t ht x hx
have A : Summable fun n => ‖f n x‖ :=
.of_nonneg_of_le (fun _ ↦ norm_nonneg _) (fun n => hfu n x hx) hu
rw [dist_eq_norm, ← sum_add_tsum_subtype_compl A.of_norm t, a... | [
" TendstoUniformlyOn (fun t x => ∑ n ∈ t, f n x) (fun x => ∑' (n : α), f n x) atTop s",
" ∀ᶠ (n : Finset α) in atTop, ∀ x ∈ s, dist (∑' (n : α), f n x) (∑ n ∈ n, f n x) < ε",
" dist (∑' (n : α), f n x) (∑ n ∈ t, f n x) < ε",
" ‖∑' (x_1 : { x // x ∉ t }), f (↑x_1) x‖ < ε",
" ‖∑' (x_1 : { x // x ∉ t }), f (↑x... | [] |
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.RingTheory.Polynomial.Quotient
#align_import ring_theory.jacobson_ideal from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
namespace Ideal
variable {R : Type u} {S : Type v}... | Mathlib/RingTheory/JacobsonIdeal.lean | 125 | 129 | theorem exists_mul_sub_mem_of_sub_one_mem_jacobson {I : Ideal R} (r : R) (h : r - 1 ∈ jacobson I) :
∃ s, s * r - 1 ∈ I := by |
cases' mem_jacobson_iff.1 h 1 with s hs
use s
simpa [mul_sub] using hs
| [
" r * y * x + r - 1 ∈ I",
" -p ∈ I",
" z * -y * x + z ∈ M",
" z * i ∈ M",
" ∃ s, s * r - 1 ∈ I",
" s * r - 1 ∈ I"
] | [
" r * y * x + r - 1 ∈ I",
" -p ∈ I",
" z * -y * x + z ∈ M",
" z * i ∈ M"
] |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af"
variable {l m n α : Type*}
namespace Matrix
... | Mathlib/LinearAlgebra/Matrix/SchurComplement.lean | 100 | 104 | theorem invOf_fromBlocks_zero₂₁_eq (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α)
[Invertible A] [Invertible D] [Invertible (fromBlocks A B 0 D)] :
⅟ (fromBlocks A B 0 D) = fromBlocks (⅟ A) (-(⅟ A * B * ⅟ D)) 0 (⅟ D) := by |
letI := fromBlocksZero₂₁Invertible A B D
convert (rfl : ⅟ (fromBlocks A B 0 D) = _)
| [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... | [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 42 | 43 | theorem eraseLead_support (f : R[X]) : f.eraseLead.support = f.support.erase f.natDegree := by |
simp only [eraseLead, support_erase]
| [
" f.eraseLead.support = f.support.erase f.natDegree"
] | [] |
import Mathlib.Topology.Instances.Irrational
import Mathlib.Topology.Instances.Rat
import Mathlib.Topology.Compactification.OnePoint
#align_import topology.instances.rat_lemmas from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
open Set Metric Filter TopologicalSpace
open Topology One... | Mathlib/Topology/Instances/RatLemmas.lean | 72 | 74 | theorem not_firstCountableTopology_opc : ¬FirstCountableTopology ℚ∞ := by |
intro
exact not_countably_generated_nhds_infty_opc inferInstance
| [
" (cocompact ℚ ⊓ 𝓝 p).NeBot",
" ∀ {i : Set ℚ × Set ℚ}, IsCompact i.1 ∧ p ∈ i.2 ∧ IsOpen i.2 → (i.1ᶜ ∩ i.2).Nonempty",
" ((s, o).1ᶜ ∩ (s, o).2).Nonempty",
" ((s, o).2 ∩ (s, o).1ᶜ).Nonempty",
" ¬(cocompact ℚ).IsCountablyGenerated",
" False",
" ¬(𝓝 ∞).IsCountablyGenerated",
" (comap OnePoint.some (𝓝 ∞... | [
" (cocompact ℚ ⊓ 𝓝 p).NeBot",
" ∀ {i : Set ℚ × Set ℚ}, IsCompact i.1 ∧ p ∈ i.2 ∧ IsOpen i.2 → (i.1ᶜ ∩ i.2).Nonempty",
" ((s, o).1ᶜ ∩ (s, o).2).Nonempty",
" ((s, o).2 ∩ (s, o).1ᶜ).Nonempty",
" ¬(cocompact ℚ).IsCountablyGenerated",
" False",
" ¬(𝓝 ∞).IsCountablyGenerated",
" (comap OnePoint.some (𝓝 ∞... |
import Mathlib.Analysis.Complex.Liouville
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.Topology.Algebra.Polynomial
#align_import analysis.complex.polynomial from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
open Polyn... | Mathlib/Analysis/Complex/Polynomial.lean | 34 | 45 | theorem exists_root {f : ℂ[X]} (hf : 0 < degree f) : ∃ z : ℂ, IsRoot f z := by |
by_contra! hf'
/- Since `f` has no roots, `f⁻¹` is differentiable. And since `f` is a polynomial, it tends to
infinity at infinity, thus `f⁻¹` tends to zero at infinity. By Liouville's theorem, `f⁻¹ = 0`. -/
have (z : ℂ) : (f.eval z)⁻¹ = 0 :=
(f.differentiable.inv hf').apply_eq_of_tendsto_cocompact z <|
... | [
" ∃ z, f.IsRoot z",
" False",
" Filter.Tendsto (fun x => eval x f) (cobounded ℂ) (cobounded ℂ)",
" (eval z f)⁻¹ = (eval z (C 0))⁻¹"
] | [] |
import Mathlib.Data.Nat.Squarefree
import Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity
import Mathlib.Tactic.LinearCombination
#align_import number_theory.sum_two_squares from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
section NegOneSquare
-- This could be formulated for ... | Mathlib/NumberTheory/SumTwoSquares.lean | 77 | 81 | theorem ZMod.isSquare_neg_one_of_dvd {m n : ℕ} (hd : m ∣ n) (hs : IsSquare (-1 : ZMod n)) :
IsSquare (-1 : ZMod m) := by |
let f : ZMod n →+* ZMod m := ZMod.castHom hd _
rw [← RingHom.map_one f, ← RingHom.map_neg]
exact hs.map f
| [
" IsSquare (-1)",
" IsSquare (f (-1))"
] | [] |
import Mathlib.Data.SetLike.Basic
import Mathlib.Data.Finset.Preimage
import Mathlib.ModelTheory.Semantics
#align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w u₁
namespace Set
variable {M : Type w} (A : Set M) (L : FirstOrder.Lang... | Mathlib/ModelTheory/Definability.lean | 147 | 150 | theorem definable_finset_biUnion {ι : Type*} {f : ι → Set (α → M)}
(hf : ∀ i, A.Definable L (f i)) (s : Finset ι) : A.Definable L (⋃ i ∈ s, f i) := by |
rw [← Finset.sup_set_eq_biUnion]
exact definable_finset_sup hf s
| [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... |
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.RingTheory.Trace
import Mathlib.RingTheory.Norm
#align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
universe u v w z
open scoped Matrix
open Matrix FiniteDimensional Fintype Polynomial Fin... | Mathlib/RingTheory/Discriminant.lean | 171 | 176 | theorem discr_powerBasis_eq_prod' [IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
algebraMap K E (discr K pb.basis) =
∏ i : Fin pb.dim, ∏ j ∈ Ioi i, -((e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)) := by |
rw [discr_powerBasis_eq_prod _ _ _ e]
congr; ext i; congr; ext j
ring
| [
" discr A b = discr A (⇑f ∘ b)",
" (traceMatrix A b).det = discr A (⇑f ∘ b)",
" traceMatrix A b = traceMatrix A (⇑f ∘ b)",
" traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝",
" discr K ⇑b ≠ 0",
" (traceForm K L).Nondegenerate",
" (algebraMap K E) (discr K b) = (embeddingsMatrixReindex K E b e).det ... | [
" discr A b = discr A (⇑f ∘ b)",
" (traceMatrix A b).det = discr A (⇑f ∘ b)",
" traceMatrix A b = traceMatrix A (⇑f ∘ b)",
" traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝",
" discr K ⇑b ≠ 0",
" (traceForm K L).Nondegenerate",
" (algebraMap K E) (discr K b) = (embeddingsMatrixReindex K E b e).det ... |
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 | 42 | 42 | theorem zero_bot (n : ℕ) : Ico 0 n = range n := by | rw [Ico, Nat.sub_zero, range_eq_range']
| [
" Ico 0 n = range n"
] | [] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Regular.Basic
#align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb"
variable {R : Type*} {a b : R}
section Monoid
variable [Monoid R]
... | Mathlib/Algebra/Regular/Pow.lean | 36 | 38 | theorem IsRightRegular.pow (n : ℕ) (rra : IsRightRegular a) : IsRightRegular (a ^ n) := by |
rw [IsRightRegular, ← mul_right_iterate]
exact rra.iterate n
| [
" IsLeftRegular (a ^ n)",
" IsRightRegular (a ^ n)",
" Function.Injective (fun x => x * a)^[n]"
] | [
" IsLeftRegular (a ^ n)"
] |
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.NumberTheory.Liouville.Residual
import Mathlib.NumberTheory.Liouville.LiouvilleWith
import Mathlib.Analysis.PSeries
#align_import number_theory.liouville.measure from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open sc... | Mathlib/NumberTheory/Liouville/Measure.lean | 34 | 71 | theorem setOf_liouvilleWith_subset_aux :
{ x : ℝ | ∃ p > 2, LiouvilleWith p x } ⊆
⋃ m : ℤ, (· + (m : ℝ)) ⁻¹' ⋃ n > (0 : ℕ),
{ x : ℝ | ∃ᶠ b : ℕ in atTop, ∃ a ∈ Finset.Icc (0 : ℤ) b,
|x - (a : ℤ) / b| < 1 / (b : ℝ) ^ (2 + 1 / n : ℝ) } := by |
rintro x ⟨p, hp, hxp⟩
rcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩
rw [lt_sub_iff_add_lt'] at hn
suffices ∀ y : ℝ, LiouvilleWith p y → y ∈ Ico (0 : ℝ) 1 → ∃ᶠ b : ℕ in atTop,
∃ a ∈ Finset.Icc (0 : ℤ) b, |y - a / b| < 1 / (b : ℝ) ^ (2 + 1 / (n + 1 : ℕ) : ℝ) by
simp only [mem_iUnion, mem_pre... | [
" {x | ∃ p > 2, LiouvilleWith p x} ⊆\n ⋃ m,\n (fun x => x + ↑m) ⁻¹'\n ⋃ n, ⋃ (_ : n > 0), {x | ∃ᶠ (b : ℕ) in atTop, ∃ a ∈ Finset.Icc 0 ↑b, |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}",
" x ∈\n ⋃ m,\n (fun x => x + ↑m) ⁻¹'\n ⋃ n, ⋃ (_ : n > 0), {x | ∃ᶠ (b : ℕ) in atTop, ∃ a ∈ Finset.Icc 0 ... | [] |
import Mathlib.RingTheory.Adjoin.FG
#align_import ring_theory.adjoin.tower from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Pointwise
universe u v w u₁
variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁)
namespace Algebra
| Mathlib/RingTheory/Adjoin/Tower.lean | 30 | 46 | theorem adjoin_restrictScalars (C D E : Type*) [CommSemiring C] [CommSemiring D] [CommSemiring E]
[Algebra C D] [Algebra C E] [Algebra D E] [IsScalarTower C D E] (S : Set E) :
(Algebra.adjoin D S).restrictScalars C =
(Algebra.adjoin ((⊤ : Subalgebra C D).map (IsScalarTower.toAlgHom C D E)) S).restrictScal... |
suffices
Set.range (algebraMap D E) =
Set.range (algebraMap ((⊤ : Subalgebra C D).map (IsScalarTower.toAlgHom C D E)) E) by
ext x
change x ∈ Subsemiring.closure (_ ∪ S) ↔ x ∈ Subsemiring.closure (_ ∪ S)
rw [this]
ext x
constructor
· rintro ⟨y, hy⟩
exact ⟨⟨algebraMap D E y, ⟨y, ⟨Algebr... | [
" Subalgebra.restrictScalars C (adjoin D S) =\n Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)",
" x ∈ Subalgebra.restrictScalars C (adjoin D S) ↔\n x ∈ Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)",
" x ∈ Subsem... | [] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 84 | 89 | theorem mk_one_mul_one_sub_eq_one : (mk 1 : S⟦X⟧) * (1 - X) = 1 := by |
rw [mul_comm, ext_iff]
intro n
cases n with
| zero => simp
| succ n => simp [sub_mul]
| [
" mk 1 * (1 - X) = 1",
" ∀ (n : ℕ), (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S n) ((1 - X) * mk 1) = (coeff S n) 1",
" (coeff S 0) ((1 - X) * mk 1) = (coeff S 0) 1",
" (coeff S (n + 1)) ((1 - X) * mk 1) = (coeff S (n + 1)) 1"
] | [] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike
open scoped ComplexConjugate
variable {𝕜 E F G : Type... | Mathlib/Analysis/InnerProductSpace/Adjoint.lean | 150 | 152 | theorem apply_norm_eq_sqrt_inner_adjoint_left (A : E →L[𝕜] F) (x : E) :
‖A x‖ = √(re ⟪(A† ∘L A) x, x⟫) := by |
rw [← apply_norm_sq_eq_inner_adjoint_left, Real.sqrt_sq (norm_nonneg _)]
| [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜",
" ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜",
" adjointAux (adjointAux A) = A",
" (adjointAux (adjointAux A)) v = A v",
" ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜",
" ‖adjointAux A‖ = ‖A‖",
" ‖adjointAux A‖ ≤ ‖A‖",
" ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖",
... | [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜",
" ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜",
" adjointAux (adjointAux A) = A",
" (adjointAux (adjointAux A)) v = A v",
" ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜",
" ‖adjointAux A‖ = ‖A‖",
" ‖adjointAux A‖ ≤ ‖A‖",
" ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖",
... |
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 | 85 | 89 | theorem dist_eq_intro {n m k l : ℕ} (h : n + m = k + l) : dist n k = dist l m :=
calc
dist n k = dist (n + m) (k + m) := by | rw [dist_add_add_right]
_ = dist (k + l) (k + m) := by rw [h]
_ = dist l m := by rw [dist_add_add_left]
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m ≤ n + n.dist m",
" m ≤ n.dist m + n",
" n ≤ n.dist m + m",
" n ≤ m.dist n + m",
" n ≤ m + n.dist m",
" n ≤ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m ≤ n + n.dist m",
" m ≤ n.dist m + n",
" n ≤ n.dist m + m",
" n ≤ m.dist n + m",
" n ≤ m + n.dist m",
" n ≤ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... |
import Mathlib.Algebra.Homology.Linear
import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex
import Mathlib.Tactic.Abel
#align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u
open scoped Classical
noncomputable section
open ... | Mathlib/Algebra/Homology/Homotopy.lean | 51 | 54 | theorem dNext_eq (f : ∀ i j, C.X i ⟶ D.X j) {i i' : ι} (w : c.Rel i i') :
dNext i f = C.d i i' ≫ f i' i := by |
obtain rfl := c.next_eq' w
rfl
| [
" (dNext i) f = C.d i i' ≫ f i' i",
" (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i"
] | [] |
import Mathlib.Analysis.NormedSpace.Star.GelfandDuality
import Mathlib.Topology.Algebra.StarSubalgebra
#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
open scoped Pointwise ENNReal NNReal ComplexOrder
open Weak... | Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus.lean | 103 | 174 | theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
IsUnit (⟨a, self_mem ℂ a⟩ : elementalStarAlgebra ℂ a) := by |
/- Sketch of proof: Because `a` is normal, it suffices to prove that `star a * a` is invertible
in `elementalStarAlgebra ℂ a`. For this it suffices to prove that it is sufficiently close to a
unit, namely `algebraMap ℂ _ ‖star a * a‖`, and in this case the required distance is
`‖star a * a‖`. So one must... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖",
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * ... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖",
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * ... |
import Mathlib.Data.Nat.Prime
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.prime_norm_num from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
open Nat Qq Lean Meta
namespace Mathlib.Meta.NormNum
theorem not_prime_mul_of_ble (a b n : ℕ) (h : a * b = n) (h₁ : a.ble 1 = fals... | Mathlib/Tactic/NormNum/Prime.lean | 50 | 56 | theorem MinFacHelper.one_lt {n k : ℕ} (h : MinFacHelper n k) : 1 < n := by |
have : 2 < minFac n := h.1.trans_le h.2.2
obtain rfl | h := n.eq_zero_or_pos
· contradiction
rcases (succ_le_of_lt h).eq_or_lt with rfl|h
· simp_all
exact h
| [
" 1 < n",
" 1 < 0",
" 1 < succ 0"
] | [] |
import Mathlib.Algebra.Algebra.Tower
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.GroupTheory.MonoidLocalization
import Mathlib.RingTheory.Ideal.Basic
import Mathlib.GroupTheory.GroupAction.Ring
#align_import ring_theory.localization.basic from "leanprover-community/mathlib"@"b69c9a770ecf37eb21... | Mathlib/RingTheory/Localization/Basic.lean | 222 | 225 | theorem eq_zero_of_fst_eq_zero {z x} {y : M} (h : z * algebraMap R S y = algebraMap R S x)
(hx : x = 0) : z = 0 := by |
rw [hx, (algebraMap R S).map_zero] at h
exact (IsUnit.mul_left_eq_zero (IsLocalization.map_units S y)).1 h
| [
" (algebraMap R S) x = (algebraMap R S) y",
" (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y",
" (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y",
" ∃ c, ↑c * x = ↑c * y",
" (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z",
" z = 0"
] | [
" (algebraMap R S) x = (algebraMap R S) y",
" (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y",
" (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y",
" ∃ c, ↑c * x = ↑c * y",
" (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z"
] |
import Mathlib.Algebra.Group.Hom.End
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
assert_n... | Mathlib/Algebra/Module/Defs.lean | 241 | 245 | theorem Module.ext' {R : Type*} [Semiring R] {M : Type*} [AddCommMonoid M] (P Q : Module R M)
(w : ∀ (r : R) (m : M), (haveI := P; r • m) = (haveI := Q; r • m)) :
P = Q := by |
ext
exact w _ _
| [
" P = Q",
" SMul.smul x✝¹ x✝ = SMul.smul x✝¹ x✝"
] | [] |
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.Complement
open Monoid Coprod Multiplicative Subgroup Function
def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) :
Con (G ∗ Multiplicative ℤ) :=
conGen (fun x y => ∃ (a : A),
x = inr (ofAdd 1) * inl (a : G) ∧
... | Mathlib/GroupTheory/HNNExtension.lean | 77 | 79 | theorem equiv_symm_eq_conj (b : B) :
(of (φ.symm b : G) : HNNExtension G A B φ) = t⁻¹ * of (b : G) * t := by |
rw [mul_assoc, of_mul_t]; simp
| [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... | [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... |
import Mathlib.Order.Filter.Cofinite
#align_import topology.bornology.basic from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Set Filter
variable {ι α β : Type*}
class Bornology (α : Type*) where
cobounded' : Filter α
le_cofinite' : cobounded' ≤ cofinite
#align borno... | Mathlib/Topology/Bornology/Basic.lean | 161 | 163 | theorem isBounded_empty : IsBounded (∅ : Set α) := by |
rw [isBounded_def, compl_empty]
exact univ_mem
| [
" t = t'",
" { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ } = t'",
" { cobounded' := cobounded'✝¹, le_cofinite' := le_cofinite'✝¹ } =\n { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ }",
" comk (fun x => x ∈ B) empty_mem subset_mem union_mem ≤ cofinite",
" {x} ∈ B",
" IsBounde... | [
" t = t'",
" { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ } = t'",
" { cobounded' := cobounded'✝¹, le_cofinite' := le_cofinite'✝¹ } =\n { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ }",
" comk (fun x => x ∈ B) empty_mem subset_mem union_mem ≤ cofinite",
" {x} ∈ B",
" IsBounde... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 104 | 105 | theorem finrank_ulift : finrank R (ULift M) = finrank R M := by |
simp_rw [finrank, rank_ulift, toNat_lift]
| [
" finrank R (ULift.{u_2, v} M) = finrank R M"
] | [] |
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.MeasureTheory.Integral.Average
#align_import measure_theory.integral.interval_average from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open MeasureTheory Set TopologicalSpace
open scoped Interval
variable {E : Ty... | Mathlib/MeasureTheory/Integral/IntervalAverage.lean | 43 | 49 | theorem interval_average_eq (f : ℝ → E) (a b : ℝ) :
(⨍ x in a..b, f x) = (b - a)⁻¹ • ∫ x in a..b, f x := by |
rcases le_or_lt a b with h | h
· rw [setAverage_eq, uIoc_of_le h, Real.volume_Ioc, intervalIntegral.integral_of_le h,
ENNReal.toReal_ofReal (sub_nonneg.2 h)]
· rw [setAverage_eq, uIoc_of_lt h, Real.volume_Ioc, intervalIntegral.integral_of_ge h.le,
ENNReal.toReal_ofReal (sub_nonneg.2 h.le), smul_neg, ... | [
" ⨍ (x : ℝ) in a..b, f x = ⨍ (x : ℝ) in b..a, f x",
" ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x"
] | [
" ⨍ (x : ℝ) in a..b, f x = ⨍ (x : ℝ) in b..a, f x"
] |
import Mathlib.Algebra.Group.Opposite
import Mathlib.Algebra.Group.Units.Hom
#align_import algebra.group.prod from "leanprover-community/mathlib"@"cd391184c85986113f8c00844cfe6dda1d34be3d"
assert_not_exists MonoidWithZero
-- TODO:
-- assert_not_exists AddMonoidWithOne
assert_not_exists DenselyOrdered
variable {A ... | Mathlib/Algebra/Group/Prod.lean | 86 | 88 | theorem mk_one_mul_mk_one [Mul M] [Monoid N] (a₁ a₂ : M) :
(a₁, (1 : N)) * (a₂, 1) = (a₁ * a₂, 1) := by |
rw [mk_mul_mk, mul_one]
| [
" (1, b₁) * (1, b₂) = (1, b₁ * b₂)",
" (a₁, 1) * (a₂, 1) = (a₁ * a₂, 1)"
] | [
" (1, b₁) * (1, b₂) = (1, b₁ * b₂)"
] |
import Mathlib.Algebra.GroupWithZero.Hom
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.GroupWithZero.Canonical
import Mathlib.Order.Hom.Basic
#align_import algebra.order.hom.monoid from "leanprover-community/mathlib"@"3342d1b2178381196f818146ff79bc0e7ccd9e2d"
open Function
variable {F... | Mathlib/Algebra/Order/Hom/Monoid.lean | 182 | 184 | theorem map_nonpos (ha : a ≤ 0) : f a ≤ 0 := by |
rw [← map_zero f]
exact OrderHomClass.mono _ ha
| [
" 0 ≤ f a",
" f 0 ≤ f a",
" f a ≤ 0",
" f a ≤ f 0"
] | [
" 0 ≤ f a",
" f 0 ≤ f a"
] |
import Mathlib.CategoryTheory.Sites.Spaces
import Mathlib.Topology.Sheaves.Sheaf
import Mathlib.CategoryTheory.Sites.DenseSubsite
#align_import topology.sheaves.sheaf_condition.sites from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
noncomputable section
set_option linter.uppercaseLe... | Mathlib/Topology/Sheaves/SheafCondition/Sites.lean | 90 | 94 | theorem covering_presieve_eq_self {Y : Opens X} (R : Presieve Y) :
presieveOfCoveringAux (coveringOfPresieve Y R) Y = R := by |
funext Z
ext f
exact ⟨fun ⟨⟨_, f', h⟩, rfl⟩ => by rwa [Subsingleton.elim f f'], fun h => ⟨⟨Z, f, h⟩, rfl⟩⟩
| [
" presieveOfCoveringAux (coveringOfPresieve Y R) Y = R",
" f ∈ presieveOfCoveringAux (coveringOfPresieve Y R) Y ↔ f ∈ R",
" f ∈ R"
] | [] |
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Basic
import Mathlib.RingTheory.Localization.FractionRing
#align_import ring_theory.localization.localization_localization from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
open Function
namespace ... | Mathlib/RingTheory/Localization/LocalizationLocalization.lean | 53 | 61 | theorem mem_localizationLocalizationSubmodule {x : R} :
x ∈ localizationLocalizationSubmodule M N ↔
∃ (y : N) (z : M), algebraMap R S x = y * algebraMap R S z := by |
rw [localizationLocalizationSubmodule, Submonoid.mem_comap, Submonoid.mem_sup]
constructor
· rintro ⟨y, hy, _, ⟨z, hz, rfl⟩, e⟩
exact ⟨⟨y, hy⟩, ⟨z, hz⟩, e.symm⟩
· rintro ⟨y, z, e⟩
exact ⟨y, y.prop, _, ⟨z, z.prop, rfl⟩, e.symm⟩
| [
" x ∈ localizationLocalizationSubmodule M N ↔ ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraMap R S) x) ↔\n ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraM... | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Data.Complex.Exponential
import Mathlib.Data.Complex.Module
import Mathlib.RingTheory.Polynomial.Chebyshev
#align_import analysis.special_functions.trigonometric.chebyshev from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
set_... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean | 45 | 47 | theorem algebraMap_eval_U (x : R) (n : ℤ) :
algebraMap R A ((U R n).eval x) = (U A n).eval (algebraMap R A x) := by |
rw [← aeval_algebraMap_apply_eq_algebraMap_eval, aeval_U]
| [
" (aeval x) (T R n) = eval x (T A n)",
" (aeval x) (U R n) = eval x (U A n)",
" (algebraMap R A) (eval x (T R n)) = eval ((algebraMap R A) x) (T A n)",
" (algebraMap R A) (eval x (U R n)) = eval ((algebraMap R A) x) (U A n)"
] | [
" (aeval x) (T R n) = eval x (T A n)",
" (aeval x) (U R n) = eval x (U A n)",
" (algebraMap R A) (eval x (T R n)) = eval ((algebraMap R A) x) (T A n)"
] |
import Mathlib.Order.Filter.Basic
import Mathlib.Topology.Bases
import Mathlib.Data.Set.Accumulate
import Mathlib.Topology.Bornology.Basic
import Mathlib.Topology.LocallyFinite
open Set Filter Topology TopologicalSpace Classical Function
universe u v
variable {X : Type u} {Y : Type v} {ι : Type*}
variable [Topolog... | Mathlib/Topology/Compactness/Compact.lean | 48 | 52 | theorem IsCompact.compl_mem_sets (hs : IsCompact s) {f : Filter X} (hf : ∀ x ∈ s, sᶜ ∈ 𝓝 x ⊓ f) :
sᶜ ∈ f := by |
contrapose! hf
simp only [not_mem_iff_inf_principal_compl, compl_compl, inf_assoc] at hf ⊢
exact @hs _ hf inf_le_right
| [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot"
] | [] |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ι : Type*} {α : Type u} {β : Type v} {γ : Type w}
open Function Set
open scoped Topology ... | Mathlib/Topology/MetricSpace/Isometry.lean | 144 | 147 | theorem preimage_emetric_ball (h : Isometry f) (x : α) (r : ℝ≥0∞) :
f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r := by |
ext y
simp [h.edist_eq]
| [
" Isometry f ↔ ∀ (x y : α), nndist (f x) (f y) = nndist x y",
" Isometry f ↔ ∀ (x y : α), dist (f x) (f y) = dist x y",
" edist x y ≤ ↑1 * edist (f x) (f y)",
" edist (f x) (f y) = edist x y",
" edist (f y) (f y) = edist y y",
" edist (Prod.map f g x) (Prod.map f g y) = edist x y",
" edist ((fun g i => ... | [
" Isometry f ↔ ∀ (x y : α), nndist (f x) (f y) = nndist x y",
" Isometry f ↔ ∀ (x y : α), dist (f x) (f y) = dist x y",
" edist x y ≤ ↑1 * edist (f x) (f y)",
" edist (f x) (f y) = edist x y",
" edist (f y) (f y) = edist y y",
" edist (Prod.map f g x) (Prod.map f g y) = edist x y",
" edist ((fun g i => ... |
import Mathlib.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 | 66 | 71 | theorem stream_eq_none_of_fr_eq_zero {ifp_n : IntFractPair K}
(stream_nth_eq : IntFractPair.stream v n = some ifp_n) (nth_fr_eq_zero : ifp_n.fr = 0) :
IntFractPair.stream v (n + 1) = none := by |
cases' ifp_n with _ fr
change fr = 0 at nth_fr_eq_zero
simp [IntFractPair.stream, stream_nth_eq, nth_fr_eq_zero]
| [
" IntFractPair.stream v (n + 1) = none"
] | [] |
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Topology.Algebra.Module.Basic
import Mathlib.RingTheory.Adjoin.Basic
#align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db"
open scoped Classical
open Set TopologicalSpace Algebra
open sc... | Mathlib/Topology/Algebra/Algebra.lean | 110 | 111 | theorem Subalgebra.isClosed_topologicalClosure (s : Subalgebra R A) :
IsClosed (s.topologicalClosure : Set A) := by | convert @isClosed_closure A s _
| [
" IsClosed ↑s.topologicalClosure"
] | [] |
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Order.Filter.IndicatorFunction
open MeasureTheory
section DominatedConvergenceTheorem
open Set Filter TopologicalSpace ENNReal
open scoped Topology
namespace MeasureTheory
variable {α E G: Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E] [C... | Mathlib/MeasureTheory/Integral/DominatedConvergence.lean | 53 | 62 | theorem tendsto_integral_of_dominated_convergence {F : ℕ → α → G} {f : α → G} (bound : α → ℝ)
(F_measurable : ∀ n, AEStronglyMeasurable (F n) μ) (bound_integrable : Integrable bound μ)
(h_bound : ∀ n, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound a)
(h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) :
Tendsto (fun... |
by_cases hG : CompleteSpace G
· simp only [integral, hG, L1.integral]
exact tendsto_setToFun_of_dominated_convergence (dominatedFinMeasAdditive_weightedSMul μ)
bound F_measurable bound_integrable h_bound h_lim
· simp [integral, hG]
| [
" Tendsto (fun n => ∫ (a : α), F n a ∂μ) atTop (𝓝 (∫ (a : α), f a ∂μ))",
" Tendsto\n (fun n =>\n if h : True then\n if hf : Integrable (fun a => F n a) μ then L1.integralCLM (Integrable.toL1 (fun a => F n a) hf) else 0\n else 0)\n atTop\n (𝓝\n (if h : True then\n if hf : In... | [] |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set... | Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 152 | 157 | theorem measure_biUnion₀ {s : Set β} {f : β → Set α} (hs : s.Countable)
(hd : s.Pairwise (AEDisjoint μ on f)) (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) := by |
haveI := hs.toEncodable
rw [biUnion_eq_iUnion]
exact measure_iUnion₀ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2
| [
" (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x",
" μ (s ∪ t) + μ (s ∩ t) = μ s + μ t",
" μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t",
" μ (s ∆ t) = μ (s \\ t) + μ (t \\ s)",
" μ (⋃ b ∈ s, f b) = ∑' (p : ↑s), μ (f ↑p)",
" μ (⋃ x, ... | [
" (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x",
" μ (s ∪ t) + μ (s ∩ t) = μ s + μ t",
" μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t",
" μ (s ∆ t) = μ (s \\ t) + μ (t \\ s)"
] |
import Mathlib.MeasureTheory.Measure.Doubling
import Mathlib.MeasureTheory.Covering.Vitali
import Mathlib.MeasureTheory.Covering.Differentiation
#align_import measure_theory.covering.density_theorem from "leanprover-community/mathlib"@"5f6e827d81dfbeb6151d7016586ceeb0099b9655"
noncomputable section
open Set Filt... | Mathlib/MeasureTheory/Covering/DensityTheorem.lean | 71 | 109 | theorem closedBall_mem_vitaliFamily_of_dist_le_mul {K : ℝ} {x y : α} {r : ℝ} (h : dist x y ≤ K * r)
(rpos : 0 < r) : closedBall y r ∈ (vitaliFamily μ K).setsAt x := by |
let R := scalingScaleOf μ (max (4 * K + 3) 3)
simp only [vitaliFamily, VitaliFamily.enlarge, Vitali.vitaliFamily, mem_union, mem_setOf_eq,
isClosed_ball, true_and_iff, (nonempty_ball.2 rpos).mono ball_subset_interior_closedBall,
measurableSet_closedBall]
/- The measure is doubling on scales smaller than ... | [
" VitaliFamily μ",
" ∀ (x : α),\n ∃ᶠ (r : ℝ) in 𝓝[>] 0, μ (closedBall x (3 * r)) ≤ ↑(scalingConstantOf μ (max (4 * K + 3) 3)) * μ (closedBall x r)",
" ∃ᶠ (r : ℝ) in 𝓝[>] 0, μ (closedBall x (3 * r)) ≤ ↑(scalingConstantOf μ (max (4 * K + 3) 3)) * μ (closedBall x r)",
" ∃ x_1 ∈ U, μ (closedBall x (3 * x_1))... | [
" VitaliFamily μ",
" ∀ (x : α),\n ∃ᶠ (r : ℝ) in 𝓝[>] 0, μ (closedBall x (3 * r)) ≤ ↑(scalingConstantOf μ (max (4 * K + 3) 3)) * μ (closedBall x r)",
" ∃ᶠ (r : ℝ) in 𝓝[>] 0, μ (closedBall x (3 * r)) ≤ ↑(scalingConstantOf μ (max (4 * K + 3) 3)) * μ (closedBall x r)",
" ∃ x_1 ∈ U, μ (closedBall x (3 * x_1))... |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe"
open scoped LinearAlgebra.Projectivization
variable {ι K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ι → ... | Mathlib/LinearAlgebra/Projectivization/Independence.lean | 84 | 94 | theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by |
refine ⟨?_, fun h => ?_⟩
· rintro ⟨ff, hff, hh1⟩
contrapose! hh1
choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
convert hh1.units_smul a⁻¹
ext i
simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply]
· convert Dependent.mk _ _ h
· simp on... | [
" Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)",
" Independent f → LinearIndependent K (Projectivization.rep ∘ f)",
" LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)",
" (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff",
" (Projectivization.rep ∘ fun i => mk K (... | [
" Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)",
" Independent f → LinearIndependent K (Projectivization.rep ∘ f)",
" LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)",
" (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff",
" (Projectivization.rep ∘ fun i => mk K (... |
import Mathlib.CategoryTheory.Functor.ReflectsIso
import Mathlib.CategoryTheory.MorphismProperty.Basic
universe w v v' u u'
namespace CategoryTheory
namespace MorphismProperty
variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
def IsInvertedBy (P : MorphismProperty C) (F : C ⥤ D) : Prop :=
... | Mathlib/CategoryTheory/MorphismProperty/IsInvertedBy.lean | 128 | 131 | theorem IsInvertedBy.iff_of_iso (W : MorphismProperty C) {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) :
W.IsInvertedBy F₁ ↔ W.IsInvertedBy F₂ := by |
dsimp [IsInvertedBy]
simp only [NatIso.isIso_map_iff e]
| [
" F₁ = F₂",
" { obj := obj✝, property := property✝ } = F₂",
" { obj := obj✝¹, property := property✝¹ } = { obj := obj✝, property := property✝ }",
" { obj := obj✝, property := property✝¹ } =\n { obj := { obj := obj✝, property := property✝¹ }.obj, property := property✝ }",
" W.IsInvertedBy F₁ ↔ W.IsInverte... | [
" F₁ = F₂",
" { obj := obj✝, property := property✝ } = F₂",
" { obj := obj✝¹, property := property✝¹ } = { obj := obj✝, property := property✝ }",
" { obj := obj✝, property := property✝¹ } =\n { obj := { obj := obj✝, property := property✝¹ }.obj, property := property✝ }"
] |
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.Ring
#align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Finset
namespace Nat
variable (p : ℕ → Prop)
section Count
variable [DecidablePred p]
def count (n : ℕ) : ℕ :=
(List.range n).... | Mathlib/Data/Nat/Count.lean | 106 | 107 | theorem count_succ_eq_succ_count_iff {n : ℕ} : count p (n + 1) = count p n + 1 ↔ p n := by |
by_cases h : p n <;> simp [h, count_succ]
| [
" count p 0 = 0",
" Fintype { i // i < n ∧ p i }",
" ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... | [
" count p 0 = 0",
" Fintype { i // i < n ∧ p i }",
" ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... |
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.Data.ZMod.Quotient
import Mathlib.RingTheory.DedekindDomain.AdicValuation
#align_import ring_theory.dedekind_domain.selmer_group from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973"
set_option quotPrecheck false
local notation K "... | Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean | 93 | 102 | theorem valuationOfNeZeroToFun_eq (x : Kˣ) :
(v.valuationOfNeZeroToFun x : ℤₘ₀) = v.valuation (x : K) := by |
rw [show v.valuation (x : K) = _ * _ by rfl]
rw [Units.val_inv_eq_inv_val]
change _ = ite _ _ _ * (ite _ _ _)⁻¹
simp_rw [IsLocalization.toLocalizationMap_sec, SubmonoidClass.coe_subtype,
if_neg <| IsLocalization.sec_fst_ne_zero le_rfl x.ne_zero,
if_neg (nonZeroDivisors.coe_ne_zero _),
valuationOfNe... | [
" ↑(v.valuationOfNeZeroToFun x) = v.valuation ↑x",
" v.valuation ↑x = ?m.4479 * ?m.4482",
" ↑(v.valuationOfNeZeroToFun x) =\n ↑v.intValuation.toMonoidWithZeroHom ((IsLocalization.toLocalizationMap R⁰ K).sec ↑x).1 *\n ↑((IsUnit.liftRight ((↑v.intValuation.toMonoidWithZeroHom).restrict R⁰) ⋯)\n ... | [] |
import Mathlib.Combinatorics.Quiver.Cast
import Mathlib.Combinatorics.Quiver.Symmetric
import Mathlib.Data.Sigma.Basic
import Mathlib.Logic.Equiv.Basic
import Mathlib.Tactic.Common
#align_import combinatorics.quiver.covering from "leanprover-community/mathlib"@"188a411e916e1119e502dbe35b8b475716362401"
open Funct... | Mathlib/Combinatorics/Quiver/Covering.lean | 132 | 136 | theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
(φsur : Surjective φ.obj) : ψ.IsCovering := by |
refine ⟨fun v => ?_, fun v => ?_⟩ <;> obtain ⟨u, rfl⟩ := φsur v
exacts [(Bijective.of_comp_iff _ (hφ.star_bijective u)).mp (hφψ.star_bijective u),
(Bijective.of_comp_iff _ (hφ.costar_bijective u)).mp (hφψ.costar_bijective u)]
| [
" Injective fun f => φ.map f",
" f = g",
" φ.star u (Star.mk f) = φ.star u (Star.mk g)",
" ψ.IsCovering",
" Bijective (ψ.star v)",
" Bijective (ψ.costar v)",
" Bijective (ψ.costar (φ.obj u))"
] | [
" Injective fun f => φ.map f",
" f = g",
" φ.star u (Star.mk f) = φ.star u (Star.mk g)"
] |
import Mathlib.Data.Set.Lattice
import Mathlib.Order.Directed
#align_import data.set.Union_lift from "leanprover-community/mathlib"@"5a4ea8453f128345f73cc656e80a49de2a54f481"
variable {α : Type*} {ι β : Sort _}
namespace Set
section UnionLift
@[nolint unusedArguments]
noncomputable def iUnionLift (S : ι → Set... | Mathlib/Data/Set/UnionLift.lean | 96 | 100 | theorem iUnionLift_const (c : T) (ci : ∀ i, S i) (hci : ∀ i, (ci i : α) = c) (cβ : β)
(h : ∀ i, f i (ci i) = cβ) : iUnionLift S f hf T hT c = cβ := by |
let ⟨i, hi⟩ := Set.mem_iUnion.1 (hT c.prop)
have : ci i = ⟨c, hi⟩ := Subtype.ext (hci i)
rw [iUnionLift_of_mem _ hi, ← this, h]
| [
" iUnionLift S f hf T hT x = f i ⟨↑x, hx⟩",
" iUnionLift S f hf T hT ⟨x, hx✝⟩ = f i ⟨↑⟨x, hx✝⟩, hx⟩",
" iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" x ∈ iUnionLift S f hf T hT ⁻¹' t ↔ x ∈ inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" iUnionLift S f hf T hT x ∈ t... | [
" iUnionLift S f hf T hT x = f i ⟨↑x, hx⟩",
" iUnionLift S f hf T hT ⟨x, hx✝⟩ = f i ⟨↑⟨x, hx✝⟩, hx⟩",
" iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" x ∈ iUnionLift S f hf T hT ⁻¹' t ↔ x ∈ inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" iUnionLift S f hf T hT x ∈ t... |
import Mathlib.Topology.Category.TopCat.Opens
import Mathlib.Data.Set.Subsingleton
#align_import topology.category.Top.open_nhds from "leanprover-community/mathlib"@"1ec4876214bf9f1ddfbf97ae4b0d777ebd5d6938"
open CategoryTheory TopologicalSpace Opposite
universe u
variable {X Y : TopCat.{u}} (f : X ⟶ Y)
namesp... | Mathlib/Topology/Category/TopCat/OpenNhds.lean | 129 | 129 | theorem op_map_id_obj (x : X) (U : (OpenNhds x)ᵒᵖ) : (map (𝟙 X) x).op.obj U = U := by | simp
| [
" x✝ ≤ x✝",
" x✝.obj ≤ x✝.obj",
" x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝",
" x✝².obj ≤ x✝¹.obj → x✝¹.obj ≤ x✝.obj → x✝².obj ≤ x✝.obj",
" x✝ ≤ ⊤",
" x✝.obj ≤ ⊤",
" (map (𝟙 X) x).obj U.unop = U.unop",
" (map (𝟙 X) x).op.obj U = U"
] | [
" x✝ ≤ x✝",
" x✝.obj ≤ x✝.obj",
" x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝",
" x✝².obj ≤ x✝¹.obj → x✝¹.obj ≤ x✝.obj → x✝².obj ≤ x✝.obj",
" x✝ ≤ ⊤",
" x✝.obj ≤ ⊤",
" (map (𝟙 X) x).obj U.unop = U.unop"
] |
import Mathlib.Topology.UniformSpace.UniformConvergence
import Mathlib.Topology.UniformSpace.UniformEmbedding
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.Algebra.Group.Basic
import Mathlib.Topology.DiscreteSubset
import Mathlib.Tactic.Abel... | Mathlib/Topology/Algebra/UniformGroup.lean | 103 | 106 | theorem UniformContinuous.mul [UniformSpace β] {f : β → α} {g : β → α} (hf : UniformContinuous f)
(hg : UniformContinuous g) : UniformContinuous fun x => f x * g x := by |
have : UniformContinuous fun x => f x / (g x)⁻¹ := hf.div hg.inv
simp_all
| [
" UniformContinuous fun p => p.1 / p.2",
" UniformContinuous fun x => (f x)⁻¹",
" UniformContinuous fun x => f x * g x"
] | [
" UniformContinuous fun p => p.1 / p.2",
" UniformContinuous fun x => (f x)⁻¹"
] |
import Mathlib.Data.Nat.Choose.Central
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Data.Nat.Multiplicity
#align_import data.nat.choose.factorization from "leanprover-community/mathlib"@"dc9db541168768af03fe228703e758e649afdbfc"
namespace Nat
variable {p n k : ℕ}
theorem factorization_choose_le_l... | Mathlib/Data/Nat/Choose/Factorization.lean | 61 | 88 | theorem factorization_choose_of_lt_three_mul (hp' : p ≠ 2) (hk : p ≤ k) (hk' : p ≤ n - k)
(hn : n < 3 * p) : (choose n k).factorization p = 0 := by |
cases' em' p.Prime with hp hp
· exact factorization_eq_zero_of_non_prime (choose n k) hp
cases' lt_or_le n k with hnk hkn
· simp [choose_eq_zero_of_lt hnk]
rw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)]
simp only [hp.multiplicity_choose hkn (lt_add_one _), PartENat.get_natCast, Fin... | [
" (n.choose k).factorization p ≤ p.log n",
" k ≤ n",
" (n.choose k).factorization p = 0",
" (multiplicity p (n.choose k)).get ⋯ ≤ p.log n",
" (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n",
" (n.choose k).factorization p ≤ 1",
" p.log n ≤ 1",
... | [
" (n.choose k).factorization p ≤ p.log n",
" k ≤ n",
" (n.choose k).factorization p = 0",
" (multiplicity p (n.choose k)).get ⋯ ≤ p.log n",
" (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n",
" (n.choose k).factorization p ≤ 1",
" p.log n ≤ 1",
... |
import Mathlib.Data.List.OfFn
import Mathlib.Data.List.Range
#align_import data.list.indexes from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
assert_not_exists MonoidWithZero
universe u v
open Function
namespace List
variable {α : Type u} {β : Type v}
section FoldrIdx
-- Porting... | Mathlib/Data/List/Indexes.lean | 253 | 255 | theorem foldrIdx_eq_foldr_enum (f : ℕ → α → β → β) (b : β) (as : List α) :
foldrIdx f b as = foldr (uncurry f) b (enum as) := by |
simp only [foldrIdx, foldrIdxSpec, foldrIdx_eq_foldrIdxSpec, enum]
| [
" foldrIdx f b as start = foldrIdxSpec f b as start",
" foldrIdx f b [] start = foldrIdxSpec f b [] start",
" foldrIdx f b (head✝ :: tail✝) start = foldrIdxSpec f b (head✝ :: tail✝) start",
" foldrIdx f b as = foldr (uncurry f) b as.enum"
] | [
" foldrIdx f b as start = foldrIdxSpec f b as start",
" foldrIdx f b [] start = foldrIdxSpec f b [] start",
" foldrIdx f b (head✝ :: tail✝) start = foldrIdxSpec f b (head✝ :: tail✝) start"
] |
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Localization.Integral
#align_import ring_theory.integrally_closed from "leanprover-community/mathlib"@"d35b4ff446f1421bd551fafa4b8efd98ac3ac408"
open scoped nonZeroDivisors Polynomial
open Polynomial
abbrev IsIntegrallyClosedIn (R A : Type*) [... | Mathlib/RingTheory/IntegrallyClosed.lean | 124 | 127 | theorem isIntegrallyClosed_iff :
IsIntegrallyClosed R ↔ ∀ {x : K}, IsIntegral R x → ∃ y, algebraMap R K y = x := by |
simp [isIntegrallyClosed_iff_isIntegrallyClosedIn K, isIntegrallyClosedIn_iff,
IsFractionRing.injective R K]
| [
" IsIntegrallyClosedIn R B → IsIntegrallyClosedIn R A",
" IsIntegrallyClosedIn R A",
" Function.Injective (⇑f ∘ ⇑(algebraMap R A))",
" ⇑f ∘ ⇑(algebraMap R A) = ⇑(algebraMap R B)",
" ∃ y, (algebraMap R A) y = x✝",
" (∃ y, (algebraMap R A) y = x✝) → IsIntegral R x✝",
" IsIntegral R ((algebraMap R A) y)",
... | [
" IsIntegrallyClosedIn R B → IsIntegrallyClosedIn R A",
" IsIntegrallyClosedIn R A",
" Function.Injective (⇑f ∘ ⇑(algebraMap R A))",
" ⇑f ∘ ⇑(algebraMap R A) = ⇑(algebraMap R B)",
" ∃ y, (algebraMap R A) y = x✝",
" (∃ y, (algebraMap R A) y = x✝) → IsIntegral R x✝",
" IsIntegral R ((algebraMap R A) y)",
... |
import Mathlib.Algebra.Group.Embedding
import Mathlib.Data.Fin.Basic
import Mathlib.Data.Finset.Union
#align_import data.finset.image from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
-- TODO
-- assert_not_exists OrderedCommMonoid
assert_not_exists MonoidWithZero
assert_not_exists MulA... | Mathlib/Data/Finset/Image.lean | 151 | 153 | theorem map_comm {β'} {f : β ↪ γ} {g : α ↪ β} {f' : α ↪ β'} {g' : β' ↪ γ}
(h_comm : ∀ a, f (g a) = g' (f' a)) : (s.map g).map f = (s.map f').map g' := by |
simp_rw [map_map, Embedding.trans, Function.comp, h_comm]
| [
" b ∈ map f.toEmbedding s ↔ f.symm b ∈ s",
" (∃ a ∈ s, f.toEmbedding a = b) ↔ f.symm b ∈ s",
" (∃ a ∈ s, f.toEmbedding a = b) → f.symm b ∈ s",
" f.symm (f.toEmbedding a) ∈ s",
" f.toEmbedding (f.symm b) = b",
" p x hx",
" p (f y) hx",
" ∀ (x : β), x ∈ ↑(map f s) ↔ x ∈ ⇑f '' ↑s",
" x✝ ∈ map f s.toFin... | [
" b ∈ map f.toEmbedding s ↔ f.symm b ∈ s",
" (∃ a ∈ s, f.toEmbedding a = b) ↔ f.symm b ∈ s",
" (∃ a ∈ s, f.toEmbedding a = b) → f.symm b ∈ s",
" f.symm (f.toEmbedding a) ∈ s",
" f.toEmbedding (f.symm b) = b",
" p x hx",
" p (f y) hx",
" ∀ (x : β), x ∈ ↑(map f s) ↔ x ∈ ⇑f '' ↑s",
" x✝ ∈ map f s.toFin... |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.Topology.MetricSpace.Contracting
#align_import analysis.ODE.picard_lindelof from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Function Set Metric TopologicalSpace intervalIntegral MeasureTheory
open MeasureTh... | Mathlib/Analysis/ODE/PicardLindelof.lean | 127 | 133 | theorem dist_t₀_le (t : Icc v.tMin v.tMax) : dist t v.t₀ ≤ v.tDist := by |
rw [Subtype.dist_eq, Real.dist_eq]
rcases le_total t v.t₀ with ht | ht
· rw [abs_of_nonpos (sub_nonpos.2 <| Subtype.coe_le_coe.2 ht), neg_sub]
exact (sub_le_sub_left t.2.1 _).trans (le_max_right _ _)
· rw [abs_of_nonneg (sub_nonneg.2 <| Subtype.coe_le_coe.2 ht)]
exact (sub_le_sub_right t.2.2 _).trans (... | [
" ↑⟨0, ⋯⟩ ∈ Icc 0 0",
" 0 ∈ {0}",
" ContinuousOn (fun t => 0 t x✝¹) (Icc 0 0)",
" dist t v.t₀ ≤ v.tDist",
" |↑t - ↑v.t₀| ≤ v.tDist",
" ↑v.t₀ - ↑t ≤ v.tDist",
" ↑t - ↑v.t₀ ≤ v.tDist"
] | [
" ↑⟨0, ⋯⟩ ∈ Icc 0 0",
" 0 ∈ {0}",
" ContinuousOn (fun t => 0 t x✝¹) (Icc 0 0)"
] |
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.normed_space.enorm from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2"
noncomputable section
attribute [local instance] Classical.propDecidable
open ENNReal
structure ENorm (𝕜 : Type*) (V : Type*) [NormedField 𝕜] [Ad... | Mathlib/Analysis/NormedSpace/ENorm.lean | 120 | 124 | theorem map_sub_le (x y : V) : e (x - y) ≤ e x + e y :=
calc
e (x - y) = e (x + -y) := by | rw [sub_eq_add_neg]
_ ≤ e x + e (-y) := e.map_add_le x (-y)
_ = e x + e y := by rw [e.map_neg]
| [
" e₁ = e₂",
" { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂",
" { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m... | [
" e₁ = e₂",
" { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂",
" { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m... |
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Data.Set.MemPartition
import Mathlib.Order.Filter.CountableSeparatingOn
open Set MeasureTheory
namespace MeasurableSpace
variable {α β : Type*}
class CountablyGenerated (α : Type*) [m : MeasurableSpace α] : Prop where
isCountablyGenerated : ∃ b... | Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean | 103 | 107 | theorem CountablyGenerated.sup {m₁ m₂ : MeasurableSpace β} (h₁ : @CountablyGenerated β m₁)
(h₂ : @CountablyGenerated β m₂) : @CountablyGenerated β (m₁ ⊔ m₂) := by |
rcases h₁ with ⟨⟨b₁, hb₁c, rfl⟩⟩
rcases h₂ with ⟨⟨b₂, hb₂c, rfl⟩⟩
exact @mk _ (_ ⊔ _) ⟨_, hb₁c.union hb₂c, generateFrom_sup_generateFrom⟩
| [
" MeasurableSet s",
" generateFrom (range (natGeneratingSequence α)) = m",
" CountablyGenerated α",
" CountablyGenerated β"
] | [
" MeasurableSet s",
" generateFrom (range (natGeneratingSequence α)) = m",
" CountablyGenerated α"
] |
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 | 156 | 159 | theorem invertible_unique {α : Type u} [Monoid α] (a b : α) [Invertible a] [Invertible b]
(h : a = b) : ⅟ a = ⅟ b := by |
apply invOf_eq_right_inv
rw [h, mul_invOf_self]
| [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a",
" a * b * ⅟b = a",
" ⅟a = ⅟b",
" a * ⅟b = 1"
] | [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a",
" a * b * ⅟b = a"
] |
import Mathlib.Data.List.Lex
import Mathlib.Data.Char
import Mathlib.Tactic.AdaptationNote
import Mathlib.Algebra.Order.Group.Nat
#align_import data.string.basic from "leanprover-community/mathlib"@"d13b3a4a392ea7273dfa4727dbd1892e26cfd518"
namespace String
def ltb (s₁ s₂ : Iterator) : Bool :=
if s₂.hasNext th... | Mathlib/Data/String/Basic.lean | 60 | 74 | theorem ltb_cons_addChar (c : Char) (cs₁ cs₂ : List Char) (i₁ i₂ : Pos) :
ltb ⟨⟨c :: cs₁⟩, i₁ + c⟩ ⟨⟨c :: cs₂⟩, i₂ + c⟩ = ltb ⟨⟨cs₁⟩, i₁⟩ ⟨⟨cs₂⟩, i₂⟩ := by |
apply ltb.inductionOn ⟨⟨cs₁⟩, i₁⟩ ⟨⟨cs₂⟩, i₂⟩ (motive := fun ⟨⟨cs₁⟩, i₁⟩ ⟨⟨cs₂⟩, i₂⟩ ↦
ltb ⟨⟨c :: cs₁⟩, i₁ + c⟩ ⟨⟨c :: cs₂⟩, i₂ + c⟩ =
ltb ⟨⟨cs₁⟩, i₁⟩ ⟨⟨cs₂⟩, i₂⟩) <;> simp only <;>
intro ⟨cs₁⟩ ⟨cs₂⟩ i₁ i₂ <;>
intros <;>
(conv => lhs; unfold ltb) <;> (conv => rhs; unfold ltb) <;>
simp only [Iterator.... | [
" DecidableRel fun x x_1 => x < x_1",
" DecidableRel fun x x_1 => ltb x.iter x_1.iter = true",
" ltb { s := { data := c :: cs₁ }, i := i₁ + c } { s := { data := c :: cs₂ }, i := i₂ + c } =\n ltb { s := { data := cs₁ }, i := i₁ } { s := { data := cs₂ }, i := i₂ }",
" ∀ (s₁ s₂ : String) (i₁ i₂ : Pos),\n {... | [
" DecidableRel fun x x_1 => x < x_1",
" DecidableRel fun x x_1 => ltb x.iter x_1.iter = true"
] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike
open scoped ComplexConjugate
variable {𝕜 E F G : Type... | Mathlib/Analysis/InnerProductSpace/Adjoint.lean | 80 | 82 | theorem adjointAux_inner_left (A : E →L[𝕜] F) (x : E) (y : F) : ⟪adjointAux A y, x⟫ = ⟪y, A x⟫ := by |
rw [adjointAux_apply, toDual_symm_apply, toSesqForm_apply_coe, coe_comp', innerSL_apply_coe,
Function.comp_apply]
| [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜"
] | [] |
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 | 85 | 100 | theorem iteratedDeriv_const_smul {n : ℕ} {f : 𝕜 → F} (h : ContDiff 𝕜 n f) (c : 𝕜) :
iteratedDeriv n (fun x => f (c * x)) = fun x => c ^ n • iteratedDeriv n f (c * x) := by |
induction n with
| zero => simp
| succ n ih =>
funext x
have h₀ : DifferentiableAt 𝕜 (iteratedDeriv n f) (c * x) :=
h.differentiable_iteratedDeriv n (Nat.cast_lt.mpr n.lt_succ_self) |>.differentiableAt
have h₁ : DifferentiableAt 𝕜 (fun x => iteratedDeriv n f (c * x)) x := by
rw [← Funct... | [
" 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.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Tactic.NthRewrite
#align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
namespace Nat
theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd ... | Mathlib/Data/Nat/GCD/Basic.lean | 115 | 116 | theorem gcd_self_sub_right {m n : ℕ} (h : m ≤ n) : gcd n (n - m) = gcd n m := by |
rw [gcd_comm, gcd_self_sub_left h, gcd_comm]
| [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... | [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... |
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 | 138 | 141 | theorem δ_comp_δ_self' {n} {j : Fin (n + 3)} {i : Fin (n + 2)} (H : j = Fin.castSucc i) :
X.δ j ≫ X.δ i = X.δ i.succ ≫ X.δ i := by |
subst H
rw [δ_comp_δ_self]
| [
" 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.Analysis.SpecialFunctions.Exp
import Mathlib.Topology.ContinuousFunction.Basic
import Mathlib.Analysis.Normed.Field.UnitBall
#align_import analysis.complex.circle from "leanprover-community/mathlib"@"ad3dfaca9ea2465198bcf58aa114401c324e29d1"
noncomputable section
open Complex Metric
open ComplexC... | Mathlib/Analysis/Complex/Circle.lean | 81 | 82 | theorem coe_inv_circle_eq_conj (z : circle) : ↑z⁻¹ = conj (z : ℂ) := by |
rw [coe_inv_circle, inv_def, normSq_eq_of_mem_circle, inv_one, ofReal_one, mul_one]
| [
" z ∈ circle ↔ normSq z = 1",
" normSq ↑z = 1",
" ↑z⁻¹ = (starRingEnd ℂ) ↑z"
] | [
" z ∈ circle ↔ normSq z = 1",
" normSq ↑z = 1"
] |
import Mathlib.Data.Finsupp.Defs
#align_import data.finsupp.indicator from "leanprover-community/mathlib"@"842328d9df7e96fd90fc424e115679c15fb23a71"
noncomputable section
open Finset Function
variable {ι α : Type*}
namespace Finsupp
variable [Zero α] {s : Finset ι} (f : ∀ i ∈ s, α) {i : ι}
def indicator (s ... | Mathlib/Data/Finsupp/Indicator.lean | 59 | 63 | theorem indicator_injective : Injective fun f : ∀ i ∈ s, α => indicator s f := by |
intro a b h
ext i hi
rw [← indicator_of_mem hi a, ← indicator_of_mem hi b]
exact DFunLike.congr_fun h i
| [
" i ∈ map (Embedding.subtype fun x => x ∈ s) (filter (fun i => f ↑i ⋯ ≠ 0) s.attach) ↔\n (fun i => if H : i ∈ s then f i H else 0) i ≠ 0",
" (indicator s f) i = if hi : i ∈ s then f i hi else 0",
" (if H : i ∈ s then f i H else 0) = if hi : i ∈ s then f i hi else 0",
" Injective fun f => indicator s f",
... | [
" i ∈ map (Embedding.subtype fun x => x ∈ s) (filter (fun i => f ↑i ⋯ ≠ 0) s.attach) ↔\n (fun i => if H : i ∈ s then f i H else 0) i ≠ 0",
" (indicator s f) i = if hi : i ∈ s then f i hi else 0",
" (if H : i ∈ s then f i H else 0) = if hi : i ∈ s then f i hi else 0"
] |
import Mathlib.LinearAlgebra.Matrix.BilinearForm
import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Vandermonde
import Mathlib.LinearAlgebra.Trace
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosu... | Mathlib/RingTheory/Trace.lean | 102 | 103 | theorem trace_eq_zero_of_not_exists_basis (h : ¬∃ s : Finset S, Nonempty (Basis s R S)) :
trace R S = 0 := by | ext s; simp [trace_apply, LinearMap.trace, h]
| [
" trace R S = 0",
" (trace R S) s = 0 s"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 156 | 158 | theorem natDegree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : p.natDegree ≤ q.natDegree := by |
rcases h1 with ⟨q, rfl⟩; rw [mul_ne_zero_iff] at h2
rw [natDegree_mul h2.1 h2.2]; exact Nat.le_add_right _ _
| [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... |
set_option autoImplicit true
namespace Array
@[simp]
theorem extract_eq_nil_of_start_eq_end {a : Array α} :
a.extract i i = #[] := by
refine extract_empty_of_stop_le_start a ?h
exact Nat.le_refl i
theorem extract_append_left {a b : Array α} {i j : Nat} (h : j ≤ a.size) :
(a ++ b).extract i j = a.extrac... | Mathlib/Data/Array/ExtractLemmas.lean | 29 | 38 | theorem extract_append_right {a b : Array α} {i j : Nat} (h : a.size ≤ i) :
(a ++ b).extract i j = b.extract (i - a.size) (j - a.size) := by |
apply ext
· rw [size_extract, size_extract, size_append]
omega
· intro k hi h2
rw [get_extract, get_extract,
get_append_right (show size a ≤ i + k by omega)]
congr
omega
| [
" a.extract i i = #[]",
" i ≤ i",
" (a ++ b).extract i j = a.extract i j",
" ((a ++ b).extract i j).size = (a.extract i j).size",
" min j (a.size + b.size) - i = min j a.size - i",
" ∀ (i_1 : Nat) (hi₁ : i_1 < ((a ++ b).extract i j).size) (hi₂ : i_1 < (a.extract i j).size),\n ((a ++ b).extract i j)[i_1... | [
" a.extract i i = #[]",
" i ≤ i",
" (a ++ b).extract i j = a.extract i j",
" ((a ++ b).extract i j).size = (a.extract i j).size",
" min j (a.size + b.size) - i = min j a.size - i",
" ∀ (i_1 : Nat) (hi₁ : i_1 < ((a ++ b).extract i j).size) (hi₂ : i_1 < (a.extract i j).size),\n ((a ++ b).extract i j)[i_1... |
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
namespace Multiset
variable {α : Type*}
section Sup
-- can be defined with just `[Bot α]` where some lemmas hold without... | Mathlib/Data/Multiset/Lattice.lean | 93 | 99 | theorem nodup_sup_iff {α : Type*} [DecidableEq α] {m : Multiset (Multiset α)} :
m.sup.Nodup ↔ ∀ a : Multiset α, a ∈ m → a.Nodup := by |
-- Porting note: this was originally `apply m.induction_on`, which failed due to
-- `failed to elaborate eliminator, expected type is not available`
induction' m using Multiset.induction_on with _ _ h
· simp
· simp [h]
| [
" (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)",
" sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a",
" ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)",
" (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂",
" (s₁ ∪ ... | [
" (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)",
" sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a",
" ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)",
" (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂",
" (s₁ ∪ ... |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.Tactic.FieldSimp
#align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open AffineMap
variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE]
def ... | Mathlib/LinearAlgebra/AffineSpace/Slope.lean | 73 | 75 | theorem slope_sub_smul (f : k → E) {a b : k} (h : a ≠ b) :
slope (fun x => (x - a) • f x) a b = f b := by |
simp [slope, inv_smul_smul₀ (sub_ne_zero.2 h.symm)]
| [
" slope f a a = 0",
" (b - a) • slope f a b = f b -ᵥ f a",
" (a - a) • slope f a a = f a -ᵥ f a",
" (b - a) • slope f a b +ᵥ f a = f b",
" (slope fun x => f x +ᵥ c) = slope f",
" slope (fun x => f x +ᵥ c) a b = slope f a b",
" slope (fun x => (x - a) • f x) a b = f b"
] | [
" slope f a a = 0",
" (b - a) • slope f a b = f b -ᵥ f a",
" (a - a) • slope f a a = f a -ᵥ f a",
" (b - a) • slope f a b +ᵥ f a = f b",
" (slope fun x => f x +ᵥ c) = slope f",
" slope (fun x => f x +ᵥ c) a b = slope f a b"
] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Nat
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Fintype
import Mathlib.Tactic.IntervalCases
#align_import number_the... | Mathlib/NumberTheory/LucasLehmer.lean | 148 | 151 | theorem sMod_lt (p : ℕ) (hp : p ≠ 0) (i : ℕ) : sMod p i < 2 ^ p - 1 := by |
rw [← sMod_mod]
refine (Int.emod_lt _ (mersenne_int_ne_zero p hp)).trans_eq ?_
exact abs_of_nonneg (mersenne_int_pos hp).le
| [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... | [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... |
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Analysis.InnerProductSpace.l2Space
import Mathlib.MeasureTheory.Function.ContinuousMapDense
import Mathlib.MeasureTheory.Function.L2Space
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.M... | Mathlib/Analysis/Fourier/AddCircle.lean | 184 | 193 | theorem fourier_add_half_inv_index {n : ℤ} (hn : n ≠ 0) (hT : 0 < T) (x : AddCircle T) :
@fourier T n (x + ↑(T / 2 / n)) = -fourier n x := by |
rw [fourier_apply, zsmul_add, ← QuotientAddGroup.mk_zsmul, toCircle_add, coe_mul_unitSphere]
have : (n : ℂ) ≠ 0 := by simpa using hn
have : (@toCircle T (n • (T / 2 / n) : ℝ) : ℂ) = -1 := by
rw [zsmul_eq_mul, toCircle, Function.Periodic.lift_coe, expMapCircle_apply]
replace hT := Complex.ofReal_ne_zero.m... | [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... | [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : ... | Mathlib/LinearAlgebra/SymplecticGroup.lean | 66 | 70 | theorem J_det_mul_J_det : det (J l R) * det (J l R) = 1 := by |
rw [← det_mul, J_squared, ← one_smul R (-1 : Matrix _ _ R), smul_neg, ← neg_smul, det_smul,
Fintype.card_sum, det_one, mul_one]
apply Even.neg_one_pow
exact even_add_self _
| [
" (J l R)ᵀ = -J l R",
" fromBlocks 0 1 (-1ᵀ) 0 = (-1 • 0).fromBlocks (-1 • -1) (-1 • 1) (-1 • 0)",
" J l R * J l R = -1",
" (0 * 0 + -1 * 1).fromBlocks (0 * -1 + -1 * 0) (1 * 0 + 0 * 1) (1 * -1 + 0 * 0) = -1",
" (-1).fromBlocks 0 0 (-1) = -1",
" (J l R)⁻¹ = -J l R",
" J l R * -J l R = 1",
" - -1 = 1",... | [
" (J l R)ᵀ = -J l R",
" fromBlocks 0 1 (-1ᵀ) 0 = (-1 • 0).fromBlocks (-1 • -1) (-1 • 1) (-1 • 0)",
" J l R * J l R = -1",
" (0 * 0 + -1 * 1).fromBlocks (0 * -1 + -1 * 0) (1 * 0 + 0 * 1) (1 * -1 + 0 * 0) = -1",
" (-1).fromBlocks 0 0 (-1) = -1",
" (J l R)⁻¹ = -J l R",
" J l R * -J l R = 1",
" - -1 = 1"
... |
import Mathlib.Analysis.Convex.Combination
import Mathlib.Analysis.Convex.Function
import Mathlib.Tactic.FieldSimp
#align_import analysis.convex.jensen from "leanprover-community/mathlib"@"bfad3f455b388fbcc14c49d0cac884f774f14d20"
open Finset LinearMap Set
open scoped Classical
open Convex Pointwise
variable {�... | Mathlib/Analysis/Convex/Jensen.lean | 52 | 58 | theorem ConvexOn.map_centerMass_le (hf : ConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
(h₁ : 0 < ∑ i ∈ t, w i) (hmem : ∀ i ∈ t, p i ∈ s) :
f (t.centerMass w p) ≤ t.centerMass w (f ∘ p) := by |
have hmem' : ∀ i ∈ t, (p i, (f ∘ p) i) ∈ { p : E × β | p.1 ∈ s ∧ f p.1 ≤ p.2 } := fun i hi =>
⟨hmem i hi, le_rfl⟩
convert (hf.convex_epigraph.centerMass_mem h₀ h₁ hmem').2 <;>
simp only [centerMass, Function.comp, Prod.smul_fst, Prod.fst_sum, Prod.smul_snd, Prod.snd_sum]
| [
" f (t.centerMass w p) ≤ t.centerMass w (f ∘ p)",
" t.centerMass w p = (t.centerMass (fun i => w i) fun i => (p i, (f ∘ p) i)).1",
" t.centerMass w (f ∘ p) = (t.centerMass (fun i => w i) fun i => (p i, (f ∘ p) i)).2"
] | [] |
import Mathlib.Analysis.Calculus.ContDiff.Bounds
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Normed.Group.ZeroAtInfty
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Ana... | Mathlib/Analysis/Distribution/SchwartzSpace.lean | 173 | 175 | theorem isBigO_cocompact_zpow [ProperSpace E] (k : ℤ) :
f =O[cocompact E] fun x => ‖x‖ ^ k := by |
simpa only [Real.rpow_intCast] using isBigO_cocompact_rpow f k
| [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1",
" ⇑f =O[... | [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1",
" ⇑f =O[... |
import Mathlib.Topology.ContinuousOn
#align_import topology.algebra.order.left_right from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Topology
section TopologicalSpace
variable {α β : Type*} [TopologicalSpace α] [LinearOrder α] [TopologicalSpace β]
theorem nhds_lef... | Mathlib/Topology/Order/LeftRight.lean | 127 | 129 | theorem continuousAt_iff_continuous_left_right {a : α} {f : α → β} :
ContinuousAt f a ↔ ContinuousWithinAt f (Iic a) a ∧ ContinuousWithinAt f (Ici a) a := by |
simp only [ContinuousWithinAt, ContinuousAt, ← tendsto_sup, nhds_left_sup_nhds_right]
| [
" 𝓝[≤] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[>] a = 𝓝[≠] a",
" ContinuousAt f a ↔ ContinuousWithinAt f (Iic a) a ∧ ContinuousWithinAt f (Ici a) a"
] | [
" 𝓝[≤] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[>] a = 𝓝[≠] a"
] |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Localization.Basic
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Surreal.Basic
#align_import set_theory.surreal.dyadic from "leanprover-community/mathlib"@"9... | Mathlib/SetTheory/Surreal/Dyadic.lean | 90 | 95 | theorem numeric_powHalf (n) : (powHalf n).Numeric := by |
induction' n with n hn
· exact numeric_one
· constructor
· simpa using hn.moveLeft_lt default
· exact ⟨fun _ => numeric_zero, fun _ => hn⟩
| [
" (powHalf n).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf 0).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf n).moveLeft i = 0",
" (powHalf 0).moveLeft i = 0",
" (powHalf (n✝ + 1)).moveLeft i = 0",
" (powHalf 0).moveLeft PUnit.unit = 0",
" (powHalf (n✝ + 1)).mo... | [
" (powHalf n).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf 0).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf n).moveLeft i = 0",
" (powHalf 0).moveLeft i = 0",
" (powHalf (n✝ + 1)).moveLeft i = 0",
" (powHalf 0).moveLeft PUnit.unit = 0",
" (powHalf (n✝ + 1)).mo... |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.Calculus.FDeriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Basic
open Topology InnerProductSpace Set
noncomputable section
variable {𝕜 F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [CompleteSpace F]
variabl... | Mathlib/Analysis/Calculus/Gradient/Basic.lean | 313 | 314 | theorem gradient_const : ∇ (fun _ => c) x = 0 := by |
rw [gradient, fderiv_const, Pi.zero_apply, map_zero]
| [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0",
" HasGradientAt f (∇ f x) x",
" HasFDerivAt f (fderiv 𝕜 f x) x",
" HasGradientWithinAt f (gradientWithin f s x) s x",
"... | [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0",
" HasGradientAt f (∇ f x) x",
" HasFDerivAt f (fderiv 𝕜 f x) x",
" HasGradientWithinAt f (gradientWithin f s x) s x",
"... |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function ... | Mathlib/Algebra/Field/Basic.lean | 96 | 98 | theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by | rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
| [
" -1 * -1 = 1"
] | [] |
import Mathlib.Data.List.Basic
#align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {α β : Type*}
namespace List
attribute [simp] join
-- Porting note (#10618): simp can prove this
-- @... | Mathlib/Data/List/Join.lean | 38 | 41 | theorem join_append (L₁ L₂ : List (List α)) : join (L₁ ++ L₂) = join L₁ ++ join L₂ := by |
induction L₁
· rfl
· simp [*]
| [
" [l].join = l",
" (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []",
" (L₁ ++ L₂).join = L₁.join ++ L₂.join",
" ([] ++ L₂).join = [].join ++ L₂.join",
" (head✝ :: tail✝ ++ L₂).join = (head✝ :: tail✝).join ++ L₂.join"
] | [
" [l].join = l",
" (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []"
] |
import Mathlib.RingTheory.HahnSeries.Multiplication
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.Data.Finsupp.PWO
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open sco... | Mathlib/RingTheory/HahnSeries/PowerSeries.lean | 112 | 113 | theorem ofPowerSeries_apply_coeff (x : PowerSeries R) (n : ℕ) :
(ofPowerSeries Γ R x).coeff n = PowerSeries.coeff R n x := by | simp [ofPowerSeries_apply]
| [
" (fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f) =\n f",
" ((fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f)).coeff\n x✝ =\n f.coeff x✝",
" (fu... | [
" (fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f) =\n f",
" ((fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f)).coeff\n x✝ =\n f.coeff x✝",
" (fu... |
import Mathlib.Analysis.SpecialFunctions.Exp
import Mathlib.Tactic.Positivity.Core
import Mathlib.Algebra.Ring.NegOnePow
#align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
noncomputable section
open scoped Classical
open Top... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean | 54 | 56 | theorem continuous_sin : Continuous sin := by |
change Continuous fun z => (exp (-z * I) - exp (z * I)) * I / 2
continuity
| [
" Continuous sin",
" Continuous fun z => (cexp (-z * I) - cexp (z * I)) * I / 2"
] | [] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Order.RelIso.Basic
#align_import order.ord_continuous from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u v w x
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Sort x}
open Function OrderDual Set
... | Mathlib/Order/OrdContinuous.lean | 131 | 132 | theorem map_sSup (hf : LeftOrdContinuous f) (s : Set α) : f (sSup s) = ⨆ x ∈ s, f x := by |
rw [hf.map_sSup', sSup_image]
| [
" f (sSup s) = ⨆ x ∈ s, f x"
] | [] |
import Mathlib.Data.Nat.Choose.Central
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Data.Nat.Multiplicity
#align_import data.nat.choose.factorization from "leanprover-community/mathlib"@"dc9db541168768af03fe228703e758e649afdbfc"
namespace Nat
variable {p n k : ℕ}
theorem factorization_choose_le_l... | Mathlib/Data/Nat/Choose/Factorization.lean | 100 | 103 | theorem factorization_factorial_eq_zero_of_lt (h : n < p) : (factorial n).factorization p = 0 := by |
induction' n with n hn; · simp
rw [factorial_succ, factorization_mul n.succ_ne_zero n.factorial_ne_zero, Finsupp.coe_add,
Pi.add_apply, hn (lt_of_succ_lt h), add_zero, factorization_eq_zero_of_lt h]
| [
" (n.choose k).factorization p ≤ p.log n",
" k ≤ n",
" (n.choose k).factorization p = 0",
" (multiplicity p (n.choose k)).get ⋯ ≤ p.log n",
" (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n",
" (n.choose k).factorization p ≤ 1",
" p.log n ≤ 1",
... | [
" (n.choose k).factorization p ≤ p.log n",
" k ≤ n",
" (n.choose k).factorization p = 0",
" (multiplicity p (n.choose k)).get ⋯ ≤ p.log n",
" (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n",
" (n.choose k).factorization p ≤ 1",
" p.log n ≤ 1",
... |
import Mathlib.Analysis.Normed.Group.Basic
#align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
section HammingDistNorm
open Finset Function
variable {α ι : Type*} {β : ι → Type*} [Fintype ι] [∀ i, DecidableEq (β i)]
variable {γ : ι → Type*} [∀ ... | Mathlib/InformationTheory/Hamming.lean | 85 | 87 | theorem swap_hammingDist : swap (@hammingDist _ β _ _) = hammingDist := by |
funext x y
exact hammingDist_comm _ _
| [
" hammingDist x x = 0",
" ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1",
" hammingDist x y = hammingDist y x",
" hammingDist x z ≤ hammingDist x y + hammingDist y z",
" (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card",
" filter (... | [
" hammingDist x x = 0",
" ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1",
" hammingDist x y = hammingDist y x",
" hammingDist x z ≤ hammingDist x y + hammingDist y z",
" (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card",
" filter (... |
import Mathlib.Data.Int.GCD
import Mathlib.Tactic.NormNum
namespace Tactic
namespace NormNum
theorem int_gcd_helper' {d : ℕ} {x y : ℤ} (a b : ℤ) (h₁ : (d : ℤ) ∣ x) (h₂ : (d : ℤ) ∣ y)
(h₃ : x * a + y * b = d) : Int.gcd x y = d := by
refine Nat.dvd_antisymm ?_ (Int.natCast_dvd_natCast.1 (Int.dvd_gcd h₁ h₂))
... | Mathlib/Tactic/NormNum/GCD.lean | 68 | 70 | theorem int_lcm_helper {x y : ℤ} {x' y' d : ℕ}
(hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.lcm x' y' = d) :
Int.lcm x y = d := by | subst_vars; rw [Int.lcm_def]
| [
" x.gcd y = d",
" x.gcd y ∣ d",
" ↑(x.gcd y) ∣ x * a + y * b",
" ↑(x.gcd y) ∣ x * a",
" ↑(x.gcd y) ∣ y * b",
" (↑x).gcd ↑y = d",
" ↑x * ↑a + ↑y * -↑b = ↑d",
" ↑x * ↑a = ↑y * ↑b + ↑d",
" (fun x => d * x) (x.lcm y) = (fun x => d * x) m",
" d * x.lcm y = d * m",
" x.gcd y = x.natAbs.gcd y.natAbs",
... | [
" x.gcd y = d",
" x.gcd y ∣ d",
" ↑(x.gcd y) ∣ x * a + y * b",
" ↑(x.gcd y) ∣ x * a",
" ↑(x.gcd y) ∣ y * b",
" (↑x).gcd ↑y = d",
" ↑x * ↑a + ↑y * -↑b = ↑d",
" ↑x * ↑a = ↑y * ↑b + ↑d",
" (fun x => d * x) (x.lcm y) = (fun x => d * x) m",
" d * x.lcm y = d * m",
" x.gcd y = x.natAbs.gcd y.natAbs"
] |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 139 | 141 | theorem gcd_eq_gcd_ab : (gcd x y : ℤ) = x * gcdA x y + y * gcdB x y := by |
have := @xgcdAux_P x y x y 1 0 0 1 (by simp [P]) (by simp [P])
rwa [xgcdAux_val, xgcd_val] at this
| [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ... | [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 245 | 256 | theorem irreducible_of_monic (hp : p.Monic) (hp1 : p ≠ 1) :
Irreducible p ↔ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1 := by |
refine
⟨fun h f g hf hg hp => (h.2 f g hp.symm).imp hf.eq_one_of_isUnit hg.eq_one_of_isUnit, fun h =>
⟨hp1 ∘ hp.eq_one_of_isUnit, fun f g hfg =>
(h (g * C f.leadingCoeff) (f * C g.leadingCoeff) ?_ ?_ ?_).symm.imp
(isUnit_of_mul_eq_one f _)
(isUnit_of_mul_eq_one g _)⟩⟩
· rwa [M... | [
" Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1",
" (g * C f.leadingCoeff).Monic",
" (f * C g.leadingCoeff).Monic",
" g * C f.leadingCoeff * (f * C g.leadingCoeff) = p"
] | [] |
import Mathlib.MeasureTheory.Measure.FiniteMeasure
import Mathlib.MeasureTheory.Integral.Average
#align_import measure_theory.measure.probability_measure from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open MeasureTheory
open Set
open Filter
open BoundedCon... | Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean | 193 | 196 | theorem ennreal_coeFn_eq_coeFn_toMeasure (ν : ProbabilityMeasure Ω) (s : Set Ω) :
(ν s : ℝ≥0∞) = (ν : Measure Ω) s := by |
rw [← coeFn_comp_toFiniteMeasure_eq_coeFn, FiniteMeasure.ennreal_coeFn_eq_coeFn_toMeasure,
toMeasure_comp_toFiniteMeasure_eq_toMeasure]
| [
" ↑μ s = ↑ν s",
" ν univ ≠ 0",
" ↑(ν s) = ↑ν s"
] | [
" ↑μ s = ↑ν s",
" ν univ ≠ 0"
] |
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed_space.int from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
namespace Int
theorem nnnorm_coe_units (e : ℤˣ) : ‖(e : ℤ)‖₊ = 1 := by
obtain rfl | rfl := units_eq_one_or e <;>
simp only [Units.coe_neg_one, Un... | Mathlib/Analysis/NormedSpace/Int.lean | 29 | 30 | theorem norm_coe_units (e : ℤˣ) : ‖(e : ℤ)‖ = 1 := by |
rw [← coe_nnnorm, nnnorm_coe_units, NNReal.coe_one]
| [
" ‖↑e‖₊ = 1",
" ‖↑1‖₊ = 1",
" ‖↑(-1)‖₊ = 1",
" ‖↑e‖ = 1"
] | [
" ‖↑e‖₊ = 1",
" ‖↑1‖₊ = 1",
" ‖↑(-1)‖₊ = 1"
] |
import Mathlib.Data.Rat.Sqrt
import Mathlib.Data.Real.Sqrt
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.IntervalCases
#align_import data.real.irrational from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d"
open Rat Real multiplicity
def ... | Mathlib/Data/Real/Irrational.lean | 32 | 34 | theorem irrational_iff_ne_rational (x : ℝ) : Irrational x ↔ ∀ a b : ℤ, x ≠ a / b := by |
simp only [Irrational, Rat.forall, cast_mk, not_exists, Set.mem_range, cast_intCast, cast_div,
eq_comm]
| [
" Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b"
] | [] |
import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Group.Subgroup.MulOpposite
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.SetTheory.Cardinal.Finite
#align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4... | Mathlib/GroupTheory/Coset.lean | 302 | 308 | theorem leftRel_apply {x y : α} : @Setoid.r _ (leftRel s) x y ↔ x⁻¹ * y ∈ s :=
calc
(∃ a : s.op, y * MulOpposite.unop a = x) ↔ ∃ a : s, y * a = x :=
s.equivOp.symm.exists_congr_left
_ ↔ ∃ a : s, x⁻¹ * y = a⁻¹ := by |
simp only [inv_mul_eq_iff_eq_mul, Subgroup.coe_inv, eq_mul_inv_iff_mul_eq]
_ ↔ x⁻¹ * y ∈ s := by simp [exists_inv_mem_iff_exists_mem]
| [
" (∃ a, y * ↑a = x) ↔ ∃ a, x⁻¹ * y = ↑a⁻¹",
" (∃ a, x⁻¹ * y = ↑a⁻¹) ↔ x⁻¹ * y ∈ s"
] | [] |
import Mathlib.Control.Bifunctor
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.functor from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
universe u v w
variable {α β : Type u}
open Equiv
namespace Bifunctor
variable {α' β' : Type v} (F : Type u → Type v → Type w) [Bifu... | Mathlib/Logic/Equiv/Functor.lean | 90 | 92 | theorem mapEquiv_refl_refl : mapEquiv F (Equiv.refl α) (Equiv.refl α') = Equiv.refl (F α α') := by |
ext x
simp [id_bimap]
| [
" bimap (⇑h.symm) (⇑h'.symm) (bimap (⇑h) (⇑h') x) = x",
" bimap (⇑h) (⇑h') (bimap (⇑h.symm) (⇑h'.symm) x) = x",
" mapEquiv F (Equiv.refl α) (Equiv.refl α') = Equiv.refl (F α α')",
" (mapEquiv F (Equiv.refl α) (Equiv.refl α')) x = (Equiv.refl (F α α')) x"
] | [
" bimap (⇑h.symm) (⇑h'.symm) (bimap (⇑h) (⇑h') x) = x",
" bimap (⇑h) (⇑h') (bimap (⇑h.symm) (⇑h'.symm) x) = x"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 201 | 202 | theorem coeff_cos_bit1 : coeff A (bit1 n) (cos A) = 0 := by |
rw [cos, coeff_mk, if_neg n.not_even_bit1]
| [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)",
" (coeff A (bit1 n)) (cos A) = 0"
] | [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)"
] |
import Mathlib.Order.ConditionallyCompleteLattice.Finset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54"
assert_not_exists MonoidWithZero
open Set
namespace Nat
open scoped Classical
noncomputable instance : ... | Mathlib/Data/Nat/Lattice.lean | 50 | 55 | theorem sInf_eq_zero {s : Set ℕ} : sInf s = 0 ↔ 0 ∈ s ∨ s = ∅ := by |
cases eq_empty_or_nonempty s with
| inl h => subst h
simp only [or_true_iff, eq_self_iff_true, iff_true_iff, iInf, InfSet.sInf,
mem_empty_iff_false, exists_false, dif_neg, not_false_iff]
| inr h => simp only [h.ne_empty, or_false_iff, Nat.sInf_def, h, Nat.find_eq_zero]
| [
" sInf s = 0 ↔ 0 ∈ s ∨ s = ∅",
" sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅"
] | [] |
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.LinearAlgebra.AffineSpace.Ordered
import Mathlib.Topology.ContinuousFunction.Basic
import Mathlib.Topology.GDelta
import Mathlib.Analysis.NormedSpace.FunctionSeries
import Mathlib.Analysis.SpecificLimits.Basic
#align_import topology.urysohns_lemma from "lea... | Mathlib/Topology/UrysohnsLemma.lean | 178 | 182 | theorem approx_nonneg (c : CU P) (n : ℕ) (x : X) : 0 ≤ c.approx n x := by |
induction' n with n ihn generalizing c
· exact indicator_nonneg (fun _ _ => zero_le_one) _
· simp only [approx, midpoint_eq_smul_add, invOf_eq_inv]
refine mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg ?_ ?_) <;> apply ihn
| [
" approx n c x = 0",
" approx 0 c x = 0",
" approx (n + 1) c x = 0",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 0",
" x ∈ c.left.C",
" approx n c x = 1",
" approx 0 c x = 1",
" approx (n + 1) c x = 1",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 1",
" x ∉ c.left.U",
" 0 ... | [
" approx n c x = 0",
" approx 0 c x = 0",
" approx (n + 1) c x = 0",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 0",
" x ∈ c.left.C",
" approx n c x = 1",
" approx 0 c x = 1",
" approx (n + 1) c x = 1",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 1",
" x ∉ c.left.U"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.