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.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.Galois
universe u v w
open scoped Classical Polynomial
open Polynomial
variable (k : Type u) [Field k] (K : Type v) [Field K]
class IsSepClosed : Prop where
splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom.... | Mathlib/FieldTheory/IsSepClosed.lean | 104 | 116 | theorem exists_pow_nat_eq [IsSepClosed k] (x : k) (n : ℕ) [hn : NeZero (n : k)] :
∃ z, z ^ n = x := by |
have hn' : 0 < n := Nat.pos_of_ne_zero fun h => by
rw [h, Nat.cast_zero] at hn
exact hn.out rfl
have : degree (X ^ n - C x) ≠ 0 := by
rw [degree_X_pow_sub_C hn' x]
exact (WithBot.coe_lt_coe.2 hn').ne'
by_cases hx : x = 0
· exact ⟨0, by rw [hx, pow_eq_zero_iff hn'.ne']⟩
· obtain ⟨z, hz⟩ := exi... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)",
" ∃ z, z ^ n = x",
" False",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" 0 ^ n = x",
" z ^ n = x"
] | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)"
] |
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle
#align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped EuclideanGeometry
ope... | Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean | 91 | 96 | theorem cos_oangle_add_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
Real.Angle.cos (o.oangle x (x + y)) = ‖x‖ / ‖x + y‖ := by |
have hs : (o.oangle x (x + y)).sign = 1 := by
rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two]
rw [o.oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,
InnerProductGeometry.cos_angle_add_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]
| [
" o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos",
" (o.oangle x (x + y)).sign = 1",
" o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos",
" o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin",
" o.oangle (x + y) ... | [
" o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos",
" (o.oangle x (x + y)).sign = 1",
" o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos",
" (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos",
" o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin",
" o.oangle (x + y) ... |
import Mathlib.MeasureTheory.Covering.DensityTheorem
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.covering.one_dim from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open Set MeasureTheory IsUnifLocDoublingMeasure Filter
open scoped Topology
names... | Mathlib/MeasureTheory/Covering/OneDim.lean | 44 | 48 | theorem Icc_mem_vitaliFamily_at_left {x y : ℝ} (hxy : x < y) :
Icc x y ∈ (vitaliFamily (volume : Measure ℝ) 1).setsAt y := by |
rw [Icc_eq_closedBall]
refine closedBall_mem_vitaliFamily_of_dist_le_mul _ ?_ (by linarith)
rw [Real.dist_eq, abs_of_nonneg] <;> linarith
| [
" Icc x y ∈ (vitaliFamily volume 1).setsAt x",
" Metric.closedBall ((x + y) / 2) ((y - x) / 2) ∈ (vitaliFamily volume 1).setsAt x",
" 0 < (y - x) / 2",
" dist x ((x + y) / 2) ≤ 1 * ((y - x) / 2)",
" (x + y) / 2 - x ≤ 1 * ((y - x) / 2)",
" 0 ≤ (x + y) / 2 - x",
" Tendsto (fun y => Icc x y) (𝓝[>] x) ((vi... | [
" Icc x y ∈ (vitaliFamily volume 1).setsAt x",
" Metric.closedBall ((x + y) / 2) ((y - x) / 2) ∈ (vitaliFamily volume 1).setsAt x",
" 0 < (y - x) / 2",
" dist x ((x + y) / 2) ≤ 1 * ((y - x) / 2)",
" (x + y) / 2 - x ≤ 1 * ((y - x) / 2)",
" 0 ≤ (x + y) / 2 - x",
" Tendsto (fun y => Icc x y) (𝓝[>] x) ((vi... |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Nat.Factorial.Cast
#align_import data.nat.choose.cast from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Nat
variable (K : Type*) [DivisionRing K] [CharZero K]
namespace Nat
theorem cast_choose {a b : ℕ} (h : a ≤ b) : (b.... | Mathlib/Data/Nat/Choose/Cast.lean | 41 | 43 | theorem cast_choose_two (a : ℕ) : (a.choose 2 : K) = a * (a - 1) / 2 := by |
rw [← cast_descFactorial_two, descFactorial_eq_factorial_mul_choose, factorial_two, mul_comm,
cast_mul, cast_two, eq_div_iff_mul_eq (two_ne_zero : (2 : K) ≠ 0)]
| [
" ↑(b.choose a) = ↑b ! / (↑a ! * ↑(b - a)!)",
" ↑(b.choose a) * (↑a ! * ↑(b - a)!) = ↑b !",
" ↑((a + b).choose a) = ↑(a + b)! / (↑a ! * ↑b !)",
" ↑(a.choose b) = Polynomial.eval (↑(a - (b - 1))) (ascPochhammer K b) / ↑b !",
" ↑(a.choose 2) = ↑a * (↑a - 1) / 2"
] | [
" ↑(b.choose a) = ↑b ! / (↑a ! * ↑(b - a)!)",
" ↑(b.choose a) * (↑a ! * ↑(b - a)!) = ↑b !",
" ↑((a + b).choose a) = ↑(a + b)! / (↑a ! * ↑b !)",
" ↑(a.choose b) = Polynomial.eval (↑(a - (b - 1))) (ascPochhammer K b) / ↑b !"
] |
import Mathlib.Algebra.Category.MonCat.Limits
import Mathlib.CategoryTheory.Limits.Preserves.Filtered
import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
import Mathlib.CategoryTheory.Limits.TypesFiltered
#align_import algebra.category.Mon.filtered_colimits from "leanprover-community/mathlib"@"70fd9563a21e7b96... | Mathlib/Algebra/Category/MonCat/FilteredColimits.lean | 143 | 162 | theorem colimitMulAux_eq_of_rel_right {x y y' : Σ j, F.obj j}
(hyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) y y') :
colimitMulAux.{v, u} F x y = colimitMulAux.{v, u} F x y' := by |
cases' y with j₁ y; cases' x with j₂ x; cases' y' with j₃ y'
obtain ⟨l, f, g, hfg⟩ := hyy'
simp only [Functor.comp_obj, Functor.comp_map, forget_map] at hfg
obtain ⟨s, α, β, γ, h₁, h₂, h₃⟩ :=
IsFiltered.tulip (IsFiltered.rightToMax j₂ j₁) (IsFiltered.leftToMax j₂ j₁)
(IsFiltered.leftToMax j₂ j₃) (IsF... | [
" 1 = M.mk F ⟨j, 1⟩",
" ∃ k f g, (F.map f) ⟨⋯.some, 1⟩.snd = (F.map g) ⟨j, 1⟩.snd",
" (F.map (IsFiltered.leftToMax ⟨⋯.some, 1⟩.fst j)) ⟨⋯.some, 1⟩.snd =\n (F.map (IsFiltered.rightToMax ⟨⋯.some, 1⟩.fst j)) ⟨j, 1⟩.snd",
" colimitMulAux F x y = colimitMulAux F x' y",
" colimitMulAux F ⟨j₁, x⟩ y = colimitMul... | [
" 1 = M.mk F ⟨j, 1⟩",
" ∃ k f g, (F.map f) ⟨⋯.some, 1⟩.snd = (F.map g) ⟨j, 1⟩.snd",
" (F.map (IsFiltered.leftToMax ⟨⋯.some, 1⟩.fst j)) ⟨⋯.some, 1⟩.snd =\n (F.map (IsFiltered.rightToMax ⟨⋯.some, 1⟩.fst j)) ⟨j, 1⟩.snd",
" colimitMulAux F x y = colimitMulAux F x' y",
" colimitMulAux F ⟨j₁, x⟩ y = colimitMul... |
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Topology.Algebra.Module.Basic
import Mathlib.RingTheory.Adjoin.Basic
#align_import topology.algebra.algebra from "leanprover-community/mathlib"@"43afc5ad87891456c57b5a183e3e617d67c2b1db"
open scoped Classical
open Set TopologicalSpace Algebra
open sc... | Mathlib/Topology/Algebra/Algebra.lean | 130 | 137 | theorem Subalgebra.topologicalClosure_comap_homeomorph (s : Subalgebra R A) {B : Type*}
[TopologicalSpace B] [Ring B] [TopologicalRing B] [Algebra R B] (f : B →ₐ[R] A) (f' : B ≃ₜ A)
(w : (f : B → A) = f') : s.topologicalClosure.comap f = (s.comap f).topologicalClosure := by |
apply SetLike.ext'
simp only [Subalgebra.topologicalClosure_coe]
simp only [Subalgebra.coe_comap, Subsemiring.coe_comap, AlgHom.coe_toRingHom]
rw [w]
exact f'.preimage_closure _
| [
" IsClosed ↑s.topologicalClosure",
" comap f s.topologicalClosure = (comap f s).topologicalClosure",
" ↑(comap f s.topologicalClosure) = ↑(comap f s).topologicalClosure",
" ↑(comap f s.topologicalClosure) = closure ↑(comap f s)",
" ⇑f ⁻¹' ↑s.topologicalClosure = closure (⇑f ⁻¹' ↑s)",
" ⇑f' ⁻¹' ↑s.topologi... | [
" IsClosed ↑s.topologicalClosure"
] |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Bicategory.Coherence
namespace CategoryTheory
namespace Bicategory
open Category
open scoped Bicategory
open Mathlib.Tactic.BicategoryCoherence (bicategoricalComp bicategoricalIsoComp)
universe w v u
variable {B : Type u} [Bicategory... | Mathlib/CategoryTheory/Bicategory/Adjunction.lean | 220 | 226 | theorem right_triangle_of_left_triangle (h : leftZigzag η.hom ε.hom = (λ_ f).hom ≫ (ρ_ f).inv) :
rightZigzag η.hom ε.hom = (ρ_ g).hom ≫ (λ_ g).inv := by |
rw [← cancel_epi (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv)]
calc
_ = rightZigzag η.hom ε.hom ⊗≫ rightZigzag η.hom ε.hom := by coherence
_ = rightZigzag η.hom ε.hom := rightZigzag_idempotent_of_left_triangle _ _ h
_ = _ := by simp
| [
" rightZigzag η ε ⊗≫ rightZigzag η ε = rightZigzag η ε",
" (g ◁ η ⊗≫ ε ▷ g) ⊗≫ g ◁ η ⊗≫ ε ▷ g = g ◁ η ⊗≫ ε ▷ g",
" (g ◁ η ⊗≫ ε ▷ g) ⊗≫ g ◁ η ⊗≫ ε ▷ g = g ◁ η ⊗≫ (ε ▷ g ▷ 𝟙 a ≫ (𝟙 b ≫ g) ◁ η) ⊗≫ ε ▷ g",
" g ◁ η ≫ (α_ g f g).inv ≫ ε ▷ g ≫ (λ_ g).hom ≫ (ρ_ g).inv ≫ g ◁ η ≫ (α_ g f g).inv ≫ ε ▷ g =\n g ◁ η ≫... | [
" rightZigzag η ε ⊗≫ rightZigzag η ε = rightZigzag η ε",
" (g ◁ η ⊗≫ ε ▷ g) ⊗≫ g ◁ η ⊗≫ ε ▷ g = g ◁ η ⊗≫ ε ▷ g",
" (g ◁ η ⊗≫ ε ▷ g) ⊗≫ g ◁ η ⊗≫ ε ▷ g = g ◁ η ⊗≫ (ε ▷ g ▷ 𝟙 a ≫ (𝟙 b ≫ g) ◁ η) ⊗≫ ε ▷ g",
" g ◁ η ≫ (α_ g f g).inv ≫ ε ▷ g ≫ (λ_ g).hom ≫ (ρ_ g).inv ≫ g ◁ η ≫ (α_ g f g).inv ≫ ε ▷ g =\n g ◁ η ≫... |
import Mathlib.RingTheory.WittVector.Truncated
import Mathlib.RingTheory.WittVector.Identities
import Mathlib.NumberTheory.Padics.RingHoms
#align_import ring_theory.witt_vector.compare from "leanprover-community/mathlib"@"168ad7fc5d8173ad38be9767a22d50b8ecf1cd00"
noncomputable section
variable {p : ℕ} [hp : Fact... | Mathlib/RingTheory/WittVector/Compare.lean | 127 | 130 | theorem commutes_symm {m : ℕ} (hm : n ≤ m) :
(zmodEquivTrunc p n).symm.toRingHom.comp (truncate hm) =
(ZMod.castHom (pow_dvd_pow p hm) _).comp (zmodEquivTrunc p m).symm.toRingHom := by |
ext; apply commutes_symm'
| [
" i = n",
" ↑p ^ i ≠ 0",
" ↑p ^ i = (WittVector.truncate n) (↑p ^ i)",
" ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0",
" ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0",
" ¬1 = 0",
" Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n",
" ?m.7413 ∣ p ^ n",
... | [
" i = n",
" ↑p ^ i ≠ 0",
" ↑p ^ i = (WittVector.truncate n) (↑p ^ i)",
" ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0",
" ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0",
" ¬1 = 0",
" Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n",
" ?m.7413 ∣ p ^ n",
... |
import Batteries.Data.List.Basic
namespace Batteries
inductive AssocList (α : Type u) (β : Type v) where
| nil
| cons (key : α) (value : β) (tail : AssocList α β)
deriving Inhabited
namespace AssocList
@[simp] def toList : AssocList α β → List (α × β)
| nil => []
| cons a b es => (a, b) :: es.toL... | .lake/packages/batteries/Batteries/Data/AssocList.lean | 139 | 141 | theorem find?_eq_findEntry? [BEq α] (a : α) (l : AssocList α β) :
find? a l = (l.findEntry? a).map (·.2) := by |
induction l <;> simp [find?, List.find?_cons]; split <;> simp [*]
| [
" l.isEmpty = l.toList.isEmpty",
" nil.isEmpty = nil.toList.isEmpty",
" (cons key✝ value✝ tail✝).isEmpty = (cons key✝ value✝ tail✝).toList.isEmpty",
" l.toList.length = l.length",
" nil.toList.length = nil.length",
" (cons key✝ value✝ tail✝).toList.length = (cons key✝ value✝ tail✝).length",
" foldlM f i... | [
" l.isEmpty = l.toList.isEmpty",
" nil.isEmpty = nil.toList.isEmpty",
" (cons key✝ value✝ tail✝).isEmpty = (cons key✝ value✝ tail✝).toList.isEmpty",
" l.toList.length = l.length",
" nil.toList.length = nil.length",
" (cons key✝ value✝ tail✝).toList.length = (cons key✝ value✝ tail✝).length",
" foldlM f i... |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
#align_import category_theory.monoidal.coherence_lemmas from "leanprover-community/mathlib"@"b8b8bf3ea0c625fa1f950034a184e07c67f7bcfe"
open CategoryTheory Category Iso
namespace CategoryTheory.MonoidalCategory
v... | Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean | 52 | 53 | theorem leftUnitor_inv_tensor_id (X Y : C) : (λ_ X).inv ⊗ 𝟙 Y = (λ_ _).inv ≫ (α_ _ _ _).inv := by |
coherence
| [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... | [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom"
] |
import Mathlib.Algebra.Module.Equiv
import Mathlib.Data.DFinsupp.Basic
import Mathlib.Data.Finsupp.Basic
#align_import data.finsupp.to_dfinsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
variable {ι : Type*} {R : Type*} {M : Type*}
section Defs
def Finsupp.toDFinsupp [Zer... | Mathlib/Data/Finsupp/ToDFinsupp.lean | 123 | 126 | theorem DFinsupp.toFinsupp_single (i : ι) (m : M) :
(DFinsupp.single i m : Π₀ _ : ι, M).toFinsupp = Finsupp.single i m := by |
ext
simp [Finsupp.single_apply, DFinsupp.single_apply]
| [
" (single i m).toDFinsupp = DFinsupp.single i m",
" (single i m).toDFinsupp i✝ = (DFinsupp.single i m) i✝",
" f.toDFinsupp.support = f.support",
" a✝ ∈ f.toDFinsupp.support ↔ a✝ ∈ f.support",
" i ∈ f.support ↔ f i ≠ 0",
" f.toFinsupp.support = f.support",
" a✝ ∈ f.toFinsupp.support ↔ a✝ ∈ f.support",
... | [
" (single i m).toDFinsupp = DFinsupp.single i m",
" (single i m).toDFinsupp i✝ = (DFinsupp.single i m) i✝",
" f.toDFinsupp.support = f.support",
" a✝ ∈ f.toDFinsupp.support ↔ a✝ ∈ f.support",
" i ∈ f.support ↔ f i ≠ 0",
" f.toFinsupp.support = f.support",
" a✝ ∈ f.toFinsupp.support ↔ a✝ ∈ f.support"
] |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {α : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n ... | Mathlib/Data/List/OfFn.lean | 125 | 131 | theorem ofFn_succ' {n} (f : Fin (succ n) → α) :
ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by |
induction' n with n IH
· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero]
rfl
· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero]
congr
| [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1",
" (ofFn f).length = n",
" j + k < n",
" (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,... | [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1",
" (ofFn f).length = n",
" j + k < n",
" (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,... |
import Mathlib.RingTheory.WittVector.Frobenius
import Mathlib.RingTheory.WittVector.Verschiebung
import Mathlib.RingTheory.WittVector.MulP
#align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
namespace WittVector
variable {p : ℕ} {R : Typ... | Mathlib/RingTheory/WittVector/Identities.lean | 95 | 96 | theorem FractionRing.p_nonzero [Nontrivial R] [CharP R p] : (p : FractionRing (𝕎 R)) ≠ 0 := by |
simpa using (IsFractionRing.injective (𝕎 R) (FractionRing (𝕎 R))).ne (WittVector.p_nonzero _ _)
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
import Mathlib.Data.Matrix.PEquiv
import Mathlib.Data.Set.Card
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.Trace
open BigOperators Matrix Equiv
variable {n R : Type*} [DecidableEq n] [Fintype n] (σ : Perm n)
variable (R) in
abbrev Equiv.Perm.permMatrix [Zero R] [One... | Mathlib/LinearAlgebra/Matrix/Permutation.lean | 47 | 50 | theorem trace_permutation [AddCommMonoidWithOne R] :
trace (σ.permMatrix R) = (Function.fixedPoints σ).ncard := by |
delta trace
simp [toPEquiv_apply, ← Set.ncard_coe_Finset, Function.fixedPoints, Function.IsFixedPt]
| [
" (Perm.permMatrix R σ).det = ↑↑(Perm.sign σ)",
" (Perm.permMatrix R σ).trace = ↑(Function.fixedPoints ⇑σ).ncard",
" ∑ i : n, (Perm.permMatrix R σ).diag i = ↑(Function.fixedPoints ⇑σ).ncard"
] | [
" (Perm.permMatrix R σ).det = ↑↑(Perm.sign σ)"
] |
import Mathlib.Data.Finset.Fold
import Mathlib.Algebra.GCDMonoid.Multiset
#align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
#align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d"
variab... | Mathlib/Algebra/GCDMonoid/Finset.lean | 212 | 223 | theorem gcd_eq_zero_iff : s.gcd f = 0 ↔ ∀ x : β, x ∈ s → f x = 0 := by |
rw [gcd_def, Multiset.gcd_eq_zero_iff]
constructor <;> intro h
· intro b bs
apply h (f b)
simp only [Multiset.mem_map, mem_def.1 bs]
use b
simp only [mem_def.1 bs, eq_self_iff_true, and_self]
· intro a as
rw [Multiset.mem_map] at as
rcases as with ⟨b, ⟨bs, rfl⟩⟩
apply h b (mem_def.1... | [
" a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b",
" (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b",
" (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b",
" (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)",
" normalize (s.gcd f) = s.gcd f",
" (∅ ∪ s₂).gcd f = GCDMonoid.gcd (∅.gcd f) (s₂.gcd f)",
... | [
" a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b",
" (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b",
" (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b",
" (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)",
" normalize (s.gcd f) = s.gcd f",
" (∅ ∪ s₂).gcd f = GCDMonoid.gcd (∅.gcd f) (s₂.gcd f)",
... |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
open Set
noncomputable section
namespace Complex
theorem isHomeomorphicTrivialFiber... | Mathlib/Analysis/Complex/ReImTopology.lean | 139 | 140 | theorem frontier_setOf_im_le (a : ℝ) : frontier { z : ℂ | z.im ≤ a } = { z | z.im = a } := by |
simpa only [frontier_Iic] using frontier_preimage_im (Iic a)
| [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}",
" closure {z | z.im < a} = {z | z.im ≤ a}",
" closure {z | a < z.re} = {z | a ≤ ... | [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}",
" closure {z | z.im < a} = {z | z.im ≤ a}",
" closure {z | a < z.re} = {z | a ≤ ... |
import Mathlib.Algebra.Polynomial.FieldDivision
import Mathlib.FieldTheory.Minpoly.Basic
import Mathlib.RingTheory.Algebraic
#align_import field_theory.minpoly.field from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5"
open scoped Classical
open Polynomial Set Function minpoly
namespace... | Mathlib/FieldTheory/Minpoly/Field.lean | 68 | 76 | theorem dvd {p : A[X]} (hp : Polynomial.aeval x p = 0) : minpoly A x ∣ p := by |
by_cases hp0 : p = 0
· simp only [hp0, dvd_zero]
have hx : IsIntegral A x := IsAlgebraic.isIntegral ⟨p, hp0, hp⟩
rw [← modByMonic_eq_zero_iff_dvd (monic hx)]
by_contra hnz
apply degree_le_of_ne_zero A x hnz
((aeval_modByMonic_eq_self_of_root (monic hx) (aeval _ _)).trans hp) |>.not_lt
exact degree_mo... | [
" (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0",
" p = minpoly A x",
" minpoly A x = p",
" minpoly A x - p = 0",
" False",
" (Polynomial.aeval x) (minpoly A x - p) = 0",
" (minpoly A x - p).degree < (minpoly A x).degree",
" (minpoly A x).leadingCoeff = p.leadingCoeff",
" (minpoly A x).degree = ... | [
" (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0",
" p = minpoly A x",
" minpoly A x = p",
" minpoly A x - p = 0",
" False",
" (Polynomial.aeval x) (minpoly A x - p) = 0",
" (minpoly A x - p).degree < (minpoly A x).degree",
" (minpoly A x).leadingCoeff = p.leadingCoeff",
" (minpoly A x).degree = ... |
import Mathlib.Probability.ProbabilityMassFunction.Monad
#align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d"
universe u
namespace PMF
noncomputable section
variable {α β γ : Type*}
open scoped Classical
open NNReal ENN... | Mathlib/Probability/ProbabilityMassFunction/Constructions.lean | 101 | 105 | theorem toMeasure_map_apply [MeasurableSpace α] [MeasurableSpace β] (hf : Measurable f)
(hs : MeasurableSet s) : (p.map f).toMeasure s = p.toMeasure (f ⁻¹' s) := by |
rw [toMeasure_apply_eq_toOuterMeasure_apply _ s hs,
toMeasure_apply_eq_toOuterMeasure_apply _ (f ⁻¹' s) (measurableSet_preimage hf hs)]
exact toOuterMeasure_map_apply f p s
| [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p",
" map (Function.const α b) p = pure b",
" (map f p).toOuterMeasure s = p.toOuterMeasure (f ⁻¹' s)",
" (map f p)... | [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p",
" map (Function.const α b) p = pure b",
" (map f p).toOuterMeasure s = p.toOuterMeasure (f ⁻¹' s)"
] |
import Mathlib.RingTheory.WittVector.Domain
import Mathlib.RingTheory.WittVector.MulCoeff
import Mathlib.RingTheory.DiscreteValuationRing.Basic
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.witt_vector.discrete_valuation_ring from "leanprover-community/mathlib"@"c163ec99dfc664628ca15d215fce0a5b9c2... | Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean | 121 | 135 | theorem exists_eq_pow_p_mul (a : 𝕎 k) (ha : a ≠ 0) :
∃ (m : ℕ) (b : 𝕎 k), b.coeff 0 ≠ 0 ∧ a = (p : 𝕎 k) ^ m * b := by |
obtain ⟨m, c, hc, hcm⟩ := WittVector.verschiebung_nonzero ha
obtain ⟨b, rfl⟩ := (frobenius_bijective p k).surjective.iterate m c
rw [WittVector.iterate_frobenius_coeff] at hc
have := congr_fun (WittVector.verschiebung_frobenius_comm.comp_iterate m) b
simp only [Function.comp_apply] at this
rw [← this] at h... | [
" ∃ m b, b.coeff 0 ≠ 0 ∧ a = ↑p ^ m * b",
" b.coeff 0 ≠ 0",
" b.coeff 0 ^ p ^ m = 0",
" a = ↑p ^ m * b",
" a = (fun x => ↑p * x)^[m] b",
" (fun x => ↑p * x) = ⇑verschiebung ∘ ⇑frobenius",
" ↑p * x = (⇑verschiebung ∘ ⇑frobenius) x",
" verschiebung (frobenius x) = (⇑verschiebung ∘ ⇑frobenius) x"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
#align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open scoped Classical Topology
open Filter Asymptotics Set
variable {𝕜... | Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean | 119 | 121 | theorem iteratedDerivWithin_one {x : 𝕜} (h : UniqueDiffWithinAt 𝕜 s x) :
iteratedDerivWithin 1 f s x = derivWithin f s x := by |
simp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]; rfl
| [
" iteratedDerivWithin n f univ = iteratedDeriv n f",
" iteratedDerivWithin n f univ x = iteratedDeriv n f x",
" iteratedDerivWithin n f s = ⇑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s",
" iteratedDerivWithin n f s x =\n (⇑(ContinuousMultilinearMap.piFieldEquiv... | [
" iteratedDerivWithin n f univ = iteratedDeriv n f",
" iteratedDerivWithin n f univ x = iteratedDeriv n f x",
" iteratedDerivWithin n f s = ⇑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s",
" iteratedDerivWithin n f s x =\n (⇑(ContinuousMultilinearMap.piFieldEquiv... |
import Mathlib.Geometry.Euclidean.Sphere.Power
import Mathlib.Geometry.Euclidean.Triangle
#align_import geometry.euclidean.sphere.ptolemy from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
open Real
open scoped EuclideanGeometry RealInnerProductSpace Real
namespace EuclideanGeometry
... | Mathlib/Geometry/Euclidean/Sphere/Ptolemy.lean | 53 | 70 | theorem mul_dist_add_mul_dist_eq_mul_dist_of_cospherical {a b c d p : P}
(h : Cospherical ({a, b, c, d} : Set P)) (hapc : ∠ a p c = π) (hbpd : ∠ b p d = π) :
dist a b * dist c d + dist b c * dist d a = dist a c * dist b d := by |
have h' : Cospherical ({a, c, b, d} : Set P) := by rwa [Set.insert_comm c b {d}]
have hmul := mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_pi h' hapc hbpd
have hbp := left_dist_ne_zero_of_angle_eq_pi hbpd
have h₁ : dist c d = dist c p / dist b p * dist a b := by
rw [dist_mul_of_eq_angle_of_dist_mul b p ... | [
" dist a b * dist c d + dist b c * dist d a = dist a c * dist b d",
" Cospherical {a, c, b, d}",
" dist c d = dist c p / dist b p * dist a b",
" ∠ c p d = ∠ b p a",
" dist d p = dist c p / dist b p * dist a p",
" dist c p = dist c p / dist b p * dist b p",
" dist d a = dist a p / dist b p * dist b c",
... | [] |
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.RingTheory.MvPolynomial.Basic
#align_import field_theory.mv_polynomial from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
noncomputable section
open scoped Classical
... | Mathlib/FieldTheory/MvPolynomial.lean | 54 | 55 | theorem rank_mvPolynomial : Module.rank K (MvPolynomial σ K) = Cardinal.mk (σ →₀ ℕ) := by |
rw [← Cardinal.lift_inj, ← (basisMonomials σ K).mk_eq_rank]
| [
" Module.rank K (MvPolynomial σ K) = Cardinal.mk (σ →₀ ℕ)"
] | [] |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Matrix.Basic
#align_import combinatorics.simple_graph.inc_matrix from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Finset Matrix SimpleGraph Sym2
open Matrix
namespace SimpleGraph... | Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean | 102 | 103 | theorem incMatrix_apply_eq_zero_iff : G.incMatrix R a e = 0 ↔ e ∉ G.incidenceSet a := by |
simp only [incMatrix_apply, Set.indicator_apply_eq_zero, Pi.one_apply, one_ne_zero]
| [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... | [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... |
import Mathlib.RingTheory.RootsOfUnity.Basic
import Mathlib.RingTheory.AdjoinRoot
import Mathlib.FieldTheory.Galois
import Mathlib.LinearAlgebra.Eigenspace.Minpoly
import Mathlib.RingTheory.Norm
universe u
variable {K : Type u} [Field K]
open Polynomial IntermediateField AdjoinRoot
section Splits
lemma root_X_pow... | Mathlib/FieldTheory/KummerExtension.lean | 88 | 93 | theorem X_pow_sub_C_eq_prod'
{n : ℕ} {ζ : K} (hζ : IsPrimitiveRoot ζ n) {α a : K} (hn : 0 < n) (e : α ^ n = a) :
(X ^ n - C a) = ∏ i ∈ Finset.range n, (X - C (ζ ^ i * α)) := by |
rw [eq_prod_roots_of_monic_of_splits_id (monic_X_pow_sub_C _ (Nat.pos_iff_ne_zero.mp hn))
(X_pow_sub_C_splits_of_isPrimitiveRoot hζ e), ← nthRoots, hζ.nthRoots_eq e, Multiset.map_map]
rfl
| [
" root (X ^ n - C a) ^ n = (of (X ^ n - C a)) a",
" X.natDegree < (X ^ n - C a).natDegree",
" root (X ^ n - C a) ≠ 0",
" root (X ^ Nat.succ 0 - C a) ≠ 0",
" root (X - C a) ≠ 0",
" False",
" (C a).natDegree < (X - C a).natDegree",
" (AdjoinRoot.mk (X - C a)) (C a) = 0",
" (AdjoinRoot.mk (X - C a)) (C... | [
" root (X ^ n - C a) ^ n = (of (X ^ n - C a)) a",
" X.natDegree < (X ^ n - C a).natDegree",
" root (X ^ n - C a) ≠ 0",
" root (X ^ Nat.succ 0 - C a) ≠ 0",
" root (X - C a) ≠ 0",
" False",
" (C a).natDegree < (X - C a).natDegree",
" (AdjoinRoot.mk (X - C a)) (C a) = 0",
" (AdjoinRoot.mk (X - C a)) (C... |
import Mathlib.Order.Cover
import Mathlib.Order.Interval.Finset.Defs
#align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d"
assert_not_exists MonoidWithZero
assert_not_exists Finset.sum
open Function OrderDual
open FinsetInterval
variable {ι α : T... | Mathlib/Order/Interval/Finset/Basic.lean | 139 | 139 | theorem left_mem_Ico : a ∈ Ico a b ↔ a < b := by | simp only [mem_Ico, true_and_iff, le_refl]
| [
" (Icc a b).Nonempty ↔ a ≤ b",
" (Ico a b).Nonempty ↔ a < b",
" (Ioc a b).Nonempty ↔ a < b",
" (Ioo a b).Nonempty ↔ a < b",
" Icc a b = ∅ ↔ ¬a ≤ b",
" Ico a b = ∅ ↔ ¬a < b",
" Ioc a b = ∅ ↔ ¬a < b",
" Ioo a b = ∅ ↔ ¬a < b",
" a ∈ Icc a b ↔ a ≤ b",
" a ∈ Ico a b ↔ a < b"
] | [
" (Icc a b).Nonempty ↔ a ≤ b",
" (Ico a b).Nonempty ↔ a < b",
" (Ioc a b).Nonempty ↔ a < b",
" (Ioo a b).Nonempty ↔ a < b",
" Icc a b = ∅ ↔ ¬a ≤ b",
" Ico a b = ∅ ↔ ¬a < b",
" Ioc a b = ∅ ↔ ¬a < b",
" Ioo a b = ∅ ↔ ¬a < b",
" a ∈ Icc a b ↔ a ≤ b"
] |
import Mathlib.Algebra.Order.Ring.Abs
#align_import data.int.order.lemmas from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
open Function Nat
namespace Int
variable {a b : ℤ} {n : ℕ}
| Mathlib/Data/Int/Order/Lemmas.lean | 28 | 30 | theorem natAbs_eq_iff_mul_self_eq {a b : ℤ} : a.natAbs = b.natAbs ↔ a * a = b * b := by |
rw [← abs_eq_iff_mul_self_eq, abs_eq_natAbs, abs_eq_natAbs]
exact Int.natCast_inj.symm
| [
" a.natAbs = b.natAbs ↔ a * a = b * b",
" a.natAbs = b.natAbs ↔ ↑a.natAbs = ↑b.natAbs"
] | [] |
import Mathlib.Probability.ConditionalProbability
import Mathlib.MeasureTheory.Measure.Count
#align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4"
noncomputable section
open ProbabilityTheory
open MeasureTheory MeasurableSpace
namespace ProbabilityT... | Mathlib/Probability/CondCount.lean | 70 | 76 | theorem condCount_univ [Fintype Ω] {s : Set Ω} :
condCount Set.univ s = Measure.count s / Fintype.card Ω := by |
rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter]
congr
rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)]
· simp [Finset.card_univ]
· exact (@Finset.coe_univ Ω _).symm ▸ MeasurableSet.univ
| [
" condCount ∅ = 0",
" (condCount s) ∅ = 0",
" s.Finite",
" False",
" (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count Set.univ = ↑(Fintype.card Ω)",
" ∑ x : Ω, 1 = ↑(Fintype.card Ω)",
" M... | [
" condCount ∅ = 0",
" (condCount s) ∅ = 0",
" s.Finite",
" False"
] |
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Topology.PartialHomeomorph
#align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Function Set Filter Metric
open scoped Topolo... | Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean | 148 | 280 | theorem surjOn_closedBall_of_nonlinearRightInverse (hf : ApproximatesLinearOn f f' s c)
(f'symm : f'.NonlinearRightInverse) {ε : ℝ} {b : E} (ε0 : 0 ≤ ε) (hε : closedBall b ε ⊆ s) :
SurjOn f (closedBall b ε) (closedBall (f b) (((f'symm.nnnorm : ℝ)⁻¹ - c) * ε)) := by |
intro y hy
rcases le_or_lt (f'symm.nnnorm : ℝ)⁻¹ c with hc | hc
· refine ⟨b, by simp [ε0], ?_⟩
have : dist y (f b) ≤ 0 :=
(mem_closedBall.1 hy).trans (mul_nonpos_of_nonpos_of_nonneg (by linarith) ε0)
simp only [dist_le_zero] at this
rw [this]
have If' : (0 : ℝ) < f'symm.nnnorm := by rw [← inv... | [
" ApproximatesLinearOn f f' ∅ c",
" ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s",
" f x - f y - f' (x - y) = (f - ⇑f') x - (f - ⇑f') y",
" f x - f y - (f' x - f' y) = f x - f' x - (f y - f' y)",
" LipschitzWith (‖f'‖₊ + c) (s.restrict f)",
" SurjOn f (closedBall b ε) (closedBall (f b) ((... | [
" ApproximatesLinearOn f f' ∅ c",
" ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s",
" f x - f y - f' (x - y) = (f - ⇑f') x - (f - ⇑f') y",
" f x - f y - (f' x - f' y) = f x - f' x - (f y - f' y)",
" LipschitzWith (‖f'‖₊ + c) (s.restrict f)"
] |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ι : Type*} [Fintype ι]
variable {M : Type*} [AddCommGroup M] (R : Type*) [Co... | Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 136 | 138 | theorem Matrix.Represents.zero : (0 : Matrix ι ι R).Represents b 0 := by |
delta Matrix.Represents
rw [map_zero, map_zero]
| [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i",
"... | [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i",
"... |
import Mathlib.MeasureTheory.Integral.IntervalIntegral
#align_import measure_theory.integral.layercake from "leanprover-community/mathlib"@"08a4542bec7242a5c60f179e4e49de8c0d677b1b"
noncomputable section
open scoped ENNReal MeasureTheory Topology
open Set MeasureTheory Filter Measure
namespace MeasureTheory
se... | Mathlib/MeasureTheory/Integral/Layercake.lean | 105 | 183 | theorem lintegral_comp_eq_lintegral_meas_le_mul_of_measurable_of_sigmaFinite
(μ : Measure α) [SigmaFinite μ]
(f_nn : 0 ≤ f) (f_mble : Measurable f)
(g_intble : ∀ t > 0, IntervalIntegrable g volume 0 t) (g_mble : Measurable g)
(g_nn : ∀ t > 0, 0 ≤ g t) :
∫⁻ ω, ENNReal.ofReal (∫ t in (0)..f ω, g t) ∂μ... |
have g_intble' : ∀ t : ℝ, 0 ≤ t → IntervalIntegrable g volume 0 t := by
intro t ht
cases' eq_or_lt_of_le ht with h h
· simp [← h]
· exact g_intble t h
have integrand_eq : ∀ ω,
ENNReal.ofReal (∫ t in (0)..f ω, g t) = ∫⁻ t in Ioc 0 (f ω), ENNReal.ofReal (g t) := by
intro ω
have g_ae_nn ... | [] | [
" {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}}.Countable",
" {t | μ {a | t ≤ g a} ≠ μ {a | t < g a}} ⊆ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}",
" t ∈ {x | ∃ z < F x, ∀ (y : R), x < y → F y ≤ z}"
] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Fintype.Vector
import Mathlib.Data.Multiset.Sym
#align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c"
namespace Finset
variable {α : Type*}
@[simps]
protected def sym2 (s : Finset α) : Finset (Sym2 α) :... | Mathlib/Data/Finset/Sym.lean | 69 | 72 | theorem sym2_mono (h : s ⊆ t) : s.sym2 ⊆ t.sym2 := by |
rw [← val_le_iff, sym2_val, sym2_val]
apply Multiset.sym2_mono
rwa [val_le_iff]
| [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ",
" s.sym2 ⊆ t.sym2",
" s.val.sym2 ≤ t.val.sym2",
" s.val ≤ t.val"
] | [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ"
] |
import Mathlib.NumberTheory.LegendreSymbol.Basic
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
#align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Values
variable {p : ℕ} [Fact p.Pri... | Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean | 89 | 96 | theorem exists_sq_eq_neg_two_iff : IsSquare (-2 : ZMod p) ↔ p % 8 = 1 ∨ p % 8 = 3 := by |
rw [FiniteField.isSquare_neg_two_iff, card p]
have h₁ := Prime.mod_two_eq_one_iff_ne_two.mpr hp
rw [← mod_mod_of_dvd p (by decide : 2 ∣ 8)] at h₁
have h₂ := mod_lt p (by norm_num : 0 < 8)
revert h₂ h₁
generalize p % 8 = m; clear! p
intros; interval_cases m <;> simp_all -- Porting note (#11043): was `deci... | [
" IsSquare 2 ↔ p % 8 = 1 ∨ p % 8 = 7",
" p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7",
" 2 ∣ 8",
" 0 < 8",
" p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)",
" m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)",
" m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7",
" 0 ≠ 3 ∧ 0 ≠ 5 ↔ 0 = 1... | [
" IsSquare 2 ↔ p % 8 = 1 ∨ p % 8 = 7",
" p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7",
" 2 ∣ 8",
" 0 < 8",
" p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)",
" m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)",
" m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7",
" 0 ≠ 3 ∧ 0 ≠ 5 ↔ 0 = 1... |
import Mathlib.Data.Nat.Squarefree
import Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity
import Mathlib.Tactic.LinearCombination
#align_import number_theory.sum_two_squares from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
section NegOneSquare
-- This could be formulated for ... | Mathlib/NumberTheory/SumTwoSquares.lean | 125 | 138 | theorem ZMod.isSquare_neg_one_iff' {n : ℕ} (hn : Squarefree n) :
IsSquare (-1 : ZMod n) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3 := by |
have help : ∀ a b : ZMod 4, a ≠ 3 → b ≠ 3 → a * b ≠ 3 := by decide
rw [ZMod.isSquare_neg_one_iff hn]
refine ⟨?_, fun H q _ => H⟩
intro H
refine @induction_on_primes _ ?_ ?_ (fun p q hp hq hpq => ?_)
· exact fun _ => by norm_num
· exact fun _ => by norm_num
· replace hp := H hp (dvd_of_mul_right_dvd hpq... | [
" IsSquare (-1)",
" IsSquare (f (-1))",
" IsSquare (-1, -1)",
" IsSquare (x * x, y * y)",
" p % 4 ≠ 3",
" -1 = -1 ^ 2",
" IsSquare (-1) ↔ ∀ {q : ℕ}, q.Prime → q ∣ n → q % 4 ≠ 3",
" -1 = 0 * 0",
" p.Coprime n",
" False",
" IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3",
" ∀ (a b : ZMod 4), a ≠ 3... | [
" IsSquare (-1)",
" IsSquare (f (-1))",
" IsSquare (-1, -1)",
" IsSquare (x * x, y * y)",
" p % 4 ≠ 3",
" -1 = -1 ^ 2",
" IsSquare (-1) ↔ ∀ {q : ℕ}, q.Prime → q ∣ n → q % 4 ≠ 3",
" -1 = 0 * 0",
" p.Coprime n",
" False"
] |
import Mathlib.LinearAlgebra.AffineSpace.Independent
import Mathlib.LinearAlgebra.Basis
#align_import linear_algebra.affine_space.basis from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Affine
open Set
universe u₁ u₂ u₃ u₄
structure AffineBasis (ι : Type u₁) (k : Type u₂) {V ... | Mathlib/LinearAlgebra/AffineSpace/Basis.lean | 182 | 183 | theorem coord_apply [DecidableEq ι] (i j : ι) : b.coord i (b j) = if i = j then 1 else 0 := by |
rcases eq_or_ne i j with h | h <;> simp [h]
| [
" affineSpan k (range id) = ⊤",
" f = g",
" { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g",
" { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }",
" False",
" affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤",
" affineSpan k (range ⇑b) = ⊤",
" ⊤ ≤ S... | [
" affineSpan k (range id) = ⊤",
" f = g",
" { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g",
" { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }",
" False",
" affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤",
" affineSpan k (range ⇑b) = ⊤",
" ⊤ ≤ S... |
import Mathlib.FieldTheory.Minpoly.Field
#align_import ring_theory.power_basis from "leanprover-community/mathlib"@"d1d69e99ed34c95266668af4e288fc1c598b9a7f"
open Polynomial
open Polynomial
variable {R S T : Type*} [CommRing R] [Ring S] [Algebra R S]
variable {A B : Type*} [CommRing A] [CommRing B] [IsDomain B]... | Mathlib/RingTheory/PowerBasis.lean | 105 | 116 | theorem mem_span_pow {x y : S} {d : ℕ} (hd : d ≠ 0) :
y ∈ Submodule.span R (Set.range fun i : Fin d => x ^ (i : ℕ)) ↔
∃ f : R[X], f.natDegree < d ∧ y = aeval x f := by |
rw [mem_span_pow']
constructor <;>
· rintro ⟨f, h, hy⟩
refine ⟨f, ?_, hy⟩
by_cases hf : f = 0
· simp only [hf, natDegree_zero, degree_zero] at h ⊢
first | exact lt_of_le_of_ne (Nat.zero_le d) hd.symm | exact WithBot.bot_lt_coe d
simp_all only [degree_eq_natDegree hf]
· fir... | [
" FiniteDimensional.finrank R S = pb.dim",
" y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f",
" (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)",
" (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)",
" (∃ y, x ^ ↑y = n) ↔... | [
" FiniteDimensional.finrank R S = pb.dim",
" y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, f.degree < ↑d ∧ y = (aeval x) f",
" (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)",
" (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)",
" (∃ y, x ^ ↑y = n) ↔... |
import Batteries.Tactic.Alias
import Batteries.Data.Nat.Basic
namespace Nat
@[simp] theorem recAux_zero {motive : Nat → Sort _} (zero : motive 0)
(succ : ∀ n, motive n → motive (n+1)) :
Nat.recAux zero succ 0 = zero := rfl
theorem recAux_succ {motive : Nat → Sort _} (zero : motive 0)
(succ : ∀ n, mo... | .lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean | 81 | 86 | theorem recDiag_succ_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
(zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
(succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m) :
Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m+1) 0
= succ_z... |
simp [Nat.recDiag]; cases m <;> rfl
| [
" Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1\nind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n\nt : Nat\n| Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1 ind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n t : N... | [
" Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1\nind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n\nt : Nat\n| Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1 ind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n t : N... |
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 | 84 | 86 | theorem not_acc_of_decreasing_seq (f : ((· > ·) : ℕ → ℕ → Prop) ↪r r) (k : ℕ) : ¬Acc r (f k) := by |
rw [acc_iff_no_decreasing_seq, not_isEmpty_iff]
exact ⟨⟨f, k, rfl⟩⟩
| [
" ∃ 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.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563... | Mathlib/NumberTheory/FunctionField.lean | 62 | 80 | theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
[IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
[IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
FunctionField Fq F ↔ FiniteDimensional Fqt F := by |
let e := IsLocalization.algEquiv Fq[X]⁰ (RatFunc Fq) Fqt
have : ∀ (c) (x : F), e c • x = c • x := by
intro c x
rw [Algebra.smul_def, Algebra.smul_def]
congr
refine congr_fun (f := fun c => algebraMap Fqt F (e c)) ?_ c -- Porting note: Added `(f := _)`
refine IsLocalization.ext (nonZeroDivisors ... | [
" FunctionField Fq F ↔ FiniteDimensional Fqt F",
" ∀ (c : RatFunc Fq) (x : F), e c • x = c • x",
" e c • x = c • x",
" (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x",
" (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c",
" (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu... | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable sec... | Mathlib/RingTheory/IsAdjoinRoot.lean | 132 | 133 | theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by |
rw [h.ker_map, Ideal.mem_span_singleton]
| [
" (algebraMap R S) x = h.map (C x)",
" p ∈ RingHom.ker h.map ↔ f ∣ p"
] | [
" (algebraMap R S) x = h.map (C x)"
] |
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Valuation.PrimeMultiplicity
import Mathlib.RingTheory.AdicCompletion.Basic
#align_import ring_theory.discrete_valuation_ring.basic from "leanprover-community/mathlib"@"c163ec99dfc664628ca15d215fce0a5b9c2... | Mathlib/RingTheory/DiscreteValuationRing/Basic.lean | 148 | 151 | theorem associated_of_irreducible {a b : R} (ha : Irreducible a) (hb : Irreducible b) :
Associated a b := by |
rw [irreducible_iff_uniformizer] at ha hb
rw [← span_singleton_eq_span_singleton, ← ha, hb]
| [
" Irreducible ϖ",
" ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b",
" IsUnit a ∨ IsUnit b",
" False",
" a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))",
" ϖ = 0",
" ϖ * (a * b) ≠ 1",
" maximalIdeal R = ⊥",
" ∃ ϖ, Irreducible ϖ",
" ∃ ϖ, maximalIdeal R = span {ϖ}",
" DiscreteValuationRing R ↔ IsPrincipalIdeal... | [
" Irreducible ϖ",
" ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b",
" IsUnit a ∨ IsUnit b",
" False",
" a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))",
" ϖ = 0",
" ϖ * (a * b) ≠ 1",
" maximalIdeal R = ⊥",
" ∃ ϖ, Irreducible ϖ",
" ∃ ϖ, maximalIdeal R = span {ϖ}",
" DiscreteValuationRing R ↔ IsPrincipalIdeal... |
import Mathlib.Init.Algebra.Classes
import Mathlib.Init.Data.Ordering.Basic
#align_import init.data.ordering.lemmas from "leanprover-community/lean"@"4bd314f7bd5e0c9e813fc201f1279a23f13f9f1d"
universe u
namespace Ordering
@[simp]
theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) :
((if c th... | Mathlib/Init/Data/Ordering/Lemmas.lean | 26 | 28 | theorem ite_eq_eq_distrib (c : Prop) [Decidable c] (a b : Ordering) :
((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq := by |
by_cases c <;> simp [*]
| [
" ((if c then a else b) = lt) = if c then a = lt else b = lt",
" ((if c then a else b) = eq) = if c then a = eq else b = eq"
] | [
" ((if c then a else b) = lt) = if c then a = lt else b = lt"
] |
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Analysis.NormedSpace.Dual
import Mathlib.Analysis.NormedSpace.Star.Basic
#align_import analysis.inner_product_space.dual from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped Classical
o... | Mathlib/Analysis/InnerProductSpace/Dual.lean | 94 | 99 | theorem ext_inner_right_basis {ι : Type*} {x y : E} (b : Basis ι 𝕜 E)
(h : ∀ i : ι, ⟪x, b i⟫ = ⟪y, b i⟫) : x = y := by |
refine ext_inner_left_basis b fun i => ?_
rw [← inner_conj_symm]
conv_rhs => rw [← inner_conj_symm]
exact congr_arg conj (h i)
| [
" x = y",
" (toDualMap 𝕜 E) x = (toDualMap 𝕜 E) y",
" ∀ (i : ι), ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ((toDualMap 𝕜 E) x) (b i) = ((toDualMap 𝕜 E) y) (b i)",
" ⟪x, b i⟫_𝕜 = ⟪y, b i⟫_𝕜",
" (starRingEnd 𝕜) ⟪b i, ... | [
" x = y",
" (toDualMap 𝕜 E) x = (toDualMap 𝕜 E) y",
" ∀ (i : ι), ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ((toDualMap 𝕜 E) x) (b i) = ((toDualMap 𝕜 E) y) (b i)",
" ⟪x, b i⟫_𝕜 = ⟪y, b i⟫_𝕜",
" (starRingEnd 𝕜) ⟪b i, ... |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.PUnitInstances
import Mathlib.GroupTheory.Congruence.Basic
open FreeMonoid Function List Set
namespace Monoid
@[to_additive "The minimal additive congruence relation `c` on `FreeAddMonoid (M ⊕ N)`... | Mathlib/GroupTheory/Coprod/Basic.lean | 189 | 199 | theorem induction_on' {C : M ∗ N → Prop} (m : M ∗ N)
(one : C 1)
(inl_mul : ∀ m x, C x → C (inl m * x))
(inr_mul : ∀ n x, C x → C (inr n * x)) : C m := by |
rcases mk_surjective m with ⟨x, rfl⟩
induction x using FreeMonoid.recOn with
| h0 => exact one
| ih x xs ih =>
cases x with
| inl m => simpa using inl_mul m _ ih
| inr n => simpa using inr_mul n _ ih
| [
" C m",
" C (mk x)",
" C (mk 1)",
" C (mk (of x * xs))",
" C (mk (of (Sum.inl m) * xs))",
" C (mk (of (Sum.inr n) * xs))"
] | [] |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable... | Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 103 | 106 | theorem charpoly_reindex (e : n ≃ m)
(M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly := by |
unfold Matrix.charpoly
rw [charmatrix_reindex, Matrix.det_reindex_self]
| [
" M.charmatrix i i = X - C (M i i)",
" M.charmatrix i j = -C (M i j)",
" matPolyEquiv M.charmatrix = X - C M",
" (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j",
" (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j",
" (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i... | [
" M.charmatrix i i = X - C (M i i)",
" M.charmatrix i j = -C (M i j)",
" matPolyEquiv M.charmatrix = X - C M",
" (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j",
" (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j",
" (M.charmatrix i i).coeff k = (X.coeff k - (C M).coeff k) i i... |
import Mathlib.Init.Data.Sigma.Lex
import Mathlib.Data.Prod.Lex
import Mathlib.Data.Sigma.Lex
import Mathlib.Order.Antichain
import Mathlib.Order.OrderIsoNat
import Mathlib.Order.WellFounded
import Mathlib.Tactic.TFAE
#align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104... | Mathlib/Order/WellFoundedSet.lean | 345 | 348 | theorem partiallyWellOrderedOn_insert :
PartiallyWellOrderedOn (insert a s) r ↔ PartiallyWellOrderedOn s r := by |
simp only [← singleton_union, partiallyWellOrderedOn_union,
partiallyWellOrderedOn_singleton, true_and_iff]
| [
" (s ∪ t).PartiallyWellOrderedOn r",
" ∃ m n, m < n ∧ r (f m) (f n)",
" (f '' s).PartiallyWellOrderedOn r'",
" ∃ m n, m < n ∧ r' (g' m) (g' n)",
" ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)",
" s.Finite",
" False",
" s.PartiallyWellOrderedOn r",
" (insert a s).PartiallyWellOrderedOn r ↔ s.PartiallyWe... | [
" (s ∪ t).PartiallyWellOrderedOn r",
" ∃ m n, m < n ∧ r (f m) (f n)",
" (f '' s).PartiallyWellOrderedOn r'",
" ∃ m n, m < n ∧ r' (g' m) (g' n)",
" ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)",
" s.Finite",
" False",
" s.PartiallyWellOrderedOn r"
] |
import Mathlib.Algebra.Algebra.Tower
#align_import algebra.algebra.restrict_scalars from "leanprover-community/mathlib"@"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf"
variable (R S M A : Type*)
@[nolint unusedArguments]
def RestrictScalars (_R _S M : Type*) : Type _ := M
#align restrict_scalars RestrictScalars
ins... | Mathlib/Algebra/Algebra/RestrictScalars.lean | 175 | 179 | theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :
(RestrictScalars.addEquiv R S M).symm ((r • s) • x) =
r • (RestrictScalars.addEquiv R S M).symm (s • x) := by |
rw [Algebra.smul_def, mul_smul]
rfl
| [
" (r • S) • M = r • S • M",
" (algebraMap R S✝) r • S • M = r • S • M",
" (addEquiv R S M).symm ((r • s) • x) = r • (addEquiv R S M).symm (s • x)",
" (addEquiv R S M).symm ((algebraMap R S) r • s • x) = r • (addEquiv R S M).symm (s • x)"
] | [
" (r • S) • M = r • S • M",
" (algebraMap R S✝) r • S • M = r • S • M"
] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Data.Nat.Cast.Order
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Nat.Cast.Order
#align_import data.nat.choose.bounds from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
open Nat
variable {α : Type*} [LinearOrderedSemif... | Mathlib/Data/Nat/Choose/Bounds.lean | 41 | 46 | theorem pow_le_choose (r n : ℕ) : ((n + 1 - r : ℕ) ^ r : α) / r ! ≤ n.choose r := by |
rw [div_le_iff']
· norm_cast
rw [← Nat.descFactorial_eq_factorial_mul_choose]
exact n.pow_sub_le_descFactorial r
exact mod_cast r.factorial_pos
| [
" ↑(n.choose r) ≤ ↑n ^ r / ↑r !",
" ↑r ! * ↑(n.choose r) ≤ ↑n ^ r",
" r ! * n.choose r ≤ n ^ r",
" n.descFactorial r ≤ n ^ r",
" 0 < ↑r !",
" ↑(n + 1 - r) ^ r / ↑r ! ≤ ↑(n.choose r)",
" ↑(n + 1 - r) ^ r ≤ ↑r ! * ↑(n.choose r)",
" (n + 1 - r) ^ r ≤ r ! * n.choose r",
" (n + 1 - r) ^ r ≤ n.descFactori... | [
" ↑(n.choose r) ≤ ↑n ^ r / ↑r !",
" ↑r ! * ↑(n.choose r) ≤ ↑n ^ r",
" r ! * n.choose r ≤ n ^ r",
" n.descFactorial r ≤ n ^ r",
" 0 < ↑r !"
] |
import Mathlib.Algebra.Group.Defs
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
universe u
variable {α : Type u}
class Invertible [Mul α] [One α] (a : α) : Type u where
invOf... | Mathlib/Algebra/Group/Invertible/Defs.lean | 136 | 137 | theorem mul_invOf_mul_self_cancel [Monoid α] (a b : α) [Invertible b] : a * ⅟ b * b = a := by |
simp [mul_assoc]
| [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a"
] | [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b",
" a * ⅟b * b = a"
] |
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped NNReal Matrix
namespace Matrix
variable {R l m n α β : Type*} [Fintype l] [Fintyp... | Mathlib/Analysis/Matrix.lean | 94 | 95 | theorem nnnorm_le_iff {r : ℝ≥0} {A : Matrix m n α} : ‖A‖₊ ≤ r ↔ ∀ i j, ‖A i j‖₊ ≤ r := by |
simp_rw [nnnorm_def, pi_nnnorm_le_iff]
| [
" ‖A‖ = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => ‖A i j‖₊)",
" ‖A‖ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖ ≤ r",
" ‖A‖₊ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖₊ ≤ r"
] | [
" ‖A‖ = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => ‖A i j‖₊)",
" ‖A‖ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖ ≤ r"
] |
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Order.Filter.Subsingleton
open Set
variable {α β γ δ : Type*} {l : Filter α} {f : α → β}
namespace Filter
def EventuallyConst (f : α → β) (l : Filter α) : Prop := (map f l).Subsingleton
theorem HasBasis.eventuallyConst_iff {ι : Sort*} {p : ι → Prop} {s : ι → S... | Mathlib/Order/Filter/EventuallyConst.lean | 61 | 63 | theorem eventuallyConst_pred {p : α → Prop} :
EventuallyConst p l ↔ (∀ᶠ x in l, p x) ∨ (∀ᶠ x in l, ¬p x) := by |
simp [eventuallyConst_pred', or_comm, EventuallyEq]
| [
" (∃ i, p i ∧ (f '' s i).Subsingleton) ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y",
" EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True",
" EventuallyConst p l ↔ (∀ᶠ (x : α) in l, p x) ∨ ∀ᶠ (x : α) in l, ¬p x"
] | [
" (∃ i, p i ∧ (f '' s i).Subsingleton) ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y",
" EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True"
] |
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Data.List.Rotate
#align_import combinatorics.simple_graph.connectivity from "leanprover-community/mathlib"@"b99e2d58a5e6861833fa8de11e51a81144258db4"
open Function
universe u v w
namespace SimpleGraph
variable {V : Type u} {V' : Type v} {V'' : Typ... | Mathlib/Combinatorics/SimpleGraph/Connectivity.lean | 153 | 156 | theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v) (hw : w' = w) :
Walk.cons h (p.copy hv hw) = (Walk.cons (hv ▸ h) p).copy rfl hw := by |
subst_vars
rfl
| [
" (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯",
" (p.copy ⋯ ⋯).copy ⋯ ⋯ = p.copy ⋯ ⋯",
" nil.copy hu hu = nil",
" nil.copy ⋯ ⋯ = nil",
" (cons h p).copy hu hw = cons ⋯ (p.copy ⋯ hw)",
" (cons h p).copy ⋯ ⋯ = cons ⋯ (p.copy ⋯ ⋯)",
" cons h (p.copy hv hw) = (cons ⋯ p).copy ⋯ hw",
" cons h (p.copy ⋯ ⋯) = (c... | [
" (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯",
" (p.copy ⋯ ⋯).copy ⋯ ⋯ = p.copy ⋯ ⋯",
" nil.copy hu hu = nil",
" nil.copy ⋯ ⋯ = nil",
" (cons h p).copy hu hw = cons ⋯ (p.copy ⋯ hw)",
" (cons h p).copy ⋯ ⋯ = cons ⋯ (p.copy ⋯ ⋯)"
] |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ι : Type*} [Fintype ι]
variable {M : Type*} [AddCommGroup M] (R : Type*) [Co... | Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 114 | 121 | theorem Matrix.Represents.mul {A A' : Matrix ι ι R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A * A').Represents b (f * f') := by |
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_mul]
ext
dsimp [PiToModule.fromEnd]
rw [← h'.congr_fun, ← h.congr_fun]
rfl
| [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i",
"... | [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i",
"... |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Data.Complex.Determinant
#align_import analysis.complex.operator_norm from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
open ContinuousLinearMap
namespace Complex
@[simp... | Mathlib/Analysis/Complex/OperatorNorm.lean | 50 | 54 | theorem imCLM_norm : ‖imCLM‖ = 1 :=
le_antisymm (LinearMap.mkContinuous_norm_le _ zero_le_one _) <|
calc
1 = ‖imCLM I‖ := by | simp
_ ≤ ‖imCLM‖ := unit_le_opNorm _ _ (by simp)
| [
" 1 = ‖reCLM 1‖",
" ‖1‖ ≤ 1",
" 1 = ‖imCLM I‖",
" ‖I‖ ≤ 1"
] | [
" 1 = ‖reCLM 1‖",
" ‖1‖ ≤ 1"
] |
import Mathlib.Algebra.Polynomial.Degree.Lemmas
open Polynomial
namespace Mathlib.Tactic.ComputeDegree
section recursion_lemmas
variable {R : Type*}
section semiring
variable [Semiring R]
theorem natDegree_C_le (a : R) : natDegree (C a) ≤ 0 := (natDegree_C a).le
theorem natDegree_natCast_le (n : ℕ) : natDeg... | Mathlib/Tactic/ComputeDegree.lean | 157 | 165 | theorem degree_eq_of_le_of_coeff_ne_zero' {deg m o : WithBot ℕ} {c : R} {p : R[X]}
(h_deg_le : degree p ≤ m) (coeff_eq : coeff p (WithBot.unbot' 0 deg) = c)
(coeff_ne_zero : c ≠ 0) (deg_eq_deg : m = deg) (coeff_eq_deg : o = deg) :
degree p = deg := by |
subst coeff_eq coeff_eq_deg deg_eq_deg
rcases eq_or_ne m ⊥ with rfl|hh
· exact bot_unique h_deg_le
· obtain ⟨m, rfl⟩ := WithBot.ne_bot_iff_exists.mp hh
exact degree_eq_of_le_of_coeff_ne_zero ‹_› ‹_›
| [
" (f + g).coeff n = a + b",
" (f + g).coeff n = f.coeff n + g.coeff n",
" (f * g).coeff d = if d = df + dg then a * b else 0",
" (f * g).coeff d = a * b",
" (f * g).coeff (df + dg) = f.coeff df * g.coeff dg",
" (f * g).coeff d = 0",
" (f * g).natDegree < d",
" (f * g).natDegree ≤ df + dg",
" df + dg... | [
" (f + g).coeff n = a + b",
" (f + g).coeff n = f.coeff n + g.coeff n",
" (f * g).coeff d = if d = df + dg then a * b else 0",
" (f * g).coeff d = a * b",
" (f * g).coeff (df + dg) = f.coeff df * g.coeff dg",
" (f * g).coeff d = 0",
" (f * g).natDegree < d",
" (f * g).natDegree ≤ df + dg",
" df + dg... |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 128 | 130 | theorem Periodic.const_inv_smul₀ [AddCommMonoid α] [DivisionSemiring γ] [Module γ α]
(h : Periodic f c) (a : γ) : Periodic (fun x => f (a⁻¹ • x)) (a • c) := by |
simpa only [inv_inv] using h.const_smul₀ a⁻¹
| [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... | [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... |
import Mathlib.Data.Int.Order.Units
import Mathlib.Data.ZMod.IntUnitsPower
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
import Mathlib.Algebra.DirectSum.Algebra
suppress_compilation
open scoped TensorProduct DirectSum
variable {R ι A B : Type*}
namespace Tens... | Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean | 111 | 114 | theorem gradedComm_symm : (gradedComm R 𝒜 ℬ).symm = gradedComm R ℬ 𝒜 := by |
rw [gradedComm, gradedComm, LinearEquiv.trans_symm, LinearEquiv.symm_symm]
ext
rfl
| [
" (⨁ (i : ι × ι), 𝒜 i.1 ⊗[R] ℬ i.2) →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" 𝒜 i.1 ⊗[R] ℬ i.2 →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" (gradedCommAux R 𝒜 ℬ) ((lof R (ι × ι) (fun i => 𝒜 i.1 ⊗[R] ℬ i.2) (i, j)) (a ⊗ₜ[R] b)) =\n (-1) ^ (j * i) • (lof R (ι × ι) (fun i => ℬ i.1 ⊗[R] 𝒜 i.2) (j, i)) (b ⊗ₜ[... | [
" (⨁ (i : ι × ι), 𝒜 i.1 ⊗[R] ℬ i.2) →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" 𝒜 i.1 ⊗[R] ℬ i.2 →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" (gradedCommAux R 𝒜 ℬ) ((lof R (ι × ι) (fun i => 𝒜 i.1 ⊗[R] ℬ i.2) (i, j)) (a ⊗ₜ[R] b)) =\n (-1) ^ (j * i) • (lof R (ι × ι) (fun i => ℬ i.1 ⊗[R] 𝒜 i.2) (j, i)) (b ⊗ₜ[... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.GroupWithZero.Units.Equiv
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Order.Bounds.OrderIso
import Mathlib.Tactic.Positivity.Core
#align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477... | Mathlib/Algebra/Order/Field/Basic.lean | 674 | 675 | theorem div_le_iff_of_neg' (hc : c < 0) : b / c ≤ a ↔ c * a ≤ b := by |
rw [mul_comm, div_le_iff_of_neg hc]
| [
" 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0",
" a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b",
" 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0",
" a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b",
" b / c ≤ a ↔ c * a ≤ b"
] | [
" 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0",
" a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b",
" 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0",
" a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b"
] |
import Mathlib.Data.Nat.Bitwise
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Game.Impartial
#align_import set_theory.game.nim from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
noncomputable section
universe u
namespace SetTheory
open scoped PGame
namespace PGame... | Mathlib/SetTheory/Game/Nim.lean | 70 | 70 | theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α := by | rw [nim_def]; rfl
| [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... | [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.LinearAlgebra.Matrix.Block
#align_import analysis.inner_product_space.gram_schmidt_ortho from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0"
open Finset Submodule FiniteDimensional
variable (𝕜 : Type*) {E : Type*} [RCLike �... | Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean | 68 | 72 | theorem gramSchmidt_def'' (f : ι → E) (n : ι) :
f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n,
(⟪gramSchmidt 𝕜 f i, f n⟫ / (‖gramSchmidt 𝕜 f i‖ : 𝕜) ^ 2) • gramSchmidt 𝕜 f i := by |
convert gramSchmidt_def' 𝕜 f n
rw [orthogonalProjection_singleton, RCLike.ofReal_pow]
| [
" (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n",
" gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑... | [
" (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n",
" gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))"
] |
import Mathlib.Algebra.Group.Subgroup.Pointwise
import Mathlib.Data.Set.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.GroupTheory.Coset
#align_import group_theory.double_coset from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
-- Porting note: removed import
-- import Mathlib.Tac... | Mathlib/GroupTheory/DoubleCoset.lean | 52 | 57 | theorem doset_eq_of_mem {H K : Subgroup G} {a b : G} (hb : b ∈ doset a H K) :
doset b H K = doset a H K := by |
obtain ⟨h, hh, k, hk, rfl⟩ := mem_doset.1 hb
rw [doset, doset, ← Set.singleton_mul_singleton, ← Set.singleton_mul_singleton, mul_assoc,
mul_assoc, Subgroup.singleton_mul_subgroup hk, ← mul_assoc, ← mul_assoc,
Subgroup.subgroup_mul_singleton hh]
| [
" doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t",
" b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y",
" doset b ↑H ↑K = doset a ↑H ↑K",
" doset (h * a * k) ↑H ↑K = doset a ↑H ↑K"
] | [
" doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t",
" b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y"
] |
import Mathlib.Probability.Kernel.Disintegration.Integral
open MeasureTheory Set Filter MeasurableSpace
open scoped ENNReal MeasureTheory Topology ProbabilityTheory
namespace ProbabilityTheory
variable {α β Ω : Type*} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
[MeasurableSpace Ω] [StandardBorelSpace Ω] ... | Mathlib/Probability/Kernel/Disintegration/Unique.lean | 81 | 124 | theorem eq_condKernel_of_measure_eq_compProd (κ : kernel α Ω) [IsFiniteKernel κ]
(hκ : ρ = ρ.fst ⊗ₘ κ) :
∀ᵐ x ∂ρ.fst, κ x = ρ.condKernel x := by |
-- The idea is to transport the question to `ℝ` from `Ω` using `embeddingReal`
-- and then construct a measure on `α × ℝ`
let f := embeddingReal Ω
have hf := measurableEmbedding_embeddingReal Ω
set ρ' : Measure (α × ℝ) := ρ.map (Prod.map id f) with hρ'def
have hρ' : ρ'.fst = ρ.fst := by
ext s hs
rw... | [
" ∀ᵐ (x : α) ∂ρ.fst, (κ x) s = (ρ.condKernel x) s",
" ∫⁻ (x : α) in t, (κ x) s ∂ρ.fst = ∫⁻ (x : α) in t, (ρ.condKernel x) s ∂ρ.fst",
"α : Type u_1\nβ : Type u_2\nΩ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : StandardBorelSpace Ω\ninst✝² : Nonempty Ω\nρ : Meas... | [
" ∀ᵐ (x : α) ∂ρ.fst, (κ x) s = (ρ.condKernel x) s",
" ∫⁻ (x : α) in t, (κ x) s ∂ρ.fst = ∫⁻ (x : α) in t, (ρ.condKernel x) s ∂ρ.fst",
"α : Type u_1\nβ : Type u_2\nΩ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : StandardBorelSpace Ω\ninst✝² : Nonempty Ω\nρ : Meas... |
import Mathlib.Control.Functor.Multivariate
import Mathlib.Data.PFunctor.Univariate.Basic
#align_import data.pfunctor.multivariate.basic from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
universe u v
open MvFunctor
@[pp_with_univ]
structure MvPFunctor (n : ℕ) where
A : Type u
... | Mathlib/Data/PFunctor/Multivariate/Basic.lean | 173 | 179 | theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
@LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) := by |
simp only [liftP_iff, Sigma.mk.inj_iff]; constructor
· rintro ⟨_, _, ⟨⟩, _⟩
assumption
· intro
repeat' first |constructor|assumption
| [
" get (f <$$> x) = (fun i x => f <$$> x) <$$> get x",
" get (mk x) = x",
" mk (get x) = x",
" LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)",
" LiftP p x → ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)",
" ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)"... | [
" get (f <$$> x) = (fun i x => f <$$> x) <$$> get x",
" get (mk x) = x",
" mk (get x) = x",
" LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)",
" LiftP p x → ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)",
" ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)"... |
import Mathlib.Data.Set.Pairwise.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.Data.SetLike.Basic
#align_import order.chain from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open scoped Classical
open Set
variable {α β : Type*}
section Chain
variable (r : α → α → Prop)
... | Mathlib/Order/Chain.lean | 137 | 142 | theorem IsChain.exists3 (hchain : IsChain r s) [IsTrans α r] {a b c} (mem1 : a ∈ s) (mem2 : b ∈ s)
(mem3 : c ∈ s) : ∃ (z : _) (_ : z ∈ s), r a z ∧ r b z ∧ r c z := by |
rcases directedOn_iff_directed.mpr (IsChain.directed hchain) a mem1 b mem2 with ⟨z, mem4, H1, H2⟩
rcases directedOn_iff_directed.mpr (IsChain.directed hchain) z mem4 c mem3 with
⟨z', mem5, H3, H4⟩
exact ⟨z', mem5, _root_.trans H1 H3, _root_.trans H2 H3, H4⟩
| [
" IsChain r univ ↔ IsTrichotomous α r",
" r a b ∨ a = b ∨ r b a",
" ¬a = b → r a b ∨ r b a",
" IsChain (fun x x_1 => x ≤ x_1) (range f)",
" IsChain (fun x x_1 => x ≤ x_1) (f '' univ)",
" ∃ z, r ((fun x => f ↑x) ⟨a, ha⟩) ((fun x => f ↑x) z) ∧ r ((fun x => f ↑x) ⟨b, hb⟩) ((fun x => f ↑x) z)",
" ∃ a ∈ c, r... | [
" IsChain r univ ↔ IsTrichotomous α r",
" r a b ∨ a = b ∨ r b a",
" ¬a = b → r a b ∨ r b a",
" IsChain (fun x x_1 => x ≤ x_1) (range f)",
" IsChain (fun x x_1 => x ≤ x_1) (f '' univ)",
" ∃ z, r ((fun x => f ↑x) ⟨a, ha⟩) ((fun x => f ↑x) z) ∧ r ((fun x => f ↑x) ⟨b, hb⟩) ((fun x => f ↑x) z)",
" ∃ a ∈ c, r... |
import Mathlib.Analysis.InnerProductSpace.Calculus
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.Adjoint
import Mathlib.Analysis.Calculus.LagrangeMultipliers
import Mathlib.LinearAlgebra.Eigenspace.Basic
#align_import analysis.inner_product_space.rayleigh from "leanprover-co... | Mathlib/Analysis/InnerProductSpace/Rayleigh.lean | 119 | 138 | theorem linearly_dependent_of_isLocalExtrOn (hT : IsSelfAdjoint T) {x₀ : F}
(hextr : IsLocalExtrOn T.reApplyInnerSelf (sphere (0 : F) ‖x₀‖) x₀) :
∃ a b : ℝ, (a, b) ≠ 0 ∧ a • x₀ + b • T x₀ = 0 := by |
have H : IsLocalExtrOn T.reApplyInnerSelf {x : F | ‖x‖ ^ 2 = ‖x₀‖ ^ 2} x₀ := by
convert hextr
ext x
simp [dist_eq_norm]
-- find Lagrange multipliers for the function `T.re_apply_inner_self` and the
-- hypersurface-defining function `fun x ↦ ‖x‖ ^ 2`
obtain ⟨a, b, h₁, h₂⟩ :=
IsLocalExtrOn.exists... | [
" HasStrictFDerivAt T.reApplyInnerSelf (2 • (innerSL ℝ) (T x₀)) x₀",
" 2 • (innerSL ℝ) (T x₀) = (fderivInnerCLM ℝ (T x₀, id x₀)).comp (T.prod (ContinuousLinearMap.id ℝ F))",
" (2 • (innerSL ℝ) (T x₀)) y = ((fderivInnerCLM ℝ (T x₀, id x₀)).comp (T.prod (ContinuousLinearMap.id ℝ F))) y",
" ∃ a b, (a, b) ≠ 0 ∧ a... | [
" HasStrictFDerivAt T.reApplyInnerSelf (2 • (innerSL ℝ) (T x₀)) x₀",
" 2 • (innerSL ℝ) (T x₀) = (fderivInnerCLM ℝ (T x₀, id x₀)).comp (T.prod (ContinuousLinearMap.id ℝ F))",
" (2 • (innerSL ℝ) (T x₀)) y = ((fderivInnerCLM ℝ (T x₀, id x₀)).comp (T.prod (ContinuousLinearMap.id ℝ F))) y"
] |
import Mathlib.Data.List.Cycle
import Mathlib.GroupTheory.Perm.Cycle.Type
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.concrete from "leanprover-community/mathlib"@"00638177efd1b2534fc5269363ebf42a7871df9a"
open Equiv Equiv.Perm List
variable {α : Type*}
namespace List
variable [D... | Mathlib/GroupTheory/Perm/Cycle/Concrete.lean | 105 | 117 | theorem cycleType_formPerm (hl : Nodup l) (hn : 2 ≤ l.length) :
cycleType l.attach.formPerm = {l.length} := by |
rw [← length_attach] at hn
rw [← nodup_attach] at hl
rw [cycleType_eq [l.attach.formPerm]]
· simp only [map, Function.comp_apply]
rw [support_formPerm_of_nodup _ hl, card_toFinset, dedup_eq_self.mpr hl]
· simp
· intro x h
simp [h, Nat.succ_le_succ_iff] at hn
· simp
· simpa using isCycle_f... | [
" l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'",
" (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False",
" (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False",
" False",
" (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ... | [
" l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'",
" (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False",
" (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False",
" False",
" (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ... |
import Mathlib.Algebra.MvPolynomial.Degrees
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v w
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/Variables.lean | 102 | 105 | theorem mem_support_not_mem_vars_zero {f : MvPolynomial σ R} {x : σ →₀ ℕ} (H : x ∈ f.support)
{v : σ} (h : v ∉ vars f) : x v = 0 := by |
contrapose! h
exact (mem_vars v).mpr ⟨x, H, Finsupp.mem_support_iff.mpr h⟩
| [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support",
" x v = 0",
" v ∈ f.vars"
] | [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support"
] |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.Topology.ContinuousFunction.Basic
import Mathlib.Topology.Algebra.Module.Basic
#align_import topology.algebra.continuous_affine_map from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901fe9326d83"
structure ContinuousAffineMap (R : T... | Mathlib/Topology/Algebra/ContinuousAffineMap.lean | 127 | 129 | theorem mk_coe (f : P →ᴬ[R] Q) (h) : (⟨(f : P →ᵃ[R] Q), h⟩ : P →ᴬ[R] Q) = f := by |
ext
rfl
| [
" f = g",
" { toAffineMap := toAffineMap✝, cont := cont✝ } = g",
" { toAffineMap := toAffineMap✝¹, cont := cont✝¹ } = { toAffineMap := toAffineMap✝, cont := cont✝ }",
" f a = g a",
" { toAffineMap := f.toAffineMap, cont := h } = f",
" { toAffineMap := f.toAffineMap, cont := h } x✝ = f x✝"
] | [
" f = g",
" { toAffineMap := toAffineMap✝, cont := cont✝ } = g",
" { toAffineMap := toAffineMap✝¹, cont := cont✝¹ } = { toAffineMap := toAffineMap✝, cont := cont✝ }",
" f a = g a"
] |
import Mathlib.Topology.Bases
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Compactness.SigmaCompact
open Set Filter Topology TopologicalSpace
universe u v
variable {X : Type u} {Y : Type v} {ι : Type*}
variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X}
section Lindelof
def I... | Mathlib/Topology/Compactness/Lindelof.lean | 69 | 75 | theorem IsLindelof.induction_on (hs : IsLindelof s) {p : Set X → Prop}
(hmono : ∀ ⦃s t⦄, s ⊆ t → p t → p s)
(hcountable_union : ∀ (S : Set (Set X)), S.Countable → (∀ s ∈ S, p s) → p (⋃₀ S))
(hnhds : ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, p t) : p s := by |
let f : Filter X := ofCountableUnion p hcountable_union (fun t ht _ hsub ↦ hmono hsub ht)
have : sᶜ ∈ f := hs.compl_mem_sets_of_nhdsWithin (by simpa [f] using hnhds)
rwa [← compl_compl s]
| [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f",
" p s",
" ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f"
] | [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f"
] |
import Mathlib.Topology.Sheaves.PUnit
import Mathlib.Topology.Sheaves.Stalks
import Mathlib.Topology.Sheaves.Functors
#align_import topology.sheaves.skyscraper from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open TopologicalSpace TopCat CategoryTheory CategoryT... | Mathlib/Topology/Sheaves/Skyscraper.lean | 100 | 107 | theorem SkyscraperPresheafFunctor.map'_comp {a b c : C} (f : a ⟶ b) (g : b ⟶ c) :
SkyscraperPresheafFunctor.map' p₀ (f ≫ g) =
SkyscraperPresheafFunctor.map' p₀ f ≫ SkyscraperPresheafFunctor.map' p₀ g := by |
ext U
-- Porting note: change `simp` to `rw`
rw [NatTrans.comp_app]
simp only [SkyscraperPresheafFunctor.map'_app]
split_ifs with h <;> aesop_cat
| [
" (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V",
" (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C",
" { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n map := fun {U V} i =>\n if h : p₀ ∈ V.unop then eqToHom ⋯\n ... | [
" (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V",
" (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C",
" { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n map := fun {U V} i =>\n if h : p₀ ∈ V.unop then eqToHom ⋯\n ... |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.symmetric from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable ... | Mathlib/Analysis/InnerProductSpace/Symmetric.lean | 142 | 156 | theorem isSymmetric_iff_inner_map_self_real (T : V →ₗ[ℂ] V) :
IsSymmetric T ↔ ∀ v : V, conj ⟪T v, v⟫_ℂ = ⟪T v, v⟫_ℂ := by |
constructor
· intro hT v
apply IsSymmetric.conj_inner_sym hT
· intro h x y
rw [← inner_conj_symm x (T y)]
rw [inner_map_polarization T x y]
simp only [starRingEnd_apply, star_div', star_sub, star_add, star_mul]
simp only [← starRingEnd_apply]
rw [h (x + y), h (x - y), h (x + Complex.I • y... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T",
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T",
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T... |
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 _⟩
theorem swap_then (o₁ o₂ : Ordering) : (o₁.then... | .lake/packages/batteries/Batteries/Classes/Order.lean | 26 | 27 | theorem then_eq_gt {o₁ o₂ : Ordering} : o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt := by |
cases o₁ <;> cases o₂ <;> decide
| [
" 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₁.then o₂ = lt ↔ ... | [
" 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₁.then o₂ = lt ↔ ... |
import Mathlib.Computability.Encoding
import Mathlib.Logic.Small.List
import Mathlib.ModelTheory.Syntax
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import model_theory.encoding from "leanprover-community/mathlib"@"91288e351d51b3f0748f0a38faa7613fb0ae2ada"
universe u v w u' v'
namespace FirstOrder
namespace... | Mathlib/ModelTheory/Encoding.lean | 67 | 98 | theorem listDecode_encode_list (l : List (L.Term α)) :
listDecode (l.bind listEncode) = l.map Option.some := by |
suffices h : ∀ (t : L.Term α) (l : List (Sum α (Σi, L.Functions i))),
listDecode (t.listEncode ++ l) = some t::listDecode l by
induction' l with t l lih
· rfl
· rw [cons_bind, h t (l.bind listEncode), lih, List.map]
intro t
induction' t with a n f ts ih <;> intro l
· rw [listEncode, singleton... | [
" listDecode (l.bind listEncode) = List.map some l",
" listDecode ([].bind listEncode) = List.map some []",
" listDecode ((t :: l).bind listEncode) = List.map some (t :: l)",
" ∀ (t : L.Term α) (l : List (α ⊕ (i : ℕ) × L.Functions i)), listDecode (t.listEncode ++ l) = some t :: listDecode l",
" ∀ (l : List ... | [] |
import Mathlib.Data.Multiset.Nodup
import Mathlib.Data.List.NatAntidiagonal
#align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
namespace Nat
def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) :=
List.Nat.antidiagonal n
#align... | Mathlib/Data/Multiset/NatAntidiagonal.lean | 59 | 61 | theorem antidiagonal_succ {n : ℕ} :
antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) := by |
simp only [antidiagonal, List.Nat.antidiagonal_succ, map_coe, cons_coe]
| [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" card (antidiagonal n) = n + 1",
" antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)"
] | [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" card (antidiagonal n) = n + 1"
] |
import Mathlib.Analysis.Convex.Slope
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Tactic.LinearCombination
#align_import analysis.convex.specific_functions.basic from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
open Real Set NNReal
theorem strictConvexOn_exp : St... | Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean | 67 | 94 | theorem strictConcaveOn_log_Ioi : StrictConcaveOn ℝ (Ioi 0) log := by |
apply strictConcaveOn_of_slope_strict_anti_adjacent (convex_Ioi (0 : ℝ))
intro x y z (hx : 0 < x) (hz : 0 < z) hxy hyz
have hy : 0 < y := hx.trans hxy
trans y⁻¹
· have h : 0 < z - y := by linarith
rw [div_lt_iff h]
have hyz' : 0 < z / y := by positivity
have hyz'' : z / y ≠ 1 := by
contrapo... | [
" StrictConvexOn ℝ univ rexp",
" ∀ {x y z : ℝ}, x ∈ univ → z ∈ univ → x < y → y < z → (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < rexp y",
" 0 < y - x",
" x - y < 0",
" rexp y - rexp x < rexp y ... | [
" StrictConvexOn ℝ univ rexp",
" ∀ {x y z : ℝ}, x ∈ univ → z ∈ univ → x < y → y < z → (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < (rexp z - rexp y) / (z - y)",
" (rexp y - rexp x) / (y - x) < rexp y",
" 0 < y - x",
" x - y < 0",
" rexp y - rexp x < rexp y ... |
import Mathlib.LinearAlgebra.Dimension.Basic
import Mathlib.SetTheory.Cardinal.ToNat
#align_import linear_algebra.finrank from "leanprover-community/mathlib"@"347636a7a80595d55bedf6e6fbd996a3c39da69a"
universe u v w
open Cardinal Submodule Module Function
variable {R : Type u} {M : Type v} {N : Type w}
variable... | Mathlib/LinearAlgebra/Dimension/Finrank.lean | 58 | 61 | theorem finrank_eq_of_rank_eq {n : ℕ} (h : Module.rank R M = ↑n) : finrank R M = n := by |
apply_fun toNat at h
rw [toNat_natCast] at h
exact mod_cast h
| [
" finrank R M = n"
] | [] |
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.Derivation.Basic
#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"b608348ffaeb7f557f2fd46876037abafd326ff3"
namespace MvPolynomial
noncomputable section
variable {σ R A : Type*} [CommSemiring R] [AddCommMonoi... | Mathlib/Algebra/MvPolynomial/Derivation.lean | 96 | 114 | theorem leibniz_iff_X (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
(∀ p q, D (p * q) = p • D q + q • D p) ↔ ∀ s i, D (monomial s 1 * X i) =
(monomial s 1 : MvPolynomial σ R) • D (X i) + (X i : MvPolynomial σ R) • D (monomial s 1) := by |
refine ⟨fun H p i => H _ _, fun H => ?_⟩
have hC : ∀ r, D (C r) = 0 := by intro r; rw [C_eq_smul_one, D.map_smul, h₁, smul_zero]
have : ∀ p i, D (p * X i) = p • D (X i) + (X i : MvPolynomial σ R) • D p := by
intro p i
induction' p using MvPolynomial.induction_on' with s r p q hp hq
· rw [← mul_one r,... | [
" (1 • (Finsupp.single i 1).sum fun i_1 k => (monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) = f i",
" C a • D f = a • D f",
" C a • D f = D (C a * f)",
" (∀ (p q : MvPolynomial σ R), D (p * q) = p • D q + q • D p) ↔\n ∀ (s : σ →₀ ℕ) (i : σ), D ((monomial s) 1 * X i) = (monomial s) 1 • D... | [
" (1 • (Finsupp.single i 1).sum fun i_1 k => (monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) = f i",
" C a • D f = a • D f",
" C a • D f = D (C a * f)"
] |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 61 | 63 | theorem IsPrimitive.ne_zero [Nontrivial R] {p : R[X]} (hp : p.IsPrimitive) : p ≠ 0 := by |
rintro rfl
exact (hp 0 (dvd_zero (C 0))).ne_zero rfl
| [
" p.IsPrimitive",
" IsUnit r",
" r * q.coeff p.natDegree = 1",
" p ≠ 0",
" False"
] | [
" p.IsPrimitive",
" IsUnit r",
" r * q.coeff p.natDegree = 1"
] |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open scoped Classical Topology Filter
open Function Set Filter
variable {𝕜 E : Type*} [NontriviallyNormed... | Mathlib/Analysis/Calculus/Dslope.lean | 114 | 115 | theorem continuousAt_dslope_of_ne (h : b ≠ a) : ContinuousAt (dslope f a) b ↔ ContinuousAt f b := by |
simp only [← continuousWithinAt_univ, continuousWithinAt_dslope_of_ne h]
| [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b",
" ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a",... | [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b",
" ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a",... |
import Mathlib.Data.Setoid.Partition
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.GroupTheory.GroupAction.Pointwise
import Mathlib.GroupTheory.GroupAction.SubMulAction
open scoped BigOperators Pointwise
namespace MulAction
section SMul
variable (G : Type*) {X : Type*} [SMul G X]
-- Change termin... | Mathlib/GroupTheory/GroupAction/Blocks.lean | 107 | 108 | theorem isBlock_singleton (a : X) : IsBlock G ({a} : Set X) := by |
simp [IsBlock.def, Classical.or_iff_not_imp_left]
| [
" IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)",
" IsBlock G B ↔ ∀ (g g' : G), g • B ∩ g' • B ≠ ∅ → g • B = g' • B",
" IsBlock G B",
" IsBlock G ⊥",
" IsBlock G {a}"
] | [
" IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)",
" IsBlock G B ↔ ∀ (g g' : G), g • B ∩ g' • B ≠ ∅ → g • B = g' • B",
" IsBlock G B",
" IsBlock G ⊥"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.HasseDeriv
#align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace Polynomial
open Polynomial... | Mathlib/Algebra/Polynomial/Taylor.lean | 70 | 71 | theorem taylor_monomial (i : ℕ) (k : R) : taylor r (monomial i k) = C k * (X + C r) ^ i := by |
simp [taylor_apply]
| [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... | [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... |
import Mathlib.Data.Finset.Lattice
#align_import data.finset.pairwise from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d"
open Finset
variable {α ι ι' : Type*}
instance [DecidableEq α] {r : α → α → Prop} [DecidableRel r] {s : Finset α} :
Decidable ((s : Set α).Pairwise r) :=
dec... | Mathlib/Data/Finset/Pairwise.lean | 44 | 48 | theorem PairwiseDisjoint.image_finset_of_le [DecidableEq ι] {s : Finset ι} {f : ι → α}
(hs : (s : Set ι).PairwiseDisjoint f) {g : ι → ι} (hf : ∀ a, f (g a) ≤ f a) :
(s.image g : Set ι).PairwiseDisjoint f := by |
rw [coe_image]
exact hs.image_of_le hf
| [
" (Set.range singleton).PairwiseDisjoint id",
" (Disjoint on id) {a} {b}",
" (↑(Finset.image g s)).PairwiseDisjoint f",
" (g '' ↑s).PairwiseDisjoint f"
] | [
" (Set.range singleton).PairwiseDisjoint id",
" (Disjoint on id) {a} {b}"
] |
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 | 183 | 185 | theorem matrix_vecEmpty_coeff {R} (i j) :
@coeff p R (Matrix.vecEmpty i) j = (Matrix.vecEmpty i : ℕ → R) j := by |
rcases i with ⟨_ | _ | _ | _ | i_val, ⟨⟩⟩
| [
" (![] i).coeff j = ![] i j"
] | [] |
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.basis from "leanprover-community/mathlib"@"6c263e4bfc2e6714de30f22178b4d0ca4d149a76"
noncomputable section
open LinearMap Matrix Set Submodule
open Matrix
section BasisToMatrix
variable {ι... | Mathlib/LinearAlgebra/Matrix/Basis.lean | 117 | 122 | theorem toMatrix_smul {R₁ S : Type*} [CommRing R₁] [Ring S] [Algebra R₁ S] [Fintype ι]
[DecidableEq ι] (x : S) (b : Basis ι R₁ S) (w : ι → S) :
(b.toMatrix (x • w)) = (Algebra.leftMulMatrix b x) * (b.toMatrix w) := by |
ext
rw [Basis.toMatrix_apply, Pi.smul_apply, smul_eq_mul, ← Algebra.leftMulMatrix_mulVec_repr]
rfl
| [
" e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)",
" e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝",
" (Pi.basisFun R ι).toMatrix = transpose",
" (Pi.basisFun R ι).toMatrix M i j = Mᵀ i j",
" e.toMatrix ⇑e = 1",
" (fun i j => (e.repr (e j)) i) = 1",
" (e.repr (e j)) i = ... | [
" e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)",
" e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝",
" (Pi.basisFun R ι).toMatrix = transpose",
" (Pi.basisFun R ι).toMatrix M i j = Mᵀ i j",
" e.toMatrix ⇑e = 1",
" (fun i j => (e.repr (e j)) i) = 1",
" (e.repr (e j)) i = ... |
import Mathlib.Topology.Algebra.Module.StrongTopology
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.strong_topology from "leanprover-community/mathlib"@"47b12e7f2502f14001f891ca87fbae2b4acaed3f"
open Topology UniformConvergence
variable {R 𝕜₁ 𝕜₂ E F : Type*}
variab... | Mathlib/Analysis/LocallyConvex/StrongTopology.lean | 47 | 54 | theorem locallyConvexSpace (𝔖 : Set (Set E)) (h𝔖₁ : 𝔖.Nonempty)
(h𝔖₂ : DirectedOn (· ⊆ ·) 𝔖) :
LocallyConvexSpace R (UniformConvergenceCLM σ F 𝔖) := by |
apply LocallyConvexSpace.ofBasisZero _ _ _ _
(UniformConvergenceCLM.hasBasis_nhds_zero_of_basis _ _ _ h𝔖₁ h𝔖₂
(LocallyConvexSpace.convex_basis_zero R F)) _
rintro ⟨S, V⟩ ⟨_, _, hVconvex⟩ f hf g hg a b ha hb hab x hx
exact hVconvex (hf x hx) (hg x hx) ha hb hab
| [
" LocallyConvexSpace R (UniformConvergenceCLM σ F 𝔖)",
" ∀ (i : Set E × Set F), i.1 ∈ 𝔖 ∧ i.2 ∈ 𝓝 0 ∧ Convex R i.2 → Convex R {f | ∀ x ∈ i.1, f x ∈ id i.2}",
" (a • f + b • g) x ∈ id (S, V).2"
] | [] |
import Mathlib.Analysis.BoxIntegral.Box.Basic
import Mathlib.Analysis.SpecificLimits.Basic
#align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Finset Function Filter Metric Classical Topology Filter ENNReal
noncomputable... | Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean | 101 | 103 | theorem upper_sub_lower_splitCenterBox (I : Box ι) (s : Set ι) (i : ι) :
(I.splitCenterBox s).upper i - (I.splitCenterBox s).lower i = (I.upper i - I.lower i) / 2 := by |
by_cases i ∈ s <;> field_simp [splitCenterBox] <;> field_simp [mul_two, two_mul]
| [
" s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i",
" (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2",
" (I.lower i + I.upper i) / 2 < I.upper i",
" I.lower i... | [
" s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i",
" (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2",
" (I.lower i + I.upper i) / 2 < I.upper i",
" I.lower i... |
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*}
theorem powerset_insert (s : Set α) (a : α)... | Mathlib/Data/Set/Image.lean | 666 | 666 | theorem exists_range_iff {p : α → Prop} : (∃ a ∈ range f, p a) ↔ ∃ i, p (f i) := by | simp
| [
" 𝒫 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",
... | [
" 𝒫 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.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 223 | 225 | theorem Right.one_le_inv_iff : 1 ≤ a⁻¹ ↔ a ≤ 1 := by |
rw [← mul_le_mul_iff_right a]
simp
| [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a⁻¹ * a ≤ 1 * a ↔ 1 ≤ a",
" 1 ≤ a⁻¹ ↔ a ≤ 1",
" 1 * a ≤ a⁻¹ * a ↔ a ≤ 1"
] | [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a⁻¹ * a ≤ 1 * a ↔ 1 ≤ a"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Regular.Basic
#align_import algebra.regular.pow from "leanprover-community/mathlib"@"46a64b5b4268c594af770c44d9e502afc6a515cb"
variable {R : Type*} {a b : R}
section Monoid
variable [Monoid R]
| Mathlib/Algebra/Regular/Pow.lean | 31 | 32 | theorem IsLeftRegular.pow (n : ℕ) (rla : IsLeftRegular a) : IsLeftRegular (a ^ n) := by |
simp only [IsLeftRegular, ← mul_left_iterate, rla.iterate n]
| [
" IsLeftRegular (a ^ n)"
] | [] |
import Mathlib.Algebra.Group.Defs
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
universe u
variable {α : Type u}
class Invertible [Mul α] [One α] (a : α) : Type u where
invOf... | Mathlib/Algebra/Group/Invertible/Defs.lean | 128 | 129 | theorem mul_invOf_self_assoc [Monoid α] (a b : α) [Invertible a] : a * (⅟ a * b) = b := by |
rw [← mul_assoc, mul_invOf_self, one_mul]
| [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b"
] | [
" ⅟a * (a * b) = b",
" a * (⅟a * b) = b"
] |
import Mathlib.Algebra.Group.Prod
import Mathlib.Algebra.Group.Units.Equiv
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Logic.Equiv.Set
import Mathlib.Tactic.Common
#align_import group_theory.perm.basic from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd"
universe u v
nam... | Mathlib/GroupTheory/Perm/Basic.lean | 125 | 127 | theorem zpow_apply_comm {α : Type*} (σ : Perm α) (m n : ℤ) {x : α} :
(σ ^ m) ((σ ^ n) x) = (σ ^ n) ((σ ^ m) x) := by |
rw [← Equiv.Perm.mul_apply, ← Equiv.Perm.mul_apply, zpow_mul_comm]
| [
" (σ ^ m) ((σ ^ n) x) = (σ ^ n) ((σ ^ m) x)"
] | [] |
import Mathlib.CategoryTheory.Sites.Spaces
import Mathlib.Topology.Sheaves.Sheaf
import Mathlib.CategoryTheory.Sites.DenseSubsite
#align_import topology.sheaves.sheaf_condition.sites from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
noncomputable section
set_option linter.uppercaseLe... | Mathlib/Topology/Sheaves/SheafCondition/Sites.lean | 161 | 168 | theorem OpenEmbedding.compatiblePreserving (hf : OpenEmbedding f) :
CompatiblePreserving (Opens.grothendieckTopology Y) hf.isOpenMap.functor := by |
haveI : Mono f := (TopCat.mono_iff_injective f).mpr hf.inj
apply compatiblePreservingOfDownwardsClosed
intro U V i
refine ⟨(Opens.map f).obj V, eqToIso <| Opens.ext <| Set.image_preimage_eq_of_subset fun x h ↦ ?_⟩
obtain ⟨_, _, rfl⟩ := i.le h
exact ⟨_, rfl⟩
| [
" presieveOfCoveringAux (coveringOfPresieve Y R) Y = R",
" f ∈ presieveOfCoveringAux (coveringOfPresieve Y R) Y ↔ f ∈ R",
" f ∈ R",
" CompatiblePreserving (Opens.grothendieckTopology ↑Y) ⋯.functor",
" {c : Opens ↑X} → {d : Opens ↑Y} → (d ⟶ ⋯.functor.obj c) → (c' : Opens ↑X) × (⋯.functor.obj c' ≅ d)",
" (c... | [
" presieveOfCoveringAux (coveringOfPresieve Y R) Y = R",
" f ∈ presieveOfCoveringAux (coveringOfPresieve Y R) Y ↔ f ∈ R",
" f ∈ R"
] |
import Mathlib.Algebra.Ring.Int
import Mathlib.Data.ZMod.Basic
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Data.Fintype.BigOperators
#align_import number_theory.sum_four_squares from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc"
open Finset Polynomial FiniteField Equiv
the... | Mathlib/NumberTheory/SumFourSquares.lean | 34 | 42 | theorem Nat.euler_four_squares (a b c d x y z w : ℕ) :
((a : ℤ) * x - b * y - c * z - d * w).natAbs ^ 2 +
((a : ℤ) * y + b * x + c * w - d * z).natAbs ^ 2 +
((a : ℤ) * z - b * w + c * x + d * y).natAbs ^ 2 +
((a : ℤ) * w + b * z - c * y + d * x).natAbs ^ 2 =
(a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) *... |
rw [← Int.natCast_inj]
push_cast
simp only [sq_abs, _root_.euler_four_squares]
| [
" (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)",
" (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c *... | [
" (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)"
] |
import Mathlib.Data.Nat.Bits
import Mathlib.Order.Lattice
#align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
namespace Nat
section
set_option linter.deprecated false
theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n := shiftLeft_eq _
#align nat.... | Mathlib/Data/Nat/Size.lean | 103 | 104 | theorem size_shiftLeft {m} (h : m ≠ 0) (n) : size (m <<< n) = size m + n := by |
simp only [size_shiftLeft' (shiftLeft'_ne_zero_left _ h _), ← shiftLeft'_false]
| [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... |
import Mathlib.Data.Opposite
import Mathlib.Data.Set.Defs
#align_import data.set.opposite from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
variable {α : Type*}
open Opposite
namespace Set
protected def op (s : Set α) : Set αᵒᵖ :=
unop ⁻¹' s
#align set.op Set.op
protected def u... | Mathlib/Data/Set/Opposite.lean | 84 | 88 | theorem singleton_unop (x : αᵒᵖ) : ({x} : Set αᵒᵖ).unop = {unop x} := by |
ext
constructor
· apply op_injective
· apply unop_injective
| [
" { unop := a } ∈ s.op ↔ a ∈ s",
" a.unop ∈ s.unop ↔ a ∈ s",
" {x}.op = {{ unop := x }}",
" x✝ ∈ {x}.op ↔ x✝ ∈ {{ unop := x }}",
" x✝ ∈ {x}.op → x✝ ∈ {{ unop := x }}",
" x✝ ∈ {{ unop := x }} → x✝ ∈ {x}.op",
" {x}.unop = {x.unop}",
" x✝ ∈ {x}.unop ↔ x✝ ∈ {x.unop}",
" x✝ ∈ {x}.unop → x✝ ∈ {x.unop}",
... | [
" { unop := a } ∈ s.op ↔ a ∈ s",
" a.unop ∈ s.unop ↔ a ∈ s",
" {x}.op = {{ unop := x }}",
" x✝ ∈ {x}.op ↔ x✝ ∈ {{ unop := x }}",
" x✝ ∈ {x}.op → x✝ ∈ {{ unop := x }}",
" x✝ ∈ {{ unop := x }} → x✝ ∈ {x}.op"
] |
import Mathlib.Data.Rat.Encodable
import Mathlib.Data.Real.EReal
import Mathlib.Topology.Instances.ENNReal
import Mathlib.Topology.Order.MonotoneContinuity
#align_import topology.instances.ereal from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Class... | Mathlib/Topology/Instances/EReal.lean | 86 | 90 | theorem tendsto_toReal {a : EReal} (ha : a ≠ ⊤) (h'a : a ≠ ⊥) :
Tendsto EReal.toReal (𝓝 a) (𝓝 a.toReal) := by |
lift a to ℝ using ⟨ha, h'a⟩
rw [nhds_coe, tendsto_map'_iff]
exact tendsto_id
| [
" (range Real.toEReal).OrdConnected",
" (Ioo ⊥ ⊤).OrdConnected",
" IsOpen (range Real.toEReal)",
" Tendsto toReal (𝓝 a) (𝓝 a.toReal)",
" Tendsto toReal (𝓝 ↑a) (𝓝 (↑a).toReal)",
" Tendsto (toReal ∘ Real.toEReal) (𝓝 a) (𝓝 (↑a).toReal)"
] | [
" (range Real.toEReal).OrdConnected",
" (Ioo ⊥ ⊤).OrdConnected",
" IsOpen (range Real.toEReal)"
] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
import Mathlib.LinearAlgebra.Matrix.Transvection
import Mathlib.MeasureTheory.Group.LIntegral
import Mathlib.MeasureTheory.Integral.Marginal
import Mathlib.MeasureTheory.Measure.Stiel... | Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean | 659 | 686 | theorem ae_of_mem_of_ae_of_mem_inter_Ioo {μ : Measure ℝ} [NoAtoms μ] {s : Set ℝ} {p : ℝ → Prop}
(h : ∀ a b, a ∈ s → b ∈ s → a < b → ∀ᵐ x ∂μ, x ∈ s ∩ Ioo a b → p x) :
∀ᵐ x ∂μ, x ∈ s → p x := by |
/- By second-countability, we cover `s` by countably many intervals `(a, b)` (except maybe for
two endpoints, which don't matter since `μ` does not have any atom). -/
let T : s × s → Set ℝ := fun p => Ioo p.1 p.2
let u := ⋃ i : ↥s × ↥s, T i
have hfinite : (s \ u).Finite := s.finite_diff_iUnion_Ioo'
obtai... | [
" ∀ᵐ (x : ℝ) ∂μ.restrict s, p x",
" s ⊆ s \\ u ∪ ⋃ p ∈ A, s ∩ T p",
" x ∈ s \\ u ∪ ⋃ p ∈ A, s ∩ T p",
" ∃ p ∈ A, x ∈ T p",
" x ∈ ⋃ p ∈ A, s ∩ T p",
" ∀ᵐ (x : ℝ) ∂μ.restrict (s \\ u ∪ ⋃ p ∈ A, s ∩ T p), p x",
" (∀ᵐ (x : ℝ) ∂μ.restrict (s \\ u), p x) ∧ ∀ i ∈ A, ∀ᵐ (x : ℝ) ∂μ.restrict (s ∩ T i), p x",
" ... | [
" ∀ᵐ (x : ℝ) ∂μ.restrict s, p x",
" s ⊆ s \\ u ∪ ⋃ p ∈ A, s ∩ T p",
" x ∈ s \\ u ∪ ⋃ p ∈ A, s ∩ T p",
" ∃ p ∈ A, x ∈ T p",
" x ∈ ⋃ p ∈ A, s ∩ T p",
" ∀ᵐ (x : ℝ) ∂μ.restrict (s \\ u ∪ ⋃ p ∈ A, s ∩ T p), p x",
" (∀ᵐ (x : ℝ) ∂μ.restrict (s \\ u), p x) ∧ ∀ i ∈ A, ∀ᵐ (x : ℝ) ∂μ.restrict (s ∩ T i), p x",
" ... |
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.MvPolynomial.Rename
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp Ad... | Mathlib/Algebra/MvPolynomial/Degrees.lean | 128 | 130 | theorem degrees_add [DecidableEq σ] (p q : MvPolynomial σ R) :
(p + q).degrees ≤ p.degrees ⊔ q.degrees := by |
simp_rw [degrees_def]; exact supDegree_add_le
| [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s",... | [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s",... |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpace
namespace MeasureTheory
namespace Measure
variable {M : Type*} [Monoid M] [MeasurableSpace M]
@[to_additive conv "Additive convolution of measures."]
noncomputable def mconv (μ : Measure M) (ν : Measure M) :
... | Mathlib/MeasureTheory/Group/Convolution.lean | 85 | 90 | theorem mconv_comm {M : Type*} [CommMonoid M] [MeasurableSpace M] [MeasurableMul₂ M] (μ : Measure M)
(ν : Measure M) [SFinite μ] [SFinite ν] : μ ∗ ν = ν ∗ μ := by |
unfold mconv
rw [← prod_swap, map_map]
· simp [Function.comp_def, mul_comm]
all_goals { measurability }
| [
" dirac 1 ∗ μ = μ",
" map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ",
" map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" μ ∗ dirac 1 = μ",
" map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ",
" map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ... | [
" dirac 1 ∗ μ = μ",
" map (fun x => x.1 * x.2) ((dirac 1).prod μ) = μ",
" map ((fun x => x.1 * x.2) ∘ Prod.mk 1) μ = μ",
" Measurable (Prod.mk 1)",
" Measurable fun x => x.1 * x.2",
" μ ∗ dirac 1 = μ",
" map (fun x => x.1 * x.2) (μ.prod (dirac 1)) = μ",
" map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) μ... |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n ... | Mathlib/Data/Matrix/Rank.lean | 96 | 99 | theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
A.rank = Fintype.card n := by |
obtain ⟨A, rfl⟩ := h
exact rank_unit A
| [
" rank 1 = Fintype.card n",
" rank 0 = 0",
" A.rank ≤ Fintype.card n",
" (A * B).rank ≤ A.rank",
" finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)",
" (A * B).rank ≤ B.rank",
" finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(Li... | [
" rank 1 = Fintype.card n",
" rank 0 = 0",
" A.rank ≤ Fintype.card n",
" (A * B).rank ≤ A.rank",
" finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(LinearMap.range A.mulVecLin)",
" (A * B).rank ≤ B.rank",
" finrank R ↥(LinearMap.range (A.mulVecLin ∘ₗ B.mulVecLin)) ≤ finrank R ↥(Li... |
import Mathlib.Topology.Order
import Mathlib.Topology.Sets.Opens
import Mathlib.Topology.ContinuousFunction.Basic
#align_import topology.continuous_function.t0_sierpinski from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
noncomputable section
namespace TopologicalSpace
| Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean | 28 | 37 | theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] :
t = ⨅ u : Opens X, sierpinskiSpace.induced (· ∈ u) := by |
apply le_antisymm
· rw [le_iInf_iff]
exact fun u => Continuous.le_induced (isOpen_iff_continuous_mem.mp u.2)
· intro u h
rw [← generateFrom_iUnion_isOpen]
apply isOpen_generateFrom_of_mem
simp only [Set.mem_iUnion, Set.mem_setOf_eq, isOpen_induced_iff]
exact ⟨⟨u, h⟩, {True}, isOpen_singleton_... | [
" t = ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" t ≤ ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" ∀ (i : Opens X), t ≤ induced (fun x => x ∈ i) sierpinskiSpace",
" ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace ≤ t",
" IsOpen u",
" u ∈ ⋃ i, {s | IsOpen s}",
" ∃ i t_1, IsOpen t_1 ∧ (fun x => x... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.