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.CategoryTheory.Balanced
import Mathlib.CategoryTheory.LiftingProperties.Basic
#align_import category_theory.limits.shapes.strong_epi from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v u
namespace CategoryTheory
variable {C : Type u} [Category.{v} C]
variable... | Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean | 114 | 123 | theorem strongEpi_of_strongEpi [StrongEpi (f ≫ g)] : StrongEpi g :=
{ epi := epi_of_epi f g
llp := fun {X Y} z _ => by
constructor
intro u v sq
have h₀ : (f ≫ u) ≫ z = (f ≫ g) ≫ v := by | simp only [Category.assoc, sq.w]
exact
CommSq.HasLift.mk'
⟨(CommSq.mk h₀).lift, by
simp only [← cancel_mono z, Category.assoc, CommSq.fac_right, sq.w], by simp⟩ }
| [
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Mono z], HasLiftingProperty (f ≫ g) z",
" HasLiftingProperty (f ≫ g) z✝",
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Epi z], HasLiftingProperty z (f ≫ g)",
" HasLiftingProperty z✝ (f ≫ g)",
" HasLiftingProperty g z",
" ∀ {f : Q ⟶ X} {g_1 : R ⟶ Y} (sq : CommSq f g z g_1), sq.HasLif... | [
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Mono z], HasLiftingProperty (f ≫ g) z",
" HasLiftingProperty (f ≫ g) z✝",
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Epi z], HasLiftingProperty z (f ≫ g)",
" HasLiftingProperty z✝ (f ≫ g)"
] |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1
#align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e"
open TopologicalSpace MeasureTheory.Lp Filter
open scoped ENNReal Topology MeasureTheory
names... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean | 159 | 165 | theorem condexp_undef (hf : ¬Integrable f μ) : μ[f|m] = 0 := by |
by_cases hm : m ≤ m0
swap; · rw [condexp_of_not_le hm]
by_cases hμm : SigmaFinite (μ.trim hm)
swap; · rw [condexp_of_not_sigmaFinite hm hμm]
haveI : SigmaFinite (μ.trim hm) := hμm
rw [condexp_of_sigmaFinite, if_neg hf]
| [
" μ[f|m] = 0",
" ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)",
" SigmaFinite (μ.trim hm) → ¬Integrable f μ",
" μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0",
" (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S... | [
" μ[f|m] = 0",
" ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)",
" SigmaFinite (μ.trim hm) → ¬Integrable f μ",
" μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0",
" (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S... |
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.CharP.Algebra
import Mathlib.Data.Nat.Prime
#align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u
variable (R : Type u)
section Semiring
variable [Semiring R]
class inductive Ex... | Mathlib/Algebra/CharP/ExpChar.lean | 113 | 116 | theorem charZero_of_expChar_one' [hq : ExpChar R 1] : CharZero R := by |
cases hq
· assumption
· exact False.elim (CharP.char_ne_one R 1 rfl)
| [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1",
" p = q ↔ p.Prime",
" p = 1 ↔ p.Prime",
" 0 = 1 ↔ Nat.Prime 0",
" p = 0",
" CharZero R"
] | [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1",
" p = q ↔ p.Prime",
" p = 1 ↔ p.Prime",
" 0 = 1 ↔ Nat.Prime 0",
" p = 0"
] |
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 | 117 | 118 | theorem leftCoset_rightCoset (s : Set α) (a b : α) : op b • a • s = a • (op b • s) := by |
simp [← image_smul, (image_comp _ _ _).symm, Function.comp, mul_assoc]
| [
" a • b • s = (a * b) • s",
" op b • op a • s = op (a * b) • s",
" op b • a • s = a • op b • s"
] | [
" a • b • s = (a * b) • s",
" op b • op a • s = op (a * b) • s"
] |
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.LinearAlgebra.Basic
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.BilinearMap
#align_import linear_algebra.sesquilinear_form from "leanprover-community/mathlib"@"87c54600fe3cdc7d32ff5b50873ac724d86aef8d"
variable {R R₁ R₂ R₃ M M₁ M₂ M₃... | Mathlib/LinearAlgebra/SesquilinearForm.lean | 64 | 66 | theorem isOrtho_zero_left (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) (x) : IsOrtho B (0 : M₁) x := by |
dsimp only [IsOrtho]
rw [map_zero B, zero_apply]
| [
" B.IsOrtho 0 x",
" (B 0) x = 0"
] | [] |
import Mathlib.MeasureTheory.Measure.Typeclasses
import Mathlib.MeasureTheory.Measure.MutuallySingular
import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated
open Function Set
open scoped ENNReal Classical
noncomputable section
variable {α β δ : Type*} [MeasurableSpace α] [MeasurableSpace β] {s : Set α} ... | Mathlib/MeasureTheory/Measure/Dirac.lean | 87 | 92 | theorem map_eq_sum [Countable β] [MeasurableSingletonClass β] (μ : Measure α) (f : α → β)
(hf : Measurable f) : μ.map f = sum fun b : β => μ (f ⁻¹' {b}) • dirac b := by |
ext s
have : ∀ y ∈ s, MeasurableSet (f ⁻¹' {y}) := fun y _ => hf (measurableSet_singleton _)
simp [← tsum_measure_preimage_singleton (to_countable s) this, *,
tsum_subtype s fun b => μ (f ⁻¹' {b}), ← indicator_mul_right s fun b => μ (f ⁻¹' {b})]
| [
" inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory",
" (dirac a) s = 1",
" (dirac a) s ≤ univ.indicator 1 a",
" (dirac a) s ≤ (dirac a) univ",
" (dirac a) s = s.indicator 1 a",
" (dirac a) s ≤ 0",
" (dirac a) {a}ᶜ = 0",
" (map f (dirac a)) s = (dirac (f a)) s",
" map (fun x => c) μ = μ univ • dirac c",
... | [
" inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory",
" (dirac a) s = 1",
" (dirac a) s ≤ univ.indicator 1 a",
" (dirac a) s ≤ (dirac a) univ",
" (dirac a) s = s.indicator 1 a",
" (dirac a) s ≤ 0",
" (dirac a) {a}ᶜ = 0",
" (map f (dirac a)) s = (dirac (f a)) s",
" map (fun x => c) μ = μ univ • dirac c",
... |
import Mathlib.Analysis.Quaternion
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
#align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Quaternion Nat
open... | Mathlib/Analysis/NormedSpace/QuaternionExponential.lean | 98 | 103 | theorem exp_of_re_eq_zero (q : Quaternion ℝ) (hq : q.re = 0) :
exp ℝ q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q := by |
rw [exp_eq_tsum]
refine HasSum.tsum_eq ?_
simp_rw [← expSeries_apply_eq]
exact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)
| [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... | [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... |
import Mathlib.Data.List.Join
#align_import data.list.permutation from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734"
-- Make sure we don't import algebra
assert_not_exists Monoid
open Nat
variable {α β : Type*}
namespace List
theorem permutationsAux2_fst (t : α) (ts : List α) (r : L... | Mathlib/Data/List/Permutation.lean | 69 | 73 | theorem permutationsAux2_snd_cons (t : α) (ts : List α) (r : List β) (y : α) (ys : List α)
(f : List α → β) :
(permutationsAux2 t ts r (y :: ys) f).2 =
f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x : List α => f (y :: x)).2 := by |
simp [permutationsAux2, permutationsAux2_fst t _ _ ys]
| [
" (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts",
" (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2"
] | [
" (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts"
] |
import Mathlib.Analysis.Analytic.Constructions
import Mathlib.Analysis.Calculus.Dslope
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.Analytic.Uniqueness
#align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090"
open sco... | Mathlib/Analysis/Analytic/IsolatedZeros.lean | 69 | 80 | theorem has_fpower_series_dslope_fslope (hp : HasFPowerSeriesAt f p z₀) :
HasFPowerSeriesAt (dslope f z₀) p.fslope z₀ := by |
have hpd : deriv f z₀ = p.coeff 1 := hp.deriv
have hp0 : p.coeff 0 = f z₀ := hp.coeff_zero 1
simp only [hasFPowerSeriesAt_iff, apply_eq_pow_smul_coeff, coeff_fslope] at hp ⊢
refine hp.mono fun x hx => ?_
by_cases h : x = 0
· convert hasSum_single (α := E) 0 _ <;> intros <;> simp [*]
· have hxx : ∀ n : ℕ,... | [
" HasFPowerSeriesAt (dslope f z₀) p.fslope z₀",
" ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • p.coeff (n + 1)) (dslope f z₀ (z₀ + z))",
" HasSum (fun n => x ^ n • p.coeff (n + 1)) (dslope f z₀ (z₀ + x))",
" dslope f z₀ (z₀ + x) = x ^ 0 • p.coeff (0 + 1)",
" ∀ (b' : ℕ), b' ≠ 0 → x ^ b' • p.coeff (b' + 1) =... | [] |
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.LinearAlgebra.Dual
import Mathlib.LinearAlgebra.Contraction
import Mathlib.RingTheory.TensorProduct.Basic
#align_import representation_... | Mathlib/RepresentationTheory/Basic.lean | 113 | 114 | theorem asAlgebraHom_of (g : G) : asAlgebraHom ρ (of k G g) = ρ g := by |
simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul]
| [
" ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g",
" ρ.asAlgebraHom (Finsupp.single g 1) = ρ g",
" ρ.asAlgebraHom ((of k G) g) = ρ g"
] | [
" ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g",
" ρ.asAlgebraHom (Finsupp.single g 1) = ρ g"
] |
import Mathlib.Data.Finset.Sum
import Mathlib.Data.Sum.Order
import Mathlib.Order.Interval.Finset.Defs
#align_import data.sum.interval from "leanprover-community/mathlib"@"48a058d7e39a80ed56858505719a0b2197900999"
open Function Sum
namespace Finset
variable {α₁ α₂ β₁ β₂ γ₁ γ₂ : Type*}
section SumLift₂
variabl... | Mathlib/Data/Sum/Interval.lean | 76 | 88 | theorem sumLift₂_eq_empty :
sumLift₂ f g a b = ∅ ↔
(∀ a₁ b₁, a = inl a₁ → b = inl b₁ → f a₁ b₁ = ∅) ∧
∀ a₂ b₂, a = inr a₂ → b = inr b₂ → g a₂ b₂ = ∅ := by |
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
· constructor <;>
· rintro a b rfl rfl
exact map_eq_empty.1 h
cases a <;> cases b
· exact map_eq_empty.2 (h.1 _ _ rfl rfl)
· rfl
· rfl
· exact map_eq_empty.2 (h.2 _ _ rfl rfl)
| [
" c ∈ sumLift₂ f g a b ↔\n (∃ a₁ b₁ c₁, a = inl a₁ ∧ b = inl b₁ ∧ c = inl c₁ ∧ c₁ ∈ f a₁ b₁) ∨\n ∃ a₂ b₂ c₂, a = inr a₂ ∧ b = inr b₂ ∧ c = inr c₂ ∧ c₂ ∈ g a₂ b₂",
" c ∈ sumLift₂ f g a b →\n (∃ a₁ b₁ c₁, a = inl a₁ ∧ b = inl b₁ ∧ c = inl c₁ ∧ c₁ ∈ f a₁ b₁) ∨\n ∃ a₂ b₂ c₂, a = inr a₂ ∧ b = inr b₂ ∧ ... | [
" c ∈ sumLift₂ f g a b ↔\n (∃ a₁ b₁ c₁, a = inl a₁ ∧ b = inl b₁ ∧ c = inl c₁ ∧ c₁ ∈ f a₁ b₁) ∨\n ∃ a₂ b₂ c₂, a = inr a₂ ∧ b = inr b₂ ∧ c = inr c₂ ∧ c₂ ∈ g a₂ b₂",
" c ∈ sumLift₂ f g a b →\n (∃ a₁ b₁ c₁, a = inl a₁ ∧ b = inl b₁ ∧ c = inl c₁ ∧ c₁ ∈ f a₁ b₁) ∨\n ∃ a₂ b₂ c₂, a = inr a₂ ∧ b = inr b₂ ∧ ... |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
namespace WittVector
open MvPolynomial
variable {p : ℕ} {R S : Type*} [hp : Fact p.Prime] [Comm... | Mathlib/RingTheory/WittVector/Verschiebung.lean | 42 | 44 | theorem verschiebungFun_coeff (x : 𝕎 R) (n : ℕ) :
(verschiebungFun x).coeff n = if n = 0 then 0 else x.coeff (n - 1) := by |
simp only [verschiebungFun, ge_iff_le]
| [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)"
] | [] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
#align_import ring_theory.polynomial.opposites from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
open Polynomial
open Polynomial MulOpposite
variable {R : Type*} [Semiring R]
noncomputable section
namespace Polynomial
def opRi... | Mathlib/RingTheory/Polynomial/Opposites.lean | 95 | 99 | theorem coeff_opRingEquiv (p : R[X]ᵐᵒᵖ) (n : ℕ) :
(opRingEquiv R p).coeff n = op ((unop p).coeff n) := by |
induction' p using MulOpposite.rec' with p
cases p
rfl
| [
" (opRingEquiv R) (op ((monomial n) r)) = (monomial n) (op r)",
" (opRingEquiv R) (op (C r * X ^ n)) = C (op r) * X ^ n",
" (opRingEquiv R) ((opRingEquiv R).symm ((monomial n) r)) = (opRingEquiv R) (op ((monomial n) r.unop))",
" (opRingEquiv R).symm (C r * X ^ n) = op (C r.unop * X ^ n)",
" ((opRingEquiv R)... | [
" (opRingEquiv R) (op ((monomial n) r)) = (monomial n) (op r)",
" (opRingEquiv R) (op (C r * X ^ n)) = C (op r) * X ^ n",
" (opRingEquiv R) ((opRingEquiv R).symm ((monomial n) r)) = (opRingEquiv R) (op ((monomial n) r.unop))",
" (opRingEquiv R).symm (C r * X ^ n) = op (C r.unop * X ^ n)"
] |
import Mathlib.Data.Stream.Init
import Mathlib.Tactic.Common
#align_import data.seq.computation from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
open Function
universe u v w
def Computation (α : Type u) : Type u :=
{ f : Stream' (Option α) // ∀ ⦃n a⦄, f n = some a → f (n + 1) = ... | Mathlib/Data/Seq/Computation.lean | 114 | 123 | theorem destruct_eq_pure {s : Computation α} {a : α} : destruct s = Sum.inl a → s = pure a := by |
dsimp [destruct]
induction' f0 : s.1 0 with _ <;> intro h
· contradiction
· apply Subtype.eq
funext n
induction' n with n IH
· injection h with h'
rwa [h'] at f0
· exact s.2 IH
| [
" Stream'.cons none (↑c) (n + 1) = some a",
" Stream'.cons none (↑c) (0 + 1) = some a",
" Stream'.cons none (↑c) (n + 1 + 1) = some a",
" s.destruct = Sum.inl a → s = pure a",
" (match ↑s 0 with\n | none => Sum.inr s.tail\n | some a => Sum.inl a) =\n Sum.inl a →\n s = pure a",
" (match n... | [
" Stream'.cons none (↑c) (n + 1) = some a",
" Stream'.cons none (↑c) (0 + 1) = some a",
" Stream'.cons none (↑c) (n + 1 + 1) = some a"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Analysis.Analytic.Constructions
import Mathlib.Topology.Algebra.Module.FiniteDimension
variable {𝕜 E A B : Type*} [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E]
[CommSemiring A] {z : E} {... | Mathlib/Analysis/Analytic/Polynomial.lean | 26 | 32 | theorem AnalyticAt.aeval_polynomial (hf : AnalyticAt 𝕜 f z) (p : A[X]) :
AnalyticAt 𝕜 (fun x ↦ aeval (f x) p) z := by |
refine p.induction_on (fun k ↦ ?_) (fun p q hp hq ↦ ?_) fun p i hp ↦ ?_
· simp_rw [aeval_C]; apply analyticAt_const
· simp_rw [aeval_add]; exact hp.add hq
· convert hp.mul hf
simp_rw [pow_succ, aeval_mul, ← mul_assoc, aeval_X]
| [
" AnalyticAt 𝕜 (fun x => (aeval (f x)) p) z",
" AnalyticAt 𝕜 (fun x => (aeval (f x)) (C k)) z",
" AnalyticAt 𝕜 (fun x => (algebraMap A B) k) z",
" AnalyticAt 𝕜 (fun x => (aeval (f x)) (p + q)) z",
" AnalyticAt 𝕜 (fun x => (aeval (f x)) p + (aeval (f x)) q) z",
" AnalyticAt 𝕜 (fun x => (aeval (f x)) ... | [] |
import Mathlib.CategoryTheory.Filtered.Connected
import Mathlib.CategoryTheory.Limits.TypesFiltered
import Mathlib.CategoryTheory.Limits.Final
universe v₁ v₂ u₁ u₂
namespace CategoryTheory
open CategoryTheory.Limits CategoryTheory.Functor Opposite
section ArbitraryUniverses
variable {C : Type u₁} [Category.{v₁}... | Mathlib/CategoryTheory/Filtered/Final.lean | 56 | 72 | theorem isFiltered_structuredArrow_of_isFiltered_of_exists [IsFilteredOrEmpty C]
(h₁ : ∀ d, ∃ c, Nonempty (d ⟶ F.obj c)) (h₂ : ∀ {d : D} {c : C} (s s' : d ⟶ F.obj c),
∃ (c' : C) (t : c ⟶ c'), s ≫ F.map t = s' ≫ F.map t) (d : D) :
IsFiltered (StructuredArrow d F) := by |
have : Nonempty (StructuredArrow d F) := by
obtain ⟨c, ⟨f⟩⟩ := h₁ d
exact ⟨.mk f⟩
suffices IsFilteredOrEmpty (StructuredArrow d F) from IsFiltered.mk
refine ⟨fun f g => ?_, fun f g η μ => ?_⟩
· obtain ⟨c, ⟨t, ht⟩⟩ := h₂ (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right))
(g.hom ≫ F.map (IsFi... | [
" IsFiltered (StructuredArrow d F)",
" Nonempty (StructuredArrow d F)",
" IsFilteredOrEmpty (StructuredArrow d F)",
" ∃ Z x x, True",
" f ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
" g ⟶ StructuredArrow.mk (f.hom ≫ F.map (IsFiltered.leftToMax f.right g.right ≫ t))",
... | [] |
import Mathlib.Data.Finsupp.Defs
#align_import data.list.to_finsupp from "leanprover-community/mathlib"@"06a655b5fcfbda03502f9158bbf6c0f1400886f9"
namespace List
variable {M : Type*} [Zero M] (l : List M) [DecidablePred (getD l · 0 ≠ 0)] (n : ℕ)
def toFinsupp : ℕ →₀ M where
toFun i := getD l i 0
support := ... | Mathlib/Data/List/ToFinsupp.lean | 147 | 156 | theorem toFinsupp_eq_sum_map_enum_single {R : Type*} [AddMonoid R] (l : List R)
[DecidablePred (getD l · 0 ≠ 0)] :
toFinsupp l = (l.enum.map fun nr : ℕ × R => Finsupp.single nr.1 nr.2).sum := by |
/- Porting note (#11215): TODO: `induction` fails to substitute `l = []` in
`[DecidablePred (getD l · 0 ≠ 0)]`, so we manually do some `revert`/`intro` as a workaround -/
revert l; intro l
induction l using List.reverseRecOn with
| nil => exact toFinsupp_nil
| append_singleton x xs ih =>
classical simp... | [
" n ∈ Finset.filter (fun i => l.getD i 0 ≠ 0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n ≠ 0",
" ¬l.getD n 0 = 0 → n < l.length",
" l.length ≤ n → l.getD n 0 = 0",
" [].toFinsupp = 0",
" [].toFinsupp a✝ = 0 a✝",
" [x].toFinsupp = Finsupp.single 0 x",
" [x].toFinsupp 0 = (Finsupp.single 0 x) 0",
... | [
" n ∈ Finset.filter (fun i => l.getD i 0 ≠ 0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n ≠ 0",
" ¬l.getD n 0 = 0 → n < l.length",
" l.length ≤ n → l.getD n 0 = 0",
" [].toFinsupp = 0",
" [].toFinsupp a✝ = 0 a✝",
" [x].toFinsupp = Finsupp.single 0 x",
" [x].toFinsupp 0 = (Finsupp.single 0 x) 0",
... |
import Mathlib.Algebra.Algebra.Spectrum
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Nilpotent.Basic
#align_import linear_algebra.eigenspace.basic from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1"
universe u v... | Mathlib/LinearAlgebra/Eigenspace/Basic.lean | 113 | 115 | theorem HasEigenvector.pow_apply {f : End R M} {μ : R} {v : M} (hv : f.HasEigenvector μ v) (n : ℕ) :
(f ^ n) v = μ ^ n • v := by |
induction n <;> simp [*, pow_succ f, hv.apply_eq_smul, smul_smul, pow_succ' μ]
| [
" f.eigenspace 0 = LinearMap.ker f",
" f.HasEigenvalue μ",
" ∃ x ∈ f.eigenspace μ, x ≠ 0",
" x ∈ f.eigenspace μ ∧ x ≠ 0",
" x ∈ f.eigenspace μ ↔ f x = μ • x",
" (f ^ n) v = μ ^ n • v",
" (f ^ 0) v = μ ^ 0 • v",
" (f ^ (n✝ + 1)) v = μ ^ (n✝ + 1) • v"
] | [
" f.eigenspace 0 = LinearMap.ker f",
" f.HasEigenvalue μ",
" ∃ x ∈ f.eigenspace μ, x ≠ 0",
" x ∈ f.eigenspace μ ∧ x ≠ 0",
" x ∈ f.eigenspace μ ↔ f x = μ • x"
] |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.Lifts
import Mathlib.GroupTheory.MonoidLocalization
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Localization.FractionRing
import M... | Mathlib/RingTheory/Localization/Integral.lean | 61 | 64 | theorem coeffIntegerNormalization_mem_support (p : S[X]) (i : ℕ)
(h : coeffIntegerNormalization M p i ≠ 0) : i ∈ p.support := by |
contrapose h
rw [Ne, Classical.not_not, coeffIntegerNormalization, dif_neg h]
| [
" coeffIntegerNormalization M p i = 0",
" i ∈ p.support",
" ¬coeffIntegerNormalization M p i ≠ 0"
] | [
" coeffIntegerNormalization M p i = 0"
] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.PNat.Basic
import Mathlib.GroupTheory.GroupAction.Prod
variable {M : Type*}
class PNatPowAssoc (M : Type*) [Mul M] [Pow M ℕ+] : Prop where
protected ppow_add : ∀ (k n : ℕ+) (x : M), x ^ (k + n) = x ^ k * x ^ n
prote... | Mathlib/Algebra/Group/PNatPowAssoc.lean | 67 | 70 | theorem ppow_mul (x : M) (m n : ℕ+) : x ^ (m * n) = (x ^ m) ^ n := by |
refine PNat.recOn n ?_ fun k hk ↦ ?_
· rw [ppow_one, mul_one]
· rw [ppow_add, ppow_one, mul_add, ppow_add, mul_one, hk]
| [
" x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)",
" x ^ m * x ^ n = x ^ n * x ^ m",
" x ^ (m * n) = (x ^ m) ^ n",
" x ^ (m * 1) = (x ^ m) ^ 1",
" x ^ (m * (k + 1)) = (x ^ m) ^ (k + 1)"
] | [
" x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)",
" x ^ m * x ^ n = x ^ n * x ^ m"
] |
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential
import Mathlib.Geometry.Manifold.ContMDiffMap
#align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle
open sc... | Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean | 227 | 280 | theorem ContMDiffOn.continuousOn_tangentMapWithin_aux {f : H → H'} {s : Set H}
(hf : ContMDiffOn I I' n f s) (hn : 1 ≤ n) (hs : UniqueMDiffOn I s) :
ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s) := by |
suffices h :
ContinuousOn
(fun p : H × E =>
(f p.fst,
(fderivWithin 𝕜 (writtenInExtChartAt I I' p.fst f) (I.symm ⁻¹' s ∩ range I)
((extChartAt I p.fst) p.fst) : E →L[𝕜] E') p.snd)) (Prod.fst ⁻¹' s) by
have A := (tangentBundleModelSpaceHomeomorph H I).continuous
r... | [
" ContinuousOn (tangentMapWithin I I' f s) (TotalSpace.proj ⁻¹' s)",
" univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) = TotalSpace.proj ⁻¹' s",
" { proj := x, snd := v } ∈ univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) ↔\n { proj := x, snd := v } ∈ TotalSpace.proj ... | [] |
import Mathlib.RingTheory.Flat.Basic
import Mathlib.RingTheory.IsTensorProduct
import Mathlib.LinearAlgebra.TensorProduct.Tower
universe u v w t
open Function (Injective Surjective)
open LinearMap (lsmul rTensor lTensor)
open TensorProduct
namespace Module.Flat
section Composition
variable (R : Type u) (S :... | Mathlib/RingTheory/Flat/Stability.lean | 86 | 94 | theorem comp [Module.Flat R S] [Module.Flat S M] : Module.Flat R M := by |
rw [Module.Flat.iff_lTensor_injective']
intro I
rw [← EquivLike.comp_injective _ (TensorProduct.rid R M)]
haveI h : TensorProduct.rid R M ∘ lTensor M (Submodule.subtype I) =
TensorProduct.rid R M ∘ₗ lTensor M I.subtype := rfl
simp only [h, ← auxLTensor_eq R S M, LinearMap.coe_restrictScalars, LinearMap.c... | [
" M ⊗[R] ↥I →ₗ[S] M",
" S ⊗[R] ↥I ≃ₗ[S] ↥(Module.Flat.J R S I)",
" Function.Injective ⇑(Module.Flat.auxRightMul R S S I)",
" Function.Injective ⇑(AlgebraTensorModule.map LinearMap.id (Submodule.subtype I))",
" ↑R (Module.Flat.auxLTensor R S M I) = ↑(TensorProduct.rid R M) ∘ₗ lTensor M (Submodule.subtype I)"... | [
" M ⊗[R] ↥I →ₗ[S] M",
" S ⊗[R] ↥I ≃ₗ[S] ↥(Module.Flat.J R S I)",
" Function.Injective ⇑(Module.Flat.auxRightMul R S S I)",
" Function.Injective ⇑(AlgebraTensorModule.map LinearMap.id (Submodule.subtype I))",
" ↑R (Module.Flat.auxLTensor R S M I) = ↑(TensorProduct.rid R M) ∘ₗ lTensor M (Submodule.subtype I)"... |
import Mathlib.CategoryTheory.Monoidal.Free.Basic
import Mathlib.CategoryTheory.Groupoid
import Mathlib.CategoryTheory.DiscreteCategory
#align_import category_theory.monoidal.free.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786cadc4c35ff"
universe u
namespace CategoryTheory
open Mo... | Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean | 184 | 191 | theorem tensorFunc_obj_map (Z : F C) {n n' : N C} (f : n ⟶ n') :
((tensorFunc C).obj Z).map f = inclusion.map f ▷ Z := by |
cases n
cases n'
rcases f with ⟨⟨h⟩⟩
dsimp at h
subst h
simp
| [
" inclusion.map f = eqToHom ⋯",
" inclusion.map { down := { down := down✝ } } = eqToHom ⋯",
" ?m.5469.as = ?m.5470.as",
" ((X.tensor Y).tensor Z).normalizeObj' ⟶ (X.tensor (Y.tensor Z)).normalizeObj'",
" ((X ⊗ Y) ⊗ Z).normalizeObj' ⟶ (X ⊗ Y ⊗ Z).normalizeObj'",
" (X✝.tensor (Y✝.tensor Z✝)).normalizeObj' ⟶... | [
" inclusion.map f = eqToHom ⋯",
" inclusion.map { down := { down := down✝ } } = eqToHom ⋯",
" ?m.5469.as = ?m.5470.as",
" ((X.tensor Y).tensor Z).normalizeObj' ⟶ (X.tensor (Y.tensor Z)).normalizeObj'",
" ((X ⊗ Y) ⊗ Z).normalizeObj' ⟶ (X ⊗ Y ⊗ Z).normalizeObj'",
" (X✝.tensor (Y✝.tensor Z✝)).normalizeObj' ⟶... |
import Mathlib.Data.Nat.Multiplicity
import Mathlib.Data.ZMod.Algebra
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
import Mathlib.FieldTheory.Perfect
#align_import ring_theory.witt_vector.frobenius from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"... | Mathlib/RingTheory/WittVector/Frobenius.lean | 123 | 127 | theorem map_frobeniusPoly.key₁ (n j : ℕ) (hj : j < p ^ n) :
p ^ (n - v p ⟨j + 1, j.succ_pos⟩) ∣ (p ^ n).choose (j + 1) := by |
apply multiplicity.pow_dvd_of_le_multiplicity
rw [hp.out.multiplicity_choose_prime_pow hj j.succ_ne_zero]
rfl
| [
" (bind₁ (frobeniusPolyRat p)) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1)",
" (bind₁ fun n => (bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1)) (xInTermsOfW p ℚ n)) (wittPolynomial p ℚ n) =\n wittPolynomial p ℚ (n + 1)",
" frobeniusPolyAux p n =\n X (n + 1) -\n ∑ i ∈ range n,\n ∑ j ∈ rang... | [
" (bind₁ (frobeniusPolyRat p)) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1)",
" (bind₁ fun n => (bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1)) (xInTermsOfW p ℚ n)) (wittPolynomial p ℚ n) =\n wittPolynomial p ℚ (n + 1)",
" frobeniusPolyAux p n =\n X (n + 1) -\n ∑ i ∈ range n,\n ∑ j ∈ rang... |
import Mathlib.Algebra.Category.ModuleCat.Basic
import Mathlib.LinearAlgebra.TensorProduct.Basic
import Mathlib.CategoryTheory.Monoidal.Linear
#align_import algebra.category.Module.monoidal.basic from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2"
-- Porting note: Module
set_option linte... | Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean | 81 | 85 | theorem tensor_comp {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : ModuleCat R} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁)
(g₂ : Y₂ ⟶ Z₂) : tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂ := by |
-- Porting note: even with high priority ext fails to find this
apply TensorProduct.ext
rfl
| [
" tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))",
" (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))",
" tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂",
" (TensorProduct.mk R ↑X₁ ↑X₂).compr₂ (tensorHom (f₁ ≫ g₁) (f₂... | [
" tensorHom (𝟙 M) (𝟙 N) = 𝟙 (of R (↑M ⊗[R] ↑N))",
" (TensorProduct.mk R ↑M ↑N).compr₂ (tensorHom (𝟙 M) (𝟙 N)) = (TensorProduct.mk R ↑M ↑N).compr₂ (𝟙 (of R (↑M ⊗[R] ↑N)))"
] |
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.Analysis.Normed.Group.Basic
import Mathlib.Order.Basic
import Mathlib.Tactic.NoncommRing
#align_import analysis.normed_space.M_structure from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15"
variable (X : Type*) [NormedAddCommGroup X]
... | Mathlib/Analysis/NormedSpace/MStructure.lean | 147 | 162 | theorem mul [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :
IsLprojection X (P * Q) := by |
refine ⟨IsIdempotentElem.mul_of_commute (h₁.commute h₂) h₁.proj h₂.proj, ?_⟩
intro x
refine le_antisymm ?_ ?_
· calc
‖x‖ = ‖(P * Q) • x + (x - (P * Q) • x)‖ := by rw [add_sub_cancel ((P * Q) • x) x]
_ ≤ ‖(P * Q) • x‖ + ‖x - (P * Q) • x‖ := by apply norm_add_le
_ = ‖(P * Q) • x‖ + ‖(1 - P * Q)... | [
" ‖x‖ = ‖(1 - P) • x‖ + ‖(1 - (1 - P)) • x‖",
" ‖x‖ = ‖P • x‖ + ‖(1 - P) • x‖",
" Commute P Q",
" P * R = R * P * R",
" (P * R) • x = (R * P * R) • x",
" ‖(P * R) • x - (R * P * R) • x‖ = 0",
" ‖R • x‖ = ‖R • P • R • x‖ + ‖(1 - R) • P • R • x‖ + (‖(R * R) • x - R • P • R • x‖ + ‖(1 - R) • (1 - P) • R • ... | [
" ‖x‖ = ‖(1 - P) • x‖ + ‖(1 - (1 - P)) • x‖",
" ‖x‖ = ‖P • x‖ + ‖(1 - P) • x‖",
" Commute P Q",
" P * R = R * P * R",
" (P * R) • x = (R * P * R) • x",
" ‖(P * R) • x - (R * P * R) • x‖ = 0",
" ‖R • x‖ = ‖R • P • R • x‖ + ‖(1 - R) • P • R • x‖ + (‖(R * R) • x - R • P • R • x‖ + ‖(1 - R) • (1 - P) • R • ... |
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 | 122 | 126 | theorem δ_comp_δ'' {n} {i : Fin (n + 3)} {j : Fin (n + 2)} (H : i ≤ Fin.castSucc j) :
X.δ j.succ ≫ X.δ (i.castLT (Nat.lt_of_le_of_lt (Fin.le_iff_val_le_val.mp H) j.is_lt)) =
X.δ i ≫ X.δ j := by |
dsimp [δ]
simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ'' H]
| [
" 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.Order.Interval.Set.OrdConnected
import Mathlib.Order.Antisymmetrization
#align_import order.cover from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Set OrderDual
variable {α β : Type*}
section WeaklyCovers
section Preorder
variable [Preorder α] [Preorder β] {a ... | Mathlib/Order/Cover.lean | 96 | 97 | theorem not_wcovBy_iff (h : a ≤ b) : ¬a ⩿ b ↔ ∃ c, a < c ∧ c < b := by |
simp_rw [WCovBy, h, true_and_iff, not_forall, exists_prop, not_not]
| [
" ¬a ⩿ b ↔ ∃ c, a < c ∧ c < b"
] | [] |
import Mathlib.Data.Option.Basic
import Mathlib.Data.Set.Basic
#align_import data.pequiv from "leanprover-community/mathlib"@"7c3269ca3fa4c0c19e4d127cd7151edbdbf99ed4"
universe u v w x
structure PEquiv (α : Type u) (β : Type v) where
toFun : α → Option β
invFun : β → Option α
inv : ∀ (a : α) (b :... | Mathlib/Data/PEquiv.lean | 136 | 136 | theorem symm_symm (f : α ≃. β) : f.symm.symm = f := by | cases f; rfl
| [
" Injective toFun",
" { toFun := f₁, invFun := f₂, inv := hf } = { toFun := f₁, invFun := g₂, inv := hg }",
" x ∈ f₂ y ↔ x ∈ g₂ y",
" a ∈ (fun a => (g.symm a).bind ⇑f.symm) b ↔ b ∈ (fun a => (f a).bind ⇑g) a",
" f.symm.symm = f",
" { toFun := toFun✝, invFun := invFun✝, inv := inv✝ }.symm.symm = { toFun :=... | [
" Injective toFun",
" { toFun := f₁, invFun := f₂, inv := hf } = { toFun := f₁, invFun := g₂, inv := hg }",
" x ∈ f₂ y ↔ x ∈ g₂ y",
" a ∈ (fun a => (g.symm a).bind ⇑f.symm) b ↔ b ∈ (fun a => (f a).bind ⇑g) a"
] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ι : Type*}
namespace Finset
section SigmaLift
variable {α β γ : ι → Type*} [DecidableEq ι]
def sigm... | Mathlib/Data/Finset/Sigma.lean | 211 | 216 | theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σi, α i) (b : Σi, β i) :
sigmaLift f a b ⊆ sigmaLift g a b := by |
rintro x hx
rw [mem_sigmaLift] at hx ⊢
obtain ⟨ha, hb, hx⟩ := hx
exact ⟨ha, hb, h hx⟩
| [
" x ∈ sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨j, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.fst) (hb : ⟨j, b⟩.fst = x.fst), x.snd ∈ f (ha ▸ ⟨i, a⟩.snd) (hb ▸ ⟨j, b⟩.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.f... | [
" x ∈ sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨j, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.fst) (hb : ⟨j, b⟩.fst = x.fst), x.snd ∈ f (ha ▸ ⟨i, a⟩.snd) (hb ▸ ⟨j, b⟩.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.f... |
import Mathlib.LinearAlgebra.Dimension.Finite
import Mathlib.LinearAlgebra.Dimension.Constructions
open Cardinal Submodule Set FiniteDimensional
universe u v
section Module
variable {K : Type u} {V : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V]
noncomputable def Basis.ofRankEqZero [Mo... | Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean | 46 | 60 | theorem le_rank_iff_exists_linearIndependent [Module.Free K V] {c : Cardinal} :
c ≤ Module.rank K V ↔ ∃ s : Set V, #s = c ∧ LinearIndependent K ((↑) : s → V) := by |
haveI := nontrivial_of_invariantBasisNumber K
constructor
· intro h
obtain ⟨κ, t'⟩ := Module.Free.exists_basis (R := K) (M := V)
let t := t'.reindexRange
have : LinearIndependent K ((↑) : Set.range t' → V) := by
convert t.linearIndependent
ext; exact (Basis.reindexRange_apply _ _).symm
... | [
" Subsingleton V",
" c ≤ Module.rank K V ↔ ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" c ≤ Module.rank K V → ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" LinearIndependent (ι := ... | [
" Subsingleton V"
] |
import Mathlib.Data.ZMod.Quotient
#align_import group_theory.complement from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
open Set
open scoped Pointwise
namespace Subgroup
variable {G : Type*} [Group G] (H K : Subgroup G) (S T : Set G)
@[to_additive "`S` and `T` are complements if ... | Mathlib/GroupTheory/Complement.lean | 124 | 128 | theorem isComplement_singleton_left {g : G} : IsComplement {g} S ↔ S = univ := by |
refine
⟨fun h => top_le_iff.mp fun x _ => ?_, fun h => (congr_arg _ h).mpr isComplement_singleton_univ⟩
obtain ⟨⟨⟨z, rfl : z = g⟩, y, _⟩, hy⟩ := h.2 (g * x)
rwa [← mul_left_cancel hy]
| [
" K.IsComplement' H",
" Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)",
" Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)",
" (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ",
" IsComplement {g} S ↔ S = univ",
" x ∈ S"
] | [
" K.IsComplement' H",
" Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)",
" Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)",
" (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ"
] |
import Mathlib.Algebra.AddTorsor
import Mathlib.Topology.Algebra.Constructions
import Mathlib.GroupTheory.GroupAction.SubMulAction
import Mathlib.Topology.Algebra.ConstMulAction
#align_import topology.algebra.mul_action from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46"
open Topology Po... | Mathlib/Topology/Algebra/MulAction.lean | 276 | 280 | theorem continuousSMul_inf {t₁ t₂ : TopologicalSpace X} [@ContinuousSMul M X _ _ t₁]
[@ContinuousSMul M X _ _ t₂] : @ContinuousSMul M X _ _ (t₁ ⊓ t₂) := by |
rw [inf_eq_iInf]
refine continuousSMul_iInf fun b => ?_
cases b <;> assumption
| [
" Continuous fun p => p.1 • p.2",
" ContinuousSMul M X"
] | [
" Continuous fun p => p.1 • p.2"
] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Topology Filter ENNReal
open Filter Asymptotics Set
variable... | Mathlib/Analysis/Calculus/Deriv/Add.lean | 136 | 137 | theorem deriv_const_add (c : F) : deriv (fun y => c + f y) x = deriv f x := by |
simp only [deriv, fderiv_const_add]
| [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x",
" derivWithin (fun y => f y + c) s x = derivWithin f s x",
" deriv (fun y => f y + c) x = deriv f x",
" derivWithin (fun y => c + f y) s x = derivWithin f s x",
" deriv (fun y => c + f y) x = deri... | [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x",
" derivWithin (fun y => f y + c) s x = derivWithin f s x",
" deriv (fun y => f y + c) x = deriv f x",
" derivWithin (fun y => c + f y) s x = derivWithin f s x"
] |
import Mathlib.Geometry.Euclidean.Sphere.Basic
#align_import geometry.euclidean.sphere.second_inter from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RealInnerProductSpace
namespace EuclideanGeometry
variable {V : Type*} {P : Type*} [NormedAddCommGroup V]... | Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean | 44 | 49 | theorem Sphere.secondInter_dist (s : Sphere P) (p : P) (v : V) :
dist (s.secondInter p v) s.center = dist p s.center := by |
rw [Sphere.secondInter]
by_cases hv : v = 0; · simp [hv]
rw [dist_smul_vadd_eq_dist _ _ hv]
exact Or.inr rfl
| [
" dist (s.secondInter p v) s.center = dist p s.center",
" dist ((-2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ) • v +ᵥ p) s.center = dist p s.center",
" -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ = 0 ∨ -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ = -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ"
] | [] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Order.LatticeIntervals
import Mathlib.Order.Interval.Set.OrdConnected
#align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open scoped Classical
open Set
variable {ι : ... | Mathlib/Order/CompleteLatticeIntervals.lean | 66 | 68 | theorem subset_sSup_of_not_bddAbove [Inhabited s] {t : Set s} (ht : ¬BddAbove t) :
sSup t = default := by |
simp [sSup, ht]
| [
" sSup (Subtype.val '' t) = ↑(sSup t)",
" sSup ∅ = default",
" sSup t = default"
] | [
" sSup (Subtype.val '' t) = ↑(sSup t)",
" sSup ∅ = default"
] |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Integral.Layercake
#align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
op... | Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean | 70 | 73 | theorem closedBall_rpow_sub_one_eq_empty_aux {r t : ℝ} (hr : 0 < r) (ht : 1 < t) :
Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1) = ∅ := by |
rw [Metric.closedBall_eq_empty, sub_neg]
exact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos])
| [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2",
" 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)",
" 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))",
" (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)",
" (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹",
" √2 ^ r ≠ 0",
" 0 ≤ √(1 + ‖x‖ ^ 2)",
"... | [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2",
" 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)",
" 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))",
" (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)",
" (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹",
" √2 ^ r ≠ 0",
" 0 ≤ √(1 + ‖x‖ ^ 2)",
"... |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.Data.Complex.Orientation
import Mathlib.Tactic.LinearCombination
#align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af"
non... | Mathlib/Analysis/InnerProductSpace/TwoDim.lean | 172 | 180 | theorem areaForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
(hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) (x y : E) :
o.areaForm (φ x) (φ y) = o.areaForm x y := by |
convert o.areaForm_map φ (φ x) (φ y)
· symm
rwa [← o.map_eq_iff_det_pos φ.toLinearEquiv] at hφ
rw [@Fact.out (finrank ℝ E = 2), Fintype.card_fin]
· simp
· simp
| [
" E →ₗ[ℝ] E →ₗ[ℝ] ℝ",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 ≠ 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)",
" ![x, y] ... | [
" E →ₗ[ℝ] E →ₗ[ℝ] ℝ",
" (o.areaForm x) y = o.volumeForm ![x, y]",
" (o.areaForm x) x = 0",
" o.volumeForm ![x, x] = 0",
" ![x, x] 0 = ![x, x] 1",
" 0 ≠ 1",
" (o.areaForm x) y = -(o.areaForm y) x",
" o.volumeForm ![x, y] = -o.volumeForm ![y, x]",
" ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)",
" ![x, y] ... |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Matrix.RowCol
import Mathlib.Data.Fin.VecNotation
import Mathlib.Tactic.FinCases
#align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matrix
universe u uₘ uₙ uₒ
variable {α : Type u} {o n m... | Mathlib/Data/Matrix/Notation.lean | 138 | 139 | theorem cons_val' (v : n' → α) (B : Fin m → n' → α) (i j) :
vecCons v B i j = vecCons (v j) (fun i => B i j) i := by | refine Fin.cases ?_ ?_ i <;> simp
| [
" vecCons v B i j = vecCons (v j) (fun i => B i j) i",
" vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0",
" ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ"
] | [] |
import Mathlib.Data.Set.Pairwise.Basic
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.Directed
import Mathlib.Order.Hom.Set
#align_import order.antichain from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open Function Set
section General
variable {α β : Type*} {r r₁ r₂ : α →... | Mathlib/Order/Antichain.lean | 313 | 317 | theorem image (hs : IsStrongAntichain r s) {f : α → β} (hf : Surjective f)
(h : ∀ a b, r' (f a) (f b) → r a b) : IsStrongAntichain r' (f '' s) := by |
rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ hab c
obtain ⟨c, rfl⟩ := hf c
exact (hs ha hb (ne_of_apply_ne _ hab) _).imp (mt <| h _ _) (mt <| h _ _)
| [
" IsStrongAntichain r' (f '' s)",
" ¬r' (f a) c ∨ ¬r' (f b) c",
" ¬r' (f a) (f c) ∨ ¬r' (f b) (f c)"
] | [] |
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Group.Hom.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Algebra.Order.ZeroLEOne
import Mathlib.Data.Nat.Cast.Defs
import Mathlib.Order.WithBot
#align_import algebra.order.monoid.with_top ... | Mathlib/Algebra/Order/Monoid/WithTop.lean | 164 | 170 | theorem add_right_cancel_iff [IsRightCancelAdd α] (ha : a ≠ ⊤) : b + a = c + a ↔ b = c := by |
lift a to α using ha
obtain rfl | hb := eq_or_ne b ⊤
· rw [top_add, eq_comm, WithTop.add_coe_eq_top_iff, eq_comm]
lift b to α using hb
simp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, coe_eq_coe, exists_and_left,
exists_eq_left, add_left_inj, exists_eq_right, eq_comm]
| [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤",
" a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤",
" ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤",
" x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤",
" ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤",
" a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤",
" ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c",
" ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b... | [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤",
" a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤",
" ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤",
" x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤",
" ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤",
" a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤",
" ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c",
" ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b... |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce"
open Set Filter MeasureTheory MeasurableSpace
open scoped Classical Topology NNReal ENNReal MeasureTheory
univers... | Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean | 96 | 99 | theorem isPiSystem_Ioi_rat : IsPiSystem (⋃ a : ℚ, {Ioi (a : ℝ)}) := by |
convert isPiSystem_image_Ioi (((↑) : ℚ → ℝ) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| [
" borel ℝ = generateFrom (⋃ a, {Iio ↑a})",
" generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})",
" ∀ t ∈ range Iio, MeasurableSet t",
" MeasurableSet (Iio a)",
" IsLUB (range Rat.cast ∩ Iio a) a",
" MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)",
" Iio ↑b ∈ ⋃ a, {Iio ↑a}",
" borel ℝ = generat... | [
" borel ℝ = generateFrom (⋃ a, {Iio ↑a})",
" generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})",
" ∀ t ∈ range Iio, MeasurableSet t",
" MeasurableSet (Iio a)",
" IsLUB (range Rat.cast ∩ Iio a) a",
" MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)",
" Iio ↑b ∈ ⋃ a, {Iio ↑a}",
" borel ℝ = generat... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
#align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75f7ac6204d142debc840"
noncomputable section
open Affine
open Set
section
variable (k : Type*) {V : Type*} {P : Type*} [Ring k] [AddCommGroup V]... | Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean | 86 | 86 | theorem vectorSpan_singleton (p : P) : vectorSpan k ({p} : Set P) = ⊥ := by | simp [vectorSpan_def]
| [
" vectorSpan k ∅ = ⊥",
" vectorSpan k {p} = ⊥"
] | [
" vectorSpan k ∅ = ⊥"
] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.NormedSpace.HomeomorphBall
#align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
noncomputable section
open RCLike Real ... | Mathlib/Analysis/InnerProductSpace/Calculus.lean | 347 | 350 | theorem contDiffWithinAt_euclidean {n : ℕ∞} :
ContDiffWithinAt 𝕜 n f t y ↔ ∀ i, ContDiffWithinAt 𝕜 n (fun x => f x i) t y := by |
rw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffWithinAt_iff, contDiffWithinAt_pi]
rfl
| [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... | [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... |
import Mathlib.CategoryTheory.CommSq
#align_import category_theory.lifting_properties.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v
namespace CategoryTheory
open Category
variable {C : Type*} [Category C] {A B B' X Y Y' : C} (i : A ⟶ B) (i' : B ⟶ B') (p : X ⟶ Y... | Mathlib/CategoryTheory/LiftingProperties/Basic.lean | 134 | 138 | theorem iff_of_arrow_iso_left {A B A' B' X Y : C} {i : A ⟶ B} {i' : A' ⟶ B'}
(e : Arrow.mk i ≅ Arrow.mk i') (p : X ⟶ Y) :
HasLiftingProperty i p ↔ HasLiftingProperty i' p := by |
constructor <;> intro
exacts [of_arrow_iso_left e p, of_arrow_iso_left e.symm p]
| [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g",
" HasLiftingProperty i' p",
" HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p",
... | [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g",
" HasLiftingProperty i' p",
" HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p",
... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.Group.Indicator
import Mathlib.Order.LiminfLimsup
import Mathlib.Order.Filter.Archimedean
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Algebra.Group.Basic
import Mathlib.Data.Set.La... | Mathlib/Topology/Algebra/Order/LiminfLimsup.lean | 339 | 385 | theorem Antitone.map_limsSup_of_continuousAt {F : Filter R} [NeBot F] {f : R → S}
(f_decr : Antitone f) (f_cont : ContinuousAt f F.limsSup)
(bdd_above : F.IsBounded (· ≤ ·) := by | isBoundedDefault)
(bdd_below : F.IsBounded (· ≥ ·) := by isBoundedDefault) :
f F.limsSup = F.liminf f := by
have cobdd : F.IsCobounded (· ≤ ·) := bdd_below.isCobounded_flip
apply le_antisymm
· rw [limsSup, f_decr.map_sInf_of_continuousAt' f_cont bdd_above cobdd]
apply le_of_forall_lt
intro c hc
... | [
" f F.limsSup = liminf f F",
" f F.limsSup ≤ liminf f F",
" sSup (f '' {a | ∀ᶠ (n : R) in F, n ≤ a}) ≤ liminf f F",
" ∀ c < sSup (f '' {a | ∀ᶠ (n : R) in F, n ≤ a}), c < liminf f F",
" c < liminf f F",
" c < sSup {a | ∀ᶠ (a_1 : R) in F, a ≤ f a_1}",
" BddAbove {a | ∀ᶠ (a_1 : R) in F, a ≤ f a_1}",
" d ... | [] |
import Mathlib.Topology.Separation
#align_import topology.shrinking_lemma from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Set Function
open scoped Classical
noncomputable section
variable {ι X : Type*} [TopologicalSpace X] [NormalSpace X]
namespace ShrinkingLemma
-- the tr... | Mathlib/Topology/ShrinkingLemma.lean | 124 | 132 | theorem mem_find_carrier_iff {c : Set (PartialRefinement u s)} {i : ι} (ne : c.Nonempty) :
i ∈ (find c ne i).carrier ↔ i ∈ chainSupCarrier c := by |
rw [find]
split_ifs with h
· have := h.choose_spec
exact iff_of_true this.2 (mem_iUnion₂.2 ⟨_, this.1, this.2⟩)
· push_neg at h
refine iff_of_false (h _ ne.some_mem) ?_
simpa only [chainSupCarrier, mem_iUnion₂, not_exists]
| [
" find c ne i ∈ c",
" (if hi : ∃ v ∈ c, i ∈ v.carrier then hi.choose else ne.some) ∈ c",
" ne.some ∈ c",
" i ∈ (find c ne i).carrier ↔ i ∈ chainSupCarrier c",
" i ∈ (if hi : ∃ v ∈ c, i ∈ v.carrier then hi.choose else ne.some).carrier ↔ i ∈ chainSupCarrier c",
" i ∈ h.choose.carrier ↔ i ∈ chainSupCarrier c... | [
" find c ne i ∈ c",
" (if hi : ∃ v ∈ c, i ∈ v.carrier then hi.choose else ne.some) ∈ c",
" ne.some ∈ c"
] |
import Mathlib.MeasureTheory.Measure.Typeclasses
#align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480"
open Set
namespace MeasureTheory
namespace Measure
noncomputable instance instSub {α : Type*} [MeasurableSpace α] : Sub (Measure α) :=
⟨fun ... | Mathlib/MeasureTheory/Measure/Sub.lean | 137 | 139 | theorem sub_apply_eq_zero_of_restrict_le_restrict (h_le : μ.restrict s ≤ ν.restrict s)
(h_meas_s : MeasurableSet s) : (μ - ν) s = 0 := by |
rw [← restrict_apply_self, restrict_sub_eq_restrict_sub_restrict, sub_eq_zero_of_le] <;> simp [*]
| [
" μ ≤ 0 + ν",
" (μ - ν) s = μ s - ν s",
" (fun t x => μ t - ν t) ∅ ⋯ = 0",
" (fun t x => μ t - ν t) (⋃ i, g i) ⋯ = ∑' (i : ℕ), (fun t x => μ t - ν t) (g i) ⋯",
" ∑' (i : ℕ), μ (g i) - ∑' (i : ℕ), ν (g i) = ∑' (i : ℕ), (μ (g i) - ν (g i))",
" ∑' (i : ℕ), ν (g i) ≠ ⊤",
" ν (⋃ i, g i) ≠ ⊤",
" ν + measure... | [
" μ ≤ 0 + ν",
" (μ - ν) s = μ s - ν s",
" (fun t x => μ t - ν t) ∅ ⋯ = 0",
" (fun t x => μ t - ν t) (⋃ i, g i) ⋯ = ∑' (i : ℕ), (fun t x => μ t - ν t) (g i) ⋯",
" ∑' (i : ℕ), μ (g i) - ∑' (i : ℕ), ν (g i) = ∑' (i : ℕ), (μ (g i) - ν (g i))",
" ∑' (i : ℕ), ν (g i) ≠ ⊤",
" ν (⋃ i, g i) ≠ ⊤",
" ν + measure... |
import Mathlib.Topology.Order.MonotoneContinuity
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.Instances.NNReal
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.Metrizable.Basic
import Mathlib.Topology.Order.T5
#align_import topology.instances.ennreal from "leanprove... | Mathlib/Topology/Instances/ENNReal.lean | 739 | 745 | theorem exists_frequently_lt_of_liminf_ne_top' {ι : Type*} {l : Filter ι} {x : ι → ℝ}
(hx : liminf (fun n => (Real.nnabs (x n) : ℝ≥0∞)) l ≠ ∞) : ∃ R, ∃ᶠ n in l, R < x n := by |
by_contra h
simp_rw [not_exists, not_frequently, not_lt] at h
refine hx (ENNReal.eq_top_of_forall_nnreal_le fun r => le_limsInf_of_le (by isBoundedDefault) ?_)
simp only [eventually_map, ENNReal.coe_le_coe]
filter_upwards [h (-r)] with i hi using(le_neg.1 hi).trans (neg_le_abs _)
| [
" ∃ R, ∃ᶠ (n : ι) in l, x n < R",
" False",
" IsCobounded (fun x x_1 => x ≥ x_1) (map (fun n => ↑(Real.nnabs (x n))) l)",
" ∀ᶠ (n : ℝ≥0∞) in map (fun n => ↑(Real.nnabs (x n))) l, ↑r ≤ n",
" ∀ᶠ (a : ι) in l, r ≤ Real.nnabs (x a)",
" ∃ R, ∃ᶠ (n : ι) in l, R < x n"
] | [
" ∃ R, ∃ᶠ (n : ι) in l, x n < R",
" False",
" IsCobounded (fun x x_1 => x ≥ x_1) (map (fun n => ↑(Real.nnabs (x n))) l)",
" ∀ᶠ (n : ℝ≥0∞) in map (fun n => ↑(Real.nnabs (x n))) l, ↑r ≤ n",
" ∀ᶠ (a : ι) in l, r ≤ Real.nnabs (x a)"
] |
import Mathlib.Data.Nat.Bits
import Mathlib.Order.Lattice
#align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
namespace Nat
section
set_option linter.deprecated false
theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n := shiftLeft_eq _
#align nat.... | Mathlib/Data/Nat/Size.lean | 51 | 51 | theorem size_zero : size 0 = 0 := by | simp [size]
| [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... |
import Mathlib.RingTheory.Valuation.Basic
import Mathlib.NumberTheory.Padics.PadicNorm
import Mathlib.Analysis.Normed.Field.Basic
#align_import number_theory.padics.padic_numbers from "leanprover-community/mathlib"@"b9b2114f7711fec1c1e055d507f082f8ceb2c3b7"
noncomputable section
open scoped Classical
open Nat m... | Mathlib/NumberTheory/Padics/PadicNumbers.lean | 156 | 160 | theorem norm_eq_norm_app_of_nonzero {f : PadicSeq p} (hf : ¬f ≈ 0) :
∃ k, f.norm = padicNorm p k ∧ k ≠ 0 :=
have heq : f.norm = padicNorm p (f <| stationaryPoint hf) := by | simp [norm, hf]
⟨f <| stationaryPoint hf, heq, fun h ↦
norm_nonzero_of_not_equiv_zero hf (by simpa [h] using heq)⟩
| [
" padicNorm p (↑f m) = padicNorm p (↑f n)",
" False",
" f.norm = 0 ↔ f ≈ 0",
" f.norm = 0 → f ≈ 0",
" f ≈ 0",
" ∃ i, ∀ j ≥ i, padicNorm p (↑(f - 0) j) < ε",
" ∀ j ≥ stationaryPoint hf, padicNorm p (↑(f - 0) j) < ε",
" padicNorm p (↑(f - 0) j) < ε",
" f ≈ 0 → f.norm = 0",
" f.norm = 0",
" padicNo... | [
" padicNorm p (↑f m) = padicNorm p (↑f n)",
" False",
" f.norm = 0 ↔ f ≈ 0",
" f.norm = 0 → f ≈ 0",
" f ≈ 0",
" ∃ i, ∀ j ≥ i, padicNorm p (↑(f - 0) j) < ε",
" ∀ j ≥ stationaryPoint hf, padicNorm p (↑(f - 0) j) < ε",
" padicNorm p (↑(f - 0) j) < ε",
" f ≈ 0 → f.norm = 0",
" f.norm = 0",
" padicNo... |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 87 | 88 | theorem tan_eq_zero_iff' {θ : ℂ} (hθ : cos θ ≠ 0) : tan θ = 0 ↔ ∃ k : ℤ, k * π = θ := by |
simp only [tan, hθ, div_eq_zero_iff, sin_eq_zero_iff]; simp [eq_comm]
| [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... | [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... |
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
-- TODO:
-- assert_not_exists OrderedComm... | Mathlib/Data/Finset/Fold.lean | 132 | 138 | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : Std.IdempotentOp op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by |
induction' s using Finset.cons_induction with x xs hx ih
· rw [fold_empty, image_empty, fold_empty]
· haveI := Classical.decEq γ
rw [fold_cons, cons_eq_insert, image_insert, fold_insert_idem, ih]
simp only [Function.comp_apply]
| [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... | [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 258 | 260 | theorem descPochhammer_succ_left (n : ℕ) :
descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1) := by |
rw [descPochhammer]
| [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)"
] | [
" descPochhammer R 1 = X"
] |
import Mathlib.Algebra.Algebra.Unitization
import Mathlib.Algebra.Star.NonUnitalSubalgebra
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.GroupTheory.GroupAction.Ring
section Subalgebra
variable {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]
def Subalgebra.toNonUnitalSubalgebra (S : Subalgebr... | Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean | 70 | 71 | theorem Subalgebra.toNonUnitalSubalgebra_toSubalgebra (S : Subalgebra R A) :
S.toNonUnitalSubalgebra.toSubalgebra S.one_mem = S := by | cases S; rfl
| [
" S.toNonUnitalSubalgebra.toSubalgebra ⋯ = S",
" { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }.toNonUnitalSubalgebra.toSubalgebra ⋯ =\n { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }"
] | [] |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.analytic.radius_liminf from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
[NormedSpa... | Mathlib/Analysis/Analytic/RadiusLiminf.lean | 35 | 61 | theorem radius_eq_liminf :
p.radius = liminf (fun n => (1 / (‖p n‖₊ ^ (1 / (n : ℝ)) : ℝ≥0) : ℝ≥0∞)) atTop := by |
-- Porting note: added type ascription to make elaborated statement match Lean 3 version
have :
∀ (r : ℝ≥0) {n : ℕ},
0 < n → ((r : ℝ≥0∞) ≤ 1 / ↑(‖p n‖₊ ^ (1 / (n : ℝ))) ↔ ‖p n‖₊ * r ^ n ≤ 1) := by
intro r n hn
have : 0 < (n : ℝ) := Nat.cast_pos.2 hn
conv_lhs =>
rw [one_div, ENNReal.le_i... | [
" p.radius = liminf (fun n => 1 / ↑(‖p n‖₊ ^ (1 / ↑n))) atTop",
" ∀ (r : ℝ≥0) {n : ℕ}, 0 < n → (↑r ≤ 1 / ↑(‖p n‖₊ ^ (1 / ↑n)) ↔ ‖p n‖₊ * r ^ n ≤ 1)",
" ↑r ≤ 1 / ↑(‖p n‖₊ ^ (1 / ↑n)) ↔ ‖p n‖₊ * r ^ n ≤ 1",
"𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² ... | [] |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.ZMod.Basic
#align_import data.zmod.parity from "leanprover-community/mathlib"@"048240e809f04e2bde02482ab44bc230744cc6c9"
namespace ZMod
theorem eq_zero_iff_even {n : ℕ} : (n : ZMod 2) = 0 ↔ Even n :=
(CharP.cast_eq_zero_iff (ZMod 2) 2 n).trans even_iff_... | Mathlib/Data/ZMod/Parity.lean | 32 | 35 | theorem ne_zero_iff_odd {n : ℕ} : (n : ZMod 2) ≠ 0 ↔ Odd n := by |
constructor <;>
· contrapose
simp [eq_zero_iff_even]
| [
" ↑n = 1 ↔ Odd n",
" ↑n ≠ 0 ↔ Odd n",
" ↑n ≠ 0 → Odd n",
" ¬Odd n → ¬↑n ≠ 0",
" Odd n → ↑n ≠ 0",
" ¬↑n ≠ 0 → ¬Odd n"
] | [
" ↑n = 1 ↔ Odd n"
] |
import Mathlib.Order.Interval.Set.OrdConnected
import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
open Interval Function OrderDual
namespace Set
variable {α : Type*} [LinearOrder α] {s t : Set α}... | Mathlib/Order/Interval/Set/OrdConnectedComponent.lean | 73 | 74 | theorem ordConnectedComponent_univ : ordConnectedComponent univ x = univ := by |
simp [ordConnectedComponent]
| [
" toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝",
" ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝",
" x ∈ s.ordConnectedComponent x ↔ x ∈ s",
" s.ordConnectedComponent x = ∅ ↔ x ∉ s",
" univ.ordCon... | [
" toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝",
" ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝",
" x ∈ s.ordConnectedComponent x ↔ x ∈ s",
" s.ordConnectedComponent x = ∅ ↔ x ∉ s"
] |
import Mathlib.Algebra.Polynomial.Splits
#align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222"
noncomputable section
@[ext]
structure Cubic (R : Type*) where
(a b c d : R)
#align cubic Cubic
namespace Cubic
open Cubic Polynomial
open Polynom... | Mathlib/Algebra/CubicDiscriminant.lean | 67 | 71 | theorem C_mul_prod_X_sub_C_eq [CommRing S] {w x y z : S} :
C w * (X - C x) * (X - C y) * (X - C z) =
toPoly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩ := by |
simp only [toPoly, C_neg, C_add, C_mul]
ring1
| [
" C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly",
" C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ... | [] |
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 MapIdx
-- Porting n... | Mathlib/Data/List/Indexes.lean | 109 | 129 | theorem mapIdxGo_append : ∀ (f : ℕ → α → β) (l₁ l₂ : List α) (arr : Array β),
mapIdx.go f (l₁ ++ l₂) arr = mapIdx.go f l₂ (List.toArray (mapIdx.go f l₁ arr)) := by |
intros f l₁ l₂ arr
generalize e : (l₁ ++ l₂).length = len
revert l₁ l₂ arr
induction' len with len ih <;> intros l₁ l₂ arr h
· have l₁_nil : l₁ = [] := by
cases l₁
· rfl
· contradiction
have l₂_nil : l₂ = [] := by
cases l₂
· rfl
· rw [List.length_append] at h; contradi... | [
" List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l",
" List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ... | [
" List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l",
" List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)",
" List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ... |
import Mathlib.MeasureTheory.Measure.Typeclasses
open scoped ENNReal
namespace MeasureTheory
variable {α : Type*}
noncomputable
def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m :=
@OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory... | Mathlib/MeasureTheory/Measure/Trim.lean | 124 | 128 | theorem sigmaFinite_trim_bot_iff : SigmaFinite (μ.trim bot_le) ↔ IsFiniteMeasure μ := by |
rw [sigmaFinite_bot_iff]
refine ⟨fun h => ⟨?_⟩, fun h => ⟨?_⟩⟩ <;> have h_univ := h.measure_univ_lt_top
· rwa [trim_measurableSet_eq bot_le MeasurableSet.univ] at h_univ
· rwa [trim_measurableSet_eq bot_le MeasurableSet.univ]
| [
" μ.trim ⋯ = μ",
" (μ.trim hm).toOuterMeasure = μ.trim",
" Measure.trim 0 hm = 0",
" (μ.trim hm) s = μ s",
" μ s ≤ (μ.trim hm) s",
" μ s ≤ (μ.toMeasure ⋯) s",
" (μ.trim hm) (toMeasurable (μ.trim hm) s) = 0",
" (μ.trim hm₂).trim hm₁₂ = μ.trim ⋯",
" ((μ.trim hm₂).trim hm₁₂) t = (μ.trim ⋯) t",
" (μ.t... | [
" μ.trim ⋯ = μ",
" (μ.trim hm).toOuterMeasure = μ.trim",
" Measure.trim 0 hm = 0",
" (μ.trim hm) s = μ s",
" μ s ≤ (μ.trim hm) s",
" μ s ≤ (μ.toMeasure ⋯) s",
" (μ.trim hm) (toMeasurable (μ.trim hm) s) = 0",
" (μ.trim hm₂).trim hm₁₂ = μ.trim ⋯",
" ((μ.trim hm₂).trim hm₁₂) t = (μ.trim ⋯) t",
" (μ.t... |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section Disjoint
... | Mathlib/GroupTheory/Perm/Support.lean | 118 | 120 | theorem Disjoint.mul_right (H1 : Disjoint f g) (H2 : Disjoint f h) : Disjoint f (g * h) := by |
rw [disjoint_comm]
exact H1.symm.mul_left H2.symm
| [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x",
" f.Disjoint f ↔ f = 1",
" f = 1",
" f x = 1 x",
" f⁻¹.Disjoint g",
" f⁻¹ x = x ∨ g x = x",
" f x = x ∨ g x = x",
" f⁻¹.Disjoint g ↔ f.Disjoint g",
" f.Disjoint g",
" f.Disjoint g⁻¹ ↔ f.Disjoint g",
" (f * g) x = x ∨ h x = x",
" f.Dis... | [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x",
" f.Disjoint f ↔ f = 1",
" f = 1",
" f x = 1 x",
" f⁻¹.Disjoint g",
" f⁻¹ x = x ∨ g x = x",
" f x = x ∨ g x = x",
" f⁻¹.Disjoint g ↔ f.Disjoint g",
" f.Disjoint g",
" f.Disjoint g⁻¹ ↔ f.Disjoint g",
" (f * g) x = x ∨ h x = x"
] |
import Mathlib.RingTheory.DedekindDomain.Ideal
import Mathlib.RingTheory.Valuation.ExtendToLocalization
import Mathlib.RingTheory.Valuation.ValuationSubring
import Mathlib.Topology.Algebra.ValuedField
import Mathlib.Algebra.Order.Group.TypeTags
#align_import ring_theory.dedekind_domain.adic_valuation from "leanprover... | Mathlib/RingTheory/DedekindDomain/AdicValuation.lean | 156 | 160 | theorem IntValuation.map_one' : v.intValuationDef 1 = 1 := by |
rw [v.intValuationDef_if_neg (zero_ne_one.symm : (1 : R) ≠ 0), Ideal.span_singleton_one, ←
Ideal.one_eq_top, Associates.mk_one, Associates.factors_one,
Associates.count_zero (by apply v.associates_irreducible), Int.ofNat_zero, neg_zero, ofAdd_zero,
WithZero.coe_one]
| [
" v.intValuationDef x ≠ 0",
" ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0",
" 0 < v.intValuationDef ↑x",
" 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))",
" v.intValuationDef x ≤ 1",
" (if x = 0 then 0 else ↑(of... | [
" v.intValuationDef x ≠ 0",
" ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0",
" 0 < v.intValuationDef ↑x",
" 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))",
" v.intValuationDef x ≤ 1",
" (if x = 0 then 0 else ↑(of... |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.SetTheory.Ordinal.Basic
import Mathlib.Topology.ContinuousFunction.Algebra
import Mathlib.Topology.Compactness.Paracompact
import Mathlib.Topology.ShrinkingLemma
import Mathlib.Topology.UrysohnsLemma
#align_import topology.partition_of_unity from "leanprover-... | Mathlib/Topology/PartitionOfUnity.lean | 214 | 220 | theorem sum_finsupport_smul_eq_finsum {M : Type*} [AddCommGroup M] [Module ℝ M] (φ : ι → X → M) :
∑ i ∈ ρ.finsupport x₀, ρ i x₀ • φ i x₀ = ∑ᶠ i, ρ i x₀ • φ i x₀ := by |
apply (finsum_eq_sum_of_support_subset _ _).symm
have : (fun i ↦ (ρ i) x₀ • φ i x₀) = (fun i ↦ (ρ i) x₀) • (fun i ↦ φ i x₀) :=
funext fun _ => (Pi.smul_apply' _ _ _).symm
rw [ρ.coe_finsupport x₀, this, support_smul]
exact inter_subset_left
| [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... | [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... |
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
import Mathlib.NumberTheory.Liouville.Basic
import Mathlib.Topology.Instances.Irrational
#align_import number_theory.liouville.liouville_with from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
open Filter Metric Real Set
open sc... | Mathlib/NumberTheory/Liouville/LiouvilleWith.lean | 150 | 151 | theorem mul_int_iff (hm : m ≠ 0) : LiouvilleWith p (x * m) ↔ LiouvilleWith p x := by |
rw [← Rat.cast_intCast, mul_rat_iff (Int.cast_ne_zero.2 hm)]
| [
" LiouvilleWith 1 x",
" ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1",
" ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1",
" 0 < ↑n",
" x < ↑(⌊x * ↑n⌋ + 1) / ↑n",
" x * ↑n < ↑⌊x * ↑n⌋ + 1",
" |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1",
" ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n",
"... | [
" LiouvilleWith 1 x",
" ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1",
" ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1",
" 0 < ↑n",
" x < ↑(⌊x * ↑n⌋ + 1) / ↑n",
" x * ↑n < ↑⌊x * ↑n⌋ + 1",
" |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1",
" ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n",
"... |
import Mathlib.Topology.Order.Basic
open Set Filter OrderDual
open scoped Topology
section OrderClosedTopology
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderClosedTopology α] {a b c d : α}
@[simp] theorem nhdsSet_Ioi : 𝓝ˢ (Ioi a) = 𝓟 (Ioi a) := isOpen_Ioi.nhdsSet_eq
@[simp] theorem nhdsSet... | Mathlib/Topology/Order/NhdsSet.lean | 47 | 50 | theorem nhdsSet_Icc (h : a ≤ b) : 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b) := by |
rcases h.eq_or_lt with rfl | hlt
· simp
· rw [← Ioc_insert_left h, nhdsSet_insert, nhdsSet_Ioc hlt, sup_assoc]
| [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a a) = 𝓝 a ⊔ 𝓝 a ⊔ 𝓟 (Ioo a a)"
] | [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)"
] |
import Mathlib.RingTheory.Valuation.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.valuation.quotient from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
namespace Valuation
variable {R Γ₀ : Type*} [CommRing R] [LinearOrderedCommMonoidWithZero Γ₀]
va... | Mathlib/RingTheory/Valuation/Quotient.lean | 51 | 54 | theorem self_le_supp_comap (J : Ideal R) (v : Valuation (R ⧸ J) Γ₀) :
J ≤ (v.comap (Ideal.Quotient.mk J)).supp := by |
rw [comap_supp, ← Ideal.map_le_iff_le_comap]
simp
| [
" v a = v (b + -(-a + b))",
" J ≤ (comap (Ideal.Quotient.mk J) v).supp",
" Ideal.map (Ideal.Quotient.mk J) J ≤ v.supp"
] | [
" v a = v (b + -(-a + b))"
] |
import Mathlib.ModelTheory.ElementarySubstructures
#align_import model_theory.skolem from "leanprover-community/mathlib"@"3d7987cda72abc473c7cdbbb075170e9ac620042"
universe u v w w'
namespace FirstOrder
namespace Language
open Structure Cardinal
open Cardinal
variable (L : Language.{u, v}) {M : Type w} [None... | Mathlib/ModelTheory/Skolem.lean | 50 | 62 | theorem card_functions_sum_skolem₁ :
#(Σ n, (L.sum L.skolem₁).Functions n) = #(Σ n, L.BoundedFormula Empty (n + 1)) := by |
simp only [card_functions_sum, skolem₁_Functions, mk_sigma, sum_add_distrib']
conv_lhs => enter [2, 1, i]; rw [lift_id'.{u, v}]
rw [add_comm, add_eq_max, max_eq_left]
· refine sum_le_sum _ _ fun n => ?_
rw [← lift_le.{_, max u v}, lift_lift, lift_mk_le.{v}]
refine ⟨⟨fun f => (func f default).bdEqual (f... | [
" #((n : ℕ) × (L.sum L.skolem₁).Functions n) = #((n : ℕ) × L.BoundedFormula Empty (n + 1))",
" ((sum fun i => lift.{max u v, u} #(L.Functions i)) +\n sum fun i => lift.{u, max u v} #(L.BoundedFormula Empty (i + 1))) =\n sum fun i => #(L.BoundedFormula Empty (i + 1))",
"L : Language\nM : Type w\ninst✝¹ :... | [] |
import Mathlib.Analysis.Quaternion
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
#align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Quaternion Nat
open... | Mathlib/Analysis/NormedSpace/QuaternionExponential.lean | 59 | 78 | theorem expSeries_odd_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) (n : ℕ) :
expSeries ℝ (Quaternion ℝ) (2 * n + 1) (fun _ => q) =
(((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n + 1) / (2 * n + 1)!) / ‖q‖) • q := by |
rw [expSeries_apply_eq]
obtain rfl | hq0 := eq_or_ne q 0
· simp
have hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq
have hqn := norm_ne_zero_iff.mpr hq0
let k : ℝ := ↑(2 * n + 1)!
calc
k⁻¹ • q ^ (2 * n + 1) = k⁻¹ • ((-normSq q) ^ n * q) := by rw [pow_succ, pow_mul, hq2]
_ = k⁻¹ • ((-1 : ℝ) ^ ... | [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... | [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... |
import Mathlib.Algebra.CharZero.Lemmas
import Mathlib.Algebra.GroupWithZero.Commute
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Ring.Pow
import Mathlib.Algebra.Ring.Int
#align_import algebra.order.field.power from "leanprover-community/mathlib"@"acb3d204d4ee883eb686f45d486a2a6811a01329"
... | Mathlib/Algebra/Order/Field/Power.lean | 97 | 100 | theorem zpow_injective (h₀ : 0 < a) (h₁ : a ≠ 1) : Injective (a ^ · : ℤ → α) := by |
rcases h₁.lt_or_lt with (H | H)
· exact (zpow_strictAnti h₀ H).injective
· exact (zpow_strictMono H).injective
| [
" a ^ m ≤ a ^ n",
" a ^ m * a ^ k = a ^ n",
" 0 < ↑a ^ n",
" 0 < ↑a",
" Injective fun x => a ^ x"
] | [
" a ^ m ≤ a ^ n",
" a ^ m * a ^ k = a ^ n",
" 0 < ↑a ^ n",
" 0 < ↑a"
] |
import Mathlib.Tactic.Ring
set_option autoImplicit true
namespace Mathlib.Tactic.LinearCombination
open Lean hiding Rat
open Elab Meta Term
theorem pf_add_c [Add α] (p : a = b) (c : α) : a + c = b + c := p ▸ rfl
theorem c_add_pf [Add α] (p : b = c) (a : α) : a + b = a + c := p ▸ rfl
theorem add_pf [Add α] (p₁ : (... | Mathlib/Tactic/LinearCombination.lean | 111 | 112 | theorem eq_of_add [AddGroup α] (p : (a:α) = b) (H : (a' - b') - (a - b) = 0) : a' = b' := by |
rw [← sub_eq_zero] at p ⊢; rwa [sub_eq_zero, p] at H
| [
" a' = b'",
" a' - b' = 0"
] | [] |
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.NormedSpace.Real
#align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Metric Set
open Pointwise Topology
variable {𝕜 E : Type*}
variable [NormedField 𝕜]
sectio... | Mathlib/Analysis/NormedSpace/Pointwise.lean | 109 | 115 | theorem set_smul_sphere_zero {s : Set 𝕜} (hs : 0 ∉ s) (r : ℝ) :
s • sphere (0 : E) r = (‖·‖) ⁻¹' ((‖·‖ * r) '' s) :=
calc
s • sphere (0 : E) r = ⋃ c ∈ s, c • sphere (0 : E) r := iUnion_smul_left_image.symm
_ = ⋃ c ∈ s, sphere (0 : E) (‖c‖ * r) := iUnion₂_congr fun c hc ↦ by
rw [smul_sphere' (ne_of_... | ext; simp [eq_comm]
| [
" c • ball x r = ball (c • x) (‖c‖ * r)",
" y ∈ c • ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
" c⁻¹ • y ∈ ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
"𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y... | [
" c • ball x r = ball (c • x) (‖c‖ * r)",
" y ∈ c • ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
" c⁻¹ • y ∈ ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
"𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y... |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Vector.Basic
import Mathlib.Data.PFun
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Basic
import Mathlib.Tactic.ApplyFun
#align_import computability.turing_machine from "leanprover-commu... | Mathlib/Computability/TuringMachine.lean | 133 | 143 | theorem BlankRel.trans {Γ} [Inhabited Γ] {l₁ l₂ l₃ : List Γ} :
BlankRel l₁ l₂ → BlankRel l₂ l₃ → BlankRel l₁ l₃ := by |
rintro (h₁ | h₁) (h₂ | h₂)
· exact Or.inl (h₁.trans h₂)
· rcases le_total l₁.length l₃.length with h | h
· exact Or.inl (h₁.above_of_le h₂ h)
· exact Or.inr (h₂.above_of_le h₁ h)
· rcases le_total l₁.length l₃.length with h | h
· exact Or.inl (h₁.below_of_le h₂ h)
· exact Or.inr (h₂.below_of_le... | [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default",
" BlankExtends l l₁ → ... | [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default",
" BlankExtends l l₁ → ... |
import Mathlib.Init.Function
import Mathlib.Init.Order.Defs
#align_import data.bool.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
namespace Bool
@[deprecated (since := "2024-06-07")] alias decide_True := decide_true_eq_true
#align bool.to_bool_true decide_true_eq_true
@[dep... | Mathlib/Data/Bool/Basic.lean | 109 | 109 | theorem and_elim_left : ∀ {a b : Bool}, a && b → a := by | decide
| [
" b = false ∨ b = true",
" false = false ∨ false = true",
" true = false ∨ true = true",
" p x",
" p false",
" p true",
" p b ∨ p !b",
" p false ∨ p !false",
" p true ∨ p !true",
" ∃ x, p x",
" (a || b) = true",
" (false || b) = true",
" (true || b) = true",
" ∀ {a b : Bool}, (a && b) = tr... | [
" b = false ∨ b = true",
" false = false ∨ false = true",
" true = false ∨ true = true",
" p x",
" p false",
" p true",
" p b ∨ p !b",
" p false ∨ p !false",
" p true ∨ p !true",
" ∃ x, p x",
" (a || b) = true",
" (false || b) = true",
" (true || b) = true"
] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.Projection
import Mathlib.LinearAlgebra.SesquilinearForm
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.RingTheory.I... | Mathlib/LinearAlgebra/Dual.lean | 309 | 316 | theorem toDual_total_left (f : ι →₀ R) (i : ι) :
b.toDual (Finsupp.total ι M R b f) (b i) = f i := by |
rw [Finsupp.total_apply, Finsupp.sum, _root_.map_sum, LinearMap.sum_apply]
simp_rw [LinearMap.map_smul, LinearMap.smul_apply, toDual_apply, smul_eq_mul, mul_boole,
Finset.sum_ite_eq']
split_ifs with h
· rfl
· rw [Finsupp.not_mem_support_iff.mp h]
| [
" (b.toDual (b i)) (b j) = if i = j then 1 else 0",
" (if j = i then 1 else 0) = if i = j then 1 else 0",
" (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i",
" ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i",
" (if i ∈ f.support then f i else 0) = f i",
" f i = f i",
" 0 = f i"
] | [
" (b.toDual (b i)) (b j) = if i = j then 1 else 0",
" (if j = i then 1 else 0) = if i = j then 1 else 0"
] |
import Mathlib.NumberTheory.ZetaValues
import Mathlib.NumberTheory.LSeries.RiemannZeta
open Complex Real Set
open scoped Nat
namespace HurwitzZeta
variable {k : ℕ} {x : ℝ}
theorem cosZeta_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :
cosZeta x (2 * k) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / (2 * k)! *
... | Mathlib/NumberTheory/LSeries/HurwitzZetaValues.lean | 76 | 97 | theorem sinZeta_two_mul_nat_add_one (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :
sinZeta x (2 * k + 1) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / (2 * k + 1)! *
((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ) := by |
rw [← (hasSum_nat_sinZeta x (?_ : 1 < re (2 * k + 1))).tsum_eq]
refine Eq.trans ?_ <| (congr_arg ofReal' (hasSum_one_div_nat_pow_mul_sin hk hx).tsum_eq).trans ?_
· rw [ofReal_tsum]
refine tsum_congr fun n ↦ ?_
rw [mul_comm (1 / _), mul_one_div, ofReal_div, mul_assoc (2 * π), mul_comm x n, ← mul_assoc]
... | [
" cosZeta (↑x) (2 * ↑k) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k)))",
" 1 < (2 * ↑k).re",
" ∑' (b : ℕ), ↑(2 * π * x * ↑b).cos / ↑b ^ (2 * ↑k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k) * (2 * π * ↑b * x).cos)",
... | [
" cosZeta (↑x) (2 * ↑k) =\n (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / 2 / ↑(2 * k)! *\n Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k)))",
" 1 < (2 * ↑k).re",
" ∑' (b : ℕ), ↑(2 * π * x * ↑b).cos / ↑b ^ (2 * ↑k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k) * (2 * π * ↑b * x).cos)",
... |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpace
namespace MeasureTheory
namespace Measure
variable {M : Type*} [Monoid M] [MeasurableSpace M]
@[to_additive conv "Additive convolution of measures."]
noncomputable def mconv (μ : Measure M) (ν : Measure M) :
... | Mathlib/MeasureTheory/Group/Convolution.lean | 77 | 81 | theorem add_mconv [MeasurableMul₂ M] (μ : Measure M) (ν : Measure M) (ρ : Measure M) [SFinite μ]
[SFinite ν] [SFinite ρ] : (μ + ν) ∗ ρ = μ ∗ ρ + ν ∗ ρ := by |
unfold mconv
rw [add_prod, map_add]
measurability
| [
" dirac 1 ∗ μ = μ",
" map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ",
" map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" μ ∗ dirac 1 = μ",
" map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ",
" map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ... | [
" dirac 1 ∗ μ = μ",
" map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ",
" map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" μ ∗ dirac 1 = μ",
" map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ",
" map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ... |
import Aesop
import Mathlib.Algebra.Group.Defs
import Mathlib.Data.Nat.Defs
import Mathlib.Data.Int.Defs
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.Cases
import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.SplitIfs
#align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a... | Mathlib/Algebra/Group/Basic.lean | 445 | 445 | theorem inv_eq_one_div (x : G) : x⁻¹ = 1 / x := by | rw [div_eq_mul_inv, one_mul]
| [
" x⁻¹ = 1 / x"
] | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Prod
#align_import data.fintype.prod from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
open Function
open Nat
universe u v
variable {α β γ : Type*}
open Finset Function
namespace Set
variable {s t : Set α}
| Mathlib/Data/Fintype/Prod.lean | 31 | 34 | theorem toFinset_prod (s : Set α) (t : Set β) [Fintype s] [Fintype t] [Fintype (s ×ˢ t)] :
(s ×ˢ t).toFinset = s.toFinset ×ˢ t.toFinset := by |
ext
simp
| [
" (s ×ˢ t).toFinset = s.toFinset ×ˢ t.toFinset",
" a✝ ∈ (s ×ˢ t).toFinset ↔ a✝ ∈ s.toFinset ×ˢ t.toFinset"
] | [] |
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Topology.Algebra.ContinuousAffineMap
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.normed_space.continuous_affine_map from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
namespace Con... | Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean | 148 | 151 | theorem decomp (f : V →ᴬ[R] W) : (f : V → W) = f.contLinear + Function.const V (f 0) := by |
rcases f with ⟨f, h⟩
rw [coe_mk_const_linear_eq_linear, coe_mk, f.decomp, Pi.add_apply, LinearMap.map_zero, zero_add,
← Function.const_def]
| [
" Continuous { toFun := ⇑f.linear, map_add' := ⋯, map_smul' := ⋯ }.toFun",
" Continuous ⇑f.toAffineMap",
" ↑f.contLinear = f.linear",
" ↑f.contLinear x✝ = f.linear x✝",
" f.contLinear = 0 ↔ ∃ q, f = const R P q",
" f.contLinear = 0 ↔ f.linear = 0",
" f.linear = 0",
" f.contLinear = 0",
" f.linear x✝... | [
" Continuous { toFun := ⇑f.linear, map_add' := ⋯, map_smul' := ⋯ }.toFun",
" Continuous ⇑f.toAffineMap",
" ↑f.contLinear = f.linear",
" ↑f.contLinear x✝ = f.linear x✝",
" f.contLinear = 0 ↔ ∃ q, f = const R P q",
" f.contLinear = 0 ↔ f.linear = 0",
" f.linear = 0",
" f.contLinear = 0",
" f.linear x✝... |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Ring.Rat
import Mathlib.Data.Multiset.Sort
import Mathlib.Data.PNat.Basic
import Mathlib.Data.PNat.Interval
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.IntervalCases
#align_import number_theory.ADE_inequality from "leanprover-community/math... | Mathlib/NumberTheory/ADEInequality.lean | 175 | 195 | theorem lt_three {p q r : ℕ+} (hpq : p ≤ q) (hqr : q ≤ r) (H : 1 < sumInv {p, q, r}) : p < 3 := by |
have h3 : (0 : ℚ) < 3 := by norm_num
contrapose! H
rw [sumInv_pqr]
have h3q := H.trans hpq
have h3r := h3q.trans hqr
have hp: (p : ℚ)⁻¹ ≤ 3⁻¹ := by
rw [inv_le_inv _ h3]
· assumption_mod_cast
· norm_num
have hq: (q : ℚ)⁻¹ ≤ 3⁻¹ := by
rw [inv_le_inv _ h3]
· assumption_mod_cast
· nor... | [
" sumInv {p, q, r} = (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹",
" Admissible pqr → 1 < sumInv pqr",
" (∃ q r, A' q r = pqr) ∨ (∃ r, D' r = pqr) ∨ E' 3 = pqr ∨ E' 4 = pqr ∨ E' 5 = pqr → 1 < sumInv pqr",
" 1 < sumInv pqr",
" 1 < (↑↑1)⁻¹ + ((↑↑p')⁻¹ + (↑↑q')⁻¹)",
" 0 < (↑↑p')⁻¹ + (↑↑q')⁻¹",
" 0 < (↑↑p')⁻¹",
" 0 < (↑↑... | [
" sumInv {p, q, r} = (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹",
" Admissible pqr → 1 < sumInv pqr",
" (∃ q r, A' q r = pqr) ∨ (∃ r, D' r = pqr) ∨ E' 3 = pqr ∨ E' 4 = pqr ∨ E' 5 = pqr → 1 < sumInv pqr",
" 1 < sumInv pqr",
" 1 < (↑↑1)⁻¹ + ((↑↑p')⁻¹ + (↑↑q')⁻¹)",
" 0 < (↑↑p')⁻¹ + (↑↑q')⁻¹",
" 0 < (↑↑p')⁻¹",
" 0 < (↑↑... |
import Mathlib.Topology.EMetricSpace.Paracompact
import Mathlib.Topology.Instances.ENNReal
import Mathlib.Analysis.Convex.PartitionOfUnity
#align_import topology.metric_space.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal NNReal Filter Set Fu... | Mathlib/Topology/MetricSpace/PartitionOfUnity.lean | 42 | 61 | theorem eventually_nhds_zero_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
(hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) :
∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, ∀ i, p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i := by |
suffices ∀ i, x ∈ K i → ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, closedBall p.2 p.1 ⊆ U i by
apply mp_mem ((eventually_all_finite (hfin.point_finite x)).2 this)
(mp_mem (@tendsto_snd ℝ≥0∞ _ (𝓝 0) _ _ (hfin.iInter_compl_mem_nhds hK x)) _)
apply univ_mem'
rintro ⟨r, y⟩ hxy hyU i hi
simp only [mem_iInter... | [
" ∀ᶠ (p : ℝ≥0∞ × X) in 𝓝 0 ×ˢ 𝓝 x, ∀ (i : ι), p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i",
" {x_1 |\n x_1 ∈ Prod.snd ⁻¹' ⋂ i, ⋂ (_ : x ∉ K i), (K i)ᶜ →\n x_1 ∈\n {x_2 |\n x_2 ∈ {x_3 | (fun x_4 => ∀ i ∈ {b | x ∈ K b}, closedBall x_4.2 x_4.1 ⊆ U i) x_3} →\n x_2 ∈ {x | (fun p... | [] |
import Mathlib.Topology.Sets.Opens
#align_import topology.local_at_target from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Set Filter
open Topology Filter
variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β}
variable {s : Set β} {ι : Ty... | Mathlib/Topology/LocalAtTarget.lean | 66 | 72 | theorem IsClosedMap.restrictPreimage (H : IsClosedMap f) (s : Set β) :
IsClosedMap (s.restrictPreimage f) := by |
intro t
suffices ∀ u, IsClosed u → Subtype.val ⁻¹' u = t →
∃ v, IsClosed v ∧ Subtype.val ⁻¹' v = s.restrictPreimage f '' t by
simpa [isClosed_induced_iff]
exact fun u hu e => ⟨f '' u, H u hu, by simp [← e, image_restrictPreimage]⟩
| [
" Inducing (s.restrictPreimage f)",
" ∀ (x : ↑(f ⁻¹' s)), 𝓝 x = comap Subtype.val (comap f (𝓝 (f ↑x)))",
" 𝓝 a = comap Subtype.val (comap f (𝓝 (f ↑a)))",
" IsClosedMap (s.restrictPreimage f)",
" IsClosed t → IsClosed (s.restrictPreimage f '' t)",
" ∀ (u : Set α), IsClosed u → Subtype.val ⁻¹' u = t → ∃... | [
" Inducing (s.restrictPreimage f)",
" ∀ (x : ↑(f ⁻¹' s)), 𝓝 x = comap Subtype.val (comap f (𝓝 (f ↑x)))",
" 𝓝 a = comap Subtype.val (comap f (𝓝 (f ↑a)))"
] |
import Mathlib.Topology.LocalAtTarget
import Mathlib.AlgebraicGeometry.Morphisms.Basic
#align_import algebraic_geometry.morphisms.open_immersion from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace... | Mathlib/AlgebraicGeometry/Morphisms/OpenImmersion.lean | 53 | 74 | theorem isOpenImmersion_is_local_at_target : PropertyIsLocalAtTarget @IsOpenImmersion := by |
constructor
· exact isOpenImmersion_respectsIso
· intros; infer_instance
· intro X Y f 𝒰 H
rw [isOpenImmersion_iff_stalk]
constructor
· apply (openEmbedding_iff_openEmbedding_of_iSup_eq_top 𝒰.iSup_opensRange f.1.base.2).mpr
intro i
have := ((isOpenImmersion_respectsIso.arrow_iso_iff
... | [
" IsOpenImmersion f ↔\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)",
" IsOpenImmersion f →\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)",
" OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedS... | [
" IsOpenImmersion f ↔\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)",
" IsOpenImmersion f →\n OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)",
" OpenEmbedding ⇑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedS... |
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Order.Module.Algebra
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.Algebra.Ring.Subring.Units
#align_import linear_algebra.ray from "leanprover-community/mathlib"@"0f6670b8af2dff699de1c0b4b49039b31bc13c46"
noncomputable section
... | Mathlib/LinearAlgebra/Ray.lean | 102 | 111 | theorem trans (hxy : SameRay R x y) (hyz : SameRay R y z) (hy : y = 0 → x = 0 ∨ z = 0) :
SameRay R x z := by |
rcases eq_or_ne x 0 with (rfl | hx); · exact zero_left z
rcases eq_or_ne z 0 with (rfl | hz); · exact zero_right x
rcases eq_or_ne y 0 with (rfl | hy);
· exact (hy rfl).elim (fun h => (hx h).elim) fun h => (hz h).elim
rcases hxy.exists_pos hx hy with ⟨r₁, r₂, hr₁, hr₂, h₁⟩
rcases hyz.exists_pos hy hz with ... | [
" SameRay R x y",
" SameRay R 0 y",
" SameRay R x x",
" SameRay R x z",
" SameRay R 0 z",
" SameRay R x 0",
" (r₃ * r₁) • x = (r₂ * r₄) • z"
] | [
" SameRay R x y",
" SameRay R 0 y",
" SameRay R x x"
] |
import Batteries.Data.RBMap.WF
namespace Batteries
namespace RBNode
open RBColor
attribute [simp] Path.fill
def OnRoot (p : α → Prop) : RBNode α → Prop
| nil => True
| node _ _ x _ => p x
namespace Path
@[inline] def fill' : RBNode α × Path α → RBNode α := fun (t, path) => path.fill t
| .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean | 34 | 38 | theorem zoom_fill' (cut : α → Ordering) (t : RBNode α) (path : Path α) :
fill' (zoom cut t path) = path.fill t := by |
induction t generalizing path with
| nil => rfl
| node _ _ _ _ iha ihb => unfold zoom; split <;> [apply iha; apply ihb; rfl]
| [
" fill' (zoom cut t path) = path.fill t",
" fill' (zoom cut nil path) = path.fill nil",
" fill' (zoom cut (node c✝ l✝ v✝ r✝) path) = path.fill (node c✝ l✝ v✝ r✝)",
" fill'\n (match cut v✝ with\n | Ordering.lt => zoom cut l✝ (left c✝ path v✝ r✝)\n | Ordering.gt => zoom cut r✝ (right c✝ l✝ v✝ pat... | [] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : ℝ}
-- @... | Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 92 | 94 | theorem inv_logb_div_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
(logb (a / b) c)⁻¹ = (logb a c)⁻¹ - (logb b c)⁻¹ := by |
simp_rw [inv_logb]; exact logb_div h₁ h₂
| [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x",
" (a.logb b)⁻¹ = b.logb a",
" ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹",
" c.logb ... | [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x",
" (a.logb b)⁻¹ = b.logb a",
" ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹",
" c.logb ... |
import Mathlib.Analysis.Calculus.FDeriv.Prod
#align_import analysis.calculus.fderiv.bilinear from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open Topology NNReal Asymptotics ENNReal
noncomputable section
... | Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean | 51 | 74 | theorem IsBoundedBilinearMap.hasStrictFDerivAt (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
HasStrictFDerivAt b (h.deriv p) p := by |
simp only [HasStrictFDerivAt]
simp only [← map_add_left_nhds_zero (p, p), isLittleO_map]
set T := (E × F) × E × F
calc
_ = fun x ↦ h.deriv (x.1 - x.2) (x.2.1, x.1.2) := by
ext ⟨⟨x₁, y₁⟩, ⟨x₂, y₂⟩⟩
rcases p with ⟨x, y⟩
simp only [map_sub, deriv_apply, Function.comp_apply, Prod.mk_add_mk, h... | [
" HasStrictFDerivAt b (h.deriv p) p",
" (fun p_1 => b p_1.1 - b p_1.2 - (h.deriv p) (p_1.1 - p_1.2)) =o[𝓝 (p, p)] fun p => p.1 - p.2",
" ((fun p_1 => b p_1.1 - b p_1.2 - (h.deriv p) (p_1.1 - p_1.2)) ∘ fun x => (p, p) + x) =o[𝓝 0]\n ((fun p => p.1 - p.2) ∘ fun x => (p, p) + x)",
" ((fun p_1 => b p_1.1 - b... | [] |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical... | Mathlib/Topology/UniformSpace/Separation.lean | 186 | 191 | theorem Filter.Tendsto.inseparable_iff_uniformity {l : Filter β} [NeBot l] {f g : β → α} {a b : α}
(ha : Tendsto f l (𝓝 a)) (hb : Tendsto g l (𝓝 b)) :
Inseparable a b ↔ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) := by |
refine ⟨fun h ↦ (ha.prod_mk_nhds hb).mono_right h.nhds_le_uniformity, fun h ↦ ?_⟩
rw [inseparable_iff_clusterPt_uniformity]
exact (ClusterPt.of_le_nhds (ha.prod_mk_nhds hb)).mono h
| [
" 𝓝 (x, y) ≤ 𝓤 α",
" 𝓝 (y, y) ≤ 𝓤 α",
" Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)",
" Inseparable x y",
" ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i",
" T0Space α ↔ ∀ (x y : α), (∀ r ∈ 𝓤 α, (x, y) ∈ r) → x = y",
" T0Space α ↔ Pairwise fun x y => ∃ r ... | [
" 𝓝 (x, y) ≤ 𝓤 α",
" 𝓝 (y, y) ≤ 𝓤 α",
" Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)",
" Inseparable x y",
" ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i",
" T0Space α ↔ ∀ (x y : α), (∀ r ∈ 𝓤 α, (x, y) ∈ r) → x = y",
" T0Space α ↔ Pairwise fun x y => ∃ r ... |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteD... | Mathlib/NumberTheory/Cyclotomic/Basic.lean | 100 | 103 | theorem iff_singleton :
IsCyclotomicExtension {n} A B ↔
(∃ r : B, IsPrimitiveRoot r n) ∧ ∀ x, x ∈ adjoin A {b : B | b ^ (n : ℕ) = 1} := by |
simp [isCyclotomicExtension_iff]
| [
" IsCyclotomicExtension {n} A B ↔ (∃ r, IsPrimitiveRoot r ↑n) ∧ ∀ (x : B), x ∈ adjoin A {b | b ^ ↑n = 1}"
] | [] |
import Mathlib.Algebra.Module.Submodule.Basic
import Mathlib.Topology.Algebra.Monoid
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Algebra.Algebra.Pi
#align_import order.filter.zero_and_bounded_at_filter from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
namespace Filt... | Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean | 51 | 53 | theorem ZeroAtFilter.smul [TopologicalSpace β] [Zero 𝕜] [Zero β]
[SMulWithZero 𝕜 β] [ContinuousConstSMul 𝕜 β] {l : Filter α} {f : α → β} (c : 𝕜)
(hf : ZeroAtFilter l f) : ZeroAtFilter l (c • f) := by | simpa using hf.const_smul c
| [
" l.ZeroAtFilter (f + g)",
" l.ZeroAtFilter (-f)",
" l.ZeroAtFilter (c • f)"
] | [
" l.ZeroAtFilter (f + g)",
" l.ZeroAtFilter (-f)"
] |
import Mathlib.Data.List.Basic
#align_import data.bool.all_any from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
variable {α : Type*} {p : α → Prop} [DecidablePred p] {l : List α} {a : α}
namespace List
-- Porting note: in Batteries
#align list.all_nil List.all_nil
#align list.all_... | Mathlib/Data/Bool/AllAny.lean | 33 | 34 | theorem all_iff_forall_prop : (all l fun a => p a) ↔ ∀ a ∈ l, p a := by |
simp only [all_iff_forall, decide_eq_true_iff]
| [
" l.all p = true ↔ ∀ (a : α), a ∈ l → p a = true",
" [].all p = true ↔ ∀ (a : α), a ∈ [] → p a = true",
" (a :: l).all p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true",
" (l.all fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a"
] | [
" l.all p = true ↔ ∀ (a : α), a ∈ l → p a = true",
" [].all p = true ↔ ∀ (a : α), a ∈ [] → p a = true",
" (a :: l).all p = true ↔ ∀ (a_1 : α), a_1 ∈ a :: l → p a_1 = true"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Data.Tree.Basic
import Mathlib.Logic.Basic
import Mathlib.Tactic.NormNum.Core
import Mathlib.Util.SynthesizeUsing
import Mathlib.Util.Qq
open Lean Parser Tactic Mathlib Meta NormNum Qq
initialize registerTraceClass `CancelDen... | Mathlib/Tactic/CancelDenoms/Core.lean | 55 | 56 | theorem add_subst {α} [Ring α] {n e1 e2 t1 t2 : α} (h1 : n * e1 = t1) (h2 : n * e2 = t2) :
n * (e1 + e2) = t1 + t2 := by | simp [left_distrib, *]
| [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2"
] | [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'"
] |
import Mathlib.NumberTheory.Zsqrtd.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Real.Archimedean
#align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Zsqrtd Complex
open sc... | Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean | 101 | 101 | theorem toComplex_im (x y : ℤ) : ((⟨x, y⟩ : ℤ[i]) : ℂ).im = y := by | simp [toComplex_def]
| [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im",
" (toComplex { re :=... | [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im",
" (toComplex { re :=... |
import Mathlib.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 | 102 | 103 | theorem count_lt_count_succ_iff {n : ℕ} : count p n < count p (n + 1) ↔ p n := by |
by_cases h : p n <;> simp [count_succ, h]
| [
" count p 0 = 0",
" Fintype { i // i < n ∧ p i }",
" ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... | [
" count p 0 = 0",
" Fintype { i // i < n ∧ p i }",
" ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x",
" x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Coxeter.Basic
namespace CoxeterSystem
open List Matrix Function Classical
variable {B : Type*}
variable {W : Type*} [Group W]
variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W)
local prefix:100 "s" => cs.simple
local prefix:100 "π" => cs.wordProd
... | Mathlib/GroupTheory/Coxeter/Length.lean | 152 | 159 | theorem length_eq_one_iff {w : W} : ℓ w = 1 ↔ ∃ i : B, w = s i := by |
constructor
· intro h
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
rcases List.length_eq_one.mp (hω.trans h) with ⟨i, rfl⟩
exact ⟨i, cs.wordProd_singleton i⟩
· rintro ⟨i, rfl⟩
exact cs.length_simple i
| [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... | [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... |
import Mathlib.Algebra.Order.Floor
import Mathlib.Topology.Algebra.Order.Group
import Mathlib.Topology.Order.Basic
#align_import topology.algebra.order.floor from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219"
open Filter Function Int Set Topology
variable {α β γ : Type*} [LinearOrdere... | Mathlib/Topology/Algebra/Order/Floor.lean | 101 | 105 | theorem tendsto_ceil_right_pure_floor_add_one (x : α) :
Tendsto (ceil : α → ℤ) (𝓝[>] x) (pure (⌊x⌋ + 1)) :=
have : ↑(⌊x⌋ + 1) - 1 ≤ x := by | rw [cast_add, cast_one, add_sub_cancel_right]; exact floor_le _
tendsto_pure.2 <| mem_of_superset (Ioc_mem_nhdsWithin_Ioi' <| lt_succ_floor _) fun _y hy =>
ceil_eq_on_Ioc _ _ ⟨this.trans_lt hy.1, hy.2⟩
| [
" b ≤ ⌊↑(b + 1)⌋",
" b ≤ b + 1",
" ⌈↑(b - 1)⌉ ≤ b",
" b - 1 ≤ b",
" Tendsto floor (𝓝[≥] ↑n) (pure n)",
" Tendsto ceil (𝓝[≤] ↑n) (pure n)",
" ↑(⌈x⌉ - 1) < x",
" ↑⌈x⌉ < x + 1",
" x ≤ ↑(⌈x⌉ - 1) + 1",
" x ≤ ↑⌈x⌉",
" Tendsto floor (𝓝[<] ↑n) (pure (n - 1))",
" ↑(⌊x⌋ + 1) - 1 ≤ x",
" ↑⌊x⌋ ≤ x"
... | [
" b ≤ ⌊↑(b + 1)⌋",
" b ≤ b + 1",
" ⌈↑(b - 1)⌉ ≤ b",
" b - 1 ≤ b",
" Tendsto floor (𝓝[≥] ↑n) (pure n)",
" Tendsto ceil (𝓝[≤] ↑n) (pure n)",
" ↑(⌈x⌉ - 1) < x",
" ↑⌈x⌉ < x + 1",
" x ≤ ↑(⌈x⌉ - 1) + 1",
" x ≤ ↑⌈x⌉",
" Tendsto floor (𝓝[<] ↑n) (pure (n - 1))"
] |
import Mathlib.Deprecated.Group
#align_import deprecated.ring from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
universe u v w
variable {α : Type u}
structure IsSemiringHom {α : Type u} {β : Type v} [Semiring α] [Semiring β] (f : α → β) : Prop where
map_zero : f 0 = 0
map... | Mathlib/Deprecated/Ring.lean | 119 | 119 | theorem id : IsRingHom (@id α) := by | constructor <;> intros <;> rfl
| [
" f 0 = f (0 + 0) - f 0",
" f 0 = f 0 + f 0 - f 0",
" f (0 + 0) - f 0 = 0",
" f (-x) = f (-x + x) - f x",
" f (-x) = f (-x) + f x - f x",
" f (-x + x) - f x = -f x",
" f (x - y) = f x - f y",
" IsRingHom _root_.id",
" _root_.id 1 = 1",
" ∀ (x y : α), _root_.id (x * y) = _root_.id x * _root_.id y",... | [
" f 0 = f (0 + 0) - f 0",
" f 0 = f 0 + f 0 - f 0",
" f (0 + 0) - f 0 = 0",
" f (-x) = f (-x + x) - f x",
" f (-x) = f (-x) + f x - f x",
" f (-x + x) - f x = -f x",
" f (x - y) = f x - f y"
] |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ι : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 361 | 362 | theorem degree_C_mul (a0 : a ≠ 0) : (C a * p).degree = p.degree := by |
rw [degree_mul, degree_C a0, zero_add]
| [
" (p * C a).degree = p.degree",
" (C a * p).degree = p.degree"
] | [
" (p * C a).degree = p.degree"
] |
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.add from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open Topology NNReal F... | Mathlib/Analysis/Calculus/FDeriv/Add.lean | 346 | 350 | theorem HasStrictFDerivAt.sum (h : ∀ i ∈ u, HasStrictFDerivAt (A i) (A' i) x) :
HasStrictFDerivAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) x := by |
dsimp [HasStrictFDerivAt] at *
convert IsLittleO.sum h
simp [Finset.sum_sub_distrib, ContinuousLinearMap.sum_apply]
| [
" HasStrictFDerivAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) x",
" (fun p => ∑ i ∈ u, A i p.1 - ∑ i ∈ u, A i p.2 - (∑ i ∈ u, A' i) (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2",
" ∑ i ∈ u, A i x✝.1 - ∑ i ∈ u, A i x✝.2 - (∑ i ∈ u, A' i) (x✝.1 - x✝.2) =\n ∑ i ∈ u, (A i x✝.1 - A i x✝.2 - (A' i) (x✝.1 - x✝.2))... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.