refactor: Golfing
This commit is contained in:
parent
d9f19aa028
commit
0346bf192b
9 changed files with 42 additions and 116 deletions
|
@ -27,7 +27,7 @@ theorem solEqZero (S : (PureU1 1).LinSols) : S = 0 := by
|
|||
simp at hLin
|
||||
funext i
|
||||
simp at i
|
||||
rw [show i = (0 : Fin 1) by omega]
|
||||
rw [show i = (0 : Fin 1) from Fin.fin_one_eq_zero i]
|
||||
exact hLin
|
||||
|
||||
end One
|
||||
|
|
|
@ -38,7 +38,7 @@ lemma cube_for_linSol (S : (PureU1 3).LinSols) :
|
|||
(PureU1 3).cubicACC S.val = 0 := by
|
||||
rw [← cube_for_linSol']
|
||||
simp only [Fin.isValue, _root_.mul_eq_zero, OfNat.ofNat_ne_zero, false_or]
|
||||
rw [@or_assoc]
|
||||
exact Iff.symm or_assoc
|
||||
|
||||
lemma three_sol_zero (S : (PureU1 3).Sols) : S.val (0 : Fin 3) = 0 ∨ S.val (1 : Fin 3) = 0
|
||||
∨ S.val (2 : Fin 3) = 0 := (cube_for_linSol S.1.1).mpr S.cubicSol
|
||||
|
|
|
@ -28,7 +28,7 @@ def equiv : (PureU1 2).LinSols ≃ (PureU1 2).Sols where
|
|||
simp at hLin
|
||||
erw [accCube_explicit]
|
||||
simp only [Fin.sum_univ_two, Fin.isValue]
|
||||
rw [show S.val (0 : Fin 2) = - S.val (1 : Fin 2) by linear_combination hLin]
|
||||
rw [show S.val (0 : Fin 2) = - S.val (1 : Fin 2) from eq_neg_of_add_eq_zero_left hLin]
|
||||
ring⟩
|
||||
invFun S := S.1.1
|
||||
left_inv S := rfl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue