Documentation

HexBareissMathlib.Kernel

theorem HexMatrixMathlib.replaceRow_getD (A : List (List ℤ)) (i : ℕ) (r : List ℤ) (k : ℕ) (hi : i < A.length) :
theorem HexMatrixMathlib.swapRows_getD (a b : ℕ) (A : List (List ℤ)) (ha : a < A.length) (hb : b < A.length) (k : ℕ) :
theorem HexMatrixMathlib.dotInt_eq_sum (a b : List ℤ) (r : ℕ) (h : a.length ≤ r) :
Hex.Matrix.DetWitness.dotInt a b = ∑ k : Fin r, a.getD (↑k) 0 * b.getD (↑k) 0
theorem HexMatrixMathlib.triangularCheck_spec (d : ℤ) (done : List (List ℤ)) (i : ℕ) (ts cs : List (List ℤ)) (pl pu : ℤ) :
Hex.Matrix.DetWitness.triangularCheck d done i ts cs pl pu = true → ts.length = cs.length ∧ (∀ k < ts.length, (ts.getD k []).length = i + k + 1 ∧ Hex.Matrix.DetWitness.nthInt (ts.getD k []) (i + k) ≠ 0 ∧ (∀ c ∈ done, Hex.Matrix.DetWitness.dotInt (ts.getD k []) c = 0) ∧ ∀ k' < k, Hex.Matrix.DetWitness.dotInt (ts.getD k []) (cs.getD k' []) = 0) ∧ pl * (List.ofFn fun (k : Fin ts.length) => Hex.Matrix.DetWitness.nthInt (ts.getD ↑k []) (i + ↑k)).prod * d = pu * (List.ofFn fun (k : Fin ts.length) => Hex.Matrix.DetWitness.dotInt (ts.getD ↑k []) (cs.getD ↑k [])).prod
theorem HexMatrixMathlib.ofLists_swapRows (n : ℕ) (L : List (List ℤ)) (hL : L.length = n) (a b : Fin n) :
ofLists n n (Hex.Matrix.DetWitness.swapRows (↑a) (↑b) L) = (ofLists n n L).submatrix (⇑(Equiv.swap a b)) id

A passing kernel check determines the determinant of the row list's matrix.

theorem HexMatrixMathlib.det_eq_of_checkList' {n : ℕ} (A : Matrix (Fin n) (Fin n) ℤ) (L : List (List ℤ)) (c : Hex.Matrix.DetWitness) (hA : A = ofLists n n L) (h : Hex.Matrix.checkDetList n L c = true) :
A.det = c.value

det_eq_of_checkList for a matrix identified with its row list; the tactic supplies hA by rfl for a vector chain.

theorem HexMatrixMathlib.scaledRow_spec (k : ℕ) (q : List ℚ) (b : List ℤ) (h : Hex.Matrix.DetWitness.scaledRow k q b = true) (j : ℕ) :
↑k * q.getD j 0 = ↑(b.getD j 0)
theorem HexMatrixMathlib.scaledRows_spec (s : List ℕ) (A : List (List ℚ)) (B : List (List ℤ)) (h : Hex.Matrix.DetWitness.scaledRows s A B = true) (i : ℕ) :
0 < s.getD i 1 ∧ ∀ (j : ℕ), ↑(s.getD i 1) * (A.getD i []).getD j 0 = ↑((B.getD i []).getD j 0)
theorem HexMatrixMathlib.prodNat_cast (s : List ℕ) (r : ℕ) (hs : s.length = r) :
↑(Hex.Matrix.DetWitness.prodNat s) = ∏ i : Fin r, ↑(s.getD (↑i) 1)
theorem HexMatrixMathlib.det_eq_of_checkRat (n : ℕ) (A : List (List ℚ)) (s : List ℕ) (B : List (List ℤ)) (c : Hex.Matrix.DetWitness) (v : ℚ) (h : Hex.Matrix.checkDetRat n A s B c v = true) :
(ofLists n n A).det = v

A passing rational check determines the determinant of the rational row list's matrix.

theorem HexMatrixMathlib.det_eq_of_checkRat' {n : ℕ} (A : Matrix (Fin n) (Fin n) ℚ) (L : List (List ℚ)) (s : List ℕ) (B : List (List ℤ)) (c : Hex.Matrix.DetWitness) (v : ℚ) (hA : A = ofLists n n L) (h : Hex.Matrix.checkDetRat n L s B c v = true) :
A.det = v

det_eq_of_checkRat for a matrix identified with its row list.