Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 228 | 232 | theorem linearIndependent_le_span {ι : Type*} (v : ι → M) (i : LinearIndependent R v) (w : Set M)
[Fintype w] (s : span R w = ⊤) : #ι ≤ Fintype.card w := by |
apply linearIndependent_le_span' v i w
rw [s]
exact le_top
| [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)",
" range v ≤ ↑(span R w)",
" ran... | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)"
] |
import Mathlib.RingTheory.LocalProperties
#align_import ring_theory.ring_hom.surjective from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
local notation "surjective" => fun {X Y : Type _} [CommRing... | Mathlib/RingTheory/RingHom/Surjective.lean | 48 | 70 | theorem surjective_ofLocalizationSpan : OfLocalizationSpan surjective := by |
introv R hs H
letI := f.toAlgebra
show Function.Surjective (Algebra.ofId R S)
rw [← Algebra.range_top_iff_surjective, eq_top_iff]
rintro x -
obtain ⟨l, hl⟩ :=
(Finsupp.mem_span_iff_total R s 1).mp (show _ ∈ Ideal.span s by rw [hs]; trivial)
fapply
Subalgebra.mem_of_finset_sum_eq_one_of_pow_smul_m... | [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" Function.Surjective ⇑(g.comp f)",
" RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), Function.Surjective ⇑e.to... | [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" Function.Surjective ⇑(g.comp f)",
" RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), Function.Surjective ⇑e.to... |
import Mathlib.Data.Multiset.Basic
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Tactic.ApplyFun
#align_import data.sym.basic from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
assert_not_exists MonoidWithZero
set_option autoImplicit true
open Funct... | Mathlib/Data/Sym/Basic.lean | 156 | 158 | theorem ofVector_cons (a : α) (v : Vector α n) : ↑(Vector.cons a v) = a ::ₛ (↑v : Sym α n) := by |
cases v
rfl
| [
" Multiset.card (a ::ₘ ↑s) = n.succ",
" ofVector (a ::ᵥ v) = a ::ₛ ofVector v",
" ofVector (a ::ᵥ ⟨val✝, property✝⟩) = a ::ₛ ofVector ⟨val✝, property✝⟩"
] | [
" Multiset.card (a ::ₘ ↑s) = n.succ"
] |
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.CategoryTheory.Limits.Preserves.Basic
import Mathlib.CategoryTheory.Limits.TypesFiltered
import Mathlib.CategoryTheory.Limits.Yoneda
import Mathlib.Tactic.ApplyFun
#align_import category_theory.limits.concrete_category from "leanprover-community/math... | Mathlib/CategoryTheory/Limits/ConcreteCategory.lean | 97 | 106 | theorem Concrete.isColimit_rep_eq_of_exists {D : Cocone F} {i j : J} (x : F.obj i) (y : F.obj j)
(h : ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y) :
D.ι.app i x = D.ι.app j y := by |
let E := (forget C).mapCocone D
obtain ⟨k, f, g, (hfg : (F ⋙ forget C).map f x = F.map g y)⟩ := h
let h1 : (F ⋙ forget C).map f ≫ E.ι.app k = E.ι.app i := E.ι.naturality f
let h2 : (F ⋙ forget C).map g ≫ E.ι.app k = E.ι.app j := E.ι.naturality g
show E.ι.app i x = E.ι.app j y
rw [← h1, types_comp_apply, hf... | [
" let ff := fun a => (D.ι.app a.fst) a.snd;\n Function.Surjective ff",
" ∃ a, ff a = x",
" ∃ j y, (D.ι.app j) y = x",
" ∃ j y, (D.ι.app j) y = (fun a => (D.ι.app a.fst) a.snd) a",
" (D.ι.app i) x = (D.ι.app j) y",
" E.ι.app i x = E.ι.app j y",
" E.ι.app k ((F.map g) y) = E.ι.app j y"
] | [
" let ff := fun a => (D.ι.app a.fst) a.snd;\n Function.Surjective ff",
" ∃ a, ff a = x",
" ∃ j y, (D.ι.app j) y = x",
" ∃ j y, (D.ι.app j) y = (fun a => (D.ι.app a.fst) a.snd) a"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Density
import Mathlib.Data.Nat.Cast.Field
import Mathlib.Order.Partition.Equipartition
import Mathlib.SetTheory.Ordinal.Basic
#align_import combinatorics.simple_graph.regularity.uniform from "leanprover-community/mathlib"@"bf7ef0e83e5b... | Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean | 154 | 157 | theorem right_nonuniformWitnesses_card (h : ¬G.IsUniform ε s t) :
(t.card : 𝕜) * ε ≤ (G.nonuniformWitnesses ε s t).2.card := by |
rw [nonuniformWitnesses, dif_pos h]
exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.2.1
| [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... | [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.Tactic.FieldSimp
#align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open AffineMap
variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE]
def ... | Mathlib/LinearAlgebra/AffineSpace/Slope.lean | 56 | 59 | theorem sub_smul_slope (f : k → PE) (a b : k) : (b - a) • slope f a b = f b -ᵥ f a := by |
rcases eq_or_ne a b with (rfl | hne)
· rw [sub_self, zero_smul, vsub_self]
· rw [slope, smul_inv_smul₀ (sub_ne_zero.2 hne.symm)]
| [
" slope f a a = 0",
" (b - a) • slope f a b = f b -ᵥ f a",
" (a - a) • slope f a a = f a -ᵥ f a"
] | [
" slope f a a = 0"
] |
import Mathlib.Algebra.CharP.Two
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Data.Nat.Periodic
import Mathlib.Data.ZMod.Basic
import Mathlib.Tactic.Monotonicity
#align_import data.nat.totient from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8"
open Finset
namespace Nat
... | Mathlib/Data/Nat/Totient.lean | 78 | 81 | theorem filter_coprime_Ico_eq_totient (a n : ℕ) :
((Ico n (n + a)).filter (Coprime a)).card = totient a := by |
rw [totient, filter_Ico_card_eq_of_periodic, count_eq_card_filter_range]
exact periodic_coprime a
| [
" φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}",
" ↑m ∈ filter n.Coprime (range n)",
" ↑m ∈ {m | m < n ∧ n.Coprime m}",
" (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m",
" 0 ∈ range n ∧ ¬n.Coprime 0",
" φ 0 = 0 ↔ 0 = 0",
" (n + 1).gcd (1 % (n + 1)) = 1",
" φ (n + 1) = 0 ↔ n + 1 = 0",
" 0 < φ n ↔ 0 < n"... | [
" φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}",
" ↑m ∈ filter n.Coprime (range n)",
" ↑m ∈ {m | m < n ∧ n.Coprime m}",
" (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m",
" 0 ∈ range n ∧ ¬n.Coprime 0",
" φ 0 = 0 ↔ 0 = 0",
" (n + 1).gcd (1 % (n + 1)) = 1",
" φ (n + 1) = 0 ↔ n + 1 = 0",
" 0 < φ n ↔ 0 < n"... |
import Mathlib.Dynamics.BirkhoffSum.Basic
import Mathlib.Algebra.Module.Basic
open Finset
section birkhoffAverage
variable (R : Type*) {α M : Type*} [DivisionSemiring R] [AddCommMonoid M] [Module R M]
def birkhoffAverage (f : α → α) (g : α → M) (n : ℕ) (x : α) : M := (n : R)⁻¹ • birkhoffSum f g n x
theorem bir... | Mathlib/Dynamics/BirkhoffSum/Average.lean | 72 | 75 | theorem Function.IsFixedPt.birkhoffAverage_eq [CharZero R] {f : α → α} {x : α} (h : IsFixedPt f x)
(g : α → M) {n : ℕ} (hn : n ≠ 0) : birkhoffAverage R f g n x = g x := by |
rw [birkhoffAverage, h.birkhoffSum_eq, nsmul_eq_smul_cast R, inv_smul_smul₀]
rwa [Nat.cast_ne_zero]
| [
" birkhoffAverage R f g 0 x = 0",
" birkhoffAverage R f g 1 x = g x",
" g' (birkhoffAverage R f g n x) = birkhoffAverage S f (⇑g' ∘ g) n x",
" birkhoffAverage R = birkhoffAverage S",
" birkhoffAverage R x✝³ x✝² x✝¹ x✝ = birkhoffAverage S x✝³ x✝² x✝¹ x✝",
" birkhoffAverage R f g n x = g x",
" ↑n ≠ 0"
] | [
" birkhoffAverage R f g 0 x = 0",
" birkhoffAverage R f g 1 x = g x",
" g' (birkhoffAverage R f g n x) = birkhoffAverage S f (⇑g' ∘ g) n x",
" birkhoffAverage R = birkhoffAverage S",
" birkhoffAverage R x✝³ x✝² x✝¹ x✝ = birkhoffAverage S x✝³ x✝² x✝¹ x✝"
] |
import Mathlib.Data.PFunctor.Univariate.M
#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
class QPF (F : Type u → Type u) [Functor F] where
P : PFunctor.{u}
abs : ∀ {α}, P α → F α
repr : ∀ {α}, F α → P α
abs_repr : ∀ {α} (... | Mathlib/Data/QPF/Univariate/Basic.lean | 101 | 114 | theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i, p (f i) := by |
constructor
· rintro ⟨y, hy⟩
cases' h : repr y with a f
use a, fun i => (f i).val
constructor
· rw [← hy, ← abs_repr y, h, ← abs_map]
rfl
intro i
apply (f i).property
rintro ⟨a, f, h₀, h₁⟩
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, h₀]; rfl
| [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ∘ f) <$> x = g <$> f <$> x",
" (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)",
" (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩",
" abs ((P F).map (g ∘ f✝... | [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ∘ f) <$> x = g <$> f <$> x",
" (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)",
" (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩",
" abs ((P F).map (g ∘ f✝... |
import Mathlib.LinearAlgebra.TensorProduct.RightExactness
import Mathlib.LinearAlgebra.TensorProduct.Finiteness
universe u
variable (R : Type u) [CommRing R]
variable {M : Type u} [AddCommGroup M] [Module R M]
variable {N : Type u} [AddCommGroup N] [Module R N]
open Classical DirectSum LinearMap Function Submodul... | Mathlib/LinearAlgebra/TensorProduct/Vanishing.lean | 102 | 157 | theorem vanishesTrivially_of_sum_tmul_eq_zero (hm : Submodule.span R (Set.range m) = ⊤)
(hmn : ∑ i, m i ⊗ₜ n i = (0 : M ⊗[R] N)) : VanishesTrivially R m n := by |
-- Define a map $G \colon R^\iota \to M$ whose matrix entries are the $m_i$. It is surjective.
set G : (ι →₀ R) →ₗ[R] M := Finsupp.total ι M R m with hG
have G_basis_eq (i : ι) : G (Finsupp.single i 1) = m i := by simp [hG, toModule_lof]
have G_surjective : Surjective G := by
apply LinearMap.range_eq_top.m... | [
" ∑ i : ι, m i ⊗ₜ[R] n i = 0",
" ∑ x : ι, ∑ x_1 : κ, a x x_1 • m x ⊗ₜ[R] y x_1 = 0",
" ∑ y_1 : κ, ∑ x : ι, a x y_1 • m x ⊗ₜ[R] y y_1 = 0",
" VanishesTrivially R m n",
" G (Finsupp.single i 1) = m i",
" Surjective ⇑G",
" range G = ⊤",
" ⊤ ≤ range G",
" span R (Set.range m) ≤ range G",
" Set.range m... | [
" ∑ i : ι, m i ⊗ₜ[R] n i = 0",
" ∑ x : ι, ∑ x_1 : κ, a x x_1 • m x ⊗ₜ[R] y x_1 = 0",
" ∑ y_1 : κ, ∑ x : ι, a x y_1 • m x ⊗ₜ[R] y y_1 = 0"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Fin
import Mathlib.GroupTheory.GroupAction.Pi
import Mathlib.Logic.Equiv.Fin
#align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013"
open Fins... | Mathlib/Algebra/BigOperators/Fin.lean | 106 | 108 | theorem prod_cons [CommMonoid β] {n : ℕ} (x : β) (f : Fin n → β) :
(∏ i : Fin n.succ, (cons x f : Fin n.succ → β) i) = x * ∏ i : Fin n, f i := by |
simp_rw [prod_univ_succ, cons_zero, cons_succ]
| [
" (List.ofFn f).prod = ∏ i : Fin n, f i",
" ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod",
" ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)",
" f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)",
" ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)... | [
" (List.ofFn f).prod = ∏ i : Fin n, f i",
" ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod",
" ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)",
" f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)",
" ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)... |
import Mathlib.RingTheory.LocalProperties
#align_import ring_theory.ring_hom.surjective from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
local notation "surjective" => fun {X Y : Type _} [CommRing... | Mathlib/RingTheory/RingHom/Surjective.lean | 36 | 45 | theorem surjective_stableUnderBaseChange : StableUnderBaseChange surjective := by |
refine StableUnderBaseChange.mk _ surjective_respectsIso ?_
classical
introv h x
induction x using TensorProduct.induction_on with
| zero => exact ⟨0, map_zero _⟩
| tmul x y =>
obtain ⟨y, rfl⟩ := h y; use y • x; dsimp
rw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]
| add x y ex ey =>... | [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" Function.Surjective ⇑(g.comp f)",
" RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), Function.Surjective ⇑e.to... | [
" StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" Function.Surjective ⇑(g.comp f)",
" RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), Function.Surjective ⇑e.to... |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Lattice
#align_import data.fintype.lattice from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
open Function
open Nat
universe u v
variable {ι α β : Type*}
open Finset Function
| Mathlib/Data/Fintype/Lattice.lean | 62 | 65 | theorem Finite.exists_max [Finite α] [Nonempty α] [LinearOrder β] (f : α → β) :
∃ x₀ : α, ∀ x, f x ≤ f x₀ := by |
cases nonempty_fintype α
simpa using exists_max_image univ f univ_nonempty
| [
" ∃ x₀, ∀ (x : α), f x ≤ f x₀"
] | [] |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1
#align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e"
open TopologicalSpace MeasureTheory.Lp Filter
open scoped ENNReal Topology MeasureTheory
names... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean | 136 | 148 | theorem condexp_ae_eq_condexpL1 (hm : m ≤ m0) [hμm : SigmaFinite (μ.trim hm)] (f : α → F') :
μ[f|m] =ᵐ[μ] condexpL1 hm μ f := by |
rw [condexp_of_sigmaFinite hm]
by_cases hfi : Integrable f μ
· rw [if_pos hfi]
by_cases hfm : StronglyMeasurable[m] f
· rw [if_pos hfm]
exact (condexpL1_of_aestronglyMeasurable' (StronglyMeasurable.aeStronglyMeasurable' hfm)
hfi).symm
· rw [if_neg hfm]
exact (AEStronglyMeasurable'... | [
" μ[f|m] = 0",
" ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)",
" SigmaFinite (μ.trim hm) → ¬Integrable f μ",
" μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0",
" (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S... | [
" μ[f|m] = 0",
" ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)",
" SigmaFinite (μ.trim hm) → ¬Integrable f μ",
" μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0",
" (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S... |
import Mathlib.Algebra.Group.Basic
import Mathlib.Logic.Embedding.Basic
#align_import algebra.hom.embedding from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
variable {G : Type*}
section LeftOrRightCancelSemigroup
@[... | Mathlib/Algebra/Group/Embedding.lean | 49 | 52 | theorem mulLeftEmbedding_eq_mulRightEmbedding [CommSemigroup G] [IsCancelMul G] (g : G) :
mulLeftEmbedding g = mulRightEmbedding g := by |
ext
exact mul_comm _ _
| [
" mulLeftEmbedding g = mulRightEmbedding g",
" (mulLeftEmbedding g) x✝ = (mulRightEmbedding g) x✝"
] | [] |
import Mathlib.Analysis.Convex.Between
import Mathlib.Analysis.Convex.Normed
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f"
variable {R V V' P P' : Type*}
open AffineEquiv AffineMap
namespace Affine... | Mathlib/Analysis/Convex/Side.lean | 83 | 86 | theorem _root_.Function.Injective.sSameSide_map_iff {s : AffineSubspace R P} {x y : P}
{f : P →ᵃ[R] P'} (hf : Function.Injective f) :
(s.map f).SSameSide (f x) (f y) ↔ s.SSameSide x y := by |
simp_rw [SSameSide, hf.wSameSide_map_iff, mem_map_iff_mem_of_injective hf]
| [
" (AffineSubspace.map f s).WSameSide (f x) (f y)",
" SameRay R (f x -ᵥ f p₁) (f y -ᵥ f p₂)",
" SameRay R (f.linear (x -ᵥ p₁)) (f.linear (y -ᵥ p₂))",
" (map f s).WSameSide (f x) (f y) ↔ s.WSameSide x y",
" s.WSameSide x y",
" SameRay R (x -ᵥ p₁) (y -ᵥ p₂)",
" (map f s).SSameSide (f x) (f y) ↔ s.SSameSide... | [
" (AffineSubspace.map f s).WSameSide (f x) (f y)",
" SameRay R (f x -ᵥ f p₁) (f y -ᵥ f p₂)",
" SameRay R (f.linear (x -ᵥ p₁)) (f.linear (y -ᵥ p₂))",
" (map f s).WSameSide (f x) (f y) ↔ s.WSameSide x y",
" s.WSameSide x y",
" SameRay R (x -ᵥ p₁) (y -ᵥ p₂)"
] |
import Mathlib.Data.Set.Card
import Mathlib.Order.Minimal
import Mathlib.Data.Matroid.Init
set_option autoImplicit true
open Set
def Matroid.ExchangeProperty {α : Type _} (P : Set α → Prop) : Prop :=
∀ X Y, P X → P Y → ∀ a ∈ X \ Y, ∃ b ∈ Y \ X, P (insert b (X \ {a}))
def Matroid.ExistsMaximalSubsetProperty {... | Mathlib/Data/Matroid/Basic.lean | 295 | 297 | theorem encard_base_eq (hB₁ : Base B₁) (hB₂ : Base B₂) : B₁.encard = B₂.encard := by |
rw [← encard_diff_add_encard_inter B₁ B₂, exch.encard_diff_eq hB₁ hB₂, inter_comm,
encard_diff_add_encard_inter]
| [
" (B₁ \\ B₂).encard ≤ (B₂ \\ B₁).encard",
" (insert f (B₂ \\ {e}) \\ B₁).encard < (B₂ \\ B₁).encard",
" ((B₂ \\ B₁) \\ {e}).encard < (B₂ \\ B₁).encard",
" ((B₁ \\ B₂) \\ {f}).encard + 1 ≤ ((B₂ \\ B₁) \\ {e}).encard + 1",
" B₁.encard = B₂.encard"
] | [
" (B₁ \\ B₂).encard ≤ (B₂ \\ B₁).encard",
" (insert f (B₂ \\ {e}) \\ B₁).encard < (B₂ \\ B₁).encard",
" ((B₂ \\ B₁) \\ {e}).encard < (B₂ \\ B₁).encard",
" ((B₁ \\ B₂) \\ {f}).encard + 1 ≤ ((B₂ \\ B₁) \\ {e}).encard + 1"
] |
import Mathlib.Algebra.Category.GroupCat.Basic
import Mathlib.CategoryTheory.SingleObj
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.Preserves.Basic
import Mathlib.CategoryTheory.Adjunction.Limits
import Mathlib.CategoryTheory.Conj
#align_import representation_theory.Action... | Mathlib/RepresentationTheory/Action/Basic.lean | 50 | 50 | theorem ρ_one {G : MonCat.{u}} (A : Action V G) : A.ρ 1 = 𝟙 A.V := by | rw [MonoidHom.map_one]; rfl
| [
" A.ρ 1 = 𝟙 A.V",
" 1 = 𝟙 A.V"
] | [] |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.SetTheory.Ordinal.Basic
import Mathlib.Topology.ContinuousFunction.Algebra
import Mathlib.Topology.Compactness.Paracompact
import Mathlib.Topology.ShrinkingLemma
import Mathlib.Topology.UrysohnsLemma
#align_import topology.partition_of_unity from "leanprover-... | Mathlib/Topology/PartitionOfUnity.lean | 229 | 234 | theorem finite_tsupport : {i | x₀ ∈ tsupport (ρ i)}.Finite := by |
rcases ρ.locallyFinite x₀ with ⟨t, t_in, ht⟩
apply ht.subset
rintro i hi
simp only [inter_comm]
exact mem_closure_iff_nhds.mp hi t t_in
| [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... | [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... |
import Mathlib.Data.Nat.Defs
import Mathlib.Tactic.GCongr.Core
import Mathlib.Tactic.Common
import Mathlib.Tactic.Monotonicity.Attr
#align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
namespace Nat
def factorial : ℕ → ℕ
| 0 => 1
| succ n => s... | Mathlib/Data/Nat/Factorial/Basic.lean | 95 | 103 | theorem factorial_lt (hn : 0 < n) : n ! < m ! ↔ n < m := by |
refine ⟨fun h => not_le.mp fun hmn => Nat.not_le_of_lt h (factorial_le hmn), fun h => ?_⟩
have : ∀ {n}, 0 < n → n ! < (n + 1)! := by
intro k hk
rw [factorial_succ, succ_mul, Nat.lt_add_left_iff_pos]
exact Nat.mul_pos hk k.factorial_pos
induction' h with k hnk ih generalizing hn
· exact this hn
· ... | [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... | [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)"
] |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9"
namespace Set
variable {M : Type*} ... | Mathlib/Algebra/Order/Interval/Set/Monoid.lean | 118 | 119 | theorem image_const_add_Ioi : (fun x => a + x) '' Ioi b = Ioi (a + b) := by |
simp only [add_comm a, image_add_const_Ioi]
| [
" BijOn (fun x => x + d) (Ici a) (Ici (a + d))",
" x✝ ∈ (fun x => x + d) '' Ici a",
" a + d + c ∈ (fun x => x + d) '' Ici a",
" (fun x => x + d) (a + c) = a + d + c",
" BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))",
" x✝ ∈ (fun x => x + d) '' Ioi a",
" a + d + c ∈ (fun x => x + d) '' Ioi a",
" BijOn (... | [
" BijOn (fun x => x + d) (Ici a) (Ici (a + d))",
" x✝ ∈ (fun x => x + d) '' Ici a",
" a + d + c ∈ (fun x => x + d) '' Ici a",
" (fun x => x + d) (a + c) = a + d + c",
" BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))",
" x✝ ∈ (fun x => x + d) '' Ioi a",
" a + d + c ∈ (fun x => x + d) '' Ioi a",
" BijOn (... |
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.Algebra.Category.ModuleCat.Abelian
import Mathlib.Algebra.Category.ModuleCat.Subobject
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
#align_import algebra.homology.Module from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225... | Mathlib/Algebra/Homology/ModuleCat.lean | 72 | 79 | theorem cycles'Map_toCycles' (f : C ⟶ D) {i : ι} (x : LinearMap.ker (C.dFrom i)) :
(cycles'Map f i) (toCycles' x) = toCycles' ⟨f.f i x.1, by
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
rw [LinearMap.mem_ker]; erw [Hom.comm_from_apply, x.2, map_zero]⟩ := by |
ext
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [cycles'Map_arrow_apply, toKernelSubobject_arrow, toKernelSubobject_arrow]
rfl
| [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... | [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... |
import Mathlib.FieldTheory.Separable
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.Algebra.CharP.Reduced
open Function Polynomial
class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where
bijective_frobenius : Bijective <| frobenius R p
section PerfectRing
va... | Mathlib/FieldTheory/Perfect.lean | 113 | 114 | theorem iterateFrobeniusEquiv_zero_apply (x : R) : iterateFrobeniusEquiv R p 0 x = x := by |
rw [iterateFrobeniusEquiv_def, pow_zero, pow_one]
| [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))",
" (iterateFrobeniusEquiv R p 0) x = x"
] | [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))"
] |
import Mathlib.Data.PFunctor.Univariate.M
#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
class QPF (F : Type u → Type u) [Functor F] where
P : PFunctor.{u}
abs : ∀ {α}, P α → F α
repr : ∀ {α}, F α → P α
abs_repr : ∀ {α} (... | Mathlib/Data/QPF/Univariate/Basic.lean | 134 | 153 | theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i) := by |
constructor
· rintro ⟨u, xeq, yeq⟩
cases' h : repr u with a f
use a, fun i => (f i).val.fst, fun i => (f i).val.snd
constructor
· rw [← xeq, ← abs_repr u, h, ← abs_map]
rfl
constructor
· rw [← yeq, ← abs_repr u, h, ← abs_map]
rfl
intro i
exact (f i).property
rintro ⟨a,... | [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ∘ f) <$> x = g <$> f <$> x",
" (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)",
" (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩",
" abs ((P F).map (g ∘ f✝... | [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ∘ f) <$> x = g <$> f <$> x",
" (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)",
" (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩",
" abs ((P F).map (g ∘ f✝... |
import Mathlib.Logic.Equiv.Nat
import Mathlib.Logic.Equiv.Fin
import Mathlib.Data.Countable.Defs
#align_import data.countable.basic from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
universe u v w
open Function
instance : Countable ℤ :=
Countable.of_equiv ℕ Equiv.intEquivNat.symm
... | Mathlib/Data/Countable/Basic.lean | 38 | 39 | theorem uncountable_iff_isEmpty_embedding : Uncountable α ↔ IsEmpty (α ↪ ℕ) := by |
rw [← not_countable_iff, countable_iff_nonempty_embedding, not_nonempty_iff]
| [
" Uncountable α ↔ IsEmpty (α ↪ ℕ)"
] | [] |
import Mathlib.Data.Finset.Basic
import Mathlib.ModelTheory.Syntax
import Mathlib.Data.List.ProdSigma
#align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
universe u v w u' v'
namespace FirstOrder
namespace Language
variable {L : Language.{u, v}} {... | Mathlib/ModelTheory/Semantics.lean | 117 | 122 | theorem realize_functions_apply₂ {f : L.Functions 2} {t₁ t₂ : L.Term α} {v : α → M} :
(f.apply₂ t₁ t₂).realize v = funMap f ![t₁.realize v, t₂.realize v] := by |
rw [Functions.apply₂, Term.realize]
refine congr rfl (funext (Fin.cases ?_ ?_))
· simp only [Matrix.cons_val_zero]
· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]
| [
" realize v (relabel g t) = realize (v ∘ g) t",
" realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)",
" realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)",
" realize v (f.apply₁ t) = funMap f ![realize v t]",
" (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]",
" real... | [
" realize v (relabel g t) = realize (v ∘ g) t",
" realize v (relabel g (var a✝)) = realize (v ∘ g) (var a✝)",
" realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)",
" realize v (f.apply₁ t) = funMap f ![realize v t]",
" (funMap f fun i => realize v (![t] i)) = funMap f ![realize v t]",
" real... |
import Mathlib.Analysis.Analytic.Linear
import Mathlib.Analysis.Analytic.Composition
import Mathlib.Analysis.NormedSpace.Completion
#align_import analysis.analytic.uniqueness from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090"
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type... | Mathlib/Analysis/Analytic/Uniqueness.lean | 96 | 101 | theorem eqOn_of_preconnected_of_eventuallyEq {f g : E → F} {U : Set E} (hf : AnalyticOn 𝕜 f U)
(hg : AnalyticOn 𝕜 g U) (hU : IsPreconnected U) {z₀ : E} (h₀ : z₀ ∈ U) (hfg : f =ᶠ[𝓝 z₀] g) :
EqOn f g U := by |
have hfg' : f - g =ᶠ[𝓝 z₀] 0 := hfg.mono fun z h => by simp [h]
simpa [sub_eq_zero] using fun z hz =>
(hf.sub hg).eqOn_zero_of_preconnected_of_eventuallyEq_zero hU h₀ hfg' hz
| [
" EqOn f 0 U",
" f z = 0 z",
" closure u ∩ U ⊆ u",
" x ∈ u",
" HasFPowerSeriesOnBall f q y (r / 2)",
" ↑‖y - x‖₊ < r / 2",
" r / 2 ≤ r - ↑‖y - x‖₊",
" ↑‖y - x‖₊ + r / 2 ≤ r",
" r / 2 + r / 2 = r",
" f z = OfNat.ofNat 0 z",
" HasSum (fun n => (q n) fun x => z - y) 0",
" (fun n => (q n) fun x =>... | [
" EqOn f 0 U",
" f z = 0 z",
" closure u ∩ U ⊆ u",
" x ∈ u",
" HasFPowerSeriesOnBall f q y (r / 2)",
" ↑‖y - x‖₊ < r / 2",
" r / 2 ≤ r - ↑‖y - x‖₊",
" ↑‖y - x‖₊ + r / 2 ≤ r",
" r / 2 + r / 2 = r",
" f z = OfNat.ofNat 0 z",
" HasSum (fun n => (q n) fun x => z - y) 0",
" (fun n => (q n) fun x =>... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.GroupTheory.GroupAction.Ring
#align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Finset
open Polynomial
namespace Pol... | Mathlib/Algebra/Polynomial/Derivative.lean | 149 | 150 | theorem derivative_X_add_C (c : R) : derivative (X + C c) = 1 := by |
rw [derivative_add, derivative_X, derivative_C, add_zero]
| [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... | [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... |
import Mathlib.Algebra.Field.ULift
import Mathlib.Algebra.MvPolynomial.Cardinal
import Mathlib.Data.Nat.Factorization.PrimePow
import Mathlib.Data.Rat.Denumerable
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.Logic.Equiv.TransferInstance
import Mathlib.RingTheory.Localization.Cardinality
import Mathlib.... | Mathlib/FieldTheory/Cardinality.lean | 66 | 76 | theorem Infinite.nonempty_field {α : Type u} [Infinite α] : Nonempty (Field α) := by |
letI K := FractionRing (MvPolynomial α <| ULift.{u} ℚ)
suffices #α = #K by
obtain ⟨e⟩ := Cardinal.eq.1 this
exact ⟨e.field⟩
rw [← IsLocalization.card (MvPolynomial α <| ULift.{u} ℚ)⁰ K le_rfl]
apply le_antisymm
· refine
⟨⟨fun a => MvPolynomial.monomial (Finsupp.single a 1) (1 : ULift.{u} ℚ), fu... | [
" IsPrimePow ‖α‖",
" IsPrimePow p",
" ‖{ x // x ∈ IsNoetherian.finsetBasisIndex (ZMod p) α }‖ ≠ 0",
" FiniteDimensional.finrank (ZMod p) α ≠ 0",
" Nonempty (Field α) ↔ IsPrimePow ‖α‖",
" IsPrimePow ‖α‖ → Nonempty (Field α)",
" Nonempty (Field α)",
" #α = #K",
" #α = #(MvPolynomial α (ULift.{u, 0} ℚ)... | [
" IsPrimePow ‖α‖",
" IsPrimePow p",
" ‖{ x // x ∈ IsNoetherian.finsetBasisIndex (ZMod p) α }‖ ≠ 0",
" FiniteDimensional.finrank (ZMod p) α ≠ 0",
" Nonempty (Field α) ↔ IsPrimePow ‖α‖",
" IsPrimePow ‖α‖ → Nonempty (Field α)",
" Nonempty (Field α)"
] |
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic
#align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Euler
namespace ZMod
variable (p : ℕ) [Fact p.Prime]
theorem euler_criterion_units (x : (ZMod p)ˣ) :... | Mathlib/NumberTheory/LegendreSymbol/Basic.lean | 61 | 70 | theorem euler_criterion {a : ZMod p} (ha : a ≠ 0) : IsSquare (a : ZMod p) ↔ a ^ (p / 2) = 1 := by |
apply (iff_congr _ (by simp [Units.ext_iff])).mp (euler_criterion_units p (Units.mk0 a ha))
simp only [Units.ext_iff, sq, Units.val_mk0, Units.val_mul]
constructor
· rintro ⟨y, hy⟩; exact ⟨y, hy.symm⟩
· rintro ⟨y, rfl⟩
have hy : y ≠ 0 := by
rintro rfl
simp [zero_pow, mul_zero, ne_eq, not_true... | [
" (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1",
" (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1",
" ringChar (ZMod p) ≠ 2",
" (∃ y, y ^ 2 = x) ↔ IsSquare x",
" (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2",
" IsSquare x ↔ x ^ (p / 2) = 1",
" IsSquare a ↔ a ^ (p / 2) = 1",
" Units.mk0 a ha ^ (p / 2) = 1 ↔ a ^ (p / 2) = 1",
" (∃ y,... | [
" (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1",
" (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1",
" ringChar (ZMod p) ≠ 2",
" (∃ y, y ^ 2 = x) ↔ IsSquare x",
" (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2",
" IsSquare x ↔ x ^ (p / 2) = 1"
] |
import Mathlib.Logic.Equiv.Defs
import Mathlib.Tactic.Convert
#align_import control.equiv_functor from "leanprover-community/mathlib"@"d6aae1bcbd04b8de2022b9b83a5b5b10e10c777d"
universe u₀ u₁ u₂ v₀ v₁ v₂
open Function
class EquivFunctor (f : Type u₀ → Type u₁) where
map : ∀ {α β}, α ≃ β → f α → f β
m... | Mathlib/Control/EquivFunctor.lean | 70 | 71 | theorem mapEquiv_refl (α) : mapEquiv f (Equiv.refl α) = Equiv.refl (f α) := by |
simp only [mapEquiv, map_refl', Equiv.refl_symm]; rfl
| [
" map e.symm (map e x) = x",
" x = map (e.trans e.symm) x",
" map e (map e.symm y) = y",
" y = map (e.symm.trans e) y",
" mapEquiv f (Equiv.refl α) = Equiv.refl (f α)",
" { toFun := id, invFun := id, left_inv := ⋯, right_inv := ⋯ } = Equiv.refl (f α)"
] | [
" map e.symm (map e x) = x",
" x = map (e.trans e.symm) x",
" map e (map e.symm y) = y",
" y = map (e.symm.trans e) y"
] |
import Mathlib.AlgebraicTopology.DoldKan.Faces
import Mathlib.CategoryTheory.Idempotents.Basic
#align_import algebraic_topology.dold_kan.projections from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Pread... | Mathlib/AlgebraicTopology/DoldKan/Projections.lean | 118 | 134 | theorem comp_P_eq_self {Y : C} {n q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ) :
φ ≫ (P q).f (n + 1) = φ := by |
induction' q with q hq
· simp only [P_zero]
apply comp_id
· simp only [P_succ, comp_add, HomologicalComplex.comp_f, HomologicalComplex.add_f_apply,
comp_id, ← assoc, hq v.of_succ, add_right_eq_self]
by_cases hqn : n < q
· exact v.of_succ.comp_Hσ_eq_zero hqn
· obtain ⟨a, ha⟩ := Nat.le.dest (... | [
" (P q).f 0 = 𝟙 (K[X].X 0)",
" (P 0).f 0 = 𝟙 (K[X].X 0)",
" (P (q + 1)).f 0 = 𝟙 (K[X].X 0)",
" P q + Q q = 𝟙 K[X]",
" P q + (𝟙 K[X] - P q) = 𝟙 K[X]",
" Q (q + 1) = Q q - P q ≫ Hσ q",
" 𝟙 K[X] - (P q + P q ≫ Hσ q) = 𝟙 K[X] - P q - P q ≫ Hσ q",
" (Q q).f 0 = 0",
" (P 0).f (n + 1) ≫ X.δ j.succ ... | [
" (P q).f 0 = 𝟙 (K[X].X 0)",
" (P 0).f 0 = 𝟙 (K[X].X 0)",
" (P (q + 1)).f 0 = 𝟙 (K[X].X 0)",
" P q + Q q = 𝟙 K[X]",
" P q + (𝟙 K[X] - P q) = 𝟙 K[X]",
" Q (q + 1) = Q q - P q ≫ Hσ q",
" 𝟙 K[X] - (P q + P q ≫ Hσ q) = 𝟙 K[X] - P q - P q ≫ Hσ q",
" (Q q).f 0 = 0",
" (P 0).f (n + 1) ≫ X.δ j.succ ... |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.symmetric from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable ... | Mathlib/Analysis/InnerProductSpace/Symmetric.lean | 88 | 92 | theorem IsSymmetric.add {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
(T + S).IsSymmetric := by |
intro x y
rw [LinearMap.add_apply, inner_add_left, hT x y, hS x y, ← inner_add_right]
rfl
| [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜"
] | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜"
] |
import Mathlib.Data.List.Lattice
import Mathlib.Data.List.Range
import Mathlib.Data.Bool.Basic
#align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
open Nat
namespace List
def Ico (n m : ℕ) : List ℕ :=
range' n (m - n)
#align list.Ico List.Ico
names... | Mathlib/Data/List/Intervals.lean | 125 | 127 | theorem succ_top {n m : ℕ} (h : n ≤ m) : Ico n (m + 1) = Ico n m ++ [m] := by |
rwa [← succ_singleton, append_consecutive]
exact Nat.le_succ _
| [
" Ico 0 n = range n",
" (Ico n m).length = m - n",
" (range' n (m - n)).length = m - n",
" Pairwise (fun x x_1 => x < x_1) (Ico n m)",
" Pairwise (fun x x_1 => x < x_1) (range' n (m - n))",
" (Ico n m).Nodup",
" (range' n (m - n)).Nodup",
" l ∈ Ico n m ↔ n ≤ l ∧ l < m",
" n ≤ l ∧ l < n + (m - n) ↔ n... | [
" Ico 0 n = range n",
" (Ico n m).length = m - n",
" (range' n (m - n)).length = m - n",
" Pairwise (fun x x_1 => x < x_1) (Ico n m)",
" Pairwise (fun x x_1 => x < x_1) (range' n (m - n))",
" (Ico n m).Nodup",
" (range' n (m - n)).Nodup",
" l ∈ Ico n m ↔ n ≤ l ∧ l < m",
" n ≤ l ∧ l < n + (m - n) ↔ n... |
import Mathlib.MeasureTheory.Measure.MeasureSpace
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function
variable {R α β δ γ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] [MeasurableSpace γ]
variable {μ μ₁ μ₂ μ₃ ν ν' ν... | Mathlib/MeasureTheory/Measure/Restrict.lean | 140 | 141 | theorem restrict_apply_univ (s : Set α) : μ.restrict s univ = μ s := by |
rw [restrict_apply MeasurableSet.univ, Set.univ_inter]
| [
" ((OuterMeasure.restrict s) μ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) μ.toOuterMeasure) (t ∩ s') + ((OuterMeasure.restrict s) μ.toOuterMeasure) (t \\ s')",
" μ (s ∩ t) = μ (s ∩ t ∩ s') + μ ((s ∩ t) \\ s')",
" (μ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) μ.toOuterMeasure",
" (μ.restri... | [
" ((OuterMeasure.restrict s) μ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) μ.toOuterMeasure) (t ∩ s') + ((OuterMeasure.restrict s) μ.toOuterMeasure) (t \\ s')",
" μ (s ∩ t) = μ (s ∩ t ∩ s') + μ ((s ∩ t) \\ s')",
" (μ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) μ.toOuterMeasure",
" (μ.restri... |
import Mathlib.CategoryTheory.Limits.Shapes.CommSq
import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.Constructions... | Mathlib/CategoryTheory/Extensive.lean | 203 | 216 | theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
[HasPullbacksOfInclusions C]
(T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
FinitaryExtensive C ↔ IsVanKampenColimit c₀ := by |
refine ⟨fun H => H.van_kampen' c₀ hc₀, fun H => ?_⟩
constructor
simp_rw [BinaryCofan.isVanKampen_iff] at H ⊢
intro X Y c hc X' Y' c' αX αY f hX hY
obtain ⟨d, hd, hd'⟩ :=
Limits.BinaryCofan.IsColimit.desc' hc (HT.from _ ≫ c₀.inl) (HT.from _ ≫ c₀.inr)
rw [H c' (αX ≫ HT.from _) (αY ≫ HT.from _) (f ≫ d) (b... | [
" IsVanKampenColimit c",
" F = pair X Y",
" ∀ (X_1 : Discrete WalkingPair), F.obj X_1 = (pair X Y).obj X_1",
" F.obj { as := WalkingPair.left } = (pair X Y).obj { as := WalkingPair.left }",
" F.obj { as := WalkingPair.right } = (pair X Y).obj { as := WalkingPair.right }",
" ∀ (X_1 Y_1 : Discrete WalkingPa... | [
" IsVanKampenColimit c",
" F = pair X Y",
" ∀ (X_1 : Discrete WalkingPair), F.obj X_1 = (pair X Y).obj X_1",
" F.obj { as := WalkingPair.left } = (pair X Y).obj { as := WalkingPair.left }",
" F.obj { as := WalkingPair.right } = (pair X Y).obj { as := WalkingPair.right }",
" ∀ (X_1 Y_1 : Discrete WalkingPa... |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Invertible.Defs
import Mathlib.Algebra.Group.Hom.Defs
import Mathlib.Logic.Equiv.Defs
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists MonoidWithZero
assert_not_ex... | Mathlib/Algebra/Group/Invertible/Basic.lean | 69 | 74 | theorem Commute.invOf_right [Monoid α] {a b : α} [Invertible b] (h : Commute a b) :
Commute a (⅟ b) :=
calc
a * ⅟ b = ⅟ b * (b * a * ⅟ b) := by | simp [mul_assoc]
_ = ⅟ b * (a * b * ⅟ b) := by rw [h.eq]
_ = ⅟ b * a := by simp [mul_assoc]
| [
" a * ⅟a = 1",
" ⅟a * a = 1",
" a * ⅟b = ⅟b * (b * a * ⅟b)",
" ⅟b * (b * a * ⅟b) = ⅟b * (a * b * ⅟b)",
" ⅟b * (a * b * ⅟b) = ⅟b * a"
] | [
" a * ⅟a = 1",
" ⅟a * a = 1"
] |
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Group.Hom.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Algebra.Order.ZeroLEOne
import Mathlib.Data.Nat.Cast.Defs
import Mathlib.Order.WithBot
#align_import algebra.order.monoid.with_top ... | Mathlib/Algebra/Order/Monoid/WithTop.lean | 175 | 181 | theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by |
lift a to α using ha
obtain rfl | hb := eq_or_ne b ⊤
· rw [add_top, eq_comm, WithTop.coe_add_eq_top_iff, eq_comm]
lift b to α using hb
simp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, eq_comm, coe_eq_coe,
exists_and_left, exists_eq_left', add_right_inj, exists_eq_right']
| [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤",
" a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤",
" ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤",
" x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤",
" ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤",
" a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤",
" ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c",
" ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b... | [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤",
" a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤",
" ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤",
" x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤",
" ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤",
" a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤",
" ⊤ + b = ↑c ↔ ∃ a' b', ↑a' = ⊤ ∧ ↑b' = b ∧ a' + b' = c",
" ↑a + ⊤ = ↑c ↔ ∃ a' b', ↑a' = ↑a ∧ ↑b... |
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 98 | 112 | theorem basisSets_intersect (U V : Set E) (hU : U ∈ p.basisSets) (hV : V ∈ p.basisSets) :
∃ z ∈ p.basisSets, z ⊆ U ∩ V := by |
classical
rcases p.basisSets_iff.mp hU with ⟨s, r₁, hr₁, hU⟩
rcases p.basisSets_iff.mp hV with ⟨t, r₂, hr₂, hV⟩
use ((s ∪ t).sup p).ball 0 (min r₁ r₂)
refine ⟨p.basisSets_mem (s ∪ t) (lt_min_iff.mpr ⟨hr₁, hr₂⟩), ?_⟩
rw [hU, hV, ball_finset_sup_eq_iInter _ _ _ (lt_min_iff.mpr ⟨hr₁, hr₂⟩),
ba... | [
" U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r",
" p.basisSets.Nonempty",
" (p i).ball 0 1 ∈ p.basisSets",
" ∃ z ∈ p.basisSets, z ⊆ U ∩ V",
" ((s ∪ t).sup p).ball 0 (min r₁ r₂) ∈ p.basisSets ∧ ((s ∪ t).sup p).ball 0 (min r₁ r₂) ⊆ U ∩ V",
" ((s ∪ t).su... | [
" U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r",
" p.basisSets.Nonempty",
" (p i).ball 0 1 ∈ p.basisSets"
] |
import Mathlib.NumberTheory.Zsqrtd.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Real.Archimedean
#align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Zsqrtd Complex
open sc... | Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean | 141 | 142 | theorem toComplex_inj {x y : ℤ[i]} : (x : ℂ) = y ↔ x = y := by |
cases x; cases y; simp [toComplex_def₂]
| [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im",
" (toComplex { re :=... | [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im",
" (toComplex { re :=... |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
theorem te... | Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean | 80 | 82 | theorem denominators_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.denominators m = g.denominators n := by |
simp only [denom_eq_conts_b, continuants_stable_of_terminated n_le_m terminated_at_n]
| [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... | [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... |
import Mathlib.Algebra.Order.ToIntervalMod
import Mathlib.Algebra.Ring.AddAut
import Mathlib.Data.Nat.Totient
import Mathlib.GroupTheory.Divisible
import Mathlib.Topology.Connected.PathConnected
import Mathlib.Topology.IsLocalHomeomorph
#align_import topology.instances.add_circle from "leanprover-community/mathlib"@"... | Mathlib/Topology/Instances/AddCircle.lean | 213 | 219 | theorem coe_eq_coe_iff_of_mem_Ico {x y : 𝕜} (hx : x ∈ Ico a (a + p)) (hy : y ∈ Ico a (a + p)) :
(x : AddCircle p) = y ↔ x = y := by |
refine ⟨fun h => ?_, by tauto⟩
suffices (⟨x, hx⟩ : Ico a (a + p)) = ⟨y, hy⟩ by exact Subtype.mk.inj this
apply_fun equivIco p a at h
rw [← (equivIco p a).right_inv ⟨x, hx⟩, ← (equivIco p a).right_inv ⟨y, hy⟩]
exact h
| [
" ↑x = 0 ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) → ∃ n, n • p = x",
" ∃ n_1, n_1 • p = n • p",
" 0 < n",
" n • p ≤ 0",
" n.toNat • p = n • p",
" ↑n • p = n • p",
" ↑(x + p) = ↑x",
" ↑x = ↑y ↔ x = y",
" x = y → ↑x = ↑y",
" x = y",
" ⟨x, hx⟩ = ⟨y, hy⟩",
" ... | [
" ↑x = 0 ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) → ∃ n, n • p = x",
" ∃ n_1, n_1 • p = n • p",
" 0 < n",
" n • p ≤ 0",
" n.toNat • p = n • p",
" ↑n • p = n • p",
" ↑(x + p) = ↑x"
] |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Order.Monoid.WithTop
#align_import data.nat.with_bot from "leanprover-community/mathlib"@"966e0cf0685c9cedf8a3283ac69eef4d5f2eaca2"
namespace Nat
namespace WithBot
instance : WellFoundedRelation (WithBot ℕ) where
rel := (· < ·)
wf := IsWellFounde... | Mathlib/Data/Nat/WithBot.lean | 61 | 63 | theorem coe_nonneg {n : ℕ} : 0 ≤ (n : WithBot ℕ) := by |
rw [← WithBot.coe_zero]
exact WithBot.coe_le_coe.mpr (Nat.zero_le n)
| [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... | [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... |
import Mathlib.Control.Monad.Basic
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.List.ProdSigma
#align_import data.fin_enum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
universe u v
open Finset
class FinEnum (α : Sort*) where
card : ℕ
equiv : α ≃ Fin card
[... | Mathlib/Data/FinEnum.lean | 69 | 70 | theorem mem_toList [FinEnum α] (x : α) : x ∈ toList α := by |
simp [toList]; exists equiv x; simp
| [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup",
" x ∈ toList α",
" ∃ a, equiv.symm a = x",
" equiv.symm (equiv x... | [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup"
] |
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.LinearAlgebra.Matrix.Trace
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import combinatorics.simple_graph.adj_matrix from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1... | Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean | 64 | 65 | theorem apply_diag_ne [MulZeroOneClass α] [Nontrivial α] (h : IsAdjMatrix A) (i : V) :
¬A i i = 1 := by | simp [h.apply_diag i]
| [
" ¬A i i = 1"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Ring.Action.Basic
import Mathlib.GroupTheory.GroupAction.Hom
import Mathlib.GroupTheory.GroupAction.Quotient
#align_import algebra.polynomial.group_ring_action from "leanprover-community/mathlib"@"afad8e438d03f... | Mathlib/Algebra/Polynomial/GroupRingAction.lean | 31 | 39 | theorem smul_eq_map [MulSemiringAction M R] (m : M) :
HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m) := by |
suffices DistribMulAction.toAddMonoidHom R[X] m =
(mapRingHom (MulSemiringAction.toRingHom M R m)).toAddMonoidHom by
ext1 r
exact DFunLike.congr_fun this r
ext n r : 2
change m • monomial n r = map (MulSemiringAction.toRingHom M R m) (monomial n r)
rw [Polynomial.map_monomial, Polynomial.smul_mon... | [
" HSMul.hSMul m = map (MulSemiringAction.toRingHom M R m)",
" m • r = map (MulSemiringAction.toRingHom M R m) r",
" DistribMulAction.toAddMonoidHom R[X] m = (mapRingHom (MulSemiringAction.toRingHom M R m)).toAddMonoidHom",
" ((DistribMulAction.toAddMonoidHom R[X] m).comp (monomial n).toAddMonoidHom) r =\n ... | [] |
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.Algebra.Regular.Basic
import Mathlib.Data.Nat.Choose.Sum
#align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
set_option linter.uppercaseLean3 false
no... | Mathlib/Algebra/Polynomial/Coeff.lean | 130 | 134 | theorem coeff_mul (p q : R[X]) (n : ℕ) :
coeff (p * q) n = ∑ x ∈ antidiagonal n, coeff p x.1 * coeff q x.2 := by |
rcases p with ⟨p⟩; rcases q with ⟨q⟩
simp_rw [← ofFinsupp_mul, coeff]
exact AddMonoidAlgebra.mul_apply_antidiagonal p q n _ Finset.mem_antidiagonal
| [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... | [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... |
import Mathlib.Init.Order.Defs
import Mathlib.Logic.Nontrivial.Defs
import Mathlib.Tactic.Attr.Register
import Mathlib.Data.Prod.Basic
import Mathlib.Data.Subtype
import Mathlib.Logic.Function.Basic
import Mathlib.Logic.Unique
#align_import logic.nontrivial from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc95... | Mathlib/Logic/Nontrivial/Basic.lean | 32 | 34 | theorem exists_pair_lt (α : Type*) [Nontrivial α] [LinearOrder α] : ∃ x y : α, x < y := by |
rcases exists_pair_ne α with ⟨x, y, hxy⟩
cases lt_or_gt_of_ne hxy <;> exact ⟨_, _, ‹_›⟩
| [
" ∃ x y, x < y"
] | [] |
import Mathlib.Data.Bracket
import Mathlib.LinearAlgebra.Basic
#align_import algebra.lie.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u v w w₁ w₂
open Function
class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where
protected add_lie : ∀ x y z ... | Mathlib/Algebra/Lie/Basic.lean | 163 | 165 | theorem neg_lie : ⁅-x, m⁆ = -⁅x, m⁆ := by |
rw [← sub_eq_zero, sub_neg_eq_add, ← add_lie]
simp
| [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆",
" ⁅-x, m⁆ = -⁅x, m⁆",
" ⁅-x + x, m⁆ = 0"
] | [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆"
] |
import Mathlib.AlgebraicGeometry.Gluing
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
#align_import algebraic_geometry.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070"
set_opt... | Mathlib/AlgebraicGeometry/Pullbacks.lean | 78 | 81 | theorem t_snd (i j : 𝒰.J) : t 𝒰 f g i j ≫ pullback.snd = pullback.fst ≫ pullback.fst := by |
simp only [t, Category.assoc, pullbackSymmetry_hom_comp_snd, pullbackAssoc_hom_fst,
pullback.lift_fst_assoc, pullbackSymmetry_hom_comp_fst, pullbackAssoc_inv_fst_snd,
pullbackSymmetry_hom_comp_snd_assoc]
| [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... | [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... |
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.measure.haar.inner_product_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open FiniteDimensional MeasureTheory MeasureTheory.Measure Set
var... | Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean | 34 | 43 | theorem Orientation.measure_orthonormalBasis (o : Orientation ℝ F (Fin n))
(b : OrthonormalBasis ι ℝ F) : o.volumeForm.measure (parallelepiped b) = 1 := by |
have e : ι ≃ Fin n := by
refine Fintype.equivFinOfCardEq ?_
rw [← _i.out, finrank_eq_card_basis b.toBasis]
have A : ⇑b = b.reindex e ∘ e := by
ext x
simp only [OrthonormalBasis.coe_reindex, Function.comp_apply, Equiv.symm_apply_apply]
rw [A, parallelepiped_comp_equiv, AlternatingMap.measure_paral... | [
" o.volumeForm.measure (parallelepiped ⇑b) = 1",
" ι ≃ Fin n",
" Fintype.card ι = n",
" ⇑b = ⇑(b.reindex e) ∘ ⇑e",
" b x = (⇑(b.reindex e) ∘ ⇑e) x"
] | [] |
import Mathlib.Algebra.Category.Ring.FilteredColimits
import Mathlib.Geometry.RingedSpace.SheafedSpace
import Mathlib.Topology.Sheaves.Stalks
import Mathlib.Algebra.Category.Ring.Colimits
import Mathlib.Algebra.Category.Ring.Limits
#align_import algebraic_geometry.ringed_space from "leanprover-community/mathlib"@"5dc... | Mathlib/Geometry/RingedSpace/Basic.lean | 84 | 125 | theorem isUnit_of_isUnit_germ (U : Opens X) (f : X.presheaf.obj (op U))
(h : ∀ x : U, IsUnit (X.presheaf.germ x f)) : IsUnit f := by |
-- We pick a cover of `U` by open sets `V x`, such that `f` is a unit on each `V x`.
choose V iVU m h_unit using fun x : U => X.isUnit_res_of_isUnit_germ U f x (h x)
have hcover : U ≤ iSup V := by
intro x hxU
-- Porting note: in Lean3 `rw` is sufficient
erw [Opens.mem_iSup]
exact ⟨⟨x, hxU⟩, m ⟨x,... | [
" ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)",
" (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =\n (X.presheaf.germ ⟨↑x, hxW⟩) 1",
" (Limits.colimit.ι ((OpenNhds.inclusion ↑x).op ⋙ X.presheaf) { unop := { obj := W, property := ⋯ } })... | [
" ∃ V i, ∃ (_ : ↑x ∈ V), IsUnit ((X.presheaf.map i.op) f)",
" (X.presheaf.germ ⟨↑x, hxW⟩) ((X.presheaf.map (U.infLELeft V).op) f * (X.presheaf.map (U.infLERight V).op) g) =\n (X.presheaf.germ ⟨↑x, hxW⟩) 1",
" (Limits.colimit.ι ((OpenNhds.inclusion ↑x).op ⋙ X.presheaf) { unop := { obj := W, property := ⋯ } })... |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.Topology.LocalAtTarget
#align_import algebraic_geometry.morphisms.universally_closed from "leanprover-community/mathlib"@"a8ae1b3f7979249a0af6bc7cf20c1f6bf656ca73"
noncomputable section
open CategoryTheory CategoryTheory.Limits Opposite TopologicalS... | Mathlib/AlgebraicGeometry/Morphisms/UniversallyClosed.lean | 72 | 76 | theorem topologically_isClosedMap_respectsIso : RespectsIso (topologically @IsClosedMap) := by |
apply MorphismProperty.respectsIso_of_isStableUnderComposition
intro _ _ f hf
have : IsIso f := hf
exact (TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (asIso f))).isClosedMap
| [
" @UniversallyClosed = (topologically @IsClosedMap).universally",
" UniversallyClosed f ↔ (topologically @IsClosedMap).universally f",
" IsStableUnderComposition @UniversallyClosed",
" (topologically @IsClosedMap).universally.IsStableUnderComposition",
" (topologically @IsClosedMap).RespectsIso",
" isomor... | [
" @UniversallyClosed = (topologically @IsClosedMap).universally",
" UniversallyClosed f ↔ (topologically @IsClosedMap).universally f",
" IsStableUnderComposition @UniversallyClosed",
" (topologically @IsClosedMap).universally.IsStableUnderComposition"
] |
import Mathlib.Order.Filter.Bases
#align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451"
open Set Function
open scoped Classical
open Filter
namespace Filter
variable {ι : Type*} {α : ι → Type*} {f f₁ f₂ : (i : ι) → Filter (α i)} {s : (i : ι) → Set (α i)}
... | Mathlib/Order/Filter/Pi.lean | 121 | 125 | theorem hasBasis_pi {ι' : ι → Type} {s : ∀ i, ι' i → Set (α i)} {p : ∀ i, ι' i → Prop}
(h : ∀ i, (f i).HasBasis (p i) (s i)) :
(pi f).HasBasis (fun If : Set ι × ∀ i, ι' i => If.1.Finite ∧ ∀ i ∈ If.1, p i (If.2 i))
fun If : Set ι × ∀ i, ι' i => If.1.pi fun i => s i <| If.2 i := by |
simpa [Set.pi_def] using hasBasis_iInf' fun i => (h i).comap (eval i : (∀ j, α j) → α i)
| [
" Tendsto m l (pi f) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)",
" (∀ (i : ι), Tendsto (eval i ∘ m) l (f i)) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)",
" I.pi s ∈ pi f",
" ⋂ x, eval ↑x ⁻¹' s ↑x ∈ pi f",
" eval ↑i ⁻¹' s ↑i ∈ comap (eval ↑i) (f ↑i)",
" s ∈ pi f ↔ ∃ I, I.Finite ∧ ∃ t, (∀ (i : ι), t ... | [
" Tendsto m l (pi f) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)",
" (∀ (i : ι), Tendsto (eval i ∘ m) l (f i)) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)",
" I.pi s ∈ pi f",
" ⋂ x, eval ↑x ⁻¹' s ↑x ∈ pi f",
" eval ↑i ⁻¹' s ↑i ∈ comap (eval ↑i) (f ↑i)",
" s ∈ pi f ↔ ∃ I, I.Finite ∧ ∃ t, (∀ (i : ι), t ... |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathli... | Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 246 | 255 | theorem ContinuousLinearMap.isOpen_injective [FiniteDimensional 𝕜 E] :
IsOpen { L : E →L[𝕜] F | Injective L } := by |
rw [isOpen_iff_eventually]
rintro φ₀ hφ₀
rcases φ₀.injective_iff_antilipschitz.mp hφ₀ with ⟨K, K_pos, H⟩
have : ∀ᶠ φ in 𝓝 φ₀, ‖φ - φ₀‖₊ < K⁻¹ := eventually_nnnorm_sub_lt _ <| inv_pos_of_pos K_pos
filter_upwards [this] with φ hφ
apply φ.injective_iff_antilipschitz.mpr
exact ⟨(K⁻¹ - ‖φ - φ₀‖₊)⁻¹, inv_pos_... | [
" Continuous fun f => f.det",
" Continuous fun f => LinearMap.det ↑f",
" Continuous fun f => ((LinearMap.toMatrix b b) ↑f).det",
" Continuous fun f => (LinearMap.toMatrix b b) ↑f",
" Continuous fun f =>\n (if H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E) then LinearMap.detAux (Trunc.mk ⋯.some) else 1) ↑f... | [
" Continuous fun f => f.det",
" Continuous fun f => LinearMap.det ↑f",
" Continuous fun f => ((LinearMap.toMatrix b b) ↑f).det",
" Continuous fun f => (LinearMap.toMatrix b b) ↑f",
" Continuous fun f =>\n (if H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E) then LinearMap.detAux (Trunc.mk ⋯.some) else 1) ↑f... |
import Mathlib.RingTheory.WittVector.Frobenius
import Mathlib.RingTheory.WittVector.Verschiebung
import Mathlib.RingTheory.WittVector.MulP
#align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
namespace WittVector
variable {p : ℕ} {R : Typ... | Mathlib/RingTheory/WittVector/Identities.lean | 64 | 71 | theorem coeff_p_pow_eq_zero [CharP R p] {i j : ℕ} (hj : j ≠ i) : ((p : 𝕎 R) ^ i).coeff j = 0 := by |
induction' i with i hi generalizing j
· rw [pow_zero, one_coeff_eq_of_pos]
exact Nat.pos_of_ne_zero hj
· rw [pow_succ, ← frobenius_verschiebung, coeff_frobenius_charP]
cases j
· rw [verschiebung_coeff_zero, zero_pow hp.out.ne_zero]
· rw [verschiebung_coeff_succ, hi (ne_of_apply_ne _ hj), zero_pow... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1"
] |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 90 | 90 | theorem sameCycle_one : SameCycle 1 x y ↔ x = y := by | simp [SameCycle]
| [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z",
" SameCycle 1 x y ↔ x = y"
] | [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z"
] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Data.Nat.Cast.Order
import Mathlib.Tactic.Common
#align_import data.nat.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
namespace Nat
variable {α : Type*}
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_... | Mathlib/Data/Nat/Cast/Field.lean | 36 | 41 | theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
(hn : d ∣ n) (hm : d ∣ m) :
(↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by |
rcases eq_or_ne d 0 with (rfl | hd); · simp [Nat.zero_dvd.1 hm]
replace hd : (d : α) ≠ 0 := by norm_cast
rw [cast_div hm, cast_div hn, div_div_div_cancel_right _ hd] <;> exact hd
| [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False",
" ↑(m / d) / ↑(n / d) = ↑m / ↑n",
" ↑(m / 0) / ↑(n / 0) = ↑m / ↑n",
" ↑d ≠ 0"
] | [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False"
] |
import Mathlib.Data.Bracket
import Mathlib.LinearAlgebra.Basic
#align_import algebra.lie.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u v w w₁ w₂
open Function
class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where
protected add_lie : ∀ x y z ... | Mathlib/Algebra/Lie/Basic.lean | 179 | 179 | theorem lie_sub : ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x, n⁆ := by | simp [sub_eq_add_neg]
| [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆",
" ⁅-x, m⁆ = -⁅x, m⁆",
" ⁅-x + x, m⁆ = 0",
" ⁅x, -m⁆ = -⁅x, m⁆",
" ⁅x, -m + m⁆ = 0",
" ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆",
" ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x... | [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆",
" ⁅-x, m⁆ = -⁅x, m⁆",
" ⁅-x + x, m⁆ = 0",
" ⁅x, -m⁆ = -⁅x, m⁆",
" ⁅x, -m + m⁆ = 0",
" ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine
#align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped EuclideanGeometry
... | Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean | 77 | 91 | theorem angle_add_eq_arcsin_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0 ∨ y ≠ 0) :
angle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖) := by |
have hxy : ‖x + y‖ ^ 2 ≠ 0 := by
rw [pow_two, norm_add_sq_eq_norm_sq_add_norm_sq_real h, ne_comm]
refine ne_of_lt ?_
rcases h0 with (h0 | h0)
· exact
Left.add_pos_of_pos_of_nonneg (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)
· exact
Left.add_pos_of_nonneg_of_pos (m... | [
" ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2",
" ⟪x, y⟫_ℝ = 0 ↔ angle x y = π / 2",
" ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2",
" angle x (x + y) = (‖x‖ / ‖x + y‖).arccos",
" (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)).arccos = (‖x‖ / ‖x + y‖).arccos",
" angle x (x + y) = (‖y‖ /... | [
" ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2",
" ⟪x, y⟫_ℝ = 0 ↔ angle x y = π / 2",
" ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2",
" angle x (x + y) = (‖x‖ / ‖x + y‖).arccos",
" (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)).arccos = (‖x‖ / ‖x + y‖).arccos"
] |
import Mathlib.Algebra.Algebra.Quasispectrum
import Mathlib.Topology.ContinuousFunction.Compact
import Mathlib.Topology.ContinuousFunction.ContinuousMapZero
import Mathlib.Topology.ContinuousFunction.FunctionalCalculus
import Mathlib.Topology.UniformSpace.CompactConvergence
local notation "σₙ" => quasispectrum
open... | Mathlib/Topology/ContinuousFunction/NonUnitalFunctionalCalculus.lean | 147 | 167 | theorem cfcₙHom_comp [UniqueNonUnitalContinuousFunctionalCalculus R A] (f : C(σₙ R a, R)₀)
(f' : C(σₙ R a, σₙ R (cfcₙHom ha f))₀)
(hff' : ∀ x, f x = f' x) (g : C(σₙ R (cfcₙHom ha f), R)₀) :
cfcₙHom ha (g.comp f') = cfcₙHom (cfcₙHom_predicate ha f) g := by |
let ψ : C(σₙ R (cfcₙHom ha f), R)₀ →⋆ₙₐ[R] C(σₙ R a, R)₀ :=
{ toFun := (ContinuousMapZero.comp · f')
map_smul' := fun _ _ ↦ rfl
map_add' := fun _ _ ↦ rfl
map_mul' := fun _ _ ↦ rfl
map_zero' := rfl
map_star' := fun _ ↦ rfl }
let φ : C(σₙ R (cfcₙHom ha f), R)₀ →⋆ₙₐ[R] A := (cfcₙHom ... | [
" ↑0 = 0",
" (cfcₙHom ha) { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ } =\n φ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ }",
" (cfcₙHom ha) (g.comp f') = (cfcₙHom ⋯) g",
" cfcₙHom ⋯ = φ",
" Continuous ⇑φ",
" Co... | [
" ↑0 = 0",
" (cfcₙHom ha) { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ } =\n φ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ }"
] |
import Mathlib.Algebra.Module.Defs
import Mathlib.Data.Fintype.BigOperators
import Mathlib.GroupTheory.GroupAction.BigOperators
#align_import algebra.module.big_operators from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
variable {ι κ α β R M : Type*}
section AddCommMonoid
variable [... | Mathlib/Algebra/Module/BigOperators.lean | 30 | 34 | theorem Multiset.sum_smul_sum {s : Multiset R} {t : Multiset M} :
s.sum • t.sum = ((s ×ˢ t).map fun p : R × M ↦ p.fst • p.snd).sum := by |
induction' s using Multiset.induction with a s ih
· simp
· simp [add_smul, ih, ← Multiset.smul_sum]
| [
" s.sum • t.sum = (map (fun p => p.1 • p.2) (s ×ˢ t)).sum",
" sum 0 • t.sum = (map (fun p => p.1 • p.2) (0 ×ˢ t)).sum",
" (a ::ₘ s).sum • t.sum = (map (fun p => p.1 • p.2) ((a ::ₘ s) ×ˢ t)).sum"
] | [] |
import Mathlib.Algebra.CharP.ExpChar
import Mathlib.GroupTheory.OrderOfElement
#align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450"
variable {R ι : Type*}
namespace CharTwo
section CommSemiring
variable [CommSemiring R] [CharP R 2]
theorem add_sq (x y... | Mathlib/Algebra/CharP/Two.lean | 91 | 92 | theorem add_mul_self (x y : R) : (x + y) * (x + y) = x * x + y * y := by |
rw [← pow_two, ← pow_two, ← pow_two, add_sq]
| [
" (x + y) * (x + y) = x * x + y * y"
] | [] |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ι : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 90 | 94 | theorem natDegree_C_mul_le (a : R) (f : R[X]) : (C a * f).natDegree ≤ f.natDegree :=
calc
(C a * f).natDegree ≤ (C a).natDegree + f.natDegree := natDegree_mul_le
_ = 0 + f.natDegree := by | rw [natDegree_C a]
_ = f.natDegree := zero_add _
| [
" (p.comp q).natDegree ≤ p.natDegree * q.natDegree",
" 0 ≤ p.natDegree * q.natDegree",
" ↑(C (p.coeff n)).natDegree + n • ↑q.natDegree = ↑(n * q.natDegree)",
" ↑n * ↑q.natDegree = ↑(n * q.natDegree)",
" False",
" p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0",
" (p + q).natDegree ≤ n ↔ p.natDegree ... | [
" (p.comp q).natDegree ≤ p.natDegree * q.natDegree",
" 0 ≤ p.natDegree * q.natDegree",
" ↑(C (p.coeff n)).natDegree + n • ↑q.natDegree = ↑(n * q.natDegree)",
" ↑n * ↑q.natDegree = ↑(n * q.natDegree)",
" False",
" p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0",
" (p + q).natDegree ≤ n ↔ p.natDegree ... |
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 b... | Mathlib/SetTheory/Game/Birthday.lean | 142 | 143 | theorem neg_birthday_le : -x.birthday.toPGame ≤ x := by |
simpa only [neg_birthday, ← neg_le_iff] using le_birthday (-x)
| [
" x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)",
" (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)",
" max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (... | [
" x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)",
" (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)",
" max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (... |
import Mathlib.Combinatorics.SimpleGraph.DegreeSum
import Mathlib.Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508"
universe u
namespace SimpleGraph
variable {V : Type u} {G : SimpleGraph V} (M : Su... | Mathlib/Combinatorics/SimpleGraph/Matching.lean | 96 | 98 | theorem isMatching_iff_forall_degree {M : Subgraph G} [∀ v : V, Fintype (M.neighborSet v)] :
M.IsMatching ↔ ∀ v : V, v ∈ M.verts → M.degree v = 1 := by |
simp only [degree_eq_one_iff_unique_adj, IsMatching]
| [
" h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
" s(v, Exists.choose ⋯) = s(v, w)",
" Exists.choose ⋯ = w",
" Function.Surjective h.toEdge",
" ∃ a, h.toEdge a = ⟨e, he⟩",
" ∃ a, h.toEdge a = ⟨s(x, y), he⟩",
" h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩",
" M.support = M.verts",
" v ∈ M.support",
" M.IsMatching ↔ ∀ ... | [
" h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
" s(v, Exists.choose ⋯) = s(v, w)",
" Exists.choose ⋯ = w",
" Function.Surjective h.toEdge",
" ∃ a, h.toEdge a = ⟨e, he⟩",
" ∃ a, h.toEdge a = ⟨s(x, y), he⟩",
" h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩",
" M.support = M.verts",
" v ∈ M.support"
] |
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.Algebra.Module.Torsion
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Filtration
import Mathlib.RingTheory.Nakayama
#align_import ring_theory.ideal.cota... | Mathlib/RingTheory/Ideal/Cotangent.lean | 69 | 71 | theorem mem_toCotangent_ker {x : I} : x ∈ LinearMap.ker I.toCotangent ↔ (x : R) ∈ I ^ 2 := by |
rw [← I.map_toCotangent_ker]
simp
| [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ... | [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2"
] |
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Topology.Algebra.Module.StrongTopology
#align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Function Set Filter Bornology Metric Pointwise Topology
def IsCompactOperat... | Mathlib/Analysis/NormedSpace/CompactOperator.lean | 252 | 257 | theorem IsCompactOperator.comp_clm [AddCommMonoid M₂] [Module R₂ M₂] {f : M₂ → M₃}
(hf : IsCompactOperator f) (g : M₁ →SL[σ₁₂] M₂) : IsCompactOperator (f ∘ g) := by |
have := g.continuous.tendsto 0
rw [map_zero] at this
rcases hf with ⟨K, hK, hKf⟩
exact ⟨K, hK, this hKf⟩
| [
" IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))",
" (∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))",
" IsCompactOperator (f ∘ ⇑g)"
] | [
" IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))",
" (∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))"
] |
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Ideal.Quotient
#align_import algebra.char_p.quotient from "leanprover-community/mathlib"@"85e3c05a94b27c84dc6f234cf88326d5e0096ec3"
universe u v
namespace CharP
theorem quotient (R : Type u) [CommRing R] (p ... | Mathlib/Algebra/CharP/Quotient.lean | 54 | 56 | theorem quotient_iff_le_ker_natCast {R : Type*} [CommRing R] (n : ℕ) [CharP R n] (I : Ideal R) :
CharP (R ⧸ I) n ↔ I.comap (Nat.castRingHom R) ≤ RingHom.ker (Nat.castRingHom R) := by |
rw [CharP.quotient_iff, RingHom.ker_eq_comap_bot]; rfl
| [
" ↑x = 0 ↔ p ∣ x",
" (Ideal.Quotient.mk I) ↑x = 0 ↔ ↑x = 0",
" ↑x - 0 ∈ I ↔ ↑x = 0",
" ↑x ∈ I ↔ ↑x = 0",
" CharP (R ⧸ I) n ↔ ∀ (x : ℕ), ↑x ∈ I → ↑x = 0",
" ↑x = 0",
" CharP (R ⧸ I) n ↔ Ideal.comap (Nat.castRingHom R) I ≤ RingHom.ker (Nat.castRingHom R)",
" (∀ (x : ℕ), ↑x ∈ I → ↑x = 0) ↔ Ideal.comap (N... | [
" ↑x = 0 ↔ p ∣ x",
" (Ideal.Quotient.mk I) ↑x = 0 ↔ ↑x = 0",
" ↑x - 0 ∈ I ↔ ↑x = 0",
" ↑x ∈ I ↔ ↑x = 0",
" CharP (R ⧸ I) n ↔ ∀ (x : ℕ), ↑x ∈ I → ↑x = 0",
" ↑x = 0"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 154 | 161 | theorem mem_cylinder_iff_le_firstDiff {x y : ∀ n, E n} (hne : x ≠ y) (i : ℕ) :
x ∈ cylinder y i ↔ i ≤ firstDiff x y := by |
constructor
· intro h
by_contra!
exact apply_firstDiff_ne hne (h _ this)
· intro hi j hj
exact apply_eq_of_lt_firstDiff (hj.trans_le hi)
| [
" x (firstDiff x y) ≠ y (firstDiff x y)",
" x (Nat.find ⋯) ≠ y (Nat.find ⋯)",
" x n = y n",
" x n = y n ↔ ¬x n ≠ y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (↑(Finset.range n)).pi... | [
" x (firstDiff x y) ≠ y (firstDiff x y)",
" x (Nat.find ⋯) ≠ y (Nat.find ⋯)",
" x n = y n",
" x n = y n ↔ ¬x n ≠ y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (↑(Finset.range n)).pi... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.LinearAlgebra.Matrix.Block
#align_import analysis.inner_product_space.gram_schmidt_ortho from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0"
open Finset Submodule FiniteDimensional
variable (𝕜 : Type*) {E : Type*} [RCLike �... | Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean | 117 | 128 | theorem gramSchmidt_inv_triangular (v : ι → E) {i j : ι} (hij : i < j) :
⟪gramSchmidt 𝕜 v j, v i⟫ = 0 := by |
rw [gramSchmidt_def'' 𝕜 v]
simp only [inner_add_right, inner_sum, inner_smul_right]
set b : ι → E := gramSchmidt 𝕜 v
convert zero_add (0 : 𝕜)
· exact gramSchmidt_orthogonal 𝕜 v hij.ne'
apply Finset.sum_eq_zero
rintro k hki'
have hki : k < i := by simpa using hki'
have : ⟪b j, b k⟫ = 0 := gramSchm... | [
" (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n",
" gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑... | [
" (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n",
" gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))",
" f n = gramSchmidt 𝕜 f n + ∑... |
import Mathlib.Combinatorics.Quiver.Basic
import Mathlib.Combinatorics.Quiver.Path
#align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
universe v v₁ v₂ u u₁ u₂
variable {U : Type*} [Quiver.{u + 1} U]
namespace Quiver
def Hom.cast {u v u' v... | Mathlib/Combinatorics/Quiver/Cast.lean | 107 | 109 | theorem Path.cast_nil {u u' : U} (hu : u = u') : (Path.nil : Path u u).cast hu hu = Path.nil := by |
subst_vars
rfl
| [
" (u ⟶ v) = (u' ⟶ v')",
" cast hu hv e = _root_.cast ⋯ e",
" cast ⋯ ⋯ e = _root_.cast ⋯ e",
" cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e",
" cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e",
" HEq (cast hu hv e) e",
" HEq (cast ⋯ ⋯ e) e",
" cast hu hv e = e' ↔ HEq e e'",
" _root_.cast ⋯ e = e' ↔ HEq e e'",
" e' ... | [
" (u ⟶ v) = (u' ⟶ v')",
" cast hu hv e = _root_.cast ⋯ e",
" cast ⋯ ⋯ e = _root_.cast ⋯ e",
" cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e",
" cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e",
" HEq (cast hu hv e) e",
" HEq (cast ⋯ ⋯ e) e",
" cast hu hv e = e' ↔ HEq e e'",
" _root_.cast ⋯ e = e' ↔ HEq e e'",
" e' ... |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Congruence
import Mathlib.RingTheory.Ideal.Basic
import Mathlib.Tactic.FinCases
#align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69"
universe u v w
namespace Ideal
open Set
variabl... | Mathlib/RingTheory/Ideal/Quotient.lean | 129 | 130 | theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y := by |
rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton]
| [
" Setoid.r (a₁ * a₂) (b₁ * b₂)",
" a₁ * a₂ - b₁ * b₂ ∈ I",
" a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁",
" (mk (span {x})) y = 0 ↔ x ∣ y"
] | [
" Setoid.r (a₁ * a₂) (b₁ * b₂)",
" a₁ * a₂ - b₁ * b₂ ∈ I",
" a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁"
] |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
theorem te... | Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean | 91 | 93 | theorem convergents'_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.convergents' m = g.convergents' n := by |
simp only [convergents', convergents'Aux_stable_of_terminated n_le_m terminated_at_n]
| [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... | [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... |
import Mathlib.Data.Complex.Module
import Mathlib.Data.Complex.Order
import Mathlib.Data.Complex.Exponential
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.RealVectorSpace
#align_import analysis.complex.basic from "leanprover-community/mathlib... | Mathlib/Analysis/Complex/Basic.lean | 149 | 150 | theorem nndist_self_conj (z : ℂ) : nndist z (conj z) = 2 * Real.nnabs z.im := by |
rw [nndist_comm, nndist_conj_self]
| [
" ‖cexp (↑t * I)‖ = 1",
" r₁ < ‖↑x‖ ∧ ‖↑x‖ < r₂",
" ‖r • x‖ ≤ ‖r‖ * ‖x‖",
" dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)",
" dist z w = √((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))",
" dist z w = dist z.im w.im",
" edist z w = edist z.im w.im",
" dist z w = dist z.re w.re",
... | [
" ‖cexp (↑t * I)‖ = 1",
" r₁ < ‖↑x‖ ∧ ‖↑x‖ < r₂",
" ‖r • x‖ ≤ ‖r‖ * ‖x‖",
" dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)",
" dist z w = √((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))",
" dist z w = dist z.im w.im",
" edist z w = edist z.im w.im",
" dist z w = dist z.re w.re",
... |
import Mathlib.Algebra.Order.Floor
import Mathlib.Topology.Algebra.Order.Group
import Mathlib.Topology.Order.Basic
#align_import topology.algebra.order.floor from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219"
open Filter Function Int Set Topology
variable {α β γ : Type*} [LinearOrdere... | Mathlib/Topology/Algebra/Order/Floor.lean | 88 | 93 | theorem tendsto_floor_left_pure_ceil_sub_one (x : α) :
Tendsto (floor : α → ℤ) (𝓝[<] x) (pure (⌈x⌉ - 1)) :=
have h₁ : ↑(⌈x⌉ - 1) < x := by | rw [cast_sub, cast_one, sub_lt_iff_lt_add]; exact ceil_lt_add_one _
have h₂ : x ≤ ↑(⌈x⌉ - 1) + 1 := by rw [cast_sub, cast_one, sub_add_cancel]; exact le_ceil _
tendsto_pure.2 <| mem_of_superset (Ico_mem_nhdsWithin_Iio' h₁) fun _y hy =>
floor_eq_on_Ico _ _ ⟨hy.1, hy.2.trans_le h₂⟩
| [
" b ≤ ⌊↑(b + 1)⌋",
" b ≤ b + 1",
" ⌈↑(b - 1)⌉ ≤ b",
" b - 1 ≤ b",
" Tendsto floor (𝓝[≥] ↑n) (pure n)",
" Tendsto ceil (𝓝[≤] ↑n) (pure n)",
" ↑(⌈x⌉ - 1) < x",
" ↑⌈x⌉ < x + 1",
" x ≤ ↑(⌈x⌉ - 1) + 1",
" x ≤ ↑⌈x⌉"
] | [
" b ≤ ⌊↑(b + 1)⌋",
" b ≤ b + 1",
" ⌈↑(b - 1)⌉ ≤ b",
" b - 1 ≤ b",
" Tendsto floor (𝓝[≥] ↑n) (pure n)",
" Tendsto ceil (𝓝[≤] ↑n) (pure n)"
] |
import Mathlib.Algebra.MvPolynomial.Counit
import Mathlib.Algebra.MvPolynomial.Invertible
import Mathlib.RingTheory.WittVector.Defs
#align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
noncomputable section
open MvPolynomial Function
variable... | Mathlib/RingTheory/WittVector/Basic.lean | 114 | 114 | theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by | map_fun_tac
| [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0",
" mapFun (⇑f) 1 = 1",
" mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y",
" mapFun ... | [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0",
" mapFun (⇑f) 1 = 1",
" mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y",
" mapFun ... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 110 | 111 | theorem fib_add_two_sub_fib_add_one {n : ℕ} : fib (n + 2) - fib (n + 1) = fib n := by |
rw [fib_add_two, add_tsub_cancel_right]
| [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib"
] | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n"
] |
import Mathlib.Tactic.Basic
import Mathlib.Init.Data.Int.Basic
class CanLift (α β : Sort*) (coe : outParam <| β → α) (cond : outParam <| α → Prop) : Prop where
prf : ∀ x : α, cond x → ∃ y : β, coe y = x
#align can_lift CanLift
instance : CanLift ℤ ℕ (fun n : ℕ ↦ n) (0 ≤ ·) :=
⟨fun n hn ↦ ⟨n.natAbs, Int.nat... | Mathlib/Tactic/Lift.lean | 38 | 43 | theorem Subtype.exists_pi_extension {ι : Sort*} {α : ι → Sort*} [ne : ∀ i, Nonempty (α i)]
{p : ι → Prop} (f : ∀ i : Subtype p, α i) :
∃ g : ∀ i : ι, α i, (fun i : Subtype p => g i) = f := by |
haveI : DecidablePred p := fun i ↦ Classical.propDecidable (p i)
exact ⟨fun i => if hi : p i then f ⟨i, hi⟩ else Classical.choice (ne i),
funext fun i ↦ dif_pos i.2⟩
| [
" ∃ g, (fun i => g i.val) = f"
] | [] |
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"
... | Mathlib/Analysis/Convex/Gauge.lean | 114 | 116 | theorem gauge_empty : gauge (∅ : Set E) = 0 := by |
ext
simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
| [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... | [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.List.Perm
import Mathlib.Data.List.Range
#align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6"
universe u v w
variable {α : Type u} {β : Type v} {γ : Type w}
open Nat
namespace List
@[simp]
theo... | Mathlib/Data/List/Sublists.lean | 61 | 66 | theorem sublists'_eq_sublists'Aux (l : List α) :
sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by |
simp only [sublists', sublists'Aux_eq_array_foldl]
rw [← List.foldr_hom Array.toList]
· rfl
· intros _ _; congr <;> simp
| [
" ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (... | [
" ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (... |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Order.Monoid.WithTop
#align_import data.nat.with_bot from "leanprover-community/mathlib"@"966e0cf0685c9cedf8a3283ac69eef4d5f2eaca2"
namespace Nat
namespace WithBot
instance : WellFoundedRelation (WithBot ℕ) where
rel := (· < ·)
wf := IsWellFounde... | Mathlib/Data/Nat/WithBot.lean | 52 | 58 | theorem add_eq_three_iff {n m : WithBot ℕ} :
n + m = 3 ↔ n = 0 ∧ m = 3 ∨ n = 1 ∧ m = 2 ∨ n = 2 ∧ m = 1 ∨ n = 3 ∧ m = 0 := by |
rcases n, m with ⟨_ | _, _ | _⟩
repeat refine ⟨fun h => Option.noConfusion h, fun h => ?_⟩;
aesop (simp_config := { decide := true })
repeat erw [WithBot.coe_eq_coe]
exact Nat.add_eq_three_iff
| [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... | [
" n + m = 0 ↔ n = 0 ∧ m = 0",
" some val✝¹ + some val✝ = 0 ↔ some val✝¹ = 0 ∧ some val✝ = 0",
" none + none = 0 ↔ none = 0 ∧ none = 0",
" none + some val✝ = 0 ↔ none = 0 ∧ some val✝ = 0",
" some val✝ + none = 0 ↔ some val✝ = 0 ∧ none = 0",
" (fun x x_1 => x + x_1) val✝¹ val✝ = 0 ↔ some val✝¹ = 0 ∧ some va... |
import Mathlib.SetTheory.Ordinal.Arithmetic
#align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
noncomputable section
open Function Cardinal Set Equiv Order
open scoped Classical
open Cardinal Ordinal
universe u v w
namespace Ordinal
in... | Mathlib/SetTheory/Ordinal/Exponential.lean | 68 | 69 | theorem opow_le_of_limit {a b c : Ordinal} (a0 : a ≠ 0) (h : IsLimit b) :
a ^ b ≤ c ↔ ∀ b' < b, a ^ b' ≤ c := by | rw [opow_limit a0 h, bsup_le_iff]
| [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup",
" a ^ b ≤ c ↔ ∀ b' < b, a ^... | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup"
] |
import Mathlib.CategoryTheory.Sites.Coherent.Basic
import Mathlib.CategoryTheory.EffectiveEpi.Comp
import Mathlib.CategoryTheory.EffectiveEpi.Extensive
namespace CategoryTheory
open Limits GrothendieckTopology Sieve
variable (C : Type*) [Category C]
instance [Precoherent C] [HasFiniteCoproducts C] : Preregular C ... | Mathlib/CategoryTheory/Sites/Coherent/Comparison.lean | 57 | 94 | theorem extensive_regular_generate_coherent [Preregular C] [FinitaryPreExtensive C] :
((extensiveCoverage C) ⊔ (regularCoverage C)).toGrothendieck =
(coherentTopology C) := by |
ext B S
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
· induction h with
| of Y T hT =>
apply Coverage.saturate.of
simp only [Coverage.sup_covering, Set.mem_union] at hT
exact Or.elim hT
(fun ⟨α, x, X, π, ⟨h, _⟩⟩ ↦ ⟨α, x, X, π, ⟨h, inferInstance⟩⟩)
(fun ⟨Z, f, ⟨h, _⟩⟩ ↦ ⟨Unit, inferInstan... | [
" ∃ W h, ∃ (_ : EffectiveEpi h), ∃ i, i ≫ g = h ≫ f",
" Sigma.desc ι ≫ g = Sigma.desc π₂ ≫ f",
" Sigma.ι X₂ b ≫ Sigma.desc ι ≫ g = Sigma.ι X₂ b ≫ Sigma.desc π₂ ≫ f",
" ∃ β, ∃ (_ : Finite β), ∃ X₂ π₂, EffectiveEpiFamily X₂ π₂ ∧ ∃ i ι, ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f",
" ∃ X₂ π₂, EffectiveEpiFamily X₂ π₂... | [
" ∃ W h, ∃ (_ : EffectiveEpi h), ∃ i, i ≫ g = h ≫ f",
" Sigma.desc ι ≫ g = Sigma.desc π₂ ≫ f",
" Sigma.ι X₂ b ≫ Sigma.desc ι ≫ g = Sigma.ι X₂ b ≫ Sigma.desc π₂ ≫ f",
" ∃ β, ∃ (_ : Finite β), ∃ X₂ π₂, EffectiveEpiFamily X₂ π₂ ∧ ∃ i ι, ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f",
" ∃ X₂ π₂, EffectiveEpiFamily X₂ π₂... |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.symmetric from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable ... | Mathlib/Analysis/InnerProductSpace/Symmetric.lean | 163 | 180 | theorem IsSymmetric.inner_map_polarization {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (x y : E) :
⟪T x, y⟫ =
(⟪T (x + y), x + y⟫ - ⟪T (x - y), x - y⟫ - I * ⟪T (x + (I : 𝕜) • y), x + (I : 𝕜) • y⟫ +
I * ⟪T (x - (I : 𝕜) • y), x - (I : 𝕜) • y⟫) /
4 := by |
rcases@I_mul_I_ax 𝕜 _ with (h | h)
· simp_rw [h, zero_mul, sub_zero, add_zero, map_add, map_sub, inner_add_left,
inner_add_right, inner_sub_left, inner_sub_right, hT x, ← inner_conj_symm x (T y)]
suffices (re ⟪T y, x⟫ : 𝕜) = ⟪T y, x⟫ by
rw [conj_eq_iff_re.mpr this]
ring
rw [← re_add_im ... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T",
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T",
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 211 | 213 | theorem rank_matrix' (m n : Type v) [Finite m] [Finite n] :
Module.rank R (Matrix m n R) = Cardinal.lift.{u} (#m * #n) := by |
rw [rank_matrix, lift_mul, lift_umax.{v, u}]
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N ... | Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 113 | 119 | theorem Matrix.rank_vecMulVec {K m n : Type u} [CommRing K] [Fintype n]
[DecidableEq n] (w : m → K) (v : n → K) : (Matrix.vecMulVec w v).toLin'.rank ≤ 1 := by |
nontriviality K
rw [Matrix.vecMulVec_eq, Matrix.toLin'_mul]
refine le_trans (LinearMap.rank_comp_le_left _ _) ?_
refine (LinearMap.rank_le_domain _).trans_eq ?_
rw [rank_fun', Fintype.card_unit, Nat.cast_one]
| [
" (toLin' (vecMulVec w v)).rank ≤ 1",
" (toLin' (col w) ∘ₗ toLin' (row v)).rank ≤ 1",
" (toLin' (col w)).rank ≤ 1",
" Module.rank K (Unit → K) = 1"
] | [] |
import Mathlib.GroupTheory.Solvable
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import field_theory.abel_ruffini from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial Intermedi... | Mathlib/FieldTheory/AbelRuffini.lean | 98 | 114 | theorem gal_X_pow_sub_one_isSolvable (n : ℕ) : IsSolvable (X ^ n - 1 : F[X]).Gal := by |
by_cases hn : n = 0
· rw [hn, pow_zero, sub_self]
exact gal_zero_isSolvable
have hn' : 0 < n := pos_iff_ne_zero.mpr hn
have hn'' : (X ^ n - 1 : F[X]) ≠ 0 := X_pow_sub_C_ne_zero hn' 1
apply isSolvable_of_comm
intro σ τ
ext a ha
simp only [mem_rootSet_of_ne hn'', map_sub, aeval_X_pow, aeval_one, sub_... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolva... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolva... |
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Analysis.NormedSpace.Completion
#align_import analysis.complex.liouville from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Metric Set Filter Asymptotics ... | Mathlib/Analysis/Complex/Liouville.lean | 45 | 50 | theorem deriv_eq_smul_circleIntegral [CompleteSpace F] {R : ℝ} {c : ℂ} {f : ℂ → F} (hR : 0 < R)
(hf : DiffContOnCl ℂ f (ball c R)) :
deriv f c = (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) • f z := by |
lift R to ℝ≥0 using hR.le
refine (hf.hasFPowerSeriesOnBall hR).hasFPowerSeriesAt.deriv.trans ?_
simp only [cauchyPowerSeries_apply, one_div, zpow_neg, pow_one, smul_smul, zpow_two, mul_inv]
| [
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c) ^ (-2) • f z",
" deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z",
" ((cauchyPowerSeries f c (↑R) 1) fun x => 1) = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z"
] | [] |
import Mathlib.Order.Filter.Germ
import Mathlib.Topology.NhdsSet
import Mathlib.Topology.LocallyConstant.Basic
import Mathlib.Analysis.NormedSpace.Basic
variable {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
[NormedAddCommGroup G] [NormedSpace ℝ G]
open scoped Topology
open Filter Set
variable {X Y Z ... | Mathlib/Topology/Germ.lean | 112 | 115 | theorem forall_restrictGermPredicate_iff {P : ∀ x : X, Germ (𝓝 x) Y → Prop} :
(∀ x, RestrictGermPredicate P A x f) ↔ ∀ᶠ x in 𝓝ˢ A, P x f := by |
rw [eventually_nhdsSet_iff_forall]
rfl
| [
" ∀ (f f' : X → Y), f =ᶠ[𝓝 x] f' → (∀ᶠ (y : X) in 𝓝 x, P y ↑f) → ∀ᶠ (y : X) in 𝓝 x, P y ↑f'",
" ∀ᶠ (y : X) in 𝓝 x, P y ↑f'",
" ∀ (x : X), (P x ↑f ∧ ∀ᶠ (x : X) in 𝓝 x, f x = f' x) → P x ↑f'",
" P y ↑f'",
" ∀ᶠ (x : X) in 𝓝ˢ A, P x ↑g",
" ∀ x ∈ A, ∀ᶠ (y : X) in 𝓝 x, P y ↑g",
" ∀ᶠ (y : X) in 𝓝 x, P ... | [
" ∀ (f f' : X → Y), f =ᶠ[𝓝 x] f' → (∀ᶠ (y : X) in 𝓝 x, P y ↑f) → ∀ᶠ (y : X) in 𝓝 x, P y ↑f'",
" ∀ᶠ (y : X) in 𝓝 x, P y ↑f'",
" ∀ (x : X), (P x ↑f ∧ ∀ᶠ (x : X) in 𝓝 x, f x = f' x) → P x ↑f'",
" P y ↑f'",
" ∀ᶠ (x : X) in 𝓝ˢ A, P x ↑g",
" ∀ x ∈ A, ∀ᶠ (y : X) in 𝓝 x, P y ↑g",
" ∀ᶠ (y : X) in 𝓝 x, P ... |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946"
namespace Polynomial.Chebyshev
set_option linter.uppercaseLean3 false -- `T` `U` `X`
open Polynomial
v... | Mathlib/RingTheory/Polynomial/Chebyshev.lean | 159 | 160 | theorem U_sub_one (n : ℤ) : U R (n - 1) = 2 * X * U R n - U R (n + 1) := by |
linear_combination (norm := ring_nf) U_add_two R (n - 1)
| [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... | [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... |
import Mathlib.SetTheory.Cardinal.ToNat
import Mathlib.Data.Nat.PartENat
#align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
universe u v
open Function
variable {α : Type u}
namespace Cardinal
noncomputable def toPartENat : Cardinal →+o PartEN... | Mathlib/SetTheory/Cardinal/PartENat.lean | 47 | 51 | theorem toPartENat_eq_top {c : Cardinal} :
toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by |
rw [← partENatOfENat_toENat, ← PartENat.withTopEquiv_symm_top, ← toENat_eq_top,
← PartENat.withTopEquiv.symm.injective.eq_iff]
simp
| [
" toPartENat ↑n = ↑n",
" toPartENat c = ↑(toNat c)",
" toPartENat ↑c = ↑(toNat ↑c)",
" toPartENat c = ⊤ ↔ ℵ₀ ≤ c",
" ↑(toENat c) = PartENat.withTopEquiv.symm ⊤ ↔ PartENat.withTopEquiv.symm (toENat c) = PartENat.withTopEquiv.symm ⊤"
] | [
" toPartENat ↑n = ↑n",
" toPartENat c = ↑(toNat c)",
" toPartENat ↑c = ↑(toNat ↑c)"
] |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Data.Fintype.Order
import Mathlib.LinearAlgebra.Matrix.Basis
import Mathlib.Analysis.NormedSpace.WithLp
#align_import analysis.normed_space.pi_Lp from "leanprover-community/mathlib"@"9d013ad8430ddddd350cff5c3db830278ded3c79"
set_option linter.uppercaseLean3 f... | Mathlib/Analysis/NormedSpace/PiLp.lean | 276 | 278 | theorem norm_eq_ciSup (f : PiLp ∞ β) : ‖f‖ = ⨆ i, ‖f i‖ := by |
dsimp [Norm.norm]
exact if_neg ENNReal.top_ne_zero
| [
" ‖f‖ = ⨆ i, ‖f i‖",
" (if ⊤ = 0 then ↑⋯.toFinset.card else if ⊤ = ⊤ then ⨆ i, ‖f i‖ else (∑ i : ι, ‖f i‖ ^ 0) ^ (1 / 0)) = ⨆ i, ‖f i‖"
] | [] |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (α : Type u) where
| nil : Heap α
| node (a : α) (child sibling : Heap α) : Heap α
deriving Repr
def Heap.size : Heap α → Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : α) : Heap α := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 113 | 117 | theorem Heap.noSibling_tail (le) (s : Heap α) : (s.tail le).NoSibling := by |
simp only [Heap.tail]
match eq : s.tail? le with
| none => cases s with cases eq | nil => constructor
| some tl => exact Heap.noSibling_tail? eq
| [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... | [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : ... | Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 107 | 108 | theorem polar_smul [Monoid S] [DistribMulAction S R] (f : M → R) (s : S) (x y : M) :
polar (s • f) x y = s • polar f x y := by | simp only [polar, Pi.smul_apply, smul_sub]
| [
" polar (f + g) x y = polar f x y + polar g x y",
" f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)",
" polar (-f) x y = -polar f x y",
" polar (s • f) x y = s • polar f x y"
] | [
" polar (f + g) x y = polar f x y + polar g x y",
" f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)",
" polar (-f) x y = -polar f x y"
] |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Group.Measure
import Mathlib.Topology.Constructions
#align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open Function Set MeasureTheory... | Mathlib/MeasureTheory/Constructions/Pi.lean | 69 | 73 | theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
IsPiSystem (pi univ '' pi univ C) := by |
rintro _ ⟨s₁, hs₁, rfl⟩ _ ⟨s₂, hs₂, rfl⟩ hst
rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst
exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
| [
" IsPiSystem (univ.pi '' univ.pi C)",
" univ.pi s₁ ∩ univ.pi s₂ ∈ univ.pi '' univ.pi C",
" (univ.pi fun i => s₁ i ∩ s₂ i) ∈ univ.pi '' univ.pi C"
] | [] |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
import Mathlib.Topology.Order.LeftRightLim
#align_import measure_theory.measure.stieltjes from "leanprover-community/mathlib"@"20d5763051978e9bc6428578ed070445df6a18b3"
noncomputable section
open scoped Classical
open Set Filter Function ENNReal NNReal T... | Mathlib/MeasureTheory/Measure/Stieltjes.lean | 138 | 142 | theorem countable_leftLim_ne (f : StieltjesFunction) : Set.Countable { x | leftLim f x ≠ f x } := by |
refine Countable.mono ?_ f.mono.countable_not_continuousAt
intro x hx h'x
apply hx
exact tendsto_nhds_unique (f.mono.tendsto_leftLim x) (h'x.tendsto.mono_left nhdsWithin_le_nhds)
| [
" f = g",
" ∀ (x : ℝ), ↑f x = ↑g x",
" rightLim (↑f) x = ↑f x",
" ContinuousWithinAt (↑f) (Ici x) x",
" ⨅ r, ↑f ↑r = ↑f x",
" rightLim (↑f) x = ⨅ r, ↑f ↑r",
" 𝓝[>] x ≠ ⊥",
" (𝓝[>] x).NeBot",
" ⨅ r, ↑f ↑↑r = ↑f x",
" ⨅ r, ↑f ↑↑r = ⨅ r, ↑f ↑r",
" BddBelow (↑f '' Ioi x)",
" y ∈ ↑f '' Ioi x → ↑f... | [
" f = g",
" ∀ (x : ℝ), ↑f x = ↑g x",
" rightLim (↑f) x = ↑f x",
" ContinuousWithinAt (↑f) (Ici x) x",
" ⨅ r, ↑f ↑r = ↑f x",
" rightLim (↑f) x = ⨅ r, ↑f ↑r",
" 𝓝[>] x ≠ ⊥",
" (𝓝[>] x).NeBot",
" ⨅ r, ↑f ↑↑r = ↑f x",
" ⨅ r, ↑f ↑↑r = ⨅ r, ↑f ↑r",
" BddBelow (↑f '' Ioi x)",
" y ∈ ↑f '' Ioi x → ↑f... |
import Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.ldl from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
variable {𝕜 : Type*} [RCLike 𝕜]
variable {n : Type*} [LinearOrder n] [IsWellOrder n (· < ·)... | Mathlib/LinearAlgebra/Matrix/LDL.lean | 93 | 97 | theorem LDL.lowerInv_triangular {i j : n} (hij : i < j) : LDL.lowerInv hS i j = 0 := by |
rw [←
@gramSchmidt_triangular 𝕜 (n → 𝕜) _ (_ : _) (InnerProductSpace.ofMatrix hS.transpose) n _ _ _
i j hij (Pi.basisFun 𝕜 n),
Pi.basisFun_repr, LDL.lowerInv]
| [
" lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ",
" lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j",
" gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j",
" Invertible (lowerInv hS)",
" Inv... | [
" lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ",
" lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j",
" gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j",
" Invertible (lowerInv hS)",
" Inv... |
import Mathlib.Algebra.Polynomial.Coeff
import Mathlib.Data.Nat.Choose.Basic
#align_import data.nat.choose.vandermonde from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31"
open Polynomial Finset Finset.Nat
| Mathlib/Data/Nat/Choose/Vandermonde.lean | 27 | 34 | theorem Nat.add_choose_eq (m n k : ℕ) :
(m + n).choose k = ∑ ij ∈ antidiagonal k, m.choose ij.1 * n.choose ij.2 := by |
calc
(m + n).choose k = ((X + 1) ^ (m + n)).coeff k := by rw [coeff_X_add_one_pow, Nat.cast_id]
_ = ((X + 1) ^ m * (X + 1) ^ n).coeff k := by rw [pow_add]
_ = ∑ ij ∈ antidiagonal k, m.choose ij.1 * n.choose ij.2 := by
rw [coeff_mul, Finset.sum_congr rfl]
simp only [coeff_X_add_one_pow, Nat.ca... | [
" (m + n).choose k = ∑ ij ∈ antidiagonal k, m.choose ij.1 * n.choose ij.2",
" (m + n).choose k = ((X + 1) ^ (m + n)).coeff k",
" ((X + 1) ^ (m + n)).coeff k = ((X + 1) ^ m * (X + 1) ^ n).coeff k",
" ((X + 1) ^ m * (X + 1) ^ n).coeff k = ∑ ij ∈ antidiagonal k, m.choose ij.1 * n.choose ij.2",
" ∀ x ∈ antidiag... | [] |
import Mathlib.RingTheory.FinitePresentation
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Localization.Away.AdjoinRoot
import Mathlib.RingTheory.QuotientNilpotent
import Mathlib.RingTheory.TensorProduct.Basic
-- Porting note: added to make the syntax work below.
open scoped TensorProd... | Mathlib/RingTheory/Unramified/Basic.lean | 139 | 152 | theorem comp [FormallyUnramified R A] [FormallyUnramified A B] :
FormallyUnramified R B := by |
constructor
intro C _ _ I hI f₁ f₂ e
have e' :=
FormallyUnramified.lift_unique I ⟨2, hI⟩ (f₁.comp <| IsScalarTower.toAlgHom R A B)
(f₂.comp <| IsScalarTower.toAlgHom R A B) (by rw [← AlgHom.comp_assoc, e, AlgHom.comp_assoc])
letI := (f₁.comp (IsScalarTower.toAlgHom R A B)).toRingHom.toAlgebra
let F... | [
" g₁ = g₂",
" ∀ (g₁ g₂ : A →ₐ[R] B), (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂ → g₁ = g₂",
" Function.Injective (Ideal.Quotient.mkₐ R I).comp",
" ∀ [_RB : Algebra R B], Function.Injective (Ideal.Quotient.mkₐ R I).comp",
" ∀ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2... | [
" g₁ = g₂",
" ∀ (g₁ g₂ : A →ₐ[R] B), (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂ → g₁ = g₂",
" Function.Injective (Ideal.Quotient.mkₐ R I).comp",
" ∀ [_RB : Algebra R B], Function.Injective (Ideal.Quotient.mkₐ R I).comp",
" ∀ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.