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 | rank int64 0 2.4k |
|---|---|---|---|---|---|---|
import Mathlib.Data.Sigma.Basic
import Mathlib.Algebra.Order.Ring.Nat
#align_import set_theory.lists from "leanprover-community/mathlib"@"497d1e06409995dd8ec95301fa8d8f3480187f4c"
variable {Ξ± : Type*}
inductive Lists'.{u} (Ξ± : Type u) : Bool β Type u
| atom : Ξ± β Lists' Ξ± false
| nil : Lists' Ξ± true
| cons' {b} : Lists' Ξ± b β Lists' Ξ± true β Lists' Ξ± true
deriving DecidableEq
#align lists' Lists'
compile_inductive% Lists'
def Lists (Ξ± : Type*) :=
Ξ£b, Lists' Ξ± b
#align lists Lists
namespace Lists'
instance [Inhabited Ξ±] : β b, Inhabited (Lists' Ξ± b)
| true => β¨nilβ©
| false => β¨atom defaultβ©
def cons : Lists Ξ± β Lists' Ξ± true β Lists' Ξ± true
| β¨_, aβ©, l => cons' a l
#align lists'.cons Lists'.cons
@[simp]
def toList : β {b}, Lists' Ξ± b β List (Lists Ξ±)
| _, atom _ => []
| _, nil => []
| _, cons' a l => β¨_, aβ© :: l.toList
#align lists'.to_list Lists'.toList
-- Porting note (#10618): removed @[simp]
-- simp can prove this: by simp only [@Lists'.toList, @Sigma.eta]
theorem toList_cons (a : Lists Ξ±) (l) : toList (cons a l) = a :: l.toList := by simp
#align lists'.to_list_cons Lists'.toList_cons
@[simp]
def ofList : List (Lists Ξ±) β Lists' Ξ± true
| [] => nil
| a :: l => cons a (ofList l)
#align lists'.of_list Lists'.ofList
@[simp]
| Mathlib/SetTheory/Lists.lean | 99 | 99 | theorem to_ofList (l : List (Lists Ξ±)) : toList (ofList l) = l := by | induction l <;> simp [*]
| 169 |
import Mathlib.Data.Sigma.Basic
import Mathlib.Algebra.Order.Ring.Nat
#align_import set_theory.lists from "leanprover-community/mathlib"@"497d1e06409995dd8ec95301fa8d8f3480187f4c"
variable {Ξ± : Type*}
inductive Lists'.{u} (Ξ± : Type u) : Bool β Type u
| atom : Ξ± β Lists' Ξ± false
| nil : Lists' Ξ± true
| cons' {b} : Lists' Ξ± b β Lists' Ξ± true β Lists' Ξ± true
deriving DecidableEq
#align lists' Lists'
compile_inductive% Lists'
def Lists (Ξ± : Type*) :=
Ξ£b, Lists' Ξ± b
#align lists Lists
namespace Lists'
instance [Inhabited Ξ±] : β b, Inhabited (Lists' Ξ± b)
| true => β¨nilβ©
| false => β¨atom defaultβ©
def cons : Lists Ξ± β Lists' Ξ± true β Lists' Ξ± true
| β¨_, aβ©, l => cons' a l
#align lists'.cons Lists'.cons
@[simp]
def toList : β {b}, Lists' Ξ± b β List (Lists Ξ±)
| _, atom _ => []
| _, nil => []
| _, cons' a l => β¨_, aβ© :: l.toList
#align lists'.to_list Lists'.toList
-- Porting note (#10618): removed @[simp]
-- simp can prove this: by simp only [@Lists'.toList, @Sigma.eta]
theorem toList_cons (a : Lists Ξ±) (l) : toList (cons a l) = a :: l.toList := by simp
#align lists'.to_list_cons Lists'.toList_cons
@[simp]
def ofList : List (Lists Ξ±) β Lists' Ξ± true
| [] => nil
| a :: l => cons a (ofList l)
#align lists'.of_list Lists'.ofList
@[simp]
theorem to_ofList (l : List (Lists Ξ±)) : toList (ofList l) = l := by induction l <;> simp [*]
#align lists'.to_of_list Lists'.to_ofList
@[simp]
| Mathlib/SetTheory/Lists.lean | 103 | 120 | theorem of_toList : β l : Lists' Ξ± true, ofList (toList l) = l :=
suffices
β (b) (h : true = b) (l : Lists' Ξ± b),
let l' : Lists' Ξ± true := by | rw [h]; exact l
ofList (toList l') = l'
from this _ rfl
fun b h l => by
induction l with
| atom => cases h
-- Porting note: case nil was not covered.
| nil => simp
| cons' b a _ IH =>
intro l'
-- Porting note: Previous code was:
-- change l' with cons' a l
--
-- This can be removed.
simpa [cons, l'] using IH rfl
| 169 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 55 | 64 | theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by |
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
| 170 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 66 | 71 | theorem projectiveSeminormAux_add_le (p q : FreeAddMonoid (π Γ Ξ i, E i)) :
projectiveSeminormAux (p + q) β€ projectiveSeminormAux p + projectiveSeminormAux q := by |
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, Multiset.sum_coe]
erw [List.map_append]
rw [List.sum_append]
rfl
| 170 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
theorem projectiveSeminormAux_add_le (p q : FreeAddMonoid (π Γ Ξ i, E i)) :
projectiveSeminormAux (p + q) β€ projectiveSeminormAux p + projectiveSeminormAux q := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, Multiset.sum_coe]
erw [List.map_append]
rw [List.sum_append]
rfl
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 73 | 82 | theorem projectiveSeminormAux_smul (p : FreeAddMonoid (π Γ Ξ i, E i)) (a : π) :
projectiveSeminormAux (List.map (fun (y : π Γ Ξ i, E i) β¦ (a * y.1, y.2)) p) =
βaβ * projectiveSeminormAux p := by |
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, List.map_map,
Multiset.sum_coe]
rw [β smul_eq_mul, List.smul_sum, β List.comp_map]
congr 2
ext x
simp only [Function.comp_apply, norm_mul, smul_eq_mul]
rw [mul_assoc]
| 170 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
theorem projectiveSeminormAux_add_le (p q : FreeAddMonoid (π Γ Ξ i, E i)) :
projectiveSeminormAux (p + q) β€ projectiveSeminormAux p + projectiveSeminormAux q := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, Multiset.sum_coe]
erw [List.map_append]
rw [List.sum_append]
rfl
theorem projectiveSeminormAux_smul (p : FreeAddMonoid (π Γ Ξ i, E i)) (a : π) :
projectiveSeminormAux (List.map (fun (y : π Γ Ξ i, E i) β¦ (a * y.1, y.2)) p) =
βaβ * projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, List.map_map,
Multiset.sum_coe]
rw [β smul_eq_mul, List.smul_sum, β List.comp_map]
congr 2
ext x
simp only [Function.comp_apply, norm_mul, smul_eq_mul]
rw [mul_assoc]
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 84 | 90 | theorem bddBelow_projectiveSemiNormAux (x : β¨[π] i, E i) :
BddBelow (Set.range (fun (p : lifts x) β¦ projectiveSeminormAux p.1)) := by |
existsi 0
rw [mem_lowerBounds]
simp only [Set.mem_range, Subtype.exists, exists_prop, forall_exists_index, and_imp,
forall_apply_eq_imp_iffβ]
exact fun p _ β¦ projectiveSeminormAux_nonneg p
| 170 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
theorem projectiveSeminormAux_add_le (p q : FreeAddMonoid (π Γ Ξ i, E i)) :
projectiveSeminormAux (p + q) β€ projectiveSeminormAux p + projectiveSeminormAux q := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, Multiset.sum_coe]
erw [List.map_append]
rw [List.sum_append]
rfl
theorem projectiveSeminormAux_smul (p : FreeAddMonoid (π Γ Ξ i, E i)) (a : π) :
projectiveSeminormAux (List.map (fun (y : π Γ Ξ i, E i) β¦ (a * y.1, y.2)) p) =
βaβ * projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, List.map_map,
Multiset.sum_coe]
rw [β smul_eq_mul, List.smul_sum, β List.comp_map]
congr 2
ext x
simp only [Function.comp_apply, norm_mul, smul_eq_mul]
rw [mul_assoc]
theorem bddBelow_projectiveSemiNormAux (x : β¨[π] i, E i) :
BddBelow (Set.range (fun (p : lifts x) β¦ projectiveSeminormAux p.1)) := by
existsi 0
rw [mem_lowerBounds]
simp only [Set.mem_range, Subtype.exists, exists_prop, forall_exists_index, and_imp,
forall_apply_eq_imp_iffβ]
exact fun p _ β¦ projectiveSeminormAux_nonneg p
noncomputable def projectiveSeminorm : Seminorm π (β¨[π] i, E i) := by
refine Seminorm.ofSMulLE (fun x β¦ iInf (fun (p : lifts x) β¦ projectiveSeminormAux p.1)) ?_ ?_ ?_
Β· refine le_antisymm ?_ ?_
Β· refine ciInf_le_of_le (bddBelow_projectiveSemiNormAux (0 : β¨[π] i, E i)) β¨0, lifts_zeroβ© ?_
simp only [projectiveSeminormAux, Function.comp_apply]
rw [List.sum_eq_zero]
intro _
simp only [List.mem_map, Prod.exists, forall_exists_index, and_imp]
intro _ _ hxm
rw [β FreeAddMonoid.ofList_nil] at hxm
exfalso
exact List.not_mem_nil _ hxm
Β· letI : Nonempty (lifts 0) := β¨0, lifts_zero (R := π) (s := E)β©
exact le_ciInf (fun p β¦ projectiveSeminormAux_nonneg p.1)
Β· intro x y
letI := nonempty_subtype.mpr (nonempty_lifts x); letI := nonempty_subtype.mpr (nonempty_lifts y)
exact le_ciInf_add_ciInf (fun p q β¦ ciInf_le_of_le (bddBelow_projectiveSemiNormAux _)
β¨p.1 + q.1, lifts_add p.2 q.2β© (projectiveSeminormAux_add_le p.1 q.1))
Β· intro a x
letI := nonempty_subtype.mpr (nonempty_lifts x)
rw [Real.mul_iInf_of_nonneg (norm_nonneg _)]
refine le_ciInf ?_
intro p
rw [β projectiveSeminormAux_smul]
exact ciInf_le_of_le (bddBelow_projectiveSemiNormAux _)
β¨(List.map (fun y β¦ (a * y.1, y.2)) p.1), lifts_smul p.2 aβ© (le_refl _)
theorem projectiveSeminorm_apply (x : β¨[π] i, E i) :
projectiveSeminorm x = iInf (fun (p : lifts x) β¦ projectiveSeminormAux p.1) := rfl
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 126 | 132 | theorem projectiveSeminorm_tprod_le (m : Ξ i, E i) :
projectiveSeminorm (β¨β[π] i, m i) β€ β i, βm iβ := by |
rw [projectiveSeminorm_apply]
convert ciInf_le (bddBelow_projectiveSemiNormAux _) β¨[((1 : π), m)] ,?_β©
Β· simp only [projectiveSeminormAux, Function.comp_apply, List.map_cons, norm_one, one_mul,
List.map_nil, List.sum_cons, List.sum_nil, add_zero]
Β· rw [mem_lifts_iff, List.map_singleton, List.sum_singleton, one_smul]
| 170 |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.LinearAlgebra.PiTensorProduct
universe uΞΉ uπ uE uF
variable {ΞΉ : Type uΞΉ} [Fintype ΞΉ]
variable {π : Type uπ} [NontriviallyNormedField π]
variable {E : ΞΉ β Type uE} [β i, SeminormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type uF} [SeminormedAddCommGroup F] [NormedSpace π F]
open scoped TensorProduct
namespace PiTensorProduct
def projectiveSeminormAux : FreeAddMonoid (π Γ Ξ i, E i) β β :=
List.sum β (List.map (fun p β¦ βp.1β * β i, βp.2 iβ))
theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (π Γ Ξ i, E i)) :
0 β€ projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply]
refine List.sum_nonneg ?_
intro a
simp only [Multiset.map_coe, Multiset.mem_coe, List.mem_map, Prod.exists, forall_exists_index,
and_imp]
intro x m _ h
rw [β h]
exact mul_nonneg (norm_nonneg _) (Finset.prod_nonneg (fun _ _ β¦ norm_nonneg _))
theorem projectiveSeminormAux_add_le (p q : FreeAddMonoid (π Γ Ξ i, E i)) :
projectiveSeminormAux (p + q) β€ projectiveSeminormAux p + projectiveSeminormAux q := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, Multiset.sum_coe]
erw [List.map_append]
rw [List.sum_append]
rfl
theorem projectiveSeminormAux_smul (p : FreeAddMonoid (π Γ Ξ i, E i)) (a : π) :
projectiveSeminormAux (List.map (fun (y : π Γ Ξ i, E i) β¦ (a * y.1, y.2)) p) =
βaβ * projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, List.map_map,
Multiset.sum_coe]
rw [β smul_eq_mul, List.smul_sum, β List.comp_map]
congr 2
ext x
simp only [Function.comp_apply, norm_mul, smul_eq_mul]
rw [mul_assoc]
theorem bddBelow_projectiveSemiNormAux (x : β¨[π] i, E i) :
BddBelow (Set.range (fun (p : lifts x) β¦ projectiveSeminormAux p.1)) := by
existsi 0
rw [mem_lowerBounds]
simp only [Set.mem_range, Subtype.exists, exists_prop, forall_exists_index, and_imp,
forall_apply_eq_imp_iffβ]
exact fun p _ β¦ projectiveSeminormAux_nonneg p
noncomputable def projectiveSeminorm : Seminorm π (β¨[π] i, E i) := by
refine Seminorm.ofSMulLE (fun x β¦ iInf (fun (p : lifts x) β¦ projectiveSeminormAux p.1)) ?_ ?_ ?_
Β· refine le_antisymm ?_ ?_
Β· refine ciInf_le_of_le (bddBelow_projectiveSemiNormAux (0 : β¨[π] i, E i)) β¨0, lifts_zeroβ© ?_
simp only [projectiveSeminormAux, Function.comp_apply]
rw [List.sum_eq_zero]
intro _
simp only [List.mem_map, Prod.exists, forall_exists_index, and_imp]
intro _ _ hxm
rw [β FreeAddMonoid.ofList_nil] at hxm
exfalso
exact List.not_mem_nil _ hxm
Β· letI : Nonempty (lifts 0) := β¨0, lifts_zero (R := π) (s := E)β©
exact le_ciInf (fun p β¦ projectiveSeminormAux_nonneg p.1)
Β· intro x y
letI := nonempty_subtype.mpr (nonempty_lifts x); letI := nonempty_subtype.mpr (nonempty_lifts y)
exact le_ciInf_add_ciInf (fun p q β¦ ciInf_le_of_le (bddBelow_projectiveSemiNormAux _)
β¨p.1 + q.1, lifts_add p.2 q.2β© (projectiveSeminormAux_add_le p.1 q.1))
Β· intro a x
letI := nonempty_subtype.mpr (nonempty_lifts x)
rw [Real.mul_iInf_of_nonneg (norm_nonneg _)]
refine le_ciInf ?_
intro p
rw [β projectiveSeminormAux_smul]
exact ciInf_le_of_le (bddBelow_projectiveSemiNormAux _)
β¨(List.map (fun y β¦ (a * y.1, y.2)) p.1), lifts_smul p.2 aβ© (le_refl _)
theorem projectiveSeminorm_apply (x : β¨[π] i, E i) :
projectiveSeminorm x = iInf (fun (p : lifts x) β¦ projectiveSeminormAux p.1) := rfl
theorem projectiveSeminorm_tprod_le (m : Ξ i, E i) :
projectiveSeminorm (β¨β[π] i, m i) β€ β i, βm iβ := by
rw [projectiveSeminorm_apply]
convert ciInf_le (bddBelow_projectiveSemiNormAux _) β¨[((1 : π), m)] ,?_β©
Β· simp only [projectiveSeminormAux, Function.comp_apply, List.map_cons, norm_one, one_mul,
List.map_nil, List.sum_cons, List.sum_nil, add_zero]
Β· rw [mem_lifts_iff, List.map_singleton, List.sum_singleton, one_smul]
| Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean | 134 | 153 | theorem norm_eval_le_projectiveSeminorm (x : β¨[π] i, E i) (G : Type*) [SeminormedAddCommGroup G]
[NormedSpace π G] (f : ContinuousMultilinearMap π E G) :
βlift f.toMultilinearMap xβ β€ projectiveSeminorm x * βfβ := by |
letI := nonempty_subtype.mpr (nonempty_lifts x)
rw [projectiveSeminorm_apply, Real.iInf_mul_of_nonneg (norm_nonneg _), projectiveSeminormAux]
refine le_ciInf ?_
intro β¨p, hpβ©
rw [mem_lifts_iff] at hp
conv_lhs => rw [β hp, β List.sum_map_hom, β Multiset.sum_coe]
refine le_trans (norm_multiset_sum_le _) ?_
simp only [tprodCoeff_eq_smul_tprod, Multiset.map_coe, List.map_map, Multiset.sum_coe,
Function.comp_apply]
rw [mul_comm, β smul_eq_mul, List.smul_sum]
refine List.Forallβ.sum_le_sum ?_
simp only [smul_eq_mul, List.map_map, List.forallβ_map_right_iff, Function.comp_apply,
List.forallβ_map_left_iff, map_smul, lift.tprod, ContinuousMultilinearMap.coe_coe,
List.forallβ_same, Prod.forall]
intro a m _
rw [norm_smul, β mul_assoc, mul_comm βfβ _, mul_assoc]
exact mul_le_mul_of_nonneg_left (f.le_opNorm _) (norm_nonneg _)
| 170 |
import Mathlib.CategoryTheory.Adjunction.Basic
import Mathlib.CategoryTheory.Limits.Cones
#align_import category_theory.limits.is_limit from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
noncomputable section
open CategoryTheory CategoryTheory.Category CategoryTheory.Functor Opposite
namespace CategoryTheory.Limits
-- declare the `v`'s first; see `CategoryTheory.Category` for an explanation
universe vβ vβ vβ vβ uβ uβ uβ uβ
variable {J : Type uβ} [Category.{vβ} J] {K : Type uβ} [Category.{vβ} K]
variable {C : Type uβ} [Category.{vβ} C]
variable {F : J β₯€ C}
-- porting note (#5171): removed @[nolint has_nonempty_instance]
structure IsLimit (t : Cone F) where
lift : β s : Cone F, s.pt βΆ t.pt
fac : β (s : Cone F) (j : J), lift s β« t.Ο.app j = s.Ο.app j := by aesop_cat
uniq : β (s : Cone F) (m : s.pt βΆ t.pt) (_ : β j : J, m β« t.Ο.app j = s.Ο.app j), m = lift s := by
aesop_cat
#align category_theory.limits.is_limit CategoryTheory.Limits.IsLimit
#align category_theory.limits.is_limit.fac' CategoryTheory.Limits.IsLimit.fac
#align category_theory.limits.is_limit.uniq' CategoryTheory.Limits.IsLimit.uniq
-- Porting note (#10618): simp can prove this. Linter complains it still exists
attribute [-simp, nolint simpNF] IsLimit.mk.injEq
attribute [reassoc (attr := simp)] IsLimit.fac
namespace IsLimit
instance subsingleton {t : Cone F} : Subsingleton (IsLimit t) :=
β¨by intro P Q; cases P; cases Q; congr; aesop_catβ©
#align category_theory.limits.is_limit.subsingleton CategoryTheory.Limits.IsLimit.subsingleton
def map {F G : J β₯€ C} (s : Cone F) {t : Cone G} (P : IsLimit t) (Ξ± : F βΆ G) : s.pt βΆ t.pt :=
P.lift ((Cones.postcompose Ξ±).obj s)
#align category_theory.limits.is_limit.map CategoryTheory.Limits.IsLimit.map
@[reassoc (attr := simp)]
theorem map_Ο {F G : J β₯€ C} (c : Cone F) {d : Cone G} (hd : IsLimit d) (Ξ± : F βΆ G) (j : J) :
hd.map c Ξ± β« d.Ο.app j = c.Ο.app j β« Ξ±.app j :=
fac _ _ _
#align category_theory.limits.is_limit.map_Ο CategoryTheory.Limits.IsLimit.map_Ο
@[simp]
theorem lift_self {c : Cone F} (t : IsLimit c) : t.lift c = π c.pt :=
(t.uniq _ _ fun _ => id_comp _).symm
#align category_theory.limits.is_limit.lift_self CategoryTheory.Limits.IsLimit.lift_self
-- Repackaging the definition in terms of cone morphisms.
@[simps]
def liftConeMorphism {t : Cone F} (h : IsLimit t) (s : Cone F) : s βΆ t where hom := h.lift s
#align category_theory.limits.is_limit.lift_cone_morphism CategoryTheory.Limits.IsLimit.liftConeMorphism
| Mathlib/CategoryTheory/Limits/IsLimit.lean | 101 | 104 | theorem uniq_cone_morphism {s t : Cone F} (h : IsLimit t) {f f' : s βΆ t} : f = f' :=
have : β {g : s βΆ t}, g = h.liftConeMorphism s := by |
intro g; apply ConeMorphism.ext; exact h.uniq _ _ g.w
this.trans this.symm
| 171 |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointwise
section OrderedCommGroup
variable {Ξ± : Type*} [OrderedCommGroup Ξ±] {s t : Set Ξ±} {a : Ξ±}
@[to_additive]
theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_upper_set.smul IsUpperSet.smul
#align is_upper_set.vadd IsUpperSet.vadd
@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_lower_set.smul IsLowerSet.smul
#align is_lower_set.vadd IsLowerSet.vadd
@[to_additive]
| Mathlib/Algebra/Order/UpperLower.lean | 56 | 58 | theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a β’ s).OrdConnected := by |
rw [β hs.upperClosure_inter_lowerClosure, smul_set_inter]
exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
| 172 |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointwise
section OrderedCommGroup
variable {Ξ± : Type*} [OrderedCommGroup Ξ±] {s t : Set Ξ±} {a : Ξ±}
@[to_additive]
theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_upper_set.smul IsUpperSet.smul
#align is_upper_set.vadd IsUpperSet.vadd
@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_lower_set.smul IsLowerSet.smul
#align is_lower_set.vadd IsLowerSet.vadd
@[to_additive]
theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a β’ s).OrdConnected := by
rw [β hs.upperClosure_inter_lowerClosure, smul_set_inter]
exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
#align set.ord_connected.smul Set.OrdConnected.smul
#align set.ord_connected.vadd Set.OrdConnected.vadd
@[to_additive]
| Mathlib/Algebra/Order/UpperLower.lean | 63 | 65 | theorem IsUpperSet.mul_left (ht : IsUpperSet t) : IsUpperSet (s * t) := by |
rw [β smul_eq_mul, β Set.iUnion_smul_set]
exact isUpperSet_iUnionβ fun x _ β¦ ht.smul
| 172 |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointwise
section OrderedCommGroup
variable {Ξ± : Type*} [OrderedCommGroup Ξ±] {s t : Set Ξ±} {a : Ξ±}
@[to_additive]
theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_upper_set.smul IsUpperSet.smul
#align is_upper_set.vadd IsUpperSet.vadd
@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_lower_set.smul IsLowerSet.smul
#align is_lower_set.vadd IsLowerSet.vadd
@[to_additive]
theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a β’ s).OrdConnected := by
rw [β hs.upperClosure_inter_lowerClosure, smul_set_inter]
exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
#align set.ord_connected.smul Set.OrdConnected.smul
#align set.ord_connected.vadd Set.OrdConnected.vadd
@[to_additive]
theorem IsUpperSet.mul_left (ht : IsUpperSet t) : IsUpperSet (s * t) := by
rw [β smul_eq_mul, β Set.iUnion_smul_set]
exact isUpperSet_iUnionβ fun x _ β¦ ht.smul
#align is_upper_set.mul_left IsUpperSet.mul_left
#align is_upper_set.add_left IsUpperSet.add_left
@[to_additive]
| Mathlib/Algebra/Order/UpperLower.lean | 70 | 72 | theorem IsUpperSet.mul_right (hs : IsUpperSet s) : IsUpperSet (s * t) := by |
rw [mul_comm]
exact hs.mul_left
| 172 |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointwise
section OrderedCommGroup
variable {Ξ± : Type*} [OrderedCommGroup Ξ±] {s t : Set Ξ±} {a : Ξ±}
@[to_additive]
theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_upper_set.smul IsUpperSet.smul
#align is_upper_set.vadd IsUpperSet.vadd
@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_lower_set.smul IsLowerSet.smul
#align is_lower_set.vadd IsLowerSet.vadd
@[to_additive]
theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a β’ s).OrdConnected := by
rw [β hs.upperClosure_inter_lowerClosure, smul_set_inter]
exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
#align set.ord_connected.smul Set.OrdConnected.smul
#align set.ord_connected.vadd Set.OrdConnected.vadd
@[to_additive]
theorem IsUpperSet.mul_left (ht : IsUpperSet t) : IsUpperSet (s * t) := by
rw [β smul_eq_mul, β Set.iUnion_smul_set]
exact isUpperSet_iUnionβ fun x _ β¦ ht.smul
#align is_upper_set.mul_left IsUpperSet.mul_left
#align is_upper_set.add_left IsUpperSet.add_left
@[to_additive]
theorem IsUpperSet.mul_right (hs : IsUpperSet s) : IsUpperSet (s * t) := by
rw [mul_comm]
exact hs.mul_left
#align is_upper_set.mul_right IsUpperSet.mul_right
#align is_upper_set.add_right IsUpperSet.add_right
@[to_additive]
theorem IsLowerSet.mul_left (ht : IsLowerSet t) : IsLowerSet (s * t) := ht.toDual.mul_left
#align is_lower_set.mul_left IsLowerSet.mul_left
#align is_lower_set.add_left IsLowerSet.add_left
@[to_additive]
theorem IsLowerSet.mul_right (hs : IsLowerSet s) : IsLowerSet (s * t) := hs.toDual.mul_right
#align is_lower_set.mul_right IsLowerSet.mul_right
#align is_lower_set.add_right IsLowerSet.add_right
@[to_additive]
theorem IsUpperSet.inv (hs : IsUpperSet s) : IsLowerSet sβ»ΒΉ := fun _ _ h β¦ hs <| inv_le_inv' h
#align is_upper_set.inv IsUpperSet.inv
#align is_upper_set.neg IsUpperSet.neg
@[to_additive]
theorem IsLowerSet.inv (hs : IsLowerSet s) : IsUpperSet sβ»ΒΉ := fun _ _ h β¦ hs <| inv_le_inv' h
#align is_lower_set.inv IsLowerSet.inv
#align is_lower_set.neg IsLowerSet.neg
@[to_additive]
| Mathlib/Algebra/Order/UpperLower.lean | 97 | 99 | theorem IsUpperSet.div_left (ht : IsUpperSet t) : IsLowerSet (s / t) := by |
rw [div_eq_mul_inv]
exact ht.inv.mul_left
| 172 |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointwise
section OrderedCommGroup
variable {Ξ± : Type*} [OrderedCommGroup Ξ±] {s t : Set Ξ±} {a : Ξ±}
@[to_additive]
theorem IsUpperSet.smul (hs : IsUpperSet s) : IsUpperSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_upper_set.smul IsUpperSet.smul
#align is_upper_set.vadd IsUpperSet.vadd
@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a β’ s) := hs.image <| OrderIso.mulLeft _
#align is_lower_set.smul IsLowerSet.smul
#align is_lower_set.vadd IsLowerSet.vadd
@[to_additive]
theorem Set.OrdConnected.smul (hs : s.OrdConnected) : (a β’ s).OrdConnected := by
rw [β hs.upperClosure_inter_lowerClosure, smul_set_inter]
exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
#align set.ord_connected.smul Set.OrdConnected.smul
#align set.ord_connected.vadd Set.OrdConnected.vadd
@[to_additive]
theorem IsUpperSet.mul_left (ht : IsUpperSet t) : IsUpperSet (s * t) := by
rw [β smul_eq_mul, β Set.iUnion_smul_set]
exact isUpperSet_iUnionβ fun x _ β¦ ht.smul
#align is_upper_set.mul_left IsUpperSet.mul_left
#align is_upper_set.add_left IsUpperSet.add_left
@[to_additive]
theorem IsUpperSet.mul_right (hs : IsUpperSet s) : IsUpperSet (s * t) := by
rw [mul_comm]
exact hs.mul_left
#align is_upper_set.mul_right IsUpperSet.mul_right
#align is_upper_set.add_right IsUpperSet.add_right
@[to_additive]
theorem IsLowerSet.mul_left (ht : IsLowerSet t) : IsLowerSet (s * t) := ht.toDual.mul_left
#align is_lower_set.mul_left IsLowerSet.mul_left
#align is_lower_set.add_left IsLowerSet.add_left
@[to_additive]
theorem IsLowerSet.mul_right (hs : IsLowerSet s) : IsLowerSet (s * t) := hs.toDual.mul_right
#align is_lower_set.mul_right IsLowerSet.mul_right
#align is_lower_set.add_right IsLowerSet.add_right
@[to_additive]
theorem IsUpperSet.inv (hs : IsUpperSet s) : IsLowerSet sβ»ΒΉ := fun _ _ h β¦ hs <| inv_le_inv' h
#align is_upper_set.inv IsUpperSet.inv
#align is_upper_set.neg IsUpperSet.neg
@[to_additive]
theorem IsLowerSet.inv (hs : IsLowerSet s) : IsUpperSet sβ»ΒΉ := fun _ _ h β¦ hs <| inv_le_inv' h
#align is_lower_set.inv IsLowerSet.inv
#align is_lower_set.neg IsLowerSet.neg
@[to_additive]
theorem IsUpperSet.div_left (ht : IsUpperSet t) : IsLowerSet (s / t) := by
rw [div_eq_mul_inv]
exact ht.inv.mul_left
#align is_upper_set.div_left IsUpperSet.div_left
#align is_upper_set.sub_left IsUpperSet.sub_left
@[to_additive]
| Mathlib/Algebra/Order/UpperLower.lean | 104 | 106 | theorem IsUpperSet.div_right (hs : IsUpperSet s) : IsUpperSet (s / t) := by |
rw [div_eq_mul_inv]
exact hs.mul_right
| 172 |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X βΆ B) (g : Y βΆ B)
def pullback : LightProfinite.{u} :=
letI set := { xy : X Γ Y | f xy.fst = g xy.snd }
haveI : CompactSpace set := isCompact_iff_compactSpace.mp
(isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact
LightProfinite.of set
def pullback.fst : pullback f g βΆ X where
toFun := fun β¨β¨x, _β©, _β© β¦ x
continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val
def pullback.snd : pullback f g βΆ Y where
toFun := fun β¨β¨_, yβ©, _β© β¦ y
continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val
@[reassoc]
lemma pullback.condition : pullback.fst f g β« f = pullback.snd f g β« g := by
ext β¨_, hβ©
exact h
def pullback.lift {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
Z βΆ pullback f g where
toFun := fun z β¦ β¨β¨a z, b zβ©, by apply_fun (Β· z) at w; exact wβ©
continuous_toFun := by
apply Continuous.subtype_mk
rw [continuous_prod_mk]
exact β¨a.continuous, b.continuousβ©
@[reassoc (attr := simp)]
lemma pullback.lift_fst {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.fst f g = a := rfl
@[reassoc (attr := simp)]
lemma pullback.lift_snd {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.snd f g = b := rfl
lemma pullback.hom_ext {Z : LightProfinite.{u}} (a b : Z βΆ pullback f g)
(hfst : a β« pullback.fst f g = b β« pullback.fst f g)
(hsnd : a β« pullback.snd f g = b β« pullback.snd f g) : a = b := by
ext z
apply_fun (Β· z) at hfst hsnd
apply Subtype.ext
apply Prod.ext
Β· exact hfst
Β· exact hsnd
@[simps! pt Ο]
def pullback.cone : Limits.PullbackCone f g :=
Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g)
@[simps! lift]
def pullback.isLimit : Limits.IsLimit (pullback.cone f g) :=
Limits.PullbackCone.isLimitAux _
(fun s β¦ pullback.lift f g s.fst s.snd s.condition)
(fun _ β¦ pullback.lift_fst _ _ _ _ _)
(fun _ β¦ pullback.lift_snd _ _ _ _ _)
(fun _ _ hm β¦ pullback.hom_ext _ _ _ _ (hm .left) (hm .right))
section Isos
noncomputable
def pullbackIsoPullback : LightProfinite.pullback f g β
Limits.pullback f g :=
Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit _)
noncomputable
def pullbackHomeoPullback : (LightProfinite.pullback f g).toCompHaus ββ
(Limits.pullback f g).toCompHaus :=
LightProfinite.homeoOfIso (pullbackIsoPullback f g)
| Mathlib/Topology/Category/LightProfinite/Limits.lean | 123 | 126 | theorem pullback_fst_eq :
LightProfinite.pullback.fst f g = (pullbackIsoPullback f g).hom β« Limits.pullback.fst := by |
dsimp [pullbackIsoPullback]
simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο]
| 173 |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X βΆ B) (g : Y βΆ B)
def pullback : LightProfinite.{u} :=
letI set := { xy : X Γ Y | f xy.fst = g xy.snd }
haveI : CompactSpace set := isCompact_iff_compactSpace.mp
(isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact
LightProfinite.of set
def pullback.fst : pullback f g βΆ X where
toFun := fun β¨β¨x, _β©, _β© β¦ x
continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val
def pullback.snd : pullback f g βΆ Y where
toFun := fun β¨β¨_, yβ©, _β© β¦ y
continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val
@[reassoc]
lemma pullback.condition : pullback.fst f g β« f = pullback.snd f g β« g := by
ext β¨_, hβ©
exact h
def pullback.lift {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
Z βΆ pullback f g where
toFun := fun z β¦ β¨β¨a z, b zβ©, by apply_fun (Β· z) at w; exact wβ©
continuous_toFun := by
apply Continuous.subtype_mk
rw [continuous_prod_mk]
exact β¨a.continuous, b.continuousβ©
@[reassoc (attr := simp)]
lemma pullback.lift_fst {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.fst f g = a := rfl
@[reassoc (attr := simp)]
lemma pullback.lift_snd {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.snd f g = b := rfl
lemma pullback.hom_ext {Z : LightProfinite.{u}} (a b : Z βΆ pullback f g)
(hfst : a β« pullback.fst f g = b β« pullback.fst f g)
(hsnd : a β« pullback.snd f g = b β« pullback.snd f g) : a = b := by
ext z
apply_fun (Β· z) at hfst hsnd
apply Subtype.ext
apply Prod.ext
Β· exact hfst
Β· exact hsnd
@[simps! pt Ο]
def pullback.cone : Limits.PullbackCone f g :=
Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g)
@[simps! lift]
def pullback.isLimit : Limits.IsLimit (pullback.cone f g) :=
Limits.PullbackCone.isLimitAux _
(fun s β¦ pullback.lift f g s.fst s.snd s.condition)
(fun _ β¦ pullback.lift_fst _ _ _ _ _)
(fun _ β¦ pullback.lift_snd _ _ _ _ _)
(fun _ _ hm β¦ pullback.hom_ext _ _ _ _ (hm .left) (hm .right))
section Isos
noncomputable
def pullbackIsoPullback : LightProfinite.pullback f g β
Limits.pullback f g :=
Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit _)
noncomputable
def pullbackHomeoPullback : (LightProfinite.pullback f g).toCompHaus ββ
(Limits.pullback f g).toCompHaus :=
LightProfinite.homeoOfIso (pullbackIsoPullback f g)
theorem pullback_fst_eq :
LightProfinite.pullback.fst f g = (pullbackIsoPullback f g).hom β« Limits.pullback.fst := by
dsimp [pullbackIsoPullback]
simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο]
| Mathlib/Topology/Category/LightProfinite/Limits.lean | 128 | 131 | theorem pullback_snd_eq :
LightProfinite.pullback.snd f g = (pullbackIsoPullback f g).hom β« Limits.pullback.snd := by |
dsimp [pullbackIsoPullback]
simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_Ο]
| 173 |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X βΆ B) (g : Y βΆ B)
def pullback : LightProfinite.{u} :=
letI set := { xy : X Γ Y | f xy.fst = g xy.snd }
haveI : CompactSpace set := isCompact_iff_compactSpace.mp
(isClosed_eq (f.continuous.comp continuous_fst) (g.continuous.comp continuous_snd)).isCompact
LightProfinite.of set
def pullback.fst : pullback f g βΆ X where
toFun := fun β¨β¨x, _β©, _β© β¦ x
continuous_toFun := Continuous.comp continuous_fst continuous_subtype_val
def pullback.snd : pullback f g βΆ Y where
toFun := fun β¨β¨_, yβ©, _β© β¦ y
continuous_toFun := Continuous.comp continuous_snd continuous_subtype_val
@[reassoc]
lemma pullback.condition : pullback.fst f g β« f = pullback.snd f g β« g := by
ext β¨_, hβ©
exact h
def pullback.lift {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
Z βΆ pullback f g where
toFun := fun z β¦ β¨β¨a z, b zβ©, by apply_fun (Β· z) at w; exact wβ©
continuous_toFun := by
apply Continuous.subtype_mk
rw [continuous_prod_mk]
exact β¨a.continuous, b.continuousβ©
@[reassoc (attr := simp)]
lemma pullback.lift_fst {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.fst f g = a := rfl
@[reassoc (attr := simp)]
lemma pullback.lift_snd {Z : LightProfinite.{u}} (a : Z βΆ X) (b : Z βΆ Y) (w : a β« f = b β« g) :
pullback.lift f g a b w β« pullback.snd f g = b := rfl
lemma pullback.hom_ext {Z : LightProfinite.{u}} (a b : Z βΆ pullback f g)
(hfst : a β« pullback.fst f g = b β« pullback.fst f g)
(hsnd : a β« pullback.snd f g = b β« pullback.snd f g) : a = b := by
ext z
apply_fun (Β· z) at hfst hsnd
apply Subtype.ext
apply Prod.ext
Β· exact hfst
Β· exact hsnd
@[simps! pt Ο]
def pullback.cone : Limits.PullbackCone f g :=
Limits.PullbackCone.mk (pullback.fst f g) (pullback.snd f g) (pullback.condition f g)
@[simps! lift]
def pullback.isLimit : Limits.IsLimit (pullback.cone f g) :=
Limits.PullbackCone.isLimitAux _
(fun s β¦ pullback.lift f g s.fst s.snd s.condition)
(fun _ β¦ pullback.lift_fst _ _ _ _ _)
(fun _ β¦ pullback.lift_snd _ _ _ _ _)
(fun _ _ hm β¦ pullback.hom_ext _ _ _ _ (hm .left) (hm .right))
section FiniteCoproducts
variable {Ξ± : Type w} [Finite Ξ±] (X : Ξ± β LightProfinite.{max u w})
def finiteCoproduct : LightProfinite := LightProfinite.of <| Ξ£ (a : Ξ±), X a
def finiteCoproduct.ΞΉ (a : Ξ±) : X a βΆ finiteCoproduct X where
toFun := (β¨a, Β·β©)
continuous_toFun := continuous_sigmaMk (Ο := fun a β¦ X a)
def finiteCoproduct.desc {B : LightProfinite.{max u w}} (e : (a : Ξ±) β (X a βΆ B)) :
finiteCoproduct X βΆ B where
toFun := fun β¨a, xβ© β¦ e a x
continuous_toFun := by
apply continuous_sigma
intro a
exact (e a).continuous
@[reassoc (attr := simp)]
lemma finiteCoproduct.ΞΉ_desc {B : LightProfinite.{max u w}} (e : (a : Ξ±) β (X a βΆ B)) (a : Ξ±) :
finiteCoproduct.ΞΉ X a β« finiteCoproduct.desc X e = e a := rfl
lemma finiteCoproduct.hom_ext {B : LightProfinite.{max u w}} (f g : finiteCoproduct X βΆ B)
(h : β a : Ξ±, finiteCoproduct.ΞΉ X a β« f = finiteCoproduct.ΞΉ X a β« g) : f = g := by
ext β¨a, xβ©
specialize h a
apply_fun (Β· x) at h
exact h
abbrev finiteCoproduct.cofan : Limits.Cofan X :=
Cofan.mk (finiteCoproduct X) (finiteCoproduct.ΞΉ X)
def finiteCoproduct.isColimit : Limits.IsColimit (finiteCoproduct.cofan X) :=
mkCofanColimit _
(fun s β¦ desc _ fun a β¦ s.inj a)
(fun s a β¦ ΞΉ_desc _ _ _)
fun s m hm β¦ finiteCoproduct.hom_ext _ _ _ fun a β¦
(by ext t; exact congrFun (congrArg DFunLike.coe (hm a)) t)
instance (n : β) (F : Discrete (Fin n) β₯€ LightProfinite) :
HasColimit (Discrete.functor (F.obj β Discrete.mk) : Discrete (Fin n) β₯€ LightProfinite) where
exists_colimit := β¨β¨finiteCoproduct.cofan _, finiteCoproduct.isColimit _β©β©
instance : HasFiniteCoproducts LightProfinite where
out _ := { has_colimit := fun _ β¦ hasColimitOfIso Discrete.natIsoFunctor }
section Iso
noncomputable
def coproductIsoCoproduct : finiteCoproduct X β
β X :=
Limits.IsColimit.coconePointUniqueUpToIso (finiteCoproduct.isColimit X) (Limits.colimit.isColimit _)
| Mathlib/Topology/Category/LightProfinite/Limits.lean | 202 | 204 | theorem Sigma.ΞΉ_comp_toFiniteCoproduct (a : Ξ±) :
(Limits.Sigma.ΞΉ X a) β« (coproductIsoCoproduct X).inv = finiteCoproduct.ΞΉ X a := by |
simp [coproductIsoCoproduct]
| 173 |
import Mathlib.Algebra.Algebra.Prod
import Mathlib.Algebra.Algebra.Subalgebra.Basic
#align_import algebra.algebra.subalgebra.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca"
namespace Subalgebra
open Algebra
variable {R A B : Type*} [CommSemiring R] [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]
variable (S : Subalgebra R A) (Sβ : Subalgebra R B)
def prod : Subalgebra R (A Γ B) :=
{ S.toSubsemiring.prod Sβ.toSubsemiring with
carrier := S ΓΛ’ Sβ
algebraMap_mem' := fun _ => β¨algebraMap_mem _ _, algebraMap_mem _ _β© }
#align subalgebra.prod Subalgebra.prod
@[simp]
theorem coe_prod : (prod S Sβ : Set (A Γ B)) = (S : Set A) ΓΛ’ (Sβ : Set B) :=
rfl
#align subalgebra.coe_prod Subalgebra.coe_prod
open Subalgebra in
theorem prod_toSubmodule : toSubmodule (S.prod Sβ) = (toSubmodule S).prod (toSubmodule Sβ) := rfl
#align subalgebra.prod_to_submodule Subalgebra.prod_toSubmodule
@[simp]
theorem mem_prod {S : Subalgebra R A} {Sβ : Subalgebra R B} {x : A Γ B} :
x β prod S Sβ β x.1 β S β§ x.2 β Sβ := Set.mem_prod
#align subalgebra.mem_prod Subalgebra.mem_prod
@[simp]
| Mathlib/Algebra/Algebra/Subalgebra/Prod.lean | 51 | 51 | theorem prod_top : (prod β€ β€ : Subalgebra R (A Γ B)) = β€ := by | ext; simp
| 174 |
import Mathlib.Algebra.Group.Basic
import Mathlib.Order.Basic
import Mathlib.Order.Monotone.Basic
#align_import algebra.covariant_and_contravariant from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
-- TODO: convert `ExistsMulOfLE`, `ExistsAddOfLE`?
-- TODO: relationship with `Con/AddCon`
-- TODO: include equivalence of `LeftCancelSemigroup` with
-- `Semigroup PartialOrder ContravariantClass Ξ± Ξ± (*) (β€)`?
-- TODO : use β, as per Eric's suggestion? See
-- https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/ordered.20stuff/near/236148738
-- for a discussion.
open Function
section Variants
variable {M N : Type*} (ΞΌ : M β N β N) (r : N β N β Prop)
variable (M N)
def Covariant : Prop :=
β (m) {nβ nβ}, r nβ nβ β r (ΞΌ m nβ) (ΞΌ m nβ)
#align covariant Covariant
def Contravariant : Prop :=
β (m) {nβ nβ}, r (ΞΌ m nβ) (ΞΌ m nβ) β r nβ nβ
#align contravariant Contravariant
class CovariantClass : Prop where
protected elim : Covariant M N ΞΌ r
#align covariant_class CovariantClass
class ContravariantClass : Prop where
protected elim : Contravariant M N ΞΌ r
#align contravariant_class ContravariantClass
theorem rel_iff_cov [CovariantClass M N ΞΌ r] [ContravariantClass M N ΞΌ r] (m : M) {a b : N} :
r (ΞΌ m a) (ΞΌ m b) β r a b :=
β¨ContravariantClass.elim _, CovariantClass.elim _β©
#align rel_iff_cov rel_iff_cov
section Covariant
variable {M N ΞΌ r} [CovariantClass M N ΞΌ r]
theorem act_rel_act_of_rel (m : M) {a b : N} (ab : r a b) : r (ΞΌ m a) (ΞΌ m b) :=
CovariantClass.elim _ ab
#align act_rel_act_of_rel act_rel_act_of_rel
@[to_additive]
| Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean | 154 | 160 | theorem Group.covariant_iff_contravariant [Group N] :
Covariant N N (Β· * Β·) r β Contravariant N N (Β· * Β·) r := by |
refine β¨fun h a b c bc β¦ ?_, fun h a b c bc β¦ ?_β©
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c]
exact h aβ»ΒΉ bc
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c] at bc
exact h aβ»ΒΉ bc
| 175 |
import Mathlib.Algebra.Group.Basic
import Mathlib.Order.Basic
import Mathlib.Order.Monotone.Basic
#align_import algebra.covariant_and_contravariant from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
-- TODO: convert `ExistsMulOfLE`, `ExistsAddOfLE`?
-- TODO: relationship with `Con/AddCon`
-- TODO: include equivalence of `LeftCancelSemigroup` with
-- `Semigroup PartialOrder ContravariantClass Ξ± Ξ± (*) (β€)`?
-- TODO : use β, as per Eric's suggestion? See
-- https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/ordered.20stuff/near/236148738
-- for a discussion.
open Function
section Variants
variable {M N : Type*} (ΞΌ : M β N β N) (r : N β N β Prop)
variable (M N)
def Covariant : Prop :=
β (m) {nβ nβ}, r nβ nβ β r (ΞΌ m nβ) (ΞΌ m nβ)
#align covariant Covariant
def Contravariant : Prop :=
β (m) {nβ nβ}, r (ΞΌ m nβ) (ΞΌ m nβ) β r nβ nβ
#align contravariant Contravariant
class CovariantClass : Prop where
protected elim : Covariant M N ΞΌ r
#align covariant_class CovariantClass
class ContravariantClass : Prop where
protected elim : Contravariant M N ΞΌ r
#align contravariant_class ContravariantClass
theorem rel_iff_cov [CovariantClass M N ΞΌ r] [ContravariantClass M N ΞΌ r] (m : M) {a b : N} :
r (ΞΌ m a) (ΞΌ m b) β r a b :=
β¨ContravariantClass.elim _, CovariantClass.elim _β©
#align rel_iff_cov rel_iff_cov
section Covariant
variable {M N ΞΌ r} [CovariantClass M N ΞΌ r]
theorem act_rel_act_of_rel (m : M) {a b : N} (ab : r a b) : r (ΞΌ m a) (ΞΌ m b) :=
CovariantClass.elim _ ab
#align act_rel_act_of_rel act_rel_act_of_rel
@[to_additive]
theorem Group.covariant_iff_contravariant [Group N] :
Covariant N N (Β· * Β·) r β Contravariant N N (Β· * Β·) r := by
refine β¨fun h a b c bc β¦ ?_, fun h a b c bc β¦ ?_β©
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c]
exact h aβ»ΒΉ bc
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c] at bc
exact h aβ»ΒΉ bc
#align group.covariant_iff_contravariant Group.covariant_iff_contravariant
#align add_group.covariant_iff_contravariant AddGroup.covariant_iff_contravariant
@[to_additive]
instance (priority := 100) Group.covconv [Group N] [CovariantClass N N (Β· * Β·) r] :
ContravariantClass N N (Β· * Β·) r :=
β¨Group.covariant_iff_contravariant.mp CovariantClass.elimβ©
@[to_additive]
| Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean | 170 | 176 | theorem Group.covariant_swap_iff_contravariant_swap [Group N] :
Covariant N N (swap (Β· * Β·)) r β Contravariant N N (swap (Β· * Β·)) r := by |
refine β¨fun h a b c bc β¦ ?_, fun h a b c bc β¦ ?_β©
Β· rw [β mul_inv_cancel_right b a, β mul_inv_cancel_right c a]
exact h aβ»ΒΉ bc
Β· rw [β mul_inv_cancel_right b a, β mul_inv_cancel_right c a] at bc
exact h aβ»ΒΉ bc
| 175 |
import Mathlib.Algebra.Group.Basic
import Mathlib.Order.Basic
import Mathlib.Order.Monotone.Basic
#align_import algebra.covariant_and_contravariant from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
-- TODO: convert `ExistsMulOfLE`, `ExistsAddOfLE`?
-- TODO: relationship with `Con/AddCon`
-- TODO: include equivalence of `LeftCancelSemigroup` with
-- `Semigroup PartialOrder ContravariantClass Ξ± Ξ± (*) (β€)`?
-- TODO : use β, as per Eric's suggestion? See
-- https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/ordered.20stuff/near/236148738
-- for a discussion.
open Function
section Variants
variable {M N : Type*} (ΞΌ : M β N β N) (r : N β N β Prop)
variable (M N)
def Covariant : Prop :=
β (m) {nβ nβ}, r nβ nβ β r (ΞΌ m nβ) (ΞΌ m nβ)
#align covariant Covariant
def Contravariant : Prop :=
β (m) {nβ nβ}, r (ΞΌ m nβ) (ΞΌ m nβ) β r nβ nβ
#align contravariant Contravariant
class CovariantClass : Prop where
protected elim : Covariant M N ΞΌ r
#align covariant_class CovariantClass
class ContravariantClass : Prop where
protected elim : Contravariant M N ΞΌ r
#align contravariant_class ContravariantClass
theorem rel_iff_cov [CovariantClass M N ΞΌ r] [ContravariantClass M N ΞΌ r] (m : M) {a b : N} :
r (ΞΌ m a) (ΞΌ m b) β r a b :=
β¨ContravariantClass.elim _, CovariantClass.elim _β©
#align rel_iff_cov rel_iff_cov
section Covariant
variable {M N ΞΌ r} [CovariantClass M N ΞΌ r]
theorem act_rel_act_of_rel (m : M) {a b : N} (ab : r a b) : r (ΞΌ m a) (ΞΌ m b) :=
CovariantClass.elim _ ab
#align act_rel_act_of_rel act_rel_act_of_rel
@[to_additive]
theorem Group.covariant_iff_contravariant [Group N] :
Covariant N N (Β· * Β·) r β Contravariant N N (Β· * Β·) r := by
refine β¨fun h a b c bc β¦ ?_, fun h a b c bc β¦ ?_β©
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c]
exact h aβ»ΒΉ bc
Β· rw [β inv_mul_cancel_left a b, β inv_mul_cancel_left a c] at bc
exact h aβ»ΒΉ bc
#align group.covariant_iff_contravariant Group.covariant_iff_contravariant
#align add_group.covariant_iff_contravariant AddGroup.covariant_iff_contravariant
@[to_additive]
instance (priority := 100) Group.covconv [Group N] [CovariantClass N N (Β· * Β·) r] :
ContravariantClass N N (Β· * Β·) r :=
β¨Group.covariant_iff_contravariant.mp CovariantClass.elimβ©
@[to_additive]
theorem Group.covariant_swap_iff_contravariant_swap [Group N] :
Covariant N N (swap (Β· * Β·)) r β Contravariant N N (swap (Β· * Β·)) r := by
refine β¨fun h a b c bc β¦ ?_, fun h a b c bc β¦ ?_β©
Β· rw [β mul_inv_cancel_right b a, β mul_inv_cancel_right c a]
exact h aβ»ΒΉ bc
Β· rw [β mul_inv_cancel_right b a, β mul_inv_cancel_right c a] at bc
exact h aβ»ΒΉ bc
#align group.covariant_swap_iff_contravariant_swap Group.covariant_swap_iff_contravariant_swap
#align add_group.covariant_swap_iff_contravariant_swap AddGroup.covariant_swap_iff_contravariant_swap
@[to_additive]
instance (priority := 100) Group.covconv_swap [Group N] [CovariantClass N N (swap (Β· * Β·)) r] :
ContravariantClass N N (swap (Β· * Β·)) r :=
β¨Group.covariant_swap_iff_contravariant_swap.mp CovariantClass.elimβ©
-- Lemma with 4 elements.
| Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean | 281 | 286 | theorem covariant_le_of_covariant_lt [PartialOrder N] :
Covariant M N ΞΌ (Β· < Β·) β Covariant M N ΞΌ (Β· β€ Β·) := by |
intro h a b c bc
rcases bc.eq_or_lt with (rfl | bc)
Β· exact le_rfl
Β· exact (h _ bc).le
| 175 |
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Data.Set.MulAntidiagonal
#align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
namespace Set
open Pointwise
variable {Ξ± : Type*} {s t : Set Ξ±}
@[to_additive]
| Mathlib/Data/Finset/MulAntidiagonal.lean | 25 | 27 | theorem IsPWO.mul [OrderedCancelCommMonoid Ξ±] (hs : s.IsPWO) (ht : t.IsPWO) : IsPWO (s * t) := by |
rw [β image_mul_prod]
exact (hs.prod ht).image_of_monotone (monotone_fst.mul' monotone_snd)
| 176 |
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Data.Set.MulAntidiagonal
#align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
namespace Set
open Pointwise
variable {Ξ± : Type*} {s t : Set Ξ±}
@[to_additive]
theorem IsPWO.mul [OrderedCancelCommMonoid Ξ±] (hs : s.IsPWO) (ht : t.IsPWO) : IsPWO (s * t) := by
rw [β image_mul_prod]
exact (hs.prod ht).image_of_monotone (monotone_fst.mul' monotone_snd)
#align set.is_pwo.mul Set.IsPWO.mul
#align set.is_pwo.add Set.IsPWO.add
variable [LinearOrderedCancelCommMonoid Ξ±]
@[to_additive]
theorem IsWF.mul (hs : s.IsWF) (ht : t.IsWF) : IsWF (s * t) :=
(hs.isPWO.mul ht.isPWO).isWF
#align set.is_wf.mul Set.IsWF.mul
#align set.is_wf.add Set.IsWF.add
@[to_additive]
| Mathlib/Data/Finset/MulAntidiagonal.lean | 40 | 45 | theorem IsWF.min_mul (hs : s.IsWF) (ht : t.IsWF) (hsn : s.Nonempty) (htn : t.Nonempty) :
(hs.mul ht).min (hsn.mul htn) = hs.min hsn * ht.min htn := by |
refine le_antisymm (IsWF.min_le _ _ (mem_mul.2 β¨_, hs.min_mem _, _, ht.min_mem _, rflβ©)) ?_
rw [IsWF.le_min_iff]
rintro _ β¨x, hx, y, hy, rflβ©
exact mul_le_mul' (hs.min_le _ hx) (ht.min_le _ hy)
| 176 |
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Data.Set.MulAntidiagonal
#align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
namespace Finset
open Pointwise
variable {Ξ± : Type*}
variable [OrderedCancelCommMonoid Ξ±] {s t : Set Ξ±} (hs : s.IsPWO) (ht : t.IsPWO) (a : Ξ±)
@[to_additive "`Finset.addAntidiagonal hs ht a` is the set of all pairs of an element in
`s` and an element in `t` that add to `a`, but its construction requires proofs that `s` and `t` are
well-ordered."]
noncomputable def mulAntidiagonal : Finset (Ξ± Γ Ξ±) :=
(Set.MulAntidiagonal.finite_of_isPWO hs ht a).toFinset
#align finset.mul_antidiagonal Finset.mulAntidiagonal
#align finset.add_antidiagonal Finset.addAntidiagonal
variable {hs ht a} {u : Set Ξ±} {hu : u.IsPWO} {x : Ξ± Γ Ξ±}
@[to_additive (attr := simp)]
| Mathlib/Data/Finset/MulAntidiagonal.lean | 72 | 73 | theorem mem_mulAntidiagonal : x β mulAntidiagonal hs ht a β x.1 β s β§ x.2 β t β§ x.1 * x.2 = a := by |
simp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]
| 176 |
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Data.Set.MulAntidiagonal
#align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
namespace Finset
open Pointwise
variable {Ξ± : Type*}
variable [OrderedCancelCommMonoid Ξ±] {s t : Set Ξ±} (hs : s.IsPWO) (ht : t.IsPWO) (a : Ξ±)
@[to_additive "`Finset.addAntidiagonal hs ht a` is the set of all pairs of an element in
`s` and an element in `t` that add to `a`, but its construction requires proofs that `s` and `t` are
well-ordered."]
noncomputable def mulAntidiagonal : Finset (Ξ± Γ Ξ±) :=
(Set.MulAntidiagonal.finite_of_isPWO hs ht a).toFinset
#align finset.mul_antidiagonal Finset.mulAntidiagonal
#align finset.add_antidiagonal Finset.addAntidiagonal
variable {hs ht a} {u : Set Ξ±} {hu : u.IsPWO} {x : Ξ± Γ Ξ±}
@[to_additive (attr := simp)]
theorem mem_mulAntidiagonal : x β mulAntidiagonal hs ht a β x.1 β s β§ x.2 β t β§ x.1 * x.2 = a := by
simp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]
#align finset.mem_mul_antidiagonal Finset.mem_mulAntidiagonal
#align finset.mem_add_antidiagonal Finset.mem_addAntidiagonal
@[to_additive]
theorem mulAntidiagonal_mono_left (h : u β s) : mulAntidiagonal hu ht a β mulAntidiagonal hs ht a :=
Set.Finite.toFinset_mono <| Set.mulAntidiagonal_mono_left h
#align finset.mul_antidiagonal_mono_left Finset.mulAntidiagonal_mono_left
#align finset.add_antidiagonal_mono_left Finset.addAntidiagonal_mono_left
@[to_additive]
theorem mulAntidiagonal_mono_right (h : u β t) :
mulAntidiagonal hs hu a β mulAntidiagonal hs ht a :=
Set.Finite.toFinset_mono <| Set.mulAntidiagonal_mono_right h
#align finset.mul_antidiagonal_mono_right Finset.mulAntidiagonal_mono_right
#align finset.add_antidiagonal_mono_right Finset.addAntidiagonal_mono_right
-- Porting note: removed `(attr := simp)`. simp can prove this.
@[to_additive]
| Mathlib/Data/Finset/MulAntidiagonal.lean | 92 | 95 | theorem swap_mem_mulAntidiagonal :
x.swap β Finset.mulAntidiagonal hs ht a β x β Finset.mulAntidiagonal ht hs a := by |
simp only [mem_mulAntidiagonal, Prod.fst_swap, Prod.snd_swap, Set.swap_mem_mulAntidiagonal_aux,
Set.mem_mulAntidiagonal]
| 176 |
import Mathlib.RingTheory.HahnSeries.Addition
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Data.Finset.MulAntidiagonal
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open scoped Classical
open Pointwise
noncomputable section
variable {Ξ Ξ' R : Type*}
section Multiplication
namespace HahnSeries
variable [Zero Ξ] [PartialOrder Ξ]
instance [Zero R] [One R] : One (HahnSeries Ξ R) :=
β¨single 0 1β©
@[simp]
theorem one_coeff [Zero R] [One R] {a : Ξ} :
(1 : HahnSeries Ξ R).coeff a = if a = 0 then 1 else 0 :=
single_coeff
#align hahn_series.one_coeff HahnSeries.one_coeff
@[simp]
theorem single_zero_one [Zero R] [One R] : single 0 (1 : R) = 1 :=
rfl
#align hahn_series.single_zero_one HahnSeries.single_zero_one
@[simp]
theorem support_one [MulZeroOneClass R] [Nontrivial R] : support (1 : HahnSeries Ξ R) = {0} :=
support_single_of_ne one_ne_zero
#align hahn_series.support_one HahnSeries.support_one
@[simp]
| Mathlib/RingTheory/HahnSeries/Multiplication.lean | 65 | 68 | theorem order_one [MulZeroOneClass R] : order (1 : HahnSeries Ξ R) = 0 := by |
cases subsingleton_or_nontrivial R
Β· rw [Subsingleton.elim (1 : HahnSeries Ξ R) 0, order_zero]
Β· exact order_single one_ne_zero
| 177 |
import Mathlib.RingTheory.HahnSeries.Addition
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Data.Finset.MulAntidiagonal
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open scoped Classical
open Pointwise
noncomputable section
variable {Ξ Ξ' R : Type*}
section Multiplication
@[nolint unusedArguments]
def HahnModule (Ξ R V : Type*) [PartialOrder Ξ] [Zero V] [SMul R V] :=
HahnSeries Ξ V
namespace HahnModule
section
variable {Ξ R V : Type*} [PartialOrder Ξ] [Zero V] [SMul R V]
def of {Ξ : Type*} (R : Type*) {V : Type*} [PartialOrder Ξ] [Zero V] [SMul R V] :
HahnSeries Ξ V β HahnModule Ξ R V := Equiv.refl _
@[elab_as_elim]
def rec {motive : HahnModule Ξ R V β Sort*} (h : β x : HahnSeries Ξ V, motive (of R x)) :
β x, motive x :=
fun x => h <| (of R).symm x
@[ext]
theorem ext (x y : HahnModule Ξ R V) (h : ((of R).symm x).coeff = ((of R).symm y).coeff) : x = y :=
(of R).symm.injective <| HahnSeries.coeff_inj.1 h
variable {V : Type*} [AddCommMonoid V] [SMul R V]
instance instAddCommMonoid : AddCommMonoid (HahnModule Ξ R V) :=
inferInstanceAs <| AddCommMonoid (HahnSeries Ξ V)
instance instBaseSMul {V} [Monoid R] [AddMonoid V] [DistribMulAction R V] :
SMul R (HahnModule Ξ R V) :=
inferInstanceAs <| SMul R (HahnSeries Ξ V)
instance instBaseModule [Semiring R] [Module R V] : Module R (HahnModule Ξ R V) :=
inferInstanceAs <| Module R (HahnSeries Ξ V)
@[simp] theorem of_zero : of R (0 : HahnSeries Ξ V) = 0 := rfl
@[simp] theorem of_add (x y : HahnSeries Ξ V) : of R (x + y) = of R x + of R y := rfl
@[simp] theorem of_symm_zero : (of R).symm (0 : HahnModule Ξ R V) = 0 := rfl
@[simp] theorem of_symm_add (x y : HahnModule Ξ R V) :
(of R).symm (x + y) = (of R).symm x + (of R).symm y := rfl
end
variable {Ξ R V : Type*} [OrderedCancelAddCommMonoid Ξ] [AddCommMonoid V] [SMul R V]
instance instSMul [Zero R] : SMul (HahnSeries Ξ R) (HahnModule Ξ R V) where
smul x y := {
coeff := fun a =>
β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd
isPWO_support' :=
haveI h :
{a : Ξ | β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ y.coeff ij.snd β 0} β
{a : Ξ | (addAntidiagonal x.isPWO_support y.isPWO_support a).Nonempty} := by
intro a ha
contrapose! ha
simp [not_nonempty_iff_eq_empty.1 ha]
isPWO_support_addAntidiagonal.mono h }
theorem smul_coeff [Zero R] (x : HahnSeries Ξ R) (y : HahnModule Ξ R V) (a : Ξ) :
((of R).symm <| x β’ y).coeff a =
β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd :=
rfl
variable {W : Type*} [Zero R] [AddCommMonoid W]
instance instSMulZeroClass [SMulZeroClass R W] :
SMulZeroClass (HahnSeries Ξ R) (HahnModule Ξ R W) where
smul_zero x := by
ext
simp [smul_coeff]
| Mathlib/RingTheory/HahnSeries/Multiplication.lean | 152 | 161 | theorem smul_coeff_right [SMulZeroClass R W] {x : HahnSeries Ξ R}
{y : HahnModule Ξ R W} {a : Ξ} {s : Set Ξ} (hs : s.IsPWO) (hys : ((of R).symm y).support β s) :
((of R).symm <| x β’ y).coeff a =
β ij β addAntidiagonal x.isPWO_support hs a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd := by |
rw [smul_coeff]
apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_right hys) _ fun _ _ => rfl
intro b hb
simp only [not_and, mem_sdiff, mem_addAntidiagonal, HahnSeries.mem_support, not_imp_not] at hb
rw [hb.2 hb.1.1 hb.1.2.2, smul_zero]
| 177 |
import Mathlib.RingTheory.HahnSeries.Addition
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Data.Finset.MulAntidiagonal
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open scoped Classical
open Pointwise
noncomputable section
variable {Ξ Ξ' R : Type*}
section Multiplication
@[nolint unusedArguments]
def HahnModule (Ξ R V : Type*) [PartialOrder Ξ] [Zero V] [SMul R V] :=
HahnSeries Ξ V
namespace HahnModule
section
variable {Ξ R V : Type*} [PartialOrder Ξ] [Zero V] [SMul R V]
def of {Ξ : Type*} (R : Type*) {V : Type*} [PartialOrder Ξ] [Zero V] [SMul R V] :
HahnSeries Ξ V β HahnModule Ξ R V := Equiv.refl _
@[elab_as_elim]
def rec {motive : HahnModule Ξ R V β Sort*} (h : β x : HahnSeries Ξ V, motive (of R x)) :
β x, motive x :=
fun x => h <| (of R).symm x
@[ext]
theorem ext (x y : HahnModule Ξ R V) (h : ((of R).symm x).coeff = ((of R).symm y).coeff) : x = y :=
(of R).symm.injective <| HahnSeries.coeff_inj.1 h
variable {V : Type*} [AddCommMonoid V] [SMul R V]
instance instAddCommMonoid : AddCommMonoid (HahnModule Ξ R V) :=
inferInstanceAs <| AddCommMonoid (HahnSeries Ξ V)
instance instBaseSMul {V} [Monoid R] [AddMonoid V] [DistribMulAction R V] :
SMul R (HahnModule Ξ R V) :=
inferInstanceAs <| SMul R (HahnSeries Ξ V)
instance instBaseModule [Semiring R] [Module R V] : Module R (HahnModule Ξ R V) :=
inferInstanceAs <| Module R (HahnSeries Ξ V)
@[simp] theorem of_zero : of R (0 : HahnSeries Ξ V) = 0 := rfl
@[simp] theorem of_add (x y : HahnSeries Ξ V) : of R (x + y) = of R x + of R y := rfl
@[simp] theorem of_symm_zero : (of R).symm (0 : HahnModule Ξ R V) = 0 := rfl
@[simp] theorem of_symm_add (x y : HahnModule Ξ R V) :
(of R).symm (x + y) = (of R).symm x + (of R).symm y := rfl
end
variable {Ξ R V : Type*} [OrderedCancelAddCommMonoid Ξ] [AddCommMonoid V] [SMul R V]
instance instSMul [Zero R] : SMul (HahnSeries Ξ R) (HahnModule Ξ R V) where
smul x y := {
coeff := fun a =>
β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd
isPWO_support' :=
haveI h :
{a : Ξ | β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ y.coeff ij.snd β 0} β
{a : Ξ | (addAntidiagonal x.isPWO_support y.isPWO_support a).Nonempty} := by
intro a ha
contrapose! ha
simp [not_nonempty_iff_eq_empty.1 ha]
isPWO_support_addAntidiagonal.mono h }
theorem smul_coeff [Zero R] (x : HahnSeries Ξ R) (y : HahnModule Ξ R V) (a : Ξ) :
((of R).symm <| x β’ y).coeff a =
β ij β addAntidiagonal x.isPWO_support y.isPWO_support a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd :=
rfl
variable {W : Type*} [Zero R] [AddCommMonoid W]
instance instSMulZeroClass [SMulZeroClass R W] :
SMulZeroClass (HahnSeries Ξ R) (HahnModule Ξ R W) where
smul_zero x := by
ext
simp [smul_coeff]
theorem smul_coeff_right [SMulZeroClass R W] {x : HahnSeries Ξ R}
{y : HahnModule Ξ R W} {a : Ξ} {s : Set Ξ} (hs : s.IsPWO) (hys : ((of R).symm y).support β s) :
((of R).symm <| x β’ y).coeff a =
β ij β addAntidiagonal x.isPWO_support hs a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd := by
rw [smul_coeff]
apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_right hys) _ fun _ _ => rfl
intro b hb
simp only [not_and, mem_sdiff, mem_addAntidiagonal, HahnSeries.mem_support, not_imp_not] at hb
rw [hb.2 hb.1.1 hb.1.2.2, smul_zero]
| Mathlib/RingTheory/HahnSeries/Multiplication.lean | 163 | 173 | theorem smul_coeff_left [SMulWithZero R W] {x : HahnSeries Ξ R}
{y : HahnModule Ξ R W} {a : Ξ} {s : Set Ξ}
(hs : s.IsPWO) (hxs : x.support β s) :
((of R).symm <| x β’ y).coeff a =
β ij β addAntidiagonal hs y.isPWO_support a,
x.coeff ij.fst β’ ((of R).symm y).coeff ij.snd := by |
rw [smul_coeff]
apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_left hxs) _ fun _ _ => rfl
intro b hb
simp only [not_and', mem_sdiff, mem_addAntidiagonal, HahnSeries.mem_support, not_ne_iff] at hb
rw [hb.2 β¨hb.1.2.1, hb.1.2.2β©, zero_smul]
| 177 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Monotone.Basic
#align_import order.iterate from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
open Function
open Function (Commute)
namespace Monotone
variable {Ξ± : Type*} [Preorder Ξ±] {f : Ξ± β Ξ±} {x y : β β Ξ±}
| Mathlib/Order/Iterate.lean | 42 | 48 | theorem seq_le_seq (hf : Monotone f) (n : β) (hβ : x 0 β€ y 0) (hx : β k < n, x (k + 1) β€ f (x k))
(hy : β k < n, f (y k) β€ y (k + 1)) : x n β€ y n := by |
induction' n with n ihn
Β· exact hβ
Β· refine (hx _ n.lt_succ_self).trans ((hf <| ihn ?_ ?_).trans (hy _ n.lt_succ_self))
Β· exact fun k hk => hx _ (hk.trans n.lt_succ_self)
Β· exact fun k hk => hy _ (hk.trans n.lt_succ_self)
| 178 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Monotone.Basic
#align_import order.iterate from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
open Function
open Function (Commute)
namespace Monotone
variable {Ξ± : Type*} [Preorder Ξ±] {f : Ξ± β Ξ±} {x y : β β Ξ±}
theorem seq_le_seq (hf : Monotone f) (n : β) (hβ : x 0 β€ y 0) (hx : β k < n, x (k + 1) β€ f (x k))
(hy : β k < n, f (y k) β€ y (k + 1)) : x n β€ y n := by
induction' n with n ihn
Β· exact hβ
Β· refine (hx _ n.lt_succ_self).trans ((hf <| ihn ?_ ?_).trans (hy _ n.lt_succ_self))
Β· exact fun k hk => hx _ (hk.trans n.lt_succ_self)
Β· exact fun k hk => hy _ (hk.trans n.lt_succ_self)
#align monotone.seq_le_seq Monotone.seq_le_seq
| Mathlib/Order/Iterate.lean | 51 | 60 | theorem seq_pos_lt_seq_of_lt_of_le (hf : Monotone f) {n : β} (hn : 0 < n) (hβ : x 0 β€ y 0)
(hx : β k < n, x (k + 1) < f (x k)) (hy : β k < n, f (y k) β€ y (k + 1)) : x n < y n := by |
induction' n with n ihn
Β· exact hn.false.elim
suffices x n β€ y n from (hx n n.lt_succ_self).trans_le ((hf this).trans <| hy n n.lt_succ_self)
cases n with
| zero => exact hβ
| succ n =>
refine (ihn n.zero_lt_succ (fun k hk => hx _ ?_) fun k hk => hy _ ?_).le <;>
exact hk.trans n.succ.lt_succ_self
| 178 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Monotone.Basic
#align_import order.iterate from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
open Function
open Function (Commute)
namespace Monotone
variable {Ξ± : Type*} [Preorder Ξ±] {f : Ξ± β Ξ±} {x y : β β Ξ±}
theorem seq_le_seq (hf : Monotone f) (n : β) (hβ : x 0 β€ y 0) (hx : β k < n, x (k + 1) β€ f (x k))
(hy : β k < n, f (y k) β€ y (k + 1)) : x n β€ y n := by
induction' n with n ihn
Β· exact hβ
Β· refine (hx _ n.lt_succ_self).trans ((hf <| ihn ?_ ?_).trans (hy _ n.lt_succ_self))
Β· exact fun k hk => hx _ (hk.trans n.lt_succ_self)
Β· exact fun k hk => hy _ (hk.trans n.lt_succ_self)
#align monotone.seq_le_seq Monotone.seq_le_seq
theorem seq_pos_lt_seq_of_lt_of_le (hf : Monotone f) {n : β} (hn : 0 < n) (hβ : x 0 β€ y 0)
(hx : β k < n, x (k + 1) < f (x k)) (hy : β k < n, f (y k) β€ y (k + 1)) : x n < y n := by
induction' n with n ihn
Β· exact hn.false.elim
suffices x n β€ y n from (hx n n.lt_succ_self).trans_le ((hf this).trans <| hy n n.lt_succ_self)
cases n with
| zero => exact hβ
| succ n =>
refine (ihn n.zero_lt_succ (fun k hk => hx _ ?_) fun k hk => hy _ ?_).le <;>
exact hk.trans n.succ.lt_succ_self
#align monotone.seq_pos_lt_seq_of_lt_of_le Monotone.seq_pos_lt_seq_of_lt_of_le
theorem seq_pos_lt_seq_of_le_of_lt (hf : Monotone f) {n : β} (hn : 0 < n) (hβ : x 0 β€ y 0)
(hx : β k < n, x (k + 1) β€ f (x k)) (hy : β k < n, f (y k) < y (k + 1)) : x n < y n :=
hf.dual.seq_pos_lt_seq_of_lt_of_le hn hβ hy hx
#align monotone.seq_pos_lt_seq_of_le_of_lt Monotone.seq_pos_lt_seq_of_le_of_lt
| Mathlib/Order/Iterate.lean | 68 | 71 | theorem seq_lt_seq_of_lt_of_le (hf : Monotone f) (n : β) (hβ : x 0 < y 0)
(hx : β k < n, x (k + 1) < f (x k)) (hy : β k < n, f (y k) β€ y (k + 1)) : x n < y n := by |
cases n
exacts [hβ, hf.seq_pos_lt_seq_of_lt_of_le (Nat.zero_lt_succ _) hβ.le hx hy]
| 178 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
| Mathlib/Control/Bitraversable/Lemmas.lean | 72 | 75 | theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by |
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
| 179 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
#align bitraversable.comp_tfst Bitraversable.comp_tfst
@[higher_order tfst_comp_tsnd]
| Mathlib/Control/Bitraversable/Lemmas.lean | 79 | 83 | theorem tfst_tsnd {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tfst f <$> tsnd f' x)
= bitraverse (Comp.mk β pure β f) (Comp.mk β map pure β f') x := by |
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
| 179 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
#align bitraversable.comp_tfst Bitraversable.comp_tfst
@[higher_order tfst_comp_tsnd]
theorem tfst_tsnd {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tfst f <$> tsnd f' x)
= bitraverse (Comp.mk β pure β f) (Comp.mk β map pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tfst_tsnd Bitraversable.tfst_tsnd
@[higher_order tsnd_comp_tfst]
| Mathlib/Control/Bitraversable/Lemmas.lean | 87 | 91 | theorem tsnd_tfst {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tsnd f' <$> tfst f x)
= bitraverse (Comp.mk β map pure β f) (Comp.mk β pure β f') x := by |
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
| 179 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
#align bitraversable.comp_tfst Bitraversable.comp_tfst
@[higher_order tfst_comp_tsnd]
theorem tfst_tsnd {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tfst f <$> tsnd f' x)
= bitraverse (Comp.mk β pure β f) (Comp.mk β map pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tfst_tsnd Bitraversable.tfst_tsnd
@[higher_order tsnd_comp_tfst]
theorem tsnd_tfst {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tsnd f' <$> tfst f x)
= bitraverse (Comp.mk β map pure β f) (Comp.mk β pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tsnd_tfst Bitraversable.tsnd_tfst
@[higher_order tsnd_comp_tsnd]
| Mathlib/Control/Bitraversable/Lemmas.lean | 95 | 99 | theorem comp_tsnd {Ξ± Ξ²β Ξ²β Ξ²β} (g : Ξ²β β F Ξ²β) (g' : Ξ²β β G Ξ²β) (x : t Ξ± Ξ²β) :
Comp.mk (tsnd g' <$> tsnd g x) = tsnd (Comp.mk β map g' β g) x := by |
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
rfl
| 179 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
#align bitraversable.comp_tfst Bitraversable.comp_tfst
@[higher_order tfst_comp_tsnd]
theorem tfst_tsnd {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tfst f <$> tsnd f' x)
= bitraverse (Comp.mk β pure β f) (Comp.mk β map pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tfst_tsnd Bitraversable.tfst_tsnd
@[higher_order tsnd_comp_tfst]
theorem tsnd_tfst {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tsnd f' <$> tfst f x)
= bitraverse (Comp.mk β map pure β f) (Comp.mk β pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tsnd_tfst Bitraversable.tsnd_tfst
@[higher_order tsnd_comp_tsnd]
theorem comp_tsnd {Ξ± Ξ²β Ξ²β Ξ²β} (g : Ξ²β β F Ξ²β) (g' : Ξ²β β G Ξ²β) (x : t Ξ± Ξ²β) :
Comp.mk (tsnd g' <$> tsnd g x) = tsnd (Comp.mk β map g' β g) x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
rfl
#align bitraversable.comp_tsnd Bitraversable.comp_tsnd
open Bifunctor
-- Porting note: This private theorem wasn't needed
-- private theorem pure_eq_id_mk_comp_id {Ξ±} : pure = id.mk β @id Ξ± := rfl
open Function
@[higher_order]
| Mathlib/Control/Bitraversable/Lemmas.lean | 110 | 112 | theorem tfst_eq_fst_id {Ξ± Ξ±' Ξ²} (f : Ξ± β Ξ±') (x : t Ξ± Ξ²) :
tfst (F := Id) (pure β f) x = pure (fst f x) := by |
apply bitraverse_eq_bimap_id
| 179 |
import Mathlib.Control.Bitraversable.Basic
#align_import control.bitraversable.lemmas from "leanprover-community/mathlib"@"58581d0fe523063f5651df0619be2bf65012a94a"
universe u
variable {t : Type u β Type u β Type u} [Bitraversable t]
variable {Ξ² : Type u}
namespace Bitraversable
open Functor LawfulApplicative
variable {F G : Type u β Type u} [Applicative F] [Applicative G]
abbrev tfst {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ± Ξ² β F (t Ξ±' Ξ²) :=
bitraverse f pure
#align bitraversable.tfst Bitraversable.tfst
abbrev tsnd {Ξ± Ξ±'} (f : Ξ± β F Ξ±') : t Ξ² Ξ± β F (t Ξ² Ξ±') :=
bitraverse pure f
#align bitraversable.tsnd Bitraversable.tsnd
variable [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G]
@[higher_order tfst_id]
theorem id_tfst : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tfst (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tfst Bitraversable.id_tfst
@[higher_order tsnd_id]
theorem id_tsnd : β {Ξ± Ξ²} (x : t Ξ± Ξ²), tsnd (F := Id) pure x = pure x :=
id_bitraverse
#align bitraversable.id_tsnd Bitraversable.id_tsnd
@[higher_order tfst_comp_tfst]
theorem comp_tfst {Ξ±β Ξ±β Ξ±β Ξ²} (f : Ξ±β β F Ξ±β) (f' : Ξ±β β G Ξ±β) (x : t Ξ±β Ξ²) :
Comp.mk (tfst f' <$> tfst f x) = tfst (Comp.mk β map f' β f) x := by
rw [β comp_bitraverse]
simp only [Function.comp, tfst, map_pure, Pure.pure]
#align bitraversable.comp_tfst Bitraversable.comp_tfst
@[higher_order tfst_comp_tsnd]
theorem tfst_tsnd {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tfst f <$> tsnd f' x)
= bitraverse (Comp.mk β pure β f) (Comp.mk β map pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tfst_tsnd Bitraversable.tfst_tsnd
@[higher_order tsnd_comp_tfst]
theorem tsnd_tfst {Ξ±β Ξ±β Ξ²β Ξ²β} (f : Ξ±β β F Ξ±β) (f' : Ξ²β β G Ξ²β) (x : t Ξ±β Ξ²β) :
Comp.mk (tsnd f' <$> tfst f x)
= bitraverse (Comp.mk β map pure β f) (Comp.mk β pure β f') x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
#align bitraversable.tsnd_tfst Bitraversable.tsnd_tfst
@[higher_order tsnd_comp_tsnd]
theorem comp_tsnd {Ξ± Ξ²β Ξ²β Ξ²β} (g : Ξ²β β F Ξ²β) (g' : Ξ²β β G Ξ²β) (x : t Ξ± Ξ²β) :
Comp.mk (tsnd g' <$> tsnd g x) = tsnd (Comp.mk β map g' β g) x := by
rw [β comp_bitraverse]
simp only [Function.comp, map_pure]
rfl
#align bitraversable.comp_tsnd Bitraversable.comp_tsnd
open Bifunctor
-- Porting note: This private theorem wasn't needed
-- private theorem pure_eq_id_mk_comp_id {Ξ±} : pure = id.mk β @id Ξ± := rfl
open Function
@[higher_order]
theorem tfst_eq_fst_id {Ξ± Ξ±' Ξ²} (f : Ξ± β Ξ±') (x : t Ξ± Ξ²) :
tfst (F := Id) (pure β f) x = pure (fst f x) := by
apply bitraverse_eq_bimap_id
#align bitraversable.tfst_eq_fst_id Bitraversable.tfst_eq_fst_id
@[higher_order]
| Mathlib/Control/Bitraversable/Lemmas.lean | 116 | 118 | theorem tsnd_eq_snd_id {Ξ± Ξ² Ξ²'} (f : Ξ² β Ξ²') (x : t Ξ± Ξ²) :
tsnd (F := Id) (pure β f) x = pure (snd f x) := by |
apply bitraverse_eq_bimap_id
| 179 |
import Mathlib.Logic.Equiv.Defs
import Mathlib.Tactic.Convert
#align_import control.equiv_functor from "leanprover-community/mathlib"@"d6aae1bcbd04b8de2022b9b83a5b5b10e10c777d"
universe uβ uβ uβ vβ vβ vβ
open Function
class EquivFunctor (f : Type uβ β Type uβ) where
map : β {Ξ± Ξ²}, Ξ± β Ξ² β f Ξ± β f Ξ²
map_refl' : β Ξ±, map (Equiv.refl Ξ±) = @id (f Ξ±) := by rfl
map_trans' : β {Ξ± Ξ² Ξ³} (k : Ξ± β Ξ²) (h : Ξ² β Ξ³), map (k.trans h) = map h β map k := by rfl
#align equiv_functor EquivFunctor
attribute [simp] EquivFunctor.map_refl'
namespace EquivFunctor
section
variable (f : Type uβ β Type uβ) [EquivFunctor f] {Ξ± Ξ² : Type uβ} (e : Ξ± β Ξ²)
def mapEquiv : f Ξ± β f Ξ² where
toFun := EquivFunctor.map e
invFun := EquivFunctor.map e.symm
left_inv x := by
convert (congr_fun (EquivFunctor.map_trans' e e.symm) x).symm
simp
right_inv y := by
convert (congr_fun (EquivFunctor.map_trans' e.symm e) y).symm
simp
#align equiv_functor.map_equiv EquivFunctor.mapEquiv
@[simp]
theorem mapEquiv_apply (x : f Ξ±) : mapEquiv f e x = EquivFunctor.map e x :=
rfl
#align equiv_functor.map_equiv_apply EquivFunctor.mapEquiv_apply
theorem mapEquiv_symm_apply (y : f Ξ²) : (mapEquiv f e).symm y = EquivFunctor.map e.symm y :=
rfl
#align equiv_functor.map_equiv_symm_apply EquivFunctor.mapEquiv_symm_apply
@[simp]
| Mathlib/Control/EquivFunctor.lean | 70 | 71 | theorem mapEquiv_refl (Ξ±) : mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±) := by |
simp only [mapEquiv, map_refl', Equiv.refl_symm]; rfl
| 180 |
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
import Mathlib.CategoryTheory.Linear.Basic
#align_import category_theory.linear.linear_functor from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb5bffd3"
namespace CategoryTheory
variable (R : Type*) [Semiring R]
class Functor.Linear {C D : Type*} [Category C] [Category D] [Preadditive C] [Preadditive D]
[Linear R C] [Linear R D] (F : C β₯€ D) [F.Additive] : Prop where
map_smul : β {X Y : C} (f : X βΆ Y) (r : R), F.map (r β’ f) = r β’ F.map f := by aesop_cat
#align category_theory.functor.linear CategoryTheory.Functor.Linear
section Linear
namespace Functor
section
variable {R}
variable {C D : Type*} [Category C] [Category D] [Preadditive C] [Preadditive D]
[CategoryTheory.Linear R C] [CategoryTheory.Linear R D] (F : C β₯€ D) [Additive F] [Linear R F]
@[simp]
theorem map_smul {X Y : C} (r : R) (f : X βΆ Y) : F.map (r β’ f) = r β’ F.map f :=
Functor.Linear.map_smul _ _
#align category_theory.functor.map_smul CategoryTheory.Functor.map_smul
@[simp]
| Mathlib/CategoryTheory/Linear/LinearFunctor.lean | 53 | 54 | theorem map_units_smul {X Y : C} (r : RΛ£) (f : X βΆ Y) : F.map (r β’ f) = r β’ F.map f := by |
apply map_smul
| 181 |
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom
import Mathlib.Topology.ContinuousFunction.Basic
#align_import topology.category.Top.basic from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open CategoryTheory
open TopologicalSpace
universe u
@[to_additive existing TopCat]
def TopCat : Type (u + 1) :=
Bundled TopologicalSpace
set_option linter.uppercaseLean3 false in
#align Top TopCat
namespace TopCat
instance bundledHom : BundledHom @ContinuousMap where
toFun := @ContinuousMap.toFun
id := @ContinuousMap.id
comp := @ContinuousMap.comp
set_option linter.uppercaseLean3 false in
#align Top.bundled_hom TopCat.bundledHom
deriving instance LargeCategory for TopCat
-- Porting note: currently no derive handler for ConcreteCategory
-- see https://github.com/leanprover-community/mathlib4/issues/5020
instance concreteCategory : ConcreteCategory TopCat :=
inferInstanceAs <| ConcreteCategory (Bundled TopologicalSpace)
instance : CoeSort TopCat Type* where
coe X := X.Ξ±
instance topologicalSpaceUnbundled (X : TopCat) : TopologicalSpace X :=
X.str
set_option linter.uppercaseLean3 false in
#align Top.topological_space_unbundled TopCat.topologicalSpaceUnbundled
-- We leave this temporarily as a reminder of the downstream instances #13170
-- -- Porting note: cannot find a coercion to function otherwise
-- -- attribute [instance] ConcreteCategory.instFunLike in
-- instance (X Y : TopCat.{u}) : CoeFun (X βΆ Y) fun _ => X β Y where
-- coe (f : C(X, Y)) := f
instance instFunLike (X Y : TopCat) : FunLike (X βΆ Y) X Y :=
inferInstanceAs <| FunLike C(X, Y) X Y
instance instMonoidHomClass (X Y : TopCat) : ContinuousMapClass (X βΆ Y) X Y :=
inferInstanceAs <| ContinuousMapClass C(X, Y) X Y
-- Porting note (#10618): simp can prove this; removed simp
theorem id_app (X : TopCat.{u}) (x : βX) : (π X : X βΆ X) x = x := rfl
set_option linter.uppercaseLean3 false in
#align Top.id_app TopCat.id_app
-- Porting note (#10618): simp can prove this; removed simp
theorem comp_app {X Y Z : TopCat.{u}} (f : X βΆ Y) (g : Y βΆ Z) (x : X) :
(f β« g : X β Z) x = g (f x) := rfl
set_option linter.uppercaseLean3 false in
#align Top.comp_app TopCat.comp_app
@[simp] theorem coe_id (X : TopCat.{u}) : (π X : X β X) = id := rfl
@[simp] theorem coe_comp {X Y Z : TopCat.{u}} (f : X βΆ Y) (g : Y βΆ Z) :
(f β« g : X β Z) = g β f := rfl
@[simp]
lemma hom_inv_id_apply {X Y : TopCat} (f : X β
Y) (x : X) : f.inv (f.hom x) = x :=
DFunLike.congr_fun f.hom_inv_id x
@[simp]
lemma inv_hom_id_apply {X Y : TopCat} (f : X β
Y) (y : Y) : f.hom (f.inv y) = y :=
DFunLike.congr_fun f.inv_hom_id y
def of (X : Type u) [TopologicalSpace X] : TopCat :=
-- Porting note: needed to call inferInstance
β¨X, inferInstanceβ©
set_option linter.uppercaseLean3 false in
#align Top.of TopCat.of
instance topologicalSpace_coe (X : TopCat) : TopologicalSpace X :=
X.str
-- Porting note: cannot see through forget; made reducible to get closer to Lean 3 behavior
@[instance] abbrev topologicalSpace_forget
(X : TopCat) : TopologicalSpace <| (forget TopCat).obj X :=
X.str
@[simp]
theorem coe_of (X : Type u) [TopologicalSpace X] : (of X : Type u) = X := rfl
set_option linter.uppercaseLean3 false in
#align Top.coe_of TopCat.coe_of
@[simp] theorem coe_of_of {X Y : Type u} [TopologicalSpace X] [TopologicalSpace Y]
{f : C(X, Y)} {x} :
@DFunLike.coe (TopCat.of X βΆ TopCat.of Y) ((CategoryTheory.forget TopCat).obj (TopCat.of X))
(fun _ β¦ (CategoryTheory.forget TopCat).obj (TopCat.of Y)) ConcreteCategory.instFunLike
f x =
@DFunLike.coe C(X, Y) X
(fun _ β¦ Y) _
f x :=
rfl
instance inhabited : Inhabited TopCat :=
β¨TopCat.of Emptyβ©
-- Porting note: added to ease the port of `AlgebraicTopology.TopologicalSimplex`
lemma hom_apply {X Y : TopCat} (f : X βΆ Y) (x : X) : f x = ContinuousMap.toFun f x := rfl
def discrete : Type u β₯€ TopCat.{u} where
obj X := β¨X , β₯β©
map f := @ContinuousMap.mk _ _ β₯ β₯ f continuous_bot
set_option linter.uppercaseLean3 false in
#align Top.discrete TopCat.discrete
instance {X : Type u} : DiscreteTopology (discrete.obj X) :=
β¨rflβ©
def trivial : Type u β₯€ TopCat.{u} where
obj X := β¨X, β€β©
map f := @ContinuousMap.mk _ _ β€ β€ f continuous_top
set_option linter.uppercaseLean3 false in
#align Top.trivial TopCat.trivial
@[simps]
def isoOfHomeo {X Y : TopCat.{u}} (f : X ββ Y) : X β
Y where
-- Porting note: previously β¨fβ© for hom (inv) and tidy closed proofs
hom := f.toContinuousMap
inv := f.symm.toContinuousMap
hom_inv_id := by ext; exact f.symm_apply_apply _
inv_hom_id := by ext; exact f.apply_symm_apply _
set_option linter.uppercaseLean3 false in
#align Top.iso_of_homeo TopCat.isoOfHomeo
@[simps]
def homeoOfIso {X Y : TopCat.{u}} (f : X β
Y) : X ββ Y where
toFun := f.hom
invFun := f.inv
left_inv x := by simp
right_inv x := by simp
continuous_toFun := f.hom.continuous
continuous_invFun := f.inv.continuous
set_option linter.uppercaseLean3 false in
#align Top.homeo_of_iso TopCat.homeoOfIso
@[simp]
| Mathlib/Topology/Category/TopCat/Basic.lean | 175 | 179 | theorem of_isoOfHomeo {X Y : TopCat.{u}} (f : X ββ Y) : homeoOfIso (isoOfHomeo f) = f := by |
-- Porting note: unfold some defs now
dsimp [homeoOfIso, isoOfHomeo]
ext
rfl
| 182 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
| Mathlib/Topology/MetricSpace/PiNat.lean | 74 | 77 | theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by |
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
| Mathlib/Topology/MetricSpace/PiNat.lean | 80 | 85 | theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by |
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
| Mathlib/Topology/MetricSpace/PiNat.lean | 88 | 89 | theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by |
simp only [firstDiff_def, ne_comm]
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
| Mathlib/Topology/MetricSpace/PiNat.lean | 92 | 99 | theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by |
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
| Mathlib/Topology/MetricSpace/PiNat.lean | 112 | 115 | theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by |
ext y
simp [cylinder]
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
| Mathlib/Topology/MetricSpace/PiNat.lean | 119 | 119 | theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by | simp [cylinder_eq_pi]
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
| Mathlib/Topology/MetricSpace/PiNat.lean | 131 | 131 | theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by | simp
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by simp
#align pi_nat.self_mem_cylinder PiNat.self_mem_cylinder
| Mathlib/Topology/MetricSpace/PiNat.lean | 134 | 147 | theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by |
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by simp
#align pi_nat.self_mem_cylinder PiNat.self_mem_cylinder
theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
#align pi_nat.mem_cylinder_iff_eq PiNat.mem_cylinder_iff_eq
| Mathlib/Topology/MetricSpace/PiNat.lean | 150 | 151 | theorem mem_cylinder_comm (x y : β n, E n) (n : β) : y β cylinder x n β x β cylinder y n := by |
simp [mem_cylinder_iff_eq, eq_comm]
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by simp
#align pi_nat.self_mem_cylinder PiNat.self_mem_cylinder
theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
#align pi_nat.mem_cylinder_iff_eq PiNat.mem_cylinder_iff_eq
theorem mem_cylinder_comm (x y : β n, E n) (n : β) : y β cylinder x n β x β cylinder y n := by
simp [mem_cylinder_iff_eq, eq_comm]
#align pi_nat.mem_cylinder_comm PiNat.mem_cylinder_comm
| Mathlib/Topology/MetricSpace/PiNat.lean | 154 | 161 | theorem mem_cylinder_iff_le_firstDiff {x y : β n, E n} (hne : x β y) (i : β) :
x β cylinder y i β i β€ firstDiff x y := by |
constructor
Β· intro h
by_contra!
exact apply_firstDiff_ne hne (h _ this)
Β· intro hi j hj
exact apply_eq_of_lt_firstDiff (hj.trans_le hi)
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by simp
#align pi_nat.self_mem_cylinder PiNat.self_mem_cylinder
theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
#align pi_nat.mem_cylinder_iff_eq PiNat.mem_cylinder_iff_eq
theorem mem_cylinder_comm (x y : β n, E n) (n : β) : y β cylinder x n β x β cylinder y n := by
simp [mem_cylinder_iff_eq, eq_comm]
#align pi_nat.mem_cylinder_comm PiNat.mem_cylinder_comm
theorem mem_cylinder_iff_le_firstDiff {x y : β n, E n} (hne : x β y) (i : β) :
x β cylinder y i β i β€ firstDiff x y := by
constructor
Β· intro h
by_contra!
exact apply_firstDiff_ne hne (h _ this)
Β· intro hi j hj
exact apply_eq_of_lt_firstDiff (hj.trans_le hi)
#align pi_nat.mem_cylinder_iff_le_first_diff PiNat.mem_cylinder_iff_le_firstDiff
theorem mem_cylinder_firstDiff (x y : β n, E n) : x β cylinder y (firstDiff x y) := fun _i hi =>
apply_eq_of_lt_firstDiff hi
#align pi_nat.mem_cylinder_first_diff PiNat.mem_cylinder_firstDiff
| Mathlib/Topology/MetricSpace/PiNat.lean | 168 | 172 | theorem cylinder_eq_cylinder_of_le_firstDiff (x y : β n, E n) {n : β} (hn : n β€ firstDiff x y) :
cylinder x n = cylinder y n := by |
rw [β mem_cylinder_iff_eq]
intro i hi
exact apply_eq_of_lt_firstDiff (hi.trans_le hn)
| 183 |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp] pow_le_pow_iff_right one_lt_two inv_le_inv zero_le_two zero_lt_two
variable {E : β β Type*}
namespace PiNat
irreducible_def firstDiff (x y : β n, E n) : β :=
if h : x β y then Nat.find (ne_iff.1 h) else 0
#align pi_nat.first_diff PiNat.firstDiff
theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
#align pi_nat.apply_first_diff_ne PiNat.apply_firstDiff_ne
theorem apply_eq_of_lt_firstDiff {x y : β n, E n} {n : β} (hn : n < firstDiff x y) : x n = y n := by
rw [firstDiff_def] at hn
split_ifs at hn with h
Β· convert Nat.find_min (ne_iff.1 h) hn
simp
Β· exact (not_lt_zero' hn).elim
#align pi_nat.apply_eq_of_lt_first_diff PiNat.apply_eq_of_lt_firstDiff
theorem firstDiff_comm (x y : β n, E n) : firstDiff x y = firstDiff y x := by
simp only [firstDiff_def, ne_comm]
#align pi_nat.first_diff_comm PiNat.firstDiff_comm
theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
#align pi_nat.min_first_diff_le PiNat.min_firstDiff_le
def cylinder (x : β n, E n) (n : β) : Set (β n, E n) :=
{ y | β i, i < n β y i = x i }
#align pi_nat.cylinder PiNat.cylinder
theorem cylinder_eq_pi (x : β n, E n) (n : β) :
cylinder x n = Set.pi (Finset.range n : Set β) fun i : β => {x i} := by
ext y
simp [cylinder]
#align pi_nat.cylinder_eq_pi PiNat.cylinder_eq_pi
@[simp]
theorem cylinder_zero (x : β n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
#align pi_nat.cylinder_zero PiNat.cylinder_zero
theorem cylinder_anti (x : β n, E n) {m n : β} (h : m β€ n) : cylinder x n β cylinder x m :=
fun _y hy i hi => hy i (hi.trans_le h)
#align pi_nat.cylinder_anti PiNat.cylinder_anti
@[simp]
theorem mem_cylinder_iff {x y : β n, E n} {n : β} : y β cylinder x n β β i < n, y i = x i :=
Iff.rfl
#align pi_nat.mem_cylinder_iff PiNat.mem_cylinder_iff
theorem self_mem_cylinder (x : β n, E n) (n : β) : x β cylinder x n := by simp
#align pi_nat.self_mem_cylinder PiNat.self_mem_cylinder
theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
#align pi_nat.mem_cylinder_iff_eq PiNat.mem_cylinder_iff_eq
theorem mem_cylinder_comm (x y : β n, E n) (n : β) : y β cylinder x n β x β cylinder y n := by
simp [mem_cylinder_iff_eq, eq_comm]
#align pi_nat.mem_cylinder_comm PiNat.mem_cylinder_comm
theorem mem_cylinder_iff_le_firstDiff {x y : β n, E n} (hne : x β y) (i : β) :
x β cylinder y i β i β€ firstDiff x y := by
constructor
Β· intro h
by_contra!
exact apply_firstDiff_ne hne (h _ this)
Β· intro hi j hj
exact apply_eq_of_lt_firstDiff (hj.trans_le hi)
#align pi_nat.mem_cylinder_iff_le_first_diff PiNat.mem_cylinder_iff_le_firstDiff
theorem mem_cylinder_firstDiff (x y : β n, E n) : x β cylinder y (firstDiff x y) := fun _i hi =>
apply_eq_of_lt_firstDiff hi
#align pi_nat.mem_cylinder_first_diff PiNat.mem_cylinder_firstDiff
theorem cylinder_eq_cylinder_of_le_firstDiff (x y : β n, E n) {n : β} (hn : n β€ firstDiff x y) :
cylinder x n = cylinder y n := by
rw [β mem_cylinder_iff_eq]
intro i hi
exact apply_eq_of_lt_firstDiff (hi.trans_le hn)
#align pi_nat.cylinder_eq_cylinder_of_le_first_diff PiNat.cylinder_eq_cylinder_of_le_firstDiff
| Mathlib/Topology/MetricSpace/PiNat.lean | 175 | 186 | theorem iUnion_cylinder_update (x : β n, E n) (n : β) :
β k, cylinder (update x n k) (n + 1) = cylinder x n := by |
ext y
simp only [mem_cylinder_iff, mem_iUnion]
constructor
Β· rintro β¨k, hkβ© i hi
simpa [hi.ne] using hk i (Nat.lt_succ_of_lt hi)
Β· intro H
refine β¨y n, fun i hi => ?_β©
rcases Nat.lt_succ_iff_lt_or_eq.1 hi with (h'i | rfl)
Β· simp [H i h'i, h'i.ne]
Β· simp
| 183 |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open MeasureTheory NNReal ENNReal Topology
namespace MeasureTheory
open Set Filter TopologicalSpace
variable {Ξ± Ξ² ΞΉ : Type*} {m : MeasurableSpace Ξ±} [MetricSpace Ξ²] {ΞΌ : Measure Ξ±}
namespace Egorov
def notConvergentSeq [Preorder ΞΉ] (f : ΞΉ β Ξ± β Ξ²) (g : Ξ± β Ξ²) (n : β) (j : ΞΉ) : Set Ξ± :=
β (k) (_ : j β€ k), { x | 1 / (n + 1 : β) < dist (f k x) (g x) }
#align measure_theory.egorov.not_convergent_seq MeasureTheory.Egorov.notConvergentSeq
variable {n : β} {i j : ΞΉ} {s : Set Ξ±} {Ξ΅ : β} {f : ΞΉ β Ξ± β Ξ²} {g : Ξ± β Ξ²}
| Mathlib/MeasureTheory/Function/Egorov.lean | 50 | 52 | theorem mem_notConvergentSeq_iff [Preorder ΞΉ] {x : Ξ±} :
x β notConvergentSeq f g n j β β k β₯ j, 1 / (n + 1 : β) < dist (f k x) (g x) := by |
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop, mem_setOf]
| 184 |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open MeasureTheory NNReal ENNReal Topology
namespace MeasureTheory
open Set Filter TopologicalSpace
variable {Ξ± Ξ² ΞΉ : Type*} {m : MeasurableSpace Ξ±} [MetricSpace Ξ²] {ΞΌ : Measure Ξ±}
namespace Egorov
def notConvergentSeq [Preorder ΞΉ] (f : ΞΉ β Ξ± β Ξ²) (g : Ξ± β Ξ²) (n : β) (j : ΞΉ) : Set Ξ± :=
β (k) (_ : j β€ k), { x | 1 / (n + 1 : β) < dist (f k x) (g x) }
#align measure_theory.egorov.not_convergent_seq MeasureTheory.Egorov.notConvergentSeq
variable {n : β} {i j : ΞΉ} {s : Set Ξ±} {Ξ΅ : β} {f : ΞΉ β Ξ± β Ξ²} {g : Ξ± β Ξ²}
theorem mem_notConvergentSeq_iff [Preorder ΞΉ] {x : Ξ±} :
x β notConvergentSeq f g n j β β k β₯ j, 1 / (n + 1 : β) < dist (f k x) (g x) := by
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop, mem_setOf]
#align measure_theory.egorov.mem_not_convergent_seq_iff MeasureTheory.Egorov.mem_notConvergentSeq_iff
theorem notConvergentSeq_antitone [Preorder ΞΉ] : Antitone (notConvergentSeq f g n) :=
fun _ _ hjk => Set.iUnionβ_mono' fun l hl => β¨l, le_trans hjk hl, Set.Subset.rflβ©
#align measure_theory.egorov.not_convergent_seq_antitone MeasureTheory.Egorov.notConvergentSeq_antitone
| Mathlib/MeasureTheory/Function/Egorov.lean | 59 | 70 | theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ΞΉ] [Nonempty ΞΉ]
(hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
ΞΌ (s β© β j, notConvergentSeq f g n j) = 0 := by |
simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
rw [β nonpos_iff_eq_zero, β hfg]
refine measure_mono fun x => ?_
simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
push_neg
rintro β¨hmem, hxβ©
refine β¨hmem, 1 / (n + 1 : β), Nat.one_div_pos_of_nat, fun N => ?_β©
obtain β¨n, hnβ, hnββ© := hx N
exact β¨n, hnβ, hnβ.leβ©
| 184 |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open MeasureTheory NNReal ENNReal Topology
namespace MeasureTheory
open Set Filter TopologicalSpace
variable {Ξ± Ξ² ΞΉ : Type*} {m : MeasurableSpace Ξ±} [MetricSpace Ξ²] {ΞΌ : Measure Ξ±}
namespace Egorov
def notConvergentSeq [Preorder ΞΉ] (f : ΞΉ β Ξ± β Ξ²) (g : Ξ± β Ξ²) (n : β) (j : ΞΉ) : Set Ξ± :=
β (k) (_ : j β€ k), { x | 1 / (n + 1 : β) < dist (f k x) (g x) }
#align measure_theory.egorov.not_convergent_seq MeasureTheory.Egorov.notConvergentSeq
variable {n : β} {i j : ΞΉ} {s : Set Ξ±} {Ξ΅ : β} {f : ΞΉ β Ξ± β Ξ²} {g : Ξ± β Ξ²}
theorem mem_notConvergentSeq_iff [Preorder ΞΉ] {x : Ξ±} :
x β notConvergentSeq f g n j β β k β₯ j, 1 / (n + 1 : β) < dist (f k x) (g x) := by
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop, mem_setOf]
#align measure_theory.egorov.mem_not_convergent_seq_iff MeasureTheory.Egorov.mem_notConvergentSeq_iff
theorem notConvergentSeq_antitone [Preorder ΞΉ] : Antitone (notConvergentSeq f g n) :=
fun _ _ hjk => Set.iUnionβ_mono' fun l hl => β¨l, le_trans hjk hl, Set.Subset.rflβ©
#align measure_theory.egorov.not_convergent_seq_antitone MeasureTheory.Egorov.notConvergentSeq_antitone
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ΞΉ] [Nonempty ΞΉ]
(hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
ΞΌ (s β© β j, notConvergentSeq f g n j) = 0 := by
simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
rw [β nonpos_iff_eq_zero, β hfg]
refine measure_mono fun x => ?_
simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
push_neg
rintro β¨hmem, hxβ©
refine β¨hmem, 1 / (n + 1 : β), Nat.one_div_pos_of_nat, fun N => ?_β©
obtain β¨n, hnβ, hnββ© := hx N
exact β¨n, hnβ, hnβ.leβ©
#align measure_theory.egorov.measure_inter_not_convergent_seq_eq_zero MeasureTheory.Egorov.measure_inter_notConvergentSeq_eq_zero
theorem notConvergentSeq_measurableSet [Preorder ΞΉ] [Countable ΞΉ]
(hf : β n, StronglyMeasurable[m] (f n)) (hg : StronglyMeasurable g) :
MeasurableSet (notConvergentSeq f g n j) :=
MeasurableSet.iUnion fun k =>
MeasurableSet.iUnion fun _ =>
StronglyMeasurable.measurableSet_lt stronglyMeasurable_const <| (hf k).dist hg
#align measure_theory.egorov.not_convergent_seq_measurable_set MeasureTheory.Egorov.notConvergentSeq_measurableSet
| Mathlib/MeasureTheory/Function/Egorov.lean | 81 | 93 | theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ΞΉ] [Countable ΞΉ]
(hf : β n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
(hs : ΞΌ s β β) (hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
Tendsto (fun j => ΞΌ (s β© notConvergentSeq f g n j)) atTop (π 0) := by |
cases' isEmpty_or_nonempty ΞΉ with h h
Β· have : (fun j => ΞΌ (s β© notConvergentSeq f g n j)) = fun j => 0 := by
simp only [eq_iff_true_of_subsingleton]
rw [this]
exact tendsto_const_nhds
rw [β measure_inter_notConvergentSeq_eq_zero hfg n, Set.inter_iInter]
refine tendsto_measure_iInter (fun n => hsm.inter <| notConvergentSeq_measurableSet hf hg)
(fun k l hkl => Set.inter_subset_inter_right _ <| notConvergentSeq_antitone hkl)
β¨h.some, ne_top_of_le_ne_top hs (measure_mono Set.inter_subset_left)β©
| 184 |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open MeasureTheory NNReal ENNReal Topology
namespace MeasureTheory
open Set Filter TopologicalSpace
variable {Ξ± Ξ² ΞΉ : Type*} {m : MeasurableSpace Ξ±} [MetricSpace Ξ²] {ΞΌ : Measure Ξ±}
namespace Egorov
def notConvergentSeq [Preorder ΞΉ] (f : ΞΉ β Ξ± β Ξ²) (g : Ξ± β Ξ²) (n : β) (j : ΞΉ) : Set Ξ± :=
β (k) (_ : j β€ k), { x | 1 / (n + 1 : β) < dist (f k x) (g x) }
#align measure_theory.egorov.not_convergent_seq MeasureTheory.Egorov.notConvergentSeq
variable {n : β} {i j : ΞΉ} {s : Set Ξ±} {Ξ΅ : β} {f : ΞΉ β Ξ± β Ξ²} {g : Ξ± β Ξ²}
theorem mem_notConvergentSeq_iff [Preorder ΞΉ] {x : Ξ±} :
x β notConvergentSeq f g n j β β k β₯ j, 1 / (n + 1 : β) < dist (f k x) (g x) := by
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop, mem_setOf]
#align measure_theory.egorov.mem_not_convergent_seq_iff MeasureTheory.Egorov.mem_notConvergentSeq_iff
theorem notConvergentSeq_antitone [Preorder ΞΉ] : Antitone (notConvergentSeq f g n) :=
fun _ _ hjk => Set.iUnionβ_mono' fun l hl => β¨l, le_trans hjk hl, Set.Subset.rflβ©
#align measure_theory.egorov.not_convergent_seq_antitone MeasureTheory.Egorov.notConvergentSeq_antitone
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ΞΉ] [Nonempty ΞΉ]
(hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
ΞΌ (s β© β j, notConvergentSeq f g n j) = 0 := by
simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
rw [β nonpos_iff_eq_zero, β hfg]
refine measure_mono fun x => ?_
simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
push_neg
rintro β¨hmem, hxβ©
refine β¨hmem, 1 / (n + 1 : β), Nat.one_div_pos_of_nat, fun N => ?_β©
obtain β¨n, hnβ, hnββ© := hx N
exact β¨n, hnβ, hnβ.leβ©
#align measure_theory.egorov.measure_inter_not_convergent_seq_eq_zero MeasureTheory.Egorov.measure_inter_notConvergentSeq_eq_zero
theorem notConvergentSeq_measurableSet [Preorder ΞΉ] [Countable ΞΉ]
(hf : β n, StronglyMeasurable[m] (f n)) (hg : StronglyMeasurable g) :
MeasurableSet (notConvergentSeq f g n j) :=
MeasurableSet.iUnion fun k =>
MeasurableSet.iUnion fun _ =>
StronglyMeasurable.measurableSet_lt stronglyMeasurable_const <| (hf k).dist hg
#align measure_theory.egorov.not_convergent_seq_measurable_set MeasureTheory.Egorov.notConvergentSeq_measurableSet
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ΞΉ] [Countable ΞΉ]
(hf : β n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
(hs : ΞΌ s β β) (hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
Tendsto (fun j => ΞΌ (s β© notConvergentSeq f g n j)) atTop (π 0) := by
cases' isEmpty_or_nonempty ΞΉ with h h
Β· have : (fun j => ΞΌ (s β© notConvergentSeq f g n j)) = fun j => 0 := by
simp only [eq_iff_true_of_subsingleton]
rw [this]
exact tendsto_const_nhds
rw [β measure_inter_notConvergentSeq_eq_zero hfg n, Set.inter_iInter]
refine tendsto_measure_iInter (fun n => hsm.inter <| notConvergentSeq_measurableSet hf hg)
(fun k l hkl => Set.inter_subset_inter_right _ <| notConvergentSeq_antitone hkl)
β¨h.some, ne_top_of_le_ne_top hs (measure_mono Set.inter_subset_left)β©
#align measure_theory.egorov.measure_not_convergent_seq_tendsto_zero MeasureTheory.Egorov.measure_notConvergentSeq_tendsto_zero
variable [SemilatticeSup ΞΉ] [Nonempty ΞΉ] [Countable ΞΉ]
| Mathlib/MeasureTheory/Function/Egorov.lean | 98 | 107 | theorem exists_notConvergentSeq_lt (hΞ΅ : 0 < Ξ΅) (hf : β n, StronglyMeasurable (f n))
(hg : StronglyMeasurable g) (hsm : MeasurableSet s) (hs : ΞΌ s β β)
(hfg : βα΅ x βΞΌ, x β s β Tendsto (fun n => f n x) atTop (π (g x))) (n : β) :
β j : ΞΉ, ΞΌ (s β© notConvergentSeq f g n j) β€ ENNReal.ofReal (Ξ΅ * 2β»ΒΉ ^ n) := by |
have β¨N, hNβ© := (ENNReal.tendsto_atTop ENNReal.zero_ne_top).1
(measure_notConvergentSeq_tendsto_zero hf hg hsm hs hfg n) (ENNReal.ofReal (Ξ΅ * 2β»ΒΉ ^ n)) (by
rw [gt_iff_lt, ENNReal.ofReal_pos]
exact mul_pos hΞ΅ (pow_pos (by norm_num) n))
rw [zero_add] at hN
exact β¨N, (hN N le_rfl).2β©
| 184 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
| Mathlib/Computability/Ackermann.lean | 70 | 70 | theorem ack_zero (n : β) : ack 0 n = n + 1 := by | rw [ack]
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
| Mathlib/Computability/Ackermann.lean | 74 | 74 | theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by | rw [ack]
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by rw [ack]
#align ack_succ_zero ack_succ_zero
@[simp]
| Mathlib/Computability/Ackermann.lean | 78 | 78 | theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by | rw [ack]
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by rw [ack]
#align ack_succ_zero ack_succ_zero
@[simp]
theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by rw [ack]
#align ack_succ_succ ack_succ_succ
@[simp]
| Mathlib/Computability/Ackermann.lean | 82 | 85 | theorem ack_one (n : β) : ack 1 n = n + 2 := by |
induction' n with n IH
Β· rfl
Β· simp [IH]
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by rw [ack]
#align ack_succ_zero ack_succ_zero
@[simp]
theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by rw [ack]
#align ack_succ_succ ack_succ_succ
@[simp]
theorem ack_one (n : β) : ack 1 n = n + 2 := by
induction' n with n IH
Β· rfl
Β· simp [IH]
#align ack_one ack_one
@[simp]
| Mathlib/Computability/Ackermann.lean | 89 | 92 | theorem ack_two (n : β) : ack 2 n = 2 * n + 3 := by |
induction' n with n IH
Β· rfl
Β· simpa [mul_succ]
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by rw [ack]
#align ack_succ_zero ack_succ_zero
@[simp]
theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by rw [ack]
#align ack_succ_succ ack_succ_succ
@[simp]
theorem ack_one (n : β) : ack 1 n = n + 2 := by
induction' n with n IH
Β· rfl
Β· simp [IH]
#align ack_one ack_one
@[simp]
theorem ack_two (n : β) : ack 2 n = 2 * n + 3 := by
induction' n with n IH
Β· rfl
Β· simpa [mul_succ]
#align ack_two ack_two
-- Porting note: re-written to get rid of ack_three_aux
@[simp]
| Mathlib/Computability/Ackermann.lean | 97 | 105 | theorem ack_three (n : β) : ack 3 n = 2 ^ (n + 3) - 3 := by |
induction' n with n IH
Β· rfl
Β· rw [ack_succ_succ, IH, ack_two, Nat.succ_add, Nat.pow_succ 2 (n + 3), mul_comm _ 2,
Nat.mul_sub_left_distrib, β Nat.sub_add_comm, two_mul 3, Nat.add_sub_add_right]
have H : 2 * 3 β€ 2 * 2 ^ 3 := by norm_num
apply H.trans
rw [_root_.mul_le_mul_left two_pos]
exact pow_le_pow_right one_le_two (Nat.le_add_left 3 n)
| 185 |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 => ack m 1
| m + 1, n + 1 => ack m (ack (m + 1) n)
#align ack ack
@[simp]
theorem ack_zero (n : β) : ack 0 n = n + 1 := by rw [ack]
#align ack_zero ack_zero
@[simp]
theorem ack_succ_zero (m : β) : ack (m + 1) 0 = ack m 1 := by rw [ack]
#align ack_succ_zero ack_succ_zero
@[simp]
theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by rw [ack]
#align ack_succ_succ ack_succ_succ
@[simp]
theorem ack_one (n : β) : ack 1 n = n + 2 := by
induction' n with n IH
Β· rfl
Β· simp [IH]
#align ack_one ack_one
@[simp]
theorem ack_two (n : β) : ack 2 n = 2 * n + 3 := by
induction' n with n IH
Β· rfl
Β· simpa [mul_succ]
#align ack_two ack_two
-- Porting note: re-written to get rid of ack_three_aux
@[simp]
theorem ack_three (n : β) : ack 3 n = 2 ^ (n + 3) - 3 := by
induction' n with n IH
Β· rfl
Β· rw [ack_succ_succ, IH, ack_two, Nat.succ_add, Nat.pow_succ 2 (n + 3), mul_comm _ 2,
Nat.mul_sub_left_distrib, β Nat.sub_add_comm, two_mul 3, Nat.add_sub_add_right]
have H : 2 * 3 β€ 2 * 2 ^ 3 := by norm_num
apply H.trans
rw [_root_.mul_le_mul_left two_pos]
exact pow_le_pow_right one_le_two (Nat.le_add_left 3 n)
#align ack_three ack_three
theorem ack_pos : β m n, 0 < ack m n
| 0, n => by simp
| m + 1, 0 => by
rw [ack_succ_zero]
apply ack_pos
| m + 1, n + 1 => by
rw [ack_succ_succ]
apply ack_pos
#align ack_pos ack_pos
theorem one_lt_ack_succ_left : β m n, 1 < ack (m + 1) n
| 0, n => by simp
| m + 1, 0 => by
rw [ack_succ_zero]
apply one_lt_ack_succ_left
| m + 1, n + 1 => by
rw [ack_succ_succ]
apply one_lt_ack_succ_left
#align one_lt_ack_succ_left one_lt_ack_succ_left
theorem one_lt_ack_succ_right : β m n, 1 < ack m (n + 1)
| 0, n => by simp
| m + 1, n => by
rw [ack_succ_succ]
cases' exists_eq_succ_of_ne_zero (ack_pos (m + 1) n).ne' with h h
rw [h]
apply one_lt_ack_succ_right
#align one_lt_ack_succ_right one_lt_ack_succ_right
theorem ack_strictMono_right : β m, StrictMono (ack m)
| 0, nβ, nβ, h => by simpa using h
| m + 1, 0, n + 1, _h => by
rw [ack_succ_zero, ack_succ_succ]
exact ack_strictMono_right _ (one_lt_ack_succ_left m n)
| m + 1, nβ + 1, nβ + 1, h => by
rw [ack_succ_succ, ack_succ_succ]
apply ack_strictMono_right _ (ack_strictMono_right _ _)
rwa [add_lt_add_iff_right] at h
#align ack_strict_mono_right ack_strictMono_right
theorem ack_mono_right (m : β) : Monotone (ack m) :=
(ack_strictMono_right m).monotone
#align ack_mono_right ack_mono_right
theorem ack_injective_right (m : β) : Function.Injective (ack m) :=
(ack_strictMono_right m).injective
#align ack_injective_right ack_injective_right
@[simp]
theorem ack_lt_iff_right {m nβ nβ : β} : ack m nβ < ack m nβ β nβ < nβ :=
(ack_strictMono_right m).lt_iff_lt
#align ack_lt_iff_right ack_lt_iff_right
@[simp]
theorem ack_le_iff_right {m nβ nβ : β} : ack m nβ β€ ack m nβ β nβ β€ nβ :=
(ack_strictMono_right m).le_iff_le
#align ack_le_iff_right ack_le_iff_right
@[simp]
theorem ack_inj_right {m nβ nβ : β} : ack m nβ = ack m nβ β nβ = nβ :=
(ack_injective_right m).eq_iff
#align ack_inj_right ack_inj_right
theorem max_ack_right (m nβ nβ : β) : ack m (max nβ nβ) = max (ack m nβ) (ack m nβ) :=
(ack_mono_right m).map_max
#align max_ack_right max_ack_right
| Mathlib/Computability/Ackermann.lean | 175 | 185 | theorem add_lt_ack : β m n, m + n < ack m n
| 0, n => by simp
| m + 1, 0 => by simpa using add_lt_ack m 1
| m + 1, n + 1 =>
calc
m + 1 + n + 1 β€ m + (m + n + 2) := by | omega
_ < ack m (m + n + 2) := add_lt_ack _ _
_ β€ ack m (ack (m + 1) n) :=
ack_mono_right m <| le_of_eq_of_le (by rw [succ_eq_add_one]; ring_nf)
<| succ_le_of_lt <| add_lt_ack (m + 1) n
_ = ack (m + 1) (n + 1) := (ack_succ_succ m n).symm
| 185 |
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
import Mathlib.GroupTheory.EckmannHilton
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.preadditive.of_biproducts from "leanprover-community/mathlib"@"061ea99a5610cfc72c286aa930d3c1f47f74f3d0"
noncomputable section
universe v u
open CategoryTheory
open CategoryTheory.Limits
namespace CategoryTheory.SemiadditiveOfBinaryBiproducts
variable {C : Type u} [Category.{v} C] [HasZeroMorphisms C] [HasBinaryBiproducts C]
section
variable (X Y : C)
@[simp]
def leftAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift f g β« biprod.desc (π Y) (π Y)
#align category_theory.semiadditive_of_binary_biproducts.left_add CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd
@[simp]
def rightAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift (π X) (π X) β« biprod.desc f g
#align category_theory.semiadditive_of_binary_biproducts.right_add CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd
local infixr:65 " +β " => leftAdd X Y
local infixr:65 " +α΅£ " => rightAdd X Y
| Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean | 54 | 68 | theorem isUnital_leftAdd : EckmannHilton.IsUnital (Β· +β Β·) 0 := by |
have hr : β f : X βΆ Y, biprod.lift (0 : X βΆ Y) f = f β« biprod.inr := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_fst, Category.assoc, biprod.inr_fst, comp_zero]
have hl : β f : X βΆ Y, biprod.lift f (0 : X βΆ Y) = f β« biprod.inl := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_snd, Category.assoc, biprod.inl_snd, comp_zero]
exact {
left_id := fun f => by simp [hr f, leftAdd, Category.assoc, Category.comp_id, biprod.inr_desc],
right_id := fun f => by simp [hl f, leftAdd, Category.assoc, Category.comp_id, biprod.inl_desc]
}
| 186 |
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
import Mathlib.GroupTheory.EckmannHilton
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.preadditive.of_biproducts from "leanprover-community/mathlib"@"061ea99a5610cfc72c286aa930d3c1f47f74f3d0"
noncomputable section
universe v u
open CategoryTheory
open CategoryTheory.Limits
namespace CategoryTheory.SemiadditiveOfBinaryBiproducts
variable {C : Type u} [Category.{v} C] [HasZeroMorphisms C] [HasBinaryBiproducts C]
section
variable (X Y : C)
@[simp]
def leftAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift f g β« biprod.desc (π Y) (π Y)
#align category_theory.semiadditive_of_binary_biproducts.left_add CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd
@[simp]
def rightAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift (π X) (π X) β« biprod.desc f g
#align category_theory.semiadditive_of_binary_biproducts.right_add CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd
local infixr:65 " +β " => leftAdd X Y
local infixr:65 " +α΅£ " => rightAdd X Y
theorem isUnital_leftAdd : EckmannHilton.IsUnital (Β· +β Β·) 0 := by
have hr : β f : X βΆ Y, biprod.lift (0 : X βΆ Y) f = f β« biprod.inr := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_fst, Category.assoc, biprod.inr_fst, comp_zero]
have hl : β f : X βΆ Y, biprod.lift f (0 : X βΆ Y) = f β« biprod.inl := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_snd, Category.assoc, biprod.inl_snd, comp_zero]
exact {
left_id := fun f => by simp [hr f, leftAdd, Category.assoc, Category.comp_id, biprod.inr_desc],
right_id := fun f => by simp [hl f, leftAdd, Category.assoc, Category.comp_id, biprod.inl_desc]
}
#align category_theory.semiadditive_of_binary_biproducts.is_unital_left_add CategoryTheory.SemiadditiveOfBinaryBiproducts.isUnital_leftAdd
| Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean | 71 | 85 | theorem isUnital_rightAdd : EckmannHilton.IsUnital (Β· +α΅£ Β·) 0 := by |
have hβ : β f : X βΆ Y, biprod.desc (0 : X βΆ Y) f = biprod.snd β« f := by
intro f
ext
Β· aesop_cat
Β· simp only [biprod.inr_desc, BinaryBicone.inr_snd_assoc]
have hβ : β f : X βΆ Y, biprod.desc f (0 : X βΆ Y) = biprod.fst β« f := by
intro f
ext
Β· aesop_cat
Β· simp only [biprod.inr_desc, BinaryBicone.inr_fst_assoc, zero_comp]
exact {
left_id := fun f => by simp [hβ f, rightAdd, biprod.lift_snd_assoc, Category.id_comp],
right_id := fun f => by simp [hβ f, rightAdd, biprod.lift_fst_assoc, Category.id_comp]
}
| 186 |
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
import Mathlib.GroupTheory.EckmannHilton
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.preadditive.of_biproducts from "leanprover-community/mathlib"@"061ea99a5610cfc72c286aa930d3c1f47f74f3d0"
noncomputable section
universe v u
open CategoryTheory
open CategoryTheory.Limits
namespace CategoryTheory.SemiadditiveOfBinaryBiproducts
variable {C : Type u} [Category.{v} C] [HasZeroMorphisms C] [HasBinaryBiproducts C]
section
variable (X Y : C)
@[simp]
def leftAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift f g β« biprod.desc (π Y) (π Y)
#align category_theory.semiadditive_of_binary_biproducts.left_add CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd
@[simp]
def rightAdd (f g : X βΆ Y) : X βΆ Y :=
biprod.lift (π X) (π X) β« biprod.desc f g
#align category_theory.semiadditive_of_binary_biproducts.right_add CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd
local infixr:65 " +β " => leftAdd X Y
local infixr:65 " +α΅£ " => rightAdd X Y
theorem isUnital_leftAdd : EckmannHilton.IsUnital (Β· +β Β·) 0 := by
have hr : β f : X βΆ Y, biprod.lift (0 : X βΆ Y) f = f β« biprod.inr := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_fst, Category.assoc, biprod.inr_fst, comp_zero]
have hl : β f : X βΆ Y, biprod.lift f (0 : X βΆ Y) = f β« biprod.inl := by
intro f
ext
Β· aesop_cat
Β· simp [biprod.lift_snd, Category.assoc, biprod.inl_snd, comp_zero]
exact {
left_id := fun f => by simp [hr f, leftAdd, Category.assoc, Category.comp_id, biprod.inr_desc],
right_id := fun f => by simp [hl f, leftAdd, Category.assoc, Category.comp_id, biprod.inl_desc]
}
#align category_theory.semiadditive_of_binary_biproducts.is_unital_left_add CategoryTheory.SemiadditiveOfBinaryBiproducts.isUnital_leftAdd
theorem isUnital_rightAdd : EckmannHilton.IsUnital (Β· +α΅£ Β·) 0 := by
have hβ : β f : X βΆ Y, biprod.desc (0 : X βΆ Y) f = biprod.snd β« f := by
intro f
ext
Β· aesop_cat
Β· simp only [biprod.inr_desc, BinaryBicone.inr_snd_assoc]
have hβ : β f : X βΆ Y, biprod.desc f (0 : X βΆ Y) = biprod.fst β« f := by
intro f
ext
Β· aesop_cat
Β· simp only [biprod.inr_desc, BinaryBicone.inr_fst_assoc, zero_comp]
exact {
left_id := fun f => by simp [hβ f, rightAdd, biprod.lift_snd_assoc, Category.id_comp],
right_id := fun f => by simp [hβ f, rightAdd, biprod.lift_fst_assoc, Category.id_comp]
}
#align category_theory.semiadditive_of_binary_biproducts.is_unital_right_add CategoryTheory.SemiadditiveOfBinaryBiproducts.isUnital_rightAdd
| Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean | 88 | 96 | theorem distrib (f g h k : X βΆ Y) : (f +α΅£ g) +β h +α΅£ k = (f +β h) +α΅£ g +β k := by |
let diag : X β X βΆ Y β Y := biprod.lift (biprod.desc f g) (biprod.desc h k)
have hdβ : biprod.inl β« diag = biprod.lift f h := by ext <;> simp [diag]
have hdβ : biprod.inr β« diag = biprod.lift g k := by ext <;> simp [diag]
have hβ : biprod.lift (f +α΅£ g) (h +α΅£ k) = biprod.lift (π X) (π X) β« diag := by
ext <;> aesop_cat
have hβ : diag β« biprod.desc (π Y) (π Y) = biprod.desc (f +β h) (g +β k) := by
ext <;> simp [reassoc_of% hdβ, reassoc_of% hdβ]
rw [leftAdd, hβ, Category.assoc, hβ, rightAdd]
| 186 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 112 | 112 | theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by | simp [intrinsicInterior]
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 116 | 116 | theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by | simp [intrinsicFrontier]
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by simp [intrinsicFrontier]
#align intrinsic_frontier_empty intrinsicFrontier_empty
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 120 | 120 | theorem intrinsicClosure_empty : intrinsicClosure π (β
: Set P) = β
:= by | simp [intrinsicClosure]
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by simp [intrinsicFrontier]
#align intrinsic_frontier_empty intrinsicFrontier_empty
@[simp]
theorem intrinsicClosure_empty : intrinsicClosure π (β
: Set P) = β
:= by simp [intrinsicClosure]
#align intrinsic_closure_empty intrinsicClosure_empty
@[simp]
theorem intrinsicClosure_nonempty : (intrinsicClosure π s).Nonempty β s.Nonempty :=
β¨by simp_rw [nonempty_iff_ne_empty]; rintro h rfl; exact h intrinsicClosure_empty,
Nonempty.mono subset_intrinsicClosureβ©
#align intrinsic_closure_nonempty intrinsicClosure_nonempty
alias β¨Set.Nonempty.ofIntrinsicClosure, Set.Nonempty.intrinsicClosureβ© := intrinsicClosure_nonempty
#align set.nonempty.of_intrinsic_closure Set.Nonempty.ofIntrinsicClosure
#align set.nonempty.intrinsic_closure Set.Nonempty.intrinsicClosure
--attribute [protected] Set.Nonempty.intrinsicClosure -- Porting note: removed
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 136 | 138 | theorem intrinsicInterior_singleton (x : P) : intrinsicInterior π ({x} : Set P) = {x} := by |
simpa only [intrinsicInterior, preimage_coe_affineSpan_singleton, interior_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by simp [intrinsicFrontier]
#align intrinsic_frontier_empty intrinsicFrontier_empty
@[simp]
theorem intrinsicClosure_empty : intrinsicClosure π (β
: Set P) = β
:= by simp [intrinsicClosure]
#align intrinsic_closure_empty intrinsicClosure_empty
@[simp]
theorem intrinsicClosure_nonempty : (intrinsicClosure π s).Nonempty β s.Nonempty :=
β¨by simp_rw [nonempty_iff_ne_empty]; rintro h rfl; exact h intrinsicClosure_empty,
Nonempty.mono subset_intrinsicClosureβ©
#align intrinsic_closure_nonempty intrinsicClosure_nonempty
alias β¨Set.Nonempty.ofIntrinsicClosure, Set.Nonempty.intrinsicClosureβ© := intrinsicClosure_nonempty
#align set.nonempty.of_intrinsic_closure Set.Nonempty.ofIntrinsicClosure
#align set.nonempty.intrinsic_closure Set.Nonempty.intrinsicClosure
--attribute [protected] Set.Nonempty.intrinsicClosure -- Porting note: removed
@[simp]
theorem intrinsicInterior_singleton (x : P) : intrinsicInterior π ({x} : Set P) = {x} := by
simpa only [intrinsicInterior, preimage_coe_affineSpan_singleton, interior_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
#align intrinsic_interior_singleton intrinsicInterior_singleton
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 142 | 143 | theorem intrinsicFrontier_singleton (x : P) : intrinsicFrontier π ({x} : Set P) = β
:= by |
rw [intrinsicFrontier, preimage_coe_affineSpan_singleton, frontier_univ, image_empty]
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by simp [intrinsicFrontier]
#align intrinsic_frontier_empty intrinsicFrontier_empty
@[simp]
theorem intrinsicClosure_empty : intrinsicClosure π (β
: Set P) = β
:= by simp [intrinsicClosure]
#align intrinsic_closure_empty intrinsicClosure_empty
@[simp]
theorem intrinsicClosure_nonempty : (intrinsicClosure π s).Nonempty β s.Nonempty :=
β¨by simp_rw [nonempty_iff_ne_empty]; rintro h rfl; exact h intrinsicClosure_empty,
Nonempty.mono subset_intrinsicClosureβ©
#align intrinsic_closure_nonempty intrinsicClosure_nonempty
alias β¨Set.Nonempty.ofIntrinsicClosure, Set.Nonempty.intrinsicClosureβ© := intrinsicClosure_nonempty
#align set.nonempty.of_intrinsic_closure Set.Nonempty.ofIntrinsicClosure
#align set.nonempty.intrinsic_closure Set.Nonempty.intrinsicClosure
--attribute [protected] Set.Nonempty.intrinsicClosure -- Porting note: removed
@[simp]
theorem intrinsicInterior_singleton (x : P) : intrinsicInterior π ({x} : Set P) = {x} := by
simpa only [intrinsicInterior, preimage_coe_affineSpan_singleton, interior_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
#align intrinsic_interior_singleton intrinsicInterior_singleton
@[simp]
theorem intrinsicFrontier_singleton (x : P) : intrinsicFrontier π ({x} : Set P) = β
:= by
rw [intrinsicFrontier, preimage_coe_affineSpan_singleton, frontier_univ, image_empty]
#align intrinsic_frontier_singleton intrinsicFrontier_singleton
@[simp]
| Mathlib/Analysis/Convex/Intrinsic.lean | 147 | 149 | theorem intrinsicClosure_singleton (x : P) : intrinsicClosure π ({x} : Set P) = {x} := by |
simpa only [intrinsicClosure, preimage_coe_affineSpan_singleton, closure_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
| 187 |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Module π V] [TopologicalSpace P] [AddTorsor V P]
{s t : Set P} {x : P}
def intrinsicInterior (s : Set P) : Set P :=
(β) '' interior ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_interior intrinsicInterior
def intrinsicFrontier (s : Set P) : Set P :=
(β) '' frontier ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_frontier intrinsicFrontier
def intrinsicClosure (s : Set P) : Set P :=
(β) '' closure ((β) β»ΒΉ' s : Set <| affineSpan π s)
#align intrinsic_closure intrinsicClosure
variable {π}
@[simp]
theorem mem_intrinsicInterior :
x β intrinsicInterior π s β β y, y β interior ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_interior mem_intrinsicInterior
@[simp]
theorem mem_intrinsicFrontier :
x β intrinsicFrontier π s β β y, y β frontier ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_frontier mem_intrinsicFrontier
@[simp]
theorem mem_intrinsicClosure :
x β intrinsicClosure π s β β y, y β closure ((β) β»ΒΉ' s : Set <| affineSpan π s) β§ βy = x :=
mem_image _ _ _
#align mem_intrinsic_closure mem_intrinsicClosure
theorem intrinsicInterior_subset : intrinsicInterior π s β s :=
image_subset_iff.2 interior_subset
#align intrinsic_interior_subset intrinsicInterior_subset
theorem intrinsicFrontier_subset (hs : IsClosed s) : intrinsicFrontier π s β s :=
image_subset_iff.2 (hs.preimage continuous_induced_dom).frontier_subset
#align intrinsic_frontier_subset intrinsicFrontier_subset
theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier π s β intrinsicClosure π s :=
image_subset _ frontier_subset_closure
#align intrinsic_frontier_subset_intrinsic_closure intrinsicFrontier_subset_intrinsicClosure
theorem subset_intrinsicClosure : s β intrinsicClosure π s :=
fun x hx => β¨β¨x, subset_affineSpan _ _ hxβ©, subset_closure hx, rflβ©
#align subset_intrinsic_closure subset_intrinsicClosure
@[simp]
theorem intrinsicInterior_empty : intrinsicInterior π (β
: Set P) = β
:= by simp [intrinsicInterior]
#align intrinsic_interior_empty intrinsicInterior_empty
@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier π (β
: Set P) = β
:= by simp [intrinsicFrontier]
#align intrinsic_frontier_empty intrinsicFrontier_empty
@[simp]
theorem intrinsicClosure_empty : intrinsicClosure π (β
: Set P) = β
:= by simp [intrinsicClosure]
#align intrinsic_closure_empty intrinsicClosure_empty
@[simp]
theorem intrinsicClosure_nonempty : (intrinsicClosure π s).Nonempty β s.Nonempty :=
β¨by simp_rw [nonempty_iff_ne_empty]; rintro h rfl; exact h intrinsicClosure_empty,
Nonempty.mono subset_intrinsicClosureβ©
#align intrinsic_closure_nonempty intrinsicClosure_nonempty
alias β¨Set.Nonempty.ofIntrinsicClosure, Set.Nonempty.intrinsicClosureβ© := intrinsicClosure_nonempty
#align set.nonempty.of_intrinsic_closure Set.Nonempty.ofIntrinsicClosure
#align set.nonempty.intrinsic_closure Set.Nonempty.intrinsicClosure
--attribute [protected] Set.Nonempty.intrinsicClosure -- Porting note: removed
@[simp]
theorem intrinsicInterior_singleton (x : P) : intrinsicInterior π ({x} : Set P) = {x} := by
simpa only [intrinsicInterior, preimage_coe_affineSpan_singleton, interior_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
#align intrinsic_interior_singleton intrinsicInterior_singleton
@[simp]
theorem intrinsicFrontier_singleton (x : P) : intrinsicFrontier π ({x} : Set P) = β
:= by
rw [intrinsicFrontier, preimage_coe_affineSpan_singleton, frontier_univ, image_empty]
#align intrinsic_frontier_singleton intrinsicFrontier_singleton
@[simp]
theorem intrinsicClosure_singleton (x : P) : intrinsicClosure π ({x} : Set P) = {x} := by
simpa only [intrinsicClosure, preimage_coe_affineSpan_singleton, closure_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
#align intrinsic_closure_singleton intrinsicClosure_singleton
| Mathlib/Analysis/Convex/Intrinsic.lean | 157 | 161 | theorem intrinsicClosure_mono (h : s β t) : intrinsicClosure π s β intrinsicClosure π t := by |
refine image_subset_iff.2 fun x hx => ?_
refine β¨Set.inclusion (affineSpan_mono _ h) x, ?_, rflβ©
refine (continuous_inclusion (affineSpan_mono _ h)).closure_preimage_subset _ (closure_mono ?_ hx)
exact fun y hy => h hy
| 187 |
import Mathlib.Algebra.Group.Hom.End
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
assert_not_exists Multiset
assert_not_exists Set.indicator
assert_not_exists Pi.single_smulβ
open Function Set
universe u v
variable {Ξ± R k S M Mβ Mβ ΞΉ : Type*}
@[ext]
class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends
DistribMulAction R M where
protected add_smul : β (r s : R) (x : M), (r + s) β’ x = r β’ x + s β’ x
protected zero_smul : β x : M, (0 : R) β’ x = 0
#align module Module
#align module.ext Module.ext
#align module.ext_iff Module.ext_iff
section AddCommMonoid
variable [Semiring R] [AddCommMonoid M] [Module R M] (r s : R) (x y : M)
-- see Note [lower instance priority]
instance (priority := 100) Module.toMulActionWithZero : MulActionWithZero R M :=
{ (inferInstance : MulAction R M) with
smul_zero := smul_zero
zero_smul := Module.zero_smul }
#align module.to_mul_action_with_zero Module.toMulActionWithZero
instance AddCommMonoid.natModule : Module β M where
one_smul := one_nsmul
mul_smul m n a := mul_nsmul' a m n
smul_add n a b := nsmul_add a b n
smul_zero := nsmul_zero
zero_smul := zero_nsmul
add_smul r s x := add_nsmul x r s
#align add_comm_monoid.nat_module AddCommMonoid.natModule
theorem AddMonoid.End.natCast_def (n : β) :
(βn : AddMonoid.End M) = DistribMulAction.toAddMonoidEnd β M n :=
rfl
#align add_monoid.End.nat_cast_def AddMonoid.End.natCast_def
theorem add_smul : (r + s) β’ x = r β’ x + s β’ x :=
Module.add_smul r s x
#align add_smul add_smul
| Mathlib/Algebra/Module/Defs.lean | 97 | 98 | theorem Convex.combo_self {a b : R} (h : a + b = 1) (x : M) : a β’ x + b β’ x = x := by |
rw [β add_smul, h, one_smul]
| 188 |
import Mathlib.Algebra.Group.Hom.End
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
assert_not_exists Multiset
assert_not_exists Set.indicator
assert_not_exists Pi.single_smulβ
open Function Set
universe u v
variable {Ξ± R k S M Mβ Mβ ΞΉ : Type*}
@[ext]
class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends
DistribMulAction R M where
protected add_smul : β (r s : R) (x : M), (r + s) β’ x = r β’ x + s β’ x
protected zero_smul : β x : M, (0 : R) β’ x = 0
#align module Module
#align module.ext Module.ext
#align module.ext_iff Module.ext_iff
section AddCommMonoid
variable [Semiring R] [AddCommMonoid M] [Module R M] (r s : R) (x y : M)
-- see Note [lower instance priority]
instance (priority := 100) Module.toMulActionWithZero : MulActionWithZero R M :=
{ (inferInstance : MulAction R M) with
smul_zero := smul_zero
zero_smul := Module.zero_smul }
#align module.to_mul_action_with_zero Module.toMulActionWithZero
instance AddCommMonoid.natModule : Module β M where
one_smul := one_nsmul
mul_smul m n a := mul_nsmul' a m n
smul_add n a b := nsmul_add a b n
smul_zero := nsmul_zero
zero_smul := zero_nsmul
add_smul r s x := add_nsmul x r s
#align add_comm_monoid.nat_module AddCommMonoid.natModule
theorem AddMonoid.End.natCast_def (n : β) :
(βn : AddMonoid.End M) = DistribMulAction.toAddMonoidEnd β M n :=
rfl
#align add_monoid.End.nat_cast_def AddMonoid.End.natCast_def
theorem add_smul : (r + s) β’ x = r β’ x + s β’ x :=
Module.add_smul r s x
#align add_smul add_smul
theorem Convex.combo_self {a b : R} (h : a + b = 1) (x : M) : a β’ x + b β’ x = x := by
rw [β add_smul, h, one_smul]
#align convex.combo_self Convex.combo_self
variable (R)
-- Porting note: this is the letter of the mathlib3 version, but not really the spirit
| Mathlib/Algebra/Module/Defs.lean | 104 | 104 | theorem two_smul : (2 : R) β’ x = x + x := by | rw [β one_add_one_eq_two, add_smul, one_smul]
| 188 |
import Mathlib.Algebra.Group.Hom.End
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e"
assert_not_exists Multiset
assert_not_exists Set.indicator
assert_not_exists Pi.single_smulβ
open Function Set
universe u v
variable {Ξ± R k S M Mβ Mβ ΞΉ : Type*}
@[ext]
class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends
DistribMulAction R M where
protected add_smul : β (r s : R) (x : M), (r + s) β’ x = r β’ x + s β’ x
protected zero_smul : β x : M, (0 : R) β’ x = 0
#align module Module
#align module.ext Module.ext
#align module.ext_iff Module.ext_iff
-- We'll later use this to show `Module β M` and `Module β€ M` are subsingletons.
| Mathlib/Algebra/Module/Defs.lean | 241 | 245 | theorem Module.ext' {R : Type*} [Semiring R] {M : Type*} [AddCommMonoid M] (P Q : Module R M)
(w : β (r : R) (m : M), (haveI := P; r β’ m) = (haveI := Q; r β’ m)) :
P = Q := by |
ext
exact w _ _
| 188 |
import Mathlib.Algebra.Module.Defs
import Mathlib.SetTheory.Cardinal.Basic
open Function
universe u v
namespace Cardinal
| Mathlib/Algebra/Module/Card.lean | 24 | 29 | theorem mk_le_of_module (R : Type u) (E : Type v)
[AddCommGroup E] [Ring R] [Module R E] [Nontrivial E] [NoZeroSMulDivisors R E] :
Cardinal.lift.{v} (#R) β€ Cardinal.lift.{u} (#E) := by |
obtain β¨x, hxβ© : β (x : E), x β 0 := exists_ne 0
have : Injective (fun k β¦ k β’ x) := smul_left_injective R hx
exact lift_mk_le_lift_mk_of_injective this
| 189 |
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.AbsoluteValue
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import data.int.absolute_value from "leanprover-community/mathlib"@"9aba7801eeecebb61f58a5763c2b6dd1b47dc6ef"
variable {R S : Type*} [Ring R] [LinearOrderedCommRing S]
@[simp]
| Mathlib/Data/Int/AbsoluteValue.lean | 28 | 29 | theorem AbsoluteValue.map_units_int (abv : AbsoluteValue β€ S) (x : β€Λ£) : abv x = 1 := by |
rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
| 190 |
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.AbsoluteValue
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import data.int.absolute_value from "leanprover-community/mathlib"@"9aba7801eeecebb61f58a5763c2b6dd1b47dc6ef"
variable {R S : Type*} [Ring R] [LinearOrderedCommRing S]
@[simp]
theorem AbsoluteValue.map_units_int (abv : AbsoluteValue β€ S) (x : β€Λ£) : abv x = 1 := by
rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
#align absolute_value.map_units_int AbsoluteValue.map_units_int
@[simp]
| Mathlib/Data/Int/AbsoluteValue.lean | 33 | 34 | theorem AbsoluteValue.map_units_intCast [Nontrivial R] (abv : AbsoluteValue R S) (x : β€Λ£) :
abv ((x : β€) : R) = 1 := by | rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
| 190 |
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.AbsoluteValue
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.GroupTheory.GroupAction.Units
#align_import data.int.absolute_value from "leanprover-community/mathlib"@"9aba7801eeecebb61f58a5763c2b6dd1b47dc6ef"
variable {R S : Type*} [Ring R] [LinearOrderedCommRing S]
@[simp]
theorem AbsoluteValue.map_units_int (abv : AbsoluteValue β€ S) (x : β€Λ£) : abv x = 1 := by
rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
#align absolute_value.map_units_int AbsoluteValue.map_units_int
@[simp]
theorem AbsoluteValue.map_units_intCast [Nontrivial R] (abv : AbsoluteValue R S) (x : β€Λ£) :
abv ((x : β€) : R) = 1 := by rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
#align absolute_value.map_units_int_cast AbsoluteValue.map_units_intCast
@[deprecated (since := "2024-04-17")]
alias AbsoluteValue.map_units_int_cast := AbsoluteValue.map_units_intCast
@[simp]
| Mathlib/Data/Int/AbsoluteValue.lean | 41 | 42 | theorem AbsoluteValue.map_units_int_smul (abv : AbsoluteValue R S) (x : β€Λ£) (y : R) :
abv (x β’ y) = abv y := by | rcases Int.units_eq_one_or x with (rfl | rfl) <;> simp
| 190 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section CommGroup
variable [CommGroup Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "The **Dyson e-transform**.
Turns `(s, t)` into `(s βͺ e +α΅₯ t, t β© -e +α΅₯ s)`. This reduces the sum of the two sets."]
def mulDysonETransform : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ e β’ x.2, x.2 β© eβ»ΒΉ β’ x.1)
#align finset.mul_dyson_e_transform Finset.mulDysonETransform
#align finset.add_dyson_e_transform Finset.addDysonETransform
@[to_additive]
| Mathlib/Combinatorics/Additive/ETransform.lean | 58 | 61 | theorem mulDysonETransform.subset :
(mulDysonETransform e x).1 * (mulDysonETransform e x).2 β x.1 * x.2 := by |
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section CommGroup
variable [CommGroup Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "The **Dyson e-transform**.
Turns `(s, t)` into `(s βͺ e +α΅₯ t, t β© -e +α΅₯ s)`. This reduces the sum of the two sets."]
def mulDysonETransform : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ e β’ x.2, x.2 β© eβ»ΒΉ β’ x.1)
#align finset.mul_dyson_e_transform Finset.mulDysonETransform
#align finset.add_dyson_e_transform Finset.addDysonETransform
@[to_additive]
theorem mulDysonETransform.subset :
(mulDysonETransform e x).1 * (mulDysonETransform e x).2 β x.1 * x.2 := by
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]
#align finset.mul_dyson_e_transform.subset Finset.mulDysonETransform.subset
#align finset.add_dyson_e_transform.subset Finset.addDysonETransform.subset
@[to_additive]
| Mathlib/Combinatorics/Additive/ETransform.lean | 66 | 70 | theorem mulDysonETransform.card :
(mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card := by |
dsimp
rw [β card_smul_finset e (_ β© _), smul_finset_inter, smul_inv_smul, inter_comm,
card_union_add_card_inter, card_smul_finset]
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section CommGroup
variable [CommGroup Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "The **Dyson e-transform**.
Turns `(s, t)` into `(s βͺ e +α΅₯ t, t β© -e +α΅₯ s)`. This reduces the sum of the two sets."]
def mulDysonETransform : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ e β’ x.2, x.2 β© eβ»ΒΉ β’ x.1)
#align finset.mul_dyson_e_transform Finset.mulDysonETransform
#align finset.add_dyson_e_transform Finset.addDysonETransform
@[to_additive]
theorem mulDysonETransform.subset :
(mulDysonETransform e x).1 * (mulDysonETransform e x).2 β x.1 * x.2 := by
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]
#align finset.mul_dyson_e_transform.subset Finset.mulDysonETransform.subset
#align finset.add_dyson_e_transform.subset Finset.addDysonETransform.subset
@[to_additive]
theorem mulDysonETransform.card :
(mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card := by
dsimp
rw [β card_smul_finset e (_ β© _), smul_finset_inter, smul_inv_smul, inter_comm,
card_union_add_card_inter, card_smul_finset]
#align finset.mul_dyson_e_transform.card Finset.mulDysonETransform.card
#align finset.add_dyson_e_transform.card Finset.addDysonETransform.card
@[to_additive (attr := simp)]
| Mathlib/Combinatorics/Additive/ETransform.lean | 75 | 81 | theorem mulDysonETransform_idem :
mulDysonETransform e (mulDysonETransform e x) = mulDysonETransform e x := by |
ext : 1 <;> dsimp
Β· rw [smul_finset_inter, smul_inv_smul, inter_comm, union_eq_left]
exact inter_subset_union
Β· rw [smul_finset_union, inv_smul_smul, union_comm, inter_eq_left]
exact inter_subset_union
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section CommGroup
variable [CommGroup Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "The **Dyson e-transform**.
Turns `(s, t)` into `(s βͺ e +α΅₯ t, t β© -e +α΅₯ s)`. This reduces the sum of the two sets."]
def mulDysonETransform : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ e β’ x.2, x.2 β© eβ»ΒΉ β’ x.1)
#align finset.mul_dyson_e_transform Finset.mulDysonETransform
#align finset.add_dyson_e_transform Finset.addDysonETransform
@[to_additive]
theorem mulDysonETransform.subset :
(mulDysonETransform e x).1 * (mulDysonETransform e x).2 β x.1 * x.2 := by
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]
#align finset.mul_dyson_e_transform.subset Finset.mulDysonETransform.subset
#align finset.add_dyson_e_transform.subset Finset.addDysonETransform.subset
@[to_additive]
theorem mulDysonETransform.card :
(mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card := by
dsimp
rw [β card_smul_finset e (_ β© _), smul_finset_inter, smul_inv_smul, inter_comm,
card_union_add_card_inter, card_smul_finset]
#align finset.mul_dyson_e_transform.card Finset.mulDysonETransform.card
#align finset.add_dyson_e_transform.card Finset.addDysonETransform.card
@[to_additive (attr := simp)]
theorem mulDysonETransform_idem :
mulDysonETransform e (mulDysonETransform e x) = mulDysonETransform e x := by
ext : 1 <;> dsimp
Β· rw [smul_finset_inter, smul_inv_smul, inter_comm, union_eq_left]
exact inter_subset_union
Β· rw [smul_finset_union, inv_smul_smul, union_comm, inter_eq_left]
exact inter_subset_union
#align finset.mul_dyson_e_transform_idem Finset.mulDysonETransform_idem
#align finset.add_dyson_e_transform_idem Finset.addDysonETransform_idem
variable {e x}
@[to_additive]
| Mathlib/Combinatorics/Additive/ETransform.lean | 88 | 92 | theorem mulDysonETransform.smul_finset_snd_subset_fst :
e β’ (mulDysonETransform e x).2 β (mulDysonETransform e x).1 := by |
dsimp
rw [smul_finset_inter, smul_inv_smul, inter_comm]
exact inter_subset_union
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section Group
variable [Group Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s β© s +α΅₯ e, t βͺ -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformLeft : Finset Ξ± Γ Finset Ξ± :=
(x.1 β© op e β’ x.1, x.2 βͺ eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_left Finset.mulETransformLeft
#align finset.add_e_transform_left Finset.addETransformLeft
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s βͺ s +α΅₯ e, t β© -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ op e β’ x.1, x.2 β© eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_right Finset.mulETransformRight
#align finset.add_e_transform_right Finset.addETransformRight
@[to_additive (attr := simp)]
| Mathlib/Combinatorics/Additive/ETransform.lean | 132 | 132 | theorem mulETransformLeft_one : mulETransformLeft 1 x = x := by | simp [mulETransformLeft]
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section Group
variable [Group Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s β© s +α΅₯ e, t βͺ -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformLeft : Finset Ξ± Γ Finset Ξ± :=
(x.1 β© op e β’ x.1, x.2 βͺ eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_left Finset.mulETransformLeft
#align finset.add_e_transform_left Finset.addETransformLeft
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s βͺ s +α΅₯ e, t β© -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ op e β’ x.1, x.2 β© eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_right Finset.mulETransformRight
#align finset.add_e_transform_right Finset.addETransformRight
@[to_additive (attr := simp)]
theorem mulETransformLeft_one : mulETransformLeft 1 x = x := by simp [mulETransformLeft]
#align finset.mul_e_transform_left_one Finset.mulETransformLeft_one
#align finset.add_e_transform_left_zero Finset.addETransformLeft_zero
@[to_additive (attr := simp)]
| Mathlib/Combinatorics/Additive/ETransform.lean | 137 | 137 | theorem mulETransformRight_one : mulETransformRight 1 x = x := by | simp [mulETransformRight]
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section Group
variable [Group Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s β© s +α΅₯ e, t βͺ -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformLeft : Finset Ξ± Γ Finset Ξ± :=
(x.1 β© op e β’ x.1, x.2 βͺ eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_left Finset.mulETransformLeft
#align finset.add_e_transform_left Finset.addETransformLeft
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s βͺ s +α΅₯ e, t β© -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ op e β’ x.1, x.2 β© eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_right Finset.mulETransformRight
#align finset.add_e_transform_right Finset.addETransformRight
@[to_additive (attr := simp)]
theorem mulETransformLeft_one : mulETransformLeft 1 x = x := by simp [mulETransformLeft]
#align finset.mul_e_transform_left_one Finset.mulETransformLeft_one
#align finset.add_e_transform_left_zero Finset.addETransformLeft_zero
@[to_additive (attr := simp)]
theorem mulETransformRight_one : mulETransformRight 1 x = x := by simp [mulETransformRight]
#align finset.mul_e_transform_right_one Finset.mulETransformRight_one
#align finset.add_e_transform_right_zero Finset.addETransformRight_zero
@[to_additive]
| Mathlib/Combinatorics/Additive/ETransform.lean | 142 | 145 | theorem mulETransformLeft.fst_mul_snd_subset :
(mulETransformLeft e x).1 * (mulETransformLeft e x).2 β x.1 * x.2 := by |
refine inter_mul_union_subset_union.trans (union_subset Subset.rfl ?_)
rw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]
| 191 |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {Ξ± : Type*} [DecidableEq Ξ±]
namespace Finset
section Group
variable [Group Ξ±] (e : Ξ±) (x : Finset Ξ± Γ Finset Ξ±)
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s β© s +α΅₯ e, t βͺ -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformLeft : Finset Ξ± Γ Finset Ξ± :=
(x.1 β© op e β’ x.1, x.2 βͺ eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_left Finset.mulETransformLeft
#align finset.add_e_transform_left Finset.addETransformLeft
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s βͺ s +α΅₯ e, t β© -e +α΅₯ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset Ξ± Γ Finset Ξ± :=
(x.1 βͺ op e β’ x.1, x.2 β© eβ»ΒΉ β’ x.2)
#align finset.mul_e_transform_right Finset.mulETransformRight
#align finset.add_e_transform_right Finset.addETransformRight
@[to_additive (attr := simp)]
theorem mulETransformLeft_one : mulETransformLeft 1 x = x := by simp [mulETransformLeft]
#align finset.mul_e_transform_left_one Finset.mulETransformLeft_one
#align finset.add_e_transform_left_zero Finset.addETransformLeft_zero
@[to_additive (attr := simp)]
theorem mulETransformRight_one : mulETransformRight 1 x = x := by simp [mulETransformRight]
#align finset.mul_e_transform_right_one Finset.mulETransformRight_one
#align finset.add_e_transform_right_zero Finset.addETransformRight_zero
@[to_additive]
theorem mulETransformLeft.fst_mul_snd_subset :
(mulETransformLeft e x).1 * (mulETransformLeft e x).2 β x.1 * x.2 := by
refine inter_mul_union_subset_union.trans (union_subset Subset.rfl ?_)
rw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]
#align finset.mul_e_transform_left.fst_mul_snd_subset Finset.mulETransformLeft.fst_mul_snd_subset
#align finset.add_e_transform_left.fst_add_snd_subset Finset.addETransformLeft.fst_add_snd_subset
@[to_additive]
| Mathlib/Combinatorics/Additive/ETransform.lean | 150 | 153 | theorem mulETransformRight.fst_mul_snd_subset :
(mulETransformRight e x).1 * (mulETransformRight e x).2 β x.1 * x.2 := by |
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]
| 191 |
import Mathlib.Topology.Algebra.UniformConvergence
#align_import topology.algebra.module.strong_topology from "leanprover-community/mathlib"@"8905e5ed90859939681a725b00f6063e65096d95"
open scoped Topology UniformConvergence
section General
variable {πβ πβ : Type*} [NormedField πβ] [NormedField πβ] (Ο : πβ β+* πβ) {E E' F F' : Type*}
[AddCommGroup E] [Module πβ E] [AddCommGroup E'] [Module β E'] [AddCommGroup F] [Module πβ F]
[AddCommGroup F'] [Module β F'] [TopologicalSpace E] [TopologicalSpace E'] (F)
@[nolint unusedArguments]
def UniformConvergenceCLM [TopologicalSpace F] [TopologicalAddGroup F] (_ : Set (Set E)) :=
E βSL[Ο] F
namespace UniformConvergenceCLM
instance instFunLike [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : FunLike (UniformConvergenceCLM Ο F π) E F :=
ContinuousLinearMap.funLike
instance instContinuousSemilinearMapClass [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : ContinuousSemilinearMapClass (UniformConvergenceCLM Ο F π) Ο E F :=
ContinuousLinearMap.continuousSemilinearMapClass
instance instTopologicalSpace [TopologicalSpace F] [TopologicalAddGroup F] (π : Set (Set E)) :
TopologicalSpace (UniformConvergenceCLM Ο F π) :=
(@UniformOnFun.topologicalSpace E F (TopologicalAddGroup.toUniformSpace F) π).induced
(DFunLike.coe : (UniformConvergenceCLM Ο F π) β (E βα΅€[π] F))
#align continuous_linear_map.strong_topology UniformConvergenceCLM.instTopologicalSpace
| Mathlib/Topology/Algebra/Module/StrongTopology.lean | 96 | 101 | theorem topologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
instTopologicalSpace Ο F π = TopologicalSpace.induced DFunLike.coe
(UniformOnFun.topologicalSpace E F π) := by |
rw [instTopologicalSpace]
congr
exact UniformAddGroup.toUniformSpace_eq
| 192 |
import Mathlib.Topology.Algebra.UniformConvergence
#align_import topology.algebra.module.strong_topology from "leanprover-community/mathlib"@"8905e5ed90859939681a725b00f6063e65096d95"
open scoped Topology UniformConvergence
section General
variable {πβ πβ : Type*} [NormedField πβ] [NormedField πβ] (Ο : πβ β+* πβ) {E E' F F' : Type*}
[AddCommGroup E] [Module πβ E] [AddCommGroup E'] [Module β E'] [AddCommGroup F] [Module πβ F]
[AddCommGroup F'] [Module β F'] [TopologicalSpace E] [TopologicalSpace E'] (F)
@[nolint unusedArguments]
def UniformConvergenceCLM [TopologicalSpace F] [TopologicalAddGroup F] (_ : Set (Set E)) :=
E βSL[Ο] F
namespace UniformConvergenceCLM
instance instFunLike [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : FunLike (UniformConvergenceCLM Ο F π) E F :=
ContinuousLinearMap.funLike
instance instContinuousSemilinearMapClass [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : ContinuousSemilinearMapClass (UniformConvergenceCLM Ο F π) Ο E F :=
ContinuousLinearMap.continuousSemilinearMapClass
instance instTopologicalSpace [TopologicalSpace F] [TopologicalAddGroup F] (π : Set (Set E)) :
TopologicalSpace (UniformConvergenceCLM Ο F π) :=
(@UniformOnFun.topologicalSpace E F (TopologicalAddGroup.toUniformSpace F) π).induced
(DFunLike.coe : (UniformConvergenceCLM Ο F π) β (E βα΅€[π] F))
#align continuous_linear_map.strong_topology UniformConvergenceCLM.instTopologicalSpace
theorem topologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
instTopologicalSpace Ο F π = TopologicalSpace.induced DFunLike.coe
(UniformOnFun.topologicalSpace E F π) := by
rw [instTopologicalSpace]
congr
exact UniformAddGroup.toUniformSpace_eq
instance instUniformSpace [UniformSpace F] [UniformAddGroup F]
(π : Set (Set E)) : UniformSpace (UniformConvergenceCLM Ο F π) :=
UniformSpace.replaceTopology
((UniformOnFun.uniformSpace E F π).comap
(DFunLike.coe : (UniformConvergenceCLM Ο F π) β (E βα΅€[π] F)))
(by rw [UniformConvergenceCLM.instTopologicalSpace, UniformAddGroup.toUniformSpace_eq]; rfl)
#align continuous_linear_map.strong_uniformity UniformConvergenceCLM.instUniformSpace
| Mathlib/Topology/Algebra/Module/StrongTopology.lean | 113 | 115 | theorem uniformSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
instUniformSpace Ο F π = UniformSpace.comap DFunLike.coe (UniformOnFun.uniformSpace E F π) := by |
rw [instUniformSpace, UniformSpace.replaceTopology_eq]
| 192 |
import Mathlib.Topology.Algebra.UniformConvergence
#align_import topology.algebra.module.strong_topology from "leanprover-community/mathlib"@"8905e5ed90859939681a725b00f6063e65096d95"
open scoped Topology UniformConvergence
section General
variable {πβ πβ : Type*} [NormedField πβ] [NormedField πβ] (Ο : πβ β+* πβ) {E E' F F' : Type*}
[AddCommGroup E] [Module πβ E] [AddCommGroup E'] [Module β E'] [AddCommGroup F] [Module πβ F]
[AddCommGroup F'] [Module β F'] [TopologicalSpace E] [TopologicalSpace E'] (F)
@[nolint unusedArguments]
def UniformConvergenceCLM [TopologicalSpace F] [TopologicalAddGroup F] (_ : Set (Set E)) :=
E βSL[Ο] F
namespace UniformConvergenceCLM
instance instFunLike [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : FunLike (UniformConvergenceCLM Ο F π) E F :=
ContinuousLinearMap.funLike
instance instContinuousSemilinearMapClass [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : ContinuousSemilinearMapClass (UniformConvergenceCLM Ο F π) Ο E F :=
ContinuousLinearMap.continuousSemilinearMapClass
instance instTopologicalSpace [TopologicalSpace F] [TopologicalAddGroup F] (π : Set (Set E)) :
TopologicalSpace (UniformConvergenceCLM Ο F π) :=
(@UniformOnFun.topologicalSpace E F (TopologicalAddGroup.toUniformSpace F) π).induced
(DFunLike.coe : (UniformConvergenceCLM Ο F π) β (E βα΅€[π] F))
#align continuous_linear_map.strong_topology UniformConvergenceCLM.instTopologicalSpace
theorem topologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
instTopologicalSpace Ο F π = TopologicalSpace.induced DFunLike.coe
(UniformOnFun.topologicalSpace E F π) := by
rw [instTopologicalSpace]
congr
exact UniformAddGroup.toUniformSpace_eq
instance instUniformSpace [UniformSpace F] [UniformAddGroup F]
(π : Set (Set E)) : UniformSpace (UniformConvergenceCLM Ο F π) :=
UniformSpace.replaceTopology
((UniformOnFun.uniformSpace E F π).comap
(DFunLike.coe : (UniformConvergenceCLM Ο F π) β (E βα΅€[π] F)))
(by rw [UniformConvergenceCLM.instTopologicalSpace, UniformAddGroup.toUniformSpace_eq]; rfl)
#align continuous_linear_map.strong_uniformity UniformConvergenceCLM.instUniformSpace
theorem uniformSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
instUniformSpace Ο F π = UniformSpace.comap DFunLike.coe (UniformOnFun.uniformSpace E F π) := by
rw [instUniformSpace, UniformSpace.replaceTopology_eq]
@[simp]
theorem uniformity_toTopologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
(UniformConvergenceCLM.instUniformSpace Ο F π).toTopologicalSpace =
UniformConvergenceCLM.instTopologicalSpace Ο F π :=
rfl
#align continuous_linear_map.strong_uniformity_topology_eq UniformConvergenceCLM.uniformity_toTopologicalSpace_eq
theorem uniformEmbedding_coeFn [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
UniformEmbedding (Ξ± := UniformConvergenceCLM Ο F π) (Ξ² := E βα΅€[π] F) DFunLike.coe :=
β¨β¨rflβ©, DFunLike.coe_injectiveβ©
#align continuous_linear_map.strong_uniformity.uniform_embedding_coe_fn UniformConvergenceCLM.uniformEmbedding_coeFn
theorem embedding_coeFn [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
Embedding (X := UniformConvergenceCLM Ο F π) (Y := E βα΅€[π] F)
(UniformOnFun.ofFun π β DFunLike.coe) :=
UniformEmbedding.embedding (uniformEmbedding_coeFn _ _ _)
#align continuous_linear_map.strong_topology.embedding_coe_fn UniformConvergenceCLM.embedding_coeFn
instance instAddCommGroup [TopologicalSpace F] [TopologicalAddGroup F] (π : Set (Set E)) :
AddCommGroup (UniformConvergenceCLM Ο F π) := ContinuousLinearMap.addCommGroup
instance instUniformAddGroup [UniformSpace F] [UniformAddGroup F] (π : Set (Set E)) :
UniformAddGroup (UniformConvergenceCLM Ο F π) := by
let Ο : (UniformConvergenceCLM Ο F π) β+ E βα΅€[π] F :=
β¨β¨(DFunLike.coe : (UniformConvergenceCLM Ο F π) β E βα΅€[π] F), rflβ©, fun _ _ => rflβ©
exact (uniformEmbedding_coeFn _ _ _).uniformAddGroup Ο
#align continuous_linear_map.strong_uniformity.uniform_add_group UniformConvergenceCLM.instUniformAddGroup
instance instTopologicalAddGroup [TopologicalSpace F] [TopologicalAddGroup F]
(π : Set (Set E)) : TopologicalAddGroup (UniformConvergenceCLM Ο F π) := by
letI : UniformSpace F := TopologicalAddGroup.toUniformSpace F
haveI : UniformAddGroup F := comm_topologicalAddGroup_is_uniform
infer_instance
#align continuous_linear_map.strong_topology.topological_add_group UniformConvergenceCLM.instTopologicalAddGroup
| Mathlib/Topology/Algebra/Module/StrongTopology.lean | 152 | 157 | theorem t2Space [TopologicalSpace F] [TopologicalAddGroup F] [T2Space F]
(π : Set (Set E)) (hπ : ββ π = Set.univ) : T2Space (UniformConvergenceCLM Ο F π) := by |
letI : UniformSpace F := TopologicalAddGroup.toUniformSpace F
haveI : UniformAddGroup F := comm_topologicalAddGroup_is_uniform
haveI : T2Space (E βα΅€[π] F) := UniformOnFun.t2Space_of_covering hπ
exact (embedding_coeFn Ο F π).t2Space
| 192 |
import Mathlib.Topology.Algebra.Module.StrongTopology
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.strong_topology from "leanprover-community/mathlib"@"47b12e7f2502f14001f891ca87fbae2b4acaed3f"
open Topology UniformConvergence
variable {R πβ πβ E F : Type*}
variable [AddCommGroup E] [TopologicalSpace E] [AddCommGroup F] [TopologicalSpace F]
[TopologicalAddGroup F]
section General
namespace UniformConvergenceCLM
variable (R)
variable [OrderedSemiring R]
variable [NormedField πβ] [NormedField πβ] [Module πβ E] [Module πβ F] {Ο : πβ β+* πβ}
variable [Module R F] [ContinuousConstSMul R F] [LocallyConvexSpace R F] [SMulCommClass πβ R F]
| Mathlib/Analysis/LocallyConvex/StrongTopology.lean | 47 | 54 | theorem locallyConvexSpace (π : Set (Set E)) (hπβ : π.Nonempty)
(hπβ : DirectedOn (Β· β Β·) π) :
LocallyConvexSpace R (UniformConvergenceCLM Ο F π) := by |
apply LocallyConvexSpace.ofBasisZero _ _ _ _
(UniformConvergenceCLM.hasBasis_nhds_zero_of_basis _ _ _ hπβ hπβ
(LocallyConvexSpace.convex_basis_zero R F)) _
rintro β¨S, Vβ© β¨_, _, hVconvexβ© f hf g hg a b ha hb hab x hx
exact hVconvex (hf x hx) (hg x hx) ha hb hab
| 193 |
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Group.TypeTags
import Mathlib.Algebra.Ring.Hom.Defs
import Mathlib.Algebra.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
assert_not_exists OrderedCommGroup
assert_not_exists Commute.zero_right
assert_not_exists Commute.add_right
assert_not_exists abs_eq_max_neg
assert_not_exists natCast_ne
assert_not_exists MulOpposite.natCast
-- Porting note: There are many occasions below where we need `simp [map_zero f]`
-- where `simp [map_zero]` should suffice. (Similarly for `map_one`.)
-- See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/simp.20regression.20with.20MonoidHomClass
open Additive Multiplicative
variable {Ξ± Ξ² : Type*}
namespace Nat
def castAddMonoidHom (Ξ± : Type*) [AddMonoidWithOne Ξ±] :
β β+ Ξ± where
toFun := Nat.cast
map_add' := cast_add
map_zero' := cast_zero
#align nat.cast_add_monoid_hom Nat.castAddMonoidHom
@[simp]
theorem coe_castAddMonoidHom [AddMonoidWithOne Ξ±] : (castAddMonoidHom Ξ± : β β Ξ±) = Nat.cast :=
rfl
#align nat.coe_cast_add_monoid_hom Nat.coe_castAddMonoidHom
lemma _root_.Even.natCast [AddMonoidWithOne Ξ±] {n : β} (hn : Even n) : Even (n : Ξ±) :=
hn.map <| Nat.castAddMonoidHom Ξ±
section MonoidWithZeroHomClass
variable {A F : Type*} [MulZeroOneClass A] [FunLike F β A]
| Mathlib/Data/Nat/Cast/Basic.lean | 159 | 164 | theorem ext_nat'' [MonoidWithZeroHomClass F β A] (f g : F) (h_pos : β {n : β}, 0 < n β f n = g n) :
f = g := by |
apply DFunLike.ext
rintro (_ | n)
Β· simp [map_zero f, map_zero g]
Β· exact h_pos n.succ_pos
| 194 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
section Nontrivial
variable [NeZero (1 : Ξ±)]
| Mathlib/Data/Nat/Cast/Order.lean | 80 | 83 | theorem cast_add_one_pos (n : β) : 0 < (n : Ξ±) + 1 := by |
apply zero_lt_one.trans_le
convert (@mono_cast Ξ± _).imp (?_ : 1 β€ n + 1)
<;> simp
| 195 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
section Nontrivial
variable [NeZero (1 : Ξ±)]
theorem cast_add_one_pos (n : β) : 0 < (n : Ξ±) + 1 := by
apply zero_lt_one.trans_le
convert (@mono_cast Ξ± _).imp (?_ : 1 β€ n + 1)
<;> simp
#align nat.cast_add_one_pos Nat.cast_add_one_pos
@[simp low]
| Mathlib/Data/Nat/Cast/Order.lean | 88 | 88 | theorem cast_pos' {n : β} : (0 : Ξ±) < n β 0 < n := by | cases n <;> simp [cast_add_one_pos]
| 195 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
variable [CharZero Ξ±] {m n : β}
theorem strictMono_cast : StrictMono (Nat.cast : β β Ξ±) :=
mono_cast.strictMono_of_injective cast_injective
#align nat.strict_mono_cast Nat.strictMono_cast
@[simps! (config := .asFn)]
def castOrderEmbedding : β βͺo Ξ± :=
OrderEmbedding.ofStrictMono Nat.cast Nat.strictMono_cast
#align nat.cast_order_embedding Nat.castOrderEmbedding
#align nat.cast_order_embedding_apply Nat.castOrderEmbedding_apply
@[simp, norm_cast]
theorem cast_le : (m : Ξ±) β€ n β m β€ n :=
strictMono_cast.le_iff_le
#align nat.cast_le Nat.cast_le
@[simp, norm_cast, mono]
theorem cast_lt : (m : Ξ±) < n β m < n :=
strictMono_cast.lt_iff_lt
#align nat.cast_lt Nat.cast_lt
@[simp, norm_cast]
| Mathlib/Data/Nat/Cast/Order.lean | 134 | 134 | theorem one_lt_cast : 1 < (n : Ξ±) β 1 < n := by | rw [β cast_one, cast_lt]
| 195 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
variable [CharZero Ξ±] {m n : β}
theorem strictMono_cast : StrictMono (Nat.cast : β β Ξ±) :=
mono_cast.strictMono_of_injective cast_injective
#align nat.strict_mono_cast Nat.strictMono_cast
@[simps! (config := .asFn)]
def castOrderEmbedding : β βͺo Ξ± :=
OrderEmbedding.ofStrictMono Nat.cast Nat.strictMono_cast
#align nat.cast_order_embedding Nat.castOrderEmbedding
#align nat.cast_order_embedding_apply Nat.castOrderEmbedding_apply
@[simp, norm_cast]
theorem cast_le : (m : Ξ±) β€ n β m β€ n :=
strictMono_cast.le_iff_le
#align nat.cast_le Nat.cast_le
@[simp, norm_cast, mono]
theorem cast_lt : (m : Ξ±) < n β m < n :=
strictMono_cast.lt_iff_lt
#align nat.cast_lt Nat.cast_lt
@[simp, norm_cast]
theorem one_lt_cast : 1 < (n : Ξ±) β 1 < n := by rw [β cast_one, cast_lt]
#align nat.one_lt_cast Nat.one_lt_cast
@[simp, norm_cast]
| Mathlib/Data/Nat/Cast/Order.lean | 138 | 138 | theorem one_le_cast : 1 β€ (n : Ξ±) β 1 β€ n := by | rw [β cast_one, cast_le]
| 195 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
variable [CharZero Ξ±] {m n : β}
theorem strictMono_cast : StrictMono (Nat.cast : β β Ξ±) :=
mono_cast.strictMono_of_injective cast_injective
#align nat.strict_mono_cast Nat.strictMono_cast
@[simps! (config := .asFn)]
def castOrderEmbedding : β βͺo Ξ± :=
OrderEmbedding.ofStrictMono Nat.cast Nat.strictMono_cast
#align nat.cast_order_embedding Nat.castOrderEmbedding
#align nat.cast_order_embedding_apply Nat.castOrderEmbedding_apply
@[simp, norm_cast]
theorem cast_le : (m : Ξ±) β€ n β m β€ n :=
strictMono_cast.le_iff_le
#align nat.cast_le Nat.cast_le
@[simp, norm_cast, mono]
theorem cast_lt : (m : Ξ±) < n β m < n :=
strictMono_cast.lt_iff_lt
#align nat.cast_lt Nat.cast_lt
@[simp, norm_cast]
theorem one_lt_cast : 1 < (n : Ξ±) β 1 < n := by rw [β cast_one, cast_lt]
#align nat.one_lt_cast Nat.one_lt_cast
@[simp, norm_cast]
theorem one_le_cast : 1 β€ (n : Ξ±) β 1 β€ n := by rw [β cast_one, cast_le]
#align nat.one_le_cast Nat.one_le_cast
@[simp, norm_cast]
| Mathlib/Data/Nat/Cast/Order.lean | 142 | 143 | theorem cast_lt_one : (n : Ξ±) < 1 β n = 0 := by |
rw [β cast_one, cast_lt, Nat.lt_succ_iff, β bot_eq_zero, le_bot_iff]
| 195 |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {Ξ± Ξ² : Type*}
namespace Nat
section OrderedSemiring
variable [AddMonoidWithOne Ξ±] [PartialOrder Ξ±]
variable [CovariantClass Ξ± Ξ± (Β· + Β·) (Β· β€ Β·)] [ZeroLEOneClass Ξ±]
@[mono]
theorem mono_cast : Monotone (Nat.cast : β β Ξ±) :=
monotone_nat_of_le_succ fun n β¦ by
rw [Nat.cast_succ]; exact le_add_of_nonneg_right zero_le_one
#align nat.mono_cast Nat.mono_cast
@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : β} (h : a β€ b) : (a : Ξ±) β€ b := mono_cast h
@[simp low]
theorem cast_nonneg' (n : β) : 0 β€ (n : Ξ±) :=
@Nat.cast_zero Ξ± _ βΈ mono_cast (Nat.zero_le n)
@[simp]
theorem cast_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) : 0 β€ (n : Ξ±) :=
cast_nonneg' n
#align nat.cast_nonneg Nat.cast_nonneg
-- See note [no_index around OfNat.ofNat]
@[simp low]
theorem ofNat_nonneg' (n : β) [n.AtLeastTwo] : 0 β€ (no_index (OfNat.ofNat n : Ξ±)) := cast_nonneg' n
-- See note [no_index around OfNat.ofNat]
@[simp]
theorem ofNat_nonneg {Ξ±} [OrderedSemiring Ξ±] (n : β) [n.AtLeastTwo] :
0 β€ (no_index (OfNat.ofNat n : Ξ±)) :=
ofNat_nonneg' n
@[simp, norm_cast]
theorem cast_min {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((min a b : β) : Ξ±) = min (a : Ξ±) b :=
(@mono_cast Ξ± _).map_min
#align nat.cast_min Nat.cast_min
@[simp, norm_cast]
theorem cast_max {Ξ±} [LinearOrderedSemiring Ξ±] {a b : β} : ((max a b : β) : Ξ±) = max (a : Ξ±) b :=
(@mono_cast Ξ± _).map_max
#align nat.cast_max Nat.cast_max
variable [CharZero Ξ±] {m n : β}
theorem strictMono_cast : StrictMono (Nat.cast : β β Ξ±) :=
mono_cast.strictMono_of_injective cast_injective
#align nat.strict_mono_cast Nat.strictMono_cast
@[simps! (config := .asFn)]
def castOrderEmbedding : β βͺo Ξ± :=
OrderEmbedding.ofStrictMono Nat.cast Nat.strictMono_cast
#align nat.cast_order_embedding Nat.castOrderEmbedding
#align nat.cast_order_embedding_apply Nat.castOrderEmbedding_apply
@[simp, norm_cast]
theorem cast_le : (m : Ξ±) β€ n β m β€ n :=
strictMono_cast.le_iff_le
#align nat.cast_le Nat.cast_le
@[simp, norm_cast, mono]
theorem cast_lt : (m : Ξ±) < n β m < n :=
strictMono_cast.lt_iff_lt
#align nat.cast_lt Nat.cast_lt
@[simp, norm_cast]
theorem one_lt_cast : 1 < (n : Ξ±) β 1 < n := by rw [β cast_one, cast_lt]
#align nat.one_lt_cast Nat.one_lt_cast
@[simp, norm_cast]
theorem one_le_cast : 1 β€ (n : Ξ±) β 1 β€ n := by rw [β cast_one, cast_le]
#align nat.one_le_cast Nat.one_le_cast
@[simp, norm_cast]
theorem cast_lt_one : (n : Ξ±) < 1 β n = 0 := by
rw [β cast_one, cast_lt, Nat.lt_succ_iff, β bot_eq_zero, le_bot_iff]
#align nat.cast_lt_one Nat.cast_lt_one
@[simp, norm_cast]
| Mathlib/Data/Nat/Cast/Order.lean | 147 | 147 | theorem cast_le_one : (n : Ξ±) β€ 1 β n β€ 1 := by | rw [β cast_one, cast_le]
| 195 |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Data.Nat.Cast.Order
#align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
variable {Ξ± : Type*} [LinearOrderedSemiring Ξ±] {a : Ξ±}
@[simp]
| Mathlib/Algebra/Order/Invertible.lean | 19 | 21 | theorem invOf_pos [Invertible a] : 0 < β
a β 0 < a :=
haveI : 0 < a * β
a := by | simp only [mul_invOf_self, zero_lt_one]
β¨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.leβ©
| 196 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.