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.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.SpecialFunctions.NonIntegrable
import Mathlib.Analysis.Analytic.Basic
#align_import measure_theory.integral.circle_integral from "leanprover-communit... | Mathlib/MeasureTheory/Integral/CircleIntegral.lean | 130 | 131 | theorem circleMap_not_mem_ball (c : ℂ) (R : ℝ) (θ : ℝ) : circleMap c R θ ∉ ball c R := by |
simp [dist_eq, le_abs_self]
| [
" circleMap c R (θ + 2 * π) = circleMap c R θ",
" circleMap c R θ - c = circleMap 0 R θ",
" Complex.abs (circleMap 0 R θ) = |R|",
" circleMap c R θ ∈ sphere c |R|",
" circleMap c R θ ∈ sphere c R",
" circleMap c R θ ∉ ball c R"
] | [
" circleMap c R (θ + 2 * π) = circleMap c R θ",
" circleMap c R θ - c = circleMap 0 R θ",
" Complex.abs (circleMap 0 R θ) = |R|",
" circleMap c R θ ∈ sphere c |R|",
" circleMap c R θ ∈ sphere c R"
] |
import Mathlib.Analysis.SpecialFunctions.Complex.Arg
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Complex
open Set Filter Bornology
open scop... | Mathlib/Analysis/SpecialFunctions/Complex/Log.lean | 124 | 128 | theorem log_conj_eq_ite (x : ℂ) : log (conj x) = if x.arg = π then log x else conj (log x) := by |
simp_rw [log, abs_conj, arg_conj, map_add, map_mul, conj_ofReal]
split_ifs with hx
· rw [hx]
simp_rw [ofReal_neg, conj_I, mul_neg, neg_mul]
| [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im",
" (↑x).log.re = x.log",
" (↑r * x).log = ↑r.log... | [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im",
" (↑x).log.re = x.log",
" (↑r * x).log = ↑r.log... |
import Mathlib.NumberTheory.FLT.Basic
import Mathlib.NumberTheory.PythagoreanTriples
import Mathlib.RingTheory.Coprime.Lemmas
import Mathlib.Tactic.LinearCombination
#align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
noncomputable section
open scope... | Mathlib/NumberTheory/FLT/Four.lean | 114 | 120 | theorem neg_of_minimal {a b c : ℤ} : Minimal a b c → Minimal a b (-c) := by |
rintro ⟨⟨ha, hb, heq⟩, h2⟩
constructor
· apply And.intro ha (And.intro hb _)
rw [heq]
exact (neg_sq c).symm
rwa [Int.natAbs_neg c]
| [
" Fermat42 a b c ↔ Fermat42 b a c",
" a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2",
" a ≠ 0 ∧ b ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2",
" Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)",
" a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a ≠ ... | [
" Fermat42 a b c ↔ Fermat42 b a c",
" a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2",
" a ≠ 0 ∧ b ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2",
" Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)",
" a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a ≠ ... |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.MeasureTheory.Integral.IntegralEqImproper
open MeasureTheory Measure FiniteDimensional
variable {E F G W : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F]
[NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] [NormedAddCo... | Mathlib/Analysis/Calculus/LineDeriv/IntegrationByParts.lean | 101 | 151 | theorem integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable
{f f' : E → F} {g g' : E → G} {v : E} {B : F →L[ℝ] G →L[ℝ] W}
(hf'g : Integrable (fun x ↦ B (f' x) (g x)) μ) (hfg' : Integrable (fun x ↦ B (f x) (g' x)) μ)
(hfg : Integrable (fun x ↦ B (f x) (g x)) μ)
(hf : ∀ x, HasLineDerivAt ℝ f ... |
by_cases hW : CompleteSpace W; swap
· simp [integral, hW]
rcases eq_or_ne v 0 with rfl|hv
· have Hf' x : f' x = 0 := by
simpa [(hasLineDerivAt_zero (f := f) (x := x)).lineDeriv] using (hf x).lineDeriv.symm
have Hg' x : g' x = 0 := by
simpa [(hasLineDerivAt_zero (f := g) (x := x)).lineDeriv] usi... | [
" ∫ (x : E), ∫ (t : ℝ), (B (f (x, t))) (g' (x, t)) ∂μ = ∫ (x : E), -∫ (t : ℝ), (B (f' (x, t))) (g (x, t)) ∂μ",
" (fun a => ∫ (t : ℝ), (B (f (a, t))) (g' (a, t))) =ᶠ[ae μ] fun a => -∫ (t : ℝ), (B (f' (a, t))) (g (a, t))",
" ∫ (t : ℝ), (B (f (x, t))) (g' (x, t)) = -∫ (t : ℝ), (B (f' (x, t))) (g (x, t))",
" ∀ (x... | [
" ∫ (x : E), ∫ (t : ℝ), (B (f (x, t))) (g' (x, t)) ∂μ = ∫ (x : E), -∫ (t : ℝ), (B (f' (x, t))) (g (x, t)) ∂μ",
" (fun a => ∫ (t : ℝ), (B (f (a, t))) (g' (a, t))) =ᶠ[ae μ] fun a => -∫ (t : ℝ), (B (f' (a, t))) (g (a, t))",
" ∫ (t : ℝ), (B (f (x, t))) (g' (x, t)) = -∫ (t : ℝ), (B (f' (x, t))) (g (x, t))",
" ∀ (x... |
import Mathlib.GroupTheory.CoprodI
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.GroupTheory.Complement
namespace Monoid
open CoprodI Subgroup Coprod Function List
variable {ι : Type*} {G : ι → Type*} {H : Type*} {K : Type*} [Monoid K]
def PushoutI.con [∀ i, Mo... | Mathlib/GroupTheory/PushoutI.lean | 88 | 93 | theorem of_comp_eq_base (i : ι) : (of i).comp (φ i) = (base φ) := by |
ext x
apply (Con.eq _).2
refine ConGen.Rel.of _ _ ?_
simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range]
exact ⟨_, _, rfl, rfl⟩
| [
" Mul (PushoutI φ)",
" Mul (con φ).Quotient",
" One (PushoutI φ)",
" One (con φ).Quotient",
" (of i).comp (φ i) = base φ",
" ((of i).comp (φ i)) x = (base φ) x",
" (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)",
" ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ... | [
" Mul (PushoutI φ)",
" Mul (con φ).Quotient",
" One (PushoutI φ)",
" One (con φ).Quotient"
] |
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 | 68 | 70 | theorem birkhoffAverage_congr_ring' (S : Type*) [DivisionSemiring S] [Module S M] :
birkhoffAverage (α := α) (M := M) R = birkhoffAverage S := by |
ext; apply birkhoffAverage_congr_ring
| [
" 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 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"
] |
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 | 124 | 127 | theorem verschiebung_frobenius [CharP R p] (x : 𝕎 R) : verschiebung (frobenius x) = x * p := by |
ext ⟨i⟩
· rw [mul_charP_coeff_zero, verschiebung_coeff_zero]
· rw [mul_charP_coeff_succ, verschiebung_coeff_succ, coeff_frobenius_charP]
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
import Mathlib.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 | 126 | 126 | theorem pow (n : ℕ) : mapFun f (x ^ n) = mapFun f x ^ n := 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.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce60867... | Mathlib/Probability/StrongLaw.lean | 114 | 123 | theorem truncation_eq_of_nonneg {f : α → ℝ} {A : ℝ} (h : ∀ x, 0 ≤ f x) :
truncation f A = indicator (Set.Ioc 0 A) id ∘ f := by |
ext x
rcases (h x).lt_or_eq with (hx | hx)
· simp only [truncation, indicator, hx, Set.mem_Ioc, id, Function.comp_apply, true_and_iff]
by_cases h'x : f x ≤ A
· have : -A < f x := by linarith [h x]
simp only [this, true_and_iff]
· simp only [h'x, and_false_iff]
· simp only [truncation, indicat... | [
" AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ",
" AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)",
" |truncation f A x| ≤ |A|",
" |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|",
" |f x| ≤ |A|",
" |0| ≤ |A|",
" truncation f 0 = 0",
" (fun x => 0) ∘ f = 0",
" |t... | [
" AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ",
" AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)",
" |truncation f A x| ≤ |A|",
" |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|",
" |f x| ≤ |A|",
" |0| ≤ |A|",
" truncation f 0 = 0",
" (fun x => 0) ∘ f = 0",
" |t... |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α}
namespace Finset
def nonMemberSubfamily (a : α) (𝒜 : ... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 61 | 66 | theorem mem_memberSubfamily : s ∈ 𝒜.memberSubfamily a ↔ insert a s ∈ 𝒜 ∧ a ∉ s := by |
simp_rw [memberSubfamily, mem_image, mem_filter]
refine ⟨?_, fun h => ⟨insert a s, ⟨h.1, by simp⟩, erase_insert h.2⟩⟩
rintro ⟨s, ⟨hs1, hs2⟩, rfl⟩
rw [insert_erase hs2]
exact ⟨hs1, not_mem_erase _ _⟩
| [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s",
" s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" a ∈ insert a s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s",
" insert a (s.erase a) ∈ 𝒜... | [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s"
] |
import Mathlib.Algebra.Module.Defs
import Mathlib.SetTheory.Cardinal.Basic
open Function
universe u v
namespace Cardinal
| Mathlib/Algebra/Module/Card.lean | 24 | 29 | theorem mk_le_of_module (R : Type u) (E : Type v)
[AddCommGroup E] [Ring R] [Module R E] [Nontrivial E] [NoZeroSMulDivisors R E] :
Cardinal.lift.{v} (#R) ≤ Cardinal.lift.{u} (#E) := by |
obtain ⟨x, hx⟩ : ∃ (x : E), x ≠ 0 := exists_ne 0
have : Injective (fun k ↦ k • x) := smul_left_injective R hx
exact lift_mk_le_lift_mk_of_injective this
| [
" lift.{v, u} #R ≤ lift.{u, v} #E"
] | [] |
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 | 119 | 121 | theorem mul_charP_coeff_succ [CharP R p] (x : 𝕎 R) (i : ℕ) :
(x * p).coeff (i + 1) = x.coeff i ^ p := by |
rw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ]
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
import Mathlib.Topology.Basic
#align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Filter Topology
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X}
{s t s₁ s₂ t₁ t₂ : Set X} {x : X}
theorem nhdsSet_diagonal (X) [T... | Mathlib/Topology/NhdsSet.lean | 56 | 58 | theorem disjoint_principal_nhdsSet : Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t := by |
rw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl,
subset_compl_iff_disjoint_left]
| [
" 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)",
" sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)",
" s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x",
" 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f",
" s ⊆ interior t ↔ t ∈ 𝓝ˢ s",
" Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t"
] | [
" 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)",
" sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)",
" s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x",
" 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f",
" s ⊆ interior t ↔ t ∈ 𝓝ˢ s"
] |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.Tactic.Linarith
#align_import combinatorics.simple_graph.acyclic from "leanprover-community/mathlib"@"b07688016d62f81d14508ff339ea3415558d6353"
universe u v
namespace SimpleGraph
open Walk
variable {V : Type u} (G : SimpleGraph V)
def IsAcy... | Mathlib/Combinatorics/SimpleGraph/Acyclic.lean | 68 | 80 | theorem isAcyclic_iff_forall_adj_isBridge :
G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.IsBridge s(v, w) := by |
simp_rw [isBridge_iff_adj_and_forall_cycle_not_mem]
constructor
· intro ha v w hvw
apply And.intro hvw
intro u p hp
cases ha p hp
· rintro hb v (_ | ⟨ha, p⟩) hp
· exact hp.not_of_nil
· apply (hb ha).2 _ hp
rw [Walk.edges_cons]
apply List.mem_cons_self
| [
" G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.IsBridge s(v, w)",
" G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges",
" G.IsAcyclic → ∀ ⦃v w : V⦄, G.Adj v w → G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges",
" G.Adj v w ∧ ∀ ⦃u : V... | [] |
import Mathlib.Data.ENNReal.Real
#align_import data.real.conjugate_exponents from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
noncomputable section
open scoped ENNReal
namespace Real
@[mk_iff]
structure IsConjExponent (p q : ℝ) : Prop where
one_lt : 1 < p
inv_add_inv_conj : p⁻... | Mathlib/Data/Real/ConjExponents.lean | 101 | 102 | theorem mul_eq_add : p * q = p + q := by |
simpa only [sub_mul, sub_eq_iff_eq_add, one_mul] using h.sub_one_mul_conj
| [
" q = p / (p - 1)",
" p⁻¹ - 1 = -q⁻¹",
" p * q = p + q"
] | [
" q = p / (p - 1)",
" p⁻¹ - 1 = -q⁻¹"
] |
import Mathlib.SetTheory.Ordinal.Arithmetic
import Mathlib.Tactic.TFAE
import Mathlib.Topology.Order.Monotone
#align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
noncomputable section
universe u v
open Cardinal Order Topology
namespace Ordina... | Mathlib/SetTheory/Ordinal/Topology.lean | 76 | 82 | theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by |
refine isOpen_iff_mem_nhds.trans <| forall₂_congr fun o ho => ?_
by_cases ho' : IsLimit o
· simp only [(nhdsBasis_Ioc ho'.1).mem_iff, ho', true_implies]
refine exists_congr fun a => and_congr_right fun ha => ?_
simp only [← Set.Ioo_insert_right ha, Set.insert_subset_iff, ho, true_and]
· simp [nhds_eq_p... | [
" IsOpen {a} ↔ ¬a.IsLimit",
" False",
" IsOpen {a}",
" IsOpen {0}",
" IsOpen (Set.Iio (succ ⊥))",
" IsOpen {succ b}",
" IsOpen (Set.Ioo b (succ (succ b)))",
" 𝓝[<] a = 𝓝[≠] a",
" 𝓝[≤] a = 𝓝 a",
" IsOpen s ↔ ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s",
" s ∈ 𝓝 o ↔ o.IsLimit → ∃ a < o, Set... | [
" IsOpen {a} ↔ ¬a.IsLimit",
" False",
" IsOpen {a}",
" IsOpen {0}",
" IsOpen (Set.Iio (succ ⊥))",
" IsOpen {succ b}",
" IsOpen (Set.Ioo b (succ (succ b)))",
" 𝓝[<] a = 𝓝[≠] a",
" 𝓝[≤] a = 𝓝 a"
] |
import Mathlib.Data.Real.Basic
#align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Real
noncomputable def sign (r : ℝ) : ℝ :=
if r < 0 then -1 else if 0 < r then 1 else 0
#align real.sign Real.sign
theorem sign_of_neg {r : ℝ} (hr : r < 0) : si... | Mathlib/Data/Real/Sign.lean | 119 | 123 | theorem sign_inv (r : ℝ) : sign r⁻¹ = sign r := by |
obtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)
· rw [sign_of_neg hn, sign_of_neg (inv_lt_zero.mpr hn)]
· rw [sign_zero, inv_zero, sign_zero]
· rw [sign_of_pos hp, sign_of_pos (inv_pos.mpr hp)]
| [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1",
" sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1",
" r.sign = 0 ↔ r = 0",
" r = 0",
" 0 = 0",
" (↑z).sign = ↑z.sign",
" (↑0).sign = ↑(Int.sign 0)",
" (-r).sign = -r.sign",
" (-0).sign = -sign 0",
" 0 ≤... | [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1",
" sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1",
" r.sign = 0 ↔ r = 0",
" r = 0",
" 0 = 0",
" (↑z).sign = ↑z.sign",
" (↑0).sign = ↑(Int.sign 0)",
" (-r).sign = -r.sign",
" (-0).sign = -sign 0",
" 0 ≤... |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Rat.Denumerable
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.SetTheory.Cardinal.Continuum
#align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d"
open Nat Set
open Cardinal
no... | Mathlib/Data/Real/Cardinality.lean | 168 | 197 | theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
Function.Injective (cantorFunction c) := by |
intro f g hfg
classical
by_contra h
revert hfg
have : ∃ n, f n ≠ g n := by
rw [← not_forall]
intro h'
apply h
ext
apply h'
let n := Nat.find this
have hn : ∀ k : ℕ, k < n → f k = g k := by
intro k hk
apply of_not_not
exact Nat.find_min this hk
... | [
" cantorFunctionAux c f n = c ^ n",
" cantorFunctionAux c f n = 0",
" 0 ≤ cantorFunctionAux c f n",
" 0 ≤ c ^ n",
" cantorFunctionAux c f n = cantorFunctionAux c g n",
" cantorFunctionAux c f 0 = bif f 0 then 1 else 0",
" cantorFunctionAux c f 0 = bif false then 1 else 0",
" cantorFunctionAux c f 0 = ... | [
" cantorFunctionAux c f n = c ^ n",
" cantorFunctionAux c f n = 0",
" 0 ≤ cantorFunctionAux c f n",
" 0 ≤ c ^ n",
" cantorFunctionAux c f n = cantorFunctionAux c g n",
" cantorFunctionAux c f 0 = bif f 0 then 1 else 0",
" cantorFunctionAux c f 0 = bif false then 1 else 0",
" cantorFunctionAux c f 0 = ... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Comp
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
#align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Top... | Mathlib/Analysis/Calculus/Deriv/Comp.lean | 368 | 371 | theorem HasFDerivAt.comp_hasDerivWithinAt_of_eq (hl : HasFDerivAt l l' y)
(hf : HasDerivWithinAt f f' s x) (hy : y = f x) :
HasDerivWithinAt (l ∘ f) (l' f') s x := by |
rw [hy] at hl; exact hl.comp_hasDerivWithinAt x hf
| [
" HasDerivWithinAt (l ∘ f) (l' f') s x"
] | [
" HasDerivWithinAt (l ∘ f) (l' f') s x"
] |
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 | 94 | 102 | theorem opow_pos {a : Ordinal} (b : Ordinal) (a0 : 0 < a) : 0 < a ^ b := by |
have h0 : 0 < a ^ (0 : Ordinal) := by simp only [opow_zero, zero_lt_one]
induction b using limitRecOn with
| H₁ => exact h0
| H₂ b IH =>
rw [opow_succ]
exact mul_pos IH a0
| H₃ b l _ =>
exact (lt_opow_of_limit (Ordinal.pos_iff_ne_zero.1 a0) l).2 ⟨0, l.pos, h0⟩
| [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup",
" a ^ b ≤ c ↔ ∀ b' < b, a ^... | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup",
" a ^ b ≤ c ↔ ∀ b' < b, a ^... |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.Convex.Uniform
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
#align_import analysis.inner_product_space.basic from "leanprover-community/mathlib"@"3f655f5297b030... | Mathlib/Analysis/InnerProductSpace/Basic.lean | 239 | 241 | theorem inner_smul_right (x y : F) {r : 𝕜} : ⟪x, r • y⟫ = r * ⟪x, y⟫ := by |
rw [← inner_conj_symm, inner_smul_left];
simp only [conj_conj, inner_conj_symm, RingHom.map_mul]
| [
" 0 ≤ re ⟪x, x⟫_𝕜",
" 0 ≤ ‖x‖ ^ 2",
" ‖x‖ ^ 2 = 0",
" im ⟪x, x⟫_𝕜 = 0",
" I * ((starRingEnd 𝕜) ⟪x, x⟫_𝕜 - ⟪x, x⟫_𝕜) / 2 = ↑0",
" ⟪x, y + z⟫_𝕜 = ⟪x, y⟫_𝕜 + ⟪x, z⟫_𝕜",
" (starRingEnd 𝕜) ⟪y, x⟫_𝕜 + (starRingEnd 𝕜) ⟪z, x⟫_𝕜 = ⟪x, y⟫_𝕜 + ⟪x, z⟫_𝕜",
" ↑(normSq x) = ⟪x, x⟫_𝕜",
" re ↑(normSq ... | [
" 0 ≤ re ⟪x, x⟫_𝕜",
" 0 ≤ ‖x‖ ^ 2",
" ‖x‖ ^ 2 = 0",
" im ⟪x, x⟫_𝕜 = 0",
" I * ((starRingEnd 𝕜) ⟪x, x⟫_𝕜 - ⟪x, x⟫_𝕜) / 2 = ↑0",
" ⟪x, y + z⟫_𝕜 = ⟪x, y⟫_𝕜 + ⟪x, z⟫_𝕜",
" (starRingEnd 𝕜) ⟪y, x⟫_𝕜 + (starRingEnd 𝕜) ⟪z, x⟫_𝕜 = ⟪x, y⟫_𝕜 + ⟪x, z⟫_𝕜",
" ↑(normSq x) = ⟪x, x⟫_𝕜",
" re ↑(normSq ... |
import Mathlib.CategoryTheory.Abelian.Basic
import Mathlib.CategoryTheory.Preadditive.FunctorCategory
import Mathlib.CategoryTheory.Limits.Shapes.FunctorCategory
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels
#align_import category_theory.abelian.functor_category from "leanprover-community/mathlib"@"8a... | Mathlib/CategoryTheory/Abelian/FunctorCategory.lean | 79 | 83 | theorem coimageImageComparison_app' :
(coimageImageComparison α).app X =
(coimageObjIso α X).hom ≫ coimageImageComparison (α.app X) ≫ (imageObjIso α X).inv := by |
simp only [coimageImageComparison_app, Iso.hom_inv_id_assoc, Iso.hom_inv_id, Category.assoc,
Category.comp_id]
| [
" ((evaluation C D).obj X).map (kernel.ι α) ≫ (Iso.refl (((evaluation C D).obj X).obj F)).hom =\n (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (α.app X)",
" (kernel.ι α).app X ≫ 𝟙 (F.obj X) = (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (α.app X)",
" (kernel.ι α).app X ... | [
" ((evaluation C D).obj X).map (kernel.ι α) ≫ (Iso.refl (((evaluation C D).obj X).obj F)).hom =\n (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (α.app X)",
" (kernel.ι α).app X ≫ 𝟙 (F.obj X) = (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (α.app X)",
" (kernel.ι α).app X ... |
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.OrdConnected
#align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c"
variable {α β : Type*} [LinearOrder α]
open Function
namespace Set
def projIci (a x : α) : Ici a := ⟨max a x,... | Mathlib/Order/Interval/Set/ProjIcc.lean | 132 | 134 | theorem projIcc_val (x : Icc a b) : projIcc a b h x = x := by |
cases x
apply projIcc_of_mem
| [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIic b x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIcc a b ⋯ x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIcc a b ⋯ x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIci a x = ⟨x, hx⟩",
" projIic b x = ⟨x, hx⟩",
" projIcc a b h x = ⟨x, hx⟩",
" projIci a ↑x = x... | [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIic b x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIcc a b ⋯ x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIcc a b ⋯ x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIci a x = ⟨x, hx⟩",
" projIic b x = ⟨x, hx⟩",
" projIcc a b h x = ⟨x, hx⟩",
" projIci a ↑x = x... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.NormedSpace.HomeomorphBall
#align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
noncomputable section
open RCLike Real ... | Mathlib/Analysis/InnerProductSpace/Calculus.lean | 359 | 362 | theorem contDiffOn_euclidean {n : ℕ∞} :
ContDiffOn 𝕜 n f t ↔ ∀ i, ContDiffOn 𝕜 n (fun x => f x i) t := by |
rw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffOn_iff, contDiffOn_pi]
rfl
| [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... | [
" DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y",
" DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA... |
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Order.Bounds.OrderIso
import Mathlib.Order.ConditionallyCompleteLattice.Basic
#align_import algebra.bounds from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29... | Mathlib/Algebra/Bounds.lean | 175 | 176 | theorem ciSup_div (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) / a = ⨆ i, f i / a := by |
simp only [div_eq_mul_inv, ciSup_mul hf]
| [
" (⨆ i, f i) / a = ⨆ i, f i / a"
] | [] |
import Mathlib.Data.Complex.Module
import Mathlib.LinearAlgebra.Determinant
#align_import data.complex.determinant from "leanprover-community/mathlib"@"65ec59902eb17e4ab7da8d7e3d0bd9774d1b8b99"
namespace Complex
@[simp]
theorem det_conjAe : LinearMap.det conjAe.toLinearMap = -1 := by
rw [← LinearMap.det_toMat... | Mathlib/Data/Complex/Determinant.lean | 31 | 33 | theorem linearEquiv_det_conjAe : LinearEquiv.det conjAe.toLinearEquiv = -1 := by |
rw [← Units.eq_iff, LinearEquiv.coe_det, AlgEquiv.toLinearEquiv_toLinearMap, det_conjAe,
Units.coe_neg_one]
| [
" LinearMap.det conjAe.toLinearMap = -1",
" 1 * -1 - 0 * 0 = -1",
" LinearEquiv.det conjAe.toLinearEquiv = -1"
] | [
" LinearMap.det conjAe.toLinearMap = -1",
" 1 * -1 - 0 * 0 = -1"
] |
import Mathlib.AlgebraicTopology.SimplexCategory
import Mathlib.CategoryTheory.Comma.Arrow
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Opposites
#align_import algebraic_topology.simplicial_object from "leanprover-community/mathlib"@"5ed51dc37c6b891b79314ee11a50adc2b1df6fd6"
o... | Mathlib/AlgebraicTopology/SimplicialObject.lean | 154 | 156 | theorem δ_comp_σ_self {n} {i : Fin (n + 1)} : X.σ i ≫ X.δ (Fin.castSucc i) = 𝟙 _ := by |
dsimp [δ, σ]
simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_self, op_id, X.map_id]
| [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... | [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... |
import Mathlib.Data.Setoid.Partition
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.GroupTheory.GroupAction.Pointwise
import Mathlib.GroupTheory.GroupAction.SubMulAction
open scoped BigOperators Pointwise
namespace MulAction
section SMul
variable (G : Type*) {X : Type*} [SMul G X]
-- Change termin... | Mathlib/GroupTheory/GroupAction/Blocks.lean | 102 | 103 | theorem isBlock_empty : IsBlock G (⊥ : Set X) := by |
simp [IsBlock.def, Set.bot_eq_empty, Set.smul_set_empty]
| [
" IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)",
" IsBlock G B ↔ ∀ (g g' : G), g • B ∩ g' • B ≠ ∅ → g • B = g' • B",
" IsBlock G B",
" IsBlock G ⊥"
] | [
" IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)",
" IsBlock G B ↔ ∀ (g g' : G), g • B ∩ g' • B ≠ ∅ → g • B = g' • B",
" IsBlock G B"
] |
import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Sets.Opens
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_geometry.projective_spectrum.topology from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
... | Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean | 115 | 117 | theorem vanishingIdeal_singleton (x : ProjectiveSpectrum 𝒜) :
vanishingIdeal ({x} : Set (ProjectiveSpectrum 𝒜)) = x.asHomogeneousIdeal := by |
simp [vanishingIdeal]
| [
" zeroLocus 𝒜 ↑(Ideal.span s) = zeroLocus 𝒜 s",
" x ∈ zeroLocus 𝒜 ↑(Ideal.span s) ↔ x ∈ zeroLocus 𝒜 s",
" ↑(vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}",
" f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}",
" (∀ (i : ProjectiveSpectrum 𝒜), f ∈ (⨅ (_ : i ∈ t), i.asHo... | [
" zeroLocus 𝒜 ↑(Ideal.span s) = zeroLocus 𝒜 s",
" x ∈ zeroLocus 𝒜 ↑(Ideal.span s) ↔ x ∈ zeroLocus 𝒜 s",
" ↑(vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}",
" f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}",
" (∀ (i : ProjectiveSpectrum 𝒜), f ∈ (⨅ (_ : i ∈ t), i.asHo... |
import Mathlib.Algebra.Module.DedekindDomain
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.Algebra.Module.Projective
import Mathlib.Algebra.Category.ModuleCat.Biproducts
import Mathlib.RingTheory.SimpleModule
#align_import algebra.module.pid from "leanprover-community/mathlib"@"cdc34484a07418af43daf8198b... | Mathlib/Algebra/Module/PID.lean | 75 | 84 | theorem Submodule.isInternal_prime_power_torsion_of_pid [Module.Finite R M]
(hM : Module.IsTorsion R M) :
DirectSum.IsInternal fun p : (factors (⊤ : Submodule R M).annihilator).toFinset =>
torsionBy R M
(IsPrincipal.generator (p : Ideal R) ^
(factors (⊤ : Submodule R M).annihilator).coun... |
convert isInternal_prime_power_torsion hM
ext p : 1
rw [← torsionBySet_span_singleton_eq, Ideal.submodule_span_eq, ← Ideal.span_singleton_pow,
Ideal.span_singleton_generator]
| [
" DirectSum.IsInternal fun p => torsionBy R M (IsPrincipal.generator ↑p ^ Multiset.count (↑p) (factors ⊤.annihilator))",
" torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =\n torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))",
" p ∈ torsionBy R M ... | [] |
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.RingTheory.MvPolynomial.Symmetric
#align_import ring_theory.polynomial.vieta from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
open Polynomial
namespace Multiset
open Polynomial
section Semiring
variable {R : Type*} [CommSemi... | Mathlib/RingTheory/Polynomial/Vieta.lean | 75 | 77 | theorem prod_X_add_C_coeff' {σ} (s : Multiset σ) (r : σ → R) {k : ℕ} (h : k ≤ Multiset.card s) :
(s.map fun i => X + C (r i)).prod.coeff k = (s.map r).esymm (Multiset.card s - k) := by |
erw [← map_map (fun r => X + C r) r, prod_X_add_C_coeff] <;> rw [s.card_map r]; assumption
| [
" (map (fun r => X + C r) s).prod = ∑ j ∈ Finset.range (card s + 1), C (s.esymm j) * X ^ (card s - j)",
" ∀ x ∈ range (card s + 1),\n (map ((fun p => (map (fun r => X) p.1).prod * (map (fun r => C r) p.2).prod) ∘ fun t => (s - t, t))\n (powersetCard x s)).sum =\n C (s.esymm x) * X ^ (card s - x)"... | [
" (map (fun r => X + C r) s).prod = ∑ j ∈ Finset.range (card s + 1), C (s.esymm j) * X ^ (card s - j)",
" ∀ x ∈ range (card s + 1),\n (map ((fun p => (map (fun r => X) p.1).prod * (map (fun r => C r) p.2).prod) ∘ fun t => (s - t, t))\n (powersetCard x s)).sum =\n C (s.esymm x) * X ^ (card s - x)"... |
import Mathlib.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-communit... | Mathlib/MeasureTheory/Measure/Hausdorff.lean | 309 | 315 | theorem trim_pre [MeasurableSpace X] [OpensMeasurableSpace X] (m : Set X → ℝ≥0∞)
(hcl : ∀ s, m (closure s) = m s) (r : ℝ≥0∞) : (pre m r).trim = pre m r := by |
refine le_antisymm (le_pre.2 fun s hs => ?_) (le_trim _)
rw [trim_eq_iInf]
refine iInf_le_of_le (closure s) <| iInf_le_of_le subset_closure <|
iInf_le_of_le measurableSet_closure ((pre_le ?_).trans_eq (hcl _))
rwa [diam_closure]
| [
" μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s",
" (↑l)⁻¹ ≤ (↑k)⁻¹",
" Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))",
... | [
" μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → μ s ≤ m s",
" (↑l)⁻¹ ≤ (↑k)⁻¹",
" Tendsto (fun r => (pre m r) s) (𝓝[>] 0) (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 ((mkMetric' m) s))",
" Tendsto ((fun r => (pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ i, (pre m ↑i) s))",
... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Data.List.Cycle
import Mathlib.Data.Nat.Prime
import Mathlib.Data.PNat.Basic
import Mathlib.Dynamics.FixedPoints.Basic
import Mathlib.GroupTheory.GroupAction.Group
#align_import dynamics.periodic_pts from "leanp... | Mathlib/Dynamics/PeriodicPts.lean | 595 | 596 | theorem iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
(Prod.map f g)^[n] = Prod.map (f^[n]) (g^[n]) := by | induction n <;> simp [*, Prod.map_comp_map]
| [
" (Prod.map f g)^[n] = Prod.map f^[n] g^[n]",
" (Prod.map f g)^[0] = Prod.map f^[0] g^[0]",
" (Prod.map f g)^[n✝ + 1] = Prod.map f^[n✝ + 1] g^[n✝ + 1]"
] | [] |
import Mathlib.Data.Int.Bitwise
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.Basic
#align_import data.int.lemmas from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f"
open Nat
namespace Int
theorem le_natCast_sub (m n : ℕ) : (m ... | Mathlib/Data/Int/Lemmas.lean | 55 | 57 | theorem natAbs_le_iff_sq_le {a b : ℤ} : a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2 := by |
rw [sq, sq]
exact natAbs_le_iff_mul_self_le
| [
" ↑m - ↑n ≤ ↑(m - n)",
" 0 ≤ ↑n",
" a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2",
" a.natAbs = b.natAbs ↔ a * a = b * b",
" a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2",
" a.natAbs < b.natAbs ↔ a * a < b * b",
" a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2",
" a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b"
] | [
" ↑m - ↑n ≤ ↑(m - n)",
" 0 ≤ ↑n",
" a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2",
" a.natAbs = b.natAbs ↔ a * a = b * b",
" a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2",
" a.natAbs < b.natAbs ↔ a * a < b * b"
] |
import Mathlib.CategoryTheory.Category.Basic
import Mathlib.CategoryTheory.Functor.Basic
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Tactic.NthRewrite
import Mathlib.CategoryTheory.PathCategory
import Mathlib.CategoryTheory.Quotient
import Mathlib.Combinatorics.Quiver.Symmetric
#align_import category_theory... | Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean | 93 | 117 | theorem congr_comp_reverse {X Y : Paths <| Quiver.Symmetrify V} (p : X ⟶ Y) :
Quot.mk (@Quotient.CompClosure _ _ redStep _ _) (p ≫ p.reverse) =
Quot.mk (@Quotient.CompClosure _ _ redStep _ _) (𝟙 X) := by |
apply Quot.EqvGen_sound
induction' p with a b q f ih
· apply EqvGen.refl
· simp only [Quiver.Path.reverse]
fapply EqvGen.trans
-- Porting note: `Quiver.Path.*` and `Quiver.Hom.*` notation not working
· exact q ≫ Quiver.Path.reverse q
· apply EqvGen.symm
apply EqvGen.rel
have : Quoti... | [
" Nonempty (FreeGroupoid V)",
" Quotient.CompClosure redStep p q → Quotient.CompClosure redStep (Quiver.Path.reverse p) (Quiver.Path.reverse q)",
" Quotient.CompClosure redStep (Quiver.Path.reverse (XW ≫ 𝟙 (Paths.of.obj X✝) ≫ WY))\n (Quiver.Path.reverse (XW ≫ (f.toPath ≫ (Quiver.reverse f).toPath) ≫ WY))",
... | [
" Nonempty (FreeGroupoid V)",
" Quotient.CompClosure redStep p q → Quotient.CompClosure redStep (Quiver.Path.reverse p) (Quiver.Path.reverse q)",
" Quotient.CompClosure redStep (Quiver.Path.reverse (XW ≫ 𝟙 (Paths.of.obj X✝) ≫ WY))\n (Quiver.Path.reverse (XW ≫ (f.toPath ≫ (Quiver.reverse f).toPath) ≫ WY))",
... |
import Mathlib.Algebra.MvPolynomial.Degrees
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v w
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/Variables.lean | 161 | 168 | theorem vars_C_mul (a : A) (ha : a ≠ 0) (φ : MvPolynomial σ A) :
(C a * φ : MvPolynomial σ A).vars = φ.vars := by |
ext1 i
simp only [mem_vars, exists_prop, mem_support_iff]
apply exists_congr
intro d
apply and_congr _ Iff.rfl
rw [coeff_C_mul, mul_ne_zero_iff, eq_true ha, true_and_iff]
| [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support",
" x v = 0",
" v ∈ f.vars",
" (p + q).vars ⊆ p.vars ∪ q.vars",
" x ∈ p.vars ∪ q.... | [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support",
" x v = 0",
" v ∈ f.vars",
" (p + q).vars ⊆ p.vars ∪ q.vars",
" x ∈ p.vars ∪ q.... |
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import analysis.normed_space.complemented from "leanprover-community/mathlib"@"3397560e65278e5f31acefcdea63138bd53d1cd4"
variable {𝕜 E F G : Type*} [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedS... | Mathlib/Analysis/NormedSpace/Complemented.lean | 139 | 143 | theorem ClosedComplemented.of_quotient_finiteDimensional [CompleteSpace 𝕜]
[FiniteDimensional 𝕜 (E ⧸ p)] (hp : IsClosed (p : Set E)) : p.ClosedComplemented := by |
obtain ⟨q, hq⟩ : ∃ q, IsCompl p q := p.exists_isCompl
haveI : FiniteDimensional 𝕜 q := (p.quotientEquivOfIsCompl q hq).finiteDimensional
exact .of_isCompl_isClosed hq hp q.closed_of_finiteDimensional
| [
" (↥p × ↥q) ≃L[𝕜] E",
" Continuous ⇑(prodEquivOfIsCompl p q h)",
" ClosedComplemented p"
] | [
" (↥p × ↥q) ≃L[𝕜] E",
" Continuous ⇑(prodEquivOfIsCompl p q h)"
] |
import Mathlib.Data.Real.Irrational
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Algebra.LinearRecurrence
import Mathlib.Tactic.NormNum.NatFib
import Mathlib.Tactic.NormNum.Prime
#align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712... | Mathlib/Data/Real/GoldenRatio.lean | 150 | 156 | theorem goldConj_irrational : Irrational ψ := by |
have := Nat.Prime.irrational_sqrt (show Nat.Prime 5 by norm_num)
have := this.rat_sub 1
have := this.rat_mul (show (0.5 : ℚ) ≠ 0 by norm_num)
convert this
norm_num
field_simp
| [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹",
" φ * ψ = -1",
" (1 + √5) * (1 - √5) = -(2 * 2)",
" 1 ^ 2 - √5 ^ 2 = -(2 * 2)",
" ψ * φ = -1",
" φ + ψ = 1",
" (1 + √5) / 2 + (1 - √5) / 2 = 1",
" 1 - φ = ψ",
" 1 - ψ = φ",
" φ - ψ = √5",
" φ ^ (n + 2) - φ ^ (... | [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹",
" φ * ψ = -1",
" (1 + √5) * (1 - √5) = -(2 * 2)",
" 1 ^ 2 - √5 ^ 2 = -(2 * 2)",
" ψ * φ = -1",
" φ + ψ = 1",
" (1 + √5) / 2 + (1 - √5) / 2 = 1",
" 1 - φ = ψ",
" 1 - ψ = φ",
" φ - ψ = √5",
" φ ^ (n + 2) - φ ^ (... |
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.Algebra.Star
#align_import topology.algebra.star_subalgebra from "leanprover-community/mathlib"@"b7f5a77fa29ad9a3ccc484109b0d7534178e7ecd"
open scoped Classical
open Set TopologicalSpace
open scoped Classical
... | Mathlib/Topology/Algebra/StarSubalgebra.lean | 146 | 163 | theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
{φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
(h :
φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
φ = ψ := by |
rw [DFunLike.ext'_iff]
have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
refine embedding_subtype_val.toInducing.dense_iff.2 fun x => ?_
convert show ↑x ∈ closure (S : Set A) from x.prop
rw [← Set.range_comp]
exact
Set.ext fun y =>
⟨by
rintro ⟨y, rfl⟩
... | [
" Subtype.val ⁻¹' ↑S₁ = range ⇑(inclusion h)",
" ↑S₁ = id '' {x | x ∈ S₁}",
" ↑S₁ = {x | x ∈ S₁}",
" ∀ x ∈ S₁, id x ∈ S₂",
" id x✝ ∈ S₂",
" (star s).topologicalClosure = star s.topologicalClosure",
" star s.topologicalClosure ≤ (star s).topologicalClosure",
" ∀ (t : Subalgebra R A), (star t).topologic... | [
" Subtype.val ⁻¹' ↑S₁ = range ⇑(inclusion h)",
" ↑S₁ = id '' {x | x ∈ S₁}",
" ↑S₁ = {x | x ∈ S₁}",
" ∀ x ∈ S₁, id x ∈ S₂",
" id x✝ ∈ S₂",
" (star s).topologicalClosure = star s.topologicalClosure",
" star s.topologicalClosure ≤ (star s).topologicalClosure",
" ∀ (t : Subalgebra R A), (star t).topologic... |
import Mathlib.MeasureTheory.Measure.MeasureSpace
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
#align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal MeasureTheory
open Set Function Filter
namespace Measur... | Mathlib/MeasureTheory/Measure/OpenPos.lean | 102 | 105 | theorem _root_.IsClosed.measure_eq_univ_iff_eq [OpensMeasurableSpace X] [IsFiniteMeasure μ]
(hF : IsClosed F) :
μ F = μ univ ↔ F = univ := by |
rw [← ae_eq_univ_iff_measure_eq hF.measurableSet.nullMeasurableSet, hF.ae_eq_univ_iff_eq]
| [
" μ U = 0 ↔ U = ∅",
" μ U = 0",
" U =ᶠ[ae μ] ∅ ↔ U = ∅",
" F =ᶠ[ae μ] univ ↔ F = univ",
" F =ᶠ[ae μ] univ",
" F = univ",
" μ F = μ univ ↔ F = univ"
] | [
" μ U = 0 ↔ U = ∅",
" μ U = 0",
" U =ᶠ[ae μ] ∅ ↔ U = ∅",
" F =ᶠ[ae μ] univ ↔ F = univ",
" F =ᶠ[ae μ] univ",
" F = univ"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 129 | 136 | theorem trailingDegree_mul : (p * q).trailingDegree = p.trailingDegree + q.trailingDegree := by |
by_cases hp : p = 0
· rw [hp, zero_mul, trailingDegree_zero, top_add]
by_cases hq : q = 0
· rw [hq, mul_zero, trailingDegree_zero, add_top]
· rw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq,
trailingDegree_eq_natTrailingDegree (mul_ne_zero hp hq), natTrailingDegree_mul ... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree"
] |
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 | 143 | 146 | theorem prod_univ_five [CommMonoid β] (f : Fin 5 → β) :
∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 := by |
rw [prod_univ_castSucc, prod_univ_four]
rfl
| [
" (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.Computability.NFA
#align_import computability.epsilon_NFA from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
open Set
open Computability
-- "ε_NFA"
set_option linter.uppercaseLean3 false
universe u v
structure εNFA (α : Type u) (σ : Type v) where
step : σ → Opt... | Mathlib/Computability/EpsilonNFA.lean | 87 | 88 | theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by |
simp_rw [stepSet, mem_empty_iff_false, iUnion_false, iUnion_empty]
| [
" False",
" s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t (some a))",
" M.stepSet ∅ a = ∅"
] | [
" False",
" s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t (some a))"
] |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {α : Type*} [DecidableEq α]
namespace Finset
section Group
variable [Group α] (e : α) (x : Finset... | Mathlib/Combinatorics/Additive/ETransform.lean | 150 | 153 | theorem mulETransformRight.fst_mul_snd_subset :
(mulETransformRight e x).1 * (mulETransformRight e x).2 ⊆ x.1 * x.2 := by |
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]
| [
" mulETransformLeft 1 x = x",
" mulETransformRight 1 x = x",
" (mulETransformLeft e x).1 * (mulETransformLeft e x).2 ⊆ x.1 * x.2",
" op e • x.1 * e⁻¹ • x.2 ⊆ x.1 * x.2",
" (mulETransformRight e x).1 * (mulETransformRight e x).2 ⊆ x.1 * x.2"
] | [
" mulETransformLeft 1 x = x",
" mulETransformRight 1 x = x",
" (mulETransformLeft e x).1 * (mulETransformLeft e x).2 ⊆ x.1 * x.2",
" op e • x.1 * e⁻¹ • x.2 ⊆ x.1 * x.2"
] |
import Mathlib.Data.List.Basic
namespace List
variable {α β : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some... | Mathlib/Data/List/ReduceOption.lean | 80 | 85 | theorem reduceOption_concat (l : List (Option α)) (x : Option α) :
(l.concat x).reduceOption = l.reduceOption ++ x.toList := by |
induction' l with hd tl hl generalizing x
· cases x <;> simp [Option.toList]
· simp only [concat_eq_append, reduceOption_append] at hl
cases hd <;> simp [hl, reduceOption_append]
| [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... | [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... |
import Batteries.Classes.SatisfiesM
namespace Array
| .lake/packages/batteries/Batteries/Data/Array/Monadic.lean | 18 | 30 | theorem SatisfiesM_foldlM [Monad m] [LawfulMonad m]
{as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → m β}
(hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → SatisfiesM (motive (i.1 + 1)) (f b as[i])) :
SatisfiesM (motive as.size) (as.foldlM f init) := by |
let rec go {i j b} (h₁ : j ≤ as.size) (h₂ : as.size ≤ i + j) (H : motive j b) :
SatisfiesM (motive as.size) (foldlM.loop f as as.size (Nat.le_refl _) i j b) := by
unfold foldlM.loop; split
· next hj =>
split
· cases Nat.not_le_of_gt (by simp [hj]) h₂
· exact (hf ⟨j, hj⟩ b H).bind fun _ ... | [
" SatisfiesM (motive as.size) (foldlM f init as 0)",
" SatisfiesM (motive as.size) (foldlM.loop f as as.size ⋯ i j b)",
" SatisfiesM (motive as.size)\n (if hlt : j < as.size then\n match i with\n | 0 => pure b\n | i'.succ =>\n let_fun this := ⋯;\n do\n let __do_lift ← f b ... | [] |
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Analysis.Convex.Normed
open Metric Bornology Filter Set
open scoped NNReal Topology Pointwise
noncomputable section
section Module
variable {E : Type*} [AddCommGroup E] [Module ℝ E]
def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) • x
the... | Mathlib/Analysis/Convex/GaugeRescale.lean | 58 | 61 | theorem gauge_gaugeRescale' (s : Set E) {t : Set E} {x : E} (hx : gauge t x ≠ 0) :
gauge t (gaugeRescale s t x) = gauge s x := by |
rw [gaugeRescale, gauge_smul_of_nonneg (div_nonneg (gauge_nonneg _) (gauge_nonneg _)),
smul_eq_mul, div_mul_cancel₀ _ hx]
| [
" gaugeRescale s t (c • x) = c • gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) • x = (c * (gauge s x / gauge t x)) • x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x ≠ 0",
" gauge t (gaugeRescale s t x) = gauge s x"
] | [
" gaugeRescale s t (c • x) = c • gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) • x = (c * (gauge s x / gauge t x)) • x",
" gaugeRescale s s x = x",
" gaugeRescale s s 0 = 0",
" gauge s x ≠ 0"
] |
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Order.Monotone.Basic
#align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
open Nat
namespace Nat
def choose : ℕ → ℕ → ℕ
| _, 0 => 1
| 0, _ + 1 => 0
| n + 1, k + 1 => choose n k + choose n ... | Mathlib/Data/Nat/Choose/Basic.lean | 99 | 103 | theorem choose_two_right (n : ℕ) : choose n 2 = n * (n - 1) / 2 := by |
induction' n with n ih
· simp
· rw [triangle_succ n, choose, ih]
simp [Nat.add_comm]
| [
" n.choose 0 = 1",
" choose 0 0 = 1",
" (n✝ + 1).choose 0 = 1",
" (n + 1).choose (k + 1) = 0",
" n.choose n = 1",
" (n✝ + 1).choose (n✝ + 1) = 1",
" n.choose 1 = n",
" choose 0 1 = 0",
" (n✝ + 1).choose 1 = n✝ + 1",
" (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n",
" n * (n + 1) / 2 = n * (n -... | [
" n.choose 0 = 1",
" choose 0 0 = 1",
" (n✝ + 1).choose 0 = 1",
" (n + 1).choose (k + 1) = 0",
" n.choose n = 1",
" (n✝ + 1).choose (n✝ + 1) = 1",
" n.choose 1 = n",
" choose 0 1 = 0",
" (n✝ + 1).choose 1 = n✝ + 1",
" (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n",
" n * (n + 1) / 2 = n * (n -... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Combinatorics.Additive.AP.Three.Defs
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Complex.ExponentialBounds
#align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
open N... | Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean | 150 | 152 | theorem map_succ (a : Fin (n + 1) → ℕ) :
map d a = a 0 + (∑ x : Fin n, a x.succ * d ^ (x : ℕ)) * d := by |
simp [map, Fin.sum_univ_succ, _root_.pow_succ, ← mul_assoc, ← sum_mul]
| [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... | [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Basic
import Mathlib.Data.ZMod.Basic
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import linear_algebra.clifford_algebra.grading from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0"
namespace CliffordAlgebra
variable {R M : Type*} [Co... | Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean | 91 | 122 | theorem GradedAlgebra.lift_ι_eq (i' : ZMod 2) (x' : evenOdd Q i') :
-- Porting note: added a second `by apply`
lift Q ⟨by apply GradedAlgebra.ι Q, by apply GradedAlgebra.ι_sq_scalar Q⟩ x' =
DirectSum.of (fun i => evenOdd Q i) i' x' := by |
cases' x' with x' hx'
dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
induction hx' using Submodule.iSup_induction' with
| mem i x hx =>
obtain ⟨i, rfl⟩ := i
-- Porting note: `dsimp only [Subtype.coe_mk] at hx` doesn't work, use `change` instead
change x ∈ LinearMap.range (ι Q) ^ i at hx
induc... | [
" 1 ≤ evenOdd Q 0",
" 1 ≤ LinearMap.range (ι Q) ^ ↑⟨0, ⋯⟩",
" LinearMap.range (ι Q) ≤ evenOdd Q 1",
" LinearMap.range (ι Q) ≤ LinearMap.range (ι Q) ^ ↑⟨1, ⋯⟩",
" (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) ^ ↑⟨2, ⋯⟩",
" (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) * LinearMap.range (ι Q)",
" evenOdd Q i ... | [
" 1 ≤ evenOdd Q 0",
" 1 ≤ LinearMap.range (ι Q) ^ ↑⟨0, ⋯⟩",
" LinearMap.range (ι Q) ≤ evenOdd Q 1",
" LinearMap.range (ι Q) ≤ LinearMap.range (ι Q) ^ ↑⟨1, ⋯⟩",
" (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) ^ ↑⟨2, ⋯⟩",
" (ι Q) m₁ * (ι Q) m₂ ∈ LinearMap.range (ι Q) * LinearMap.range (ι Q)",
" evenOdd Q i ... |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Topology.Order.ProjIcc
#align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Filter
open S... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean | 45 | 47 | theorem range_arcsin : range arcsin = Icc (-(π / 2)) (π / 2) := by |
rw [arcsin, range_comp Subtype.val]
simp [Icc]
| [
" range arcsin = Icc (-(π / 2)) (π / 2)",
" Subtype.val '' range (IccExtend arcsin.proof_2 ⇑sinOrderIso.symm) = Icc (-(π / 2)) (π / 2)"
] | [] |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped... | Mathlib/Topology/Separation.lean | 125 | 127 | theorem separatedNhds_iff_disjoint {s t : Set X} : SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t) := by |
simp only [(hasBasis_nhdsSet s).disjoint_iff (hasBasis_nhdsSet t), SeparatedNhds, exists_prop, ←
exists_and_left, and_assoc, and_comm, and_left_comm]
| [
" SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t)"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Integrals
#align_import data.real.pi.wallis from "leanprover-community/mathlib"@"980755c33b9168bc82f774f665eaa27878140fac"
open scoped Real Topology Nat
open Filter Finset intervalIntegral
namespace Real
namespace Wallis
set_option linter.uppercaseLean3 false
noncomp... | Mathlib/Data/Real/Pi/Wallis.lean | 101 | 114 | theorem tendsto_W_nhds_pi_div_two : Tendsto W atTop (𝓝 <| π / 2) := by |
refine tendsto_of_tendsto_of_tendsto_of_le_of_le ?_ tendsto_const_nhds le_W W_le
have : 𝓝 (π / 2) = 𝓝 ((1 - 0) * (π / 2)) := by rw [sub_zero, one_mul]
rw [this]
refine Tendsto.mul ?_ tendsto_const_nhds
have h : ∀ n : ℕ, ((2 : ℝ) * n + 1) / (2 * n + 2) = 1 - 1 / (2 * n + 2) := by
intro n
rw [sub_div... | [
" 0 < W k",
" 0 < W 0",
" 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))",
" 0 < W (k + 1)",
" 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))",
" 0 < 2 * ↑k + 2",
" 0 < 2 * ↑k + 1",
" 0 < 2 * ↑k + 3",
" W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)... | [
" 0 < W k",
" 0 < W 0",
" 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))",
" 0 < W (k + 1)",
" 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))",
" 0 < 2 * ↑k + 2",
" 0 < 2 * ↑k + 1",
" 0 < 2 * ↑k + 3",
" W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.GroupWithZero.Units.Equiv
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Order.Bounds.OrderIso
import Mathlib.Tactic.Positivity.Core
#align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477... | Mathlib/Algebra/Order/Field/Basic.lean | 61 | 73 | theorem div_le_iff (hb : 0 < b) : a / b ≤ c ↔ a ≤ c * b :=
⟨fun h =>
calc
a = a / b * b := by | rw [div_mul_cancel₀ _ (ne_of_lt hb).symm]
_ ≤ c * b := mul_le_mul_of_nonneg_right h hb.le
,
fun h =>
calc
a / b = a * (1 / b) := div_eq_mul_one_div a b
_ ≤ c * b * (1 / b) := mul_le_mul_of_nonneg_right h (one_div_pos.2 hb).le
_ = c * b / b := (div_eq_mul_one_div (c * b) b).symm
... | [
" a ≤ b / c ↔ c * a ≤ b",
" a = a / b * b",
" c * b / b = c"
] | [
" a ≤ b / c ↔ c * a ≤ b"
] |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Topology.Algebra.Star
noncomputable section
open Filter Finset Function
open scoped Topology
variable {α β γ δ : Type*}
section ProdDomain
variable [CommMonoid α] [TopologicalSpace α]
@[to_additive]
theorem hasProd_pi_single [DecidableEq β] (... | Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean | 39 | 42 | theorem tprod_pi_single [DecidableEq β] (b : β) (a : α) : ∏' b', Pi.mulSingle b a b' = a := by |
rw [tprod_eq_mulSingle b]
· simp
· intro b' hb'; simp [hb']
| [
" HasProd (Pi.mulSingle b a) a",
" Pi.mulSingle b a x✝ = if x✝ = b then a else 1",
" ∏' (b' : β), Pi.mulSingle b a b' = a",
" Pi.mulSingle b a b = a",
" ∀ (b' : β), b' ≠ b → Pi.mulSingle b a b' = 1",
" Pi.mulSingle b a b' = 1"
] | [
" HasProd (Pi.mulSingle b a) a",
" Pi.mulSingle b a x✝ = if x✝ = b then a else 1"
] |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
namespace WittVector
open MvPolynomial
variable {p : ℕ} {R S : Type*} [hp : Fact p.Prime] [Comm... | Mathlib/RingTheory/WittVector/Verschiebung.lean | 86 | 92 | theorem aeval_verschiebung_poly' (x : 𝕎 R) (n : ℕ) :
aeval x.coeff (verschiebungPoly n) = (verschiebungFun x).coeff n := by |
cases' n with n
· simp only [verschiebungPoly, Nat.zero_eq, ge_iff_le, tsub_eq_zero_of_le, ite_true, map_zero,
verschiebungFun_coeff_zero]
· rw [verschiebungPoly, verschiebungFun_coeff_succ, if_neg n.succ_ne_zero, aeval_X,
add_tsub_cancel_right]
| [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0",
" (ghostComponent 0) x.verschiebungFun = 0",
" (ghostComponent (n + 1)) x.verschiebungFun = ↑p * (ghostComponent n) x",
" ∑ i ∈ Finset.range (n + 1 + 1), ↑p ^ i * x.verschiebungFun.coeff i ^ p ^ (n + 1 - i... | [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0",
" (ghostComponent 0) x.verschiebungFun = 0",
" (ghostComponent (n + 1)) x.verschiebungFun = ↑p * (ghostComponent n) x",
" ∑ i ∈ Finset.range (n + 1 + 1), ↑p ^ i * x.verschiebungFun.coeff i ^ p ^ (n + 1 - i... |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
namespace Matrix
universe u u' v
variable {l : ... | Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean | 385 | 392 | theorem vecMul_surjective_iff_exists_left_inverse [Fintype m] [Finite n] {A : Matrix m n R} :
Function.Surjective A.vecMul ↔ ∃ B : Matrix n m R, B * A = 1 := by |
cases nonempty_fintype n
refine ⟨fun h ↦ ?_, fun ⟨B, hBA⟩ y ↦ ⟨y ᵥ* B, by simp [hBA]⟩⟩
choose rows hrows using (h <| Pi.single · 1)
refine ⟨Matrix.of rows, Matrix.ext fun i j => ?_⟩
rw [mul_apply_eq_vecMul, one_eq_pi_single, ← hrows]
rfl
| [
" (Function.Surjective fun v => v ᵥ* A) ↔ ∃ B, B * A = 1",
" (fun v => v ᵥ* A) (y ᵥ* B) = y",
" ∃ B, B * A = 1",
" (of rows * A) i j = 1 i j",
" (of rows i ᵥ* A) j = (fun v => v ᵥ* A) (rows i) j"
] | [] |
import Mathlib.Algebra.EuclideanDomain.Defs
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Algebra.Ring.Regular
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Ring.Basic
#align_import algebra.euclidean_domain.basic from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d0... | Mathlib/Algebra/EuclideanDomain/Basic.lean | 136 | 138 | theorem gcd_zero_right (a : R) : gcd a 0 = a := by |
rw [gcd]
split_ifs with h <;> simp only [h, zero_mod, gcd_zero_left]
| [
" a * b / b = a",
" a - a * b / b = 0",
" False",
" b ∣ a",
" b ∣ b * (a / b)",
" a % b = 0",
" b * c = b * (b * c / b)",
" c ∣ a % b ↔ c ∣ a",
" 0 / a = 0",
" a / a = 1",
" a = c / b",
" b = c / a",
" x * y / z = x * (y / z)",
" x * y / 0 = x * (y / 0)",
" x * (z * p) / z = x * (z * p /... | [
" a * b / b = a",
" a - a * b / b = 0",
" False",
" b ∣ a",
" b ∣ b * (a / b)",
" a % b = 0",
" b * c = b * (b * c / b)",
" c ∣ a % b ↔ c ∣ a",
" 0 / a = 0",
" a / a = 1",
" a = c / b",
" b = c / a",
" x * y / z = x * (y / z)",
" x * y / 0 = x * (y / 0)",
" x * (z * p) / z = x * (z * p /... |
import Mathlib.Analysis.InnerProductSpace.TwoDim
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic
#align_import geometry.euclidean.angle.oriented.basic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open FiniteDimensional Complex
open scoped Real Rea... | Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean | 91 | 92 | theorem right_ne_zero_of_oangle_ne_zero {x y : V} (h : o.oangle x y ≠ 0) : y ≠ 0 := by |
rintro rfl; simp at h
| [
" ContinuousAt (fun y => o.oangle y.1 y.2) x",
" (o.kahler x.1) x.2 ≠ 0",
" ContinuousAt (fun y => (o.kahler y.1) y.2) x",
" o.oangle 0 x = 0",
" o.oangle x 0 = 0",
" o.oangle x x = 0",
" ↑(↑(‖x‖ ^ 2)).arg = 0",
" (↑(‖x‖ ^ 2)).arg = 0",
" 0 ≤ ‖x‖ ^ 2",
" x ≠ 0",
" False",
" y ≠ 0"
] | [
" ContinuousAt (fun y => o.oangle y.1 y.2) x",
" (o.kahler x.1) x.2 ≠ 0",
" ContinuousAt (fun y => (o.kahler y.1) y.2) x",
" o.oangle 0 x = 0",
" o.oangle x 0 = 0",
" o.oangle x x = 0",
" ↑(↑(‖x‖ ^ 2)).arg = 0",
" (↑(‖x‖ ^ 2)).arg = 0",
" 0 ≤ ‖x‖ ^ 2",
" x ≠ 0",
" False"
] |
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 | 61 | 66 | theorem convergents'Aux_stable_of_terminated {s : Stream'.Seq <| Pair K} (n_le_m : n ≤ m)
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s m = convergents'Aux s n := by |
induction' n_le_m with m n_le_m IH
· rfl
· refine (convergents'Aux_stable_step_of_terminated ?_).trans IH
exact s.terminated_stable 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.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 78 | 82 | theorem card_interedges_add_card_interedges_compl (s : Finset α) (t : Finset β) :
(interedges r s t).card + (interedges (fun x y ↦ ¬r x y) s t).card = s.card * t.card := by |
classical
rw [← card_product, interedges, interedges, ← card_union_of_disjoint, filter_union_filter_neg_eq]
exact disjoint_filter.2 fun _ _ ↦ Classical.not_not.2
| [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2"
] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ι : Type*}
namespace Finset
section SigmaLift
variable {α β γ : ι → Type*} [DecidableEq ι]
def sigm... | Mathlib/Data/Finset/Sigma.lean | 190 | 193 | theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
(b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b := by |
rw [mem_sigmaLift]
exact fun H => h H.snd.fst
| [
" x ∈ sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨j, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.fst) (hb : ⟨j, b⟩.fst = x.fst), x.snd ∈ f (ha ▸ ⟨i, a⟩.snd) (hb ▸ ⟨j, b⟩.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.f... | [
" x ∈ sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨j, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.fst) (hb : ⟨j, b⟩.fst = x.fst), x.snd ∈ f (ha ▸ ⟨i, a⟩.snd) (hb ▸ ⟨j, b⟩.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.f... |
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
import Mathlib.RingTheory.RootsOfUnity.Minpoly
#align_import ring_theory.polynomial.cyclotomic.roots from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Polynomial
variable {R : Type*} [CommRing R] {n : ℕ}
theorem isRoot_... | Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean | 63 | 67 | theorem _root_.IsPrimitiveRoot.isRoot_cyclotomic (hpos : 0 < n) {μ : R} (h : IsPrimitiveRoot μ n) :
IsRoot (cyclotomic n R) μ := by |
rw [← mem_roots (cyclotomic_ne_zero n R), cyclotomic_eq_prod_X_sub_primitiveRoots h,
roots_prod_X_sub_C, ← Finset.mem_def]
rwa [← mem_primitiveRoots hpos] at h
| [
" ζ ^ n = 1",
" ζ ^ 0 = 1",
" 1 = 1 + eval ζ (∏ i ∈ n.divisors, cyclotomic i R)",
" eval ζ (∏ i ∈ n.divisors, cyclotomic i R) = 0",
" cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R",
" ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ",
" (cyclotomic n R).IsRoot μ",
" μ ∈ primitiveRoots n R"
... | [
" ζ ^ n = 1",
" ζ ^ 0 = 1",
" 1 = 1 + eval ζ (∏ i ∈ n.divisors, cyclotomic i R)",
" eval ζ (∏ i ∈ n.divisors, cyclotomic i R) = 0",
" cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R",
" ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ"
] |
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.LinearAlgebra.Matrix.Orthogonal
import Mathlib.Data.Matrix.Kronecker
#align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99"
namespace Matrix
variable {α β R n m : Type*}
open Function... | Mathlib/LinearAlgebra/Matrix/IsDiag.lean | 76 | 79 | theorem IsDiag.map [Zero α] [Zero β] {A : Matrix n n α} (ha : A.IsDiag) {f : α → β} (hf : f 0 = 0) :
(A.map f).IsDiag := by |
intro i j h
simp [ha h, hf]
| [
" diagonal A.diag i j = A i j",
" diagonal A.diag i i = A i i",
" (A.map f).IsDiag",
" A.map f i j = 0"
] | [
" diagonal A.diag i j = A i j",
" diagonal A.diag i i = A i i"
] |
import Mathlib.CategoryTheory.Category.Basic
import Mathlib.CategoryTheory.Functor.Basic
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Tactic.NthRewrite
import Mathlib.CategoryTheory.PathCategory
import Mathlib.CategoryTheory.Quotient
import Mathlib.Combinatorics.Quiver.Symmetric
#align_import category_theory... | Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean | 81 | 90 | theorem congr_reverse {X Y : Paths <| Quiver.Symmetrify V} (p q : X ⟶ Y) :
Quotient.CompClosure redStep p q → Quotient.CompClosure redStep p.reverse q.reverse := by |
rintro ⟨XW, pp, qq, WY, _, Z, f⟩
have : Quotient.CompClosure redStep (WY.reverse ≫ 𝟙 _ ≫ XW.reverse)
(WY.reverse ≫ (f.toPath ≫ (Quiver.reverse f).toPath) ≫ XW.reverse) := by
constructor
constructor
simpa only [CategoryStruct.comp, CategoryStruct.id, Quiver.Path.reverse, Quiver.Path.nil_comp,
Q... | [
" Nonempty (FreeGroupoid V)",
" Quotient.CompClosure redStep p q → Quotient.CompClosure redStep (Quiver.Path.reverse p) (Quiver.Path.reverse q)",
" Quotient.CompClosure redStep (Quiver.Path.reverse (XW ≫ 𝟙 (Paths.of.obj X✝) ≫ WY))\n (Quiver.Path.reverse (XW ≫ (f.toPath ≫ (Quiver.reverse f).toPath) ≫ WY))",
... | [
" Nonempty (FreeGroupoid V)"
] |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.RowCol
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.LinearAlgebra.Alternating.Basic
#align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30... | Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean | 145 | 178 | theorem det_mul (M N : Matrix n n R) : det (M * N) = det M * det N :=
calc
det (M * N) = ∑ p : n → n, ∑ σ : Perm n, ε σ * ∏ i, M (σ i) (p i) * N (p i) i := by |
simp only [det_apply', mul_apply, prod_univ_sum, mul_sum, Fintype.piFinset_univ]
rw [Finset.sum_comm]
_ =
∑ p ∈ (@univ (n → n) _).filter Bijective,
∑ σ : Perm n, ε σ * ∏ i, M (σ i) (p i) * N (p i) i :=
(Eq.symm <|
sum_subset (filter_subset _ _) fun f _ hbij =>
... | [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i",
" (diagonal d).det = ∏ i : n, d i",
" ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i",
" ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0",
" ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0",
" ∏ i : n, diagonal ... | [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i",
" (diagonal d).det = ∏ i : n, d i",
" ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i",
" ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0",
" ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0",
" ∏ i : n, diagonal ... |
import Mathlib.Data.List.Basic
namespace List
variable {α β : Type*}
#align list.length_enum_from List.enumFrom_length
#align list.length_enum List.enum_length
@[simp]
theorem get?_enumFrom :
∀ n (l : List α) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a)
| n, [], m => rfl
| n, a :: l, 0 =... | Mathlib/Data/List/Enum.lean | 124 | 129 | theorem enumFrom_append (xs ys : List α) (n : ℕ) :
enumFrom n (xs ++ ys) = enumFrom n xs ++ enumFrom (n + xs.length) ys := by |
induction' xs with x xs IH generalizing ys n
· simp
· rw [cons_append, enumFrom_cons, IH, ← cons_append, ← enumFrom_cons, length, Nat.add_right_comm,
Nat.add_assoc]
| [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... | [
" Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))",
" l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)",
" (enumFrom n l)... |
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.sections from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
assert_not_exists Ring
namespace Multiset
variable {α : Type*}
section Sections
def Sections (s : Multiset (Multiset α)) : Multiset (Multiset α) :=
Multiset.... | Mathlib/Data/Multiset/Sections.lean | 60 | 64 | theorem mem_sections {s : Multiset (Multiset α)} :
∀ {a}, a ∈ Sections s ↔ s.Rel (fun s a => a ∈ s) a := by |
induction s using Multiset.induction_on with
| empty => simp
| cons _ _ ih => simp [ih, rel_cons_left, eq_comm]
| [
" HEq (a₀.bind fun a => map (cons a) (a₁.bind fun a => map (cons a) pi))\n (a₁.bind fun a => map (cons a) (a₀.bind fun a => map (cons a) pi))",
" (↑(List.map (fun l => ↑l) (a :: l))).Sections = ↑(List.map (fun l => ↑l) (a :: l).sections)",
" (↑(↑a :: List.map (fun l => ↑l) l)).Sections =\n ↑(List.map (fun... | [
" HEq (a₀.bind fun a => map (cons a) (a₁.bind fun a => map (cons a) pi))\n (a₁.bind fun a => map (cons a) (a₀.bind fun a => map (cons a) pi))",
" (↑(List.map (fun l => ↑l) (a :: l))).Sections = ↑(List.map (fun l => ↑l) (a :: l).sections)",
" (↑(↑a :: List.map (fun l => ↑l) l)).Sections =\n ↑(List.map (fun... |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Rin... | Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 135 | 167 | theorem exists_mulVec_eq_zero_iff' {A : Type*} (K : Type*) [DecidableEq n] [CommRing A]
[Nontrivial A] [Field K] [Algebra A K] [IsFractionRing A K] {M : Matrix n n A} :
(∃ v ≠ 0, M *ᵥ v = 0) ↔ M.det = 0 := by |
have : (∃ v ≠ 0, (algebraMap A K).mapMatrix M *ᵥ v = 0) ↔ _ :=
exists_mulVec_eq_zero_iff_aux
rw [← RingHom.map_det, IsFractionRing.to_map_eq_zero_iff] at this
refine Iff.trans ?_ this; constructor <;> rintro ⟨v, hv, mul_eq⟩
· refine ⟨fun i => algebraMap _ _ (v i), mt (fun h => funext fun i => ?_) hv, ?_⟩
... | [
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) ↔ M.det = 0",
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) → M.det = 0",
" M.det = 0",
" v = 0",
" M.det = 0 → ∃ v, v ≠ 0 ∧ M *ᵥ v = 0",
" (∀ (v : n → K), v ≠ 0 → M *ᵥ v ≠ 0) → M.det ≠ 0",
" M.det ≠ 0",
" Function.Injective ⇑(toLin' M)",
" M * toMatrix' ↑(LinearEquiv.ofInjectiveEndo (toLi... | [
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) ↔ M.det = 0",
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) → M.det = 0",
" M.det = 0",
" v = 0",
" M.det = 0 → ∃ v, v ≠ 0 ∧ M *ᵥ v = 0",
" (∀ (v : n → K), v ≠ 0 → M *ᵥ v ≠ 0) → M.det ≠ 0",
" M.det ≠ 0",
" Function.Injective ⇑(toLin' M)",
" M * toMatrix' ↑(LinearEquiv.ofInjectiveEndo (toLi... |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Sum
import Mathlib.Logic.Embedding.Set
#align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
universe u v
variable {α β : Type*}
open Finset
instance (α : Type u) (β : Type v) [Fintype α] [Fintyp... | Mathlib/Data/Fintype/Sum.lean | 79 | 100 | theorem Finset.exists_equiv_extend_of_card_eq [Fintype α] [DecidableEq β] {t : Finset β}
(hαt : Fintype.card α = t.card) {s : Finset α} {f : α → β} (hfst : Finset.image f s ⊆ t)
(hfs : Set.InjOn f s) : ∃ g : α ≃ t, ∀ i ∈ s, (g i : β) = f i := by |
classical
induction' s using Finset.induction with a s has H generalizing f
· obtain ⟨e⟩ : Nonempty (α ≃ ↥t) := by rwa [← Fintype.card_eq, Fintype.card_coe]
use e
simp
have hfst' : Finset.image f s ⊆ t := (Finset.image_mono _ (s.subset_insert a)).trans hfst
have hfs' : Set.InjOn f s := hf... | [
" ∀ (x : α ⊕ β), x ∈ univ.disjSum univ",
" Sum.inl val✝ ∈ univ.disjSum univ",
" Sum.inr val✝ ∈ univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b ↑i) univ = (image b univ).erase k",
" image (fun i => b ↑i) univ ⊆ (image b univ).erase k",
" ∀ x ∈ univ, b ↑x ... | [
" ∀ (x : α ⊕ β), x ∈ univ.disjSum univ",
" Sum.inl val✝ ∈ univ.disjSum univ",
" Sum.inr val✝ ∈ univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b ↑i) univ = (image b univ).erase k",
" image (fun i => b ↑i) univ ⊆ (image b univ).erase k",
" ∀ x ∈ univ, b ↑x ... |
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.MvPolynomial.Rename
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp Ad... | Mathlib/Algebra/MvPolynomial/Degrees.lean | 95 | 98 | theorem degrees_monomial_eq (s : σ →₀ ℕ) (a : R) (ha : a ≠ 0) :
degrees (monomial s a) = toMultiset s := by |
classical
exact (supDegree_single s a).trans (if_neg ha)
| [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s"
... | [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s"
] |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 158 | 159 | theorem Left.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1 := by |
rw [← mul_lt_mul_iff_left a, mul_inv_self, mul_one]
| [
" b ≤ c",
" 1 < a⁻¹ ↔ a < 1"
] | [
" b ≤ c"
] |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp
import Mathlib.MeasureTheory.Integral.Bochner
import Mathlib.Order.Filter.IndicatorFunction
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Function.LpSeminorm.Trim
#align_import measure_theory.function.conditional... | Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean | 136 | 139 | theorem aeStronglyMeasurable'_of_aeStronglyMeasurable'_trim {α β} {m m0 m0' : MeasurableSpace α}
[TopologicalSpace β] (hm0 : m0 ≤ m0') {μ : Measure α} {f : α → β}
(hf : AEStronglyMeasurable' m f (μ.trim hm0)) : AEStronglyMeasurable' m f μ := by |
obtain ⟨g, hg_meas, hfg⟩ := hf; exact ⟨g, hg_meas, ae_eq_of_ae_eq_trim hfg⟩
| [
" AEStronglyMeasurable' m f μ"
] | [] |
import Mathlib.Topology.Homeomorph
import Mathlib.Topology.Order.LeftRightNhds
#align_import topology.algebra.order.monotone_continuity from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Set Filter
open Topology
section LinearOrder
variable {α β : Type*} [LinearOrder α] [Topolo... | Mathlib/Topology/Order/MonotoneContinuity.lean | 81 | 89 | theorem continuousWithinAt_right_of_monotoneOn_of_closure_image_mem_nhdsWithin [DenselyOrdered β]
{f : α → β} {s : Set α} {a : α} (h_mono : MonotoneOn f s) (hs : s ∈ 𝓝[≥] a)
(hfs : closure (f '' s) ∈ 𝓝[≥] f a) : ContinuousWithinAt f (Ici a) a := by |
refine continuousWithinAt_right_of_monotoneOn_of_exists_between h_mono hs fun b hb => ?_
rcases (mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset hb).1 hfs with ⟨b', ⟨hab', hbb'⟩, hb'⟩
rcases exists_between hab' with ⟨c', hc'⟩
rcases mem_closure_iff.1 (hb' ⟨hc'.1.le, hc'.2⟩) (Ioo (f a) b') isOpen_Ioo hc' with
... | [
" ContinuousWithinAt f (Ici a) a",
" ∀ᶠ (b_1 : α) in 𝓝[≥] a, b < f b_1",
" ∀ᶠ (b_1 : α) in 𝓝[≥] a, f b_1 < b",
" ∀ a_1 ∈ s, a_1 ∈ Ico a c → f a_1 < b",
" f x < b",
" ∃ c ∈ s, f c ∈ Ioo (f a) b"
] | [
" ContinuousWithinAt f (Ici a) a",
" ∀ᶠ (b_1 : α) in 𝓝[≥] a, b < f b_1",
" ∀ᶠ (b_1 : α) in 𝓝[≥] a, f b_1 < b",
" ∀ a_1 ∈ s, a_1 ∈ Ico a c → f a_1 < b",
" f x < b"
] |
import Mathlib.FieldTheory.SeparableClosure
import Mathlib.Algebra.CharP.IntermediateField
open FiniteDimensional Polynomial IntermediateField Field
noncomputable section
universe u v w
variable (F : Type u) (E : Type v) [Field F] [Field E] [Algebra F E]
variable (K : Type w) [Field K] [Algebra F K]
section IsP... | Mathlib/FieldTheory/PurelyInseparable.lean | 169 | 174 | theorem AlgEquiv.isPurelyInseparable (e : K ≃ₐ[F] E) [IsPurelyInseparable F K] :
IsPurelyInseparable F E := by |
refine ⟨⟨fun _ ↦ by rw [← isIntegral_algEquiv e.symm]; exact IsPurelyInseparable.isIntegral' F _⟩,
fun x h ↦ ?_⟩
rw [← minpoly.algEquiv_eq e.symm] at h
simpa only [RingHom.mem_range, algebraMap_eq_apply] using IsPurelyInseparable.inseparable F _ h
| [
" IsPurelyInseparable F E",
" IsIntegral F x✝",
" IsIntegral F (e.symm x✝)",
" x ∈ (algebraMap F E).range"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open scoped Classical Topology Filter
open Function Set Filter
variable {𝕜 E : Type*} [NontriviallyNormed... | Mathlib/Analysis/Calculus/Dslope.lean | 68 | 69 | theorem sub_smul_dslope (f : 𝕜 → E) (a b : 𝕜) : (b - a) • dslope f a b = f b - f a := by |
rcases eq_or_ne b a with (rfl | hne) <;> simp [dslope_of_ne, *]
| [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b"
] | [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)"
] |
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.RingTheory.MvPolynomial.Symmetric
#align_import ring_theory.polynomial.vieta from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
open Polynomial
namespace Multiset
open Polynomial
section Semiring
variable {R : Type*} [CommSemi... | Mathlib/RingTheory/Polynomial/Vieta.lean | 41 | 53 | theorem prod_X_add_C_eq_sum_esymm (s : Multiset R) :
(s.map fun r => X + C r).prod =
∑ j ∈ Finset.range (Multiset.card s + 1), (C (s.esymm j) * X ^ (Multiset.card s - j)) := by |
classical
rw [prod_map_add, antidiagonal_eq_map_powerset, map_map, ← bind_powerset_len,
map_bind, sum_bind, Finset.sum_eq_multiset_sum, Finset.range_val, map_congr (Eq.refl _)]
intro _ _
rw [esymm, ← sum_hom', ← sum_map_mul_right, map_congr (Eq.refl _)]
intro s ht
rw [mem_powersetCard] at h... | [
" (map (fun r => X + C r) s).prod = ∑ j ∈ Finset.range (card s + 1), C (s.esymm j) * X ^ (card s - j)",
" ∀ x ∈ range (card s + 1),\n (map ((fun p => (map (fun r => X) p.1).prod * (map (fun r => C r) p.2).prod) ∘ fun t => (s - t, t))\n (powersetCard x s)).sum =\n C (s.esymm x) * X ^ (card s - x)"... | [] |
import Mathlib.Data.Set.Subsingleton
import Mathlib.Order.WithBot
#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
universe u v
open Function Set
namespace Set
variable {α β γ : Type*} {ι ι' : Sort*}
section Image
variable {f : α → β} {s t : Set... | Mathlib/Data/Set/Image.lean | 266 | 266 | theorem image_comp_eq {g : β → γ} : image (g ∘ f) = image g ∘ image f := by | ext; simp
| [
" (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)",
" (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)",
" f '' s = g '' s",
" x ∈ f '' s ↔ x ∈ g '' s",
" f a = x ↔ g a = x",
" f '' s ⊆ f '' t",
" f a ∈ f '' t",
" f ∘ g '' a = f '' (g '' a)",
" image (g ∘ f) = image g ∘ image f",
" x✝ ∈ g ∘ f '' x✝¹ ↔ x✝ ∈... | [
" (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)",
" (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)",
" f '' s = g '' s",
" x ∈ f '' s ↔ x ∈ g '' s",
" f a = x ↔ g a = x",
" f '' s ⊆ f '' t",
" f a ∈ f '' t",
" f ∘ g '' a = f '' (g '' a)"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.PEquiv
#align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
namespace PEquiv
open Matrix
universe u v
variable {k l m n : Type*}
variable {α : Type v}
open Matrix
def toMatrix [DecidableEq n] [Zer... | Mathlib/Data/Matrix/PEquiv.lean | 70 | 74 | theorem toMatrix_symm [DecidableEq m] [DecidableEq n] [Zero α] [One α] (f : m ≃. n) :
(f.symm.toMatrix : Matrix n m α) = f.toMatrixᵀ := by |
ext
simp only [transpose, mem_iff_mem f, toMatrix_apply]
congr
| [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j... | [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j... |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
... | Mathlib/RingTheory/Polynomial/Quotient.lean | 94 | 107 | theorem eval₂_C_mk_eq_zero {I : Ideal R} :
∀ f ∈ (map (C : R →+* R[X]) I : Ideal R[X]), eval₂RingHom (C.comp (Quotient.mk I)) X f = 0 := by |
intro a ha
rw [← sum_monomial_eq a]
dsimp
rw [eval₂_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [eval₂_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem... | [
" ∀ a ∈ I, ((Quotient.mk (map C I)).comp C) a = 0",
" ((Quotient.mk (map C I)).comp C) a = 0",
" C a ∈ map C I",
" ∀ f ∈ map C I, (eval₂RingHom (C.comp (Quotient.mk I)) X) f = 0",
" (eval₂RingHom (C.comp (Quotient.mk I)) X) a = 0",
" (eval₂RingHom (C.comp (Quotient.mk I)) X) (a.sum fun n a => (monomial n)... | [
" ∀ a ∈ I, ((Quotient.mk (map C I)).comp C) a = 0",
" ((Quotient.mk (map C I)).comp C) a = 0",
" C a ∈ map C I"
] |
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.FinsuppVectorSpace
#align_import linear_algebra.tensor_product_basis from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081"
noncomputable section
open Set LinearMap Submodule
section CommSemiring
variable {R : T... | Mathlib/LinearAlgebra/TensorProduct/Basis.lean | 50 | 53 | theorem Basis.tensorProduct_repr_tmul_apply (b : Basis ι R M) (c : Basis κ R N) (m : M) (n : N)
(i : ι) (j : κ) :
(Basis.tensorProduct b c).repr (m ⊗ₜ n) (i, j) = b.repr m i * c.repr n j := by |
simp [Basis.tensorProduct, mul_comm]
| [
" (b.tensorProduct c) (i, j) = b i ⊗ₜ[R] c j",
" (b.tensorProduct c) i = b i.1 ⊗ₜ[R] c i.2",
" ((b.tensorProduct c).repr (m ⊗ₜ[R] n)) (i, j) = (b.repr m) i * (c.repr n) j"
] | [
" (b.tensorProduct c) (i, j) = b i ⊗ₜ[R] c j",
" (b.tensorProduct c) i = b i.1 ⊗ₜ[R] c i.2"
] |
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Topology.MetricSpace.CauSeqFilter
#align_import analysis.special_functions.exponential from "leanprover-community/mathlib"@"e1a18cad9cd462973d760af7de36b05776b8811c"
open Filter RCLike ContinuousMultili... | Mathlib/Analysis/SpecialFunctions/Exponential.lean | 227 | 228 | theorem Real.exp_eq_exp_ℝ : Real.exp = NormedSpace.exp ℝ := by |
ext x; exact mod_cast congr_fun Complex.exp_eq_exp_ℂ x
| [
" cexp = NormedSpace.exp ℂ",
" cexp x = NormedSpace.exp ℂ x",
" x.exp'.lim = (fun x => ∑' (n : ℕ), x ^ n / ↑n !) x",
" rexp = NormedSpace.exp ℝ",
" rexp x = NormedSpace.exp ℝ x"
] | [
" cexp = NormedSpace.exp ℂ",
" cexp x = NormedSpace.exp ℂ x",
" x.exp'.lim = (fun x => ∑' (n : ℕ), x ^ n / ↑n !) x"
] |
import Mathlib.Algebra.Group.Pi.Lemmas
import Mathlib.Topology.Algebra.Monoid
import Mathlib.Topology.Homeomorph
#align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2"
open Topology Filter Function
variable {α β G₀ : Type*}
section DivConst... | Mathlib/Topology/Algebra/GroupWithZero.lean | 52 | 54 | theorem Filter.Tendsto.div_const {x : G₀} (hf : Tendsto f l (𝓝 x)) (y : G₀) :
Tendsto (fun a => f a / y) l (𝓝 (x / y)) := by |
simpa only [div_eq_mul_inv] using hf.mul tendsto_const_nhds
| [
" Tendsto (fun a => f a / y) l (𝓝 (x / y))"
] | [] |
import Mathlib.MeasureTheory.Measure.FiniteMeasure
import Mathlib.MeasureTheory.Integral.Average
#align_import measure_theory.measure.probability_measure from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open MeasureTheory
open Set
open Filter
open BoundedCon... | Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean | 163 | 164 | theorem coeFn_univ_ne_zero (ν : ProbabilityMeasure Ω) : ν univ ≠ 0 := by |
simp only [coeFn_univ, Ne, one_ne_zero, not_false_iff]
| [
" ↑μ s = ↑ν s",
" ν univ ≠ 0"
] | [
" ↑μ s = ↑ν s"
] |
import Batteries.Data.Array.Lemmas
namespace ByteArray
@[ext] theorem ext : {a b : ByteArray} → a.data = b.data → a = b
| ⟨_⟩, ⟨_⟩, rfl => rfl
theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data[i] := rfl
@[simp] theorem uset_eq_set (a : ByteArray) {i : USize} (h : i.toNat < a.size... | .lake/packages/batteries/Batteries/Data/ByteArray.lean | 76 | 77 | theorem size_append (a b : ByteArray) : (a ++ b).size = a.size + b.size := by |
simp only [size, append_eq, append_data]; exact Array.size_append ..
| [
" ↑i < (a.set i v).size",
" (a ++ b).data = a.data ++ b.data",
" (a.append b).data = a.data ++ b.data",
" a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data",
" (a ++ b).size = a.size + b.size",
" (a.data ++ b.data).size = a.data.size + b.data.size"
] | [
" ↑i < (a.set i v).size",
" (a ++ b).data = a.data ++ b.data",
" (a.append b).data = a.data ++ b.data",
" a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data"
] |
import Mathlib.Algebra.Order.Pointwise
import Mathlib.Analysis.NormedSpace.SphereNormEquiv
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
open Set Function Metric MeasurableSpace intervalIntegral
open s... | Mathlib/MeasureTheory/Constructions/HaarToSphere.lean | 55 | 60 | theorem toSphere_apply' {s : Set (sphere (0 : E) 1)} (hs : MeasurableSet s) :
μ.toSphere s = dim E * μ (Ioo (0 : ℝ) 1 • ((↑) '' s)) := by |
rw [toSphere, smul_apply, fst_apply hs, restrict_apply (measurable_fst hs),
((MeasurableEmbedding.subtype_coe (measurableSet_singleton _).compl).comp
(Homeomorph.measurableEmbedding _)).comap_apply,
image_comp, Homeomorph.image_symm, univ_prod, ← Set.prod_eq, nsmul_eq_mul, toSphere_apply_aux]
| [
" μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)",
" μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)",
" μ.toSphere s = ↑(dim E) * μ (Ioo 0 1 • Subtype.val '' s)"
] | [
" μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)",
" μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)"
] |
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 | 42 | 42 | theorem gal_one_isSolvable : IsSolvable (1 : F[X]).Gal := by | infer_instance
| [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)"
] | [
" IsSolvable (Gal 0)"
] |
import Mathlib.Probability.Notation
import Mathlib.Probability.Density
import Mathlib.Probability.ConditionalProbability
import Mathlib.Probability.ProbabilityMassFunction.Constructions
open scoped Classical MeasureTheory NNReal ENNReal
-- TODO: We can't `open ProbabilityTheory` without opening the `ProbabilityThe... | Mathlib/Probability/Distributions/Uniform.lean | 77 | 78 | theorem absolutelyContinuous {X : Ω → E} {s : Set E} (hu : IsUniform X s ℙ μ) : map X ℙ ≪ μ := by |
rw [hu]; exact ProbabilityTheory.cond_absolutelyContinuous
| [
" AEMeasurable X ℙ",
" False",
" 0 = 1",
" 0 Set.univ = 1",
" Measure.map X ℙ ≪ μ",
" ProbabilityTheory.cond μ s ≪ μ"
] | [
" AEMeasurable X ℙ",
" False",
" 0 = 1",
" 0 Set.univ = 1"
] |
import Mathlib.Order.Ideal
import Mathlib.Order.PFilter
#align_import order.prime_ideal from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
open Order.PFilter
namespace Order
variable {P : Type*}
namespace Ideal
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_... | Mathlib/Order/PrimeIdeal.lean | 68 | 71 | theorem I_isProper : IsProper IF.I := by |
cases' IF.F.nonempty with w h
apply isProper_of_not_mem (_ : w ∉ IF.I)
rwa [← IF.compl_I_eq_F] at h
| [
" IF.I.IsProper",
" w ∉ IF.I"
] | [] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Data.Int.LeastGreatest
#align_import data.int.conditionally_complete_order from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
open Int
noncomputable section
open scoped Classical
instance instConditionallyComplet... | Mathlib/Data/Int/ConditionallyCompleteOrder.lean | 94 | 96 | theorem csSup_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddAbove s) : sSup s ∈ s := by |
convert (greatestOfBdd _ (Classical.choose_spec h2) h1).2.1
exact dif_pos ⟨h1, h2⟩
| [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... | [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... |
import Mathlib.RingTheory.RingHomProperties
#align_import ring_theory.ring_hom.finite from "leanprover-community/mathlib"@"b5aecf07a179c60b6b37c1ac9da952f3b565c785"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
theorem finite_stableUnderComposition : StableUnderCompositio... | Mathlib/RingTheory/RingHom/Finite.lean | 34 | 42 | theorem finite_stableUnderBaseChange : StableUnderBaseChange @Finite := by |
refine StableUnderBaseChange.mk _ finite_respectsIso ?_
classical
introv h
replace h : Module.Finite R T := by
rw [RingHom.Finite] at h; convert h; ext; simp_rw [Algebra.smul_def]; rfl
suffices Module.Finite S (S ⊗[R] T) by
rw [RingHom.Finite]; convert this; congr; ext; simp_rw [Algebra.smul_def]; rf... | [
" StableUnderComposition @Finite",
" (g.comp f).Finite",
" RespectsIso @Finite",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), e.toRingHom.Finite",
" e✝.toRingHom.Finite",
" StableUnderBaseChange @Finite",
" ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [... | [
" StableUnderComposition @Finite",
" (g.comp f).Finite",
" RespectsIso @Finite",
" ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), e.toRingHom.Finite",
" e✝.toRingHom.Finite"
] |
import Mathlib.Order.Interval.Set.Disjoint
import Mathlib.Order.SuccPred.Basic
#align_import data.set.intervals.monotone from "leanprover-community/mathlib"@"4d06b17aea8cf2e220f0b0aa46cd0231593c5c97"
open Set
section SuccOrder
open Order
variable {α β : Type*} [PartialOrder α]
| Mathlib/Order/Interval/Set/Monotone.lean | 203 | 218 | theorem StrictMonoOn.Iic_id_le [SuccOrder α] [IsSuccArchimedean α] [OrderBot α] {n : α} {φ : α → α}
(hφ : StrictMonoOn φ (Set.Iic n)) : ∀ m ≤ n, m ≤ φ m := by |
revert hφ
refine
Succ.rec_bot (fun n => StrictMonoOn φ (Set.Iic n) → ∀ m ≤ n, m ≤ φ m)
(fun _ _ hm => hm.trans bot_le) ?_ _
rintro k ih hφ m hm
by_cases hk : IsMax k
· rw [succ_eq_iff_isMax.2 hk] at hm
exact ih (hφ.mono <| Iic_subset_Iic.2 (le_succ _)) _ hm
obtain rfl | h := le_succ_iff_eq_or... | [
" ∀ m ≤ n, m ≤ φ m",
" StrictMonoOn φ (Iic n) → ∀ m ≤ n, m ≤ φ m",
" ∀ (a : α),\n (fun n => StrictMonoOn φ (Iic n) → ∀ m ≤ n, m ≤ φ m) a →\n (fun n => StrictMonoOn φ (Iic n) → ∀ m ≤ n, m ≤ φ m) (succ a)",
" m ≤ φ m",
" succ k ≤ φ (succ k)",
" k < succ k",
" k = k ∨ k < k"
] | [] |
import Mathlib.Topology.Basic
import Mathlib.Order.UpperLower.Basic
import Mathlib.Order.OmegaCompletePartialOrder
#align_import topology.omega_complete_partial_order from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
open Set OmegaCompletePartialOrder
open scoped Classical
universe ... | Mathlib/Topology/OmegaCompletePartialOrder.lean | 62 | 66 | theorem isOpen_sUnion (s : Set (Set α)) (hs : ∀ t ∈ s, IsOpen α t) : IsOpen α (⋃₀ s) := by |
simp only [IsOpen] at hs ⊢
convert CompleteLattice.sSup_continuous' (setOf ⁻¹' s) hs
simp only [sSup_apply, setOf_bijective.surjective.exists, exists_prop, mem_preimage,
SetCoe.exists, iSup_Prop_eq, mem_setOf_eq, mem_sUnion]
| [
" IsωSup c x ↔ IsLUB (range ⇑c) x",
" IsOpen α (⋃₀ s)",
" Continuous' fun x => x ∈ ⋃₀ s",
" x✝ ∈ ⋃₀ s ↔ sSup (setOf ⁻¹' s) x✝"
] | [
" IsωSup c x ↔ IsLUB (range ⇑c) x"
] |
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 | 105 | 112 | theorem angle_add_pos_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
0 < angle x (x + y) := by |
rw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_pos,
norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]
by_cases hx : x = 0; · simp [hx]
rw [div_lt_one (Real.sqrt_pos.2 (Left.add_pos_of_pos_of_nonneg (mul_self_pos.2
(norm_ne_zero_iff.2 hx)) (mul_self_nonneg _))), Real.lt_sqrt (norm_nonneg _), pow_two]
... | [
" ‖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",
" angle x (x + y) = (‖y‖ /... |
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Finset.Preimage
#align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
@[ext]
structure YoungDiagram where
cells : Finset (ℕ × ℕ)
isLowerSet : IsLowerSet (cel... | Mathlib/Combinatorics/Young/YoungDiagram.lean | 224 | 227 | theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose := by |
constructor <;>
· rintro rfl
simp
| [
" μ = ν",
" x✝¹ ∈ ↑((Equiv.prodComm ℕ ℕ).finsetCongr μ.cells) → x✝ ∈ ↑((Equiv.prodComm ℕ ℕ).finsetCongr μ.cells)",
" (Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells → (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells",
" (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells",
" (Equiv.prodComm ℕ ℕ).symm x✝ ≤ (Equiv.prodComm ℕ ℕ).symm x✝¹",
... | [
" μ = ν",
" x✝¹ ∈ ↑((Equiv.prodComm ℕ ℕ).finsetCongr μ.cells) → x✝ ∈ ↑((Equiv.prodComm ℕ ℕ).finsetCongr μ.cells)",
" (Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells → (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells",
" (Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells",
" (Equiv.prodComm ℕ ℕ).symm x✝ ≤ (Equiv.prodComm ℕ ℕ).symm x✝¹",
... |
import Mathlib.Data.ENNReal.Operations
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal
namespace ENNReal
noncomputable section Inv
variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0}
protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [... | Mathlib/Data/ENNReal/Inv.lean | 68 | 68 | theorem coe_inv_two : ((2⁻¹ : ℝ≥0) : ℝ≥0∞) = 2⁻¹ := by | rw [coe_inv _root_.two_ne_zero, coe_two]
| [
" a / b = b⁻¹ * a",
" sInf {b | 1 ≤ 0 * b} = ⊤",
" a ∈ {b | 1 ≤ ⊤ * b}",
" ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p",
" r⁻¹ ≤ b",
" 1 ≤ r * b",
" 1 ≤ ↑r * ↑r⁻¹",
" ↑2⁻¹ = 2⁻¹"
] | [
" a / b = b⁻¹ * a",
" sInf {b | 1 ≤ 0 * b} = ⊤",
" a ∈ {b | 1 ≤ ⊤ * b}",
" ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p",
" r⁻¹ ≤ b",
" 1 ≤ r * b",
" 1 ≤ ↑r * ↑r⁻¹"
] |
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Pairing
#align_import logic.equiv.nat from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Nat Function
namespace Equiv
variable {α : Type*}
@[simps]
def boolProdNatEquivNat : Bool × ℕ ≃ ℕ where
toFun := uncurry bit
invFun... | Mathlib/Logic/Equiv/Nat.lean | 48 | 49 | theorem natSumNatEquivNat_apply : ⇑natSumNatEquivNat = Sum.elim bit0 bit1 := by |
ext (x | x) <;> rfl
| [
" (uncurry bit (b, n)).boddDiv2 = (b, n)",
" uncurry bit n.boddDiv2 = n",
" ⇑natSumNatEquivNat = Sum.elim bit0 bit1",
" natSumNatEquivNat (Sum.inl x) = Sum.elim bit0 bit1 (Sum.inl x)",
" natSumNatEquivNat (Sum.inr x) = Sum.elim bit0 bit1 (Sum.inr x)"
] | [
" (uncurry bit (b, n)).boddDiv2 = (b, n)",
" uncurry bit n.boddDiv2 = n"
] |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Rat.Denumerable
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.SetTheory.Cardinal.Continuum
#align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d"
open Nat Set
open Cardinal
no... | Mathlib/Data/Real/Cardinality.lean | 113 | 117 | theorem cantorFunction_succ (f : ℕ → Bool) (h1 : 0 ≤ c) (h2 : c < 1) :
cantorFunction c f = cond (f 0) 1 0 + c * cantorFunction c fun n => f (n + 1) := by |
rw [cantorFunction, tsum_eq_zero_add (summable_cantor_function f h1 h2)]
rw [cantorFunctionAux_succ, tsum_mul_left, cantorFunctionAux, _root_.pow_zero]
rfl
| [
" cantorFunctionAux c f n = c ^ n",
" cantorFunctionAux c f n = 0",
" 0 ≤ cantorFunctionAux c f n",
" 0 ≤ c ^ n",
" cantorFunctionAux c f n = cantorFunctionAux c g n",
" cantorFunctionAux c f 0 = bif f 0 then 1 else 0",
" cantorFunctionAux c f 0 = bif false then 1 else 0",
" cantorFunctionAux c f 0 = ... | [
" cantorFunctionAux c f n = c ^ n",
" cantorFunctionAux c f n = 0",
" 0 ≤ cantorFunctionAux c f n",
" 0 ≤ c ^ n",
" cantorFunctionAux c f n = cantorFunctionAux c g n",
" cantorFunctionAux c f 0 = bif f 0 then 1 else 0",
" cantorFunctionAux c f 0 = bif false then 1 else 0",
" cantorFunctionAux c f 0 = ... |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂... | Mathlib/Data/Vector/MapLemmas.lean | 87 | 89 | theorem map₂_map_right (f₁ : α → γ → ζ) (f₂ : β → γ) :
map₂ f₁ xs (map f₂ ys) = map₂ (fun x y => f₁ x (f₂ y)) xs ys := by |
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
| [
" mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ... | [
" mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).2 ys s₁ =\n let m :=\n mapAccumr₂\n (fun x y s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 y s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs ys (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr₂ f₁ (mapAccumr f₂ nil s₂).2 nil s₁ =\n let m :=\n ... |
import Mathlib.GroupTheory.Abelianization
import Mathlib.GroupTheory.Exponent
import Mathlib.GroupTheory.Transfer
#align_import group_theory.schreier from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6"
open scoped Pointwise
namespace Subgroup
open MemRightTransversals
variable {G : T... | Mathlib/GroupTheory/Schreier.lean | 95 | 100 | theorem closure_mul_image_eq_top' [DecidableEq G] {R S : Finset G}
(hR : (R : Set G) ∈ rightTransversals (H : Set G)) (hR1 : (1 : G) ∈ R)
(hS : closure (S : Set G) = ⊤) :
closure (((R * S).image fun g => ⟨_, mul_inv_toFun_mem hR g⟩ : Finset H) : Set H) = ⊤ := by |
rw [Finset.coe_image, Finset.coe_mul]
exact closure_mul_image_eq_top hR hR1 hS
| [
" ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤",
" ↑(closure U) * R = ⊤",
" g ∈ ↑(closure U) * R",
" 1 ∈ ↑(closure U) * R",
" ∀ x ∈ closure S, ∀ y ∈ S, x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R",
" (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R",
" u * r * s = u * (r * s * (... | [
" ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤",
" ↑(closure U) * R = ⊤",
" g ∈ ↑(closure U) * R",
" 1 ∈ ↑(closure U) * R",
" ∀ x ∈ closure S, ∀ y ∈ S, x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R",
" (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R",
" u * r * s = u * (r * s * (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.