Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Data/Matrix/Notation): relax
Semiring
to `NonUnitalNonAssocSem…
…iring` (#5092) This came up in a real example. I was using Lean to make sure I had the right formulae for Strassen's algorithm. The following example was only able to succeed with (some of) these changes: ```lean import Mathlib.Data.Matrix.Notation import Mathlib.Tactic.NoncommRing example (R : Type _) [NonUnitalNonAssocRing R] (a₁₁ a₁₂ a₂₁ a₂₂ b₁₁ b₁₂ b₂₁ b₂₂ : R) : let m₁ := (a₁₁ + a₂₂) * (b₁₁ + b₂₂) let m₂ := (a₂₁ + a₂₂) * b₁₁ let m₃ := a₁₁ * (b₁₂ - b₂₂) let m₄ := a₂₂ * (b₂₁ - b₁₁) let m₅ := (a₁₁ + a₁₂) * b₂₂ let m₆ := (a₂₁ - a₁₁) * (b₁₁ + b₁₂) let m₇ := (a₁₂ - a₂₂) * (b₂₁ + b₂₂) !![a₁₁, a₁₂; a₂₁, a₂₂] * !![b₁₁, b₁₂; b₂₁, b₂₂] = !![m₁ + m₄ - m₅ + m₇, m₃ + m₅; m₂ + m₄, m₁ - m₂ + m₃ + m₆] := by ext i j fin_cases i <;> fin_cases j <;> simp <;> noncomm_ring ```
- Loading branch information