Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Data.Matroid.Dual
open Set
namespace Matroid
variable {α : Type*} {M : Matroid α} {R I J X Y : Set α}
section restrict
@[simps] def restrictIndepMatroid (M : Matroid α) (R : Set α) : IndepMatroid α where
E := R
Indep I := M.Indep I ∧ I ⊆ R
indep_empty := ⟨M.empty_indep, empty_subset _⟩
i... | Mathlib/Data/Matroid/Restrict.lean | 142 | 146 | theorem restrict_restrict_eq {R₁ R₂ : Set α} (M : Matroid α) (hR : R₂ ⊆ R₁) :
(M ↾ R₁) ↾ R₂ = M ↾ R₂ := by |
refine eq_of_indep_iff_indep_forall rfl ?_
simp only [restrict_ground_eq, restrict_indep_iff, and_congr_left_iff, and_iff_left_iff_imp]
exact fun _ h _ _ ↦ h.trans hR
| [
" ∀ ⦃I B : Set α⦄,\n (fun I => M.Indep I ∧ I ⊆ R) I →\n I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n ∃ x ∈ B \\ I, (fun I => M.Indep I ∧ I ⊆ R) (insert x I)",
" ∃ x ∈ I' \\ I, (fun ... | [
" ∀ ⦃I B : Set α⦄,\n (fun I => M.Indep I ∧ I ⊆ R) I →\n I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n ∃ x ∈ B \\ I, (fun I => M.Indep I ∧ I ⊆ R) (insert x I)",
" ∃ x ∈ I' \\ I, (fun ... |
import Mathlib.Analysis.PSeries
import Mathlib.Data.Real.Pi.Wallis
import Mathlib.Tactic.AdaptationNote
#align_import analysis.special_functions.stirling from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open scoped Topology Real Nat Asymptotics
open Finset Filter Nat Real
namespace... | Mathlib/Analysis/SpecialFunctions/Stirling.lean | 65 | 70 | theorem log_stirlingSeq_formula (n : ℕ) :
log (stirlingSeq n) = Real.log n ! - 1 / 2 * Real.log (2 * n) - n * log (n / exp 1) := by |
cases n
· simp
· rw [stirlingSeq, log_div, log_mul, sqrt_eq_rpow, log_rpow, Real.log_pow, tsub_tsub]
<;> positivity
| [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / √2",
" (stirlingSeq n).log = (↑n !).log - 1 / 2 * (2 * ↑n).log - ↑n * (↑n / rexp 1).log",
" (stirlingSeq 0).log = (↑0!).log - 1 / 2 * (2 * ↑0).log - ↑0 * (↑0 / rexp 1).log",
" (stirlingSeq (n✝ + 1)).log = (↑(n✝ + 1)!).log - 1 / 2 * (2 * ↑(n✝ + 1)).log - ↑(n✝ ... | [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / √2"
] |
import Mathlib.AlgebraicTopology.SplitSimplicialObject
import Mathlib.AlgebraicTopology.DoldKan.Degeneracies
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.split_simplicial_object from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open Categ... | Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean | 99 | 122 | theorem comp_PInfty_eq_zero_iff {Z : C} {n : ℕ} (f : Z ⟶ X _[n]) :
f ≫ PInfty.f n = 0 ↔ f ≫ s.πSummand (IndexSet.id (op [n])) = 0 := by |
constructor
· intro h
rcases n with _|n
· dsimp at h
rw [comp_id] at h
rw [h, zero_comp]
· have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
dsimp at h'
rw [comp_id, comp_add, h, zero_add] at h'
rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp... | [
" s.N B.fst.unop.len ⟶ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Δ).inj A ≫ s.πSummand A = 𝟙 (summand s.N Δ A)",
" (s.cofan Δ).inj A ≫ s.πSummand B = 0",
" ((s.cofan Δ).inj A ≫ s.desc Δ fun B_1 => if h : B_1 = B then eqToHom ⋯ ... | [
" s.N B.fst.unop.len ⟶ s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N A.fst.unop.len",
" s.N B.fst.unop.len = s.N B.fst.unop.len",
" (s.cofan Δ).inj A ≫ s.πSummand A = 𝟙 (summand s.N Δ A)",
" (s.cofan Δ).inj A ≫ s.πSummand B = 0",
" ((s.cofan Δ).inj A ≫ s.desc Δ fun B_1 => if h : B_1 = B then eqToHom ⋯ ... |
import Mathlib.Topology.Algebra.Nonarchimedean.Basic
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Algebra.Module.Submodule.Pointwise
#align_import topology.algebra.nonarchimedean.bases from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Filter Function Lattice
ope... | Mathlib/Topology/Algebra/Nonarchimedean/Bases.lean | 339 | 345 | theorem nonarchimedean (hB : SubmodulesBasis B) : @NonarchimedeanAddGroup M _ hB.topology := by |
letI := hB.topology
constructor
intro U hU
obtain ⟨-, ⟨i, rfl⟩, hi : (B i : Set M) ⊆ U⟩ :=
hB.toModuleFilterBasis.toAddGroupFilterBasis.nhds_zero_hasBasis.mem_iff.mp hU
exact ⟨hB.openAddSubgroup i, hi⟩
| [
" {U | ∃ i, U = ↑(B i)}.Nonempty",
" ∀ {x y : Set M}, x ∈ {U | ∃ i, U = ↑(B i)} → y ∈ {U | ∃ i, U = ↑(B i)} → ∃ z ∈ {U | ∃ i, U = ↑(B i)}, z ⊆ x ∩ y",
" ∃ z ∈ {U | ∃ i, U = ↑(B i)}, z ⊆ ↑(B i) ∩ ↑(B j)",
" ↑(B k) ∈ {U | ∃ i, U = ↑(B i)} ∧ ↑(B k) ⊆ ↑(B i) ∩ ↑(B j)",
" ↑(B k) ∈ {U | ∃ i, U = ↑(B i)}",
" ↑(B... | [
" {U | ∃ i, U = ↑(B i)}.Nonempty",
" ∀ {x y : Set M}, x ∈ {U | ∃ i, U = ↑(B i)} → y ∈ {U | ∃ i, U = ↑(B i)} → ∃ z ∈ {U | ∃ i, U = ↑(B i)}, z ⊆ x ∩ y",
" ∃ z ∈ {U | ∃ i, U = ↑(B i)}, z ⊆ ↑(B i) ∩ ↑(B j)",
" ↑(B k) ∈ {U | ∃ i, U = ↑(B i)} ∧ ↑(B k) ⊆ ↑(B i) ∩ ↑(B j)",
" ↑(B k) ∈ {U | ∃ i, U = ↑(B i)}",
" ↑(B... |
import Mathlib.Topology.Order.IsLUB
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {α β γ : Type*}
section ConditionallyCompleteLinearOrder
variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α]
[ConditionallyCompleteLinearOrder β] [Top... | Mathlib/Topology/Order/Monotone.lean | 92 | 96 | theorem Antitone.map_iSup_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α}
(Cf : ContinuousAt f (iSup g)) (Af : Antitone f)
(bdd : BddAbove (range g) := by | bddDefault) : f (⨆ i, g i) = ⨅ i, f (g i) := by
rw [iSup, Antitone.map_sSup_of_continuousAt' Cf Af (range_nonempty g) bdd, ← range_comp, iInf]
rfl
| [
" f (⨆ i, g i) = ⨆ i, f (g i)",
" sSup (range (f ∘ g)) = sSup (range fun i => f (g i))",
" f (⨅ i, g i) = ⨅ i, f (g i)",
" sInf (range (f ∘ g)) = sInf (range fun i => f (g i))",
" f (⨅ i, g i) = ⨆ i, f (g i)",
" f (⨆ i, g i) = ⨅ i, f (g i)"
] | [
" f (⨆ i, g i) = ⨆ i, f (g i)",
" sSup (range (f ∘ g)) = sSup (range fun i => f (g i))",
" f (⨅ i, g i) = ⨅ i, f (g i)",
" sInf (range (f ∘ g)) = sInf (range fun i => f (g i))",
" f (⨅ i, g i) = ⨆ i, f (g i)"
] |
import Mathlib.RingTheory.DedekindDomain.Ideal
import Mathlib.RingTheory.Valuation.ExtendToLocalization
import Mathlib.RingTheory.Valuation.ValuationSubring
import Mathlib.Topology.Algebra.ValuedField
import Mathlib.Algebra.Order.Group.TypeTags
#align_import ring_theory.dedekind_domain.adic_valuation from "leanprover... | Mathlib/RingTheory/DedekindDomain/AdicValuation.lean | 139 | 147 | theorem int_valuation_le_pow_iff_dvd (r : R) (n : ℕ) :
v.intValuationDef r ≤ Multiplicative.ofAdd (-(n : ℤ)) ↔ v.asIdeal ^ n ∣ Ideal.span {r} := by |
rw [intValuationDef]
split_ifs with hr
· simp_rw [hr, Ideal.dvd_span_singleton, zero_le', Submodule.zero_mem]
· rw [WithZero.coe_le_coe, ofAdd_le, neg_le_neg_iff, Int.ofNat_le, Ideal.dvd_span_singleton, ←
Associates.le_singleton_iff,
Associates.prime_pow_dvd_iff_le (Associates.mk_ne_zero'.mpr hr)
... | [
" v.intValuationDef x ≠ 0",
" ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0",
" 0 < v.intValuationDef ↑x",
" 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))",
" v.intValuationDef x ≤ 1",
" (if x = 0 then 0 else ↑(of... | [
" v.intValuationDef x ≠ 0",
" ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0",
" 0 < v.intValuationDef ↑x",
" 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))",
" v.intValuationDef x ≤ 1",
" (if x = 0 then 0 else ↑(of... |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Nat.Choose.Vandermonde
import Mathlib.Tactic.FieldSimp
#align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358... | Mathlib/Algebra/Polynomial/HasseDeriv.lean | 127 | 129 | theorem hasseDeriv_C (r : R) (hk : 0 < k) : hasseDeriv k (C r) = 0 := by |
rw [← monomial_zero_left, hasseDeriv_monomial, Nat.choose_eq_zero_of_lt hk, Nat.cast_zero,
zero_mul, monomial_zero_right]
| [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... | [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... |
import Mathlib.Data.List.Sigma
#align_import data.list.alist from "leanprover-community/mathlib"@"f808feb6c18afddb25e66a71d317643cf7fb5fbb"
universe u v w
open List
variable {α : Type u} {β : α → Type v}
structure AList (β : α → Type v) : Type max u v where
entries : List (Sigma β)
nodupKeys : entri... | Mathlib/Data/List/AList.lean | 183 | 190 | theorem keys_subset_keys_of_entries_subset_entries
{s₁ s₂ : AList β} (h : s₁.entries ⊆ s₂.entries) : s₁.keys ⊆ s₂.keys := by |
intro k hk
letI : DecidableEq α := Classical.decEq α
have := h (mem_lookup_iff.1 (Option.get_mem (lookup_isSome.2 hk)))
rw [← mem_lookup_iff, Option.mem_def] at this
rw [← mem_keys, ← lookup_isSome, this]
exact Option.isSome_some
| [
" { entries := l₁, nodupKeys := h₁ } = { entries := l₂, nodupKeys := nodupKeys✝ }",
" Decidable (xs = ys)",
" Decidable (xs.entries = ys.entries)",
" s₁.keys ⊆ s₂.keys",
" k ∈ s₂.keys",
" (some ((lookup k s₁).get ⋯)).isSome = true"
] | [
" { entries := l₁, nodupKeys := h₁ } = { entries := l₂, nodupKeys := nodupKeys✝ }",
" Decidable (xs = ys)",
" Decidable (xs.entries = ys.entries)"
] |
import Mathlib.Topology.Bornology.Basic
#align_import topology.bornology.constructions from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
open Set Filter Bornology Function
open Filter
variable {α β ι : Type*} {π : ι → Type*} [Bornology α] [Bornology β]
[∀ i, Bornology (π i)]
inst... | Mathlib/Topology/Bornology/Constructions.lean | 126 | 131 | theorem isBounded_pi : IsBounded (pi univ S) ↔ (∃ i, S i = ∅) ∨ ∀ i, IsBounded (S i) := by |
by_cases hne : ∃ i, S i = ∅
· simp [hne, univ_pi_eq_empty_iff.2 hne]
· simp only [hne, false_or_iff]
simp only [not_exists, ← Ne.eq_def, ← nonempty_iff_ne_empty, ← univ_pi_nonempty_iff] at hne
exact isBounded_pi_of_nonempty hne
| [
" IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t",
" IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t",
" IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅",
" IsBounded (s ×ˢ s) ↔ IsBounded s",
" IsBounded (∅ ×ˢ ∅) ↔ IsBounded ∅",
" IsBounded (univ.pi S) ↔ (∃ i,... | [
" IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t",
" IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t",
" IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅",
" IsBounded (s ×ˢ s) ↔ IsBounded s",
" IsBounded (∅ ×ˢ ∅) ↔ IsBounded ∅"
] |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.Data.Nat.Lattice
#align_import combinatorics.simple_graph.metric from "leanprover-community/mathlib"@"352ecfe114946c903338006dd3287cb5a9955ff2"
namespace SimpleGraph
variable {V : Type*} (G : SimpleGraph V)
noncomputable def dist (u v : V)... | Mathlib/Combinatorics/SimpleGraph/Metric.lean | 99 | 102 | theorem nonempty_of_pos_dist {u v : V} (h : 0 < G.dist u v) :
(Set.univ : Set (G.Walk u v)).Nonempty := by |
simpa [Set.range_nonempty_iff_nonempty, Set.nonempty_iff_univ_nonempty] using
Nat.nonempty_of_pos_sInf h
| [
" G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v",
" G.dist v v = 0",
" G.dist u v = 0 ↔ u = v",
" G.dist u v ≠ 0",
" False",
" G.dist u v = 0",
" Set.univ.Nonempty"
] | [
" G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v",
" G.dist v v = 0",
" G.dist u v = 0 ↔ u = v",
" G.dist u v ≠ 0",
" False",
" G.dist u v = 0"
] |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathli... | Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 163 | 176 | theorem ContinuousLinearMap.continuous_det : Continuous fun f : E →L[𝕜] E => f.det := by |
change Continuous fun f : E →L[𝕜] E => LinearMap.det (f : E →ₗ[𝕜] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : ∃ s : Finset E, Nonempty (Basis (↥s) 𝕜 E)
· rcases h with ⟨s, ⟨b⟩⟩
haveI : FiniteDimensional 𝕜 E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq... | [
" Continuous fun f => f.det",
" Continuous fun f => LinearMap.det ↑f",
" Continuous fun f => ((LinearMap.toMatrix b b) ↑f).det",
" Continuous fun f => (LinearMap.toMatrix b b) ↑f",
" Continuous fun f =>\n (if H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E) then LinearMap.detAux (Trunc.mk ⋯.some) else 1) ↑f... | [] |
import Mathlib.Algebra.BigOperators.Module
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Order.Filter.ModEq
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.List.TFAE
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.specific_lim... | Mathlib/Analysis/SpecificLimits/Normed.lean | 81 | 86 | theorem continuousAt_zpow {𝕜 : Type*} [NontriviallyNormedField 𝕜] {m : ℤ} {x : 𝕜} :
ContinuousAt (fun x ↦ x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m := by |
refine ⟨?_, continuousAt_zpow₀ _ _⟩
contrapose!; rintro ⟨rfl, hm⟩ hc
exact not_tendsto_atTop_of_tendsto_nhds (hc.tendsto.mono_left nhdsWithin_le_nhds).norm
(tendsto_norm_zpow_nhdsWithin_0_atTop hm)
| [
" Summable f",
" ∀ (i : ℕ), 0 ≤ ‖f i‖",
" Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)",
" Tendsto (fun x => ‖x ^ m‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[≠] 0) atTop",
"... | [
" Summable f",
" ∀ (i : ℕ), 0 ≤ ‖f i‖",
" Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)",
" Tendsto (fun x => ‖x ^ m‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[≠] 0) atTop",
" Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[≠] 0) atTop",
"... |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Metric
import Mathlib.Topology.Metrizable.Basic
import Mathlib.Topology.IndicatorConstPointwise
#align_import measure_theory.constructions.borel_space.metrizable from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Filter MeasureT... | Mathlib/MeasureTheory/Constructions/BorelSpace/Metrizable.lean | 31 | 47 | theorem measurable_of_tendsto_metrizable' {ι} {f : ι → α → β} {g : α → β} (u : Filter ι) [NeBot u]
[IsCountablyGenerated u] (hf : ∀ i, Measurable (f i)) (lim : Tendsto f u (𝓝 g)) :
Measurable g := by |
letI : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
apply measurable_of_isClosed'
intro s h1s h2s h3s
have : Measurable fun x => infNndist (g x) s := by
suffices Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s) from
NNReal.measurable_of_tendsto' u (fun i => (hf... | [
" Measurable g",
" ∀ (s : Set β), IsClosed s → s.Nonempty → s ≠ Set.univ → MeasurableSet (g ⁻¹' s)",
" MeasurableSet (g ⁻¹' s)",
" Measurable fun x => infNndist (g x) s",
" Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)",
" ∀ (x : α), Tendsto (fun i => infNndist (f i x) s) u (�... | [] |
import Batteries.Data.List.Lemmas
import Batteries.Tactic.Classical
import Mathlib.Tactic.TypeStar
import Mathlib.Mathport.Rename
#align_import data.list.tfae from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
namespace List
def TFAE (l : List Prop) : Prop :=
∀ x ∈ l, ∀ y ∈ l, x ↔ ... | Mathlib/Data/List/TFAE.lean | 110 | 115 | theorem exists_tfae {α : Type*} (l : List (α → Prop)) (H : ∀ a : α, (l.map (fun p ↦ p a)).TFAE) :
(l.map (fun p ↦ ∃ a, p a)).TFAE := by |
simp only [TFAE, List.forall_mem_map_iff]
intros p₁ hp₁ p₂ hp₂
exact exists_congr fun a ↦ H a (p₁ a) (mem_map_of_mem (fun p ↦ p a) hp₁)
(p₂ a) (mem_map_of_mem (fun p ↦ p a) hp₂)
| [
" [p].TFAE",
" a ∈ a :: l",
" (a ↔ b) ∧ l.TFAE → (a :: l).TFAE",
" a ↔ a",
" a ↔ q",
" p ↔ a",
" p ↔ q",
" (a :: a :: l).TFAE ↔ (a :: l).TFAE",
" (a :: b :: l).TFAE",
" [a, b].TFAE",
" (a :: b :: c :: l).TFAE",
" (a ↔ b) ∧ (b ↔ c) ∧ (c :: l).TFAE",
" (map (fun p => ∀ (a : α), p a) l).TFAE",
... | [
" [p].TFAE",
" a ∈ a :: l",
" (a ↔ b) ∧ l.TFAE → (a :: l).TFAE",
" a ↔ a",
" a ↔ q",
" p ↔ a",
" p ↔ q",
" (a :: a :: l).TFAE ↔ (a :: l).TFAE",
" (a :: b :: l).TFAE",
" [a, b].TFAE",
" (a :: b :: c :: l).TFAE",
" (a ↔ b) ∧ (b ↔ c) ∧ (c :: l).TFAE",
" (map (fun p => ∀ (a : α), p a) l).TFAE",
... |
import Mathlib.Data.SetLike.Basic
import Mathlib.Data.Finset.Preimage
import Mathlib.ModelTheory.Semantics
#align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w u₁
namespace Set
variable {M : Type w} (A : Set M) (L : FirstOrder.Lang... | Mathlib/ModelTheory/Definability.lean | 60 | 73 | theorem definable_iff_exists_formula_sum :
A.Definable L s ↔ ∃ φ : L.Formula (A ⊕ α), s = {v | φ.Realize (Sum.elim (↑) v)} := by |
rw [Definable, Equiv.exists_congr_left (BoundedFormula.constantsVarsEquiv)]
refine exists_congr (fun φ => iff_iff_eq.2 (congr_arg (s = ·) ?_))
ext
simp only [Formula.Realize, BoundedFormula.constantsVarsEquiv, constantsOn, mk₂_Relations,
BoundedFormula.mapTermRelEquiv_symm_apply, mem_setOf_eq]
refine Bou... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize"
] |
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.ZMod
#align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
noncomputable section
open scoped Classical
open Nat LocalRing Padic
namespace PadicInt
variable {p : ℕ} [h... | Mathlib/NumberTheory/Padics/RingHoms.lean | 72 | 75 | theorem modPart_lt_p : modPart p r < p := by |
convert Int.emod_lt _ _
· simp
· exact mod_cast hp_prime.1.ne_zero
| [
" modPart p r < ↑p",
" ↑p = |↑p|",
" ↑p ≠ 0"
] | [] |
import Mathlib.NumberTheory.Liouville.Basic
import Mathlib.Topology.Baire.Lemmas
import Mathlib.Topology.Baire.LocallyCompactRegular
import Mathlib.Topology.Instances.Irrational
#align_import number_theory.liouville.residual from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
open scope... | Mathlib/NumberTheory/Liouville/Residual.lean | 59 | 72 | theorem eventually_residual_liouville : ∀ᶠ x in residual ℝ, Liouville x := by |
rw [Filter.Eventually, setOf_liouville_eq_irrational_inter_iInter_iUnion]
refine eventually_residual_irrational.and ?_
refine residual_of_dense_Gδ ?_ (Rat.denseEmbedding_coe_real.dense.mono ?_)
· exact .iInter fun n => IsOpen.isGδ <|
isOpen_iUnion fun a => isOpen_iUnion fun b => isOpen_iUnion fun _hb... | [
" {x | Liouville x} = ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" x ∈ {x | Liouville x} ↔ x ∈ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" IsGδ {x | Liouville x}",
" IsGδ (⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})",
"... | [
" {x | Liouville x} = ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" x ∈ {x | Liouville x} ↔ x ∈ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" IsGδ {x | Liouville x}",
" IsGδ (⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})",
"... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.LinearAlgebra.Matrix.ZPow
#align_import linear_algebra.matrix.hermitian from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c"
namespace Matrix
variable {α β : Type*} {m n : Type*} {A : Matrix n n α}
open scoped Matrix
local ... | Mathlib/LinearAlgebra/Matrix/Hermitian.lean | 56 | 57 | theorem IsHermitian.ext {A : Matrix n n α} : (∀ i j, star (A j i) = A i j) → A.IsHermitian := by |
intro h; ext i j; exact h i j
| [
" (∀ (i j : n), star (A j i) = A i j) → A.IsHermitian",
" A.IsHermitian",
" Aᴴ i j = A i j"
] | [] |
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd"
namespace Polynomial
open Polynomial Finsupp Finset
open... | Mathlib/Algebra/Polynomial/Reverse.lean | 133 | 135 | theorem reflect_add (f g : R[X]) (N : ℕ) : reflect N (f + g) = reflect N f + reflect N g := by |
ext
simp only [coeff_add, coeff_reflect]
| [
" revAtFun N (revAtFun N i) = i",
" (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i ≤ N",
" i = i",
" Function.Injective (revAtFun N)",
" a = b",
" (revAt N) i = i",
" (revAt (N + ... | [
" revAtFun N (revAtFun N i) = i",
" (if (if i ≤ N then N - i else i) ≤ N then N - if i ≤ N then N - i else i else if i ≤ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i ≤ N",
" i = i",
" Function.Injective (revAtFun N)",
" a = b",
" (revAt N) i = i",
" (revAt (N + ... |
import Mathlib.Analysis.Convex.Hull
#align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8"
open Set
variable {ι : Sort*} {𝕜 E : Type*}
section OrderedSemiring
variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] {s t s₁ s₂ t₁ t₂ u : Set ... | Mathlib/Analysis/Convex/Join.lean | 79 | 81 | theorem convexJoin_union_left (s₁ s₂ t : Set E) :
convexJoin 𝕜 (s₁ ∪ s₂) t = convexJoin 𝕜 s₁ t ∪ convexJoin 𝕜 s₂ t := by |
simp_rw [convexJoin, mem_union, iUnion_or, iUnion_union_distrib]
| [
" x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b",
" ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s",
" convexJoin 𝕜 ∅ t = ∅",
" convexJoin 𝕜 s ∅ = ∅",
" convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y",
" convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y",
" convexJoin 𝕜 {x} {y} = ... | [
" x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b",
" ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s",
" convexJoin 𝕜 ∅ t = ∅",
" convexJoin 𝕜 s ∅ = ∅",
" convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y",
" convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y",
" convexJoin 𝕜 {x} {y} = ... |
import Mathlib.Topology.FiberBundle.Constructions
import Mathlib.Topology.VectorBundle.Basic
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
#align_import topology.vector_bundle.constructions from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Cl... | Mathlib/Topology/VectorBundle/Constructions.lean | 50 | 55 | theorem trivialization.coordChangeL (b : B) :
(trivialization B F).coordChangeL 𝕜 (trivialization B F) b =
ContinuousLinearEquiv.refl 𝕜 F := by |
ext v
rw [Trivialization.coordChangeL_apply']
exacts [rfl, ⟨mem_univ _, mem_univ _⟩]
| [
" Trivialization.coordChangeL 𝕜 (trivialization B F) (trivialization B F) b = ContinuousLinearEquiv.refl 𝕜 F",
" (Trivialization.coordChangeL 𝕜 (trivialization B F) (trivialization B F) b) v = (ContinuousLinearEquiv.refl 𝕜 F) v",
" b ∈ (trivialization B F).baseSet ∩ (trivialization B F).baseSet"
] | [] |
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.Data.ZMod.Quotient
import Mathlib.RingTheory.DedekindDomain.AdicValuation
#align_import ring_theory.dedekind_domain.selmer_group from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973"
set_option quotPrecheck false
local notation K "... | Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean | 120 | 131 | theorem valuation_of_unit_eq (x : Rˣ) :
v.valuationOfNeZero (Units.map (algebraMap R K : R →* K) x) = 1 := by |
rw [← WithZero.coe_inj, valuationOfNeZero_eq, Units.coe_map, eq_iff_le_not_lt]
constructor
· exact v.valuation_le_one x
· cases' x with x _ hx _
change ¬v.valuation (algebraMap R K x) < 1
apply_fun v.intValuation at hx
rw [map_one, map_mul] at hx
rw [not_lt, ← hx, ← mul_one <| v.valuation _, va... | [
" ↑(v.valuationOfNeZeroToFun x) = v.valuation ↑x",
" v.valuation ↑x = ?m.4479 * ?m.4482",
" ↑(v.valuationOfNeZeroToFun x) =\n ↑v.intValuation.toMonoidWithZeroHom ((IsLocalization.toLocalizationMap R⁰ K).sec ↑x).1 *\n ↑((IsUnit.liftRight ((↑v.intValuation.toMonoidWithZeroHom).restrict R⁰) ⋯)\n ... | [
" ↑(v.valuationOfNeZeroToFun x) = v.valuation ↑x",
" v.valuation ↑x = ?m.4479 * ?m.4482",
" ↑(v.valuationOfNeZeroToFun x) =\n ↑v.intValuation.toMonoidWithZeroHom ((IsLocalization.toLocalizationMap R⁰ K).sec ↑x).1 *\n ↑((IsUnit.liftRight ((↑v.intValuation.toMonoidWithZeroHom).restrict R⁰) ⋯)\n ... |
import Mathlib.GroupTheory.Coxeter.Length
import Mathlib.Data.ZMod.Parity
namespace CoxeterSystem
open List Matrix Function
variable {B : Type*}
variable {W : Type*} [Group W]
variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W)
local prefix:100 "s" => cs.simple
local prefix:100 "π" => cs.wordProd
local prefi... | Mathlib/GroupTheory/Coxeter/Inversion.lean | 72 | 74 | theorem mul_self : t * t = 1 := by |
rcases ht with ⟨w, i, rfl⟩
simp
| [
" cs.IsReflection (cs.simple i)",
" cs.simple i = 1 * cs.simple i * 1⁻¹",
" t ^ 2 = 1",
" (w * cs.simple i * w⁻¹) ^ 2 = 1",
" t * t = 1",
" w * cs.simple i * w⁻¹ * (w * cs.simple i * w⁻¹) = 1"
] | [
" cs.IsReflection (cs.simple i)",
" cs.simple i = 1 * cs.simple i * 1⁻¹",
" t ^ 2 = 1",
" (w * cs.simple i * w⁻¹) ^ 2 = 1"
] |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Combinatorics.SimpleGraph.Maps
open Finset
namespace SimpleGraph
variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V)
section ReplaceVertex
def replaceVertex : SimpleGraph V where
Adj v w := if v = t then if w = t then False else G... | Mathlib/Combinatorics/SimpleGraph/Operations.lean | 76 | 80 | theorem edgeSet_replaceVertex_of_not_adj (hn : ¬G.Adj s t) : (G.replaceVertex s t).edgeSet =
G.edgeSet \ G.incidenceSet t ∪ (s(·, t)) '' (G.neighborSet s) := by |
ext e; refine e.inductionOn ?_
simp only [replaceVertex, mem_edgeSet, Set.mem_union, Set.mem_diff, mk'_mem_incidenceSet_iff]
intros; split_ifs; exacts [by simp_all, by aesop, by rw [adj_comm]; aesop, by aesop]
| [
" (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w →\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v",
" (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el... | [
" (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w →\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v",
" (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el... |
import Mathlib.Order.CompleteLattice
import Mathlib.Order.Atoms
def Order.radical (α : Type*) [Preorder α] [OrderTop α] [InfSet α] : α :=
⨅ a ∈ {H | IsCoatom H}, a
variable {α : Type*} [CompleteLattice α]
lemma Order.radical_le_coatom {a : α} (h : IsCoatom a) : radical α ≤ a := biInf_le _ h
variable {β : Typ... | Mathlib/Order/Radical.lean | 30 | 36 | theorem OrderIso.map_radical (f : α ≃o β) : f (Order.radical α) = Order.radical β := by |
unfold Order.radical
simp only [OrderIso.map_iInf]
fapply Equiv.iInf_congr
· exact f.toEquiv
· intros
simp
| [
" f (Order.radical α) = Order.radical β",
" f (⨅ a ∈ {H | IsCoatom H}, a) = ⨅ a ∈ {H | IsCoatom H}, a",
" ⨅ i ∈ {H | IsCoatom H}, f i = ⨅ a ∈ {H | IsCoatom H}, a",
" α ≃ β",
" ∀ (x : α), ⨅ (_ : f.toEquiv x ∈ {H | IsCoatom H}), f.toEquiv x = ⨅ (_ : x ∈ {H | IsCoatom H}), f x",
" ⨅ (_ : f.toEquiv x✝ ∈ {H | ... | [] |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {α β : Type*} [Fintype α] [DecidableEq β] (e : Equiv.Perm α) (f : α ↪ β)
... | Mathlib/Logic/Equiv/Fintype.lean | 54 | 57 | theorem Function.Embedding.toEquivRange_eq_ofInjective :
f.toEquivRange = Equiv.ofInjective f f.injective := by |
ext
simp
| [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a",
" f.toEquivRange = Equiv.ofInjective ⇑f ⋯",
" ↑(f.toEquivRange x✝) = ↑((Equiv.ofInjective ⇑f ⋯) x✝)"
] | [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a"
] |
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Data.Set.MulAntidiagonal
#align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
namespace Set
open Pointwise
variable {α : Type*} {s t : Set α}
@[to_additive]
theorem IsPWO.mul [OrderedCanc... | Mathlib/Data/Finset/MulAntidiagonal.lean | 40 | 45 | theorem IsWF.min_mul (hs : s.IsWF) (ht : t.IsWF) (hsn : s.Nonempty) (htn : t.Nonempty) :
(hs.mul ht).min (hsn.mul htn) = hs.min hsn * ht.min htn := by |
refine le_antisymm (IsWF.min_le _ _ (mem_mul.2 ⟨_, hs.min_mem _, _, ht.min_mem _, rfl⟩)) ?_
rw [IsWF.le_min_iff]
rintro _ ⟨x, hx, y, hy, rfl⟩
exact mul_le_mul' (hs.min_le _ hx) (ht.min_le _ hy)
| [
" (s * t).IsPWO",
" ((fun x => x.1 * x.2) '' s ×ˢ t).IsPWO",
" ⋯.min ⋯ = hs.min hsn * ht.min htn",
" hs.min hsn * ht.min htn ≤ ⋯.min ⋯",
" ∀ b ∈ s * t, hs.min hsn * ht.min htn ≤ b",
" hs.min hsn * ht.min htn ≤ (fun x x_1 => x * x_1) x y"
] | [
" (s * t).IsPWO",
" ((fun x => x.1 * x.2) '' s ×ˢ t).IsPWO"
] |
import Mathlib.SetTheory.Cardinal.ToNat
import Mathlib.Data.Nat.PartENat
#align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
universe u v
open Function
variable {α : Type u}
namespace Cardinal
noncomputable def toPartENat : Cardinal →+o PartEN... | Mathlib/SetTheory/Cardinal/PartENat.lean | 104 | 105 | theorem toPartENat_lift (c : Cardinal.{v}) : toPartENat (lift.{u, v} c) = toPartENat c := by |
simp only [← partENatOfENat_toENat, toENat_lift]
| [
" toPartENat ↑n = ↑n",
" toPartENat c = ↑(toNat c)",
" toPartENat ↑c = ↑(toNat ↑c)",
" toPartENat c = ⊤ ↔ ℵ₀ ≤ c",
" ↑(toENat c) = PartENat.withTopEquiv.symm ⊤ ↔ PartENat.withTopEquiv.symm (toENat c) = PartENat.withTopEquiv.symm ⊤",
" toPartENat c ≤ toPartENat c' ↔ c ≤ c'",
" toPartENat ↑c ≤ toPartENat ... | [
" toPartENat ↑n = ↑n",
" toPartENat c = ↑(toNat c)",
" toPartENat ↑c = ↑(toNat ↑c)",
" toPartENat c = ⊤ ↔ ℵ₀ ≤ c",
" ↑(toENat c) = PartENat.withTopEquiv.symm ⊤ ↔ PartENat.withTopEquiv.symm (toENat c) = PartENat.withTopEquiv.symm ⊤",
" toPartENat c ≤ toPartENat c' ↔ c ≤ c'",
" toPartENat ↑c ≤ toPartENat ... |
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Init.Data.Ordering.Lemmas
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.NormNum
#align_import set_theory.ordinal.notation from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
set_option linter.uppercaseLean3 ... | Mathlib/SetTheory/Ordinal/Notation.lean | 157 | 159 | theorem omega_le_oadd (e n a) : ω ^ repr e ≤ repr (oadd e n a) := by |
refine le_trans ?_ (le_add_right _ _)
simpa using (Ordinal.mul_le_mul_iff_left <| opow_pos (repr e) omega_pos).2 (natCast_le.2 n.2)
| [
" (↑n).repr = ↑n",
" (↑0).repr = ↑0",
" (↑(n✝ + 1)).repr = ↑(n✝ + 1)",
" ω ^ e.repr ≤ (e.oadd n a).repr",
" ω ^ e.repr ≤ ω ^ e.repr * ↑↑n"
] | [
" (↑n).repr = ↑n",
" (↑0).repr = ↑0",
" (↑(n✝ + 1)).repr = ↑(n✝ + 1)"
] |
import Mathlib.CategoryTheory.EpiMono
import Mathlib.CategoryTheory.Functor.FullyFaithful
import Mathlib.Tactic.PPWithUniv
import Mathlib.Data.Set.Defs
#align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
namespace CategoryTheory
-- morphism levels be... | Mathlib/CategoryTheory/Types.lean | 157 | 157 | theorem map_id_apply (a : F.obj X) : (F.map (𝟙 X)) a = a := by | simp [types_id]
| [
" f = g",
" f x = g x",
" Mono (↾f)",
" ↾f ≫ inv (↾f) = 𝟙 α",
" F.map (f ≫ g) a = F.map g (F.map f a)",
" F.map (𝟙 X) a = a"
] | [
" f = g",
" f x = g x",
" Mono (↾f)",
" ↾f ≫ inv (↾f) = 𝟙 α",
" F.map (f ≫ g) a = F.map g (F.map f a)"
] |
import Mathlib.CategoryTheory.Comma.Basic
import Mathlib.CategoryTheory.PUnit
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.EssentiallySmall
import Mathlib.Logic.Small.Set
#align_import category_theory.structured_arrow from "leanprover-community/mathlib"@"8a318021995877a44630c898d... | Mathlib/CategoryTheory/Comma/StructuredArrow.lean | 102 | 105 | theorem eqToHom_right {X Y : StructuredArrow S T} (h : X = Y) :
(eqToHom h).right = eqToHom (by rw [h]) := by |
subst h
simp only [eqToHom_refl, id_right]
| [
" f.right = g.right",
" A.hom ≫ T.map f.right = B.hom",
" X.right = Y.right",
" (eqToHom h).right = eqToHom ⋯",
" (eqToHom ⋯).right = eqToHom ⋯"
] | [
" f.right = g.right",
" A.hom ≫ T.map f.right = B.hom"
] |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Regular
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.instances from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {α : Type*}
section OrderedSemiring
variable [OrderedSe... | Mathlib/Algebra/Order/Interval/Set/Instances.lean | 201 | 203 | theorem coe_eq_zero [Nontrivial α] {x : Ico (0 : α) 1} : (x : α) = 0 ↔ x = 0 := by |
symm
exact Subtype.ext_iff
| [
" ↑x = 0 ↔ x = 0",
" x = 0 ↔ ↑x = 0"
] | [] |
import Mathlib.Data.Finset.Prod
import Mathlib.Data.Sym.Basic
import Mathlib.Data.Sym.Sym2.Init
import Mathlib.Data.SetLike.Basic
#align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
assert_not_exists MonoidWithZero
open Finset Function Sym
universe u
variab... | Mathlib/Data/Sym/Sym2.lean | 73 | 74 | theorem Rel.trans {x y z : α × α} (a : Rel α x y) (b : Rel α y z) : Rel α x z := by |
aesop (rule_sets := [Sym2])
| [
" Rel α x y → Rel α y x",
" Rel α x z"
] | [
" Rel α x y → Rel α y x"
] |
import Mathlib.Order.Partition.Equipartition
#align_import combinatorics.simple_graph.regularity.equitabilise from "leanprover-community/mathlib"@"bf7ef0e83e5b7e6c1169e97f055e58a2e4e9d52d"
open Finset Nat
namespace Finpartition
variable {α : Type*} [DecidableEq α] {s t : Finset α} {m n a b : ℕ} {P : Finpartitio... | Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean | 42 | 139 | theorem equitabilise_aux (hs : a * m + b * (m + 1) = s.card) :
∃ Q : Finpartition s,
(∀ x : Finset α, x ∈ Q.parts → x.card = m ∨ x.card = m + 1) ∧
(∀ x, x ∈ P.parts → (x \ (Q.parts.filter fun y => y ⊆ x).biUnion id).card ≤ m) ∧
(Q.parts.filter fun i => card i = m + 1).card = b := by |
-- Get rid of the easy case `m = 0`
obtain rfl | m_pos := m.eq_zero_or_pos
· refine ⟨⊥, by simp, ?_, by simpa [Finset.filter_true_of_mem] using hs.symm⟩
simp only [le_zero_iff, card_eq_zero, mem_biUnion, exists_prop, mem_filter, id, and_assoc,
sdiff_eq_empty_iff_subset, subset_iff]
exact fun x hx a... | [
" ∃ Q,\n (∀ x ∈ Q.parts, x.card = m ∨ x.card = m + 1) ∧\n (∀ x ∈ P.parts, (x \\ (filter (fun y => y ⊆ x) Q.parts).biUnion id).card ≤ m) ∧\n (filter (fun i => i.card = m + 1) Q.parts).card = b",
" ∃ Q,\n (∀ x ∈ Q.parts, x.card = 0 ∨ x.card = 0 + 1) ∧\n (∀ x ∈ P.parts, (x \\ (filter (fun y =>... | [] |
import Mathlib.Data.Finset.Card
#align_import data.finset.prod from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
assert_not_exists MonoidWithZero
open Multiset
variable {α β γ : Type*}
namespace Finset
section Prod
variable {s s' : Finset α} {t t' : Finset β} {a : α} {b : β}
... | Mathlib/Data/Finset/Prod.lean | 137 | 139 | theorem product_biUnion [DecidableEq γ] (s : Finset α) (t : Finset β) (f : α × β → Finset γ) :
(s ×ˢ t).biUnion f = s.biUnion fun a => t.biUnion fun b => f (a, b) := by |
classical simp_rw [product_eq_biUnion, biUnion_biUnion, image_biUnion]
| [
" i ∈ image Prod.fst (s ×ˢ t) → i ∈ s",
" i ∈ image Prod.snd (s ×ˢ t) → i ∈ t",
" image Prod.fst (s ×ˢ t) = s",
" i ∈ image Prod.fst (s ×ˢ t) ↔ i ∈ s",
" image Prod.snd (s ×ˢ t) = t",
" i ∈ image Prod.snd (s ×ˢ t) ↔ i ∈ t",
" ↑(map { toFun := Prod.swap, inj' := ⋯ } (t ×ˢ s)) = ↑(s ×ˢ t)",
" ⇑{ toFun :... | [
" i ∈ image Prod.fst (s ×ˢ t) → i ∈ s",
" i ∈ image Prod.snd (s ×ˢ t) → i ∈ t",
" image Prod.fst (s ×ˢ t) = s",
" i ∈ image Prod.fst (s ×ˢ t) ↔ i ∈ s",
" image Prod.snd (s ×ˢ t) = t",
" i ∈ image Prod.snd (s ×ˢ t) ↔ i ∈ t",
" ↑(map { toFun := Prod.swap, inj' := ⋯ } (t ×ˢ s)) = ↑(s ×ˢ t)",
" ⇑{ toFun :... |
import Mathlib.Data.List.Forall2
#align_import data.list.zip from "leanprover-community/mathlib"@"134625f523e737f650a6ea7f0c82a6177e45e622"
-- Make sure we don't import algebra
assert_not_exists Monoid
universe u
open Nat
namespace List
variable {α : Type u} {β γ δ ε : Type*}
#align list.zip_with_cons_cons Li... | Mathlib/Data/List/Zip.lean | 112 | 112 | theorem unzip_right (l : List (α × β)) : (unzip l).2 = l.map Prod.snd := by | simp only [unzip_eq_map]
| [
" map Prod.swap (l₁.zip []) = [].zip l₁",
" map Prod.swap [] = [].zip l₁",
" map Prod.swap ((a :: l₁).zip (b :: l₂)) = (b :: l₂).zip (a :: l₁)",
" Forall p (zipWith f [] []) ↔ Forall₂ (fun x y => p (f x y)) [] []",
" Forall p (zipWith f (a :: l₁) (b :: l₂)) ↔ Forall₂ (fun x y => p (f x y)) (a :: l₁) (b :: l... | [
" map Prod.swap (l₁.zip []) = [].zip l₁",
" map Prod.swap [] = [].zip l₁",
" map Prod.swap ((a :: l₁).zip (b :: l₂)) = (b :: l₂).zip (a :: l₁)",
" Forall p (zipWith f [] []) ↔ Forall₂ (fun x y => p (f x y)) [] []",
" Forall p (zipWith f (a :: l₁) (b :: l₂)) ↔ Forall₂ (fun x y => p (f x y)) (a :: l₁) (b :: l... |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.List.Perm
import Mathlib.Data.List.Range
#align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6"
universe u v w
variable {α : Type u} {β : Type v} {γ : Type w}
open Nat
namespace List
@[simp]
theo... | Mathlib/Data/List/Sublists.lean | 76 | 78 | theorem sublists'_cons (a : α) (l : List α) :
sublists' (a :: l) = sublists' l ++ map (cons a) (sublists' l) := by |
simp [sublists'_eq_sublists'Aux, foldr_cons, sublists'Aux_eq_map]
| [
" ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (... | [
" ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (... |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 75 | 76 | theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, (k * π / 2 : ℂ) ≠ θ := by |
rw [← not_exists, not_iff_not, tan_eq_zero_iff]
| [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... | [
" θ.cos = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" (cexp (θ * I) + cexp (-θ * I)) / 2 = 0 ↔ cexp (2 * θ * I) = -1",
" cexp (θ * I - -θ * I) = -1 ↔ cexp (2 * θ * I) = -1",
" (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2",
" 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x +... |
import Batteries.Data.HashMap.Basic
import Batteries.Data.Array.Lemmas
import Batteries.Data.Nat.Lemmas
namespace Batteries.HashMap
namespace Imp
attribute [-simp] Bool.not_eq_true
namespace Buckets
@[ext] protected theorem ext : ∀ {b₁ b₂ : Buckets α β}, b₁.1.data = b₂.1.data → b₁ = b₂
| ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ... | .lake/packages/batteries/Batteries/Data/HashMap/WF.lean | 38 | 40 | theorem mk_size (h) : (mk n h : Buckets α β).size = 0 := by |
simp only [mk, mkArray, size_eq]; clear h
induction n <;> simp [*]
| [
" ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂",
" ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂",
" (self.update i d h).update i d' h' ... | [
" ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂",
" ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂",
" (self.update i d h).update i d' h' ... |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 80 | 81 | theorem Equiv.Perm.decomposeOption_symm_sign {α : Type*} [DecidableEq α] [Fintype α] (e : Perm α) :
Perm.sign (Equiv.Perm.decomposeOption.symm (none, e)) = Perm.sign e := by | simp
| [
" optionCongr (swap x y) = swap (some x) (some y)",
" a✝ ∈ (optionCongr (swap x y)) none ↔ a✝ ∈ (swap (some x) (some y)) none",
" a✝ ∈ (optionCongr (swap x y)) (some i) ↔ a✝ ∈ (swap (some x) (some y)) (some i)",
" Perm.sign (optionCongr e) = Perm.sign e",
" Perm.sign (optionCongr 1) = Perm.sign 1",
" ∀ (f... | [
" optionCongr (swap x y) = swap (some x) (some y)",
" a✝ ∈ (optionCongr (swap x y)) none ↔ a✝ ∈ (swap (some x) (some y)) none",
" a✝ ∈ (optionCongr (swap x y)) (some i) ↔ a✝ ∈ (swap (some x) (some y)) (some i)",
" Perm.sign (optionCongr e) = Perm.sign e",
" Perm.sign (optionCongr 1) = Perm.sign 1",
" ∀ (f... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Positivity.Core
#align_import data.nat.factorial.double_factorial from "leanprover-community/mathlib"@"7daeaf3072304c498b653628add84a88d0e78767"
open Nat
namespace Nat
@[sim... | Mathlib/Data/Nat/Factorial/DoubleFactorial.lean | 48 | 48 | theorem doubleFactorial_add_one (n : ℕ) : (n + 1)‼ = (n + 1) * (n - 1)‼ := by | cases n <;> rfl
| [
" (n + 1)‼ = (n + 1) * (n - 1)‼",
" (0 + 1)‼ = (0 + 1) * (0 - 1)‼",
" (n✝ + 1 + 1)‼ = (n✝ + 1 + 1) * (n✝ + 1 - 1)‼"
] | [] |
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
import Mathlib.Tactic.AdaptationNote
#align_import probability.martingale.upcrossing from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Topological... | Mathlib/Probability/Martingale/Upcrossing.lean | 186 | 189 | theorem upperCrossingTime_le : upperCrossingTime a b f N n ω ≤ N := by |
cases n
· simp only [upperCrossingTime_zero, Pi.bot_apply, bot_le, Nat.zero_eq]
· simp only [upperCrossingTime_succ, hitting_le]
| [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... | [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... |
import Mathlib.Probability.ConditionalProbability
import Mathlib.MeasureTheory.Measure.Count
#align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4"
noncomputable section
open ProbabilityTheory
open MeasureTheory MeasurableSpace
namespace ProbabilityT... | Mathlib/Probability/CondCount.lean | 81 | 86 | theorem condCount_isProbabilityMeasure {s : Set Ω} (hs : s.Finite) (hs' : s.Nonempty) :
IsProbabilityMeasure (condCount s) :=
{ measure_univ := by |
rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel]
· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h
· exact (Measure.count_apply_lt_top.2 hs).ne }
| [
" condCount ∅ = 0",
" (condCount s) ∅ = 0",
" s.Finite",
" False",
" (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count Set.univ = ↑(Fintype.card Ω)",
" ∑ x : Ω, 1 = ↑(Fintype.card Ω)",
" M... | [
" condCount ∅ = 0",
" (condCount s) ∅ = 0",
" s.Finite",
" False",
" (condCount Set.univ) s = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count s / Measure.count Set.univ = Measure.count s / ↑(Fintype.card Ω)",
" Measure.count Set.univ = ↑(Fintype.card Ω)",
" ∑ x : Ω, 1 = ↑(Fintype.card Ω)",
" M... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 182 | 184 | theorem fib_two_mul_add_one (n : ℕ) : fib (2 * n + 1) = fib (n + 1) ^ 2 + fib n ^ 2 := by |
rw [two_mul, fib_add]
ring
| [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 206 | 208 | theorem map_exp : map (f : A →+* A') (exp A) = exp A' := by |
ext
simp
| [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)",
" (coeff A (bit1 n)) (cos A) = 0",
" (map f) (exp A) = exp... | [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)",
" (coeff A (bit1 n)) (cos A) = 0"
] |
import Mathlib.Tactic.Qify
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.DiophantineApproximation
import Mathlib.NumberTheory.Zsqrtd.Basic
#align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26"
namespace Pell
open Zsqrtd
| Mathlib/NumberTheory/Pell.lean | 83 | 85 | theorem is_pell_solution_iff_mem_unitary {d : ℤ} {a : ℤ√d} :
a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d) := by |
rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc]
| [
" a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)"
] | [] |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {α β γ : Type*}
def Finite.equivFin (α : Type*) [Finite α] : α ≃ Fin (Nat.card α) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 49 | 54 | theorem Nat.card_eq (α : Type*) :
Nat.card α = if h : Finite α then @Fintype.card α (Fintype.ofFinite α) else 0 := by |
cases finite_or_infinite α
· letI := Fintype.ofFinite α
simp only [*, Nat.card_eq_fintype_card, dif_pos]
· simp only [*, card_eq_zero_of_infinite, not_finite_iff_infinite.mpr, dite_false]
| [
" α ≃ Fin (Nat.card α)",
" α ≃ Fin n",
" Nat.card α = if h : Finite α then Fintype.card α else 0"
] | [
" α ≃ Fin (Nat.card α)",
" α ≃ Fin n"
] |
import Mathlib.Analysis.BoxIntegral.Partition.Basic
#align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
noncomputable section
open scoped Classical
open Filter
open Function Set Filter
namespace BoxIntegral
variable {ι M : Type*} {... | Mathlib/Analysis/BoxIntegral/Partition/Split.lean | 126 | 127 | theorem splitUpper_eq_self : I.splitUpper i x = I ↔ x ≤ I.lower i := by |
simp [splitUpper, update_eq_iff]
| [
" ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}",
" (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}",
" ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧... | [
" ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}",
" (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}",
" ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧... |
import Mathlib.Algebra.Polynomial.Smeval
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.RingTheory.Polynomial.Pochhammer
section Multichoose
open Function Polynomial
class BinomialRing (R : Type*) [AddCommMonoid R] [Pow R ℕ] where
nsmul_right_injective (n : ℕ) (h : n ≠ 0) : Injective (n • · : R →... | Mathlib/RingTheory/Binomial.lean | 129 | 138 | theorem ascPochhammer_smeval_neg_eq_descPochhammer (r : R) (k : ℕ) :
(ascPochhammer ℕ k).smeval (-r) = (-1)^k * (descPochhammer ℤ k).smeval r := by |
induction k with
| zero => simp only [ascPochhammer_zero, descPochhammer_zero, smeval_one, npow_zero, one_mul]
| succ k ih =>
simp only [ascPochhammer_succ_right, smeval_mul, ih, descPochhammer_succ_right, sub_eq_add_neg]
have h : (X + (k : ℕ[X])).smeval (-r) = - (X + (-k : ℤ[X])).smeval r := by
si... | [
" (ascPochhammer R n).smeval x = (ascPochhammer ℕ n).smeval x",
" (ascPochhammer R 0).smeval x = (ascPochhammer ℕ 0).smeval x",
" (ascPochhammer R (n + 1)).smeval x = (ascPochhammer ℕ (n + 1)).smeval x",
" (ascPochhammer R n).smeval x * x + (↑n * ascPochhammer R n).smeval x =\n (ascPochhammer ℕ n).smeval x... | [
" (ascPochhammer R n).smeval x = (ascPochhammer ℕ n).smeval x",
" (ascPochhammer R 0).smeval x = (ascPochhammer ℕ 0).smeval x",
" (ascPochhammer R (n + 1)).smeval x = (ascPochhammer ℕ (n + 1)).smeval x",
" (ascPochhammer R n).smeval x * x + (↑n * ascPochhammer R n).smeval x =\n (ascPochhammer ℕ n).smeval x... |
import Mathlib.Topology.Order.LeftRight
import Mathlib.Topology.Order.Monotone
#align_import topology.algebra.order.left_right_lim from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
open Set Filter
open Topology
section
variable {α β : Type*} [LinearOrder α] [TopologicalSpace β]
n... | Mathlib/Topology/Order/LeftRightLim.lean | 75 | 78 | theorem leftLim_eq_of_eq_bot [hα : TopologicalSpace α] [h'α : OrderTopology α] (f : α → β) {a : α}
(h : 𝓝[<] a = ⊥) : leftLim f a = f a := by |
rw [h'α.topology_eq_generate_intervals] at h
simp [leftLim, ite_eq_left_iff, h]
| [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y",
" leftLim f a = f a"
] | [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FieldSimp
import Mathlib.Data.Int.NatPrime
import Mathlib.Data.ZMod.Basic
#align_import number_theory.pythagorean_tri... | Mathlib/NumberTheory/PythagoreanTriples.lean | 164 | 182 | theorem gcd_dvd : (Int.gcd x y : ℤ) ∣ z := by |
by_cases h0 : Int.gcd x y = 0
· have hx : x = 0 := by
apply Int.natAbs_eq_zero.mp
apply Nat.eq_zero_of_gcd_eq_zero_left h0
have hy : y = 0 := by
apply Int.natAbs_eq_zero.mp
apply Nat.eq_zero_of_gcd_eq_zero_right h0
have hz : z = 0 := by
simpa only [PythagoreanTriple, hx, hy, a... | [
" z * z ≠ 2",
" ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2",
" ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2",
" ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2",
" ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2",
" z * z % 4 ≠ 2",
" ¬z * z % ↑4 = 2 % ↑4",
" ¬↑(z * z) = ↑2",
" PythagoreanTriple x y z ↔ PythagoreanTriple y x z",
" x * x + y * y = z * z ↔ y * y + x * x = z * z",
" PythagoreanTriple ... | [
" z * z ≠ 2",
" ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2",
" ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2",
" ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2",
" ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2",
" z * z % 4 ≠ 2",
" ¬z * z % ↑4 = 2 % ↑4",
" ¬↑(z * z) = ↑2",
" PythagoreanTriple x y z ↔ PythagoreanTriple y x z",
" x * x + y * y = z * z ↔ y * y + x * x = z * z",
" PythagoreanTriple ... |
import Mathlib.Data.Finset.Sort
import Mathlib.Data.List.FinRange
import Mathlib.Data.Prod.Lex
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.Order.Interval.Finset.Fin
#align_import data.fin.tuple.sort from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace Tuple
open List
... | Mathlib/Data/Fin/Tuple/Sort.lean | 120 | 145 | theorem lt_card_le_iff_apply_le_of_monotone [PartialOrder α] [DecidableRel (α := α) LE.le]
{m : ℕ} (f : Fin m → α) (a : α) (h_sorted : Monotone f) (j : Fin m) :
j < Fintype.card {i // f i ≤ a} ↔ f j ≤ a := by |
suffices h1 : ∀ k : Fin m, (k < Fintype.card {i // f i ≤ a}) → f k ≤ a by
refine ⟨h1 j, fun h ↦ ?_⟩
by_contra! hc
let p : Fin m → Prop := fun x ↦ f x ≤ a
let q : Fin m → Prop := fun x ↦ x < Fintype.card {i // f i ≤ a}
let q' : {i // f i ≤ a} → Prop := fun x ↦ q x
have hw : 0 < Fintype.card {j... | [
" ↑j < Fintype.card { i // f i ≤ a } ↔ f j ≤ a",
" ↑j < Fintype.card { i // f i ≤ a }",
" False",
" Fintype.card { j // ¬q' j } = 0",
" Fintype.card { i // f i ≤ a } ≤ m",
"n : ℕ\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : DecidableRel LE.le\nm : ℕ\nf : Fin m → α\na : α\nh_sorted : Monotone f\nj : Fin... | [] |
import Mathlib.AlgebraicTopology.DoldKan.EquivalenceAdditive
import Mathlib.AlgebraicTopology.DoldKan.Compatibility
import Mathlib.CategoryTheory.Idempotents.SimplicialObject
#align_import algebraic_topology.dold_kan.equivalence_pseudoabelian from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b5... | Mathlib/AlgebraicTopology/DoldKan/EquivalencePseudoabelian.lean | 129 | 144 | theorem hε :
Compatibility.υ (isoN₁) =
(Γ₂N₁ : (toKaroubiEquivalence _).functor ≅
(N₁ : SimplicialObject C ⥤ _) ⋙ Preadditive.DoldKan.equivalence.inverse) := by |
dsimp only [isoN₁]
ext1
rw [← cancel_epi Γ₂N₁.inv, Iso.inv_hom_id]
ext X : 2
rw [NatTrans.comp_app]
erw [compatibility_Γ₂N₁_Γ₂N₂_natTrans X]
rw [Compatibility.υ_hom_app, Preadditive.DoldKan.equivalence_unitIso, Iso.app_inv, assoc]
erw [← NatTrans.comp_app_assoc, IsIso.hom_inv_id]
rw [NatTrans.id_app,... | [
" (N₂.map (isoΓ₀.hom.app X)).f = PInfty",
" (N₂.map (isoΓ₀.hom.app X)).f.f i✝ = PInfty.f i✝",
" Compatibility.τ₀ = Compatibility.τ₁ isoN₁ isoΓ₀ N₁Γ₀",
" Compatibility.τ₀.hom.app K = (Compatibility.τ₁ isoN₁ isoΓ₀ N₁Γ₀).hom.app K",
" Preadditive.DoldKan.equivalence.counitIso.hom.app ((toKaroubiEquivalence (Ch... | [
" (N₂.map (isoΓ₀.hom.app X)).f = PInfty",
" (N₂.map (isoΓ₀.hom.app X)).f.f i✝ = PInfty.f i✝",
" Compatibility.τ₀ = Compatibility.τ₁ isoN₁ isoΓ₀ N₁Γ₀",
" Compatibility.τ₀.hom.app K = (Compatibility.τ₁ isoN₁ isoΓ₀ N₁Γ₀).hom.app K",
" Preadditive.DoldKan.equivalence.counitIso.hom.app ((toKaroubiEquivalence (Ch... |
import Mathlib.Algebra.BigOperators.Group.Finset
#align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace Nat
variable {ι : Type*}
theorem coprime_list_prod_left_iff {l : List ℕ} {k : ℕ} :
Coprime l.prod k ↔ ∀ n ∈ l, Coprime n k := by
... | Mathlib/Data/Nat/GCD/BigOperators.lean | 40 | 42 | theorem coprime_prod_right_iff {x : ℕ} {t : Finset ι} {s : ι → ℕ} :
Coprime x (∏ i ∈ t, s i) ↔ ∀ i ∈ t, Coprime x (s i) := by |
simpa using coprime_multiset_prod_right_iff (m := t.val.map s)
| [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... | [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... |
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.fderiv_symmetric from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Asymptotics Set
open scoped Topology
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpa... | Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean | 68 | 172 | theorem Convex.taylor_approx_two_segment {v w : E} (hv : x + v ∈ interior s)
(hw : x + v + w ∈ interior s) :
(fun h : ℝ => f (x + h • v + h • w)
- f (x + h • v) - h • f' x w - h ^ 2 • f'' v w - (h ^ 2 / 2) • f'' w w) =o[𝓝[>] 0]
fun h => h ^ 2 := by |
-- it suffices to check that the expression is bounded by `ε * ((‖v‖ + ‖w‖) * ‖w‖) * h^2` for
-- small enough `h`, for any positive `ε`.
refine IsLittleO.trans_isBigO
(isLittleO_iff.2 fun ε εpos => ?_) (isBigO_const_mul_self ((‖v‖ + ‖w‖) * ‖w‖) _ _)
-- consider a ball of radius `δ` around `x` in which the ... | [
" (fun h =>\n f (x + h • v + h • w) - f (x + h • v) - h • (f' x) w - h ^ 2 • (f'' v) w - (h ^ 2 / 2) • (f'' w) w) =o[𝓝[>] 0]\n fun h => h ^ 2",
" ∀ᶠ (x_1 : ℝ) in 𝓝[>] 0,\n ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • (f' x) w - x_1 ^ 2 • (f'' v) w - (x_1 ^ 2 / 2) • (f'' w) w‖ ≤\n ε * ‖(‖... | [] |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.Galois
universe u v w
open scoped Classical Polynomial
open Polynomial
variable (k : Type u) [Field k] (K : Type v) [Field K]
class IsSepClosed : Prop where
splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom.... | Mathlib/FieldTheory/IsSepClosed.lean | 118 | 120 | theorem exists_eq_mul_self [IsSepClosed k] (x : k) [h2 : NeZero (2 : k)] : ∃ z, x = z * z := by |
rcases exists_pow_nat_eq x 2 with ⟨z, rfl⟩
exact ⟨z, sq z⟩
| [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)",
" ∃ z, z ^ n = x",
" False",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" 0 ^ n = x",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1"
] | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)",
" ∃ z, z ^ n = x",
" False",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" 0 ^ n = x",
" z ^ n = x"
] |
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
import Mathlib.CategoryTheory.Monoidal.Discrete
import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.Algebra.PUnitInstances
#align_import category_theory.monoidal.Mon_ from "leanprover-community/... | Mathlib/CategoryTheory/Monoidal/Mon_.lean | 80 | 81 | theorem mul_one_hom {Z : C} (f : Z ⟶ M.X) : (f ⊗ M.one) ≫ M.mul = (ρ_ Z).hom ≫ f := by |
rw [tensorHom_def_assoc, M.mul_one, rightUnitor_naturality]
| [
" 𝟙_ C ◁ 𝟙 (𝟙_ C) ≫ (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom",
" (λ_ (𝟙_ C)).hom ▷ 𝟙_ C ≫ (λ_ (𝟙_ C)).hom = (α_ (𝟙_ C) (𝟙_ C) (𝟙_ C)).hom ≫ 𝟙_ C ◁ (λ_ (𝟙_ C)).hom ≫ (λ_ (𝟙_ C)).hom",
" (M.one ⊗ f) ≫ M.mul = (λ_ Z).hom ≫ f",
" (f ⊗ M.one) ≫ M.mul = (ρ_ Z).hom ≫ f"
] | [
" 𝟙_ C ◁ 𝟙 (𝟙_ C) ≫ (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom",
" (λ_ (𝟙_ C)).hom ▷ 𝟙_ C ≫ (λ_ (𝟙_ C)).hom = (α_ (𝟙_ C) (𝟙_ C) (𝟙_ C)).hom ≫ 𝟙_ C ◁ (λ_ (𝟙_ C)).hom ≫ (λ_ (𝟙_ C)).hom",
" (M.one ⊗ f) ≫ M.mul = (λ_ Z).hom ≫ f"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Analysis.SumOverResidueClass
#align_import analysis.p_series from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
def SuccDiffBounded (C : ℕ) (u : ℕ → ℕ) : Prop :=... | Mathlib/Analysis/PSeries.lean | 84 | 98 | theorem sum_schlomilch_le' (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
(hu : Monotone u) (n : ℕ) :
(∑ k ∈ range n, (u (k + 1) - u k) • f (u (k + 1))) ≤ ∑ k ∈ Ico (u 0 + 1) (u n + 1), f k := by |
induction' n with n ihn
· simp
suffices (u (n + 1) - u n) • f (u (n + 1)) ≤ ∑ k ∈ Ico (u n + 1) (u (n + 1) + 1), f k by
rw [sum_range_succ, ← sum_Ico_consecutive]
exacts [add_le_add ihn this,
(add_le_add_right (hu n.zero_le) _ : u 0 + 1 ≤ u n + 1),
add_le_add_right (hu n.le_succ) _]
have : ... | [
" ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)",
" ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈... | [
" ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)",
" ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈... |
import Mathlib.Geometry.Manifold.VectorBundle.Tangent
#align_import geometry.manifold.mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical Topology Manifold
open Set ChartedSpace
section DerivativesDefinitions
variable {𝕜 : Type*} ... | Mathlib/Geometry/Manifold/MFDeriv/Defs.lean | 239 | 246 | theorem mdifferentiableAt_iff (f : M → M') (x : M) :
MDifferentiableAt I I' f x ↔ ContinuousAt f x ∧
DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f) (range I) ((extChartAt I x) x) := by |
rw [MDifferentiableAt, liftPropAt_iff]
congrm _ ∧ ?_
simp [DifferentiableWithinAtProp, Set.univ_inter]
-- Porting note: `rfl` wasn't needed
rfl
| [
" ∀ {s : Set H} {x : H} {u : Set H} {f : H → H'},\n IsOpen u → x ∈ u → (DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x)",
" DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x",
" ↑I.symm ⁻¹' (s ∩ u) ∩ range ↑I = ↑I.symm ⁻¹' s ∩ range ↑I ∩ ... | [
" ∀ {s : Set H} {x : H} {u : Set H} {f : H → H'},\n IsOpen u → x ∈ u → (DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x)",
" DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x",
" ↑I.symm ⁻¹' (s ∩ u) ∩ range ↑I = ↑I.symm ⁻¹' s ∩ range ↑I ∩ ... |
import Mathlib.Probability.ProbabilityMassFunction.Monad
#align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d"
universe u
namespace PMF
noncomputable section
variable {α β γ : Type*}
open scoped Classical
open NNReal ENN... | Mathlib/Probability/ProbabilityMassFunction/Constructions.lean | 87 | 88 | theorem map_const : p.map (Function.const α b) = pure b := by |
simp only [map, Function.comp, bind_const, Function.const]
| [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p",
" map (Function.const α b) p = pure b"
] | [
" (map f p) b = ∑' (a : α), if b = f a then p a else 0",
" b ∈ (map f p).support ↔ b ∈ f '' p.support",
" b ∈ (map f p).support ↔ ∃ a ∈ p.support, f a = b",
" map g (map f p) = map (g ∘ f) p"
] |
import Mathlib.Combinatorics.Quiver.Basic
import Mathlib.Combinatorics.Quiver.Path
#align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
universe v v₁ v₂ u u₁ u₂
variable {U : Type*} [Quiver.{u + 1} U]
namespace Quiver
def Hom.cast {u v u' v... | Mathlib/Combinatorics/Quiver/Cast.lean | 136 | 139 | theorem cast_eq_of_cons_eq_cons {u v v' w : U} {p : Path u v} {p' : Path u v'} {e : v ⟶ w}
{e' : v' ⟶ w} (h : p.cons e = p'.cons e') : p.cast rfl (obj_eq_of_cons_eq_cons h) = p' := by |
rw [Path.cast_eq_iff_heq]
exact heq_of_cons_eq_cons h
| [
" (u ⟶ v) = (u' ⟶ v')",
" cast hu hv e = _root_.cast ⋯ e",
" cast ⋯ ⋯ e = _root_.cast ⋯ e",
" cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e",
" cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e",
" HEq (cast hu hv e) e",
" HEq (cast ⋯ ⋯ e) e",
" cast hu hv e = e' ↔ HEq e e'",
" _root_.cast ⋯ e = e' ↔ HEq e e'",
" e' ... | [
" (u ⟶ v) = (u' ⟶ v')",
" cast hu hv e = _root_.cast ⋯ e",
" cast ⋯ ⋯ e = _root_.cast ⋯ e",
" cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e",
" cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e",
" HEq (cast hu hv e) e",
" HEq (cast ⋯ ⋯ e) e",
" cast hu hv e = e' ↔ HEq e e'",
" _root_.cast ⋯ e = e' ↔ HEq e e'",
" e' ... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Density
import Mathlib.Data.Nat.Cast.Field
import Mathlib.Order.Partition.Equipartition
import Mathlib.SetTheory.Ordinal.Basic
#align_import combinatorics.simple_graph.regularity.uniform from "leanprover-community/mathlib"@"bf7ef0e83e5b... | Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean | 116 | 120 | theorem not_isUniform_iff :
¬G.IsUniform ε s t ↔ ∃ s', s' ⊆ s ∧ ∃ t', t' ⊆ t ∧ ↑s.card * ε ≤ s'.card ∧
↑t.card * ε ≤ t'.card ∧ ε ≤ |G.edgeDensity s' t' - G.edgeDensity s t| := by |
unfold IsUniform
simp only [not_forall, not_lt, exists_prop, exists_and_left, Rat.cast_abs, Rat.cast_sub]
| [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... | [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Comm
variable (xs ys : Vector α n)
theorem map₂_comm (f : α → α → β) (comm : ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁) :
map₂ f xs ys = map₂ f ys xs := by
induction xs, ys using Vec... | Mathlib/Data/Vector/MapLemmas.lean | 373 | 375 | theorem mapAccumr₂_comm (f : α → α → σ → σ × γ) (comm : ∀ a₁ a₂ s, f a₁ a₂ s = f a₂ a₁ s) :
mapAccumr₂ f xs ys s = mapAccumr₂ f ys xs s := by |
induction xs, ys using Vector.inductionOn₂ generalizing s <;> simp_all
| [
" map₂ f xs ys = map₂ f ys xs",
" map₂ f nil nil = map₂ f nil nil",
" map₂ f (a✝¹ ::ᵥ x✝) (b✝ ::ᵥ y✝) = map₂ f (b✝ ::ᵥ y✝) (a✝¹ ::ᵥ x✝)",
" mapAccumr₂ f xs ys s = mapAccumr₂ f ys xs s",
" mapAccumr₂ f nil nil s = mapAccumr₂ f nil nil s",
" mapAccumr₂ f (a✝¹ ::ᵥ x✝) (b✝ ::ᵥ y✝) s = mapAccumr₂ f (b✝ ::ᵥ y✝)... | [
" map₂ f xs ys = map₂ f ys xs",
" map₂ f nil nil = map₂ f nil nil",
" map₂ f (a✝¹ ::ᵥ x✝) (b✝ ::ᵥ y✝) = map₂ f (b✝ ::ᵥ y✝) (a✝¹ ::ᵥ x✝)"
] |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.CPolynomial
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2... | Mathlib/Analysis/Calculus/FDeriv/Analytic.lean | 105 | 109 | theorem AnalyticOn.fderiv [CompleteSpace F] (h : AnalyticOn 𝕜 f s) :
AnalyticOn 𝕜 (fderiv 𝕜 f) s := by |
intro y hy
rcases h y hy with ⟨p, r, hp⟩
exact hp.fderiv.analyticAt
| [
" HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x",
" (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖",
" Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)",
" ‖id (x, x) - (x, x)‖ = 0",
" HasFPowerSeriesOnBall (_root_.fderiv 𝕜 f) p.derivSeries x r",
... | [
" HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x",
" (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖",
" Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)",
" ‖id (x, x) - (x, x)‖ = 0",
" HasFPowerSeriesOnBall (_root_.fderiv 𝕜 f) p.derivSeries x r",
... |
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.DFinsupp.Order
import Mathlib.Order.Interval.Finset.Basic
#align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
open DFinsupp Finset
open Pointwise
vari... | Mathlib/Data/DFinsupp/Interval.lean | 64 | 73 | theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.support ⊆ s) :
f ∈ s.dfinsupp t ↔ ∀ i, f i ∈ t i := by |
refine mem_dfinsupp_iff.trans (forall_and.symm.trans <| forall_congr' fun i =>
⟨ fun h => ?_,
fun h => ⟨fun hi => ht <| mem_support_iff.2 fun H => mem_support_iff.1 hi ?_, fun _ => h⟩⟩)
· by_cases hi : i ∈ s
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 (not_me... | [
" Function.Injective fun f => DFinsupp.mk s fun i => f ↑i ⋯",
" f = g",
" f i hi = g i hi",
" f ∈ s.dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" (∃ a ∈ s.pi t, { toFun := fun f => DFinsupp.mk s fun i => f ↑i ⋯, inj' := ⋯ } a = f) →\n f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" ({ toFun := fun f => DF... | [
" Function.Injective fun f => DFinsupp.mk s fun i => f ↑i ⋯",
" f = g",
" f i hi = g i hi",
" f ∈ s.dfinsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" (∃ a ∈ s.pi t, { toFun := fun f => DFinsupp.mk s fun i => f ↑i ⋯, inj' := ⋯ } a = f) →\n f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" ({ toFun := fun f => DF... |
import Mathlib.CategoryTheory.Subobject.Limits
#align_import algebra.homology.image_to_kernel from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u w
open CategoryTheory CategoryTheory.Limits
variable {ι : Type*}
variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V]
o... | Mathlib/Algebra/Homology/ImageToKernel.lean | 68 | 70 | theorem imageToKernel_arrow (w : f ≫ g = 0) :
imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow := by |
simp [imageToKernel]
| [
" kernel.lift g f w ≫ kernel.ι g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) ⋯)",
" imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow"
] | [
" kernel.lift g f w ≫ kernel.ι g = f",
" Mono (imageToKernel f g w)",
" Mono ((imageSubobject f).ofLE (kernelSubobject g) ⋯)"
] |
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.FreeModule.Basic
#align_import linear_algebra.free_module.pid from "leanprover-community/mathlib"@"d87199d51218d36a0a42c66c82d147b5a7ff87b3"
universe u v
section IsDomain
variable {ι : Type*} {R : Type*} [CommRing R] [IsDoma... | Mathlib/LinearAlgebra/FreeModule/PID.lean | 93 | 98 | theorem dvd_generator_iff {I : Ideal R} [I.IsPrincipal] {x : R} (hx : x ∈ I) :
x ∣ generator I ↔ I = Ideal.span {x} := by |
conv_rhs => rw [← span_singleton_generator I]
rw [Ideal.submodule_span_eq, Ideal.span_singleton_eq_span_singleton, ← dvd_dvd_iff_associated,
← mem_iff_generator_dvd]
exact ⟨fun h ↦ ⟨hx, h⟩, fun h ↦ h.2⟩
| [
" x ∣ generator I ↔ I = Ideal.span {x}",
"ι : Type u_1\nR : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nb : ι → M\nI : Ideal R\ninst✝ : IsPrincipal I\nx : R\nhx : x ∈ I\n| I = Ideal.span {x}",
" x ∣ generator I ↔ span R {generator I} = Ideal.sp... | [] |
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
#align_import linear_algebra.clifford_algebra.fold from "leanprover-community/mathlib"@"446eb51ce0a90f8385f260d2b52e760e2004246b"
universe u1 u2 u3
variable {R M N : Type*}
variable [CommRing R] [AddCommGroup M] [AddCommGroup N]
variable [Module R M] [Modu... | Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean | 161 | 168 | theorem left_induction {P : CliffordAlgebra Q → Prop} (algebraMap : ∀ r : R, P (algebraMap _ _ r))
(add : ∀ x y, P x → P y → P (x + y)) (ι_mul : ∀ x m, P x → P (ι Q m * x)) : ∀ x, P x := by |
refine reverse_involutive.surjective.forall.2 ?_
intro x
induction' x using CliffordAlgebra.right_induction with r x y hx hy m x hx
· simpa only [reverse.commutes] using algebraMap r
· simpa only [map_add] using add _ _ hx hy
· simpa only [reverse.map_mul, reverse_ι] using ι_mul _ _ hx
| [
" ∀ (x : CliffordAlgebra Q), P x",
" P x",
" P ((_root_.algebraMap R (CliffordAlgebra Q)) r)",
" P (_x + _y)",
" P (x * m)",
" P (x * (ι Q) m)",
" P 0",
" ∀ (x : CliffordAlgebra Q), P (reverse x)",
" P (reverse x)",
" P (reverse ((_root_.algebraMap R (CliffordAlgebra Q)) r))",
" P (reverse (x + ... | [
" ∀ (x : CliffordAlgebra Q), P x",
" P x",
" P ((_root_.algebraMap R (CliffordAlgebra Q)) r)",
" P (_x + _y)",
" P (x * m)",
" P (x * (ι Q) m)",
" P 0"
] |
import Mathlib.Data.Sym.Sym2
import Mathlib.Logic.Relation
#align_import order.game_add from "leanprover-community/mathlib"@"fee218fb033b2fd390c447f8be27754bc9093be9"
set_option autoImplicit true
variable {α β : Type*} {rα : α → α → Prop} {rβ : β → β → Prop}
namespace Prod
variable (rα rβ)
inductive Game... | Mathlib/Order/GameAdd.lean | 60 | 67 | theorem gameAdd_iff {rα rβ} {x y : α × β} :
GameAdd rα rβ x y ↔ rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1 := by |
constructor
· rintro (@⟨a₁, a₂, b, h⟩ | @⟨a, b₁, b₂, h⟩)
exacts [Or.inl ⟨h, rfl⟩, Or.inr ⟨h, rfl⟩]
· revert x y
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ (⟨h, rfl : b₁ = b₂⟩ | ⟨h, rfl : a₁ = a₂⟩)
exacts [GameAdd.fst h, GameAdd.snd h]
| [
" GameAdd rα rβ x y ↔ rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1",
" GameAdd rα rβ x y → rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1",
" rα (a, b₁).1 (a, b₂).1 ∧ (a, b₁).2 = (a, b₂).2 ∨ rβ (a, b₁).2 (a, b₂).2 ∧ (a, b₁).1 = (a, b₂).1",
" rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1 → GameAdd rα rβ ... | [] |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6d... | Mathlib/Topology/ContinuousFunction/Compact.lean | 132 | 133 | theorem dist_apply_le_dist (x : α) : dist (f x) (g x) ≤ dist f g := by |
simp only [← dist_mkOfCompact, dist_coe_le_dist, ← mkOfCompact_apply]
| [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... | [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... |
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.LinearAlgebra.Matrix.Trace
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import combinatorics.simple_graph.adj_matrix from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1... | Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean | 115 | 117 | theorem isSymm_compl [Zero α] [One α] (h : A.IsSymm) : A.compl.IsSymm := by |
ext
simp [compl, h.apply, eq_comm]
| [
" A.compl i i = 0",
" A.compl i j = 0 ∨ A.compl i j = 1",
" (if i = j then 0 else if A i j = 0 then 1 else 0) = 0 ∨ (if i = j then 0 else if A i j = 0 then 1 else 0) = 1",
" 0 = 0 ∨ 0 = 1",
" 1 = 0 ∨ 1 = 1",
" A.compl.IsSymm",
" A.complᵀ i✝ j✝ = A.compl i✝ j✝"
] | [
" A.compl i i = 0",
" A.compl i j = 0 ∨ A.compl i j = 1",
" (if i = j then 0 else if A i j = 0 then 1 else 0) = 0 ∨ (if i = j then 0 else if A i j = 0 then 1 else 0) = 1",
" 0 = 0 ∨ 0 = 1",
" 1 = 0 ∨ 1 = 1"
] |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.Module.Basic
import Mathlib.Algebra.Regular.SMul
import Mathlib.Data.Finset.Preimage
import Mathlib.Data.Rat.BigOperators
import Mathlib.GroupTheory.GroupAction.Hom
import Mathlib.Data.Set.Subsingleton
#align_import data.finsupp.basic from "leanprover... | Mathlib/Data/Finsupp/Basic.lean | 101 | 106 | theorem graph_injective (α M) [Zero M] : Injective (@graph α M _) := by |
intro f g h
classical
have hsup : f.support = g.support := by rw [← image_fst_graph, h, image_fst_graph]
refine ext_iff'.2 ⟨hsup, fun x hx => apply_eq_of_mem_graph <| h.symm ▸ ?_⟩
exact mk_mem_graph _ (hsup ▸ hx)
| [
" (a, m) ∈ f.graph ↔ f a = m ∧ m ≠ 0",
" (∃ a_1, f a_1 ≠ 0 ∧ { toFun := fun a => (a, f a), inj' := ⋯ } a_1 = (a, m)) ↔ f a = m ∧ m ≠ 0",
" (∃ a_1, f a_1 ≠ 0 ∧ { toFun := fun a => (a, f a), inj' := ⋯ } a_1 = (a, m)) → f a = m ∧ m ≠ 0",
" f a = f a ∧ f a ≠ 0",
" f a = m ∧ m ≠ 0 → ∃ a_2, f a_2 ≠ 0 ∧ { toFun :=... | [
" (a, m) ∈ f.graph ↔ f a = m ∧ m ≠ 0",
" (∃ a_1, f a_1 ≠ 0 ∧ { toFun := fun a => (a, f a), inj' := ⋯ } a_1 = (a, m)) ↔ f a = m ∧ m ≠ 0",
" (∃ a_1, f a_1 ≠ 0 ∧ { toFun := fun a => (a, f a), inj' := ⋯ } a_1 = (a, m)) → f a = m ∧ m ≠ 0",
" f a = f a ∧ f a ≠ 0",
" f a = m ∧ m ≠ 0 → ∃ a_2, f a_2 ≠ 0 ∧ { toFun :=... |
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.Algebra.Category.ModuleCat.Abelian
import Mathlib.Algebra.Category.ModuleCat.Subobject
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
#align_import algebra.homology.Module from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225... | Mathlib/Algebra/Homology/ModuleCat.lean | 61 | 65 | theorem cycles'_ext {C : HomologicalComplex (ModuleCat.{u} R) c} {i : ι}
{x y : (C.cycles' i : Type u)}
(w : (C.cycles' i).arrow x = (C.cycles' i).arrow y) : x = y := by |
apply_fun (C.cycles' i).arrow using (ModuleCat.mono_iff_injective _).mp (cycles' C i).arrow_mono
exact w
| [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... | [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6d... | Mathlib/Topology/ContinuousFunction/Compact.lean | 154 | 156 | theorem dist_lt_iff (C0 : (0 : ℝ) < C) : dist f g < C ↔ ∀ x : α, dist (f x) (g x) < C := by |
rw [← dist_mkOfCompact, dist_lt_iff_of_compact C0]
simp only [mkOfCompact_apply]
| [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... | [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... |
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 92 | 95 | theorem basisSets_nonempty [Nonempty ι] : p.basisSets.Nonempty := by |
let i := Classical.arbitrary ι
refine nonempty_def.mpr ⟨(p i).ball 0 1, ?_⟩
exact p.basisSets_singleton_mem i zero_lt_one
| [
" U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r",
" p.basisSets.Nonempty",
" (p i).ball 0 1 ∈ p.basisSets"
] | [
" U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r",
" (p i).ball 0 r = ({i}.sup p).ball 0 r"
] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.LinearAlgebra.Prod
#align_import linear_algebra.projection from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213"
noncomputable section Ring
variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E]
variable {F : Type*} [Ad... | Mathlib/LinearAlgebra/Projection.lean | 396 | 410 | theorem isProj_iff_idempotent (f : M →ₗ[S] M) : (∃ p : Submodule S M, IsProj p f) ↔ f ∘ₗ f = f := by |
constructor
· intro h
obtain ⟨p, hp⟩ := h
ext x
rw [comp_apply]
exact hp.map_id (f x) (hp.map_mem x)
· intro h
use range f
constructor
· intro x
exact mem_range_self f x
· intro x hx
obtain ⟨y, hy⟩ := mem_range.1 hx
rw [← hy, ← comp_apply, h]
| [
" (∃ p, IsProj p f) ↔ f ∘ₗ f = f",
" (∃ p, IsProj p f) → f ∘ₗ f = f",
" f ∘ₗ f = f",
" (f ∘ₗ f) x = f x",
" f (f x) = f x",
" f ∘ₗ f = f → ∃ p, IsProj p f",
" ∃ p, IsProj p f",
" IsProj (range f) f",
" ∀ (x : M), f x ∈ range f",
" f x ∈ range f",
" ∀ x ∈ range f, f x = x",
" f x = x"
] | [] |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section support
v... | Mathlib/GroupTheory/Perm/Support.lean | 324 | 329 | theorem support_congr (h : f.support ⊆ g.support) (h' : ∀ x ∈ g.support, f x = g x) : f = g := by |
ext x
by_cases hx : x ∈ g.support
· exact h' x hx
· rw [not_mem_support.mp hx, ← not_mem_support]
exact fun H => hx (h H)
| [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x",
" ↑f.support = {x | f x ≠ x}",
" x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}",
" σ.support = ∅ ↔ σ = 1",
" support 1 = ∅",
" f = g",
" f x = g x",
" x ∉ f.support"
] | [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x",
" ↑f.support = {x | f x ≠ x}",
" x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}",
" σ.support = ∅ ↔ σ = 1",
" support 1 = ∅"
] |
import Mathlib.CategoryTheory.Monad.Types
import Mathlib.CategoryTheory.Monad.Limits
import Mathlib.CategoryTheory.Equivalence
import Mathlib.Topology.Category.CompHaus.Basic
import Mathlib.Topology.Category.Profinite.Basic
import Mathlib.Data.Set.Constructions
#align_import topology.category.Compactum from "leanprov... | Mathlib/Topology/Category/Compactum.lean | 158 | 162 | theorem join_distrib (X : Compactum) (uux : Ultrafilter (Ultrafilter X)) :
X.str (X.join uux) = X.str (map X.str uux) := by |
change ((β ).μ.app _ ≫ X.a) _ = _
rw [Monad.Algebra.assoc]
rfl
| [
" X.str (X.incl x) = x",
" (β.η.app X.A ≫ X.a) x = x",
" 𝟙 X.A x = x",
" f.f (X.str xs) = Y.str (Ultrafilter.map f.f xs)",
" (X.a ≫ f.f) xs = Y.str (Ultrafilter.map f.f xs)",
" (β.map f.f ≫ Y.a) xs = Y.str (Ultrafilter.map f.f xs)",
" X.str (X.join uux) = X.str (Ultrafilter.map X.str uux)",
" (β.μ.ap... | [
" X.str (X.incl x) = x",
" (β.η.app X.A ≫ X.a) x = x",
" 𝟙 X.A x = x",
" f.f (X.str xs) = Y.str (Ultrafilter.map f.f xs)",
" (X.a ≫ f.f) xs = Y.str (Ultrafilter.map f.f xs)",
" (β.map f.f ≫ Y.a) xs = Y.str (Ultrafilter.map f.f xs)"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.Matrix.Trace
#align_import data.matrix.basis from "leanprover-community/mathlib"@"320df450e9abeb5fc6417971e75acb6ae8bc3794"
variable {l m n : Type*}
variable {R α : Type*}
namespace Matrix
open Matrix
variable [DecidableEq l] [DecidableEq m] [Decida... | Mathlib/Data/Matrix/Basis.lean | 65 | 79 | theorem matrix_eq_sum_std_basis [Fintype m] [Fintype n] (x : Matrix m n α) :
x = ∑ i : m, ∑ j : n, stdBasisMatrix i j (x i j) := by |
ext i j; symm
iterate 2 rw [Finset.sum_apply]
-- Porting note: was `convert`
refine (Fintype.sum_eq_single i ?_).trans ?_; swap
· -- Porting note: `simp` seems unwilling to apply `Fintype.sum_apply`
simp (config := { unfoldPartialApp := true }) only [stdBasisMatrix]
rw [Fintype.sum_apply, Fintype.sum... | [
" r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0",
" stdBasisMatrix i j 0 = 0",
" (fun i' j'... | [
" r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0",
" stdBasisMatrix i j 0 = 0",
" (fun i' j'... |
import Mathlib.Data.SetLike.Basic
import Mathlib.Data.Finset.Preimage
import Mathlib.ModelTheory.Semantics
#align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w u₁
namespace Set
variable {M : Type w} (A : Set M) (L : FirstOrder.Lang... | Mathlib/ModelTheory/Definability.lean | 106 | 112 | theorem Definable.inter {f g : Set (α → M)} (hf : A.Definable L f) (hg : A.Definable L g) :
A.Definable L (f ∩ g) := by |
rcases hf with ⟨φ, rfl⟩
rcases hg with ⟨θ, rfl⟩
refine ⟨φ ⊓ θ, ?_⟩
ext
simp
| [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... |
import Mathlib.Geometry.Euclidean.Circumcenter
#align_import geometry.euclidean.monge_point from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0"
noncomputable section
open scoped Classical
open scoped RealInnerProductSpace
namespace Affine
namespace Simplex
open Finset AffineSubspac... | Mathlib/Geometry/Euclidean/MongePoint.lean | 118 | 125 | theorem sum_mongePointWeightsWithCircumcenter (n : ℕ) :
∑ i, mongePointWeightsWithCircumcenter n i = 1 := by |
simp_rw [sum_pointsWithCircumcenter, mongePointWeightsWithCircumcenter, sum_const, card_fin,
nsmul_eq_mul]
-- Porting note: replaced
-- have hn1 : (n + 1 : ℝ) ≠ 0 := mod_cast Nat.succ_ne_zero _
field_simp [n.cast_add_one_ne_zero]
ring
| [
" s₁.mongePoint = s₂.mongePoint",
" ∑ i : PointsWithCircumcenterIndex (n + 2), mongePointWeightsWithCircumcenter n i = 1",
" ↑(n + 2 + 1) * (↑(n + 1))⁻¹ + -2 / ↑(n + 1) = 1",
" ↑n + 2 + 1 + -2 = ↑n + 1"
] | [
" s₁.mongePoint = s₂.mongePoint"
] |
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 | 313 | 318 | theorem row_eq_prod {μ : YoungDiagram} {i : ℕ} : μ.row i = {i} ×ˢ Finset.range (μ.rowLen i) := by |
ext ⟨a, b⟩
simp only [Finset.mem_product, Finset.mem_singleton, Finset.mem_range, mem_row_iff,
mem_iff_lt_rowLen, and_comm, and_congr_right_iff]
rintro rfl
rfl
| [
" μ = ν",
" c ∈ μ.row i ↔ c ∈ μ ∧ c.1 = i",
" (i, j) ∈ μ.row i ↔ (i, j) ∈ μ",
" ∃ j, (i, j) ∉ μ",
" x✝³ = x✝¹",
" x✝² = x✝²",
" (i, j) ∈ μ ↔ j < μ.rowLen i",
" (i, j) ∈ μ ↔ ∀ m ≤ j, ¬(i, m) ∉ μ",
" (i, j) ∈ μ ↔ ∀ m ≤ j, (i, m) ∈ μ",
" i ≤ i",
" j ≤ j",
" μ.row i = {i} ×ˢ Finset.range (μ.rowLen... | [
" μ = ν",
" c ∈ μ.row i ↔ c ∈ μ ∧ c.1 = i",
" (i, j) ∈ μ.row i ↔ (i, j) ∈ μ",
" ∃ j, (i, j) ∉ μ",
" x✝³ = x✝¹",
" x✝² = x✝²",
" (i, j) ∈ μ ↔ j < μ.rowLen i",
" (i, j) ∈ μ ↔ ∀ m ≤ j, ¬(i, m) ∉ μ",
" (i, j) ∈ μ ↔ ∀ m ≤ j, (i, m) ∈ μ",
" i ≤ i",
" j ≤ j"
] |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.SetTheory.Cardinal.Cofinality
#align_import linear_algebra.basis from "leanprover-communit... | Mathlib/LinearAlgebra/Basis.lean | 173 | 175 | theorem total_repr : Finsupp.total _ _ _ b (b.repr x) = x := by |
rw [← b.coe_repr_symm]
exact b.repr.symm_apply_apply x
| [
" { repr := b } = default",
" f = g",
" { repr := repr✝ } = g",
" { repr := repr✝¹ } = { repr := repr✝ }",
" ↑f.repr.symm = ↑g.repr.symm",
" (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i 1)",
" b... | [
" { repr := b } = default",
" f = g",
" { repr := repr✝ } = g",
" { repr := repr✝¹ } = { repr := repr✝ }",
" ↑f.repr.symm = ↑g.repr.symm",
" (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i 1)",
" b... |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Multiset.Basic
#align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4"
assert_not_exists MonoidWithZero
variable {F ι α β γ : Type*}
names... | Mathlib/Algebra/BigOperators/Group/Multiset.lean | 136 | 139 | theorem prod_map_eq_pow_single [DecidableEq ι] (i : ι)
(hf : ∀ i' ≠ i, i' ∈ m → f i' = 1) : (m.map f).prod = f i ^ m.count i := by |
induction' m using Quotient.inductionOn with l
simp [List.prod_map_eq_pow_single i f hf]
| [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... | [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... |
import Mathlib.SetTheory.Cardinal.Ordinal
import Mathlib.SetTheory.Ordinal.FixedPoint
#align_import set_theory.cardinal.cofinality from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f"
noncomputable section
open Function Cardinal Set Order
open scoped Classical
open Cardinal Ordinal
un... | Mathlib/SetTheory/Cardinal/Cofinality.lean | 80 | 85 | theorem le_cof {r : α → α → Prop} [IsRefl α r] (c : Cardinal) :
c ≤ cof r ↔ ∀ {S : Set α}, (∀ a, ∃ b ∈ S, r a b) → c ≤ #S := by |
rw [cof, le_csInf_iff'' (cof_nonempty r)]
use fun H S h => H _ ⟨S, h, rfl⟩
rintro H d ⟨S, h, rfl⟩
exact H h
| [
" c ≤ cof r ↔ ∀ {S : Set α}, (∀ (a : α), ∃ b ∈ S, r a b) → c ≤ #↑S",
" (∀ b ∈ {c | ∃ S, (∀ (a : α), ∃ b ∈ S, r a b) ∧ #↑S = c}, c ≤ b) ↔ ∀ {S : Set α}, (∀ (a : α), ∃ b ∈ S, r a b) → c ≤ #↑S",
" (∀ {S : Set α}, (∀ (a : α), ∃ b ∈ S, r a b) → c ≤ #↑S) → ∀ b ∈ {c | ∃ S, (∀ (a : α), ∃ b ∈ S, r a b) ∧ #↑S = c}, c ≤ b... | [] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section IsCoprime
variable {R : Type ... | Mathlib/RingTheory/Coprime/Lemmas.lean | 94 | 108 | theorem Finset.prod_dvd_of_coprime :
(t : Set I).Pairwise (IsCoprime on s) → (∀ i ∈ t, s i ∣ z) → (∏ x ∈ t, s x) ∣ z := by |
classical
exact Finset.induction_on t (fun _ _ ↦ one_dvd z)
(by
intro a r har ih Hs Hs1
rw [Finset.prod_insert har]
have aux1 : a ∈ (↑(insert a r) : Set I) := Finset.mem_insert_self a r
refine
(IsCoprime.prod_right fun i hir ↦
Hs aux1 (Finset.mem_insert_of_mem hir)... | [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... | [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... |
import Mathlib.CategoryTheory.Closed.Cartesian
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
#align_import category_theory.closed.functor from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184"
noncomputable secti... | Mathlib/CategoryTheory/Closed/Functor.lean | 128 | 149 | theorem frobeniusMorphism_mate (h : L ⊣ F) (A : C) :
transferNatTransSelf (h.comp (exp.adjunction A)) ((exp.adjunction (F.obj A)).comp h)
(frobeniusMorphism F h A) =
expComparison F A := by |
rw [← Equiv.eq_symm_apply]
ext B : 2
dsimp [frobeniusMorphism, transferNatTransSelf, transferNatTrans, Adjunction.comp]
simp only [id_comp, comp_id]
rw [← L.map_comp_assoc, prod.map_id_comp, assoc]
-- Porting note: need to use `erw` here.
-- https://github.com/leanprover-community/mathlib4/issues/5164
... | [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (𝟙 (L.obj B)))",
" prod.map (𝟙 (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A ⟹ B)) ≫ F.map ((exp.ev A).app B)",
" inv (prodComparison F ... | [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (𝟙 (L.obj B)))",
" prod.map (𝟙 (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A ⟹ B)) ≫ F.map ((exp.ev A).app B)",
" inv (prodComparison F ... |
import Mathlib.RingTheory.Ideal.Maps
#align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301"
universe u v
variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S)
namespace Ideal
def prod : Ideal (R × S) where
... | Mathlib/RingTheory/Ideal/Prod.lean | 108 | 118 | theorem isPrime_of_isPrime_prod_top {I : Ideal R} (h : (Ideal.prod I (⊤ : Ideal S)).IsPrime) :
I.IsPrime := by |
constructor
· contrapose! h
rw [h, prod_top_top, isPrime_iff]
simp [isPrime_iff, h]
· intro x y hxy
have : (⟨x, 1⟩ : R × S) * ⟨y, 1⟩ ∈ prod I ⊤ := by
rw [Prod.mk_mul_mk, mul_one, mem_prod]
exact ⟨hxy, trivial⟩
simpa using h.mem_or_mem this
| [
" ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier",
" ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a... | [
" ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier",
" ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a... |
import Mathlib.Data.Int.Bitwise
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb"
open Matrix
namespace Matrix
variable {n' : Type*} [Decidab... | Mathlib/LinearAlgebra/Matrix/ZPow.lean | 57 | 70 | theorem pow_inv_comm' (A : M) (m n : ℕ) : A⁻¹ ^ m * A ^ n = A ^ n * A⁻¹ ^ m := by |
induction' n with n IH generalizing m
· simp
cases' m with m m
· simp
rcases nonsing_inv_cancel_or_zero A with (⟨h, h'⟩ | h)
· calc
A⁻¹ ^ (m + 1) * A ^ (n + 1) = A⁻¹ ^ m * (A⁻¹ * A) * A ^ n := by
simp only [pow_succ A⁻¹, pow_succ' A, Matrix.mul_assoc]
_ = A ^ n * A⁻¹ ^ m := by simp onl... | [
" Monoid M",
" Inv M",
" A⁻¹ ^ n = (A ^ n)⁻¹",
" A⁻¹ ^ 0 = (A ^ 0)⁻¹",
" A⁻¹ ^ (n + 1) = (A ^ (n + 1))⁻¹",
" A ^ (m - n) = A ^ m * (A ^ n)⁻¹",
" IsUnit (A ^ n).det",
" A⁻¹ ^ m * A ^ n = A ^ n * A⁻¹ ^ m",
" A⁻¹ ^ m * A ^ 0 = A ^ 0 * A⁻¹ ^ m",
" A⁻¹ ^ m * A ^ (n + 1) = A ^ (n + 1) * A⁻¹ ^ m",
" A⁻... | [
" Monoid M",
" Inv M",
" A⁻¹ ^ n = (A ^ n)⁻¹",
" A⁻¹ ^ 0 = (A ^ 0)⁻¹",
" A⁻¹ ^ (n + 1) = (A ^ (n + 1))⁻¹",
" A ^ (m - n) = A ^ m * (A ^ n)⁻¹",
" IsUnit (A ^ n).det"
] |
import Mathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus.Restrict
import Mathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus
import Mathlib.Analysis.NormedSpace.Star.Spectrum
import Mathlib.Analysis.NormedSpace.Star.Unitization
import Mathlib.Topology.ContinuousFunction.UniqueCFC
noncomputab... | Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus/Instances.lean | 120 | 136 | theorem RCLike.nonUnitalContinuousFunctionalCalculus :
NonUnitalContinuousFunctionalCalculus 𝕜 (p : A → Prop) where
exists_cfc_of_predicate a ha := by |
let ψ : C(σₙ 𝕜 a, 𝕜)₀ →⋆ₙₐ[𝕜] A := comp (inrRangeEquiv 𝕜 A).symm <|
codRestrict (cfcₙAux hp₁ a ha) _ (cfcₙAux_mem_range_inr hp₁ a ha)
have coe_ψ (f : C(σₙ 𝕜 a, 𝕜)₀) : ψ f = cfcₙAux hp₁ a ha f :=
congr_arg Subtype.val <| (inrRangeEquiv 𝕜 A).apply_symm_apply
⟨cfcₙAux hp₁ a ha f, cfcₙAu... | [
" ClosedEmbedding ⇑(cfcₙAux ⋯ a ha)",
" ClosedEmbedding\n ((⇑↑(cfcHom ⋯) ∘ ⇑↑(Homeomorph.compStarAlgEquiv' 𝕜 𝕜 (Homeomorph.setCongr ⋯))) ∘\n ⇑ContinuousMapZero.toContinuousMapHom)",
" ClosedEmbedding ⇑↑(Homeomorph.compStarAlgEquiv' 𝕜 𝕜 (Homeomorph.setCongr ⋯))",
" σ 𝕜 ((cfcₙAux ⋯ a ha) f) = Set.r... | [
" ClosedEmbedding ⇑(cfcₙAux ⋯ a ha)",
" ClosedEmbedding\n ((⇑↑(cfcHom ⋯) ∘ ⇑↑(Homeomorph.compStarAlgEquiv' 𝕜 𝕜 (Homeomorph.setCongr ⋯))) ∘\n ⇑ContinuousMapZero.toContinuousMapHom)",
" ClosedEmbedding ⇑↑(Homeomorph.compStarAlgEquiv' 𝕜 𝕜 (Homeomorph.setCongr ⋯))",
" σ 𝕜 ((cfcₙAux ⋯ a ha) f) = Set.r... |
import Mathlib.Data.Nat.Bits
import Mathlib.Order.Lattice
#align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
namespace Nat
section
set_option linter.deprecated false
theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n := shiftLeft_eq _
#align nat.... | Mathlib/Data/Nat/Size.lean | 141 | 141 | theorem size_pos {n : ℕ} : 0 < size n ↔ 0 < n := by | rw [lt_size]; rfl
| [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... |
import Mathlib.Analysis.BoxIntegral.Box.Basic
import Mathlib.Analysis.SpecificLimits.Basic
#align_import analysis.box_integral.box.subbox_induction from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Finset Function Filter Metric Classical Topology Filter ENNReal
noncomputable... | Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean | 95 | 97 | theorem iUnion_coe_splitCenterBox (I : Box ι) : ⋃ s, (I.splitCenterBox s : Set (ι → ℝ)) = I := by |
ext x
simp
| [
" s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i",
" (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2",
" (I.lower i + I.upper i) / 2 < I.upper i",
" I.lower i... | [
" s.piecewise (fun i => (I.lower i + I.upper i) / 2) I.lower i <\n s.piecewise I.upper (fun i => (I.lower i + I.upper i) / 2) i",
" (if i ∈ s then (I.lower i + I.upper i) / 2 else I.lower i) < if i ∈ s then I.upper i else (I.lower i + I.upper i) / 2",
" (I.lower i + I.upper i) / 2 < I.upper i",
" I.lower i... |
import Mathlib.Order.Filter.Bases
import Mathlib.Order.ConditionallyCompleteLattice.Basic
#align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Set Classical Filter Function
namespace Filter
variable {α β γ : Type*} {ι : Sort*}
section lift
protect... | Mathlib/Order/Filter/Lift.lean | 78 | 81 | theorem sInter_lift_sets (hg : Monotone g) :
⋂₀ { s | s ∈ f.lift g } = ⋂ s ∈ f, ⋂₀ { t | t ∈ g s } := by |
simp only [sInter_eq_biInter, mem_setOf_eq, Filter.mem_sets, mem_lift_sets hg, iInter_exists,
iInter_and, @iInter_comm _ (Set β)]
| [
" ⊤.lift g = g univ",
" s ∈ f.lift g ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s",
" DirectedOn ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) f.sets",
" ∃ z ∈ f.sets, ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) t₁ z ∧ ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) t₂ z",
" (∃ i ∈ f.sets, s ∈ g i) ↔ ∃ i, p i ∧ ∃ x, pg i x... | [
" ⊤.lift g = g univ",
" s ∈ f.lift g ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s",
" DirectedOn ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) f.sets",
" ∃ z ∈ f.sets, ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) t₁ z ∧ ((fun s => g s) ⁻¹'o fun x x_1 => x ≥ x_1) t₂ z",
" (∃ i ∈ f.sets, s ∈ g i) ↔ ∃ i, p i ∧ ∃ x, pg i x... |
import Mathlib.GroupTheory.GroupAction.Pointwise
import Mathlib.Analysis.LocallyConvex.Basic
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Bornology.Basic
import Mathlib.Topology.Algebra.UniformGroup
import Mathlib.Topology.UniformSpace.Cauchy
import Ma... | Mathlib/Analysis/LocallyConvex/Bounded.lean | 80 | 84 | theorem _root_.Filter.HasBasis.isVonNBounded_iff {q : ι → Prop} {s : ι → Set E} {A : Set E}
(h : (𝓝 (0 : E)).HasBasis q s) : IsVonNBounded 𝕜 A ↔ ∀ i, q i → Absorbs 𝕜 (s i) A := by |
refine ⟨fun hA i hi => hA (h.mem_of_mem hi), fun hA V hV => ?_⟩
rcases h.mem_iff.mp hV with ⟨i, hi, hV⟩
exact (hA i hi).mono_left hV
| [
" IsVonNBounded 𝕜 A ↔ ∀ (i : ι), q i → Absorbs 𝕜 (s i) A",
" Absorbs 𝕜 V A"
] | [] |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Module.BigOperators
import Mathlib.LinearAlgebra.Isomorphisms
import Mathlib.GroupTheory.Torsion
import Mathlib.RingTheory.Coprime.Ideal
import Mathlib.RingTheory.Finiteness
import Mathlib.Data.Set.Lattice
#align_import algebra.module.torsion from "leanpr... | Mathlib/Algebra/Module/Torsion.lean | 79 | 79 | theorem torsionOf_zero : torsionOf R M (0 : M) = ⊤ := by | simp [torsionOf]
| [
" torsionOf R M 0 = ⊤"
] | [] |
import Mathlib.Algebra.MvPolynomial.Variables
#align_import data.mv_polynomial.supported from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
universe u v w
namespace MvPolynomial
variable {σ τ : Type*} {R : Type u} {S : Type v} {r : R} {e : ℕ} {n m : σ}
section CommSemiring
variable... | Mathlib/Algebra/MvPolynomial/Supported.lean | 46 | 48 | theorem supported_eq_range_rename (s : Set σ) : supported R s = (rename ((↑) : s → σ)).range := by |
rw [supported, Set.image_eq_range, adjoin_range_eq_range_aeval, rename]
congr
| [
" supported R s = (rename Subtype.val).range",
" (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range"
] | [] |
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.ContinuousFunction.Compact
import Mathlib.Topology.UrysohnsLemma
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Topology.Algebra.Module.CharacterSpace
#align_import topology.continuous_function.ideals from "... | Mathlib/Topology/ContinuousFunction/Ideals.lean | 123 | 125 | theorem mem_setOfIdeal {I : Ideal C(X, R)} {x : X} :
x ∈ setOfIdeal I ↔ ∃ f ∈ I, (f : C(X, R)) x ≠ 0 := by |
simp_rw [setOfIdeal, Set.mem_compl_iff, Set.mem_setOf]; push_neg; rfl
| [
" (f + g) x = 0",
" IsClosed ↑(idealOfSet R s)",
" IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }",
" f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0",
" f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (∃ x ∈ sᶜ, f x ≠ 0... | [
" (f + g) x = 0",
" IsClosed ↑(idealOfSet R s)",
" IsClosed ↑{ carrier := ⋂ i ∈ sᶜ, {x | x i = 0}, add_mem' := ⋯, zero_mem' := ⋯ }",
" f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0",
" f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0",
" (∃ x ∈ sᶜ, f x ≠ 0... |
import Mathlib.RingTheory.Nilpotent.Basic
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import algebra.squarefree from "leanprover-community/mathlib"@"00d163e35035c3577c1c79fa53b68de17781ffc1"
variable {R : Type*}
def Squarefree [Monoid R] (r : R) : Prop :=
∀ x : R, x * x ∣ r → IsUnit x
#align sq... | Mathlib/Algebra/Squarefree/Basic.lean | 92 | 98 | theorem Squarefree.eq_zero_or_one_of_pow_of_not_isUnit [CommMonoid R] {x : R} {n : ℕ}
(h : Squarefree (x ^ n)) (h' : ¬ IsUnit x) :
n = 0 ∨ n = 1 := by |
contrapose! h'
replace h' : 2 ≤ n := by omega
have : x * x ∣ x ^ n := by rw [← sq]; exact pow_dvd_pow x h'
exact h.squarefree_of_dvd this x (refl _)
| [
" ¬Squarefree 0",
" ∃ x, ¬(x * x ∣ 0 → IsUnit x)",
" ¬(0 * 0 ∣ 0 → IsUnit 0)",
" m ≠ 0",
" False",
" Squarefree x",
" IsUnit y",
" n = 0 ∨ n = 1",
" IsUnit x",
" 2 ≤ n",
" x * x ∣ x ^ n",
" x ^ 2 ∣ x ^ n"
] | [
" ¬Squarefree 0",
" ∃ x, ¬(x * x ∣ 0 → IsUnit x)",
" ¬(0 * 0 ∣ 0 → IsUnit 0)",
" m ≠ 0",
" False",
" Squarefree x",
" IsUnit y"
] |
import Mathlib.Data.Sign
import Mathlib.Topology.Order.Basic
#align_import topology.instances.sign from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
instance : TopologicalSpace SignType :=
⊥
instance : DiscreteTopology SignType :=
⟨rfl⟩
variable {α : Type*} [Zero α] [Topological... | Mathlib/Topology/Instances/Sign.lean | 32 | 35 | theorem continuousAt_sign_of_pos {a : α} (h : 0 < a) : ContinuousAt SignType.sign a := by |
refine (continuousAt_const : ContinuousAt (fun _ => (1 : SignType)) a).congr ?_
rw [Filter.EventuallyEq, eventually_nhds_iff]
exact ⟨{ x | 0 < x }, fun x hx => (sign_pos hx).symm, isOpen_lt' 0, h⟩
| [
" ContinuousAt (⇑SignType.sign) a",
" (fun x => 1) =ᶠ[nhds a] ⇑SignType.sign",
" ∃ t, (∀ x ∈ t, 1 = SignType.sign x) ∧ IsOpen t ∧ a ∈ t"
] | [] |
import Mathlib.Data.ENNReal.Real
import Mathlib.Order.Interval.Finset.Nat
import Mathlib.Topology.UniformSpace.Pi
import Mathlib.Topology.UniformSpace.UniformConvergence
import Mathlib.Topology.UniformSpace.UniformEmbedding
#align_import topology.metric_space.emetric_space from "leanprover-community/mathlib"@"c8f3055... | Mathlib/Topology/EMetricSpace/Basic.lean | 114 | 115 | theorem edist_triangle_right (x y z : α) : edist x y ≤ edist x z + edist y z := by |
rw [edist_comm y]; apply edist_triangle
| [
" s ∈ U ↔ ∃ i > z, {p | D p.1 p.2 < i} ⊆ s",
" m = m'",
" mk edist_self✝ edist_comm✝ edist_triangle✝ U hU = m'",
" mk edist_self✝¹ edist_comm✝¹ edist_triangle✝¹ U hU = mk edist_self✝ edist_comm✝ edist_triangle✝ U' hU'",
" U = U'",
" edist x y ≤ edist z x + edist z y",
" edist x y ≤ edist x z + edist z y... | [
" s ∈ U ↔ ∃ i > z, {p | D p.1 p.2 < i} ⊆ s",
" m = m'",
" mk edist_self✝ edist_comm✝ edist_triangle✝ U hU = m'",
" mk edist_self✝¹ edist_comm✝¹ edist_triangle✝¹ U hU = mk edist_self✝ edist_comm✝ edist_triangle✝ U' hU'",
" U = U'",
" edist x y ≤ edist z x + edist z y",
" edist x y ≤ edist x z + edist z y... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.