Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Mathlib/LinearAlgebra/Matrix/Charpoly/Disc.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ open Polynomial

namespace Matrix

variable {R n : Type*} [CommRing R] [Nontrivial R] [Fintype n] [DecidableEq n]
variable {R n : Type*} [CommRing R] [Fintype n] [DecidableEq n]

/-- The discriminant of a matrix is defined to be the discriminant of its characteristic
polynomial. -/
noncomputable def discr (A : Matrix n n R) : R := A.charpoly.discr

lemma discr_of_card_eq_two (A : Matrix n n R) (hn : Fintype.card n = 2) :
A.discr = A.trace ^ 2 - 4 * A.det := by
nontriviality R
rw [discr, Polynomial.discr_of_degree_eq_two (by simp; norm_cast)]
simp [A.charpoly_of_card_eq_two hn]

Expand Down
13 changes: 6 additions & 7 deletions Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/FinTwo.lean
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Matrix

section CommRing

variable {R : Type*} [CommRing R] [Nontrivial R] (m : Matrix (Fin 2) (Fin 2) R) (g : GL (Fin 2) R)
variable {R : Type*} [CommRing R] (m : Matrix (Fin 2) (Fin 2) R) (g : GL (Fin 2) R)

/-- A `2 × 2` matrix is *parabolic* if it is non-scalar and its discriminant is 0. -/
def IsParabolic : Prop := m ∉ Set.range (scalar _) ∧ m.discr = 0
Expand Down Expand Up @@ -115,10 +115,9 @@ lemma isParabolic_iff_exists [NeZero (2 : K)] :

end Field

section LinearOrderedRing
section Preorder

variable {R : Type*} [CommRing R] [Nontrivial R] [Preorder R]
(m : Matrix (Fin 2) (Fin 2) R) (g : GL (Fin 2) R)
variable {R : Type*} [CommRing R] [Preorder R] (m : Matrix (Fin 2) (Fin 2) R) (g : GL (Fin 2) R)

/-- A `2 × 2` matrix is *hyperbolic* if its discriminant is strictly positive. -/
def IsHyperbolic : Prop := 0 < m.discr
Expand All @@ -140,7 +139,7 @@ lemma isElliptic_conj_iff : (g.val * m * g.val⁻¹).IsElliptic ↔ m.IsElliptic
lemma isElliptic_conj'_iff : (g.val⁻¹ * m * g.val).IsElliptic ↔ m.IsElliptic := by
simpa using isElliptic_conj_iff g⁻¹

end LinearOrderedRing
end Preorder

namespace GeneralLinearGroup

Expand All @@ -166,11 +165,11 @@ variable {R K : Type*} [CommRing R] [Field K]
/-- Synonym of `Matrix.IsParabolic`, for dot-notation. -/
abbrev IsParabolic (g : GL (Fin 2) R) : Prop := g.val.IsParabolic

@[simp] lemma isParabolic_conj_iff [Nontrivial R] (g h : GL (Fin 2) R) :
@[simp] lemma isParabolic_conj_iff (g h : GL (Fin 2) R) :
IsParabolic (g * h * g⁻¹) ↔ IsParabolic h := by
simp [IsParabolic]

@[simp] lemma isParabolic_conj_iff' [Nontrivial R] (g h : GL (Fin 2) R) :
@[simp] lemma isParabolic_conj_iff' (g h : GL (Fin 2) R) :
IsParabolic (g⁻¹ * h * g) ↔ IsParabolic h := by
simp [IsParabolic]

Expand Down