linear_algebra.matrix.charpoly.eigsMathlib.LinearAlgebra.Matrix.Charpoly.Eigs

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -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"
Diff
@@ -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"
 
Diff
@@ -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.
 
Diff
@@ -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)
Diff
@@ -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
 

Changes in mathlib4

mathlib3
mathlib4
move(Polynomial): Move out of Data (#11751)

Polynomial and MvPolynomial are algebraic objects, hence should be under Algebra (or at least not under Data)

Diff
@@ -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"
chore(*): remove empty lines between variable statements (#11418)

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)
Diff
@@ -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
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -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}
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -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.
 
feat: port LinearAlgebra.Matrix.Charpoly.Eigs (#4936)

Dependencies 10 + 659

660 files ported (98.5%)
274338 lines ported (98.8%)
Show graph

The unported dependencies are