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 | num_lines int64 1 150 | complexity_score float64 2.72 139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B | diff_level int64 0 2 | file_diff_level float64 0 2 | theorem_same_file int64 1 32 | rank_file int64 0 2.51k |
|---|---|---|---|---|---|---|---|---|---|---|---|
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N : Type w)
open Module.Free (chooseBasis ChooseBasisIndex)
open FiniteDimensional (finrank)
section Ring
variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M]
variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N]
private noncomputable def linearMapEquivFun : (M ββ[R] N) ββ[S] ChooseBasisIndex R M β N :=
(chooseBasis R M).repr.congrLeft N S βͺβ«β (Finsupp.lsum S).symm βͺβ«β
LinearEquiv.piCongrRight fun _ β¦ LinearMap.ringLmapEquivSelf R S N
instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M ββ[R] N) :=
Module.Free.of_equiv (linearMapEquivFun R S M N).symm
#align module.free.linear_map Module.Free.linearMap
instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M ββ[R] N) :=
Module.Finite.equiv (linearMapEquivFun R S M N).symm
#align module.finite.linear_map Module.Finite.linearMap
variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N]
open Cardinal
| Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 53 | 56 | theorem FiniteDimensional.rank_linearMap :
Module.rank S (M ββ[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by |
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul,
β finrank_eq_card_chooseBasisIndex, β finrank_eq_rank R, lift_natCast]
| 2 | 7.389056 | 1 | 0.6 | 5 | 528 |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N : Type w)
open Module.Free (chooseBasis ChooseBasisIndex)
open FiniteDimensional (finrank)
section Ring
variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M]
variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N]
private noncomputable def linearMapEquivFun : (M ββ[R] N) ββ[S] ChooseBasisIndex R M β N :=
(chooseBasis R M).repr.congrLeft N S βͺβ«β (Finsupp.lsum S).symm βͺβ«β
LinearEquiv.piCongrRight fun _ β¦ LinearMap.ringLmapEquivSelf R S N
instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M ββ[R] N) :=
Module.Free.of_equiv (linearMapEquivFun R S M N).symm
#align module.free.linear_map Module.Free.linearMap
instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M ββ[R] N) :=
Module.Finite.equiv (linearMapEquivFun R S M N).symm
#align module.finite.linear_map Module.Finite.linearMap
variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N]
open Cardinal
theorem FiniteDimensional.rank_linearMap :
Module.rank S (M ββ[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul,
β finrank_eq_card_chooseBasisIndex, β finrank_eq_rank R, lift_natCast]
| Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 59 | 61 | theorem FiniteDimensional.finrank_linearMap :
finrank S (M ββ[R] N) = finrank R M * finrank S N := by |
simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift]
| 1 | 2.718282 | 0 | 0.6 | 5 | 528 |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N : Type w)
open Module.Free (chooseBasis ChooseBasisIndex)
open FiniteDimensional (finrank)
section Ring
variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M]
variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N]
private noncomputable def linearMapEquivFun : (M ββ[R] N) ββ[S] ChooseBasisIndex R M β N :=
(chooseBasis R M).repr.congrLeft N S βͺβ«β (Finsupp.lsum S).symm βͺβ«β
LinearEquiv.piCongrRight fun _ β¦ LinearMap.ringLmapEquivSelf R S N
instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M ββ[R] N) :=
Module.Free.of_equiv (linearMapEquivFun R S M N).symm
#align module.free.linear_map Module.Free.linearMap
instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M ββ[R] N) :=
Module.Finite.equiv (linearMapEquivFun R S M N).symm
#align module.finite.linear_map Module.Finite.linearMap
variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N]
open Cardinal
theorem FiniteDimensional.rank_linearMap :
Module.rank S (M ββ[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul,
β finrank_eq_card_chooseBasisIndex, β finrank_eq_rank R, lift_natCast]
theorem FiniteDimensional.finrank_linearMap :
finrank S (M ββ[R] N) = finrank R M * finrank S N := by
simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift]
#align finite_dimensional.finrank_linear_map FiniteDimensional.finrank_linearMap
variable [Module R S] [SMulCommClass R S S]
| Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 66 | 68 | theorem FiniteDimensional.rank_linearMap_self :
Module.rank S (M ββ[R] S) = lift.{u'} (Module.rank R M) := by |
rw [rank_linearMap, rank_self, lift_one, mul_one]
| 1 | 2.718282 | 0 | 0.6 | 5 | 528 |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N : Type w)
open Module.Free (chooseBasis ChooseBasisIndex)
open FiniteDimensional (finrank)
section Ring
variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M]
variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N]
private noncomputable def linearMapEquivFun : (M ββ[R] N) ββ[S] ChooseBasisIndex R M β N :=
(chooseBasis R M).repr.congrLeft N S βͺβ«β (Finsupp.lsum S).symm βͺβ«β
LinearEquiv.piCongrRight fun _ β¦ LinearMap.ringLmapEquivSelf R S N
instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M ββ[R] N) :=
Module.Free.of_equiv (linearMapEquivFun R S M N).symm
#align module.free.linear_map Module.Free.linearMap
instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M ββ[R] N) :=
Module.Finite.equiv (linearMapEquivFun R S M N).symm
#align module.finite.linear_map Module.Finite.linearMap
variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N]
open Cardinal
theorem FiniteDimensional.rank_linearMap :
Module.rank S (M ββ[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul,
β finrank_eq_card_chooseBasisIndex, β finrank_eq_rank R, lift_natCast]
theorem FiniteDimensional.finrank_linearMap :
finrank S (M ββ[R] N) = finrank R M * finrank S N := by
simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift]
#align finite_dimensional.finrank_linear_map FiniteDimensional.finrank_linearMap
variable [Module R S] [SMulCommClass R S S]
theorem FiniteDimensional.rank_linearMap_self :
Module.rank S (M ββ[R] S) = lift.{u'} (Module.rank R M) := by
rw [rank_linearMap, rank_self, lift_one, mul_one]
| Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 70 | 71 | theorem FiniteDimensional.finrank_linearMap_self : finrank S (M ββ[R] S) = finrank R M := by |
rw [finrank_linearMap, finrank_self, mul_one]
| 1 | 2.718282 | 0 | 0.6 | 5 | 528 |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N : Type w)
open Module.Free (chooseBasis ChooseBasisIndex)
open FiniteDimensional (finrank)
| Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 113 | 119 | theorem Matrix.rank_vecMulVec {K m n : Type u} [CommRing K] [Fintype n]
[DecidableEq n] (w : m β K) (v : n β K) : (Matrix.vecMulVec w v).toLin'.rank β€ 1 := by |
nontriviality K
rw [Matrix.vecMulVec_eq, Matrix.toLin'_mul]
refine le_trans (LinearMap.rank_comp_le_left _ _) ?_
refine (LinearMap.rank_le_domain _).trans_eq ?_
rw [rank_fun', Fintype.card_unit, Nat.cast_one]
| 5 | 148.413159 | 2 | 0.6 | 5 | 528 |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ENNReal
def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β Ξ²) : Prop :=
β x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2
#align isometry Isometry
| Mathlib/Topology/MetricSpace/Isometry.lean | 40 | 42 | theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by |
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
| 1 | 2.718282 | 0 | 0.6 | 5 | 529 |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ENNReal
def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β Ξ²) : Prop :=
β x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2
#align isometry Isometry
theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
#align isometry_iff_nndist_eq isometry_iff_nndist_eq
| Mathlib/Topology/MetricSpace/Isometry.lean | 46 | 48 | theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, dist (f x) (f y) = dist x y := by |
simp only [isometry_iff_nndist_eq, β coe_nndist, NNReal.coe_inj]
| 1 | 2.718282 | 0 | 0.6 | 5 | 529 |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ENNReal
def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β Ξ²) : Prop :=
β x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2
#align isometry Isometry
theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
#align isometry_iff_nndist_eq isometry_iff_nndist_eq
theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, dist (f x) (f y) = dist x y := by
simp only [isometry_iff_nndist_eq, β coe_nndist, NNReal.coe_inj]
#align isometry_iff_dist_eq isometry_iff_dist_eq
alias β¨Isometry.dist_eq, _β© := isometry_iff_dist_eq
#align isometry.dist_eq Isometry.dist_eq
alias β¨_, Isometry.of_dist_eqβ© := isometry_iff_dist_eq
#align isometry.of_dist_eq Isometry.of_dist_eq
alias β¨Isometry.nndist_eq, _β© := isometry_iff_nndist_eq
#align isometry.nndist_eq Isometry.nndist_eq
alias β¨_, Isometry.of_nndist_eqβ© := isometry_iff_nndist_eq
#align isometry.of_nndist_eq Isometry.of_nndist_eq
namespace Isometry
section PseudoEmetricIsometry
variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³]
variable {f : Ξ± β Ξ²} {x y z : Ξ±} {s : Set Ξ±}
theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y :=
hf x y
#align isometry.edist_eq Isometry.edist_eq
theorem lipschitz (h : Isometry f) : LipschitzWith 1 f :=
LipschitzWith.of_edist_le fun x y => (h x y).le
#align isometry.lipschitz Isometry.lipschitz
theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by
simp only [h x y, ENNReal.coe_one, one_mul, le_refl]
#align isometry.antilipschitz Isometry.antilipschitz
@[nontriviality]
theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by
rw [Subsingleton.elim x y]; simp
#align isometry_subsingleton isometry_subsingleton
theorem _root_.isometry_id : Isometry (id : Ξ± β Ξ±) := fun _ _ => rfl
#align isometry_id isometry_id
theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β Ξ²} {g : Ξ³ β Ξ΄} (hf : Isometry f)
(hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by
simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply]
#align isometry.prod_map Isometry.prod_map
theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β Type*} [β i, PseudoEMetricSpace (Ξ± i)]
[β i, PseudoEMetricSpace (Ξ² i)] (f : β i, Ξ± i β Ξ² i) (hf : β i, Isometry (f i)) :
Isometry (fun g : (i : ΞΉ) β Ξ± i => fun i => f i (g i)) := fun x y => by
simp only [edist_pi_def, (hf _).edist_eq]
#align isometry_dcomp isometry_dcomp
theorem comp {g : Ξ² β Ξ³} {f : Ξ± β Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g β f) :=
fun _ _ => (hg _ _).trans (hf _ _)
#align isometry.comp Isometry.comp
protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f :=
hf.lipschitz.uniformContinuous
#align isometry.uniform_continuous Isometry.uniformContinuous
protected theorem uniformInducing (hf : Isometry f) : UniformInducing f :=
hf.antilipschitz.uniformInducing hf.uniformContinuous
#align isometry.uniform_inducing Isometry.uniformInducing
theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β Ξ²} {g : ΞΉ β Ξ±} {a : Filter ΞΉ} {b : Ξ±}
(hf : Isometry f) : Filter.Tendsto g a (π b) β Filter.Tendsto (f β g) a (π (f b)) :=
hf.uniformInducing.inducing.tendsto_nhds_iff
#align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff
protected theorem continuous (hf : Isometry f) : Continuous f :=
hf.lipschitz.continuous
#align isometry.continuous Isometry.continuous
theorem right_inv {f : Ξ± β Ξ²} {g : Ξ² β Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g :=
fun x y => by rw [β h, hg _, hg _]
#align isometry.right_inv Isometry.right_inv
| Mathlib/Topology/MetricSpace/Isometry.lean | 138 | 141 | theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.closedBall (f x) r = EMetric.closedBall x r := by |
ext y
simp [h.edist_eq]
| 2 | 7.389056 | 1 | 0.6 | 5 | 529 |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ENNReal
def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β Ξ²) : Prop :=
β x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2
#align isometry Isometry
theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
#align isometry_iff_nndist_eq isometry_iff_nndist_eq
theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, dist (f x) (f y) = dist x y := by
simp only [isometry_iff_nndist_eq, β coe_nndist, NNReal.coe_inj]
#align isometry_iff_dist_eq isometry_iff_dist_eq
alias β¨Isometry.dist_eq, _β© := isometry_iff_dist_eq
#align isometry.dist_eq Isometry.dist_eq
alias β¨_, Isometry.of_dist_eqβ© := isometry_iff_dist_eq
#align isometry.of_dist_eq Isometry.of_dist_eq
alias β¨Isometry.nndist_eq, _β© := isometry_iff_nndist_eq
#align isometry.nndist_eq Isometry.nndist_eq
alias β¨_, Isometry.of_nndist_eqβ© := isometry_iff_nndist_eq
#align isometry.of_nndist_eq Isometry.of_nndist_eq
namespace Isometry
section PseudoEmetricIsometry
variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³]
variable {f : Ξ± β Ξ²} {x y z : Ξ±} {s : Set Ξ±}
theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y :=
hf x y
#align isometry.edist_eq Isometry.edist_eq
theorem lipschitz (h : Isometry f) : LipschitzWith 1 f :=
LipschitzWith.of_edist_le fun x y => (h x y).le
#align isometry.lipschitz Isometry.lipschitz
theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by
simp only [h x y, ENNReal.coe_one, one_mul, le_refl]
#align isometry.antilipschitz Isometry.antilipschitz
@[nontriviality]
theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by
rw [Subsingleton.elim x y]; simp
#align isometry_subsingleton isometry_subsingleton
theorem _root_.isometry_id : Isometry (id : Ξ± β Ξ±) := fun _ _ => rfl
#align isometry_id isometry_id
theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β Ξ²} {g : Ξ³ β Ξ΄} (hf : Isometry f)
(hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by
simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply]
#align isometry.prod_map Isometry.prod_map
theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β Type*} [β i, PseudoEMetricSpace (Ξ± i)]
[β i, PseudoEMetricSpace (Ξ² i)] (f : β i, Ξ± i β Ξ² i) (hf : β i, Isometry (f i)) :
Isometry (fun g : (i : ΞΉ) β Ξ± i => fun i => f i (g i)) := fun x y => by
simp only [edist_pi_def, (hf _).edist_eq]
#align isometry_dcomp isometry_dcomp
theorem comp {g : Ξ² β Ξ³} {f : Ξ± β Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g β f) :=
fun _ _ => (hg _ _).trans (hf _ _)
#align isometry.comp Isometry.comp
protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f :=
hf.lipschitz.uniformContinuous
#align isometry.uniform_continuous Isometry.uniformContinuous
protected theorem uniformInducing (hf : Isometry f) : UniformInducing f :=
hf.antilipschitz.uniformInducing hf.uniformContinuous
#align isometry.uniform_inducing Isometry.uniformInducing
theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β Ξ²} {g : ΞΉ β Ξ±} {a : Filter ΞΉ} {b : Ξ±}
(hf : Isometry f) : Filter.Tendsto g a (π b) β Filter.Tendsto (f β g) a (π (f b)) :=
hf.uniformInducing.inducing.tendsto_nhds_iff
#align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff
protected theorem continuous (hf : Isometry f) : Continuous f :=
hf.lipschitz.continuous
#align isometry.continuous Isometry.continuous
theorem right_inv {f : Ξ± β Ξ²} {g : Ξ² β Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g :=
fun x y => by rw [β h, hg _, hg _]
#align isometry.right_inv Isometry.right_inv
theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.closedBall (f x) r = EMetric.closedBall x r := by
ext y
simp [h.edist_eq]
#align isometry.preimage_emetric_closed_ball Isometry.preimage_emetric_closedBall
| Mathlib/Topology/MetricSpace/Isometry.lean | 144 | 147 | theorem preimage_emetric_ball (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.ball (f x) r = EMetric.ball x r := by |
ext y
simp [h.edist_eq]
| 2 | 7.389056 | 1 | 0.6 | 5 | 529 |
import Mathlib.Topology.MetricSpace.Antilipschitz
#align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb"
noncomputable section
universe u v w
variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
open Function Set
open scoped Topology ENNReal
def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β Ξ²) : Prop :=
β x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2
#align isometry Isometry
theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, nndist (f x) (f y) = nndist x y := by
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
#align isometry_iff_nndist_eq isometry_iff_nndist_eq
theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β Ξ²} :
Isometry f β β x y, dist (f x) (f y) = dist x y := by
simp only [isometry_iff_nndist_eq, β coe_nndist, NNReal.coe_inj]
#align isometry_iff_dist_eq isometry_iff_dist_eq
alias β¨Isometry.dist_eq, _β© := isometry_iff_dist_eq
#align isometry.dist_eq Isometry.dist_eq
alias β¨_, Isometry.of_dist_eqβ© := isometry_iff_dist_eq
#align isometry.of_dist_eq Isometry.of_dist_eq
alias β¨Isometry.nndist_eq, _β© := isometry_iff_nndist_eq
#align isometry.nndist_eq Isometry.nndist_eq
alias β¨_, Isometry.of_nndist_eqβ© := isometry_iff_nndist_eq
#align isometry.of_nndist_eq Isometry.of_nndist_eq
namespace Isometry
section PseudoEmetricIsometry
variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³]
variable {f : Ξ± β Ξ²} {x y z : Ξ±} {s : Set Ξ±}
theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y :=
hf x y
#align isometry.edist_eq Isometry.edist_eq
theorem lipschitz (h : Isometry f) : LipschitzWith 1 f :=
LipschitzWith.of_edist_le fun x y => (h x y).le
#align isometry.lipschitz Isometry.lipschitz
theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by
simp only [h x y, ENNReal.coe_one, one_mul, le_refl]
#align isometry.antilipschitz Isometry.antilipschitz
@[nontriviality]
theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by
rw [Subsingleton.elim x y]; simp
#align isometry_subsingleton isometry_subsingleton
theorem _root_.isometry_id : Isometry (id : Ξ± β Ξ±) := fun _ _ => rfl
#align isometry_id isometry_id
theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β Ξ²} {g : Ξ³ β Ξ΄} (hf : Isometry f)
(hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by
simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply]
#align isometry.prod_map Isometry.prod_map
theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β Type*} [β i, PseudoEMetricSpace (Ξ± i)]
[β i, PseudoEMetricSpace (Ξ² i)] (f : β i, Ξ± i β Ξ² i) (hf : β i, Isometry (f i)) :
Isometry (fun g : (i : ΞΉ) β Ξ± i => fun i => f i (g i)) := fun x y => by
simp only [edist_pi_def, (hf _).edist_eq]
#align isometry_dcomp isometry_dcomp
theorem comp {g : Ξ² β Ξ³} {f : Ξ± β Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g β f) :=
fun _ _ => (hg _ _).trans (hf _ _)
#align isometry.comp Isometry.comp
protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f :=
hf.lipschitz.uniformContinuous
#align isometry.uniform_continuous Isometry.uniformContinuous
protected theorem uniformInducing (hf : Isometry f) : UniformInducing f :=
hf.antilipschitz.uniformInducing hf.uniformContinuous
#align isometry.uniform_inducing Isometry.uniformInducing
theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β Ξ²} {g : ΞΉ β Ξ±} {a : Filter ΞΉ} {b : Ξ±}
(hf : Isometry f) : Filter.Tendsto g a (π b) β Filter.Tendsto (f β g) a (π (f b)) :=
hf.uniformInducing.inducing.tendsto_nhds_iff
#align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff
protected theorem continuous (hf : Isometry f) : Continuous f :=
hf.lipschitz.continuous
#align isometry.continuous Isometry.continuous
theorem right_inv {f : Ξ± β Ξ²} {g : Ξ² β Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g :=
fun x y => by rw [β h, hg _, hg _]
#align isometry.right_inv Isometry.right_inv
theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.closedBall (f x) r = EMetric.closedBall x r := by
ext y
simp [h.edist_eq]
#align isometry.preimage_emetric_closed_ball Isometry.preimage_emetric_closedBall
theorem preimage_emetric_ball (h : Isometry f) (x : Ξ±) (r : ββ₯0β) :
f β»ΒΉ' EMetric.ball (f x) r = EMetric.ball x r := by
ext y
simp [h.edist_eq]
#align isometry.preimage_emetric_ball Isometry.preimage_emetric_ball
theorem ediam_image (hf : Isometry f) (s : Set Ξ±) : EMetric.diam (f '' s) = EMetric.diam s :=
eq_of_forall_ge_iff fun d => by simp only [EMetric.diam_le_iff, forall_mem_image, hf.edist_eq]
#align isometry.ediam_image Isometry.ediam_image
| Mathlib/Topology/MetricSpace/Isometry.lean | 155 | 157 | theorem ediam_range (hf : Isometry f) : EMetric.diam (range f) = EMetric.diam (univ : Set Ξ±) := by |
rw [β image_univ]
exact hf.ediam_image univ
| 2 | 7.389056 | 1 | 0.6 | 5 | 529 |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
namespace OuterMeasure
section CaratheodoryMeasurable
universe u
variable {Ξ± : Type u} (m : OuterMeasure Ξ±)
attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc
variable {s sβ sβ : Set Ξ±}
def IsCaratheodory (s : Set Ξ±) : Prop :=
β t, m t = m (t β© s) + m (t \ s)
#align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory
theorem isCaratheodory_iff_le' {s : Set Ξ±} :
IsCaratheodory m s β β t, m (t β© s) + m (t \ s) β€ m t :=
forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _
#align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le'
@[simp]
| Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 62 | 62 | theorem isCaratheodory_empty : IsCaratheodory m β
:= by | simp [IsCaratheodory, m.empty, diff_empty]
| 1 | 2.718282 | 0 | 0.6 | 5 | 530 |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
namespace OuterMeasure
section CaratheodoryMeasurable
universe u
variable {Ξ± : Type u} (m : OuterMeasure Ξ±)
attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc
variable {s sβ sβ : Set Ξ±}
def IsCaratheodory (s : Set Ξ±) : Prop :=
β t, m t = m (t β© s) + m (t \ s)
#align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory
theorem isCaratheodory_iff_le' {s : Set Ξ±} :
IsCaratheodory m s β β t, m (t β© s) + m (t \ s) β€ m t :=
forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _
#align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le'
@[simp]
theorem isCaratheodory_empty : IsCaratheodory m β
:= by simp [IsCaratheodory, m.empty, diff_empty]
#align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty
| Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 65 | 66 | theorem isCaratheodory_compl : IsCaratheodory m sβ β IsCaratheodory m sβαΆ := by |
simp [IsCaratheodory, diff_eq, add_comm]
| 1 | 2.718282 | 0 | 0.6 | 5 | 530 |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
namespace OuterMeasure
section CaratheodoryMeasurable
universe u
variable {Ξ± : Type u} (m : OuterMeasure Ξ±)
attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc
variable {s sβ sβ : Set Ξ±}
def IsCaratheodory (s : Set Ξ±) : Prop :=
β t, m t = m (t β© s) + m (t \ s)
#align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory
theorem isCaratheodory_iff_le' {s : Set Ξ±} :
IsCaratheodory m s β β t, m (t β© s) + m (t \ s) β€ m t :=
forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _
#align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le'
@[simp]
theorem isCaratheodory_empty : IsCaratheodory m β
:= by simp [IsCaratheodory, m.empty, diff_empty]
#align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty
theorem isCaratheodory_compl : IsCaratheodory m sβ β IsCaratheodory m sβαΆ := by
simp [IsCaratheodory, diff_eq, add_comm]
#align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl
@[simp]
theorem isCaratheodory_compl_iff : IsCaratheodory m sαΆ β IsCaratheodory m s :=
β¨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl mβ©
#align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff
theorem isCaratheodory_union (hβ : IsCaratheodory m sβ) (hβ : IsCaratheodory m sβ) :
IsCaratheodory m (sβ βͺ sβ) := fun t => by
rw [hβ t, hβ (t β© sβ), hβ (t \ sβ), hβ (t β© (sβ βͺ sβ)), inter_diff_assoc _ _ sβ,
Set.inter_assoc _ _ sβ, inter_eq_self_of_subset_right Set.subset_union_left,
union_diff_left, hβ (t β© sβ)]
simp [diff_eq, add_assoc]
#align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union
| Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 82 | 84 | theorem measure_inter_union (h : sβ β© sβ β β
) (hβ : IsCaratheodory m sβ) {t : Set Ξ±} :
m (t β© (sβ βͺ sβ)) = m (t β© sβ) + m (t β© sβ) := by |
rw [hβ, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h]
| 1 | 2.718282 | 0 | 0.6 | 5 | 530 |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
namespace OuterMeasure
section CaratheodoryMeasurable
universe u
variable {Ξ± : Type u} (m : OuterMeasure Ξ±)
attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc
variable {s sβ sβ : Set Ξ±}
def IsCaratheodory (s : Set Ξ±) : Prop :=
β t, m t = m (t β© s) + m (t \ s)
#align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory
theorem isCaratheodory_iff_le' {s : Set Ξ±} :
IsCaratheodory m s β β t, m (t β© s) + m (t \ s) β€ m t :=
forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _
#align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le'
@[simp]
theorem isCaratheodory_empty : IsCaratheodory m β
:= by simp [IsCaratheodory, m.empty, diff_empty]
#align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty
theorem isCaratheodory_compl : IsCaratheodory m sβ β IsCaratheodory m sβαΆ := by
simp [IsCaratheodory, diff_eq, add_comm]
#align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl
@[simp]
theorem isCaratheodory_compl_iff : IsCaratheodory m sαΆ β IsCaratheodory m s :=
β¨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl mβ©
#align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff
theorem isCaratheodory_union (hβ : IsCaratheodory m sβ) (hβ : IsCaratheodory m sβ) :
IsCaratheodory m (sβ βͺ sβ) := fun t => by
rw [hβ t, hβ (t β© sβ), hβ (t \ sβ), hβ (t β© (sβ βͺ sβ)), inter_diff_assoc _ _ sβ,
Set.inter_assoc _ _ sβ, inter_eq_self_of_subset_right Set.subset_union_left,
union_diff_left, hβ (t β© sβ)]
simp [diff_eq, add_assoc]
#align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union
theorem measure_inter_union (h : sβ β© sβ β β
) (hβ : IsCaratheodory m sβ) {t : Set Ξ±} :
m (t β© (sβ βͺ sβ)) = m (t β© sβ) + m (t β© sβ) := by
rw [hβ, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h]
#align measure_theory.outer_measure.measure_inter_union MeasureTheory.OuterMeasure.measure_inter_union
theorem isCaratheodory_iUnion_lt {s : β β Set Ξ±} :
β {n : β}, (β i < n, IsCaratheodory m (s i)) β IsCaratheodory m (β i < n, s i)
| 0, _ => by simp [Nat.not_lt_zero]
| n + 1, h => by
rw [biUnion_lt_succ]
exact isCaratheodory_union m
(isCaratheodory_iUnion_lt fun i hi => h i <| lt_of_lt_of_le hi <| Nat.le_succ _)
(h n (le_refl (n + 1)))
#align measure_theory.outer_measure.is_caratheodory_Union_lt MeasureTheory.OuterMeasure.isCaratheodory_iUnion_lt
| Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 97 | 100 | theorem isCaratheodory_inter (hβ : IsCaratheodory m sβ) (hβ : IsCaratheodory m sβ) :
IsCaratheodory m (sβ β© sβ) := by |
rw [β isCaratheodory_compl_iff, Set.compl_inter]
exact isCaratheodory_union _ (isCaratheodory_compl _ hβ) (isCaratheodory_compl _ hβ)
| 2 | 7.389056 | 1 | 0.6 | 5 | 530 |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
namespace OuterMeasure
section CaratheodoryMeasurable
universe u
variable {Ξ± : Type u} (m : OuterMeasure Ξ±)
attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc
variable {s sβ sβ : Set Ξ±}
def IsCaratheodory (s : Set Ξ±) : Prop :=
β t, m t = m (t β© s) + m (t \ s)
#align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory
theorem isCaratheodory_iff_le' {s : Set Ξ±} :
IsCaratheodory m s β β t, m (t β© s) + m (t \ s) β€ m t :=
forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _
#align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le'
@[simp]
theorem isCaratheodory_empty : IsCaratheodory m β
:= by simp [IsCaratheodory, m.empty, diff_empty]
#align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty
theorem isCaratheodory_compl : IsCaratheodory m sβ β IsCaratheodory m sβαΆ := by
simp [IsCaratheodory, diff_eq, add_comm]
#align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl
@[simp]
theorem isCaratheodory_compl_iff : IsCaratheodory m sαΆ β IsCaratheodory m s :=
β¨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl mβ©
#align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff
theorem isCaratheodory_union (hβ : IsCaratheodory m sβ) (hβ : IsCaratheodory m sβ) :
IsCaratheodory m (sβ βͺ sβ) := fun t => by
rw [hβ t, hβ (t β© sβ), hβ (t \ sβ), hβ (t β© (sβ βͺ sβ)), inter_diff_assoc _ _ sβ,
Set.inter_assoc _ _ sβ, inter_eq_self_of_subset_right Set.subset_union_left,
union_diff_left, hβ (t β© sβ)]
simp [diff_eq, add_assoc]
#align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union
theorem measure_inter_union (h : sβ β© sβ β β
) (hβ : IsCaratheodory m sβ) {t : Set Ξ±} :
m (t β© (sβ βͺ sβ)) = m (t β© sβ) + m (t β© sβ) := by
rw [hβ, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h]
#align measure_theory.outer_measure.measure_inter_union MeasureTheory.OuterMeasure.measure_inter_union
theorem isCaratheodory_iUnion_lt {s : β β Set Ξ±} :
β {n : β}, (β i < n, IsCaratheodory m (s i)) β IsCaratheodory m (β i < n, s i)
| 0, _ => by simp [Nat.not_lt_zero]
| n + 1, h => by
rw [biUnion_lt_succ]
exact isCaratheodory_union m
(isCaratheodory_iUnion_lt fun i hi => h i <| lt_of_lt_of_le hi <| Nat.le_succ _)
(h n (le_refl (n + 1)))
#align measure_theory.outer_measure.is_caratheodory_Union_lt MeasureTheory.OuterMeasure.isCaratheodory_iUnion_lt
theorem isCaratheodory_inter (hβ : IsCaratheodory m sβ) (hβ : IsCaratheodory m sβ) :
IsCaratheodory m (sβ β© sβ) := by
rw [β isCaratheodory_compl_iff, Set.compl_inter]
exact isCaratheodory_union _ (isCaratheodory_compl _ hβ) (isCaratheodory_compl _ hβ)
#align measure_theory.outer_measure.is_caratheodory_inter MeasureTheory.OuterMeasure.isCaratheodory_inter
theorem isCaratheodory_sum {s : β β Set Ξ±} (h : β i, IsCaratheodory m (s i))
(hd : Pairwise (Disjoint on s)) {t : Set Ξ±} :
β {n}, (β i β Finset.range n, m (t β© s i)) = m (t β© β i < n, s i)
| 0 => by simp [Nat.not_lt_zero, m.empty]
| Nat.succ n => by
rw [biUnion_lt_succ, Finset.sum_range_succ, Set.union_comm, isCaratheodory_sum h hd,
m.measure_inter_union _ (h n), add_comm]
intro a
simpa using fun (hβ : a β s n) i (hi : i < n) hβ => (hd (ne_of_gt hi)).le_bot β¨hβ, hββ©
#align measure_theory.outer_measure.is_caratheodory_sum MeasureTheory.OuterMeasure.isCaratheodory_sum
set_option linter.deprecated false in -- not immediately obvious how to replace `iUnion` here.
| Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 115 | 128 | theorem isCaratheodory_iUnion_nat {s : β β Set Ξ±} (h : β i, IsCaratheodory m (s i))
(hd : Pairwise (Disjoint on s)) : IsCaratheodory m (β i, s i) := by |
apply (isCaratheodory_iff_le' m).mpr
intro t
have hp : m (t β© β i, s i) β€ β¨ n, m (t β© β i < n, s i) := by
convert m.iUnion fun i => t β© s i using 1
Β· simp [inter_iUnion]
Β· simp [ENNReal.tsum_eq_iSup_nat, isCaratheodory_sum m h hd]
refine le_trans (add_le_add_right hp _) ?_
rw [ENNReal.iSup_add]
refine iSup_le fun n => le_trans (add_le_add_left ?_ _)
(ge_of_eq (isCaratheodory_iUnion_lt m (fun i _ => h i) _))
refine m.mono (diff_subset_diff_right ?_)
exact iUnionβ_subset fun i _ => subset_iUnion _ i
| 12 | 162,754.791419 | 2 | 0.6 | 5 | 530 |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal Topology ENNReal Filter Function
variable {Ξ± : Type*}
def ContractingWith [EMetricSpace Ξ±] (K : ββ₯0) (f : Ξ± β Ξ±) :=
K < 1 β§ LipschitzWith K f
#align contracting_with ContractingWith
namespace ContractingWith
variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ββ₯0} {f : Ξ± β Ξ±}
open EMetric Set
theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2
#align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
| Mathlib/Topology/MetricSpace/Contracting.lean | 53 | 53 | theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by | simp [hf.1]
| 1 | 2.718282 | 0 | 0.6 | 5 | 531 |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal Topology ENNReal Filter Function
variable {Ξ± : Type*}
def ContractingWith [EMetricSpace Ξ±] (K : ββ₯0) (f : Ξ± β Ξ±) :=
K < 1 β§ LipschitzWith K f
#align contracting_with ContractingWith
namespace ContractingWith
variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ββ₯0} {f : Ξ± β Ξ±}
open EMetric Set
theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2
#align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by simp [hf.1]
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos'
theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ββ₯0β) - K β 0 :=
ne_of_gt hf.one_sub_K_pos'
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
| Mathlib/Topology/MetricSpace/Contracting.lean | 62 | 64 | theorem one_sub_K_ne_top : (1 : ββ₯0β) - K β β := by |
norm_cast
exact ENNReal.coe_ne_top
| 2 | 7.389056 | 1 | 0.6 | 5 | 531 |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal Topology ENNReal Filter Function
variable {Ξ± : Type*}
def ContractingWith [EMetricSpace Ξ±] (K : ββ₯0) (f : Ξ± β Ξ±) :=
K < 1 β§ LipschitzWith K f
#align contracting_with ContractingWith
namespace ContractingWith
variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ββ₯0} {f : Ξ± β Ξ±}
open EMetric Set
theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2
#align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by simp [hf.1]
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos'
theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ββ₯0β) - K β 0 :=
ne_of_gt hf.one_sub_K_pos'
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
theorem one_sub_K_ne_top : (1 : ββ₯0β) - K β β := by
norm_cast
exact ENNReal.coe_ne_top
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top
| Mathlib/Topology/MetricSpace/Contracting.lean | 68 | 76 | theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β β) :
edist x y β€ (edist x (f x) + edist y (f y)) / (1 - K) :=
suffices edist x y β€ edist x (f x) + edist y (f y) + K * edist x y by
rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top),
mul_comm, ENNReal.sub_mul fun _ _ β¦ h, one_mul, tsub_le_iff_right]
calc
edist x y β€ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _
_ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by | rw [edist_comm y, add_right_comm]
_ β€ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
| 2 | 7.389056 | 1 | 0.6 | 5 | 531 |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal Topology ENNReal Filter Function
variable {Ξ± : Type*}
def ContractingWith [EMetricSpace Ξ±] (K : ββ₯0) (f : Ξ± β Ξ±) :=
K < 1 β§ LipschitzWith K f
#align contracting_with ContractingWith
namespace ContractingWith
variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ββ₯0} {f : Ξ± β Ξ±}
open EMetric Set
theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2
#align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by simp [hf.1]
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos'
theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ββ₯0β) - K β 0 :=
ne_of_gt hf.one_sub_K_pos'
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
theorem one_sub_K_ne_top : (1 : ββ₯0β) - K β β := by
norm_cast
exact ENNReal.coe_ne_top
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top
theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β β) :
edist x y β€ (edist x (f x) + edist y (f y)) / (1 - K) :=
suffices edist x y β€ edist x (f x) + edist y (f y) + K * edist x y by
rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top),
mul_comm, ENNReal.sub_mul fun _ _ β¦ h, one_mul, tsub_le_iff_right]
calc
edist x y β€ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _
_ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm]
_ β€ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
#align contracting_with.edist_inequality ContractingWith.edist_inequality
| Mathlib/Topology/MetricSpace/Contracting.lean | 79 | 81 | theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β β)
(hy : IsFixedPt f y) : edist x y β€ edist x (f x) / (1 - K) := by |
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h
| 1 | 2.718282 | 0 | 0.6 | 5 | 531 |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classical
open NNReal Topology ENNReal Filter Function
variable {Ξ± : Type*}
def ContractingWith [EMetricSpace Ξ±] (K : ββ₯0) (f : Ξ± β Ξ±) :=
K < 1 β§ LipschitzWith K f
#align contracting_with ContractingWith
namespace ContractingWith
variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ββ₯0} {f : Ξ± β Ξ±}
open EMetric Set
theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2
#align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ββ₯0β) < 1 - K := by simp [hf.1]
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos'
theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ββ₯0β) - K β 0 :=
ne_of_gt hf.one_sub_K_pos'
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
theorem one_sub_K_ne_top : (1 : ββ₯0β) - K β β := by
norm_cast
exact ENNReal.coe_ne_top
set_option linter.uppercaseLean3 false in
#align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top
theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β β) :
edist x y β€ (edist x (f x) + edist y (f y)) / (1 - K) :=
suffices edist x y β€ edist x (f x) + edist y (f y) + K * edist x y by
rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top),
mul_comm, ENNReal.sub_mul fun _ _ β¦ h, one_mul, tsub_le_iff_right]
calc
edist x y β€ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _
_ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm]
_ β€ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
#align contracting_with.edist_inequality ContractingWith.edist_inequality
theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β β)
(hy : IsFixedPt f y) : edist x y β€ edist x (f x) / (1 - K) := by
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h
#align contracting_with.edist_le_of_fixed_point ContractingWith.edist_le_of_fixedPoint
| Mathlib/Topology/MetricSpace/Contracting.lean | 84 | 87 | theorem eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x)
(hy : IsFixedPt f y) : x = y β¨ edist x y = β := by |
refine or_iff_not_imp_right.2 fun h β¦ edist_le_zero.1 ?_
simpa only [hx.eq, edist_self, add_zero, ENNReal.zero_div] using hf.edist_le_of_fixedPoint h hy
| 2 | 7.389056 | 1 | 0.6 | 5 | 531 |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical
noncomputable section
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³]
instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± :=
.of_hasBasis
(fun _ β¦ nhds_basis_uniformity' uniformity_hasBasis_closed)
fun a _V hV β¦ isClosed_ball a hV.2
#align uniform_space.to_regular_space UniformSpace.to_regularSpace
#align separation_rel Inseparable
#noalign separated_equiv
#align separation_rel_iff_specializes specializes_iff_inseparable
#noalign separation_rel_iff_inseparable
theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y β β i, p i β (x, y) β s i :=
(nhds_basis_uniformity h).specializes_iff
theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y β β i, p i β (x, y) β s i :=
specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity
#align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity
theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y β (x, y) β (π€ Ξ±).ker :=
(π€ Ξ±).basis_sets.inseparable_iff_uniformity
protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) :
π (x, y) β€ π€ Ξ± := by
rw [h.prod rfl]
apply nhds_le_uniformity
| Mathlib/Topology/UniformSpace/Separation.lean | 142 | 146 | theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} :
Inseparable x y β ClusterPt (x, y) (π€ Ξ±) := by |
refine β¨fun h β¦ .of_nhds_le h.nhds_le_uniformity, fun h β¦ ?_β©
simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
exact fun U β¨hU, hUcβ© β¦ hUc _ <| h.mono <| le_principal_iff.2 hU
| 3 | 20.085537 | 1 | 0.6 | 5 | 532 |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical
noncomputable section
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³]
instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± :=
.of_hasBasis
(fun _ β¦ nhds_basis_uniformity' uniformity_hasBasis_closed)
fun a _V hV β¦ isClosed_ball a hV.2
#align uniform_space.to_regular_space UniformSpace.to_regularSpace
#align separation_rel Inseparable
#noalign separated_equiv
#align separation_rel_iff_specializes specializes_iff_inseparable
#noalign separation_rel_iff_inseparable
theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y β β i, p i β (x, y) β s i :=
(nhds_basis_uniformity h).specializes_iff
theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y β β i, p i β (x, y) β s i :=
specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity
#align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity
theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y β (x, y) β (π€ Ξ±).ker :=
(π€ Ξ±).basis_sets.inseparable_iff_uniformity
protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) :
π (x, y) β€ π€ Ξ± := by
rw [h.prod rfl]
apply nhds_le_uniformity
theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} :
Inseparable x y β ClusterPt (x, y) (π€ Ξ±) := by
refine β¨fun h β¦ .of_nhds_le h.nhds_le_uniformity, fun h β¦ ?_β©
simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
exact fun U β¨hU, hUcβ© β¦ hUc _ <| h.mono <| le_principal_iff.2 hU
#align separated_space T0Space
| Mathlib/Topology/UniformSpace/Separation.lean | 150 | 152 | theorem t0Space_iff_uniformity :
T0Space Ξ± β β x y, (β r β π€ Ξ±, (x, y) β r) β x = y := by |
simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id]
| 1 | 2.718282 | 0 | 0.6 | 5 | 532 |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical
noncomputable section
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³]
instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± :=
.of_hasBasis
(fun _ β¦ nhds_basis_uniformity' uniformity_hasBasis_closed)
fun a _V hV β¦ isClosed_ball a hV.2
#align uniform_space.to_regular_space UniformSpace.to_regularSpace
#align separation_rel Inseparable
#noalign separated_equiv
#align separation_rel_iff_specializes specializes_iff_inseparable
#noalign separation_rel_iff_inseparable
theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y β β i, p i β (x, y) β s i :=
(nhds_basis_uniformity h).specializes_iff
theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y β β i, p i β (x, y) β s i :=
specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity
#align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity
theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y β (x, y) β (π€ Ξ±).ker :=
(π€ Ξ±).basis_sets.inseparable_iff_uniformity
protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) :
π (x, y) β€ π€ Ξ± := by
rw [h.prod rfl]
apply nhds_le_uniformity
theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} :
Inseparable x y β ClusterPt (x, y) (π€ Ξ±) := by
refine β¨fun h β¦ .of_nhds_le h.nhds_le_uniformity, fun h β¦ ?_β©
simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
exact fun U β¨hU, hUcβ© β¦ hUc _ <| h.mono <| le_principal_iff.2 hU
#align separated_space T0Space
theorem t0Space_iff_uniformity :
T0Space Ξ± β β x y, (β r β π€ Ξ±, (x, y) β r) β x = y := by
simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id]
#align separated_def t0Space_iff_uniformity
| Mathlib/Topology/UniformSpace/Separation.lean | 155 | 157 | theorem t0Space_iff_uniformity' :
T0Space Ξ± β Pairwise fun x y β¦ β r β π€ Ξ±, (x, y) β r := by |
simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity]
| 1 | 2.718282 | 0 | 0.6 | 5 | 532 |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical
noncomputable section
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³]
instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± :=
.of_hasBasis
(fun _ β¦ nhds_basis_uniformity' uniformity_hasBasis_closed)
fun a _V hV β¦ isClosed_ball a hV.2
#align uniform_space.to_regular_space UniformSpace.to_regularSpace
#align separation_rel Inseparable
#noalign separated_equiv
#align separation_rel_iff_specializes specializes_iff_inseparable
#noalign separation_rel_iff_inseparable
theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y β β i, p i β (x, y) β s i :=
(nhds_basis_uniformity h).specializes_iff
theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y β β i, p i β (x, y) β s i :=
specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity
#align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity
theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y β (x, y) β (π€ Ξ±).ker :=
(π€ Ξ±).basis_sets.inseparable_iff_uniformity
protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) :
π (x, y) β€ π€ Ξ± := by
rw [h.prod rfl]
apply nhds_le_uniformity
theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} :
Inseparable x y β ClusterPt (x, y) (π€ Ξ±) := by
refine β¨fun h β¦ .of_nhds_le h.nhds_le_uniformity, fun h β¦ ?_β©
simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
exact fun U β¨hU, hUcβ© β¦ hUc _ <| h.mono <| le_principal_iff.2 hU
#align separated_space T0Space
theorem t0Space_iff_uniformity :
T0Space Ξ± β β x y, (β r β π€ Ξ±, (x, y) β r) β x = y := by
simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id]
#align separated_def t0Space_iff_uniformity
theorem t0Space_iff_uniformity' :
T0Space Ξ± β Pairwise fun x y β¦ β r β π€ Ξ±, (x, y) β r := by
simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity]
#align separated_def' t0Space_iff_uniformity'
| Mathlib/Topology/UniformSpace/Separation.lean | 160 | 163 | theorem t0Space_iff_ker_uniformity : T0Space Ξ± β (π€ Ξ±).ker = diagonal Ξ± := by |
simp_rw [t0Space_iff_uniformity, subset_antisymm_iff, diagonal_subset_iff, subset_def,
Prod.forall, Filter.mem_ker, mem_diagonal_iff, iff_self_and]
exact fun _ x s hs β¦ refl_mem_uniformity hs
| 3 | 20.085537 | 1 | 0.6 | 5 | 532 |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical
noncomputable section
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w}
variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³]
instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± :=
.of_hasBasis
(fun _ β¦ nhds_basis_uniformity' uniformity_hasBasis_closed)
fun a _V hV β¦ isClosed_ball a hV.2
#align uniform_space.to_regular_space UniformSpace.to_regularSpace
#align separation_rel Inseparable
#noalign separated_equiv
#align separation_rel_iff_specializes specializes_iff_inseparable
#noalign separation_rel_iff_inseparable
theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y β β i, p i β (x, y) β s i :=
(nhds_basis_uniformity h).specializes_iff
theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)}
(h : (π€ Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y β β i, p i β (x, y) β s i :=
specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity
#align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity
theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y β (x, y) β (π€ Ξ±).ker :=
(π€ Ξ±).basis_sets.inseparable_iff_uniformity
protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) :
π (x, y) β€ π€ Ξ± := by
rw [h.prod rfl]
apply nhds_le_uniformity
theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} :
Inseparable x y β ClusterPt (x, y) (π€ Ξ±) := by
refine β¨fun h β¦ .of_nhds_le h.nhds_le_uniformity, fun h β¦ ?_β©
simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
exact fun U β¨hU, hUcβ© β¦ hUc _ <| h.mono <| le_principal_iff.2 hU
#align separated_space T0Space
theorem t0Space_iff_uniformity :
T0Space Ξ± β β x y, (β r β π€ Ξ±, (x, y) β r) β x = y := by
simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id]
#align separated_def t0Space_iff_uniformity
theorem t0Space_iff_uniformity' :
T0Space Ξ± β Pairwise fun x y β¦ β r β π€ Ξ±, (x, y) β r := by
simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity]
#align separated_def' t0Space_iff_uniformity'
theorem t0Space_iff_ker_uniformity : T0Space Ξ± β (π€ Ξ±).ker = diagonal Ξ± := by
simp_rw [t0Space_iff_uniformity, subset_antisymm_iff, diagonal_subset_iff, subset_def,
Prod.forall, Filter.mem_ker, mem_diagonal_iff, iff_self_and]
exact fun _ x s hs β¦ refl_mem_uniformity hs
#align separated_space_iff t0Space_iff_ker_uniformity
theorem eq_of_uniformity {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {x y : Ξ±}
(h : β {V}, V β π€ Ξ± β (x, y) β V) : x = y :=
t0Space_iff_uniformity.mp βΉT0Space Ξ±βΊ x y @h
#align eq_of_uniformity eq_of_uniformity
theorem eq_of_uniformity_basis {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {ΞΉ : Sort*}
{p : ΞΉ β Prop} {s : ΞΉ β Set (Ξ± Γ Ξ±)} (hs : (π€ Ξ±).HasBasis p s) {x y : Ξ±}
(h : β {i}, p i β (x, y) β s i) : x = y :=
(hs.inseparable_iff_uniformity.2 @h).eq
#align eq_of_uniformity_basis eq_of_uniformity_basis
theorem eq_of_forall_symmetric {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {x y : Ξ±}
(h : β {V}, V β π€ Ξ± β SymmetricRel V β (x, y) β V) : x = y :=
eq_of_uniformity_basis hasBasis_symmetric (by simpa)
#align eq_of_forall_symmetric eq_of_forall_symmetric
theorem eq_of_clusterPt_uniformity [T0Space Ξ±] {x y : Ξ±} (h : ClusterPt (x, y) (π€ Ξ±)) : x = y :=
(inseparable_iff_clusterPt_uniformity.2 h).eq
#align eq_of_cluster_pt_uniformity eq_of_clusterPt_uniformity
| Mathlib/Topology/UniformSpace/Separation.lean | 186 | 191 | theorem Filter.Tendsto.inseparable_iff_uniformity {l : Filter Ξ²} [NeBot l] {f g : Ξ² β Ξ±} {a b : Ξ±}
(ha : Tendsto f l (π a)) (hb : Tendsto g l (π b)) :
Inseparable a b β Tendsto (fun x β¦ (f x, g x)) l (π€ Ξ±) := by |
refine β¨fun h β¦ (ha.prod_mk_nhds hb).mono_right h.nhds_le_uniformity, fun h β¦ ?_β©
rw [inseparable_iff_clusterPt_uniformity]
exact (ClusterPt.of_le_nhds (ha.prod_mk_nhds hb)).mono h
| 3 | 20.085537 | 1 | 0.6 | 5 | 532 |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option linter.uppercaseLean3 false
universe u
open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite
noncomputable section
namespace AlgebraicGeometry
def AffineTargetMorphismProperty :=
β β¦X Y : Schemeβ¦ (_ : X βΆ Y) [IsAffine Y], Prop
#align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty
protected def Scheme.isIso : MorphismProperty Scheme :=
@IsIso Scheme _
#align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso
protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f
#align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso
instance : Inhabited AffineTargetMorphismProperty := β¨Scheme.affineTargetIsIsoβ©
def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) :
MorphismProperty Scheme := fun _ _ f => β h, @P _ _ f h
#align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
| Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 94 | 96 | theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by |
delta AffineTargetMorphismProperty.toProperty; simp [*]
| 1 | 2.718282 | 0 | 0.6 | 5 | 533 |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option linter.uppercaseLean3 false
universe u
open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite
noncomputable section
namespace AlgebraicGeometry
def AffineTargetMorphismProperty :=
β β¦X Y : Schemeβ¦ (_ : X βΆ Y) [IsAffine Y], Prop
#align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty
protected def Scheme.isIso : MorphismProperty Scheme :=
@IsIso Scheme _
#align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso
protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f
#align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso
instance : Inhabited AffineTargetMorphismProperty := β¨Scheme.affineTargetIsIsoβ©
def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) :
MorphismProperty Scheme := fun _ _ f => β h, @P _ _ f h
#align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
#align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply
| Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 99 | 101 | theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso f] [IsAffine Z] : P (f β« g) β P g := by |
rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_left_isIso]
| 1 | 2.718282 | 0 | 0.6 | 5 | 533 |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option linter.uppercaseLean3 false
universe u
open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite
noncomputable section
namespace AlgebraicGeometry
def AffineTargetMorphismProperty :=
β β¦X Y : Schemeβ¦ (_ : X βΆ Y) [IsAffine Y], Prop
#align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty
protected def Scheme.isIso : MorphismProperty Scheme :=
@IsIso Scheme _
#align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso
protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f
#align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso
instance : Inhabited AffineTargetMorphismProperty := β¨Scheme.affineTargetIsIsoβ©
def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) :
MorphismProperty Scheme := fun _ _ f => β h, @P _ _ f h
#align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
#align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply
theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso f] [IsAffine Z] : P (f β« g) β P g := by
rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_left_isIso]
#align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso
| Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 104 | 106 | theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso g] [IsAffine Z] [IsAffine Y] :
P (f β« g) β P f := by | rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_right_isIso]
| 1 | 2.718282 | 0 | 0.6 | 5 | 533 |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option linter.uppercaseLean3 false
universe u
open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite
noncomputable section
namespace AlgebraicGeometry
def AffineTargetMorphismProperty :=
β β¦X Y : Schemeβ¦ (_ : X βΆ Y) [IsAffine Y], Prop
#align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty
protected def Scheme.isIso : MorphismProperty Scheme :=
@IsIso Scheme _
#align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso
protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f
#align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso
instance : Inhabited AffineTargetMorphismProperty := β¨Scheme.affineTargetIsIsoβ©
def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) :
MorphismProperty Scheme := fun _ _ f => β h, @P _ _ f h
#align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
#align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply
theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso f] [IsAffine Z] : P (f β« g) β P g := by
rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_left_isIso]
#align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso
theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso g] [IsAffine Z] [IsAffine Y] :
P (f β« g) β P f := by rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_right_isIso]
#align algebraic_geometry.affine_cancel_right_is_iso AlgebraicGeometry.affine_cancel_right_isIso
| Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 109 | 116 | theorem AffineTargetMorphismProperty.respectsIso_mk {P : AffineTargetMorphismProperty}
(hβ : β {X Y Z} (e : X β
Y) (f : Y βΆ Z) [IsAffine Z], P f β P (e.hom β« f))
(hβ : β {X Y Z} (e : Y β
Z) (f : X βΆ Y) [h : IsAffine Y],
P f β @P _ _ (f β« e.hom) (isAffineOfIso e.inv)) :
P.toProperty.RespectsIso := by |
constructor
Β· rintro X Y Z e f β¨a, hβ©; exact β¨a, hβ e f hβ©
Β· rintro X Y Z e f β¨a, hβ©; exact β¨isAffineOfIso e.inv, hβ e f hβ©
| 3 | 20.085537 | 1 | 0.6 | 5 | 533 |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option linter.uppercaseLean3 false
universe u
open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite
noncomputable section
namespace AlgebraicGeometry
def AffineTargetMorphismProperty :=
β β¦X Y : Schemeβ¦ (_ : X βΆ Y) [IsAffine Y], Prop
#align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty
protected def Scheme.isIso : MorphismProperty Scheme :=
@IsIso Scheme _
#align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso
protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f
#align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso
instance : Inhabited AffineTargetMorphismProperty := β¨Scheme.affineTargetIsIsoβ©
def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) :
MorphismProperty Scheme := fun _ _ f => β h, @P _ _ f h
#align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty)
{X Y : Scheme} (f : X βΆ Y) [i : IsAffine Y] : P.toProperty f β P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
#align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply
theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso f] [IsAffine Z] : P (f β« g) β P g := by
rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_left_isIso]
#align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso
theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso g] [IsAffine Z] [IsAffine Y] :
P (f β« g) β P f := by rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_right_isIso]
#align algebraic_geometry.affine_cancel_right_is_iso AlgebraicGeometry.affine_cancel_right_isIso
theorem AffineTargetMorphismProperty.respectsIso_mk {P : AffineTargetMorphismProperty}
(hβ : β {X Y Z} (e : X β
Y) (f : Y βΆ Z) [IsAffine Z], P f β P (e.hom β« f))
(hβ : β {X Y Z} (e : Y β
Z) (f : X βΆ Y) [h : IsAffine Y],
P f β @P _ _ (f β« e.hom) (isAffineOfIso e.inv)) :
P.toProperty.RespectsIso := by
constructor
Β· rintro X Y Z e f β¨a, hβ©; exact β¨a, hβ e f hβ©
Β· rintro X Y Z e f β¨a, hβ©; exact β¨isAffineOfIso e.inv, hβ e f hβ©
#align algebraic_geometry.affine_target_morphism_property.respects_iso_mk AlgebraicGeometry.AffineTargetMorphismProperty.respectsIso_mk
def targetAffineLocally (P : AffineTargetMorphismProperty) : MorphismProperty Scheme :=
fun {X Y : Scheme} (f : X βΆ Y) => β U : Y.affineOpens, @P _ _ (f β£_ U) U.prop
#align algebraic_geometry.target_affine_locally AlgebraicGeometry.targetAffineLocally
theorem IsAffineOpen.map_isIso {X Y : Scheme} {U : Opens Y.carrier} (hU : IsAffineOpen U)
(f : X βΆ Y) [IsIso f] : IsAffineOpen ((Opens.map f.1.base).obj U) :=
haveI : IsAffine _ := hU
isAffineOfIso (f β£_ U)
#align algebraic_geometry.is_affine_open.map_is_iso AlgebraicGeometry.IsAffineOpen.map_isIso
| Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 131 | 141 | theorem targetAffineLocally_respectsIso {P : AffineTargetMorphismProperty}
(hP : P.toProperty.RespectsIso) : (targetAffineLocally P).RespectsIso := by |
constructor
Β· introv H U
rw [morphismRestrict_comp, affine_cancel_left_isIso hP]
exact H U
Β· introv H
rintro β¨U, hU : IsAffineOpen Uβ©; dsimp
haveI : IsAffine _ := hU.map_isIso e.hom
rw [morphismRestrict_comp, affine_cancel_right_isIso hP]
exact H β¨(Opens.map e.hom.val.base).obj U, hU.map_isIso e.homβ©
| 9 | 8,103.083928 | 2 | 0.6 | 5 | 533 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
| Mathlib/Algebra/Polynomial/Eval.lean | 48 | 49 | theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by |
rw [evalβ_def]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
| Mathlib/Algebra/Polynomial/Eval.lean | 52 | 54 | theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by |
rintro rfl rfl rfl; rfl
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 58 | 61 | theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by |
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
| 3 | 20.085537 | 1 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 65 | 65 | theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by | simp [evalβ_eq_sum]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 69 | 69 | theorem evalβ_C : (C a).evalβ f x = f a := by | simp [evalβ_eq_sum]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 73 | 73 | theorem evalβ_X : X.evalβ f x = x := by | simp [evalβ_eq_sum]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 77 | 78 | theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by |
simp [evalβ_eq_sum]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 82 | 85 | theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by |
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
| 3 | 20.085537 | 1 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 89 | 91 | theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by |
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
| 2 | 7.389056 | 1 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 95 | 95 | theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by | rw [β C_1, evalβ_C, f.map_one]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by rw [β C_1, evalβ_C, f.map_one]
#align polynomial.evalβ_one Polynomial.evalβ_one
set_option linter.deprecated false in
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 100 | 100 | theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by | rw [bit0, evalβ_add, bit0]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by rw [β C_1, evalβ_C, f.map_one]
#align polynomial.evalβ_one Polynomial.evalβ_one
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by rw [bit0, evalβ_add, bit0]
#align polynomial.evalβ_bit0 Polynomial.evalβ_bit0
set_option linter.deprecated false in
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 105 | 106 | theorem evalβ_bit1 : (bit1 p).evalβ f x = bit1 (p.evalβ f x) := by |
rw [bit1, evalβ_add, evalβ_bit0, evalβ_one, bit1]
| 1 | 2.718282 | 0 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by rw [β C_1, evalβ_C, f.map_one]
#align polynomial.evalβ_one Polynomial.evalβ_one
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by rw [bit0, evalβ_add, bit0]
#align polynomial.evalβ_bit0 Polynomial.evalβ_bit0
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit1 : (bit1 p).evalβ f x = bit1 (p.evalβ f x) := by
rw [bit1, evalβ_add, evalβ_bit0, evalβ_one, bit1]
#align polynomial.evalβ_bit1 Polynomial.evalβ_bit1
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 110 | 115 | theorem evalβ_smul (g : R β+* S) (p : R[X]) (x : S) {s : R} :
evalβ g x (s β’ p) = g s * evalβ g x p := by |
have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _
have B : (s β’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A
rw [evalβ_eq_sum, evalβ_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;>
simp [mul_sum, mul_assoc]
| 4 | 54.59815 | 2 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by rw [β C_1, evalβ_C, f.map_one]
#align polynomial.evalβ_one Polynomial.evalβ_one
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by rw [bit0, evalβ_add, bit0]
#align polynomial.evalβ_bit0 Polynomial.evalβ_bit0
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit1 : (bit1 p).evalβ f x = bit1 (p.evalβ f x) := by
rw [bit1, evalβ_add, evalβ_bit0, evalβ_one, bit1]
#align polynomial.evalβ_bit1 Polynomial.evalβ_bit1
@[simp]
theorem evalβ_smul (g : R β+* S) (p : R[X]) (x : S) {s : R} :
evalβ g x (s β’ p) = g s * evalβ g x p := by
have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _
have B : (s β’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A
rw [evalβ_eq_sum, evalβ_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;>
simp [mul_sum, mul_assoc]
#align polynomial.evalβ_smul Polynomial.evalβ_smul
@[simp]
theorem evalβ_C_X : evalβ C X p = p :=
Polynomial.induction_on' p (fun p q hp hq => by simp [hp, hq]) fun n x => by
rw [evalβ_monomial, β smul_X_eq_monomial, C_mul']
#align polynomial.evalβ_C_X Polynomial.evalβ_C_X
@[simps]
def evalβAddMonoidHom : R[X] β+ S where
toFun := evalβ f x
map_zero' := evalβ_zero _ _
map_add' _ _ := evalβ_add _ _
#align polynomial.evalβ_add_monoid_hom Polynomial.evalβAddMonoidHom
#align polynomial.evalβ_add_monoid_hom_apply Polynomial.evalβAddMonoidHom_apply
@[simp]
| Mathlib/Algebra/Polynomial/Eval.lean | 135 | 139 | theorem evalβ_natCast (n : β) : (n : R[X]).evalβ f x = n := by |
induction' n with n ih
-- Porting note: `Nat.zero_eq` is required.
Β· simp only [evalβ_zero, Nat.cast_zero, Nat.zero_eq]
Β· rw [n.cast_succ, evalβ_add, ih, evalβ_one, n.cast_succ]
| 4 | 54.59815 | 2 | 0.6 | 15 | 534 |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polynomial
namespace Polynomial
universe u v w y
variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β}
section Semiring
variable [Semiring R] {p q r : R[X]}
section
variable [Semiring S]
variable (f : R β+* S) (x : S)
irreducible_def evalβ (p : R[X]) : S :=
p.sum fun e a => f a * x ^ e
#align polynomial.evalβ Polynomial.evalβ
theorem evalβ_eq_sum {f : R β+* S} {x : S} : p.evalβ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ_def]
#align polynomial.evalβ_eq_sum Polynomial.evalβ_eq_sum
theorem evalβ_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β+* S} {s t : S}
{Ο Ο : R[X]} : f = g β s = t β Ο = Ο β evalβ f s Ο = evalβ g t Ο := by
rintro rfl rfl rfl; rfl
#align polynomial.evalβ_congr Polynomial.evalβ_congr
@[simp]
theorem evalβ_at_zero : p.evalβ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
#align polynomial.evalβ_at_zero Polynomial.evalβ_at_zero
@[simp]
theorem evalβ_zero : (0 : R[X]).evalβ f x = 0 := by simp [evalβ_eq_sum]
#align polynomial.evalβ_zero Polynomial.evalβ_zero
@[simp]
theorem evalβ_C : (C a).evalβ f x = f a := by simp [evalβ_eq_sum]
#align polynomial.evalβ_C Polynomial.evalβ_C
@[simp]
theorem evalβ_X : X.evalβ f x = x := by simp [evalβ_eq_sum]
#align polynomial.evalβ_X Polynomial.evalβ_X
@[simp]
theorem evalβ_monomial {n : β} {r : R} : (monomial n r).evalβ f x = f r * x ^ n := by
simp [evalβ_eq_sum]
#align polynomial.evalβ_monomial Polynomial.evalβ_monomial
@[simp]
theorem evalβ_X_pow {n : β} : (X ^ n).evalβ f x = x ^ n := by
rw [X_pow_eq_monomial]
convert evalβ_monomial f x (n := n) (r := 1)
simp
#align polynomial.evalβ_X_pow Polynomial.evalβ_X_pow
@[simp]
theorem evalβ_add : (p + q).evalβ f x = p.evalβ f x + q.evalβ f x := by
simp only [evalβ_eq_sum]
apply sum_add_index <;> simp [add_mul]
#align polynomial.evalβ_add Polynomial.evalβ_add
@[simp]
theorem evalβ_one : (1 : R[X]).evalβ f x = 1 := by rw [β C_1, evalβ_C, f.map_one]
#align polynomial.evalβ_one Polynomial.evalβ_one
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit0 : (bit0 p).evalβ f x = bit0 (p.evalβ f x) := by rw [bit0, evalβ_add, bit0]
#align polynomial.evalβ_bit0 Polynomial.evalβ_bit0
set_option linter.deprecated false in
@[simp]
theorem evalβ_bit1 : (bit1 p).evalβ f x = bit1 (p.evalβ f x) := by
rw [bit1, evalβ_add, evalβ_bit0, evalβ_one, bit1]
#align polynomial.evalβ_bit1 Polynomial.evalβ_bit1
@[simp]
theorem evalβ_smul (g : R β+* S) (p : R[X]) (x : S) {s : R} :
evalβ g x (s β’ p) = g s * evalβ g x p := by
have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _
have B : (s β’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A
rw [evalβ_eq_sum, evalβ_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;>
simp [mul_sum, mul_assoc]
#align polynomial.evalβ_smul Polynomial.evalβ_smul
@[simp]
theorem evalβ_C_X : evalβ C X p = p :=
Polynomial.induction_on' p (fun p q hp hq => by simp [hp, hq]) fun n x => by
rw [evalβ_monomial, β smul_X_eq_monomial, C_mul']
#align polynomial.evalβ_C_X Polynomial.evalβ_C_X
@[simps]
def evalβAddMonoidHom : R[X] β+ S where
toFun := evalβ f x
map_zero' := evalβ_zero _ _
map_add' _ _ := evalβ_add _ _
#align polynomial.evalβ_add_monoid_hom Polynomial.evalβAddMonoidHom
#align polynomial.evalβ_add_monoid_hom_apply Polynomial.evalβAddMonoidHom_apply
@[simp]
theorem evalβ_natCast (n : β) : (n : R[X]).evalβ f x = n := by
induction' n with n ih
-- Porting note: `Nat.zero_eq` is required.
Β· simp only [evalβ_zero, Nat.cast_zero, Nat.zero_eq]
Β· rw [n.cast_succ, evalβ_add, ih, evalβ_one, n.cast_succ]
#align polynomial.evalβ_nat_cast Polynomial.evalβ_natCast
@[deprecated (since := "2024-04-17")]
alias evalβ_nat_cast := evalβ_natCast
-- See note [no_index around OfNat.ofNat]
@[simp]
lemma evalβ_ofNat {S : Type*} [Semiring S] (n : β) [n.AtLeastTwo] (f : R β+* S) (a : S) :
(no_index (OfNat.ofNat n : R[X])).evalβ f a = OfNat.ofNat n := by
simp [OfNat.ofNat]
variable [Semiring T]
| Mathlib/Algebra/Polynomial/Eval.lean | 153 | 161 | theorem evalβ_sum (p : T[X]) (g : β β T β R[X]) (x : S) :
(p.sum g).evalβ f x = p.sum fun n a => (g n a).evalβ f x := by |
let T : R[X] β+ S :=
{ toFun := evalβ f x
map_zero' := evalβ_zero _ _
map_add' := fun p q => evalβ_add _ _ }
have A : β y, evalβ f x y = T y := fun y => rfl
simp only [A]
rw [sum, map_sum, sum]
| 7 | 1,096.633158 | 2 | 0.6 | 15 | 534 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
| Mathlib/Data/List/OfFn.lean | 39 | 40 | theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by |
induction i generalizing j <;> simp_all [ofFn.go]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
| Mathlib/Data/List/OfFn.lean | 44 | 45 | theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by |
simp [ofFn, length_ofFn_go]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
| Mathlib/Data/List/OfFn.lean | 50 | 54 | theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by |
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
| 3 | 20.085537 | 1 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
| Mathlib/Data/List/OfFn.lean | 58 | 59 | theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by |
cases i; simp [ofFn, get_ofFn_go]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
| Mathlib/Data/List/OfFn.lean | 75 | 77 | theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by |
simp [nthLe]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by
simp [nthLe]
#align list.nth_le_of_fn List.nthLe_ofFn
set_option linter.deprecated false in
@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n β Ξ±) {i : β} (h : i < (ofFn f).length) :
nthLe (ofFn f) i h = f β¨i, length_ofFn f βΈ hβ© :=
nthLe_ofFn f β¨i, length_ofFn f βΈ hβ©
#align list.nth_le_of_fn' List.nthLe_ofFn'
@[simp]
theorem map_ofFn {Ξ² : Type*} {n : β} (f : Fin n β Ξ±) (g : Ξ± β Ξ²) :
map g (ofFn f) = ofFn (g β f) :=
ext_get (by simp) fun i h h' => by simp
#align list.map_of_fn List.map_ofFn
-- Porting note: we don't have Array' in mathlib4
--
-- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read :=
-- by
-- suffices β {m h l}, DArray.revIterateAux a (fun i => cons) m h l =
-- ofFnAux (DArray.read a) m h l
-- from this
-- intros; induction' m with m IH generalizing l; Β· rfl
-- simp only [DArray.revIterateAux, of_fn_aux, IH]
-- #align list.array_eq_of_fn List.array_eq_of_fn
@[congr]
| Mathlib/Data/List/OfFn.lean | 105 | 108 | theorem ofFn_congr {m n : β} (h : m = n) (f : Fin m β Ξ±) :
ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by |
subst h
simp_rw [Fin.cast_refl, id]
| 2 | 7.389056 | 1 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by
simp [nthLe]
#align list.nth_le_of_fn List.nthLe_ofFn
set_option linter.deprecated false in
@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n β Ξ±) {i : β} (h : i < (ofFn f).length) :
nthLe (ofFn f) i h = f β¨i, length_ofFn f βΈ hβ© :=
nthLe_ofFn f β¨i, length_ofFn f βΈ hβ©
#align list.nth_le_of_fn' List.nthLe_ofFn'
@[simp]
theorem map_ofFn {Ξ² : Type*} {n : β} (f : Fin n β Ξ±) (g : Ξ± β Ξ²) :
map g (ofFn f) = ofFn (g β f) :=
ext_get (by simp) fun i h h' => by simp
#align list.map_of_fn List.map_ofFn
-- Porting note: we don't have Array' in mathlib4
--
-- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read :=
-- by
-- suffices β {m h l}, DArray.revIterateAux a (fun i => cons) m h l =
-- ofFnAux (DArray.read a) m h l
-- from this
-- intros; induction' m with m IH generalizing l; Β· rfl
-- simp only [DArray.revIterateAux, of_fn_aux, IH]
-- #align list.array_eq_of_fn List.array_eq_of_fn
@[congr]
theorem ofFn_congr {m n : β} (h : m = n) (f : Fin m β Ξ±) :
ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by
subst h
simp_rw [Fin.cast_refl, id]
#align list.of_fn_congr List.ofFn_congr
@[simp]
theorem ofFn_zero (f : Fin 0 β Ξ±) : ofFn f = [] :=
ext_get (by simp) (fun i hiβ hiβ => by contradiction)
#align list.of_fn_zero List.ofFn_zero
@[simp]
theorem ofFn_succ {n} (f : Fin (succ n) β Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ :=
ext_get (by simp) (fun i hiβ hiβ => by
cases i
Β· simp; rfl
Β· simp)
#align list.of_fn_succ List.ofFn_succ
| Mathlib/Data/List/OfFn.lean | 125 | 131 | theorem ofFn_succ' {n} (f : Fin (succ n) β Ξ±) :
ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by |
induction' n with n IH
Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero]
rfl
Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero]
congr
| 5 | 148.413159 | 2 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by
simp [nthLe]
#align list.nth_le_of_fn List.nthLe_ofFn
set_option linter.deprecated false in
@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n β Ξ±) {i : β} (h : i < (ofFn f).length) :
nthLe (ofFn f) i h = f β¨i, length_ofFn f βΈ hβ© :=
nthLe_ofFn f β¨i, length_ofFn f βΈ hβ©
#align list.nth_le_of_fn' List.nthLe_ofFn'
@[simp]
theorem map_ofFn {Ξ² : Type*} {n : β} (f : Fin n β Ξ±) (g : Ξ± β Ξ²) :
map g (ofFn f) = ofFn (g β f) :=
ext_get (by simp) fun i h h' => by simp
#align list.map_of_fn List.map_ofFn
-- Porting note: we don't have Array' in mathlib4
--
-- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read :=
-- by
-- suffices β {m h l}, DArray.revIterateAux a (fun i => cons) m h l =
-- ofFnAux (DArray.read a) m h l
-- from this
-- intros; induction' m with m IH generalizing l; Β· rfl
-- simp only [DArray.revIterateAux, of_fn_aux, IH]
-- #align list.array_eq_of_fn List.array_eq_of_fn
@[congr]
theorem ofFn_congr {m n : β} (h : m = n) (f : Fin m β Ξ±) :
ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by
subst h
simp_rw [Fin.cast_refl, id]
#align list.of_fn_congr List.ofFn_congr
@[simp]
theorem ofFn_zero (f : Fin 0 β Ξ±) : ofFn f = [] :=
ext_get (by simp) (fun i hiβ hiβ => by contradiction)
#align list.of_fn_zero List.ofFn_zero
@[simp]
theorem ofFn_succ {n} (f : Fin (succ n) β Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ :=
ext_get (by simp) (fun i hiβ hiβ => by
cases i
Β· simp; rfl
Β· simp)
#align list.of_fn_succ List.ofFn_succ
theorem ofFn_succ' {n} (f : Fin (succ n) β Ξ±) :
ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by
induction' n with n IH
Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero]
rfl
Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero]
congr
#align list.of_fn_succ' List.ofFn_succ'
@[simp]
| Mathlib/Data/List/OfFn.lean | 135 | 136 | theorem ofFn_eq_nil_iff {n : β} {f : Fin n β Ξ±} : ofFn f = [] β n = 0 := by |
cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by
simp [nthLe]
#align list.nth_le_of_fn List.nthLe_ofFn
set_option linter.deprecated false in
@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n β Ξ±) {i : β} (h : i < (ofFn f).length) :
nthLe (ofFn f) i h = f β¨i, length_ofFn f βΈ hβ© :=
nthLe_ofFn f β¨i, length_ofFn f βΈ hβ©
#align list.nth_le_of_fn' List.nthLe_ofFn'
@[simp]
theorem map_ofFn {Ξ² : Type*} {n : β} (f : Fin n β Ξ±) (g : Ξ± β Ξ²) :
map g (ofFn f) = ofFn (g β f) :=
ext_get (by simp) fun i h h' => by simp
#align list.map_of_fn List.map_ofFn
-- Porting note: we don't have Array' in mathlib4
--
-- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read :=
-- by
-- suffices β {m h l}, DArray.revIterateAux a (fun i => cons) m h l =
-- ofFnAux (DArray.read a) m h l
-- from this
-- intros; induction' m with m IH generalizing l; Β· rfl
-- simp only [DArray.revIterateAux, of_fn_aux, IH]
-- #align list.array_eq_of_fn List.array_eq_of_fn
@[congr]
theorem ofFn_congr {m n : β} (h : m = n) (f : Fin m β Ξ±) :
ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by
subst h
simp_rw [Fin.cast_refl, id]
#align list.of_fn_congr List.ofFn_congr
@[simp]
theorem ofFn_zero (f : Fin 0 β Ξ±) : ofFn f = [] :=
ext_get (by simp) (fun i hiβ hiβ => by contradiction)
#align list.of_fn_zero List.ofFn_zero
@[simp]
theorem ofFn_succ {n} (f : Fin (succ n) β Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ :=
ext_get (by simp) (fun i hiβ hiβ => by
cases i
Β· simp; rfl
Β· simp)
#align list.of_fn_succ List.ofFn_succ
theorem ofFn_succ' {n} (f : Fin (succ n) β Ξ±) :
ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by
induction' n with n IH
Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero]
rfl
Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero]
congr
#align list.of_fn_succ' List.ofFn_succ'
@[simp]
theorem ofFn_eq_nil_iff {n : β} {f : Fin n β Ξ±} : ofFn f = [] β n = 0 := by
cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero]
#align list.of_fn_eq_nil_iff List.ofFn_eq_nil_iff
| Mathlib/Data/List/OfFn.lean | 139 | 141 | theorem last_ofFn {n : β} (f : Fin n β Ξ±) (h : ofFn f β [])
(hn : n - 1 < n := Nat.pred_lt <| ofFn_eq_nil_iff.not.mp h) :
getLast (ofFn f) h = f β¨n - 1, hnβ© := by | simp [getLast_eq_get]
| 1 | 2.718282 | 0 | 0.6 | 10 | 535 |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {Ξ± : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n β Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
@[simp]
theorem length_ofFn {n} (f : Fin n β Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
#align list.length_of_fn List.length_ofFn
#noalign list.nth_of_fn_aux
theorem get_ofFn_go {n} (f : Fin n β Ξ±) (i j h) (k) (hk) :
get (ofFn.go f i j h) β¨k, hkβ© = f β¨j + k, by simp at hk; omegaβ© := by
let i+1 := i
cases k <;> simp [ofFn.go, get_ofFn_go (i := i)]
congr 2; omega
-- Porting note (#10756): new theorem
@[simp]
theorem get_ofFn {n} (f : Fin n β Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
@[simp]
theorem get?_ofFn {n} (f : Fin n β Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i :=
if h : i < (ofFn f).length
then by
rw [get?_eq_get h, get_ofFn]
Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h]
else by
rw [ofFnNthVal, dif_neg] <;>
simpa using h
#align list.nth_of_fn List.get?_ofFn
set_option linter.deprecated false in
@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n β Ξ±) (i : Fin n) :
nthLe (ofFn f) i ((length_ofFn f).symm βΈ i.2) = f i := by
simp [nthLe]
#align list.nth_le_of_fn List.nthLe_ofFn
set_option linter.deprecated false in
@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n β Ξ±) {i : β} (h : i < (ofFn f).length) :
nthLe (ofFn f) i h = f β¨i, length_ofFn f βΈ hβ© :=
nthLe_ofFn f β¨i, length_ofFn f βΈ hβ©
#align list.nth_le_of_fn' List.nthLe_ofFn'
@[simp]
theorem map_ofFn {Ξ² : Type*} {n : β} (f : Fin n β Ξ±) (g : Ξ± β Ξ²) :
map g (ofFn f) = ofFn (g β f) :=
ext_get (by simp) fun i h h' => by simp
#align list.map_of_fn List.map_ofFn
-- Porting note: we don't have Array' in mathlib4
--
-- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read :=
-- by
-- suffices β {m h l}, DArray.revIterateAux a (fun i => cons) m h l =
-- ofFnAux (DArray.read a) m h l
-- from this
-- intros; induction' m with m IH generalizing l; Β· rfl
-- simp only [DArray.revIterateAux, of_fn_aux, IH]
-- #align list.array_eq_of_fn List.array_eq_of_fn
@[congr]
theorem ofFn_congr {m n : β} (h : m = n) (f : Fin m β Ξ±) :
ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by
subst h
simp_rw [Fin.cast_refl, id]
#align list.of_fn_congr List.ofFn_congr
@[simp]
theorem ofFn_zero (f : Fin 0 β Ξ±) : ofFn f = [] :=
ext_get (by simp) (fun i hiβ hiβ => by contradiction)
#align list.of_fn_zero List.ofFn_zero
@[simp]
theorem ofFn_succ {n} (f : Fin (succ n) β Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ :=
ext_get (by simp) (fun i hiβ hiβ => by
cases i
Β· simp; rfl
Β· simp)
#align list.of_fn_succ List.ofFn_succ
theorem ofFn_succ' {n} (f : Fin (succ n) β Ξ±) :
ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by
induction' n with n IH
Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero]
rfl
Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero]
congr
#align list.of_fn_succ' List.ofFn_succ'
@[simp]
theorem ofFn_eq_nil_iff {n : β} {f : Fin n β Ξ±} : ofFn f = [] β n = 0 := by
cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero]
#align list.of_fn_eq_nil_iff List.ofFn_eq_nil_iff
theorem last_ofFn {n : β} (f : Fin n β Ξ±) (h : ofFn f β [])
(hn : n - 1 < n := Nat.pred_lt <| ofFn_eq_nil_iff.not.mp h) :
getLast (ofFn f) h = f β¨n - 1, hnβ© := by simp [getLast_eq_get]
#align list.last_of_fn List.last_ofFn
theorem last_ofFn_succ {n : β} (f : Fin n.succ β Ξ±)
(h : ofFn f β [] := mt ofFn_eq_nil_iff.mp (Nat.succ_ne_zero _)) :
getLast (ofFn f) h = f (Fin.last _) :=
last_ofFn f h
#align list.last_of_fn_succ List.last_ofFn_succ
| Mathlib/Data/List/OfFn.lean | 151 | 158 | theorem ofFn_add {m n} (f : Fin (m + n) β Ξ±) :
List.ofFn f =
(List.ofFn fun i => f (Fin.castAdd n i)) ++ List.ofFn fun j => f (Fin.natAdd m j) := by |
induction' n with n IH
Β· rw [ofFn_zero, append_nil, Fin.castAdd_zero, Fin.cast_refl]
rfl
Β· rw [ofFn_succ', ofFn_succ', IH, append_concat]
rfl
| 5 | 148.413159 | 2 | 0.6 | 10 | 535 |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
section
variable (T)
def Arrow :=
Comma.{v, v, v} (π T) (π T)
#align category_theory.arrow CategoryTheory.Arrow
instance : Category (Arrow T) := commaCategory
-- Satisfying the inhabited linter
instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where
default := show Comma (π T) (π T) from default
#align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited
end
namespace Arrow
@[ext]
lemma hom_ext {X Y : Arrow T} (f g : X βΆ Y) (hβ : f.left = g.left) (hβ : f.right = g.right) :
f = g :=
CommaMorphism.ext _ _ hβ hβ
@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (π f) = π f.left :=
rfl
#align category_theory.arrow.id_left CategoryTheory.Arrow.id_left
@[simp]
theorem id_right (f : Arrow T) : CommaMorphism.right (π f) = π f.right :=
rfl
#align category_theory.arrow.id_right CategoryTheory.Arrow.id_right
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_left {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).left = f.left β« g.left := rfl
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simps]
def mk {X Y : T} (f : X βΆ Y) : Arrow T where
left := X
right := Y
hom := f
#align category_theory.arrow.mk CategoryTheory.Arrow.mk
@[simp]
| Mathlib/CategoryTheory/Comma/Arrow.lean | 86 | 88 | theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by |
cases f
rfl
| 2 | 7.389056 | 1 | 0.6 | 5 | 536 |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
section
variable (T)
def Arrow :=
Comma.{v, v, v} (π T) (π T)
#align category_theory.arrow CategoryTheory.Arrow
instance : Category (Arrow T) := commaCategory
-- Satisfying the inhabited linter
instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where
default := show Comma (π T) (π T) from default
#align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited
end
namespace Arrow
@[ext]
lemma hom_ext {X Y : Arrow T} (f g : X βΆ Y) (hβ : f.left = g.left) (hβ : f.right = g.right) :
f = g :=
CommaMorphism.ext _ _ hβ hβ
@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (π f) = π f.left :=
rfl
#align category_theory.arrow.id_left CategoryTheory.Arrow.id_left
@[simp]
theorem id_right (f : Arrow T) : CommaMorphism.right (π f) = π f.right :=
rfl
#align category_theory.arrow.id_right CategoryTheory.Arrow.id_right
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_left {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).left = f.left β« g.left := rfl
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simps]
def mk {X Y : T} (f : X βΆ Y) : Arrow T where
left := X
right := Y
hom := f
#align category_theory.arrow.mk CategoryTheory.Arrow.mk
@[simp]
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f
rfl
#align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq
theorem mk_injective (A B : T) :
Function.Injective (Arrow.mk : (A βΆ B) β Arrow T) := fun f g h => by
cases h
rfl
#align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective
theorem mk_inj (A B : T) {f g : A βΆ B} : Arrow.mk f = Arrow.mk g β f = g :=
(mk_injective A B).eq_iff
#align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj
instance {X Y : T} : CoeOut (X βΆ Y) (Arrow T) where
coe := mk
@[simps]
def homMk {f g : Arrow T} {u : f.left βΆ g.left} {v : f.right βΆ g.right}
(w : u β« g.hom = f.hom β« v) : f βΆ g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk
@[simps]
def homMk' {X Y : T} {f : X βΆ Y} {P Q : T} {g : P βΆ Q} {u : X βΆ P} {v : Y βΆ Q} (w : u β« g = f β« v) :
Arrow.mk f βΆ Arrow.mk g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk'
@[reassoc (attr := simp, nolint simpNF)]
theorem w {f g : Arrow T} (sq : f βΆ g) : sq.left β« g.hom = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w CategoryTheory.Arrow.w
-- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`.
@[reassoc (attr := simp)]
theorem w_mk_right {f : Arrow T} {X Y : T} {g : X βΆ Y} (sq : f βΆ mk g) :
sq.left β« g = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right
| Mathlib/CategoryTheory/Comma/Arrow.lean | 138 | 143 | theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f βΆ g) [IsIso ff.left]
[IsIso ff.right] : IsIso ff where
out := by |
let inverse : g βΆ f := β¨inv ff.left, inv ff.right, (by simp)β©
apply Exists.intro inverse
aesop_cat
| 3 | 20.085537 | 1 | 0.6 | 5 | 536 |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
section
variable (T)
def Arrow :=
Comma.{v, v, v} (π T) (π T)
#align category_theory.arrow CategoryTheory.Arrow
instance : Category (Arrow T) := commaCategory
-- Satisfying the inhabited linter
instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where
default := show Comma (π T) (π T) from default
#align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited
end
namespace Arrow
@[ext]
lemma hom_ext {X Y : Arrow T} (f g : X βΆ Y) (hβ : f.left = g.left) (hβ : f.right = g.right) :
f = g :=
CommaMorphism.ext _ _ hβ hβ
@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (π f) = π f.left :=
rfl
#align category_theory.arrow.id_left CategoryTheory.Arrow.id_left
@[simp]
theorem id_right (f : Arrow T) : CommaMorphism.right (π f) = π f.right :=
rfl
#align category_theory.arrow.id_right CategoryTheory.Arrow.id_right
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_left {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).left = f.left β« g.left := rfl
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simps]
def mk {X Y : T} (f : X βΆ Y) : Arrow T where
left := X
right := Y
hom := f
#align category_theory.arrow.mk CategoryTheory.Arrow.mk
@[simp]
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f
rfl
#align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq
theorem mk_injective (A B : T) :
Function.Injective (Arrow.mk : (A βΆ B) β Arrow T) := fun f g h => by
cases h
rfl
#align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective
theorem mk_inj (A B : T) {f g : A βΆ B} : Arrow.mk f = Arrow.mk g β f = g :=
(mk_injective A B).eq_iff
#align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj
instance {X Y : T} : CoeOut (X βΆ Y) (Arrow T) where
coe := mk
@[simps]
def homMk {f g : Arrow T} {u : f.left βΆ g.left} {v : f.right βΆ g.right}
(w : u β« g.hom = f.hom β« v) : f βΆ g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk
@[simps]
def homMk' {X Y : T} {f : X βΆ Y} {P Q : T} {g : P βΆ Q} {u : X βΆ P} {v : Y βΆ Q} (w : u β« g = f β« v) :
Arrow.mk f βΆ Arrow.mk g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk'
@[reassoc (attr := simp, nolint simpNF)]
theorem w {f g : Arrow T} (sq : f βΆ g) : sq.left β« g.hom = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w CategoryTheory.Arrow.w
-- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`.
@[reassoc (attr := simp)]
theorem w_mk_right {f : Arrow T} {X Y : T} {g : X βΆ Y} (sq : f βΆ mk g) :
sq.left β« g = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right
theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f βΆ g) [IsIso ff.left]
[IsIso ff.right] : IsIso ff where
out := by
let inverse : g βΆ f := β¨inv ff.left, inv ff.right, (by simp)β©
apply Exists.intro inverse
aesop_cat
#align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right
@[simps!]
def isoMk {f g : Arrow T} (l : f.left β
g.left) (r : f.right β
g.right)
(h : l.hom β« g.hom = f.hom β« r.hom := by aesop_cat) : f β
g :=
Comma.isoMk l r h
#align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk
abbrev isoMk' {W X Y Z : T} (f : W βΆ X) (g : Y βΆ Z) (eβ : W β
Y) (eβ : X β
Z)
(h : eβ.hom β« g = f β« eβ.hom := by aesop_cat) : Arrow.mk f β
Arrow.mk g :=
Arrow.isoMk eβ eβ h
#align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk'
| Mathlib/CategoryTheory/Comma/Arrow.lean | 162 | 163 | theorem hom.congr_left {f g : Arrow T} {Οβ Οβ : f βΆ g} (h : Οβ = Οβ) : Οβ.left = Οβ.left := by |
rw [h]
| 1 | 2.718282 | 0 | 0.6 | 5 | 536 |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
section
variable (T)
def Arrow :=
Comma.{v, v, v} (π T) (π T)
#align category_theory.arrow CategoryTheory.Arrow
instance : Category (Arrow T) := commaCategory
-- Satisfying the inhabited linter
instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where
default := show Comma (π T) (π T) from default
#align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited
end
namespace Arrow
@[ext]
lemma hom_ext {X Y : Arrow T} (f g : X βΆ Y) (hβ : f.left = g.left) (hβ : f.right = g.right) :
f = g :=
CommaMorphism.ext _ _ hβ hβ
@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (π f) = π f.left :=
rfl
#align category_theory.arrow.id_left CategoryTheory.Arrow.id_left
@[simp]
theorem id_right (f : Arrow T) : CommaMorphism.right (π f) = π f.right :=
rfl
#align category_theory.arrow.id_right CategoryTheory.Arrow.id_right
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_left {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).left = f.left β« g.left := rfl
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simps]
def mk {X Y : T} (f : X βΆ Y) : Arrow T where
left := X
right := Y
hom := f
#align category_theory.arrow.mk CategoryTheory.Arrow.mk
@[simp]
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f
rfl
#align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq
theorem mk_injective (A B : T) :
Function.Injective (Arrow.mk : (A βΆ B) β Arrow T) := fun f g h => by
cases h
rfl
#align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective
theorem mk_inj (A B : T) {f g : A βΆ B} : Arrow.mk f = Arrow.mk g β f = g :=
(mk_injective A B).eq_iff
#align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj
instance {X Y : T} : CoeOut (X βΆ Y) (Arrow T) where
coe := mk
@[simps]
def homMk {f g : Arrow T} {u : f.left βΆ g.left} {v : f.right βΆ g.right}
(w : u β« g.hom = f.hom β« v) : f βΆ g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk
@[simps]
def homMk' {X Y : T} {f : X βΆ Y} {P Q : T} {g : P βΆ Q} {u : X βΆ P} {v : Y βΆ Q} (w : u β« g = f β« v) :
Arrow.mk f βΆ Arrow.mk g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk'
@[reassoc (attr := simp, nolint simpNF)]
theorem w {f g : Arrow T} (sq : f βΆ g) : sq.left β« g.hom = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w CategoryTheory.Arrow.w
-- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`.
@[reassoc (attr := simp)]
theorem w_mk_right {f : Arrow T} {X Y : T} {g : X βΆ Y} (sq : f βΆ mk g) :
sq.left β« g = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right
theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f βΆ g) [IsIso ff.left]
[IsIso ff.right] : IsIso ff where
out := by
let inverse : g βΆ f := β¨inv ff.left, inv ff.right, (by simp)β©
apply Exists.intro inverse
aesop_cat
#align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right
@[simps!]
def isoMk {f g : Arrow T} (l : f.left β
g.left) (r : f.right β
g.right)
(h : l.hom β« g.hom = f.hom β« r.hom := by aesop_cat) : f β
g :=
Comma.isoMk l r h
#align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk
abbrev isoMk' {W X Y Z : T} (f : W βΆ X) (g : Y βΆ Z) (eβ : W β
Y) (eβ : X β
Z)
(h : eβ.hom β« g = f β« eβ.hom := by aesop_cat) : Arrow.mk f β
Arrow.mk g :=
Arrow.isoMk eβ eβ h
#align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk'
theorem hom.congr_left {f g : Arrow T} {Οβ Οβ : f βΆ g} (h : Οβ = Οβ) : Οβ.left = Οβ.left := by
rw [h]
#align category_theory.arrow.hom.congr_left CategoryTheory.Arrow.hom.congr_left
@[simp]
| Mathlib/CategoryTheory/Comma/Arrow.lean | 167 | 168 | theorem hom.congr_right {f g : Arrow T} {Οβ Οβ : f βΆ g} (h : Οβ = Οβ) : Οβ.right = Οβ.right := by |
rw [h]
| 1 | 2.718282 | 0 | 0.6 | 5 | 536 |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
section
variable (T)
def Arrow :=
Comma.{v, v, v} (π T) (π T)
#align category_theory.arrow CategoryTheory.Arrow
instance : Category (Arrow T) := commaCategory
-- Satisfying the inhabited linter
instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where
default := show Comma (π T) (π T) from default
#align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited
end
namespace Arrow
@[ext]
lemma hom_ext {X Y : Arrow T} (f g : X βΆ Y) (hβ : f.left = g.left) (hβ : f.right = g.right) :
f = g :=
CommaMorphism.ext _ _ hβ hβ
@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (π f) = π f.left :=
rfl
#align category_theory.arrow.id_left CategoryTheory.Arrow.id_left
@[simp]
theorem id_right (f : Arrow T) : CommaMorphism.right (π f) = π f.right :=
rfl
#align category_theory.arrow.id_right CategoryTheory.Arrow.id_right
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_left {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).left = f.left β« g.left := rfl
-- Porting note (#10688): added to ease automation
@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g).right = f.right β« g.right := rfl
@[simps]
def mk {X Y : T} (f : X βΆ Y) : Arrow T where
left := X
right := Y
hom := f
#align category_theory.arrow.mk CategoryTheory.Arrow.mk
@[simp]
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f
rfl
#align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq
theorem mk_injective (A B : T) :
Function.Injective (Arrow.mk : (A βΆ B) β Arrow T) := fun f g h => by
cases h
rfl
#align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective
theorem mk_inj (A B : T) {f g : A βΆ B} : Arrow.mk f = Arrow.mk g β f = g :=
(mk_injective A B).eq_iff
#align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj
instance {X Y : T} : CoeOut (X βΆ Y) (Arrow T) where
coe := mk
@[simps]
def homMk {f g : Arrow T} {u : f.left βΆ g.left} {v : f.right βΆ g.right}
(w : u β« g.hom = f.hom β« v) : f βΆ g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk
@[simps]
def homMk' {X Y : T} {f : X βΆ Y} {P Q : T} {g : P βΆ Q} {u : X βΆ P} {v : Y βΆ Q} (w : u β« g = f β« v) :
Arrow.mk f βΆ Arrow.mk g where
left := u
right := v
w := w
#align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk'
@[reassoc (attr := simp, nolint simpNF)]
theorem w {f g : Arrow T} (sq : f βΆ g) : sq.left β« g.hom = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w CategoryTheory.Arrow.w
-- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`.
@[reassoc (attr := simp)]
theorem w_mk_right {f : Arrow T} {X Y : T} {g : X βΆ Y} (sq : f βΆ mk g) :
sq.left β« g = f.hom β« sq.right :=
sq.w
#align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right
theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f βΆ g) [IsIso ff.left]
[IsIso ff.right] : IsIso ff where
out := by
let inverse : g βΆ f := β¨inv ff.left, inv ff.right, (by simp)β©
apply Exists.intro inverse
aesop_cat
#align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right
@[simps!]
def isoMk {f g : Arrow T} (l : f.left β
g.left) (r : f.right β
g.right)
(h : l.hom β« g.hom = f.hom β« r.hom := by aesop_cat) : f β
g :=
Comma.isoMk l r h
#align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk
abbrev isoMk' {W X Y Z : T} (f : W βΆ X) (g : Y βΆ Z) (eβ : W β
Y) (eβ : X β
Z)
(h : eβ.hom β« g = f β« eβ.hom := by aesop_cat) : Arrow.mk f β
Arrow.mk g :=
Arrow.isoMk eβ eβ h
#align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk'
theorem hom.congr_left {f g : Arrow T} {Οβ Οβ : f βΆ g} (h : Οβ = Οβ) : Οβ.left = Οβ.left := by
rw [h]
#align category_theory.arrow.hom.congr_left CategoryTheory.Arrow.hom.congr_left
@[simp]
theorem hom.congr_right {f g : Arrow T} {Οβ Οβ : f βΆ g} (h : Οβ = Οβ) : Οβ.right = Οβ.right := by
rw [h]
#align category_theory.arrow.hom.congr_right CategoryTheory.Arrow.hom.congr_right
| Mathlib/CategoryTheory/Comma/Arrow.lean | 171 | 174 | theorem iso_w {f g : Arrow T} (e : f β
g) : g.hom = e.inv.left β« f.hom β« e.hom.right := by |
have eq := Arrow.hom.congr_right e.inv_hom_id
rw [Arrow.comp_right, Arrow.id_right] at eq
erw [Arrow.w_assoc, eq, Category.comp_id]
| 3 | 20.085537 | 1 | 0.6 | 5 | 536 |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped NNReal ENNReal Uniformity Topology
open Set Filter Bornology
def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ββ₯0) (f : Ξ± β Ξ²) :=
β x y, edist x y β€ K * edist (f x) (f y)
#align antilipschitz_with AntilipschitzWith
theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < β€ :=
(h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _)
#align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top
theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β β€ :=
(h.edist_lt_top x y).ne
#align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top
section Metric
variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0} {f : Ξ± β Ξ²}
| Mathlib/Topology/MetricSpace/Antilipschitz.lean | 53 | 56 | theorem antilipschitzWith_iff_le_mul_nndist :
AntilipschitzWith K f β β x y, nndist x y β€ K * nndist (f x) (f y) := by |
simp only [AntilipschitzWith, edist_nndist]
norm_cast
| 2 | 7.389056 | 1 | 0.6 | 5 | 537 |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped NNReal ENNReal Uniformity Topology
open Set Filter Bornology
def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ββ₯0) (f : Ξ± β Ξ²) :=
β x y, edist x y β€ K * edist (f x) (f y)
#align antilipschitz_with AntilipschitzWith
theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < β€ :=
(h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _)
#align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top
theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β β€ :=
(h.edist_lt_top x y).ne
#align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top
section Metric
variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0} {f : Ξ± β Ξ²}
theorem antilipschitzWith_iff_le_mul_nndist :
AntilipschitzWith K f β β x y, nndist x y β€ K * nndist (f x) (f y) := by
simp only [AntilipschitzWith, edist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist
alias β¨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndistβ© :=
antilipschitzWith_iff_le_mul_nndist
#align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist
#align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist
| Mathlib/Topology/MetricSpace/Antilipschitz.lean | 64 | 67 | theorem antilipschitzWith_iff_le_mul_dist :
AntilipschitzWith K f β β x y, dist x y β€ K * dist (f x) (f y) := by |
simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist]
norm_cast
| 2 | 7.389056 | 1 | 0.6 | 5 | 537 |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped NNReal ENNReal Uniformity Topology
open Set Filter Bornology
def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ββ₯0) (f : Ξ± β Ξ²) :=
β x y, edist x y β€ K * edist (f x) (f y)
#align antilipschitz_with AntilipschitzWith
theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < β€ :=
(h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _)
#align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top
theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β β€ :=
(h.edist_lt_top x y).ne
#align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top
section Metric
variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0} {f : Ξ± β Ξ²}
theorem antilipschitzWith_iff_le_mul_nndist :
AntilipschitzWith K f β β x y, nndist x y β€ K * nndist (f x) (f y) := by
simp only [AntilipschitzWith, edist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist
alias β¨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndistβ© :=
antilipschitzWith_iff_le_mul_nndist
#align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist
#align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist
theorem antilipschitzWith_iff_le_mul_dist :
AntilipschitzWith K f β β x y, dist x y β€ K * dist (f x) (f y) := by
simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist
alias β¨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_distβ© :=
antilipschitzWith_iff_le_mul_dist
#align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist
#align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist
namespace AntilipschitzWith
| Mathlib/Topology/MetricSpace/Antilipschitz.lean | 77 | 79 | theorem mul_le_nndist (hf : AntilipschitzWith K f) (x y : Ξ±) :
Kβ»ΒΉ * nndist x y β€ nndist (f x) (f y) := by |
simpa only [div_eq_inv_mul] using NNReal.div_le_of_le_mul' (hf.le_mul_nndist x y)
| 1 | 2.718282 | 0 | 0.6 | 5 | 537 |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped NNReal ENNReal Uniformity Topology
open Set Filter Bornology
def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ββ₯0) (f : Ξ± β Ξ²) :=
β x y, edist x y β€ K * edist (f x) (f y)
#align antilipschitz_with AntilipschitzWith
theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < β€ :=
(h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _)
#align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top
theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β β€ :=
(h.edist_lt_top x y).ne
#align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top
section Metric
variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0} {f : Ξ± β Ξ²}
theorem antilipschitzWith_iff_le_mul_nndist :
AntilipschitzWith K f β β x y, nndist x y β€ K * nndist (f x) (f y) := by
simp only [AntilipschitzWith, edist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist
alias β¨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndistβ© :=
antilipschitzWith_iff_le_mul_nndist
#align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist
#align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist
theorem antilipschitzWith_iff_le_mul_dist :
AntilipschitzWith K f β β x y, dist x y β€ K * dist (f x) (f y) := by
simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist
alias β¨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_distβ© :=
antilipschitzWith_iff_le_mul_dist
#align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist
#align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist
namespace AntilipschitzWith
variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³]
variable {K : ββ₯0} {f : Ξ± β Ξ²}
open EMetric
-- uses neither `f` nor `hf`
@[nolint unusedArguments]
protected def k (_hf : AntilipschitzWith K f) : ββ₯0 := K
set_option linter.uppercaseLean3 false in
#align antilipschitz_with.K AntilipschitzWith.k
protected theorem injective {Ξ± : Type*} {Ξ² : Type*} [EMetricSpace Ξ±] [PseudoEMetricSpace Ξ²]
{K : ββ₯0} {f : Ξ± β Ξ²} (hf : AntilipschitzWith K f) : Function.Injective f := fun x y h => by
simpa only [h, edist_self, mul_zero, edist_le_zero] using hf x y
#align antilipschitz_with.injective AntilipschitzWith.injective
| Mathlib/Topology/MetricSpace/Antilipschitz.lean | 110 | 113 | theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : Ξ±) :
(K : ββ₯0β)β»ΒΉ * edist x y β€ edist (f x) (f y) := by |
rw [mul_comm, β div_eq_mul_inv]
exact ENNReal.div_le_of_le_mul' (hf x y)
| 2 | 7.389056 | 1 | 0.6 | 5 | 537 |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
variable {Ξ± Ξ² Ξ³ : Type*}
open scoped NNReal ENNReal Uniformity Topology
open Set Filter Bornology
def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ββ₯0) (f : Ξ± β Ξ²) :=
β x y, edist x y β€ K * edist (f x) (f y)
#align antilipschitz_with AntilipschitzWith
theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < β€ :=
(h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _)
#align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top
theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0}
{f : Ξ± β Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β β€ :=
(h.edist_lt_top x y).ne
#align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top
section Metric
variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ββ₯0} {f : Ξ± β Ξ²}
theorem antilipschitzWith_iff_le_mul_nndist :
AntilipschitzWith K f β β x y, nndist x y β€ K * nndist (f x) (f y) := by
simp only [AntilipschitzWith, edist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist
alias β¨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndistβ© :=
antilipschitzWith_iff_le_mul_nndist
#align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist
#align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist
theorem antilipschitzWith_iff_le_mul_dist :
AntilipschitzWith K f β β x y, dist x y β€ K * dist (f x) (f y) := by
simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist]
norm_cast
#align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist
alias β¨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_distβ© :=
antilipschitzWith_iff_le_mul_dist
#align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist
#align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist
namespace AntilipschitzWith
variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³]
variable {K : ββ₯0} {f : Ξ± β Ξ²}
open EMetric
-- uses neither `f` nor `hf`
@[nolint unusedArguments]
protected def k (_hf : AntilipschitzWith K f) : ββ₯0 := K
set_option linter.uppercaseLean3 false in
#align antilipschitz_with.K AntilipschitzWith.k
protected theorem injective {Ξ± : Type*} {Ξ² : Type*} [EMetricSpace Ξ±] [PseudoEMetricSpace Ξ²]
{K : ββ₯0} {f : Ξ± β Ξ²} (hf : AntilipschitzWith K f) : Function.Injective f := fun x y h => by
simpa only [h, edist_self, mul_zero, edist_le_zero] using hf x y
#align antilipschitz_with.injective AntilipschitzWith.injective
theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : Ξ±) :
(K : ββ₯0β)β»ΒΉ * edist x y β€ edist (f x) (f y) := by
rw [mul_comm, β div_eq_mul_inv]
exact ENNReal.div_le_of_le_mul' (hf x y)
#align antilipschitz_with.mul_le_edist AntilipschitzWith.mul_le_edist
theorem ediam_preimage_le (hf : AntilipschitzWith K f) (s : Set Ξ²) : diam (f β»ΒΉ' s) β€ K * diam s :=
diam_le fun x hx y hy => (hf x y).trans <|
mul_le_mul_left' (edist_le_diam_of_mem (mem_preimage.1 hx) hy) K
#align antilipschitz_with.ediam_preimage_le AntilipschitzWith.ediam_preimage_le
theorem le_mul_ediam_image (hf : AntilipschitzWith K f) (s : Set Ξ±) : diam s β€ K * diam (f '' s) :=
(diam_mono (subset_preimage_image _ _)).trans (hf.ediam_preimage_le (f '' s))
#align antilipschitz_with.le_mul_ediam_image AntilipschitzWith.le_mul_ediam_image
protected theorem id : AntilipschitzWith 1 (id : Ξ± β Ξ±) := fun x y => by
simp only [ENNReal.coe_one, one_mul, id, le_refl]
#align antilipschitz_with.id AntilipschitzWith.id
| Mathlib/Topology/MetricSpace/Antilipschitz.lean | 129 | 134 | theorem comp {Kg : ββ₯0} {g : Ξ² β Ξ³} (hg : AntilipschitzWith Kg g) {Kf : ββ₯0} {f : Ξ± β Ξ²}
(hf : AntilipschitzWith Kf f) : AntilipschitzWith (Kf * Kg) (g β f) := fun x y =>
calc
edist x y β€ Kf * edist (f x) (f y) := hf x y
_ β€ Kf * (Kg * edist (g (f x)) (g (f y))) := ENNReal.mul_left_mono (hg _ _)
_ = _ := by | rw [ENNReal.coe_mul, mul_assoc]; rfl
| 1 | 2.718282 | 0 | 0.6 | 5 | 537 |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe vβ vβ vβ uβ uβ uβ
noncomputable section
namespace CategoryTheory
open Category Adjunction
variable {C : Type uβ} {D : Type uβ} {E : Type uβ}
variable [Category.{vβ} C] [Category.{vβ} D] [Category.{vβ} E]
class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where
L : C β₯€ D
adj : L β£ R
#align category_theory.reflective CategoryTheory.Reflective
variable (i : D β₯€ C)
def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i)
def reflectorAdjunction [Reflective i] : reflector i β£ i := Reflective.adj
instance [Reflective i] : i.IsRightAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
instance [Reflective i] : (reflector i).IsLeftAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful :=
(reflectorAdjunction i).fullyFaithfulROfIsIsoCounit
-- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
| Mathlib/CategoryTheory/Adjunction/Reflective.lean | 62 | 67 | theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
(reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by |
rw [β cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))),
β i.map_comp]
simp
| 3 | 20.085537 | 1 | 0.6 | 5 | 538 |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe vβ vβ vβ uβ uβ uβ
noncomputable section
namespace CategoryTheory
open Category Adjunction
variable {C : Type uβ} {D : Type uβ} {E : Type uβ}
variable [Category.{vβ} C] [Category.{vβ} D] [Category.{vβ} E]
class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where
L : C β₯€ D
adj : L β£ R
#align category_theory.reflective CategoryTheory.Reflective
variable (i : D β₯€ C)
def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i)
def reflectorAdjunction [Reflective i] : reflector i β£ i := Reflective.adj
instance [Reflective i] : i.IsRightAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
instance [Reflective i] : (reflector i).IsLeftAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful :=
(reflectorAdjunction i).fullyFaithfulROfIsIsoCounit
-- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
(reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by
rw [β cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))),
β i.map_comp]
simp
#align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit
example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) :=
inferInstance
variable {i}
| Mathlib/CategoryTheory/Adjunction/Reflective.lean | 87 | 89 | theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A β i.essImage) :
IsIso ((reflectorAdjunction i).unit.app A) := by |
rwa [isIso_unit_app_iff_mem_essImage]
| 1 | 2.718282 | 0 | 0.6 | 5 | 538 |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe vβ vβ vβ uβ uβ uβ
noncomputable section
namespace CategoryTheory
open Category Adjunction
variable {C : Type uβ} {D : Type uβ} {E : Type uβ}
variable [Category.{vβ} C] [Category.{vβ} D] [Category.{vβ} E]
class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where
L : C β₯€ D
adj : L β£ R
#align category_theory.reflective CategoryTheory.Reflective
variable (i : D β₯€ C)
def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i)
def reflectorAdjunction [Reflective i] : reflector i β£ i := Reflective.adj
instance [Reflective i] : i.IsRightAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
instance [Reflective i] : (reflector i).IsLeftAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful :=
(reflectorAdjunction i).fullyFaithfulROfIsIsoCounit
-- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
(reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by
rw [β cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))),
β i.map_comp]
simp
#align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit
example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) :=
inferInstance
variable {i}
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A β i.essImage) :
IsIso ((reflectorAdjunction i).unit.app A) := by
rwa [isIso_unit_app_iff_mem_essImage]
#align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso
theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L β£ i) (A : C)
[IsIso (adj.unit.app A)] : A β i.essImage :=
β¨L.obj A, β¨(asIso (adj.unit.app A)).symmβ©β©
#align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso
| Mathlib/CategoryTheory/Adjunction/Reflective.lean | 99 | 109 | theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
[IsSplitMono ((reflectorAdjunction i).unit.app A)] : A β i.essImage := by |
let Ξ· : π C βΆ reflector i β i := (reflectorAdjunction i).unit
haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) :=
Functor.essImage.unit_isIso ((i.obj_mem_essImage _))
have : Epi (Ξ·.app A) := by
refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_
rw [show retraction _ β« Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))]
apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A)))
haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A)
exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A
| 9 | 8,103.083928 | 2 | 0.6 | 5 | 538 |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe vβ vβ vβ uβ uβ uβ
noncomputable section
namespace CategoryTheory
open Category Adjunction
variable {C : Type uβ} {D : Type uβ} {E : Type uβ}
variable [Category.{vβ} C] [Category.{vβ} D] [Category.{vβ} E]
class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where
L : C β₯€ D
adj : L β£ R
#align category_theory.reflective CategoryTheory.Reflective
variable (i : D β₯€ C)
def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i)
def reflectorAdjunction [Reflective i] : reflector i β£ i := Reflective.adj
instance [Reflective i] : i.IsRightAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
instance [Reflective i] : (reflector i).IsLeftAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful :=
(reflectorAdjunction i).fullyFaithfulROfIsIsoCounit
-- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
(reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by
rw [β cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))),
β i.map_comp]
simp
#align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit
example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) :=
inferInstance
variable {i}
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A β i.essImage) :
IsIso ((reflectorAdjunction i).unit.app A) := by
rwa [isIso_unit_app_iff_mem_essImage]
#align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso
theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L β£ i) (A : C)
[IsIso (adj.unit.app A)] : A β i.essImage :=
β¨L.obj A, β¨(asIso (adj.unit.app A)).symmβ©β©
#align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso
theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
[IsSplitMono ((reflectorAdjunction i).unit.app A)] : A β i.essImage := by
let Ξ· : π C βΆ reflector i β i := (reflectorAdjunction i).unit
haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) :=
Functor.essImage.unit_isIso ((i.obj_mem_essImage _))
have : Epi (Ξ·.app A) := by
refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_
rw [show retraction _ β« Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))]
apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A)))
haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A)
exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A
#align category_theory.mem_ess_image_of_unit_is_split_mono CategoryTheory.mem_essImage_of_unit_isSplitMono
instance Reflective.comp (F : C β₯€ D) (G : D β₯€ E) [Reflective F] [Reflective G] :
Reflective (F β G) where
L := reflector G β reflector F
adj := (reflectorAdjunction G).comp (reflectorAdjunction F)
#align category_theory.reflective.comp CategoryTheory.Reflective.comp
def unitCompPartialBijectiveAux [Reflective i] (A : C) (B : D) :
(A βΆ i.obj B) β (i.obj ((reflector i).obj A) βΆ i.obj B) :=
((reflectorAdjunction i).homEquiv _ _).symm.trans
(Functor.FullyFaithful.ofFullyFaithful i).homEquiv
#align category_theory.unit_comp_partial_bijective_aux CategoryTheory.unitCompPartialBijectiveAux
| Mathlib/CategoryTheory/Adjunction/Reflective.lean | 127 | 130 | theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D}
(f : i.obj ((reflector i).obj A) βΆ i.obj B) :
(unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A β« f := by |
simp [unitCompPartialBijectiveAux]
| 1 | 2.718282 | 0 | 0.6 | 5 | 538 |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe vβ vβ vβ uβ uβ uβ
noncomputable section
namespace CategoryTheory
open Category Adjunction
variable {C : Type uβ} {D : Type uβ} {E : Type uβ}
variable [Category.{vβ} C] [Category.{vβ} D] [Category.{vβ} E]
class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where
L : C β₯€ D
adj : L β£ R
#align category_theory.reflective CategoryTheory.Reflective
variable (i : D β₯€ C)
def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i)
def reflectorAdjunction [Reflective i] : reflector i β£ i := Reflective.adj
instance [Reflective i] : i.IsRightAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
instance [Reflective i] : (reflector i).IsLeftAdjoint := β¨_, β¨reflectorAdjunction iβ©β©
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful :=
(reflectorAdjunction i).fullyFaithfulROfIsIsoCounit
-- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
(reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by
rw [β cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))),
β i.map_comp]
simp
#align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit
example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) :=
inferInstance
variable {i}
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A β i.essImage) :
IsIso ((reflectorAdjunction i).unit.app A) := by
rwa [isIso_unit_app_iff_mem_essImage]
#align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso
theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L β£ i) (A : C)
[IsIso (adj.unit.app A)] : A β i.essImage :=
β¨L.obj A, β¨(asIso (adj.unit.app A)).symmβ©β©
#align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso
theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
[IsSplitMono ((reflectorAdjunction i).unit.app A)] : A β i.essImage := by
let Ξ· : π C βΆ reflector i β i := (reflectorAdjunction i).unit
haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) :=
Functor.essImage.unit_isIso ((i.obj_mem_essImage _))
have : Epi (Ξ·.app A) := by
refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_
rw [show retraction _ β« Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))]
apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A)))
haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A)
exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A
#align category_theory.mem_ess_image_of_unit_is_split_mono CategoryTheory.mem_essImage_of_unit_isSplitMono
instance Reflective.comp (F : C β₯€ D) (G : D β₯€ E) [Reflective F] [Reflective G] :
Reflective (F β G) where
L := reflector G β reflector F
adj := (reflectorAdjunction G).comp (reflectorAdjunction F)
#align category_theory.reflective.comp CategoryTheory.Reflective.comp
def unitCompPartialBijectiveAux [Reflective i] (A : C) (B : D) :
(A βΆ i.obj B) β (i.obj ((reflector i).obj A) βΆ i.obj B) :=
((reflectorAdjunction i).homEquiv _ _).symm.trans
(Functor.FullyFaithful.ofFullyFaithful i).homEquiv
#align category_theory.unit_comp_partial_bijective_aux CategoryTheory.unitCompPartialBijectiveAux
theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D}
(f : i.obj ((reflector i).obj A) βΆ i.obj B) :
(unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A β« f := by
simp [unitCompPartialBijectiveAux]
#align category_theory.unit_comp_partial_bijective_aux_symm_apply CategoryTheory.unitCompPartialBijectiveAux_symm_apply
def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : B β i.essImage) :
(A βΆ B) β (i.obj ((reflector i).obj A) βΆ B) :=
calc
(A βΆ B) β (A βΆ i.obj (Functor.essImage.witness hB)) := Iso.homCongr (Iso.refl _) hB.getIso.symm
_ β (i.obj _ βΆ i.obj (Functor.essImage.witness hB)) := unitCompPartialBijectiveAux _ _
_ β (i.obj ((reflector i).obj A) βΆ B) :=
Iso.homCongr (Iso.refl _) (Functor.essImage.getIso hB)
#align category_theory.unit_comp_partial_bijective CategoryTheory.unitCompPartialBijective
@[simp]
| Mathlib/CategoryTheory/Adjunction/Reflective.lean | 154 | 156 | theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : B β i.essImage)
(f) : (unitCompPartialBijective A hB).symm f = (reflectorAdjunction i).unit.app A β« f := by |
simp [unitCompPartialBijective, unitCompPartialBijectiveAux_symm_apply]
| 1 | 2.718282 | 0 | 0.6 | 5 | 538 |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : Type*) {B : Type*} (F : Type*) (E : B β Type*)
section TopologicalVectorSpace
variable {F E}
variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B]
protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)]
[β x, Module R (E x)] (e : Pretrivialization F (Ο F E)) : Prop where
linear : β b β e.baseSet, IsLinearMap R fun x : E b => (e β¨b, xβ©).2
#align pretrivialization.is_linear Pretrivialization.IsLinear
namespace Pretrivialization
variable (e : Pretrivialization F (Ο F E)) {x : TotalSpace F E} {b : B} {y : E b}
theorem linear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
[e.IsLinear R] {b : B} (hb : b β e.baseSet) :
IsLinearMap R fun x : E b => (e β¨b, xβ©).2 :=
Pretrivialization.IsLinear.linear b hb
#align pretrivialization.linear Pretrivialization.linear
variable [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
@[simps!]
protected def symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : F ββ[R] E b := by
refine IsLinearMap.mk' (e.symm b) ?_
by_cases hb : b β e.baseSet
Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v β¦
congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear
Β· rw [e.coe_symm_of_not_mem hb]
exact (0 : F ββ[R] E b).isLinear
#align pretrivialization.symmβ Pretrivialization.symmβ
@[simps (config := .asFn)]
def linearEquivAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) (hb : b β e.baseSet) :
E b ββ[R] F where
toFun y := (e β¨b, yβ©).2
invFun := e.symm b
left_inv := e.symm_apply_apply_mk hb
right_inv v := by simp_rw [e.apply_mk_symm hb v]
map_add' v w := (e.linear R hb).map_add v w
map_smul' c v := (e.linear R hb).map_smul c v
#align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt
protected def linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : E b ββ[R] F :=
if hb : b β e.baseSet then e.linearEquivAt R b hb else 0
#align pretrivialization.linear_map_at Pretrivialization.linearMapAt
variable {R}
| Mathlib/Topology/VectorBundle/Basic.lean | 120 | 123 | theorem coe_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) :
β(e.linearMapAt R b) = fun y => if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by |
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
| 2 | 7.389056 | 1 | 0.6 | 5 | 539 |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : Type*) {B : Type*} (F : Type*) (E : B β Type*)
section TopologicalVectorSpace
variable {F E}
variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B]
protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)]
[β x, Module R (E x)] (e : Pretrivialization F (Ο F E)) : Prop where
linear : β b β e.baseSet, IsLinearMap R fun x : E b => (e β¨b, xβ©).2
#align pretrivialization.is_linear Pretrivialization.IsLinear
namespace Pretrivialization
variable (e : Pretrivialization F (Ο F E)) {x : TotalSpace F E} {b : B} {y : E b}
theorem linear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
[e.IsLinear R] {b : B} (hb : b β e.baseSet) :
IsLinearMap R fun x : E b => (e β¨b, xβ©).2 :=
Pretrivialization.IsLinear.linear b hb
#align pretrivialization.linear Pretrivialization.linear
variable [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
@[simps!]
protected def symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : F ββ[R] E b := by
refine IsLinearMap.mk' (e.symm b) ?_
by_cases hb : b β e.baseSet
Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v β¦
congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear
Β· rw [e.coe_symm_of_not_mem hb]
exact (0 : F ββ[R] E b).isLinear
#align pretrivialization.symmβ Pretrivialization.symmβ
@[simps (config := .asFn)]
def linearEquivAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) (hb : b β e.baseSet) :
E b ββ[R] F where
toFun y := (e β¨b, yβ©).2
invFun := e.symm b
left_inv := e.symm_apply_apply_mk hb
right_inv v := by simp_rw [e.apply_mk_symm hb v]
map_add' v w := (e.linear R hb).map_add v w
map_smul' c v := (e.linear R hb).map_smul c v
#align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt
protected def linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : E b ββ[R] F :=
if hb : b β e.baseSet then e.linearEquivAt R b hb else 0
#align pretrivialization.linear_map_at Pretrivialization.linearMapAt
variable {R}
theorem coe_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) :
β(e.linearMapAt R b) = fun y => if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
#align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt
| Mathlib/Topology/VectorBundle/Basic.lean | 126 | 128 | theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : β(e.linearMapAt R b) = fun y => (e β¨b, yβ©).2 := by |
simp_rw [coe_linearMapAt, if_pos hb]
| 1 | 2.718282 | 0 | 0.6 | 5 | 539 |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : Type*) {B : Type*} (F : Type*) (E : B β Type*)
section TopologicalVectorSpace
variable {F E}
variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B]
protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)]
[β x, Module R (E x)] (e : Pretrivialization F (Ο F E)) : Prop where
linear : β b β e.baseSet, IsLinearMap R fun x : E b => (e β¨b, xβ©).2
#align pretrivialization.is_linear Pretrivialization.IsLinear
namespace Pretrivialization
variable (e : Pretrivialization F (Ο F E)) {x : TotalSpace F E} {b : B} {y : E b}
theorem linear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
[e.IsLinear R] {b : B} (hb : b β e.baseSet) :
IsLinearMap R fun x : E b => (e β¨b, xβ©).2 :=
Pretrivialization.IsLinear.linear b hb
#align pretrivialization.linear Pretrivialization.linear
variable [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
@[simps!]
protected def symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : F ββ[R] E b := by
refine IsLinearMap.mk' (e.symm b) ?_
by_cases hb : b β e.baseSet
Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v β¦
congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear
Β· rw [e.coe_symm_of_not_mem hb]
exact (0 : F ββ[R] E b).isLinear
#align pretrivialization.symmβ Pretrivialization.symmβ
@[simps (config := .asFn)]
def linearEquivAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) (hb : b β e.baseSet) :
E b ββ[R] F where
toFun y := (e β¨b, yβ©).2
invFun := e.symm b
left_inv := e.symm_apply_apply_mk hb
right_inv v := by simp_rw [e.apply_mk_symm hb v]
map_add' v w := (e.linear R hb).map_add v w
map_smul' c v := (e.linear R hb).map_smul c v
#align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt
protected def linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : E b ββ[R] F :=
if hb : b β e.baseSet then e.linearEquivAt R b hb else 0
#align pretrivialization.linear_map_at Pretrivialization.linearMapAt
variable {R}
theorem coe_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) :
β(e.linearMapAt R b) = fun y => if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
#align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt
theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : β(e.linearMapAt R b) = fun y => (e β¨b, yβ©).2 := by
simp_rw [coe_linearMapAt, if_pos hb]
#align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem
| Mathlib/Topology/VectorBundle/Basic.lean | 131 | 133 | theorem linearMapAt_apply (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B} (y : E b) :
e.linearMapAt R b y = if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by |
rw [coe_linearMapAt]
| 1 | 2.718282 | 0 | 0.6 | 5 | 539 |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : Type*) {B : Type*} (F : Type*) (E : B β Type*)
section TopologicalVectorSpace
variable {F E}
variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B]
protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)]
[β x, Module R (E x)] (e : Pretrivialization F (Ο F E)) : Prop where
linear : β b β e.baseSet, IsLinearMap R fun x : E b => (e β¨b, xβ©).2
#align pretrivialization.is_linear Pretrivialization.IsLinear
namespace Pretrivialization
variable (e : Pretrivialization F (Ο F E)) {x : TotalSpace F E} {b : B} {y : E b}
theorem linear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
[e.IsLinear R] {b : B} (hb : b β e.baseSet) :
IsLinearMap R fun x : E b => (e β¨b, xβ©).2 :=
Pretrivialization.IsLinear.linear b hb
#align pretrivialization.linear Pretrivialization.linear
variable [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
@[simps!]
protected def symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : F ββ[R] E b := by
refine IsLinearMap.mk' (e.symm b) ?_
by_cases hb : b β e.baseSet
Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v β¦
congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear
Β· rw [e.coe_symm_of_not_mem hb]
exact (0 : F ββ[R] E b).isLinear
#align pretrivialization.symmβ Pretrivialization.symmβ
@[simps (config := .asFn)]
def linearEquivAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) (hb : b β e.baseSet) :
E b ββ[R] F where
toFun y := (e β¨b, yβ©).2
invFun := e.symm b
left_inv := e.symm_apply_apply_mk hb
right_inv v := by simp_rw [e.apply_mk_symm hb v]
map_add' v w := (e.linear R hb).map_add v w
map_smul' c v := (e.linear R hb).map_smul c v
#align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt
protected def linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : E b ββ[R] F :=
if hb : b β e.baseSet then e.linearEquivAt R b hb else 0
#align pretrivialization.linear_map_at Pretrivialization.linearMapAt
variable {R}
theorem coe_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) :
β(e.linearMapAt R b) = fun y => if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
#align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt
theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : β(e.linearMapAt R b) = fun y => (e β¨b, yβ©).2 := by
simp_rw [coe_linearMapAt, if_pos hb]
#align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem
theorem linearMapAt_apply (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B} (y : E b) :
e.linearMapAt R b y = if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [coe_linearMapAt]
#align pretrivialization.linear_map_at_apply Pretrivialization.linearMapAt_apply
theorem linearMapAt_def_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb :=
dif_pos hb
#align pretrivialization.linear_map_at_def_of_mem Pretrivialization.linearMapAt_def_of_mem
theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = 0 :=
dif_neg hb
#align pretrivialization.linear_map_at_def_of_not_mem Pretrivialization.linearMapAt_def_of_not_mem
theorem linearMapAt_eq_zero (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = 0 :=
dif_neg hb
#align pretrivialization.linear_map_at_eq_zero Pretrivialization.linearMapAt_eq_zero
| Mathlib/Topology/VectorBundle/Basic.lean | 151 | 154 | theorem symmβ_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) (y : E b) : e.symmβ R b (e.linearMapAt R b y) = y := by |
rw [e.linearMapAt_def_of_mem hb]
exact (e.linearEquivAt R b hb).left_inv y
| 2 | 7.389056 | 1 | 0.6 | 5 | 539 |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : Type*) {B : Type*} (F : Type*) (E : B β Type*)
section TopologicalVectorSpace
variable {F E}
variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B]
protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)]
[β x, Module R (E x)] (e : Pretrivialization F (Ο F E)) : Prop where
linear : β b β e.baseSet, IsLinearMap R fun x : E b => (e β¨b, xβ©).2
#align pretrivialization.is_linear Pretrivialization.IsLinear
namespace Pretrivialization
variable (e : Pretrivialization F (Ο F E)) {x : TotalSpace F E} {b : B} {y : E b}
theorem linear [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
[e.IsLinear R] {b : B} (hb : b β e.baseSet) :
IsLinearMap R fun x : E b => (e β¨b, xβ©).2 :=
Pretrivialization.IsLinear.linear b hb
#align pretrivialization.linear Pretrivialization.linear
variable [AddCommMonoid F] [Module R F] [β x, AddCommMonoid (E x)] [β x, Module R (E x)]
@[simps!]
protected def symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : F ββ[R] E b := by
refine IsLinearMap.mk' (e.symm b) ?_
by_cases hb : b β e.baseSet
Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v β¦
congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear
Β· rw [e.coe_symm_of_not_mem hb]
exact (0 : F ββ[R] E b).isLinear
#align pretrivialization.symmβ Pretrivialization.symmβ
@[simps (config := .asFn)]
def linearEquivAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) (hb : b β e.baseSet) :
E b ββ[R] F where
toFun y := (e β¨b, yβ©).2
invFun := e.symm b
left_inv := e.symm_apply_apply_mk hb
right_inv v := by simp_rw [e.apply_mk_symm hb v]
map_add' v w := (e.linear R hb).map_add v w
map_smul' c v := (e.linear R hb).map_smul c v
#align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt
protected def linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) : E b ββ[R] F :=
if hb : b β e.baseSet then e.linearEquivAt R b hb else 0
#align pretrivialization.linear_map_at Pretrivialization.linearMapAt
variable {R}
theorem coe_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] (b : B) :
β(e.linearMapAt R b) = fun y => if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
#align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt
theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : β(e.linearMapAt R b) = fun y => (e β¨b, yβ©).2 := by
simp_rw [coe_linearMapAt, if_pos hb]
#align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem
theorem linearMapAt_apply (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B} (y : E b) :
e.linearMapAt R b y = if b β e.baseSet then (e β¨b, yβ©).2 else 0 := by
rw [coe_linearMapAt]
#align pretrivialization.linear_map_at_apply Pretrivialization.linearMapAt_apply
theorem linearMapAt_def_of_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb :=
dif_pos hb
#align pretrivialization.linear_map_at_def_of_mem Pretrivialization.linearMapAt_def_of_mem
theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = 0 :=
dif_neg hb
#align pretrivialization.linear_map_at_def_of_not_mem Pretrivialization.linearMapAt_def_of_not_mem
theorem linearMapAt_eq_zero (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) : e.linearMapAt R b = 0 :=
dif_neg hb
#align pretrivialization.linear_map_at_eq_zero Pretrivialization.linearMapAt_eq_zero
theorem symmβ_linearMapAt (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) (y : E b) : e.symmβ R b (e.linearMapAt R b y) = y := by
rw [e.linearMapAt_def_of_mem hb]
exact (e.linearEquivAt R b hb).left_inv y
#align pretrivialization.symmβ_linear_map_at Pretrivialization.symmβ_linearMapAt
| Mathlib/Topology/VectorBundle/Basic.lean | 157 | 160 | theorem linearMapAt_symmβ (e : Pretrivialization F (Ο F E)) [e.IsLinear R] {b : B}
(hb : b β e.baseSet) (y : F) : e.linearMapAt R b (e.symmβ R b y) = y := by |
rw [e.linearMapAt_def_of_mem hb]
exact (e.linearEquivAt R b hb).right_inv y
| 2 | 7.389056 | 1 | 0.6 | 5 | 539 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
| Mathlib/Data/List/ReduceOption.lean | 19 | 21 | theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by |
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
| Mathlib/Data/List/ReduceOption.lean | 25 | 26 | theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by | simp only [reduceOption, filterMap, id]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
| Mathlib/Data/List/ReduceOption.lean | 35 | 41 | theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by |
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
| 5 | 148.413159 | 2 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
| Mathlib/Data/List/ReduceOption.lean | 49 | 53 | theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by |
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
| 3 | 20.085537 | 1 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
| Mathlib/Data/List/ReduceOption.lean | 55 | 57 | theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by |
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
| Mathlib/Data/List/ReduceOption.lean | 59 | 61 | theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by |
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
| 2 | 7.389056 | 1 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
| Mathlib/Data/List/ReduceOption.lean | 64 | 66 | theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by |
rw [reduceOption_length_eq, List.filter_length_eq_length]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
| Mathlib/Data/List/ReduceOption.lean | 69 | 74 | theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by |
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
| 4 | 54.59815 | 2 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
#align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
| Mathlib/Data/List/ReduceOption.lean | 77 | 77 | theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by | cases x <;> rfl
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
#align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl
#align list.reduce_option_singleton List.reduceOption_singleton
| Mathlib/Data/List/ReduceOption.lean | 80 | 85 | theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) :
(l.concat x).reduceOption = l.reduceOption ++ x.toList := by |
induction' l with hd tl hl generalizing x
Β· cases x <;> simp [Option.toList]
Β· simp only [concat_eq_append, reduceOption_append] at hl
cases hd <;> simp [hl, reduceOption_append]
| 4 | 54.59815 | 2 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
#align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl
#align list.reduce_option_singleton List.reduceOption_singleton
theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) :
(l.concat x).reduceOption = l.reduceOption ++ x.toList := by
induction' l with hd tl hl generalizing x
Β· cases x <;> simp [Option.toList]
Β· simp only [concat_eq_append, reduceOption_append] at hl
cases hd <;> simp [hl, reduceOption_append]
#align list.reduce_option_concat List.reduceOption_concat
| Mathlib/Data/List/ReduceOption.lean | 88 | 90 | theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) :
(l.concat (some x)).reduceOption = l.reduceOption.concat x := by |
simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
#align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl
#align list.reduce_option_singleton List.reduceOption_singleton
theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) :
(l.concat x).reduceOption = l.reduceOption ++ x.toList := by
induction' l with hd tl hl generalizing x
Β· cases x <;> simp [Option.toList]
Β· simp only [concat_eq_append, reduceOption_append] at hl
cases hd <;> simp [hl, reduceOption_append]
#align list.reduce_option_concat List.reduceOption_concat
theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) :
(l.concat (some x)).reduceOption = l.reduceOption.concat x := by
simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some]
#align list.reduce_option_concat_of_some List.reduceOption_concat_of_some
| Mathlib/Data/List/ReduceOption.lean | 93 | 94 | theorem reduceOption_mem_iff {l : List (Option Ξ±)} {x : Ξ±} : x β l.reduceOption β some x β l := by |
simp only [reduceOption, id, mem_filterMap, exists_eq_right]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some List.reduceOption_cons_of_some
@[simp]
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) :
reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id]
#align list.reduce_option_cons_of_none List.reduceOption_cons_of_none
@[simp]
theorem reduceOption_nil : @reduceOption Ξ± [] = [] :=
rfl
#align list.reduce_option_nil List.reduceOption_nil
@[simp]
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β Ξ²} :
reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl
Β· simp only [reduceOption_nil, map_nil]
Β· cases hd <;>
simpa [true_and_iff, Option.map_some', map, eq_self_iff_true,
reduceOption_cons_of_some] using hl
#align list.reduce_option_map List.reduceOption_map
theorem reduceOption_append (l l' : List (Option Ξ±)) :
(l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption :=
filterMap_append l l' id
#align list.reduce_option_append List.reduceOption_append
theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} :
l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length β€ l.length := by
rw [length_eq_reduceOption_length_add_filter_none]
apply Nat.le_add_right
#align list.reduce_option_length_le List.reduceOption_length_le
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} :
l.reduceOption.length = l.length β β x β l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
#align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} :
l.reduceOption.length < l.length β none β l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
reduceOption_length_eq_iff]
induction l <;> simp [*]
rw [@eq_comm _ none, β Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
#align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl
#align list.reduce_option_singleton List.reduceOption_singleton
theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) :
(l.concat x).reduceOption = l.reduceOption ++ x.toList := by
induction' l with hd tl hl generalizing x
Β· cases x <;> simp [Option.toList]
Β· simp only [concat_eq_append, reduceOption_append] at hl
cases hd <;> simp [hl, reduceOption_append]
#align list.reduce_option_concat List.reduceOption_concat
theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) :
(l.concat (some x)).reduceOption = l.reduceOption.concat x := by
simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some]
#align list.reduce_option_concat_of_some List.reduceOption_concat_of_some
theorem reduceOption_mem_iff {l : List (Option Ξ±)} {x : Ξ±} : x β l.reduceOption β some x β l := by
simp only [reduceOption, id, mem_filterMap, exists_eq_right]
#align list.reduce_option_mem_iff List.reduceOption_mem_iff
| Mathlib/Data/List/ReduceOption.lean | 97 | 99 | theorem reduceOption_get?_iff {l : List (Option Ξ±)} {x : Ξ±} :
(β i, l.get? i = some (some x)) β β i, l.reduceOption.get? i = some x := by |
rw [β mem_iff_get?, β mem_iff_get?, reduceOption_mem_iff]
| 1 | 2.718282 | 0 | 0.615385 | 13 | 540 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 41 | 42 | theorem lift_continuum : lift.{v} π = π := by |
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
| 1 | 2.718282 | 0 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 46 | 48 | theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by |
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
| 2 | 7.389056 | 1 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 52 | 54 | theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by |
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
| 2 | 7.389056 | 1 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.lift_le_continuum Cardinal.lift_le_continuum
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 58 | 60 | theorem continuum_lt_lift {c : Cardinal.{u}} : π < lift.{v} c β π < c := by |
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
| 2 | 7.389056 | 1 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.lift_le_continuum Cardinal.lift_le_continuum
@[simp]
theorem continuum_lt_lift {c : Cardinal.{u}} : π < lift.{v} c β π < c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 64 | 66 | theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < π β c < π := by |
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
| 2 | 7.389056 | 1 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.lift_le_continuum Cardinal.lift_le_continuum
@[simp]
theorem continuum_lt_lift {c : Cardinal.{u}} : π < lift.{v} c β π < c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift
@[simp]
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < π β c < π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum
theorem aleph0_lt_continuum : β΅β < π :=
cantor β΅β
#align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum
theorem aleph0_le_continuum : β΅β β€ π :=
aleph0_lt_continuum.le
#align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum
@[simp]
| Mathlib/SetTheory/Cardinal/Continuum.lean | 83 | 83 | theorem beth_one : beth 1 = π := by | simpa using beth_succ 0
| 1 | 2.718282 | 0 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.lift_le_continuum Cardinal.lift_le_continuum
@[simp]
theorem continuum_lt_lift {c : Cardinal.{u}} : π < lift.{v} c β π < c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift
@[simp]
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < π β c < π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum
theorem aleph0_lt_continuum : β΅β < π :=
cantor β΅β
#align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum
theorem aleph0_le_continuum : β΅β β€ π :=
aleph0_lt_continuum.le
#align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum
@[simp]
theorem beth_one : beth 1 = π := by simpa using beth_succ 0
#align cardinal.beth_one Cardinal.beth_one
theorem nat_lt_continuum (n : β) : βn < π :=
(nat_lt_aleph0 n).trans aleph0_lt_continuum
#align cardinal.nat_lt_continuum Cardinal.nat_lt_continuum
| Mathlib/SetTheory/Cardinal/Continuum.lean | 90 | 90 | theorem mk_set_nat : #(Set β) = π := by | simp
| 1 | 2.718282 | 0 | 0.625 | 8 | 541 |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notation "π " => Cardinal.continuum
@[simp]
theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} :=
rfl
#align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0
@[simp]
theorem lift_continuum : lift.{v} π = π := by
rw [β two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
#align cardinal.lift_continuum Cardinal.lift_continuum
@[simp]
theorem continuum_le_lift {c : Cardinal.{u}} : π β€ lift.{v} c β π β€ c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.continuum_le_lift Cardinal.continuum_le_lift
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c β€ π β c β€ π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_le]
#align cardinal.lift_le_continuum Cardinal.lift_le_continuum
@[simp]
theorem continuum_lt_lift {c : Cardinal.{u}} : π < lift.{v} c β π < c := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift
@[simp]
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < π β c < π := by
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
#align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum
theorem aleph0_lt_continuum : β΅β < π :=
cantor β΅β
#align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum
theorem aleph0_le_continuum : β΅β β€ π :=
aleph0_lt_continuum.le
#align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum
@[simp]
theorem beth_one : beth 1 = π := by simpa using beth_succ 0
#align cardinal.beth_one Cardinal.beth_one
theorem nat_lt_continuum (n : β) : βn < π :=
(nat_lt_aleph0 n).trans aleph0_lt_continuum
#align cardinal.nat_lt_continuum Cardinal.nat_lt_continuum
theorem mk_set_nat : #(Set β) = π := by simp
#align cardinal.mk_set_nat Cardinal.mk_set_nat
theorem continuum_pos : 0 < π :=
nat_lt_continuum 0
#align cardinal.continuum_pos Cardinal.continuum_pos
theorem continuum_ne_zero : π β 0 :=
continuum_pos.ne'
#align cardinal.continuum_ne_zero Cardinal.continuum_ne_zero
| Mathlib/SetTheory/Cardinal/Continuum.lean | 101 | 103 | theorem aleph_one_le_continuum : aleph 1 β€ π := by |
rw [β succ_aleph0]
exact Order.succ_le_of_lt aleph0_lt_continuum
| 2 | 7.389056 | 1 | 0.625 | 8 | 541 |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Polynomial.RingDivision
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
noncomputable section
open scoped Classical
open scoped nonZeroDivisors Polynomial
universe u v
variable (K : Type u)
structure RatFunc [CommRing K] : Type u where ofFractionRing ::
toFractionRing : FractionRing K[X]
#align ratfunc RatFunc
#align ratfunc.of_fraction_ring RatFunc.ofFractionRing
#align ratfunc.to_fraction_ring RatFunc.toFractionRing
namespace RatFunc
section CommRing
variable {K}
variable [CommRing K]
section Rec
theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β RatFunc K) :=
fun _ _ => ofFractionRing.inj
#align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective
theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β FractionRing K[X])
-- Porting note: the `xy` input was `rfl` and then there was no need for the `subst`
| β¨xβ©, β¨yβ©, xy => by subst xy; rfl
#align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective
protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
P := by
refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_
intros p p' q q' h
exact H q.2 q'.2 (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
-- Porting note: the definition above was as follows
-- (-- Fix timeout by manipulating elaboration order
-- fun p q => f p q)
-- fun p p' q q' h => by
-- exact H q.2 q'.2
-- (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
-- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
#align ratfunc.lift_on RatFunc.liftOn
| Mathlib/FieldTheory/RatFunc/Defs.lean | 123 | 127 | theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]β°) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by |
rw [RatFunc.liftOn]
exact Localization.liftOn_mk _ _ _ _
| 2 | 7.389056 | 1 | 0.625 | 8 | 542 |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Polynomial.RingDivision
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
noncomputable section
open scoped Classical
open scoped nonZeroDivisors Polynomial
universe u v
variable (K : Type u)
structure RatFunc [CommRing K] : Type u where ofFractionRing ::
toFractionRing : FractionRing K[X]
#align ratfunc RatFunc
#align ratfunc.of_fraction_ring RatFunc.ofFractionRing
#align ratfunc.to_fraction_ring RatFunc.toFractionRing
namespace RatFunc
section CommRing
variable {K}
variable [CommRing K]
section Rec
theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β RatFunc K) :=
fun _ _ => ofFractionRing.inj
#align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective
theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β FractionRing K[X])
-- Porting note: the `xy` input was `rfl` and then there was no need for the `subst`
| β¨xβ©, β¨yβ©, xy => by subst xy; rfl
#align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective
protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
P := by
refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_
intros p p' q q' h
exact H q.2 q'.2 (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
-- Porting note: the definition above was as follows
-- (-- Fix timeout by manipulating elaboration order
-- fun p q => f p q)
-- fun p p' q q' h => by
-- exact H q.2 q'.2
-- (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
-- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
#align ratfunc.lift_on RatFunc.liftOn
theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]β°) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by
rw [RatFunc.liftOn]
exact Localization.liftOn_mk _ _ _ _
#align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk
| Mathlib/FieldTheory/RatFunc/Defs.lean | 130 | 136 | theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β K[X] β P}
(H : β {p q a} (hq : q β 0) (_ha : a β 0), f (a * p) (a * q) = f p q) β¦p q p' q' : K[X]β¦
(hq : q β 0) (hq' : q' β 0) (h : q' * p = q * p') : f p q = f p' q' :=
calc
f p q = f (q' * p) (q' * q) := (H hq hq').symm
_ = f (q * p') (q * q') := by | rw [h, mul_comm q']
_ = f p' q' := H hq' hq
| 2 | 7.389056 | 1 | 0.625 | 8 | 542 |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Polynomial.RingDivision
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
noncomputable section
open scoped Classical
open scoped nonZeroDivisors Polynomial
universe u v
variable (K : Type u)
structure RatFunc [CommRing K] : Type u where ofFractionRing ::
toFractionRing : FractionRing K[X]
#align ratfunc RatFunc
#align ratfunc.of_fraction_ring RatFunc.ofFractionRing
#align ratfunc.to_fraction_ring RatFunc.toFractionRing
namespace RatFunc
section CommRing
variable {K}
variable [CommRing K]
section Rec
theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β RatFunc K) :=
fun _ _ => ofFractionRing.inj
#align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective
theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β FractionRing K[X])
-- Porting note: the `xy` input was `rfl` and then there was no need for the `subst`
| β¨xβ©, β¨yβ©, xy => by subst xy; rfl
#align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective
protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
P := by
refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_
intros p p' q q' h
exact H q.2 q'.2 (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
-- Porting note: the definition above was as follows
-- (-- Fix timeout by manipulating elaboration order
-- fun p q => f p q)
-- fun p p' q q' h => by
-- exact H q.2 q'.2
-- (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
-- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
#align ratfunc.lift_on RatFunc.liftOn
theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]β°) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by
rw [RatFunc.liftOn]
exact Localization.liftOn_mk _ _ _ _
#align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk
theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β K[X] β P}
(H : β {p q a} (hq : q β 0) (_ha : a β 0), f (a * p) (a * q) = f p q) β¦p q p' q' : K[X]β¦
(hq : q β 0) (hq' : q' β 0) (h : q' * p = q * p') : f p q = f p' q' :=
calc
f p q = f (q' * p) (q' * q) := (H hq hq').symm
_ = f (q * p') (q * q') := by rw [h, mul_comm q']
_ = f p' q' := H hq' hq
#align ratfunc.lift_on_condition_of_lift_on'_condition RatFunc.liftOn_condition_of_liftOn'_condition
section IsDomain
variable [IsDomain K]
protected irreducible_def mk (p q : K[X]) : RatFunc K :=
ofFractionRing (algebraMap _ _ p / algebraMap _ _ q)
#align ratfunc.mk RatFunc.mk
| Mathlib/FieldTheory/RatFunc/Defs.lean | 154 | 155 | theorem mk_eq_div' (p q : K[X]) :
RatFunc.mk p q = ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) := by | rw [RatFunc.mk]
| 1 | 2.718282 | 0 | 0.625 | 8 | 542 |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Polynomial.RingDivision
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
noncomputable section
open scoped Classical
open scoped nonZeroDivisors Polynomial
universe u v
variable (K : Type u)
structure RatFunc [CommRing K] : Type u where ofFractionRing ::
toFractionRing : FractionRing K[X]
#align ratfunc RatFunc
#align ratfunc.of_fraction_ring RatFunc.ofFractionRing
#align ratfunc.to_fraction_ring RatFunc.toFractionRing
namespace RatFunc
section CommRing
variable {K}
variable [CommRing K]
section Rec
theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β RatFunc K) :=
fun _ _ => ofFractionRing.inj
#align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective
theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β FractionRing K[X])
-- Porting note: the `xy` input was `rfl` and then there was no need for the `subst`
| β¨xβ©, β¨yβ©, xy => by subst xy; rfl
#align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective
protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
P := by
refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_
intros p p' q q' h
exact H q.2 q'.2 (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
-- Porting note: the definition above was as follows
-- (-- Fix timeout by manipulating elaboration order
-- fun p q => f p q)
-- fun p p' q q' h => by
-- exact H q.2 q'.2
-- (let β¨β¨c, hcβ©, mul_eqβ© := Localization.r_iff_exists.mp h
-- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)
#align ratfunc.lift_on RatFunc.liftOn
theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]β°) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by
rw [RatFunc.liftOn]
exact Localization.liftOn_mk _ _ _ _
#align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk
theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β K[X] β P}
(H : β {p q a} (hq : q β 0) (_ha : a β 0), f (a * p) (a * q) = f p q) β¦p q p' q' : K[X]β¦
(hq : q β 0) (hq' : q' β 0) (h : q' * p = q * p') : f p q = f p' q' :=
calc
f p q = f (q' * p) (q' * q) := (H hq hq').symm
_ = f (q * p') (q * q') := by rw [h, mul_comm q']
_ = f p' q' := H hq' hq
#align ratfunc.lift_on_condition_of_lift_on'_condition RatFunc.liftOn_condition_of_liftOn'_condition
section IsDomain
variable [IsDomain K]
protected irreducible_def mk (p q : K[X]) : RatFunc K :=
ofFractionRing (algebraMap _ _ p / algebraMap _ _ q)
#align ratfunc.mk RatFunc.mk
theorem mk_eq_div' (p q : K[X]) :
RatFunc.mk p q = ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) := by rw [RatFunc.mk]
#align ratfunc.mk_eq_div' RatFunc.mk_eq_div'
| Mathlib/FieldTheory/RatFunc/Defs.lean | 158 | 159 | theorem mk_zero (p : K[X]) : RatFunc.mk p 0 = ofFractionRing (0 : FractionRing K[X]) := by |
rw [mk_eq_div', RingHom.map_zero, div_zero]
| 1 | 2.718282 | 0 | 0.625 | 8 | 542 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.