Skip to content

Commit

Permalink
Remove lean3 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Apr 5, 2023
1 parent 3428b52 commit 8e0078f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Mathlib/LinearAlgebra/StdBasis.lean
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,15 @@ given by `s j` on each component.
For the standard basis over `R` on the finite-dimensional space `η → R` see `pi.basis_fun`.
-/
protected noncomputable def basis (s : ∀ j, Basis (ιs j) R (Ms j)) :
Basis (Σj, ιs j) R (∀ j, Ms j) := by
-- The `add_comm_monoid (Π j, Ms j)` instance was hard to find.
-- Defining this in tactic mode seems to shake up instance search enough that it works by itself.
refine' Basis.ofRepr (_ ≪≫ₗ (Finsupp.sigmaFinsuppLEquivPiFinsupp R).symm)
exact LinearEquiv.piCongrRight fun j => (s j).repr
Basis (Σj, ιs j) R (∀ j, Ms j) :=
Basis.ofRepr
((LinearEquiv.piCongrRight fun j => (s j).repr) ≪≫ₗ
(Finsupp.sigmaFinsuppLEquivPiFinsupp R).symm)
-- Porting note: was
-- -- The `add_comm_monoid (Π j, Ms j)` instance was hard to find.
-- -- Defining this in tactic mode seems to shake up instance search enough that it works by itself.
-- refine Basis.ofRepr (?_ ≪≫ₗ (Finsupp.sigmaFinsuppLEquivPiFinsupp R).symm)
-- exact LinearEquiv.piCongrRight fun j => (s j).repr
#align pi.basis Pi.basis

@[simp]
Expand Down

0 comments on commit 8e0078f

Please sign in to comment.