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.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
| Mathlib/Data/Matrix/Rank.lean | 71 | 74 | theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by |
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
| Mathlib/Data/Matrix/Rank.lean | 77 | 81 | theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by |
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_right Matrix.rank_mul_le_right
theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ min A.rank B.rank :=
le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _)
#align matrix.rank_mul_le Matrix.rank_mul_le
| Mathlib/Data/Matrix/Rank.lean | 89 | 93 | theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) :
(A : Matrix n n R).rank = Fintype.card n := by |
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _
have := rank_mul_le_left (A : Matrix n n R) (βAβ»ΒΉ : Matrix n n R)
rwa [β Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_right Matrix.rank_mul_le_right
theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ min A.rank B.rank :=
le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _)
#align matrix.rank_mul_le Matrix.rank_mul_le
theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) :
(A : Matrix n n R).rank = Fintype.card n := by
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _
have := rank_mul_le_left (A : Matrix n n R) (βAβ»ΒΉ : Matrix n n R)
rwa [β Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
#align matrix.rank_unit Matrix.rank_unit
| Mathlib/Data/Matrix/Rank.lean | 96 | 99 | theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
A.rank = Fintype.card n := by |
obtain β¨A, rflβ© := h
exact rank_unit A
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_right Matrix.rank_mul_le_right
theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ min A.rank B.rank :=
le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _)
#align matrix.rank_mul_le Matrix.rank_mul_le
theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) :
(A : Matrix n n R).rank = Fintype.card n := by
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _
have := rank_mul_le_left (A : Matrix n n R) (βAβ»ΒΉ : Matrix n n R)
rwa [β Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
#align matrix.rank_unit Matrix.rank_unit
theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
A.rank = Fintype.card n := by
obtain β¨A, rflβ© := h
exact rank_unit A
#align matrix.rank_of_is_unit Matrix.rank_of_isUnit
@[simp]
lemma rank_mul_eq_left_of_isUnit_det [DecidableEq n]
(A : Matrix n n R) (B : Matrix m n R) (hA : IsUnit A.det) :
(B * A).rank = B.rank := by
suffices Function.Surjective A.mulVecLin by
rw [rank, mulVecLin_mul, LinearMap.range_comp_of_range_eq_top _
(LinearMap.range_eq_top.mpr this), β rank]
intro v
exact β¨(Aβ»ΒΉ).mulVecLin v, by simp [mul_nonsing_inv _ hA]β©
@[simp]
lemma rank_mul_eq_right_of_isUnit_det [Fintype m] [DecidableEq m]
(A : Matrix m m R) (B : Matrix m n R) (hA : IsUnit A.det) :
(A * B).rank = B.rank := by
let b : Basis m R (m β R) := Pi.basisFun R m
replace hA : IsUnit (LinearMap.toMatrix b b A.mulVecLin).det := by
convert hA; rw [β LinearEquiv.eq_symm_apply]; rfl
have hAB : mulVecLin (A * B) = (LinearEquiv.ofIsUnitDet hA).comp (mulVecLin B) := by ext; simp
rw [rank, rank, hAB, LinearMap.range_comp, LinearEquiv.finrank_map_eq]
| Mathlib/Data/Matrix/Rank.lean | 125 | 130 | theorem rank_submatrix_le [StrongRankCondition R] [Fintype m] (f : n β m) (e : n β m)
(A : Matrix m m R) : rank (A.submatrix f e) β€ rank A := by |
rw [rank, rank, mulVecLin_submatrix, LinearMap.range_comp, LinearMap.range_comp,
show LinearMap.funLeft R R e.symm = LinearEquiv.funCongrLeft R R e.symm from rfl,
LinearEquiv.range, Submodule.map_top]
exact Submodule.finrank_map_le _ _
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_right Matrix.rank_mul_le_right
theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ min A.rank B.rank :=
le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _)
#align matrix.rank_mul_le Matrix.rank_mul_le
theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) :
(A : Matrix n n R).rank = Fintype.card n := by
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _
have := rank_mul_le_left (A : Matrix n n R) (βAβ»ΒΉ : Matrix n n R)
rwa [β Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
#align matrix.rank_unit Matrix.rank_unit
theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
A.rank = Fintype.card n := by
obtain β¨A, rflβ© := h
exact rank_unit A
#align matrix.rank_of_is_unit Matrix.rank_of_isUnit
@[simp]
lemma rank_mul_eq_left_of_isUnit_det [DecidableEq n]
(A : Matrix n n R) (B : Matrix m n R) (hA : IsUnit A.det) :
(B * A).rank = B.rank := by
suffices Function.Surjective A.mulVecLin by
rw [rank, mulVecLin_mul, LinearMap.range_comp_of_range_eq_top _
(LinearMap.range_eq_top.mpr this), β rank]
intro v
exact β¨(Aβ»ΒΉ).mulVecLin v, by simp [mul_nonsing_inv _ hA]β©
@[simp]
lemma rank_mul_eq_right_of_isUnit_det [Fintype m] [DecidableEq m]
(A : Matrix m m R) (B : Matrix m n R) (hA : IsUnit A.det) :
(A * B).rank = B.rank := by
let b : Basis m R (m β R) := Pi.basisFun R m
replace hA : IsUnit (LinearMap.toMatrix b b A.mulVecLin).det := by
convert hA; rw [β LinearEquiv.eq_symm_apply]; rfl
have hAB : mulVecLin (A * B) = (LinearEquiv.ofIsUnitDet hA).comp (mulVecLin B) := by ext; simp
rw [rank, rank, hAB, LinearMap.range_comp, LinearEquiv.finrank_map_eq]
theorem rank_submatrix_le [StrongRankCondition R] [Fintype m] (f : n β m) (e : n β m)
(A : Matrix m m R) : rank (A.submatrix f e) β€ rank A := by
rw [rank, rank, mulVecLin_submatrix, LinearMap.range_comp, LinearMap.range_comp,
show LinearMap.funLeft R R e.symm = LinearEquiv.funCongrLeft R R e.symm from rfl,
LinearEquiv.range, Submodule.map_top]
exact Submodule.finrank_map_le _ _
#align matrix.rank_submatrix_le Matrix.rank_submatrix_le
| Mathlib/Data/Matrix/Rank.lean | 133 | 136 | theorem rank_reindex [Fintype m] (eβ eβ : m β n) (A : Matrix m m R) :
rank (reindex eβ eβ A) = rank A := by |
rw [rank, rank, mulVecLin_reindex, LinearMap.range_comp, LinearMap.range_comp,
LinearEquiv.range, Submodule.map_top, LinearEquiv.finrank_map_eq]
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section CommRing
variable [CommRing R]
noncomputable def rank (A : Matrix m n R) : β :=
finrank R <| LinearMap.range A.mulVecLin
#align matrix.rank Matrix.rank
@[simp]
theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
#align matrix.rank_one Matrix.rank_one
@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by
rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
#align matrix.rank_zero Matrix.rank_zero
theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
A.rank β€ Fintype.card n := by
haveI : Module.Finite R (n β R) := Module.Finite.pi
haveI : Module.Free R (n β R) := Module.Free.pi _ _
exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)
#align matrix.rank_le_card_width Matrix.rank_le_card_width
theorem rank_le_width [StrongRankCondition R] {m n : β} (A : Matrix (Fin m) (Fin n) R) :
A.rank β€ n :=
A.rank_le_card_width.trans <| (Fintype.card_fin n).le
#align matrix.rank_le_width Matrix.rank_le_width
theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ A.rank := by
rw [rank, rank, mulVecLin_mul]
exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_left Matrix.rank_mul_le_left
theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ B.rank := by
rw [rank, rank, mulVecLin_mul]
exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _)
(rank_lt_aleph0 _ _)
#align matrix.rank_mul_le_right Matrix.rank_mul_le_right
theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) :
(A * B).rank β€ min A.rank B.rank :=
le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _)
#align matrix.rank_mul_le Matrix.rank_mul_le
theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) :
(A : Matrix n n R).rank = Fintype.card n := by
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _
have := rank_mul_le_left (A : Matrix n n R) (βAβ»ΒΉ : Matrix n n R)
rwa [β Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
#align matrix.rank_unit Matrix.rank_unit
theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
A.rank = Fintype.card n := by
obtain β¨A, rflβ© := h
exact rank_unit A
#align matrix.rank_of_is_unit Matrix.rank_of_isUnit
@[simp]
lemma rank_mul_eq_left_of_isUnit_det [DecidableEq n]
(A : Matrix n n R) (B : Matrix m n R) (hA : IsUnit A.det) :
(B * A).rank = B.rank := by
suffices Function.Surjective A.mulVecLin by
rw [rank, mulVecLin_mul, LinearMap.range_comp_of_range_eq_top _
(LinearMap.range_eq_top.mpr this), β rank]
intro v
exact β¨(Aβ»ΒΉ).mulVecLin v, by simp [mul_nonsing_inv _ hA]β©
@[simp]
lemma rank_mul_eq_right_of_isUnit_det [Fintype m] [DecidableEq m]
(A : Matrix m m R) (B : Matrix m n R) (hA : IsUnit A.det) :
(A * B).rank = B.rank := by
let b : Basis m R (m β R) := Pi.basisFun R m
replace hA : IsUnit (LinearMap.toMatrix b b A.mulVecLin).det := by
convert hA; rw [β LinearEquiv.eq_symm_apply]; rfl
have hAB : mulVecLin (A * B) = (LinearEquiv.ofIsUnitDet hA).comp (mulVecLin B) := by ext; simp
rw [rank, rank, hAB, LinearMap.range_comp, LinearEquiv.finrank_map_eq]
theorem rank_submatrix_le [StrongRankCondition R] [Fintype m] (f : n β m) (e : n β m)
(A : Matrix m m R) : rank (A.submatrix f e) β€ rank A := by
rw [rank, rank, mulVecLin_submatrix, LinearMap.range_comp, LinearMap.range_comp,
show LinearMap.funLeft R R e.symm = LinearEquiv.funCongrLeft R R e.symm from rfl,
LinearEquiv.range, Submodule.map_top]
exact Submodule.finrank_map_le _ _
#align matrix.rank_submatrix_le Matrix.rank_submatrix_le
theorem rank_reindex [Fintype m] (eβ eβ : m β n) (A : Matrix m m R) :
rank (reindex eβ eβ A) = rank A := by
rw [rank, rank, mulVecLin_reindex, LinearMap.range_comp, LinearMap.range_comp,
LinearEquiv.range, Submodule.map_top, LinearEquiv.finrank_map_eq]
#align matrix.rank_reindex Matrix.rank_reindex
@[simp]
| Mathlib/Data/Matrix/Rank.lean | 140 | 142 | theorem rank_submatrix [Fintype m] (A : Matrix m m R) (eβ eβ : n β m) :
rank (A.submatrix eβ eβ) = rank A := by |
simpa only [reindex_apply] using rank_reindex eβ.symm eβ.symm A
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section StarOrderedField
variable [Fintype m] [Field R] [PartialOrder R] [StarRing R] [StarOrderedRing R]
| Mathlib/Data/Matrix/Rank.lean | 217 | 220 | theorem ker_mulVecLin_conjTranspose_mul_self (A : Matrix m n R) :
LinearMap.ker (Aα΄΄ * A).mulVecLin = LinearMap.ker (mulVecLin A) := by |
ext x
simp only [LinearMap.mem_ker, mulVecLin_apply, conjTranspose_mul_self_mulVec_eq_zero]
| 1,847 |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n o R : Type*} [Fintype n] [Fintype o]
section LinearOrderedField
variable [Fintype m] [LinearOrderedField R]
| Mathlib/Data/Matrix/Rank.lean | 255 | 264 | theorem ker_mulVecLin_transpose_mul_self (A : Matrix m n R) :
LinearMap.ker (Aα΅ * A).mulVecLin = LinearMap.ker (mulVecLin A) := by |
ext x
simp only [LinearMap.mem_ker, mulVecLin_apply, β mulVec_mulVec]
constructor
Β· intro h
replace h := congr_arg (dotProduct x) h
rwa [dotProduct_mulVec, dotProduct_zero, vecMul_transpose, dotProduct_self_eq_zero] at h
Β· intro h
rw [h, mulVec_zero]
| 1,847 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
| Mathlib/Analysis/Complex/Isometry.lean | 60 | 62 | theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by |
ext1
simp
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
| Mathlib/Analysis/Complex/Isometry.lean | 65 | 71 | theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by |
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
#align rotation_ne_conj_lie rotation_ne_conjLIE
@[simps]
def rotationOf (e : β ββα΅’[β] β) : circle :=
β¨e 1 / Complex.abs (e 1), by simpβ©
#align rotation_of rotationOf
@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a :=
Subtype.ext <| by simp
#align rotation_of_rotation rotationOf_rotation
theorem rotation_injective : Function.Injective rotation :=
Function.LeftInverse.injective rotationOf_rotation
#align rotation_injective rotation_injective
| Mathlib/Analysis/Complex/Isometry.lean | 90 | 93 | theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β ββα΅’[β] β)
(hβ : β z, z + conj z = f z + conj (f z)) (z : β) : (f z).re = z.re := by |
simpa [ext_iff, add_re, add_im, conj_re, conj_im, β two_mul,
show (2 : β) β 0 by simp [two_ne_zero]] using (hβ z).symm
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
#align rotation_ne_conj_lie rotation_ne_conjLIE
@[simps]
def rotationOf (e : β ββα΅’[β] β) : circle :=
β¨e 1 / Complex.abs (e 1), by simpβ©
#align rotation_of rotationOf
@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a :=
Subtype.ext <| by simp
#align rotation_of_rotation rotationOf_rotation
theorem rotation_injective : Function.Injective rotation :=
Function.LeftInverse.injective rotationOf_rotation
#align rotation_injective rotation_injective
theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β ββα΅’[β] β)
(hβ : β z, z + conj z = f z + conj (f z)) (z : β) : (f z).re = z.re := by
simpa [ext_iff, add_re, add_im, conj_re, conj_im, β two_mul,
show (2 : β) β 0 by simp [two_ne_zero]] using (hβ z).symm
#align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq
| Mathlib/Analysis/Complex/Isometry.lean | 96 | 101 | theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β ββα΅’[β] β}
(hβ : β z, (f z).re = z.re) (z : β) : (f z).im = z.im β¨ (f z).im = -z.im := by |
have hβ := f.norm_map z
simp only [Complex.abs_def, norm_eq_abs] at hβ
rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z,
hβ, add_left_cancel_iff, mul_self_eq_mul_self_iff] at hβ
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
#align rotation_ne_conj_lie rotation_ne_conjLIE
@[simps]
def rotationOf (e : β ββα΅’[β] β) : circle :=
β¨e 1 / Complex.abs (e 1), by simpβ©
#align rotation_of rotationOf
@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a :=
Subtype.ext <| by simp
#align rotation_of_rotation rotationOf_rotation
theorem rotation_injective : Function.Injective rotation :=
Function.LeftInverse.injective rotationOf_rotation
#align rotation_injective rotation_injective
theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β ββα΅’[β] β)
(hβ : β z, z + conj z = f z + conj (f z)) (z : β) : (f z).re = z.re := by
simpa [ext_iff, add_re, add_im, conj_re, conj_im, β two_mul,
show (2 : β) β 0 by simp [two_ne_zero]] using (hβ z).symm
#align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq
theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β ββα΅’[β] β}
(hβ : β z, (f z).re = z.re) (z : β) : (f z).im = z.im β¨ (f z).im = -z.im := by
have hβ := f.norm_map z
simp only [Complex.abs_def, norm_eq_abs] at hβ
rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z,
hβ, add_left_cancel_iff, mul_self_eq_mul_self_iff] at hβ
#align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re
| Mathlib/Analysis/Complex/Isometry.lean | 104 | 116 | theorem LinearIsometry.im_apply_eq_im {f : β ββα΅’[β] β} (h : f 1 = 1) (z : β) :
z + conj z = f z + conj (f z) := by |
have : βf z - 1β = βz - 1β := by rw [β f.norm_map (z - 1), f.map_sub, h]
apply_fun fun x => x ^ 2 at this
simp only [norm_eq_abs, β normSq_eq_abs] at this
rw [β ofReal_inj, β mul_conj, β mul_conj] at this
rw [RingHom.map_sub, RingHom.map_sub] at this
simp only [sub_mul, mul_sub, one_mul, mul_one] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs, LinearIsometry.norm_map] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs] at this
simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this
simp only [add_sub, sub_left_inj] at this
rw [add_comm, β this, add_comm]
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
#align rotation_ne_conj_lie rotation_ne_conjLIE
@[simps]
def rotationOf (e : β ββα΅’[β] β) : circle :=
β¨e 1 / Complex.abs (e 1), by simpβ©
#align rotation_of rotationOf
@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a :=
Subtype.ext <| by simp
#align rotation_of_rotation rotationOf_rotation
theorem rotation_injective : Function.Injective rotation :=
Function.LeftInverse.injective rotationOf_rotation
#align rotation_injective rotation_injective
theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β ββα΅’[β] β)
(hβ : β z, z + conj z = f z + conj (f z)) (z : β) : (f z).re = z.re := by
simpa [ext_iff, add_re, add_im, conj_re, conj_im, β two_mul,
show (2 : β) β 0 by simp [two_ne_zero]] using (hβ z).symm
#align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq
theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β ββα΅’[β] β}
(hβ : β z, (f z).re = z.re) (z : β) : (f z).im = z.im β¨ (f z).im = -z.im := by
have hβ := f.norm_map z
simp only [Complex.abs_def, norm_eq_abs] at hβ
rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z,
hβ, add_left_cancel_iff, mul_self_eq_mul_self_iff] at hβ
#align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re
theorem LinearIsometry.im_apply_eq_im {f : β ββα΅’[β] β} (h : f 1 = 1) (z : β) :
z + conj z = f z + conj (f z) := by
have : βf z - 1β = βz - 1β := by rw [β f.norm_map (z - 1), f.map_sub, h]
apply_fun fun x => x ^ 2 at this
simp only [norm_eq_abs, β normSq_eq_abs] at this
rw [β ofReal_inj, β mul_conj, β mul_conj] at this
rw [RingHom.map_sub, RingHom.map_sub] at this
simp only [sub_mul, mul_sub, one_mul, mul_one] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs, LinearIsometry.norm_map] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs] at this
simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this
simp only [add_sub, sub_left_inj] at this
rw [add_comm, β this, add_comm]
#align linear_isometry.im_apply_eq_im LinearIsometry.im_apply_eq_im
| Mathlib/Analysis/Complex/Isometry.lean | 119 | 122 | theorem LinearIsometry.re_apply_eq_re {f : β ββα΅’[β] β} (h : f 1 = 1) (z : β) : (f z).re = z.re := by |
apply LinearIsometry.re_apply_eq_re_of_add_conj_eq
intro z
apply LinearIsometry.im_apply_eq_im h
| 1,848 |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
local notation "|" x "|" => Complex.abs x
def rotation : circle β* β ββα΅’[β] β where
toFun a :=
{ DistribMulAction.toLinearEquiv β β a with
norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] }
map_one' := LinearIsometryEquiv.ext <| one_smul circle
map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b
#align rotation rotation
@[simp]
theorem rotation_apply (a : circle) (z : β) : rotation a z = a * z :=
rfl
#align rotation_apply rotation_apply
@[simp]
theorem rotation_symm (a : circle) : (rotation a).symm = rotation aβ»ΒΉ :=
LinearIsometryEquiv.ext fun _ => rfl
#align rotation_symm rotation_symm
@[simp]
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1
simp
#align rotation_trans rotation_trans
theorem rotation_ne_conjLIE (a : circle) : rotation a β conjLIE := by
intro h
have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1
have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I
rw [rotation_apply, RingHom.map_one, mul_one] at h1
rw [rotation_apply, conj_I, β neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI
exact one_ne_zero hI
#align rotation_ne_conj_lie rotation_ne_conjLIE
@[simps]
def rotationOf (e : β ββα΅’[β] β) : circle :=
β¨e 1 / Complex.abs (e 1), by simpβ©
#align rotation_of rotationOf
@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a :=
Subtype.ext <| by simp
#align rotation_of_rotation rotationOf_rotation
theorem rotation_injective : Function.Injective rotation :=
Function.LeftInverse.injective rotationOf_rotation
#align rotation_injective rotation_injective
theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β ββα΅’[β] β)
(hβ : β z, z + conj z = f z + conj (f z)) (z : β) : (f z).re = z.re := by
simpa [ext_iff, add_re, add_im, conj_re, conj_im, β two_mul,
show (2 : β) β 0 by simp [two_ne_zero]] using (hβ z).symm
#align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq
theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β ββα΅’[β] β}
(hβ : β z, (f z).re = z.re) (z : β) : (f z).im = z.im β¨ (f z).im = -z.im := by
have hβ := f.norm_map z
simp only [Complex.abs_def, norm_eq_abs] at hβ
rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z,
hβ, add_left_cancel_iff, mul_self_eq_mul_self_iff] at hβ
#align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re
theorem LinearIsometry.im_apply_eq_im {f : β ββα΅’[β] β} (h : f 1 = 1) (z : β) :
z + conj z = f z + conj (f z) := by
have : βf z - 1β = βz - 1β := by rw [β f.norm_map (z - 1), f.map_sub, h]
apply_fun fun x => x ^ 2 at this
simp only [norm_eq_abs, β normSq_eq_abs] at this
rw [β ofReal_inj, β mul_conj, β mul_conj] at this
rw [RingHom.map_sub, RingHom.map_sub] at this
simp only [sub_mul, mul_sub, one_mul, mul_one] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs, LinearIsometry.norm_map] at this
rw [mul_conj, normSq_eq_abs, β norm_eq_abs] at this
simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this
simp only [add_sub, sub_left_inj] at this
rw [add_comm, β this, add_comm]
#align linear_isometry.im_apply_eq_im LinearIsometry.im_apply_eq_im
theorem LinearIsometry.re_apply_eq_re {f : β ββα΅’[β] β} (h : f 1 = 1) (z : β) : (f z).re = z.re := by
apply LinearIsometry.re_apply_eq_re_of_add_conj_eq
intro z
apply LinearIsometry.im_apply_eq_im h
#align linear_isometry.re_apply_eq_re LinearIsometry.re_apply_eq_re
| Mathlib/Analysis/Complex/Isometry.lean | 125 | 139 | theorem linear_isometry_complex_aux {f : β ββα΅’[β] β} (h : f 1 = 1) :
f = LinearIsometryEquiv.refl β β β¨ f = conjLIE := by |
have h0 : f I = I β¨ f I = -I := by
simp only [ext_iff, β and_or_left, neg_re, I_re, neg_im, neg_zero]
constructor
Β· rw [β I_re]
exact @LinearIsometry.re_apply_eq_re f.toLinearIsometry h I
Β· apply @LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re f.toLinearIsometry
intro z
rw [@LinearIsometry.re_apply_eq_re f.toLinearIsometry h]
refine h0.imp (fun h' : f I = I => ?_) fun h' : f I = -I => ?_ <;>
Β· apply LinearIsometryEquiv.toLinearEquiv_injective
apply Complex.basisOneI.ext'
intro i
fin_cases i <;> simp [h, h']
| 1,848 |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : Matrix (Sum l l) (Sum l l) R :=
Matrix.fromBlocks 0 (-1) 1 0
set_option linter.uppercaseLean3 false in
#align matrix.J Matrix.J
@[simp]
| Mathlib/LinearAlgebra/SymplecticGroup.lean | 43 | 46 | theorem J_transpose : (J l R)α΅ = -J l R := by |
rw [J, fromBlocks_transpose, β neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l β l) (l β l) R),
fromBlocks_smul, Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]
simp [fromBlocks]
| 1,849 |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : Matrix (Sum l l) (Sum l l) R :=
Matrix.fromBlocks 0 (-1) 1 0
set_option linter.uppercaseLean3 false in
#align matrix.J Matrix.J
@[simp]
theorem J_transpose : (J l R)α΅ = -J l R := by
rw [J, fromBlocks_transpose, β neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l β l) (l β l) R),
fromBlocks_smul, Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]
simp [fromBlocks]
set_option linter.uppercaseLean3 false in
#align matrix.J_transpose Matrix.J_transpose
variable [Fintype l]
| Mathlib/LinearAlgebra/SymplecticGroup.lean | 52 | 55 | theorem J_squared : J l R * J l R = -1 := by |
rw [J, fromBlocks_multiply]
simp only [Matrix.zero_mul, Matrix.neg_mul, zero_add, neg_zero, Matrix.one_mul, add_zero]
rw [β neg_zero, β Matrix.fromBlocks_neg, β fromBlocks_one]
| 1,849 |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : Matrix (Sum l l) (Sum l l) R :=
Matrix.fromBlocks 0 (-1) 1 0
set_option linter.uppercaseLean3 false in
#align matrix.J Matrix.J
@[simp]
theorem J_transpose : (J l R)α΅ = -J l R := by
rw [J, fromBlocks_transpose, β neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l β l) (l β l) R),
fromBlocks_smul, Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]
simp [fromBlocks]
set_option linter.uppercaseLean3 false in
#align matrix.J_transpose Matrix.J_transpose
variable [Fintype l]
theorem J_squared : J l R * J l R = -1 := by
rw [J, fromBlocks_multiply]
simp only [Matrix.zero_mul, Matrix.neg_mul, zero_add, neg_zero, Matrix.one_mul, add_zero]
rw [β neg_zero, β Matrix.fromBlocks_neg, β fromBlocks_one]
set_option linter.uppercaseLean3 false in
#align matrix.J_squared Matrix.J_squared
| Mathlib/LinearAlgebra/SymplecticGroup.lean | 59 | 62 | theorem J_inv : (J l R)β»ΒΉ = -J l R := by |
refine Matrix.inv_eq_right_inv ?_
rw [Matrix.mul_neg, J_squared]
exact neg_neg 1
| 1,849 |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : Matrix (Sum l l) (Sum l l) R :=
Matrix.fromBlocks 0 (-1) 1 0
set_option linter.uppercaseLean3 false in
#align matrix.J Matrix.J
@[simp]
theorem J_transpose : (J l R)α΅ = -J l R := by
rw [J, fromBlocks_transpose, β neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l β l) (l β l) R),
fromBlocks_smul, Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]
simp [fromBlocks]
set_option linter.uppercaseLean3 false in
#align matrix.J_transpose Matrix.J_transpose
variable [Fintype l]
theorem J_squared : J l R * J l R = -1 := by
rw [J, fromBlocks_multiply]
simp only [Matrix.zero_mul, Matrix.neg_mul, zero_add, neg_zero, Matrix.one_mul, add_zero]
rw [β neg_zero, β Matrix.fromBlocks_neg, β fromBlocks_one]
set_option linter.uppercaseLean3 false in
#align matrix.J_squared Matrix.J_squared
theorem J_inv : (J l R)β»ΒΉ = -J l R := by
refine Matrix.inv_eq_right_inv ?_
rw [Matrix.mul_neg, J_squared]
exact neg_neg 1
set_option linter.uppercaseLean3 false in
#align matrix.J_inv Matrix.J_inv
| Mathlib/LinearAlgebra/SymplecticGroup.lean | 66 | 70 | theorem J_det_mul_J_det : det (J l R) * det (J l R) = 1 := by |
rw [β det_mul, J_squared, β one_smul R (-1 : Matrix _ _ R), smul_neg, β neg_smul, det_smul,
Fintype.card_sum, det_one, mul_one]
apply Even.neg_one_pow
exact even_add_self _
| 1,849 |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import linear_algebra.matrix.to_linear_equiv from "leanprover-community/mathlib"@"e42cfdb03b7902f8787a1eb552cb8f77766b45b9"
variable {n : Type*} [Fintype n]
namespace Matrix
section LinearEquiv
open LinearMap
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
section Nondegenerate
open Matrix
| Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 114 | 132 | theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by |
constructor
Β· rintro β¨v, hv, mul_eqβ©
contrapose! hv
exact eq_zero_of_mulVec_eq_zero hv mul_eq
Β· contrapose!
intro h
have : Function.Injective (Matrix.toLin' M) := by
simpa only [β LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h
have :
M *
LinearMap.toMatrix'
((LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).symm : (n β K) ββ[K] n β K) =
1 := by
refine Matrix.toLin'.injective (LinearMap.ext fun v => ?_)
rw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]
exact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v
exact Matrix.det_ne_zero_of_right_inverse this
| 1,850 |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import linear_algebra.matrix.to_linear_equiv from "leanprover-community/mathlib"@"e42cfdb03b7902f8787a1eb552cb8f77766b45b9"
variable {n : Type*} [Fintype n]
namespace Matrix
section LinearEquiv
open LinearMap
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
section Nondegenerate
open Matrix
theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by
constructor
Β· rintro β¨v, hv, mul_eqβ©
contrapose! hv
exact eq_zero_of_mulVec_eq_zero hv mul_eq
Β· contrapose!
intro h
have : Function.Injective (Matrix.toLin' M) := by
simpa only [β LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h
have :
M *
LinearMap.toMatrix'
((LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).symm : (n β K) ββ[K] n β K) =
1 := by
refine Matrix.toLin'.injective (LinearMap.ext fun v => ?_)
rw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]
exact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v
exact Matrix.det_ne_zero_of_right_inverse this
#align matrix.exists_mul_vec_eq_zero_iff_aux Matrix.exists_mulVec_eq_zero_iff_aux
| Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 135 | 167 | theorem exists_mulVec_eq_zero_iff' {A : Type*} (K : Type*) [DecidableEq n] [CommRing A]
[Nontrivial A] [Field K] [Algebra A K] [IsFractionRing A K] {M : Matrix n n A} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by |
have : (β v β 0, (algebraMap A K).mapMatrix M *α΅₯ v = 0) β _ :=
exists_mulVec_eq_zero_iff_aux
rw [β RingHom.map_det, IsFractionRing.to_map_eq_zero_iff] at this
refine Iff.trans ?_ this; constructor <;> rintro β¨v, hv, mul_eqβ©
Β· refine β¨fun i => algebraMap _ _ (v i), mt (fun h => funext fun i => ?_) hv, ?_β©
Β· exact IsFractionRing.to_map_eq_zero_iff.mp (congr_fun h i)
Β· ext i
refine (RingHom.map_mulVec _ _ _ i).symm.trans ?_
rw [mul_eq, Pi.zero_apply, RingHom.map_zero, Pi.zero_apply]
Β· letI := Classical.decEq K
obtain β¨β¨b, hbβ©, ba_eqβ© :=
IsLocalization.exist_integer_multiples_of_finset (nonZeroDivisors A) (Finset.univ.image v)
choose f hf using ba_eq
refine
β¨fun i => f _ (Finset.mem_image.mpr β¨i, Finset.mem_univ i, rflβ©),
mt (fun h => funext fun i => ?_) hv, ?_β©
Β· have := congr_arg (algebraMap A K) (congr_fun h i)
rw [hf, Subtype.coe_mk, Pi.zero_apply, RingHom.map_zero, Algebra.smul_def, mul_eq_zero,
IsFractionRing.to_map_eq_zero_iff] at this
exact this.resolve_left (nonZeroDivisors.ne_zero hb)
Β· ext i
refine IsFractionRing.injective A K ?_
calc
algebraMap A K ((M *α΅₯ (fun i : n => f (v i) _)) i) =
((algebraMap A K).mapMatrix M *α΅₯ algebraMap _ K b β’ v) i := ?_
_ = 0 := ?_
_ = algebraMap A K 0 := (RingHom.map_zero _).symm
Β· simp_rw [RingHom.map_mulVec, mulVec, dotProduct, Function.comp_apply, hf,
RingHom.mapMatrix_apply, Pi.smul_apply, smul_eq_mul, Algebra.smul_def]
Β· rw [mulVec_smul, mul_eq, Pi.smul_apply, Pi.zero_apply, smul_zero]
| 1,850 |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import linear_algebra.matrix.to_linear_equiv from "leanprover-community/mathlib"@"e42cfdb03b7902f8787a1eb552cb8f77766b45b9"
variable {n : Type*} [Fintype n]
namespace Matrix
section LinearEquiv
open LinearMap
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
section Nondegenerate
open Matrix
theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by
constructor
Β· rintro β¨v, hv, mul_eqβ©
contrapose! hv
exact eq_zero_of_mulVec_eq_zero hv mul_eq
Β· contrapose!
intro h
have : Function.Injective (Matrix.toLin' M) := by
simpa only [β LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h
have :
M *
LinearMap.toMatrix'
((LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).symm : (n β K) ββ[K] n β K) =
1 := by
refine Matrix.toLin'.injective (LinearMap.ext fun v => ?_)
rw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]
exact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v
exact Matrix.det_ne_zero_of_right_inverse this
#align matrix.exists_mul_vec_eq_zero_iff_aux Matrix.exists_mulVec_eq_zero_iff_aux
theorem exists_mulVec_eq_zero_iff' {A : Type*} (K : Type*) [DecidableEq n] [CommRing A]
[Nontrivial A] [Field K] [Algebra A K] [IsFractionRing A K] {M : Matrix n n A} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by
have : (β v β 0, (algebraMap A K).mapMatrix M *α΅₯ v = 0) β _ :=
exists_mulVec_eq_zero_iff_aux
rw [β RingHom.map_det, IsFractionRing.to_map_eq_zero_iff] at this
refine Iff.trans ?_ this; constructor <;> rintro β¨v, hv, mul_eqβ©
Β· refine β¨fun i => algebraMap _ _ (v i), mt (fun h => funext fun i => ?_) hv, ?_β©
Β· exact IsFractionRing.to_map_eq_zero_iff.mp (congr_fun h i)
Β· ext i
refine (RingHom.map_mulVec _ _ _ i).symm.trans ?_
rw [mul_eq, Pi.zero_apply, RingHom.map_zero, Pi.zero_apply]
Β· letI := Classical.decEq K
obtain β¨β¨b, hbβ©, ba_eqβ© :=
IsLocalization.exist_integer_multiples_of_finset (nonZeroDivisors A) (Finset.univ.image v)
choose f hf using ba_eq
refine
β¨fun i => f _ (Finset.mem_image.mpr β¨i, Finset.mem_univ i, rflβ©),
mt (fun h => funext fun i => ?_) hv, ?_β©
Β· have := congr_arg (algebraMap A K) (congr_fun h i)
rw [hf, Subtype.coe_mk, Pi.zero_apply, RingHom.map_zero, Algebra.smul_def, mul_eq_zero,
IsFractionRing.to_map_eq_zero_iff] at this
exact this.resolve_left (nonZeroDivisors.ne_zero hb)
Β· ext i
refine IsFractionRing.injective A K ?_
calc
algebraMap A K ((M *α΅₯ (fun i : n => f (v i) _)) i) =
((algebraMap A K).mapMatrix M *α΅₯ algebraMap _ K b β’ v) i := ?_
_ = 0 := ?_
_ = algebraMap A K 0 := (RingHom.map_zero _).symm
Β· simp_rw [RingHom.map_mulVec, mulVec, dotProduct, Function.comp_apply, hf,
RingHom.mapMatrix_apply, Pi.smul_apply, smul_eq_mul, Algebra.smul_def]
Β· rw [mulVec_smul, mul_eq, Pi.smul_apply, Pi.zero_apply, smul_zero]
#align matrix.exists_mul_vec_eq_zero_iff' Matrix.exists_mulVec_eq_zero_iff'
theorem exists_mulVec_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : (β v β 0, M *α΅₯ v = 0) β M.det = 0 :=
exists_mulVec_eq_zero_iff' (FractionRing A)
#align matrix.exists_mul_vec_eq_zero_iff Matrix.exists_mulVec_eq_zero_iff
| Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 175 | 177 | theorem exists_vecMul_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : (β v β 0, v α΅₯* M = 0) β M.det = 0 := by |
simpa only [β M.det_transpose, β mulVec_transpose] using exists_mulVec_eq_zero_iff
| 1,850 |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
#align_import linear_algebra.matrix.to_linear_equiv from "leanprover-community/mathlib"@"e42cfdb03b7902f8787a1eb552cb8f77766b45b9"
variable {n : Type*} [Fintype n]
namespace Matrix
section LinearEquiv
open LinearMap
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
section Nondegenerate
open Matrix
theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by
constructor
Β· rintro β¨v, hv, mul_eqβ©
contrapose! hv
exact eq_zero_of_mulVec_eq_zero hv mul_eq
Β· contrapose!
intro h
have : Function.Injective (Matrix.toLin' M) := by
simpa only [β LinearMap.ker_eq_bot, ker_toLin'_eq_bot_iff, not_imp_not] using h
have :
M *
LinearMap.toMatrix'
((LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).symm : (n β K) ββ[K] n β K) =
1 := by
refine Matrix.toLin'.injective (LinearMap.ext fun v => ?_)
rw [Matrix.toLin'_mul, Matrix.toLin'_one, Matrix.toLin'_toMatrix', LinearMap.comp_apply]
exact (LinearEquiv.ofInjectiveEndo (Matrix.toLin' M) this).apply_symm_apply v
exact Matrix.det_ne_zero_of_right_inverse this
#align matrix.exists_mul_vec_eq_zero_iff_aux Matrix.exists_mulVec_eq_zero_iff_aux
theorem exists_mulVec_eq_zero_iff' {A : Type*} (K : Type*) [DecidableEq n] [CommRing A]
[Nontrivial A] [Field K] [Algebra A K] [IsFractionRing A K] {M : Matrix n n A} :
(β v β 0, M *α΅₯ v = 0) β M.det = 0 := by
have : (β v β 0, (algebraMap A K).mapMatrix M *α΅₯ v = 0) β _ :=
exists_mulVec_eq_zero_iff_aux
rw [β RingHom.map_det, IsFractionRing.to_map_eq_zero_iff] at this
refine Iff.trans ?_ this; constructor <;> rintro β¨v, hv, mul_eqβ©
Β· refine β¨fun i => algebraMap _ _ (v i), mt (fun h => funext fun i => ?_) hv, ?_β©
Β· exact IsFractionRing.to_map_eq_zero_iff.mp (congr_fun h i)
Β· ext i
refine (RingHom.map_mulVec _ _ _ i).symm.trans ?_
rw [mul_eq, Pi.zero_apply, RingHom.map_zero, Pi.zero_apply]
Β· letI := Classical.decEq K
obtain β¨β¨b, hbβ©, ba_eqβ© :=
IsLocalization.exist_integer_multiples_of_finset (nonZeroDivisors A) (Finset.univ.image v)
choose f hf using ba_eq
refine
β¨fun i => f _ (Finset.mem_image.mpr β¨i, Finset.mem_univ i, rflβ©),
mt (fun h => funext fun i => ?_) hv, ?_β©
Β· have := congr_arg (algebraMap A K) (congr_fun h i)
rw [hf, Subtype.coe_mk, Pi.zero_apply, RingHom.map_zero, Algebra.smul_def, mul_eq_zero,
IsFractionRing.to_map_eq_zero_iff] at this
exact this.resolve_left (nonZeroDivisors.ne_zero hb)
Β· ext i
refine IsFractionRing.injective A K ?_
calc
algebraMap A K ((M *α΅₯ (fun i : n => f (v i) _)) i) =
((algebraMap A K).mapMatrix M *α΅₯ algebraMap _ K b β’ v) i := ?_
_ = 0 := ?_
_ = algebraMap A K 0 := (RingHom.map_zero _).symm
Β· simp_rw [RingHom.map_mulVec, mulVec, dotProduct, Function.comp_apply, hf,
RingHom.mapMatrix_apply, Pi.smul_apply, smul_eq_mul, Algebra.smul_def]
Β· rw [mulVec_smul, mul_eq, Pi.smul_apply, Pi.zero_apply, smul_zero]
#align matrix.exists_mul_vec_eq_zero_iff' Matrix.exists_mulVec_eq_zero_iff'
theorem exists_mulVec_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : (β v β 0, M *α΅₯ v = 0) β M.det = 0 :=
exists_mulVec_eq_zero_iff' (FractionRing A)
#align matrix.exists_mul_vec_eq_zero_iff Matrix.exists_mulVec_eq_zero_iff
theorem exists_vecMul_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : (β v β 0, v α΅₯* M = 0) β M.det = 0 := by
simpa only [β M.det_transpose, β mulVec_transpose] using exists_mulVec_eq_zero_iff
#align matrix.exists_vec_mul_eq_zero_iff Matrix.exists_vecMul_eq_zero_iff
| Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 180 | 190 | theorem nondegenerate_iff_det_ne_zero {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : Nondegenerate M β M.det β 0 := by |
rw [ne_eq, β exists_vecMul_eq_zero_iff]
push_neg
constructor
Β· intro hM v hv hMv
obtain β¨w, hwMvβ© := hM.exists_not_ortho_of_ne_zero hv
simp [dotProduct_mulVec, hMv, zero_dotProduct, ne_eq, not_true] at hwMv
Β· intro h v hv
refine not_imp_not.mp (h v) (funext fun i => ?_)
simpa only [dotProduct_mulVec, dotProduct_single, mul_one] using hv (Pi.single i 1)
| 1,850 |
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.LinearAlgebra.Matrix.Basis
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.LinearAlgebra.SesquilinearForm
import Mathlib.LinearAlgebra.Basis.Bilinear
#align_import linear_algebra.matrix.sesquilinear_form from "leanprover-community/mathlib"@"84582d2872fb47c0c17eec7382dc097c9ec7137a"
variable {R Rβ Rβ M Mβ Mβ Mβ' Mβ' n m n' m' ΞΉ : Type*}
open Finset LinearMap Matrix
open Matrix
section AuxToLinearMap
variable [CommSemiring R] [Semiring Rβ] [Semiring Rβ]
variable [Fintype n] [Fintype m]
variable (Οβ : Rβ β+* R) (Οβ : Rβ β+* R)
def Matrix.toLinearMapβ'Aux (f : Matrix n m R) : (n β Rβ) βββ[Οβ] (m β Rβ) βββ[Οβ] R :=
-- Porting note: we don't seem to have `β i j` as valid notation yet
mkβ'ββ Οβ Οβ (fun (v : n β Rβ) (w : m β Rβ) => β i, β j, Οβ (v i) * f i j * Οβ (w j))
(fun _ _ _ => by simp only [Pi.add_apply, map_add, add_mul, sum_add_distrib])
(fun _ _ _ => by simp only [Pi.smul_apply, smul_eq_mul, RingHom.map_mul, mul_assoc, mul_sum])
(fun _ _ _ => by simp only [Pi.add_apply, map_add, mul_add, sum_add_distrib]) fun _ _ _ => by
simp only [Pi.smul_apply, smul_eq_mul, RingHom.map_mul, mul_assoc, mul_left_comm, mul_sum]
#align matrix.to_linear_mapβ'_aux Matrix.toLinearMapβ'Aux
variable [DecidableEq n] [DecidableEq m]
| Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean | 66 | 74 | theorem Matrix.toLinearMapβ'Aux_stdBasis (f : Matrix n m R) (i : n) (j : m) :
f.toLinearMapβ'Aux Οβ Οβ (LinearMap.stdBasis Rβ (fun _ => Rβ) i 1)
(LinearMap.stdBasis Rβ (fun _ => Rβ) j 1) = f i j := by |
rw [Matrix.toLinearMapβ'Aux, mkβ'ββ_apply]
have : (β i', β j', (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j := by
simp_rw [mul_assoc, β Finset.mul_sum]
simp only [boole_mul, Finset.sum_ite_eq, Finset.mem_univ, if_true, mul_comm (f _ _)]
rw [β this]
exact Finset.sum_congr rfl fun _ _ => Finset.sum_congr rfl fun _ _ => by simp
| 1,851 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 98 | 100 | theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by |
simp only [polar, Pi.add_apply]
abel
| 1,852 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by
simp only [polar, Pi.add_apply]
abel
#align quadratic_form.polar_add QuadraticForm.polar_add
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 103 | 104 | theorem polar_neg (f : M β R) (x y : M) : polar (-f) x y = -polar f x y := by |
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
| 1,852 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by
simp only [polar, Pi.add_apply]
abel
#align quadratic_form.polar_add QuadraticForm.polar_add
theorem polar_neg (f : M β R) (x y : M) : polar (-f) x y = -polar f x y := by
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
#align quadratic_form.polar_neg QuadraticForm.polar_neg
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 107 | 108 | theorem polar_smul [Monoid S] [DistribMulAction S R] (f : M β R) (s : S) (x y : M) :
polar (s β’ f) x y = s β’ polar f x y := by | simp only [polar, Pi.smul_apply, smul_sub]
| 1,852 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by
simp only [polar, Pi.add_apply]
abel
#align quadratic_form.polar_add QuadraticForm.polar_add
theorem polar_neg (f : M β R) (x y : M) : polar (-f) x y = -polar f x y := by
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
#align quadratic_form.polar_neg QuadraticForm.polar_neg
theorem polar_smul [Monoid S] [DistribMulAction S R] (f : M β R) (s : S) (x y : M) :
polar (s β’ f) x y = s β’ polar f x y := by simp only [polar, Pi.smul_apply, smul_sub]
#align quadratic_form.polar_smul QuadraticForm.polar_smul
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 111 | 112 | theorem polar_comm (f : M β R) (x y : M) : polar f x y = polar f y x := by |
rw [polar, polar, add_comm, sub_sub, sub_sub, add_comm (f x) (f y)]
| 1,852 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by
simp only [polar, Pi.add_apply]
abel
#align quadratic_form.polar_add QuadraticForm.polar_add
theorem polar_neg (f : M β R) (x y : M) : polar (-f) x y = -polar f x y := by
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
#align quadratic_form.polar_neg QuadraticForm.polar_neg
theorem polar_smul [Monoid S] [DistribMulAction S R] (f : M β R) (s : S) (x y : M) :
polar (s β’ f) x y = s β’ polar f x y := by simp only [polar, Pi.smul_apply, smul_sub]
#align quadratic_form.polar_smul QuadraticForm.polar_smul
theorem polar_comm (f : M β R) (x y : M) : polar f x y = polar f y x := by
rw [polar, polar, add_comm, sub_sub, sub_sub, add_comm (f x) (f y)]
#align quadratic_form.polar_comm QuadraticForm.polar_comm
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 116 | 123 | theorem polar_add_left_iff {f : M β R} {x x' y : M} :
polar f (x + x') y = polar f x y + polar f x' y β
f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x) := by |
simp only [β add_assoc]
simp only [polar, sub_eq_iff_eq_add, eq_sub_iff_add_eq, sub_add_eq_add_sub, add_sub]
simp only [add_right_comm _ (f y) _, add_right_comm _ (f x') (f x)]
rw [add_comm y x, add_right_comm _ _ (f (x + y)), add_comm _ (f (x + y)),
add_right_comm (f (x + y)), add_left_inj]
| 1,852 |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : Type*}
variable {R : Type*} {M N : Type*}
open LinearMap (BilinForm)
section Polar
variable [CommRing R] [AddCommGroup M]
namespace QuadraticForm
def polar (f : M β R) (x y : M) :=
f (x + y) - f x - f y
#align quadratic_form.polar QuadraticForm.polar
theorem polar_add (f g : M β R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by
simp only [polar, Pi.add_apply]
abel
#align quadratic_form.polar_add QuadraticForm.polar_add
theorem polar_neg (f : M β R) (x y : M) : polar (-f) x y = -polar f x y := by
simp only [polar, Pi.neg_apply, sub_eq_add_neg, neg_add]
#align quadratic_form.polar_neg QuadraticForm.polar_neg
theorem polar_smul [Monoid S] [DistribMulAction S R] (f : M β R) (s : S) (x y : M) :
polar (s β’ f) x y = s β’ polar f x y := by simp only [polar, Pi.smul_apply, smul_sub]
#align quadratic_form.polar_smul QuadraticForm.polar_smul
theorem polar_comm (f : M β R) (x y : M) : polar f x y = polar f y x := by
rw [polar, polar, add_comm, sub_sub, sub_sub, add_comm (f x) (f y)]
#align quadratic_form.polar_comm QuadraticForm.polar_comm
theorem polar_add_left_iff {f : M β R} {x x' y : M} :
polar f (x + x') y = polar f x y + polar f x' y β
f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x) := by
simp only [β add_assoc]
simp only [polar, sub_eq_iff_eq_add, eq_sub_iff_add_eq, sub_add_eq_add_sub, add_sub]
simp only [add_right_comm _ (f y) _, add_right_comm _ (f x') (f x)]
rw [add_comm y x, add_right_comm _ _ (f (x + y)), add_comm _ (f (x + y)),
add_right_comm (f (x + y)), add_left_inj]
#align quadratic_form.polar_add_left_iff QuadraticForm.polar_add_left_iff
| Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 126 | 129 | theorem polar_comp {F : Type*} [CommRing S] [FunLike F R S] [AddMonoidHomClass F R S]
(f : M β R) (g : F) (x y : M) :
polar (g β f) x y = g (polar f x y) := by |
simp only [polar, Pi.smul_apply, Function.comp_apply, map_sub]
| 1,852 |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uMβ uMβ
variable {R : Type uR} {A : Type uA} {Mβ : Type uMβ} {Mβ : Type uMβ}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommRing A]
variable [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Algebra R A] [Module R Mβ] [Module A Mβ]
variable [SMulCommClass R A Mβ] [SMulCommClass A R Mβ] [IsScalarTower R A Mβ]
variable [Module R Mβ] [Invertible (2 : R)]
variable (R A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def tensorDistrib :
QuadraticForm A Mβ β[R] QuadraticForm R Mβ ββ[A] QuadraticForm A (Mβ β[R] Mβ) :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
-- while `letI`s would produce a better term than `let`, they would make this already-slow
-- definition even slower.
let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ)
let tmulB := BilinForm.tensorDistrib R A (Mβ := Mβ) (Mβ := Mβ)
let toB := AlgebraTensorModule.map
(QuadraticForm.associated : QuadraticForm A Mβ ββ[A] BilinForm A Mβ)
(QuadraticForm.associated : QuadraticForm R Mβ ββ[R] BilinForm R Mβ)
toQ ββ tmulB ββ toB
-- TODO: make the RHS `MulOpposite.op (Qβ mβ) β’ Qβ mβ` so that this has a nicer defeq for
-- `R = A` of `Qβ mβ * Qβ mβ`.
@[simp]
theorem tensorDistrib_tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) (mβ : Mβ) (mβ : Mβ) :
tensorDistrib R A (Qβ ββ Qβ) (mβ ββ mβ) = Qβ mβ β’ Qβ mβ :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
(BilinForm.tensorDistrib_tmul _ _ _ _ _ _).trans <| congr_argβ _
(associated_eq_self_apply _ _ _) (associated_eq_self_apply _ _ _)
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable abbrev tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
QuadraticForm A (Mβ β[R] Mβ) :=
tensorDistrib R A (Qβ ββ[R] Qβ)
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 69 | 75 | theorem associated_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
associated (R := A) (Qβ.tmul Qβ)
= (associated (R := A) Qβ).tmul (associated (R := R) Qβ) := by |
rw [QuadraticForm.tmul, tensorDistrib, BilinForm.tmul]
dsimp
have : Subsingleton (Invertible (2 : A)) := inferInstance
convert associated_left_inverse A ((associated_isSymm A Qβ).tmul (associated_isSymm R Qβ))
| 1,853 |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uMβ uMβ
variable {R : Type uR} {A : Type uA} {Mβ : Type uMβ} {Mβ : Type uMβ}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommRing A]
variable [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Algebra R A] [Module R Mβ] [Module A Mβ]
variable [SMulCommClass R A Mβ] [SMulCommClass A R Mβ] [IsScalarTower R A Mβ]
variable [Module R Mβ] [Invertible (2 : R)]
variable (R A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def tensorDistrib :
QuadraticForm A Mβ β[R] QuadraticForm R Mβ ββ[A] QuadraticForm A (Mβ β[R] Mβ) :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
-- while `letI`s would produce a better term than `let`, they would make this already-slow
-- definition even slower.
let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ)
let tmulB := BilinForm.tensorDistrib R A (Mβ := Mβ) (Mβ := Mβ)
let toB := AlgebraTensorModule.map
(QuadraticForm.associated : QuadraticForm A Mβ ββ[A] BilinForm A Mβ)
(QuadraticForm.associated : QuadraticForm R Mβ ββ[R] BilinForm R Mβ)
toQ ββ tmulB ββ toB
-- TODO: make the RHS `MulOpposite.op (Qβ mβ) β’ Qβ mβ` so that this has a nicer defeq for
-- `R = A` of `Qβ mβ * Qβ mβ`.
@[simp]
theorem tensorDistrib_tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) (mβ : Mβ) (mβ : Mβ) :
tensorDistrib R A (Qβ ββ Qβ) (mβ ββ mβ) = Qβ mβ β’ Qβ mβ :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
(BilinForm.tensorDistrib_tmul _ _ _ _ _ _).trans <| congr_argβ _
(associated_eq_self_apply _ _ _) (associated_eq_self_apply _ _ _)
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable abbrev tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
QuadraticForm A (Mβ β[R] Mβ) :=
tensorDistrib R A (Qβ ββ[R] Qβ)
theorem associated_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
associated (R := A) (Qβ.tmul Qβ)
= (associated (R := A) Qβ).tmul (associated (R := R) Qβ) := by
rw [QuadraticForm.tmul, tensorDistrib, BilinForm.tmul]
dsimp
have : Subsingleton (Invertible (2 : A)) := inferInstance
convert associated_left_inverse A ((associated_isSymm A Qβ).tmul (associated_isSymm R Qβ))
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 77 | 82 | theorem polarBilin_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
polarBilin (Qβ.tmul Qβ) = β
(2 : A) β’ (polarBilin Qβ).tmul (polarBilin Qβ) := by |
simp_rw [β two_nsmul_associated A, β two_nsmul_associated R, BilinForm.tmul, tmul_smul,
β smul_tmul', map_nsmul, associated_tmul]
rw [smul_comm (_ : A) (_ : β), β smul_assoc, two_smul _ (_ : A), invOf_two_add_invOf_two,
one_smul]
| 1,853 |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uMβ uMβ
variable {R : Type uR} {A : Type uA} {Mβ : Type uMβ} {Mβ : Type uMβ}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommRing A]
variable [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Algebra R A] [Module R Mβ] [Module A Mβ]
variable [SMulCommClass R A Mβ] [SMulCommClass A R Mβ] [IsScalarTower R A Mβ]
variable [Module R Mβ] [Invertible (2 : R)]
variable (R A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def tensorDistrib :
QuadraticForm A Mβ β[R] QuadraticForm R Mβ ββ[A] QuadraticForm A (Mβ β[R] Mβ) :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
-- while `letI`s would produce a better term than `let`, they would make this already-slow
-- definition even slower.
let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ)
let tmulB := BilinForm.tensorDistrib R A (Mβ := Mβ) (Mβ := Mβ)
let toB := AlgebraTensorModule.map
(QuadraticForm.associated : QuadraticForm A Mβ ββ[A] BilinForm A Mβ)
(QuadraticForm.associated : QuadraticForm R Mβ ββ[R] BilinForm R Mβ)
toQ ββ tmulB ββ toB
-- TODO: make the RHS `MulOpposite.op (Qβ mβ) β’ Qβ mβ` so that this has a nicer defeq for
-- `R = A` of `Qβ mβ * Qβ mβ`.
@[simp]
theorem tensorDistrib_tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) (mβ : Mβ) (mβ : Mβ) :
tensorDistrib R A (Qβ ββ Qβ) (mβ ββ mβ) = Qβ mβ β’ Qβ mβ :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
(BilinForm.tensorDistrib_tmul _ _ _ _ _ _).trans <| congr_argβ _
(associated_eq_self_apply _ _ _) (associated_eq_self_apply _ _ _)
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable abbrev tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
QuadraticForm A (Mβ β[R] Mβ) :=
tensorDistrib R A (Qβ ββ[R] Qβ)
theorem associated_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
associated (R := A) (Qβ.tmul Qβ)
= (associated (R := A) Qβ).tmul (associated (R := R) Qβ) := by
rw [QuadraticForm.tmul, tensorDistrib, BilinForm.tmul]
dsimp
have : Subsingleton (Invertible (2 : A)) := inferInstance
convert associated_left_inverse A ((associated_isSymm A Qβ).tmul (associated_isSymm R Qβ))
theorem polarBilin_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
polarBilin (Qβ.tmul Qβ) = β
(2 : A) β’ (polarBilin Qβ).tmul (polarBilin Qβ) := by
simp_rw [β two_nsmul_associated A, β two_nsmul_associated R, BilinForm.tmul, tmul_smul,
β smul_tmul', map_nsmul, associated_tmul]
rw [smul_comm (_ : A) (_ : β), β smul_assoc, two_smul _ (_ : A), invOf_two_add_invOf_two,
one_smul]
variable (A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable def baseChange (Q : QuadraticForm R Mβ) : QuadraticForm A (A β[R] Mβ) :=
QuadraticForm.tmul (R := R) (A := A) (Mβ := A) (Mβ := Mβ) (QuadraticForm.sq (R := A)) Q
@[simp]
theorem baseChange_tmul (Q : QuadraticForm R Mβ) (a : A) (mβ : Mβ) :
Q.baseChange A (a ββ mβ) = Q mβ β’ (a * a) :=
tensorDistrib_tmul _ _ _ _
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 95 | 99 | theorem associated_baseChange [Invertible (2 : A)] (Q : QuadraticForm R Mβ) :
associated (R := A) (Q.baseChange A) = (associated (R := R) Q).baseChange A := by |
dsimp only [QuadraticForm.baseChange, LinearMap.baseChange]
rw [associated_tmul (QuadraticForm.sq (R := A)) Q, associated_sq]
exact rfl
| 1,853 |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uMβ uMβ
variable {R : Type uR} {A : Type uA} {Mβ : Type uMβ} {Mβ : Type uMβ}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommRing A]
variable [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Algebra R A] [Module R Mβ] [Module A Mβ]
variable [SMulCommClass R A Mβ] [SMulCommClass A R Mβ] [IsScalarTower R A Mβ]
variable [Module R Mβ] [Invertible (2 : R)]
variable (R A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def tensorDistrib :
QuadraticForm A Mβ β[R] QuadraticForm R Mβ ββ[A] QuadraticForm A (Mβ β[R] Mβ) :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
-- while `letI`s would produce a better term than `let`, they would make this already-slow
-- definition even slower.
let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ)
let tmulB := BilinForm.tensorDistrib R A (Mβ := Mβ) (Mβ := Mβ)
let toB := AlgebraTensorModule.map
(QuadraticForm.associated : QuadraticForm A Mβ ββ[A] BilinForm A Mβ)
(QuadraticForm.associated : QuadraticForm R Mβ ββ[R] BilinForm R Mβ)
toQ ββ tmulB ββ toB
-- TODO: make the RHS `MulOpposite.op (Qβ mβ) β’ Qβ mβ` so that this has a nicer defeq for
-- `R = A` of `Qβ mβ * Qβ mβ`.
@[simp]
theorem tensorDistrib_tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) (mβ : Mβ) (mβ : Mβ) :
tensorDistrib R A (Qβ ββ Qβ) (mβ ββ mβ) = Qβ mβ β’ Qβ mβ :=
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
(BilinForm.tensorDistrib_tmul _ _ _ _ _ _).trans <| congr_argβ _
(associated_eq_self_apply _ _ _) (associated_eq_self_apply _ _ _)
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable abbrev tmul (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
QuadraticForm A (Mβ β[R] Mβ) :=
tensorDistrib R A (Qβ ββ[R] Qβ)
theorem associated_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
associated (R := A) (Qβ.tmul Qβ)
= (associated (R := A) Qβ).tmul (associated (R := R) Qβ) := by
rw [QuadraticForm.tmul, tensorDistrib, BilinForm.tmul]
dsimp
have : Subsingleton (Invertible (2 : A)) := inferInstance
convert associated_left_inverse A ((associated_isSymm A Qβ).tmul (associated_isSymm R Qβ))
theorem polarBilin_tmul [Invertible (2 : A)] (Qβ : QuadraticForm A Mβ) (Qβ : QuadraticForm R Mβ) :
polarBilin (Qβ.tmul Qβ) = β
(2 : A) β’ (polarBilin Qβ).tmul (polarBilin Qβ) := by
simp_rw [β two_nsmul_associated A, β two_nsmul_associated R, BilinForm.tmul, tmul_smul,
β smul_tmul', map_nsmul, associated_tmul]
rw [smul_comm (_ : A) (_ : β), β smul_assoc, two_smul _ (_ : A), invOf_two_add_invOf_two,
one_smul]
variable (A) in
-- `noncomputable` is a performance workaround for mathlib4#7103
protected noncomputable def baseChange (Q : QuadraticForm R Mβ) : QuadraticForm A (A β[R] Mβ) :=
QuadraticForm.tmul (R := R) (A := A) (Mβ := A) (Mβ := Mβ) (QuadraticForm.sq (R := A)) Q
@[simp]
theorem baseChange_tmul (Q : QuadraticForm R Mβ) (a : A) (mβ : Mβ) :
Q.baseChange A (a ββ mβ) = Q mβ β’ (a * a) :=
tensorDistrib_tmul _ _ _ _
theorem associated_baseChange [Invertible (2 : A)] (Q : QuadraticForm R Mβ) :
associated (R := A) (Q.baseChange A) = (associated (R := R) Q).baseChange A := by
dsimp only [QuadraticForm.baseChange, LinearMap.baseChange]
rw [associated_tmul (QuadraticForm.sq (R := A)) Q, associated_sq]
exact rfl
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 101 | 105 | theorem polarBilin_baseChange [Invertible (2 : A)] (Q : QuadraticForm R Mβ) :
polarBilin (Q.baseChange A) = (polarBilin Q).baseChange A := by |
rw [QuadraticForm.baseChange, BilinForm.baseChange, polarBilin_tmul, BilinForm.tmul,
β LinearMap.map_smul, smul_tmul', β two_nsmul_associated R, coe_associatedHom, associated_sq,
smul_comm, β smul_assoc, two_smul, invOf_two_add_invOf_two, one_smul]
| 1,853 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uMβ uMβ uMβ uMβ
variable {R : Type uR} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ}
open scoped TensorProduct
namespace QuadraticForm
variable [CommRing R]
variable [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Module R Mβ] [Module R Mβ] [Module R Mβ] [Module R Mβ] [Invertible (2 : R)]
@[simp]
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 37 | 46 | theorem tmul_comp_tensorMap
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) :
(Qβ.tmul Qβ).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Qβ.tmul Qβ := by |
have hβ : Qβ = Qβ.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
have hβ : Qβ = Qβ.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
simp [-associated_apply, hβ, hβ, associated_tmul]
| 1,854 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uMβ uMβ uMβ uMβ
variable {R : Type uR} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ}
open scoped TensorProduct
namespace QuadraticForm
variable [CommRing R]
variable [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Module R Mβ] [Module R Mβ] [Module R Mβ] [Module R Mβ] [Invertible (2 : R)]
@[simp]
theorem tmul_comp_tensorMap
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) :
(Qβ.tmul Qβ).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Qβ.tmul Qβ := by
have hβ : Qβ = Qβ.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
have hβ : Qβ = Qβ.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
simp [-associated_apply, hβ, hβ, associated_tmul]
@[simp]
theorem tmul_tensorMap_apply
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) (x : Mβ β[R] Mβ) :
Qβ.tmul Qβ (TensorProduct.map f.toLinearMap g.toLinearMap x) = Qβ.tmul Qβ x :=
DFunLike.congr_fun (tmul_comp_tensorMap f g) x
section tensorComm
@[simp]
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 79 | 85 | theorem tmul_comp_tensorComm (Qβ : QuadraticForm R Mβ) (Qβ : QuadraticForm R Mβ) :
(Qβ.tmul Qβ).comp (TensorProduct.comm R Mβ Mβ) = Qβ.tmul Qβ := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
exact mul_comm _ _
| 1,854 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uMβ uMβ uMβ uMβ
variable {R : Type uR} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ}
open scoped TensorProduct
namespace QuadraticForm
variable [CommRing R]
variable [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Module R Mβ] [Module R Mβ] [Module R Mβ] [Module R Mβ] [Invertible (2 : R)]
@[simp]
theorem tmul_comp_tensorMap
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) :
(Qβ.tmul Qβ).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Qβ.tmul Qβ := by
have hβ : Qβ = Qβ.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
have hβ : Qβ = Qβ.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
simp [-associated_apply, hβ, hβ, associated_tmul]
@[simp]
theorem tmul_tensorMap_apply
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) (x : Mβ β[R] Mβ) :
Qβ.tmul Qβ (TensorProduct.map f.toLinearMap g.toLinearMap x) = Qβ.tmul Qβ x :=
DFunLike.congr_fun (tmul_comp_tensorMap f g) x
section tensorAssoc
@[simp]
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 114 | 121 | theorem tmul_comp_tensorAssoc
(Qβ : QuadraticForm R Mβ) (Qβ : QuadraticForm R Mβ) (Qβ : QuadraticForm R Mβ) :
(Qβ.tmul (Qβ.tmul Qβ)).comp (TensorProduct.assoc R Mβ Mβ Mβ) = (Qβ.tmul Qβ).tmul Qβ := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ' mβ'' mβ''
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
exact mul_assoc _ _ _
| 1,854 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uMβ uMβ uMβ uMβ
variable {R : Type uR} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ}
open scoped TensorProduct
namespace QuadraticForm
variable [CommRing R]
variable [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Module R Mβ] [Module R Mβ] [Module R Mβ] [Module R Mβ] [Invertible (2 : R)]
@[simp]
theorem tmul_comp_tensorMap
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) :
(Qβ.tmul Qβ).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Qβ.tmul Qβ := by
have hβ : Qβ = Qβ.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
have hβ : Qβ = Qβ.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
simp [-associated_apply, hβ, hβ, associated_tmul]
@[simp]
theorem tmul_tensorMap_apply
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) (x : Mβ β[R] Mβ) :
Qβ.tmul Qβ (TensorProduct.map f.toLinearMap g.toLinearMap x) = Qβ.tmul Qβ x :=
DFunLike.congr_fun (tmul_comp_tensorMap f g) x
section tensorRId
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 153 | 159 | theorem comp_tensorRId_eq (Qβ : QuadraticForm R Mβ) :
Qβ.comp (TensorProduct.rid R Mβ) = Qβ.tmul (sq (R := R)) := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ'
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
simp [-associated_apply, one_mul]
| 1,854 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uMβ uMβ uMβ uMβ
variable {R : Type uR} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ} {Mβ : Type uMβ}
open scoped TensorProduct
namespace QuadraticForm
variable [CommRing R]
variable [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ]
variable [Module R Mβ] [Module R Mβ] [Module R Mβ] [Module R Mβ] [Invertible (2 : R)]
@[simp]
theorem tmul_comp_tensorMap
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) :
(Qβ.tmul Qβ).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Qβ.tmul Qβ := by
have hβ : Qβ = Qβ.comp f.toLinearMap := QuadraticForm.ext fun x => (f.map_app x).symm
have hβ : Qβ = Qβ.comp g.toLinearMap := QuadraticForm.ext fun x => (g.map_app x).symm
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ mβ' mβ'
simp [-associated_apply, hβ, hβ, associated_tmul]
@[simp]
theorem tmul_tensorMap_apply
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
{Qβ : QuadraticForm R Mβ} {Qβ : QuadraticForm R Mβ}
(f : Qβ βqα΅’ Qβ) (g : Qβ βqα΅’ Qβ) (x : Mβ β[R] Mβ) :
Qβ.tmul Qβ (TensorProduct.map f.toLinearMap g.toLinearMap x) = Qβ.tmul Qβ x :=
DFunLike.congr_fun (tmul_comp_tensorMap f g) x
section tensorLId
| Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 186 | 192 | theorem comp_tensorLId_eq (Qβ : QuadraticForm R Mβ) :
Qβ.comp (TensorProduct.lid R Mβ) = (sq (R := R)).tmul Qβ := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext mβ mβ'
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
simp [-associated_apply, mul_one]
| 1,854 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.TensorProduct.Opposite
import Mathlib.RingTheory.TensorProduct.Basic
variable {R A V : Type*}
variable [CommRing R] [CommRing A] [AddCommGroup V]
variable [Algebra R A] [Module R V] [Module A V] [IsScalarTower R A V]
variable [Invertible (2 : R)]
open scoped TensorProduct
namespace CliffordAlgebra
variable (A)
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def ofBaseChangeAux (Q : QuadraticForm R V) :
CliffordAlgebra Q ββ[R] CliffordAlgebra (Q.baseChange A) :=
CliffordAlgebra.lift Q <| by
refine β¨(ΞΉ (Q.baseChange A)).restrictScalars R ββ TensorProduct.mk R A V 1, fun v => ?_β©
refine (CliffordAlgebra.ΞΉ_sq_scalar (Q.baseChange A) (1 ββ v)).trans ?_
rw [QuadraticForm.baseChange_tmul, one_mul, β Algebra.algebraMap_eq_smul_one,
β IsScalarTower.algebraMap_apply]
@[simp] theorem ofBaseChangeAux_ΞΉ (Q : QuadraticForm R V) (v : V) :
ofBaseChangeAux A Q (ΞΉ Q v) = ΞΉ (Q.baseChange A) (1 ββ v) :=
CliffordAlgebra.lift_ΞΉ_apply _ _ v
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def ofBaseChange (Q : QuadraticForm R V) :
A β[R] CliffordAlgebra Q ββ[A] CliffordAlgebra (Q.baseChange A) :=
Algebra.TensorProduct.lift (Algebra.ofId _ _) (ofBaseChangeAux A Q)
fun _a _x => Algebra.commutes _ _
@[simp] theorem ofBaseChange_tmul_ΞΉ (Q : QuadraticForm R V) (z : A) (v : V) :
ofBaseChange A Q (z ββ ΞΉ Q v) = ΞΉ (Q.baseChange A) (z ββ v) := by
show algebraMap _ _ z * ofBaseChangeAux A Q (ΞΉ Q v) = ΞΉ (Q.baseChange A) (z ββ[R] v)
rw [ofBaseChangeAux_ΞΉ, β Algebra.smul_def, β map_smul, TensorProduct.smul_tmul', smul_eq_mul,
mul_one]
@[simp] theorem ofBaseChange_tmul_one (Q : QuadraticForm R V) (z : A) :
ofBaseChange A Q (z ββ 1) = algebraMap _ _ z := by
show algebraMap _ _ z * ofBaseChangeAux A Q 1 = _
rw [map_one, mul_one]
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def toBaseChange (Q : QuadraticForm R V) :
CliffordAlgebra (Q.baseChange A) ββ[A] A β[R] CliffordAlgebra Q :=
CliffordAlgebra.lift _ <| by
refine β¨TensorProduct.AlgebraTensorModule.map (LinearMap.id : A ββ[A] A) (ΞΉ Q), ?_β©
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
letI : Invertible (2 : A β[R] CliffordAlgebra Q) :=
(Invertible.map (algebraMap R _) 2).copy 2 (map_ofNat _ _).symm
suffices hpure_tensor : β v w, (1 * 1) ββ[R] (ΞΉ Q v * ΞΉ Q w) + (1 * 1) ββ[R] (ΞΉ Q w * ΞΉ Q v) =
QuadraticForm.polarBilin (Q.baseChange A) (1 ββ[R] v) (1 ββ[R] w) ββ[R] 1 by
-- the crux is that by converting to a statement about linear maps instead of quadratic forms,
-- we then have access to all the partially-applied `ext` lemmas.
rw [CliffordAlgebra.forall_mul_self_eq_iff (isUnit_of_invertible _)]
refine TensorProduct.AlgebraTensorModule.curry_injective ?_
ext v w
exact hpure_tensor v w
intros v w
rw [β TensorProduct.tmul_add, CliffordAlgebra.ΞΉ_mul_ΞΉ_add_swap,
QuadraticForm.polarBilin_baseChange, LinearMap.BilinForm.baseChange_tmul, one_mul,
TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one, QuadraticForm.polarBilin_apply_apply]
@[simp] theorem toBaseChange_ΞΉ (Q : QuadraticForm R V) (z : A) (v : V) :
toBaseChange A Q (ΞΉ (Q.baseChange A) (z ββ v)) = z ββ ΞΉ Q v :=
CliffordAlgebra.lift_ΞΉ_apply _ _ _
| Mathlib/LinearAlgebra/CliffordAlgebra/BaseChange.lean | 104 | 113 | theorem toBaseChange_comp_involute (Q : QuadraticForm R V) :
(toBaseChange A Q).comp (involute : CliffordAlgebra (Q.baseChange A) ββ[A] _) =
(Algebra.TensorProduct.map (AlgHom.id _ _) involute).comp (toBaseChange A Q) := by |
ext v
show toBaseChange A Q (involute (ΞΉ (Q.baseChange A) (1 ββ[R] v)))
= (Algebra.TensorProduct.map (AlgHom.id _ _) involute :
A β[R] CliffordAlgebra Q ββ[A] _)
(toBaseChange A Q (ΞΉ (Q.baseChange A) (1 ββ[R] v)))
rw [toBaseChange_ΞΉ, involute_ΞΉ, map_neg (toBaseChange A Q), toBaseChange_ΞΉ,
Algebra.TensorProduct.map_tmul, AlgHom.id_apply, involute_ΞΉ, TensorProduct.tmul_neg]
| 1,855 |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.TensorProduct.Opposite
import Mathlib.RingTheory.TensorProduct.Basic
variable {R A V : Type*}
variable [CommRing R] [CommRing A] [AddCommGroup V]
variable [Algebra R A] [Module R V] [Module A V] [IsScalarTower R A V]
variable [Invertible (2 : R)]
open scoped TensorProduct
namespace CliffordAlgebra
variable (A)
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def ofBaseChangeAux (Q : QuadraticForm R V) :
CliffordAlgebra Q ββ[R] CliffordAlgebra (Q.baseChange A) :=
CliffordAlgebra.lift Q <| by
refine β¨(ΞΉ (Q.baseChange A)).restrictScalars R ββ TensorProduct.mk R A V 1, fun v => ?_β©
refine (CliffordAlgebra.ΞΉ_sq_scalar (Q.baseChange A) (1 ββ v)).trans ?_
rw [QuadraticForm.baseChange_tmul, one_mul, β Algebra.algebraMap_eq_smul_one,
β IsScalarTower.algebraMap_apply]
@[simp] theorem ofBaseChangeAux_ΞΉ (Q : QuadraticForm R V) (v : V) :
ofBaseChangeAux A Q (ΞΉ Q v) = ΞΉ (Q.baseChange A) (1 ββ v) :=
CliffordAlgebra.lift_ΞΉ_apply _ _ v
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def ofBaseChange (Q : QuadraticForm R V) :
A β[R] CliffordAlgebra Q ββ[A] CliffordAlgebra (Q.baseChange A) :=
Algebra.TensorProduct.lift (Algebra.ofId _ _) (ofBaseChangeAux A Q)
fun _a _x => Algebra.commutes _ _
@[simp] theorem ofBaseChange_tmul_ΞΉ (Q : QuadraticForm R V) (z : A) (v : V) :
ofBaseChange A Q (z ββ ΞΉ Q v) = ΞΉ (Q.baseChange A) (z ββ v) := by
show algebraMap _ _ z * ofBaseChangeAux A Q (ΞΉ Q v) = ΞΉ (Q.baseChange A) (z ββ[R] v)
rw [ofBaseChangeAux_ΞΉ, β Algebra.smul_def, β map_smul, TensorProduct.smul_tmul', smul_eq_mul,
mul_one]
@[simp] theorem ofBaseChange_tmul_one (Q : QuadraticForm R V) (z : A) :
ofBaseChange A Q (z ββ 1) = algebraMap _ _ z := by
show algebraMap _ _ z * ofBaseChangeAux A Q 1 = _
rw [map_one, mul_one]
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def toBaseChange (Q : QuadraticForm R V) :
CliffordAlgebra (Q.baseChange A) ββ[A] A β[R] CliffordAlgebra Q :=
CliffordAlgebra.lift _ <| by
refine β¨TensorProduct.AlgebraTensorModule.map (LinearMap.id : A ββ[A] A) (ΞΉ Q), ?_β©
letI : Invertible (2 : A) := (Invertible.map (algebraMap R A) 2).copy 2 (map_ofNat _ _).symm
letI : Invertible (2 : A β[R] CliffordAlgebra Q) :=
(Invertible.map (algebraMap R _) 2).copy 2 (map_ofNat _ _).symm
suffices hpure_tensor : β v w, (1 * 1) ββ[R] (ΞΉ Q v * ΞΉ Q w) + (1 * 1) ββ[R] (ΞΉ Q w * ΞΉ Q v) =
QuadraticForm.polarBilin (Q.baseChange A) (1 ββ[R] v) (1 ββ[R] w) ββ[R] 1 by
-- the crux is that by converting to a statement about linear maps instead of quadratic forms,
-- we then have access to all the partially-applied `ext` lemmas.
rw [CliffordAlgebra.forall_mul_self_eq_iff (isUnit_of_invertible _)]
refine TensorProduct.AlgebraTensorModule.curry_injective ?_
ext v w
exact hpure_tensor v w
intros v w
rw [β TensorProduct.tmul_add, CliffordAlgebra.ΞΉ_mul_ΞΉ_add_swap,
QuadraticForm.polarBilin_baseChange, LinearMap.BilinForm.baseChange_tmul, one_mul,
TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one, QuadraticForm.polarBilin_apply_apply]
@[simp] theorem toBaseChange_ΞΉ (Q : QuadraticForm R V) (z : A) (v : V) :
toBaseChange A Q (ΞΉ (Q.baseChange A) (z ββ v)) = z ββ ΞΉ Q v :=
CliffordAlgebra.lift_ΞΉ_apply _ _ _
theorem toBaseChange_comp_involute (Q : QuadraticForm R V) :
(toBaseChange A Q).comp (involute : CliffordAlgebra (Q.baseChange A) ββ[A] _) =
(Algebra.TensorProduct.map (AlgHom.id _ _) involute).comp (toBaseChange A Q) := by
ext v
show toBaseChange A Q (involute (ΞΉ (Q.baseChange A) (1 ββ[R] v)))
= (Algebra.TensorProduct.map (AlgHom.id _ _) involute :
A β[R] CliffordAlgebra Q ββ[A] _)
(toBaseChange A Q (ΞΉ (Q.baseChange A) (1 ββ[R] v)))
rw [toBaseChange_ΞΉ, involute_ΞΉ, map_neg (toBaseChange A Q), toBaseChange_ΞΉ,
Algebra.TensorProduct.map_tmul, AlgHom.id_apply, involute_ΞΉ, TensorProduct.tmul_neg]
theorem toBaseChange_involute (Q : QuadraticForm R V) (x : CliffordAlgebra (Q.baseChange A)) :
toBaseChange A Q (involute x) =
TensorProduct.map LinearMap.id (involute.toLinearMap) (toBaseChange A Q x) :=
DFunLike.congr_fun (toBaseChange_comp_involute A Q) x
open MulOpposite
| Mathlib/LinearAlgebra/CliffordAlgebra/BaseChange.lean | 124 | 137 | theorem toBaseChange_comp_reverseOp (Q : QuadraticForm R V) :
(toBaseChange A Q).op.comp reverseOp =
((Algebra.TensorProduct.opAlgEquiv R A A (CliffordAlgebra Q)).toAlgHom.comp <|
(Algebra.TensorProduct.map
(AlgEquiv.toOpposite A A).toAlgHom (reverseOp (Q := Q))).comp
(toBaseChange A Q)) := by |
ext v
show op (toBaseChange A Q (reverse (ΞΉ (Q.baseChange A) (1 ββ[R] v)))) =
Algebra.TensorProduct.opAlgEquiv R A A (CliffordAlgebra Q)
(Algebra.TensorProduct.map (AlgEquiv.toOpposite A A).toAlgHom (reverseOp (Q := Q))
(toBaseChange A Q (ΞΉ (Q.baseChange A) (1 ββ[R] v))))
rw [toBaseChange_ΞΉ, reverse_ΞΉ, toBaseChange_ΞΉ, Algebra.TensorProduct.map_tmul,
Algebra.TensorProduct.opAlgEquiv_tmul, reverseOp_ΞΉ]
rfl
| 1,855 |
import Mathlib.LinearAlgebra.Matrix.Basis
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.LinearAlgebra.BilinearForm.Properties
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
#align_import linear_algebra.matrix.bilinear_form from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
open LinearMap (BilinForm)
variable {R : Type*} {M : Type*} [CommSemiring R] [AddCommMonoid M] [Module R M]
variable {Rβ : Type*} {Mβ : Type*} [CommRing Rβ] [AddCommGroup Mβ] [Module Rβ Mβ]
variable {Rβ : Type*} {Mβ : Type*} [CommSemiring Rβ] [AddCommMonoid Mβ] [Module Rβ Mβ]
variable {Rβ : Type*} {Mβ : Type*} [CommRing Rβ] [AddCommGroup Mβ] [Module Rβ Mβ]
variable {V : Type*} {K : Type*} [Field K] [AddCommGroup V] [Module K V]
variable {B : BilinForm R M} {Bβ : BilinForm Rβ Mβ} {Bβ : BilinForm Rβ Mβ}
section Matrix
variable {n o : Type*}
open Finset LinearMap Matrix
open Matrix
def Matrix.toBilin'Aux [Fintype n] (M : Matrix n n Rβ) : BilinForm Rβ (n β Rβ) :=
Matrix.toLinearMapβ'Aux _ _ M
#align matrix.to_bilin'_aux Matrix.toBilin'Aux
theorem Matrix.toBilin'Aux_stdBasis [Fintype n] [DecidableEq n] (M : Matrix n n Rβ) (i j : n) :
M.toBilin'Aux (LinearMap.stdBasis Rβ (fun _ => Rβ) i 1)
(LinearMap.stdBasis Rβ (fun _ => Rβ) j 1) = M i j :=
Matrix.toLinearMapβ'Aux_stdBasis _ _ _ _ _
#align matrix.to_bilin'_aux_std_basis Matrix.toBilin'Aux_stdBasis
def BilinForm.toMatrixAux (b : n β Mβ) : BilinForm Rβ Mβ ββ[Rβ] Matrix n n Rβ :=
LinearMap.toMatrixβAux b b
#align bilin_form.to_matrix_aux BilinForm.toMatrixAux
@[simp]
theorem LinearMap.BilinForm.toMatrixAux_apply (B : BilinForm Rβ Mβ) (b : n β Mβ) (i j : n) :
-- Porting note: had to hint the base ring even though it should be clear from context...
BilinForm.toMatrixAux (Rβ := Rβ) b B i j = B (b i) (b j) :=
LinearMap.toMatrixβAux_apply B _ _ _ _
#align bilin_form.to_matrix_aux_apply LinearMap.BilinForm.toMatrixAux_apply
variable [Fintype n] [Fintype o]
| Mathlib/LinearAlgebra/Matrix/BilinearForm.lean | 88 | 93 | theorem toBilin'Aux_toMatrixAux [DecidableEq n] (Bβ : BilinForm Rβ (n β Rβ)) :
-- Porting note: had to hint the base ring even though it should be clear from context...
Matrix.toBilin'Aux (BilinForm.toMatrixAux (Rβ := Rβ)
(fun j => stdBasis Rβ (fun _ => Rβ) j 1) Bβ) = Bβ := by |
rw [BilinForm.toMatrixAux, Matrix.toBilin'Aux,
toLinearMapβ'Aux_toMatrixβAux]
| 1,856 |
import Mathlib.Algebra.Lie.OfAssociative
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
#align_import algebra.lie.matrix from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99"
universe u v w wβ wβ
section Matrices
open scoped Matrix
variable {R : Type u} [CommRing R]
variable {n : Type w} [DecidableEq n] [Fintype n]
def lieEquivMatrix' : Module.End R (n β R) βββ
Rβ Matrix n n R :=
{ LinearMap.toMatrix' with
map_lie' := fun {T S} => by
let f := @LinearMap.toMatrix' R _ n n _ _
change f (T.comp S - S.comp T) = f T * f S - f S * f T
have h : β T S : Module.End R _, f (T.comp S) = f T * f S := LinearMap.toMatrix'_comp
rw [map_sub, h, h] }
#align lie_equiv_matrix' lieEquivMatrix'
@[simp]
theorem lieEquivMatrix'_apply (f : Module.End R (n β R)) :
lieEquivMatrix' f = LinearMap.toMatrix' f :=
rfl
#align lie_equiv_matrix'_apply lieEquivMatrix'_apply
@[simp]
theorem lieEquivMatrix'_symm_apply (A : Matrix n n R) :
(@lieEquivMatrix' R _ n _ _).symm A = Matrix.toLin' A :=
rfl
#align lie_equiv_matrix'_symm_apply lieEquivMatrix'_symm_apply
def Matrix.lieConj (P : Matrix n n R) (h : Invertible P) : Matrix n n R βββ
Rβ Matrix n n R :=
((@lieEquivMatrix' R _ n _ _).symm.trans (P.toLinearEquiv' h).lieConj).trans lieEquivMatrix'
#align matrix.lie_conj Matrix.lieConj
@[simp]
| Mathlib/Algebra/Lie/Matrix.lean | 69 | 72 | theorem Matrix.lieConj_apply (P A : Matrix n n R) (h : Invertible P) :
P.lieConj h A = P * A * Pβ»ΒΉ := by |
simp [LinearEquiv.conj_apply, Matrix.lieConj, LinearMap.toMatrix'_comp,
LinearMap.toMatrix'_toLin']
| 1,857 |
import Mathlib.Algebra.Lie.OfAssociative
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
#align_import algebra.lie.matrix from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99"
universe u v w wβ wβ
section Matrices
open scoped Matrix
variable {R : Type u} [CommRing R]
variable {n : Type w} [DecidableEq n] [Fintype n]
def lieEquivMatrix' : Module.End R (n β R) βββ
Rβ Matrix n n R :=
{ LinearMap.toMatrix' with
map_lie' := fun {T S} => by
let f := @LinearMap.toMatrix' R _ n n _ _
change f (T.comp S - S.comp T) = f T * f S - f S * f T
have h : β T S : Module.End R _, f (T.comp S) = f T * f S := LinearMap.toMatrix'_comp
rw [map_sub, h, h] }
#align lie_equiv_matrix' lieEquivMatrix'
@[simp]
theorem lieEquivMatrix'_apply (f : Module.End R (n β R)) :
lieEquivMatrix' f = LinearMap.toMatrix' f :=
rfl
#align lie_equiv_matrix'_apply lieEquivMatrix'_apply
@[simp]
theorem lieEquivMatrix'_symm_apply (A : Matrix n n R) :
(@lieEquivMatrix' R _ n _ _).symm A = Matrix.toLin' A :=
rfl
#align lie_equiv_matrix'_symm_apply lieEquivMatrix'_symm_apply
def Matrix.lieConj (P : Matrix n n R) (h : Invertible P) : Matrix n n R βββ
Rβ Matrix n n R :=
((@lieEquivMatrix' R _ n _ _).symm.trans (P.toLinearEquiv' h).lieConj).trans lieEquivMatrix'
#align matrix.lie_conj Matrix.lieConj
@[simp]
theorem Matrix.lieConj_apply (P A : Matrix n n R) (h : Invertible P) :
P.lieConj h A = P * A * Pβ»ΒΉ := by
simp [LinearEquiv.conj_apply, Matrix.lieConj, LinearMap.toMatrix'_comp,
LinearMap.toMatrix'_toLin']
#align matrix.lie_conj_apply Matrix.lieConj_apply
@[simp]
| Mathlib/Algebra/Lie/Matrix.lean | 76 | 79 | theorem Matrix.lieConj_symm_apply (P A : Matrix n n R) (h : Invertible P) :
(P.lieConj h).symm A = Pβ»ΒΉ * A * P := by |
simp [LinearEquiv.symm_conj_apply, Matrix.lieConj, LinearMap.toMatrix'_comp,
LinearMap.toMatrix'_toLin']
| 1,857 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointEndomorphisms
open LinearMap (BilinForm)
variable {R : Type u} {M : Type v} [CommRing R] [AddCommGroup M] [Module R M]
variable (B : BilinForm R M)
-- Porting note: Changed `(f g)` to `{f g}` for convenience in `skewAdjointLieSubalgebra`
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 46 | 53 | theorem LinearMap.BilinForm.isSkewAdjoint_bracket {f g : Module.End R M}
(hf : f β B.skewAdjointSubmodule) (hg : g β B.skewAdjointSubmodule) :
β
f, gβ β B.skewAdjointSubmodule := by |
rw [mem_skewAdjointSubmodule] at *
have hfg : IsAdjointPair B B (f * g) (g * f) := by rw [β neg_mul_neg g f]; exact hf.mul hg
have hgf : IsAdjointPair B B (g * f) (f * g) := by rw [β neg_mul_neg f g]; exact hg.mul hf
change IsAdjointPair B B (f * g - g * f) (-(f * g - g * f)); rw [neg_sub]
exact hfg.sub hgf
| 1,858 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointEndomorphisms
open LinearMap (BilinForm)
variable {R : Type u} {M : Type v} [CommRing R] [AddCommGroup M] [Module R M]
variable (B : BilinForm R M)
-- Porting note: Changed `(f g)` to `{f g}` for convenience in `skewAdjointLieSubalgebra`
theorem LinearMap.BilinForm.isSkewAdjoint_bracket {f g : Module.End R M}
(hf : f β B.skewAdjointSubmodule) (hg : g β B.skewAdjointSubmodule) :
β
f, gβ β B.skewAdjointSubmodule := by
rw [mem_skewAdjointSubmodule] at *
have hfg : IsAdjointPair B B (f * g) (g * f) := by rw [β neg_mul_neg g f]; exact hf.mul hg
have hgf : IsAdjointPair B B (g * f) (f * g) := by rw [β neg_mul_neg f g]; exact hg.mul hf
change IsAdjointPair B B (f * g - g * f) (-(f * g - g * f)); rw [neg_sub]
exact hfg.sub hgf
#align bilin_form.is_skew_adjoint_bracket LinearMap.BilinForm.isSkewAdjoint_bracket
def skewAdjointLieSubalgebra : LieSubalgebra R (Module.End R M) :=
{ B.skewAdjointSubmodule with
lie_mem' := B.isSkewAdjoint_bracket }
#align skew_adjoint_lie_subalgebra skewAdjointLieSubalgebra
variable {N : Type w} [AddCommGroup N] [Module R N] (e : N ββ[R] M)
def skewAdjointLieSubalgebraEquiv :
skewAdjointLieSubalgebra (B.complββ (βe : N ββ[R] M) βe) βββ
Rβ skewAdjointLieSubalgebra B := by
apply LieEquiv.ofSubalgebras _ _ e.lieConj
ext f
simp only [LieSubalgebra.mem_coe, Submodule.mem_map_equiv, LieSubalgebra.mem_map_submodule,
LinearEquiv.coe_coe]
exact (LinearMap.isPairSelfAdjoint_equiv (B := -B) (F := B) e f).symm
#align skew_adjoint_lie_subalgebra_equiv skewAdjointLieSubalgebraEquiv
@[simp]
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 77 | 80 | theorem skewAdjointLieSubalgebraEquiv_apply
(f : skewAdjointLieSubalgebra (B.complββ (Qβ := N) (Qβ' := N) βe βe)) :
β(skewAdjointLieSubalgebraEquiv B e f) = e.lieConj f := by |
simp [skewAdjointLieSubalgebraEquiv]
| 1,858 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointEndomorphisms
open LinearMap (BilinForm)
variable {R : Type u} {M : Type v} [CommRing R] [AddCommGroup M] [Module R M]
variable (B : BilinForm R M)
-- Porting note: Changed `(f g)` to `{f g}` for convenience in `skewAdjointLieSubalgebra`
theorem LinearMap.BilinForm.isSkewAdjoint_bracket {f g : Module.End R M}
(hf : f β B.skewAdjointSubmodule) (hg : g β B.skewAdjointSubmodule) :
β
f, gβ β B.skewAdjointSubmodule := by
rw [mem_skewAdjointSubmodule] at *
have hfg : IsAdjointPair B B (f * g) (g * f) := by rw [β neg_mul_neg g f]; exact hf.mul hg
have hgf : IsAdjointPair B B (g * f) (f * g) := by rw [β neg_mul_neg f g]; exact hg.mul hf
change IsAdjointPair B B (f * g - g * f) (-(f * g - g * f)); rw [neg_sub]
exact hfg.sub hgf
#align bilin_form.is_skew_adjoint_bracket LinearMap.BilinForm.isSkewAdjoint_bracket
def skewAdjointLieSubalgebra : LieSubalgebra R (Module.End R M) :=
{ B.skewAdjointSubmodule with
lie_mem' := B.isSkewAdjoint_bracket }
#align skew_adjoint_lie_subalgebra skewAdjointLieSubalgebra
variable {N : Type w} [AddCommGroup N] [Module R N] (e : N ββ[R] M)
def skewAdjointLieSubalgebraEquiv :
skewAdjointLieSubalgebra (B.complββ (βe : N ββ[R] M) βe) βββ
Rβ skewAdjointLieSubalgebra B := by
apply LieEquiv.ofSubalgebras _ _ e.lieConj
ext f
simp only [LieSubalgebra.mem_coe, Submodule.mem_map_equiv, LieSubalgebra.mem_map_submodule,
LinearEquiv.coe_coe]
exact (LinearMap.isPairSelfAdjoint_equiv (B := -B) (F := B) e f).symm
#align skew_adjoint_lie_subalgebra_equiv skewAdjointLieSubalgebraEquiv
@[simp]
theorem skewAdjointLieSubalgebraEquiv_apply
(f : skewAdjointLieSubalgebra (B.complββ (Qβ := N) (Qβ' := N) βe βe)) :
β(skewAdjointLieSubalgebraEquiv B e f) = e.lieConj f := by
simp [skewAdjointLieSubalgebraEquiv]
#align skew_adjoint_lie_subalgebra_equiv_apply skewAdjointLieSubalgebraEquiv_apply
@[simp]
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 84 | 86 | theorem skewAdjointLieSubalgebraEquiv_symm_apply (f : skewAdjointLieSubalgebra B) :
β((skewAdjointLieSubalgebraEquiv B e).symm f) = e.symm.lieConj f := by |
simp [skewAdjointLieSubalgebraEquiv]
| 1,858 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointMatrices
open scoped Matrix
variable {R : Type u} {n : Type w} [CommRing R] [DecidableEq n] [Fintype n]
variable (J : Matrix n n R)
theorem Matrix.lie_transpose (A B : Matrix n n R) : β
A, Bβα΅ = β
Bα΅, Aα΅β :=
show (A * B - B * A)α΅ = Bα΅ * Aα΅ - Aα΅ * Bα΅ by simp
#align matrix.lie_transpose Matrix.lie_transpose
-- Porting note: Changed `(A B)` to `{A B}` for convenience in `skewAdjointMatricesLieSubalgebra`
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 103 | 112 | theorem Matrix.isSkewAdjoint_bracket {A B : Matrix n n R} (hA : A β skewAdjointMatricesSubmodule J)
(hB : B β skewAdjointMatricesSubmodule J) : β
A, Bβ β skewAdjointMatricesSubmodule J := by |
simp only [mem_skewAdjointMatricesSubmodule] at *
change β
A, Bβα΅ * J = J * (-β
A, Bβ)
change Aα΅ * J = J * (-A) at hA
change Bα΅ * J = J * (-B) at hB
rw [Matrix.lie_transpose, LieRing.of_associative_ring_bracket,
LieRing.of_associative_ring_bracket, sub_mul, mul_assoc, mul_assoc, hA, hB, β mul_assoc,
β mul_assoc, hA, hB]
noncomm_ring
| 1,858 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointMatrices
open scoped Matrix
variable {R : Type u} {n : Type w} [CommRing R] [DecidableEq n] [Fintype n]
variable (J : Matrix n n R)
theorem Matrix.lie_transpose (A B : Matrix n n R) : β
A, Bβα΅ = β
Bα΅, Aα΅β :=
show (A * B - B * A)α΅ = Bα΅ * Aα΅ - Aα΅ * Bα΅ by simp
#align matrix.lie_transpose Matrix.lie_transpose
-- Porting note: Changed `(A B)` to `{A B}` for convenience in `skewAdjointMatricesLieSubalgebra`
theorem Matrix.isSkewAdjoint_bracket {A B : Matrix n n R} (hA : A β skewAdjointMatricesSubmodule J)
(hB : B β skewAdjointMatricesSubmodule J) : β
A, Bβ β skewAdjointMatricesSubmodule J := by
simp only [mem_skewAdjointMatricesSubmodule] at *
change β
A, Bβα΅ * J = J * (-β
A, Bβ)
change Aα΅ * J = J * (-A) at hA
change Bα΅ * J = J * (-B) at hB
rw [Matrix.lie_transpose, LieRing.of_associative_ring_bracket,
LieRing.of_associative_ring_bracket, sub_mul, mul_assoc, mul_assoc, hA, hB, β mul_assoc,
β mul_assoc, hA, hB]
noncomm_ring
#align matrix.is_skew_adjoint_bracket Matrix.isSkewAdjoint_bracket
def skewAdjointMatricesLieSubalgebra : LieSubalgebra R (Matrix n n R) :=
{ skewAdjointMatricesSubmodule J with
lie_mem' := J.isSkewAdjoint_bracket }
#align skew_adjoint_matrices_lie_subalgebra skewAdjointMatricesLieSubalgebra
@[simp]
theorem mem_skewAdjointMatricesLieSubalgebra (A : Matrix n n R) :
A β skewAdjointMatricesLieSubalgebra J β A β skewAdjointMatricesSubmodule J :=
Iff.rfl
#align mem_skew_adjoint_matrices_lie_subalgebra mem_skewAdjointMatricesLieSubalgebra
def skewAdjointMatricesLieSubalgebraEquiv (P : Matrix n n R) (h : Invertible P) :
skewAdjointMatricesLieSubalgebra J βββ
Rβ skewAdjointMatricesLieSubalgebra (Pα΅ * J * P) :=
LieEquiv.ofSubalgebras _ _ (P.lieConj h).symm <| by
ext A
suffices P.lieConj h A β skewAdjointMatricesSubmodule J β
A β skewAdjointMatricesSubmodule (Pα΅ * J * P) by
simp only [LieSubalgebra.mem_coe, Submodule.mem_map_equiv, LieSubalgebra.mem_map_submodule,
LinearEquiv.coe_coe]
exact this
simp [Matrix.IsSkewAdjoint, J.isAdjointPair_equiv _ _ P (isUnit_of_invertible P)]
#align skew_adjoint_matrices_lie_subalgebra_equiv skewAdjointMatricesLieSubalgebraEquiv
-- TODO(mathlib4#6607): fix elaboration so annotation on `A` isn't needed
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 142 | 145 | theorem skewAdjointMatricesLieSubalgebraEquiv_apply (P : Matrix n n R) (h : Invertible P)
(A : skewAdjointMatricesLieSubalgebra J) :
β(skewAdjointMatricesLieSubalgebraEquiv J P h A) = Pβ»ΒΉ * (A : Matrix n n R) * P := by |
simp [skewAdjointMatricesLieSubalgebraEquiv]
| 1,858 |
import Mathlib.Algebra.Lie.Matrix
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.Tactic.NoncommRing
#align_import algebra.lie.skew_adjoint from "leanprover-community/mathlib"@"075b3f7d19b9da85a0b54b3e33055a74fc388dec"
universe u v w wβ
section SkewAdjointMatrices
open scoped Matrix
variable {R : Type u} {n : Type w} [CommRing R] [DecidableEq n] [Fintype n]
variable (J : Matrix n n R)
theorem Matrix.lie_transpose (A B : Matrix n n R) : β
A, Bβα΅ = β
Bα΅, Aα΅β :=
show (A * B - B * A)α΅ = Bα΅ * Aα΅ - Aα΅ * Bα΅ by simp
#align matrix.lie_transpose Matrix.lie_transpose
-- Porting note: Changed `(A B)` to `{A B}` for convenience in `skewAdjointMatricesLieSubalgebra`
theorem Matrix.isSkewAdjoint_bracket {A B : Matrix n n R} (hA : A β skewAdjointMatricesSubmodule J)
(hB : B β skewAdjointMatricesSubmodule J) : β
A, Bβ β skewAdjointMatricesSubmodule J := by
simp only [mem_skewAdjointMatricesSubmodule] at *
change β
A, Bβα΅ * J = J * (-β
A, Bβ)
change Aα΅ * J = J * (-A) at hA
change Bα΅ * J = J * (-B) at hB
rw [Matrix.lie_transpose, LieRing.of_associative_ring_bracket,
LieRing.of_associative_ring_bracket, sub_mul, mul_assoc, mul_assoc, hA, hB, β mul_assoc,
β mul_assoc, hA, hB]
noncomm_ring
#align matrix.is_skew_adjoint_bracket Matrix.isSkewAdjoint_bracket
def skewAdjointMatricesLieSubalgebra : LieSubalgebra R (Matrix n n R) :=
{ skewAdjointMatricesSubmodule J with
lie_mem' := J.isSkewAdjoint_bracket }
#align skew_adjoint_matrices_lie_subalgebra skewAdjointMatricesLieSubalgebra
@[simp]
theorem mem_skewAdjointMatricesLieSubalgebra (A : Matrix n n R) :
A β skewAdjointMatricesLieSubalgebra J β A β skewAdjointMatricesSubmodule J :=
Iff.rfl
#align mem_skew_adjoint_matrices_lie_subalgebra mem_skewAdjointMatricesLieSubalgebra
def skewAdjointMatricesLieSubalgebraEquiv (P : Matrix n n R) (h : Invertible P) :
skewAdjointMatricesLieSubalgebra J βββ
Rβ skewAdjointMatricesLieSubalgebra (Pα΅ * J * P) :=
LieEquiv.ofSubalgebras _ _ (P.lieConj h).symm <| by
ext A
suffices P.lieConj h A β skewAdjointMatricesSubmodule J β
A β skewAdjointMatricesSubmodule (Pα΅ * J * P) by
simp only [LieSubalgebra.mem_coe, Submodule.mem_map_equiv, LieSubalgebra.mem_map_submodule,
LinearEquiv.coe_coe]
exact this
simp [Matrix.IsSkewAdjoint, J.isAdjointPair_equiv _ _ P (isUnit_of_invertible P)]
#align skew_adjoint_matrices_lie_subalgebra_equiv skewAdjointMatricesLieSubalgebraEquiv
-- TODO(mathlib4#6607): fix elaboration so annotation on `A` isn't needed
theorem skewAdjointMatricesLieSubalgebraEquiv_apply (P : Matrix n n R) (h : Invertible P)
(A : skewAdjointMatricesLieSubalgebra J) :
β(skewAdjointMatricesLieSubalgebraEquiv J P h A) = Pβ»ΒΉ * (A : Matrix n n R) * P := by
simp [skewAdjointMatricesLieSubalgebraEquiv]
#align skew_adjoint_matrices_lie_subalgebra_equiv_apply skewAdjointMatricesLieSubalgebraEquiv_apply
def skewAdjointMatricesLieSubalgebraEquivTranspose {m : Type w} [DecidableEq m] [Fintype m]
(e : Matrix n n R ββ[R] Matrix m m R) (h : β A, (e A)α΅ = e Aα΅) :
skewAdjointMatricesLieSubalgebra J βββ
Rβ skewAdjointMatricesLieSubalgebra (e J) :=
LieEquiv.ofSubalgebras _ _ e.toLieEquiv <| by
ext A
suffices J.IsSkewAdjoint (e.symm A) β (e J).IsSkewAdjoint A by
-- Porting note: Originally `simpa [this]`
simpa [- LieSubalgebra.mem_map, LieSubalgebra.mem_map_submodule]
simp only [Matrix.IsSkewAdjoint, Matrix.IsAdjointPair, β h,
β Function.Injective.eq_iff e.injective, map_mul, AlgEquiv.apply_symm_apply, map_neg]
#align skew_adjoint_matrices_lie_subalgebra_equiv_transpose skewAdjointMatricesLieSubalgebraEquivTranspose
@[simp]
theorem skewAdjointMatricesLieSubalgebraEquivTranspose_apply {m : Type w} [DecidableEq m]
[Fintype m] (e : Matrix n n R ββ[R] Matrix m m R) (h : β A, (e A)α΅ = e Aα΅)
(A : skewAdjointMatricesLieSubalgebra J) :
(skewAdjointMatricesLieSubalgebraEquivTranspose J e h A : Matrix m m R) = e A :=
rfl
#align skew_adjoint_matrices_lie_subalgebra_equiv_transpose_apply skewAdjointMatricesLieSubalgebraEquivTranspose_apply
| Mathlib/Algebra/Lie/SkewAdjoint.lean | 170 | 176 | theorem mem_skewAdjointMatricesLieSubalgebra_unit_smul (u : RΛ£) (J A : Matrix n n R) :
A β skewAdjointMatricesLieSubalgebra (u β’ J) β A β skewAdjointMatricesLieSubalgebra J := by |
change A β skewAdjointMatricesSubmodule (u β’ J) β A β skewAdjointMatricesSubmodule J
simp only [mem_skewAdjointMatricesSubmodule, Matrix.IsSkewAdjoint, Matrix.IsAdjointPair]
constructor <;> intro h
Β· simpa using congr_arg (fun B => uβ»ΒΉ β’ B) h
Β· simp [h]
| 1,858 |
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Algebra.Star.Unitary
#align_import linear_algebra.unitary_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
universe u v
namespace Matrix
open LinearMap Matrix
section
variable (n : Type u) [DecidableEq n] [Fintype n]
variable (Ξ± : Type v) [CommRing Ξ±] [StarRing Ξ±]
abbrev unitaryGroup :=
unitary (Matrix n n Ξ±)
#align matrix.unitary_group Matrix.unitaryGroup
end
variable {n : Type u} [DecidableEq n] [Fintype n]
variable {Ξ± : Type v} [CommRing Ξ±] [StarRing Ξ±] {A : Matrix n n Ξ±}
| Mathlib/LinearAlgebra/UnitaryGroup.lean | 66 | 68 | theorem mem_unitaryGroup_iff : A β Matrix.unitaryGroup n Ξ± β A * star A = 1 := by |
refine β¨And.right, fun hA => β¨?_, hAβ©β©
simpa only [mul_eq_one_comm] using hA
| 1,859 |
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Algebra.Star.Unitary
#align_import linear_algebra.unitary_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
universe u v
namespace Matrix
open LinearMap Matrix
section
variable (n : Type u) [DecidableEq n] [Fintype n]
variable (Ξ± : Type v) [CommRing Ξ±] [StarRing Ξ±]
abbrev unitaryGroup :=
unitary (Matrix n n Ξ±)
#align matrix.unitary_group Matrix.unitaryGroup
end
variable {n : Type u} [DecidableEq n] [Fintype n]
variable {Ξ± : Type v} [CommRing Ξ±] [StarRing Ξ±] {A : Matrix n n Ξ±}
theorem mem_unitaryGroup_iff : A β Matrix.unitaryGroup n Ξ± β A * star A = 1 := by
refine β¨And.right, fun hA => β¨?_, hAβ©β©
simpa only [mul_eq_one_comm] using hA
#align matrix.mem_unitary_group_iff Matrix.mem_unitaryGroup_iff
| Mathlib/LinearAlgebra/UnitaryGroup.lean | 71 | 73 | theorem mem_unitaryGroup_iff' : A β Matrix.unitaryGroup n Ξ± β star A * A = 1 := by |
refine β¨And.left, fun hA => β¨hA, ?_β©β©
rwa [mul_eq_one_comm] at hA
| 1,859 |
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Algebra.Star.Unitary
#align_import linear_algebra.unitary_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
universe u v
namespace Matrix
open LinearMap Matrix
section
variable (n : Type u) [DecidableEq n] [Fintype n]
variable (Ξ± : Type v) [CommRing Ξ±] [StarRing Ξ±]
abbrev unitaryGroup :=
unitary (Matrix n n Ξ±)
#align matrix.unitary_group Matrix.unitaryGroup
end
variable {n : Type u} [DecidableEq n] [Fintype n]
variable {Ξ± : Type v} [CommRing Ξ±] [StarRing Ξ±] {A : Matrix n n Ξ±}
theorem mem_unitaryGroup_iff : A β Matrix.unitaryGroup n Ξ± β A * star A = 1 := by
refine β¨And.right, fun hA => β¨?_, hAβ©β©
simpa only [mul_eq_one_comm] using hA
#align matrix.mem_unitary_group_iff Matrix.mem_unitaryGroup_iff
theorem mem_unitaryGroup_iff' : A β Matrix.unitaryGroup n Ξ± β star A * A = 1 := by
refine β¨And.left, fun hA => β¨hA, ?_β©β©
rwa [mul_eq_one_comm] at hA
#align matrix.mem_unitary_group_iff' Matrix.mem_unitaryGroup_iff'
| Mathlib/LinearAlgebra/UnitaryGroup.lean | 76 | 80 | theorem det_of_mem_unitary {A : Matrix n n Ξ±} (hA : A β Matrix.unitaryGroup n Ξ±) :
A.det β unitary Ξ± := by |
constructor
Β· simpa [star, det_transpose] using congr_arg det hA.1
Β· simpa [star, det_transpose] using congr_arg det hA.2
| 1,859 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 55 | 57 | theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by |
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
| 1,860 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
@[simp]
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 62 | 64 | theorem charmatrix_apply_ne (h : i β j) : charmatrix M i j = -C (M i j) := by |
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
map_apply, sub_eq_neg_self]
| 1,860 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
@[simp]
theorem charmatrix_apply_ne (h : i β j) : charmatrix M i j = -C (M i j) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
map_apply, sub_eq_neg_self]
#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 67 | 76 | theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by |
ext k i j
simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
by_cases h : i = j
Β· subst h
rw [charmatrix_apply_eq, coeff_sub]
simp only [coeff_X, coeff_C]
split_ifs <;> simp
Β· rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
split_ifs <;> simp [h]
| 1,860 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
@[simp]
theorem charmatrix_apply_ne (h : i β j) : charmatrix M i j = -C (M i j) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
map_apply, sub_eq_neg_self]
#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
ext k i j
simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
by_cases h : i = j
Β· subst h
rw [charmatrix_apply_eq, coeff_sub]
simp only [coeff_X, coeff_C]
split_ifs <;> simp
Β· rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
split_ifs <;> simp [h]
#align mat_poly_equiv_charmatrix Matrix.matPolyEquiv_charmatrix
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 79 | 83 | theorem charmatrix_reindex (e : n β m) :
charmatrix (reindex e e M) = reindex e e (charmatrix M) := by |
ext i j x
by_cases h : i = j
all_goals simp [h]
| 1,860 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
@[simp]
theorem charmatrix_apply_ne (h : i β j) : charmatrix M i j = -C (M i j) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
map_apply, sub_eq_neg_self]
#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
ext k i j
simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
by_cases h : i = j
Β· subst h
rw [charmatrix_apply_eq, coeff_sub]
simp only [coeff_X, coeff_C]
split_ifs <;> simp
Β· rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
split_ifs <;> simp [h]
#align mat_poly_equiv_charmatrix Matrix.matPolyEquiv_charmatrix
theorem charmatrix_reindex (e : n β m) :
charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
ext i j x
by_cases h : i = j
all_goals simp [h]
#align charmatrix_reindex Matrix.charmatrix_reindex
lemma charmatrix_map (M : Matrix n n R) (f : R β+* S) :
charmatrix (M.map f) = (charmatrix M).map (Polynomial.map f) := by
ext i j
by_cases h : i = j <;> simp [h, charmatrix, diagonal]
lemma charmatrix_fromBlocks :
charmatrix (fromBlocks Mββ Mββ Mββ Mββ) =
fromBlocks (charmatrix Mββ) (- Mββ.map C) (- Mββ.map C) (charmatrix Mββ) := by
simp only [charmatrix]
ext (i|i) (j|j) : 2 <;> simp [diagonal]
def charpoly (M : Matrix n n R) : R[X] :=
(charmatrix M).det
#align matrix.charpoly Matrix.charpoly
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 103 | 106 | theorem charpoly_reindex (e : n β m)
(M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly := by |
unfold Matrix.charpoly
rw [charmatrix_reindex, Matrix.det_reindex_self]
| 1,860 |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable {R S : Type*} [CommRing R] [CommRing S]
variable {m n : Type*} [DecidableEq m] [DecidableEq n] [Fintype m] [Fintype n]
variable (Mββ : Matrix m m R) (Mββ : Matrix m n R) (Mββ : Matrix n m R) (Mββ M : Matrix n n R)
variable (i j : n)
def charmatrix (M : Matrix n n R) : Matrix n n R[X] :=
Matrix.scalar n (X : R[X]) - (C : R β+* R[X]).mapMatrix M
#align charmatrix Matrix.charmatrix
theorem charmatrix_apply :
charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j) :=
rfl
#align charmatrix_apply Matrix.charmatrix_apply
@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
#align charmatrix_apply_eq Matrix.charmatrix_apply_eq
@[simp]
theorem charmatrix_apply_ne (h : i β j) : charmatrix M i j = -C (M i j) := by
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, diagonal_apply_ne _ h,
map_apply, sub_eq_neg_self]
#align charmatrix_apply_ne Matrix.charmatrix_apply_ne
theorem matPolyEquiv_charmatrix : matPolyEquiv (charmatrix M) = X - C M := by
ext k i j
simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
by_cases h : i = j
Β· subst h
rw [charmatrix_apply_eq, coeff_sub]
simp only [coeff_X, coeff_C]
split_ifs <;> simp
Β· rw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]
split_ifs <;> simp [h]
#align mat_poly_equiv_charmatrix Matrix.matPolyEquiv_charmatrix
theorem charmatrix_reindex (e : n β m) :
charmatrix (reindex e e M) = reindex e e (charmatrix M) := by
ext i j x
by_cases h : i = j
all_goals simp [h]
#align charmatrix_reindex Matrix.charmatrix_reindex
lemma charmatrix_map (M : Matrix n n R) (f : R β+* S) :
charmatrix (M.map f) = (charmatrix M).map (Polynomial.map f) := by
ext i j
by_cases h : i = j <;> simp [h, charmatrix, diagonal]
lemma charmatrix_fromBlocks :
charmatrix (fromBlocks Mββ Mββ Mββ Mββ) =
fromBlocks (charmatrix Mββ) (- Mββ.map C) (- Mββ.map C) (charmatrix Mββ) := by
simp only [charmatrix]
ext (i|i) (j|j) : 2 <;> simp [diagonal]
def charpoly (M : Matrix n n R) : R[X] :=
(charmatrix M).det
#align matrix.charpoly Matrix.charpoly
theorem charpoly_reindex (e : n β m)
(M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly := by
unfold Matrix.charpoly
rw [charmatrix_reindex, Matrix.det_reindex_self]
#align matrix.charpoly_reindex Matrix.charpoly_reindex
lemma charpoly_map (M : Matrix n n R) (f : R β+* S) :
(M.map f).charpoly = M.charpoly.map f := by
rw [charpoly, charmatrix_map, β Polynomial.coe_mapRingHom, charpoly, RingHom.map_det,
RingHom.mapMatrix_apply]
@[simp]
lemma charpoly_fromBlocks_zeroββ :
(fromBlocks Mββ 0 Mββ Mββ).charpoly = (Mββ.charpoly * Mββ.charpoly) := by
simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
det_fromBlocks_zeroββ]
@[simp]
lemma charpoly_fromBlocks_zeroββ :
(fromBlocks Mββ Mββ 0 Mββ).charpoly = (Mββ.charpoly * Mββ.charpoly) := by
simp only [charpoly, charmatrix_fromBlocks, Matrix.map_zero _ (Polynomial.C_0), neg_zero,
det_fromBlocks_zeroββ]
-- This proof follows http://drorbn.net/AcademicPensieve/2015-12/CayleyHamilton.pdf
| Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 134 | 154 | theorem aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0 := by |
-- We begin with the fact $Ο_M(t) I = adjugate (t I - M) * (t I - M)$,
-- as an identity in `Matrix n n R[X]`.
have h : M.charpoly β’ (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M :=
(adjugate_mul _).symm
-- Using the algebra isomorphism `Matrix n n R[X] ββ[R] Polynomial (Matrix n n R)`,
-- we have the same identity in `Polynomial (Matrix n n R)`.
apply_fun matPolyEquiv at h
simp only [matPolyEquiv.map_mul, matPolyEquiv_charmatrix] at h
-- Because the coefficient ring `Matrix n n R` is non-commutative,
-- evaluation at `M` is not multiplicative.
-- However, any polynomial which is a product of the form $N * (t I - M)$
-- is sent to zero, because the evaluation function puts the polynomial variable
-- to the right of any coefficients, so everything telescopes.
apply_fun fun p => p.eval M at h
rw [eval_mul_X_sub_C] at h
-- Now $Ο_M (t) I$, when thought of as a polynomial of matrices
-- and evaluated at some `N` is exactly $Ο_M (N)$.
rw [matPolyEquiv_smul_one, eval_map] at h
-- Thus we have $Ο_M(M) = 0$, which is the desired result.
exact h
| 1,860 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 87 | 91 | theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by |
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
| Mathlib/RingTheory/Polynomial/Quotient.lean | 94 | 107 | theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by |
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 150 | 154 | theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by |
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_symm_mk Ideal.polynomialQuotientEquivQuotientPolynomial_symm_mk
@[simp]
| Mathlib/RingTheory/Polynomial/Quotient.lean | 158 | 162 | theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
Quotient.mk (map C I : Ideal R[X]) f := by |
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective
rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace Ideal
noncomputable section
open Polynomial
variable {R : Type*} [CommRing R]
theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
#align ideal.quotient_map_C_eq_zero Ideal.quotient_map_C_eq_zero
theorem evalβ_C_mk_eq_zero {I : Ideal R} :
β f β (map (C : R β+* R[X]) I : Ideal R[X]), evalβRingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [β sum_monomial_eq a]
dsimp
rw [evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [evalβ_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
erw [coeff_C]
by_cases h : m = 0
Β· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
Β· simp [h]
#align ideal.evalβ_C_mk_eq_zero Ideal.evalβ_C_mk_eq_zero
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R β§Έ I)[X] β+* R[X] β§Έ (map C I : Ideal R[X]) where
toFun :=
evalβRingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (evalβRingHom (C.comp (Quotient.mk I)) X)
evalβ_C_mk_eq_zero
map_mul' f g := by simp only [coe_evalβRingHom, evalβ_mul]
map_add' f g := by simp only [evalβ_add, coe_evalβRingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
Β· intro p q hp hq
simp only [coe_evalβRingHom] at hp hq
simp only [coe_evalβRingHom, hp, hq, RingHom.map_add]
Β· rintro n β¨xβ©
simp only [β smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul, coe_evalβRingHom, RingHom.map_pow, evalβ_C,
RingHom.coe_comp, RingHom.map_mul, evalβ_X, Function.comp_apply]
right_inv := by
rintro β¨fβ©
refine Polynomial.induction_on' f ?_ ?_
Β· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_evalβRingHom] at hp hq β’
rw [hp, hq]
Β· intro n a
simp only [β smul_X_eq_monomial, β C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, evalβ_X_pow, evalβ_smul,
coe_evalβRingHom, RingHom.map_pow, evalβ_C, RingHom.coe_comp, RingHom.map_mul, evalβ_X,
Function.comp_apply]
#align ideal.polynomial_quotient_equiv_quotient_polynomial Ideal.polynomialQuotientEquivQuotientPolynomial
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_evalβRingHom, evalβ_eq_eval_map, β Polynomial.map_map,
β evalβ_eq_eval_map, Polynomial.evalβ_C_X]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_symm_mk Ideal.polynomialQuotientEquivQuotientPolynomial_symm_mk
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
Quotient.mk (map C I : Ideal R[X]) f := by
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective
rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
#align ideal.polynomial_quotient_equiv_quotient_polynomial_map_mk Ideal.polynomialQuotientEquivQuotientPolynomial_map_mk
theorem isDomain_map_C_quotient {P : Ideal R} (_ : IsPrime P) :
IsDomain (R[X] β§Έ (map (C : R β+* R[X]) P : Ideal R[X])) :=
MulEquiv.isDomain (Polynomial (R β§Έ P)) (polynomialQuotientEquivQuotientPolynomial P).symm
#align ideal.is_domain_map_C_quotient Ideal.isDomain_map_C_quotient
| Mathlib/RingTheory/Polynomial/Quotient.lean | 175 | 194 | theorem eq_zero_of_polynomial_mem_map_range (I : Ideal R[X]) (x : ((Quotient.mk I).comp C).range)
(hx : C x β I.map (Polynomial.mapRingHom ((Quotient.mk I).comp C).rangeRestrict)) : x = 0 := by |
let i := ((Quotient.mk I).comp C).rangeRestrict
have hi' : RingHom.ker (Polynomial.mapRingHom i) β€ I := by
refine fun f hf => polynomial_mem_ideal_of_coeff_mem_ideal I f fun n => ?_
rw [mem_comap, β Quotient.eq_zero_iff_mem, β RingHom.comp_apply]
rw [RingHom.mem_ker, coe_mapRingHom] at hf
replace hf := congr_arg (fun f : Polynomial _ => f.coeff n) hf
simp only [coeff_map, coeff_zero] at hf
rwa [Subtype.ext_iff, RingHom.coe_rangeRestrict] at hf
obtain β¨x, hx'β© := x
obtain β¨y, rflβ© := RingHom.mem_range.1 hx'
refine Subtype.eq ?_
simp only [RingHom.comp_apply, Quotient.eq_zero_iff_mem, ZeroMemClass.coe_zero]
suffices C (i y) β I.map (Polynomial.mapRingHom i) by
obtain β¨f, hfβ© := mem_image_of_mem_map_of_surjective (Polynomial.mapRingHom i)
(Polynomial.map_surjective _ (RingHom.rangeRestrict_surjective ((Quotient.mk I).comp C))) this
refine sub_add_cancel (C y) f βΈ I.add_mem (hi' ?_ : C y - f β I) hf.1
rw [RingHom.mem_ker, RingHom.map_sub, hf.2, sub_eq_zero, coe_mapRingHom, map_C]
exact hx
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace MvPolynomial
variable {R : Type*} {Ο : Type*} [CommRing R] {r : R}
| Mathlib/RingTheory/Polynomial/Quotient.lean | 205 | 209 | theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i β I) :
(Ideal.Quotient.mk (Ideal.map (C : R β+* MvPolynomial Ο R) I :
Ideal (MvPolynomial Ο R))).comp C i = 0 := by |
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.mem_map_of_mem _ hi
| 1,861 |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
namespace MvPolynomial
variable {R : Type*} {Ο : Type*} [CommRing R] {r : R}
theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i β I) :
(Ideal.Quotient.mk (Ideal.map (C : R β+* MvPolynomial Ο R) I :
Ideal (MvPolynomial Ο R))).comp C i = 0 := by
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.mem_map_of_mem _ hi
#align mv_polynomial.quotient_map_C_eq_zero MvPolynomial.quotient_map_C_eq_zero
| Mathlib/RingTheory/Polynomial/Quotient.lean | 212 | 223 | theorem evalβ_C_mk_eq_zero {I : Ideal R} {a : MvPolynomial Ο R}
(ha : a β (Ideal.map (C : R β+* MvPolynomial Ο R) I : Ideal (MvPolynomial Ο R))) :
evalβHom (C.comp (Ideal.Quotient.mk I)) X a = 0 := by |
rw [as_sum a]
rw [coe_evalβHom, evalβ_sum]
refine Finset.sum_eq_zero fun n _ => ?_
simp only [evalβ_monomial, Function.comp_apply, RingHom.coe_comp]
refine mul_eq_zero_of_left ?_ _
suffices coeff n a β I by
rw [β @Ideal.mk_ker R _ I, RingHom.mem_ker] at this
simp only [this, C_0]
exact mem_map_C_iff.1 ha n
| 1,861 |
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.RingTheory.Polynomial.Quotient
#align_import ring_theory.jacobson_ideal from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
namespace Ideal
variable {R : Type u} {S : Type v}
open Polynomial
section Jacobson
section Ring
variable [Ring R] [Ring S] {I : Ideal R}
def jacobson (I : Ideal R) : Ideal R :=
sInf { J : Ideal R | I β€ J β§ IsMaximal J }
#align ideal.jacobson Ideal.jacobson
theorem le_jacobson : I β€ jacobson I := fun _ hx => mem_sInf.mpr fun _ hJ => hJ.left hx
#align ideal.le_jacobson Ideal.le_jacobson
@[simp]
theorem jacobson_idem : jacobson (jacobson I) = jacobson I :=
le_antisymm (sInf_le_sInf fun _ hJ => β¨sInf_le hJ, hJ.2β©) le_jacobson
#align ideal.jacobson_idem Ideal.jacobson_idem
@[simp]
theorem jacobson_top : jacobson (β€ : Ideal R) = β€ :=
eq_top_iff.2 le_jacobson
#align ideal.jacobson_top Ideal.jacobson_top
@[simp]
theorem jacobson_eq_top_iff : jacobson I = β€ β I = β€ :=
β¨fun H =>
by_contradiction fun hi => let β¨M, hm, himβ© := exists_le_maximal I hi
lt_top_iff_ne_top.1
(lt_of_le_of_lt (show jacobson I β€ M from sInf_le β¨him, hmβ©) <|
lt_top_iff_ne_top.2 hm.ne_top) H,
fun H => eq_top_iff.2 <| le_sInf fun _ β¨hij, _β© => H βΈ hijβ©
#align ideal.jacobson_eq_top_iff Ideal.jacobson_eq_top_iff
theorem jacobson_eq_bot : jacobson I = β₯ β I = β₯ := fun h => eq_bot_iff.mpr (h βΈ le_jacobson)
#align ideal.jacobson_eq_bot Ideal.jacobson_eq_bot
theorem jacobson_eq_self_of_isMaximal [H : IsMaximal I] : I.jacobson = I :=
le_antisymm (sInf_le β¨le_of_eq rfl, Hβ©) le_jacobson
#align ideal.jacobson_eq_self_of_is_maximal Ideal.jacobson_eq_self_of_isMaximal
instance (priority := 100) jacobson.isMaximal [H : IsMaximal I] : IsMaximal (jacobson I) :=
β¨β¨fun htop => H.1.1 (jacobson_eq_top_iff.1 htop), fun _ hJ =>
H.1.2 _ (lt_of_le_of_lt le_jacobson hJ)β©β©
#align ideal.jacobson.is_maximal Ideal.jacobson.isMaximal
theorem mem_jacobson_iff {x : R} : x β jacobson I β β y, β z, z * y * x + z - 1 β I :=
β¨fun hx y =>
by_cases
(fun hxy : I β span {y * x + 1} = β€ =>
let β¨p, hpi, q, hq, hpqβ© := Submodule.mem_sup.1 ((eq_top_iff_one _).1 hxy)
let β¨r, hrβ© := mem_span_singleton'.1 hq
β¨r, by
-- Porting note: supply `mul_add_one` with explicit variables
rw [mul_assoc, β mul_add_one r (y * x), hr, β hpq, β neg_sub, add_sub_cancel_right]
exact I.neg_mem hpiβ©)
fun hxy : I β span {y * x + 1} β β€ => let β¨M, hm1, hm2β© := exists_le_maximal _ hxy
suffices x β M from (this <| mem_sInf.1 hx β¨le_trans le_sup_left hm2, hm1β©).elim
fun hxm => hm1.1.1 <| (eq_top_iff_one _).2 <| add_sub_cancel_left (y * x) 1 βΈ
M.sub_mem (le_sup_right.trans hm2 <| subset_span rfl) (M.mul_mem_left _ hxm),
fun hx => mem_sInf.2 fun M β¨him, hmβ© => by_contradiction fun hxm =>
let β¨y, i, hi, dfβ© := hm.exists_inv hxm
let β¨z, hzβ© := hx (-y)
hm.1.1 <| (eq_top_iff_one _).2 <| sub_sub_cancel (z * -y * x + z) 1 βΈ
M.sub_mem (by
-- Porting note: supply `mul_add_one` with explicit variables
rw [mul_assoc, β mul_add_one z, neg_mul, β sub_eq_iff_eq_add.mpr df.symm, neg_sub,
sub_add_cancel]
exact M.mul_mem_left _ hi) <| him hzβ©
#align ideal.mem_jacobson_iff Ideal.mem_jacobson_iff
| Mathlib/RingTheory/JacobsonIdeal.lean | 125 | 129 | theorem exists_mul_sub_mem_of_sub_one_mem_jacobson {I : Ideal R} (r : R) (h : r - 1 β jacobson I) :
β s, s * r - 1 β I := by |
cases' mem_jacobson_iff.1 h 1 with s hs
use s
simpa [mul_sub] using hs
| 1,862 |
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.RingTheory.Polynomial.Quotient
#align_import ring_theory.jacobson_ideal from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
namespace Ideal
variable {R : Type u} {S : Type v}
open Polynomial
section Jacobson
section Ring
variable [Ring R] [Ring S] {I : Ideal R}
def jacobson (I : Ideal R) : Ideal R :=
sInf { J : Ideal R | I β€ J β§ IsMaximal J }
#align ideal.jacobson Ideal.jacobson
theorem le_jacobson : I β€ jacobson I := fun _ hx => mem_sInf.mpr fun _ hJ => hJ.left hx
#align ideal.le_jacobson Ideal.le_jacobson
@[simp]
theorem jacobson_idem : jacobson (jacobson I) = jacobson I :=
le_antisymm (sInf_le_sInf fun _ hJ => β¨sInf_le hJ, hJ.2β©) le_jacobson
#align ideal.jacobson_idem Ideal.jacobson_idem
@[simp]
theorem jacobson_top : jacobson (β€ : Ideal R) = β€ :=
eq_top_iff.2 le_jacobson
#align ideal.jacobson_top Ideal.jacobson_top
@[simp]
theorem jacobson_eq_top_iff : jacobson I = β€ β I = β€ :=
β¨fun H =>
by_contradiction fun hi => let β¨M, hm, himβ© := exists_le_maximal I hi
lt_top_iff_ne_top.1
(lt_of_le_of_lt (show jacobson I β€ M from sInf_le β¨him, hmβ©) <|
lt_top_iff_ne_top.2 hm.ne_top) H,
fun H => eq_top_iff.2 <| le_sInf fun _ β¨hij, _β© => H βΈ hijβ©
#align ideal.jacobson_eq_top_iff Ideal.jacobson_eq_top_iff
theorem jacobson_eq_bot : jacobson I = β₯ β I = β₯ := fun h => eq_bot_iff.mpr (h βΈ le_jacobson)
#align ideal.jacobson_eq_bot Ideal.jacobson_eq_bot
theorem jacobson_eq_self_of_isMaximal [H : IsMaximal I] : I.jacobson = I :=
le_antisymm (sInf_le β¨le_of_eq rfl, Hβ©) le_jacobson
#align ideal.jacobson_eq_self_of_is_maximal Ideal.jacobson_eq_self_of_isMaximal
instance (priority := 100) jacobson.isMaximal [H : IsMaximal I] : IsMaximal (jacobson I) :=
β¨β¨fun htop => H.1.1 (jacobson_eq_top_iff.1 htop), fun _ hJ =>
H.1.2 _ (lt_of_le_of_lt le_jacobson hJ)β©β©
#align ideal.jacobson.is_maximal Ideal.jacobson.isMaximal
theorem mem_jacobson_iff {x : R} : x β jacobson I β β y, β z, z * y * x + z - 1 β I :=
β¨fun hx y =>
by_cases
(fun hxy : I β span {y * x + 1} = β€ =>
let β¨p, hpi, q, hq, hpqβ© := Submodule.mem_sup.1 ((eq_top_iff_one _).1 hxy)
let β¨r, hrβ© := mem_span_singleton'.1 hq
β¨r, by
-- Porting note: supply `mul_add_one` with explicit variables
rw [mul_assoc, β mul_add_one r (y * x), hr, β hpq, β neg_sub, add_sub_cancel_right]
exact I.neg_mem hpiβ©)
fun hxy : I β span {y * x + 1} β β€ => let β¨M, hm1, hm2β© := exists_le_maximal _ hxy
suffices x β M from (this <| mem_sInf.1 hx β¨le_trans le_sup_left hm2, hm1β©).elim
fun hxm => hm1.1.1 <| (eq_top_iff_one _).2 <| add_sub_cancel_left (y * x) 1 βΈ
M.sub_mem (le_sup_right.trans hm2 <| subset_span rfl) (M.mul_mem_left _ hxm),
fun hx => mem_sInf.2 fun M β¨him, hmβ© => by_contradiction fun hxm =>
let β¨y, i, hi, dfβ© := hm.exists_inv hxm
let β¨z, hzβ© := hx (-y)
hm.1.1 <| (eq_top_iff_one _).2 <| sub_sub_cancel (z * -y * x + z) 1 βΈ
M.sub_mem (by
-- Porting note: supply `mul_add_one` with explicit variables
rw [mul_assoc, β mul_add_one z, neg_mul, β sub_eq_iff_eq_add.mpr df.symm, neg_sub,
sub_add_cancel]
exact M.mul_mem_left _ hi) <| him hzβ©
#align ideal.mem_jacobson_iff Ideal.mem_jacobson_iff
theorem exists_mul_sub_mem_of_sub_one_mem_jacobson {I : Ideal R} (r : R) (h : r - 1 β jacobson I) :
β s, s * r - 1 β I := by
cases' mem_jacobson_iff.1 h 1 with s hs
use s
simpa [mul_sub] using hs
#align ideal.exists_mul_sub_mem_of_sub_one_mem_jacobson Ideal.exists_mul_sub_mem_of_sub_one_mem_jacobson
| Mathlib/RingTheory/JacobsonIdeal.lean | 134 | 143 | theorem eq_jacobson_iff_sInf_maximal :
I.jacobson = I β β M : Set (Ideal R), (β J β M, IsMaximal J β¨ J = β€) β§ I = sInf M := by |
use fun hI => β¨{ J : Ideal R | I β€ J β§ J.IsMaximal }, β¨fun _ hJ => Or.inl hJ.right, hI.symmβ©β©
rintro β¨M, hM, hInfβ©
refine le_antisymm (fun x hx => ?_) le_jacobson
rw [hInf, mem_sInf]
intro I hI
cases' hM I hI with is_max is_top
Β· exact (mem_sInf.1 hx) β¨le_sInf_iff.1 (le_of_eq hInf) I hI, is_maxβ©
Β· exact is_top.symm βΈ Submodule.mem_top
| 1,862 |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.RingTheory.JacobsonIdeal
import Mathlib.Logic.Equiv.TransferInstance
import Mathlib.Tactic.TFAE
#align_import ring_theory.ideal.local_ring from "leanprover-community/mathlib"@"ec1c7d810034d4202b0dd239112d1792be9f6fdc"
universe u v w u'
variable {R : Type u} {S : Type v} {T : Type w} {K : Type u'}
class LocalRing (R : Type u) [Semiring R] extends Nontrivial R : Prop where
of_is_unit_or_is_unit_of_add_one ::
isUnit_or_isUnit_of_add_one {a b : R} (h : a + b = 1) : IsUnit a β¨ IsUnit b
#align local_ring LocalRing
section CommSemiring
variable [CommSemiring R]
namespace LocalRing
theorem of_isUnit_or_isUnit_of_isUnit_add [Nontrivial R]
(h : β a b : R, IsUnit (a + b) β IsUnit a β¨ IsUnit b) : LocalRing R :=
β¨fun {a b} hab => h a b <| hab.symm βΈ isUnit_oneβ©
#align local_ring.of_is_unit_or_is_unit_of_is_unit_add LocalRing.of_isUnit_or_isUnit_of_isUnit_add
theorem of_nonunits_add [Nontrivial R]
(h : β a b : R, a β nonunits R β b β nonunits R β a + b β nonunits R) : LocalRing R :=
β¨fun {a b} hab => or_iff_not_and_not.2 fun H => h a b H.1 H.2 <| hab.symm βΈ isUnit_oneβ©
#align local_ring.of_nonunits_add LocalRing.of_nonunits_add
theorem of_unique_max_ideal (h : β! I : Ideal R, I.IsMaximal) : LocalRing R :=
@of_nonunits_add _ _
(nontrivial_of_ne (0 : R) 1 <|
let β¨I, Imax, _β© := h
fun H : 0 = 1 => Imax.1.1 <| I.eq_top_iff_one.2 <| H βΈ I.zero_mem)
fun x y hx hy H =>
let β¨I, Imax, Iuniqβ© := h
let β¨Ix, Ixmax, Hxβ© := exists_max_ideal_of_mem_nonunits hx
let β¨Iy, Iymax, Hyβ© := exists_max_ideal_of_mem_nonunits hy
have xmemI : x β I := Iuniq Ix Ixmax βΈ Hx
have ymemI : y β I := Iuniq Iy Iymax βΈ Hy
Imax.1.1 <| I.eq_top_of_isUnit_mem (I.add_mem xmemI ymemI) H
#align local_ring.of_unique_max_ideal LocalRing.of_unique_max_ideal
theorem of_unique_nonzero_prime (h : β! P : Ideal R, P β β₯ β§ Ideal.IsPrime P) : LocalRing R :=
of_unique_max_ideal
(by
rcases h with β¨P, β¨hPnonzero, hPnot_top, _β©, hPuniqueβ©
refine β¨P, β¨β¨hPnot_top, ?_β©β©, fun M hM => hPunique _ β¨?_, Ideal.IsMaximal.isPrime hMβ©β©
Β· refine Ideal.maximal_of_no_maximal fun M hPM hM => ne_of_lt hPM ?_
exact (hPunique _ β¨ne_bot_of_gt hPM, Ideal.IsMaximal.isPrime hMβ©).symm
Β· rintro rfl
exact hPnot_top (hM.1.2 P (bot_lt_iff_ne_bot.2 hPnonzero)))
#align local_ring.of_unique_nonzero_prime LocalRing.of_unique_nonzero_prime
variable [LocalRing R]
| Mathlib/RingTheory/Ideal/LocalRing.lean | 93 | 96 | theorem isUnit_or_isUnit_of_isUnit_add {a b : R} (h : IsUnit (a + b)) : IsUnit a β¨ IsUnit b := by |
rcases h with β¨u, huβ©
rw [β Units.inv_mul_eq_one, mul_add] at hu
apply Or.imp _ _ (isUnit_or_isUnit_of_add_one hu) <;> exact isUnit_of_mul_isUnit_right
| 1,863 |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.RingTheory.JacobsonIdeal
import Mathlib.Logic.Equiv.TransferInstance
import Mathlib.Tactic.TFAE
#align_import ring_theory.ideal.local_ring from "leanprover-community/mathlib"@"ec1c7d810034d4202b0dd239112d1792be9f6fdc"
universe u v w u'
variable {R : Type u} {S : Type v} {T : Type w} {K : Type u'}
class LocalRing (R : Type u) [Semiring R] extends Nontrivial R : Prop where
of_is_unit_or_is_unit_of_add_one ::
isUnit_or_isUnit_of_add_one {a b : R} (h : a + b = 1) : IsUnit a β¨ IsUnit b
#align local_ring LocalRing
section CommSemiring
variable [CommSemiring R]
namespace LocalRing
theorem of_isUnit_or_isUnit_of_isUnit_add [Nontrivial R]
(h : β a b : R, IsUnit (a + b) β IsUnit a β¨ IsUnit b) : LocalRing R :=
β¨fun {a b} hab => h a b <| hab.symm βΈ isUnit_oneβ©
#align local_ring.of_is_unit_or_is_unit_of_is_unit_add LocalRing.of_isUnit_or_isUnit_of_isUnit_add
theorem of_nonunits_add [Nontrivial R]
(h : β a b : R, a β nonunits R β b β nonunits R β a + b β nonunits R) : LocalRing R :=
β¨fun {a b} hab => or_iff_not_and_not.2 fun H => h a b H.1 H.2 <| hab.symm βΈ isUnit_oneβ©
#align local_ring.of_nonunits_add LocalRing.of_nonunits_add
theorem of_unique_max_ideal (h : β! I : Ideal R, I.IsMaximal) : LocalRing R :=
@of_nonunits_add _ _
(nontrivial_of_ne (0 : R) 1 <|
let β¨I, Imax, _β© := h
fun H : 0 = 1 => Imax.1.1 <| I.eq_top_iff_one.2 <| H βΈ I.zero_mem)
fun x y hx hy H =>
let β¨I, Imax, Iuniqβ© := h
let β¨Ix, Ixmax, Hxβ© := exists_max_ideal_of_mem_nonunits hx
let β¨Iy, Iymax, Hyβ© := exists_max_ideal_of_mem_nonunits hy
have xmemI : x β I := Iuniq Ix Ixmax βΈ Hx
have ymemI : y β I := Iuniq Iy Iymax βΈ Hy
Imax.1.1 <| I.eq_top_of_isUnit_mem (I.add_mem xmemI ymemI) H
#align local_ring.of_unique_max_ideal LocalRing.of_unique_max_ideal
theorem of_unique_nonzero_prime (h : β! P : Ideal R, P β β₯ β§ Ideal.IsPrime P) : LocalRing R :=
of_unique_max_ideal
(by
rcases h with β¨P, β¨hPnonzero, hPnot_top, _β©, hPuniqueβ©
refine β¨P, β¨β¨hPnot_top, ?_β©β©, fun M hM => hPunique _ β¨?_, Ideal.IsMaximal.isPrime hMβ©β©
Β· refine Ideal.maximal_of_no_maximal fun M hPM hM => ne_of_lt hPM ?_
exact (hPunique _ β¨ne_bot_of_gt hPM, Ideal.IsMaximal.isPrime hMβ©).symm
Β· rintro rfl
exact hPnot_top (hM.1.2 P (bot_lt_iff_ne_bot.2 hPnonzero)))
#align local_ring.of_unique_nonzero_prime LocalRing.of_unique_nonzero_prime
variable [LocalRing R]
theorem isUnit_or_isUnit_of_isUnit_add {a b : R} (h : IsUnit (a + b)) : IsUnit a β¨ IsUnit b := by
rcases h with β¨u, huβ©
rw [β Units.inv_mul_eq_one, mul_add] at hu
apply Or.imp _ _ (isUnit_or_isUnit_of_add_one hu) <;> exact isUnit_of_mul_isUnit_right
#align local_ring.is_unit_or_is_unit_of_is_unit_add LocalRing.isUnit_or_isUnit_of_isUnit_add
theorem nonunits_add {a b : R} (ha : a β nonunits R) (hb : b β nonunits R) : a + b β nonunits R :=
fun H => not_or_of_not ha hb (isUnit_or_isUnit_of_isUnit_add H)
#align local_ring.nonunits_add LocalRing.nonunits_add
variable (R)
def maximalIdeal : Ideal R where
carrier := nonunits R
zero_mem' := zero_mem_nonunits.2 <| zero_ne_one
add_mem' {_ _} hx hy := nonunits_add hx hy
smul_mem' _ _ := mul_mem_nonunits_right
#align local_ring.maximal_ideal LocalRing.maximalIdeal
instance maximalIdeal.isMaximal : (maximalIdeal R).IsMaximal := by
rw [Ideal.isMaximal_iff]
constructor
Β· intro h
apply h
exact isUnit_one
Β· intro I x _ hx H
erw [Classical.not_not] at hx
rcases hx with β¨u, rflβ©
simpa using I.mul_mem_left (βuβ»ΒΉ) H
#align local_ring.maximal_ideal.is_maximal LocalRing.maximalIdeal.isMaximal
theorem maximal_ideal_unique : β! I : Ideal R, I.IsMaximal :=
β¨maximalIdeal R, maximalIdeal.isMaximal R, fun I hI =>
hI.eq_of_le (maximalIdeal.isMaximal R).1.1 fun _ hx => hI.1.1 β I.eq_top_of_isUnit_mem hxβ©
#align local_ring.maximal_ideal_unique LocalRing.maximal_ideal_unique
variable {R}
theorem eq_maximalIdeal {I : Ideal R} (hI : I.IsMaximal) : I = maximalIdeal R :=
ExistsUnique.unique (maximal_ideal_unique R) hI <| maximalIdeal.isMaximal R
#align local_ring.eq_maximal_ideal LocalRing.eq_maximalIdeal
| Mathlib/RingTheory/Ideal/LocalRing.lean | 136 | 138 | theorem le_maximalIdeal {J : Ideal R} (hJ : J β β€) : J β€ maximalIdeal R := by |
rcases Ideal.exists_le_maximal J hJ with β¨M, hM1, hM2β©
rwa [β eq_maximalIdeal hM1]
| 1,863 |
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix
import Mathlib.Topology.Algebra.Module.Simple
import Mathlib.Topology.Algebra.Module.Determinant
import Mathlib.RingTheory.Ideal.LocalRing
#align_import topology.algebra.module.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter
section NormedField
variable {π : Type u} [hnorm : NontriviallyNormedField π] {E : Type v} [AddCommGroup E] [Module π E]
[TopologicalSpace E] [TopologicalAddGroup E] [ContinuousSMul π E] {F : Type w} [AddCommGroup F]
[Module π F] [TopologicalSpace F] [TopologicalAddGroup F] [ContinuousSMul π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F']
| Mathlib/Topology/Algebra/Module/FiniteDimension.lean | 77 | 127 | theorem unique_topology_of_t2 {t : TopologicalSpace π} (hβ : @TopologicalAddGroup π t _)
(hβ : @ContinuousSMul π π _ hnorm.toUniformSpace.toTopologicalSpace t) (hβ : @T2Space π t) :
t = hnorm.toUniformSpace.toTopologicalSpace := by |
-- Let `π£β` denote the topology on `π` induced by the norm, and `π£` be any T2 vector
-- topology on `π`. To show that `π£β = π£`, it suffices to show that they have the same
-- neighborhoods of 0.
refine TopologicalAddGroup.ext hβ inferInstance (le_antisymm ?_ ?_)
Β· -- To show `π£ β€ π£β`, we have to show that closed balls are `π£`-neighborhoods of 0.
rw [Metric.nhds_basis_closedBall.ge_iff]
-- Let `Ξ΅ > 0`. Since `π` is nontrivially normed, we have `0 < βΞΎββ < Ξ΅` for some `ΞΎβ : π`.
intro Ξ΅ hΞ΅
rcases NormedField.exists_norm_lt π hΞ΅ with β¨ΞΎβ, hΞΎβ, hΞΎβΞ΅β©
-- Since `ΞΎβ β 0` and `π£` is T2, we know that `{ΞΎβ}αΆ` is a `π£`-neighborhood of 0.
-- Porting note: added `mem_compl_singleton_iff.mpr`
have : {ΞΎβ}αΆ β @nhds π t 0 := IsOpen.mem_nhds isOpen_compl_singleton <|
mem_compl_singleton_iff.mpr <| Ne.symm <| norm_ne_zero_iff.mp hΞΎβ.ne.symm
-- Thus, its balanced core `π` is too. Let's show that the closed ball of radius `Ξ΅` contains
-- `π`, which will imply that the closed ball is indeed a `π£`-neighborhood of 0.
have : balancedCore π {ΞΎβ}αΆ β @nhds π t 0 := balancedCore_mem_nhds_zero this
refine mem_of_superset this fun ΞΎ hΞΎ => ?_
-- Let `ΞΎ β π`. We want to show `βΞΎβ < Ξ΅`. If `ΞΎ = 0`, this is trivial.
by_cases hΞΎ0 : ΞΎ = 0
Β· rw [hΞΎ0]
exact Metric.mem_closedBall_self hΞ΅.le
Β· rw [mem_closedBall_zero_iff]
-- Now suppose `ΞΎ β 0`. By contradiction, let's assume `Ξ΅ < βΞΎβ`, and show that
-- `ΞΎβ β π β {ΞΎβ}αΆ`, which is a contradiction.
by_contra! h
suffices (ΞΎβ * ΞΎβ»ΒΉ) β’ ΞΎ β balancedCore π {ΞΎβ}αΆ by
rw [smul_eq_mul π, mul_assoc, inv_mul_cancel hΞΎ0, mul_one] at this
exact not_mem_compl_iff.mpr (mem_singleton ΞΎβ) ((balancedCore_subset _) this)
-- For that, we use that `π` is balanced : since `βΞΎββ < Ξ΅ < βΞΎβ`, we have `βΞΎβ / ΞΎβ β€ 1`,
-- hence `ΞΎβ = (ΞΎβ / ΞΎ) β’ ΞΎ β π` because `ΞΎ β π`.
refine (balancedCore_balanced _).smul_mem ?_ hΞΎ
rw [norm_mul, norm_inv, mul_inv_le_iff (norm_pos_iff.mpr hΞΎ0), mul_one]
exact (hΞΎβΞ΅.trans h).le
Β· -- Finally, to show `π£β β€ π£`, we simply argue that `id = (fun x β¦ x β’ 1)` is continuous from
-- `(π, π£β)` to `(π, π£)` because `(β’) : (π, π£β) Γ (π, π£) β (π, π£)` is continuous.
calc
@nhds π hnorm.toUniformSpace.toTopologicalSpace 0 =
map id (@nhds π hnorm.toUniformSpace.toTopologicalSpace 0) :=
map_id.symm
_ = map (fun x => id x β’ (1 : π)) (@nhds π hnorm.toUniformSpace.toTopologicalSpace 0) := by
conv_rhs =>
congr
ext
rw [smul_eq_mul, mul_one]
_ β€ @nhds π t ((0 : π) β’ (1 : π)) :=
(@Tendsto.smul_const _ _ _ hnorm.toUniformSpace.toTopologicalSpace t _ _ _ _ _
tendsto_id (1 : π))
_ = @nhds π t 0 := by rw [zero_smul]
| 1,864 |
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix
import Mathlib.Topology.Algebra.Module.Simple
import Mathlib.Topology.Algebra.Module.Determinant
import Mathlib.RingTheory.Ideal.LocalRing
#align_import topology.algebra.module.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter
section NormedField
variable {π : Type u} [hnorm : NontriviallyNormedField π] {E : Type v} [AddCommGroup E] [Module π E]
[TopologicalSpace E] [TopologicalAddGroup E] [ContinuousSMul π E] {F : Type w} [AddCommGroup F]
[Module π F] [TopologicalSpace F] [TopologicalAddGroup F] [ContinuousSMul π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F']
theorem unique_topology_of_t2 {t : TopologicalSpace π} (hβ : @TopologicalAddGroup π t _)
(hβ : @ContinuousSMul π π _ hnorm.toUniformSpace.toTopologicalSpace t) (hβ : @T2Space π t) :
t = hnorm.toUniformSpace.toTopologicalSpace := by
-- Let `π£β` denote the topology on `π` induced by the norm, and `π£` be any T2 vector
-- topology on `π`. To show that `π£β = π£`, it suffices to show that they have the same
-- neighborhoods of 0.
refine TopologicalAddGroup.ext hβ inferInstance (le_antisymm ?_ ?_)
Β· -- To show `π£ β€ π£β`, we have to show that closed balls are `π£`-neighborhoods of 0.
rw [Metric.nhds_basis_closedBall.ge_iff]
-- Let `Ξ΅ > 0`. Since `π` is nontrivially normed, we have `0 < βΞΎββ < Ξ΅` for some `ΞΎβ : π`.
intro Ξ΅ hΞ΅
rcases NormedField.exists_norm_lt π hΞ΅ with β¨ΞΎβ, hΞΎβ, hΞΎβΞ΅β©
-- Since `ΞΎβ β 0` and `π£` is T2, we know that `{ΞΎβ}αΆ` is a `π£`-neighborhood of 0.
-- Porting note: added `mem_compl_singleton_iff.mpr`
have : {ΞΎβ}αΆ β @nhds π t 0 := IsOpen.mem_nhds isOpen_compl_singleton <|
mem_compl_singleton_iff.mpr <| Ne.symm <| norm_ne_zero_iff.mp hΞΎβ.ne.symm
-- Thus, its balanced core `π` is too. Let's show that the closed ball of radius `Ξ΅` contains
-- `π`, which will imply that the closed ball is indeed a `π£`-neighborhood of 0.
have : balancedCore π {ΞΎβ}αΆ β @nhds π t 0 := balancedCore_mem_nhds_zero this
refine mem_of_superset this fun ΞΎ hΞΎ => ?_
-- Let `ΞΎ β π`. We want to show `βΞΎβ < Ξ΅`. If `ΞΎ = 0`, this is trivial.
by_cases hΞΎ0 : ΞΎ = 0
Β· rw [hΞΎ0]
exact Metric.mem_closedBall_self hΞ΅.le
Β· rw [mem_closedBall_zero_iff]
-- Now suppose `ΞΎ β 0`. By contradiction, let's assume `Ξ΅ < βΞΎβ`, and show that
-- `ΞΎβ β π β {ΞΎβ}αΆ`, which is a contradiction.
by_contra! h
suffices (ΞΎβ * ΞΎβ»ΒΉ) β’ ΞΎ β balancedCore π {ΞΎβ}αΆ by
rw [smul_eq_mul π, mul_assoc, inv_mul_cancel hΞΎ0, mul_one] at this
exact not_mem_compl_iff.mpr (mem_singleton ΞΎβ) ((balancedCore_subset _) this)
-- For that, we use that `π` is balanced : since `βΞΎββ < Ξ΅ < βΞΎβ`, we have `βΞΎβ / ΞΎβ β€ 1`,
-- hence `ΞΎβ = (ΞΎβ / ΞΎ) β’ ΞΎ β π` because `ΞΎ β π`.
refine (balancedCore_balanced _).smul_mem ?_ hΞΎ
rw [norm_mul, norm_inv, mul_inv_le_iff (norm_pos_iff.mpr hΞΎ0), mul_one]
exact (hΞΎβΞ΅.trans h).le
Β· -- Finally, to show `π£β β€ π£`, we simply argue that `id = (fun x β¦ x β’ 1)` is continuous from
-- `(π, π£β)` to `(π, π£)` because `(β’) : (π, π£β) Γ (π, π£) β (π, π£)` is continuous.
calc
@nhds π hnorm.toUniformSpace.toTopologicalSpace 0 =
map id (@nhds π hnorm.toUniformSpace.toTopologicalSpace 0) :=
map_id.symm
_ = map (fun x => id x β’ (1 : π)) (@nhds π hnorm.toUniformSpace.toTopologicalSpace 0) := by
conv_rhs =>
congr
ext
rw [smul_eq_mul, mul_one]
_ β€ @nhds π t ((0 : π) β’ (1 : π)) :=
(@Tendsto.smul_const _ _ _ hnorm.toUniformSpace.toTopologicalSpace t _ _ _ _ _
tendsto_id (1 : π))
_ = @nhds π t 0 := by rw [zero_smul]
#align unique_topology_of_t2 unique_topology_of_t2
| Mathlib/Topology/Algebra/Module/FiniteDimension.lean | 132 | 173 | theorem LinearMap.continuous_of_isClosed_ker (l : E ββ[π] π)
(hl : IsClosed (LinearMap.ker l : Set E)) :
Continuous l := by |
-- `l` is either constant or surjective. If it is constant, the result is trivial.
by_cases H : finrank π (LinearMap.range l) = 0
Β· rw [Submodule.finrank_eq_zero, LinearMap.range_eq_bot] at H
rw [H]
exact continuous_zero
Β· -- In the case where `l` is surjective, we factor it as `Ο : (E β§Έ l.ker) ββ[π] π`. Note that
-- `E β§Έ l.ker` is T2 since `l.ker` is closed.
have : finrank π (LinearMap.range l) = 1 :=
le_antisymm (finrank_self π βΈ l.range.finrank_le) (zero_lt_iff.mpr H)
have hi : Function.Injective ((LinearMap.ker l).liftQ l (le_refl _)) := by
rw [β LinearMap.ker_eq_bot]
exact Submodule.ker_liftQ_eq_bot _ _ _ (le_refl _)
have hs : Function.Surjective ((LinearMap.ker l).liftQ l (le_refl _)) := by
rw [β LinearMap.range_eq_top, Submodule.range_liftQ]
exact Submodule.eq_top_of_finrank_eq ((finrank_self π).symm βΈ this)
let Ο : (E β§Έ LinearMap.ker l) ββ[π] π :=
LinearEquiv.ofBijective ((LinearMap.ker l).liftQ l (le_refl _)) β¨hi, hsβ©
have hlΟ : (l : E β π) = Ο β (LinearMap.ker l).mkQ := by ext; rfl
-- Since the quotient map `E ββ[π] (E β§Έ l.ker)` is continuous, the continuity of `l` will follow
-- form the continuity of `Ο`.
suffices Continuous Ο.toEquiv by
rw [hlΟ]
exact this.comp continuous_quot_mk
-- The pullback by `Ο.symm` of the quotient topology is a T2 topology on `π`, because `Ο.symm`
-- is injective. Since `Ο.symm` is linear, it is also a vector space topology.
-- Hence, we know that it is equal to the topology induced by the norm.
have : induced Ο.toEquiv.symm inferInstance = hnorm.toUniformSpace.toTopologicalSpace := by
refine unique_topology_of_t2 (topologicalAddGroup_induced Ο.symm.toLinearMap)
(continuousSMul_induced Ο.symm.toLinearMap) ?_
-- Porting note: was `rw [t2Space_iff]`
refine (@t2Space_iff π (induced (β(LinearEquiv.toEquiv Ο).symm) inferInstance)).mpr ?_
exact fun x y hxy =>
@separated_by_continuous _ _ (induced _ _) _ _ _ continuous_induced_dom _ _
(Ο.toEquiv.symm.injective.ne hxy)
-- Finally, the pullback by `Ο.symm` is exactly the pushforward by `Ο`, so we have to prove
-- that `Ο` is continuous when `π` is endowed with the pushforward by `Ο` of the quotient
-- topology, which is trivial by definition of the pushforward.
rw [this.symm, Equiv.induced_symm]
exact continuous_coinduced_rng
| 1,864 |
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import analysis.normed_space.complemented from "leanprover-community/mathlib"@"3397560e65278e5f31acefcdea63138bd53d1cd4"
variable {π E F G : Type*} [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E]
[NormedAddCommGroup F] [NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
noncomputable section
open LinearMap (ker range)
namespace ContinuousLinearMap
section
variable [CompleteSpace π]
| Mathlib/Analysis/NormedSpace/Complemented.lean | 39 | 43 | theorem ker_closedComplemented_of_finiteDimensional_range (f : E βL[π] F)
[FiniteDimensional π (range f)] : (ker f).ClosedComplemented := by |
set f' : E βL[π] range f := f.codRestrict _ (LinearMap.mem_range_self (f : E ββ[π] F))
rcases f'.exists_right_inverse_of_surjective (f : E ββ[π] F).range_rangeRestrict with β¨g, hgβ©
simpa only [f', ker_codRestrict] using f'.closedComplemented_ker_of_rightInverse g (ext_iff.1 hg)
| 1,865 |
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import analysis.normed_space.complemented from "leanprover-community/mathlib"@"3397560e65278e5f31acefcdea63138bd53d1cd4"
variable {π E F G : Type*} [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E]
[NormedAddCommGroup F] [NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
noncomputable section
open LinearMap (ker range)
namespace Submodule
variable [CompleteSpace E] (p q : Subspace π E)
def prodEquivOfClosedCompl (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) : (p Γ q) βL[π] E := by
haveI := hp.completeSpace_coe; haveI := hq.completeSpace_coe
refine (p.prodEquivOfIsCompl q h).toContinuousLinearEquivOfContinuous ?_
exact (p.subtypeL.coprod q.subtypeL).continuous
#align subspace.prod_equiv_of_closed_compl Submodule.prodEquivOfClosedCompl
def linearProjOfClosedCompl (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) : E βL[π] p :=
ContinuousLinearMap.fst π p q βL β(prodEquivOfClosedCompl p q h hp hq).symm
#align subspace.linear_proj_of_closed_compl Submodule.linearProjOfClosedCompl
variable {p q}
@[simp]
theorem coe_prodEquivOfClosedCompl (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) :
β(p.prodEquivOfClosedCompl q h hp hq) = p.prodEquivOfIsCompl q h := rfl
#align subspace.coe_prod_equiv_of_closed_compl Submodule.coe_prodEquivOfClosedCompl
@[simp]
theorem coe_prodEquivOfClosedCompl_symm (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) :
β(p.prodEquivOfClosedCompl q h hp hq).symm = (p.prodEquivOfIsCompl q h).symm := rfl
#align subspace.coe_prod_equiv_of_closed_compl_symm Submodule.coe_prodEquivOfClosedCompl_symm
@[simp]
theorem coe_continuous_linearProjOfClosedCompl (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) :
(p.linearProjOfClosedCompl q h hp hq : E ββ[π] p) = p.linearProjOfIsCompl q h := rfl
#align subspace.coe_continuous_linear_proj_of_closed_compl Submodule.coe_continuous_linearProjOfClosedCompl
@[simp]
theorem coe_continuous_linearProjOfClosedCompl' (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) :
β(p.linearProjOfClosedCompl q h hp hq) = p.linearProjOfIsCompl q h := rfl
#align subspace.coe_continuous_linear_proj_of_closed_compl' Submodule.coe_continuous_linearProjOfClosedCompl'
theorem ClosedComplemented.of_isCompl_isClosed (h : IsCompl p q) (hp : IsClosed (p : Set E))
(hq : IsClosed (q : Set E)) : p.ClosedComplemented :=
β¨p.linearProjOfClosedCompl q h hp hq, Submodule.linearProjOfIsCompl_apply_left hβ©
#align subspace.closed_complemented_of_closed_compl Submodule.ClosedComplemented.of_isCompl_isClosed
alias IsCompl.closedComplemented_of_isClosed := ClosedComplemented.of_isCompl_isClosed
theorem closedComplemented_iff_isClosed_exists_isClosed_isCompl :
p.ClosedComplemented β
IsClosed (p : Set E) β§ β q : Submodule π E, IsClosed (q : Set E) β§ IsCompl p q :=
β¨fun h => β¨h.isClosed, h.exists_isClosed_isComplβ©,
fun β¨hp, β¨_, hq, hpqβ©β© => .of_isCompl_isClosed hpq hp hqβ©
#align subspace.closed_complemented_iff_has_closed_compl Submodule.closedComplemented_iff_isClosed_exists_isClosed_isCompl
| Mathlib/Analysis/NormedSpace/Complemented.lean | 139 | 143 | theorem ClosedComplemented.of_quotient_finiteDimensional [CompleteSpace π]
[FiniteDimensional π (E β§Έ p)] (hp : IsClosed (p : Set E)) : p.ClosedComplemented := by |
obtain β¨q, hqβ© : β q, IsCompl p q := p.exists_isCompl
haveI : FiniteDimensional π q := (p.quotientEquivOfIsCompl q hq).finiteDimensional
exact .of_isCompl_isClosed hq hp q.closed_of_finiteDimensional
| 1,865 |
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.NormedSpace.Complemented
#align_import analysis.calculus.implicit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Topology
open Filter
open ContinuousLinearMap (fst snd smulRight ker_prod)
open ContinuousLinearEquiv (ofBijective)
open LinearMap (ker range)
-- Porting note(#5171): linter not yet ported @[nolint has_nonempty_instance]
structure ImplicitFunctionData (π : Type*) [NontriviallyNormedField π] (E : Type*)
[NormedAddCommGroup E] [NormedSpace π E] [CompleteSpace E] (F : Type*) [NormedAddCommGroup F]
[NormedSpace π F] [CompleteSpace F] (G : Type*) [NormedAddCommGroup G] [NormedSpace π G]
[CompleteSpace G] where
leftFun : E β F
leftDeriv : E βL[π] F
rightFun : E β G
rightDeriv : E βL[π] G
pt : E
left_has_deriv : HasStrictFDerivAt leftFun leftDeriv pt
right_has_deriv : HasStrictFDerivAt rightFun rightDeriv pt
left_range : range leftDeriv = β€
right_range : range rightDeriv = β€
isCompl_ker : IsCompl (ker leftDeriv) (ker rightDeriv)
#align implicit_function_data ImplicitFunctionData
namespace ImplicitFunctionData
variable {π : Type*} [NontriviallyNormedField π] {E : Type*} [NormedAddCommGroup E]
[NormedSpace π E] [CompleteSpace E] {F : Type*} [NormedAddCommGroup F] [NormedSpace π F]
[CompleteSpace F] {G : Type*} [NormedAddCommGroup G] [NormedSpace π G] [CompleteSpace G]
(Ο : ImplicitFunctionData π E F G)
def prodFun (x : E) : F Γ G :=
(Ο.leftFun x, Ο.rightFun x)
#align implicit_function_data.prod_fun ImplicitFunctionData.prodFun
@[simp]
theorem prodFun_apply (x : E) : Ο.prodFun x = (Ο.leftFun x, Ο.rightFun x) :=
rfl
#align implicit_function_data.prod_fun_apply ImplicitFunctionData.prodFun_apply
protected theorem hasStrictFDerivAt :
HasStrictFDerivAt Ο.prodFun
(Ο.leftDeriv.equivProdOfSurjectiveOfIsCompl Ο.rightDeriv Ο.left_range Ο.right_range
Ο.isCompl_ker :
E βL[π] F Γ G)
Ο.pt :=
Ο.left_has_deriv.prod Ο.right_has_deriv
#align implicit_function_data.has_strict_fderiv_at ImplicitFunctionData.hasStrictFDerivAt
def toPartialHomeomorph : PartialHomeomorph E (F Γ G) :=
Ο.hasStrictFDerivAt.toPartialHomeomorph _
#align implicit_function_data.to_local_homeomorph ImplicitFunctionData.toPartialHomeomorph
def implicitFunction : F β G β E :=
Function.curry <| Ο.toPartialHomeomorph.symm
#align implicit_function_data.implicit_function ImplicitFunctionData.implicitFunction
@[simp]
theorem toPartialHomeomorph_coe : βΟ.toPartialHomeomorph = Ο.prodFun :=
rfl
#align implicit_function_data.to_local_homeomorph_coe ImplicitFunctionData.toPartialHomeomorph_coe
theorem toPartialHomeomorph_apply (x : E) : Ο.toPartialHomeomorph x = (Ο.leftFun x, Ο.rightFun x) :=
rfl
#align implicit_function_data.to_local_homeomorph_apply ImplicitFunctionData.toPartialHomeomorph_apply
theorem pt_mem_toPartialHomeomorph_source : Ο.pt β Ο.toPartialHomeomorph.source :=
Ο.hasStrictFDerivAt.mem_toPartialHomeomorph_source
#align implicit_function_data.pt_mem_to_local_homeomorph_source ImplicitFunctionData.pt_mem_toPartialHomeomorph_source
theorem map_pt_mem_toPartialHomeomorph_target :
(Ο.leftFun Ο.pt, Ο.rightFun Ο.pt) β Ο.toPartialHomeomorph.target :=
Ο.toPartialHomeomorph.map_source <| Ο.pt_mem_toPartialHomeomorph_source
#align implicit_function_data.map_pt_mem_to_local_homeomorph_target ImplicitFunctionData.map_pt_mem_toPartialHomeomorph_target
theorem prod_map_implicitFunction :
βαΆ p : F Γ G in π (Ο.prodFun Ο.pt), Ο.prodFun (Ο.implicitFunction p.1 p.2) = p :=
Ο.hasStrictFDerivAt.eventually_right_inverse.mono fun β¨_, _β© h => h
#align implicit_function_data.prod_map_implicit_function ImplicitFunctionData.prod_map_implicitFunction
theorem left_map_implicitFunction :
βαΆ p : F Γ G in π (Ο.prodFun Ο.pt), Ο.leftFun (Ο.implicitFunction p.1 p.2) = p.1 :=
Ο.prod_map_implicitFunction.mono fun _ => congr_arg Prod.fst
#align implicit_function_data.left_map_implicit_function ImplicitFunctionData.left_map_implicitFunction
theorem right_map_implicitFunction :
βαΆ p : F Γ G in π (Ο.prodFun Ο.pt), Ο.rightFun (Ο.implicitFunction p.1 p.2) = p.2 :=
Ο.prod_map_implicitFunction.mono fun _ => congr_arg Prod.snd
#align implicit_function_data.right_map_implicit_function ImplicitFunctionData.right_map_implicitFunction
theorem implicitFunction_apply_image :
βαΆ x in π Ο.pt, Ο.implicitFunction (Ο.leftFun x) (Ο.rightFun x) = x :=
Ο.hasStrictFDerivAt.eventually_left_inverse
#align implicit_function_data.implicit_function_apply_image ImplicitFunctionData.implicitFunction_apply_image
theorem map_nhds_eq : map Ο.leftFun (π Ο.pt) = π (Ο.leftFun Ο.pt) :=
show map (Prod.fst β Ο.prodFun) (π Ο.pt) = π (Ο.prodFun Ο.pt).1 by
rw [β map_map, Ο.hasStrictFDerivAt.map_nhds_eq_of_equiv, map_fst_nhds]
#align implicit_function_data.map_nhds_eq ImplicitFunctionData.map_nhds_eq
| Mathlib/Analysis/Calculus/Implicit.lean | 201 | 214 | theorem implicitFunction_hasStrictFDerivAt (g'inv : G βL[π] E)
(hg'inv : Ο.rightDeriv.comp g'inv = ContinuousLinearMap.id π G)
(hg'invf : Ο.leftDeriv.comp g'inv = 0) :
HasStrictFDerivAt (Ο.implicitFunction (Ο.leftFun Ο.pt)) g'inv (Ο.rightFun Ο.pt) := by |
have := Ο.hasStrictFDerivAt.to_localInverse
simp only [prodFun] at this
convert this.comp (Ο.rightFun Ο.pt) ((hasStrictFDerivAt_const _ _).prod (hasStrictFDerivAt_id _))
-- Porting note: added parentheses to help `simp`
simp only [ContinuousLinearMap.ext_iff, (ContinuousLinearMap.comp_apply)] at hg'inv hg'invf β’
-- porting note (#10745): was `simp [ContinuousLinearEquiv.eq_symm_apply]`;
-- both `simp` and `rw` fail here, `erw` works
intro x
erw [ContinuousLinearEquiv.eq_symm_apply]
simp [*]
| 1,866 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Analysis.Analytic.Constructions
import Mathlib.Topology.Algebra.Module.FiniteDimension
variable {π E A B : Type*} [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E]
[CommSemiring A] {z : E} {s : Set E}
section Polynomial
open Polynomial
variable [NormedRing B] [NormedAlgebra π B] [Algebra A B] {f : E β B}
| Mathlib/Analysis/Analytic/Polynomial.lean | 26 | 32 | theorem AnalyticAt.aeval_polynomial (hf : AnalyticAt π f z) (p : A[X]) :
AnalyticAt π (fun x β¦ aeval (f x) p) z := by |
refine p.induction_on (fun k β¦ ?_) (fun p q hp hq β¦ ?_) fun p i hp β¦ ?_
Β· simp_rw [aeval_C]; apply analyticAt_const
Β· simp_rw [aeval_add]; exact hp.add hq
Β· convert hp.mul hf
simp_rw [pow_succ, aeval_mul, β mul_assoc, aeval_X]
| 1,867 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Analysis.Analytic.Constructions
import Mathlib.Topology.Algebra.Module.FiniteDimension
variable {π E A B : Type*} [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E]
[CommSemiring A] {z : E} {s : Set E}
section MvPolynomial
open MvPolynomial
variable [NormedCommRing B] [NormedAlgebra π B] [Algebra A B] {Ο : Type*} {f : E β Ο β B}
| Mathlib/Analysis/Analytic/Polynomial.lean | 47 | 52 | theorem AnalyticAt.aeval_mvPolynomial (hf : β i, AnalyticAt π (f Β· i) z) (p : MvPolynomial Ο A) :
AnalyticAt π (fun x β¦ aeval (f x) p) z := by |
apply p.induction_on (fun k β¦ ?_) (fun p q hp hq β¦ ?_) fun p i hp β¦ ?_ -- `refine` doesn't work
Β· simp_rw [aeval_C]; apply analyticAt_const
Β· simp_rw [map_add]; exact hp.add hq
Β· simp_rw [map_mul, aeval_X]; exact hp.mul (hf i)
| 1,867 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 163 | 176 | theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by |
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
| 1,868 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
#align continuous_linear_map.continuous_det ContinuousLinearMap.continuous_det
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : ββ₯0 :=
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
max (βA.symm.toContinuousLinearMapββ * βA.toContinuousLinearMapββ) 1
#align lipschitz_extension_constant lipschitzExtensionConstant
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 189 | 192 | theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : 0 < lipschitzExtensionConstant E' := by |
rw [lipschitzExtensionConstant]
exact zero_lt_one.trans_le (le_max_right _ _)
| 1,868 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
#align continuous_linear_map.continuous_det ContinuousLinearMap.continuous_det
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : ββ₯0 :=
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
max (βA.symm.toContinuousLinearMapββ * βA.toContinuousLinearMapββ) 1
#align lipschitz_extension_constant lipschitzExtensionConstant
theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : 0 < lipschitzExtensionConstant E' := by
rw [lipschitzExtensionConstant]
exact zero_lt_one.trans_le (le_max_right _ _)
#align lipschitz_extension_constant_pos lipschitzExtensionConstant_pos
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 198 | 220 | theorem LipschitzOnWith.extend_finite_dimension {Ξ± : Type*} [PseudoMetricSpace Ξ±] {E' : Type*}
[NormedAddCommGroup E'] [NormedSpace β E'] [FiniteDimensional β E'] {s : Set Ξ±} {f : Ξ± β E'}
{K : ββ₯0} (hf : LipschitzOnWith K f s) :
β g : Ξ± β E', LipschitzWith (lipschitzExtensionConstant E' * K) g β§ EqOn f g s := by |
/- This result is already known for spaces `ΞΉ β β`. We use a continuous linear equiv between
`E'` and such a space to transfer the result to `E'`. -/
let ΞΉ : Type _ := Basis.ofVectorSpaceIndex β E'
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
have LA : LipschitzWith βA.toContinuousLinearMapββ A := by apply A.lipschitz
have L : LipschitzOnWith (βA.toContinuousLinearMapββ * K) (A β f) s :=
LA.comp_lipschitzOnWith hf
obtain β¨g, hg, gsβ© :
β g : Ξ± β ΞΉ β β, LipschitzWith (βA.toContinuousLinearMapββ * K) g β§ EqOn (A β f) g s :=
L.extend_pi
refine β¨A.symm β g, ?_, ?_β©
Β· have LAsymm : LipschitzWith βA.symm.toContinuousLinearMapββ A.symm := by
apply A.symm.lipschitz
apply (LAsymm.comp hg).weaken
rw [lipschitzExtensionConstant, β mul_assoc]
exact mul_le_mul' (le_max_left _ _) le_rfl
Β· intro x hx
have : A (f x) = g x := gs hx
simp only [(Β· β Β·), β this, A.symm_apply_apply]
| 1,868 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
#align continuous_linear_map.continuous_det ContinuousLinearMap.continuous_det
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : ββ₯0 :=
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
max (βA.symm.toContinuousLinearMapββ * βA.toContinuousLinearMapββ) 1
#align lipschitz_extension_constant lipschitzExtensionConstant
theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : 0 < lipschitzExtensionConstant E' := by
rw [lipschitzExtensionConstant]
exact zero_lt_one.trans_le (le_max_right _ _)
#align lipschitz_extension_constant_pos lipschitzExtensionConstant_pos
theorem LipschitzOnWith.extend_finite_dimension {Ξ± : Type*} [PseudoMetricSpace Ξ±] {E' : Type*}
[NormedAddCommGroup E'] [NormedSpace β E'] [FiniteDimensional β E'] {s : Set Ξ±} {f : Ξ± β E'}
{K : ββ₯0} (hf : LipschitzOnWith K f s) :
β g : Ξ± β E', LipschitzWith (lipschitzExtensionConstant E' * K) g β§ EqOn f g s := by
let ΞΉ : Type _ := Basis.ofVectorSpaceIndex β E'
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
have LA : LipschitzWith βA.toContinuousLinearMapββ A := by apply A.lipschitz
have L : LipschitzOnWith (βA.toContinuousLinearMapββ * K) (A β f) s :=
LA.comp_lipschitzOnWith hf
obtain β¨g, hg, gsβ© :
β g : Ξ± β ΞΉ β β, LipschitzWith (βA.toContinuousLinearMapββ * K) g β§ EqOn (A β f) g s :=
L.extend_pi
refine β¨A.symm β g, ?_, ?_β©
Β· have LAsymm : LipschitzWith βA.symm.toContinuousLinearMapββ A.symm := by
apply A.symm.lipschitz
apply (LAsymm.comp hg).weaken
rw [lipschitzExtensionConstant, β mul_assoc]
exact mul_le_mul' (le_max_left _ _) le_rfl
Β· intro x hx
have : A (f x) = g x := gs hx
simp only [(Β· β Β·), β this, A.symm_apply_apply]
#align lipschitz_on_with.extend_finite_dimension LipschitzOnWith.extend_finite_dimension
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 223 | 229 | theorem LinearMap.exists_antilipschitzWith [FiniteDimensional π E] (f : E ββ[π] F)
(hf : LinearMap.ker f = β₯) : β K > 0, AntilipschitzWith K f := by |
cases subsingleton_or_nontrivial E
Β· exact β¨1, zero_lt_one, AntilipschitzWith.of_subsingletonβ©
Β· rw [LinearMap.ker_eq_bot] at hf
let e : E βL[π] LinearMap.range f := (LinearEquiv.ofInjective f hf).toContinuousLinearEquiv
exact β¨_, e.nnnorm_symm_pos, e.antilipschitzβ©
| 1,868 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
#align continuous_linear_map.continuous_det ContinuousLinearMap.continuous_det
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : ββ₯0 :=
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
max (βA.symm.toContinuousLinearMapββ * βA.toContinuousLinearMapββ) 1
#align lipschitz_extension_constant lipschitzExtensionConstant
theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : 0 < lipschitzExtensionConstant E' := by
rw [lipschitzExtensionConstant]
exact zero_lt_one.trans_le (le_max_right _ _)
#align lipschitz_extension_constant_pos lipschitzExtensionConstant_pos
theorem LipschitzOnWith.extend_finite_dimension {Ξ± : Type*} [PseudoMetricSpace Ξ±] {E' : Type*}
[NormedAddCommGroup E'] [NormedSpace β E'] [FiniteDimensional β E'] {s : Set Ξ±} {f : Ξ± β E'}
{K : ββ₯0} (hf : LipschitzOnWith K f s) :
β g : Ξ± β E', LipschitzWith (lipschitzExtensionConstant E' * K) g β§ EqOn f g s := by
let ΞΉ : Type _ := Basis.ofVectorSpaceIndex β E'
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
have LA : LipschitzWith βA.toContinuousLinearMapββ A := by apply A.lipschitz
have L : LipschitzOnWith (βA.toContinuousLinearMapββ * K) (A β f) s :=
LA.comp_lipschitzOnWith hf
obtain β¨g, hg, gsβ© :
β g : Ξ± β ΞΉ β β, LipschitzWith (βA.toContinuousLinearMapββ * K) g β§ EqOn (A β f) g s :=
L.extend_pi
refine β¨A.symm β g, ?_, ?_β©
Β· have LAsymm : LipschitzWith βA.symm.toContinuousLinearMapββ A.symm := by
apply A.symm.lipschitz
apply (LAsymm.comp hg).weaken
rw [lipschitzExtensionConstant, β mul_assoc]
exact mul_le_mul' (le_max_left _ _) le_rfl
Β· intro x hx
have : A (f x) = g x := gs hx
simp only [(Β· β Β·), β this, A.symm_apply_apply]
#align lipschitz_on_with.extend_finite_dimension LipschitzOnWith.extend_finite_dimension
theorem LinearMap.exists_antilipschitzWith [FiniteDimensional π E] (f : E ββ[π] F)
(hf : LinearMap.ker f = β₯) : β K > 0, AntilipschitzWith K f := by
cases subsingleton_or_nontrivial E
Β· exact β¨1, zero_lt_one, AntilipschitzWith.of_subsingletonβ©
Β· rw [LinearMap.ker_eq_bot] at hf
let e : E βL[π] LinearMap.range f := (LinearEquiv.ofInjective f hf).toContinuousLinearEquiv
exact β¨_, e.nnnorm_symm_pos, e.antilipschitzβ©
#align linear_map.exists_antilipschitz_with LinearMap.exists_antilipschitzWith
open Function in
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 235 | 241 | theorem LinearMap.injective_iff_antilipschitz [FiniteDimensional π E] (f : E ββ[π] F) :
Injective f β β K > 0, AntilipschitzWith K f := by |
constructor
Β· rw [β LinearMap.ker_eq_bot]
exact f.exists_antilipschitzWith
Β· rintro β¨K, -, Hβ©
exact H.injective
| 1,868 |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Normed.Group.Lemmas
import Mathlib.Analysis.NormedSpace.AddTorsor
import Mathlib.Analysis.NormedSpace.AffineIsometry
import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace
import Mathlib.Analysis.NormedSpace.RieszLemma
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.Matrix
#align_import analysis.normed_space.finite_dimension from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057"
universe u v w x
noncomputable section
open Set FiniteDimensional TopologicalSpace Filter Asymptotics Classical Topology
NNReal Metric
section CompleteField
variable {π : Type u} [NontriviallyNormedField π] {E : Type v} [NormedAddCommGroup E]
[NormedSpace π E] {F : Type w} [NormedAddCommGroup F] [NormedSpace π F] {F' : Type x}
[AddCommGroup F'] [Module π F'] [TopologicalSpace F'] [TopologicalAddGroup F']
[ContinuousSMul π F'] [CompleteSpace π]
theorem ContinuousLinearMap.continuous_det : Continuous fun f : E βL[π] E => f.det := by
change Continuous fun f : E βL[π] E => LinearMap.det (f : E ββ[π] E)
-- Porting note: this could be easier with `det_cases`
by_cases h : β s : Finset E, Nonempty (Basis (β₯s) π E)
Β· rcases h with β¨s, β¨bβ©β©
haveI : FiniteDimensional π E := FiniteDimensional.of_fintype_basis b
simp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]
refine Continuous.matrix_det ?_
exact
((LinearMap.toMatrix b b).toLinearMap.comp
(ContinuousLinearMap.coeLM π)).continuous_of_finiteDimensional
Β· -- Porting note: was `unfold LinearMap.det`
rw [LinearMap.det_def]
simpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const
#align continuous_linear_map.continuous_det ContinuousLinearMap.continuous_det
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : ββ₯0 :=
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
max (βA.symm.toContinuousLinearMapββ * βA.toContinuousLinearMapββ) 1
#align lipschitz_extension_constant lipschitzExtensionConstant
theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace β E']
[FiniteDimensional β E'] : 0 < lipschitzExtensionConstant E' := by
rw [lipschitzExtensionConstant]
exact zero_lt_one.trans_le (le_max_right _ _)
#align lipschitz_extension_constant_pos lipschitzExtensionConstant_pos
theorem LipschitzOnWith.extend_finite_dimension {Ξ± : Type*} [PseudoMetricSpace Ξ±] {E' : Type*}
[NormedAddCommGroup E'] [NormedSpace β E'] [FiniteDimensional β E'] {s : Set Ξ±} {f : Ξ± β E'}
{K : ββ₯0} (hf : LipschitzOnWith K f s) :
β g : Ξ± β E', LipschitzWith (lipschitzExtensionConstant E' * K) g β§ EqOn f g s := by
let ΞΉ : Type _ := Basis.ofVectorSpaceIndex β E'
let A := (Basis.ofVectorSpace β E').equivFun.toContinuousLinearEquiv
have LA : LipschitzWith βA.toContinuousLinearMapββ A := by apply A.lipschitz
have L : LipschitzOnWith (βA.toContinuousLinearMapββ * K) (A β f) s :=
LA.comp_lipschitzOnWith hf
obtain β¨g, hg, gsβ© :
β g : Ξ± β ΞΉ β β, LipschitzWith (βA.toContinuousLinearMapββ * K) g β§ EqOn (A β f) g s :=
L.extend_pi
refine β¨A.symm β g, ?_, ?_β©
Β· have LAsymm : LipschitzWith βA.symm.toContinuousLinearMapββ A.symm := by
apply A.symm.lipschitz
apply (LAsymm.comp hg).weaken
rw [lipschitzExtensionConstant, β mul_assoc]
exact mul_le_mul' (le_max_left _ _) le_rfl
Β· intro x hx
have : A (f x) = g x := gs hx
simp only [(Β· β Β·), β this, A.symm_apply_apply]
#align lipschitz_on_with.extend_finite_dimension LipschitzOnWith.extend_finite_dimension
theorem LinearMap.exists_antilipschitzWith [FiniteDimensional π E] (f : E ββ[π] F)
(hf : LinearMap.ker f = β₯) : β K > 0, AntilipschitzWith K f := by
cases subsingleton_or_nontrivial E
Β· exact β¨1, zero_lt_one, AntilipschitzWith.of_subsingletonβ©
Β· rw [LinearMap.ker_eq_bot] at hf
let e : E βL[π] LinearMap.range f := (LinearEquiv.ofInjective f hf).toContinuousLinearEquiv
exact β¨_, e.nnnorm_symm_pos, e.antilipschitzβ©
#align linear_map.exists_antilipschitz_with LinearMap.exists_antilipschitzWith
open Function in
theorem LinearMap.injective_iff_antilipschitz [FiniteDimensional π E] (f : E ββ[π] F) :
Injective f β β K > 0, AntilipschitzWith K f := by
constructor
Β· rw [β LinearMap.ker_eq_bot]
exact f.exists_antilipschitzWith
Β· rintro β¨K, -, Hβ©
exact H.injective
open Function in
| Mathlib/Analysis/NormedSpace/FiniteDimension.lean | 246 | 255 | theorem ContinuousLinearMap.isOpen_injective [FiniteDimensional π E] :
IsOpen { L : E βL[π] F | Injective L } := by |
rw [isOpen_iff_eventually]
rintro Οβ hΟβ
rcases Οβ.injective_iff_antilipschitz.mp hΟβ with β¨K, K_pos, Hβ©
have : βαΆ Ο in π Οβ, βΟ - Οβββ < Kβ»ΒΉ := eventually_nnnorm_sub_lt _ <| inv_pos_of_pos K_pos
filter_upwards [this] with Ο hΟ
apply Ο.injective_iff_antilipschitz.mpr
exact β¨(Kβ»ΒΉ - βΟ - Οβββ)β»ΒΉ, inv_pos_of_pos (tsub_pos_of_lt hΟ),
H.add_sub_lipschitzWith (Ο - Οβ).lipschitz hΟβ©
| 1,868 |
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn
import Mathlib.Analysis.NormedSpace.FiniteDimension
open Set
open scoped NNReal
namespace ApproximatesLinearOn
| Mathlib/Analysis/Calculus/InverseFunctionTheorem/FiniteDimensional.lean | 27 | 47 | theorem exists_homeomorph_extension {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace β F] [FiniteDimensional β F] {s : Set E}
{f : E β F} {f' : E βL[β] F} {c : ββ₯0} (hf : ApproximatesLinearOn f (f' : E βL[β] F) s c)
(hc : Subsingleton E β¨ lipschitzExtensionConstant F * c < β(f'.symm : F βL[β] E)βββ»ΒΉ) :
β g : E ββ F, EqOn f g s := by |
-- the difference `f - f'` is Lipschitz on `s`. It can be extended to a Lipschitz function `u`
-- on the whole space, with a slightly worse Lipschitz constant. Then `f' + u` will be the
-- desired homeomorphism.
obtain β¨u, hu, ufβ© :
β u : E β F, LipschitzWith (lipschitzExtensionConstant F * c) u β§ EqOn (f - βf') u s :=
hf.lipschitzOnWith.extend_finite_dimension
let g : E β F := fun x => f' x + u x
have fg : EqOn f g s := fun x hx => by simp_rw [g, β uf hx, Pi.sub_apply, add_sub_cancel]
have hg : ApproximatesLinearOn g (f' : E βL[β] F) univ (lipschitzExtensionConstant F * c) := by
apply LipschitzOnWith.approximatesLinearOn
rw [lipschitzOn_univ]
convert hu
ext x
simp only [g, add_sub_cancel_left, ContinuousLinearEquiv.coe_coe, Pi.sub_apply]
haveI : FiniteDimensional β E := f'.symm.finiteDimensional
exact β¨hg.toHomeomorph g hc, fgβ©
| 1,869 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 35 | 43 | theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by |
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
| 1,870 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 46 | 48 | theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by |
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
| 1,870 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 60 | 62 | theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} :
ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by |
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
| 1,870 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {π : Type*} [NontriviallyNormedField π] {D : Type uD} [NormedAddCommGroup D]
[NormedSpace π D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace π E] {F : Type uF}
[NormedAddCommGroup F] [NormedSpace π F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace π G]
section FiniteDimensional
open Function FiniteDimensional
variable [CompleteSpace π]
theorem contDiffOn_clm_apply {n : ββ} {f : E β F βL[π] G} {s : Set E} [FiniteDimensional π F] :
ContDiffOn π n f s β β y, ContDiffOn π n (fun x => f x y) s := by
refine β¨fun h y => h.clm_apply contDiffOn_const, fun h => ?_β©
let d := finrank π F
have hd : d = finrank π (Fin d β π) := (finrank_fin_fun π).symm
let eβ := ContinuousLinearEquiv.ofFinrankEq hd
let eβ := (eβ.arrowCongr (1 : G βL[π] G)).trans (ContinuousLinearEquiv.piRing (Fin d))
rw [β id_comp f, β eβ.symm_comp_self]
exact eβ.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)
#align cont_diff_on_clm_apply contDiffOn_clm_apply
theorem contDiff_clm_apply_iff {n : ββ} {f : E β F βL[π] G} [FiniteDimensional π F] :
ContDiff π n f β β y, ContDiff π n fun x => f x y := by
simp_rw [β contDiffOn_univ, contDiffOn_clm_apply]
#align cont_diff_clm_apply_iff contDiff_clm_apply_iff
theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} :
ContDiff π (n + 1 : β) f β Differentiable π f β§ β y, ContDiff π n fun x => fderiv π f x y := by
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
#align cont_diff_succ_iff_fderiv_apply contDiff_succ_iff_fderiv_apply
theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hf : DifferentiableOn π f s) (h : β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s) :
ContDiffOn π (n + 1 : β) f s :=
contDiffOn_succ_of_fderivWithin hf <| contDiffOn_clm_apply.mpr h
#align cont_diff_on_succ_of_fderiv_apply contDiffOn_succ_of_fderiv_apply
| Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 71 | 75 | theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional π E] {n : β} {f : E β F} {s : Set E}
(hs : UniqueDiffOn π s) :
ContDiffOn π (n + 1 : β) f s β
DifferentiableOn π f s β§ β y, ContDiffOn π n (fun x => fderivWithin π f s x y) s := by |
rw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]
| 1,870 |
import Mathlib.Analysis.Complex.Isometry
import Mathlib.Analysis.NormedSpace.ConformalLinearMap
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.complex.conformal from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
noncomputable section
open Complex ContinuousLinearMap ComplexConjugate
theorem isConformalMap_conj : IsConformalMap (conjLIE : β βL[β] β) :=
conjLIE.toLinearIsometry.isConformalMap
#align is_conformal_map_conj isConformalMap_conj
section ConformalIntoComplexNormed
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [NormedSpace β E] {z : β}
{g : β βL[β] E} {f : β β E}
| Mathlib/Analysis/Complex/Conformal.lean | 49 | 62 | theorem isConformalMap_complex_linear {map : β βL[β] E} (nonzero : map β 0) :
IsConformalMap (map.restrictScalars β) := by |
have minorβ : βmap 1β β 0 := by simpa only [ext_ring_iff, Ne, norm_eq_zero] using nonzero
refine β¨βmap 1β, minorβ, β¨βmap 1ββ»ΒΉ β’ ((map : β ββ[β] E) : β ββ[β] E), ?_β©, ?_β©
Β· intro x
simp only [LinearMap.smul_apply]
have : x = x β’ (1 : β) := by rw [smul_eq_mul, mul_one]
nth_rw 1 [this]
rw [LinearMap.coe_restrictScalars]
simp only [map.coe_coe, map.map_smul, norm_smul, norm_inv, norm_norm]
field_simp only [one_mul]
Β· ext1
-- porting note (#10745): was `simp`; explicitly supplied simp lemma
simp [smul_inv_smulβ minorβ]
| 1,871 |
import Mathlib.Analysis.Complex.Isometry
import Mathlib.Analysis.NormedSpace.ConformalLinearMap
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.complex.conformal from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
noncomputable section
open Complex ContinuousLinearMap ComplexConjugate
theorem isConformalMap_conj : IsConformalMap (conjLIE : β βL[β] β) :=
conjLIE.toLinearIsometry.isConformalMap
#align is_conformal_map_conj isConformalMap_conj
section ConformalIntoComplexPlane
open ContinuousLinearMap
variable {f : β β β} {z : β} {g : β βL[β] β}
| Mathlib/Analysis/Complex/Conformal.lean | 78 | 91 | theorem IsConformalMap.is_complex_or_conj_linear (h : IsConformalMap g) :
(β map : β βL[β] β, map.restrictScalars β = g) β¨
β map : β βL[β] β, map.restrictScalars β = g βL βconjCLE := by |
rcases h with β¨c, -, li, rflβ©
obtain β¨li, rflβ© : β li' : β ββα΅’[β] β, li'.toLinearIsometry = li :=
β¨li.toLinearIsometryEquiv rfl, by ext1; rflβ©
rcases linear_isometry_complex li with β¨a, rfl | rflβ©
-- let rot := c β’ (a : β) β’ ContinuousLinearMap.id β β,
Β· refine Or.inl β¨c β’ (a : β) β’ ContinuousLinearMap.id β β, ?_β©
ext1
simp
Β· refine Or.inr β¨c β’ (a : β) β’ ContinuousLinearMap.id β β, ?_β©
ext1
simp
| 1,871 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
| Mathlib/Analysis/Complex/RealDeriv.lean | 49 | 62 | theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by |
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
| Mathlib/Analysis/Complex/RealDeriv.lean | 68 | 81 | theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by |
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
| Mathlib/Analysis/Complex/RealDeriv.lean | 84 | 89 | theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by |
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
| Mathlib/Analysis/Complex/RealDeriv.lean | 99 | 103 | theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by |
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv' HasStrictDerivAt.complexToReal_fderiv'
| Mathlib/Analysis/Complex/RealDeriv.lean | 106 | 108 | theorem HasDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E} (h : HasDerivAt f f' x) :
HasFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by |
simpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars β
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv' HasStrictDerivAt.complexToReal_fderiv'
theorem HasDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E} (h : HasDerivAt f f' x) :
HasFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars β
#align has_deriv_at.complex_to_real_fderiv' HasDerivAt.complexToReal_fderiv'
| Mathlib/Analysis/Complex/RealDeriv.lean | 111 | 115 | theorem HasDerivWithinAt.complexToReal_fderiv' {f : β β E} {s : Set β} {x : β} {f' : E}
(h : HasDerivWithinAt f f' s x) :
HasFDerivWithinAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') s x := by |
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasFDerivWithinAt.restrictScalars β
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv' HasStrictDerivAt.complexToReal_fderiv'
theorem HasDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E} (h : HasDerivAt f f' x) :
HasFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars β
#align has_deriv_at.complex_to_real_fderiv' HasDerivAt.complexToReal_fderiv'
theorem HasDerivWithinAt.complexToReal_fderiv' {f : β β E} {s : Set β} {x : β} {f' : E}
(h : HasDerivWithinAt f f' s x) :
HasFDerivWithinAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') s x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasFDerivWithinAt.restrictScalars β
#align has_deriv_within_at.complex_to_real_fderiv' HasDerivWithinAt.complexToReal_fderiv'
| Mathlib/Analysis/Complex/RealDeriv.lean | 118 | 120 | theorem HasStrictDerivAt.complexToReal_fderiv {f : β β β} {f' x : β} (h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (f' β’ (1 : β βL[β] β)) x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars β
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv' HasStrictDerivAt.complexToReal_fderiv'
theorem HasDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E} (h : HasDerivAt f f' x) :
HasFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars β
#align has_deriv_at.complex_to_real_fderiv' HasDerivAt.complexToReal_fderiv'
theorem HasDerivWithinAt.complexToReal_fderiv' {f : β β E} {s : Set β} {x : β} {f' : E}
(h : HasDerivWithinAt f f' s x) :
HasFDerivWithinAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') s x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasFDerivWithinAt.restrictScalars β
#align has_deriv_within_at.complex_to_real_fderiv' HasDerivWithinAt.complexToReal_fderiv'
theorem HasStrictDerivAt.complexToReal_fderiv {f : β β β} {f' x : β} (h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (f' β’ (1 : β βL[β] β)) x := by
simpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv HasStrictDerivAt.complexToReal_fderiv
| Mathlib/Analysis/Complex/RealDeriv.lean | 123 | 125 | theorem HasDerivAt.complexToReal_fderiv {f : β β β} {f' x : β} (h : HasDerivAt f f' x) :
HasFDerivAt f (f' β’ (1 : β βL[β] β)) x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivAt.restrictScalars β
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section RealDerivOfComplex
open Complex
variable {e : β β β} {e' : β} {z : β}
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
HasStrictDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasStrictFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasStrictFDerivAt
have B :
HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasStrictFDerivAt.restrictScalars β
have C : HasStrictFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasStrictFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasStrictDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_strict_deriv_at.real_of_complex HasStrictDerivAt.real_of_complex
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
HasDerivAt (fun x : β => (e x).re) e'.re z := by
have A : HasFDerivAt ((β) : β β β) ofRealCLM z := ofRealCLM.hasFDerivAt
have B :
HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : β βL[β] β).restrictScalars β)
(ofRealCLM z) :=
h.hasFDerivAt.restrictScalars β
have C : HasFDerivAt re reCLM (e (ofRealCLM z)) := reCLM.hasFDerivAt
-- Porting note: this should be by:
-- simpa using (C.comp z (B.comp z A)).hasStrictDerivAt
-- but for some reason simp can not use `ContinuousLinearMap.comp_apply`
convert (C.comp z (B.comp z A)).hasDerivAt
rw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]
simp
#align has_deriv_at.real_of_complex HasDerivAt.real_of_complex
theorem ContDiffAt.real_of_complex {n : ββ} (h : ContDiffAt β n e z) :
ContDiffAt β n (fun x : β => (e x).re) z := by
have A : ContDiffAt β n ((β) : β β β) z := ofRealCLM.contDiff.contDiffAt
have B : ContDiffAt β n e z := h.restrict_scalars β
have C : ContDiffAt β n re (e z) := reCLM.contDiff.contDiffAt
exact C.comp z (B.comp z A)
#align cont_diff_at.real_of_complex ContDiffAt.real_of_complex
theorem ContDiff.real_of_complex {n : ββ} (h : ContDiff β n e) :
ContDiff β n fun x : β => (e x).re :=
contDiff_iff_contDiffAt.2 fun _ => h.contDiffAt.real_of_complex
#align cont_diff.real_of_complex ContDiff.real_of_complex
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
theorem HasStrictDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E}
(h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv' HasStrictDerivAt.complexToReal_fderiv'
theorem HasDerivAt.complexToReal_fderiv' {f : β β E} {x : β} {f' : E} (h : HasDerivAt f f' x) :
HasFDerivAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') x := by
simpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars β
#align has_deriv_at.complex_to_real_fderiv' HasDerivAt.complexToReal_fderiv'
theorem HasDerivWithinAt.complexToReal_fderiv' {f : β β E} {s : Set β} {x : β} {f' : E}
(h : HasDerivWithinAt f f' s x) :
HasFDerivWithinAt f (reCLM.smulRight f' + I β’ imCLM.smulRight f') s x := by
simpa only [Complex.restrictScalars_one_smulRight'] using
h.hasFDerivWithinAt.restrictScalars β
#align has_deriv_within_at.complex_to_real_fderiv' HasDerivWithinAt.complexToReal_fderiv'
theorem HasStrictDerivAt.complexToReal_fderiv {f : β β β} {f' x : β} (h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (f' β’ (1 : β βL[β] β)) x := by
simpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars β
#align has_strict_deriv_at.complex_to_real_fderiv HasStrictDerivAt.complexToReal_fderiv
theorem HasDerivAt.complexToReal_fderiv {f : β β β} {f' x : β} (h : HasDerivAt f f' x) :
HasFDerivAt f (f' β’ (1 : β βL[β] β)) x := by
simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivAt.restrictScalars β
#align has_deriv_at.complex_to_real_fderiv HasDerivAt.complexToReal_fderiv
| Mathlib/Analysis/Complex/RealDeriv.lean | 128 | 130 | theorem HasDerivWithinAt.complexToReal_fderiv {f : β β β} {s : Set β} {f' x : β}
(h : HasDerivWithinAt f f' s x) : HasFDerivWithinAt f (f' β’ (1 : β βL[β] β)) s x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivWithinAt.restrictScalars β
| 1,872 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.