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.Geometry.Manifold.ContMDiff.NormedSpace
#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
noncomputable section
open Set TopologicalSpace
open scoped Manifold Topology
variable {𝕜 B F : Type*} [Topolog... | Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean | 87 | 95 | theorem target_trans_partialHomeomorph (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] ... |
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
| [
" (partialHomeomorph φ hU hφ h2φ ≫ₕ partialHomeomorph φ' hU' hφ' h2φ').source = (U ∩ U') ×ˢ univ",
" ({ toFun := fun x => (x.1, (φ x.1) x.2), invFun := fun x => (x.1, (φ x.1).symm x.2), source := U ×ˢ univ,\n target := U ×ˢ univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯, open_s... | [
" (partialHomeomorph φ hU hφ h2φ ≫ₕ partialHomeomorph φ' hU' hφ' h2φ').source = (U ∩ U') ×ˢ univ",
" ({ toFun := fun x => (x.1, (φ x.1) x.2), invFun := fun x => (x.1, (φ x.1).symm x.2), source := U ×ˢ univ,\n target := U ×ˢ univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯, open_s... |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike
open scoped ComplexConjugate
variable {𝕜 E F G : Type... | Mathlib/Analysis/InnerProductSpace/Adjoint.lean | 155 | 158 | theorem apply_norm_sq_eq_inner_adjoint_right (A : E →L[𝕜] F) (x : E) :
‖A x‖ ^ 2 = re ⟪x, (A† ∘L A) x⟫ := by |
have h : ⟪x, (A† ∘L A) x⟫ = ⟪A x, A x⟫ := by rw [← adjoint_inner_right]; rfl
rw [h, ← inner_self_eq_norm_sq (𝕜 := 𝕜) _]
| [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜",
" ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜",
" adjointAux (adjointAux A) = A",
" (adjointAux (adjointAux A)) v = A v",
" ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜",
" ‖adjointAux A‖ = ‖A‖",
" ‖adjointAux A‖ ≤ ‖A‖",
" ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖",
... | [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜",
" ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜",
" adjointAux (adjointAux A) = A",
" (adjointAux (adjointAux A)) v = A v",
" ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜",
" ‖adjointAux A‖ = ‖A‖",
" ‖adjointAux A‖ ≤ ‖A‖",
" ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖",
... |
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers
#align_import category_theory.limits.shapes.wide_equalizers from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace CategoryTheory.Limits
open CategoryTheo... | Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean | 223 | 224 | theorem Cotrident.app_one (s : Cotrident f) (j : J) : f j ≫ s.ι.app one = s.ι.app zero := by |
rw [← s.w (line j), parallelFamily_map_left]
| [
" f ≫ 𝟙 Y✝ = f",
" Hom.id X✝ ≫ 𝟙 X✝ = Hom.id X✝",
" line a✝ ≫ 𝟙 one = line a✝",
" (f ≫ g) ≫ h = f ≫ g ≫ h",
" (Hom.id W✝ ≫ g) ≫ h = Hom.id W✝ ≫ g ≫ h",
" (line a✝ ≫ g) ≫ h = line a✝ ≫ g ≫ h",
" (Hom.id W✝ ≫ Hom.id W✝) ≫ h = Hom.id W✝ ≫ Hom.id W✝ ≫ h",
" (Hom.id zero ≫ line a✝) ≫ h = Hom.id zero ≫ l... | [
" f ≫ 𝟙 Y✝ = f",
" Hom.id X✝ ≫ 𝟙 X✝ = Hom.id X✝",
" line a✝ ≫ 𝟙 one = line a✝",
" (f ≫ g) ≫ h = f ≫ g ≫ h",
" (Hom.id W✝ ≫ g) ≫ h = Hom.id W✝ ≫ g ≫ h",
" (line a✝ ≫ g) ≫ h = line a✝ ≫ g ≫ h",
" (Hom.id W✝ ≫ Hom.id W✝) ≫ h = Hom.id W✝ ≫ Hom.id W✝ ≫ h",
" (Hom.id zero ≫ line a✝) ≫ h = Hom.id zero ≫ l... |
import Mathlib.Analysis.Convex.Basic
import Mathlib.Order.Closure
#align_import analysis.convex.hull from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set
open Pointwise
variable {𝕜 E F : Type*}
section convexHull
section OrderedSemiring
variable [OrderedSemiring 𝕜]
secti... | Mathlib/Analysis/Convex/Hull.lean | 104 | 106 | theorem convexHull_nonempty_iff : (convexHull 𝕜 s).Nonempty ↔ s.Nonempty := by |
rw [nonempty_iff_ne_empty, nonempty_iff_ne_empty, Ne, Ne]
exact not_congr convexHull_empty_iff
| [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅",
... | [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅"
] |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic
#align_import measure_theory.function.conditional_expectation.indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open TopologicalSpace MeasureTheory.Lp Filter ContinuousLinearMap
open s... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Indicator.lean | 63 | 70 | theorem condexp_indicator_aux (hs : MeasurableSet[m] s) (hf : f =ᵐ[μ.restrict sᶜ] 0) :
μ[s.indicator f|m] =ᵐ[μ] s.indicator (μ[f|m]) := by |
by_cases hm : m ≤ m0
swap; · simp_rw [condexp_of_not_le hm, Set.indicator_zero']; rfl
have hsf_zero : ∀ g : α → E, g =ᵐ[μ.restrict sᶜ] 0 → s.indicator g =ᵐ[μ] g := fun g =>
indicator_ae_eq_of_restrict_compl_ae_eq_zero (hm _ hs)
refine ((hsf_zero (μ[f|m]) (condexp_ae_eq_restrict_zero hs.compl hf)).trans ?_)... | [
" μ[f|m] =ᶠ[ae (μ.restrict s)] 0",
" 0 =ᶠ[ae (μ.restrict s)] 0",
" SigmaFinite ((μ.restrict s).trim hm)",
" SigmaFinite ((μ.trim hm).restrict s)",
" ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s) s_1 < ⊤ → IntegrableOn (μ[f|m]) s_1 (μ.restrict s)",
" ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s... | [
" μ[f|m] =ᶠ[ae (μ.restrict s)] 0",
" 0 =ᶠ[ae (μ.restrict s)] 0",
" SigmaFinite ((μ.restrict s).trim hm)",
" SigmaFinite ((μ.trim hm).restrict s)",
" ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s) s_1 < ⊤ → IntegrableOn (μ[f|m]) s_1 (μ.restrict s)",
" ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s... |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.List.Chain
#align_import data.bool.count from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace List
@[simp]
theorem count_not_add_count (l : List Bool) (b : Bool) : count (!b) l + count b l = length l := by
-- Porting ... | Mathlib/Data/Bool/Count.lean | 120 | 123 | theorem length_sub_one_le_two_mul_count_bool (hl : Chain' (· ≠ ·) l) (b : Bool) :
length l - 1 ≤ 2 * count b l := by |
rw [hl.two_mul_count_bool_eq_ite]
split_ifs <;> simp [le_tsub_add, Nat.le_succ_of_le]
| [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... | [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... |
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.MeasureTheory.Measure.Hausdorff
#align_import topology.metric_space.hausdorff_dimension from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
open scoped MeasureTheory ENNReal NNReal Topology
open MeasureTheory MeasureTheory... | Mathlib/Topology/MetricSpace/HausdorffDimension.lean | 115 | 119 | theorem hausdorffMeasure_of_lt_dimH {s : Set X} {d : ℝ≥0} (h : ↑d < dimH s) : μH[d] s = ∞ := by |
simp only [dimH_def, lt_iSup_iff] at h
rcases h with ⟨d', hsd', hdd'⟩
rw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at hdd'
exact top_unique (hsd' ▸ hausdorffMeasure_mono hdd'.le _)
| [
" ℝ≥0∞",
" dimH s = ⨆ d, ⨆ (_ : μH[↑d] s = ⊤), ↑d",
" μH[↑d] s = ⊤"
] | [
" ℝ≥0∞",
" dimH s = ⨆ d, ⨆ (_ : μH[↑d] s = ⊤), ↑d"
] |
import Mathlib.Algebra.Group.Subsemigroup.Basic
#align_import group_theory.subsemigroup.membership from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff"
assert_not_exists MonoidWithZero
variable {ι : Sort*} {M A B : Type*}
section NonAssoc
variable [Mul M]
open Set
namespace Subsemigr... | Mathlib/Algebra/Group/Subsemigroup/Membership.lean | 82 | 84 | theorem mem_sup_left {S T : Subsemigroup M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T := by |
have : S ≤ S ⊔ T := le_sup_left
tauto
| [
" x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i",
" x ∈ ⨆ i, S i → ∃ i, x ∈ S i",
" x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i",
" ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i",
" ∃ i, x * y ∈ S i",
" x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)",
" x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s",
" x ∈ ↑(sSup S) ↔ x ∈ ⋃ s ∈ S, ↑s"... | [
" x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i",
" x ∈ ⨆ i, S i → ∃ i, x ∈ S i",
" x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i",
" ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i",
" ∃ i, x * y ∈ S i",
" x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)",
" x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s",
" x ∈ ↑(sSup S) ↔ x ∈ ⋃ s ∈ S, ↑s"... |
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.Algebra.Regular.Basic
import Mathlib.Data.Nat.Choose.Sum
#align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
set_option linter.uppercaseLean3 false
no... | Mathlib/Algebra/Polynomial/Coeff.lean | 138 | 138 | theorem mul_coeff_zero (p q : R[X]) : coeff (p * q) 0 = coeff p 0 * coeff q 0 := by | simp [coeff_mul]
| [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... | [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.RingTheory.LocalProperties
#align_import algebraic_geometry.morphisms.ring_hom_properties from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
-- Explicit universe annotations were used in this file to improve perfomance #127... | Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean | 73 | 80 | theorem RespectsIso.basicOpen_iff_localization (hP : RespectsIso @P) {X Y : Scheme.{u}} [IsAffine X]
[IsAffine Y] (f : X ⟶ Y) (r : Y.presheaf.obj (Opposite.op ⊤)) :
P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔ P (Localization.awayMap (Scheme.Γ.map f.op) r) := by |
refine (hP.basicOpen_iff _ _).trans ?_
-- Porting note: was a one line term mode proof, but this `dsimp` is vital so the term mode
-- one liner is not possible
dsimp
rw [← hP.is_localization_away_iff]
| [
" P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔\n P\n (IsLocalization.Away.map (↑(Y.presheaf.obj { unop := Y.basicOpen r }))\n (↑(X.presheaf.obj { unop := X.basicOpen ((Scheme.Γ.map f.op) r) })) (Scheme.Γ.map f.op) r)",
" P (f.val.c.app { unop := Y.basicOpen r } ≫ X.presheaf.map (eqToHom ⋯).op) =\n ... | [
" P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔\n P\n (IsLocalization.Away.map (↑(Y.presheaf.obj { unop := Y.basicOpen r }))\n (↑(X.presheaf.obj { unop := X.basicOpen ((Scheme.Γ.map f.op) r) })) (Scheme.Γ.map f.op) r)",
" P (f.val.c.app { unop := Y.basicOpen r } ≫ X.presheaf.map (eqToHom ⋯).op) =\n ... |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {α : Type v} {β : Type w}
namespace Matrix
def col (w : m → α) : Matrix m Unit α :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 148 | 151 | theorem diag_col_mul_row [Mul α] [AddCommMonoid α] (a b : n → α) :
diag (col a * row b) = a * b := by |
ext
simp [Matrix.mul_apply, col, row]
| [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... | [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w w₁
section SkewAdjointEndomorphisms
open LinearMap (BilinF... | Mathlib/Algebra/Lie/SkewAdjoint.lean | 46 | 53 | theorem LinearMap.BilinForm.isSkewAdjoint_bracket {f g : Module.End R M}
(hf : f ∈ B.skewAdjointSubmodule) (hg : g ∈ B.skewAdjointSubmodule) :
⁅f, g⁆ ∈ B.skewAdjointSubmodule := by |
rw [mem_skewAdjointSubmodule] at *
have hfg : IsAdjointPair B B (f * g) (g * f) := by rw [← neg_mul_neg g f]; exact hf.mul hg
have hgf : IsAdjointPair B B (g * f) (f * g) := by rw [← neg_mul_neg f g]; exact hg.mul hf
change IsAdjointPair B B (f * g - g * f) (-(f * g - g * f)); rw [neg_sub]
exact hfg.sub hgf
| [
" ⁅f, g⁆ ∈ skewAdjointSubmodule B",
" IsSkewAdjoint B ⁅f, g⁆",
" IsAdjointPair B B (f * g) (g * f)",
" IsAdjointPair B B (f * g) (-g * -f)",
" IsAdjointPair B B (g * f) (f * g)",
" IsAdjointPair B B (g * f) (-f * -g)",
" IsAdjointPair B B (f * g - g * f) (-(f * g - g * f))",
" IsAdjointPair B B (f * g... | [] |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.Dynamics.PeriodicPts
import Mathlib.Data.Set.Pointwise.SMul
namespace MulAction
open Pointwise
variable {α : Type*}
variable {G : Type*} [Group G] [MulAction G α]
variable {M : Type*} [Monoid M] [MulAction M α]
... | Mathlib/GroupTheory/GroupAction/FixedPoints.lean | 82 | 87 | theorem fixedBy_subset_fixedBy_zpow (g : G) (j : ℤ) :
fixedBy α g ⊆ fixedBy α (g ^ j) := by |
intro a a_in_fixedBy
rw [mem_fixedBy, zpow_smul_eq_iff_minimalPeriod_dvd,
minimalPeriod_eq_one_iff_fixedBy.mpr a_in_fixedBy, Nat.cast_one]
exact one_dvd j
| [
" fixedBy α g⁻¹ = fixedBy α g",
" x✝ ∈ fixedBy α g⁻¹ ↔ x✝ ∈ fixedBy α g",
" g • a ∈ fixedBy α g ↔ a ∈ fixedBy α g",
" g • a = a ↔ a ∈ fixedBy α g",
" g⁻¹ • a ∈ fixedBy α g ↔ a ∈ fixedBy α g",
" fixedBy α g ⊆ fixedBy α (g ^ j)",
" a ∈ fixedBy α (g ^ j)",
" 1 ∣ j"
] | [
" fixedBy α g⁻¹ = fixedBy α g",
" x✝ ∈ fixedBy α g⁻¹ ↔ x✝ ∈ fixedBy α g",
" g • a ∈ fixedBy α g ↔ a ∈ fixedBy α g",
" g • a = a ↔ a ∈ fixedBy α g",
" g⁻¹ • a ∈ fixedBy α g ↔ a ∈ fixedBy α g"
] |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Sort
import Mathlib.Data.List.FinRange
import Mathlib.LinearAlgebra.Pi
import Mathlib.Logic.Equiv.Fintype
#align_import linear_algebra.multilinear.basic from ... | Mathlib/LinearAlgebra/Multilinear/Basic.lean | 183 | 185 | theorem map_zero [Nonempty ι] : f 0 = 0 := by |
obtain ⟨i, _⟩ : ∃ i : ι, i ∈ Set.univ := Set.exists_mem_of_nonempty ι
exact map_coord_zero f i rfl
| [
" f = g",
" { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g",
" { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }",
" { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\... | [
" f = g",
" { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g",
" { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }",
" { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\... |
import Mathlib.Algebra.MvPolynomial.Equiv
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.RingTheory.Adjoin.Basic
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.MvPolynomial.Basic
#align_import ring_theory.algebraic_independent from "leanprove... | Mathlib/RingTheory/AlgebraicIndependent.lean | 156 | 160 | theorem of_comp (f : A →ₐ[R] A') (hfv : AlgebraicIndependent R (f ∘ x)) :
AlgebraicIndependent R x := by |
have : aeval (f ∘ x) = f.comp (aeval x) := by ext; simp
rw [AlgebraicIndependent, this, AlgHom.coe_comp] at hfv
exact hfv.of_comp
| [
" AlgebraicIndependent R x ↔ Injective ⇑(algebraMap R A)",
" aeval x = (ofId R A).comp ↑(isEmptyAlgEquiv R ι)",
" (aeval x) (X i) = ((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) (X i)",
" Injective ⇑((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) ↔ Injective (⇑(algebraMap R A) ∘ ⇑(isEmptyAlgEquiv R ι))",
" Injective ⇑(... | [
" AlgebraicIndependent R x ↔ Injective ⇑(algebraMap R A)",
" aeval x = (ofId R A).comp ↑(isEmptyAlgEquiv R ι)",
" (aeval x) (X i) = ((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) (X i)",
" Injective ⇑((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) ↔ Injective (⇑(algebraMap R A) ∘ ⇑(isEmptyAlgEquiv R ι))",
" Injective ⇑(... |
import Mathlib.Data.List.Range
import Mathlib.Algebra.Order.Ring.Nat
variable {α : Type*}
namespace List
@[simp]
theorem length_iterate (f : α → α) (a : α) (n : ℕ) : length (iterate f a n) = n := by
induction n generalizing a <;> simp [*]
@[simp]
theorem iterate_eq_nil {f : α → α} {a : α} {n : ℕ} : iterate f ... | Mathlib/Data/List/Iterate.lean | 54 | 56 | theorem take_iterate (f : α → α) (a : α) (m n : ℕ) :
take m (iterate f a n) = iterate f a (min m n) := by |
rw [← range_map_iterate, ← range_map_iterate, ← map_take, take_range]
| [
" (iterate f a n).length = n",
" (iterate f a 0).length = 0",
" (iterate f a (n✝ + 1)).length = n✝ + 1",
" iterate f a n = [] ↔ n = 0",
" (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)",
" i < n",
" ↑i < n",
" b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a",
" map (fun x => f^[x] a) (range n) = i... | [
" (iterate f a n).length = n",
" (iterate f a 0).length = 0",
" (iterate f a (n✝ + 1)).length = n✝ + 1",
" iterate f a n = [] ↔ n = 0",
" (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)",
" i < n",
" ↑i < n",
" b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a",
" map (fun x => f^[x] a) (range n) = i... |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.List.AList
#align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
namespace Finsupp
variable {α M : Type*} [Zero M]
@[simps]
noncomputable def toAList (f : α →₀ M) : AList fun _x : α => M :=
⟨f.grap... | Mathlib/Data/Finsupp/AList.lean | 41 | 44 | theorem toAList_keys_toFinset [DecidableEq α] (f : α →₀ M) :
f.toAList.keys.toFinset = f.support := by |
ext
simp [toAList, AList.mem_keys, AList.keys, List.keys]
| [
" (List.map Prod.toSigma f.graph.toList).NodupKeys",
" ∀ x ∈ f.graph.toList, ∀ y ∈ f.graph.toList, x.1 = y.1 → x = y",
" (b, m) = (b, n)",
" f.graph.toList.Nodup",
" f.toAList.keys.toFinset = f.support",
" a✝ ∈ f.toAList.keys.toFinset ↔ a✝ ∈ f.support"
] | [
" (List.map Prod.toSigma f.graph.toList).NodupKeys",
" ∀ x ∈ f.graph.toList, ∀ y ∈ f.graph.toList, x.1 = y.1 → x = y",
" (b, m) = (b, n)",
" f.graph.toList.Nodup"
] |
import Mathlib.Algebra.CharP.Two
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.NumberTheory.Divisors
import Mathlib.RingTheory.IntegralDomain
import Mathlib.Tactic.Zify
#align_import rin... | Mathlib/RingTheory/RootsOfUnity/Basic.lean | 314 | 316 | theorem mem_primitiveRoots {ζ : R} (h0 : 0 < k) : ζ ∈ primitiveRoots k R ↔ IsPrimitiveRoot ζ k := by |
rw [primitiveRoots, mem_filter, Multiset.mem_toFinset, mem_nthRoots h0, and_iff_right_iff_imp]
exact IsPrimitiveRoot.pow_eq_one
| [
" a✝ * b✝ ∈ {ζ | ζ ^ ↑k = 1}",
" x✝¹⁻¹ ∈ { carrier := {ζ | ζ ^ ↑k = 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" ζ ∈ rootsOfUnity k M ↔ ↑ζ ^ ↑k = 1",
" ζ ^ ↑k = 1 ↔ ↑ζ ^ ↑k = 1",
" rootsOfUnity 1 M = ⊥",
" x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ ⊥",
" rootsOfUnity k M ≤ rootsOfUnity l M",
" rootsOfUnity k M ≤ ... | [
" a✝ * b✝ ∈ {ζ | ζ ^ ↑k = 1}",
" x✝¹⁻¹ ∈ { carrier := {ζ | ζ ^ ↑k = 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" ζ ∈ rootsOfUnity k M ↔ ↑ζ ^ ↑k = 1",
" ζ ^ ↑k = 1 ↔ ↑ζ ^ ↑k = 1",
" rootsOfUnity 1 M = ⊥",
" x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ ⊥",
" rootsOfUnity k M ≤ rootsOfUnity l M",
" rootsOfUnity k M ≤ ... |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Order.Monoid.WithTop
#align_import data.nat.with_bot from "leanprover-community/mathlib"@"966e0cf0685c9cedf8a3283ac69eef4d5f2eaca2"
namespace Nat
namespace WithBot
instance : WellFoundedRelation (WithBot ℕ) where
rel := (· < ·)
wf := IsWellFounde... | Mathlib/Data/Nat/WithBot.lean | 43 | 49 | theorem add_eq_two_iff {n m : WithBot ℕ} :
n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0 := by |
rcases n, m with ⟨_ | _, _ | _⟩
repeat refine ⟨fun h => Option.noConfusion h, fun h => ?_⟩;
aesop (simp_config := { decide := true })
repeat erw [WithBot.coe_eq_coe]
exact Nat.add_eq_two_iff
| [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... | [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... |
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
#align_import algebra.category.Module.monoidal.symmetric from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2"
suppress_compilation
universe v w x u
open CategoryTheory MonoidalC... | Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean | 55 | 60 | theorem hexagon_forward (X Y Z : ModuleCat.{u} R) :
(α_ X Y Z).hom ≫ (braiding X _).hom ≫ (α_ Y Z X).hom =
(braiding X Y).hom ▷ Z ≫ (α_ Y X Z).hom ≫ Y ◁ (braiding X Z).hom := by |
apply TensorProduct.ext_threefold
intro x y z
rfl
| [
" (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)",
" ∀ (x : ↑X₁) (y : ↑X₂), ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)",
" ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)",
" f ▷ Z ≫ (Y.braiding Z).ho... | [
" (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)",
" ∀ (x : ↑X₁) (y : ↑X₂), ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)",
" ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)",
" f ▷ Z ≫ (Y.braiding Z).ho... |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.RingTheory.LocalProperties
#align_import algebraic_geometry.morphisms.ring_hom_properties from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
-- Explicit universe annotations were used in this file to improve perfomance #127... | Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean | 105 | 123 | theorem StableUnderBaseChange.Γ_pullback_fst (hP : StableUnderBaseChange @P) (hP' : RespectsIso @P)
{X Y S : Scheme} [IsAffine X] [IsAffine Y] [IsAffine S] (f : X ⟶ S) (g : Y ⟶ S)
(H : P (Scheme.Γ.map g.op)) : P (Scheme.Γ.map (pullback.fst : pullback f g ⟶ _).op) := by |
-- Porting note (#11224): change `rw` to `erw`
erw [← PreservesPullback.iso_inv_fst AffineScheme.forgetToScheme (AffineScheme.ofHom f)
(AffineScheme.ofHom g)]
rw [op_comp, Functor.map_comp, hP'.cancel_right_isIso, AffineScheme.forgetToScheme_map]
have :=
_root_.congr_arg Quiver.Hom.unop
(Preser... | [
" P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔\n P\n (IsLocalization.Away.map (↑(Y.presheaf.obj { unop := Y.basicOpen r }))\n (↑(X.presheaf.obj { unop := X.basicOpen ((Scheme.Γ.map f.op) r) })) (Scheme.Γ.map f.op) r)",
" P (f.val.c.app { unop := Y.basicOpen r } ≫ X.presheaf.map (eqToHom ⋯).op) =\n ... | [
" P (Scheme.Γ.map (f ∣_ Y.basicOpen r).op) ↔\n P\n (IsLocalization.Away.map (↑(Y.presheaf.obj { unop := Y.basicOpen r }))\n (↑(X.presheaf.obj { unop := X.basicOpen ((Scheme.Γ.map f.op) r) })) (Scheme.Γ.map f.op) r)",
" P (f.val.c.app { unop := Y.basicOpen r } ≫ X.presheaf.map (eqToHom ⋯).op) =\n ... |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
... | Mathlib/Algebra/CharP/MixedCharZero.lean | 178 | 189 | theorem PNat.isUnit_natCast [h : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))]
(n : ℕ+) : IsUnit (n : R) := by |
-- `n : R` is a unit iff `(n)` is not a proper ideal in `R`.
rw [← Ideal.span_singleton_eq_top]
-- So by contrapositive, we should show the quotient does not have characteristic zero.
apply not_imp_comm.mp (h.elim (Ideal.span {↑n}))
intro h_char_zero
-- In particular, the image of `n` in the quotient shoul... | [
" ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)",
" CharZero (R ⧸ I)",
" Function.Injective Nat.cast",
" a = b",
" I = ⊤",
" (algebraMap ℚ R) (↑a - ↑b) ∈ I",
" ↑a - ↑b ≠ 0",
" IsUnit ↑↑n",
" Ideal.span {↑↑n} = ⊤",
" ¬CharZero (R ⧸ Ideal.span {↑↑n})",
" False",
" ↑↑n = ↑0",
" ↑↑n ∈ Ideal.span {↑↑... | [
" ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)",
" CharZero (R ⧸ I)",
" Function.Injective Nat.cast",
" a = b",
" I = ⊤",
" (algebraMap ℚ R) (↑a - ↑b) ∈ I",
" ↑a - ↑b ≠ 0"
] |
import Mathlib.Geometry.Manifold.MFDeriv.Atlas
noncomputable section
open scoped Manifold
open Set
section UniqueMDiff
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
[NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*}
[Topolog... | Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean | 39 | 49 | theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x)
{f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f')
(hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x) := by |
/- Rewrite in coordinates, apply `HasFDerivWithinAt.uniqueDiffWithinAt`. -/
have := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x))
refine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt
case pt => simp only [mfld_simps]
case sub1 => mfld_set_tac
case sub2 =>
rintro _ ⟨... | [
" UniqueMDiffWithinAt I' (f '' s) (f x)",
" writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)",
" writtenInExtChartAt I I' x f '' (↑(extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n ↑(extChartAt I' (f x)).symm ⁻¹' (f '' s) ∩ range ↑I'",
" ↑(e... | [] |
import Mathlib.Init.Logic
import Mathlib.Tactic.AdaptationNote
import Mathlib.Tactic.Coe
set_option autoImplicit true
-- We align Lean 3 lemmas with lemmas in `Init.SimpLemmas` in Lean 4.
#align band_self Bool.and_self
#align band_tt Bool.and_true
#align band_ff Bool.and_false
#align tt_band Bool.true_and
#align f... | Mathlib/Init/Data/Bool/Lemmas.lean | 57 | 57 | theorem eq_true_eq_not_eq_false (b : Bool) : (¬b = false) = (b = true) := by | simp
| [
" ¬true = false",
" ¬false = true",
" (¬b = true) = (b = false)",
" (¬b = false) = (b = true)"
] | [
" ¬true = false",
" ¬false = true",
" (¬b = true) = (b = false)"
] |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe"
open scoped LinearAlgebra.Projectivization
variable {ι K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ι → ... | Mathlib/LinearAlgebra/Projectivization/Independence.lean | 48 | 58 | theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by |
refine ⟨?_, fun h => ?_⟩
· rintro ⟨ff, hff, hh⟩
choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
convert hh.units_smul a
ext i
exact (ha i).symm
· convert Independent.mk _ _ h
· simp only [mk_rep, Function.comp_apply]
· intro i
apply rep_nonzero
| [
" Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)",
" Independent f → LinearIndependent K (Projectivization.rep ∘ f)",
" LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)",
" (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff",
" (Projectivization.rep ∘ fun i => mk K (... | [] |
import Mathlib.Order.WellFounded
import Mathlib.Tactic.Common
#align_import data.pi.lex from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
assert_not_exists Monoid
variable {ι : Type*} {β : ι → Type*} (r : ι → ι → Prop) (s : ∀ {i}, β i → β i → Prop)
namespace Pi
protected def Lex (x... | Mathlib/Order/PiLex.lean | 71 | 85 | theorem isTrichotomous_lex [∀ i, IsTrichotomous (β i) s] (wf : WellFounded r) :
IsTrichotomous (∀ i, β i) (Pi.Lex r @s) :=
{ trichotomous := fun a b => by
rcases eq_or_ne a b with hab | hab
· exact Or.inr (Or.inl hab)
· rw [Function.ne_iff] at hab
let i := wf.min _ hab
have hri :... |
intro j
rw [← not_imp_not]
exact fun h' => wf.not_lt_min _ _ h'
have hne : a i ≠ b i := wf.min_mem _ hab
cases' trichotomous_of s (a i) (b i) with hi hi
exacts [Or.inl ⟨i, hri, hi⟩,
Or.inr <| Or.inr <| ⟨i, fun j hj => (hri j hj).symm, hi.resolve_left hne⟩... | [
" Pi.Lex r (fun i x x_1 => x < x_1) x y",
" ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i",
" Pi.Lex r s a b ∨ a = b ∨ Pi.Lex r s b a",
" ∀ (j : ι), r j i → a j = b j",
" r j i → a j = b j",
" ¬a j = b j → ¬r j i"
] | [
" Pi.Lex r (fun i x x_1 => x < x_1) x y",
" ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i"
] |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {α : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
| Mathlib/Data/List/OfFn.lean | 39 | 40 | theorem length_ofFn_go {n} (f : Fin n → α) (i j h) : length (ofFn.go f i j h) = i := by |
induction i generalizing j <;> simp_all [ofFn.go]
| [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1"
] | [] |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 230 | 231 | theorem finrank_finsupp {ι : Type v} [Fintype ι] : finrank R (ι →₀ M) = card ι * finrank R M := by |
rw [finrank, finrank, rank_finsupp, ← mk_toNat_eq_card, toNat_mul, toNat_lift, toNat_lift]
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.RingTheory.WittVector.Frobenius
import Mathlib.RingTheory.WittVector.Verschiebung
import Mathlib.RingTheory.WittVector.MulP
#align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
namespace WittVector
variable {p : ℕ} {R : Typ... | Mathlib/RingTheory/WittVector/Identities.lean | 81 | 83 | theorem coeff_p_zero [CharP R p] : (p : 𝕎 R).coeff 0 = 0 := by |
rw [coeff_p, if_neg]
exact zero_ne_one
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
import Mathlib.CategoryTheory.Sites.Sieves
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryTheory.Category.Preorder
import Mathlib.Order.Copy
import Mathlib.Data.Set.Subsingleton
#align_import category_theory.sites.grothendieck fr... | Mathlib/CategoryTheory/Sites/Grothendieck.lean | 197 | 200 | theorem arrow_stable (f : Y ⟶ X) (S : Sieve X) (h : J.Covers S f) {Z : C} (g : Z ⟶ Y) :
J.Covers S (g ≫ f) := by |
rw [covers_iff] at h ⊢
simp [h, Sieve.pullback_comp]
| [
" J₁ = J₂",
" { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂",
" { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback... | [
" J₁ = J₂",
" { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂",
" { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback... |
import Mathlib.Algebra.Group.Semiconj.Defs
import Mathlib.Algebra.Ring.Defs
#align_import algebra.ring.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u v w x
variable {α : Type u} {β : Type v} {γ : Type w} {R : Type x}
open Function
namespace SemiconjBy
@[simp... | Mathlib/Algebra/Ring/Semiconj.lean | 57 | 58 | theorem neg_left (h : SemiconjBy a x y) : SemiconjBy (-a) x y := by |
simp only [SemiconjBy, h.eq, neg_mul, mul_neg]
| [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y",
" SemiconjBy a (-x) (-y)",
" SemiconjBy (-a) x y"
] | [
" SemiconjBy a (x + x') (y + y')",
" SemiconjBy (a + b) x y",
" SemiconjBy a (-x) (-y)"
] |
import Mathlib.CategoryTheory.Opposites
#align_import category_theory.eq_to_hom from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe v₁ v₂ v₃ u₁ u₂ u₃
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Opposite
variable ... | Mathlib/CategoryTheory/EqToHom.lean | 138 | 141 | theorem congrArg_mpr_hom_right {X Y Z : C} (p : X ⟶ Y) (q : Z = Y) :
(congrArg (fun W : C => X ⟶ W) q).mpr p = p ≫ eqToHom q.symm := by |
cases q
simp
| [
" X ⟶ Y",
" Y ⟶ Y",
" eqToHom p ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯",
" f = (f ≫ eqToHom p) ≫ eqToHom ⋯",
" f ≫ eqToHom p = g",
" g = eqToHom ⋯ ≫ eqToHom p ≫ g",
" eqToHom p ≫ eqToHom ⋯ ≫ f = f",
" g j = g j'",
" f j = f j'",
" z ... | [
" X ⟶ Y",
" Y ⟶ Y",
" eqToHom p ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯",
" f = (f ≫ eqToHom p) ≫ eqToHom ⋯",
" f ≫ eqToHom p = g",
" g = eqToHom ⋯ ≫ eqToHom p ≫ g",
" eqToHom p ≫ eqToHom ⋯ ≫ f = f",
" g j = g j'",
" f j = f j'",
" z ... |
import Mathlib.Topology.UniformSpace.Cauchy
import Mathlib.Topology.UniformSpace.Separation
import Mathlib.Topology.DenseEmbedding
#align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c"
open Filter Function Set Uniformity Topology
sec... | Mathlib/Topology/UniformSpace/UniformEmbedding.lean | 104 | 107 | theorem UniformInducing.uniformContinuous_iff {f : α → β} {g : β → γ} (hg : UniformInducing g) :
UniformContinuous f ↔ UniformContinuous (g ∘ f) := by |
dsimp only [UniformContinuous, Tendsto]
rw [← hg.comap_uniformity, ← map_le_iff_le_comap, Filter.map_map]; rfl
| [
" UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²",
" (∀ (s : Set (α × α)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓤 β) ↔ s ∈ 𝓤 α) ↔ ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ s ∈ 𝓤 α",
" UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α",
" 𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤... | [
" UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²",
" (∀ (s : Set (α × α)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓤 β) ↔ s ∈ 𝓤 α) ↔ ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ s ∈ 𝓤 α",
" UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α",
" 𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤... |
import Mathlib.CategoryTheory.Linear.Basic
import Mathlib.CategoryTheory.Preadditive.Biproducts
import Mathlib.LinearAlgebra.Matrix.InvariantBasisNumber
import Mathlib.Data.Set.Subsingleton
#align_import category_theory.preadditive.hom_orthogonal from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb... | Mathlib/CategoryTheory/Preadditive/HomOrthogonal.lean | 130 | 143 | theorem matrixDecomposition_id (o : HomOrthogonal s) {α : Type} [Finite α] {f : α → ι} (i : ι) :
o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) i = 1 := by |
ext ⟨b, ⟨⟩⟩ ⟨a, j_property⟩
simp only [Set.mem_preimage, Set.mem_singleton_iff] at j_property
simp only [Category.comp_id, Category.id_comp, Category.assoc, End.one_def, eqToHom_refl,
Matrix.one_apply, HomOrthogonal.matrixDecomposition_apply, biproduct.components]
split_ifs with h
· cases h
simp
· ... | [
" s i = s (f ↑k)",
" s (f k) = s (f ↑⟨k, ⋯⟩)",
" s (g ↑j) = s i",
" s (g ↑⟨j, ⋯⟩) = s (g j)",
" k ∈ g ⁻¹' {f j}",
" j ∈ f ⁻¹' {f j}",
" s (f j) = s (g k)",
" (fun z => biproduct.matrix fun j k => if h : f j = g k then z (f j) ⟨k, ⋯⟩ ⟨j, ⋯⟩ ≫ eqToHom ⋯ else 0)\n ((fun z i j k => eqToHom ⋯ ≫ biprod... | [
" s i = s (f ↑k)",
" s (f k) = s (f ↑⟨k, ⋯⟩)",
" s (g ↑j) = s i",
" s (g ↑⟨j, ⋯⟩) = s (g j)",
" k ∈ g ⁻¹' {f j}",
" j ∈ f ⁻¹' {f j}",
" s (f j) = s (g k)",
" (fun z => biproduct.matrix fun j k => if h : f j = g k then z (f j) ⟨k, ⋯⟩ ⟨j, ⋯⟩ ≫ eqToHom ⋯ else 0)\n ((fun z i j k => eqToHom ⋯ ≫ biprod... |
import Mathlib.Topology.Instances.ENNReal
#align_import order.filter.ennreal from "leanprover-community/mathlib"@"52932b3a083d4142e78a15dc928084a22fea9ba0"
open Filter ENNReal
namespace ENNReal
variable {α : Type*} {f : Filter α}
theorem eventually_le_limsup [CountableInterFilter f] (u : α → ℝ≥0∞) :
∀ᶠ y i... | Mathlib/Order/Filter/ENNReal.lean | 33 | 47 | theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
(f.limsup fun x : α => a * u x) = a * f.limsup u := by |
by_cases ha_zero : a = 0
· simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
exact limsup_const_bot
let g := fun x : ℝ≥0∞ => a * x
have hg_bij : Function.Bijective g :=
Function.bijective_iff_has_inverse.mpr
⟨fun x => a⁻¹ * x,
⟨fun x => by simp [g, ← mul_assoc, ENNReal.inv_mul_cancel ha_... | [
" limsup (fun x => a * u x) f = a * limsup u f",
" limsup (fun x => ⊥) f = ⊥",
" (fun x => a⁻¹ * x) (g x) = x",
" g ((fun x => a⁻¹ * x) x) = x",
" g x✝² ≤ g x✝¹"
] | [] |
import Mathlib.CategoryTheory.Sites.Coherent.SheafComparison
import Mathlib.CategoryTheory.Sites.Equivalence
namespace CategoryTheory
variable {C : Type*} [Category C]
open GrothendieckTopology
namespace Equivalence
variable {D : Type*} [Category D]
variable (e : C ≌ D)
section Coherent
variable [Precoherent C... | Mathlib/CategoryTheory/Sites/Coherent/Equivalence.lean | 55 | 60 | theorem precoherent_isSheaf_iff (F : Cᵒᵖ ⥤ A) : haveI := e.precoherent
IsSheaf (coherentTopology C) F ↔ IsSheaf (coherentTopology D) (e.inverse.op ⋙ F) := by |
refine ⟨fun hF ↦ ((e.sheafCongrPrecoherent A).functor.obj ⟨F, hF⟩).cond, fun hF ↦ ?_⟩
rw [isSheaf_of_iso_iff (P' := e.functor.op ⋙ e.inverse.op ⋙ F)]
· exact (e.sheafCongrPrecoherent A).inverse.obj ⟨e.inverse.op ⋙ F, hF⟩ |>.cond
· exact isoWhiskerRight e.op.unitIso F
| [
" IsSheaf (coherentTopology C) F ↔ IsSheaf (coherentTopology D) (e.inverse.op ⋙ F)",
" IsSheaf (coherentTopology C) F",
" IsSheaf (coherentTopology C) (e.functor.op ⋙ e.inverse.op ⋙ F)",
" F ≅ e.functor.op ⋙ e.inverse.op ⋙ F"
] | [] |
import Mathlib.Algebra.MvPolynomial.Variables
#align_import data.mv_polynomial.comm_ring from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/CommRing.lean | 183 | 195 | theorem degreeOf_sub_lt {x : σ} {f g : MvPolynomial σ R} {k : ℕ} (h : 0 < k)
(hf : ∀ m : σ →₀ ℕ, m ∈ f.support → k ≤ m x → coeff m f = coeff m g)
(hg : ∀ m : σ →₀ ℕ, m ∈ g.support → k ≤ m x → coeff m f = coeff m g) :
degreeOf x (f - g) < k := by |
classical
rw [degreeOf_lt_iff h]
intro m hm
by_contra! hc
have h := support_sub σ f g hm
simp only [mem_support_iff, Ne, coeff_sub, sub_eq_zero] at hm
cases' Finset.mem_union.1 h with cf cg
· exact hm (hf m cf hc)
· exact hm (hg m cg hc)
| [
" degreeOf x (f - g) < k",
" ∀ m ∈ (f - g).support, m x < k",
" m x < k",
" False"
] | [] |
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.measure.ae_disjoint from "leanprover-community/mathlib"@"bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e"
open Set Function
namespace MeasureTheory
variable {ι α : Type*} {m : MeasurableSpace α} (μ : Measure α)
def AEDisjoint (s t : Se... | Mathlib/MeasureTheory/Measure/AEDisjoint.lean | 111 | 112 | theorem union_right_iff : AEDisjoint μ s (t ∪ u) ↔ AEDisjoint μ s t ∧ AEDisjoint μ s u := by |
simp [union_eq_iUnion, and_comm]
| [
" ∃ t, (∀ (i : ι), MeasurableSet (t i)) ∧ (∀ (i : ι), μ (t i) = 0) ∧ Pairwise (Disjoint on fun i => s i \\ t i)",
" μ ((fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i) = 0",
" μ (⋃ i_1 ∈ {i}ᶜ, s i ∩ s i_1) = 0",
" Pairwise (Disjoint on fun i => s i \\ (fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i)",... | [
" ∃ t, (∀ (i : ι), MeasurableSet (t i)) ∧ (∀ (i : ι), μ (t i) = 0) ∧ Pairwise (Disjoint on fun i => s i \\ t i)",
" μ ((fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i) = 0",
" μ (⋃ i_1 ∈ {i}ᶜ, s i ∩ s i_1) = 0",
" Pairwise (Disjoint on fun i => s i \\ (fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i)",... |
import Mathlib.Algebra.Polynomial.Reverse
import Mathlib.Algebra.Regular.SMul
#align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5"
noncomputable section
open Finset
open Polynomial
namespace Polynomial
universe u v y
variable {R : Type u} {S : Typ... | Mathlib/Algebra/Polynomial/Monic.lean | 84 | 88 | theorem monic_mul_C_of_leadingCoeff_mul_eq_one {b : R} (hp : p.leadingCoeff * b = 1) :
Monic (p * C b) := by |
unfold Monic
nontriviality
rw [leadingCoeff_mul' _] <;> simp [leadingCoeff_C b, hp]
| [
" Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i",
"R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p",
" C (p.coeff p.natD... | [
" Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i",
"R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p",
" C (p.coeff p.natD... |
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.NormedSpace.Completion
#align_import analysis.complex.liouville from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Metric Set Filter Asymptotics ... | Mathlib/Analysis/Complex/Liouville.lean | 53 | 65 | theorem norm_deriv_le_aux [CompleteSpace F] {c : ℂ} {R C : ℝ} {f : ℂ → F} (hR : 0 < R)
(hf : DiffContOnCl ℂ f (ball c R)) (hC : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) :
‖deriv f c‖ ≤ C / R := by |
have : ∀ z ∈ sphere c R, ‖(z - c) ^ (-2 : ℤ) • f z‖ ≤ C / (R * R) :=
fun z (hz : abs (z - c) = R) => by
simpa [-mul_inv_rev, norm_smul, hz, zpow_two, ← div_eq_inv_mul] using
(div_le_div_right (mul_pos hR hR)).2 (hC z hz)
calc
‖deriv f c‖ = ‖(2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) •... | [
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c) ^ (-2) • f z",
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z",
" ((cauchyPowerSeries f c (↑R) 1) fun x => 1) = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z",
" ‖deriv f c‖ ≤ C / R",
" ‖(z - c) ^ (-2) • ... | [
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c) ^ (-2) • f z",
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z",
" ((cauchyPowerSeries f c (↑R) 1) fun x => 1) = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z"
] |
import Mathlib.Data.Nat.Squarefree
import Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity
import Mathlib.Tactic.LinearCombination
#align_import number_theory.sum_two_squares from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
section Fermat
open GaussianInt
| Mathlib/NumberTheory/SumTwoSquares.lean | 33 | 36 | theorem Nat.Prime.sq_add_sq {p : ℕ} [Fact p.Prime] (hp : p % 4 ≠ 3) :
∃ a b : ℕ, a ^ 2 + b ^ 2 = p := by |
apply sq_add_sq_of_nat_prime_of_not_irreducible p
rwa [_root_.irreducible_iff_prime, prime_iff_mod_four_eq_three_of_nat_prime p]
| [
" ∃ a b, a ^ 2 + b ^ 2 = p",
" ¬Irreducible ↑p"
] | [] |
import Mathlib.Order.Filter.Prod
#align_import order.filter.n_ary from "leanprover-community/mathlib"@"78f647f8517f021d839a7553d5dc97e79b508dea"
open Function Set
open Filter
namespace Filter
variable {α α' β β' γ γ' δ δ' ε ε' : Type*} {m : α → β → γ} {f f₁ f₂ : Filter α}
{g g₁ g₂ : Filter β} {h h₁ h₂ : Filt... | Mathlib/Order/Filter/NAry.lean | 91 | 91 | theorem map₂_eq_bot_iff : map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥ := by | simp [← map_prod_eq_map₂]
| [
" x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s} ↔ x✝ ∈ map (uncurry m) (f ×ˢ g)",
" x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, ∀ x ∈ u, ∀ y ∈ v, m x y ∈ s} ↔\n ∃ t₁ ∈ f, ∃ t₂ ∈ g, ∀ x ∈ t₁, ∀ y ∈ t₂, (x, y) ∈ uncurry m ⁻¹' x✝",
" map (fun p => m p.1 p.2) (f ×ˢ g) = map₂ m f g",
" map₂ Prod.mk f g = f ×ˢ g",
" map₂ m f ... | [
" x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s} ↔ x✝ ∈ map (uncurry m) (f ×ˢ g)",
" x✝ ∈ {s | ∃ u ∈ f, ∃ v ∈ g, ∀ x ∈ u, ∀ y ∈ v, m x y ∈ s} ↔\n ∃ t₁ ∈ f, ∃ t₂ ∈ g, ∀ x ∈ t₁, ∀ y ∈ t₂, (x, y) ∈ uncurry m ⁻¹' x✝",
" map (fun p => m p.1 p.2) (f ×ˢ g) = map₂ m f g",
" map₂ Prod.mk f g = f ×ˢ g"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.Prod
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.FinCases
import Mathlib.Tactic.LinearCombination
import Mathlib.Lean.Expr.ExtraRecognizers
import Mathlib.Data.Set.Subsingleton
#align_import lin... | Mathlib/LinearAlgebra/LinearIndependent.lean | 154 | 164 | theorem linearIndependent_iff'' :
LinearIndependent R v ↔
∀ (s : Finset ι) (g : ι → R), (∀ i ∉ s, g i = 0) →
∑ i ∈ s, g i • v i = 0 → ∀ i, g i = 0 := by |
classical
exact linearIndependent_iff'.trans
⟨fun H s g hg hv i => if his : i ∈ s then H s g hv i his else hg i his, fun H s g hg i hi => by
convert
H s (fun j => if j ∈ s then g j else 0) (fun j hj => if_neg hj)
(by simp_rw [ite_smul, zero_smul, Finset.sum_extend_by_zero, hg]) i
... | [
" LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0",
" (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0",
" g i = (Finsupp.lapply i) (Finsupp.single i (g i))",
" (Finsupp.lapply i) (Finsupp.single j (g j)) = 0",
" LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)... | [
" LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0",
" (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0",
" g i = (Finsupp.lapply i) (Finsupp.single i (g i))",
" (Finsupp.lapply i) (Finsupp.single j (g j)) = 0"
] |
import Mathlib.Data.TypeMax
import Mathlib.Logic.UnivLE
import Mathlib.CategoryTheory.Limits.Shapes.Images
#align_import category_theory.limits.types from "leanprover-community/mathlib"@"4aa2a2e17940311e47007f087c9df229e7f12942"
open CategoryTheory CategoryTheory.Limits
universe v u w
namespace CategoryTheory.L... | Mathlib/CategoryTheory/Limits/Types.lean | 52 | 60 | theorem isLimit_iff (c : Cone F) :
Nonempty (IsLimit c) ↔ ∀ s ∈ F.sections, ∃! x : c.pt, ∀ j, c.π.app j x = s j := by |
refine ⟨fun ⟨t⟩ s hs ↦ ?_, fun h ↦ ⟨?_⟩⟩
· let cs := coneOfSection hs
exact ⟨t.lift cs ⟨⟩, fun j ↦ congr_fun (t.fac cs j) ⟨⟩,
fun x hx ↦ congr_fun (t.uniq cs (fun _ ↦ x) fun j ↦ funext fun _ ↦ hx j) ⟨⟩⟩
· choose x hx using fun c y ↦ h _ (sectionOfCone c y).2
exact ⟨x, fun c j ↦ funext fun y ↦ (hx c... | [
" ((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j = (fun j x => s j) i ≫ F.map f",
" (((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j) a✝ = ((fun j x => s j) i ≫ F.map f) a✝",
" Nonempty (IsLimit c) ↔ ∀ s ∈ F.sections, ∃! x, ∀ (j : J), c.π.app j x = s j",
" ∃! x, ∀ (j : J), c... | [
" ((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j = (fun j x => s j) i ≫ F.map f",
" (((Functor.const J).obj PUnit.{u + 1}).map f ≫ (fun j x => s j) j) a✝ = ((fun j x => s j) i ≫ F.map f) a✝"
] |
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.Complement
open Monoid Coprod Multiplicative Subgroup Function
def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) :
Con (G ∗ Multiplicative ℤ) :=
conGen (fun x y => ∃ (a : A),
x = inr (ofAdd 1) * inl (a : G) ∧
... | Mathlib/GroupTheory/HNNExtension.lean | 73 | 75 | theorem equiv_eq_conj (a : A) :
(of (φ a : G) : HNNExtension G A B φ) = t * of (a : G) * t⁻¹ := by |
rw [t_mul_of]; simp
| [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... | [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... |
import Mathlib.FieldTheory.Finite.Polynomial
import Mathlib.NumberTheory.Basic
import Mathlib.RingTheory.WittVector.WittPolynomial
#align_import ring_theory.witt_vector.structure_polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open MvPolynomial Set
open Finset (range)
o... | Mathlib/RingTheory/WittVector/StructurePolynomial.lean | 179 | 188 | theorem wittStructureRat_rec (Φ : MvPolynomial idx ℚ) (n : ℕ) :
wittStructureRat p Φ n =
C (1 / (p : ℚ) ^ n) *
(bind₁ (fun b => rename (fun i => (b, i)) (W_ ℚ n)) Φ -
∑ i ∈ range n, C ((p : ℚ) ^ i) * wittStructureRat p Φ i ^ p ^ (n - i)) := by |
calc
wittStructureRat p Φ n = C (1 / (p : ℚ) ^ n) * (wittStructureRat p Φ n * C ((p : ℚ) ^ n)) := ?_
_ = _ := by rw [wittStructureRat_rec_aux]
rw [mul_left_comm, ← C_mul, div_mul_cancel₀, C_1, mul_one]
exact pow_ne_zero _ (Nat.cast_ne_zero.2 hp.1.ne_zero)
| [
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) ((bind₁ (xInTermsOfW p ℚ)) (W_ ℚ n))",
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun i => (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) (xInTermsOfW p ℚ i)) (W_ ℚ n)... | [
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) ((bind₁ (xInTermsOfW p ℚ)) (W_ ℚ n))",
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun i => (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) (xInTermsOfW p ℚ i)) (W_ ℚ n)... |
import Mathlib.Analysis.Normed.Group.Basic
#align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
section HammingDistNorm
open Finset Function
variable {α ι : Type*} {β : ι → Type*} [Fintype ι] [∀ i, DecidableEq (β i)]
variable {γ : ι → Type*} [∀ ... | Mathlib/InformationTheory/Hamming.lean | 45 | 47 | theorem hammingDist_self (x : ∀ i, β i) : hammingDist x x = 0 := by |
rw [hammingDist, card_eq_zero, filter_eq_empty_iff]
exact fun _ _ H => H rfl
| [
" hammingDist x x = 0",
" ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1"
] | [] |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function ... | Mathlib/Algebra/Field/Basic.lean | 71 | 72 | theorem div_add' (a b c : α) (hc : c ≠ 0) : a / c + b = (a + b * c) / c := by |
rwa [add_comm, add_div', add_comm]
| [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1",
" 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b",
" (a + b / c) * c = a * c + b",
" b + a / c = (b * c + a) / c",
" a / c + b = (a + b * c) / c"
] | [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1",
" 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b",
" (a + b / c) * c = a * c + b",
" b + a / c = (b * c + a) / c"
] |
import Mathlib.GroupTheory.GroupAction.Prod
import Mathlib.Algebra.Ring.Int
import Mathlib.Data.Nat.Cast.Basic
assert_not_exists DenselyOrdered
variable {M : Type*}
class NatPowAssoc (M : Type*) [MulOneClass M] [Pow M ℕ] : Prop where
protected npow_add : ∀ (k n: ℕ) (x : M), x ^ (k + n) = x ^ k * x ^ n
... | Mathlib/Algebra/Group/NatPowAssoc.lean | 72 | 75 | theorem npow_mul (x : M) (m n : ℕ) : x ^ (m * n) = (x ^ m) ^ n := by |
induction n with
| zero => rw [npow_zero, Nat.mul_zero, npow_zero]
| succ n ih => rw [mul_add, npow_add, ih, mul_one, npow_add, npow_one]
| [
" 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 * 0) = (x ^ m) ^ 0",
" x ^ (m * (n + 1)) = (x ^ m) ^ (n + 1)"
] | [
" x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)",
" x ^ m * x ^ n = x ^ n * x ^ m"
] |
import Mathlib.Topology.Order.LeftRightNhds
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {α β γ : Type*}
section OrderTopology
variable [TopologicalSpace α] [TopologicalSpace β] [LinearOrder α] [LinearOrder β] [OrderTopology α]
[OrderTopology β]
theorem IsLUB.fr... | Mathlib/Topology/Order/IsLUB.lean | 93 | 100 | theorem IsLUB.mem_upperBounds_of_tendsto [Preorder γ] [TopologicalSpace γ] [OrderClosedTopology γ]
{f : α → γ} {s : Set α} {a : α} {b : γ} (hf : MonotoneOn f s) (ha : IsLUB s a)
(hb : Tendsto f (𝓝[s] a) (𝓝 b)) : b ∈ upperBounds (f '' s) := by |
rintro _ ⟨x, hx, rfl⟩
replace ha := ha.inter_Ici_of_mem hx
haveI := ha.nhdsWithin_neBot ⟨x, hx, le_rfl⟩
refine ge_of_tendsto (hb.mono_left (nhdsWithin_mono a (inter_subset_left (t := Ici x)))) ?_
exact mem_of_superset self_mem_nhdsWithin fun y hy => hf hx hy.1 hy.2
| [
" ∃ᶠ (x : α) in 𝓝[≤] a, x ∈ s",
" False",
" IsLUB s a",
" b ∈ upperBounds (f '' s)",
" f x ≤ b",
" ∀ᶠ (c : α) in 𝓝[s ∩ Ici x] a, f x ≤ f c"
] | [
" ∃ᶠ (x : α) in 𝓝[≤] a, x ∈ s",
" False",
" IsLUB s a"
] |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af"
variable {l m n α : Type*}
namespace Matrix
... | Mathlib/LinearAlgebra/Matrix/SchurComplement.lean | 425 | 430 | theorem det_one_add_mul_comm (A : Matrix m n α) (B : Matrix n m α) :
det (1 + A * B) = det (1 + B * A) :=
calc
det (1 + A * B) = det (fromBlocks 1 (-A) B 1) := by |
rw [det_fromBlocks_one₂₂, Matrix.neg_mul, sub_neg_eq_add]
_ = det (1 + B * A) := by rw [det_fromBlocks_one₁₁, Matrix.mul_neg, sub_neg_eq_add]
| [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... | [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.Order.Fin
import Mathlib.Order.PiLex
import Mathlib.Order.Interval.Set.Basic
#align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b"
assert_not_exists MonoidWithZero
un... | Mathlib/Data/Fin/Tuple/Basic.lean | 73 | 74 | theorem tail_cons : tail (cons x p) = p := by |
simp (config := { unfoldPartialApp := true }) [tail, cons]
| [
" Unique ((i : Fin 0) → α i)",
" tail (cons x p) = p"
] | [
" Unique ((i : Fin 0) → α i)"
] |
import Mathlib.Algebra.IsPrimePow
import Mathlib.Data.Nat.Factorization.Basic
#align_import data.nat.factorization.prime_pow from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
variable {R : Type*} [CommMonoidWithZero R] (n p : R) (k : ℕ)
theorem IsPrimePow.minFac_pow_factorization_eq ... | Mathlib/Data/Nat/Factorization/PrimePow.lean | 89 | 108 | theorem isPrimePow_iff_unique_prime_dvd {n : ℕ} : IsPrimePow n ↔ ∃! p : ℕ, p.Prime ∧ p ∣ n := by |
rw [isPrimePow_nat_iff]
constructor
· rintro ⟨p, k, hp, hk, rfl⟩
refine ⟨p, ⟨hp, dvd_pow_self _ hk.ne'⟩, ?_⟩
rintro q ⟨hq, hq'⟩
exact (Nat.prime_dvd_prime_iff_eq hq hp).1 (hq.dvd_of_dvd_pow hq')
rintro ⟨p, ⟨hp, hn⟩, hq⟩
rcases eq_or_ne n 0 with (rfl | hn₀)
· cases (hq 2 ⟨Nat.prime_two, dvd_zero... | [
" n.minFac ^ n.factorization n.minFac = n",
" (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k",
" IsPrimePow n",
" IsPrimePow 0",
" 0 < n.factorization n.minFac",
" IsPrimePow n ↔ ∃ p k, 0 < k ∧ n.factorization = Finsupp.single p k",
" (∃ p k, p.Prime ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ ... | [
" n.minFac ^ n.factorization n.minFac = n",
" (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k",
" IsPrimePow n",
" IsPrimePow 0",
" 0 < n.factorization n.minFac",
" IsPrimePow n ↔ ∃ p k, 0 < k ∧ n.factorization = Finsupp.single p k",
" (∃ p k, p.Prime ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ ... |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.Multiset.Dedup
#align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
universe v
variable {α : Type*} {β : Type v} {γ δ : Ty... | Mathlib/Data/Multiset/Bind.lean | 158 | 159 | theorem mem_bind {b s} {f : α → Multiset β} : b ∈ bind s f ↔ ∃ a ∈ s, b ∈ f a := by |
simp [bind]
| [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... | [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... |
import Mathlib.Probability.Kernel.Composition
#align_import probability.kernel.invariance from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b"
open MeasureTheory
open scoped MeasureTheory ENNReal ProbabilityTheory
namespace ProbabilityTheory
variable {α β γ : Type*} {mα : MeasurableSp... | Mathlib/Probability/Kernel/Invariance.lean | 51 | 54 | theorem bind_smul (κ : kernel α β) (μ : Measure α) (r : ℝ≥0∞) : (r • μ).bind κ = r • μ.bind κ := by |
ext1 s hs
rw [Measure.bind_apply hs (kernel.measurable _), lintegral_smul_measure, Measure.coe_smul,
Pi.smul_apply, Measure.bind_apply hs (kernel.measurable _), smul_eq_mul]
| [
" (μ + ν).bind ⇑κ = μ.bind ⇑κ + ν.bind ⇑κ",
" ((μ + ν).bind ⇑κ) s = (μ.bind ⇑κ + ν.bind ⇑κ) s",
" (r • μ).bind ⇑κ = r • μ.bind ⇑κ",
" ((r • μ).bind ⇑κ) s = (r • μ.bind ⇑κ) s"
] | [
" (μ + ν).bind ⇑κ = μ.bind ⇑κ + ν.bind ⇑κ",
" ((μ + ν).bind ⇑κ) s = (μ.bind ⇑κ + ν.bind ⇑κ) s"
] |
import Mathlib.Algebra.Regular.Basic
import Mathlib.LinearAlgebra.Matrix.MvPolynomial
import Mathlib.LinearAlgebra.Matrix.Polynomial
import Mathlib.RingTheory.Polynomial.Basic
#align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matr... | Mathlib/LinearAlgebra/Matrix/Adjugate.lean | 82 | 85 | theorem cramer_is_linear : IsLinearMap α (cramerMap A) := by |
constructor <;> intros <;> ext i
· apply (cramerMap_is_linear A i).1
· apply (cramerMap_is_linear A i).2
| [
" IsLinearMap α A.cramerMap",
" ∀ (x y : n → α), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" ∀ (c : α) (x : n → α), A.cramerMap (c • x) = c • A.cramerMap x",
" A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝",
" A.cramerMap (c✝ • x✝) = c✝ • A.cramerMap x✝",
" A.cramerMap (x✝ + y✝) i = ... | [] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
universe u v w x
variable {α : ... | Mathlib/Algebra/Ring/Defs.lean | 203 | 204 | theorem ite_mul {α} [Mul α] (P : Prop) [Decidable P] (a b c : α) :
(if P then a else b) * c = if P then a * c else b * c := by | split_ifs <;> rfl
| [
" (a + b + c) * d = a * d + b * d + c * d",
" (a * if P then b else c) = if P then a * b else a * c",
" a * b = a * b",
" a * c = a * c",
" (if P then a else b) * c = if P then a * c else b * c",
" b * c = b * c"
] | [
" (a + b + c) * d = a * d + b * d + c * d",
" (a * if P then b else c) = if P then a * b else a * c",
" a * b = a * b",
" a * c = a * c"
] |
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finsupp.Fin
import Mathlib.Data.Finsupp.Indicator
#align_import algebra.bi... | Mathlib/Algebra/BigOperators/Finsupp.lean | 101 | 104 | theorem prod_ite_eq [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
(f.prod fun x v => ite (a = x) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1 := by |
dsimp [Finsupp.prod]
rw [f.support.prod_ite_eq]
| [
" f.prod g = ∏ x ∈ s, g x (f x)",
" f x = 0",
" ∏ x ∈ {a}, h x ((single a b) x) = h a b",
" h x✝¹ ((mapRange f hf g) x✝¹) = 1",
" (f.prod fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1",
" (∏ a_1 ∈ f.support, if a = a_1 then b a_1 (f a_1) else 1) = if a ∈ f.support then b ... | [
" f.prod g = ∏ x ∈ s, g x (f x)",
" f x = 0",
" ∏ x ∈ {a}, h x ((single a b) x) = h a b",
" h x✝¹ ((mapRange f hf g) x✝¹) = 1"
] |
import Mathlib.Algebra.Order.Floor
import Mathlib.Algebra.Order.Field.Power
import Mathlib.Data.Nat.Log
#align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R]
namespace Int
def log (b : ℕ) (r : ... | Mathlib/Data/Int/Log.lean | 93 | 96 | theorem log_of_right_le_zero (b : ℕ) {r : R} (hr : r ≤ 0) : log b r = 0 := by |
rw [log_of_right_le_one _ (hr.trans zero_le_one),
Nat.clog_of_right_le_one ((Nat.ceil_eq_zero.mpr <| inv_nonpos.2 hr).trans_le zero_le_one),
Int.ofNat_zero, neg_zero]
| [
" log b r = -↑(b.clog ⌈r⁻¹⌉₊)",
" log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)",
" log b ↑n = ↑(b.log n)",
" log b ↑0 = ↑(b.log 0)",
" log b ↑(n✝ + 1) = ↑(b.log (n✝ + 1))",
" 1 ≤ ↑(n✝ + 1)",
" log b r = 0"
] | [
" log b r = -↑(b.clog ⌈r⁻¹⌉₊)",
" log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)",
" log b ↑n = ↑(b.log n)",
" log b ↑0 = ↑(b.log 0)",
" log b ↑(n✝ + 1) = ↑(b.log (n✝ + 1))",
" 1 ≤ ↑(n✝ + 1)",
" log b r = 0"
] |
import Mathlib.CategoryTheory.Subobject.Lattice
#align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d"
universe v u
noncomputable section
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite
var... | Mathlib/CategoryTheory/Subobject/Limits.lean | 158 | 160 | theorem kernelSubobjectMap_arrow (sq : Arrow.mk f ⟶ Arrow.mk f') :
kernelSubobjectMap sq ≫ (kernelSubobject f').arrow = (kernelSubobject f).arrow ≫ sq.left := by |
simp [kernelSubobjectMap]
| [
" (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow",
" (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ι f",
" (kernelSubobject f).arrow ≫ f = 0",
" ((kernelSubobjectIso f).hom ≫ kernel.ι f) ≫ f = 0",
" kernel.lift f h w ≫ (MonoOver.mk' (kernel.ι f)).arrow = h",
" h ≫ f ... | [
" (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow",
" (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ι f",
" (kernelSubobject f).arrow ≫ f = 0",
" ((kernelSubobjectIso f).hom ≫ kernel.ι f) ≫ f = 0",
" kernel.lift f h w ≫ (MonoOver.mk' (kernel.ι f)).arrow = h",
" h ≫ f ... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 80 | 85 | theorem multinomial_insert_one [DecidableEq α] (h : a ∉ s) (h₁ : f a = 1) :
multinomial (insert a s) f = (s.sum f).succ * multinomial s f := by |
simp only [multinomial, one_mul, factorial]
rw [Finset.sum_insert h, Finset.prod_insert h, h₁, add_comm, ← succ_eq_add_one, factorial_succ]
simp only [factorial_one, one_mul, Function.comp_apply, factorial, mul_one, ← one_eq_succ_zero]
rw [Nat.mul_div_assoc _ (prod_factorial_dvd_factorial_sum _ _)]
| [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... | [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... |
import Mathlib.Order.Filter.AtTopBot
#align_import order.filter.indicator_function from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
variable {α β M E : Type*}
open Set Filter
@[to_additive]
theorem Monotone.mulIndicator_eventuallyEq_iUnion {ι} [Preorder ι] [One β] (s : ι → Set α)
... | Mathlib/Order/Filter/IndicatorFunction.lean | 76 | 79 | theorem Antitone.mulIndicator_eventuallyEq_iInter {ι} [Preorder ι] [One β] (s : ι → Set α)
(hs : Antitone s) (f : α → β) (a : α) :
(fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun _ ↦ mulIndicator (⋂ i, s i) f a := by |
classical exact hs.piecewise_eventually_eq_iInter f 1 a
| [
" (fun i => (s i).mulIndicator f a) =ᶠ[atTop] fun x => (⋃ i, s i).mulIndicator f a",
" (fun i => (s i).mulIndicator f a) =ᶠ[atTop] fun x => (⋂ i, s i).mulIndicator f a"
] | [
" (fun i => (s i).mulIndicator f a) =ᶠ[atTop] fun x => (⋃ i, s i).mulIndicator f a"
] |
import Mathlib.Algebra.Algebra.Subalgebra.Operations
import Mathlib.Algebra.Ring.Fin
import Mathlib.RingTheory.Ideal.Quotient
#align_import ring_theory.ideal.quotient_operations from "leanprover-community/mathlib"@"b88d81c84530450a8989e918608e5960f015e6c8"
universe u v w
namespace RingHom
variable {R : Type u} {... | Mathlib/RingTheory/Ideal/QuotientOperations.lean | 49 | 56 | theorem lift_injective_of_ker_le_ideal (I : Ideal R) {f : R →+* S} (H : ∀ a : R, a ∈ I → f a = 0)
(hI : ker f ≤ I) : Function.Injective (Ideal.Quotient.lift I f H) := by |
rw [RingHom.injective_iff_ker_eq_bot, RingHom.ker_eq_bot_iff_eq_zero]
intro u hu
obtain ⟨v, rfl⟩ := Ideal.Quotient.mk_surjective u
rw [Ideal.Quotient.lift_mk] at hu
rw [Ideal.Quotient.eq_zero_iff_mem]
exact hI ((RingHom.mem_ker f).mpr hu)
| [
" Function.Injective ⇑(Ideal.Quotient.lift I f H)",
" ∀ (x : R ⧸ I), (Ideal.Quotient.lift I f H) x = 0 → x = 0",
" u = 0",
" (Ideal.Quotient.mk I) v = 0",
" v ∈ I"
] | [] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Fintype.Vector
import Mathlib.Data.Multiset.Sym
#align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c"
namespace Finset
variable {α : Type*}
@[simps]
protected def sym2 (s : Finset α) : Finset (Sym2 α) :... | Mathlib/Data/Finset/Sym.lean | 51 | 53 | theorem mem_sym2_iff {m : Sym2 α} : m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s := by |
rw [mem_mk, sym2_val, Multiset.mem_sym2_iff]
simp only [mem_val]
| [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s"
] | [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s"
] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
universe u v w x
variable {α : ... | Mathlib/Algebra/Ring/Defs.lean | 218 | 221 | theorem ite_sub_ite {α} [Sub α] (P : Prop) [Decidable P] (a b c d : α) :
((if P then a else b) - if P then c else d) = if P then a - c else b - d := by |
split
repeat rfl
| [] | [
" (a + b + c) * d = a * d + b * d + c * d",
" (a * if P then b else c) = if P then a * b else a * c",
" a * b = a * b",
" a * c = a * c",
" (if P then a else b) * c = if P then a * c else b * c",
" b * c = b * c"
] |
import Mathlib.Algebra.Homology.Linear
import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex
import Mathlib.Tactic.Abel
#align_import algebra.homology.homotopy from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u
open scoped Classical
noncomputable section
open ... | Mathlib/Algebra/Homology/Homotopy.lean | 115 | 121 | theorem dNext_nat (C D : ChainComplex V ℕ) (i : ℕ) (f : ∀ i j, C.X i ⟶ D.X j) :
dNext i f = C.d i (i - 1) ≫ f (i - 1) i := by |
dsimp [dNext]
cases i
· simp only [shape, ChainComplex.next_nat_zero, ComplexShape.down_Rel, Nat.one_ne_zero,
not_false_iff, zero_comp]
· congr <;> simp
| [
" (dNext i) f = C.d i i' ≫ f i' i",
" (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i",
" (dNext i) f = 0",
" C.d i (c.next i) ≫ f (c.next i) i = 0",
" (prevD i) f = 0",
" f i (c.prev i) ≫ D.d (c.prev i) i = 0",
" (prevD j) f = f j j' ≫ D.d j' j",
" (prevD j) f = f j (c.prev j) ≫ D.d (c.prev j) j",
... | [
" (dNext i) f = C.d i i' ≫ f i' i",
" (dNext i) f = C.d i (c.next i) ≫ f (c.next i) i",
" (dNext i) f = 0",
" C.d i (c.next i) ≫ f (c.next i) i = 0",
" (prevD i) f = 0",
" f i (c.prev i) ≫ D.d (c.prev i) i = 0",
" (prevD j) f = f j j' ≫ D.d j' j",
" (prevD j) f = f j (c.prev j) ≫ D.d (c.prev j) j",
... |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.ParametricIntegral
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Function.LocallyIntegrable
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Group.Prod
import Mathlib.Measure... | Mathlib/Analysis/Convolution.lean | 216 | 235 | theorem _root_.BddAbove.convolutionExistsAt' {x₀ : G} {s : Set G}
(hbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))) (hs : MeasurableSet s)
(h2s : (support fun t => L (f t) (g (x₀ - t))) ⊆ s) (hf : IntegrableOn f s μ)
(hmg : AEStronglyMeasurable g <| map (fun t => x₀ - t) (μ.restrict s)) :
... |
rw [ConvolutionExistsAt]
rw [← integrableOn_iff_integrable_of_support_subset h2s]
set s' := (fun t => -t + x₀) ⁻¹' s
have : ∀ᵐ t : G ∂μ.restrict s,
‖L (f t) (g (x₀ - t))‖ ≤ s.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i : s', ‖g i‖) t := by
filter_upwards
refine le_indicator (fun t ht => ?_) fun t ht =>... | [
" ConvolutionExistsAt f g x₀ L μ",
" Integrable (fun t => (L (f t)) (g (x₀ - t))) μ",
" IntegrableOn (fun t => (L (f t)) (g (x₀ - t))) s μ",
" ∀ᵐ (t : G) ∂μ.restrict s, ‖(L (f t)) (g (x₀ - t))‖ ≤ s.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g ↑i‖) t",
" ∀ (a : G), ‖(L (f a)) (g (x₀ - a))‖ ≤ s.indicator (fun t ... | [] |
import Mathlib.Mathport.Rename
#align_import init.data.list.instances from "leanprover-community/lean"@"9af482290ef68e8aaa5ead01aa7b09b7be7019fd"
universe u v w
namespace List
variable {α : Type u} {β : Type v} {γ : Type w}
-- Porting note (#10618): simp can prove this
-- @[simp]
theorem bind_singleton (f : α →... | Mathlib/Init/Data/List/Instances.lean | 30 | 32 | theorem map_eq_bind {α β} (f : α → β) (l : List α) : map f l = l.bind fun x => [f x] := by |
simp only [← map_singleton]
rw [← bind_singleton' l, bind_map, bind_singleton']
| [
" (l.bind fun x => [x]) = l",
" ([].bind fun x => [x]) = []",
" ((head✝ :: tail✝).bind fun x => [x]) = head✝ :: tail✝",
" map f l = l.bind fun x => [f x]",
" map f l = l.bind fun x => map f [x]"
] | [
" (l.bind fun x => [x]) = l",
" ([].bind fun x => [x]) = []",
" ((head✝ :: tail✝).bind fun x => [x]) = head✝ :: tail✝"
] |
import Mathlib.AlgebraicTopology.DoldKan.PInfty
#align_import algebraic_topology.dold_kan.decomposition from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Preadditive
Opposite Simplicial
noncomputable section
namespace Alge... | Mathlib/AlgebraicTopology/DoldKan/Decomposition.lean | 150 | 155 | theorem preComp_φ : (f.preComp g).φ = g.app (op [n + 1]) ≫ f.φ := by |
unfold φ preComp
simp only [PInfty_f, comp_add]
congr 1
· simp only [P_f_naturality_assoc]
· simp only [comp_sum, P_f_naturality_assoc, SimplicialObject.δ_naturality_assoc]
| [
" (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev",
" (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev",
" (Q (q + 1)).f (n + 1) =\n ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) F... | [
" (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev",
" (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev",
" (Q (q + 1)).f (n + 1) =\n ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) F... |
import Mathlib.AlgebraicGeometry.GammaSpecAdjunction
import Mathlib.AlgebraicGeometry.Restrict
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.RingTheory.Localization.InvSubmonoid
#align_import algebraic_geometry.AffineScheme from "leanprover-community/mathlib"@"88474d1b5af6d37c2ab728b757771bced7f5194c"... | Mathlib/AlgebraicGeometry/AffineScheme.lean | 187 | 190 | theorem rangeIsAffineOpenOfOpenImmersion {X Y : Scheme} [IsAffine X] (f : X ⟶ Y)
[H : IsOpenImmersion f] : IsAffineOpen (Scheme.Hom.opensRange f) := by |
refine isAffineOfIso (IsOpenImmersion.isoOfRangeEq f (Y.ofRestrict _) ?_).inv
exact Subtype.range_val.symm
| [
" IsAffine X",
" X ∈ Scheme.Spec.essImage",
" IsAffineOpen (Scheme.Hom.opensRange f)",
" Set.range ⇑f.val.base = Set.range ⇑(Y.ofRestrict ⋯).val.base"
] | [
" IsAffine X",
" X ∈ Scheme.Spec.essImage"
] |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[Norme... | Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 51 | 55 | theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by |
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
| [
" ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x",
" ContDiffWithinAt 𝕜 n f s x → ContinuousWithinAt f s x"
] | [] |
import Mathlib.Analysis.InnerProductSpace.Adjoint
#align_import analysis.inner_product_space.positive from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c"
open InnerProductSpace RCLike ContinuousLinearMap
open scoped InnerProduct ComplexConjugate
namespace ContinuousLinearMap
variable... | Mathlib/Analysis/InnerProductSpace/Positive.lean | 88 | 92 | theorem IsPositive.conj_adjoint {T : E →L[𝕜] E} (hT : T.IsPositive) (S : E →L[𝕜] F) :
(S ∘L T ∘L S†).IsPositive := by |
refine ⟨hT.isSelfAdjoint.conj_adjoint S, fun x => ?_⟩
rw [reApplyInnerSelf, comp_apply, ← adjoint_inner_right]
exact hT.inner_nonneg_left _
| [
" 0 ≤ re ⟪x, T x⟫_𝕜",
" 0 ≤ re ⟪T x, x⟫_𝕜",
" IsPositive 0",
" 0 ≤ reApplyInnerSelf 0 x",
" 0 ≤ re ⟪0 x, x⟫_𝕜",
" (T + S).IsPositive",
" 0 ≤ (T + S).reApplyInnerSelf x",
" 0 ≤ re ⟪T x, x⟫_𝕜 + re ⟪S x, x⟫_𝕜",
" (S.comp (T.comp (adjoint S))).IsPositive",
" 0 ≤ (S.comp (T.comp (adjoint S))).reAp... | [
" 0 ≤ re ⟪x, T x⟫_𝕜",
" 0 ≤ re ⟪T x, x⟫_𝕜",
" IsPositive 0",
" 0 ≤ reApplyInnerSelf 0 x",
" 0 ≤ re ⟪0 x, x⟫_𝕜",
" (T + S).IsPositive",
" 0 ≤ (T + S).reApplyInnerSelf x",
" 0 ≤ re ⟪T x, x⟫_𝕜 + re ⟪S x, x⟫_𝕜"
] |
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.AlgebraicTopology.DoldKan.Notations
#align_import algebraic_topology.dold_kan.homotopies from "leanprover-community/mathlib"@"b12099d3b7febf4209824444dd836ef5ad96db55"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditi... | Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean | 86 | 90 | theorem cs_down_0_not_rel_left (j : ℕ) : ¬c.Rel 0 j := by |
intro hj
dsimp at hj
apply Nat.not_succ_le_zero j
rw [Nat.succ_eq_add_one, hj]
| [
" ¬c.Rel 0 j",
" False",
" j.succ ≤ 0"
] | [] |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Ideal
import Mathlib.RingTheory.Noetherian
#align_import ring_theory.localization.submodule from "leanprover-community/mathlib"@"1ebb20602a8caef435ce47f6373e1aa40851a177"
variable {R : Type*} [CommRing R] (M : Submonoid R) ... | Mathlib/RingTheory/Localization/Submodule.lean | 138 | 162 | theorem mem_span_iff {N : Type*} [AddCommGroup N] [Module R N] [Module S N] [IsScalarTower R S N]
{x : N} {a : Set N} :
x ∈ Submodule.span S a ↔ ∃ y ∈ Submodule.span R a, ∃ z : M, x = mk' S 1 z • y := by |
constructor
· intro h
refine Submodule.span_induction h ?_ ?_ ?_ ?_
· rintro x hx
exact ⟨x, Submodule.subset_span hx, 1, by rw [mk'_one, _root_.map_one, one_smul]⟩
· exact ⟨0, Submodule.zero_mem _, 1, by rw [mk'_one, _root_.map_one, one_smul]⟩
· rintro _ _ ⟨y, hy, z, rfl⟩ ⟨y', hy', z', rfl⟩
... | [
" coeSubmodule S ⊥ = ⊥",
" coeSubmodule S ⊤ = 1",
" coeSubmodule S (Ideal.span s) = Submodule.span R (⇑(algebraMap R S) '' s)",
" Submodule.span R (⇑(Algebra.linearMap R S) '' s) = Submodule.span R (⇑(algebraMap R S) '' s)",
" coeSubmodule S (Ideal.span {x}) = Submodule.span R {(algebraMap R S) x}",
" IsN... | [
" coeSubmodule S ⊥ = ⊥",
" coeSubmodule S ⊤ = 1",
" coeSubmodule S (Ideal.span s) = Submodule.span R (⇑(algebraMap R S) '' s)",
" Submodule.span R (⇑(Algebra.linearMap R S) '' s) = Submodule.span R (⇑(algebraMap R S) '' s)",
" coeSubmodule S (Ideal.span {x}) = Submodule.span R {(algebraMap R S) x}",
" IsN... |
import Mathlib.Order.Filter.Basic
#align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Set
open Filter
namespace Filter
variable {α β γ δ : Type*} {ι : Sort*}
section Prod
variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β}
protected ... | Mathlib/Order/Filter/Prod.lean | 95 | 98 | theorem mem_prod_top {s : Set (α × β)} :
s ∈ f ×ˢ (⊤ : Filter β) ↔ { a | ∀ b, (a, b) ∈ s } ∈ f := by |
rw [← principal_univ, mem_prod_principal]
simp only [mem_univ, forall_true_left]
| [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... | [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.RowCol
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.LinearAlgebra.Alternating.Basic
#align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30... | Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean | 116 | 119 | theorem det_eq_elem_of_subsingleton [Subsingleton n] (A : Matrix n n R) (k : n) :
det A = A k k := by |
have := uniqueOfSubsingleton k
convert det_unique A
| [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i",
" (diagonal d).det = ∏ i : n, d i",
" ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i",
" ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0",
" ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0",
" ∏ i : n, diagonal ... | [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i",
" (diagonal d).det = ∏ i : n, d i",
" ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i",
" ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0",
" ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0",
" ∏ i : n, diagonal ... |
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 | 107 | 110 | theorem map_neg (hf : IsRingHom f) : f (-x) = -f x :=
calc
f (-x) = f (-x + x) - f x := by | rw [hf.map_add]; simp
_ = -f x := by simp [hf.map_zero]
| [
" 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 0 = f (0 + 0) - f 0",
" f 0 = f 0 + f 0 - f 0",
" f (0 + 0) - f 0 = 0"
] |
import Mathlib.Algebra.Group.Fin
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.matrix.circulant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
variable {α β m n R : Type*}
namespace Matrix
open Function
open Matrix
def circulant [Sub n] (v : n → α)... | Mathlib/LinearAlgebra/Matrix/Circulant.lean | 81 | 82 | theorem transpose_circulant [AddGroup n] (v : n → α) :
(circulant v)ᵀ = circulant fun i => v (-i) := by | ext; simp
| [
" Injective circulant",
" v = w",
" v k = w k",
" Injective fun v => circulant v",
" (circulant v)ᵀ = circulant fun i => v (-i)",
" (circulant v)ᵀ i✝ j✝ = circulant (fun i => v (-i)) i✝ j✝"
] | [
" Injective circulant",
" v = w",
" v k = w k",
" Injective fun v => circulant v"
] |
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.TryThis
import Mathlib.Util.AtomM
set_option autoImplicit true
namespace Mathlib.Tactic.Abel
open Lean Elab Meta Tactic Qq
initialize registerTraceClass `abel
initialize registerTraceClass `abel.detail
structure Context where
α : Expr
univ :... | Mathlib/Tactic/Abel.lean | 136 | 138 | theorem term_add_const {α} [AddCommMonoid α] (n x a k a') (h : a + k = a') :
@term α _ n x a + k = term n x a' := by |
simp [h.symm, term, add_assoc]
| [
" k + term n x a = term n x a'",
" k + termg n x a = termg n x a'",
" term n x a + k = term n x a'"
] | [
" k + term n x a = term n x a'",
" k + termg n x a = termg n x a'"
] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.TensorProduct.Tower
import Mathlib.RingTheory.Adjoin.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
#align_import ring_theory.tensor_product from "leanprover-community/mathlib"@"88fcdc3da43943f5b01925deddaa5bf0c0e85e4e"
suppress_comp... | Mathlib/RingTheory/TensorProduct/Basic.lean | 83 | 86 | theorem baseChange_add : (f + g).baseChange A = f.baseChange A + g.baseChange A := by |
ext
-- Porting note: added `-baseChange_tmul`
simp [baseChange_eq_ltensor, -baseChange_tmul]
| [
" baseChange A (f + g) = baseChange A f + baseChange A g",
" ((AlgebraTensorModule.curry (baseChange A (f + g))) 1) x✝ =\n ((AlgebraTensorModule.curry (baseChange A f + baseChange A g)) 1) x✝"
] | [] |
import Batteries.Data.UnionFind.Basic
namespace Batteries.UnionFind
@[simp] theorem arr_empty : empty.arr = #[] := rfl
@[simp] theorem parent_empty : empty.parent a = a := rfl
@[simp] theorem rank_empty : empty.rank a = 0 := rfl
@[simp] theorem rootD_empty : empty.rootD a = a := rfl
@[simp] theorem arr_push {m : Un... | .lake/packages/batteries/Batteries/Data/UnionFind/Lemmas.lean | 64 | 97 | theorem root_link {self : UnionFind} {x y : Fin self.size}
(xroot : self.parent x = x) (yroot : self.parent y = y) :
∃ r, (r = x ∨ r = y) ∧ ∀ i,
(link self x y yroot).rootD i =
if self.rootD i = x ∨ self.rootD i = y then r.1 else self.rootD i := by |
if h : x.1 = y then
refine ⟨x, .inl rfl, fun i => ?_⟩
rw [rootD_ext (m2 := self) (fun _ => by rw [parent_link, if_pos h])]
split <;> [obtain _ | _ := ‹_› <;> simp [*]; rfl]
else
have {x y : Fin self.size}
(xroot : self.parent x = x) (yroot : self.parent y = y) {m : UnionFind}
(hm : ∀ i, m... | [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... | [
" parentD (arr.push { parent := arr.size, rank := 0 }) a = parentD arr a",
" (if h : a < arr.size + 1 then (arr.push { parent := arr.size, rank := 0 })[a].parent else a) =\n if h : a < arr.size then arr[a].parent else a",
" (arr.push { parent := arr.size, rank := 0 })[a].parent = if h : a < arr.size then arr... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
open CategoryTheory
namespace ModuleCat
variable {ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)}
(hS : S.Exact) (hS' : S.ShortExact) {v : ι → S.X₁}
open CategoryTheory Submodule Set
section LinearInde... | Mathlib/Algebra/Category/ModuleCat/Free.lean | 62 | 68 | theorem linearIndependent_leftExact : LinearIndependent R u := by |
rw [linearIndependent_sum]
refine ⟨?_, LinearIndependent.of_comp S.g hw, disjoint_span_sum hS hw huv⟩
rw [huv, LinearMap.linearIndependent_iff S.f]; swap
· rw [LinearMap.ker_eq_bot, ← mono_iff_injective]
infer_instance
exact hv
| [
" Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr)))",
" Disjoint (span R (range (u ∘ Sum.inr))) (span R (range (⇑S.f ∘ v)))",
" Disjoint (span R (range (u ∘ Sum.inr))) (span R (range ⇑S.f))",
" Disjoint (span R (range (u ∘ Sum.inr))) (LinearMap.ker S.g)",
" LinearIndependent R u",
" L... | [
" Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr)))",
" Disjoint (span R (range (u ∘ Sum.inr))) (span R (range (⇑S.f ∘ v)))",
" Disjoint (span R (range (u ∘ Sum.inr))) (span R (range ⇑S.f))",
" Disjoint (span R (range (u ∘ Sum.inr))) (LinearMap.ker S.g)"
] |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.RingTheory.Coprime.Basic
import Mathlib.Tactic.AdaptationNote
#align_import ring_theory.polynomial.scale_roots from "leanprover-community/mathlib"@"40ac1b258344e0c2b4568dc37bfad937ec35a727"
variable {R... | Mathlib/RingTheory/Polynomial/ScaleRoots.lean | 90 | 91 | theorem natDegree_scaleRoots (p : R[X]) (s : R) : natDegree (scaleRoots p s) = natDegree p := by |
simp only [natDegree, degree_scaleRoots]
| [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False",
" (p.scaleRoots s).support ≤ p.support",
" a✝ ∈ (p.scaleRoots s).support → a✝ ∈ p.... | [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False",
" (p.scaleRoots s).support ≤ p.support",
" a✝ ∈ (p.scaleRoots s).support → a✝ ∈ p.... |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.LinearAlgebra.Prod
#align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213"
noncomputable section Ring
variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E]
variable {F : Type*} [Ad... | Mathlib/LinearAlgebra/Projection.lean | 139 | 143 | theorem prodEquivOfIsCompl_symm_apply_snd_eq_zero (h : IsCompl p q) {x : E} :
((prodEquivOfIsCompl p q h).symm x).2 = 0 ↔ x ∈ p := by |
conv_rhs => rw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]
rw [coe_prodEquivOfIsCompl', Submodule.add_mem_iff_right _ (Submodule.coe_mem _),
mem_left_iff_eq_zero_of_disjoint h.disjoint]
| [
" Function.Injective ⇑(p.mkQ ∘ₗ q.subtype)",
" Function.Surjective ⇑(p.mkQ ∘ₗ q.subtype)",
" (↥p × ↥q) ≃ₗ[R] E",
" Function.Bijective ⇑(p.subtype.coprod q.subtype)",
" Function.Injective ⇑(p.subtype.coprod q.subtype)",
" Disjoint (range p.subtype) (range q.subtype)",
" Disjoint p q",
" Function.Surjec... | [
" Function.Injective ⇑(p.mkQ ∘ₗ q.subtype)",
" Function.Surjective ⇑(p.mkQ ∘ₗ q.subtype)",
" (↥p × ↥q) ≃ₗ[R] E",
" Function.Bijective ⇑(p.subtype.coprod q.subtype)",
" Function.Injective ⇑(p.subtype.coprod q.subtype)",
" Disjoint (range p.subtype) (range q.subtype)",
" Disjoint p q",
" Function.Surjec... |
import Mathlib.Order.CompleteLattice
import Mathlib.Order.GaloisConnection
import Mathlib.Data.Set.Lattice
import Mathlib.Tactic.AdaptationNote
#align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2"
variable {α β γ : Type*}
def Rel (α β : Type*) :=
α → β → Prop --... | Mathlib/Data/Rel.lean | 150 | 152 | theorem inv_comp (r : Rel α β) (s : Rel β γ) : inv (r • s) = inv s • inv r := by |
ext x z
simp [comp, inv, flip, and_comm]
| [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... | [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... |
import Mathlib.CategoryTheory.CofilteredSystem
import Mathlib.Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.finsubgraph from "leanprover-community/mathlib"@"c6ef6387ede9983aee397d442974e61f89dfd87b"
open Set CategoryTheory
universe u v
variable {V : Type u} {W : Type v} {G : Simple... | Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean | 93 | 95 | theorem singletonFinsubgraph_le_adj_left {u v : V} {e : G.Adj u v} :
singletonFinsubgraph u ≤ finsubgraphOfAdj e := by |
simp [singletonFinsubgraph, finsubgraphOfAdj]
| [
" (G.singletonSubgraph v).verts.Finite",
" (G.subgraphOfAdj e).verts.Finite",
" singletonFinsubgraph u ≤ finsubgraphOfAdj e"
] | [
" (G.singletonSubgraph v).verts.Finite",
" (G.subgraphOfAdj e).verts.Finite"
] |
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.WittVector.Truncated
#align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
namespace WittVector
variable (p : ℕ) [hp : Fact p.Prime]
variable {k ... | Mathlib/RingTheory/WittVector/MulCoeff.lean | 56 | 61 | theorem wittPolyProd_vars (n : ℕ) : (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1) := by |
rw [wittPolyProd]
apply Subset.trans (vars_mul _ _)
refine union_subset ?_ ?_ <;>
· refine Subset.trans (vars_rename _ _) ?_
simp [wittPolynomial_vars, image_subset_iff]
| [
" (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n) * (rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n)).vars ∪ ((rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n ... | [] |
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-communit... | Mathlib/MeasureTheory/Measure/Hausdorff.lean | 293 | 297 | theorem tendsto_pre_nat (m : Set X → ℝ≥0∞) (s : Set X) :
Tendsto (fun n : ℕ => pre m n⁻¹ s) atTop (𝓝 <| mkMetric' m s) := by |
refine (tendsto_pre m s).comp (tendsto_inf.2 ⟨ENNReal.tendsto_inv_nat_nhds_zero, ?_⟩)
refine tendsto_principal.2 (eventually_of_forall fun n => ?_)
simp
| [
" μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s",
" (↑l)⁻¹ ≤ (↑k)⁻¹",
" Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))",
... | [
" μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s",
" (↑l)⁻¹ ≤ (↑k)⁻¹",
" Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))"
] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.LinearAlgebra.Prod
#align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213"
noncomputable section Ring
variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E]
variable {F : Type*} [Ad... | Mathlib/LinearAlgebra/Projection.lean | 41 | 45 | theorem ker_id_sub_eq_of_proj {f : E →ₗ[R] p} (hf : ∀ x : p, f x = x) :
ker (id - p.subtype.comp f) = p := by |
ext x
simp only [comp_apply, mem_ker, subtype_apply, sub_apply, id_apply, sub_eq_zero]
exact ⟨fun h => h.symm ▸ Submodule.coe_mem _, fun hx => by erw [hf ⟨x, hx⟩, Subtype.coe_mk]⟩
| [
" ker (id - p.subtype ∘ₗ f) = p",
" x ∈ ker (id - p.subtype ∘ₗ f) ↔ x ∈ p",
" x = ↑(f x) ↔ x ∈ p",
" x = ↑(f x)"
] | [] |
import Mathlib.FieldTheory.Adjoin
open Polynomial
namespace IntermediateField
variable (F E K : Type*) [Field F] [Field E] [Field K] [Algebra F E] [Algebra F K] {S : Set E}
structure Lifts where
carrier : IntermediateField F E
emb : carrier →ₐ[F] K
#align intermediate_field.lifts IntermediateField.Lif... | Mathlib/FieldTheory/Extension.lean | 57 | 70 | theorem Lifts.exists_upper_bound (c : Set (Lifts F E K)) (hc : IsChain (· ≤ ·) c) :
∃ ub, ∀ a ∈ c, a ≤ ub := by |
let t (i : ↑(insert ⊥ c)) := i.val.carrier
let t' (i) := (t i).toSubalgebra
have hc := hc.insert fun _ _ _ ↦ .inl bot_le
have dir : Directed (· ≤ ·) t := hc.directedOn.directed_val.mono_comp _ fun _ _ h ↦ h.1
refine ⟨⟨iSup t, (Subalgebra.iSupLift t' dir (fun i ↦ i.val.emb) (fun i j h ↦ ?_) _ rfl).comp
... | [
" ∀ (x : ↥L.carrier), L.emb ((inclusion ⋯) x) = L.emb x",
" L₁ ≤ L₂ → L₂ ≤ L₃ → L₁ ≤ L₃",
" L₁ ≤ L₃",
" L₃.emb ((inclusion ⋯) x✝) = L₁.emb x✝",
" ∀ (a b : Lifts F E K), a ≤ b → b ≤ a → a = b",
" { carrier := L₁, emb := e₁ } = { carrier := L₂, emb := e₂ }",
" { carrier := L₁, emb := e₁ } = { carrier := L... | [
" ∀ (x : ↥L.carrier), L.emb ((inclusion ⋯) x) = L.emb x",
" L₁ ≤ L₂ → L₂ ≤ L₃ → L₁ ≤ L₃",
" L₁ ≤ L₃",
" L₃.emb ((inclusion ⋯) x✝) = L₁.emb x✝",
" ∀ (a b : Lifts F E K), a ≤ b → b ≤ a → a = b",
" { carrier := L₁, emb := e₁ } = { carrier := L₂, emb := e₂ }",
" { carrier := L₁, emb := e₁ } = { carrier := L... |
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.prod from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open Topology NNReal ... | Mathlib/Analysis/Calculus/FDeriv/Prod.lean | 400 | 403 | theorem hasStrictFDerivAt_pi' :
HasStrictFDerivAt Φ Φ' x ↔ ∀ i, HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x := by |
simp only [HasStrictFDerivAt, ContinuousLinearMap.coe_pi]
exact isLittleO_pi
| [
" HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x",
" ((fun p => Φ p.1 - Φ p.2 - Φ' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n ∀ (i : ι), (fun p => Φ p.1 i - Φ p.2 i - ((proj i).comp Φ') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 104 | 107 | theorem Ioi_mul_Ici_subset' (a b : α) : Ioi a * Ici b ⊆ Ioi (a * b) := by |
haveI := covariantClass_le_of_lt
rintro x ⟨y, hya, z, hzb, rfl⟩
exact mul_lt_mul_of_lt_of_le hya hzb
| [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)",
" Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)",
" Iic a * Iio b ⊆ Iio ... | [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)",
" Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)",
" Iic a * Iio b ⊆ Iio ... |
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.MvPolynomial.Rename
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp Ad... | Mathlib/Algebra/MvPolynomial/Degrees.lean | 178 | 185 | theorem degrees_add_of_disjoint [DecidableEq σ] {p q : MvPolynomial σ R}
(h : Multiset.Disjoint p.degrees q.degrees) : (p + q).degrees = p.degrees ∪ q.degrees := by |
apply le_antisymm
· apply degrees_add
· apply Multiset.union_le
· apply le_degrees_add h
· rw [add_comm]
apply le_degrees_add h.symm
| [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s",... | [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s",... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section IsCoprime
variable {R : Type ... | Mathlib/RingTheory/Coprime/Lemmas.lean | 120 | 175 | theorem exists_sum_eq_one_iff_pairwise_coprime [DecidableEq I] (h : t.Nonempty) :
(∃ μ : I → R, (∑ i ∈ t, μ i * ∏ j ∈ t \ {i}, s j) = 1) ↔
Pairwise (IsCoprime on fun i : t ↦ s i) := by |
induction h using Finset.Nonempty.cons_induction with
| singleton =>
simp [exists_apply_eq, Pairwise, Function.onFun]
| cons a t hat h ih =>
rw [pairwise_cons']
have mem : ∀ x ∈ t, a ∈ insert a t \ {x} := fun x hx ↦ by
rw [mem_sdiff, mem_singleton]
exact ⟨mem_insert_self _ _, fun ha ↦ hat... | [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... | [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... |
import Mathlib.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 | 73 | 75 | theorem fold_image [DecidableEq α] {g : γ → α} {s : Finset γ}
(H : ∀ x ∈ s, ∀ y ∈ s, g x = g y → x = y) : (s.image g).fold op b f = s.fold op b (f ∘ g) := by |
simp only [fold, image_val_of_injOn H, Multiset.map_map]
| [
" 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.RepresentationTheory.Basic
import Mathlib.RepresentationTheory.FdRep
#align_import representation_theory.invariants from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9"
suppress_compilation
open MonoidAlgebra
open Representation
namespace GroupAlgebra
variable (k G : Ty... | Mathlib/RepresentationTheory/Invariants.lean | 54 | 59 | theorem mul_average_right (g : G) : average k G * ↑(Finsupp.single g 1) = average k G := by |
simp only [mul_one, Finset.sum_mul, Algebra.smul_mul_assoc, average, MonoidAlgebra.of_apply,
Finset.sum_congr, MonoidAlgebra.single_mul_single]
set f : G → MonoidAlgebra k G := fun x => Finsupp.single x 1
show ⅟ (Fintype.card G : k) • ∑ x : G, f (x * g) = ⅟ (Fintype.card G : k) • ∑ x : G, f x
rw [Function.... | [
" Finsupp.single g 1 * average k G = average k G",
" ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • ∑ x : G, single x 1",
" ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • Finset.univ.sum f",
" ⅟↑(Fintype.card G) • ∑ x : G, f (g * x) = ⅟↑(Fintype.card G) • ∑ x : G,... | [
" Finsupp.single g 1 * average k G = average k G",
" ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • ∑ x : G, single x 1",
" ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • Finset.univ.sum f",
" ⅟↑(Fintype.card G) • ∑ x : G, f (g * x) = ⅟↑(Fintype.card G) • ∑ x : G,... |
import Mathlib.MeasureTheory.Integral.Lebesgue
#align_import measure_theory.measure.giry_monad from "leanprover-community/mathlib"@"56f4cd1ef396e9fd389b5d8371ee9ad91d163625"
noncomputable section
open scoped Classical
open ENNReal
open scoped Classical
open Set Filter
variable {α β : Type*}
namespace MeasureT... | Mathlib/MeasureTheory/Measure/GiryMonad.lean | 85 | 88 | theorem measurable_dirac : Measurable (Measure.dirac : α → Measure α) := by |
refine measurable_of_measurable_coe _ fun s hs => ?_
simp_rw [dirac_apply' _ hs]
exact measurable_one.indicator hs
| [
" borel ℝ≥0∞ ≤ MeasurableSpace.map (fun μ => μ s) (MeasurableSpace.map f inst✝)",
" borel ℝ≥0∞ ≤ MeasurableSpace.map ((fun μ => μ s) ∘ f) inst✝",
" MeasurableAdd₂ (Measure α)",
" Measurable fun b => (b.1 + b.2) s",
" Measurable fun b => b.1 s + b.2 s",
" Measurable fun b => b.1 s",
" Measurable fun b =>... | [
" borel ℝ≥0∞ ≤ MeasurableSpace.map (fun μ => μ s) (MeasurableSpace.map f inst✝)",
" borel ℝ≥0∞ ≤ MeasurableSpace.map ((fun μ => μ s) ∘ f) inst✝",
" MeasurableAdd₂ (Measure α)",
" Measurable fun b => (b.1 + b.2) s",
" Measurable fun b => b.1 s + b.2 s",
" Measurable fun b => b.1 s",
" Measurable fun b =>... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 483 | 495 | theorem eval_divByMonic_eq_trailingCoeff_comp {p : R[X]} {t : R} :
(p /ₘ (X - C t) ^ p.rootMultiplicity t).eval t = (p.comp (X + C t)).trailingCoeff := by |
obtain rfl | hp := eq_or_ne p 0
· rw [zero_divByMonic, eval_zero, zero_comp, trailingCoeff_zero]
have mul_eq := p.pow_mul_divByMonic_rootMultiplicity_eq t
set m := p.rootMultiplicity t
set g := p /ₘ (X - C t) ^ m
have : (g.comp (X + C t)).coeff 0 = g.eval t := by
rw [coeff_zero_eq_eval_zero, eval_comp,... | [
" n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (X - C a) ^ n ∣ p",
" (X - C a) ^ 0 ∣ p",
" 1 ∣ p",
" (X - C a) ^ (n + 1) ∣ p",
" rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣... | [
" n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p",
" (X - C a) ^ n ∣ p",
" (X - C a) ^ 0 ∣ p",
" 1 ∣ p",
" (X - C a) ^ (n + 1) ∣ p",
" rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣... |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 106 | 108 | theorem Left.one_le_inv_iff : 1 ≤ a⁻¹ ↔ a ≤ 1 := by |
rw [← mul_le_mul_iff_left a]
simp
| [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a * a⁻¹ ≤ a * 1 ↔ 1 ≤ a",
" 1 ≤ a⁻¹ ↔ a ≤ 1",
" a * 1 ≤ a * a⁻¹ ↔ a ≤ 1"
] | [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a * a⁻¹ ≤ a * 1 ↔ 1 ≤ a"
] |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Matrix.Basic
#align_import combinatorics.simple_graph.inc_matrix from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Finset Matrix SimpleGraph Sym2
open Matrix
namespace SimpleGraph... | Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean | 96 | 97 | theorem incMatrix_of_mem_incidenceSet (h : e ∈ G.incidenceSet a) : G.incMatrix R a e = 1 := by |
rw [incMatrix_apply, Set.indicator_of_mem h, Pi.one_apply]
| [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... | [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.