Skip to content

Commit

Permalink
mathoverflow: one more golf
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Aug 6, 2022
1 parent 7682cd5 commit d86290b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/geometric_algebra/from_mathlib/mathoverflow.lean
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@ def L := _ ⧸ L_func.ker
-- local attribute [irreducible] k

def sq {ι R : Type*} [comm_ring R] (i : ι) : quadratic_form R (ι → R) :=
begin
let a := _,
refine quadratic_form.lin_mul_lin a a,
exact @linear_map.proj _ _ _ (λ _, R) _ _ i
end
quadratic_form.sq.comp $ linear_map.proj i

lemma sq_map_add_char_two {ι R : Type*} [comm_ring R] [char_p R 2] (i : ι) (a b : ι → R) :
sq i (a + b) = sq i a + sq i b :=
Expand All @@ -178,7 +174,6 @@ open_locale big_operators
def Q' : quadratic_form k (fin 3 → k) :=
∑ i, sq i


def Q'_add (x y : fin 3 → k) : Q' (x + y) = Q' x + Q' y :=
by simp only [Q', quadratic_form.sum_apply, sq_map_add_char_two, finset.sum_add_distrib]

Expand Down

0 comments on commit d86290b

Please sign in to comment.