cfahlgren1's picture
download
raw
1.63 kB
import Mathlib
namespace OAI
section
namespace KS.W17
open Matrix
theorem quadratic_single {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ) (i : Fin n) :
Pi.single i 1 ⬝ᵥ (M *ᵥ Pi.single i 1) = M i i := by
simp [single_dotProduct]
theorem negativeDiagonal_witness {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ)
(i : Fin n) (hi : M i i < 0) :
Pi.single i 1 ⬝ᵥ (M *ᵥ Pi.single i 1) < 0 := by
simpa only [quadratic_single] using hi
theorem quadratic_twoSingle {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ)
(i j : Fin n) (a b : ℚ) :
(Pi.single i a + Pi.single j b) ⬝ᵥ (M *ᵥ (Pi.single i a + Pi.single j b)) =
a * (M i i * a + M i j * b) + b * (M j i * a + M j j * b) := by
simp only [add_dotProduct, single_dotProduct, Matrix.mulVec,
dotProduct_add, dotProduct_single]
def zeroPivotWitness {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ) (i j : Fin n) : Fin n → ℚ :=
Pi.single i (-(M j j + 1) / (2 * M i j)) + Pi.single j 1
theorem zeroPivotWitness_value {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ)
(i j : Fin n) (hii : M i i = 0) (hij : M i j ≠ 0)
(hsymm : M j i = M i j) :
zeroPivotWitness M i j ⬝ᵥ (M *ᵥ zeroPivotWitness M i j) = -1 := by
unfold zeroPivotWitness
rw [quadratic_twoSingle, hii, hsymm]
field_simp [hij]
ring
theorem zeroPivotWitness_negative {n : ℕ} (M : Matrix (Fin n) (Fin n) ℚ)
(i j : Fin n) (hii : M i i = 0) (hij : M i j ≠ 0)
(hsymm : M j i = M i j) :
zeroPivotWitness M i j ⬝ᵥ (M *ᵥ zeroPivotWitness M i j) < 0 := by
rw [zeroPivotWitness_value M i j hii hij hsymm]
decide
end KS.W17
end
end OAI

Xet Storage Details

Size:
1.63 kB
·
Xet hash:
3cc2f94d245f8202e833841fe41ae17ce867516823e70fd4ade044a77d372d21

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.