Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(ContinuousMultilinearMap): add lemmas about .prod #20462

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -610,14 +610,9 @@ variable (𝕜 E E' G G')
def prodL :
ContinuousMultilinearMap 𝕜 E G × ContinuousMultilinearMap 𝕜 E G' ≃ₗᵢ[𝕜]
ContinuousMultilinearMap 𝕜 E (G × G') where
toFun f := f.1.prod f.2
invFun f :=
((ContinuousLinearMap.fst 𝕜 G G').compContinuousMultilinearMap f,
(ContinuousLinearMap.snd 𝕜 G G').compContinuousMultilinearMap f)
__ := prodEquiv
map_add' _ _ := rfl
map_smul' _ _ := rfl
left_inv f := by ext <;> rfl
right_inv f := by ext <;> rfl
norm_map' f := opNorm_prod f.1 f.2

/-- `ContinuousMultilinearMap.pi` as a `LinearIsometryEquiv`. -/
Expand Down
67 changes: 61 additions & 6 deletions Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,64 @@ theorem _root_.ContinuousLinearMap.compContinuousMultilinearMap_coe (g : M₂
ext m
rfl

/-- `ContinuousMultilinearMap.prod` as an `Equiv`. -/
@[simps apply symm_apply_fst symm_apply_snd, simps (config := .lemmasOnly) symm_apply]
def prodEquiv :
(ContinuousMultilinearMap R M₁ M₂ × ContinuousMultilinearMap R M₁ M₃) ≃
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a linear equiv?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A LinearEquiv needs more typeclass assumptions, e.g., ContinuousAdd and ContinuousSMul.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I'm surpised that ContinuousMultilinearMap is legal without those assumptions! Either way, that's a convincing enough reason to have the Equiv.

ContinuousMultilinearMap R M₁ (M₂ × M₃) where
toFun f := f.1.prod f.2
invFun f := ((ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap f,
(ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap f)
left_inv _ := rfl
right_inv _ := rfl

theorem prod_ext_iff {f g : ContinuousMultilinearMap R M₁ (M₂ × M₃)} :
f = g ↔ (ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap f =
(ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap g ∧
(ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap f =
(ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap g := by
rw [← Prod.mk.inj_iff, ← prodEquiv_symm_apply, ← prodEquiv_symm_apply, Equiv.apply_eq_iff_eq]

@[ext]
theorem prod_ext {f g : ContinuousMultilinearMap R M₁ (M₂ × M₃)}
urkud marked this conversation as resolved.
Show resolved Hide resolved
(h₁ : (ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap f =
(ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap g)
(h₂ : (ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap f =
(ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap g) : f = g :=
prod_ext_iff.mpr ⟨h₁, h₂⟩

theorem eq_prod_iff {f : ContinuousMultilinearMap R M₁ (M₂ × M₃)}
{g : ContinuousMultilinearMap R M₁ M₂} {h : ContinuousMultilinearMap R M₁ M₃} :
f = g.prod h ↔ (ContinuousLinearMap.fst _ _ _).compContinuousMultilinearMap f = g ∧
(ContinuousLinearMap.snd _ _ _).compContinuousMultilinearMap f = h :=
prod_ext_iff

theorem add_prod_add [ContinuousAdd M₂] [ContinuousAdd M₃]
(f₁ f₂ : ContinuousMultilinearMap R M₁ M₂) (g₁ g₂ : ContinuousMultilinearMap R M₁ M₃) :
(f₁ + f₂).prod (g₁ + g₂) = f₁.prod g₁ + f₂.prod g₂ :=
rfl
Comment on lines +334 to +337
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add smul_prod_smul too, where the same scalar is used twice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Ideally with the scalar belonging to an unrelated semiring S, but R with a TODO comment about generalizing is ok)


theorem smul_prod_smul {S : Type*} [Monoid S] [DistribMulAction S M₂] [DistribMulAction S M₃]
[ContinuousConstSMul S M₂] [SMulCommClass R S M₂]
[ContinuousConstSMul S M₃] [SMulCommClass R S M₃]
(c : S) (f : ContinuousMultilinearMap R M₁ M₂) (g : ContinuousMultilinearMap R M₁ M₃) :
(c • f).prod (c • g) = c • f.prod g :=
rfl

@[simp]
theorem zero_prod_zero :
(0 : ContinuousMultilinearMap R M₁ M₂).prod (0 : ContinuousMultilinearMap R M₁ M₃) = 0 :=
rfl

/-- `ContinuousMultilinearMap.pi` as an `Equiv`. -/
@[simps]
def piEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
[∀ i, TopologicalSpace (M' i)] [∀ i, Module R (M' i)] :
(∀ i, ContinuousMultilinearMap R M₁ (M' i)) ≃ ContinuousMultilinearMap R M₁ (∀ i, M' i) where
toFun := ContinuousMultilinearMap.pi
invFun f i := (ContinuousLinearMap.proj i : _ →L[R] M' i).compContinuousMultilinearMap f
left_inv f := by
ext
rfl
right_inv f := by
ext
rfl
left_inv _ := rfl
right_inv _ := rfl

/-- An equivalence of the index set defines an equivalence between the spaces of continuous
multilinear maps. This is the forward map of this equivalence. -/
Expand Down Expand Up @@ -453,6 +498,16 @@ instance : AddCommGroup (ContinuousMultilinearMap R M₁ M₂) :=
toMultilinearMap_injective.addCommGroup _ rfl (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
(fun _ _ => rfl) fun _ _ => rfl

theorem neg_prod_neg [AddCommGroup M₃] [Module R M₃] [TopologicalSpace M₃] [TopologicalAddGroup M₃]
(f : ContinuousMultilinearMap R M₁ M₂) (g : ContinuousMultilinearMap R M₁ M₃) :
(-f).prod (-g) = - f.prod g :=
rfl

theorem sub_prod_sub [AddCommGroup M₃] [Module R M₃] [TopologicalSpace M₃] [TopologicalAddGroup M₃]
(f₁ f₂ : ContinuousMultilinearMap R M₁ M₂) (g₁ g₂ : ContinuousMultilinearMap R M₁ M₃) :
(f₁ - f₂).prod (g₁ - g₂) = f₁.prod g₁ - f₂.prod g₂ :=
rfl

end TopologicalAddGroup

end Ring
Expand Down
Loading