Linear combinations #
We use this data structure while processing hypotheses.
Internal representation of a linear combination of atoms, and a constant term.
Instances For
Equations
- Lean.Omega.instReprLinearCombo = { reprPrec := Lean.Omega.reprLinearCombo✝ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Omega.LinearCombo.instInhabited = { default := { const := 1, coeffs := [] } }
theorem
Lean.Omega.LinearCombo.ext
{a b : LinearCombo}
(w₁ : a.const = b.const)
(w₂ : a.coeffs = b.coeffs)
:
Check if a linear combination is an atom, i.e. the constant term is zero and there is exactly one nonzero coefficient, which is one.
Equations
Instances For
The i
-th coordinate function.
Equations
- Lean.Omega.LinearCombo.coordinate i = { const := 0, coeffs := Lean.Omega.Coeffs.set [] i 1 }
Instances For
@[simp]
Implementation of addition on LinearCombo
.
Instances For
Equations
@[simp]
@[simp]
Implementation of subtraction on LinearCombo
.
Instances For
Equations
@[simp]
@[simp]
Implementation of negation on LinearCombo
.
Instances For
Equations
Implementation of scalar multiplication of a LinearCombo
by an Int
.
Instances For
Equations
- Lean.Omega.LinearCombo.instHMulInt = { hMul := fun (i : Int) (lc : Lean.Omega.LinearCombo) => lc.smul i }
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
Multiplication of two linear combinations. This is useful only if at least one of the linear combinations is constant, and otherwise should be considered as a junk value.