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.Data.List.Range
import Mathlib.Data.List.Perm
#align_import data.list.sigma from "leanprover-community/mathlib"@"f808feb6c18afddb25e66a71d317643cf7fb5fbb"
universe u v
namespace List
variable {α : Type u} {β : α → Type v} {l l₁ l₂ : List (Sigma β)}
def keys : List (Sigma β) → List α :=
map ... | Mathlib/Data/List/Sigma.lean | 144 | 149 | theorem nodupKeys_join {L : List (List (Sigma β))} :
NodupKeys (join L) ↔ (∀ l ∈ L, NodupKeys l) ∧ Pairwise Disjoint (L.map keys) := by |
rw [nodupKeys_iff_pairwise, pairwise_join, pairwise_map]
refine and_congr (forall₂_congr fun l _ => by simp [nodupKeys_iff_pairwise]) ?_
apply iff_of_eq; congr with (l₁ l₂)
simp [keys, disjoint_iff_ne]
| [
" s.fst ∉ l.keys",
" (s :: l).NodupKeys ↔ s.fst ∉ l.keys ∧ l.NodupKeys",
" b = b'",
" b = b",
" L.join.NodupKeys ↔ (∀ l ∈ L, l.NodupKeys) ∧ Pairwise Disjoint (map keys L)",
" (∀ l ∈ L, Pairwise (fun s s' => s.fst ≠ s'.fst) l) ∧ Pairwise (fun l₁ l₂ => ∀ x ∈ l₁, ∀ y ∈ l₂, x.fst ≠ y.fst) L ↔\n (∀ l ∈ L, l... | [
" s.fst ∉ l.keys",
" (s :: l).NodupKeys ↔ s.fst ∉ l.keys ∧ l.NodupKeys",
" b = b'",
" b = b"
] |
import Mathlib.Logic.Function.Basic
import Mathlib.Logic.Relator
import Mathlib.Init.Data.Quot
import Mathlib.Tactic.Cases
import Mathlib.Tactic.Use
import Mathlib.Tactic.MkIffOfInductiveProp
import Mathlib.Tactic.SimpRw
#align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a... | Mathlib/Logic/Relation.lean | 306 | 309 | theorem head (hab : r a b) (hbc : ReflTransGen r b c) : ReflTransGen r a c := by |
induction hbc with
| refl => exact refl.tail hab
| tail _ hcd hac => exact hac.tail hcd
| [
" ReflTransGen r a c",
" ReflTransGen r a b",
" ReflTransGen r a c✝"
] | [
" ReflTransGen r a c",
" ReflTransGen r a b",
" ReflTransGen r a c✝"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.Data.Complex.Cardinality
import Mathlib.Data.Fin.VecNotation
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import data.complex.module from "leanprover-community/mathlib"@"c7bce2818663f456335892ddbdd1809f111a... | Mathlib/Data/Complex/Module.lean | 171 | 172 | theorem finrank_real_complex : FiniteDimensional.finrank ℝ ℂ = 2 := by |
rw [finrank_eq_card_basis basisOneI, Fintype.card_fin]
| [
" r • s • x = s • r • x",
" (r • s • x).re = (s • r • x).re",
" (r • s • x).im = (s • r • x).im",
" (r • s) • x = r • s • x",
" ((r • s) • x).re = (r • s • x).re",
" ((r • s) • x).im = (r • s • x).im",
" MulOpposite.op r • x = r • x",
" (MulOpposite.op r • x).re = (r • x).re",
" (MulOpposite.op r • ... | [
" r • s • x = s • r • x",
" (r • s • x).re = (s • r • x).re",
" (r • s • x).im = (s • r • x).im",
" (r • s) • x = r • s • x",
" ((r • s) • x).re = (r • s • x).re",
" ((r • s) • x).im = (r • s • x).im",
" MulOpposite.op r • x = r • x",
" (MulOpposite.op r • x).re = (r • x).re",
" (MulOpposite.op r • ... |
import Mathlib.CategoryTheory.Subobject.Limits
#align_import algebra.homology.image_to_kernel from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u w
open CategoryTheory CategoryTheory.Limits
variable {ι : Type*}
variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V]
o... | Mathlib/Algebra/Homology/ImageToKernel.lean | 112 | 116 | theorem imageToKernel_comp_right {D : V} (h : C ⟶ D) (w : f ≫ g = 0) :
imageToKernel f (g ≫ h) (by simp [reassoc_of% w]) =
imageToKernel f g w ≫ Subobject.ofLE _ _ (kernelSubobject_comp_le g h) := by |
ext
simp
| [
" kernel.lift g f w ≫ kernel.ι g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) ⋯)",
" imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow",
" (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x",
" factorThruIma... | [
" kernel.lift g f w ≫ kernel.ι g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) ⋯)",
" imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow",
" (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x",
" factorThruIma... |
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.GroupTheory.Subgroup.Simple
import Mathlib.Tactic.IntervalCases
#align_import group_theory.specific_groups.alternating from "leanprover-community/mathlib"@"0f6670b8af2dff699de1c0b4b49039b31bc13c46"
-- An example on how to de... | Mathlib/GroupTheory/SpecificGroups/Alternating.lean | 219 | 224 | theorem nontrivial_of_three_le_card (h3 : 3 ≤ card α) : Nontrivial (alternatingGroup α) := by |
haveI := Fintype.one_lt_card_iff_nontrivial.1 (lt_trans (by decide) h3)
rw [← Fintype.one_lt_card_iff_nontrivial]
refine lt_of_mul_lt_mul_left ?_ (le_of_lt Nat.prime_two.pos)
rw [two_mul_card_alternatingGroup, card_perm, ← Nat.succ_le_iff]
exact le_trans h3 (card α).self_le_factorial
| [
" -1 ≠ 1",
" 2 * card ↥(alternatingGroup α) = card (Perm α)",
" card (Perm α ⧸ sign.ker) * card ↥(alternatingGroup α) = card (Perm α)",
" Nat.card (Perm α ⧸ sign.ker) * Nat.card ↥(alternatingGroup α) = Nat.card (Perm α)",
" Nontrivial ↥(alternatingGroup α)",
" 1 < 2",
" 1 < card ↥(alternatingGroup α)",
... | [
" -1 ≠ 1",
" 2 * card ↥(alternatingGroup α) = card (Perm α)",
" card (Perm α ⧸ sign.ker) * card ↥(alternatingGroup α) = card (Perm α)",
" Nat.card (Perm α ⧸ sign.ker) * Nat.card ↥(alternatingGroup α) = Nat.card (Perm α)"
] |
import Mathlib.RingTheory.Valuation.Basic
import Mathlib.NumberTheory.Padics.PadicNorm
import Mathlib.Analysis.Normed.Field.Basic
#align_import number_theory.padics.padic_numbers from "leanprover-community/mathlib"@"b9b2114f7711fec1c1e055d507f082f8ceb2c3b7"
noncomputable section
open scoped Classical
open Nat m... | Mathlib/NumberTheory/Padics/PadicNumbers.lean | 223 | 231 | theorem norm_eq_pow_val {f : PadicSeq p} (hf : ¬f ≈ 0) : f.norm = (p : ℚ) ^ (-f.valuation : ℤ) := by |
rw [norm, valuation, dif_neg hf, dif_neg hf, padicNorm, if_neg]
intro H
apply CauSeq.not_limZero_of_not_congr_zero hf
intro ε hε
use stationaryPoint hf
intro n hn
rw [stationaryPoint_spec hf le_rfl hn]
simpa [H] using hε
| [
" padicNorm p (↑f m) = padicNorm p (↑f n)",
" False",
" f.norm = 0 ↔ f ≈ 0",
" f.norm = 0 → f ≈ 0",
" f ≈ 0",
" ∃ i, ∀ j ≥ i, padicNorm p (↑(f - 0) j) < ε",
" ∀ j ≥ stationaryPoint hf, padicNorm p (↑(f - 0) j) < ε",
" padicNorm p (↑(f - 0) j) < ε",
" f ≈ 0 → f.norm = 0",
" f.norm = 0",
" f.norm ... | [
" padicNorm p (↑f m) = padicNorm p (↑f n)",
" False",
" f.norm = 0 ↔ f ≈ 0",
" f.norm = 0 → f ≈ 0",
" f ≈ 0",
" ∃ i, ∀ j ≥ i, padicNorm p (↑(f - 0) j) < ε",
" ∀ j ≥ stationaryPoint hf, padicNorm p (↑(f - 0) j) < ε",
" padicNorm p (↑(f - 0) j) < ε",
" f ≈ 0 → f.norm = 0",
" f.norm = 0"
] |
import Batteries.Tactic.SeqFocus
namespace Ordering
@[simp] theorem swap_swap {o : Ordering} : o.swap.swap = o := by cases o <;> rfl
@[simp] theorem swap_inj {o₁ o₂ : Ordering} : o₁.swap = o₂.swap ↔ o₁ = o₂ :=
⟨fun h => by simpa using congrArg swap h, congrArg _⟩
| .lake/packages/batteries/Batteries/Classes/Order.lean | 17 | 18 | theorem swap_then (o₁ o₂ : Ordering) : (o₁.then o₂).swap = o₁.swap.then o₂.swap := by |
cases o₁ <;> rfl
| [
" o.swap.swap = o",
" lt.swap.swap = lt",
" eq.swap.swap = eq",
" gt.swap.swap = gt",
" o₁ = o₂",
" (o₁.then o₂).swap = o₁.swap.then o₂.swap",
" (lt.then o₂).swap = lt.swap.then o₂.swap",
" (eq.then o₂).swap = eq.swap.then o₂.swap",
" (gt.then o₂).swap = gt.swap.then o₂.swap"
] | [
" o.swap.swap = o",
" lt.swap.swap = lt",
" eq.swap.swap = eq",
" gt.swap.swap = gt",
" o₁ = o₂"
] |
import Mathlib.MeasureTheory.Integral.SetToL1
#align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
assert_not_exists Differentiable
noncomputable section
open scoped Topology NNReal ENNReal MeasureTheory
open Set Filter TopologicalSpace EN... | Mathlib/MeasureTheory/Integral/Bochner.lean | 213 | 219 | theorem weightedSMul_union' (s t : Set α) (ht : MeasurableSet t) (hs_finite : μ s ≠ ∞)
(ht_finite : μ t ≠ ∞) (h_inter : s ∩ t = ∅) :
(weightedSMul μ (s ∪ t) : F →L[ℝ] F) = weightedSMul μ s + weightedSMul μ t := by |
ext1 x
simp_rw [add_apply, weightedSMul_apply,
measure_union (Set.disjoint_iff_inter_eq_empty.mpr h_inter) ht,
ENNReal.toReal_add hs_finite ht_finite, add_smul]
| [
" (weightedSMul μ s) x = (μ s).toReal • x",
" weightedSMul 0 = 0",
" weightedSMul 0 x✝ = 0 x✝",
" weightedSMul μ ∅ = 0",
" (weightedSMul μ ∅) x = 0 x",
" (μ ∅).toReal • x = 0 x",
" weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s",
" (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte... | [
" (weightedSMul μ s) x = (μ s).toReal • x",
" weightedSMul 0 = 0",
" weightedSMul 0 x✝ = 0 x✝",
" weightedSMul μ ∅ = 0",
" (weightedSMul μ ∅) x = 0 x",
" (μ ∅).toReal • x = 0 x",
" weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s",
" (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte... |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace... | Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean | 113 | 116 | theorem contMDiffOn_extChartAt_symm (x : M) :
ContMDiffOn 𝓘(𝕜, E) I n (extChartAt I x).symm (extChartAt I x).target := by |
convert contMDiffOn_extend_symm (chart_mem_maximalAtlas I x)
rw [extChartAt_target, I.image_eq]
| [
" ContMDiff I 𝓘(𝕜, E) n ↑I",
" ContMDiffAt I 𝓘(𝕜, E) n (↑I) x",
" ContDiffWithinAt 𝕜 n (↑(extChartAt 𝓘(𝕜, E) (↑I x)) ∘ ↑I ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x)",
" ContDiffWithinAt 𝕜 n (↑I ∘ ↑I.symm) (range ↑I) (↑I x)",
" ↑I ∘ ↑I.symm =ᶠ[nhdsWithin (↑I x) (range ↑I)] id",
" (↑... | [
" ContMDiff I 𝓘(𝕜, E) n ↑I",
" ContMDiffAt I 𝓘(𝕜, E) n (↑I) x",
" ContDiffWithinAt 𝕜 n (↑(extChartAt 𝓘(𝕜, E) (↑I x)) ∘ ↑I ∘ ↑(extChartAt I x).symm) (range ↑I) (↑(extChartAt I x) x)",
" ContDiffWithinAt 𝕜 n (↑I ∘ ↑I.symm) (range ↑I) (↑I x)",
" ↑I ∘ ↑I.symm =ᶠ[nhdsWithin (↑I x) (range ↑I)] id",
" (↑... |
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 | 40 | 44 | theorem coeff_add (p q : R[X]) (n : ℕ) : coeff (p + q) n = coeff p n + coeff q n := by |
rcases p with ⟨⟩
rcases q with ⟨⟩
simp_rw [← ofFinsupp_add, coeff]
exact Finsupp.add_apply _ _ _
| [
" (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.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
#align_import algebra.big_operators.nat_antidiagonal from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
variable {M N : Type*} [CommMonoid M] [AddCommMonoid N]
namespace Finset
namespace Nat
| Mathlib/Algebra/BigOperators/NatAntidiagonal.lean | 23 | 26 | theorem prod_antidiagonal_succ {n : ℕ} {f : ℕ × ℕ → M} :
(∏ p ∈ antidiagonal (n + 1), f p)
= f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2) := by |
rw [antidiagonal_succ, prod_cons, prod_map]; rfl
| [
" ∏ p ∈ antidiagonal (n + 1), f p = f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)",
" f (0, n + 1) *\n ∏ x ∈ antidiagonal n,\n f (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Function.Embedding.refl ℕ)) x) =\n f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)"
] | [] |
import Mathlib.Topology.Connected.Basic
open Set Topology
universe u v
variable {α : Type u} {β : Type v} {ι : Type*} {π : ι → Type*} [TopologicalSpace α]
{s t u v : Set α}
section LocallyConnectedSpace
class LocallyConnectedSpace (α : Type*) [TopologicalSpace α] : Prop where
open_connected_basis : ∀ x,... | Mathlib/Topology/Connected/LocallyConnected.lean | 118 | 122 | theorem locallyConnectedSpace_iff_connected_basis :
LocallyConnectedSpace α ↔
∀ x, (𝓝 x).HasBasis (fun s : Set α => s ∈ 𝓝 x ∧ IsPreconnected s) id := by |
rw [locallyConnectedSpace_iff_connected_subsets]
exact forall_congr' fun x => Filter.hasBasis_self.symm
| [
" LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i... | [
" LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i... |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Logic.Encodable.Lattice
noncomputable section
open Filter Finset Function Encodable
open scoped Topology
variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M}
variable {G : Type*} [CommGroup G] {g g' : G}
-- don't declare [Topologic... | Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean | 68 | 70 | theorem zero_mul {f : ℕ → M} (h : HasProd (fun n ↦ f (n + 1)) m) :
HasProd f (f 0 * m) := by |
simpa only [prod_range_one] using h.prod_range_mul
| [
" HasProd f ((∏ i ∈ range k, f i) * m)",
" HasProd (f ∘ Subtype.val) m",
" HasProd f (f 0 * m)"
] | [
" HasProd f ((∏ i ∈ range k, f i) * m)",
" HasProd (f ∘ Subtype.val) m"
] |
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
#align_import data.nat.factorial.big_operators from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open Finset Nat
namespace Nat
lemma monotone_factorial : Monotone factorial := fun _ _ => fa... | Mathlib/Data/Nat/Factorial/BigOperators.lean | 31 | 31 | theorem prod_factorial_pos : 0 < ∏ i ∈ s, (f i)! := by | positivity
| [
" 0 < ∏ i ∈ s, (f i)!"
] | [] |
import Mathlib.Analysis.BoxIntegral.Partition.Filter
import Mathlib.Analysis.BoxIntegral.Partition.Measure
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Init.Data.Bool.Lemmas
#align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open... | Mathlib/Analysis/BoxIntegral/Basic.lean | 137 | 139 | theorem integralSum_add (f g : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) :
integralSum (f + g) vol π = integralSum f vol π + integralSum g vol π := by |
simp only [integralSum, Pi.add_apply, (vol _).map_add, Finset.sum_add_distrib]
| [
" integralSum f vol (π.biUnionTagged πi) = ∑ J ∈ π.boxes, integralSum f vol (πi J)",
" (vol J') (f ((π.biUnionTagged πi).tag J')) = (vol J') (f ((πi J).tag J'))",
" integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π",
" ∑ J' ∈ (πi J).boxes, (vol J') (f ((π.biUnionPrepartition πi).tag J')) = (v... | [
" integralSum f vol (π.biUnionTagged πi) = ∑ J ∈ π.boxes, integralSum f vol (πi J)",
" (vol J') (f ((π.biUnionTagged πi).tag J')) = (vol J') (f ((πi J).tag J'))",
" integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π",
" ∑ J' ∈ (πi J).boxes, (vol J') (f ((π.biUnionPrepartition πi).tag J')) = (v... |
import Batteries.Data.List.Lemmas
import Batteries.Tactic.Classical
import Mathlib.Tactic.TypeStar
import Mathlib.Mathport.Rename
#align_import data.list.tfae from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
namespace List
def TFAE (l : List Prop) : Prop :=
∀ x ∈ l, ∀ y ∈ l, x ↔ ... | Mathlib/Data/List/TFAE.lean | 56 | 57 | theorem tfae_cons_self {a} {l : List Prop} : TFAE (a :: a :: l) ↔ TFAE (a :: l) := by |
simp [tfae_cons_cons]
| [
" [p].TFAE",
" a ∈ a :: l",
" (a ↔ b) ∧ l.TFAE → (a :: l).TFAE",
" a ↔ a",
" a ↔ q",
" p ↔ a",
" p ↔ q",
" (a :: a :: l).TFAE ↔ (a :: l).TFAE"
] | [
" [p].TFAE",
" a ∈ a :: l",
" (a ↔ b) ∧ l.TFAE → (a :: l).TFAE",
" a ↔ a",
" a ↔ q",
" p ↔ a",
" p ↔ q"
] |
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.ContinuousFunction.Compact
import Mathlib.Topology.UrysohnsLemma
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Topology.Algebra.Module.CharacterSpace
#align_import topology.continuous_function.ideals from "... | Mathlib/Topology/ContinuousFunction/Ideals.lean | 161 | 168 | theorem ideal_gc : GaloisConnection (setOfIdeal : Ideal C(X, R) → Set X) (idealOfSet R) := by |
refine fun I s => ⟨fun h f hf => ?_, fun h x hx => ?_⟩
· by_contra h'
rcases not_mem_idealOfSet.mp h' with ⟨x, hx, hfx⟩
exact hfx (not_mem_setOfIdeal.mp (mt (@h x) hx) hf)
· obtain ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx
by_contra hx'
exact not_mem_idealOfSet.mpr ⟨x, hx', hfx⟩ (h hf)
| [
" (f + g) x = 0",
" IsClosed ↑(idealOfSet R s)",
" IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }",
" f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0",
" f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (∃ x ∈ sᶜ, f x ≠ 0... | [
" (f + g) x = 0",
" IsClosed ↑(idealOfSet R s)",
" IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }",
" f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0",
" f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (∃ x ∈ sᶜ, f x ≠ 0... |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL2
#align_import measure_theory.function.conditional_expectation.condexp_L1 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e"
noncomputable section
open TopologicalSpace MeasureTheory.Lp Filter ContinuousLinearMap
o... | Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean | 105 | 113 | theorem condexpIndL1Fin_smul (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : ℝ) (x : G) :
condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x := by |
ext1
refine (Memℒp.coeFn_toLp q).trans ?_
refine EventuallyEq.trans ?_ (Lp.coeFn_smul _ _).symm
rw [condexpIndSMul_smul hs hμs c x]
refine (Lp.coeFn_smul _ _).trans ?_
refine (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x).mono fun y hy => ?_
simp only [Pi.smul_apply, hy]
| [
" Memℒp (↑↑(condexpIndSMul hm hs hμs x)) 1 μ",
" Integrable (↑↑(condexpIndSMul hm hs hμs x)) μ",
" condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y",
" ↑↑(condexpIndL1Fin hm hs hμs (x + y)) =ᶠ[ae μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)",
... | [
" Memℒp (↑↑(condexpIndSMul hm hs hμs x)) 1 μ",
" Integrable (↑↑(condexpIndSMul hm hs hμs x)) μ",
" condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y",
" ↑↑(condexpIndL1Fin hm hs hμs (x + y)) =ᶠ[ae μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)",
... |
import Mathlib.Tactic.NormNum.Core
import Mathlib.Tactic.HaveI
import Mathlib.Data.Nat.Cast.Commute
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.GroupWithZero.Invertible
import Mathlib.Tactic.ClearExclamation
import Mathlib.Data.Nat.Cast.Basic
set_option autoImplicit true
namespace Mathlib
open Lean hidi... | Mathlib/Tactic/NormNum/Basic.lean | 104 | 105 | theorem isNat_natCast {R} [AddMonoidWithOne R] (n m : ℕ) :
IsNat n m → IsNat (n : R) m := by | rintro ⟨⟨⟩⟩; exact ⟨rfl⟩
| [
" (↑(Int.negOfNat a✝)).natAbs = ↑a✝",
" IsNat n m → IsNat (↑n) m",
" IsNat (↑↑m) m"
] | [
" (↑(Int.negOfNat a✝)).natAbs = ↑a✝"
] |
import Mathlib.Algebra.Polynomial.Degree.CardPowDegree
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.Ideal.LocalRing
#align_import number_theory.class_number.admissible_card_pow_degree from "leanprover-community/mathlib"@"0b... | Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean | 63 | 98 | theorem exists_approx_polynomial_aux [Ring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (A : Fin m.succ → Fq[X]) (hA : ∀ i, degree (A i) < degree b) :
∃ i₀ i₁, i₀ ≠ i₁ ∧ degree (A i₁ - A i₀) < ↑(natDegree b - d) := by |
have hb : b ≠ 0 := by
rintro rfl
specialize hA 0
rw [degree_zero] at hA
exact not_lt_of_le bot_le hA
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `degree b - 1`, ... `degree b -... | [
" ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀",
" Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ)",
" A i₁ = A i₀",
" (A i₁).coeff j = (A i₀).coeff j",
" j < d",
" ∃ i₀ i₁, i₀ ≠ i₁ ∧ (A i₁ - A i₀).degree < ↑(b.natDegree - d)",
" b ≠ 0",
" False",
" (A i₁ - A i₀).degree < ↑(b.natDegree - d)",
" (A i₁ - A ... | [
" ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀",
" Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ)",
" A i₁ = A i₀",
" (A i₁).coeff j = (A i₀).coeff j",
" j < d"
] |
import Mathlib.Algebra.MvPolynomial.PDeriv
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.RingTheory.Polynomial.Pochhammer
#align_import ring_theory.polynomial.bernstein from "le... | Mathlib/RingTheory/Polynomial/Bernstein.lean | 76 | 78 | theorem flip (n ν : ℕ) (h : ν ≤ n) :
(bernsteinPolynomial R n ν).comp (1 - X) = bernsteinPolynomial R n (n - ν) := by |
simp [bernsteinPolynomial, h, tsub_tsub_assoc, mul_right_comm]
| [
" bernsteinPolynomial ℤ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n ν = 0",
" Polynomial.map f (bernsteinPolynomial R n ν) = bernsteinPolynomial S n ν",
" (bernsteinPolynomial R n ν).comp (1 - X) = bernsteinPolynomial R n (n - ν)"
] | [
" bernsteinPolynomial ℤ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n ν = 0",
" Polynomial.map f (bernsteinPolynomial R n ν) = bernsteinPolynomial S n ν"
] |
import Mathlib.Init.Core
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0"
noncomputable section
open Affine
section AffineSpace... | Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean | 120 | 125 | theorem AffineIndependent.finrank_vectorSpan [Fintype ι] {p : ι → P} (hi : AffineIndependent k p)
{n : ℕ} (hc : Fintype.card ι = n + 1) : finrank k (vectorSpan k (Set.range p)) = n := by |
classical
rw [← Finset.card_univ] at hc
rw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]
exact hi.finrank_vectorSpan_image_finset hc
| [
" _root_.Finite ι",
" finrank k ↥(vectorSpan k ↑(Finset.image p s)) = n",
" (Finset.image p s).card = n + 1",
" (Finset.image p s).Nonempty",
" p₁ ∈ p '' ↑s",
" (Finset.image (fun p => p -ᵥ p₁) ((Finset.image p s).erase p₁)).card = n",
" (Finset.image p s).card - 1 = n",
" finrank k ↥(vectorSpan k (Se... | [
" _root_.Finite ι",
" finrank k ↥(vectorSpan k ↑(Finset.image p s)) = n",
" (Finset.image p s).card = n + 1",
" (Finset.image p s).Nonempty",
" p₁ ∈ p '' ↑s",
" (Finset.image (fun p => p -ᵥ p₁) ((Finset.image p s).erase p₁)).card = n",
" (Finset.image p s).card - 1 = n"
] |
import Mathlib.Analysis.Calculus.FDeriv.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
#align_import analysis.calculus.deriv.basic from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open scoped Classical Topology Filter ENNReal ... | Mathlib/Analysis/Calculus/Deriv/Basic.lean | 161 | 162 | theorem hasFDerivAtFilter_iff_hasDerivAtFilter {f' : 𝕜 →L[𝕜] F} :
HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (f' 1) x L := by | simp [HasDerivAtFilter]
| [
" HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (f' 1) x L"
] | [] |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Set.Subsingleton
#align_import combinatorics.double_counting from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open Finset Function Relator
variable {α β : Type*}
namespace Finset
section Bipartite
varia... | Mathlib/Combinatorics/Enumerative/DoubleCounting.lean | 79 | 82 | theorem sum_card_bipartiteAbove_eq_sum_card_bipartiteBelow [∀ a b, Decidable (r a b)] :
(∑ a ∈ s, (t.bipartiteAbove r a).card) = ∑ b ∈ t, (s.bipartiteBelow r b).card := by |
simp_rw [card_eq_sum_ones, bipartiteAbove, bipartiteBelow, sum_filter]
exact sum_comm
| [
" ∑ a ∈ s, (bipartiteAbove r t a).card = ∑ b ∈ t, (bipartiteBelow r s b).card",
" (∑ x ∈ s, ∑ a ∈ t, if r x a then 1 else 0) = ∑ x ∈ t, ∑ a ∈ s, if r a x then 1 else 0"
] | [] |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Multiset.Basic
#align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4"
assert_not_exists MonoidWithZero
variable {F ι α β γ : Type*}
names... | Mathlib/Algebra/BigOperators/Group/Multiset.lean | 91 | 94 | theorem prod_map_erase [DecidableEq ι] {a : ι} (h : a ∈ m) :
f a * ((m.erase a).map f).prod = (m.map f).prod := by |
rw [← m.coe_toList, coe_erase, map_coe, map_coe, prod_coe, prod_coe,
List.prod_map_erase f (mem_toList.2 h)]
| [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... | [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... |
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv
import Mathlib.Analysis.Calculus.FDeriv.Extend
import Mathlib.Analysis.Calculus.Deriv.Prod
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
#... | Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean | 648 | 656 | theorem tendsto_one_plus_div_rpow_exp (t : ℝ) :
Tendsto (fun x : ℝ => (1 + t / x) ^ x) atTop (𝓝 (exp t)) := by |
apply ((Real.continuous_exp.tendsto _).comp (tendsto_mul_log_one_plus_div_atTop t)).congr' _
have h₁ : (1 : ℝ) / 2 < 1 := by linarith
have h₂ : Tendsto (fun x : ℝ => 1 + t / x) atTop (𝓝 1) := by
simpa using (tendsto_inv_atTop_zero.const_mul t).const_add 1
refine (eventually_ge_of_tendsto_gt h₁ h₂).mono fu... | [
" Tendsto (fun x => (1 + t / x) ^ x) atTop (𝓝 (rexp t))",
" (rexp ∘ fun x => x * (1 + t / x).log) =ᶠ[atTop] fun x => (1 + t / x) ^ x",
" 1 / 2 < 1",
" Tendsto (fun x => 1 + t / x) atTop (𝓝 1)",
" (rexp ∘ fun x => x * (1 + t / x).log) x = (fun x => (1 + t / x) ^ x) x",
" 0 < 1 + t / x"
] | [] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.GeomSum
import Mathlib.Data.Fintype.BigOperators
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.Tactic.FieldSimp
#align_import number_theory.bernoulli from "leanprover-community/mat... | Mathlib/NumberTheory/Bernoulli.lean | 83 | 88 | theorem bernoulli'_spec (n : ℕ) :
(∑ k ∈ range n.succ, (n.choose (n - k) : ℚ) / (n - k + 1) * bernoulli' k) = 1 := by |
rw [sum_range_succ_comm, bernoulli'_def n, tsub_self, choose_zero_right, sub_self, zero_add,
div_one, cast_one, one_mul, sub_add, ← sum_sub_distrib, ← sub_eq_zero, sub_sub_cancel_left,
neg_eq_zero]
exact Finset.sum_eq_zero (fun x hx => by rw [choose_symm (le_of_lt (mem_range.1 hx)), sub_self])
| [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k",
" ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1",
" ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0",
" ↑(n.choose x) / (↑n - ↑... | [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k"
] |
import Mathlib.Algebra.Ring.Defs
import Mathlib.Algebra.Group.Ext
local macro:max "local_hAdd[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HAdd.hAdd : $type → $type → $type))
local macro:max "local_hMul[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HMul.hMul : $type → $typ... | Mathlib/Algebra/Ring/Ext.lean | 195 | 201 | theorem toNonUnitalNonAssocSemiring_injective :
Function.Injective (@toNonUnitalNonAssocSemiring R) := by |
intro _ _ h
-- Use above extensionality lemma to prove injectivity by showing that `h_add` and `h_mul` hold.
ext x y
· exact congrArg (·.toAdd.add x y) h
· exact congrArg (·.toMul.mul x y) h
| [
" inst₁ = inst₂",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" inst₁ = inst₂",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... |
import Mathlib.Topology.ContinuousFunction.Basic
#align_import topology.compact_open from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Set Filter TopologicalSpace
open scoped Topology
namespace ContinuousMap
section CompactOpen
variable {α X Y Z T : Type*}
variable [Topologica... | Mathlib/Topology/CompactOpen.lean | 354 | 354 | theorem image_coev {y : Y} (s : Set X) : coev X Y y '' s = {y} ×ˢ s := by | simp
| [
" 𝓝 f = ⨅ K, ⨅ (_ : IsCompact K), ⨅ U, ⨅ (_ : IsOpen U), ⨅ (_ : MapsTo (⇑f) K U), 𝓟 {g | MapsTo (⇑g) K U}",
" Tendsto f l (𝓝 g) ↔\n ∀ (K : Set Y), IsCompact K → ∀ (U : Set Z), IsOpen U → MapsTo (⇑g) K U → ∀ᶠ (a : α) in l, MapsTo (⇑(f a)) K U",
" ⇑(coev X Y y) '' s = {y} ×ˢ s"
] | [
" 𝓝 f = ⨅ K, ⨅ (_ : IsCompact K), ⨅ U, ⨅ (_ : IsOpen U), ⨅ (_ : MapsTo (⇑f) K U), 𝓟 {g | MapsTo (⇑g) K U}",
" Tendsto f l (𝓝 g) ↔\n ∀ (K : Set Y), IsCompact K → ∀ (U : Set Z), IsOpen U → MapsTo (⇑g) K U → ∀ᶠ (a : α) in l, MapsTo (⇑(f a)) K U"
] |
import Mathlib.Algebra.Polynomial.Expand
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.FieldTheory.Minpoly.Field
import Mathlib.RingTheory.PowerBasis
#align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
... | Mathlib/FieldTheory/Separable.lean | 82 | 83 | theorem separable_C (r : R) : (C r).Separable ↔ IsUnit r := by |
rw [separable_def, derivative_C, isCoprime_zero_right, isUnit_C]
| [
" ¬Separable 0",
" False",
" f.Separable",
" (X + C a).Separable",
" IsCoprime (X + C a) 1",
" X.Separable",
" IsCoprime X 1",
" (C r).Separable ↔ IsUnit r"
] | [
" ¬Separable 0",
" False",
" f.Separable",
" (X + C a).Separable",
" IsCoprime (X + C a) 1",
" X.Separable",
" IsCoprime X 1"
] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Ideal.Operations
namespace Submodule
open Pointwise
variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M]
variable {N N₁ N₂ P P₁ P₂ : Submodule R M}
def colon (N P : Submodule R M) : Ideal R :=
annihilator (P.map N.mkQ)
#align ... | Mathlib/RingTheory/Ideal/Colon.lean | 86 | 87 | theorem _root_.Ideal.annihilator_quotient {I : Ideal R} : Module.annihilator R (R ⧸ I) = I := by |
rw [Submodule.annihilator_quotient, colon_top]
| [
" colon I ⊤ = I",
" ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I",
" ⊥.colon N = N.annihilator",
" r ∈ N.colon (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N",
" (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N",
" (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N",
" r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I",
" Module.annihilator R ... | [
" colon I ⊤ = I",
" ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I",
" ⊥.colon N = N.annihilator",
" r ∈ N.colon (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N",
" (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N",
" (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N",
" r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I",
" Module.annihilator R ... |
import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.ldl from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
variable {𝕜 : Type*} [RCLike 𝕜]
variable {n : Type*} [LinearOrder n] [IsWellOrder n (· < ·)... | Mathlib/LinearAlgebra/Matrix/LDL.lean | 102 | 113 | theorem LDL.diag_eq_lowerInv_conj : LDL.diag hS = LDL.lowerInv hS * S * (LDL.lowerInv hS)ᴴ := by |
ext i j
by_cases hij : i = j
· simp only [diag, diagEntries, EuclideanSpace.inner_piLp_equiv_symm, star_star, hij,
diagonal_apply_eq, Matrix.mul_assoc]
rfl
· simp only [LDL.diag, hij, diagonal_apply_ne, Ne, not_false_iff, mul_mul_apply]
rw [conjTranspose, transpose_map, transpose_transpose, dotProd... | [
" lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ",
" lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j",
" gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j",
" Invertible (lowerInv hS)",
" Inv... | [
" lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ",
" lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j",
" gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j",
" Invertible (lowerInv hS)",
" Inv... |
import Mathlib.Algebra.GroupWithZero.Indicator
import Mathlib.Topology.ContinuousOn
import Mathlib.Topology.Instances.ENNReal
#align_import topology.semicontinuous from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal
open Set Function Filter
variable {α : Type*} [... | Mathlib/Topology/Semicontinuous.lean | 150 | 152 | theorem lowerSemicontinuousWithinAt_univ_iff :
LowerSemicontinuousWithinAt f univ x ↔ LowerSemicontinuousAt f x := by |
simp [LowerSemicontinuousWithinAt, LowerSemicontinuousAt, nhdsWithin_univ]
| [
" LowerSemicontinuousWithinAt f univ x ↔ LowerSemicontinuousAt f x"
] | [] |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : ℕ) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 57 | 57 | theorem dist_tri_right (n m : ℕ) : m ≤ n + dist n m := by | rw [add_comm]; apply dist_tri_left
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m ≤ n + n.dist m",
" m ≤ n.dist m + n"
] | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Data.Real.Sqrt
import Mathlib.Tactic.Polyrith
#align_import algebra.star.chsh from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
universe u
--@[nolint has_nonempty_instance] Porting note(#5171): linter not ported yet
structure Is... | Mathlib/Algebra/Star/CHSH.lean | 165 | 167 | theorem sqrt_two_inv_mul_self : (√2)⁻¹ * (√2)⁻¹ = (2⁻¹ : ℝ) := by |
rw [← mul_inv]
norm_num
| [
" (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) =\n 4 * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁)",
" A₀ * B₀ + A₀ * B₁ + A₁ * B₀ - A₁ * B₁ ≤ 2",
" 0 ≤ P",
" P = (1 / 4) • (P * P)",
" 4 * P = 4 • P",
" P = (1 / 4 * 4) • P",
" star P = P",
" star (2 - A₀... | [
" (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) =\n 4 * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁)",
" A₀ * B₀ + A₀ * B₁ + A₁ * B₀ - A₁ * B₁ ≤ 2",
" 0 ≤ P",
" P = (1 / 4) • (P * P)",
" 4 * P = 4 • P",
" P = (1 / 4 * 4) • P",
" star P = P",
" star (2 - A₀... |
import Mathlib.LinearAlgebra.DFinsupp
import Mathlib.LinearAlgebra.StdBasis
#align_import linear_algebra.finsupp_vector_space from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
noncomputable section
open Set LinearMap Submodule
open scoped Cardinal
universe u v w
namespace Finsupp
... | Mathlib/LinearAlgebra/FinsuppVectorSpace.lean | 167 | 170 | theorem equivFun_symm_stdBasis [Finite n] (b : Basis n R M) (i : n) :
b.equivFun.symm (LinearMap.stdBasis R (fun _ => R) i 1) = b i := by |
cases nonempty_fintype n
simp
| [
" ∑ x : n, single x (if i = x then a else 0) = single i a",
" b.equivFun.symm ((stdBasis R (fun x => R) i) 1) = b i"
] | [
" ∑ x : n, single x (if i = x then a else 0) = single i a"
] |
import Mathlib.Data.List.Basic
#align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {α β : Type*}
namespace List
attribute [simp] join
-- Porting note (#10618): simp can prove this
-- @... | Mathlib/Data/List/Join.lean | 60 | 62 | theorem join_filter_ne_nil [DecidablePred fun l : List α => l ≠ []] {L : List (List α)} :
join (L.filter fun l => l ≠ []) = L.join := by |
simp [join_filter_not_isEmpty, ← isEmpty_iff_eq_nil]
| [
" [l].join = l",
" (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []",
" (L₁ ++ L₂).join = L₁.join ++ L₂.join",
" ([] ++ L₂).join = [].join ++ L₂.join",
" (head✝ :: tail✝ ++ L₂).join = (head✝ :: tail✝).join ++ L₂.join",
" (L.concat l).join = L.join ++ l",
" (filter (fun l => !l.isEmpty) ([]... | [
" [l].join = l",
" (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []",
" (L₁ ++ L₂).join = L₁.join ++ L₂.join",
" ([] ++ L₂).join = [].join ++ L₂.join",
" (head✝ :: tail✝ ++ L₂).join = (head✝ :: tail✝).join ++ L₂.join",
" (L.concat l).join = L.join ++ l",
" (filter (fun l => !l.isEmpty) ([]... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
#align_import data.nat.choose... | Mathlib/Data/Nat/Choose/Sum.lean | 37 | 67 | theorem add_pow (h : Commute x y) (n : ℕ) :
(x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * choose n m := by |
let t : ℕ → ℕ → R := fun n m ↦ x ^ m * y ^ (n - m) * choose n m
change (x + y) ^ n = ∑ m ∈ range (n + 1), t n m
have h_first : ∀ n, t n 0 = y ^ n := fun n ↦ by
simp only [t, choose_zero_right, _root_.pow_zero, Nat.cast_one, mul_one, one_mul, tsub_zero]
have h_last : ∀ n, t n n.succ = 0 := fun n ↦ by
si... | [
" (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * ↑(n.choose m)",
" (x + y) ^ n = ∑ m ∈ range (n + 1), t n m",
" t n 0 = y ^ n",
" t n n.succ = 0",
" ∀ (n i : ℕ), i ∈ range n.succ → (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" ((fun m... | [] |
import Mathlib.Order.Interval.Finset.Fin
#align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe"
open Finset
open Fintype
namespace Fin
variable {α β : Type*} {n : ℕ}
theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ... | Mathlib/Data/Fintype/Fin.lean | 41 | 51 | theorem Ioi_succ (i : Fin n) : Ioi i.succ = (Ioi i).map (Fin.succEmb _) := by |
ext i
simp only [mem_filter, mem_Ioi, mem_map, mem_univ, true_and_iff, Function.Embedding.coeFn_mk,
exists_true_left]
constructor
· refine cases ?_ ?_ i
· rintro ⟨⟨⟩⟩
· intro i hi
exact ⟨i, succ_lt_succ_iff.mp hi, rfl⟩
· rintro ⟨i, hi, rfl⟩
simpa
| [
" map valEmbedding univ = Iio n",
" a✝ ∈ map valEmbedding univ ↔ a✝ ∈ Iio n",
" ↑(Ioi 0) = ↑(map (succEmb n) univ)",
" x✝ ∈ ↑(Ioi 0) ↔ x✝ ∈ ↑(map (succEmb n) univ)",
" ↑(Iio (last n)) = ↑(map castSuccEmb univ)",
" x✝ ∈ ↑(Iio (last n)) ↔ x✝ ∈ ↑(map castSuccEmb univ)",
" Ioi i.succ = map (succEmb n) (Ioi ... | [
" map valEmbedding univ = Iio n",
" a✝ ∈ map valEmbedding univ ↔ a✝ ∈ Iio n",
" ↑(Ioi 0) = ↑(map (succEmb n) univ)",
" x✝ ∈ ↑(Ioi 0) ↔ x✝ ∈ ↑(map (succEmb n) univ)",
" ↑(Iio (last n)) = ↑(map castSuccEmb univ)",
" x✝ ∈ ↑(Iio (last n)) ↔ x✝ ∈ ↑(map castSuccEmb univ)"
] |
import Mathlib.Algebra.Module.Submodule.EqLocus
import Mathlib.Algebra.Module.Submodule.RestrictScalars
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.LinearAlgebra.Basic
import Mathlib.Order.CompactlyGenerated.Basic
import Mathlib.Order.OmegaCompletePartialOrder
#align_... | Mathlib/LinearAlgebra/Span.lean | 147 | 150 | theorem span_insert_zero : span R (insert (0 : M) s) = span R s := by |
refine le_antisymm ?_ (Submodule.span_mono (Set.subset_insert 0 s))
rw [span_le, Set.insert_subset_iff]
exact ⟨by simp only [SetLike.mem_coe, Submodule.zero_mem], Submodule.subset_span⟩
| [
" ↑(span R ↑s) = ↑s",
" ↑(span R ↑s) ≤ ↑s",
" span R (insert 0 s) = span R s",
" span R (insert 0 s) ≤ span R s",
" 0 ∈ ↑(span R s) ∧ s ⊆ ↑(span R s)",
" 0 ∈ ↑(span R s)"
] | [
" ↑(span R ↑s) = ↑s",
" ↑(span R ↑s) ≤ ↑s"
] |
import Mathlib.Data.List.Infix
#align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ)
namespace List
def rdrop : List α :=
l.take (l.leng... | Mathlib/Data/List/DropRight.lean | 131 | 133 | theorem rdropWhile_prefix : l.rdropWhile p <+: l := by |
rw [← reverse_suffix, rdropWhile, reverse_reverse]
exact dropWhile_suffix _
| [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... | [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... |
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential
import Mathlib.Geometry.Manifold.ContMDiffMap
#align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle
open sc... | Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean | 571 | 599 | theorem tangentMap_tangentBundle_pure (p : TangentBundle I M) :
tangentMap I I.tangent (zeroSection E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩ := by |
rcases p with ⟨x, v⟩
have N : I.symm ⁻¹' (chartAt H x).target ∈ 𝓝 (I ((chartAt H x) x)) := by
apply IsOpen.mem_nhds
· apply (PartialHomeomorph.open_target _).preimage I.continuous_invFun
· simp only [mfld_simps]
have A : MDifferentiableAt I I.tangent (fun x => @TotalSpace.mk M E (TangentSpace I) x 0... | [
" tangentMap I I.tangent (zeroSection E (TangentSpace I)) p =\n { proj := { proj := p.proj, snd := 0 }, snd := (p.snd, 0) }",
" tangentMap I I.tangent (zeroSection E (TangentSpace I)) { proj := x, snd := v } =\n { proj := { proj := { proj := x, snd := v }.proj, snd := 0 }, snd := ({ proj := x, snd := v }.sn... | [] |
import Mathlib.Algebra.BigOperators.Option
import Mathlib.Analysis.BoxIntegral.Box.Basic
import Mathlib.Data.Set.Pairwise.Lattice
#align_import analysis.box_integral.partition.basic from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219"
open Set Finset Function
open scoped Classical
open ... | Mathlib/Analysis/BoxIntegral/Partition/Basic.lean | 108 | 110 | theorem injective_boxes : Function.Injective (boxes : Prepartition I → Finset (Box ι)) := by |
rintro ⟨s₁, h₁, h₁'⟩ ⟨s₂, h₂, h₂'⟩ (rfl : s₁ = s₂)
rfl
| [
" Injective boxes",
" { boxes := s₁, le_of_mem' := h₁, pairwiseDisjoint := h₁' } =\n { boxes := s₁, le_of_mem' := h₂, pairwiseDisjoint := h₂' }"
] | [] |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 72 | 74 | theorem hermite_one : hermite 1 = X := by |
rw [hermite_succ, hermite_zero]
simp only [map_one, mul_one, derivative_one, sub_zero]
| [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X"
] | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1"
] |
import Mathlib.Algebra.MvPolynomial.Counit
import Mathlib.Algebra.MvPolynomial.Invertible
import Mathlib.RingTheory.WittVector.Defs
#align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
noncomputable section
open MvPolynomial Function
variable... | Mathlib/RingTheory/WittVector/Basic.lean | 105 | 105 | theorem one : mapFun f (1 : 𝕎 R) = 1 := by | map_fun_tac
| [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0",
" mapFun (⇑f) 1 = 1"
] | [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Data.Tree.Basic
import Mathlib.Logic.Basic
import Mathlib.Tactic.NormNum.Core
import Mathlib.Util.SynthesizeUsing
import Mathlib.Util.Qq
open Lean Parser Tactic Mathlib Meta NormNum Qq
initialize registerTraceClass `CancelDen... | Mathlib/Tactic/CancelDenoms/Core.lean | 70 | 71 | theorem inv_subst {α} [Field α] {n k e : α} (h2 : e ≠ 0) (h3 : n * e = k) :
k * (e ⁻¹) = n := by | rw [← div_eq_mul_inv, ← h3, mul_div_cancel_right₀ _ h2]
| [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2",
" k * e⁻¹ = n"
] | [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2"
] |
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.LinearAlgebra.AffineSpace.Ordered
import Mathlib.Topology.ContinuousFunction.Basic
import Mathlib.Topology.GDelta
import Mathlib.Analysis.NormedSpace.FunctionSeries
import Mathlib.Analysis.SpecificLimits.Basic
#align_import topology.urysohns_lemma from "lea... | Mathlib/Topology/UrysohnsLemma.lean | 199 | 207 | theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU P} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
c₂.approx n₂ x ≤ c₁.approx n₁ x := by |
by_cases hx : x ∈ c₁.U
· calc
approx n₂ c₂ x = 0 := approx_of_mem_C _ _ (h hx)
_ ≤ approx n₁ c₁ x := approx_nonneg _ _ _
· calc
approx n₂ c₂ x ≤ 1 := approx_le_one _ _ _
_ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
| [
" approx n c x = 0",
" approx 0 c x = 0",
" approx (n + 1) c x = 0",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 0",
" x ∈ c.left.C",
" approx n c x = 1",
" approx 0 c x = 1",
" approx (n + 1) c x = 1",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 1",
" x ∉ c.left.U",
" 0 ... | [
" approx n c x = 0",
" approx 0 c x = 0",
" approx (n + 1) c x = 0",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 0",
" x ∈ c.left.C",
" approx n c x = 1",
" approx 0 c x = 1",
" approx (n + 1) c x = 1",
" midpoint ℝ (approx n c.left x) (approx n c.right x) = 1",
" x ∉ c.left.U",
" 0 ... |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 157 | 158 | theorem sameCycle_pow_left {n : ℕ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y := by |
rw [← zpow_natCast, sameCycle_zpow_left]
| [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z",
" SameCycle 1 x y ↔ x = y",
" (∃ b, (f⁻¹ ^ (Equiv.symm (Equiv.neg ℤ)) b) x = y) ↔ f.SameCycle x y",
" ((g * f * g⁻¹) ^ i) x = y ↔ (f ^ i) (g⁻¹ x) = g⁻¹ y",
" f.SameCycle x y → (g * f * g⁻¹).SameCycle (g x) (g y)",
" f x = x ↔ f y = y",
... | [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z",
" SameCycle 1 x y ↔ x = y",
" (∃ b, (f⁻¹ ^ (Equiv.symm (Equiv.neg ℤ)) b) x = y) ↔ f.SameCycle x y",
" ((g * f * g⁻¹) ^ i) x = y ↔ (f ^ i) (g⁻¹ x) = g⁻¹ y",
" f.SameCycle x y → (g * f * g⁻¹).SameCycle (g x) (g y)",
" f x = x ↔ f y = y",
... |
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import ring_theory.graded_algebra.homogeneous_localization from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
noncomputable section
open DirectSum Pointwise
open DirectSum SetLike
var... | Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean | 109 | 115 | theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
(hden : (c1.den : A) = c2.den) : c1 = c2 := by |
rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
rcases c2 with ⟨i2, ⟨n2, hn2⟩, ⟨d2, hd2⟩, h2⟩
dsimp only [Subtype.coe_mk] at *
subst hdeg hnum hden
congr
| [
" c1 = c2",
" { deg := i1, num := ⟨n1, hn1⟩, den := ⟨d1, hd1⟩, den_mem := h1 } = c2",
" { deg := i1, num := ⟨n1, hn1⟩, den := ⟨d1, hd1⟩, den_mem := h1 } =\n { deg := i2, num := ⟨n2, hn2⟩, den := ⟨d2, hd2⟩, den_mem := h2 }",
" { deg := i1, num := ⟨n1, hn1⟩, den := ⟨d1, hd1⟩, den_mem := h1 } =\n { deg := ... | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.Order.UpperLower.Basic
#align_import combinatorics.set_family.intersecting from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46"
open Finset
variable {α : Type*}
namespace Set
section SemilatticeInf
variable [SemilatticeInf α] [OrderBot ... | Mathlib/Combinatorics/SetFamily/Intersecting.lean | 99 | 107 | theorem intersecting_iff_eq_empty_of_subsingleton [Subsingleton α] (s : Set α) :
s.Intersecting ↔ s = ∅ := by |
refine
subsingleton_of_subsingleton.intersecting.trans
⟨not_imp_comm.2 fun h => subsingleton_of_subsingleton.eq_singleton_of_mem ?_, ?_⟩
· obtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 h
rwa [Subsingleton.elim ⊥ a]
· rintro rfl
exact (Set.singleton_nonempty _).ne_empty.symm
| [
" {a}.Intersecting ↔ a ≠ ⊥",
" (insert a s).Intersecting",
" ¬Disjoint c c",
" ¬Disjoint b c",
" s.Intersecting ↔ (s.Pairwise fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}",
" s ≠ {⊥}",
" False",
" s.Intersecting ↔ s = ∅",
" ⊥ ∈ s",
" s = ∅ → s ≠ {⊥}",
" ∅ ≠ {⊥}"
] | [
" {a}.Intersecting ↔ a ≠ ⊥",
" (insert a s).Intersecting",
" ¬Disjoint c c",
" ¬Disjoint b c",
" s.Intersecting ↔ (s.Pairwise fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}",
" s ≠ {⊥}",
" False"
] |
import Mathlib.Analysis.NormedSpace.Star.GelfandDuality
import Mathlib.Topology.Algebra.StarSubalgebra
#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
open scoped Pointwise ENNReal NNReal ComplexOrder
open Weak... | Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus.lean | 179 | 191 | theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A))
{x : A} (h : IsUnit x) (hxS : x ∈ S) : ↑h.unit⁻¹ ∈ S := by |
have hx := h.star.mul h
suffices this : (↑hx.unit⁻¹ : A) ∈ S by
rw [← one_mul (↑h.unit⁻¹ : A), ← hx.unit.inv_mul, mul_assoc, IsUnit.unit_spec, mul_assoc,
h.mul_val_inv, mul_one]
exact mul_mem this (star_mem hxS)
refine le_of_isClosed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) ?_
haveI := (IsSelfAdj... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖",
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * ... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖",
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * ... |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : Mode... | Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 119 | 122 | theorem ContMDiff.comp {g : M' → M''} (hg : ContMDiff I' I'' n g) (hf : ContMDiff I I' n f) :
ContMDiff I I'' n (g ∘ f) := by |
rw [← contMDiffOn_univ] at hf hg ⊢
exact hg.comp hf subset_preimage_univ
| [
" ContMDiffWithinAt I I'' n (g ∘ f) s x",
" ContinuousWithinAt (g ∘ f) s x ∧\n ContDiffWithinAt 𝕜 n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑(extChartAt I x).symm)\n (↑(extChartAt I x).symm ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)",
" ContDiffWithinAt 𝕜 n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑... | [
" ContMDiffWithinAt I I'' n (g ∘ f) s x",
" ContinuousWithinAt (g ∘ f) s x ∧\n ContDiffWithinAt 𝕜 n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑(extChartAt I x).symm)\n (↑(extChartAt I x).symm ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)",
" ContDiffWithinAt 𝕜 n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑... |
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
import Mathlib.Topology.QuasiSeparated
#align_import algebraic_geometry.morphisms.quasi_separated from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc"
noncomputable section
open CategoryTheory CategoryTheory.Limits Opposite Topolog... | Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean | 57 | 83 | theorem quasiSeparatedSpace_iff_affine (X : Scheme) :
QuasiSeparatedSpace X.carrier ↔ ∀ U V : X.affineOpens, IsCompact (U ∩ V : Set X.carrier) := by |
rw [quasiSeparatedSpace_iff]
constructor
· intro H U V; exact H U V U.1.2 U.2.isCompact V.1.2 V.2.isCompact
· intro H
suffices
∀ (U : Opens X.carrier) (_ : IsCompact U.1) (V : Opens X.carrier) (_ : IsCompact V.1),
IsCompact (U ⊓ V).1
by intro U V hU hU' hV hV'; exact this ⟨U, hU⟩ hU' ⟨V... | [
" QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U →... | [] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.NormedSpace.HomeomorphBall
#align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
noncomputable section
open RCLike Real ... | Mathlib/Analysis/InnerProductSpace/Calculus.lean | 328 | 330 | theorem differentiable_euclidean : Differentiable 𝕜 f ↔ ∀ i, Differentiable 𝕜 fun x => f x i := by |
rw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiable_iff, differentiable_pi]
rfl
| [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... | [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... |
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.Data.Set.Finite
import Mathlib.Data.Set.Subsingleton
import Mathlib.Topology.Category.TopCat.Limits.Konig
import Mathlib.Tactic.AdaptationNote
#align_import category_theory.cofiltered_system from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e... | Mathlib/CategoryTheory/CofilteredSystem.lean | 158 | 163 | theorem IsMittagLeffler.subset_image_eventualRange (h : F.IsMittagLeffler) (f : j ⟶ i) :
F.eventualRange i ⊆ F.map f '' F.eventualRange j := by |
obtain ⟨k, g, hg⟩ := F.isMittagLeffler_iff_eventualRange.1 h j
rw [hg]; intro x hx
obtain ⟨x, rfl⟩ := F.mem_eventualRange_iff.1 hx (g ≫ f)
exact ⟨_, ⟨x, rfl⟩, by rw [map_comp_apply]⟩
| [
" F.eventualRange i ⊆ F.map f '' F.eventualRange j",
" F.eventualRange i ⊆ F.map f '' range (F.map g)",
" x ∈ F.map f '' range (F.map g)",
" F.map (g ≫ f) x ∈ F.map f '' range (F.map g)",
" F.map f (F.map g x) = F.map (g ≫ f) x"
] | [] |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α}
namespace Finset
def nonMemberSubfamily (a : α) (𝒜 : ... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 126 | 129 | theorem nonMemberSubfamily_memberSubfamily :
(𝒜.memberSubfamily a).nonMemberSubfamily a = 𝒜.memberSubfamily a := by |
ext
simp
| [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s",
" s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" a ∈ insert a s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s",
" insert a (s.erase a) ∈ 𝒜... | [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s",
" s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" a ∈ insert a s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s",
" insert a (s.erase a) ∈ 𝒜... |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped... | Mathlib/Topology/Separation.lean | 178 | 179 | theorem union_left : SeparatedNhds s u → SeparatedNhds t u → SeparatedNhds (s ∪ t) u := by |
simpa only [separatedNhds_iff_disjoint, nhdsSet_union, disjoint_sup_left] using And.intro
| [
" SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t)",
" SeparatedNhds s u → SeparatedNhds t u → SeparatedNhds (s ∪ t) u"
] | [
" SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t)"
] |
import Mathlib.CategoryTheory.Limits.Preserves.Finite
import Mathlib.CategoryTheory.Sites.Canonical
import Mathlib.CategoryTheory.Sites.Coherent.Basic
import Mathlib.CategoryTheory.Sites.Preserves
universe v u w
namespace CategoryTheory
open Limits
variable {C : Type u} [Category.{v} C]
variable [FinitaryPreExten... | Mathlib/CategoryTheory/Sites/Coherent/ExtensiveSheaves.lean | 115 | 132 | theorem Presheaf.isSheaf_iff_preservesFiniteProducts {D : Type*} [Category D]
[FinitaryExtensive C] (F : Cᵒᵖ ⥤ D) :
IsSheaf (extensiveTopology C) F ↔ Nonempty (PreservesFiniteProducts F) := by |
constructor
· intro h
rw [IsSheaf] at h
refine ⟨⟨fun J _ ↦ ⟨fun {K} ↦ ⟨fun {c} hc ↦ ?_⟩⟩⟩⟩
apply coyonedaJointlyReflectsLimits
intro ⟨E⟩
specialize h E
rw [Presieve.isSheaf_iff_preservesFiniteProducts] at h
have : PreservesLimit K (F.comp (coyoneda.obj ⟨E⟩)) := (h.some.preserves J).pres... | [
" ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g",
" ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g",
" HasPullback f✝ g✝",
" HasPullback f✝ (w✝ i✝)",
" IsSheafFor F S",
" IsSheafFor F (ofArrows Z π)",
" IsSheaf (ext... | [
" ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g",
" ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g",
" HasPullback f✝ g✝",
" HasPullback f✝ (w✝ i✝)",
" IsSheafFor F S",
" IsSheafFor F (ofArrows Z π)",
" IsSheaf (ext... |
import Mathlib.Data.Nat.Cast.WithTop
import Mathlib.FieldTheory.IsAlgClosed.Basic
import Mathlib.RingTheory.WittVector.DiscreteValuationRing
#align_import ring_theory.witt_vector.frobenius_fraction_field from "leanprover-community/mathlib"@"cead93130da7100f8a9fe22ee210f7636a91168f"
noncomputable section
namespac... | Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean | 79 | 95 | theorem succNthDefiningPoly_degree [IsDomain k] (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k)
(ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) :
(succNthDefiningPoly p n a₁ a₂ bs).degree = p := by |
have : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1))).degree = (p : WithBot ℕ) := by
rw [degree_mul, degree_C]
· simp only [Nat.cast_withBot, add_zero, degree_X, degree_pow, Nat.smul_one_eq_cast]
· exact pow_ne_zero _ ha₁
have : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1)) - X * C (a₂.coeff 0 ^ p ^ (n + 1))).degree =... | [
" (succNthDefiningPoly p n a₁ a₂ bs).degree = ↑p",
" (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1))).degree = ↑p",
" (X ^ p).degree + 0 = ↑p",
" a₁.coeff 0 ^ p ^ (n + 1) ≠ 0",
" (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1)) - X * C (a₂.coeff 0 ^ p ^ (n + 1))).degree = ↑p",
" (X * C (a₂.coeff 0 ^ p ^ (n + 1))).degree < (X ... | [] |
import Mathlib.Data.Set.Subsingleton
import Mathlib.Order.WithBot
#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
universe u v
open Function Set
namespace Set
variable {α β γ : Type*} {ι ι' : Sort*}
| Mathlib/Data/Set/Image.lean | 629 | 644 | theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s := by |
ext t
simp_rw [mem_union, mem_image, mem_powerset_iff]
constructor
· intro h
by_cases hs : a ∈ t
· right
refine ⟨t \ {a}, ?_, ?_⟩
· rw [diff_singleton_subset_iff]
assumption
· rw [insert_diff_singleton, insert_eq_of_mem hs]
· left
exact (subset_insert_iff_of_not_mem ... | [
" 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s",
" t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s ∪ insert a '' 𝒫 s",
" t ⊆ insert a s ↔ t ⊆ s ∨ ∃ x ⊆ s, insert a x = t",
" t ⊆ insert a s → t ⊆ s ∨ ∃ x ⊆ s, insert a x = t",
" t ⊆ s ∨ ∃ x ⊆ s, insert a x = t",
" ∃ x ⊆ s, insert a x = t",
" t \\ {a} ⊆ s",
" t ⊆ insert a s",
... | [] |
import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion
import Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
noncomputable section
open CategoryTheory CategoryTheory.Limits Opposite TopologicalSpace
universe ... | Mathlib/AlgebraicGeometry/Morphisms/Separated.lean | 49 | 52 | theorem isSeparated_eq_diagonal_isClosedImmersion :
@IsSeparated = MorphismProperty.diagonal @IsClosedImmersion := by |
ext
exact isSeparated_iff _
| [
" @IsSeparated = MorphismProperty.diagonal @IsClosedImmersion",
" IsSeparated x✝ ↔ MorphismProperty.diagonal (@IsClosedImmersion) x✝"
] | [] |
import Mathlib.Data.Set.Pointwise.SMul
#align_import algebra.add_torsor from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
VSub G P where
[nonempty : Nonempty P]
vsub_vadd' : ∀ p₁ p₂ : P, (p₁ ... | Mathlib/Algebra/AddTorsor.lean | 154 | 156 | theorem neg_vsub_eq_vsub_rev (p₁ p₂ : P) : -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁ := by |
refine neg_eq_of_add_eq_zero_right (vadd_right_cancel p₁ ?_)
rw [vsub_add_vsub_cancel, vsub_self]
| [
" g₁ = g₂",
" g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)",
" g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂",
" p -ᵥ p = 0",
" p₁ = p₂",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃",
" -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₁) +ᵥ p₁ = 0 +ᵥ p₁"
] | [
" g₁ = g₂",
" g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)",
" g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂",
" p -ᵥ p = 0",
" p₁ = p₂",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃"
] |
import Mathlib.Topology.Basic
#align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Filter Topology
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X}
{s t s₁ s₂ t₁ t₂ : Set X} {x : X}
| Mathlib/Topology/NhdsSet.lean | 35 | 38 | theorem nhdsSet_diagonal (X) [TopologicalSpace (X × X)] :
𝓝ˢ (diagonal X) = ⨆ (x : X), 𝓝 (x, x) := by |
rw [nhdsSet, ← range_diag, ← range_comp]
rfl
| [
" 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)",
" sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)"
] | [] |
import Mathlib.Tactic.TFAE
import Mathlib.Topology.ContinuousOn
#align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology List
variable {X Y Z α ι : Type*} {π : ι → Type*} [TopologicalSpace X] [TopologicalSpace Y]
[Topolo... | Mathlib/Topology/Inseparable.lean | 50 | 75 | theorem specializes_TFAE (x y : X) :
TFAE [x ⤳ y,
pure x ≤ 𝓝 y,
∀ s : Set X , IsOpen s → y ∈ s → x ∈ s,
∀ s : Set X , IsClosed s → x ∈ s → y ∈ s,
y ∈ closure ({ x } : Set X),
closure ({ y } : Set X) ⊆ closure { x },
ClusterPt y (pure x)] := by |
tfae_have 1 → 2
· exact (pure_le_nhds _).trans
tfae_have 2 → 3
· exact fun h s hso hy => h (hso.mem_nhds hy)
tfae_have 3 → 4
· exact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx
tfae_have 4 → 5
· exact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _)
tfae_have 6... | [
" [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)].TFAE",
" x ⤳ y → pure x ≤ 𝓝 y",
" pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s",
" (∀ (s : Set X), IsOpen s → y ∈ s ... | [] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
se... | Mathlib/Analysis/Complex/RealDeriv.lean | 123 | 125 | theorem HasDerivAt.complexToReal_fderiv {f : ℂ → ℂ} {f' x : ℂ} (h : HasDerivAt f f' x) :
HasFDerivAt f (f' • (1 : ℂ →L[ℝ] ℂ)) x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivAt.restrictScalars ℝ
| [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... | [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... |
import Mathlib.Data.ZMod.Quotient
#align_import group_theory.complement from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
open Set
open scoped Pointwise
namespace Subgroup
variable {G : Type*} [Group G] (H K : Subgroup G) (S T : Set G)
@[to_additive "`S` and `T` are complements if ... | Mathlib/GroupTheory/Complement.lean | 133 | 139 | theorem isComplement_singleton_right {g : G} : IsComplement S {g} ↔ S = univ := by |
refine
⟨fun h => top_le_iff.mp fun x _ => ?_, fun h => h ▸ isComplement_univ_singleton⟩
obtain ⟨y, hy⟩ := h.2 (x * g)
conv_rhs at hy => rw [← show y.2.1 = g from y.2.2]
rw [← mul_right_cancel hy]
exact y.1.2
| [
" K.IsComplement' H",
" Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)",
" Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)",
" (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ",
" IsComplement {g} S ↔ S = univ",
" x ∈ S",
" IsComplement S {g} ↔ S = univ",
"G : Type u_1\ninst✝ : Group G\nH K ... | [
" K.IsComplement' H",
" Function.Bijective ((fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ)",
" Function.Bijective (⇑ψ ∘ fun x => ↑x.1 * ↑x.2)",
" (⇑ψ ∘ fun x => ↑x.1 * ↑x.2) = (fun x => ↑x.1 * ↑x.2) ∘ ⇑ϕ",
" IsComplement {g} S ↔ S = univ",
" x ∈ S"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Dart
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.ZMod.Parity
#align_import combinatorics.simple_graph.degree_sum from "leanprover-community/mathlib"@"90659cbe25e59ec302e2fb92b00e9732160cc620"
open Finset
nam... | Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean | 67 | 70 | theorem dart_fst_fiber_card_eq_degree [DecidableEq V] (v : V) :
(univ.filter fun d : G.Dart => d.fst = v).card = G.degree v := by |
simpa only [dart_fst_fiber, Finset.card_univ, card_neighborSet_eq_degree] using
card_image_of_injective univ (G.dartOfNeighborSet_injective v)
| [
" filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ",
" d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ",
" d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d",
" d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d... | [
" filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ",
" d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ",
" d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d",
" d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d... |
import Mathlib.FieldTheory.Normal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.Integral
#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
universe u v w
open scoped Classical Polynomial
open Polynomial
vari... | Mathlib/FieldTheory/IsAlgClosed/Basic.lean | 89 | 96 | theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z, z ^ n = x := by |
have : degree (X ^ n - C x) ≠ 0 := by
rw [degree_X_pow_sub_C hn x]
exact ne_of_gt (WithBot.coe_lt_coe.2 hn)
obtain ⟨z, hz⟩ := exists_root (X ^ n - C x) this
use z
simp only [eval_C, eval_X, eval_pow, eval_sub, IsRoot.def] at hz
exact sub_eq_zero.1 hz
| [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x"
] | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)"
] |
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.CharP.Algebra
import Mathlib.Data.Nat.Prime
#align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u
variable (R : Type u)
section Semiring
variable [Semiring R]
class inductive Ex... | Mathlib/Algebra/CharP/ExpChar.lean | 148 | 150 | theorem expChar_pos (q : ℕ) [ExpChar R q] : 0 < q := by |
rcases expChar_is_prime_or_one R q with h | rfl
exacts [Nat.Prime.pos h, Nat.one_pos]
| [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1",
" p = q ↔ p.Prime",
" p = 1 ↔ p.Prime",
" 0 = 1 ↔ Nat.Prime 0",
" p = 0",
" CharZero R",
" q = 1 ↔ p = 0",
" q = 1 → p = 0",... | [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1",
" p = q ↔ p.Prime",
" p = 1 ↔ p.Prime",
" 0 = 1 ↔ Nat.Prime 0",
" p = 0",
" CharZero R",
" q = 1 ↔ p = 0",
" q = 1 → p = 0",... |
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 | 125 | 127 | theorem map_rootsOfUnity (f : Mˣ →* Nˣ) (k : ℕ+) : (rootsOfUnity k M).map f ≤ rootsOfUnity k N := by |
rintro _ ⟨ζ, h, rfl⟩
simp_all only [← map_pow, mem_rootsOfUnity, SetLike.mem_coe, MonoidHom.map_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.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 298 | 299 | theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhammer R n).eval 0 = 0 := by |
simp [descPochhammer_eval_zero, h]
| [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.GroupTheory.GroupAction.Pi
open Function Set
structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where
protected... | Mathlib/Algebra/AddConstMap/Basic.lean | 129 | 131 | theorem map_const_add [AddCommSemigroup G] [Add H] [AddConstMapClass F G H a b]
(f : F) (x : G) : f (a + x) = f x + b := by |
rw [add_comm, map_add_const]
| [
" f (x + n • a) = f x + n • b",
" f (x + ↑n) = f x + n • b",
" f (x + ↑n) = f x + ↑n",
" f a = f 0 + b",
" f (n • a) = f 0 + n • b",
" f ↑n = f 0 + n • b",
" f ↑n = f 0 + ↑n",
" f (a + x) = f x + b"
] | [
" f (x + n • a) = f x + n • b",
" f (x + ↑n) = f x + n • b",
" f (x + ↑n) = f x + ↑n",
" f a = f 0 + b",
" f (n • a) = f 0 + n • b",
" f ↑n = f 0 + n • b",
" f ↑n = f 0 + ↑n"
] |
import Mathlib.Data.List.Basic
#align_import data.list.palindrome from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
variable {α β : Type*}
namespace List
inductive Palindrome : List α → Prop
| nil : Palindrome []
| singleton : ∀ x, Palindrome [x]
| cons_concat : ∀ (x) {l}, Pa... | Mathlib/Data/List/Palindrome.lean | 55 | 61 | theorem of_reverse_eq {l : List α} : reverse l = l → Palindrome l := by |
refine bidirectionalRecOn l (fun _ => Palindrome.nil) (fun a _ => Palindrome.singleton a) ?_
intro x l y hp hr
rw [reverse_cons, reverse_append] at hr
rw [head_eq_of_cons_eq hr]
have : Palindrome l := hp (append_inj_left' (tail_eq_of_cons_eq hr) rfl)
exact Palindrome.cons_concat x this
| [
" l.reverse = l",
" [].reverse = []",
" [x✝].reverse = [x✝]",
" (x✝ :: (l✝ ++ [x✝])).reverse = x✝ :: (l✝ ++ [x✝])",
" l.reverse = l → l.Palindrome",
" ∀ (a : α) (l : List α) (b : α),\n (l.reverse = l → l.Palindrome) → (a :: (l ++ [b])).reverse = a :: (l ++ [b]) → (a :: (l ++ [b])).Palindrome",
" (x :... | [
" l.reverse = l",
" [].reverse = []",
" [x✝].reverse = [x✝]",
" (x✝ :: (l✝ ++ [x✝])).reverse = x✝ :: (l✝ ++ [x✝])"
] |
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.RingTheory.Localization.FractionRing
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable section
namespace Polynomial
universe u v w z
variable {R : Type u} {S : Ty... | Mathlib/Algebra/Polynomial/Roots.lean | 100 | 105 | theorem count_roots [DecidableEq R] (p : R[X]) : p.roots.count a = rootMultiplicity a p := by |
classical
by_cases hp : p = 0
· simp [hp]
rw [roots_def, dif_neg hp]
exact (Classical.choose_spec (exists_multiset_roots hp)).2 a
| [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯",
" ↑(Multiset.card p.roots) ≤ p.degree",
" ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree",
" ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree",
" Multiset.card p.roots ≤ p.natDegree",
" (p - C a).degree = p.degree",
" (... | [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯",
" ↑(Multiset.card p.roots) ≤ p.degree",
" ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree",
" ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree",
" Multiset.card p.roots ≤ p.natDegree",
" (p - C a).degree = p.degree",
" (... |
import Mathlib.MeasureTheory.Group.Action
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Group.Pointwise
#align_import measure_theory.group.fundamental_domain from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
open scoped ENNReal Pointwise Topology NNRea... | Mathlib/MeasureTheory/Group/FundamentalDomain.lean | 649 | 651 | theorem fundamentalFrontier_smul [Group H] [MulAction H α] [SMulCommClass H G α] (g : H) :
fundamentalFrontier G (g • s) = g • fundamentalFrontier G s := by |
simp_rw [fundamentalFrontier, smul_set_inter, smul_set_iUnion, smul_comm g (_ : G) (_ : Set α)]
| [
" x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s",
" x ∈ fundamentalInterior G s ↔ x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s",
" fundamentalFrontier G (g • s) = g • fundamentalFrontier G s"
] | [
" x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s",
" x ∈ fundamentalInterior G s ↔ x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s"
] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 123 | 126 | theorem interedges_biUnion (s : Finset ι) (t : Finset κ) (f : ι → Finset α) (g : κ → Finset β) :
interedges r (s.biUnion f) (t.biUnion g) =
(s ×ˢ t).biUnion fun ab ↦ interedges r (f ab.1) (g ab.2) := by |
simp_rw [product_biUnion, interedges_biUnion_left, interedges_biUnion_right]
| [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
import Mathlib.Data.Rat.Cast.Defs
import Mathlib.Algebra.Field.Basic
#align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
namespace Rat
variable {α : Type*} [DivisionRing α]
-- Porting note: rewrote proof
@[simp]
| Mathlib/Data/Rat/Cast/Lemmas.lean | 28 | 32 | theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by |
cases' n with n
· simp
rw [cast_def, inv_natCast_num, inv_natCast_den, if_neg n.succ_ne_zero,
Int.sign_eq_one_of_pos (Nat.cast_pos.mpr n.succ_pos), Int.cast_one, one_div]
| [
" ↑(↑n)⁻¹ = (↑n)⁻¹",
" ↑(↑0)⁻¹ = (↑0)⁻¹",
" ↑(↑(n + 1))⁻¹ = (↑(n + 1))⁻¹"
] | [] |
import Mathlib.Data.Nat.Lattice
import Mathlib.Logic.Denumerable
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Hom.Basic
import Mathlib.Data.Set.Subsingleton
#align_import order.order_iso_nat from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
variable {α : Type*}
namespa... | Mathlib/Order/OrderIsoNat.lean | 99 | 101 | theorem not_wellFounded_of_decreasing_seq (f : ((· > ·) : ℕ → ℕ → Prop) ↪r r) : ¬WellFounded r := by |
rw [wellFounded_iff_no_descending_seq, not_isEmpty_iff]
exact ⟨f⟩
| [
" ∃ b, ¬Acc r b ∧ r b a",
" Acc r a",
" Acc r b",
" False",
" Acc r x ↔ IsEmpty { f // x ∈ Set.range ⇑f }",
" Acc r x → IsEmpty { f // x ∈ Set.range ⇑f }",
" IsEmpty { f // x ∈ Set.range ⇑f }",
" { f // x ∈ Set.range ⇑f } → False",
" IsEmpty { f // x ∈ Set.range ⇑f } → Acc r x",
" ∀ (x : { a // ¬A... | [
" ∃ b, ¬Acc r b ∧ r b a",
" Acc r a",
" Acc r b",
" False",
" Acc r x ↔ IsEmpty { f // x ∈ Set.range ⇑f }",
" Acc r x → IsEmpty { f // x ∈ Set.range ⇑f }",
" IsEmpty { f // x ∈ Set.range ⇑f }",
" { f // x ∈ Set.range ⇑f } → False",
" IsEmpty { f // x ∈ Set.range ⇑f } → Acc r x",
" ∀ (x : { a // ¬A... |
import Mathlib.Algebra.ContinuedFractions.Basic
import Mathlib.Algebra.GroupWithZero.Basic
#align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
section WithDivisionRing
variable {K : Type*}... | Mathlib/Algebra/ContinuedFractions/Translations.lean | 177 | 177 | theorem zeroth_convergent'_eq_h : g.convergents' 0 = g.h := by | simp [convergents']
| [
" ∃ conts, g.continuants n = conts ∧ conts.a = A",
" ∃ conts, g.continuants n = conts ∧ conts.b = B",
" g.convergents 0 = g.h",
" g.continuantsAux 2 = { a := gp.b * g.h + gp.a, b := gp.b }",
" g.continuants 1 = { a := gp.b * g.h + gp.a, b := gp.b }",
" g.numerators 1 = gp.b * g.h + gp.a",
" g.denominato... | [
" ∃ conts, g.continuants n = conts ∧ conts.a = A",
" ∃ conts, g.continuants n = conts ∧ conts.b = B",
" g.convergents 0 = g.h",
" g.continuantsAux 2 = { a := gp.b * g.h + gp.a, b := gp.b }",
" g.continuants 1 = { a := gp.b * g.h + gp.a, b := gp.b }",
" g.numerators 1 = gp.b * g.h + gp.a",
" g.denominato... |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMa... | Mathlib/Analysis/Calculus/FDeriv/Equiv.lean | 418 | 433 | theorem HasFDerivAt.of_local_left_inverse {f : E → F} {f' : E ≃L[𝕜] F} {g : F → E} {a : F}
(hg : ContinuousAt g a) (hf : HasFDerivAt f (f' : E →L[𝕜] F) (g a))
(hfg : ∀ᶠ y in 𝓝 a, f (g y) = y) : HasFDerivAt g (f'.symm : F →L[𝕜] E) a := by |
have : (fun x : F => g x - g a - f'.symm (x - a)) =O[𝓝 a]
fun x : F => f' (g x - g a) - (x - a) := by
refine ((f'.symm : F →L[𝕜] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl
simp
refine HasFDerivAtFilter.of_isLittleO <| this.trans_isLittleO ?_
clear this
refine ((hf.isLittleO.comp_tends... | [
" HasStrictFDerivAt g (↑f'.symm) a",
" (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)",
" ↑f'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)",
" (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[𝓝 (a, a)] fun p => p.1 - p.2",... | [
" HasStrictFDerivAt g (↑f'.symm) a",
" (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)",
" ↑f'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)",
" (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[𝓝 (a, a)] fun p => p.1 - p.2",... |
import Mathlib.NumberTheory.Padics.PadicNumbers
import Mathlib.RingTheory.DiscreteValuationRing.Basic
#align_import number_theory.padics.padic_integers from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Padic Metric LocalRing
noncomputable section
open scoped Classical
def Pad... | Mathlib/NumberTheory/Padics/PadicIntegers.lean | 343 | 353 | theorem exists_pow_neg_lt {ε : ℝ} (hε : 0 < ε) : ∃ k : ℕ, (p : ℝ) ^ (-(k : ℤ)) < ε := by |
obtain ⟨k, hk⟩ := exists_nat_gt ε⁻¹
use k
rw [← inv_lt_inv hε (_root_.zpow_pos_of_pos _ _)]
· rw [zpow_neg, inv_inv, zpow_natCast]
apply lt_of_lt_of_le hk
norm_cast
apply le_of_lt
convert Nat.lt_pow_self _ _ using 1
exact hp.1.one_lt
· exact mod_cast hp.1.pos
| [
" ∃ k, ↑p ^ (-↑k) < ε",
" ↑p ^ (-↑k) < ε",
" ε⁻¹ < (↑p ^ (-↑k))⁻¹",
" ε⁻¹ < ↑p ^ k",
" ↑k ≤ ↑p ^ k",
" k ≤ p ^ k",
" k < p ^ k",
" 1 < p",
" 0 < ↑p"
] | [] |
import Mathlib.SetTheory.Ordinal.Arithmetic
#align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
noncomputable section
open Function Cardinal Set Equiv Order
open scoped Classical
open Cardinal Ordinal
universe u v w
namespace Ordinal
in... | Mathlib/SetTheory/Ordinal/Exponential.lean | 83 | 91 | theorem one_opow (a : Ordinal) : (1 : Ordinal) ^ a = 1 := by |
induction a using limitRecOn with
| H₁ => simp only [opow_zero]
| H₂ _ ih =>
simp only [opow_succ, ih, mul_one]
| H₃ b l IH =>
refine eq_of_forall_ge_iff fun c => ?_
rw [opow_le_of_limit Ordinal.one_ne_zero l]
exact ⟨fun H => by simpa only [opow_zero] using H 0 l.pos, fun H b' h => by rwa [IH _... | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup",
" a ^ b ≤ c ↔ ∀ b' < b, a ^... | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup",
" a ^ b ≤ c ↔ ∀ b' < b, a ^... |
import Mathlib.Topology.FiberBundle.Constructions
import Mathlib.Topology.VectorBundle.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
#align_import topology.vector_bundle.constructions from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Cl... | Mathlib/Topology/VectorBundle/Constructions.lean | 96 | 106 | theorem coordChangeL_prod [e₁.IsLinear 𝕜] [e₁'.IsLinear 𝕜] [e₂.IsLinear 𝕜] [e₂'.IsLinear 𝕜] ⦃b⦄
(hb : b ∈ (e₁.prod e₂).baseSet ∩ (e₁'.prod e₂').baseSet) :
((e₁.prod e₂).coordChangeL 𝕜 (e₁'.prod e₂') b : F₁ × F₂ →L[𝕜] F₁ × F₂) =
(e₁.coordChangeL 𝕜 e₁' b : F₁ →L[𝕜] F₁).prodMap (e₂.coordChangeL 𝕜 e₂... |
rw [ContinuousLinearMap.ext_iff, ContinuousLinearMap.coe_prodMap']
rintro ⟨v₁, v₂⟩
show
(e₁.prod e₂).coordChangeL 𝕜 (e₁'.prod e₂') b (v₁, v₂) =
(e₁.coordChangeL 𝕜 e₁' b v₁, e₂.coordChangeL 𝕜 e₂' b v₂)
rw [e₁.coordChangeL_apply e₁', e₂.coordChangeL_apply e₂', (e₁.prod e₂).coordChangeL_apply']
exa... | [
" ↑(coordChangeL 𝕜 (e₁.prod e₂) (e₁'.prod e₂') b) = (↑(coordChangeL 𝕜 e₁ e₁' b)).prodMap ↑(coordChangeL 𝕜 e₂ e₂' b)",
" ∀ (x : F₁ × F₂),\n ↑(coordChangeL 𝕜 (e₁.prod e₂) (e₁'.prod e₂') b) x =\n Prod.map (⇑↑(coordChangeL 𝕜 e₁ e₁' b)) (⇑↑(coordChangeL 𝕜 e₂ e₂' b)) x",
" ↑(coordChangeL 𝕜 (e₁.prod e₂)... | [] |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904"
open Function OrderDual
variable {ι α β : Type*} {π : ι → Type*}
def symmDiff [Sup α] [SDiff α] (a b : α) : α :=
a \ b ⊔ b \ a
#ali... | Mathlib/Order/SymmDiff.lean | 149 | 150 | theorem symmDiff_le_iff {a b c : α} : a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c := by |
simp_rw [symmDiff, sup_le_iff, sdiff_le_iff]
| [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a",
" ⊥ ∆ a = a",
" a ∆ b = ⊥ ↔ a = b",
" a ∆ b = b \\ a",
" a ∆ b = a \\ b",
" a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c"
] | [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a",
" ⊥ ∆ a = a",
" a ∆ b = ⊥ ↔ a = b",
" a ∆ b = b \\ a",
" a ∆ b = a \\ b"
] |
import Mathlib.Algebra.Module.Defs
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.LinearAlgebra.TensorProduct.Tower
#align_import algebra.module.projective from "leanprover-community/mathlib"@"405ea5cee7a7070ff8fb8dcb4cfb003532e34bce"
universe u v
open LinearMap ... | Mathlib/Algebra/Module/Projective.lean | 92 | 94 | theorem projective_def' :
Projective R P ↔ ∃ s : P →ₗ[R] P →₀ R, Finsupp.total P P R id ∘ₗ s = .id := by |
simp_rw [projective_def, DFunLike.ext_iff, Function.LeftInverse, comp_apply, id_apply]
| [
" Projective R P ↔ ∃ s, Finsupp.total P P R id ∘ₗ s = LinearMap.id"
] | [] |
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.Module.LocalizedModule
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import ring_theory.localization.module from "leanprover-community/mathlib"@"2e59a6de168f95d16b16d217b808a36290398c0a"
open nonZ... | Mathlib/RingTheory/Localization/Module.lean | 73 | 76 | theorem LinearIndependent.localization {ι : Type*} {b : ι → M} (hli : LinearIndependent R b) :
LinearIndependent Rₛ b := by |
have := isLocalizedModule_id S M Rₛ
exact hli.of_isLocalizedModule Rₛ S .id
| [
" x ∈ span Rₛ (⇑f '' v)",
" f (m, s).1 ∈ ↑(span R (⇑f '' v))",
" (↑R f) (m, s).1 ∈ ↑(map (↑R f) ⊤)",
" LinearIndependent Rₛ (⇑f ∘ v)",
" ∀ (s : Finset ι) (g : ι → Rₛ), ∑ i ∈ s, g i • (⇑f ∘ v) i = 0 → ∀ i ∈ s, g i = 0",
" g i = 0",
" f (∑ i ∈ t, g' i • v i) = 0",
" ∑ x ∈ t, f (g' x • v x) = ∑ x ∈ t, ↑a... | [
" x ∈ span Rₛ (⇑f '' v)",
" f (m, s).1 ∈ ↑(span R (⇑f '' v))",
" (↑R f) (m, s).1 ∈ ↑(map (↑R f) ⊤)",
" LinearIndependent Rₛ (⇑f ∘ v)",
" ∀ (s : Finset ι) (g : ι → Rₛ), ∑ i ∈ s, g i • (⇑f ∘ v) i = 0 → ∀ i ∈ s, g i = 0",
" g i = 0",
" f (∑ i ∈ t, g' i • v i) = 0",
" ∑ x ∈ t, f (g' x • v x) = ∑ x ∈ t, ↑a... |
import Mathlib.RingTheory.LocalProperties
import Mathlib.RingTheory.Localization.InvSubmonoid
#align_import ring_theory.ring_hom.finite_type from "leanprover-community/mathlib"@"64fc7238fb41b1a4f12ff05e3d5edfa360dd768c"
namespace RingHom
open scoped Pointwise
theorem finiteType_stableUnderComposition : StableUn... | Mathlib/RingTheory/RingHom/FiniteType.lean | 38 | 91 | theorem finiteType_ofLocalizationSpanTarget : OfLocalizationSpanTarget @FiniteType := by |
-- Setup algebra intances.
rw [ofLocalizationSpanTarget_iff_finite]
introv R hs H
classical
letI := f.toAlgebra
replace H : ∀ r : s, Algebra.FiniteType R (Localization.Away (r : S)) := by
intro r; simp_rw [RingHom.FiniteType] at H; convert H r; ext; simp_rw [Algebra.smul_def]; rfl
replace H := fun r ... | [
" StableUnderComposition @FiniteType",
" (g.comp f).FiniteType",
" HoldsForLocalizationAway @FiniteType",
" (algebraMap R S).FiniteType",
" Algebra.FiniteType R S",
" (algebraMap R S).toAlgebra = inst✝¹",
" (let_fun I := (algebraMap R S).toAlgebra;\n r✝ • x✝) =\n r✝ • x✝",
" (let_fun I := (algeb... | [
" StableUnderComposition @FiniteType",
" (g.comp f).FiniteType",
" HoldsForLocalizationAway @FiniteType",
" (algebraMap R S).FiniteType",
" Algebra.FiniteType R S",
" (algebraMap R S).toAlgebra = inst✝¹",
" (let_fun I := (algebraMap R S).toAlgebra;\n r✝ • x✝) =\n r✝ • x✝",
" (let_fun I := (algeb... |
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 | 237 | 237 | theorem preimage_neg_Icc : -Icc a b = Icc (-b) (-a) := by | simp [← Ici_inter_Iic, inter_comm]
| [
" (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Ico b c ... | [
" (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Ico b c ... |
import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.MeasureTheory.Integral.Layercake
import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction
#align_import measure_theory.measure.portmanteau from "leanprover-community/mathlib"@"fd5edc43dc4f... | Mathlib/MeasureTheory/Measure/Portmanteau.lean | 133 | 151 | theorem limsup_measure_compl_le_of_le_liminf_measure {ι : Type*} {L : Filter ι} {μ : Measure Ω}
{μs : ι → Measure Ω} [IsProbabilityMeasure μ] [∀ i, IsProbabilityMeasure (μs i)] {E : Set Ω}
(E_mble : MeasurableSet E) (h : μ E ≤ L.liminf fun i => μs i E) :
(L.limsup fun i => μs i Eᶜ) ≤ μ Eᶜ := by |
rcases L.eq_or_neBot with rfl | hne
· simp only [limsup_bot, bot_le]
have meas_Ec : μ Eᶜ = 1 - μ E := by
simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne
have meas_i_Ec : ∀ i, μs i Eᶜ = 1 - μs i E := by
intro i
simpa only [measure_univ] using measure_compl E_mble (measur... | [
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) L",
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) ⊥",
" μ Eᶜ = 1 - μ E",
" ∀ (i : ι), (μs i) Eᶜ = 1 - (μs i) E",
" (μs i) Eᶜ = 1 - (μs i) E",
" 1 - μ E ≤ liminf (fun i => 1 - (μs i) E) L",
" 1 - μ E ≤ liminf ((fun x => 1 - x) ∘ fun i => (μs i) E) L",
" 1 - μ E ≤ 1 - limsup ... | [
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) L",
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) ⊥",
" μ Eᶜ = 1 - μ E",
" ∀ (i : ι), (μs i) Eᶜ = 1 - (μs i) E",
" (μs i) Eᶜ = 1 - (μs i) E",
" 1 - μ E ≤ liminf (fun i => 1 - (μs i) E) L",
" 1 - μ E ≤ liminf ((fun x => 1 - x) ∘ fun i => (μs i) E) L",
" 1 - μ E ≤ 1 - limsup ... |
import Mathlib.Analysis.NormedSpace.PiTensorProduct.ProjectiveSeminorm
import Mathlib.LinearAlgebra.Isomorphisms
universe uι u𝕜 uE uF
variable {ι : Type uι} [Fintype ι]
variable {𝕜 : Type u𝕜} [NontriviallyNormedField 𝕜]
variable {E : ι → Type uE} [∀ i, SeminormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)]
... | Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean | 144 | 150 | theorem injectiveSeminorm_apply (x : ⨂[𝕜] i, E i) :
injectiveSeminorm x = ⨆ p : {p | ∃ (G : Type (max uι u𝕜 uE))
(_ : SeminormedAddCommGroup G) (_ : NormedSpace 𝕜 G), p = Seminorm.comp (normSeminorm 𝕜
(ContinuousMultilinearMap 𝕜 E G →L[𝕜] G))
(toDualContinuousMultilinearMap G (𝕜 := 𝕜) (E := E))}... |
simp [injectiveSeminorm]
exact Seminorm.sSup_apply dualSeminorms_bounded
| [
" ‖((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear) x✝‖ ≤ projectiveSeminorm x * ‖x✝‖",
" ‖(lift x✝.toMultilinearMap) x‖ ≤ projectiveSeminorm x * ‖x✝‖",
" (fun x => ((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear).mkContinuous (projectiveSeminorm x) ⋯)\n (x + y) =\n ... | [
" ‖((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear) x✝‖ ≤ projectiveSeminorm x * ‖x✝‖",
" ‖(lift x✝.toMultilinearMap) x‖ ≤ projectiveSeminorm x * ‖x✝‖",
" (fun x => ((↑lift).flip x ∘ₗ ContinuousMultilinearMap.toMultilinearMapLinear).mkContinuous (projectiveSeminorm x) ⋯)\n (x + y) =\n ... |
import Mathlib.Topology.Order.IsLUB
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {α β γ : Type*}
section DenselyOrdered
variable [TopologicalSpace α] [LinearOrder α] [OrderTopology α] [DenselyOrdered α] {a b : α}
{s : Set α}
theorem closure_Ioi' {a : α} (h : (Io... | Mathlib/Topology/Order/DenselyOrdered.lean | 120 | 121 | theorem interior_Ioc [NoMaxOrder α] {a b : α} : interior (Ioc a b) = Ioo a b := by |
rw [← Ioi_inter_Iic, interior_inter, interior_Ioi, interior_Iic, Ioi_inter_Iio]
| [
" closure (Ioi a) = Ici a",
" closure (Ioi a) ⊆ Ici a",
" Ici a ⊆ closure (Ioi a)",
" a ∈ closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) ⊆ Icc a b",
" Icc a b ⊆ closure (Ioo a b)",
" {a, b} ⊆ closure (Ioo a b)",
" a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)",
" ∅ ⊆ closure... | [
" closure (Ioi a) = Ici a",
" closure (Ioi a) ⊆ Ici a",
" Ici a ⊆ closure (Ioi a)",
" a ∈ closure (Ioi a)",
" closure (Ioo a b) = Icc a b",
" closure (Ioo a b) ⊆ Icc a b",
" Icc a b ⊆ closure (Ioo a b)",
" {a, b} ⊆ closure (Ioo a b)",
" a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)",
" ∅ ⊆ closure... |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (α : Type u) where
| nil : Heap α
| node (a : α) (child sibling : Heap α) : Heap α
deriving Repr
def Heap.size : Heap α → Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : α) : Heap α := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 148 | 152 | theorem Heap.size_tail (le) {s : Heap α} (h : s.NoSibling) : (s.tail le).size = s.size - 1 := by |
simp only [Heap.tail]
match eq : s.tail? le with
| none => cases s with cases eq | nil => rfl
| some tl => simp [Heap.size_tail? h eq]
| [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... | [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... |
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.BilinearForm.DualLattice
import Mathlib.RingTheory.DedekindDomain.Basic
import Mathlib.RingTheory.Localization.Module
import Mathlib.RingTheory.Trace
#align_import ring_theory.dedekind_domain.... | Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean | 93 | 103 | theorem IsIntegralClosure.range_le_span_dualBasis [IsSeparable K L] {ι : Type*} [Fintype ι]
[DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
Submodule.span A (Set.range <| (traceForm K L).dualBasis (tr... |
rw [← LinearMap.BilinForm.dualSubmodule_span_of_basis,
← LinearMap.BilinForm.le_flip_dualSubmodule, Submodule.span_le]
rintro _ ⟨i, rfl⟩ _ ⟨y, rfl⟩
simp only [LinearMap.coe_restrictScalars, linearMap_apply, LinearMap.BilinForm.flip_apply,
traceForm_apply]
refine IsIntegrallyClosed.isIntegral_iff.mp ?_
... | [
" IsLocalization (algebraMapSubmonoid C A⁰) L",
" ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)",
" IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)",
" x ≠ 0",
" ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1",
" z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr... | [
" IsLocalization (algebraMapSubmonoid C A⁰) L",
" ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)",
" IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)",
" x ≠ 0",
" ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1",
" z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr... |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Multiset.Basic
#align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4"
assert_not_exists MonoidWithZero
variable {F ι α β γ : Type*}
names... | Mathlib/Algebra/BigOperators/Group/Multiset.lean | 85 | 86 | theorem prod_erase [DecidableEq α] (h : a ∈ s) : a * (s.erase a).prod = s.prod := by |
rw [← s.coe_toList, coe_erase, prod_coe, prod_coe, List.prod_erase (mem_toList.2 h)]
| [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... | [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... |
import Mathlib.MeasureTheory.Constructions.Pi
import Mathlib.MeasureTheory.Constructions.Prod.Integral
open Fintype MeasureTheory MeasureTheory.Measure
variable {𝕜 : Type*} [RCLike 𝕜]
namespace MeasureTheory
| Mathlib/MeasureTheory/Integral/Pi.lean | 26 | 41 | theorem Integrable.fin_nat_prod {n : ℕ} {E : Fin n → Type*}
[∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))]
{f : (i : Fin n) → E i → 𝕜} (hf : ∀ i, Integrable (f i)) :
Integrable (fun (x : (i : Fin n) → E i) ↦ ∏ i, f i (x i)) := by |
induction n with
| zero => simp only [Nat.zero_eq, Finset.univ_eq_empty, Finset.prod_empty, volume_pi,
integrable_const_iff, one_ne_zero, pi_empty_univ, ENNReal.one_lt_top, or_true]
| succ n n_ih =>
have := ((measurePreserving_piFinSuccAbove (fun i => (volume : Measure (E i))) 0).symm)
rw [volu... | [
" Integrable (fun x => ∏ i : Fin n, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin 0, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin (n + 1), f i (x i)) volume",
" Integrable ((fun x => ∏ i : Fin (n + 1), f i (x i)) ∘ ⇑(MeasurableEquiv.piFinSuccAbove (fun i => E i) 0).symm)\n (volume.prod (Meas... | [] |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.RingTheory.EuclideanDomain
#align_import data.polynomial.field_division from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Polynomial
namespace Polynomial
u... | Mathlib/Algebra/Polynomial/FieldDivision.lean | 40 | 57 | theorem derivative_rootMultiplicity_of_root_of_mem_nonZeroDivisors
{p : R[X]} {t : R} (hpt : Polynomial.IsRoot p t)
(hnzd : (p.rootMultiplicity t : R) ∈ nonZeroDivisors R) :
(derivative p).rootMultiplicity t = p.rootMultiplicity t - 1 := by |
by_cases h : p = 0
· simp only [h, map_zero, rootMultiplicity_zero]
obtain ⟨g, hp, hndvd⟩ := p.exists_eq_pow_rootMultiplicity_mul_and_not_dvd h t
set m := p.rootMultiplicity t
have hm : m - 1 + 1 = m := Nat.sub_add_cancel <| (rootMultiplicity_pos h).2 hpt
have hndvd : ¬(X - C t) ^ m ∣ derivative p := by
... | [
" rootMultiplicity t (derivative p) = rootMultiplicity t p - 1",
" rootMultiplicity t (derivative p) = m - 1",
" ¬(X - C t) ^ m ∣ derivative p",
" ¬X - C t ∣ C ↑m * g",
" ¬eval t (C ↑m * g) = 0",
" (X - C t) ^ m ∣ derivative p",
" (X - C t) ^ m ∣ 0",
" rootMultiplicity t (derivative p) ≤ m - 1"
] | [] |
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.RingTheory.Localization.FractionRing
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable section
namespace Polynomial
universe u v w z
variable {R : Type u} {S : Ty... | Mathlib/Algebra/Polynomial/Roots.lean | 109 | 111 | theorem mem_roots' : a ∈ p.roots ↔ p ≠ 0 ∧ IsRoot p a := by |
classical
rw [← count_pos, count_roots p, rootMultiplicity_pos']
| [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯",
" ↑(Multiset.card p.roots) ≤ p.degree",
" ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree",
" ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree",
" Multiset.card p.roots ≤ p.natDegree",
" (p - C a).degree = p.degree",
" (... | [
" p.roots = if h : p = 0 then ∅ else Classical.choose ⋯",
" ↑(Multiset.card p.roots) ≤ p.degree",
" ↑(Multiset.card (if h : p = 0 then ∅ else Classical.choose ⋯)) ≤ p.degree",
" ↑(Multiset.card (Classical.choose ⋯)) ≤ p.degree",
" Multiset.card p.roots ≤ p.natDegree",
" (p - C a).degree = p.degree",
" (... |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.subspace from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (K V : Type*) [Field K] [AddCommGroup V] [Module K V]
namespace Projectivization
open scoped LinearAlgebra.Projectivi... | Mathlib/LinearAlgebra/Projectivization/Subspace.lean | 155 | 158 | theorem span_univ : span (Set.univ : Set (ℙ K V)) = ⊤ := by |
rw [eq_top_iff, SetLike.le_def]
intro x _hx
exact subset_span _ (Set.mem_univ x)
| [
" A.carrier = B.carrier → A = B",
" { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier = B.carrier →\n { carrier := carrier✝, mem_add' := mem_add'✝ } = B",
" { carrier := carrier✝¹, mem_add' := mem_add'✝¹ }.carrier = { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier →\n { carrier := carrier✝¹, me... | [
" A.carrier = B.carrier → A = B",
" { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier = B.carrier →\n { carrier := carrier✝, mem_add' := mem_add'✝ } = B",
" { carrier := carrier✝¹, mem_add' := mem_add'✝¹ }.carrier = { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier →\n { carrier := carrier✝¹, me... |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1
#align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e"
open TopologicalSpace MeasureTheory.Lp Filter
open scoped ENNReal Topology MeasureTheory
names... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean | 109 | 110 | theorem condexp_of_not_sigmaFinite (hm : m ≤ m0) (hμm_not : ¬SigmaFinite (μ.trim hm)) :
μ[f|m] = 0 := by | rw [condexp, dif_pos hm, dif_neg]; push_neg; exact fun h => absurd h hμm_not
| [
" μ[f|m] = 0",
" ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)",
" SigmaFinite (μ.trim hm) → ¬Integrable f μ"
] | [
" μ[f|m] = 0"
] |
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.Order.Minimal
#align_import ring_theory.ideal.minimal_prime from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
section
variable {R S : Type*} [CommSemiring R] [CommSemiring S] (I J ... | Mathlib/RingTheory/Ideal/MinimalPrime.lean | 78 | 87 | theorem Ideal.radical_minimalPrimes : I.radical.minimalPrimes = I.minimalPrimes := by |
rw [Ideal.minimalPrimes, Ideal.minimalPrimes]
ext p
refine ⟨?_, ?_⟩ <;> rintro ⟨⟨a, ha⟩, b⟩
· refine ⟨⟨a, a.radical_le_iff.1 ha⟩, ?_⟩
simp only [Set.mem_setOf_eq, and_imp] at *
exact fun _ h2 h3 h4 => b h2 (h2.radical_le_iff.2 h3) h4
· refine ⟨⟨a, a.radical_le_iff.2 ha⟩, ?_⟩
simp only [Set.mem_se... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime",
" ∃ p ∈ I.minimalPrimes, p ≤ J",
" ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m",
" OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}",
" J.IsPrime",
" ∀ c ⊆ {p | IsPrime ... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime",
" ∃ p ∈ I.minimalPrimes, p ≤ J",
" ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m",
" OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}",
" J.IsPrime",
" ∀ c ⊆ {p | IsPrime ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.