Skip to content

Commit

Permalink
feat(linear_algebra/basic): add ring instance
Browse files Browse the repository at this point in the history
  • Loading branch information
kbuzzard committed Mar 15, 2019
1 parent 2bf44d3 commit 78e0bae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/linear_algebra/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@ section
variables (α β)
include β

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

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

section
Expand Down
2 changes: 1 addition & 1 deletion src/ring_theory/algebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ linear_map.mk₂ R (*)
(λ x y z, mul_add x y z)
(λ c x y, by rw [smul_def, smul_def, left_comm])

set_option class.instance_max_depth 37
set_option class.instance_max_depth 39
def lmul_left (r : A) : A →ₗ A :=
lmul R A r

Expand Down

0 comments on commit 78e0bae

Please sign in to comment.