linear_algebra.matrix.charpoly.eigs
⟷
Mathlib.LinearAlgebra.Matrix.Charpoly.Eigs
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2023 Mohanad Ahmed. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
-/
-import Data.Polynomial.Basic
+import Algebra.Polynomial.Basic
import FieldTheory.IsAlgClosed.Basic
#align_import linear_algebra.matrix.charpoly.eigs from "leanprover-community/mathlib"@"660b3a2db3522fa0db036e569dc995a615c4c848"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2023 Mohanad Ahmed. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
-/
-import Mathbin.Data.Polynomial.Basic
-import Mathbin.FieldTheory.IsAlgClosed.Basic
+import Data.Polynomial.Basic
+import FieldTheory.IsAlgClosed.Basic
#align_import linear_algebra.matrix.charpoly.eigs from "leanprover-community/mathlib"@"660b3a2db3522fa0db036e569dc995a615c4c848"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2023 Mohanad Ahmed. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.eigs
-! leanprover-community/mathlib commit 660b3a2db3522fa0db036e569dc995a615c4c848
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Polynomial.Basic
import Mathbin.FieldTheory.IsAlgClosed.Basic
+#align_import linear_algebra.matrix.charpoly.eigs from "leanprover-community/mathlib"@"660b3a2db3522fa0db036e569dc995a615c4c848"
+
/-!
# Eigenvalues are characteristic polynomial roots.
mathlib commit https://github.com/leanprover-community/mathlib/commit/ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.eigs
-! leanprover-community/mathlib commit 48dc6abe71248bd6f4bffc9703dc87bdd4e37d0b
+! leanprover-community/mathlib commit 660b3a2db3522fa0db036e569dc995a615c4c848
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.FieldTheory.IsAlgClosed.Basic
/-!
# Eigenvalues are characteristic polynomial roots.
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In fields we show that:
* `matrix.det_eq_prod_roots_charpoly_of_splits`: the determinant (in the field of the matrix)
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -62,13 +62,16 @@ open scoped Matrix BigOperators
namespace Matrix
+#print Matrix.det_eq_prod_roots_charpoly_of_splits /-
theorem det_eq_prod_roots_charpoly_of_splits (hAps : A.charpoly.Splits (RingHom.id R)) :
A.det = (Matrix.charpoly A).roots.Prod := by
rw [det_eq_sign_charpoly_coeff, ← charpoly_nat_degree_eq_dim A,
Polynomial.prod_roots_eq_coeff_zero_of_monic_of_split A.charpoly_monic hAps, ← mul_assoc, ←
pow_two, pow_right_comm, neg_one_sq, one_pow, one_mul]
#align matrix.det_eq_prod_roots_charpoly_of_splits Matrix.det_eq_prod_roots_charpoly_of_splits
+-/
+#print Matrix.trace_eq_sum_roots_charpoly_of_splits /-
theorem trace_eq_sum_roots_charpoly_of_splits (hAps : A.charpoly.Splits (RingHom.id R)) :
A.trace = (Matrix.charpoly A).roots.Sum :=
by
@@ -82,16 +85,21 @@ theorem trace_eq_sum_roots_charpoly_of_splits (hAps : A.charpoly.Splits (RingHom
Polynomial.sum_roots_eq_nextCoeff_of_monic_of_split A.charpoly_monic hAps, next_coeff,
charpoly_nat_degree_eq_dim, if_neg (Fintype.card_ne_zero : Fintype.card n ≠ 0)]
#align matrix.trace_eq_sum_roots_charpoly_of_splits Matrix.trace_eq_sum_roots_charpoly_of_splits
+-/
variable (A)
+#print Matrix.det_eq_prod_roots_charpoly /-
theorem det_eq_prod_roots_charpoly [IsAlgClosed R] : A.det = (Matrix.charpoly A).roots.Prod :=
det_eq_prod_roots_charpoly_of_splits (IsAlgClosed.splits A.charpoly)
#align matrix.det_eq_prod_roots_charpoly Matrix.det_eq_prod_roots_charpoly
+-/
+#print Matrix.trace_eq_sum_roots_charpoly /-
theorem trace_eq_sum_roots_charpoly [IsAlgClosed R] : A.trace = (Matrix.charpoly A).roots.Sum :=
trace_eq_sum_roots_charpoly_of_splits (IsAlgClosed.splits A.charpoly)
#align matrix.trace_eq_sum_roots_charpoly Matrix.trace_eq_sum_roots_charpoly
+-/
end Matrix
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
Data
(#11751)
Polynomial
and MvPolynomial
are algebraic objects, hence should be under Algebra
(or at least not under Data
)
@@ -3,7 +3,7 @@ Copyright (c) 2023 Mohanad Ahmed. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
-/
-import Mathlib.Data.Polynomial.Basic
+import Mathlib.Algebra.Polynomial.Basic
import Mathlib.FieldTheory.IsAlgClosed.Basic
#align_import linear_algebra.matrix.charpoly.eigs from "leanprover-community/mathlib"@"48dc6abe71248bd6f4bffc9703dc87bdd4e37d0b"
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -48,9 +48,7 @@ dependencies are not general enough to unify them. We should refactor
variable {n : Type*} [Fintype n] [DecidableEq n]
-
variable {R : Type*} [Field R]
-
variable {A : Matrix n n R}
open Matrix Polynomial
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -47,9 +47,9 @@ dependencies are not general enough to unify them. We should refactor
-/
-variable {n : Type _} [Fintype n] [DecidableEq n]
+variable {n : Type*} [Fintype n] [DecidableEq n]
-variable {R : Type _} [Field R]
+variable {R : Type*} [Field R]
variable {A : Matrix n n R}
@@ -2,15 +2,12 @@
Copyright (c) 2023 Mohanad Ahmed. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mohanad Ahmed
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.charpoly.eigs
-! leanprover-community/mathlib commit 48dc6abe71248bd6f4bffc9703dc87bdd4e37d0b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Polynomial.Basic
import Mathlib.FieldTheory.IsAlgClosed.Basic
+#align_import linear_algebra.matrix.charpoly.eigs from "leanprover-community/mathlib"@"48dc6abe71248bd6f4bffc9703dc87bdd4e37d0b"
+
/-!
# Eigenvalues are characteristic polynomial roots.
The unported dependencies are