Download data/lean/OAI/Analysis/CharacterCriterion/MaxTensor.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 14.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/CharacterCriterion/MaxTensor.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/CharacterCriterion/MaxTensor.lean
-
curl -L -o MaxTensor.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/CharacterCriterion/MaxTensor.lean
14.8 kB
| import OAI.Analysis.CharacterCriterion.Pauli | |
| namespace OAI | |
| noncomputable section | |
| open scoped TensorProduct | |
| namespace KirchbergRordam.GenericRW | |
| namespace StarCompletion | |
| open UniformSpace | |
| variable (R : Type*) [SeminormedRing R] [StarRing R] [NormedStarGroup R] | |
| instance completionStar : Star (Completion R) := β¨Completion.map (star : R β R)β© | |
| @[simp] | |
| lemma star_coe (x : R) : star (x : Completion R) = (star x : R) := | |
| Completion.map_coe star_isometry.uniformContinuous x | |
| instance completionContinuousStar : ContinuousStar (Completion R) where | |
| continuous_star := Completion.continuous_map | |
| instance completionStarRing : StarRing (Completion R) where | |
| star_involutive x := by | |
| induction x using Completion.induction_on with | |
| | hp => exact isClosed_eq (continuous_star.comp continuous_star) continuous_id | |
| | ih x => simp only [star_coe, star_star] | |
| star_mul x y := by | |
| induction x, y using Completion.induction_onβ with | |
| | hp => exact isClosed_eq (by fun_prop) (by fun_prop) | |
| | ih x y => simp only [β Completion.coe_mul, star_coe, star_mul] | |
| star_add x y := by | |
| induction x, y using Completion.induction_onβ with | |
| | hp => exact isClosed_eq (by fun_prop) (by fun_prop) | |
| | ih x y => simp only [β Completion.coe_add, star_coe, star_add] | |
| instance completionNormedStarGroup : NormedStarGroup (Completion R) where | |
| norm_star_le x := by | |
| induction x using Completion.induction_on with | |
| | hp => exact isClosed_le (by fun_prop) (by fun_prop) | |
| | ih x => simp only [star_coe, Completion.norm_coe, norm_star, le_refl] | |
| variable [NormedAlgebra β R] [StarModule β R] | |
| instance completionNormedAlgebra : NormedAlgebra β (Completion R) where | |
| norm_smul_le := norm_smul_le | |
| instance completionStarModule : StarModule β (Completion R) where | |
| star_smul z x := by | |
| induction x using Completion.induction_on with | |
| | hp => | |
| exact isClosed_eq | |
| (continuous_star.comp (continuous_const_smul z)) | |
| ((continuous_const_smul (star z)).comp continuous_star) | |
| | ih x => | |
| rw [β Completion.coe_smul, star_coe, star_smul, Completion.coe_smul, star_coe] | |
| end StarCompletion | |
| namespace MaxTensor | |
| variable (A B : Type*) [CStarAlgebra A] [CStarAlgebra B] | |
| structure CrossSeminorm extends Seminorm β (A β[β] B) where | |
| mul_le : β x y, toSeminorm (x * y) β€ toSeminorm x * toSeminorm y | |
| star_eq : β x, toSeminorm (star x) = toSeminorm x | |
| cstar_eq : β x, toSeminorm (star x * x) = toSeminorm x * toSeminorm x | |
| tmul_le : β a b, toSeminorm (a ββ[β] b) β€ βaβ * βbβ | |
| instance : Inhabited (CrossSeminorm A B) := β¨{ | |
| toSeminorm := 0 | |
| mul_le := by simp | |
| star_eq := by simp | |
| cstar_eq := by simp | |
| tmul_le := by intro a b; simp only [zero_apply]; positivity }β© | |
| variable {A B} | |
| lemma bounded_at (x : A β[β] B) : | |
| β C : β, β p : CrossSeminorm A B, p.toSeminorm x β€ C := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul a b => exact β¨βaβ * βbβ, fun p => p.tmul_le a bβ© | |
| | add x y hx hy => | |
| obtain β¨C, hCβ© := hx | |
| obtain β¨D, hDβ© := hy | |
| exact β¨C + D, fun p => (map_add_le_add p.toSeminorm x y).trans | |
| (add_le_add (hC p) (hD p))β© | |
| lemma bounded : BddAbove (Set.range (CrossSeminorm.toSeminorm (A := A) (B := B))) := by | |
| rw [Seminorm.bddAbove_range_iff] | |
| intro x | |
| obtain β¨C, hCβ© := bounded_at x | |
| exact β¨C, by rintro _ β¨p, rflβ©; exact hC pβ© | |
| def seminorm : Seminorm β (A β[β] B) := β¨ p : CrossSeminorm A B, p.toSeminorm | |
| lemma seminorm_apply (x : A β[β] B) : | |
| seminorm x = β¨ p : CrossSeminorm A B, p.toSeminorm x := | |
| Seminorm.iSup_apply bounded | |
| lemma le_seminorm (p : CrossSeminorm A B) (x : A β[β] B) : | |
| p.toSeminorm x β€ seminorm x := by | |
| rw [seminorm_apply] | |
| exact le_ciSup (by obtain β¨C, hCβ© := bounded_at x; exact β¨C, by | |
| rintro _ β¨p, rflβ©; exact hC pβ©) p | |
| lemma seminorm_le {x : A β[β] B} {C : β} | |
| (h : β p : CrossSeminorm A B, p.toSeminorm x β€ C) : seminorm x β€ C := by | |
| rw [seminorm_apply] | |
| exact ciSup_le h | |
| lemma seminorm_mul_le (x y : A β[β] B) : | |
| seminorm (x * y) β€ seminorm x * seminorm y := by | |
| apply seminorm_le | |
| intro p | |
| exact (p.mul_le x y).trans (mul_le_mul (le_seminorm p x) (le_seminorm p y) | |
| (apply_nonneg p.toSeminorm y) (apply_nonneg seminorm x)) | |
| lemma seminorm_star (x : A β[β] B) : seminorm (star x) = seminorm x := by | |
| rw [seminorm_apply, seminorm_apply] | |
| congr 1 | |
| funext p | |
| exact p.star_eq x | |
| lemma seminorm_cstar (x : A β[β] B) : | |
| seminorm (star x * x) = seminorm x * seminorm x := by | |
| apply le_antisymm | |
| Β· simpa only [seminorm_star] using seminorm_mul_le (star x) x | |
| Β· have h : seminorm x β€ Real.sqrt (seminorm (star x * x)) := by | |
| apply seminorm_le | |
| intro p | |
| apply (Real.le_sqrt (apply_nonneg p.toSeminorm x) (apply_nonneg seminorm _)).mpr | |
| simpa only [β p.cstar_eq x, pow_two] using le_seminorm p (star x * x) | |
| have := mul_self_le_mul_self (apply_nonneg seminorm x) h | |
| rwa [Real.mul_self_sqrt (apply_nonneg seminorm _)] at this | |
| lemma seminorm_tmul_le (a : A) (b : B) : seminorm (a ββ[β] b) β€ βaβ * βbβ := | |
| seminorm_le fun p => p.tmul_le a b | |
| def Raw (A B : Type*) [CStarAlgebra A] [CStarAlgebra B] := A β[β] B | |
| instance : Ring (Raw A B) := inferInstanceAs (Ring (A β[β] B)) | |
| instance : Algebra β (Raw A B) := inferInstanceAs (Algebra β (A β[β] B)) | |
| instance : StarRing (Raw A B) := inferInstanceAs (StarRing (A β[β] B)) | |
| instance : StarModule β (Raw A B) := inferInstanceAs (StarModule β (A β[β] B)) | |
| def rawEquiv : (A β[β] B) βββ[β] Raw A B := | |
| StarAlgEquiv.refl β (A β[β] B) | |
| def rawRingSeminorm : RingSeminorm (Raw A B) where | |
| __ := (seminorm (A := A) (B := B)).toAddGroupSeminorm | |
| mul_le' := seminorm_mul_le | |
| instance : SeminormedRing (Raw A B) := rawRingSeminorm.toSeminormedRing | |
| instance : NormedAlgebra β (Raw A B) where | |
| norm_smul_le z x := (map_smul_eq_mul seminorm z x).le | |
| instance : NormedStarGroup (Raw A B) where | |
| norm_star_le x := (seminorm_star x).le | |
| @[simp] | |
| lemma norm_raw (x : Raw A B) : βxβ = seminorm x := rfl | |
| abbrev Algebra (A B : Type*) [CStarAlgebra A] [CStarAlgebra B] := | |
| UniformSpace.Completion (Raw A B) | |
| instance : CStarRing (Algebra A B) where | |
| norm_mul_self_le x := by | |
| induction x using UniformSpace.Completion.induction_on with | |
| | hp => exact isClosed_le (by fun_prop) (by fun_prop) | |
| | ih x => | |
| simp only [StarCompletion.star_coe, β UniformSpace.Completion.coe_mul, | |
| UniformSpace.Completion.norm_coe, norm_raw] | |
| exact (seminorm_cstar x).ge | |
| instance : CStarAlgebra (Algebra A B) where | |
| def of : Raw A B βββ[β] Algebra A B where | |
| __ := UniformSpace.Completion.coeRingHom | |
| commutes' _ := rfl | |
| map_star' x := (StarCompletion.star_coe _ x).symm | |
| @[simp] | |
| lemma norm_of (x : Raw A B) : βof xβ = seminorm x := | |
| UniformSpace.Completion.norm_coe x | |
| def includeLeft : A βββ[β] Algebra A B := of.comp (rawEquiv.toStarAlgHom.comp { | |
| toAlgHom := _root_.Algebra.TensorProduct.includeLeft | |
| map_star' a := by simp }) | |
| def includeRight : B βββ[β] Algebra A B := of.comp (rawEquiv.toStarAlgHom.comp { | |
| toAlgHom := _root_.Algebra.TensorProduct.includeRight | |
| map_star' b := by simp }) | |
| lemma legs_commute (a : A) (b : B) : | |
| Commute (includeLeft (B := B) a) (includeRight (A := A) b) := by | |
| change of (rawEquiv (a ββ[β] (1 : B))) * of (rawEquiv ((1 : A) ββ[β] b)) = | |
| of (rawEquiv ((1 : A) ββ[β] b)) * of (rawEquiv (a ββ[β] (1 : B))) | |
| rw [β map_mul, β map_mul, β map_mul, β map_mul] | |
| congr 2 | |
| simp only [_root_.Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul] | |
| variable {C : Type*} [CStarAlgebra C] | |
| def liftRaw (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : Raw A B βββ[β] C where | |
| toAlgHom := _root_.Algebra.TensorProduct.lift Ο.toAlgHom Ο.toAlgHom h | |
| map_star' x := by | |
| change _root_.Algebra.TensorProduct.lift Ο.toAlgHom Ο.toAlgHom h (star x) = | |
| star (_root_.Algebra.TensorProduct.lift Ο.toAlgHom Ο.toAlgHom h x) | |
| induction x using TensorProduct.inductionOn with | |
| | add x y hx hy => simpa only [star_add, map_add] using congrArgβ (Β· + Β·) hx hy | |
| | tmul a b => | |
| change Ο (star a) * Ο (star b) = star (Ο a * Ο b) | |
| rw [star_mul, β map_star, β map_star] | |
| exact h (star a) (star b) | |
| @[simp] | |
| lemma liftRaw_tmul (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) (a : A) (b : B) : | |
| liftRaw Ο Ο h (a ββ[β] b) = Ο a * Ο b := rfl | |
| def representationSeminorm (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : CrossSeminorm A B where | |
| toSeminorm := (normSeminorm β C).comp (liftRaw Ο Ο h).toLinearMap | |
| mul_le x y := by | |
| change βliftRaw Ο Ο h (rawEquiv x * rawEquiv y)β β€ | |
| βliftRaw Ο Ο h (rawEquiv x)β * βliftRaw Ο Ο h (rawEquiv y)β | |
| rw [map_mul] | |
| exact norm_mul_le _ _ | |
| star_eq x := by | |
| change βliftRaw Ο Ο h (star (rawEquiv x))β = βliftRaw Ο Ο h (rawEquiv x)β | |
| rw [map_star, norm_star] | |
| cstar_eq x := by | |
| change βliftRaw Ο Ο h (star (rawEquiv x) * rawEquiv x)β = | |
| βliftRaw Ο Ο h (rawEquiv x)β * βliftRaw Ο Ο h (rawEquiv x)β | |
| rw [map_mul, map_star, CStarRing.norm_star_mul_self] | |
| tmul_le a b := by | |
| change βliftRaw Ο Ο h (a ββ[β] b)β β€ βaβ * βbβ | |
| rw [liftRaw_tmul] | |
| exact (norm_mul_le _ _).trans (mul_le_mul | |
| (NonUnitalStarAlgHom.norm_apply_le Ο a) (NonUnitalStarAlgHom.norm_apply_le Ο b) | |
| (norm_nonneg _) (norm_nonneg _)) | |
| lemma norm_liftRaw_le (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) (x : Raw A B) : | |
| βliftRaw Ο Ο h xβ β€ βxβ := | |
| le_seminorm (representationSeminorm Ο Ο h) x | |
| lemma continuous_liftRaw (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : Continuous (liftRaw Ο Ο h) := by | |
| exact ((liftRaw Ο Ο h).toLinearMap.mkContinuous 1 | |
| (fun x => by change βliftRaw Ο Ο h xβ β€ 1 * βxβ | |
| simpa only [one_mul] using norm_liftRaw_le Ο Ο h x)).continuous | |
| def lift (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : Algebra A B βββ[β] C where | |
| __ := UniformSpace.Completion.extensionHom (liftRaw Ο Ο h).toRingHom | |
| (continuous_liftRaw Ο Ο h) | |
| commutes' z := by | |
| change UniformSpace.Completion.extensionHom (liftRaw Ο Ο h).toRingHom | |
| (continuous_liftRaw Ο Ο h) (algebraMap β (Raw A B) z) = algebraMap β C z | |
| rw [UniformSpace.Completion.extensionHom_coe] | |
| exact (liftRaw Ο Ο h).commutes z | |
| map_star' x := by | |
| induction x using UniformSpace.Completion.induction_on with | |
| | hp => | |
| exact isClosed_eq | |
| (UniformSpace.Completion.continuous_extension.comp continuous_star) | |
| (continuous_star.comp UniformSpace.Completion.continuous_extension) | |
| | ih x => | |
| change UniformSpace.Completion.extensionHom (liftRaw Ο Ο h).toRingHom | |
| (continuous_liftRaw Ο Ο h) (star (x : Algebra A B)) = | |
| star (UniformSpace.Completion.extensionHom (liftRaw Ο Ο h).toRingHom | |
| (continuous_liftRaw Ο Ο h) (x : Algebra A B)) | |
| simp only [StarCompletion.star_coe, UniformSpace.Completion.extensionHom_coe] | |
| exact map_star (liftRaw Ο Ο h) x | |
| @[simp] | |
| lemma lift_of (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) (x : Raw A B) : | |
| lift Ο Ο h (of x) = liftRaw Ο Ο h x := | |
| UniformSpace.Completion.extensionHom_coe (liftRaw Ο Ο h).toRingHom | |
| (continuous_liftRaw Ο Ο h) x | |
| @[simp] | |
| lemma lift_of_tmul (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) (a : A) (b : B) : | |
| lift Ο Ο h (of (a ββ[β] b)) = Ο a * Ο b := | |
| (lift_of Ο Ο h (rawEquiv (a ββ[β] b))).trans (liftRaw_tmul Ο Ο h a b) | |
| open scoped CStarAlgebra | |
| @[simp] | |
| lemma of_tmul (a : A) (b : B) : | |
| of (a ββ[β] b) = includeLeft (B := B) a * includeRight (A := A) b := by | |
| change of (rawEquiv (a ββ[β] b)) = | |
| of (rawEquiv (a ββ[β] (1 : B))) * of (rawEquiv ((1 : A) ββ[β] b)) | |
| rw [β map_mul, β map_mul] | |
| congr 2 | |
| simp only [_root_.Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul] | |
| @[ext] | |
| theorem hom_ext {f g : Algebra A B βββ[β] C} | |
| (hL : f.comp includeLeft = g.comp includeLeft) | |
| (hR : f.comp includeRight = g.comp includeRight) : f = g := by | |
| apply DFunLike.ext | |
| intro x | |
| induction x using UniformSpace.Completion.induction_on with | |
| | hp => exact isClosed_eq (map_continuous f) (map_continuous g) | |
| | ih x => | |
| suffices β tensor : A β[β] B, f (of (rawEquiv tensor)) = g (of (rawEquiv tensor)) | |
| from this x | |
| intro tensor | |
| induction tensor using TensorProduct.inductionOn with | |
| | add x y hx hy => simpa only [map_add] using congrArgβ (Β· + Β·) hx hy | |
| | tmul a b => | |
| change f (of (a ββ[β] b)) = g (of (a ββ[β] b)) | |
| rw [of_tmul, map_mul, map_mul] | |
| exact congrArgβ (Β· * Β·) (DFunLike.congr_fun hL a) (DFunLike.congr_fun hR b) | |
| @[simp] | |
| lemma lift_includeLeft (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : (lift Ο Ο h).comp includeLeft = Ο := by | |
| ext a | |
| change lift Ο Ο h (of (a ββ[β] (1 : B))) = Ο a | |
| rw [lift_of_tmul, map_one, mul_one] | |
| @[simp] | |
| lemma lift_includeRight (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : (lift Ο Ο h).comp includeRight = Ο := by | |
| ext b | |
| change lift Ο Ο h (of ((1 : A) ββ[β] b)) = Ο b | |
| rw [lift_of_tmul, map_one, one_mul] | |
| theorem existsUnique_lift (Ο : A βββ[β] C) (Ο : B βββ[β] C) | |
| (h : β a b, Commute (Ο a) (Ο b)) : | |
| β! f : Algebra A B βββ[β] C, f.comp includeLeft = Ο β§ f.comp includeRight = Ο := by | |
| refine β¨lift Ο Ο h, β¨lift_includeLeft _ _ _, lift_includeRight _ _ _β©, ?_β© | |
| intro f hf | |
| exact hom_ext (hf.1.trans (lift_includeLeft _ _ _).symm) | |
| (hf.2.trans (lift_includeRight _ _ _).symm) | |
| universe u | |
| structure CStarPack where | |
| carrier : Type u | |
| inst : CStarAlgebra carrier | |
| attribute [instance] CStarPack.inst | |
| instance : CoeSort CStarPack (Type u) := β¨CStarPack.carrierβ© | |
| def powerPack (D : Type u) [CStarAlgebra D] : β β CStarPack.{u} | |
| | 0 => β¨D, inferInstanceβ© | |
| | n + 1 => β¨Algebra D (powerPack D n), inferInstanceβ© | |
| abbrev Power (D : Type u) [CStarAlgebra D] (m : β+) : Type u := | |
| powerPack D (m.val - 1) | |
| end MaxTensor | |
| end KirchbergRordam.GenericRW | |
| end | |
| end OAI | |