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 |
|---|---|---|---|---|---|
import Mathlib.Algebra.Algebra.Quasispectrum
import Mathlib.FieldTheory.IsAlgClosed.Spectrum
import Mathlib.Analysis.Complex.Liouville
import Mathlib.Analysis.Complex.Polynomial
import Mathlib.Analysis.Analytic.RadiusLiminf
import Mathlib.Topology.Algebra.Module.CharacterSpace
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.NormedSpace.UnitizationL1
#align_import analysis.normed_space.spectrum from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
open scoped ENNReal NNReal
open NormedSpace -- For `NormedSpace.exp`.
noncomputable def spectralRadius (𝕜 : Type*) {A : Type*} [NormedField 𝕜] [Ring A] [Algebra 𝕜 A]
(a : A) : ℝ≥0∞ :=
⨆ k ∈ spectrum 𝕜 a, ‖k‖₊
#align spectral_radius spectralRadius
variable {𝕜 : Type*} {A : Type*}
namespace spectrum
section SpectrumCompact
open Filter
variable [NormedField 𝕜] [NormedRing A] [NormedAlgebra 𝕜 A]
local notation "σ" => spectrum 𝕜
local notation "ρ" => resolventSet 𝕜
local notation "↑ₐ" => algebraMap 𝕜 A
@[simp]
| Mathlib/Analysis/NormedSpace/Spectrum.lean | 79 | 80 | theorem SpectralRadius.of_subsingleton [Subsingleton A] (a : A) : spectralRadius 𝕜 a = 0 := by |
simp [spectralRadius]
|
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.TryThis
import Mathlib.Util.AtomM
set_option autoImplicit true
namespace Mathlib.Tactic.Abel
open Lean Elab Meta Tactic Qq
initialize registerTraceClass `abel
initialize registerTraceClass `abel.detail
structure Context where
α : Expr
univ : Level
α0 : Expr
isGroup : Bool
inst : Expr
def mkContext (e : Expr) : MetaM Context := do
let α ← inferType e
let c ← synthInstance (← mkAppM ``AddCommMonoid #[α])
let cg ← synthInstance? (← mkAppM ``AddCommGroup #[α])
let u ← mkFreshLevelMVar
_ ← isDefEq (.sort (.succ u)) (← inferType α)
let α0 ← Expr.ofNat α 0
match cg with
| some cg => return ⟨α, u, α0, true, cg⟩
| _ => return ⟨α, u, α0, false, c⟩
abbrev M := ReaderT Context AtomM
def Context.app (c : Context) (n : Name) (inst : Expr) : Array Expr → Expr :=
mkAppN (((@Expr.const n [c.univ]).app c.α).app inst)
def Context.mkApp (c : Context) (n inst : Name) (l : Array Expr) : MetaM Expr := do
return c.app n (← synthInstance ((Expr.const inst [c.univ]).app c.α)) l
def addG : Name → Name
| .str p s => .str p (s ++ "g")
| n => n
def iapp (n : Name) (xs : Array Expr) : M Expr := do
let c ← read
return c.app (if c.isGroup then addG n else n) c.inst xs
def term {α} [AddCommMonoid α] (n : ℕ) (x a : α) : α := n • x + a
def termg {α} [AddCommGroup α] (n : ℤ) (x a : α) : α := n • x + a
def mkTerm (n x a : Expr) : M Expr := iapp ``term #[n, x, a]
def intToExpr (n : ℤ) : M Expr := do
Expr.ofInt (mkConst (if (← read).isGroup then ``Int else ``Nat) []) n
inductive NormalExpr : Type
| zero (e : Expr) : NormalExpr
| nterm (e : Expr) (n : Expr × ℤ) (x : ℕ × Expr) (a : NormalExpr) : NormalExpr
deriving Inhabited
def NormalExpr.e : NormalExpr → Expr
| .zero e => e
| .nterm e .. => e
instance : Coe NormalExpr Expr where coe := NormalExpr.e
def NormalExpr.term' (n : Expr × ℤ) (x : ℕ × Expr) (a : NormalExpr) : M NormalExpr :=
return .nterm (← mkTerm n.1 x.2 a) n x a
def NormalExpr.zero' : M NormalExpr := return NormalExpr.zero (← read).α0
open NormalExpr
theorem const_add_term {α} [AddCommMonoid α] (k n x a a') (h : k + a = a') :
k + @term α _ n x a = term n x a' := by
simp [h.symm, term, add_comm, add_assoc]
theorem const_add_termg {α} [AddCommGroup α] (k n x a a') (h : k + a = a') :
k + @termg α _ n x a = termg n x a' := by
simp [h.symm, termg, add_comm, add_assoc]
theorem term_add_const {α} [AddCommMonoid α] (n x a k a') (h : a + k = a') :
@term α _ n x a + k = term n x a' := by
simp [h.symm, term, add_assoc]
theorem term_add_constg {α} [AddCommGroup α] (n x a k a') (h : a + k = a') :
@termg α _ n x a + k = termg n x a' := by
simp [h.symm, termg, add_assoc]
| Mathlib/Tactic/Abel.lean | 144 | 146 | theorem term_add_term {α} [AddCommMonoid α] (n₁ x a₁ n₂ a₂ n' a') (h₁ : n₁ + n₂ = n')
(h₂ : a₁ + a₂ = a') : @term α _ n₁ x a₁ + @term α _ n₂ x a₂ = term n' x a' := by |
simp [h₁.symm, h₂.symm, term, add_nsmul, add_assoc, add_left_comm]
|
import Mathlib.RingTheory.QuotientNilpotent
import Mathlib.RingTheory.Smooth.Basic
import Mathlib.RingTheory.Unramified.Basic
#align_import ring_theory.etale from "leanprover-community/mathlib"@"73f96237417835f148a1f7bc1ff55f67119b7166"
-- Porting note: added to make the syntax work below.
open scoped TensorProduct
universe u
namespace Algebra
section
variable (R : Type u) [CommSemiring R]
variable (A : Type u) [Semiring A] [Algebra R A]
@[mk_iff]
class FormallyEtale : Prop where
comp_bijective :
∀ ⦃B : Type u⦄ [CommRing B],
∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥),
Function.Bijective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I)
#align algebra.formally_etale Algebra.FormallyEtale
end
namespace FormallyEtale
section
variable {R : Type u} [CommSemiring R]
variable {A : Type u} [Semiring A] [Algebra R A]
variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B)
| Mathlib/RingTheory/Etale/Basic.lean | 66 | 69 | theorem iff_unramified_and_smooth :
FormallyEtale R A ↔ FormallyUnramified R A ∧ FormallySmooth R A := by |
rw [formallyUnramified_iff, formallySmooth_iff, formallyEtale_iff]
simp_rw [← forall_and, Function.Bijective]
|
import Mathlib.Algebra.IsPrimePow
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.Order.Hom.Bounded
import Mathlib.Algebra.GCDMonoid.Basic
#align_import ring_theory.chain_of_divisors from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {M : Type*} [CancelCommMonoidWithZero M]
theorem Associates.isAtom_iff {p : Associates M} (h₁ : p ≠ 0) : IsAtom p ↔ Irreducible p :=
⟨fun hp =>
⟨by simpa only [Associates.isUnit_iff_eq_one] using hp.1, fun a b h =>
(hp.le_iff.mp ⟨_, h⟩).casesOn (fun ha => Or.inl (a.isUnit_iff_eq_one.mpr ha)) fun ha =>
Or.inr
(show IsUnit b by
rw [ha] at h
apply isUnit_of_associated_mul (show Associated (p * b) p by conv_rhs => rw [h]) h₁)⟩,
fun hp =>
⟨by simpa only [Associates.isUnit_iff_eq_one, Associates.bot_eq_one] using hp.1,
fun b ⟨⟨a, hab⟩, hb⟩ =>
(hp.isUnit_or_isUnit hab).casesOn
(fun hb => show b = ⊥ by rwa [Associates.isUnit_iff_eq_one, ← Associates.bot_eq_one] at hb)
fun ha =>
absurd
(show p ∣ b from
⟨(ha.unit⁻¹ : Units _), by rw [hab, mul_assoc, IsUnit.mul_val_inv ha, mul_one]⟩)
hb⟩⟩
#align associates.is_atom_iff Associates.isAtom_iff
open UniqueFactorizationMonoid multiplicity Irreducible Associates
namespace DivisorChain
theorem exists_chain_of_prime_pow {p : Associates M} {n : ℕ} (hn : n ≠ 0) (hp : Prime p) :
∃ c : Fin (n + 1) → Associates M,
c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i := by
refine ⟨fun i => p ^ (i : ℕ), ?_, fun n m h => ?_, @fun y => ⟨fun h => ?_, ?_⟩⟩
· dsimp only
rw [Fin.val_one', Nat.mod_eq_of_lt, pow_one]
exact Nat.lt_succ_of_le (Nat.one_le_iff_ne_zero.mpr hn)
· exact Associates.dvdNotUnit_iff_lt.mp
⟨pow_ne_zero n hp.ne_zero, p ^ (m - n : ℕ),
not_isUnit_of_not_isUnit_dvd hp.not_unit (dvd_pow dvd_rfl (Nat.sub_pos_of_lt h).ne'),
(pow_mul_pow_sub p h.le).symm⟩
· obtain ⟨i, i_le, hi⟩ := (dvd_prime_pow hp n).1 h
rw [associated_iff_eq] at hi
exact ⟨⟨i, Nat.lt_succ_of_le i_le⟩, hi⟩
· rintro ⟨i, rfl⟩
exact ⟨p ^ (n - i : ℕ), (pow_mul_pow_sub p (Nat.succ_le_succ_iff.mp i.2)).symm⟩
#align divisor_chain.exists_chain_of_prime_pow DivisorChain.exists_chain_of_prime_pow
theorem element_of_chain_not_isUnit_of_index_ne_zero {n : ℕ} {i : Fin (n + 1)} (i_pos : i ≠ 0)
{c : Fin (n + 1) → Associates M} (h₁ : StrictMono c) : ¬IsUnit (c i) :=
DvdNotUnit.not_unit
(Associates.dvdNotUnit_iff_lt.2
(h₁ <| show (0 : Fin (n + 1)) < i from Fin.pos_iff_ne_zero.mpr i_pos))
#align divisor_chain.element_of_chain_not_is_unit_of_index_ne_zero DivisorChain.element_of_chain_not_isUnit_of_index_ne_zero
theorem first_of_chain_isUnit {q : Associates M} {n : ℕ} {c : Fin (n + 1) → Associates M}
(h₁ : StrictMono c) (h₂ : ∀ {r}, r ≤ q ↔ ∃ i, r = c i) : IsUnit (c 0) := by
obtain ⟨i, hr⟩ := h₂.mp Associates.one_le
rw [Associates.isUnit_iff_eq_one, ← Associates.le_one_iff, hr]
exact h₁.monotone (Fin.zero_le i)
#align divisor_chain.first_of_chain_is_unit DivisorChain.first_of_chain_isUnit
theorem second_of_chain_is_irreducible {q : Associates M} {n : ℕ} (hn : n ≠ 0)
{c : Fin (n + 1) → Associates M} (h₁ : StrictMono c) (h₂ : ∀ {r}, r ≤ q ↔ ∃ i, r = c i)
(hq : q ≠ 0) : Irreducible (c 1) := by
cases' n with n; · contradiction
refine (Associates.isAtom_iff (ne_zero_of_dvd_ne_zero hq (h₂.2 ⟨1, rfl⟩))).mp ⟨?_, fun b hb => ?_⟩
· exact ne_bot_of_gt (h₁ (show (0 : Fin (n + 2)) < 1 from Fin.one_pos))
obtain ⟨⟨i, hi⟩, rfl⟩ := h₂.1 (hb.le.trans (h₂.2 ⟨1, rfl⟩))
cases i
· exact (Associates.isUnit_iff_eq_one _).mp (first_of_chain_isUnit h₁ @h₂)
· simpa [Fin.lt_iff_val_lt_val] using h₁.lt_iff_lt.mp hb
#align divisor_chain.second_of_chain_is_irreducible DivisorChain.second_of_chain_is_irreducible
| Mathlib/RingTheory/ChainOfDivisors.lean | 111 | 132 | theorem eq_second_of_chain_of_prime_dvd {p q r : Associates M} {n : ℕ} (hn : n ≠ 0)
{c : Fin (n + 1) → Associates M} (h₁ : StrictMono c)
(h₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i) (hp : Prime p) (hr : r ∣ q) (hp' : p ∣ r) :
p = c 1 := by |
cases' n with n
· contradiction
obtain ⟨i, rfl⟩ := h₂.1 (dvd_trans hp' hr)
refine congr_arg c (eq_of_ge_of_not_gt ?_ fun hi => ?_)
· rw [Fin.le_iff_val_le_val, Fin.val_one, Nat.succ_le_iff, ← Fin.val_zero' (n.succ + 1), ←
Fin.lt_iff_val_lt_val, Fin.pos_iff_ne_zero]
rintro rfl
exact hp.not_unit (first_of_chain_isUnit h₁ @h₂)
obtain rfl | ⟨j, rfl⟩ := i.eq_zero_or_eq_succ
· cases hi
refine
not_irreducible_of_not_unit_dvdNotUnit
(DvdNotUnit.not_unit
(Associates.dvdNotUnit_iff_lt.2 (h₁ (show (0 : Fin (n + 2)) < j from ?_))))
?_ hp.irreducible
· simpa [Fin.succ_lt_succ_iff, Fin.lt_iff_val_lt_val] using hi
· refine Associates.dvdNotUnit_iff_lt.2 (h₁ ?_)
simpa only [Fin.coe_eq_castSucc] using Fin.lt_succ
|
import Mathlib.Algebra.Polynomial.Mirror
import Mathlib.Analysis.Complex.Polynomial
#align_import data.polynomial.unit_trinomial from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836"
namespace Polynomial
open scoped Polynomial
open Finset
section Semiring
variable {R : Type*} [Semiring R] (k m n : ℕ) (u v w : R)
noncomputable def trinomial :=
C u * X ^ k + C v * X ^ m + C w * X ^ n
#align polynomial.trinomial Polynomial.trinomial
theorem trinomial_def : trinomial k m n u v w = C u * X ^ k + C v * X ^ m + C w * X ^ n :=
rfl
#align polynomial.trinomial_def Polynomial.trinomial_def
variable {k m n u v w}
theorem trinomial_leading_coeff' (hkm : k < m) (hmn : m < n) :
(trinomial k m n u v w).coeff n = w := by
rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow,
if_neg (hkm.trans hmn).ne', if_neg hmn.ne', if_pos rfl, zero_add, zero_add]
#align polynomial.trinomial_leading_coeff' Polynomial.trinomial_leading_coeff'
theorem trinomial_middle_coeff (hkm : k < m) (hmn : m < n) :
(trinomial k m n u v w).coeff m = v := by
rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow,
if_neg hkm.ne', if_pos rfl, if_neg hmn.ne, zero_add, add_zero]
#align polynomial.trinomial_middle_coeff Polynomial.trinomial_middle_coeff
| Mathlib/Algebra/Polynomial/UnitTrinomial.lean | 61 | 64 | theorem trinomial_trailing_coeff' (hkm : k < m) (hmn : m < n) :
(trinomial k m n u v w).coeff k = u := by |
rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow,
if_pos rfl, if_neg hkm.ne, if_neg (hkm.trans hmn).ne, add_zero, add_zero]
|
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.RingTheory.Ideal.Quotient
#align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24"
open Submodule
open Polynomial
variable {R : Type*} [Ring R]
variable {A : Type*} [CommRing A]
variable {M : Type*} [AddCommGroup M] [Module R M] (U U₁ U₂ : Submodule R M)
variable {x x₁ x₂ y y₁ y₂ z z₁ z₂ : M}
variable {N : Type*} [AddCommGroup N] [Module R N] (V V₁ V₂ : Submodule R N)
set_option backward.isDefEq.lazyWhnfCore false in -- See https://github.com/leanprover-community/mathlib4/issues/12534
def SModEq (x y : M) : Prop :=
(Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y
#align smodeq SModEq
notation:50 x " ≡ " y " [SMOD " N "]" => SModEq N x y
variable {U U₁ U₂}
set_option backward.isDefEq.lazyWhnfCore false in -- See https://github.com/leanprover-community/mathlib4/issues/12534
protected theorem SModEq.def :
x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y :=
Iff.rfl
#align smodeq.def SModEq.def
namespace SModEq
theorem sub_mem : x ≡ y [SMOD U] ↔ x - y ∈ U := by rw [SModEq.def, Submodule.Quotient.eq]
#align smodeq.sub_mem SModEq.sub_mem
@[simp]
theorem top : x ≡ y [SMOD (⊤ : Submodule R M)] :=
(Submodule.Quotient.eq ⊤).2 mem_top
#align smodeq.top SModEq.top
@[simp]
theorem bot : x ≡ y [SMOD (⊥ : Submodule R M)] ↔ x = y := by
rw [SModEq.def, Submodule.Quotient.eq, mem_bot, sub_eq_zero]
#align smodeq.bot SModEq.bot
@[mono]
theorem mono (HU : U₁ ≤ U₂) (hxy : x ≡ y [SMOD U₁]) : x ≡ y [SMOD U₂] :=
(Submodule.Quotient.eq U₂).2 <| HU <| (Submodule.Quotient.eq U₁).1 hxy
#align smodeq.mono SModEq.mono
@[refl]
protected theorem refl (x : M) : x ≡ x [SMOD U] :=
@rfl _ _
#align smodeq.refl SModEq.refl
protected theorem rfl : x ≡ x [SMOD U] :=
SModEq.refl _
#align smodeq.rfl SModEq.rfl
instance : IsRefl _ (SModEq U) :=
⟨SModEq.refl⟩
@[symm]
nonrec theorem symm (hxy : x ≡ y [SMOD U]) : y ≡ x [SMOD U] :=
hxy.symm
#align smodeq.symm SModEq.symm
@[trans]
nonrec theorem trans (hxy : x ≡ y [SMOD U]) (hyz : y ≡ z [SMOD U]) : x ≡ z [SMOD U] :=
hxy.trans hyz
#align smodeq.trans SModEq.trans
instance instTrans : Trans (SModEq U) (SModEq U) (SModEq U) where
trans := trans
theorem add (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ + x₂ ≡ y₁ + y₂ [SMOD U] := by
rw [SModEq.def] at hxy₁ hxy₂ ⊢
simp_rw [Quotient.mk_add, hxy₁, hxy₂]
#align smodeq.add SModEq.add
theorem smul (hxy : x ≡ y [SMOD U]) (c : R) : c • x ≡ c • y [SMOD U] := by
rw [SModEq.def] at hxy ⊢
simp_rw [Quotient.mk_smul, hxy]
#align smodeq.smul SModEq.smul
theorem mul {I : Ideal A} {x₁ x₂ y₁ y₂ : A} (hxy₁ : x₁ ≡ y₁ [SMOD I])
(hxy₂ : x₂ ≡ y₂ [SMOD I]) : x₁ * x₂ ≡ y₁ * y₂ [SMOD I] := by
simp only [SModEq.def, Ideal.Quotient.mk_eq_mk, map_mul] at hxy₁ hxy₂ ⊢
rw [hxy₁, hxy₂]
theorem zero : x ≡ 0 [SMOD U] ↔ x ∈ U := by rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
#align smodeq.zero SModEq.zero
theorem map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f] :=
(Submodule.Quotient.eq _).2 <| f.map_sub x y ▸ mem_map_of_mem <| (Submodule.Quotient.eq _).1 hxy
#align smodeq.map SModEq.map
theorem comap {f : M →ₗ[R] N} (hxy : f x ≡ f y [SMOD V]) : x ≡ y [SMOD V.comap f] :=
(Submodule.Quotient.eq _).2 <|
show f (x - y) ∈ V from (f.map_sub x y).symm ▸ (Submodule.Quotient.eq _).1 hxy
#align smodeq.comap SModEq.comap
| Mathlib/LinearAlgebra/SModEq.lean | 114 | 119 | theorem eval {R : Type*} [CommRing R] {I : Ideal R} {x y : R} (h : x ≡ y [SMOD I]) (f : R[X]) :
f.eval x ≡ f.eval y [SMOD I] := by |
rw [SModEq.def] at h ⊢
show Ideal.Quotient.mk I (f.eval x) = Ideal.Quotient.mk I (f.eval y)
replace h : Ideal.Quotient.mk I x = Ideal.Quotient.mk I y := h
rw [← Polynomial.eval₂_at_apply, ← Polynomial.eval₂_at_apply, h]
|
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
import Mathlib.RingTheory.RootsOfUnity.Minpoly
#align_import ring_theory.polynomial.cyclotomic.roots from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Polynomial
variable {R : Type*} [CommRing R] {n : ℕ}
theorem isRoot_of_unity_of_root_cyclotomic {ζ : R} {i : ℕ} (hi : i ∈ n.divisors)
(h : (cyclotomic i R).IsRoot ζ) : ζ ^ n = 1 := by
rcases n.eq_zero_or_pos with (rfl | hn)
· exact pow_zero _
have := congr_arg (eval ζ) (prod_cyclotomic_eq_X_pow_sub_one hn R).symm
rw [eval_sub, eval_pow, eval_X, eval_one] at this
convert eq_add_of_sub_eq' this
convert (add_zero (M := R) _).symm
apply eval_eq_zero_of_dvd_of_eval_eq_zero _ h
exact Finset.dvd_prod_of_mem _ hi
#align polynomial.is_root_of_unity_of_root_cyclotomic Polynomial.isRoot_of_unity_of_root_cyclotomic
section IsDomain
variable [IsDomain R]
theorem _root_.isRoot_of_unity_iff (h : 0 < n) (R : Type*) [CommRing R] [IsDomain R] {ζ : R} :
ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ := by
rw [← mem_nthRoots h, nthRoots, mem_roots <| X_pow_sub_C_ne_zero h _, C_1, ←
prod_cyclotomic_eq_X_pow_sub_one h, isRoot_prod]
#align is_root_of_unity_iff isRoot_of_unity_iff
theorem _root_.IsPrimitiveRoot.isRoot_cyclotomic (hpos : 0 < n) {μ : R} (h : IsPrimitiveRoot μ n) :
IsRoot (cyclotomic n R) μ := by
rw [← mem_roots (cyclotomic_ne_zero n R), cyclotomic_eq_prod_X_sub_primitiveRoots h,
roots_prod_X_sub_C, ← Finset.mem_def]
rwa [← mem_primitiveRoots hpos] at h
#align is_primitive_root.is_root_cyclotomic IsPrimitiveRoot.isRoot_cyclotomic
private theorem isRoot_cyclotomic_iff' {n : ℕ} {K : Type*} [Field K] {μ : K} [NeZero (n : K)] :
IsRoot (cyclotomic n K) μ ↔ IsPrimitiveRoot μ n := by
-- in this proof, `o` stands for `orderOf μ`
have hnpos : 0 < n := (NeZero.of_neZero_natCast K).out.bot_lt
refine ⟨fun hμ => ?_, IsPrimitiveRoot.isRoot_cyclotomic hnpos⟩
have hμn : μ ^ n = 1 := by
rw [isRoot_of_unity_iff hnpos _]
exact ⟨n, n.mem_divisors_self hnpos.ne', hμ⟩
by_contra hnμ
have ho : 0 < orderOf μ := (isOfFinOrder_iff_pow_eq_one.2 <| ⟨n, hnpos, hμn⟩).orderOf_pos
have := pow_orderOf_eq_one μ
rw [isRoot_of_unity_iff ho] at this
obtain ⟨i, hio, hiμ⟩ := this
replace hio := Nat.dvd_of_mem_divisors hio
rw [IsPrimitiveRoot.not_iff] at hnμ
rw [← orderOf_dvd_iff_pow_eq_one] at hμn
have key : i < n := (Nat.le_of_dvd ho hio).trans_lt ((Nat.le_of_dvd hnpos hμn).lt_of_ne hnμ)
have key' : i ∣ n := hio.trans hμn
rw [← Polynomial.dvd_iff_isRoot] at hμ hiμ
have hni : {i, n} ⊆ n.divisors := by simpa [Finset.insert_subset_iff, key'] using hnpos.ne'
obtain ⟨k, hk⟩ := hiμ
obtain ⟨j, hj⟩ := hμ
have := prod_cyclotomic_eq_X_pow_sub_one hnpos K
rw [← Finset.prod_sdiff hni, Finset.prod_pair key.ne, hk, hj] at this
have hn := (X_pow_sub_one_separable_iff.mpr <| NeZero.natCast_ne n K).squarefree
rw [← this, Squarefree] at hn
specialize hn (X - C μ) ⟨(∏ x ∈ n.divisors \ {i, n}, cyclotomic x K) * k * j, by ring⟩
simp [Polynomial.isUnit_iff_degree_eq_zero] at hn
theorem isRoot_cyclotomic_iff [NeZero (n : R)] {μ : R} :
IsRoot (cyclotomic n R) μ ↔ IsPrimitiveRoot μ n := by
have hf : Function.Injective _ := IsFractionRing.injective R (FractionRing R)
haveI : NeZero (n : FractionRing R) := NeZero.nat_of_injective hf
rw [← isRoot_map_iff hf, ← IsPrimitiveRoot.map_iff_of_injective hf, map_cyclotomic, ←
isRoot_cyclotomic_iff']
#align polynomial.is_root_cyclotomic_iff Polynomial.isRoot_cyclotomic_iff
| Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean | 107 | 113 | theorem roots_cyclotomic_nodup [NeZero (n : R)] : (cyclotomic n R).roots.Nodup := by |
obtain h | ⟨ζ, hζ⟩ := (cyclotomic n R).roots.empty_or_exists_mem
· exact h.symm ▸ Multiset.nodup_zero
rw [mem_roots <| cyclotomic_ne_zero n R, isRoot_cyclotomic_iff] at hζ
refine Multiset.nodup_of_le
(roots.le_of_dvd (X_pow_sub_C_ne_zero (NeZero.pos_of_neZero_natCast R) 1) <|
cyclotomic.dvd_X_pow_sub_one n R) hζ.nthRoots_one_nodup
|
import Mathlib.Topology.Instances.Real
import Mathlib.Order.Filter.Archimedean
#align_import analysis.subadditive from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Set Filter Topology
def Subadditive (u : ℕ → ℝ) : Prop :=
∀ m n, u (m + n) ≤ u m + u n
#align subadditive Subadditive
namespace Subadditive
variable {u : ℕ → ℝ} (h : Subadditive u)
@[nolint unusedArguments] -- Porting note: was irreducible
protected def lim (_h : Subadditive u) :=
sInf ((fun n : ℕ => u n / n) '' Ici 1)
#align subadditive.lim Subadditive.lim
| Mathlib/Analysis/Subadditive.lean | 45 | 48 | theorem lim_le_div (hbdd : BddBelow (range fun n => u n / n)) {n : ℕ} (hn : n ≠ 0) :
h.lim ≤ u n / n := by |
rw [Subadditive.lim]
exact csInf_le (hbdd.mono <| image_subset_range _ _) ⟨n, hn.bot_lt, rfl⟩
|
import Mathlib.Algebra.Polynomial.Splits
#align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222"
noncomputable section
@[ext]
structure Cubic (R : Type*) where
(a b c d : R)
#align cubic Cubic
namespace Cubic
open Cubic Polynomial
open Polynomial
variable {R S F K : Type*}
instance [Inhabited R] : Inhabited (Cubic R) :=
⟨⟨default, default, default, default⟩⟩
instance [Zero R] : Zero (Cubic R) :=
⟨⟨0, 0, 0, 0⟩⟩
section Basic
variable {P Q : Cubic R} {a b c d a' b' c' d' : R} [Semiring R]
def toPoly (P : Cubic R) : R[X] :=
C P.a * X ^ 3 + C P.b * X ^ 2 + C P.c * X + C P.d
#align cubic.to_poly Cubic.toPoly
theorem C_mul_prod_X_sub_C_eq [CommRing S] {w x y z : S} :
C w * (X - C x) * (X - C y) * (X - C z) =
toPoly ⟨w, w * -(x + y + z), w * (x * y + x * z + y * z), w * -(x * y * z)⟩ := by
simp only [toPoly, C_neg, C_add, C_mul]
ring1
set_option linter.uppercaseLean3 false in
#align cubic.C_mul_prod_X_sub_C_eq Cubic.C_mul_prod_X_sub_C_eq
theorem prod_X_sub_C_eq [CommRing S] {x y z : S} :
(X - C x) * (X - C y) * (X - C z) =
toPoly ⟨1, -(x + y + z), x * y + x * z + y * z, -(x * y * z)⟩ := by
rw [← one_mul <| X - C x, ← C_1, C_mul_prod_X_sub_C_eq, one_mul, one_mul, one_mul]
set_option linter.uppercaseLean3 false in
#align cubic.prod_X_sub_C_eq Cubic.prod_X_sub_C_eq
section Coeff
private theorem coeffs : (∀ n > 3, P.toPoly.coeff n = 0) ∧ P.toPoly.coeff 3 = P.a ∧
P.toPoly.coeff 2 = P.b ∧ P.toPoly.coeff 1 = P.c ∧ P.toPoly.coeff 0 = P.d := by
simp only [toPoly, coeff_add, coeff_C, coeff_C_mul_X, coeff_C_mul_X_pow]
set_option tactic.skipAssignedInstances false in norm_num
intro n hn
repeat' rw [if_neg]
any_goals linarith only [hn]
repeat' rw [zero_add]
@[simp]
theorem coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.toPoly.coeff n = 0 :=
coeffs.1 n hn
#align cubic.coeff_eq_zero Cubic.coeff_eq_zero
@[simp]
theorem coeff_eq_a : P.toPoly.coeff 3 = P.a :=
coeffs.2.1
#align cubic.coeff_eq_a Cubic.coeff_eq_a
@[simp]
theorem coeff_eq_b : P.toPoly.coeff 2 = P.b :=
coeffs.2.2.1
#align cubic.coeff_eq_b Cubic.coeff_eq_b
@[simp]
theorem coeff_eq_c : P.toPoly.coeff 1 = P.c :=
coeffs.2.2.2.1
#align cubic.coeff_eq_c Cubic.coeff_eq_c
@[simp]
theorem coeff_eq_d : P.toPoly.coeff 0 = P.d :=
coeffs.2.2.2.2
#align cubic.coeff_eq_d Cubic.coeff_eq_d
theorem a_of_eq (h : P.toPoly = Q.toPoly) : P.a = Q.a := by rw [← coeff_eq_a, h, coeff_eq_a]
#align cubic.a_of_eq Cubic.a_of_eq
theorem b_of_eq (h : P.toPoly = Q.toPoly) : P.b = Q.b := by rw [← coeff_eq_b, h, coeff_eq_b]
#align cubic.b_of_eq Cubic.b_of_eq
theorem c_of_eq (h : P.toPoly = Q.toPoly) : P.c = Q.c := by rw [← coeff_eq_c, h, coeff_eq_c]
#align cubic.c_of_eq Cubic.c_of_eq
theorem d_of_eq (h : P.toPoly = Q.toPoly) : P.d = Q.d := by rw [← coeff_eq_d, h, coeff_eq_d]
#align cubic.d_of_eq Cubic.d_of_eq
theorem toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q :=
⟨fun h ↦ Cubic.ext P Q (a_of_eq h) (b_of_eq h) (c_of_eq h) (d_of_eq h), congr_arg toPoly⟩
#align cubic.to_poly_injective Cubic.toPoly_injective
theorem of_a_eq_zero (ha : P.a = 0) : P.toPoly = C P.b * X ^ 2 + C P.c * X + C P.d := by
rw [toPoly, ha, C_0, zero_mul, zero_add]
#align cubic.of_a_eq_zero Cubic.of_a_eq_zero
theorem of_a_eq_zero' : toPoly ⟨0, b, c, d⟩ = C b * X ^ 2 + C c * X + C d :=
of_a_eq_zero rfl
#align cubic.of_a_eq_zero' Cubic.of_a_eq_zero'
| Mathlib/Algebra/CubicDiscriminant.lean | 145 | 146 | theorem of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly = C P.c * X + C P.d := by |
rw [of_a_eq_zero ha, hb, C_0, zero_mul, zero_add]
|
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
open NormedField Set
open scoped Pointwise Topology NNReal
noncomputable section
variable {𝕜 E F : Type*}
section AddCommGroup
variable [AddCommGroup E] [Module ℝ E]
def gauge (s : Set E) (x : E) : ℝ :=
sInf { r : ℝ | 0 < r ∧ x ∈ r • s }
#align gauge gauge
variable {s t : Set E} {x : E} {a : ℝ}
theorem gauge_def : gauge s x = sInf ({ r ∈ Set.Ioi (0 : ℝ) | x ∈ r • s }) :=
rfl
#align gauge_def gauge_def
theorem gauge_def' : gauge s x = sInf {r ∈ Set.Ioi (0 : ℝ) | r⁻¹ • x ∈ s} := by
congrm sInf {r | ?_}
exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_mem₀ hr.ne' _ _
#align gauge_def' gauge_def'
private theorem gauge_set_bddBelow : BddBelow { r : ℝ | 0 < r ∧ x ∈ r • s } :=
⟨0, fun _ hr => hr.1.le⟩
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent ℝ s) :
{ r : ℝ | 0 < r ∧ x ∈ r • s }.Nonempty :=
let ⟨r, hr₁, hr₂⟩ := (absorbs x).exists_pos
⟨r, hr₁, hr₂ r (Real.norm_of_nonneg hr₁.le).ge rfl⟩
#align absorbent.gauge_set_nonempty Absorbent.gauge_set_nonempty
theorem gauge_mono (hs : Absorbent ℝ s) (h : s ⊆ t) : gauge t ≤ gauge s := fun _ =>
csInf_le_csInf gauge_set_bddBelow hs.gauge_set_nonempty fun _ hr => ⟨hr.1, smul_set_mono h hr.2⟩
#align gauge_mono gauge_mono
theorem exists_lt_of_gauge_lt (absorbs : Absorbent ℝ s) (h : gauge s x < a) :
∃ b, 0 < b ∧ b < a ∧ x ∈ b • s := by
obtain ⟨b, ⟨hb, hx⟩, hba⟩ := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h
exact ⟨b, hb, hba, hx⟩
#align exists_lt_of_gauge_lt exists_lt_of_gauge_lt
@[simp]
theorem gauge_zero : gauge s 0 = 0 := by
rw [gauge_def']
by_cases h : (0 : E) ∈ s
· simp only [smul_zero, sep_true, h, csInf_Ioi]
· simp only [smul_zero, sep_false, h, Real.sInf_empty]
#align gauge_zero gauge_zero
@[simp]
| Mathlib/Analysis/Convex/Gauge.lean | 103 | 110 | theorem gauge_zero' : gauge (0 : Set E) = 0 := by |
ext x
rw [gauge_def']
obtain rfl | hx := eq_or_ne x 0
· simp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]
· simp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]
convert Real.sInf_empty
exact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx
|
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.binary_products from "leanprover-community/mathlib"@"024a4231815538ac739f52d08dd20a55da0d6b23"
noncomputable section
universe v₁ v₂ u₁ u₂
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
variable {C : Type u₁} [Category.{v₁} C]
variable {D : Type u₂} [Category.{v₂} D]
variable (G : C ⥤ D)
namespace CategoryTheory.Limits
section
variable {P X Y Z : C} (f : P ⟶ X) (g : P ⟶ Y)
def isLimitMapConeBinaryFanEquiv :
IsLimit (G.mapCone (BinaryFan.mk f g)) ≃ IsLimit (BinaryFan.mk (G.map f) (G.map g)) :=
(IsLimit.postcomposeHomEquiv (diagramIsoPair _) _).symm.trans
(IsLimit.equivIsoLimit
(Cones.ext (Iso.refl _)
(by rintro (_ | _) <;> simp)))
#align category_theory.limits.is_limit_map_cone_binary_fan_equiv CategoryTheory.Limits.isLimitMapConeBinaryFanEquiv
def mapIsLimitOfPreservesOfIsLimit [PreservesLimit (pair X Y) G] (l : IsLimit (BinaryFan.mk f g)) :
IsLimit (BinaryFan.mk (G.map f) (G.map g)) :=
isLimitMapConeBinaryFanEquiv G f g (PreservesLimit.preserves l)
#align category_theory.limits.map_is_limit_of_preserves_of_is_limit CategoryTheory.Limits.mapIsLimitOfPreservesOfIsLimit
def isLimitOfReflectsOfMapIsLimit [ReflectsLimit (pair X Y) G]
(l : IsLimit (BinaryFan.mk (G.map f) (G.map g))) : IsLimit (BinaryFan.mk f g) :=
ReflectsLimit.reflects ((isLimitMapConeBinaryFanEquiv G f g).symm l)
#align category_theory.limits.is_limit_of_reflects_of_map_is_limit CategoryTheory.Limits.isLimitOfReflectsOfMapIsLimit
variable (X Y) [HasBinaryProduct X Y]
def isLimitOfHasBinaryProductOfPreservesLimit [PreservesLimit (pair X Y) G] :
IsLimit (BinaryFan.mk (G.map (Limits.prod.fst : X ⨯ Y ⟶ X)) (G.map Limits.prod.snd)) :=
mapIsLimitOfPreservesOfIsLimit G _ _ (prodIsProd X Y)
#align category_theory.limits.is_limit_of_has_binary_product_of_preserves_limit CategoryTheory.Limits.isLimitOfHasBinaryProductOfPreservesLimit
variable [HasBinaryProduct (G.obj X) (G.obj Y)]
def PreservesLimitPair.ofIsoProdComparison [i : IsIso (prodComparison G X Y)] :
PreservesLimit (pair X Y) G := by
apply preservesLimitOfPreservesLimitCone (prodIsProd X Y)
apply (isLimitMapConeBinaryFanEquiv _ _ _).symm _
refine @IsLimit.ofPointIso _ _ _ _ _ _ _ (limit.isLimit (pair (G.obj X) (G.obj Y))) ?_
apply i
#align category_theory.limits.preserves_limit_pair.of_iso_prod_comparison CategoryTheory.Limits.PreservesLimitPair.ofIsoProdComparison
variable [PreservesLimit (pair X Y) G]
def PreservesLimitPair.iso : G.obj (X ⨯ Y) ≅ G.obj X ⨯ G.obj Y :=
IsLimit.conePointUniqueUpToIso (isLimitOfHasBinaryProductOfPreservesLimit G X Y) (limit.isLimit _)
#align category_theory.limits.preserves_limit_pair.iso CategoryTheory.Limits.PreservesLimitPair.iso
@[simp]
theorem PreservesLimitPair.iso_hom : (PreservesLimitPair.iso G X Y).hom = prodComparison G X Y :=
rfl
#align category_theory.limits.preserves_limit_pair.iso_hom CategoryTheory.Limits.PreservesLimitPair.iso_hom
@[simp]
| Mathlib/CategoryTheory/Limits/Preserves/Shapes/BinaryProducts.lean | 100 | 103 | theorem PreservesLimitPair.iso_inv_fst :
(PreservesLimitPair.iso G X Y).inv ≫ G.map prod.fst = prod.fst := by |
rw [← Iso.cancel_iso_hom_left (PreservesLimitPair.iso G X Y), ← Category.assoc, Iso.hom_inv_id]
simp
|
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.LinearAlgebra.Dual
import Mathlib.LinearAlgebra.Contraction
import Mathlib.RingTheory.TensorProduct.Basic
#align_import representation_theory.basic from "leanprover-community/mathlib"@"c04bc6e93e23aa0182aba53661a2211e80b6feac"
open MonoidAlgebra (lift of)
open LinearMap
section
variable (k G V : Type*) [CommSemiring k] [Monoid G] [AddCommMonoid V] [Module k V]
abbrev Representation :=
G →* V →ₗ[k] V
#align representation Representation
end
namespace Representation
section MonoidAlgebra
variable {k G V : Type*} [CommSemiring k] [Monoid G] [AddCommMonoid V] [Module k V]
variable (ρ : Representation k G V)
noncomputable def asAlgebraHom : MonoidAlgebra k G →ₐ[k] Module.End k V :=
(lift k G _) ρ
#align representation.as_algebra_hom Representation.asAlgebraHom
theorem asAlgebraHom_def : asAlgebraHom ρ = (lift k G _) ρ :=
rfl
#align representation.as_algebra_hom_def Representation.asAlgebraHom_def
@[simp]
theorem asAlgebraHom_single (g : G) (r : k) : asAlgebraHom ρ (Finsupp.single g r) = r • ρ g := by
simp only [asAlgebraHom_def, MonoidAlgebra.lift_single]
#align representation.as_algebra_hom_single Representation.asAlgebraHom_single
theorem asAlgebraHom_single_one (g : G) : asAlgebraHom ρ (Finsupp.single g 1) = ρ g := by simp
#align representation.as_algebra_hom_single_one Representation.asAlgebraHom_single_one
theorem asAlgebraHom_of (g : G) : asAlgebraHom ρ (of k G g) = ρ g := by
simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul]
#align representation.as_algebra_hom_of Representation.asAlgebraHom_of
@[nolint unusedArguments]
def asModule (_ : Representation k G V) :=
V
#align representation.as_module Representation.asModule
-- Porting note: no derive handler
instance : AddCommMonoid (ρ.asModule) := inferInstanceAs <| AddCommMonoid V
instance : Inhabited ρ.asModule where
default := 0
noncomputable instance asModuleModule : Module (MonoidAlgebra k G) ρ.asModule :=
Module.compHom V (asAlgebraHom ρ).toRingHom
#align representation.as_module_module Representation.asModuleModule
-- Porting note: ρ.asModule doesn't unfold now
instance : Module k ρ.asModule := inferInstanceAs <| Module k V
def asModuleEquiv : ρ.asModule ≃+ V :=
AddEquiv.refl _
#align representation.as_module_equiv Representation.asModuleEquiv
@[simp]
theorem asModuleEquiv_map_smul (r : MonoidAlgebra k G) (x : ρ.asModule) :
ρ.asModuleEquiv (r • x) = ρ.asAlgebraHom r (ρ.asModuleEquiv x) :=
rfl
#align representation.as_module_equiv_map_smul Representation.asModuleEquiv_map_smul
@[simp]
theorem asModuleEquiv_symm_map_smul (r : k) (x : V) :
ρ.asModuleEquiv.symm (r • x) = algebraMap k (MonoidAlgebra k G) r • ρ.asModuleEquiv.symm x := by
apply_fun ρ.asModuleEquiv
simp
#align representation.as_module_equiv_symm_map_smul Representation.asModuleEquiv_symm_map_smul
@[simp]
theorem asModuleEquiv_symm_map_rho (g : G) (x : V) :
ρ.asModuleEquiv.symm (ρ g x) = MonoidAlgebra.of k G g • ρ.asModuleEquiv.symm x := by
apply_fun ρ.asModuleEquiv
simp
#align representation.as_module_equiv_symm_map_rho Representation.asModuleEquiv_symm_map_rho
noncomputable def ofModule' (M : Type*) [AddCommMonoid M] [Module k M]
[Module (MonoidAlgebra k G) M] [IsScalarTower k (MonoidAlgebra k G) M] : Representation k G M :=
(MonoidAlgebra.lift k G (M →ₗ[k] M)).symm (Algebra.lsmul k k M)
#align representation.of_module' Representation.ofModule'
section
variable (M : Type*) [AddCommMonoid M] [Module (MonoidAlgebra k G) M]
noncomputable def ofModule : Representation k G (RestrictScalars k (MonoidAlgebra k G) M) :=
(MonoidAlgebra.lift k G
(RestrictScalars k (MonoidAlgebra k G) M →ₗ[k]
RestrictScalars k (MonoidAlgebra k G) M)).symm
(RestrictScalars.lsmul k (MonoidAlgebra k G) M)
#align representation.of_module Representation.ofModule
@[simp]
| Mathlib/RepresentationTheory/Basic.lean | 221 | 234 | theorem ofModule_asAlgebraHom_apply_apply (r : MonoidAlgebra k G)
(m : RestrictScalars k (MonoidAlgebra k G) M) :
((ofModule M).asAlgebraHom r) m =
(RestrictScalars.addEquiv _ _ _).symm (r • RestrictScalars.addEquiv _ _ _ m) := by |
apply MonoidAlgebra.induction_on r
· intro g
simp only [one_smul, MonoidAlgebra.lift_symm_apply, MonoidAlgebra.of_apply,
Representation.asAlgebraHom_single, Representation.ofModule, AddEquiv.apply_eq_iff_eq,
RestrictScalars.lsmul_apply_apply]
· intro f g fw gw
simp only [fw, gw, map_add, add_smul, LinearMap.add_apply]
· intro r f w
simp only [w, AlgHom.map_smul, LinearMap.smul_apply,
RestrictScalars.addEquiv_symm_map_smul_smul]
|
import Mathlib.LinearAlgebra.Contraction
#align_import linear_algebra.coevaluation from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31"
noncomputable section
section coevaluation
open TensorProduct FiniteDimensional
open TensorProduct
universe u v
variable (K : Type u) [Field K]
variable (V : Type v) [AddCommGroup V] [Module K V] [FiniteDimensional K V]
def coevaluation : K →ₗ[K] V ⊗[K] Module.Dual K V :=
let bV := Basis.ofVectorSpace K V
(Basis.singleton Unit K).constr K fun _ =>
∑ i : Basis.ofVectorSpaceIndex K V, bV i ⊗ₜ[K] bV.coord i
#align coevaluation coevaluation
theorem coevaluation_apply_one :
(coevaluation K V) (1 : K) =
let bV := Basis.ofVectorSpace K V
∑ i : Basis.ofVectorSpaceIndex K V, bV i ⊗ₜ[K] bV.coord i := by
simp only [coevaluation, id]
rw [(Basis.singleton Unit K).constr_apply_fintype K]
simp only [Fintype.univ_punit, Finset.sum_const, one_smul, Basis.singleton_repr,
Basis.equivFun_apply, Basis.coe_ofVectorSpace, one_nsmul, Finset.card_singleton]
#align coevaluation_apply_one coevaluation_apply_one
open TensorProduct
| Mathlib/LinearAlgebra/Coevaluation.lean | 61 | 76 | theorem contractLeft_assoc_coevaluation :
(contractLeft K V).rTensor _ ∘ₗ
(TensorProduct.assoc K _ _ _).symm.toLinearMap ∘ₗ
(coevaluation K V).lTensor (Module.Dual K V) =
(TensorProduct.lid K _).symm.toLinearMap ∘ₗ (TensorProduct.rid K _).toLinearMap := by |
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V)
apply TensorProduct.ext
apply (Basis.ofVectorSpace K V).dualBasis.ext; intro j; apply LinearMap.ext_ring
rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply]
simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap]
rw [rid_tmul, one_smul, lid_symm_apply]
simp only [LinearEquiv.coe_toLinearMap, LinearMap.lTensor_tmul, coevaluation_apply_one]
rw [TensorProduct.tmul_sum, map_sum]; simp only [assoc_symm_tmul]
rw [map_sum]; simp only [LinearMap.rTensor_tmul, contractLeft_apply]
simp only [Basis.coe_dualBasis, Basis.coord_apply, Basis.repr_self_apply, TensorProduct.ite_tmul]
rw [Finset.sum_ite_eq']; simp only [Finset.mem_univ, if_true]
|
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.special_functions.pow.asymptotics from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
set_option linter.uppercaseLean3 false
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter ComplexConjugate Finset Set
section Limits
open Real Filter
| Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean | 36 | 46 | theorem tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) : Tendsto (fun x : ℝ => x ^ y) atTop atTop := by |
rw [tendsto_atTop_atTop]
intro b
use max b 0 ^ (1 / y)
intro x hx
exact
le_of_max_le_left
(by
convert rpow_le_rpow (rpow_nonneg (le_max_right b 0) (1 / y)) hx (le_of_lt hy)
using 1
rw [← rpow_mul (le_max_right b 0), (eq_div_iff (ne_of_gt hy)).mp rfl, Real.rpow_one])
|
import Mathlib.Logic.Encodable.Lattice
import Mathlib.MeasureTheory.MeasurableSpace.Defs
#align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
open MeasurableSpace Set
open scoped Classical
open MeasureTheory
def IsPiSystem {α} (C : Set (Set α)) : Prop :=
∀ᵉ (s ∈ C) (t ∈ C), (s ∩ t : Set α).Nonempty → s ∩ t ∈ C
#align is_pi_system IsPiSystem
theorem IsPiSystem.singleton {α} (S : Set α) : IsPiSystem ({S} : Set (Set α)) := by
intro s h_s t h_t _
rw [Set.mem_singleton_iff.1 h_s, Set.mem_singleton_iff.1 h_t, Set.inter_self,
Set.mem_singleton_iff]
#align is_pi_system.singleton IsPiSystem.singleton
theorem IsPiSystem.insert_empty {α} {S : Set (Set α)} (h_pi : IsPiSystem S) :
IsPiSystem (insert ∅ S) := by
intro s hs t ht hst
cases' hs with hs hs
· simp [hs]
· cases' ht with ht ht
· simp [ht]
· exact Set.mem_insert_of_mem _ (h_pi s hs t ht hst)
#align is_pi_system.insert_empty IsPiSystem.insert_empty
theorem IsPiSystem.insert_univ {α} {S : Set (Set α)} (h_pi : IsPiSystem S) :
IsPiSystem (insert Set.univ S) := by
intro s hs t ht hst
cases' hs with hs hs
· cases' ht with ht ht <;> simp [hs, ht]
· cases' ht with ht ht
· simp [hs, ht]
· exact Set.mem_insert_of_mem _ (h_pi s hs t ht hst)
#align is_pi_system.insert_univ IsPiSystem.insert_univ
theorem IsPiSystem.comap {α β} {S : Set (Set β)} (h_pi : IsPiSystem S) (f : α → β) :
IsPiSystem { s : Set α | ∃ t ∈ S, f ⁻¹' t = s } := by
rintro _ ⟨s, hs_mem, rfl⟩ _ ⟨t, ht_mem, rfl⟩ hst
rw [← Set.preimage_inter] at hst ⊢
exact ⟨s ∩ t, h_pi s hs_mem t ht_mem (nonempty_of_nonempty_preimage hst), rfl⟩
#align is_pi_system.comap IsPiSystem.comap
theorem isPiSystem_iUnion_of_directed_le {α ι} (p : ι → Set (Set α))
(hp_pi : ∀ n, IsPiSystem (p n)) (hp_directed : Directed (· ≤ ·) p) :
IsPiSystem (⋃ n, p n) := by
intro t1 ht1 t2 ht2 h
rw [Set.mem_iUnion] at ht1 ht2 ⊢
cases' ht1 with n ht1
cases' ht2 with m ht2
obtain ⟨k, hpnk, hpmk⟩ : ∃ k, p n ≤ p k ∧ p m ≤ p k := hp_directed n m
exact ⟨k, hp_pi k t1 (hpnk ht1) t2 (hpmk ht2) h⟩
#align is_pi_system_Union_of_directed_le isPiSystem_iUnion_of_directed_le
theorem isPiSystem_iUnion_of_monotone {α ι} [SemilatticeSup ι] (p : ι → Set (Set α))
(hp_pi : ∀ n, IsPiSystem (p n)) (hp_mono : Monotone p) : IsPiSystem (⋃ n, p n) :=
isPiSystem_iUnion_of_directed_le p hp_pi (Monotone.directed_le hp_mono)
#align is_pi_system_Union_of_monotone isPiSystem_iUnion_of_monotone
section Order
variable {α : Type*} {ι ι' : Sort*} [LinearOrder α]
theorem isPiSystem_image_Iio (s : Set α) : IsPiSystem (Iio '' s) := by
rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ -
exact ⟨a ⊓ b, inf_ind a b ha hb, Iio_inter_Iio.symm⟩
#align is_pi_system_image_Iio isPiSystem_image_Iio
theorem isPiSystem_Iio : IsPiSystem (range Iio : Set (Set α)) :=
@image_univ α _ Iio ▸ isPiSystem_image_Iio univ
#align is_pi_system_Iio isPiSystem_Iio
theorem isPiSystem_image_Ioi (s : Set α) : IsPiSystem (Ioi '' s) :=
@isPiSystem_image_Iio αᵒᵈ _ s
#align is_pi_system_image_Ioi isPiSystem_image_Ioi
theorem isPiSystem_Ioi : IsPiSystem (range Ioi : Set (Set α)) :=
@image_univ α _ Ioi ▸ isPiSystem_image_Ioi univ
#align is_pi_system_Ioi isPiSystem_Ioi
| Mathlib/MeasureTheory/PiSystem.lean | 149 | 151 | theorem isPiSystem_image_Iic (s : Set α) : IsPiSystem (Iic '' s) := by |
rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ -
exact ⟨a ⊓ b, inf_ind a b ha hb, Iic_inter_Iic.symm⟩
|
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3bd48e9ed90ad94e947d"
open Finset
open scoped Nat
namespace Nat
variable {α : Type*} (s : Finset α) (f : α → ℕ) {a b : α} (n : ℕ)
def multinomial : ℕ :=
(∑ i ∈ s, f i)! / ∏ i ∈ s, (f i)!
#align nat.multinomial Nat.multinomial
theorem multinomial_pos : 0 < multinomial s f :=
Nat.div_pos (le_of_dvd (factorial_pos _) (prod_factorial_dvd_factorial_sum s f))
(prod_factorial_pos s f)
#align nat.multinomial_pos Nat.multinomial_pos
theorem multinomial_spec : (∏ i ∈ s, (f i)!) * multinomial s f = (∑ i ∈ s, f i)! :=
Nat.mul_div_cancel' (prod_factorial_dvd_factorial_sum s f)
#align nat.multinomial_spec Nat.multinomial_spec
@[simp] lemma multinomial_empty : multinomial ∅ f = 1 := by simp [multinomial]
#align nat.multinomial_nil Nat.multinomial_empty
@[deprecated (since := "2024-06-01")] alias multinomial_nil := multinomial_empty
variable {s f}
lemma multinomial_cons (ha : a ∉ s) (f : α → ℕ) :
multinomial (s.cons a ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f := by
rw [multinomial, Nat.div_eq_iff_eq_mul_left _ (prod_factorial_dvd_factorial_sum _ _), prod_cons,
multinomial, mul_assoc, mul_left_comm _ (f a)!,
Nat.div_mul_cancel (prod_factorial_dvd_factorial_sum _ _), ← mul_assoc, Nat.choose_symm_add,
Nat.add_choose_mul_factorial_mul_factorial, Finset.sum_cons]
positivity
lemma multinomial_insert [DecidableEq α] (ha : a ∉ s) (f : α → ℕ) :
multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f := by
rw [← cons_eq_insert _ _ ha, multinomial_cons]
#align nat.multinomial_insert Nat.multinomial_insert
@[simp] lemma multinomial_singleton (a : α) (f : α → ℕ) : multinomial {a} f = 1 := by
rw [← cons_empty, multinomial_cons]; simp
#align nat.multinomial_singleton Nat.multinomial_singleton
@[simp]
theorem multinomial_insert_one [DecidableEq α] (h : a ∉ s) (h₁ : f a = 1) :
multinomial (insert a s) f = (s.sum f).succ * multinomial s f := by
simp only [multinomial, one_mul, factorial]
rw [Finset.sum_insert h, Finset.prod_insert h, h₁, add_comm, ← succ_eq_add_one, factorial_succ]
simp only [factorial_one, one_mul, Function.comp_apply, factorial, mul_one, ← one_eq_succ_zero]
rw [Nat.mul_div_assoc _ (prod_factorial_dvd_factorial_sum _ _)]
#align nat.multinomial_insert_one Nat.multinomial_insert_one
theorem multinomial_congr {f g : α → ℕ} (h : ∀ a ∈ s, f a = g a) :
multinomial s f = multinomial s g := by
simp only [multinomial]; congr 1
· rw [Finset.sum_congr rfl h]
· exact Finset.prod_congr rfl fun a ha => by rw [h a ha]
#align nat.multinomial_congr Nat.multinomial_congr
theorem binomial_eq [DecidableEq α] (h : a ≠ b) :
multinomial {a, b} f = (f a + f b)! / ((f a)! * (f b)!) := by
simp [multinomial, Finset.sum_pair h, Finset.prod_pair h]
#align nat.binomial_eq Nat.binomial_eq
theorem binomial_eq_choose [DecidableEq α] (h : a ≠ b) :
multinomial {a, b} f = (f a + f b).choose (f a) := by
simp [binomial_eq h, choose_eq_factorial_div_factorial (Nat.le_add_right _ _)]
#align nat.binomial_eq_choose Nat.binomial_eq_choose
| Mathlib/Data/Nat/Choose/Multinomial.lean | 112 | 114 | theorem binomial_spec [DecidableEq α] (hab : a ≠ b) :
(f a)! * (f b)! * multinomial {a, b} f = (f a + f b)! := by |
simpa [Finset.sum_pair hab, Finset.prod_pair hab] using multinomial_spec {a, b} f
|
import Mathlib.LinearAlgebra.Dual
open Function Module
variable (R M N : Type*) [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N]
structure PerfectPairing :=
toLin : M →ₗ[R] N →ₗ[R] R
bijectiveLeft : Bijective toLin
bijectiveRight : Bijective toLin.flip
attribute [nolint docBlame] PerfectPairing.toLin
variable {R M N}
namespace PerfectPairing
instance instFunLike : FunLike (PerfectPairing R M N) M (N →ₗ[R] R) where
coe f := f.toLin
coe_injective' x y h := by cases x; cases y; simpa using h
variable (p : PerfectPairing R M N)
protected def flip : PerfectPairing R N M where
toLin := p.toLin.flip
bijectiveLeft := p.bijectiveRight
bijectiveRight := p.bijectiveLeft
@[simp] lemma flip_flip : p.flip.flip = p := rfl
noncomputable def toDualLeft : M ≃ₗ[R] Dual R N :=
LinearEquiv.ofBijective p.toLin p.bijectiveLeft
@[simp]
theorem toDualLeft_apply (a : M) : p.toDualLeft a = p a :=
rfl
@[simp]
theorem apply_toDualLeft_symm_apply (f : Dual R N) (x : N) : p (p.toDualLeft.symm f) x = f x := by
have h := LinearEquiv.apply_symm_apply p.toDualLeft f
rw [toDualLeft_apply] at h
exact congrFun (congrArg DFunLike.coe h) x
noncomputable def toDualRight : N ≃ₗ[R] Dual R M :=
toDualLeft p.flip
@[simp]
theorem toDualRight_apply (a : N) : p.toDualRight a = p.flip a :=
rfl
@[simp]
theorem apply_apply_toDualRight_symm (x : M) (f : Dual R M) :
(p x) (p.toDualRight.symm f) = f x := by
have h := LinearEquiv.apply_symm_apply p.toDualRight f
rw [toDualRight_apply] at h
exact congrFun (congrArg DFunLike.coe h) x
theorem toDualLeft_of_toDualRight_symm (x : M) (f : Dual R M) :
(p.toDualLeft x) (p.toDualRight.symm f) = f x := by
rw [@toDualLeft_apply]
exact apply_apply_toDualRight_symm p x f
| Mathlib/LinearAlgebra/PerfectPairing.lean | 96 | 100 | theorem toDualRight_symm_toDualLeft (x : M) :
p.toDualRight.symm.dualMap (p.toDualLeft x) = Dual.eval R M x := by |
ext f
simp only [LinearEquiv.dualMap_apply, Dual.eval_apply]
exact toDualLeft_of_toDualRight_symm p x f
|
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
import Mathlib.Order.Filter.CountableInter
#align_import topology.G_delta from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open Topology TopologicalSpace Filter Encodable Set
open scoped Uniformity
variable {X Y ι : Type*} {ι' : Sort*}
set_option linter.uppercaseLean3 false
section IsGδ
variable [TopologicalSpace X]
def IsGδ (s : Set X) : Prop :=
∃ T : Set (Set X), (∀ t ∈ T, IsOpen t) ∧ T.Countable ∧ s = ⋂₀ T
#align is_Gδ IsGδ
theorem IsOpen.isGδ {s : Set X} (h : IsOpen s) : IsGδ s :=
⟨{s}, by simp [h], countable_singleton _, (Set.sInter_singleton _).symm⟩
#align is_open.is_Gδ IsOpen.isGδ
@[simp]
protected theorem IsGδ.empty : IsGδ (∅ : Set X) :=
isOpen_empty.isGδ
#align is_Gδ_empty IsGδ.empty
@[deprecated (since := "2024-02-15")] alias isGδ_empty := IsGδ.empty
@[simp]
protected theorem IsGδ.univ : IsGδ (univ : Set X) :=
isOpen_univ.isGδ
#align is_Gδ_univ IsGδ.univ
@[deprecated (since := "2024-02-15")] alias isGδ_univ := IsGδ.univ
theorem IsGδ.biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i) :=
⟨f '' I, by rwa [forall_mem_image], hI.image _, by rw [sInter_image]⟩
#align is_Gδ_bInter_of_open IsGδ.biInter_of_isOpen
@[deprecated (since := "2024-02-15")] alias isGδ_biInter_of_isOpen := IsGδ.biInter_of_isOpen
theorem IsGδ.iInter_of_isOpen [Countable ι'] {f : ι' → Set X} (hf : ∀ i, IsOpen (f i)) :
IsGδ (⋂ i, f i) :=
⟨range f, by rwa [forall_mem_range], countable_range _, by rw [sInter_range]⟩
#align is_Gδ_Inter_of_open IsGδ.iInter_of_isOpen
@[deprecated (since := "2024-02-15")] alias isGδ_iInter_of_isOpen := IsGδ.iInter_of_isOpen
lemma isGδ_iff_eq_iInter_nat {s : Set X} :
IsGδ s ↔ ∃ (f : ℕ → Set X), (∀ n, IsOpen (f n)) ∧ s = ⋂ n, f n := by
refine ⟨?_, ?_⟩
· rintro ⟨T, hT, T_count, rfl⟩
rcases Set.eq_empty_or_nonempty T with rfl|hT
· exact ⟨fun _n ↦ univ, fun _n ↦ isOpen_univ, by simp⟩
· obtain ⟨f, hf⟩ : ∃ (f : ℕ → Set X), T = range f := Countable.exists_eq_range T_count hT
exact ⟨f, by aesop, by simp [hf]⟩
· rintro ⟨f, hf, rfl⟩
exact .iInter_of_isOpen hf
alias ⟨IsGδ.eq_iInter_nat, _⟩ := isGδ_iff_eq_iInter_nat
protected theorem IsGδ.iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) :
IsGδ (⋂ i, s i) := by
choose T hTo hTc hTs using hs
obtain rfl : s = fun i => ⋂₀ T i := funext hTs
refine ⟨⋃ i, T i, ?_, countable_iUnion hTc, (sInter_iUnion _).symm⟩
simpa [@forall_swap ι'] using hTo
#align is_Gδ_Inter IsGδ.iInter
@[deprecated] alias isGδ_iInter := IsGδ.iInter
theorem IsGδ.biInter {s : Set ι} (hs : s.Countable) {t : ∀ i ∈ s, Set X}
(ht : ∀ (i) (hi : i ∈ s), IsGδ (t i hi)) : IsGδ (⋂ i ∈ s, t i ‹_›) := by
rw [biInter_eq_iInter]
haveI := hs.to_subtype
exact .iInter fun x => ht x x.2
#align is_Gδ_bInter IsGδ.biInter
@[deprecated (since := "2024-02-15")] alias isGδ_biInter := IsGδ.biInter
theorem IsGδ.sInter {S : Set (Set X)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S) := by
simpa only [sInter_eq_biInter] using IsGδ.biInter hS h
#align is_Gδ_sInter IsGδ.sInter
@[deprecated (since := "2024-02-15")] alias isGδ_sInter := IsGδ.sInter
| Mathlib/Topology/GDelta.lean | 136 | 138 | theorem IsGδ.inter {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∩ t) := by |
rw [inter_eq_iInter]
exact .iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
|
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Ring.Defs
#align_import algebra.euclidean_domain.defs from "leanprover-community/mathlib"@"ee7b9f9a9ac2a8d9f04ea39bbfe6b1a3be053b38"
universe u
class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R where
protected quotient : R → R → R
protected quotient_zero : ∀ a, quotient a 0 = 0
protected remainder : R → R → R
protected quotient_mul_add_remainder_eq : ∀ a b, b * quotient a b + remainder a b = a
protected r : R → R → Prop
r_wellFounded : WellFounded r
protected remainder_lt : ∀ (a) {b}, b ≠ 0 → r (remainder a b) b
mul_left_not_lt : ∀ (a) {b}, b ≠ 0 → ¬r (a * b) a
#align euclidean_domain EuclideanDomain
#align euclidean_domain.quotient EuclideanDomain.quotient
#align euclidean_domain.quotient_zero EuclideanDomain.quotient_zero
#align euclidean_domain.remainder EuclideanDomain.remainder
#align euclidean_domain.quotient_mul_add_remainder_eq EuclideanDomain.quotient_mul_add_remainder_eq
#align euclidean_domain.r EuclideanDomain.r
#align euclidean_domain.r_well_founded EuclideanDomain.r_wellFounded
#align euclidean_domain.remainder_lt EuclideanDomain.remainder_lt
#align euclidean_domain.mul_left_not_lt EuclideanDomain.mul_left_not_lt
namespace EuclideanDomain
variable {R : Type u} [EuclideanDomain R]
local infixl:50 " ≺ " => EuclideanDomain.r
local instance wellFoundedRelation : WellFoundedRelation R where
wf := r_wellFounded
-- see Note [lower instance priority]
instance (priority := 70) : Div R :=
⟨EuclideanDomain.quotient⟩
-- see Note [lower instance priority]
instance (priority := 70) : Mod R :=
⟨EuclideanDomain.remainder⟩
theorem div_add_mod (a b : R) : b * (a / b) + a % b = a :=
EuclideanDomain.quotient_mul_add_remainder_eq _ _
#align euclidean_domain.div_add_mod EuclideanDomain.div_add_mod
theorem mod_add_div (a b : R) : a % b + b * (a / b) = a :=
(add_comm _ _).trans (div_add_mod _ _)
#align euclidean_domain.mod_add_div EuclideanDomain.mod_add_div
| Mathlib/Algebra/EuclideanDomain/Defs.lean | 131 | 133 | theorem mod_add_div' (m k : R) : m % k + m / k * k = m := by |
rw [mul_comm]
exact mod_add_div _ _
|
import Mathlib.Algebra.Lie.Abelian
import Mathlib.Algebra.Lie.IdealOperations
import Mathlib.Algebra.Lie.Quotient
#align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102"
variable {R L M M' : Type*}
variable [CommRing R] [LieRing L] [LieAlgebra R L]
variable [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
variable [AddCommGroup M'] [Module R M'] [LieRingModule L M'] [LieModule R L M']
namespace LieSubmodule
variable (N : LieSubmodule R L M) {N₁ N₂ : LieSubmodule R L M}
def normalizer : LieSubmodule R L M where
carrier := {m | ∀ x : L, ⁅x, m⁆ ∈ N}
add_mem' hm₁ hm₂ x := by rw [lie_add]; exact N.add_mem' (hm₁ x) (hm₂ x)
zero_mem' x := by simp
smul_mem' t m hm x := by rw [lie_smul]; exact N.smul_mem' t (hm x)
lie_mem {x m} hm y := by rw [leibniz_lie]; exact N.add_mem' (hm ⁅y, x⁆) (N.lie_mem (hm y))
#align lie_submodule.normalizer LieSubmodule.normalizer
@[simp]
theorem mem_normalizer (m : M) : m ∈ N.normalizer ↔ ∀ x : L, ⁅x, m⁆ ∈ N :=
Iff.rfl
#align lie_submodule.mem_normalizer LieSubmodule.mem_normalizer
@[simp]
theorem le_normalizer : N ≤ N.normalizer := by
intro m hm
rw [mem_normalizer]
exact fun x => N.lie_mem hm
#align lie_submodule.le_normalizer LieSubmodule.le_normalizer
theorem normalizer_inf : (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer := by
ext; simp [← forall_and]
#align lie_submodule.normalizer_inf LieSubmodule.normalizer_inf
@[mono]
theorem monotone_normalizer : Monotone (normalizer : LieSubmodule R L M → LieSubmodule R L M) := by
intro N₁ N₂ h m hm
rw [mem_normalizer] at hm ⊢
exact fun x => h (hm x)
#align lie_submodule.monotone_normalizer LieSubmodule.monotone_normalizer
@[simp]
theorem comap_normalizer (f : M' →ₗ⁅R,L⁆ M) : N.normalizer.comap f = (N.comap f).normalizer := by
ext; simp
#align lie_submodule.comap_normalizer LieSubmodule.comap_normalizer
| Mathlib/Algebra/Lie/Normalizer.lean | 86 | 87 | theorem top_lie_le_iff_le_normalizer (N' : LieSubmodule R L M) :
⁅(⊤ : LieIdeal R L), N⁆ ≤ N' ↔ N ≤ N'.normalizer := by | rw [lie_le_iff]; tauto
|
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.NormedSpace.Complemented
#align_import analysis.calculus.implicit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Topology
open Filter
open ContinuousLinearMap (fst snd smulRight ker_prod)
open ContinuousLinearEquiv (ofBijective)
open LinearMap (ker range)
-- Porting note(#5171): linter not yet ported @[nolint has_nonempty_instance]
structure ImplicitFunctionData (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)
[NormedAddCommGroup E] [NormedSpace 𝕜 E] [CompleteSpace E] (F : Type*) [NormedAddCommGroup F]
[NormedSpace 𝕜 F] [CompleteSpace F] (G : Type*) [NormedAddCommGroup G] [NormedSpace 𝕜 G]
[CompleteSpace G] where
leftFun : E → F
leftDeriv : E →L[𝕜] F
rightFun : E → G
rightDeriv : E →L[𝕜] G
pt : E
left_has_deriv : HasStrictFDerivAt leftFun leftDeriv pt
right_has_deriv : HasStrictFDerivAt rightFun rightDeriv pt
left_range : range leftDeriv = ⊤
right_range : range rightDeriv = ⊤
isCompl_ker : IsCompl (ker leftDeriv) (ker rightDeriv)
#align implicit_function_data ImplicitFunctionData
namespace ImplicitFunctionData
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
[NormedSpace 𝕜 E] [CompleteSpace E] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
[CompleteSpace F] {G : Type*} [NormedAddCommGroup G] [NormedSpace 𝕜 G] [CompleteSpace G]
(φ : ImplicitFunctionData 𝕜 E F G)
def prodFun (x : E) : F × G :=
(φ.leftFun x, φ.rightFun x)
#align implicit_function_data.prod_fun ImplicitFunctionData.prodFun
@[simp]
theorem prodFun_apply (x : E) : φ.prodFun x = (φ.leftFun x, φ.rightFun x) :=
rfl
#align implicit_function_data.prod_fun_apply ImplicitFunctionData.prodFun_apply
protected theorem hasStrictFDerivAt :
HasStrictFDerivAt φ.prodFun
(φ.leftDeriv.equivProdOfSurjectiveOfIsCompl φ.rightDeriv φ.left_range φ.right_range
φ.isCompl_ker :
E →L[𝕜] F × G)
φ.pt :=
φ.left_has_deriv.prod φ.right_has_deriv
#align implicit_function_data.has_strict_fderiv_at ImplicitFunctionData.hasStrictFDerivAt
def toPartialHomeomorph : PartialHomeomorph E (F × G) :=
φ.hasStrictFDerivAt.toPartialHomeomorph _
#align implicit_function_data.to_local_homeomorph ImplicitFunctionData.toPartialHomeomorph
def implicitFunction : F → G → E :=
Function.curry <| φ.toPartialHomeomorph.symm
#align implicit_function_data.implicit_function ImplicitFunctionData.implicitFunction
@[simp]
theorem toPartialHomeomorph_coe : ⇑φ.toPartialHomeomorph = φ.prodFun :=
rfl
#align implicit_function_data.to_local_homeomorph_coe ImplicitFunctionData.toPartialHomeomorph_coe
theorem toPartialHomeomorph_apply (x : E) : φ.toPartialHomeomorph x = (φ.leftFun x, φ.rightFun x) :=
rfl
#align implicit_function_data.to_local_homeomorph_apply ImplicitFunctionData.toPartialHomeomorph_apply
theorem pt_mem_toPartialHomeomorph_source : φ.pt ∈ φ.toPartialHomeomorph.source :=
φ.hasStrictFDerivAt.mem_toPartialHomeomorph_source
#align implicit_function_data.pt_mem_to_local_homeomorph_source ImplicitFunctionData.pt_mem_toPartialHomeomorph_source
theorem map_pt_mem_toPartialHomeomorph_target :
(φ.leftFun φ.pt, φ.rightFun φ.pt) ∈ φ.toPartialHomeomorph.target :=
φ.toPartialHomeomorph.map_source <| φ.pt_mem_toPartialHomeomorph_source
#align implicit_function_data.map_pt_mem_to_local_homeomorph_target ImplicitFunctionData.map_pt_mem_toPartialHomeomorph_target
theorem prod_map_implicitFunction :
∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.prodFun (φ.implicitFunction p.1 p.2) = p :=
φ.hasStrictFDerivAt.eventually_right_inverse.mono fun ⟨_, _⟩ h => h
#align implicit_function_data.prod_map_implicit_function ImplicitFunctionData.prod_map_implicitFunction
theorem left_map_implicitFunction :
∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.leftFun (φ.implicitFunction p.1 p.2) = p.1 :=
φ.prod_map_implicitFunction.mono fun _ => congr_arg Prod.fst
#align implicit_function_data.left_map_implicit_function ImplicitFunctionData.left_map_implicitFunction
theorem right_map_implicitFunction :
∀ᶠ p : F × G in 𝓝 (φ.prodFun φ.pt), φ.rightFun (φ.implicitFunction p.1 p.2) = p.2 :=
φ.prod_map_implicitFunction.mono fun _ => congr_arg Prod.snd
#align implicit_function_data.right_map_implicit_function ImplicitFunctionData.right_map_implicitFunction
theorem implicitFunction_apply_image :
∀ᶠ x in 𝓝 φ.pt, φ.implicitFunction (φ.leftFun x) (φ.rightFun x) = x :=
φ.hasStrictFDerivAt.eventually_left_inverse
#align implicit_function_data.implicit_function_apply_image ImplicitFunctionData.implicitFunction_apply_image
theorem map_nhds_eq : map φ.leftFun (𝓝 φ.pt) = 𝓝 (φ.leftFun φ.pt) :=
show map (Prod.fst ∘ φ.prodFun) (𝓝 φ.pt) = 𝓝 (φ.prodFun φ.pt).1 by
rw [← map_map, φ.hasStrictFDerivAt.map_nhds_eq_of_equiv, map_fst_nhds]
#align implicit_function_data.map_nhds_eq ImplicitFunctionData.map_nhds_eq
| Mathlib/Analysis/Calculus/Implicit.lean | 201 | 214 | theorem implicitFunction_hasStrictFDerivAt (g'inv : G →L[𝕜] E)
(hg'inv : φ.rightDeriv.comp g'inv = ContinuousLinearMap.id 𝕜 G)
(hg'invf : φ.leftDeriv.comp g'inv = 0) :
HasStrictFDerivAt (φ.implicitFunction (φ.leftFun φ.pt)) g'inv (φ.rightFun φ.pt) := by |
have := φ.hasStrictFDerivAt.to_localInverse
simp only [prodFun] at this
convert this.comp (φ.rightFun φ.pt) ((hasStrictFDerivAt_const _ _).prod (hasStrictFDerivAt_id _))
-- Porting note: added parentheses to help `simp`
simp only [ContinuousLinearMap.ext_iff, (ContinuousLinearMap.comp_apply)] at hg'inv hg'invf ⊢
-- porting note (#10745): was `simp [ContinuousLinearEquiv.eq_symm_apply]`;
-- both `simp` and `rw` fail here, `erw` works
intro x
erw [ContinuousLinearEquiv.eq_symm_apply]
simp [*]
|
import Mathlib.Algebra.Exact
import Mathlib.RingTheory.TensorProduct.Basic
section Modules
open TensorProduct LinearMap
section Semiring
variable {R : Type*} [CommSemiring R] {M N P Q: Type*}
[AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] [AddCommMonoid Q]
[Module R M] [Module R N] [Module R P] [Module R Q]
{f : M →ₗ[R] N} (g : N →ₗ[R] P)
lemma le_comap_range_lTensor (q : Q) :
LinearMap.range g ≤ (LinearMap.range (lTensor Q g)).comap (TensorProduct.mk R Q P q) := by
rintro x ⟨n, rfl⟩
exact ⟨q ⊗ₜ[R] n, rfl⟩
lemma le_comap_range_rTensor (q : Q) :
LinearMap.range g ≤ (LinearMap.range (rTensor Q g)).comap
((TensorProduct.mk R P Q).flip q) := by
rintro x ⟨n, rfl⟩
exact ⟨n ⊗ₜ[R] q, rfl⟩
variable (Q) {g}
| Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean | 111 | 122 | theorem LinearMap.lTensor_surjective (hg : Function.Surjective g) :
Function.Surjective (lTensor Q g) := by |
intro z
induction z using TensorProduct.induction_on with
| zero => exact ⟨0, map_zero _⟩
| tmul q p =>
obtain ⟨n, rfl⟩ := hg p
exact ⟨q ⊗ₜ[R] n, rfl⟩
| add x y hx hy =>
obtain ⟨x, rfl⟩ := hx
obtain ⟨y, rfl⟩ := hy
exact ⟨x + y, map_add _ _ _⟩
|
import Mathlib.SetTheory.Game.Ordinal
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c"
universe u
open Ordinal
namespace SetTheory
open scoped NaturalOps PGame
namespace PGame
noncomputable def birthday : PGame.{u} → Ordinal.{u}
| ⟨_, _, xL, xR⟩ =>
max (lsub.{u, u} fun i => birthday (xL i)) (lsub.{u, u} fun i => birthday (xR i))
#align pgame.birthday SetTheory.PGame.birthday
theorem birthday_def (x : PGame) :
birthday x =
max (lsub.{u, u} fun i => birthday (x.moveLeft i))
(lsub.{u, u} fun i => birthday (x.moveRight i)) := by
cases x; rw [birthday]; rfl
#align pgame.birthday_def SetTheory.PGame.birthday_def
theorem birthday_moveLeft_lt {x : PGame} (i : x.LeftMoves) :
(x.moveLeft i).birthday < x.birthday := by
cases x; rw [birthday]; exact lt_max_of_lt_left (lt_lsub _ i)
#align pgame.birthday_move_left_lt SetTheory.PGame.birthday_moveLeft_lt
theorem birthday_moveRight_lt {x : PGame} (i : x.RightMoves) :
(x.moveRight i).birthday < x.birthday := by
cases x; rw [birthday]; exact lt_max_of_lt_right (lt_lsub _ i)
#align pgame.birthday_move_right_lt SetTheory.PGame.birthday_moveRight_lt
theorem lt_birthday_iff {x : PGame} {o : Ordinal} :
o < x.birthday ↔
(∃ i : x.LeftMoves, o ≤ (x.moveLeft i).birthday) ∨
∃ i : x.RightMoves, o ≤ (x.moveRight i).birthday := by
constructor
· rw [birthday_def]
intro h
cases' lt_max_iff.1 h with h' h'
· left
rwa [lt_lsub_iff] at h'
· right
rwa [lt_lsub_iff] at h'
· rintro (⟨i, hi⟩ | ⟨i, hi⟩)
· exact hi.trans_lt (birthday_moveLeft_lt i)
· exact hi.trans_lt (birthday_moveRight_lt i)
#align pgame.lt_birthday_iff SetTheory.PGame.lt_birthday_iff
theorem Relabelling.birthday_congr : ∀ {x y : PGame.{u}}, x ≡r y → birthday x = birthday y
| ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩, r => by
unfold birthday
congr 1
all_goals
apply lsub_eq_of_range_eq.{u, u, u}
ext i; constructor
all_goals rintro ⟨j, rfl⟩
· exact ⟨_, (r.moveLeft j).birthday_congr.symm⟩
· exact ⟨_, (r.moveLeftSymm j).birthday_congr⟩
· exact ⟨_, (r.moveRight j).birthday_congr.symm⟩
· exact ⟨_, (r.moveRightSymm j).birthday_congr⟩
termination_by x y => (x, y)
#align pgame.relabelling.birthday_congr SetTheory.PGame.Relabelling.birthday_congr
@[simp]
theorem birthday_eq_zero {x : PGame} :
birthday x = 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves := by
rw [birthday_def, max_eq_zero, lsub_eq_zero_iff, lsub_eq_zero_iff]
#align pgame.birthday_eq_zero SetTheory.PGame.birthday_eq_zero
@[simp]
theorem birthday_zero : birthday 0 = 0 := by simp [inferInstanceAs (IsEmpty PEmpty)]
#align pgame.birthday_zero SetTheory.PGame.birthday_zero
@[simp]
| Mathlib/SetTheory/Game/Birthday.lean | 107 | 107 | theorem birthday_one : birthday 1 = 1 := by | rw [birthday_def]; simp
|
import Mathlib.Probability.Kernel.CondDistrib
#align_import probability.kernel.condexp from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
open MeasureTheory Set Filter TopologicalSpace
open scoped ENNReal MeasureTheory ProbabilityTheory
namespace ProbabilityTheory
section AuxLemmas
variable {Ω F : Type*} {m mΩ : MeasurableSpace Ω} {μ : Measure Ω} {f : Ω → F}
theorem _root_.MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_id [TopologicalSpace F]
(hm : m ≤ mΩ) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (fun x : Ω × Ω => f x.2)
(@Measure.map Ω (Ω × Ω) (m.prod mΩ) mΩ (fun ω => (id ω, id ω)) μ) := by
rw [← aestronglyMeasurable_comp_snd_map_prod_mk_iff (measurable_id'' hm)] at hf
simp_rw [id] at hf ⊢
exact hf
#align measure_theory.ae_strongly_measurable.comp_snd_map_prod_id MeasureTheory.AEStronglyMeasurable.comp_snd_map_prod_id
| Mathlib/Probability/Kernel/Condexp.lean | 52 | 57 | theorem _root_.MeasureTheory.Integrable.comp_snd_map_prod_id [NormedAddCommGroup F] (hm : m ≤ mΩ)
(hf : Integrable f μ) : Integrable (fun x : Ω × Ω => f x.2)
(@Measure.map Ω (Ω × Ω) (m.prod mΩ) mΩ (fun ω => (id ω, id ω)) μ) := by |
rw [← integrable_comp_snd_map_prod_mk_iff (measurable_id'' hm)] at hf
simp_rw [id] at hf ⊢
exact hf
|
import Mathlib.Algebra.Algebra.Spectrum
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Nilpotent.Basic
#align_import linear_algebra.eigenspace.basic from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1"
universe u v w
namespace Module
namespace End
open FiniteDimensional Set
variable {K R : Type v} {V M : Type w} [CommRing R] [AddCommGroup M] [Module R M] [Field K]
[AddCommGroup V] [Module K V]
def eigenspace (f : End R M) (μ : R) : Submodule R M :=
LinearMap.ker (f - algebraMap R (End R M) μ)
#align module.End.eigenspace Module.End.eigenspace
@[simp]
theorem eigenspace_zero (f : End R M) : f.eigenspace 0 = LinearMap.ker f := by simp [eigenspace]
#align module.End.eigenspace_zero Module.End.eigenspace_zero
def HasEigenvector (f : End R M) (μ : R) (x : M) : Prop :=
x ∈ eigenspace f μ ∧ x ≠ 0
#align module.End.has_eigenvector Module.End.HasEigenvector
def HasEigenvalue (f : End R M) (a : R) : Prop :=
eigenspace f a ≠ ⊥
#align module.End.has_eigenvalue Module.End.HasEigenvalue
def Eigenvalues (f : End R M) : Type _ :=
{ μ : R // f.HasEigenvalue μ }
#align module.End.eigenvalues Module.End.Eigenvalues
@[coe]
def Eigenvalues.val (f : Module.End R M) : Eigenvalues f → R := Subtype.val
instance Eigenvalues.instCoeOut {f : Module.End R M} : CoeOut (Eigenvalues f) R where
coe := Eigenvalues.val f
instance Eigenvalues.instDecidableEq [DecidableEq R] (f : Module.End R M) :
DecidableEq (Eigenvalues f) :=
inferInstanceAs (DecidableEq (Subtype (fun x : R => HasEigenvalue f x)))
| Mathlib/LinearAlgebra/Eigenspace/Basic.lean | 98 | 101 | theorem hasEigenvalue_of_hasEigenvector {f : End R M} {μ : R} {x : M} (h : HasEigenvector f μ x) :
HasEigenvalue f μ := by |
rw [HasEigenvalue, Submodule.ne_bot_iff]
use x; exact h
|
import Mathlib.Topology.Separation
import Mathlib.Topology.Bases
#align_import topology.dense_embedding from "leanprover-community/mathlib"@"148aefbd371a25f1cff33c85f20c661ce3155def"
noncomputable section
open Set Filter
open scoped Topology
variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
structure DenseInducing [TopologicalSpace α] [TopologicalSpace β] (i : α → β)
extends Inducing i : Prop where
protected dense : DenseRange i
#align dense_inducing DenseInducing
namespace DenseInducing
variable [TopologicalSpace α] [TopologicalSpace β]
variable {i : α → β} (di : DenseInducing i)
theorem nhds_eq_comap (di : DenseInducing i) : ∀ a : α, 𝓝 a = comap i (𝓝 <| i a) :=
di.toInducing.nhds_eq_comap
#align dense_inducing.nhds_eq_comap DenseInducing.nhds_eq_comap
protected theorem continuous (di : DenseInducing i) : Continuous i :=
di.toInducing.continuous
#align dense_inducing.continuous DenseInducing.continuous
theorem closure_range : closure (range i) = univ :=
di.dense.closure_range
#align dense_inducing.closure_range DenseInducing.closure_range
protected theorem preconnectedSpace [PreconnectedSpace α] (di : DenseInducing i) :
PreconnectedSpace β :=
di.dense.preconnectedSpace di.continuous
#align dense_inducing.preconnected_space DenseInducing.preconnectedSpace
theorem closure_image_mem_nhds {s : Set α} {a : α} (di : DenseInducing i) (hs : s ∈ 𝓝 a) :
closure (i '' s) ∈ 𝓝 (i a) := by
rw [di.nhds_eq_comap a, ((nhds_basis_opens _).comap _).mem_iff] at hs
rcases hs with ⟨U, ⟨haU, hUo⟩, sub : i ⁻¹' U ⊆ s⟩
refine mem_of_superset (hUo.mem_nhds haU) ?_
calc
U ⊆ closure (i '' (i ⁻¹' U)) := di.dense.subset_closure_image_preimage_of_isOpen hUo
_ ⊆ closure (i '' s) := closure_mono (image_subset i sub)
#align dense_inducing.closure_image_mem_nhds DenseInducing.closure_image_mem_nhds
theorem dense_image (di : DenseInducing i) {s : Set α} : Dense (i '' s) ↔ Dense s := by
refine ⟨fun H x => ?_, di.dense.dense_image di.continuous⟩
rw [di.toInducing.closure_eq_preimage_closure_image, H.closure_eq, preimage_univ]
trivial
#align dense_inducing.dense_image DenseInducing.dense_image
| Mathlib/Topology/DenseEmbedding.lean | 83 | 90 | theorem interior_compact_eq_empty [T2Space β] (di : DenseInducing i) (hd : Dense (range i)ᶜ)
{s : Set α} (hs : IsCompact s) : interior s = ∅ := by |
refine eq_empty_iff_forall_not_mem.2 fun x hx => ?_
rw [mem_interior_iff_mem_nhds] at hx
have := di.closure_image_mem_nhds hx
rw [(hs.image di.continuous).isClosed.closure_eq] at this
rcases hd.inter_nhds_nonempty this with ⟨y, hyi, hys⟩
exact hyi (image_subset_range _ _ hys)
|
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordinal.{u} → PGame.{u}
| o =>
have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
⟨o.out.α, PEmpty, fun x =>
have := Ordinal.typein_lt_self x
(typein (· < ·) x).toPGame,
PEmpty.elim⟩
termination_by x => x
#align ordinal.to_pgame Ordinal.toPGame
@[nolint unusedHavesSuffices]
theorem toPGame_def (o : Ordinal) :
have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
o.toPGame = ⟨o.out.α, PEmpty, fun x => (typein (· < ·) x).toPGame, PEmpty.elim⟩ := by
rw [toPGame]
#align ordinal.to_pgame_def Ordinal.toPGame_def
@[simp, nolint unusedHavesSuffices]
theorem toPGame_leftMoves (o : Ordinal) : o.toPGame.LeftMoves = o.out.α := by
rw [toPGame, LeftMoves]
#align ordinal.to_pgame_left_moves Ordinal.toPGame_leftMoves
@[simp, nolint unusedHavesSuffices]
theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty := by
rw [toPGame, RightMoves]
#align ordinal.to_pgame_right_moves Ordinal.toPGame_rightMoves
instance isEmpty_zero_toPGame_leftMoves : IsEmpty (toPGame 0).LeftMoves := by
rw [toPGame_leftMoves]; infer_instance
#align ordinal.is_empty_zero_to_pgame_left_moves Ordinal.isEmpty_zero_toPGame_leftMoves
instance isEmpty_toPGame_rightMoves (o : Ordinal) : IsEmpty o.toPGame.RightMoves := by
rw [toPGame_rightMoves]; infer_instance
#align ordinal.is_empty_to_pgame_right_moves Ordinal.isEmpty_toPGame_rightMoves
noncomputable def toLeftMovesToPGame {o : Ordinal} : Set.Iio o ≃ o.toPGame.LeftMoves :=
(enumIsoOut o).toEquiv.trans (Equiv.cast (toPGame_leftMoves o).symm)
#align ordinal.to_left_moves_to_pgame Ordinal.toLeftMovesToPGame
@[simp]
theorem toLeftMovesToPGame_symm_lt {o : Ordinal} (i : o.toPGame.LeftMoves) :
↑(toLeftMovesToPGame.symm i) < o :=
(toLeftMovesToPGame.symm i).prop
#align ordinal.to_left_moves_to_pgame_symm_lt Ordinal.toLeftMovesToPGame_symm_lt
@[nolint unusedHavesSuffices]
theorem toPGame_moveLeft_hEq {o : Ordinal} :
have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
HEq o.toPGame.moveLeft fun x : o.out.α => (typein (· < ·) x).toPGame := by
rw [toPGame]
rfl
#align ordinal.to_pgame_move_left_heq Ordinal.toPGame_moveLeft_hEq
@[simp]
theorem toPGame_moveLeft' {o : Ordinal} (i) :
o.toPGame.moveLeft i = (toLeftMovesToPGame.symm i).val.toPGame :=
(congr_heq toPGame_moveLeft_hEq.symm (cast_heq _ i)).symm
#align ordinal.to_pgame_move_left' Ordinal.toPGame_moveLeft'
theorem toPGame_moveLeft {o : Ordinal} (i) :
o.toPGame.moveLeft (toLeftMovesToPGame i) = i.val.toPGame := by simp
#align ordinal.to_pgame_move_left Ordinal.toPGame_moveLeft
noncomputable def zeroToPGameRelabelling : toPGame 0 ≡r 0 :=
Relabelling.isEmpty _
#align ordinal.zero_to_pgame_relabelling Ordinal.zeroToPGameRelabelling
noncomputable instance uniqueOneToPGameLeftMoves : Unique (toPGame 1).LeftMoves :=
(Equiv.cast <| toPGame_leftMoves 1).unique
#align ordinal.unique_one_to_pgame_left_moves Ordinal.uniqueOneToPGameLeftMoves
@[simp]
theorem one_toPGame_leftMoves_default_eq :
(default : (toPGame 1).LeftMoves) = @toLeftMovesToPGame 1 ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ :=
rfl
#align ordinal.one_to_pgame_left_moves_default_eq Ordinal.one_toPGame_leftMoves_default_eq
@[simp]
theorem to_leftMoves_one_toPGame_symm (i) :
(@toLeftMovesToPGame 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩ := by
simp [eq_iff_true_of_subsingleton]
#align ordinal.to_left_moves_one_to_pgame_symm Ordinal.to_leftMoves_one_toPGame_symm
theorem one_toPGame_moveLeft (x) : (toPGame 1).moveLeft x = toPGame 0 := by simp
#align ordinal.one_to_pgame_move_left Ordinal.one_toPGame_moveLeft
noncomputable def oneToPGameRelabelling : toPGame 1 ≡r 1 :=
⟨Equiv.equivOfUnique _ _, Equiv.equivOfIsEmpty _ _, fun i => by
simpa using zeroToPGameRelabelling, isEmptyElim⟩
#align ordinal.one_to_pgame_relabelling Ordinal.oneToPGameRelabelling
theorem toPGame_lf {a b : Ordinal} (h : a < b) : a.toPGame ⧏ b.toPGame := by
convert moveLeft_lf (toLeftMovesToPGame ⟨a, h⟩); rw [toPGame_moveLeft]
#align ordinal.to_pgame_lf Ordinal.toPGame_lf
| Mathlib/SetTheory/Game/Ordinal.lean | 134 | 137 | theorem toPGame_le {a b : Ordinal} (h : a ≤ b) : a.toPGame ≤ b.toPGame := by |
refine le_iff_forall_lf.2 ⟨fun i => ?_, isEmptyElim⟩
rw [toPGame_moveLeft']
exact toPGame_lf ((toLeftMovesToPGame_symm_lt i).trans_le h)
|
import Mathlib.FieldTheory.Galois
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Topology.Algebra.OpenSubgroup
import Mathlib.Tactic.ByContra
#align_import field_theory.krull_topology from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
open scoped Classical Pointwise
theorem IntermediateField.map_id {K L : Type*} [Field K] [Field L] [Algebra K L]
(E : IntermediateField K L) : E.map (AlgHom.id K L) = E :=
SetLike.coe_injective <| Set.image_id _
#align intermediate_field.map_id IntermediateField.map_id
instance im_finiteDimensional {K L : Type*} [Field K] [Field L] [Algebra K L]
{E : IntermediateField K L} (σ : L ≃ₐ[K] L) [FiniteDimensional K E] :
FiniteDimensional K (E.map σ.toAlgHom) :=
LinearEquiv.finiteDimensional (IntermediateField.intermediateFieldMap σ E).toLinearEquiv
#align im_finite_dimensional im_finiteDimensional
def finiteExts (K : Type*) [Field K] (L : Type*) [Field L] [Algebra K L] :
Set (IntermediateField K L) :=
{E | FiniteDimensional K E}
#align finite_exts finiteExts
def fixedByFinite (K L : Type*) [Field K] [Field L] [Algebra K L] : Set (Subgroup (L ≃ₐ[K] L)) :=
IntermediateField.fixingSubgroup '' finiteExts K L
#align fixed_by_finite fixedByFinite
theorem IntermediateField.finiteDimensional_bot (K L : Type*) [Field K] [Field L] [Algebra K L] :
FiniteDimensional K (⊥ : IntermediateField K L) :=
.of_rank_eq_one IntermediateField.rank_bot
#align intermediate_field.finite_dimensional_bot IntermediateField.finiteDimensional_bot
| Mathlib/FieldTheory/KrullTopology.lean | 93 | 100 | theorem IntermediateField.fixingSubgroup.bot {K L : Type*} [Field K] [Field L] [Algebra K L] :
IntermediateField.fixingSubgroup (⊥ : IntermediateField K L) = ⊤ := by |
ext f
refine ⟨fun _ => Subgroup.mem_top _, fun _ => ?_⟩
rintro ⟨x, hx : x ∈ (⊥ : IntermediateField K L)⟩
rw [IntermediateField.mem_bot] at hx
rcases hx with ⟨y, rfl⟩
exact f.commutes y
|
import Mathlib.Combinatorics.SetFamily.Shadow
#align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68ab8cf7dd83d549eb78a68a1"
open Finset
variable {α : Type*}
theorem sup_sdiff_injOn [GeneralizedBooleanAlgebra α] (u v : α) :
{ x | Disjoint u x ∧ v ≤ x }.InjOn fun x => (x ⊔ u) \ v := by
rintro a ha b hb hab
have h : ((a ⊔ u) \ v) \ u ⊔ v = ((b ⊔ u) \ v) \ u ⊔ v := by
dsimp at hab
rw [hab]
rwa [sdiff_sdiff_comm, ha.1.symm.sup_sdiff_cancel_right, sdiff_sdiff_comm,
hb.1.symm.sup_sdiff_cancel_right, sdiff_sup_cancel ha.2, sdiff_sup_cancel hb.2] at h
#align sup_sdiff_inj_on sup_sdiff_injOn
-- The namespace is here to distinguish from other compressions.
namespace UV
section GeneralizedBooleanAlgebra
variable [GeneralizedBooleanAlgebra α] [DecidableRel (@Disjoint α _ _)]
[DecidableRel ((· ≤ ·) : α → α → Prop)] {s : Finset α} {u v a b : α}
def compress (u v a : α) : α :=
if Disjoint u a ∧ v ≤ a then (a ⊔ u) \ v else a
#align uv.compress UV.compress
theorem compress_of_disjoint_of_le (hua : Disjoint u a) (hva : v ≤ a) :
compress u v a = (a ⊔ u) \ v :=
if_pos ⟨hua, hva⟩
#align uv.compress_of_disjoint_of_le UV.compress_of_disjoint_of_le
theorem compress_of_disjoint_of_le' (hva : Disjoint v a) (hua : u ≤ a) :
compress u v ((a ⊔ v) \ u) = a := by
rw [compress_of_disjoint_of_le disjoint_sdiff_self_right
(le_sdiff.2 ⟨(le_sup_right : v ≤ a ⊔ v), hva.mono_right hua⟩),
sdiff_sup_cancel (le_sup_of_le_left hua), hva.symm.sup_sdiff_cancel_right]
#align uv.compress_of_disjoint_of_le' UV.compress_of_disjoint_of_le'
@[simp]
theorem compress_self (u a : α) : compress u u a = a := by
unfold compress
split_ifs with h
· exact h.1.symm.sup_sdiff_cancel_right
· rfl
#align uv.compress_self UV.compress_self
@[simp]
| Mathlib/Combinatorics/SetFamily/Compression/UV.lean | 107 | 110 | theorem compress_sdiff_sdiff (a b : α) : compress (a \ b) (b \ a) b = a := by |
refine (compress_of_disjoint_of_le disjoint_sdiff_self_left sdiff_le).trans ?_
rw [sup_sdiff_self_right, sup_sdiff, disjoint_sdiff_self_right.sdiff_eq_left, sup_eq_right]
exact sdiff_sdiff_le
|
import Mathlib.Probability.Variance
#align_import probability.moments from "leanprover-community/mathlib"@"85453a2a14be8da64caf15ca50930cf4c6e5d8de"
open MeasureTheory Filter Finset Real
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
variable {Ω ι : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {p : ℕ} {μ : Measure Ω}
def moment (X : Ω → ℝ) (p : ℕ) (μ : Measure Ω) : ℝ :=
μ[X ^ p]
#align probability_theory.moment ProbabilityTheory.moment
def centralMoment (X : Ω → ℝ) (p : ℕ) (μ : Measure Ω) : ℝ := by
have m := fun (x : Ω) => μ[X] -- Porting note: Lean deems `μ[(X - fun x => μ[X]) ^ p]` ambiguous
exact μ[(X - m) ^ p]
#align probability_theory.central_moment ProbabilityTheory.centralMoment
@[simp]
theorem moment_zero (hp : p ≠ 0) : moment 0 p μ = 0 := by
simp only [moment, hp, zero_pow, Ne, not_false_iff, Pi.zero_apply, integral_const,
smul_eq_mul, mul_zero, integral_zero]
#align probability_theory.moment_zero ProbabilityTheory.moment_zero
@[simp]
theorem centralMoment_zero (hp : p ≠ 0) : centralMoment 0 p μ = 0 := by
simp only [centralMoment, hp, Pi.zero_apply, integral_const, smul_eq_mul,
mul_zero, zero_sub, Pi.pow_apply, Pi.neg_apply, neg_zero, zero_pow, Ne, not_false_iff]
#align probability_theory.central_moment_zero ProbabilityTheory.centralMoment_zero
theorem centralMoment_one' [IsFiniteMeasure μ] (h_int : Integrable X μ) :
centralMoment X 1 μ = (1 - (μ Set.univ).toReal) * μ[X] := by
simp only [centralMoment, Pi.sub_apply, pow_one]
rw [integral_sub h_int (integrable_const _)]
simp only [sub_mul, integral_const, smul_eq_mul, one_mul]
#align probability_theory.central_moment_one' ProbabilityTheory.centralMoment_one'
@[simp]
theorem centralMoment_one [IsProbabilityMeasure μ] : centralMoment X 1 μ = 0 := by
by_cases h_int : Integrable X μ
· rw [centralMoment_one' h_int]
simp only [measure_univ, ENNReal.one_toReal, sub_self, zero_mul]
· simp only [centralMoment, Pi.sub_apply, pow_one]
have : ¬Integrable (fun x => X x - integral μ X) μ := by
refine fun h_sub => h_int ?_
have h_add : X = (fun x => X x - integral μ X) + fun _ => integral μ X := by ext1 x; simp
rw [h_add]
exact h_sub.add (integrable_const _)
rw [integral_undef this]
#align probability_theory.central_moment_one ProbabilityTheory.centralMoment_one
theorem centralMoment_two_eq_variance [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
centralMoment X 2 μ = variance X μ := by rw [hX.variance_eq]; rfl
#align probability_theory.central_moment_two_eq_variance ProbabilityTheory.centralMoment_two_eq_variance
section MomentGeneratingFunction
variable {t : ℝ}
def mgf (X : Ω → ℝ) (μ : Measure Ω) (t : ℝ) : ℝ :=
μ[fun ω => exp (t * X ω)]
#align probability_theory.mgf ProbabilityTheory.mgf
def cgf (X : Ω → ℝ) (μ : Measure Ω) (t : ℝ) : ℝ :=
log (mgf X μ t)
#align probability_theory.cgf ProbabilityTheory.cgf
@[simp]
theorem mgf_zero_fun : mgf 0 μ t = (μ Set.univ).toReal := by
simp only [mgf, Pi.zero_apply, mul_zero, exp_zero, integral_const, smul_eq_mul, mul_one]
#align probability_theory.mgf_zero_fun ProbabilityTheory.mgf_zero_fun
@[simp]
theorem cgf_zero_fun : cgf 0 μ t = log (μ Set.univ).toReal := by simp only [cgf, mgf_zero_fun]
#align probability_theory.cgf_zero_fun ProbabilityTheory.cgf_zero_fun
@[simp]
theorem mgf_zero_measure : mgf X (0 : Measure Ω) t = 0 := by simp only [mgf, integral_zero_measure]
#align probability_theory.mgf_zero_measure ProbabilityTheory.mgf_zero_measure
@[simp]
theorem cgf_zero_measure : cgf X (0 : Measure Ω) t = 0 := by
simp only [cgf, log_zero, mgf_zero_measure]
#align probability_theory.cgf_zero_measure ProbabilityTheory.cgf_zero_measure
@[simp]
theorem mgf_const' (c : ℝ) : mgf (fun _ => c) μ t = (μ Set.univ).toReal * exp (t * c) := by
simp only [mgf, integral_const, smul_eq_mul]
#align probability_theory.mgf_const' ProbabilityTheory.mgf_const'
-- @[simp] -- Porting note: `simp only` already proves this
theorem mgf_const (c : ℝ) [IsProbabilityMeasure μ] : mgf (fun _ => c) μ t = exp (t * c) := by
simp only [mgf_const', measure_univ, ENNReal.one_toReal, one_mul]
#align probability_theory.mgf_const ProbabilityTheory.mgf_const
@[simp]
theorem cgf_const' [IsFiniteMeasure μ] (hμ : μ ≠ 0) (c : ℝ) :
cgf (fun _ => c) μ t = log (μ Set.univ).toReal + t * c := by
simp only [cgf, mgf_const']
rw [log_mul _ (exp_pos _).ne']
· rw [log_exp _]
· rw [Ne, ENNReal.toReal_eq_zero_iff, Measure.measure_univ_eq_zero]
simp only [hμ, measure_ne_top μ Set.univ, or_self_iff, not_false_iff]
#align probability_theory.cgf_const' ProbabilityTheory.cgf_const'
@[simp]
theorem cgf_const [IsProbabilityMeasure μ] (c : ℝ) : cgf (fun _ => c) μ t = t * c := by
simp only [cgf, mgf_const, log_exp]
#align probability_theory.cgf_const ProbabilityTheory.cgf_const
@[simp]
| Mathlib/Probability/Moments.lean | 156 | 157 | theorem mgf_zero' : mgf X μ 0 = (μ Set.univ).toReal := by |
simp only [mgf, zero_mul, exp_zero, integral_const, smul_eq_mul, mul_one]
|
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.Group.Indicator
import Mathlib.Order.LiminfLimsup
import Mathlib.Order.Filter.Archimedean
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Algebra.Group.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.Topology.Order.Monotone
#align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451"
open Filter TopologicalSpace
open scoped Topology Classical
universe u v
variable {ι α β R S : Type*} {π : ι → Type*}
class BoundedLENhdsClass (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
isBounded_le_nhds (a : α) : (𝓝 a).IsBounded (· ≤ ·)
#align bounded_le_nhds_class BoundedLENhdsClass
class BoundedGENhdsClass (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
isBounded_ge_nhds (a : α) : (𝓝 a).IsBounded (· ≥ ·)
#align bounded_ge_nhds_class BoundedGENhdsClass
section Preorder
variable [Preorder α] [Preorder β] [TopologicalSpace α] [TopologicalSpace β]
section LiminfLimsup
section InfiAndSupr
open Topology
open Filter Set
variable [CompleteLinearOrder R] [TopologicalSpace R] [OrderTopology R]
theorem iInf_eq_of_forall_le_of_tendsto {x : R} {as : ι → R} (x_le : ∀ i, x ≤ as i) {F : Filter ι}
[Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : ⨅ i, as i = x := by
refine iInf_eq_of_forall_ge_of_forall_gt_exists_lt (fun i ↦ x_le i) ?_
apply fun w x_lt_w ↦ ‹Filter.NeBot F›.nonempty_of_mem (eventually_lt_of_tendsto_lt x_lt_w as_lim)
#align infi_eq_of_forall_le_of_tendsto iInf_eq_of_forall_le_of_tendsto
theorem iSup_eq_of_forall_le_of_tendsto {x : R} {as : ι → R} (le_x : ∀ i, as i ≤ x) {F : Filter ι}
[Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : ⨆ i, as i = x :=
iInf_eq_of_forall_le_of_tendsto (R := Rᵒᵈ) le_x as_lim
#align supr_eq_of_forall_le_of_tendsto iSup_eq_of_forall_le_of_tendsto
| Mathlib/Topology/Algebra/Order/LiminfLimsup.lean | 487 | 498 | theorem iUnion_Ici_eq_Ioi_of_lt_of_tendsto (x : R) {as : ι → R} (x_lt : ∀ i, x < as i)
{F : Filter ι} [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) :
⋃ i : ι, Ici (as i) = Ioi x := by |
have obs : x ∉ range as := by
intro maybe_x_is
rcases mem_range.mp maybe_x_is with ⟨i, hi⟩
simpa only [hi, lt_self_iff_false] using x_lt i
-- Porting note: `rw at *` was too destructive. Let's only rewrite `obs` and the goal.
have := iInf_eq_of_forall_le_of_tendsto (fun i ↦ (x_lt i).le) as_lim
rw [← this] at obs
rw [← this]
exact iUnion_Ici_eq_Ioi_iInf obs
|
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.WittVector.Truncated
#align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
namespace WittVector
variable (p : ℕ) [hp : Fact p.Prime]
variable {k : Type*} [CommRing k]
local notation "𝕎" => WittVector p
-- Porting note: new notation
local notation "𝕄" => MvPolynomial (Fin 2 × ℕ) ℤ
open Finset MvPolynomial
def wittPolyProd (n : ℕ) : 𝕄 :=
rename (Prod.mk (0 : Fin 2)) (wittPolynomial p ℤ n) *
rename (Prod.mk (1 : Fin 2)) (wittPolynomial p ℤ n)
#align witt_vector.witt_poly_prod WittVector.wittPolyProd
theorem wittPolyProd_vars (n : ℕ) : (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1) := by
rw [wittPolyProd]
apply Subset.trans (vars_mul _ _)
refine union_subset ?_ ?_ <;>
· refine Subset.trans (vars_rename _ _) ?_
simp [wittPolynomial_vars, image_subset_iff]
#align witt_vector.witt_poly_prod_vars WittVector.wittPolyProd_vars
def wittPolyProdRemainder (n : ℕ) : 𝕄 :=
∑ i ∈ range n, (p : 𝕄) ^ i * wittMul p i ^ p ^ (n - i)
#align witt_vector.witt_poly_prod_remainder WittVector.wittPolyProdRemainder
| Mathlib/RingTheory/WittVector/MulCoeff.lean | 69 | 85 | theorem wittPolyProdRemainder_vars (n : ℕ) :
(wittPolyProdRemainder p n).vars ⊆ univ ×ˢ range n := by |
rw [wittPolyProdRemainder]
refine Subset.trans (vars_sum_subset _ _) ?_
rw [biUnion_subset]
intro x hx
apply Subset.trans (vars_mul _ _)
refine union_subset ?_ ?_
· apply Subset.trans (vars_pow _ _)
have : (p : 𝕄) = C (p : ℤ) := by simp only [Int.cast_natCast, eq_intCast]
rw [this, vars_C]
apply empty_subset
· apply Subset.trans (vars_pow _ _)
apply Subset.trans (wittMul_vars _ _)
apply product_subset_product (Subset.refl _)
simp only [mem_range, range_subset] at hx ⊢
exact hx
|
import Mathlib.Order.RelClasses
import Mathlib.Order.Interval.Set.Basic
#align_import order.bounded from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9"
namespace Set
variable {α : Type*} {r : α → α → Prop} {s t : Set α}
theorem Bounded.mono (hst : s ⊆ t) (hs : Bounded r t) : Bounded r s :=
hs.imp fun _ ha b hb => ha b (hst hb)
#align set.bounded.mono Set.Bounded.mono
theorem Unbounded.mono (hst : s ⊆ t) (hs : Unbounded r s) : Unbounded r t := fun a =>
let ⟨b, hb, hb'⟩ := hs a
⟨b, hst hb, hb'⟩
#align set.unbounded.mono Set.Unbounded.mono
theorem unbounded_le_of_forall_exists_lt [Preorder α] (h : ∀ a, ∃ b ∈ s, a < b) :
Unbounded (· ≤ ·) s := fun a =>
let ⟨b, hb, hb'⟩ := h a
⟨b, hb, fun hba => hba.not_lt hb'⟩
#align set.unbounded_le_of_forall_exists_lt Set.unbounded_le_of_forall_exists_lt
theorem unbounded_le_iff [LinearOrder α] : Unbounded (· ≤ ·) s ↔ ∀ a, ∃ b ∈ s, a < b := by
simp only [Unbounded, not_le]
#align set.unbounded_le_iff Set.unbounded_le_iff
theorem unbounded_lt_of_forall_exists_le [Preorder α] (h : ∀ a, ∃ b ∈ s, a ≤ b) :
Unbounded (· < ·) s := fun a =>
let ⟨b, hb, hb'⟩ := h a
⟨b, hb, fun hba => hba.not_le hb'⟩
#align set.unbounded_lt_of_forall_exists_le Set.unbounded_lt_of_forall_exists_le
theorem unbounded_lt_iff [LinearOrder α] : Unbounded (· < ·) s ↔ ∀ a, ∃ b ∈ s, a ≤ b := by
simp only [Unbounded, not_lt]
#align set.unbounded_lt_iff Set.unbounded_lt_iff
theorem unbounded_ge_of_forall_exists_gt [Preorder α] (h : ∀ a, ∃ b ∈ s, b < a) :
Unbounded (· ≥ ·) s :=
@unbounded_le_of_forall_exists_lt αᵒᵈ _ _ h
#align set.unbounded_ge_of_forall_exists_gt Set.unbounded_ge_of_forall_exists_gt
theorem unbounded_ge_iff [LinearOrder α] : Unbounded (· ≥ ·) s ↔ ∀ a, ∃ b ∈ s, b < a :=
⟨fun h a =>
let ⟨b, hb, hba⟩ := h a
⟨b, hb, lt_of_not_ge hba⟩,
unbounded_ge_of_forall_exists_gt⟩
#align set.unbounded_ge_iff Set.unbounded_ge_iff
theorem unbounded_gt_of_forall_exists_ge [Preorder α] (h : ∀ a, ∃ b ∈ s, b ≤ a) :
Unbounded (· > ·) s := fun a =>
let ⟨b, hb, hb'⟩ := h a
⟨b, hb, fun hba => not_le_of_gt hba hb'⟩
#align set.unbounded_gt_of_forall_exists_ge Set.unbounded_gt_of_forall_exists_ge
theorem unbounded_gt_iff [LinearOrder α] : Unbounded (· > ·) s ↔ ∀ a, ∃ b ∈ s, b ≤ a :=
⟨fun h a =>
let ⟨b, hb, hba⟩ := h a
⟨b, hb, le_of_not_gt hba⟩,
unbounded_gt_of_forall_exists_ge⟩
#align set.unbounded_gt_iff Set.unbounded_gt_iff
theorem Bounded.rel_mono {r' : α → α → Prop} (h : Bounded r s) (hrr' : r ≤ r') : Bounded r' s :=
let ⟨a, ha⟩ := h
⟨a, fun b hb => hrr' b a (ha b hb)⟩
#align set.bounded.rel_mono Set.Bounded.rel_mono
theorem bounded_le_of_bounded_lt [Preorder α] (h : Bounded (· < ·) s) : Bounded (· ≤ ·) s :=
h.rel_mono fun _ _ => le_of_lt
#align set.bounded_le_of_bounded_lt Set.bounded_le_of_bounded_lt
theorem Unbounded.rel_mono {r' : α → α → Prop} (hr : r' ≤ r) (h : Unbounded r s) : Unbounded r' s :=
fun a =>
let ⟨b, hb, hba⟩ := h a
⟨b, hb, fun hba' => hba (hr b a hba')⟩
#align set.unbounded.rel_mono Set.Unbounded.rel_mono
theorem unbounded_lt_of_unbounded_le [Preorder α] (h : Unbounded (· ≤ ·) s) : Unbounded (· < ·) s :=
h.rel_mono fun _ _ => le_of_lt
#align set.unbounded_lt_of_unbounded_le Set.unbounded_lt_of_unbounded_le
| Mathlib/Order/Bounded.lean | 108 | 113 | theorem bounded_le_iff_bounded_lt [Preorder α] [NoMaxOrder α] :
Bounded (· ≤ ·) s ↔ Bounded (· < ·) s := by |
refine ⟨fun h => ?_, bounded_le_of_bounded_lt⟩
cases' h with a ha
cases' exists_gt a with b hb
exact ⟨b, fun c hc => lt_of_le_of_lt (ha c hc) hb⟩
|
import Mathlib.Algebra.Associated
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Lattice
import Mathlib.RingTheory.Nilpotent.Defs
#align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
open Function Set
variable {R S : Type*} {x y : R}
theorem IsNilpotent.neg [Ring R] (h : IsNilpotent x) : IsNilpotent (-x) := by
obtain ⟨n, hn⟩ := h
use n
rw [neg_pow, hn, mul_zero]
#align is_nilpotent.neg IsNilpotent.neg
@[simp]
theorem isNilpotent_neg_iff [Ring R] : IsNilpotent (-x) ↔ IsNilpotent x :=
⟨fun h => neg_neg x ▸ h.neg, fun h => h.neg⟩
#align is_nilpotent_neg_iff isNilpotent_neg_iff
lemma IsNilpotent.smul [MonoidWithZero R] [MonoidWithZero S] [MulActionWithZero R S]
[SMulCommClass R S S] [IsScalarTower R S S] {a : S} (ha : IsNilpotent a) (t : R) :
IsNilpotent (t • a) := by
obtain ⟨k, ha⟩ := ha
use k
rw [smul_pow, ha, smul_zero]
| Mathlib/RingTheory/Nilpotent/Basic.lean | 58 | 62 | theorem IsNilpotent.isUnit_sub_one [Ring R] {r : R} (hnil : IsNilpotent r) : IsUnit (r - 1) := by |
obtain ⟨n, hn⟩ := hnil
refine ⟨⟨r - 1, -∑ i ∈ Finset.range n, r ^ i, ?_, ?_⟩, rfl⟩
· simp [mul_geom_sum, hn]
· simp [geom_sum_mul, hn]
|
import Mathlib.GroupTheory.GroupAction.BigOperators
import Mathlib.Logic.Equiv.Fin
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Algebra.Module.Prod
import Mathlib.Algebra.Module.Submodule.Ker
#align_import linear_algebra.pi from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u v w x y z u' v' w' x' y'
variable {R : Type u} {K : Type u'} {M : Type v} {V : Type v'} {M₂ : Type w} {V₂ : Type w'}
variable {M₃ : Type y} {V₃ : Type y'} {M₄ : Type z} {ι : Type x} {ι' : Type x'}
open Function Submodule
namespace LinearMap
universe i
variable [Semiring R] [AddCommMonoid M₂] [Module R M₂] [AddCommMonoid M₃] [Module R M₃]
{φ : ι → Type i} [(i : ι) → AddCommMonoid (φ i)] [(i : ι) → Module R (φ i)]
def pi (f : (i : ι) → M₂ →ₗ[R] φ i) : M₂ →ₗ[R] (i : ι) → φ i :=
{ Pi.addHom fun i => (f i).toAddHom with
toFun := fun c i => f i c
map_smul' := fun _ _ => funext fun i => (f i).map_smul _ _ }
#align linear_map.pi LinearMap.pi
@[simp]
theorem pi_apply (f : (i : ι) → M₂ →ₗ[R] φ i) (c : M₂) (i : ι) : pi f c i = f i c :=
rfl
#align linear_map.pi_apply LinearMap.pi_apply
theorem ker_pi (f : (i : ι) → M₂ →ₗ[R] φ i) : ker (pi f) = ⨅ i : ι, ker (f i) := by
ext c; simp [funext_iff]
#align linear_map.ker_pi LinearMap.ker_pi
theorem pi_eq_zero (f : (i : ι) → M₂ →ₗ[R] φ i) : pi f = 0 ↔ ∀ i, f i = 0 := by
simp only [LinearMap.ext_iff, pi_apply, funext_iff];
exact ⟨fun h a b => h b a, fun h a b => h b a⟩
#align linear_map.pi_eq_zero LinearMap.pi_eq_zero
| Mathlib/LinearAlgebra/Pi.lean | 69 | 69 | theorem pi_zero : pi (fun i => 0 : (i : ι) → M₂ →ₗ[R] φ i) = 0 := by | ext; rfl
|
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : ℝ}
-- @[pp_nodot] -- Porting note: removed
noncomputable def logb (b x : ℝ) : ℝ :=
log x / log b
#align real.logb Real.logb
theorem log_div_log : log x / log b = logb b x :=
rfl
#align real.log_div_log Real.log_div_log
@[simp]
theorem logb_zero : logb b 0 = 0 := by simp [logb]
#align real.logb_zero Real.logb_zero
@[simp]
theorem logb_one : logb b 1 = 0 := by simp [logb]
#align real.logb_one Real.logb_one
@[simp]
lemma logb_self_eq_one (hb : 1 < b) : logb b b = 1 :=
div_self (log_pos hb).ne'
lemma logb_self_eq_one_iff : logb b b = 1 ↔ b ≠ 0 ∧ b ≠ 1 ∧ b ≠ -1 :=
Iff.trans ⟨fun h h' => by simp [logb, h'] at h, div_self⟩ log_ne_zero
@[simp]
theorem logb_abs (x : ℝ) : logb b |x| = logb b x := by rw [logb, logb, log_abs]
#align real.logb_abs Real.logb_abs
@[simp]
theorem logb_neg_eq_logb (x : ℝ) : logb b (-x) = logb b x := by
rw [← logb_abs x, ← logb_abs (-x), abs_neg]
#align real.logb_neg_eq_logb Real.logb_neg_eq_logb
theorem logb_mul (hx : x ≠ 0) (hy : y ≠ 0) : logb b (x * y) = logb b x + logb b y := by
simp_rw [logb, log_mul hx hy, add_div]
#align real.logb_mul Real.logb_mul
theorem logb_div (hx : x ≠ 0) (hy : y ≠ 0) : logb b (x / y) = logb b x - logb b y := by
simp_rw [logb, log_div hx hy, sub_div]
#align real.logb_div Real.logb_div
@[simp]
theorem logb_inv (x : ℝ) : logb b x⁻¹ = -logb b x := by simp [logb, neg_div]
#align real.logb_inv Real.logb_inv
theorem inv_logb (a b : ℝ) : (logb a b)⁻¹ = logb b a := by simp_rw [logb, inv_div]
#align real.inv_logb Real.inv_logb
theorem inv_logb_mul_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
(logb (a * b) c)⁻¹ = (logb a c)⁻¹ + (logb b c)⁻¹ := by
simp_rw [inv_logb]; exact logb_mul h₁ h₂
#align real.inv_logb_mul_base Real.inv_logb_mul_base
theorem inv_logb_div_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
(logb (a / b) c)⁻¹ = (logb a c)⁻¹ - (logb b c)⁻¹ := by
simp_rw [inv_logb]; exact logb_div h₁ h₂
#align real.inv_logb_div_base Real.inv_logb_div_base
| Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 97 | 98 | theorem logb_mul_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
logb (a * b) c = ((logb a c)⁻¹ + (logb b c)⁻¹)⁻¹ := by | rw [← inv_logb_mul_base h₁ h₂ c, inv_inv]
|
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.AlgebraicTopology.DoldKan.Notations
#align_import algebraic_topology.dold_kan.homotopies from "leanprover-community/mathlib"@"b12099d3b7febf4209824444dd836ef5ad96db55"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditive
CategoryTheory.SimplicialObject Homotopy Opposite Simplicial DoldKan
noncomputable section
namespace AlgebraicTopology
namespace DoldKan
variable {C : Type*} [Category C] [Preadditive C]
variable {X : SimplicialObject C}
abbrev c :=
ComplexShape.down ℕ
#align algebraic_topology.dold_kan.c AlgebraicTopology.DoldKan.c
theorem c_mk (i j : ℕ) (h : j + 1 = i) : c.Rel i j :=
ComplexShape.down_mk i j h
#align algebraic_topology.dold_kan.c_mk AlgebraicTopology.DoldKan.c_mk
theorem cs_down_0_not_rel_left (j : ℕ) : ¬c.Rel 0 j := by
intro hj
dsimp at hj
apply Nat.not_succ_le_zero j
rw [Nat.succ_eq_add_one, hj]
#align algebraic_topology.dold_kan.cs_down_0_not_rel_left AlgebraicTopology.DoldKan.cs_down_0_not_rel_left
def hσ (q : ℕ) (n : ℕ) : X _[n] ⟶ X _[n + 1] :=
if n < q then 0 else (-1 : ℤ) ^ (n - q) • X.σ ⟨n - q, Nat.lt_succ_of_le (Nat.sub_le _ _)⟩
#align algebraic_topology.dold_kan.hσ AlgebraicTopology.DoldKan.hσ
def hσ' (q : ℕ) : ∀ n m, c.Rel m n → (K[X].X n ⟶ K[X].X m) := fun n m hnm =>
hσ q n ≫ eqToHom (by congr)
#align algebraic_topology.dold_kan.hσ' AlgebraicTopology.DoldKan.hσ'
theorem hσ'_eq_zero {q n m : ℕ} (hnq : n < q) (hnm : c.Rel m n) :
(hσ' q n m hnm : X _[n] ⟶ X _[m]) = 0 := by
simp only [hσ', hσ]
split_ifs
exact zero_comp
#align algebraic_topology.dold_kan.hσ'_eq_zero AlgebraicTopology.DoldKan.hσ'_eq_zero
theorem hσ'_eq {q n a m : ℕ} (ha : n = a + q) (hnm : c.Rel m n) :
(hσ' q n m hnm : X _[n] ⟶ X _[m]) =
((-1 : ℤ) ^ a • X.σ ⟨a, Nat.lt_succ_iff.mpr (Nat.le.intro (Eq.symm ha))⟩) ≫
eqToHom (by congr) := by
simp only [hσ', hσ]
split_ifs
· omega
· have h' := tsub_eq_of_eq_add ha
congr
#align algebraic_topology.dold_kan.hσ'_eq AlgebraicTopology.DoldKan.hσ'_eq
theorem hσ'_eq' {q n a : ℕ} (ha : n = a + q) :
(hσ' q n (n + 1) rfl : X _[n] ⟶ X _[n + 1]) =
(-1 : ℤ) ^ a • X.σ ⟨a, Nat.lt_succ_iff.mpr (Nat.le.intro (Eq.symm ha))⟩ := by
rw [hσ'_eq ha rfl, eqToHom_refl, comp_id]
#align algebraic_topology.dold_kan.hσ'_eq' AlgebraicTopology.DoldKan.hσ'_eq'
def Hσ (q : ℕ) : K[X] ⟶ K[X] :=
nullHomotopicMap' (hσ' q)
set_option linter.uppercaseLean3 false in
#align algebraic_topology.dold_kan.Hσ AlgebraicTopology.DoldKan.hσ
def homotopyHσToZero (q : ℕ) : Homotopy (Hσ q : K[X] ⟶ K[X]) 0 :=
nullHomotopy' (hσ' q)
set_option linter.uppercaseLean3 false in
#align algebraic_topology.dold_kan.homotopy_Hσ_to_zero AlgebraicTopology.DoldKan.homotopyHσToZero
theorem Hσ_eq_zero (q : ℕ) : (Hσ q : K[X] ⟶ K[X]).f 0 = 0 := by
unfold Hσ
rw [nullHomotopicMap'_f_of_not_rel_left (c_mk 1 0 rfl) cs_down_0_not_rel_left]
rcases q with (_|q)
· rw [hσ'_eq (show 0 = 0 + 0 by rfl) (c_mk 1 0 rfl)]
simp only [pow_zero, Fin.mk_zero, one_zsmul, eqToHom_refl, Category.comp_id]
erw [ChainComplex.of_d]
rw [AlternatingFaceMapComplex.objD, Fin.sum_univ_two, Fin.val_zero, Fin.val_one, pow_zero,
pow_one, one_smul, neg_smul, one_smul, comp_add, comp_neg, add_neg_eq_zero]
erw [δ_comp_σ_self, δ_comp_σ_succ]
· rw [hσ'_eq_zero (Nat.succ_pos q) (c_mk 1 0 rfl), zero_comp]
set_option linter.uppercaseLean3 false in
#align algebraic_topology.dold_kan.Hσ_eq_zero AlgebraicTopology.DoldKan.Hσ_eq_zero
| Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean | 156 | 166 | theorem hσ'_naturality (q : ℕ) (n m : ℕ) (hnm : c.Rel m n) {X Y : SimplicialObject C} (f : X ⟶ Y) :
f.app (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ f.app (op [m]) := by |
have h : n + 1 = m := hnm
subst h
simp only [hσ', eqToHom_refl, comp_id]
unfold hσ
split_ifs
· rw [zero_comp, comp_zero]
· simp only [zsmul_comp, comp_zsmul]
erw [f.naturality]
rfl
|
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Shift
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
variable
{𝕜 : Type*} [NontriviallyNormedField 𝕜]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
{R : Type*} [Semiring R] [Module R F] [SMulCommClass 𝕜 R F] [ContinuousConstSMul R F]
{n : ℕ} {x : 𝕜} {s : Set 𝕜} (hx : x ∈ s) (h : UniqueDiffOn 𝕜 s) {f g : 𝕜 → F}
theorem iteratedDerivWithin_add (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) :
iteratedDerivWithin n (f + g) s x =
iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by
simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx,
ContinuousMultilinearMap.add_apply]
theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) :
Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by
induction n generalizing f g with
| zero => rwa [iteratedDerivWithin_zero]
| succ n IH =>
intro y hy
have : UniqueDiffWithinAt 𝕜 s y := h.uniqueDiffWithinAt hy
rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this]
exact derivWithin_congr (IH hfg) (IH hfg hy)
theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) :
iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne'
rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx]
refine iteratedDerivWithin_congr h ?_ hx
intro y hy
exact derivWithin_const_add (h.uniqueDiffWithinAt hy) _
| Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean | 48 | 56 | theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) :
iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x := by |
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne'
rw [iteratedDerivWithin_succ' h hx, iteratedDerivWithin_succ' h hx]
refine iteratedDerivWithin_congr h ?_ hx
intro y hy
have : UniqueDiffWithinAt 𝕜 s y := h.uniqueDiffWithinAt hy
rw [derivWithin.neg this]
exact derivWithin_const_sub this _
|
import Mathlib.Topology.Algebra.Module.WeakDual
import Mathlib.Algebra.Algebra.Spectrum
import Mathlib.Topology.ContinuousFunction.Algebra
import Mathlib.Data.Set.Lattice
#align_import topology.algebra.module.character_space from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
namespace WeakDual
def characterSpace (𝕜 : Type*) (A : Type*) [CommSemiring 𝕜] [TopologicalSpace 𝕜] [ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜] [NonUnitalNonAssocSemiring A] [TopologicalSpace A] [Module 𝕜 A] :=
{φ : WeakDual 𝕜 A | φ ≠ 0 ∧ ∀ x y : A, φ (x * y) = φ x * φ y}
#align weak_dual.character_space WeakDual.characterSpace
variable {𝕜 : Type*} {A : Type*}
-- Porting note: even though the capitalization of the namespace differs, it doesn't matter
-- because there is no dot notation since `characterSpace` is only a type via `CoeSort`.
namespace CharacterSpace
section NonUnitalNonAssocSemiring
variable [CommSemiring 𝕜] [TopologicalSpace 𝕜] [ContinuousAdd 𝕜] [ContinuousConstSMul 𝕜 𝕜]
[NonUnitalNonAssocSemiring A] [TopologicalSpace A] [Module 𝕜 A]
instance instFunLike : FunLike (characterSpace 𝕜 A) A 𝕜 where
coe φ := ((φ : WeakDual 𝕜 A) : A → 𝕜)
coe_injective' φ ψ h := by ext1; apply DFunLike.ext; exact congr_fun h
instance instContinuousLinearMapClass : ContinuousLinearMapClass (characterSpace 𝕜 A) 𝕜 A 𝕜 where
map_smulₛₗ φ := (φ : WeakDual 𝕜 A).map_smul
map_add φ := (φ : WeakDual 𝕜 A).map_add
map_continuous φ := (φ : WeakDual 𝕜 A).cont
-- Porting note: moved because Lean 4 doesn't see the `DFunLike` instance on `characterSpace 𝕜 A`
-- until the `ContinuousLinearMapClass` instance is declared
@[simp, norm_cast]
protected theorem coe_coe (φ : characterSpace 𝕜 A) : ⇑(φ : WeakDual 𝕜 A) = (φ : A → 𝕜) :=
rfl
#align weak_dual.character_space.coe_coe WeakDual.CharacterSpace.coe_coe
@[ext]
theorem ext {φ ψ : characterSpace 𝕜 A} (h : ∀ x, φ x = ψ x) : φ = ψ :=
DFunLike.ext _ _ h
#align weak_dual.character_space.ext WeakDual.CharacterSpace.ext
def toCLM (φ : characterSpace 𝕜 A) : A →L[𝕜] 𝕜 :=
(φ : WeakDual 𝕜 A)
#align weak_dual.character_space.to_clm WeakDual.CharacterSpace.toCLM
@[simp]
theorem coe_toCLM (φ : characterSpace 𝕜 A) : ⇑(toCLM φ) = φ :=
rfl
#align weak_dual.character_space.coe_to_clm WeakDual.CharacterSpace.coe_toCLM
instance instNonUnitalAlgHomClass : NonUnitalAlgHomClass (characterSpace 𝕜 A) 𝕜 A 𝕜 :=
{ CharacterSpace.instContinuousLinearMapClass with
map_smulₛₗ := fun φ => map_smul φ
map_zero := fun φ => map_zero φ
map_mul := fun φ => φ.prop.2 }
def toNonUnitalAlgHom (φ : characterSpace 𝕜 A) : A →ₙₐ[𝕜] 𝕜 where
toFun := (φ : A → 𝕜)
map_mul' := map_mul φ
map_smul' := map_smul φ
map_zero' := map_zero φ
map_add' := map_add φ
#align weak_dual.character_space.to_non_unital_alg_hom WeakDual.CharacterSpace.toNonUnitalAlgHom
@[simp]
theorem coe_toNonUnitalAlgHom (φ : characterSpace 𝕜 A) : ⇑(toNonUnitalAlgHom φ) = φ :=
rfl
#align weak_dual.character_space.coe_to_non_unital_alg_hom WeakDual.CharacterSpace.coe_toNonUnitalAlgHom
instance instIsEmpty [Subsingleton A] : IsEmpty (characterSpace 𝕜 A) :=
⟨fun φ => φ.prop.1 <|
ContinuousLinearMap.ext fun x => by
rw [show x = 0 from Subsingleton.elim x 0, map_zero, map_zero] ⟩
variable (𝕜 A)
theorem union_zero :
characterSpace 𝕜 A ∪ {0} = {φ : WeakDual 𝕜 A | ∀ x y : A, φ (x * y) = φ x * φ y} :=
le_antisymm (by
rintro φ (hφ | rfl)
· exact hφ.2
· exact fun _ _ => by exact (zero_mul (0 : 𝕜)).symm)
fun φ hφ => Or.elim (em <| φ = 0) Or.inr fun h₀ => Or.inl ⟨h₀, hφ⟩
#align weak_dual.character_space.union_zero WeakDual.CharacterSpace.union_zero
| Mathlib/Topology/Algebra/Module/CharacterSpace.lean | 128 | 134 | theorem union_zero_isClosed [T2Space 𝕜] [ContinuousMul 𝕜] :
IsClosed (characterSpace 𝕜 A ∪ {0}) := by |
simp only [union_zero, Set.setOf_forall]
exact
isClosed_iInter fun x =>
isClosed_iInter fun y =>
isClosed_eq (eval_continuous _) <| (eval_continuous _).mul (eval_continuous _)
|
import Mathlib.RingTheory.Localization.Basic
#align_import ring_theory.localization.integer from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
variable {R : Type*} [CommSemiring R] {M : Submonoid R} {S : Type*} [CommSemiring S]
variable [Algebra R S] {P : Type*} [CommSemiring P]
open Function
namespace IsLocalization
section
variable (R)
-- TODO: define a subalgebra of `IsInteger`s
def IsInteger (a : S) : Prop :=
a ∈ (algebraMap R S).rangeS
#align is_localization.is_integer IsLocalization.IsInteger
end
theorem isInteger_zero : IsInteger R (0 : S) :=
Subsemiring.zero_mem _
#align is_localization.is_integer_zero IsLocalization.isInteger_zero
theorem isInteger_one : IsInteger R (1 : S) :=
Subsemiring.one_mem _
#align is_localization.is_integer_one IsLocalization.isInteger_one
theorem isInteger_add {a b : S} (ha : IsInteger R a) (hb : IsInteger R b) : IsInteger R (a + b) :=
Subsemiring.add_mem _ ha hb
#align is_localization.is_integer_add IsLocalization.isInteger_add
theorem isInteger_mul {a b : S} (ha : IsInteger R a) (hb : IsInteger R b) : IsInteger R (a * b) :=
Subsemiring.mul_mem _ ha hb
#align is_localization.is_integer_mul IsLocalization.isInteger_mul
| Mathlib/RingTheory/Localization/Integer.lean | 63 | 66 | theorem isInteger_smul {a : R} {b : S} (hb : IsInteger R b) : IsInteger R (a • b) := by |
rcases hb with ⟨b', hb⟩
use a * b'
rw [← hb, (algebraMap R S).map_mul, Algebra.smul_def]
|
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Data.ZMod.Basic
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Polynomial.Chebyshev
import Mathlib.RingTheory.Ideal.LocalRing
#align_import ring_theory.polynomial.dickson from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace Polynomial
open Polynomial
variable {R S : Type*} [CommRing R] [CommRing S] (k : ℕ) (a : R)
noncomputable def dickson : ℕ → R[X]
| 0 => 3 - k
| 1 => X
| n + 2 => X * dickson (n + 1) - C a * dickson n
#align polynomial.dickson Polynomial.dickson
@[simp]
theorem dickson_zero : dickson k a 0 = 3 - k :=
rfl
#align polynomial.dickson_zero Polynomial.dickson_zero
@[simp]
theorem dickson_one : dickson k a 1 = X :=
rfl
#align polynomial.dickson_one Polynomial.dickson_one
theorem dickson_two : dickson k a 2 = X ^ 2 - C a * (3 - k : R[X]) := by
simp only [dickson, sq]
#align polynomial.dickson_two Polynomial.dickson_two
@[simp]
| Mathlib/RingTheory/Polynomial/Dickson.lean | 82 | 83 | theorem dickson_add_two (n : ℕ) :
dickson k a (n + 2) = X * dickson k a (n + 1) - C a * dickson k a n := by | rw [dickson]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.