Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 78e0bae

Browse files
committed
feat(linear_algebra/basic): add ring instance
1 parent 2bf44d3 commit 78e0bae

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/linear_algebra/basic.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,12 @@ section
120120
variables (α β)
121121
include β
122122

123-
-- declaring this an instance breaks `real.lean` with reaching max. instance resolution depth
124-
def endomorphism_ring : ring (β →ₗ[α] β) :=
123+
instance endomorphism_ring : ring (β →ₗ[α] β) :=
125124
by refine {mul := (*), one := 1, ..linear_map.add_comm_group, ..};
126125
{ intros, apply linear_map.ext, simp }
127126

128127
/-- The group of invertible linear maps from `β` to itself -/
129-
def general_linear_group :=
130-
by haveI := endomorphism_ring α β; exact units (β →ₗ[α] β)
128+
def general_linear_group := units (β →ₗ[α] β)
131129
end
132130

133131
section

src/ring_theory/algebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ linear_map.mk₂ R (*)
127127
(λ x y z, mul_add x y z)
128128
(λ c x y, by rw [smul_def, smul_def, left_comm])
129129

130-
set_option class.instance_max_depth 37
130+
set_option class.instance_max_depth 39
131131
def lmul_left (r : A) : A →ₗ A :=
132132
lmul R A r
133133

0 commit comments

Comments
 (0)